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 3DB1C1F63F2 for ; Fri, 27 Dec 2024 15:03:44 +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=1735311824; cv=none; b=rBnstfmLAOwm8vxpfgDhIVG6LM0ybfDUftKLh8CpzlhrPV39AYftGwmLKrIKadgmJEkalBe4JFK9hHewEa46eDvdsCr7NB5X4g9lOS5Mv2SfJX4DCeDaRjvovZmY4DbOkVrOAf4kDFpRxuxlHkxgx+u+kEq8jBANaaQ3QMJ3c+I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1735311824; c=relaxed/simple; bh=n9lGH1ozS2Sbccqpn/vqK6D/H4dcaLOvFJ3jFx4EEK4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=axH/VmwuhyTDd+0fXJAI724lQeBsm1ZLnkCd/2Aq4jROiNxxSF4uMOKkPhaJreH7WJZ9Rn7fOG+5wlCw8gea3j7rbx0Ms8fFwcITfLNKfxRkiP/oMHZP2UFNpCfKHyZkV4y0PatuZspnY7JMJyEUy7J2z14jOSYkdQbLPl0i1W0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=u/vAgA+g; 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="u/vAgA+g" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1F03C4CED0; Fri, 27 Dec 2024 15:03:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1735311824; bh=n9lGH1ozS2Sbccqpn/vqK6D/H4dcaLOvFJ3jFx4EEK4=; h=From:To:Cc:Subject:Date:Reply-to:From; b=u/vAgA+g1WrkpuG/GcyTV+UgZ8cdj4wyf0wpIGNdrL/mWFChhaUn/LU+utYRvHE/y ACHQcr9789cLQby4+GAHTkx68XPHc5hcTWsHbDiGgseJenqusc9dYWpw0+wxRaPdL8 5dE24qLIPML3g1u5Abixxik9jQcptVpCa+Q+2cis= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-56638: netfilter: nft_inner: incorrect percpu area handling under softirq Date: Fri, 27 Dec 2024 16:02:39 +0100 Message-ID: <2024122735-CVE-2024-56638-3a3d@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=2913; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=n9lGH1ozS2Sbccqpn/vqK6D/H4dcaLOvFJ3jFx4EEK4=; b=owGbwMvMwCRo6H6F97bub03G02pJDOl5B7vb7Tgakx75Ppy5Yndr9Qfn0nOBt0uXXOPwbcjeo 7hZO2lSRywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAEykVZBhwXWNCg1Zdolmfo2U zsz7u+88/mXjzrBgTfaLHH/3++GtqT//Fl3pY6+SzpQFAA== 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: netfilter: nft_inner: incorrect percpu area handling under softirq Softirq can interrupt ongoing packet from process context that is walking over the percpu area that contains inner header offsets. Disable bh and perform three checks before restoring the percpu inner header offsets to validate that the percpu area is valid for this skbuff: 1) If the NFT_PKTINFO_INNER_FULL flag is set on, then this skbuff has already been parsed before for inner header fetching to register. 2) Validate that the percpu area refers to this skbuff using the skbuff pointer as a cookie. If there is a cookie mismatch, then this skbuff needs to be parsed again. 3) Finally, validate if the percpu area refers to this tunnel type. Only after these three checks the percpu area is restored to a on-stack copy and bh is enabled again. After inner header fetching, the on-stack copy is stored back to the percpu area. The Linux kernel CVE team has assigned CVE-2024-56638 to this issue. Affected and fixed versions =========================== Issue introduced in 6.2 with commit 3a07327d10a09379315c844c63f27941f5081e0a and fixed in 6.6.66 with commit 53c7314208c865086d78b4e88da53bc33da0b603 Issue introduced in 6.2 with commit 3a07327d10a09379315c844c63f27941f5081e0a and fixed in 6.12.5 with commit da5cc778e7bf78fe525bc90ec2043f41415c31d9 Issue introduced in 6.2 with commit 3a07327d10a09379315c844c63f27941f5081e0a and fixed in 6.13-rc2 with commit 7b1d83da254be3bf054965c8f3b1ad976f460ae5 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-56638 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/netfilter/nf_tables_core.h net/netfilter/nft_inner.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/53c7314208c865086d78b4e88da53bc33da0b603 https://git.kernel.org/stable/c/da5cc778e7bf78fe525bc90ec2043f41415c31d9 https://git.kernel.org/stable/c/7b1d83da254be3bf054965c8f3b1ad976f460ae5