From: Eric Sandeen Date: Fri, 28 Nov 2014 03:03:55 +0000 (+1100) Subject: xfs: catch invalid negative blknos in _xfs_buf_find() X-Git-Tag: omap-for-v3.20/drop-legacy-3517~112^2~3^2 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db52d09ecbf85c54e263a9d1ebfb615a9b2b3ba6;p=pandora-kernel.git xfs: catch invalid negative blknos in _xfs_buf_find() Here blkno is a daddr_t, which is a __s64; it's possible to hold a value which is negative, and thus pass the (blkno >= eofs) test. Then we try to do a xfs_perag_get() for a ridiculous agno via xfs_daddr_to_agno(), and bad things happen when that fails, and returns a null pag which is dereferenced shortly thereafter. Found via a user-supplied fuzzed image... Signed-off-by: Eric Sandeen Reviewed-by: Mark Tinguely Signed-off-by: Dave Chinner --- Reading git-diff-tree failed