diff options
author | Clemens Ladisch <[email protected]> | 2010-10-25 11:41:53 +0200 |
---|---|---|
committer | Stefan Richter <[email protected]> | 2010-10-30 23:37:19 +0200 |
commit | 85f7ffd5d2b320f73912b15fe8cef34bae297daf (patch) | |
tree | d9151979bb3834bd1254239a42247a668f059133 /net/unix/sysctl_net_unix.c | |
parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) |
firewire: ohci: fix buffer overflow in AR split packet handling
When the controller had to split a received asynchronous packet into two
buffers, the driver tries to reassemble it by copying both parts into
the first page. However, if size + rest > PAGE_SIZE, i.e., if the yet
unhandled packets before the split packet, the split packet itself, and
any received packets after the split packet are together larger than one
page, then the memory after the first page would get overwritten.
To fix this, do not try to copy the data of all unhandled packets at
once, but copy the possibly needed data every time when handling
a packet.
This gets rid of most of the infamous crashes and data corruptions when
using firewire-net.
Signed-off-by: Clemens Ladisch <[email protected]>
Cc: 2.6.22-2.6.36 <[email protected]>
Tested-by: Maxim Levitsky <[email protected]>
Signed-off-by: Stefan Richter <[email protected]> (cast PAGE_SIZE to size_t)
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions