Linux kernel keyring restriction bypass in key_reject_and_link()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 5ac7eace2d00eab5ae0e9fdee63e38aee6001f7c · < 01835d3a3709be508ae5209f806640336c48e395| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KEYS: Fix key_reject_and_link() race with keyring restriction
The restrict_link check in key_reject_and_link() is done before taking the keyring semaphore, racing with a concurrent keyring_restrict() that installs the restriction while holding the semaphore in write mode.
Move the check to after __key_link_lock(), so it is done under the semaphore, matching the pattern used in __key_create_or_update().
From the CVE record · Linux
The Linux kernel checks keyring linking restrictions before taking the keyring semaphore in key_reject_and_link(). A concurrent keyring_restrict() call can install a restriction after that check, allowing the link to proceed without being checked against the new restriction. The input does not specify network access, authentication, or user-interaction requirements.
Teams running the Linux kernel should check whether their kernel includes this fix; affected versions are not specified.