summaryrefslogtreecommitdiffstats
path: root/fs/attr.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-11-21 15:41:06 +1100
committerBen Myers <bpm@sgi.com>2013-12-05 16:19:51 -0600
commitb7d961b35b3ab69609aeea93f870269cb6e7ba4d (patch)
treea4e72de7ad606abd2aa39db56d252f3bf37016da /fs/attr.c
parentf9fd0135610084abef6867d984e9951c3099950d (diff)
downloadlinux-b7d961b35b3ab69609aeea93f870269cb6e7ba4d.tar.gz
linux-b7d961b35b3ab69609aeea93f870269cb6e7ba4d.tar.bz2
linux-b7d961b35b3ab69609aeea93f870269cb6e7ba4d.zip
xfs: growfs overruns AGFL buffer on V4 filesystems
This loop in xfs_growfs_data_private() is incorrect for V4 superblocks filesystems: for (bucket = 0; bucket < XFS_AGFL_SIZE(mp); bucket++) agfl->agfl_bno[bucket] = cpu_to_be32(NULLAGBLOCK); For V4 filesystems, we don't have a agfl header structure, and so XFS_AGFL_SIZE() returns an entire sector's worth of entries, which we then index from an offset into the sector. Hence: buffer overrun. This problem was introduced in 3.10 by commit 77c95bba ("xfs: add CRC checks to the AGFL") which changed the AGFL structure but failed to update the growfs code to handle the different structures. Fix it by using the correct offset into the buffer for both V4 and V5 filesystems. Cc: <stable@vger.kernel.org> Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Jie Liu <jeff.liu@oracle.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/attr.c')
0 files changed, 0 insertions, 0 deletions