CVE-2022-49873

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.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
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:*:*:*:*:*:*

History

07 May 2025, 13:21

Type Values Removed Values Added
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
CPE cpe:2.3:o:linux:linux_kernel:6.1:rc4:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc2:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc1:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:6.1:rc3:*:*:*:*:*:*
CWE CWE-704
References () https://git.kernel.org/stable/c/466ce46f251dfb259a8cbaa895ab9edd6fb56240 - () https://git.kernel.org/stable/c/466ce46f251dfb259a8cbaa895ab9edd6fb56240 - Patch
References () https://git.kernel.org/stable/c/ae5ccad6c711db0f2ca1231be051935dd128b8f5 - () https://git.kernel.org/stable/c/ae5ccad6c711db0f2ca1231be051935dd128b8f5 - Patch
References () https://git.kernel.org/stable/c/cedd4f01f67be94735f15123158f485028571037 - () https://git.kernel.org/stable/c/cedd4f01f67be94735f15123158f485028571037 - Patch
References () https://git.kernel.org/stable/c/f1db20814af532f85e091231223e5e4818e8464b - () https://git.kernel.org/stable/c/f1db20814af532f85e091231223e5e4818e8464b - Patch
First Time Linux linux Kernel
Linux

02 May 2025, 13:52

Type Values Removed Values Added
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: bpf: Arreglar conversión de tipo de registro incorrecta en release_reference() Algunas funciones auxiliares asignarán memoria. Para evitar fugas de memoria, el verificador requiere que el programa eBPF libere estas memorias llamando a las funciones auxiliares correspondientes. Cuando se libera un recurso, todos los registros de puntero correspondientes al recurso deben invalidarse. El verificador usa release_references() para realizar este trabajo, aplicando __mark_reg_unknown() a cada registro relevante. Les dará a estos registros el tipo SCALAR_VALUE. Un registro que contendrá un valor de puntero en tiempo de ejecución, pero de tipo SCALAR_VALUE, puede permitir que el usuario sin privilegios obtenga un puntero del kernel almacenando este registro en un mapa. Usar __mark_reg_not_init() mientras NO allow_ptr_leaks puede mitigar este problema.

01 May 2025, 15:16

Type Values Removed Values Added
New CVE

Information

Published : 2025-05-01 15:16

Updated : 2025-05-07 13:21


NVD link : CVE-2022-49873

Mitre link : CVE-2022-49873

CVE.ORG link : CVE-2022-49873


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-704

Incorrect Type Conversion or Cast