CVE-2026-63824: KEYS: fix overflow in keyctl_pkey_params_get_2()
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
KEYS: fix overflow in keyctl_pkey_params_get_2()
The length for the internal output buffer is calculated incorrectly, which can result overflow when a too small buffer is provided.
Fix the bug by allocating internal output with the size of the maximum length of the cryptographic primitive instead of caller provided size.
The Linux kernel CVE team has assigned CVE-2026-63824 to this issue.
Affected and fixed versions
===========================
Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 5.10.260 with commit 622ec2dcd59f21623f2a7ab773c80ceb7d555e3a Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 5.15.211 with commit b1e247338bc71826a2d2def3e0874c34749df69a Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 6.1.177 with commit 0f3058d7d26f81df9b68a18ddbe164bdc3c5eff3 Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 6.6.144 with commit 5966e4e2ba213ab7ad559166152eb4f1f170dd2c Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 6.12.95 with commit 5165f1cc727f1322456735df212d8e26ec237a8d Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 6.18.38 with commit b11c1fa32667692a2c0566e10163758e786e430c Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 7.1.3 with commit 670fc6a311ed321522b7fff92cf0fc376b4f6e78 Issue introduced in 4.20 with commit 00d60fd3b93219ea854220f0fd264b86398cbc53 and fixed in 7.2-rc1 with commit cb481e59ea6cae3b7796ac1d7a22b6b24c3f3c0b
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2026-63824
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
security/keys/keyctl_pkey.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/622ec2dcd59f21623f2a7ab773c80ceb7d555e3a https://git.kernel.org/stable/c/b1e247338bc71826a2d2def3e0874c34749df69a https://git.kernel.org/stable/c/0f3058d7d26f81df9b68a18ddbe164bdc3c5eff3 https://git.kernel.org/stable/c/5966e4e2ba213ab7ad559166152eb4f1f170dd2c https://git.kernel.org/stable/c/5165f1cc727f1322456735df212d8e26ec237a8d https://git.kernel.org/stable/c/b11c1fa32667692a2c0566e10163758e786e430c https://git.kernel.org/stable/c/670fc6a311ed321522b7fff92cf0fc376b4f6e78 https://git.kernel.org/stable/c/cb481e59ea6cae3b7796ac1d7a22b6b24c3f3c0b