udf: validate free block extents against the partition length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 56e69e59751d20993f243fb7dd6991c4e522424c · < 335202ab25b01fdd45889ff25eab70864686dea3| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
udf: validate free block extents against the partition length
udf_free_blocks() checks the logical block number and count against the partition length, but drops the extent offset from that final bound. A crafted extent can pass the guard while logicalBlockNum + offset + count points past the partition, which later indexes past the space bitmap array.
A single ftruncate(2) on a file backed by such an extent reliably panics the kernel. This is a local availability issue. On desktop systems where UDisks/polkit allows the active user to mount removable UDF media without CAP_SYS_ADMIN, an unprivileged local user can supply the crafted filesystem and trigger the panic by truncating a writable file on it. Systems that require root or CAP_SYS_ADMIN to mount the image have a higher prerequisite.
No confidentiality or integrity impact is claimed: the reproduced primitive is an out-of-bounds read of a bitmap pointer slot followed by a kernel panic.
Use the already computed logicalBlockNum + offset + count value for the partition length check. Also make load_block_bitmap() reject an out-of-range block group before indexing s_block_bitmap[], so corrupted callers cannot walk past the flexible array.
From the CVE record · Linux
The Linux kernel's UDF filesystem can accept a crafted extent that reaches past the partition length, leading to an out-of-bounds bitmap access. A local attacker can trigger a kernel panic by truncating a writable file on the crafted filesystem. An unprivileged user can do this where UDisks/polkit permits mounting removable UDF media; otherwise mounting requires root or CAP_SYS_ADMIN.
Administrators running Linux systems with UDF filesystem support should check whether their kernel is affected; affected versions were not provided.