CVE-2024-35832: Vulnerability in Linux Linux
In the Linux kernel, the following vulnerability has been resolved: bcachefs: kvfree bch_fs::snapshots in bch2_fs_snapshots_exit bch_fs::snapshots is allocated by kvzalloc in __snapshot_t_mut. It should be freed by kvfree not kfree. Or umount will triger: [ 406.829178 ] BUG: unable to handle page fault for address: ffffe7b487148008 [ 406.830676 ] #PF: supervisor read access in kernel mode [ 406.831643 ] #PF: error_code(0x0000) - not-present page [ 406.832487 ] PGD 0 P4D 0 [ 406.832898 ] Oops: 0000 [#1] PREEMPT SMP PTI [ 406.833512 ] CPU: 2 PID: 1754 Comm: umount Kdump: loaded Tainted: G OE 6.7.0-rc7-custom+ #90 [ 406.834746 ] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [ 406.835796 ] RIP: 0010:kfree+0x62/0x140 [ 406.836197 ] Code: 80 48 01 d8 0f 82 e9 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 78 9f 1f 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 56 9f 1f 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b0 00 00 00 66 90 48 8b 07 f6 [ 406.837810 ] RSP: 0018:ffffb9d641607e48 EFLAGS: 00010286 [ 406.838213 ] RAX: ffffe7b487148000 RBX: ffffb9d645200000 RCX: ffffb9d641607dc4 [ 406.838738 ] RDX: 000065bb00000000 RSI: ffffffffc0d88b84 RDI: ffffb9d645200000 [ 406.839217 ] RBP: ffff9a4625d00068 R08: 0000000000000001 R09: 0000000000000001 [ 406.839650 ] R10: 0000000000000001 R11: 000000000000001f R12: ffff9a4625d4da80 [ 406.840055 ] R13: ffff9a4625d00000 R14: ffffffffc0e2eb20 R15: 0000000000000000 [ 406.840451 ] FS: 00007f0a264ffb80(0000) GS:ffff9a4e2d500000(0000) knlGS:0000000000000000 [ 406.840851 ] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 406.841125 ] CR2: ffffe7b487148008 CR3: 000000018c4d2000 CR4: 00000000000006f0 [ 406.841464 ] Call Trace: [ 406.841583 ] <TASK> [ 406.841682 ] ? __die+0x1f/0x70 [ 406.841828 ] ? page_fault_oops+0x159/0x470 [ 406.842014 ] ? fixup_exception+0x22/0x310 [ 406.842198 ] ? exc_page_fault+0x1ed/0x200 [ 406.842382 ] ? asm_exc_page_fault+0x22/0x30 [ 406.842574 ] ? bch2_fs_release+0x54/0x280 [bcachefs] [ 406.842842 ] ? kfree+0x62/0x140 [ 406.842988 ] ? kfree+0x104/0x140 [ 406.843138 ] bch2_fs_release+0x54/0x280 [bcachefs] [ 406.843390 ] kobject_put+0xb7/0x170 [ 406.843552 ] deactivate_locked_super+0x2f/0xa0 [ 406.843756 ] cleanup_mnt+0xba/0x150 [ 406.843917 ] task_work_run+0x59/0xa0 [ 406.844083 ] exit_to_user_mode_prepare+0x197/0x1a0 [ 406.844302 ] syscall_exit_to_user_mode+0x16/0x40 [ 406.844510 ] do_syscall_64+0x4e/0xf0 [ 406.844675 ] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 406.844907 ] RIP: 0033:0x7f0a2664e4fb
AI Analysis
Technical Summary
CVE-2024-35832 is a vulnerability identified in the Linux kernel specifically affecting the bcachefs filesystem implementation. The issue arises from improper memory deallocation in the snapshot management code. In detail, the bch_fs::snapshots structure is allocated using kvzalloc in the __snapshot_t_mut function but is incorrectly freed using kfree instead of kvfree during the bch2_fs_snapshots_exit cleanup routine. This mismatch in memory management functions leads to a kernel page fault when unmounting the filesystem, as demonstrated by the provided kernel oops log. The fault occurs because kfree is not suitable for freeing memory allocated by kvzalloc, resulting in an attempt to access invalid memory addresses and causing a supervisor read access fault in kernel mode. The kernel panic trace shows the failure occurs during the umount operation, specifically in the bch2_fs_release function of the bcachefs module. This vulnerability can cause system instability or crashes when unmounting bcachefs filesystems, potentially leading to denial of service conditions. Since this bug is triggered by unmounting snapshots, it requires that the bcachefs filesystem is in use and snapshots are being managed. There is no indication of privilege escalation or remote code execution, but the kernel crash can disrupt system availability. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability was published on May 17, 2024, and affects Linux kernel versions containing the specified commit hashes. The root cause is a developer error in memory management within the kernel's bcachefs code path.
Potential Impact
For European organizations, the primary impact of CVE-2024-35832 is on system stability and availability where Linux systems utilize the bcachefs filesystem, particularly in environments that rely on snapshot functionality and frequent mount/unmount operations. This could affect data centers, cloud providers, and enterprises using Linux servers for storage solutions that incorporate bcachefs. A kernel crash during unmount operations could lead to service interruptions, potential data loss if unclean unmounts occur, and increased operational overhead due to system reboots and troubleshooting. While this vulnerability does not appear to allow unauthorized access or data breaches directly, the denial of service impact could disrupt critical business applications and services. Organizations with high availability requirements or those running virtualized environments (e.g., QEMU-based VMs as indicated in the log) might experience more pronounced effects. Additionally, since bcachefs is a relatively new and advanced filesystem, organizations experimenting with or deploying it in production should be particularly cautious. The lack of known exploits reduces immediate risk, but unpatched systems remain vulnerable to accidental crashes or potential future exploitation if attackers develop methods to trigger the fault remotely or escalate impact.
Mitigation Recommendations
To mitigate CVE-2024-35832, organizations should apply the official Linux kernel patches that correct the memory deallocation mismatch by replacing kfree with kvfree in the bcachefs snapshot cleanup code. Until patches are applied, administrators should avoid unmounting bcachefs filesystems with active snapshots or limit the use of snapshot features to reduce the risk of triggering the fault. Monitoring kernel logs for oops or page fault messages related to bcachefs can help detect attempts to exploit or accidentally trigger the bug. Additionally, implementing robust backup and recovery procedures for systems using bcachefs is advisable to minimize data loss risk from unexpected crashes. For environments using virtualization, ensure that guest and host kernels are updated to prevent cascading failures. Organizations should also consider disabling bcachefs if it is not essential or replacing it with more mature filesystems until the vulnerability is fully remediated. Finally, maintain close coordination with Linux distribution vendors for timely patch releases and security advisories.
Affected Countries
Germany, France, United Kingdom, Netherlands, Sweden, Finland, Poland
CVE-2024-35832: Vulnerability in Linux Linux
Description
In the Linux kernel, the following vulnerability has been resolved: bcachefs: kvfree bch_fs::snapshots in bch2_fs_snapshots_exit bch_fs::snapshots is allocated by kvzalloc in __snapshot_t_mut. It should be freed by kvfree not kfree. Or umount will triger: [ 406.829178 ] BUG: unable to handle page fault for address: ffffe7b487148008 [ 406.830676 ] #PF: supervisor read access in kernel mode [ 406.831643 ] #PF: error_code(0x0000) - not-present page [ 406.832487 ] PGD 0 P4D 0 [ 406.832898 ] Oops: 0000 [#1] PREEMPT SMP PTI [ 406.833512 ] CPU: 2 PID: 1754 Comm: umount Kdump: loaded Tainted: G OE 6.7.0-rc7-custom+ #90 [ 406.834746 ] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014 [ 406.835796 ] RIP: 0010:kfree+0x62/0x140 [ 406.836197 ] Code: 80 48 01 d8 0f 82 e9 00 00 00 48 c7 c2 00 00 00 80 48 2b 15 78 9f 1f 01 48 01 d0 48 c1 e8 0c 48 c1 e0 06 48 03 05 56 9f 1f 01 <48> 8b 50 08 48 89 c7 f6 c2 01 0f 85 b0 00 00 00 66 90 48 8b 07 f6 [ 406.837810 ] RSP: 0018:ffffb9d641607e48 EFLAGS: 00010286 [ 406.838213 ] RAX: ffffe7b487148000 RBX: ffffb9d645200000 RCX: ffffb9d641607dc4 [ 406.838738 ] RDX: 000065bb00000000 RSI: ffffffffc0d88b84 RDI: ffffb9d645200000 [ 406.839217 ] RBP: ffff9a4625d00068 R08: 0000000000000001 R09: 0000000000000001 [ 406.839650 ] R10: 0000000000000001 R11: 000000000000001f R12: ffff9a4625d4da80 [ 406.840055 ] R13: ffff9a4625d00000 R14: ffffffffc0e2eb20 R15: 0000000000000000 [ 406.840451 ] FS: 00007f0a264ffb80(0000) GS:ffff9a4e2d500000(0000) knlGS:0000000000000000 [ 406.840851 ] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 406.841125 ] CR2: ffffe7b487148008 CR3: 000000018c4d2000 CR4: 00000000000006f0 [ 406.841464 ] Call Trace: [ 406.841583 ] <TASK> [ 406.841682 ] ? __die+0x1f/0x70 [ 406.841828 ] ? page_fault_oops+0x159/0x470 [ 406.842014 ] ? fixup_exception+0x22/0x310 [ 406.842198 ] ? exc_page_fault+0x1ed/0x200 [ 406.842382 ] ? asm_exc_page_fault+0x22/0x30 [ 406.842574 ] ? bch2_fs_release+0x54/0x280 [bcachefs] [ 406.842842 ] ? kfree+0x62/0x140 [ 406.842988 ] ? kfree+0x104/0x140 [ 406.843138 ] bch2_fs_release+0x54/0x280 [bcachefs] [ 406.843390 ] kobject_put+0xb7/0x170 [ 406.843552 ] deactivate_locked_super+0x2f/0xa0 [ 406.843756 ] cleanup_mnt+0xba/0x150 [ 406.843917 ] task_work_run+0x59/0xa0 [ 406.844083 ] exit_to_user_mode_prepare+0x197/0x1a0 [ 406.844302 ] syscall_exit_to_user_mode+0x16/0x40 [ 406.844510 ] do_syscall_64+0x4e/0xf0 [ 406.844675 ] entry_SYSCALL_64_after_hwframe+0x6e/0x76 [ 406.844907 ] RIP: 0033:0x7f0a2664e4fb
AI-Powered Analysis
Technical Analysis
CVE-2024-35832 is a vulnerability identified in the Linux kernel specifically affecting the bcachefs filesystem implementation. The issue arises from improper memory deallocation in the snapshot management code. In detail, the bch_fs::snapshots structure is allocated using kvzalloc in the __snapshot_t_mut function but is incorrectly freed using kfree instead of kvfree during the bch2_fs_snapshots_exit cleanup routine. This mismatch in memory management functions leads to a kernel page fault when unmounting the filesystem, as demonstrated by the provided kernel oops log. The fault occurs because kfree is not suitable for freeing memory allocated by kvzalloc, resulting in an attempt to access invalid memory addresses and causing a supervisor read access fault in kernel mode. The kernel panic trace shows the failure occurs during the umount operation, specifically in the bch2_fs_release function of the bcachefs module. This vulnerability can cause system instability or crashes when unmounting bcachefs filesystems, potentially leading to denial of service conditions. Since this bug is triggered by unmounting snapshots, it requires that the bcachefs filesystem is in use and snapshots are being managed. There is no indication of privilege escalation or remote code execution, but the kernel crash can disrupt system availability. No known exploits are reported in the wild, and no CVSS score has been assigned yet. The vulnerability was published on May 17, 2024, and affects Linux kernel versions containing the specified commit hashes. The root cause is a developer error in memory management within the kernel's bcachefs code path.
Potential Impact
For European organizations, the primary impact of CVE-2024-35832 is on system stability and availability where Linux systems utilize the bcachefs filesystem, particularly in environments that rely on snapshot functionality and frequent mount/unmount operations. This could affect data centers, cloud providers, and enterprises using Linux servers for storage solutions that incorporate bcachefs. A kernel crash during unmount operations could lead to service interruptions, potential data loss if unclean unmounts occur, and increased operational overhead due to system reboots and troubleshooting. While this vulnerability does not appear to allow unauthorized access or data breaches directly, the denial of service impact could disrupt critical business applications and services. Organizations with high availability requirements or those running virtualized environments (e.g., QEMU-based VMs as indicated in the log) might experience more pronounced effects. Additionally, since bcachefs is a relatively new and advanced filesystem, organizations experimenting with or deploying it in production should be particularly cautious. The lack of known exploits reduces immediate risk, but unpatched systems remain vulnerable to accidental crashes or potential future exploitation if attackers develop methods to trigger the fault remotely or escalate impact.
Mitigation Recommendations
To mitigate CVE-2024-35832, organizations should apply the official Linux kernel patches that correct the memory deallocation mismatch by replacing kfree with kvfree in the bcachefs snapshot cleanup code. Until patches are applied, administrators should avoid unmounting bcachefs filesystems with active snapshots or limit the use of snapshot features to reduce the risk of triggering the fault. Monitoring kernel logs for oops or page fault messages related to bcachefs can help detect attempts to exploit or accidentally trigger the bug. Additionally, implementing robust backup and recovery procedures for systems using bcachefs is advisable to minimize data loss risk from unexpected crashes. For environments using virtualization, ensure that guest and host kernels are updated to prevent cascading failures. Organizations should also consider disabling bcachefs if it is not essential or replacing it with more mature filesystems until the vulnerability is fully remediated. Finally, maintain close coordination with Linux distribution vendors for timely patch releases and security advisories.
Affected Countries
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.1
- Assigner Short Name
- Linux
- Date Reserved
- 2024-05-17T12:19:12.348Z
- Cisa Enriched
- true
- Cvss Version
- null
- State
- PUBLISHED
Threat ID: 682d982ac4522896dcbe35be
Added to database: 5/21/2025, 9:08:58 AM
Last enriched: 6/29/2025, 4:25:01 PM
Last updated: 8/13/2025, 6:51:34 PM
Views: 12
Related Threats
CVE-2025-53948: CWE-415 Double Free in Santesoft Sante PACS Server
HighCVE-2025-52584: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-46269: CWE-122 Heap-based Buffer Overflow in Ashlar-Vellum Cobalt
HighCVE-2025-54862: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumCVE-2025-54759: CWE-79 Improper Neutralization of Input During Web Page Generation (XSS or 'Cross-site Scripting') in Santesoft Sante PACS Server
MediumActions
Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.
External Links
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.