]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
btrfs: tree-checker: check item_size for dev_item
authorSu Yue <l@damenly.su>
Fri, 21 Jan 2022 09:33:35 +0000 (17:33 +0800)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 7 Mar 2022 10:45:52 +0000 (11:45 +0100)
commit3388e97733d0e926804917afdfbcc7255c2a62ec
tree8f10f0cd8923b2a3296097144fa0877c636afb52
parent1b97caa0407a8ffe740b62694212c994261b086f
btrfs: tree-checker: check item_size for dev_item

BugLink: https://bugs.launchpad.net/bugs/1963891
commit ea1d1ca4025ac6c075709f549f9aa036b5b6597d upstream.

Check item size before accessing the device item to avoid out of bound
access, similar to inode_item check.

Signed-off-by: Su Yue <l@damenly.su>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/btrfs/tree-checker.c