Vulnerabilities

Vulnerability · CVE-2024-35784

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock with fiemap and extent locking While working on the patchset to remove extent l…

Published May 17, 2024 · catalog updated Oct 30, 2026 · linux kernel

Last checked Nov 8, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2024-35784. EPSS is 0.17%. Act only if a listed version of linux kernel is installed.

Gaps on this record

  • No vendor fix or required action is stored. Compare the linked advisory before you change production.

Same product and reporting

Severity
Medium5.5
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.17%
Remediation
Version ranges on file
Affected products
cpe linux/linux kernel

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock with fiemap and extent locking While working on the patchset to remove extent locking I got a lockdep splat with fiemap and pagefaulting with my new extent lock replacement lock. This deadlock exists with our normal code, we just don't have lockdep annotations with the extent locking so we've never noticed it. Since we're copying the fiemap extent to user space on every iteration we have the chance of pagefaulting. Because we hold the extent lock for the entire range we could mkwrite into a range in the file that we have mmap'ed. This would deadlock with the following stack trace [ ] lock_extent+0x28d/0x2f0 [ ] btrfs_page_mkwrite+0x273/0x8a0 [ ] do_page_mkwrite+0x50/0xb0 [ ] do_fault+0xc1/0x7b0 [ ] __handle_mm_fault+0x2fa/0x460 [ ] handle_mm_fault+0xa4/0x330 [ ] do_user_addr_fault+0x1f4/0x800 [ ] exc_page_fault+0x7c/0x1e0 [ ] asm_exc_page_fault+0x26/0x30 [ ] rep_movs_alternative+0x33/0x70 [ ] _copy_to_user+0x49/0x70 [ ] fiemap_fill_next_extent+0xc8/0x120 [ ] emit_fiemap_extent+0x4d/0xa0 [ ] extent_fiemap+0x7f8/0xad0 [ ] btrfs_fiemap+0x49/0x80 [ ] __x64_sys_ioctl+0x3e1/0xb50 [ ] do_syscall_64+0x94/0x1a0 [ ] entry_SYSCALL_64_after_hwframe+0x6e/0x76 I wrote an fstest to reproduce this deadlock without my replacement lock and verified that the deadlock exists with our existing locking. To fix this simply don't take the extent lock for the entire duration of the fiemap. This is safe in general because we keep track of where we are when we're searching the tree, so if an ordered extent updates in the middle of our fiemap call we'll still emit the correct extents because we know what offset we were on before. The only place we maintain the lock is searching delalloc. Since the delalloc stuff can change during writeback we want to lock the extent range so we have a consistent view of delalloc at the time we're checking to see if we need to set the delalloc flag. With this patch applied w

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • cpe linux/linux kernel6.8
  • cpe linux/linux kernel< 6.6.24
  • cpe linux/linux kernel< 6.7.12

How to fix CVE-2024-35784

  • Upgrade

    CVE-2024-35784 lists a fix boundary at 6.6.24. Compare the installed build with that boundary before you change production.

  • Version check

    Affected < 6.6.24

  • Advisory

    Open the cve_org record and follow its fix.

  • Official advisories

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2024-35784. EPSS is 0.17%. Act only if a listed version of linux kernel is installed.

Which versions are affected?

Compare what you have installed with linux/linux kernel 6.8; linux/linux kernel < 6.6.24; linux/linux kernel < 6.7.12. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-667. EPSS 0.17%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. May 17, 2024 · NIST NVD

    Detected

    In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock with fiemap and extent locking While working on the patchset to remove extent locking I got a lockdep splat with fiemap and pagefaulting with my new extent lock replacement lock. This deadlock exists with our normal code, we just don't have lockdep annotations with the extent locking so we've never noticed it.

  2. Oct 30, 2026 · NIST NVD

    Updated

    In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock with fiemap and extent locking While working on the patchset to remove extent locking I got a lockdep splat with fiemap and pagefaulting with my new extent lock replacement lock. This deadlock exists with our normal code, we just don't have lockdep annotations with the extent locking so we've never noticed it.

Sources

  • CVE.orgVulnerability recordCVE-2024-35784

    Official CVE identifier

    cve.org
  • NIST NVDVulnerability recordCVE-2024-35784

    In the Linux kernel, the following vulnerability has been resolved: btrfs: fix deadlock with fiemap and extent locking While working on the patchset to remove extent locking I got a lockdep splat with fiemap and pagefaulting with my new extent lock replacement lock. This deadl

    nvd.nist.gov

References

Freshness

Last verified in this catalog Nov 8, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • CVE.orgOct 30, 2026
  • NIST NVDOct 30, 2026