Skip to content
Snippets Groups Projects
Commit 23c785c3 authored by Darren Kenny's avatar Darren Kenny Committed by Julian Andres Klode
Browse files

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: default avatarDarren Kenny <darren.kenny@oracle.com>
Reviewed-by: default avatarDaniel Kiper <daniel.kiper@oracle.com>
parent 998bd74c
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment