CVE-2022-49870
capabilities: fix undefined behavior in bit shift for CAP_TO_MASK
Check your servers for CVE-2022-49870
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2022-49870 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
capabilities: fix undefined behavior in bit shift for CAP_TO_MASK
Shifting signed 32-bit value by 31 bits is undefined, so changing significant bit to unsigned. The UBSAN warning calltrace like below:
UBSAN: shift-out-of-bounds in security/commoncap.c:1252:2 left shift of 1 by 31 places cannot be represented in type 'int' Call Trace: <TASK> dump_stack_lvl+0x7d/0xa5 dump_stack+0x15/0x1b ubsan_epilogue+0xe/0x4e __ubsan_handle_shift_out_of_bounds+0x1e7/0x20c cap_task_prctl+0x561/0x6f0 security_task_prctl+0x5a/0xb0 __x64_sys_prctl+0x61/0x8f0 do_syscall_64+0x58/0x80 entry_SYSCALL_64_after_hwframe+0x63/0xcd </TASK>
Exploitation
EPSS 0.22%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 13.9% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 5 Nov 2026):
- Exploitation
- none: CISA did not find evidence of exploitation or a public proof of concept
- Automatable
- no: each attack takes manual steps
- Technical impact
- partial: limited control or limited data
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from e338d263a76af78fe8f38a72131188b58fceb591, before 5b79fa628e2ab789e629a83cd211ef9b4c1a593e affected from e338d263a76af78fe8f38a72131188b58fceb591, before 65b0bc7a0690861812ade523d19f82688ab819dc affected from e338d263a76af78fe8f38a72131188b58fceb591, before dbaab08c8677d598244d21afb7818e44e1c5d826 affected from e338d263a76af78fe8f38a72131188b58fceb591, before 5661f111a1616ac105ec8cec81bff99b60f847ac affected from e338d263a76af78fe8f38a72131188b58fceb591, before fcbd2b336834bd24e1d9454ad5737856470c10d7 affected from e338d263a76af78fe8f38a72131188b58fceb591, before 151dc8087b5609e53b069c068e3f3ee100efa586 affected from e338d263a76af78fe8f38a72131188b58fceb591, before 27bdb134c043ff32c459d98f16550d0ffa0b3c34 affected from e338d263a76af78fe8f38a72131188b58fceb591, before 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13
Other versions: unaffected
|
| Linux |
affected 2.6.25 unaffected before 2.6.25 unaffected from 4.9.334 up to and including 4.9.* unaffected from 4.14.300 up to and including 4.14.* unaffected from 4.19.267 up to and including 4.19.* unaffected from 5.4.225 up to and including 5.4.* unaffected from 5.10.155 up to and including 5.10.* unaffected from 5.15.79 up to and including 5.15.* unaffected from 6.0.9 up to and including 6.0.* unaffected 6.1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2022-49870 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2022-49870
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2022-49870
trivy image --scanners vuln IMAGE | grep CVE-2022-49870
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/5b79fa628e2ab789e629a83cd211ef9b4c1a593e git.kernel.org
- https://git.kernel.org/stable/c/65b0bc7a0690861812ade523d19f82688ab819dc git.kernel.org
- https://git.kernel.org/stable/c/dbaab08c8677d598244d21afb7818e44e1c5d826 git.kernel.org
- https://git.kernel.org/stable/c/5661f111a1616ac105ec8cec81bff99b60f847ac git.kernel.org
- https://git.kernel.org/stable/c/fcbd2b336834bd24e1d9454ad5737856470c10d7 git.kernel.org
- https://git.kernel.org/stable/c/151dc8087b5609e53b069c068e3f3ee100efa586 git.kernel.org
- https://git.kernel.org/stable/c/27bdb134c043ff32c459d98f16550d0ffa0b3c34 git.kernel.org
- https://git.kernel.org/stable/c/46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13 git.kernel.org
Source: the record CVE-2022-49870 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse