# CVE-2022-49870: capabilities: fix undefined behavior in bit shift for CAP\_TO\_MASK

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

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; 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.29% (percentile 14, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2025-05-01T14:10:21.134Z
- **Modified:** 2026-11-05T20:17:16.543Z

## Who should check

- Anyone running Linux \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 5b79fa628e2ab789e629a83cd211ef9b4c1a593e; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 65b0bc7a0690861812ade523d19f82688ab819dc; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< dbaab08c8677d598244d21afb7818e44e1c5d826; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 5661f111a1616ac105ec8cec81bff99b60f847ac; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< fcbd2b336834bd24e1d9454ad5737856470c10d7; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 151dc8087b5609e53b069c068e3f3ee100efa586; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 27bdb134c043ff32c459d98f16550d0ffa0b3c34; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13
- Anyone running Linux 2.6.25

## 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\>

## Affected and fixed versions

- Linux: \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 5b79fa628e2ab789e629a83cd211ef9b4c1a593e; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 65b0bc7a0690861812ade523d19f82688ab819dc; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< dbaab08c8677d598244d21afb7818e44e1c5d826; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 5661f111a1616ac105ec8cec81bff99b60f847ac; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< fcbd2b336834bd24e1d9454ad5737856470c10d7; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 151dc8087b5609e53b069c068e3f3ee100efa586; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 27bdb134c043ff32c459d98f16550d0ffa0b3c34; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13 (cvelist)
- Linux: 2.6.25 (cvelist)

## Mitigation

- Upgrade Linux to 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13 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-49870. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-49870.md
Affected: Linux >= e338d263a76af78fe8f38a72131188b58fceb591, < 5b79fa628e2ab789e629a83cd211ef9b4c1a593e; >= e338d263a76af78fe8f38a72131188b58fceb591, < 65b0bc7a0690861812ade523d19f82688ab819dc; >= e338d263a76af78fe8f38a72131188b58fceb591, < dbaab08c8677d598244d21afb7818e44e1c5d826; >= e338d263a76af78fe8f38a7…
Fixed in: Linux 5b79fa628e2ab789e629a83cd211ef9b4c1a593e, Linux 65b0bc7a0690861812ade523d19f82688ab819dc, Linux 5661f111a1616ac105ec8cec81bff99b60f847ac, Linux 151dc8087b5609e53b069c068e3f3ee100efa586, Linux 27bdb134c043ff32c459d98f16550d0ffa0b3c34, Linux 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13

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-49870 being exploited?

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

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

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

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

Linux \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 5b79fa628e2ab789e629a83cd211ef9b4c1a593e; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 65b0bc7a0690861812ade523d19f82688ab819dc; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< dbaab08c8677d598244d21afb7818e44e1c5d826; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 5661f111a1616ac105ec8cec81bff99b60f847ac; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< fcbd2b336834bd24e1d9454ad5737856470c10d7; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 151dc8087b5609e53b069c068e3f3ee100efa586; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 27bdb134c043ff32c459d98f16550d0ffa0b3c34; \>= e338d263a76af78fe8f38a72131188b58fceb591, \< 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13; Linux 2.6.25.

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

Yes. Fixed in Linux 5b79fa628e2ab789e629a83cd211ef9b4c1a593e, Linux 65b0bc7a0690861812ade523d19f82688ab819dc, Linux 5661f111a1616ac105ec8cec81bff99b60f847ac, Linux 151dc8087b5609e53b069c068e3f3ee100efa586, Linux 27bdb134c043ff32c459d98f16550d0ffa0b3c34, Linux 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13. Upgrade Linux to 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13 or later.

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

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/5b79fa628e2ab789e629a83cd211ef9b4c1a593e>
- patch: <https://git.kernel.org/stable/c/65b0bc7a0690861812ade523d19f82688ab819dc>
- patch: <https://git.kernel.org/stable/c/dbaab08c8677d598244d21afb7818e44e1c5d826>
- patch: <https://git.kernel.org/stable/c/5661f111a1616ac105ec8cec81bff99b60f847ac>
- patch: <https://git.kernel.org/stable/c/fcbd2b336834bd24e1d9454ad5737856470c10d7>
- patch: <https://git.kernel.org/stable/c/151dc8087b5609e53b069c068e3f3ee100efa586>
- patch: <https://git.kernel.org/stable/c/27bdb134c043ff32c459d98f16550d0ffa0b3c34>
- patch: <https://git.kernel.org/stable/c/46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13>

## 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-49870>

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