Skip to contentSkip to conversation

CVE-2026-45959: crypto: ccp - Fix a crash due to incorrect cleanup usage of kfree

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

crypto: ccp - Fix a crash due to incorrect cleanup usage of kfree

Annotating a local pointer variable, which will be assigned with the kmalloc-family functions, with the __cleanup(kfree) attribute will make the address of the local variable, rather than the address returned by kmalloc, passed to kfree directly and lead to a crash due to invalid deallocation of stack address. According to other places in the repo, the correct usage should be __free(kfree). The code coincidentally compiled because the parameter type void * of kfree is compatible with the desired type struct { ... } **.

The Linux kernel CVE team has assigned CVE-2026-45959 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 6.17 with commit a71475582ada92ba021852bf3c2b40ab3718549b and fixed in 6.18.14 with commit 9a3ace9b010ffd8c422c97844ae152f7c53d6b18
	Issue introduced in 6.17 with commit a71475582ada92ba021852bf3c2b40ab3718549b and fixed in 6.19.4 with commit 90f9090e3e744a8fe3bb6fa0e61f577347728b0b
	Issue introduced in 6.17 with commit a71475582ada92ba021852bf3c2b40ab3718549b and fixed in 7.0 with commit d5abcc33ee76bc26d58b39dc1a097e43a99dd438

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-45959

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:
drivers/crypto/ccp/ccp-ops.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/9a3ace9b010ffd8c422c97844ae152f7c53d6b18
	https://git.kernel.org/stable/c/90f9090e3e744a8fe3bb6fa0e61f577347728b0b
	https://git.kernel.org/stable/c/d5abcc33ee76bc26d58b39dc1a097e43a99dd438