From mboxrd@z Thu Jan 1 00:00:00 1970 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 3359E21ADA2 for ; Wed, 26 Feb 2025 02:24:58 +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=1740536698; cv=none; b=tL5EVnZBDrGxKGClCmgSjBDz1za8cL9sl1Bt2Ay8uKqV9wemCsF7ofEdzQQO+oDoHOwSnXB3pn6SBvRScpit/DwXxKjshnFUAMRg9Vlkh1FfQUai/7MvyFc2iyi/4i+4Va28PSMKMdcNhvrncZzFSzMNnhGWzSO9V3s0vjCzmLo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536698; c=relaxed/simple; bh=7oQ4HBPqG+8KGs6VBZ7HXr8FYqPFl9xBonaV4GZF3Uk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ILupbysQ98EDaEFRGUnteGrXdjMjhkuh9x1xPU/zqGWe+cdl/Ni4/BbiORS5CmfnfPH4k5Z9cz21Y6u8VLHTjkH4Ew1iM2Tk1lKq3lxQjCYGeiyDb5KAsVbIZqHNthk7AQdDkuSeMhfySJ5K53cglDJq94VHiE2jqDORey77xec= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=V3cP82dQ; 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="V3cP82dQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0783FC4CEDD; Wed, 26 Feb 2025 02:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536698; bh=7oQ4HBPqG+8KGs6VBZ7HXr8FYqPFl9xBonaV4GZF3Uk=; h=From:To:Cc:Subject:Date:Reply-to:From; b=V3cP82dQxsqSOjYGAjT93edZrhQp9M+sgMArODYWCIZhTrhAB2tXVaM3rVxChOGQ+ d0zqlx3Wt88O436WeQt24w0e+/5wjhirQwvzUvGSqeoVb1OFO41WS9j14LWz4aevHy HnuIu1MMD+zTdJcRqjIhFaz/lKe51TABXE6P67sw= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49664: tipc: move bc link creation back to tipc_node_create Date: Wed, 26 Feb 2025 03:23:47 +0100 Message-ID: <2025022622-CVE-2022-49664-d3af@gregkh> X-Mailer: git-send-email 2.48.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=3300; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=7oQ4HBPqG+8KGs6VBZ7HXr8FYqPFl9xBonaV4GZF3Uk=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qu5lHLkYYJbCvZffp3+q7KLE5Jg9qWUVGrq7/vbri No/26HeEcvCIMjEICumyPJlG8/R/RWHFL0MbU/DzGFlAhnCwMUpABPh38GwYPPRp9rN248olZ1p +f9yw4HFh+NmL2SYpxZa/lcr8+bGc0b22TrM0sWdEr+uAgA= 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: tipc: move bc link creation back to tipc_node_create Shuang Li reported a NULL pointer dereference crash: [] BUG: kernel NULL pointer dereference, address: 0000000000000068 [] RIP: 0010:tipc_link_is_up+0x5/0x10 [tipc] [] Call Trace: [] [] tipc_bcast_rcv+0xa2/0x190 [tipc] [] tipc_node_bc_rcv+0x8b/0x200 [tipc] [] tipc_rcv+0x3af/0x5b0 [tipc] [] tipc_udp_recv+0xc7/0x1e0 [tipc] It was caused by the 'l' passed into tipc_bcast_rcv() is NULL. When it creates a node in tipc_node_check_dest(), after inserting the new node into hashtable in tipc_node_create(), it creates the bc link. However, there is a gap between this insert and bc link creation, a bc packet may come in and get the node from the hashtable then try to dereference its bc link, which is NULL. This patch is to fix it by moving the bc link creation before inserting into the hashtable. Note that for a preliminary node becoming "real", the bc link creation should also be called before it's rehashed, as we don't create it for preliminary nodes. The Linux kernel CVE team has assigned CVE-2022-49664 to this issue. Affected and fixed versions =========================== Issue introduced in 5.5 with commit 4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4 and fixed in 5.10.129 with commit 456bc338871c4a52117dd5ef29cce3745456d248 Issue introduced in 5.5 with commit 4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4 and fixed in 5.15.53 with commit 35fcb2ba35b4d9b592b558c3bcc6e0d90e213588 Issue introduced in 5.5 with commit 4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4 and fixed in 5.18.10 with commit e52910e671f58c619e33dac476b11b35e2d3ab6f Issue introduced in 5.5 with commit 4cbf8ac2fe5a0846508fe02b95a5de1a90fa73f4 and fixed in 5.19 with commit cb8092d70a6f5f01ec1490fce4d35efed3ed996c Issue introduced in 5.4.287 with commit 0b8f0026bbd4df1688e1726026476e60762daf2a 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-49664 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/tipc/node.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/456bc338871c4a52117dd5ef29cce3745456d248 https://git.kernel.org/stable/c/35fcb2ba35b4d9b592b558c3bcc6e0d90e213588 https://git.kernel.org/stable/c/e52910e671f58c619e33dac476b11b35e2d3ab6f https://git.kernel.org/stable/c/cb8092d70a6f5f01ec1490fce4d35efed3ed996c