CVE-2022-50080

Source
https://cve.org/CVERecord?id=CVE-2022-50080
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50080.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2022-50080
Downstream
Related
Published
2025-06-18T11:02:23.003Z
Modified
2026-03-20T12:24:52.501635Z
Summary
tee: add overflow check in register_shm_helper()
Details

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

tee: add overflow check in registershmhelper()

With special lengths supplied by user space, registershmhelper() has an integer overflow when calculating the number of pages covered by a supplied user space memory region.

This causes internalgetuserpagesfast() a helper function of pinuserpages_fast() to do a NULL pointer dereference:

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 Modules linked in: CPU: 1 PID: 173 Comm: opteeexamplea Not tainted 5.19.0 #11 Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015 pc : internalgetuserpagesfast+0x474/0xa80 Call trace: internalgetuserpagesfast+0x474/0xa80 pinuserpagesfast+0x24/0x4c registershmhelper+0x194/0x330 teeshmregisteruserbuf+0x78/0x120 teeioctl+0xd0/0x11a0 _arm64sysioctl+0xa8/0xec invokesyscall+0x48/0x114

Fix this by adding an an explicit call to accessok() in teeshmregisteruser_buf() to catch an invalid user space address early.

Database specific
{
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50080.json",
    "cna_assigner": "Linux"
}
References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
033ddf12bcf5326b93bd604f50a7474a434a35f9
Fixed
b37e0f17653c00b586cdbcdf0dbca475358ecffd
Fixed
965333345fe952cc7eebc8e3a565ffc709441af2
Fixed
578c349570d2a912401963783b36e0ec7a25c053
Fixed
c12f0e6126ad223806a365084e86370511654bf1
Fixed
2f8e79a1a6128214cb9b205a9869341af5dfb16b
Fixed
58c008d4d398f792ca67f35650610864725518fd
Fixed
573ae4f13f630d6660008f1974c0a8a29c30e18a

Database specific

source
"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-50080.json"