Skip to main content
EPSS 0.1%top 96%

In the Linux kernel, the following vulnerability has been resolved: btrfs: ensure no dirty metadata is written back for an fs with errors [BUG]… (CVE-2025-40303)

0
High
Published: 12/08/2025 (12/08/2025, 03:31:01 UTC)
Source: GCVE Database

Description

A high-severity vulnerability in the Linux kernel's btrfs filesystem was resolved to prevent dirty metadata from being written back when the filesystem is in an error state. The issue could cause use-after-free conditions and filesystem corruption, especially when using RAID5 or RAID6 metadata configurations. The fix prevents submission of writeback operations for dirty metadata if the filesystem is marked as errored, avoiding further corruption and crashes.

CVSS v3.1

Score 7.8high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/30/2026, 17:51:59 UTC

Technical Analysis

The vulnerability (CVE-2025-40303) in the Linux kernel's btrfs filesystem arises when the filesystem encounters an error and is marked as such, freezing metadata transactions. Dirty metadata pages remain in the page cache and are not invalidated, leading to writeback attempts after worker threads have stopped. In RAID5/6 metadata setups, this triggers read-modify-write operations queued to stopped workers, causing use-after-free errors and potential filesystem corruption. The fix adds handling in write_one_eb() to immediately fail writeback submissions if the filesystem is errored, ensuring dirty metadata is discarded rather than written back, preventing further corruption and crashes.

Potential Impact

Exploitation of this vulnerability can lead to use-after-free conditions causing kernel crashes and potential filesystem corruption, particularly in btrfs filesystems using RAID5 or RAID6 metadata configurations. The integrity and availability of the filesystem can be severely impacted.

Mitigation Recommendations

A fix has been implemented in the Linux kernel to address this vulnerability by preventing dirty metadata writeback when the filesystem is in an error state. Users should apply the official kernel updates that include this fix. Patch status is not explicitly confirmed in the provided data; therefore, check the vendor advisory for current remediation guidance.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-5q2h-f93q-8fv2
Osv Schema Version
1.4.0
Aliases
["CVE-2025-40303"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a6b72d49c2644c7f847951f

Added to database: 07/30/2026, 15:50:44 UTC

Last enriched: 07/30/2026, 17:51:59 UTC

Last updated: 09/10/2026, 19:38:46 UTC

Views: 10

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses