Re: [PATCH] scsi: prevent stack buffer overflow in host_reset

2012-11-30 Thread James Bottomley
On Thu, 2012-11-15 at 15:51 -0500, Sasha Levin wrote: > diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c > index ce5224c..77ba946 100644 > --- a/drivers/scsi/scsi_sysfs.c > +++ b/drivers/scsi/scsi_sysfs.c > @@ -249,9 +249,9 @@ static DEVICE_ATTR(active_mode, S_IRUGO | S_IWUSR, >

Re: [PATCH] scsi: prevent stack buffer overflow in host_reset

2012-11-16 Thread Rolf Eike Beer
Am Donnerstag 15 November 2012, 15:51:46 schrieb Sasha Levin: > store_host_reset() has tried to re-invent the wheel to compare sysfs > strings. Unfortunately it did so poorly and never bothered to check the > input from userspace before overwriting stack with it, so something simple > as: > > echo

[PATCH] scsi: prevent stack buffer overflow in host_reset

2012-11-15 Thread Sasha Levin
store_host_reset() has tried to re-invent the wheel to compare sysfs strings. Unfortunately it did so poorly and never bothered to check the input from userspace before overwriting stack with it, so something simple as: echo "WoopsieWoopsie" > /sys/devices/pseudo_0/adapter0/host0/scsi_host/host0/h