CVE-2026-99600 in Linux
Summary
by MITRE • 11/20/2026
In the Linux kernel, the following vulnerability has been resolved:
udf: fix preallocation discarding before an empty allocation extent
udf_discard_prealloc() finds the last extent of a file by peeking at the next one with udf_next_aext() and stopping when that returns 0. The peek reads into eloc and elen, and the code then uses them as the last extent. But when udf_next_aext() returns 0 they hold no defined value: if the extent list ends in a continuation descriptor that leads to an empty allocation extent, they describe that continuation, i.e. the block of the empty allocation extent, one block long.
The kernel creates such lists itself: when udf_delete_aext() removes the only descriptor of the last allocation extent in a list, it leaves that allocation extent empty and the continuation to it in place.
If the last extent is a preallocation, udf_discard_prealloc() deletes it with udf_delete_aext(), which finds the following allocation extent empty, so it also removes the continuation and frees that allocation extent's block. udf_discard_prealloc() then frees eloc and elen: that block a second time, instead of the preallocated blocks. On a space bitmap the preallocated blocks leak and the free block count drifts. On an unallocated space table the second free adds a second free extent for the same block, which is later handed out twice: fsx as run by generic/091 and generic/263 ends up with two parts of its test file in one block and reads back bad data.
Peek into separate variables, so that eloc and elen keep the last extent that udf_next_aext() returned with 1.
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 11/21/2026
The vulnerability resides within the Universal Disk Format (UDF) filesystem implementation of the Linux kernel, specifically in the function responsible for discarding preallocated extents known as udf_discard_prealloc. This flaw represents a critical logic error involving improper handling of file extent lists during deallocation operations. The core issue stems from how the code identifies and processes the final allocation extent of a file when preparing to remove preallocated space. The function attempts to locate the last valid extent by peeking at the next entry in the sequence using udf_next_aext, intending to stop once this iterator returns zero, which typically signals the end of the list. However, the implementation fails to distinguish between a successful retrieval of an extent and the termination condition where no further extents exist.
When udf_next_aext returns zero because it has reached the end of the allocation extent list, the variables eloc and elen are left with undefined or stale values rather than being cleared or set to indicate nullity. In specific scenarios involving continuation descriptors that lead to empty allocation extents, these variables may retain data describing a single-block continuation descriptor rather than valid file data blocks. This ambiguity becomes critical when udf_delete_aext is invoked to remove the last descriptor of an allocation extent. The kernel's internal logic leaves this final extent in an empty state while preserving its associated continuation structure. Consequently, when udf_discard_prealloc proceeds with discarding preallocated space, it incorrectly interprets these residual values as valid block locations.
The operational impact of this defect is severe and manifests primarily through double-free conditions on the filesystem's metadata structures. Upon detecting what it believes to be an empty following extent due to the corrupted eloc and elen values, udf_discard_prealloc erroneously deletes the continuation descriptor and frees the associated allocation extent block. Immediately after this incorrect deallocation, the function proceeds to free the blocks specified by eloc and elen a second time. Since these variables pointed to the same single-block entity or invalid data due to the earlier logic error, this results in freeing memory that has already been released. This double-free scenario corrupts the filesystem's space management structures, leading to significant integrity issues depending on whether the UDF volume utilizes a space bitmap or an unallocated space table for tracking free blocks.
In environments using a space bitmap, the erroneous second free operation causes preallocated blocks to leak from the perspective of the allocation tracker, causing the count of free blocks to drift inaccurately and potentially leading to future allocation failures or metadata corruption over time. In systems utilizing an unallocated space table, the double-free adds a duplicate free extent entry for the same physical block into the list of available storage. This duplication creates a critical race condition where the filesystem allocator may subsequently hand out the same physical block twice to different files or operations. As evidenced by test suites such as generic/091 and generic/263, this results in multiple parts of distinct test files being written into a single physical block. When these blocks are later read back, the data is corrupted because overlapping writes have overwritten each other, leading to application-level failures and potential information disclosure if sensitive data from one file overwrites another sharing that block.
This vulnerability aligns with CWE-415 Double Free, as it involves freeing a resource more than once without proper nullification or state management between operations. It also relates to CWE-823 Use of Out-of-range Pointer Offset and CWE-908 Use of Uninitialized Resource due to the reliance on undefined values from udf_next_aext when returning zero. From an ATT&CK perspective, this flaw facilitates persistence through filesystem corruption which can be leveraged for defense evasion by obscuring file artifacts or causing denial of service via resource exhaustion. The root cause is a failure in input validation and state management within the kernel's UDF driver logic during extent traversal.
To mitigate this vulnerability, developers must ensure that eloc and elen are populated from separate variables that capture only valid extents returned with a success indicator from udf_next_aext. By peeking into distinct temporary storage before assigning to the primary tracking variables, the code can verify validity prior to use. This prevents the propagation of undefined or continuation-descriptor data into deallocation routines. System administrators should apply kernel updates containing this fix immediately to restore filesystem integrity and prevent potential data corruption or denial-of-service conditions arising from double-free errors in UDF volumes. Regular auditing of storage subsystem logs for allocation anomalies can also help detect early signs of such metadata drift before catastrophic failure occurs.