| To: | Dave Chinner <david@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx |
|---|---|
| Subject: | Re: [PATCH] xfs: growfs overruns AGFL buffer on V4 filesystems |
| From: | Jeff Liu <jeff.liu@xxxxxxxxxx> |
| Date: | Thu, 21 Nov 2013 13:42:39 +0800 |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1385008866-22256-1-git-send-email-david@xxxxxxxxxxxxx> |
| References: | <1385008866-22256-1-git-send-email-david@xxxxxxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/21 2013 12:41, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
>
> 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.
This is a problem I'm able to understand.
Reviewed-by: Jie Liu <jeff.liu@xxxxxxxxxx>
Thanks,
-Jeff
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] xfs: growfs overruns AGFL buffer on V4 filesystems, Dave Chinner |
|---|---|
| Next by Date: | [PATCH] xfstests: add a new test case to test i_size updated properly under dio, Zheng Liu |
| Previous by Thread: | [PATCH] xfs: growfs overruns AGFL buffer on V4 filesystems, Dave Chinner |
| Next by Thread: | [PATCH] xfstests: add a new test case to test i_size updated properly under dio, Zheng Liu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |