diff options
author | Jeff Layton <jlayton@redhat.com> | 2011-04-27 13:29:49 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2011-04-29 05:02:08 +0000 |
commit | 2a2047bc94d0efc316401170c3d078d9edc20dc4 (patch) | |
tree | fb085ee1125e6f754c817df84cc603e56d664c52 /fs/freevxfs | |
parent | fcda7f4578bbf9717444ca6da8a421d21489d078 (diff) | |
download | op-kernel-dev-2a2047bc94d0efc316401170c3d078d9edc20dc4.zip op-kernel-dev-2a2047bc94d0efc316401170c3d078d9edc20dc4.tar.gz |
cifs: sanitize length checking in coalesce_t2 (try #3)
There are a couple of places in this code where these values can wrap or
go negative, and that could potentially end up overflowing the buffer.
Ensure that that doesn't happen. Do all of the length calculation and
checks first, and only perform the memcpy after they pass.
Also, increase some stack variables to 32 bits to ensure that they don't
wrap without being detected.
Finally, change the error codes to be a bit more descriptive of any
problems detected. -EINVAL isn't very accurate.
Cc: stable@kernel.org
Reported-and-Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/freevxfs')
0 files changed, 0 insertions, 0 deletions