Skip to contentSkip to conversation

CVE-2026-53210: tee: shm: fix shm leak in register_shm_helper()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Jun 25

lore
Share & tools
lore
#0 lore raw

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

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

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

tee: shm: fix shm leak in register_shm_helper()

register_shm_helper() allocates shm before calling iov_iter_npages(). If iov_iter_npages() returns 0, the function jumps to err_ctx_put and leaks shm.

This can be triggered by TEE_IOC_SHM_REGISTER with struct tee_ioctl_shm_register_data where length is 0.

Jump to err_free_shm instead.

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

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

	Issue introduced in 6.8 with commit 7bdee41575919773818e525ea19e54eb817770af and fixed in 6.12.94 with commit 4277759906b44d923a38c8f59f5576501b187b0d
	Issue introduced in 6.8 with commit 7bdee41575919773818e525ea19e54eb817770af and fixed in 6.18.36 with commit c10c9c48b2903f41ed4c532043b0576e86228236
	Issue introduced in 6.8 with commit 7bdee41575919773818e525ea19e54eb817770af and fixed in 7.0.13 with commit dbf779db927414f5b37c1f666013e9b48a88cfde
	Issue introduced in 6.8 with commit 7bdee41575919773818e525ea19e54eb817770af and fixed in 7.1 with commit 26682f5efc276e3ad96d102019472bfbf03833b2

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

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/tee/tee_shm.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/4277759906b44d923a38c8f59f5576501b187b0d
	https://git.kernel.org/stable/c/c10c9c48b2903f41ed4c532043b0576e86228236
	https://git.kernel.org/stable/c/dbf779db927414f5b37c1f666013e9b48a88cfde
	https://git.kernel.org/stable/c/26682f5efc276e3ad96d102019472bfbf03833b2