CVE-2026-23344: crypto: ccp - Fix use-after-free on error path
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
crypto: ccp - Fix use-after-free on error path
In the error path of sev_tsm_init_locked(), the code dereferences 't' after it has been freed with kfree(). The pr_err() statement attempts to access t->tio_en and t->tio_init_done after the memory has been released.
Move the pr_err() call before kfree(t) to access the fields while the memory is still valid.
This issue reported by Smatch static analyser
The Linux kernel CVE team has assigned CVE-2026-23344 to this issue.
Affected and fixed versions
===========================
Issue introduced in 6.19 with commit 4be423572da1f4c11f45168e3fafda870ddac9f8 and fixed in 6.19.7 with commit 79a26fe3175b9ed7c0c9541b197cb9786237c0f7 Issue introduced in 6.19 with commit 4be423572da1f4c11f45168e3fafda870ddac9f8 and fixed in 7.0-rc3 with commit 889b0e2721e793eb46cf7d17b965aa3252af3ec8
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-23344
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/sev-dev-tsm.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/79a26fe3175b9ed7c0c9541b197cb9786237c0f7 https://git.kernel.org/stable/c/889b0e2721e793eb46cf7d17b965aa3252af3ec8