| 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-49455: misc: ocxl: fix possible double free in ocxl_file_register_afu |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| misc: ocxl: fix possible double free in ocxl_file_register_afu |
| |
| info_release() will be called in device_unregister() when info->dev's |
| reference count is 0. So there is no need to call ocxl_afu_put() and |
| kfree() again. |
| |
| Fix this by adding free_minor() and return to err_unregister error path. |
| |
| The Linux kernel CVE team has assigned CVE-2022-49455 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.4.198 with commit de65c32ace9aa70d51facc61ba986607075e3a25 |
| Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.10.121 with commit ee89d8dee55ab4b3b8ad8b70866b2841ba334767 |
| Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.15.46 with commit 8fb674216835e1f0c143762696d645facebb4685 |
| Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.17.14 with commit 252768d32e92c1214aeebb5fec0844ca479bcf5c |
| Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.18.3 with commit 9e9087cf34ee69f4e95d146ac29385d6e367a97b |
| Issue introduced in 5.2 with commit 75ca758adbafc81804c39b2c200ecdc819a6c042 and fixed in 5.19 with commit 950cf957fe34d40d63dfa3bf3968210430b6491e |
| |
| 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-49455 |
| 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/ocxl/file.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/de65c32ace9aa70d51facc61ba986607075e3a25 |
| https://git.kernel.org/stable/c/ee89d8dee55ab4b3b8ad8b70866b2841ba334767 |
| https://git.kernel.org/stable/c/8fb674216835e1f0c143762696d645facebb4685 |
| https://git.kernel.org/stable/c/252768d32e92c1214aeebb5fec0844ca479bcf5c |
| https://git.kernel.org/stable/c/9e9087cf34ee69f4e95d146ac29385d6e367a97b |
| https://git.kernel.org/stable/c/950cf957fe34d40d63dfa3bf3968210430b6491e |