Junglewise Threat Intelligence

CVE-2025-40082: Linux Kernel slab-out-of-bounds read in hfsplus_uni2asc

CVE-2025-40082 · Severity: high · CVSS 7.1 · Published 2025-10-28

Technologies: Linux Kernel. Vendors: Linux.

Executive brief

A vulnerability was identified in the Linux kernel's HFS+ filesystem driver, which is used to read and write Apple-formatted disks. A local attacker could exploit this flaw to read sensitive information from the computer's memory or cause a system crash (Blue Screen/Kernel Panic). This could lead to a loss of data confidentiality or a disruption of business operations on systems that mount HFS+ drives.

Technical details

An out-of-bounds read vulnerability exists in the hfsplus_uni2asc() function within fs/hfsplus/unicode.c. The issue stems from a type mismatch when hfsplus_listxattr passes a 'struct hfsplus_attr_unistr*' to a function expecting 'struct hfsplus_unistr*', which have different memory layouts. This allows the unicode buffer pointer to advance beyond the allocated slab memory during string conversion. A local attacker with the ability to mount or interact with HFS+ filesystems can trigger this via system calls like listxattr. The fix introduces wrapper functions to correctly handle both structure types and enforces bounds checking on the ustrlen value.

Affected products

  • Linux Linux Kernel 6.16.4; 3.x; 4.x; 5.x; 6.x

Timeline

  • 2025-09-09: disclosed: Initial patch submitted by Kang Chen
  • 2025-10-28: advisory: CVE-2025-40082 published
  • 2026-02-11: patched: Commits merged into stable branches by Greg Kroah-Hartman

References

Related threats