tee: fix register_shm_helper()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.12.536.17.36.18In the Linux kernel, the following vulnerability has been resolved:
tee: fix register_shm_helper()
In register_shm_helper(), fix incorrect error handling for a call to iov_iter_extract_pages(). A case is missing for when iov_iter_extract_pages() only got some pages and return a number larger than 0, but not the requested amount.
This fixes a possible NULL pointer dereference following a bad input from ioctl(TEE_IOC_SHM_REGISTER) where parts of the buffer isn't mapped.
From the CVE record · Linux
The Linux kernel's register_shm_helper() mishandles a partial page extraction. A local caller can trigger a possible NULL pointer dereference by passing a buffer with unmapped portions to ioctl(TEE_IOC_SHM_REGISTER); the input does not specify authentication requirements.
Anyone running a Linux kernel with the affected TEE shared memory registration code should check their version; affected versions are not specified.