| 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-2024-56606: af_packet: avoid erroring out after sock_init_data() in packet_create() |
| |
| Description |
| =========== |
| |
| In the Linux kernel, the following vulnerability has been resolved: |
| |
| af_packet: avoid erroring out after sock_init_data() in packet_create() |
| |
| After sock_init_data() the allocated sk object is attached to the provided |
| sock object. On error, packet_create() frees the sk object leaving the |
| dangling pointer in the sock object on return. Some other code may try |
| to use this pointer and cause use-after-free. |
| |
| The Linux kernel CVE team has assigned CVE-2024-56606 to this issue. |
| |
| |
| Affected and fixed versions |
| =========================== |
| |
| Fixed in 5.4.287 with commit 71b22837a5e55ac27d6a14b9cdf2326587405c4f |
| Fixed in 5.10.231 with commit 1dc1e1db927056cb323296e2294a855cd003dfe7 |
| Fixed in 5.15.174 with commit 132e615bb1d7cdec2d3cfbdec2efa630e923fd21 |
| Fixed in 6.1.120 with commit a6cf750b737374454a4e03a5ed449a3eb0c96414 |
| Fixed in 6.6.66 with commit 157f08db94123e2ba56877dd0ac88908b13a5dd0 |
| Fixed in 6.12.5 with commit fd09880b16d33aa5a7420578e01cd79148fa9829 |
| Fixed in 6.13 with commit 46f2a11cb82b657fd15bab1c47821b635e03838b |
| |
| 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-2024-56606 |
| 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: |
| net/packet/af_packet.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/71b22837a5e55ac27d6a14b9cdf2326587405c4f |
| https://git.kernel.org/stable/c/1dc1e1db927056cb323296e2294a855cd003dfe7 |
| https://git.kernel.org/stable/c/132e615bb1d7cdec2d3cfbdec2efa630e923fd21 |
| https://git.kernel.org/stable/c/a6cf750b737374454a4e03a5ed449a3eb0c96414 |
| https://git.kernel.org/stable/c/157f08db94123e2ba56877dd0ac88908b13a5dd0 |
| https://git.kernel.org/stable/c/fd09880b16d33aa5a7420578e01cd79148fa9829 |
| https://git.kernel.org/stable/c/46f2a11cb82b657fd15bab1c47821b635e03838b |