Vulnerability · Published May 1, 2025 · Assigned by Linux
CVE-2022-49873bpf: Fix wrong reg type conversion in release_reference()
Medium 5.5
In plain English
A medium-severity security flaw in Linux from Linux. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
In the Linux kernel, the following vulnerability has been resolved: bpf: Fix wrong reg type conversion in release_reference() Some helper functions will allocate memory. To avoid memory leaks, the verifier requires the eBPF program to release these memories by calling the corresponding helper functions. When a resource is released, all pointer registers corresponding to the resource should be invalidated. The verifier use release_references() to do this job, by apply __mark_reg_unknown() to each relevant register. It will give these registers the type of SCALAR_VALUE. A register that will contain a pointer value at runtime, but of type SCALAR_VALUE, which may allow the unprivileged user to get a kernel pointer by storing this register into a map. Using __mark_reg_not_init() while NOT allow_ptr_leaks can mitigate this problem.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | linux | 6.0.10-1 | DEBIAN-CVE-2022-49873 |
| Debian:13 | linux | 6.0.10-1 | DEBIAN-CVE-2022-49873 |
| Debian:14 | linux | 6.0.10-1 | DEBIAN-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux | 5.15.0-67.74 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-allwinner-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-aws | 5.15.0-1031.35 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-aws-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-aws-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-aws-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure | 5.15.0-1034.41 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure-fde | 5.15.0-1034.41.1 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure-fde-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-azure-fde-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-gcp | 5.15.0-1030.37 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-gcp-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-gcp-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-gcp-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-gke | 5.15.0-1028.33 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-gkeop | 5.15.0-1016.21 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-ibm | 5.15.0-1026.29 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-intel-iotg | 5.15.0-1026.31 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-kvm | 5.15.0-1029.34 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-lowlatency | 5.15.0-67.74 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-lowlatency-hwe-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-nvidia | 5.15.0-1023.23 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-nvidia-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-nvidia-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-oem-5.17 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-oem-6.0 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-oem-6.1 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-oem-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-oracle | 5.15.0-1030.36 | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-oracle-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-raspi | 5.15.0-1025.27 | UBUNTU-CVE-2022-49873 |
| Ubuntu:24.04:LTS | linux-raspi-realtime | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:24.04:LTS | linux-realtime | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-riscv | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-riscv-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-riscv-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-starfive-5.19 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-starfive-6.2 | no fix listed | UBUNTU-CVE-2022-49873 |
| Ubuntu:22.04:LTS | linux-starfive-6.5 | no fix listed | UBUNTU-CVE-2022-49873 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | fd978bf7fd312581a7ca454a991f0ffb34c4204b – before cedd4f01f67be94735f15123158f485028571037fd978bf7fd312581a7ca454a991f0ffb34c4204b – before 466ce46f251dfb259a8cbaa895ab9edd6fb56240fd978bf7fd312581a7ca454a991f0ffb34c4204b – before ae5ccad6c711db0f2ca1231be051935dd128b8f5fd978bf7fd312581a7ca454a991f0ffb34c4204b – before f1db20814af532f85e091231223e5e4818e8464b |
| Linux | Linux | 4.20 |
Weakness: CWE-704 · Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H