]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: validity check agbnos on the AGFL
authorDave Chinner <dchinner@redhat.com>
Fri, 16 Jun 2023 01:37:35 +0000 (18:37 -0700)
committerCarlos Maiolino <cem@kernel.org>
Thu, 22 Jun 2023 12:07:39 +0000 (14:07 +0200)
commit629d6b3df786a8a241b2cd72fb5885d66ea143d8
tree941ef695b27a7ab90a910a6b6f64bd6c2a6b8270
parentdaa2d8205208dfafaa8dc29310f93f6c94803e24
xfs: validity check agbnos on the AGFL

Source kernel commit: 3148ebf2c0782340946732bfaf3073d23ac833fa

If the agfl or the indexing in the AGF has been corrupted, getting a
block form the AGFL could return an invalid block number. If this
happens, bad things happen. Check the agbno we pull off the AGFL
and return -EFSCORRUPTED if we find somethign bad.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
libxfs/xfs_alloc.c