Re: [PATCH] scsi: fcoe: sanity check string size for store_ctrl_mode option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 22, 2017 at 02:01:37PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
> 
> Reading and writing to mode[count - 1] implies the count should not
> be less than 1 so add a sanity check for this.
> 
> Detected with CoverityScan, CID#1357345 ("Overflowed array index write")
> 
> Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>

This is harmless, of course, but count can't be zero.  This is a sysfs
file so we test for zero size writes in sysfs_kf_write() and return
early.

regards,
dan carpenter

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux