# CVE-2022-49658: bpf: Fix insufficient bounds propagation from adjust\_scalar\_min\_max\_vals

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; 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.28% (percentile 14, 2026-11-26)
- **Published:** 2025-02-26T02:23:56.922Z
- **Modified:** 2026-11-05T20:17:08.417Z

## Who should check

- Anyone running Linux \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< e917be1f83ea14a68b3cf64d3da9968eaf991dae; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< a7de8d436db92bab8b1f44624297c2554a6ac36b; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< b2a28bb36664c94375926cbbb91976242847699d; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< 3844d153a41adea718202c10ae91dc96b37453b5
- Anyone running Linux 4.14

## Description

In the Linux kernel, the following vulnerability has been resolved:

bpf: Fix insufficient bounds propagation from adjust\_scalar\_min\_max\_vals

Kuee reported a corner case where the tnum becomes constant after the call
to \_\_reg\_bound\_offset(), but the register's bounds are not, that is, its
min bounds are still not equal to the register's max bounds.

This in turn allows to leak pointers through turning a pointer register as
is into an unknown scalar via adjust\_ptr\_min\_max\_vals().

Before:

  func\#0 @0
  0: R1=ctx(off=0,imm=0,umax=0,var\_off=(0x0; 0x0)) R10=fp(off=0,imm=0,umax=0,var\_off=(0x0; 0x0))
  0: (b7) r0 = 1                        ; R0\_w=scalar(imm=1,umin=1,umax=1,var\_off=(0x1; 0x0))
  1: (b7) r3 = 0                        ; R3\_w=scalar(imm=0,umax=0,var\_off=(0x0; 0x0))
  2: (87) r3 = -r3                      ; R3\_w=scalar()
  3: (87) r3 = -r3                      ; R3\_w=scalar()
  4: (47) r3 \|= 32767                   ; R3\_w=scalar(smin=-9223372036854743041,umin=32767,var\_off=(0x7fff; 0xffffffffffff8000),s32\_min=-2147450881)
  5: (75) if r3 s\>= 0x0 goto pc+1       ; R3\_w=scalar(umin=9223372036854808575,var\_off=(0x8000000000007fff; 0x7fffffffffff8000),s32\_min=-2147450881,u32\_min=32767)
  6: (95) exit

  from 5 to 7: R0=scalar(imm=1,umin=1,umax=1,var\_off=(0x1; 0x0)) R1=ctx(off=0,imm=0,umax=0,var\_off=(0x0; 0x0)) R3=scalar(umin=32767,umax=9223372036854775807,var\_off=(0x7fff; 0x7fffffffffff8000),s32\_min=-2147450881) R10=fp(off=0,imm=0,umax=0,var\_off=(0x0; 0x0))
  7: (d5) if r3 s\<= 0x8000 goto pc+1    ; R3=scalar(umin=32769,umax=9223372036854775807,var\_off=(0x7fff; 0x7fffffffffff8000),s32\_min=-2147450881,u32\_min=32767)
  8: (95) exit

  from 7 to 9: R0=scalar(imm=1,umin=1,umax=1,var\_off=(0x1; 0x0)) R1=ctx(off=0,imm=0,umax=0,var\_off=(0x0; 0x0)) R3=scalar(umin=32767,umax=32768,var\_off=(0x7fff; 0x8000)) R10=fp(off=0,imm=0,umax=0,var\_off=(0x0; 0x0))
  9: (07) r3 += -32767                  ; R3\_w=scalar(imm=0,umax=1,var\_off=(0x0; 0x0))  \<--- \[\*\]
  10: (95) exit

What can be seen here is that R3=scalar(umin=32767,umax=32768,var\_off=(0x7fff;
0x8000)) after the operation R3 += -32767 results in a 'malformed' constant, that
is, R3\_w=scalar(imm=0,umax=1,var\_off=(0x0; 0x0)). Intersecting with var\_off has
not been done at that point via \_\_update\_reg\_bounds(), which would have improved
the umax to be equal to umin.

Refactor the tnum \<\> min/max bounds information flow into a reg\_bounds\_sync()
helper and use it consistently everywhere. After the fix, bounds have been
corrected to R3\_w=scalar(imm=0,umax=0,var\_off=(0x0; 0x0)) and thus the register
is regarded as a 'proper' constant scalar of 0.

