[Precise][SRU][PATCH 1/1] Revert "xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end"
Luis Henriques
luis.henriques at canonical.com
Wed Oct 9 12:28:01 UTC 2013
BugLink: http://bugs.launchpad.net/bugs/1236041
This reverts commit 150c8fee1a79a70043605185f88e38a2cb6bb64f which is
commit eb178619f930fa2ba2348de332a1ff1c66a31424 upstream.
Several people have reported issues using xfs_growfs after applying the
CVE-2013-1819 fix backport:
[ 133.574503] XFS (loop0): _xfs_buf_find: Block out of range: block 0x500001, EOFS 0x400000
[ 133.575554] XFS (loop0): _xfs_buf_find: Block out of range: block 0x500001, EOFS 0x400000
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
fs/xfs/xfs_buf.c | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index c13fff4..2f5a8f7 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -434,7 +434,6 @@ _xfs_buf_find(
struct rb_node **rbp;
struct rb_node *parent;
xfs_buf_t *bp;
- xfs_daddr_t eofs;
range_base = (ioff << BBSHIFT);
range_length = (isize << BBSHIFT);
@@ -443,23 +442,6 @@ _xfs_buf_find(
ASSERT(!(range_length < (1 << btp->bt_sshift)));
ASSERT(!(range_base & (xfs_off_t)btp->bt_smask));
- /*
- * Corrupted block numbers can get through to here, unfortunately, so we
- * have to check that the buffer falls within the filesystem bounds.
- */
- eofs = XFS_FSB_TO_BB(btp->bt_mount, btp->bt_mount->m_sb.sb_dblocks);
- if (ioff >= eofs) {
- /*
- * XXX (dgc): we should really be returning EFSCORRUPTED here,
- * but none of the higher level infrastructure supports
- * returning a specific error on buffer lookup failures.
- */
- xfs_alert(btp->bt_mount,
- "%s: Block out of range: block 0x%llx, EOFS 0x%llx ",
- __func__, ioff, eofs);
- return NULL;
- }
-
/* get tree root */
pag = xfs_perag_get(btp->bt_mount,
xfs_daddr_to_agno(btp->bt_mount, ioff));
--
1.8.3.2
More information about the kernel-team
mailing list