🛡️ UBUNTU-CVE-2024-35949
⚪ Unknown ✅ No Known Exploit OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: make sure that WRITTEN is set on all metadata blocks We previously would call btrfs_check_leaf() if we had the check integrity code enabled, which meant that we could only run the extended leaf checks if we had WRITTEN set on the header flags. This leaves a gap in our checking, because we could end up with corruption on disk where WRITTEN isn't set on the leaf, and then the extended leaf checks don't get run which we rely on to validate all of the item pointers to make sure we don't access memory outside of the extent buffer. However, since 732fab95abe2 ("btrfs: check-integrity: remove CONFIG_BTRFS_FS_CHECK_INTEGRITY option") we no longer call btrfs_check_leaf() from btrfs_mark_buffer_dirty(), which means we only ever call it on blocks that are being written out, and thus have WRITTEN set, or that are being read in, which should have WRITTEN set. Add checks to make sure we have WRITTEN set appropriately, and then make sure __btrfs_check_leaf() always does the item checking. This will protect us from file systems that have been corrupted and no longer have WRITTEN set on some of the blocks. This was hit on a crafted image tweaking the WRITTEN bit and reported by KASAN as out-of-bound access in the eb accessors. The example is a dir item at the end of an eb. [2.042] BTRFS warning (device loop1): bad eb member start: ptr 0x3fff start 30572544 member offset 16410 size 2 [2.040] general protection fault, probably for non-canonical address 0xe0009d1000000003: 0000 [#1] PREEMPT SMP KASAN NOPTI [2.537] KASAN: maybe wild-memory-access in range [0x0005088000000018-0x000508800000001f] [2.729] CPU: 0 PID: 2587 Comm: mount Not tainted 6.8.2 #1 [2.729] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014 [2.621] RIP: 0010:btrfs_get_16+0x34b/0x6d0 [2.621] RSP: 0018:ffff88810871fab8 EFLAGS: 00000206 [2.621] RAX: 0000a11000000003 RBX: ffff888104ff8720 RCX: ffff88811b2288c0 [2.621] RDX: dffffc0000000000 RSI: ffffffff81dd8aca RDI: ffff88810871f748 [2.621] RBP: 000000000000401a R08: 0000000000000001 R09: ffffed10210e3ee9 [2.621] R10: ffff88810871f74f R11: 205d323430333737 R12: 000000000000001a [2.621] R13: 000508800000001a R14: 1ffff110210e3f5d R15: ffffffff850011e8 [2.621] FS: 00007f56ea275840(0000) GS:ffff88811b200000(0000) knlGS:0000000000000000 [2.621] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [2.621] CR2: 00007febd13b75c0 CR3: 000000010bb50000 CR4: 00000000000006f0 [2.621] Call Trace: [2.621] [2.621] ? show_regs+0x74/0x80 [2.621] ? die_addr+0x46/0xc0 [2.621] ? exc_general_protection+0x161/0x2a0 [2.621] ? asm_exc_general_protection+0x26/0x30 [2.621] ? btrfs_get_16+0x33a/0x6d0 [2.621] ? btrfs_get_16+0x34b/0x6d0 [2.621] ? btrfs_get_16+0x33a/0x6d0 [2.621] ? __pfx_btrfs_get_16+0x10/0x10 [2.621] ? __pfx_mutex_unlock+0x10/0x10 [2.621] btrfs_match_dir_item_name+0x101/0x1a0 [2.621] btrfs_lookup_dir_item+0x1f3/0x280 [2.621] ? __pfx_btrfs_lookup_dir_item+0x10/0x10 [2.621] btrfs_get_tree+0xd25/0x1910 [ copy more details from report ]

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CWE N/A
Public Exploit ✅ No
Source OSV
Published 2024-05-20
Updated 2026-06-15
Modified 2026-06-08
Fix URL N/A

Affected Packages

