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 B358D13AA3A for ; Wed, 17 Apr 2024 10:10:43 +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=1713348643; cv=none; b=LBo6V8IRpno4C0vIL/0clgjCCABhf4gietvMCE0vbtjX86vo3WT/jVg7XBW2j6DLymB1A9WiwWXYfW86BvkiY25ZLJeEOICA1cS3k0vMK4Ruhnjxl9ARCww6D05xmjnuPGvtTjgIjjGNl3bEvcztBEcebSR1LWyra5XQn8lEOzA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713348643; c=relaxed/simple; bh=qyZ69wfaOdmi5yzymjXzcicnoJ0MT1Z7GC1IADQFAoE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kkmraALgpJd2sHcehnOZ46RHtvouma5uJmXIVyUx+zkJLwOmDlsYHtO1YNctkenq1gj1Rh+NWyuY4ykwCu0HBFrrL0MK1FGiPV9k1DrdQyNNAF4eyRc4Dchm+h17ddcJhaEWYGedVR0d+xHO0BRlme9eoygCyITh7UBx4o3j0kg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CFvnXKpI; 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="CFvnXKpI" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DAC1FC072AA; Wed, 17 Apr 2024 10:10:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713348643; bh=qyZ69wfaOdmi5yzymjXzcicnoJ0MT1Z7GC1IADQFAoE=; h=From:To:Cc:Subject:Date:Reply-to:From; b=CFvnXKpIJzY9u4W7kEKE4AVywrK3QXaWWDltd4hi3F15q6UjZxILrv+9paj1cosLW Z/jm/MZPFWuu1VFamEPGHhZH776hGQtiULIEXhXWUBwM3b7U9NxBTumCaAEexiQ7tF buJfjqPkiW3RowsobS7YxCdvYsxQR6y1bI8cSbAg= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-26834: netfilter: nft_flow_offload: release dst in case direct xmit path is used Date: Wed, 17 Apr 2024 12:10:16 +0200 Message-ID: <2024041714-CVE-2024-26834-a73b@gregkh> X-Mailer: git-send-email 2.44.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=3339; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=qyZ69wfaOdmi5yzymjXzcicnoJ0MT1Z7GC1IADQFAoE=; b=owGbwMvMwCRo6H6F97bub03G02pJDGnyC9hKYvuPfPkxO1voocNWyUyl1PZCG/X8n4tTt89YI c8Tc9mtI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACbSaMEwP2OJiX/2HzlxPQX3 si933RPny27hYJgfuS/x1ZpW3nrjy19S+Q9OKtzrvfoWAA== 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_flow_offload: release dst in case direct xmit path is used Direct xmit does not use it since it calls dev_queue_xmit() to send packets, hence it calls dst_release(). kmemleak reports: unreferenced object 0xffff88814f440900 (size 184): comm "softirq", pid 0, jiffies 4294951896 hex dump (first 32 bytes): 00 60 5b 04 81 88 ff ff 00 e6 e8 82 ff ff ff ff .`[............. 21 0b 50 82 ff ff ff ff 00 00 00 00 00 00 00 00 !.P............. backtrace (crc cb2bf5d6): [<000000003ee17107>] kmem_cache_alloc+0x286/0x340 [<0000000021a5de2c>] dst_alloc+0x43/0xb0 [<00000000f0671159>] rt_dst_alloc+0x2e/0x190 [<00000000fe5092c9>] __mkroute_output+0x244/0x980 [<000000005fb96fb0>] ip_route_output_flow+0xc0/0x160 [<0000000045367433>] nf_ip_route+0xf/0x30 [<0000000085da1d8e>] nf_route+0x2d/0x60 [<00000000d1ecd1cb>] nft_flow_route+0x171/0x6a0 [nft_flow_offload] [<00000000d9b2fb60>] nft_flow_offload_eval+0x4e8/0x700 [nft_flow_offload] [<000000009f447dbb>] expr_call_ops_eval+0x53/0x330 [nf_tables] [<00000000072e1be6>] nft_do_chain+0x17c/0x840 [nf_tables] [<00000000d0551029>] nft_do_chain_inet+0xa1/0x210 [nf_tables] [<0000000097c9d5c6>] nf_hook_slow+0x5b/0x160 [<0000000005eccab1>] ip_forward+0x8b6/0x9b0 [<00000000553a269b>] ip_rcv+0x221/0x230 [<00000000412872e5>] __netif_receive_skb_one_core+0xfe/0x110 The Linux kernel CVE team has assigned CVE-2024-26834 to this issue. Affected and fixed versions =========================== Issue introduced in 6.5 with commit fa502c865666 and fixed in 6.6.19 with commit 9256ab9232e3 Issue introduced in 6.5 with commit fa502c865666 and fixed in 6.7.7 with commit 2d17cf10179a Issue introduced in 6.5 with commit fa502c865666 and fixed in 6.8 with commit 8762785f459b 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-26834 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/netfilter/nf_flow_table_core.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/13b57b5cd591d5b22f9bbf047b2922967de411f3 https://git.kernel.org/stable/c/a6cafdb49a7bbf4a88367db209703eee6941e023 https://git.kernel.org/stable/c/9256ab9232e35a16af9c30fa4e522e6d1bd3605a https://git.kernel.org/stable/c/2d17cf10179a7de6d8f0128168b84ad0b4a1863f https://git.kernel.org/stable/c/8762785f459be1cfe6fcf7285c123aad6a3703f0