CVE-2022-50630
kernel: mm: hugetlb: fix UAF in hugetlb_handle_userfault
Overview
Description
In the Linux kernel, the following vulnerability has been resolved:
mm: hugetlb: fix UAF in hugetlb_handle_userfault
The vma_lock and hugetlb_fault_mutex are dropped before handling userfault
and reacquire them again after handle_userfault(), but reacquire the
vma_lock could lead to UAF[1,2] due to the following race,
hugetlb_fault
hugetlb_no_page
/*unlock vma_lock */
hugetlb_handle_userfault
handle_userfault
/* unlock mm->mmap_lock*/
vm_mmap_pgoff
do_mmap
mmap_region
munmap_vma_range
/* clean old vma */
/* lock vma_lock again <--- UAF */
/* unlock vma_lock */
Since the vma_lock will unlock immediately after
hugetlb_handle_userfault(), let's drop the unneeded lock and unlock in
hugetlb_handle_userfault() to fix the issue.
[1] https://lore.kernel.org/linux-mm/000000000000d5e00a05e834962e@google.com/
[2] https://lore.kernel.org/linux-mm/20220921014457.1668-1-liuzixian4@huawei.com/
Source: OX vulnerability database
Severity
7.8 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Local
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- High
- Availability
- High
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Affected packages · 0
No registry package. This ID affects operating system packages only.
Operating systems · 64 fixes
Photon OS 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 4.0 | bpftool +9 | 5.10.46-2.ph4 |
Red Hat 3 releases · 3 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 7 | kernel-rt +9 | affected | — |
| 8 | kernel-rt +14 | affected | — |
| 9 | kernel-rt +20 | affected | — |
| 9 | kernel +60 | 0:5.14.0-362.8.1.el9_3 | RHSA-2023:6583 |
| 9 | bpftool | 0:7.2.0-362.8.1.el9_3 | RHSA-2023:6583 |
SUSE Linux Enterprise 3 releases · 5 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 12.5 | kgraft-patch-4-12-14-122-290-default | 1-8.7.1 | SUSE-SU-2026:0316-1 |
| 12.5 | cluster-md-kmp-default +13 | 4.12.14-122.290.1 | SUSE-SU-2026:0316-1 |
| 15.4 | kernel-livepatch-5-14-21-150400-24-194-default | 1-150400.9.7.1 | SUSE-SU-2026:0617-1 |
| 15.4 | cluster-md-kmp-default +17 | 5.14.21-150400.24.194.1 | SUSE-SU-2026:0617-1 |
| 15.4 | kernel-default-base | 5.14.21-150400.24.194.1.150400.24.98.3 | SUSE-SU-2026:0617-1 |
| 15.5 | kernel-livepatch-5-14-21-150500-55-133-default | 1-150500.11.3.1 | SUSE-SU-2026:0317-1 |
2 more rows
SUSE Linux Enterprise Micro 4 releases · 4 packages
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 5.2 | kernel-rt +1 | 5.3.18-150300.232.1 | SUSE-SU-2026:0350-1 |
| 5.2 | kernel-default | 5.3.18-150300.59.232.1 | SUSE-SU-2026:0369-1 |
| 5.2 | kernel-default-base | 5.3.18-150300.59.232.1.150300.18.138.1 | SUSE-SU-2026:0369-1 |
| 5.3 | kernel-rt +1 | 5.14.21-150400.15.142.1 | SUSE-SU-2026:0411-1 |
| 5.3 | kernel-default | 5.14.21-150400.24.194.1 | SUSE-SU-2026:0617-1 |
| 5.3 | kernel-default-base | 5.14.21-150400.24.194.1.150400.24.98.3 | SUSE-SU-2026:0617-1 |
6 more rows
debian 4 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | linux | 5.10.158-1 |
| 12 | linux | 6.0.3-1 |
| 13 | linux | 6.0.3-1 |
| 14 | linux | 6.0.3-1 |
echo 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| linux | 6.0.3-1 |
root.io debian 3 releases · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 11 | rootio-linux | 5.10.158-1 |
| 12 | rootio-linux | 6.0.3-1 |
| 13 | rootio-linux | 6.0.3-1 |
root.io ubuntu 1 release · 1 package
| Release | Package | Fixed in |
|---|---|---|
| 22.04 | rootio-linux | 5.15.0-60.66 |
ubuntu 4 releases · 20 packages
| Release | Package | Fixed in |
|---|---|---|
| 18.04-ESM | linux +12 | affected |
| 20.04 | linux-intel-iotg-5-15 | 5.15.0-1025.30~20.04.1 |
| 20.04 | linux-riscv-5-15 | 5.15.0-1029.33~20.04.1 |
| 20.04 | linux-oracle-5-15 | 5.15.0-1029.35~20.04.1 |
| 20.04 | linux-gcp-5-15 | 5.15.0-1029.36~20.04.1 |
| 20.04 | linux-aws-5-15 | 5.15.0-1030.34~20.04.1 |
23 more rows
References
- access.redhat.com https://access.redhat.com/security/cve/CVE-2022-50630
- git.kernel.org https://git.kernel.org/linus/958f32ce832ba781ac20e11bb2d12a9352ea28fc (6.1-rc1)
- git.kernel.org https://git.kernel.org/stable/c/0db2efb3bff879566f05341d94c3de00ac95c4cc
- git.kernel.org https://git.kernel.org/stable/c/45c33966759ea1b4040c08dacda99ef623c0ca29
- git.kernel.org https://git.kernel.org/stable/c/78504bcedb2f1bbfb353b4d233c24d641c4dda33
- git.kernel.org https://git.kernel.org/stable/c/958f32ce832ba781ac20e11bb2d12a9352ea28fc
- git.kernel.org https://git.kernel.org/stable/c/dd691973f67b2800a97db723b1ff6f07fdcf7f5a
- lore.kernel.org https://lore.kernel.org/linux-cve-announce/2025120854-CVE-2022-50630-3891@gregkh/T
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2022-50630
- www.cve.org https://www.cve.org/CVERecord?id=CVE-2022-50630
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.