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

published high CVSS 3.1 · 7.8

btrfs: ensure no dirty metadata is written back for an fs with errors

Published
08 Dec 2025, 00:46:27 UTC
Updated
05 Aug 2026, 12:09:22 UTC
Language
en

Package status and fixes

Distro / vendorReleasePackage / productPublisher statusFixed buildSource
Linux — Linux13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < 066ee13f05fbd82ada01883e51f0695172f98dff · 13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < e2b3859067bf012d53c49b3f885fef40624a2c83 · 13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < 54a5b5a15588e3b0b294df31474d08a2678d4291 · 13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < 2618849f31e7cf51fadd4a5242458501a6d5b315 · Other versions: unaffected Affected Not stated Linux
Linux — Linux3.10 (affected) · 0 to < 3.10 (unaffected · semver) · 6.6.117 through 6.6.* (unaffected · semver) · 6.12.58 through 6.12.* (unaffected · semver) · 6.17.8 through 6.17.* (unaffected · semver) · 6.18 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 AL2023 Release evaluation No Fix Planned Not stated Amazon Linux assessment
Amazon Linux AL2023 Release evaluationALAS2023-2026-1495 Fixed Not stated Amazon Linux assessment
SUSE / openSUSE SLE-16 cluster-md-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 cluster-md-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 cluster-md-kmp-defaults390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
Show 97 more entries
Distro / vendorReleasePackage / productPublisher statusFixed buildSource
SUSE / openSUSE SLE-16 cluster-md-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 cluster-md-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 dlm-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 dlm-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 dlm-kmp-defaults390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 dlm-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 dlm-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 gfs2-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 gfs2-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 gfs2-kmp-defaults390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 gfs2-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 gfs2-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20228-1
SUSE / openSUSE SLE-16 kernel-64kbaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-64kb-develaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-64kb-extraaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azureaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azurex86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azure-develaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azure-develx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azure-extraaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azure-extrax86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-azure-vdsox86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-defaultaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-defaultppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-defaults390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-defaultx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-baseaarch64 Advisory build 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-baseppc64le Advisory build 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-basex86_64 Advisory build 6.12.0-160000.9.1.160000.2.6 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-develaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-develppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-devels390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-develx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-extraaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-extrappc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-extras390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-extrax86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-livepatchppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-livepatchs390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-livepatchx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-default-vdsox86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-develnoarch Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-docsnoarch Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-docs-htmlnoarch Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmallaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmallppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmallx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmall-develaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmall-develppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmall-develx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-kvmsmall-vdsox86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-macrosnoarch Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-obs-qaaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-obs-qappc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-obs-qas390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-obs-qax86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-sourcenoarch Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-source-vanillanoarch Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-symsaarch64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-symsppc64le Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-symss390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-symsx86_64 Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE SLE-16 kernel-zfcpdumps390x Advisory build 6.12.0-160000.9.1 SUSE-SU-2026:20220-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-64kbaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-azureaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-azurex86_64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-defaultaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-defaults390x Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-rtaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 cluster-md-kmp-rtx86_64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-64kbaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-azureaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-azurex86_64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-defaultaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-defaultppc64le Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-defaults390x Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-defaultx86_64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-rtaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dlm-kmp-rtx86_64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-allwinneraarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-alteraaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-amazonaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-amdaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-amlogicaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-apmaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-appleaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-armaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-broadcomaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-caviumaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-exynosaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-freescaleaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-hisiliconaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-lgaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-marvellaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1
SUSE / openSUSE openSUSE-Leap-16.0 dtb-mediatekaarch64 Advisory build 6.12.0-160000.9.1 OPENSUSE-SU-2026:20145-1

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: ensure no dirty metadata is written back for an fs with errors [BUG] During development of a minor feature (make sure all btrfs_bio::end_io() is called in task context), I noticed a crash in generic/388, where metadata writes triggered new works after btrfs_stop_all_workers(). It turns out that it can even happen without any code modification, just using RAID5 for metadata and the same workload from generic/388 is going to trigger the use-after-free. [CAUSE] If btrfs hits an error, the fs is marked as error, no new transaction is allowed thus metadata is in a frozen state. But there are some metadata modifications before that error, and they are still in the btree inode page cache. Since there will be no real transaction commit, all those dirty folios are just kept as is in the page cache, and they can not be invalidated by invalidate_inode_pages2() call inside close_ctree(), because they are dirty. And finally after btrfs_stop_all_workers(), we call iput() on btree inode, which triggers writeback of those dirty metadata. And if the fs is using RAID56 metadata, this will trigger RMW and queue new works into rmw_workers, which is already stopped, causing warning from queue_work() and use-after-free. [FIX] Add a special handling for write_one_eb(), that if the fs is already in an error state, immediately mark the bbio as failure, instead of really submitting them. Then during close_ctree(), iput() will just discard all those dirty tree blocks without really writing them back, thus no more new jobs for already stopped-and-freed workqueues. The extra discard in write_one_eb() also acts as an extra safenet. E.g. the transaction abort is triggered by some extent/free space tree corruptions, and since extent/free space tree is already corrupted some tree blocks may be allocated where they shouldn't be (overwriting existing tree blocks). In that case writing them back will further corrupting the fs.

en · Linux · cna

Vendor advisories explicitly linked to this CVE.

21

Assessment

CVSS risk assessment and additional context for this vulnerability.

CVSS version
3.1
Base score
7.8 / 10
Severity
high
Provider
Linux · cna
Vector string
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Scenarios
en: AV:L - btrfs is a local filesystem; the bug is reached through ordinary local filesystem activity that dirties btree metadata plus the unmount path (`close_ctree()`), with no network-facing component. AC:L - The sequence (fs error state with pending dirty metadata → unmount → writeback into the already-destroyed rmw_workers workqueue) is deterministic rather than a race, and the author reproduced it with an unmodified kernel using the stock generic/388 workload on RAID5 metadata, a profile an attacker supplying the image chooses freely. PR:L - An unprivileged local user with write access to a btrfs mount generates the dirty metadata and can drive the workload; on desktop/kiosk systems udisks2 auto-mounts and unmounts attacker-supplied removable media without any root credential, so real root in the initial namespace is not required. UI:N - No separate victim action is needed — the attacker's own workload dirties the metadata and the unmount/eject that triggers the freed-workqueue use is performed by the attacker or occurs automatically during normal system operation. S:U - The corruption stays within kernel memory and the filesystem managed by the same kernel; no VM, IOMMU, or sandbox boundary is crossed. C:H - queue_work() dereferences the freed workqueue_struct and its per-CPU pwq/pool, reading freed slab memory that an attacker can reclaim with sprayed objects, yielding an information-disclosure primitive on kernel memory. I:H - The use-after-free performs list insertions into the freed workqueue/pool structures, giving a write primitive into attacker-groomed memory, and the commit additionally documents that submitting these tree blocks can overwrite live metadata and further corrupt the on-disk filesystem. A:H - The bug produces a queue_work() WARN and a use-after-free during unmount, crashing the kernel on a code path that runs after the workqueues have been torn down.

Publisher product statements

Version ranges and default statuses as reported by each provider.

Affected vendor and product assertions
VendorProductVersion statusSource
Linux Linux 13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < 066ee13f05fbd82ada01883e51f0695172f98dff (affected · git)13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < e2b3859067bf012d53c49b3f885fef40624a2c83 (affected · git)13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < 54a5b5a15588e3b0b294df31474d08a2678d4291 (affected · git)13e6c37b989859e70b0d73d3f2cb0aa022159b17 to < 2618849f31e7cf51fadd4a5242458501a6d5b315 (affected · git)Default: unaffected Linux · cna
Linux Linux 3.10 (affected)0 to < 3.10 (unaffected · semver)6.6.117 through 6.6.* (unaffected · semver)6.12.58 through 6.12.* (unaffected · semver)6.17.8 through 6.17.* (unaffected · semver)6.18 and later (unaffected · original_commit_for_fix)Default: affected Linux · cna

Weaknesses

0

No weakness assertions.

References

4

Provider assertions

1

Linux · cna

btrfs: ensure no dirty metadata is written back for an fs with errors

Provenance

Schema
5.2
Searchable
yes
Content hash
3a01fffa5d7e4b19e6dc4acc2f97c0bb4f8609cd00efbeabc57f678aa3d6c667
Ingested
23 Sep 2026, 08:48:04 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