CVE-2022-49393

In the Linux kernel, the following vulnerability has been resolved: misc: fastrpc: fix list iterator in fastrpc_req_mem_unmap_impl This is another instance of incorrect use of list iterator and checking it for NULL. The list iterator value 'map' will *always* be set and non-NULL by list_for_each_entry(), so it is incorrect to assume that the iterator value will be NULL if the list is empty (in this case, the check 'if (!map) {' will always be false and never exit as expected). To fix the bug, use a new variable 'iter' as the list iterator, while use the original variable 'map' as a dedicated pointer to point to the found element. Without this patch, Kernel crashes with below trace: Unable to handle kernel access to user memory outside uaccess routines at virtual address 0000ffff7fb03750 ... Call trace: fastrpc_map_create+0x70/0x290 [fastrpc] fastrpc_req_mem_map+0xf0/0x2dc [fastrpc] fastrpc_device_ioctl+0x138/0xc60 [fastrpc] __arm64_sys_ioctl+0xa8/0xec invoke_syscall+0x48/0x114 el0_svc_common.constprop.0+0xd4/0xfc do_el0_svc+0x28/0x90 el0_svc+0x3c/0x130 el0t_64_sync_handler+0xa4/0x130 el0t_64_sync+0x18c/0x190 Code: 14000016 f94000a5 eb05029f 54000260 (b94018a6) ---[ end trace 0000000000000000 ]---
Configurations

Configuration 1 (hide)

cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

22 Sep 2025, 19:46

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/2d12905aad462383f4e7a5fdb024d2b7ae2d10cf - () https://git.kernel.org/stable/c/2d12905aad462383f4e7a5fdb024d2b7ae2d10cf - Patch
References () https://git.kernel.org/stable/c/c5c07c5958cf0c9af6e76813e6de15d42ee49822 - () https://git.kernel.org/stable/c/c5c07c5958cf0c9af6e76813e6de15d42ee49822 - Patch
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CWE CWE-670
First Time Linux linux Kernel
Linux
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 5.5
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: misc: fastrpc: fix list iterator in fastrpc_req_mem_unmap_impl Este es otro ejemplo de uso incorrecto del iterador de lista y verificación de NULL. El valor del iterador de lista 'map' *siempre* se establecerá y no será NULL por list_for_each_entry(), por lo que es incorrecto asumir que el valor del iterador será NULL si la lista está vacía (en este caso, la verificación 'if (!map) {' siempre será falsa y nunca saldrá como se esperaba). Para corregir el error, use una nueva variable 'iter' como iterador de lista, mientras usa la variable original 'map' como un puntero dedicado para apuntar al elemento encontrado. Sin este parche, el kernel se bloquea con el siguiente seguimiento: No se puede gestionar el acceso del kernel a la memoria del usuario fuera de las rutinas uaccess en la dirección virtual 0000ffff7fb03750 ... Call trace: fastrpc_map_create+0x70/0x290 [fastrpc] fastrpc_req_mem_map+0xf0/0x2dc [fastrpc] fastrpc_device_ioctl+0x138/0xc60 [fastrpc] __arm64_sys_ioctl+0xa8/0xec invoke_syscall+0x48/0x114 el0_svc_common.constprop.0+0xd4/0xfc do_el0_svc+0x28/0x90 el0_svc+0x3c/0x130 el0t_64_sync_handler+0xa4/0x130 el0t_64_sync+0x18c/0x190 Code: 14000016 f94000a5 eb05029f 54000260 (b94018a6) ---[ end trace 0000000000000000 ]---

26 Feb 2025, 07:01

Type Values Removed Values Added
New CVE

Information

Published : 2025-02-26 07:01

Updated : 2025-09-22 19:46


NVD link : CVE-2022-49393

Mitre link : CVE-2022-49393

CVE.ORG link : CVE-2022-49393


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-670

Always-Incorrect Control Flow Implementation