Re: [PATCH] USB: cdc-wdm: fix read buffer overflow

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

 



On Thursday 14 February 2013 13:53:26 Bjørn Mork wrote:
> Do not scribble past end of buffer.  Check if the userspace buffer has
> enough space available before attempting to move more data there. Throw
> away all previously read data if the buffer is full.
> 
> Cc: stable <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: Bjørn Mork <bjorn@xxxxxxx>
> ---
> Hello Oliver!
> 
> I hope I am missing something here...
> 
> This is otherwise a pretty nasty bug which I cannot understand we
> didn't notice before.  What am I missing?

Hi,

I am afraid your diagnosis is correct. This is a buffer overflow. Not good.
The fix is a problem. It seems to me that we need to throw away the
newest data and report an error.

	Regards
		Oliver

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


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux