diff options
author | Christoph Hellwig <[email protected]> | 2024-04-30 06:07:55 +0200 |
---|---|---|
committer | Chandan Babu R <[email protected]> | 2024-05-03 11:10:17 +0530 |
commit | 45cf976008ddef4a9c9a30310c9b4fb2a9a6602a (patch) | |
tree | fa9900e5bd3bfd13ccbed7f0dcb3899e5e28bb4c /lib/debugobjects.c | |
parent | 0370f9bb49f139cc3f9916a83d50eff2ef790232 (diff) |
xfs: fix log recovery buffer allocation for the legacy h_size fixup
Commit a70f9fe52daa ("xfs: detect and handle invalid iclog size set by
mkfs") added a fixup for incorrect h_size values used for the initial
umount record in old xfsprogs versions. Later commit 0c771b99d6c9
("xfs: clean up calculation of LR header blocks") cleaned up the log
reover buffer calculation, but stoped using the fixed up h_size value
to size the log recovery buffer, which can lead to an out of bounds
access when the incorrect h_size does not come from the old mkfs
tool, but a fuzzer.
Fix this by open coding xlog_logrec_hblks and taking the fixed h_size
into account for this calculation.
Fixes: 0c771b99d6c9 ("xfs: clean up calculation of LR header blocks")
Reported-by: Sam Sun <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Brian Foster <[email protected]>
Reviewed-by: "Darrick J. Wong" <[email protected]>
Signed-off-by: Chandan Babu R <[email protected]>
Diffstat (limited to 'lib/debugobjects.c')
0 files changed, 0 insertions, 0 deletions