After:

  func\#0 @0
  0: R1=ctx(off=0,imm=0,umax=0,var\_off=(0x0; 0x0)) R10=fp(off=0,imm=0,umax=0,var\_off=(0x0; 0x0))
  0: (b7) r0 = 1                        ; R0\_w=scalar(imm=1,umin=1,umax=1,var\_off=(0x1; 0x0))
  1: (b7) r3 = 0                        ; R3\_w=scalar(imm=0,umax=0,var\_off=(0x0; 0x0))
  2: (87) r3 = -r3                      ; R3\_w=scalar()
  3: (87) r3 = -r3                      ; R3\_w=scalar()
  4: (47) r3 \|= 32767                   ; R3\_w=scalar(smin=-9223372036854743041,umin=32767,var\_off=(0x7fff; 0xffffffffffff8000),s32\_min=-2147450881)
  5: (75) if r3 s\>= 0x0 goto pc+1       ; R3\_w=scalar(umin=9223372036854808575,var\_off=(0x8000000000007fff; 0x7fffffffffff8000),s32\_min=-2147450881,u32\_min=32767)
  6: (95) exit

  from 5 to 7: R0=scalar(imm=1,umin=1,umax=1,var\_off=(0x1; 0x0)) R1=ctx(off=0,imm=0,umax=0,var\_off=(0x0; 0x0)) R3=scalar(umin=32767,umax=9223372036854775807,var\_off=(0x7fff; 0x7fffffffffff8000),s32\_min=-2147450881) R10=fp(off=0,imm=0,umax=0,var\_off=(0x0; 0x0))
  7: (d5) if r3 s\<= 0x8000 goto pc+1    ; R3=scalar(umin=32769,umax=9223372036854775807,var\_off=(0x7fff; 0x7fffffffffff8000),s32\_min=-2147450881,u32\_min=32767)
  8: (95) exit

  from 7 to 9: R0=scalar(imm=1,umin=1,umax=1,var\_off=(0x1; 0x0)) R1=ctx(off=0,imm=0,umax=0,var\_off=(0x0; 0x0)) R3=scalar(umin=32767,umax=32768,var\_off=(0x7fff; 0x8000)) R10=fp(off=0
---truncated---

## Affected and fixed versions

- Linux: \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< e917be1f83ea14a68b3cf64d3da9968eaf991dae; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< a7de8d436db92bab8b1f44624297c2554a6ac36b; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< b2a28bb36664c94375926cbbb91976242847699d; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< 3844d153a41adea718202c10ae91dc96b37453b5 (cvelist)
- Linux: 4.14 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2022-49658.md
Affected: Linux >= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, < e917be1f83ea14a68b3cf64d3da9968eaf991dae; >= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, < a7de8d436db92bab8b1f44624297c2554a6ac36b; >= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, < b2a28bb36664c94375926cbbb91976242847699d; >= b03c9f9fdc37dab81ea04d5…
Fixed in: Linux 3844d153a41adea718202c10ae91dc96b37453b5

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

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

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

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

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

Linux \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< e917be1f83ea14a68b3cf64d3da9968eaf991dae; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< a7de8d436db92bab8b1f44624297c2554a6ac36b; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< b2a28bb36664c94375926cbbb91976242847699d; \>= b03c9f9fdc37dab81ea04d5dacdc5995d4c224c2, \< 3844d153a41adea718202c10ae91dc96b37453b5; Linux 4.14.

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

Yes. Fixed in Linux 3844d153a41adea718202c10ae91dc96b37453b5. Upgrade Linux to 3844d153a41adea718202c10ae91dc96b37453b5 or later.

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

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/e917be1f83ea14a68b3cf64d3da9968eaf991dae>
- patch: <https://git.kernel.org/stable/c/a7de8d436db92bab8b1f44624297c2554a6ac36b>
- patch: <https://git.kernel.org/stable/c/b2a28bb36664c94375926cbbb91976242847699d>
- patch: <https://git.kernel.org/stable/c/3844d153a41adea718202c10ae91dc96b37453b5>

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

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