Description
libfsapfs through 20260921 contains an integer underflow in libfsapfs_key_encrypted_key_read_data() that allows attackers to trigger heap out-of-bounds reads via crafted KEK attributes. Attackers can supply a crafted encrypted APFS image with malformed HMAC or wrapped KEK attribute lengths to crash fsapfsinfo, pyfsapfs, dfVFS or plaso and read adjacent heap memory before password checks.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| libyal | libfsapfs | ≤ 20260921 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | libfsapfs | No fix yet | — |
| Debian 13 | libfsapfs | No fix yet | — |
| Debian 12 | libfsapfs | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | libfsapfs | No fix yet | — |
| Ubuntu 26.04 LTS | libfsapfs | No fix yet | — |
| Ubuntu 24.04 LTS | libfsapfs | No fix yet | — |
| Ubuntu 22.04 LTS | libfsapfs | No fix yet | — |
| Ubuntu 20.04 LTS | libfsapfs | No fix yet | — |
References
- https://hackmd.io/@haind-pwn/libfsapfs-key-encrypted-key-attribute-oob-read technical-description
- https://github.com/libyal/libfsapfs/blob/4c7c1c21f3cfc7d35f0b34b8a47f1f1562d27bbb/libfsapfs/libfsapfs_key_encrypted_key.c#L321-L333 technical-description
- https://github.com/libyal/libfsapfs/blob/4c7c1c21f3cfc7d35f0b34b8a47f1f1562d27bbb/libfsapfs/libfsapfs_key_encrypted_key.c#L528-L540 technical-description
- https://github.com/libyal/libfsapfs product
- VulnCheck Advisory: libfsapfs through 20260921 Heap Out-of-Bounds Read via libfsapfs_key_encrypted_key_read_data third-party-advisory