| From bippy-5f407fcff5a0 Mon Sep 17 00:00:00 2001 |
| From: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
| To: <linux-cve-announce@vger.kernel.org> |
| Reply-to: <cve@kernel.org>, <linux-kernel@vger.kernel.org> |
| Subject: CVE-2022-49284: coresight: syscfg: Fix memleak on registration failure in cscfg_create_device |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| coresight: syscfg: Fix memleak on registration failure in cscfg_create_device |
| |
| device_register() calls device_initialize(), |
| according to doc of device_initialize: |
| |
| Use put_device() to give up your reference instead of freeing |
| * @dev directly once you have called this function. |
| |
| To prevent potential memleak, use put_device() for error handling. |
| |
| The Linux kernel CVE team has assigned CVE-2022-49284 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.15 with commit 85e2414c518a03a21dddd4bc88fec2723c5e1197 and fixed in 5.15.33 with commit c61e2fc87f24cae4701f352fe9ecd4c5c143106c |
| Issue introduced in 5.15 with commit 85e2414c518a03a21dddd4bc88fec2723c5e1197 and fixed in 5.16.19 with commit a529af1f5a5c096f3e18f0d5a32cfcc3d82df1ec |
| Issue introduced in 5.15 with commit 85e2414c518a03a21dddd4bc88fec2723c5e1197 and fixed in 5.17.2 with commit 412225b32986d5b11c3c1ad9234c50a3f5c52c76 |
| Issue introduced in 5.15 with commit 85e2414c518a03a21dddd4bc88fec2723c5e1197 and fixed in 5.18 with commit cfa5dbcdd7aece76f3415284569f2f384aff0253 |
| |
| 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-49284 |
| 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/hwtracing/coresight/coresight-syscfg.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/c61e2fc87f24cae4701f352fe9ecd4c5c143106c |
| https://git.kernel.org/stable/c/a529af1f5a5c096f3e18f0d5a32cfcc3d82df1ec |
| https://git.kernel.org/stable/c/412225b32986d5b11c3c1ad9234c50a3f5c52c76 |
| https://git.kernel.org/stable/c/cfa5dbcdd7aece76f3415284569f2f384aff0253 |