CVE-2024-56774

btrfs: add a sanity check for btrfs root in btrfs_search_slot()

Medium · published January 8, 2025

CVSS v3.1
5.5
EPSS
0%
Percentile
10.2
In the wild
Unconfirmed
What it is

In the Linux kernel, the following vulnerability has been resolved:

btrfs: add a sanity check for btrfs root in btrfs_search_slot()

Syzbot reports a null-ptr-deref in btrfs_search_slot().

The reproducer is using rescue=ibadroots, and the extent tree root is

corrupted thus the extent tree is NULL.

When scrub tries to search the extent tree to gather the needed extent

info, btrfs_search_slot() doesn't check if the target root is NULL or

not, resulting the null-ptr-deref.

Add sanity check for btrfs root before using it in btrfs_search_slot().

The record
Technical detail
CVSS v3.1
5.5 · MEDIUM
Vector
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVSS v4.0
Not supplied
EPSS
0.00207 · 10.2th percentile
Published
2025-01-08T17:49Z
EPSS history
Timeline
  • 08 JAN 17:49Z
    btrfs: add a sanity check for btrfs root in btrfs_search_slot()
    cvelistv5