CVE-2026-99600: udf: fix preallocation discarding before an empty allocation extent
In the Linux kernel, the following vulnerability has been resolved:
udf: fix preallocation discarding before an empty allocation extent
udfdiscardprealloc() finds the last extent of a file by peeking at the next one with udfnextaext() 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 udfnextaext() 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 udfdeleteaext() 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, udfdiscardprealloc() deletes it with udfdeleteaext(), which finds the following allocation extent empty, so it also removes the continuation and frees that allocation extent's block. udfdiscardprealloc() 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 udfnextaext() returned with 1.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.10 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.15 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 4.20 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.5 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.11 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 5.16 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.1 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.2 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.12.118 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 6.18.64 - Upgrade
Upgrade
linux/Kernelto a version that resolves this vulnerability.Fixed in 7.3.5 - Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 7.3.5-1
Event History
Frequently Asked Questions
What filesystem state triggers the faulty cleanup path?
The condition occurs when an extent list ends with a continuation descriptor pointing to an empty allocation extent and the preceding final extent is a preallocation. The kernel can create this layout itself when udf_delete_aext() removes the only descriptor in the final allocation extent while leaving the empty extent and its continuation in place.
What happens when the affected preallocation is discarded?
The cleanup can free the block containing the empty allocation extent twice, rather than freeing the preallocated blocks. On filesystems using a space bitmap, the preallocated blocks can instead be leaked.