Darren Kenny 11e1cffb7e fs/btrfs: Fix several fuzz issues with invalid dir item sizing
According to the btrfs code in Linux, the structure of a directory item
leaf should be of the form:

  |struct btrfs_dir_item|name|data|

in GRUB the name len and data len are in the grub_btrfs_dir_item
structure's n and m fields respectively.

The combined size of the structure, name and data should be less than
the allocated memory, a difference to the Linux kernel's struct
btrfs_dir_item is that the grub_btrfs_dir_item has an extra field for
where the name is stored, so we adjust for that too.

Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2022-06-07 16:39:34 +02:00
..
2022-03-14 15:45:30 +01:00
2011-10-30 16:10:18 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2011-04-11 18:13:00 +02:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2021-03-02 15:54:18 +01:00
2011-04-11 08:16:13 +02:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2019-04-09 10:03:29 +10:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00
2020-07-29 16:55:47 +02:00
2022-03-14 15:45:30 +01:00
2010-05-06 11:34:04 +05:30
2012-12-08 20:56:58 +01:00
2022-03-14 15:45:30 +01:00
2022-03-14 15:45:30 +01:00