# CVE-2024-35832: bcachefs: kvfree bch\_fs::snapshots in bch2\_fs\_snapshots\_exit

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.27% (percentile 12, 2026-11-26)
- **CWE:** CWE-763
- **Published:** 2024-05-17T13:48:20.877Z
- **Modified:** 2026-06-17T07:35:30.660Z

## Who should check

- Anyone running Linux \>= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, \< 56590678791119b9a655202e49898edfb9307271; \>= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, \< 369acf97d6fd5da620d053d0f1878ffe32eff555
- Anyone running Linux 6.7

## 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

## Affected and fixed versions

- Linux: \>= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, \< 56590678791119b9a655202e49898edfb9307271; \>= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, \< 369acf97d6fd5da620d053d0f1878ffe32eff555 (cvelist)
- Linux: 6.7 (cvelist)

## Mitigation

- Upgrade Linux to 369acf97d6fd5da620d053d0f1878ffe32eff555 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-35832. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-35832.md
Affected: Linux >= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, < 56590678791119b9a655202e49898edfb9307271; >= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, < 369acf97d6fd5da620d053d0f1878ffe32eff555; Linux 6.7
Fixed in: Linux 56590678791119b9a655202e49898edfb9307271, Linux 369acf97d6fd5da620d053d0f1878ffe32eff555

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-35832 being exploited?

There is no confirmed exploitation: CVE-2024-35832 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.27% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-35832?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-35832?

Linux \>= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, \< 56590678791119b9a655202e49898edfb9307271; \>= 1c6fdbd8f2465ddfb73a01ec620cbf3d14044e1a, \< 369acf97d6fd5da620d053d0f1878ffe32eff555; Linux 6.7.

### Is there a fix for CVE-2024-35832?

Yes. Fixed in Linux 56590678791119b9a655202e49898edfb9307271, Linux 369acf97d6fd5da620d053d0f1878ffe32eff555. Upgrade Linux to 369acf97d6fd5da620d053d0f1878ffe32eff555 or later.

### How do I check if I'm affected by CVE-2024-35832?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/56590678791119b9a655202e49898edfb9307271>
- patch: <https://git.kernel.org/stable/c/369acf97d6fd5da620d053d0f1878ffe32eff555>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-35832>

HTML: <https://flawdb.com/CVE-2024-35832> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-35832>
