CVE-2022-50080

Source
https://nvd.nist.gov/vuln/detail/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
Published
2025-06-18T11:15:36Z
Modified
2025-07-01T14:23:16.762601Z
Summary
[none]
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.

References

Affected packages

Debian:11 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
5.10.140-1

Affected versions

5.*

5.10.46-4
5.10.46-5
5.10.70-1~bpo10+1
5.10.70-1
5.10.84-1
5.10.92-1~bpo10+1
5.10.92-1
5.10.92-2
5.10.103-1~bpo10+1
5.10.103-1
5.10.106-1
5.10.113-1
5.10.120-1~bpo10+1
5.10.120-1
5.10.127-1
5.10.127-2~bpo10+1
5.10.127-2
5.10.136-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:12 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.2-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Debian:13 / linux

Package

Name
linux
Purl
pkg:deb/debian/linux?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
6.0.2-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}