| 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-48768: tracing/histogram: Fix a potential memory leak for kstrdup() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| tracing/histogram: Fix a potential memory leak for kstrdup() |
| |
| kfree() is missing on an error path to free the memory allocated by |
| kstrdup(): |
| |
| p = param = kstrdup(data->params[i], GFP_KERNEL); |
| |
| So it is better to free it via kfree(p). |
| |
| The Linux kernel CVE team has assigned CVE-2022-48768 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Issue introduced in 5.4.19 with commit 38b67e60b6b582e81f9db1b2e7176cbbfbd3e574 and fixed in 5.4.176 with commit 8a8878ebb596281f50fc0b9a6e1f23f0d7f154e8 |
| Issue introduced in 5.6 with commit d380dcde9a07ca5de4805dee11f58a98ec0ad6ff and fixed in 5.10.96 with commit d71b06aa995007eafd247626d0669b9364c42ad7 |
| Issue introduced in 5.6 with commit d380dcde9a07ca5de4805dee11f58a98ec0ad6ff and fixed in 5.15.19 with commit e33fa4a46ee22de88a700e2e3d033da8214a5175 |
| Issue introduced in 5.6 with commit d380dcde9a07ca5de4805dee11f58a98ec0ad6ff and fixed in 5.16.5 with commit df86e2fe808c3536a9dba353cc2bebdfea00d0cf |
| Issue introduced in 5.6 with commit d380dcde9a07ca5de4805dee11f58a98ec0ad6ff and fixed in 5.17 with commit e629e7b525a179e29d53463d992bdee759c950fb |
| Issue introduced in 5.5.6 with commit c78a2baf5e1fe1b38121d6b54bab77ccb81a1a86 |
| |
| 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-48768 |
| 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: |
| kernel/trace/trace_events_hist.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/8a8878ebb596281f50fc0b9a6e1f23f0d7f154e8 |
| https://git.kernel.org/stable/c/d71b06aa995007eafd247626d0669b9364c42ad7 |
| https://git.kernel.org/stable/c/e33fa4a46ee22de88a700e2e3d033da8214a5175 |
| https://git.kernel.org/stable/c/df86e2fe808c3536a9dba353cc2bebdfea00d0cf |
| https://git.kernel.org/stable/c/e629e7b525a179e29d53463d992bdee759c950fb |