CVE-2026-99599: udf: don't use eloc after the end of the unallocated space table
In the Linux kernel, the following vulnerability has been resolved:
udf: don't use eloc after the end of the unallocated space table
When udfnextaext() returns 0, its eloc, elen and etype outputs hold no defined value. Two walks of the unallocated space table still use eloc after the walk has reached the end of the table.
udftablepreallocblocks() looks for a free extent starting at firstblock and decides whether it found one by comparing eloc with firstblock after the walk. If the table's list ends in a continuation descriptor that leads to an empty allocation extent, eloc is then the block of that allocation extent, which is in use, and if that is firstblock, the block is handed out as preallocation. Once udfdiscardprealloc() no longer frees the wrong block, this is what still makes fsx in generic/091 and generic/263 read back bad data on a table, in about one run in four. Only take the extent if the walk stopped at it.
When udftablefreeblocks() cannot merge the freed blocks into an existing extent, it appends a new one and sets only its block number, so the partition reference comes from whatever eloc held after the walk, and with long allocation descriptors it is written to disk. For a table without extents, eloc was never set. Take the partition reference from the freed blocks instead. Short allocation descriptors do not store the partition reference, which is why this half remains a latent long-descriptor fix rather than a reproduced failure.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- 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
Which systems are exposed to this issue?
Linux kernel systems using UDF filesystems can be affected when the unallocated space table ends in a continuation descriptor that leads to an empty allocation extent. The affected paths walk that table while preallocating or freeing blocks.
What conditions trigger the incorrect block handling?
The problem occurs when the allocation-extent walk reaches the end of the table and returns no extent, leaving its output location undefined. In the preallocation path, the stale location can match the requested first block and cause a block that is already in use to be handed out.
What is the practical impact?
The incorrect preallocation can lead to bad data being read back, as observed in filesystem tests. When freed blocks cannot be merged into an existing extent, a newly appended extent may also inherit a partition reference from the stale location value.