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 7BA381FAC37 for ; Mon, 21 Oct 2024 20:13:22 +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=1729541602; cv=none; b=kLfeaLRAF+42+SmA7t3Abze367csxKf3B/9IoV7t3xfKNnvr2vWnS5g/9JG+1WeWQxQ3Ef2/o0wK+ID1D9IqgSG+9GMq/3JtJA9neb3G8p2THVSW17o+lEB7o3oCfUCq7ctMdeAqXiASBGTjVpnox1cdR4sIbQwKrAJoy9yZUzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729541602; c=relaxed/simple; bh=63fx4BIFTYZ9ggy/iDnPxUUq4JzFdrhsvS4XfrgKwzU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=o95DEvUnwhvAq9SmftKNkFg/U82NkCrFhbGlu4F0N7k+600iXXbTKWJDKJWYDJs7ek5GG3M3/6A+ft6GX4qE6g3Slacdd3yfh4347Z4y5bP40YrdS2/jGG7afRV28GLuTyDnDNdydVlIEJw8Sc3f4pzVNhfFVzwwXdIMbss5SIg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=wk1WNN4O; 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="wk1WNN4O" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 01D79C4CEC3; Mon, 21 Oct 2024 20:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1729541602; bh=63fx4BIFTYZ9ggy/iDnPxUUq4JzFdrhsvS4XfrgKwzU=; h=From:To:Cc:Subject:Date:Reply-to:From; b=wk1WNN4Or3ujkLmLEk6Y0OkXPOVY5YLkKoipUoYgFyf7e6Tr5o+q9vFyahCXsykDC G6IWDOSw/EKH7dxiEX1wzDD8OrQ+xU3bMu3ocItfRWyI6b1XRLSGder7VAPaVUZNwl OTqaae1/ZaSyVBECFDIo7bjO68QCFtvEqG9lRgN4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49017: tipc: re-fetch skb cb after tipc_msg_validate Date: Mon, 21 Oct 2024 22:06:49 +0200 Message-ID: <2024102153-CVE-2022-49017-ae90@gregkh> X-Mailer: git-send-email 2.47.0 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=2994; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=63fx4BIFTYZ9ggy/iDnPxUUq4JzFdrhsvS4XfrgKwzU=; b=owGbwMvMwCRo6H6F97bub03G02pJDOliWxTXd8yK+dOg2jdLKo7vLN8W7zubBKwbDpVdXjMrk pdpcVV3RywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExE6QbD/LLovj82vXNXZaUe 4BE+aPNvTpjdS4b5BXcXFpr81lzTofxd7/qifSbXa/g4AQ== 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: re-fetch skb cb after tipc_msg_validate As the call trace shows, the original skb was freed in tipc_msg_validate(), and dereferencing the old skb cb would cause an use-after-free crash. BUG: KASAN: use-after-free in tipc_crypto_rcv_complete+0x1835/0x2240 [tipc] Call Trace: tipc_crypto_rcv_complete+0x1835/0x2240 [tipc] tipc_crypto_rcv+0xd32/0x1ec0 [tipc] tipc_rcv+0x744/0x1150 [tipc] ... Allocated by task 47078: kmem_cache_alloc_node+0x158/0x4d0 __alloc_skb+0x1c1/0x270 tipc_buf_acquire+0x1e/0xe0 [tipc] tipc_msg_create+0x33/0x1c0 [tipc] tipc_link_build_proto_msg+0x38a/0x2100 [tipc] tipc_link_timeout+0x8b8/0xef0 [tipc] tipc_node_timeout+0x2a1/0x960 [tipc] call_timer_fn+0x2d/0x1c0 ... Freed by task 47078: tipc_msg_validate+0x7b/0x440 [tipc] tipc_crypto_rcv_complete+0x4b5/0x2240 [tipc] tipc_crypto_rcv+0xd32/0x1ec0 [tipc] tipc_rcv+0x744/0x1150 [tipc] This patch fixes it by re-fetching the skb cb from the new allocated skb after calling tipc_msg_validate(). The Linux kernel CVE team has assigned CVE-2022-49017 to this issue. Affected and fixed versions =========================== Issue introduced in 5.5 with commit fc1b6d6de220 and fixed in 5.10.158 with commit a1ba595e35aa Issue introduced in 5.5 with commit fc1b6d6de220 and fixed in 5.15.82 with commit 1daec0815655 Issue introduced in 5.5 with commit fc1b6d6de220 and fixed in 6.0.12 with commit e128190adb2e Issue introduced in 5.5 with commit fc1b6d6de220 and fixed in 6.1 with commit 3067bc61fcfe 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-49017 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/crypto.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/a1ba595e35aa3afbe417ff0af353afb9f65559c0 https://git.kernel.org/stable/c/1daec0815655e110c6f206c5e777a4af8168ff58 https://git.kernel.org/stable/c/e128190adb2edfd5042105b5d1ed4553f295f5ef https://git.kernel.org/stable/c/3067bc61fcfe3081bf4807ce65560f499e895e77