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 EF0B56CDBA for ; Thu, 21 Nov 2024 18:17:29 +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=1732213050; cv=none; b=WSRjuzj1GfOiYGVFW6jaOTe+kvZS+wcLMR60FQBkmk4oNHja/dmM1buz3ExrGxoGvQ9cP/jGuAO/BmKPig3UQ39Gdp7L6BuxZON7JJKfGPatPK0DuCoyiMMu8l2hSSTQQMznCakGIWVB0MiZrRyBgdn8IgVqBhJ+U0Oh4pRR6yo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732213050; c=relaxed/simple; bh=cLJzkiy2wH7dHiQw/pFTSpPfpVU2/Is9pa1OzpklMxI=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=V8wyXBtqSmkkt+W8jkhEM+BtJBLUsG6UGAC6vnsFN5enSwAxedxNUlb0tLnqW7q0blOqDMkldqlsDYMqxK2Gm9aQrJIq91xDgyQ42qR20n6fmPVjkuVVrwYWvgMV3HhJ1FYG5adEJO6DWFiUAcWp/Sk7Na41dJRu2g7IhCFIWC4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=by2jqN23; 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="by2jqN23" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94C82C4CECC; Thu, 21 Nov 2024 18:17:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1732213049; bh=cLJzkiy2wH7dHiQw/pFTSpPfpVU2/Is9pa1OzpklMxI=; h=From:To:Cc:Subject:Date:Reply-to:From; b=by2jqN232/ZTasX0mwfcX9C37GtQDYCx1IfvqFDbPmThPSrE3iIUHJF6q8NfzXtWW 2SIV5iYloGmCVHPZ5swIZKqNXo3LLeQO5m5UeyDbgIuJ00jVhjPF+MXW2SaycBUofY CWX4JP1CXLyvUBxjSKRJ0XTzeLHzP/n2AfhX6AC4= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-53091: bpf: Add sk_is_inet and IS_ICSK check in tls_sw_has_ctx_tx/rx Date: Thu, 21 Nov 2024 19:16:52 +0100 Message-ID: <2024112151-CVE-2024-53091-7f61@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=2833; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=cLJzkiy2wH7dHiQw/pFTSpPfpVU2/Is9pa1OzpklMxI=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn2lcIs/hrmd9cenOdof13ecplaCnegsd0HHYvk+q3lc uHvahd2xLIwCDIxyIopsnzZxnN0f8UhRS9D29Mwc1iZQIYwcHEKwER4hRhmMi69fGo+o8B3pn9c Xm/0Ps5gF1tjxDBPbfcbpZzjU4VEg1acPfzn8IvPyeFPAQ== 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: bpf: Add sk_is_inet and IS_ICSK check in tls_sw_has_ctx_tx/rx As the introduction of the support for vsock and unix sockets in sockmap, tls_sw_has_ctx_tx/rx cannot presume the socket passed in must be IS_ICSK. vsock and af_unix sockets have vsock_sock and unix_sock instead of inet_connection_sock. For these sockets, tls_get_ctx may return an invalid pointer and cause page fault in function tls_sw_ctx_rx. BUG: unable to handle page fault for address: 0000000000040030 Workqueue: vsock-loopback vsock_loopback_work RIP: 0010:sk_psock_strp_data_ready+0x23/0x60 Call Trace: ? __die+0x81/0xc3 ? no_context+0x194/0x350 ? do_page_fault+0x30/0x110 ? async_page_fault+0x3e/0x50 ? sk_psock_strp_data_ready+0x23/0x60 virtio_transport_recv_pkt+0x750/0x800 ? update_load_avg+0x7e/0x620 vsock_loopback_work+0xd0/0x100 process_one_work+0x1a7/0x360 worker_thread+0x30/0x390 ? create_worker+0x1a0/0x1a0 kthread+0x112/0x130 ? __kthread_cancel_work+0x40/0x40 ret_from_fork+0x1f/0x40 v2: - Add IS_ICSK check v3: - Update the commits in Fixes The Linux kernel CVE team has assigned CVE-2024-53091 to this issue. Affected and fixed versions =========================== Issue introduced in 5.15 with commit 94531cfcbe79 and fixed in 6.6.62 with commit a078a480ff3f Issue introduced in 5.15 with commit 94531cfcbe79 and fixed in 6.11.9 with commit 6781cfa93a6a Issue introduced in 5.15 with commit 94531cfcbe79 and fixed in 6.12 with commit 44d0469f79bd 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-53091 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: include/net/tls.h 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/a078a480ff3f43d74d8a024ae10c3c7daf6db149 https://git.kernel.org/stable/c/6781cfa93a6a1b7f5be6819a5a2dd8f30f47ca26 https://git.kernel.org/stable/c/44d0469f79bd3d0b3433732877358df7dc6b17b1