# CVE-2022-50080: tee: add overflow check in register\_shm\_helper()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2025-06-18T11:02:23.003Z
- **Modified:** 2026-11-05T20:17:22.740Z

## Who should check

- Anyone running Linux \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< b37e0f17653c00b586cdbcdf0dbca475358ecffd; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 965333345fe952cc7eebc8e3a565ffc709441af2; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 578c349570d2a912401963783b36e0ec7a25c053; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< c12f0e6126ad223806a365084e86370511654bf1; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 2f8e79a1a6128214cb9b205a9869341af5dfb16b; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 58c008d4d398f792ca67f35650610864725518fd; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 573ae4f13f630d6660008f1974c0a8a29c30e18a
- Anyone running Linux 4.16

## Description

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

tee: add overflow check in register\_shm\_helper()

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

This causes internal\_get\_user\_pages\_fast() a helper function of
pin\_user\_pages\_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: optee\_example\_a Not tainted 5.19.0 \#11
  Hardware name: QEMU QEMU Virtual Machine, BIOS 0.0.0 02/06/2015
  pc : internal\_get\_user\_pages\_fast+0x474/0xa80
  Call trace:
   internal\_get\_user\_pages\_fast+0x474/0xa80
   pin\_user\_pages\_fast+0x24/0x4c
   register\_shm\_helper+0x194/0x330
   tee\_shm\_register\_user\_buf+0x78/0x120
   tee\_ioctl+0xd0/0x11a0
   \_\_arm64\_sys\_ioctl+0xa8/0xec
   invoke\_syscall+0x48/0x114

Fix this by adding an an explicit call to access\_ok() in
tee\_shm\_register\_user\_buf() to catch an invalid user space address
early.

## Affected and fixed versions

- Linux: \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< b37e0f17653c00b586cdbcdf0dbca475358ecffd; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 965333345fe952cc7eebc8e3a565ffc709441af2; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 578c349570d2a912401963783b36e0ec7a25c053; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< c12f0e6126ad223806a365084e86370511654bf1; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 2f8e79a1a6128214cb9b205a9869341af5dfb16b; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 58c008d4d398f792ca67f35650610864725518fd; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 573ae4f13f630d6660008f1974c0a8a29c30e18a (cvelist)
- Linux: 4.16 (cvelist)

## Mitigation

- Upgrade Linux to 573ae4f13f630d6660008f1974c0a8a29c30e18a or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50080. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50080.md
Affected: Linux >= 033ddf12bcf5326b93bd604f50a7474a434a35f9, < b37e0f17653c00b586cdbcdf0dbca475358ecffd; >= 033ddf12bcf5326b93bd604f50a7474a434a35f9, < 965333345fe952cc7eebc8e3a565ffc709441af2; >= 033ddf12bcf5326b93bd604f50a7474a434a35f9, < 578c349570d2a912401963783b36e0ec7a25c053; >= 033ddf12bcf5326b93bd604…
Fixed in: Linux 965333345fe952cc7eebc8e3a565ffc709441af2, Linux 578c349570d2a912401963783b36e0ec7a25c053, Linux 2f8e79a1a6128214cb9b205a9869341af5dfb16b, Linux 58c008d4d398f792ca67f35650610864725518fd, Linux 573ae4f13f630d6660008f1974c0a8a29c30e18a

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50080 being exploited?

There is no confirmed exploitation: CVE-2022-50080 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.28% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50080?

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50080?

Linux \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< b37e0f17653c00b586cdbcdf0dbca475358ecffd; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 965333345fe952cc7eebc8e3a565ffc709441af2; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 578c349570d2a912401963783b36e0ec7a25c053; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< c12f0e6126ad223806a365084e86370511654bf1; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 2f8e79a1a6128214cb9b205a9869341af5dfb16b; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 58c008d4d398f792ca67f35650610864725518fd; \>= 033ddf12bcf5326b93bd604f50a7474a434a35f9, \< 573ae4f13f630d6660008f1974c0a8a29c30e18a; Linux 4.16.

### Is there a fix for CVE-2022-50080?

Yes. Fixed in Linux 965333345fe952cc7eebc8e3a565ffc709441af2, Linux 578c349570d2a912401963783b36e0ec7a25c053, Linux 2f8e79a1a6128214cb9b205a9869341af5dfb16b, Linux 58c008d4d398f792ca67f35650610864725518fd, Linux 573ae4f13f630d6660008f1974c0a8a29c30e18a. Upgrade Linux to 573ae4f13f630d6660008f1974c0a8a29c30e18a or later.

### How do I check if I'm affected by CVE-2022-50080?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/b37e0f17653c00b586cdbcdf0dbca475358ecffd>
- patch: <https://git.kernel.org/stable/c/965333345fe952cc7eebc8e3a565ffc709441af2>
- patch: <https://git.kernel.org/stable/c/578c349570d2a912401963783b36e0ec7a25c053>
- patch: <https://git.kernel.org/stable/c/c12f0e6126ad223806a365084e86370511654bf1>
- patch: <https://git.kernel.org/stable/c/2f8e79a1a6128214cb9b205a9869341af5dfb16b>
- patch: <https://git.kernel.org/stable/c/58c008d4d398f792ca67f35650610864725518fd>
- patch: <https://git.kernel.org/stable/c/573ae4f13f630d6660008f1974c0a8a29c30e18a>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50080>

HTML: <https://flawdb.com/CVE-2022-50080> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50080>
