CVE-2022-49873

Severity CVSS v4.0:
Pending analysis
Type:
CWE-704 Incorrect Type Conversion or Cast
Publication date:
01/05/2025
Last modified:
01/10/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> bpf: Fix wrong reg type conversion in release_reference()<br /> <br /> Some helper functions will allocate memory. To avoid memory leaks, the<br /> verifier requires the eBPF program to release these memories by calling<br /> the corresponding helper functions.<br /> <br /> When a resource is released, all pointer registers corresponding to the<br /> resource should be invalidated. The verifier use release_references() to<br /> do this job, by apply __mark_reg_unknown() to each relevant register.<br /> <br /> It will give these registers the type of SCALAR_VALUE. A register that<br /> will contain a pointer value at runtime, but of type SCALAR_VALUE, which<br /> may allow the unprivileged user to get a kernel pointer by storing this<br /> register into a map.<br /> <br /> Using __mark_reg_not_init() while NOT allow_ptr_leaks can mitigate this<br /> problem.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 4.20 (including) 5.10.155 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.11 (including) 5.15.79 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 5.16 (including) 6.0.9 (excluding)
cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:*