Skip to content
Commit 48970800 authored by Al Viro's avatar Al Viro Committed by Linus Torvalds
Browse files

[PATCH] sd: fix memory corruption with broken mode page headers



There's a problem in sd where we blindly believe the length of the
headers and block descriptors.  Some devices return insane values for
these and cause our length to end up greater than the actual buffer
size, so check to make sure.

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>

Also removed the buffer size magic number (512) and added DPOFUA of
zero to the defaults

Signed-off-by: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a0124d78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment