[<prev] [next>] [day] [month] [year] [list]
Message-ID: <2025032758-CVE-2022-49746-251b@gregkh>
Date: Thu, 27 Mar 2025 17:43:04 +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-49746: dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
If the function sdma_load_context() fails, the sdma_desc will be
freed, but the allocated desc->bd is forgot to be freed.
We already met the sdma_load_context() failure case and the log as
below:
[ 450.699064] imx-sdma 30bd0000.dma-controller: Timeout waiting for CH0 ready
...
In this case, the desc->bd will not be freed without this change.
The Linux kernel CVE team has assigned CVE-2022-49746 to this issue.
Affected and fixed versions
===========================
Fixed in 4.19.272 with commit 80ee99e52936b2c04cc37b17a14b2ae2f9d282ac
Fixed in 5.4.231 with commit dbe634ce824329d8f14079c3e9f8f11670894bec
Fixed in 5.10.167 with commit bd0050b7ffa87c7b260d563646af612f4112a778
Fixed in 5.15.92 with commit 43acd767bd90c5d4172ce7fee5d9007a9a08dea9
Fixed in 6.1.10 with commit ce4745a6b8016fae74c95dcd457d4ceef7d98af1
Fixed in 6.2 with commit 1417f59ac0b02130ee56c0c50794b9b257be3d17
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-49746
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/dma/imx-sdma.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/80ee99e52936b2c04cc37b17a14b2ae2f9d282ac
https://git.kernel.org/stable/c/dbe634ce824329d8f14079c3e9f8f11670894bec
https://git.kernel.org/stable/c/bd0050b7ffa87c7b260d563646af612f4112a778
https://git.kernel.org/stable/c/43acd767bd90c5d4172ce7fee5d9007a9a08dea9
https://git.kernel.org/stable/c/ce4745a6b8016fae74c95dcd457d4ceef7d98af1
https://git.kernel.org/stable/c/1417f59ac0b02130ee56c0c50794b9b257be3d17
Powered by blists - more mailing lists