[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: NAl 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: NJames Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
Showing
想要评论请 注册 或 登录