Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
btrfs: add a sanity check for csum root before filling the data csum
Syzbot reported a null-ptr-deref in btrfs_lookup_csums_bitmap(). The btrfs mount options enable IGNOREDATACSUMS, which prevents the csum root from being loaded. Before filling in the csum data, check the flag BTRFS_FS_STATE_NO_DATA_CSUMS to confirm that the csum root has been loaded. Reported-and-tested-by: [email protected] Closes: https://syzkaller.appspot.com/bug?extid=5d2b33d7835870519b5f CC: [email protected] # 6.6+ Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Edward Adam Davis <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
- Loading branch information