Linux
keys: fix out-of-bounds read in keyring_get_key_chunk()
In the Linux kernel, the following vulnerability has been resolved: keys: fix out-of-bounds read in keyring_get_key_chunk() For description-level chunks keyring_get_key_chunk() advances the read pointer by level * sizeof(long) past the inline prefix but only bounds-checks the prefix, so a long enough key description is read past its kmemdup(desc, desc_len + 1) allocation. Compute the full byte offset and bounds-check the description against it before reading. The walk only reaches a description-level chunk when two keys collide through the hash, x, type and domain_tag chunks, so this is reached from an unprivileged add_key(2) with a crafted pair of same-type keys whose index hashes collide; KASAN reports a slab-out-of-bounds read.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < 4c0c26f751e50d3027eacc4d7d0fabc31f1d7e6b
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < 79916f40d4ab1b4ae694d8c024fd179454bfe46e
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < e5b01998cef8d7f613200230ccaadebe5de9135c
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < d1933e03e8c74a018550c31a393b79c4d95bff40
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < 3a744838453fb9309ce5a5526d3252e211d60152
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < e9417d21a22ad2ec398e78fcf084b717ce92cf2f
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < 8dba33c1e779d0fb9a2acb31e354cf0fc0229111
- >= f771fde82051976a6fc0fd570f8b86de4a92124b, < 63918731f9ae25b5deb022f118e941e6dddfcef4
Fixed in 4c0c26f751e50d3027eacc4d7d0fabc31f1d7e6b, 79916f40d4ab1b4ae694d8c024fd179454bfe46e, e5b01998cef8d7f613200230ccaadebe5de9135c, d1933e03e8c74a018550c31a393b79c4d95bff40, 3a744838453fb9309ce5a5526d3252e211d60152, e9417d21a22ad2ec398e78fcf084b717ce92cf2f, 8dba33c1e779d0fb9a2acb31e354cf0fc0229111, 63918731f9ae25b5deb022f118e941e6dddfcef4
- 5.3
Fixed in 0, 5.10.265, 5.15.216, 6.1.183, 6.6.151, 6.12.103, 6.18.44, 7.1.8, 7.2
Mitigation
Upgrade Linux to 4c0c26f751e50d3027eacc4d7d0fabc31f1d7e6b or 79916f40d4ab1b4ae694d8c024fd179454bfe46e or e5b01998cef8d7f613200230ccaadebe5de9135c or d1933e03e8c74a018550c31a393b79c4d95bff40 or 3a744838453fb9309ce5a5526d3252e211d60152 or e9417d21a22ad2ec398e78fcf084b717ce92cf2f or 8dba33c1e779d0fb9a2acb31e354cf0fc0229111 or 63918731f9ae25b5deb022f118e941e6dddfcef4 or later.
Upgrade Linux to 0 or 5.10.265 or 5.15.216 or 6.1.183 or 6.6.151 or 6.12.103 or 6.18.44 or 7.1.8 or 7.2 or later.
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.