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 8AB99219EA5 for ; Wed, 26 Feb 2025 02:24:28 +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=1740536668; cv=none; b=moUQTL/hn2++ofdeVJfdbgs6s3qzHZU+1ARYfljLhJ9xTXnKCaDox9Ml2opvpmiaEIM521Qj1NIg9iEwFLl+I+gWbF4/IPiQPYzRcbxfyYQhEgrfIz6X/5RGJxaVx8ciGX48WsOC/YXdviHLPC8h7uLVuJ8eWAceH+vQDdXeeKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536668; c=relaxed/simple; bh=DiIQzLYaoGjNzI+0InqOWTbUOovCcs7VEWw7MX24VBc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=j8BP+FilapCc9w7AaPCJy5FgYqQGmWpe3YkJa6Fe/mnGywgYn3sbynh78WmqCAolwCoPoK1r1QBeLo/yppaLqaLCPDcY7mkMPCODHmlCdsN5iKsDmWiOz0gjc1QoLiS3L5ze07pblvegB1zNoi2V54laosGWrVu9dovWUmvDpYk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=bt4L9DWc; 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="bt4L9DWc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 59672C4CEDD; Wed, 26 Feb 2025 02:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536668; bh=DiIQzLYaoGjNzI+0InqOWTbUOovCcs7VEWw7MX24VBc=; h=From:To:Cc:Subject:Date:Reply-to:From; b=bt4L9DWcnOzSapX76SBdukjDCR/YwHRi2uua/8N04dSk+aj9cq3WrXzj+ldFIHcKW yN72FOTDLvsylNGOONWkaMU+zabD63AS9w2f4h2X1o4sdQdwR0jO9rE2dQmCrXzvcj pKgm3rTMjG/FyQ+OuaOHmTlJV4HLuAxu4YJUlHuY= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49622: netfilter: nf_tables: avoid skb access on nf_stolen Date: Wed, 26 Feb 2025 03:23:05 +0100 Message-ID: <2025022615-CVE-2022-49622-bd19@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=2192; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=DiIQzLYaoGjNzI+0InqOWTbUOovCcs7VEWw7MX24VBc=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qq7zuC298KO5ZXHXZtMfzOYWJgnSzJdTfFtqFm/3E G2uyHbviGVhEGRikBVTZPmyjefo/opDil6Gtqdh5rAygQxh4OIUgIlM/8QwT1d3+44fT+fOm90U daXJ5qfJwxLvLIYFm46Z3zD7dWvnQ+E1j9hdNW7beq0XAQA= 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: nf_tables: avoid skb access on nf_stolen When verdict is NF_STOLEN, the skb might have been freed. When tracing is enabled, this can result in a use-after-free: 1. access to skb->nf_trace 2. access to skb->mark 3. computation of trace id 4. dump of packet payload To avoid 1, keep a cached copy of skb->nf_trace in the trace state struct. Refresh this copy whenever verdict is != STOLEN. Avoid 2 by skipping skb->mark access if verdict is STOLEN. 3 is avoided by precomputing the trace id. Only dump the packet when verdict is not "STOLEN". The Linux kernel CVE team has assigned CVE-2022-49622 to this issue. Affected and fixed versions =========================== Fixed in 5.18.13 with commit 0016d5d46d7440729a3132f61a8da3bf7f84e2ba Fixed in 5.19 with commit e34b9ed96ce3b06c79bf884009b16961ca478f87 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-49622 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.h net/netfilter/nf_tables_core.c net/netfilter/nf_tables_trace.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/0016d5d46d7440729a3132f61a8da3bf7f84e2ba https://git.kernel.org/stable/c/e34b9ed96ce3b06c79bf884009b16961ca478f87