Search CVEs and advisories

Search CVEs and Linux security advisories by vendor, product, package, or severity, and see which vulnerabilities each advisory addresses.

CVE

CVE-2025-68358

published

btrfs: fix racy bitfield write in btrfs_clear_space_info_full()

Published
24 Dec 2025, 10:32:47 UTC
Updated
11 May 2026, 21:51:39 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux957780eb2788d8c218d539e19a85653f51a96dc1 to < b0bb67385480a3aa4c54b139e4f371ddd06b5150 · 957780eb2788d8c218d539e19a85653f51a96dc1 to < 55835646da78e83e7ad06abd741ca8fd8c0b0ea7 · 957780eb2788d8c218d539e19a85653f51a96dc1 to < d4a81b8ec639895999275ea2472c69825cd67ea4 · 957780eb2788d8c218d539e19a85653f51a96dc1 to < db4ae18e1b31e0421fb5312e56aefa382bbc6ece · 957780eb2788d8c218d539e19a85653f51a96dc1 to < 6f442808a86eef847ee10afa9e6459494ed85bb3 · 957780eb2788d8c218d539e19a85653f51a96dc1 to < 742b90eaf394f0018352c0e10dc89763b2dd5267 · 957780eb2788d8c218d539e19a85653f51a96dc1 to < 38e818718c5e04961eea0fa8feff3f100ce40408 · Other versions: unaffected Affected Not stated Linux
Linux — Linux4.8 (affected) · 0 to < 4.8 (unaffected · semver) · 5.15.201 through 5.15.* (unaffected · semver) · 6.1.164 through 6.1.* (unaffected · semver) · 6.6.124 through 6.6.* (unaffected · semver) · 6.12.68 through 6.12.* (unaffected · semver) · 6.17.13 through 6.17.* (unaffected · semver) · 6.18.2 through 6.18.* (unaffected · semver) · 6.19 and later (unaffected · original_commit_for_fix) · Other versions: affected Version-specific Not stated Linux
Amazon Linux AL2 Release evaluation No Fix Planned Not stated Amazon Linux assessment
Amazon Linux AL2 Release evaluationALAS2KERNEL-5.15-2026-098 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2026-1455 Fixed Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2026-1491 Fixed Not stated Amazon Linux assessment
Debian bookworm linux Advisory build 6.1.164-1 DSA-6163-1
Oracle Linux 10 kernel-uekaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Show 98 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Debian bullseye linux-6.1 Advisory build 6.1.164-1~deb11u1 DLA-4499-1
Debian trixie linux Advisory build 6.12.69-1 DSA-6126-1
Oracle Linux 10 kernel-uekaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uekaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uekx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uekx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uekx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-coreaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-coreaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-coreaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-corex86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-corex86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-corex86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debugaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debugaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debugaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debugx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debugx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debugx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-coreaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-coreaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-coreaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-corex86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-corex86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-corex86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-develaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-develaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-develaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-develx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-develx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-develx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modulesaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modulesaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modulesaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modulesx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modulesx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modulesx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-coreaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-coreaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-coreaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-corex86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-corex86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-corex86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-deprecatedaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-deprecatedaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-deprecatedaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-deprecatedx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-deprecatedx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-deprecatedx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-desktopaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-desktopaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-desktopaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-desktopx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-desktopx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-desktopx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-extraaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-extraaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-extraaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-extrax86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-extrax86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-extrax86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilteraarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilteraarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilteraarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilterx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilterx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-extra-netfilterx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-usbaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-usbaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-usbaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-usbx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-usbx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-usbx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-wirelessaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-wirelessaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-wirelessaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-debug-modules-wirelessx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-debug-modules-wirelessx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-debug-modules-wirelessx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-develaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-develaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-develaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-develx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-develx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-develx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-docaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-docaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-docaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-docx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-docx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-docx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-modulesaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-modulesaarch64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-modulesaarch64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-modulesx86_64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160
Oracle Linux 10 kernel-uek-modulesx86_64 Advisory build 0:6.12.0-201.74.2.1.el10uek ELSA-2026-50232
Oracle Linux 10 kernel-uek-modulesx86_64 Advisory build 0:6.12.0-204.92.4.2.el10uek ELSA-2026-50372
Oracle Linux 10 kernel-uek-modules-coreaarch64 Advisory build 0:6.12.0-200.74.27.el10uek ELSA-2026-50160

Package entries are limited to the first 100 builds and 100 linked advisories.

Description

In the Linux kernel, the following vulnerability has been resolved: btrfs: fix racy bitfield write in btrfs_clear_space_info_full() From the memory-barriers.txt document regarding memory barrier ordering guarantees: (*) These guarantees do not apply to bitfields, because compilers often generate code to modify these using non-atomic read-modify-write sequences. Do not attempt to use bitfields to synchronize parallel algorithms. (*) Even in cases where bitfields are protected by locks, all fields in a given bitfield must be protected by one lock. If two fields in a given bitfield are protected by different locks, the compiler's non-atomic read-modify-write sequences can cause an update to one field to corrupt the value of an adjacent field. btrfs_space_info has a bitfield sharing an underlying word consisting of the fields full, chunk_alloc, and flush: struct btrfs_space_info { struct btrfs_fs_info * fs_info; /* 0 8 */ struct btrfs_space_info * parent; /* 8 8 */ ... int clamp; /* 172 4 */ unsigned int full:1; /* 176: 0 4 */ unsigned int chunk_alloc:1; /* 176: 1 4 */ unsigned int flush:1; /* 176: 2 4 */ ... Therefore, to be safe from parallel read-modify-writes losing a write to one of the bitfield members protected by a lock, all writes to all the bitfields must use the lock. They almost universally do, except for btrfs_clear_space_info_full() which iterates over the space_infos and writes out found->full = 0 without a lock. Imagine that we have one thread completing a transaction in which we finished deleting a block_group and are thus calling btrfs_clear_space_info_full() while simultaneously the data reclaim ticket infrastructure is running do_async_reclaim_data_space(): T1 T2 btrfs_commit_transaction btrfs_clear_space_info_full data_sinfo->full = 0 READ: full:0, chunk_alloc:0, flush:1 do_async_reclaim_data_space(data_sinfo) spin_lock(&space_info->lock); if(list_empty(tickets)) space_info->flush = 0; READ: full: 0, chunk_alloc:0, flush:1 MOD/WRITE: full: 0, chunk_alloc:0, flush:0 spin_unlock(&space_info->lock); return; MOD/WRITE: full:0, chunk_alloc:0, flush:1 and now data_sinfo->flush is 1 but the reclaim worker has exited. This breaks the invariant that flush is 0 iff there is no work queued or running. Once this invariant is violated, future allocations that go into __reserve_bytes() will add tickets to space_info->tickets but will see space_info->flush is set to 1 and not queue the work. After this, they will block forever on the resulting ticket, as it is now impossible to kick the worker again. I also confirmed by looking at the assembly of the affected kernel that it is doing RMW operations. For example, to set the flush (3rd) bit to 0, the assembly is: andb $0xfb,0x60(%rbx) and similarly for setting the full (1st) bit to 0: andb $0xfe,-0x20(%rax) So I think this is really a bug on practical systems. I have observed a number of systems in this exact state, but am currently unable to reproduce it. Rather than leaving this footgun lying around for the future, take advantage of the fact that there is room in the struct anyway, and that it is already quite large and simply change the three bitfield members to bools. This avoids writes to space_info->full having any effect on ---truncated---

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

56

Assessment

CVSS risk assessment and additional context for this vulnerability.

No normalized assessments.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 957780eb2788d8c218d539e19a85653f51a96dc1 to < b0bb67385480a3aa4c54b139e4f371ddd06b5150 (affected · git)957780eb2788d8c218d539e19a85653f51a96dc1 to < 55835646da78e83e7ad06abd741ca8fd8c0b0ea7 (affected · git)957780eb2788d8c218d539e19a85653f51a96dc1 to < d4a81b8ec639895999275ea2472c69825cd67ea4 (affected · git)957780eb2788d8c218d539e19a85653f51a96dc1 to < db4ae18e1b31e0421fb5312e56aefa382bbc6ece (affected · git)957780eb2788d8c218d539e19a85653f51a96dc1 to < 6f442808a86eef847ee10afa9e6459494ed85bb3 (affected · git)957780eb2788d8c218d539e19a85653f51a96dc1 to < 742b90eaf394f0018352c0e10dc89763b2dd5267 (affected · git)957780eb2788d8c218d539e19a85653f51a96dc1 to < 38e818718c5e04961eea0fa8feff3f100ce40408 (affected · git)Default: unaffected Linux · cna
Linux Linux 4.8 (affected)0 to < 4.8 (unaffected · semver)5.15.201 through 5.15.* (unaffected · semver)6.1.164 through 6.1.* (unaffected · semver)6.6.124 through 6.6.* (unaffected · semver)6.12.68 through 6.12.* (unaffected · semver)6.17.13 through 6.17.* (unaffected · semver)6.18.2 through 6.18.* (unaffected · semver)6.19 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

7

Provider assertions

1

Linux · cna

btrfs: fix racy bitfield write in btrfs_clear_space_info_full()

Provenance

Schema
5.2
Searchable
yes
Content hash
07d0464810675207a2fe85d9a78f6a219469ff6d61f6b95e6689d76d32ae3763
Ingested
23 Sep 2026, 08:57:02 UTC
Source record
Official CVE record

Search filters

Match options apply to free text. CVE words match tokens; use contains:"…" for literal substrings.

Text

Words and phrases
buffer overflow "remote code execution"
Word prefix
auth*
Literal substring (title or description)
contains:"use-after-free"
Exclude a term or filter
-test -vendor:example

Affected product

Vendor
vendor:Example
Product
product:"Demo Widget"

Severity and score

Severity · none, low, medium, high, critical, unknown
severity:critical
CWE identifier
cwe:CWE-863
CVSS score (0–10)
cvss:>=7.0

Dates and status

Published date · comparisons, relative days
published:>=2026-01-01
Updated date · comparisons, relative days
updated:<30d
Status · published (default), rejected, unknown
status:rejected