CVE-2026-139017

affs: validate blocks before freeing them

Published Nov 30, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
In the Linux kernel, the following vulnerability has been resolved:

affs: validate blocks before freeing them

affs_free_block() accepts block numbers from on-disk file block tables
when truncating or unlinking files. The function currently rejects only
block numbers greater than s_partition_size before subtracting
s_reserved and using the result to index the in-memory bitmap descriptor
array.

That check still accepts reserved blocks and the one-past-end block at
s_partition_size. A crafted image can therefore make the subtraction
underflow or make the computed bitmap index equal to s_bmap_count,
leading to an out-of-bounds access on s_bitmap before the bitmap block is
read and updated.

Use the existing AFFS block validity helper so freeing uses the same
range as block reads and writes: s_reserved <= block < s_partition_size.

Analysis

AI-generated

Technical impact

The affs filesystem in the Linux kernel allowed block numbers from on‑disk file block tables to be used in a free operation without fully validating the block range. Because only blocks greater than the partition size were rejected, a crafted file system image could cause an unsigned underflow or generate an index equal to the bitmap count. This results in an out‑of‑bounds read or write on the bitmap descriptor array before the bitmap block is read and updated, enabling an attacker to corrupt kernel memory, crash the system, or achieve privilege escalation.

Affected Systems

This vulnerability affects Linux kernel releases that include the AFFS module prior to the fix introduced in the commits linked in the advisory. All distributions shipping kernels without those changes are potentially vulnerable if they enable the AFFS filesystem.

Risk and Exploitability

The exploit requires a malicious or tampered AFFS image that can be processed during truncation or unlinking, which means the attacker must have write access to an AFFS partition. Because the flaw triggers during normal filesystem operations, the attack vector is local through manipulated storage or file system mounts. No public exploit is listed in CISA KEV, and no EPSS score is available, but the lack of a mitigation and the kernel-level impact suggest a high severity and a non–zero likelihood of exploitation in environments that use AFFS.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update the Linux kernel to a version containing the affs_free_block() fix, including the commit that enforces block validation before freeing.
  • If the AFFS filesystem is not required, completely disable AFFS support in the kernel configuration to eliminate the attack surface.
  • For environments that must continue using AFFS, restrict write access to AFFS partitions to privileged or trusted users only, and avoid using crafted images or untrusted mounts.

Generated by OpenCVE AI on November 30, 2026 at 18:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Weaknesses CWE-129
CWE-192
Type Values Removed Values Added
Description In the Linux kernel, the following vulnerability has been resolved: affs: validate blocks before freeing them affs_free_block() accepts block numbers from on-disk file block tables when truncating or unlinking files. The function currently rejects only block numbers greater than s_partition_size before subtracting s_reserved and using the result to index the in-memory bitmap descriptor array. That check still accepts reserved blocks and the one-past-end block at s_partition_size. A crafted image can therefore make the subtraction underflow or make the computed bitmap index equal to s_bmap_count, leading to an out-of-bounds access on s_bitmap before the bitmap block is read and updated. Use the existing AFFS block validity helper so freeing uses the same range as block reads and writes: s_reserved <= block < s_partition_size.
Title affs: validate blocks before freeing them
First Time appeared Linux
Linux linux Kernel
CPEs cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
Vendors & Products Linux
Linux linux Kernel
References
Weaknesses
  • CWE-129

    Improper Validation of Array Index

  • CWE-192

    Integer Coercion Error

Sources

Status
PUBLISHED
Assigner
Linux
Published
Updated
Nov 30, 2026, 1:27 PM
Reserved
Nov 30, 2026, 1:22 PM
Status
Received
Published
Nov 30, 2026, 2:18 PM
Modified
Nov 30, 2026, 2:18 PM