keys: make keyring key-chunk byte order agree with keyring_diff_objects()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ f771fde82051976a6fc0fd570f8b86de4a92124b · < 3d9f16c0b643ceac305526b2e2fe25c2c6166926| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
keys: make keyring key-chunk byte order agree with keyring_diff_objects()
keyring_get_key_chunk() loads description bytes into the index chunk low address first, while keyring_diff_objects() numbers the first differing bit from the low end and folds the absolute byte index into the level without removing the inline-prefix offset the level already carries. The two disagree on byte order and bit position, so the array can be told two keys first differ at a bit that does not differ in the chunk the walker uses, letting crafted descriptions collide into one node.
Load the chunk in the order keyring_diff_objects() assumes and drop the inline-prefix length when folding the byte index into the level. This only changes the in-memory ordering used to place keys within a keyring; add, search and read of non-colliding keys are unaffected.
From the CVE record · Linux
The Linux kernel keyring code disagrees on byte order and bit position when comparing key descriptions. Crafted descriptions can cause two keys to collide into one keyring node. The input does not specify whether this requires local access, authentication, or user interaction.
Engineers running the Linux kernel should check their versions; affected versions are not specified.