Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 898971F4727 for ; Fri, 27 Dec 2024 14:59:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311595; cv=none; b=Ths7Unr9+Z0VRi4UpQMg4yMGaHJa+1VuUmhs264SNfGnPKRoEcvT98fVaV+4rIPN9aEWC8rGew5rSQQtOphsytaTAs5FAHVfuCuoEmAQXRYCivaqTiVygpo4ohq5BAzVPRjlitXEzkjNDh4gJUAitvLLIcOSwBeqHbR8EyJGh/I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311595; c=relaxed/simple; bh=iVIYgKnH54vb9HMSCKJHehQDyaDKexqrdjwO6QSZ6+w=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DQJw/lNZ5LaooY47aaqu18Lhd+Be1ExQfWU4yaD/Ffv0eCC1GQxy9R+aPLFhEDmUTrkN/z6vhnOTm+Yth0BENBtP8S6Dwd60/WlzfCKRGgMoSLPlFTsZ4qpHJx501SSvzG5E4XTzuYHiGAO9tkZVZYDSQvppWPl2PGoRA7h9jps= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=agZ74Cl1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="agZ74Cl1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FEF4C4CED0; Fri, 27 Dec 2024 14:59:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311595; bh=iVIYgKnH54vb9HMSCKJHehQDyaDKexqrdjwO6QSZ6+w=; h=From:To:Cc:Subject:Date:Reply-to:From; b=agZ74Cl1GGDngShkeHvuMM8ue52ZbLRVi8T7NbWB/I7MDJhHjiE7oS7UoVltau9xn OP0TPmcWdWwkqKp7Ws8mDaQV9+DvtBTF8a94eFy0AdjBTTMogBYWU8XZE/Ya+BG5zc YvZhkTmC3AdZ5/dvh/bctTirMrenoyNwT7SPUmBk= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56606: af_packet: avoid erroring out after sock_init_data() in packet_create() Date: Fri, 27 Dec 2024 15:51:13 +0100 Message-ID: <2024122704-CVE-2024-56606-bf3b@gregkh> X-Mailer: git-send-email 2.47.1 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=2618; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=iVIYgKnH54vb9HMSCKJHehQDyaDKexqrdjwO6QSZ6+w=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5+24+uPHywSKLoiN2nQ0BHQXJ3Ce5l0Uypbx17Zpw6 CbT6R1yHTEsDIJMDLJiiixftvEc3V9xSNHL0PY0zBxWJpAhDFycAjARWS2GGTdjZe5MvtD/w2PB tMS5y8QCGCeIMCzYueEaQ8Skv06CLruizfl7d/CnXv0EAA== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit 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-rc1 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