KEYS: prevent NULL pointer dereference in find_asymmetric_key()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
KEYS: prevent NULL pointer dereference in find_asymmetric_key()
In find_asymmetric_key(), if all NULLs are passed in the id_{0,1,2} arguments, the kernel will first emit WARN but then have an oops because id_2 gets dereferenced anyway.
Add the missing id_2 check and move WARN_ON() to the final else branch to avoid duplicate NULL checks.
Found by Linux Verification Center (linuxtesting.org) with Svace static analysis tool.
From the CVE record · Linux
The Linux kernel's find_asymmetric_key() can dereference a NULL pointer when all three key ID arguments are NULL, causing a kernel oops. The input does not establish whether an attacker can trigger this condition, or specify network access, authentication, or user interaction requirements.
Engineers running the Linux kernel should check their versions; affected versions are not specified in the input.