Software From version Fixed in
linux 6.8.0-40.40
linux-allwinner-5.19
linux-aws 6.8.0-1013.14
linux-aws-5.0
linux-aws-5.11
linux-aws-5.13
linux-aws-5.15
linux-aws-5.19
linux-aws-5.3
linux-aws-5.4
linux-aws-5.8
linux-aws-6.2
linux-aws-6.5
linux-aws-6.8 6.8.0-1013.14~22.04.1
linux-aws-fips
linux-aws-hwe
linux-azure 6.8.0-1012.14
linux-azure-4.15
linux-azure-5.11
linux-azure-5.13
linux-azure-5.15
linux-azure-5.19
linux-azure-5.3
linux-azure-5.4
linux-azure-5.8
linux-azure-6.2
linux-azure-6.5
linux-azure-6.8 6.8.0-1012.14~22.04.1
linux-azure-edge
linux-azure-fde
linux-azure-fde-5.15
linux-azure-fde-5.19
linux-azure-fde-6.2
linux-azure-fips
linux-bluefield
linux-fips 6.8.0-78.78+fips1
linux-gcp 6.8.0-1012.13
linux-gcp-4.15
linux-gcp-5.11
linux-gcp-5.13
linux-gcp-5.15
linux-gcp-5.19
linux-gcp-5.3
linux-gcp-5.4
linux-gcp-5.8
linux-gcp-6.2
linux-gcp-6.5
linux-gcp-6.8 6.8.0-1012.13~22.04.1
linux-gcp-fips
linux-gke 6.8.0-1008.11
linux-gke-4.15
linux-gke-5.15
linux-gke-5.4
linux-gkeop
linux-gkeop-5.15
linux-gkeop-5.4
linux-hwe
linux-hwe-5.11
linux-hwe-5.13
linux-hwe-5.15
linux-hwe-5.19
linux-hwe-5.4
linux-hwe-5.8
linux-hwe-6.2
linux-hwe-6.5
linux-hwe-6.8 6.8.0-40.40~22.04.3
linux-hwe-edge
linux-ibm 6.8.0-1010.10
linux-ibm-5.15
linux-ibm-5.4
linux-ibm-6.8 6.8.0-1010.10~22.04.1
linux-intel-5.13
linux-intel-iot-realtime
linux-intel-iotg
linux-intel-iotg-5.15
linux-iot
linux-kvm
linux-lowlatency 6.8.0-40.40.1
linux-lowlatency-hwe-5.15
linux-lowlatency-hwe-5.19
linux-lowlatency-hwe-6.2
linux-lowlatency-hwe-6.5
linux-lowlatency-hwe-6.8 6.8.0-40.40.1~22.04.1
linux-lts-xenial
linux-nvidia 6.8.0-1011.11
linux-nvidia-6.2
linux-nvidia-6.5
linux-nvidia-6.8 6.8.0-1011.11~22.04.1
linux-nvidia-lowlatency 6.8.0-1011.11.1
linux-nvidia-tegra
linux-nvidia-tegra-5.15
linux-nvidia-tegra-igx
linux-oem
linux-oem-5.10
linux-oem-5.13
linux-oem-5.14
linux-oem-5.17
linux-oem-5.6
linux-oem-6.0
linux-oem-6.1
linux-oem-6.5
linux-oem-6.8 6.8.0-1010.10
linux-oracle 6.8.0-1010.10
linux-oracle-5.0
linux-oracle-5.11
linux-oracle-5.13
linux-oracle-5.15
linux-oracle-5.3
linux-oracle-5.4
linux-oracle-5.8
linux-oracle-6.5
linux-oracle-6.8 6.8.0-1010.10~22.04.1
linux-raspi 6.8.0-1009.10
linux-raspi-5.4
linux-raspi-realtime 6.8.0-2008.8
linux-raspi2
linux-realtime 6.8.1-1006.6
linux-realtime-6.8 6.8.1-1006.6~22.04.1
linux-riscv 6.8.0-40.40.1
linux-riscv-5.11
linux-riscv-5.15
linux-riscv-5.19
linux-riscv-5.8
linux-riscv-6.5
linux-riscv-6.8 6.8.0-40.40.1~22.04.1
linux-starfive-5.19
linux-starfive-6.2
linux-starfive-6.5
linux-xilinx-zynqmp

Similar Threats

Vulnerability Monitoring

Stay informed about vulnerabilities in your stack

BotEraser monitors your WordPress installation and notifies you when software you use appears in our vulnerability database.

Set Up Free Alerts →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.