The Linux kernel received a targeted fix for an out‑of‑bounds read in the UDF filesystem parser — a small defensive change that closes a KASAN‑reported use‑after‑free triggered by malformed Allocation Extent Descriptors and prevents crc_itu_t() from being invoked on memory outside the descriptor buffer.
The Universal Disk Format (UDF) is widely used for optical media, disk images, and some removable storage formats. UDF implementations must parse on‑disk descriptor structures that carry lengths and offsets supplied by the media image. When a filesystem parser trusts unchecked on‑disk values, attackers who can supply or manipulate disk images can provoke logic errors, crashes, or memory‑safety bugs.
In this case, the vulnerable field is lengthAllocDescs inside an Allocation Extent Descriptor. That field is read from the disk image and subsequently added to the static descriptor header size to compute a total descriptor length. If that computed total exceeds the buffer provided by the backing block, subsequent code may read past the buffer and call checksum routines (crc_itu_t()) on out‑of‑range memory — a pattern that KASAN (KernelAddressSANitizer) detects as a use‑after‑free or out‑of‑bounds read. The public diagnostic trace reproduced by syzkaller and reported by multiple aggregators shows exactly that failure mode.
Patch promptly on systems that mount untrusted UDF images, harden image ingestion pathways where possible, and monitor kernel logs for KASAN or oops traces referencing crc_itu_t and UDF parsing functions. While public reporting so far shows a reproducible KASAN use‑after‑free and not a polished RCE exploit, the presence of a memory‑safety defect is sufficient reason to prioritize updates in environments where untrusted images are accepted.
Source: MSRC Security Update Guide - Microsoft Security Response Center
Background
The Universal Disk Format (UDF) is widely used for optical media, disk images, and some removable storage formats. UDF implementations must parse on‑disk descriptor structures that carry lengths and offsets supplied by the media image. When a filesystem parser trusts unchecked on‑disk values, attackers who can supply or manipulate disk images can provoke logic errors, crashes, or memory‑safety bugs.In this case, the vulnerable field is lengthAllocDescs inside an Allocation Extent Descriptor. That field is read from the disk image and subsequently added to the static descriptor header size to compute a total descriptor length. If that computed total exceeds the buffer provided by the backing block, subsequent code may read past the buffer and call checksum routines (crc_itu_t()) on out‑of‑range memory — a pattern that KASAN (KernelAddressSANitizer) detects as a use‑after‑free or out‑of‑bounds read. The public diagnostic trace reproduced by syzkaller and reported by multiple aggregators shows exactly that failure mode.
What was fixed (technical summary)
- Vulnerable code path: UDF parsing of Allocation Extent Descriptors, specifically the logic that computes the total descriptor length as sizeof(allocExtDesc) + lengthAllocDescs and uses that value without verifying it against the backing buffer size.
- Trigger: crafted or corrupted disk images that set lengthAllocDescs to a value making the total descriptor length larger than the buffer (epos->bh->b_size), enabling an out‑of‑bounds read when the code calls udf_update_tag() and, ultimately, crc_itu_t().
- Observed symptom: KASAN reports a use‑after‑free read in crc_itu_t() (lib/crc-itu-t.c) originating from udf_update_tag() / udf_write_aext() paths; the reproduction used syzkaller in a QEMU guest and shows a call trace through udf_write_aext → extent_trunc → udf_truncate_tail_extent → udf_release_file → file put/exit path.
- compute alen = sizeof(allocExtDesc) + le32_to_cpu(header->lengthAllocDescs)
- if (alen > epos->bh->b_size) return -1;
Why this matters: impact and realistic risk model
- Primary impact: memory‑safety violation (out‑of‑bounds read / use‑after‑free) that can cause kernel instability (oops, crash) and potentially open the door for more powerful primitives under the right conditions.
- Likely exploit outcomes:
- Short term: Denial‑of‑Service — crashing or destabilizing the host when it processes a crafted UDF image.
- Medium term: Potential information leak or even control‑flow manipulation if an attacker can combine this read primitive with other memory‑corruption primitives or platform specifics that convert reads into more powerful primitives. At the moment, public reporting focuses on KASAN‑detected reads and not on a reliable remote code execution (RCE) weaponization.
- Attack vector: local or image‑supply — an attacker must provide or persuade a victim to mount or parse a crafted disk image, ISO, or removable media. In environments that accept untrusted images automatically (e.g., virtualization hosts that mount guest images, automated ingestion pipelines, or user workstations that auto‑mount media), the attack surface is wider.
- Privileges: The damage depends on the context in which the UDF code runs. If kernel code processing happens in the context of privileged operations (e.g., mount operations by privileged services, or host processes handling guest images), the consequences are more severe. Conversely, user‑level mounts and strict mount namespaces can limit exposure.
Verification and cross‑checks (what was consulted)
To produce a reliable, verifiable account, the reported fix and its root cause were verified against multiple independent sources:- Upstream patch archive and kernel mailing list discussion showing the exact code changes that add a bounds check in fs/udf/inode.c. This shows the minimal defensive change and includes the upstream commit metadata. The stable patch thread and the kernel patch submission give the commit ID and the code diff.
- CVE aggregators and vulnerability trackers reporting the same bug description and the KASAN reproduction trace. These aggregates summarize the failure mode and list references to the kernel commits, confirming the vulnerability mapping.
- Independent security trackers report the discovery source (Linux Verification Center / Syzkaller) and provide timestamps and affected commit ranges; they also list the related git commits and show which kernel branches were patched.
Technical deep dive — exactly where the failure occurs
How Allocation Extent Descriptors are parsed
UDF stores metadata in descriptors. Parsing code reads a descriptor header structure and then processes additional allocation descriptor data whose length is specified in the header (lengthAllocDescs). The parser must treat on‑disk lengths as untrusted input and ensure the entire descriptor fits within the block read into memory (the buffer referenced by epos->bh).The root mistake
The code computed the final descriptor size by adding sizeof(struct allocExtDesc) and le32_to_cpu(header->lengthAllocDescs) without verifying that this computed total fits into the block buffer (epos->bh->b_size). That arithmetic is susceptible to:- malformed on‑disk numbers that intentionally exceed block size,
- integer overflow if not checked carefully,
- and a logic gap where subsequent code assumes the descriptor is fully present in the buffer.
The fix, in code
The accepted upstream change introduces a defensive check immediately after computing the allocation length:- It uses a safe addition check (check_add_overflow) to guard against overflow.
- Then it compares the computed alen to epos->bh->b_size and returns an error if the descriptor does not fit in the block buffer.
Who is affected and how to tell
- Affected systems: Linux kernels that include the vulnerable UDF code prior to the fix commit. Distributions will vary in which stable branches and backports they include, so mapping must be done per distribution and per kernel package version.
- Typical exposures:
- Hosts that automatically mount or open UDF images (e.g., desktop auto‑mount, some VM image management workflows).
- Virtualization hosts or CI infrastructure that programmatically mount guest images or ISOs in privileged contexts.
- Systems that accept untrusted media or images from third parties or automated pipelines.
- How to detect vulnerability presence:
- Check kernel changelogs / package upgrade metadata for the specific commit ID or for UDF-related CVE entries in your distribution's advisory feed.
- Inspect your running kernel version (uname -r) and the distribution's security tracker for whether the kernel package contains the fix.
- Review dmesg / kernel logs for KASAN reports mentioning crc_itu_t or udf_update_tag — those diagnostic lines are highly indicative of the exact problem seen in public reproductions.
Immediate remediation and mitigation steps
- Patch kernels immediately on systems that mount or otherwise process untrusted UDF images.
- Install vendor/OS kernel updates that include the upstream UDF fix; backported patches will appear in stable kernel branches for supported distributions.
- Confirm the package changelog mentions the UDF patch or commit ID before rolling out broadly.
- If you cannot patch immediately, apply compensating controls:
- Disable automatic mounting of removable media and ISO images on endpoints and servers that process untrusted inputs.
- Block or quarantine untrusted images: ensure ingestion pipelines validate and sandbox disk images before allowing the host kernel to parse them.
- For virtualization platforms, avoid auto‑attaching guest ISOs or images from untrusted sources to running VMs or hosts.
- Harden image processing:
- Use user namespaces, containerization, and strict mount namespaces to reduce the blast radius of a host parser crash.
- Limit which processes or service accounts can perform privileged mounts or image inspections.
- Monitor for indicators:
- Set alerts for kernel oops or KASAN lines that reference crc_itu_t, udf_update_tag, udf_write_aext, extent_trunc, or udf_release_file. The observed syzkaller trace contains explicit call frames you can match on.
Detection and hunting guidance
- Watch kernel logs for KASAN or oops messages containing:
- "KASAN: use-after-free in crc_itu_t" or similar call traces that include lib/crc-itu-t.c and fs/udf/inode.c frames.
- Correlate recent mounts or image imports with subsequent kernel oops events. If a KASAN trace appears immediately after mounting an image or shutting down a process that handled an image, treat it as high priority.
- For virtualization platforms, instrument the image ingestion path: log and hash images before handing them to hypervisor or host mount code. Quarantine any image that triggers kernel anomalies.
- If you suspect compromise or abnormal behavior after exposure, collect kernel crash dumps, logs, and sample images for offline analysis and coordinate with vendor or distro security teams.
Exploitability caveats and what remains uncertain
- There is no public proof that this particular UDF OOB read has been turned into a reliable remote code execution (RCE) exploit in the wild. Public records show KASAN detections and a reproducible crash, which raises the priority for patching but does not equate to confirmed RCE. Treat any claims of guaranteed RCE as unverified unless multiple trusted researchers publish exploit chains or a working proof‑of‑concept that overcomes kernel mitigations.
- Kernel memory‑safety bugs vary widely in their practical exploitability. Some out‑of‑bounds reads remain denial‑of‑service conditions, while others, when combined with information‑leak primitives or predictable allocator behavior, can be escalated into code execution. The specific exploitability of this bug depends on platform details, kernel configuration, and whether additional primitives are available in the target environment. Flag those escalation scenarios as possible but not proven.
- Distribution patching cadence matters: some long‑term support kernels may receive backports sooner than others; conversely, very old branches might not be maintained. Confirm the fix has been applied to each kernel stream you run.
Recommended verification checklist (for sysadmins and maintainers)
- Identify hosts that mount UDF images or handle untrusted disk images (virtualization hosts, CI runners, file‑ingest servers).
- Inventory kernel package versions:
- On Debian/Ubuntu: dpkg -l | grep linux-image
- On RHEL/CentOS/Fedora: rpm -qa | grep kernel
- Or: uname -r to get the running kernel, then map to distro advisory.
- Confirm fix presence:
- Review vendor changelogs for the patch or search the kernel package changelog for references to the UDF fix or commit ID 3bd5e45c2ce30e239d596becd5db720f7eb83c99 (the upstream commit referenced in stable threads).
- If the package changelog does not explicitly reference the commit, verify with the distribution security advisory page or contact support.
- Apply updates in a staged manner and reboot hosts as required.
- After patching, validate by repeating previously failing test cases (if you have a safe reproducer) or by exercising mount operations with benign images. If you cannot reproduce the original crash safely, rely on consistent kernel logs and the presence of the commit in the kernel sources as proof the fix is applied.
Broader lessons and risk mitigation strategy
- Filesystem parsers are a recurrent source of security issues because they must parse complex, variable binary formats supplied by external media and images. Always treat on‑disk length fields as untrusted.
- Defense in depth reduces exploitation likelihood:
- Limit automatic host processing of third‑party images.
- Use least privilege for services that handle images.
- Embrace sandboxing and containerization to reduce kernel surface area exposed to untrusted content.
- Keep kernel and distribution packages up to date; small, surgical fixes in core code (like a simple bounds check) are the canonical response for these classes of bugs — they are quick to land upstream but still require careful distro packaging and testing.
- Hosts that accept many untrusted images
- Virtualization hosts and hypervisors
- Build/CI systems that automatically mount or scan ISOs
Patch these first and apply standard rollout practices for the rest. Practical rollout guidance and prioritized remediation playbooks for similar memory‑safety fixes appear in community advisories and patching literature and are applicable here.
Conclusion
CVE‑2025‑40044 is a textbook example of a subtle but real memory‑safety defect arising from trusting on‑disk lengths. The upstream fix — validating the computed descriptor length against the block buffer — is straightforward and low‑risk, but getting it into production systems requires standard kernel‑update practices: confirm vendor backports, test in a staging ring, and roll out via controlled maintenance windows.Patch promptly on systems that mount untrusted UDF images, harden image ingestion pathways where possible, and monitor kernel logs for KASAN or oops traces referencing crc_itu_t and UDF parsing functions. While public reporting so far shows a reproducible KASAN use‑after‑free and not a polished RCE exploit, the presence of a memory‑safety defect is sufficient reason to prioritize updates in environments where untrusted images are accepted.
Source: MSRC Security Update Guide - Microsoft Security Response Center