Description
In the Linux kernel, the following vulnerability has been resolved:

fs/buffer: add alert in try_to_free_buffers() for folios without buffers

try_to_free_buffers() can be called on folios with no buffers attached
when filemap_release_folio() is invoked on a folio belonging to a mapping
with AS_RELEASE_ALWAYS set but no release_folio operation defined.

In such cases, folio_needs_release() returns true because of the
AS_RELEASE_ALWAYS flag, but the folio has no private buffer data. This
causes try_to_free_buffers() to call drop_buffers() on a folio with no
buffers, leading to a null pointer dereference.

Adding a check in try_to_free_buffers() to return early if the folio has no
buffers attached, with WARN_ON_ONCE() to alert about the misconfiguration.
This provides defensive hardening.
Published: 2026-05-06
Score: n/a
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

A null pointer dereference can occur when the kernel function try_to_free_buffers() attempts to free buffers for a folio that has none attached. The flaw is triggered by calling filemap_release_folio() on a folio belonging to a mapping set with AS_RELEASE_ALWAYS while the mapping lacks a defined release_folio operation. In this situation, folio_needs_release() incorrectly indicates that a release is required, and drop_buffers() is invoked with a folio that holds no buffer data, causing the kernel to dereference a null pointer and crash. The defences added by the patch return immediately and emit a WARN_ON_ONCE to signal the misconfiguration, but the vulnerability still exists in versions that have not been patched.

Affected Systems

The vulnerability affects all versions of the Linux kernel that were released before the commit adding the null‑pointer check was merged. Every kernel based on those releases contains the problematic try_to_free_buffers() logic. Systems running a kernel that has not yet been updated to include the safety guard are vulnerable. No specific distribution is required for the flaw; any distribution that ships the affected kernel version is impacted.

Risk and Exploitability

The flaw can lead to an uncontrollable kernel panic, effectively performing a local denial of service. Based on the description, it is inferred that the exploit requires the attacker to be able to invoke the folio release path, most likely through privileged code or a compromised kernel module, meaning that kernel or root privileges are needed. The EPSS score is not available, and the issue is not listed in the CISA KEV catalog, but the potential for a critical kernel panic suggests a high CVSS base score in the absence of an official metric. The risk is elevated for systems that still use older kernel versions or have implemented custom FOLIO mappings with the AS_RELEASE_ALWAYS flag without ensuring a release_folio callback.

Generated by OpenCVE AI on May 6, 2026 at 14:22 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Update the kernel to a version that includes the null‑pointer check emplaced by the commit identified in the advisory.
  • If an immediate kernel upgrade is not feasible, audit the system for file mappings configured with AS_RELEASE_ALWAYS and remove that flag or provide a proper release_folio implementation to prevent the inadvertent release of folios without buffers.
  • Enable kernel logging and monitor dmesg for WARN_ON_ONCE messages related to folio release, as they indicate misconfigurations that could trigger the crash.

Generated by OpenCVE AI on May 6, 2026 at 14:22 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Wed, 06 May 2026 14:45:00 +0000

Type Values Removed Values Added
Weaknesses CWE-476

Wed, 06 May 2026 12:15:00 +0000

Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: fs/buffer: add alert in try_to_free_buffers() for folios without buffers try_to_free_buffers() can be called on folios with no buffers attached when filemap_release_folio() is invoked on a folio belonging to a mapping with AS_RELEASE_ALWAYS set but no release_folio operation defined. In such cases, folio_needs_release() returns true because of the AS_RELEASE_ALWAYS flag, but the folio has no private buffer data. This causes try_to_free_buffers() to call drop_buffers() on a folio with no buffers, leading to a null pointer dereference. Adding a check in try_to_free_buffers() to return early if the folio has no buffers attached, with WARN_ON_ONCE() to alert about the misconfiguration. This provides defensive hardening.
Title fs/buffer: add alert in try_to_free_buffers() for folios without buffers
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References

Subscriptions

Linux Linux Kernel
cve-icon MITRE

Status: PUBLISHED

Assigner: Linux

Published:

Updated: 2026-05-06T11:32:25.917Z

Reserved: 2026-05-06T11:31:45.510Z

Link: CVE-2025-71295

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Awaiting Analysis

Published: 2026-05-06T12:16:28.820

Modified: 2026-05-06T13:07:51.607

Link: CVE-2025-71295

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-05-06T15:45:06Z

Weaknesses