udf: check the unallocated space table when it is loaded
NIST has received this entry but not started reviewing it.
In the Linux kernel, the following vulnerability has been resolved: udf: check the unallocated space table when it is loaded udf_table_new_block() hands out the first block of the extent closest to its goal and trusts that the extent covers at least one whole block inside the partition. Nothing checks that. A zero-length extent makes it return the block the extent points at, which need not be free, and the subtraction of one block then underflows the length into the type bits, turning the entry into a bogus continuation. An extent running past the end of the partition makes it return blocks behind the partition. Such tables are not only found on crafted images: until the previous commit, udf_table_new_block() itself left zero-length extents behind in tables written by mkudffs, and then converted them into extents running past the partition. Check every extent once when the table is loaded, and refuse read-write access if one is empty, is not a whole number of blocks, or does not lie inside the partition, in the same way as for other allocation information the kernel cannot use. Check first that the table is an Unallocated Space Entry at all: the walk starts at the offset of the allocation descriptors in one, and for a file entry that offset lies before the inode's in-memory copy of the descriptors. Treat a chain of allocation extent descriptors that leads back to itself the same way: the walk would otherwise return the same extents forever, and the mount would never finish. Let a fatal signal interrupt the walk and fail the mount. Refusing read-write access to an empty extent is deliberate. It shows that an old kernel took the last block but left the entry behind. If consumed again, the entry returns an in-use block and turns into a huge bogus extent. Refusing the table before that happens avoids this second allocation; the filesystem can still be mounted read-only. The check cannot detect every overlap that may already exist in a damaged table. This patch should be backported together with the previous one: that patch stops creating new empty extents, and this one rejects existing ones before they are consumed again.
New to this? Read how to keep your software updated.
The products and versions NIST lists as vulnerable, 2 products in all. If what you run is not listed it is probably not affected, but ask your provider if you are unsure.
| Product | Type | Vulnerable versions | Fixed in |
|---|---|---|---|
| Linux Linux | Software | from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 3ed23daf545953a7a1f03bad511f9fe742874f43; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 9f3df19234d2c180b9a99b0d3c2472e8fade5043; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 88401035fbfcad7067793455326262ac30633586; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before 302eb1fa5be5e476a633d8ed0fd56ea5efa57374; from 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2, before e614c3e35a6699ed691b4d17e1ec4230e34aa3eb | 3ed23daf545953a7a1f03bad511f9fe742874f43; 9f3df19234d2c180b9a99b0d3c2472e8fade5043; 88401035fbfcad7067793455326262ac30633586; 302eb1fa5be5e476a633d8ed0fd56ea5efa57374 |
| Linux Linux | Software | 2.6.12 | not recorded |
The 7.8 severity score (high) from the company that reported it, broken into what it means in practice. Red means it makes the flaw easier or worse.
| How it is reached | On the machine | The attacker needs access to the computer itself, for example a login or a file they can get you to open. |
| How hard it is | Low | Easy to carry out. No special conditions have to line up. |
| Login needed | None | The attacker does not need an account or password. |
| Someone has to act | Required | A person has to do something first, such as open a file or visit a page. |
| Reaches beyond the program | Unchanged | The damage stays inside the vulnerable program. |
| Data exposed | High | Total loss of confidentiality: the attacker can read all the data the program can reach. |
| Data changed | High | The attacker can change or delete anything the program can reach. |
| Service disrupted | High | The attacker can take the service down completely. |
| Ease of attack | 1.8 | A score for how easy it is to use the flaw. Higher is easier. |
| Damage | 5.9 | A score for how bad the harm is if it works. Higher is worse. |
NIST lists 5 sources for this flaw, none tagged as a vendor patch.