From: Al Viro Date: Sun, 26 Feb 2006 14:34:10 +0000 (-0600) Subject: [PATCH] sd: fix memory corruption with broken mode page headers X-Git-Tag: v2.6.16-rc5~18 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=489708007785389941a89fa06aedc5ec53303c96;p=pandora-kernel.git [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: Al Viro Also removed the buffer size magic number (512) and added DPOFUA of zero to the defaults Signed-off-by: James Bottomley Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed