[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025022649-CVE-2022-49393-dd81@gregkh>
Date: Wed, 26 Feb 2025 03:11:07 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-cve-announce@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: CVE-2022-49393: misc: fastrpc: fix list iterator in fastrpc_req_mem_unmap_impl
Description
===========
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 ]---
The Linux kernel CVE team has assigned CVE-2022-49393 to this issue.
Affected and fixed versions
===========================
Issue introduced in 5.18 with commit 5c1b97c7d7b736e6439af4f43a65837bc72f56c1 and fixed in 5.18.3 with commit 2d12905aad462383f4e7a5fdb024d2b7ae2d10cf
Issue introduced in 5.18 with commit 5c1b97c7d7b736e6439af4f43a65837bc72f56c1 and fixed in 5.19 with commit c5c07c5958cf0c9af6e76813e6de15d42ee49822
Please see https://www.kernel.org for a full list of currently supported
kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to
older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2022-49393
will be updated if fixes are backported, please check that for the most
up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/misc/fastrpc.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest
stable kernel version for this, and many other bugfixes. Individual
changes are never tested alone, but rather are part of a larger kernel
release. Cherry-picking individual commits is not recommended or
supported by the Linux kernel community at all. If however, updating to
the latest release is impossible, the individual changes to resolve this
issue can be found at these commits:
https://git.kernel.org/stable/c/2d12905aad462383f4e7a5fdb024d2b7ae2d10cf
https://git.kernel.org/stable/c/c5c07c5958cf0c9af6e76813e6de15d42ee49822
Powered by blists - more mailing lists