# CVE-2022-49870: capabilities: fix undefined behavior in bit shift for CAP_TO_MASK

- Severity: High 7.1 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.29%, higher than 14% of CVEs (2026-11-30)
- Published: 2025-05-01T14:10:21.134Z
- Modified: 2026-11-05T20:17:16.543Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: Linux

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

(As written by CVE List.)

## Affected

- Linux Linux: from e338d263a76af78fe8f38a72131188b58fceb591 before 5b79fa628e2ab789e629a83cd211ef9b4c1a593e; from e338d263a76af78fe8f38a72131188b58fceb591 before 65b0bc7a0690861812ade523d19f82688ab819dc; from e338d263a76af78fe8f38a72131188b58fceb591 before dbaab08c8677d598244d21afb7818e44e1c5d826; from e338d263a76af78fe8f38a72131188b58fceb591 before 5661f111a1616ac105ec8cec81bff99b60f847ac; from e338d263a76af78fe8f38a72131188b58fceb591 before fcbd2b336834bd24e1d9454ad5737856470c10d7; from e338d263a76af78fe8f38a72131188b58fceb591 before 151dc8087b5609e53b069c068e3f3ee100efa586; from e338d263a76af78fe8f38a72131188b58fceb591 before 27bdb134c043ff32c459d98f16550d0ffa0b3c34; from e338d263a76af78fe8f38a72131188b58fceb591 before 46653972e3ea64f79e7f8ae3aa41a4d3fdb70a13; 2.6.25 (not affected: before 2.6.25; from 4.9.334 up to 4.9.*; from 4.14.300 up to 4.14.*; from 4.19.267 up to 4.19.*; from 5.4.225 up to 5.4.*; from 5.10.155 up to 5.10.*; from 5.15.79 up to 5.15.*; from 6.0.9 up to 6.0.*; from 6.1 up to *)
- linux linux_kernel: from 2.6.25 before 4.9.334; from 4.10 before 4.14.300; from 4.15 before 4.19.267; from 4.20 before 5.4.225; from 5.5 before 5.10.155; from 5.11 before 5.15.79; from 5.16 before 6.0.9; 6.1

## References

- <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> (patch)

## Sources

- CVE List: [CVE-2022-49870](https://www.cve.org/CVERecord?id=CVE-2022-49870), CVE Terms of Use, modified 2026-11-05
- NVD: [CVE-2022-49870](https://nvd.nist.gov/vuln/detail/CVE-2022-49870), Public domain, modified 2026-11-05

---

Page: https://cve.day/CVE-2022-49870 · Whole record: https://cve.day/CVE-2022-49870.json · Rebuilt by cve.day 2026-11-25T22:58:20.911Z
