From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 069513E009F for ; Tue, 6 Oct 2026 10:27:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791282479; cv=none; b=SAs3vEKJiYnHkZ4DEegZkH7muMfpY4mjcSFlBjafVS9KvcMzp4QFElLM2jZXGdksQAQIqguwtSCxSYTwvb0SGw4h0dp14OmMCuCfmie28hQAHCNGKb2Jc3EYmaVkvAe6WcEIaULUC0KX9aOVKVT4Y5nZHYngMBk7adJRmecL9aQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791282479; c=relaxed/simple; bh=fISHO0yMDxPIhgdxc60/MDgW+wL4ZS+wrfFo2vQBRzs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=EMnkmdPBbVM3GUnyRRUuJqv2PCFAFDTP6Yy504lEhcRSO0zkv5G20wwJNxylkLccEkFXkiSBSjIKVS717ByIw4NFoych1Xc91ByCR2vDp6z7yus+nDDBzB08MZF0QGeMDRLIxtpr2zxlES2kx7uSNKwEz8YuSJg70XOw3+gbZlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xJTKgzDT; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xJTKgzDT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 666FB1F000FF; Tue, 6 Oct 2026 10:27:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1791282477; bh=zL94vvWZcsdOVtiQoyal8NI9LPnXKGWFBr0NXJbQ+Zc=; h=From:To:Cc:Subject:Date:Reply-To; b=xJTKgzDTZs8jrHuK49EHTQVDFMeQOgAq/Aw6hYYi+b+gzjRy67lemzwWWFXZ23Af/ eNaq0DNUnjk5prNeSOFmmlao4be2tOoIIF1jqOuzP21PTI+YBhWIVa0msXjUpZqjug alEoq0MB0umiYcVB+j9la17RoJlt82TFL18dSfOM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-98321: netfilter: nf_nat: unregister and release hooks on error Date: Tue, 6 Oct 2026 10:47:02 +0200 Message-ID: <2026100613-CVE-2026-98321-9a39@gregkh> X-Mailer: git-send-email 2.56.0 Reply-To: , Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2250; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=nfmooHF6rGZscL6Z3EgA4FTGqmdhwoo8AD/cleYZbdA=; b=owGbwMvMwCRo6H6F97bub03G02pJDFlHtkq23bi9zsCzWJWnyvVRgpiAT7n22d8nY5eJHmKYa +PjFLymI5aFQZCJQVZMkeXLNp6j+ysOKXoZ2p6GmcPKBDKEgYtTACayeTLDgg1eb7+aKpx+ezj7 TeyhvjW/Iuo0QxkWTJBoONA5/9qP5XVBi9bxCXYsDK1mBQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit From: Greg Kroah-Hartman Description =========== In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_nat: unregister and release hooks on error If nf_hook_entries_insert_raw() fails, the NAT hooks get never released, resulting in a memleak. Postpone setting nat_proto_net->nat_hook_ops when the hooks are registered to simplify the error path to decide whether the nat hooks need unwinding. The Linux kernel CVE team has assigned CVE-2026-98321 to this issue. Affected and fixed versions =========================== Issue introduced in 4.18 with commit 1cd472bf036ca038e783ef5f058f54e45b7e8180 and fixed in 6.18.54 with commit 79084567cd082fb4482e1ea457580e7d6504dd99 Issue introduced in 4.18 with commit 1cd472bf036ca038e783ef5f058f54e45b7e8180 and fixed in 7.2.8 with commit df80342f4bfc023ad7d6703df5e27f583ff0cb8d Issue introduced in 4.18 with commit 1cd472bf036ca038e783ef5f058f54e45b7e8180 and fixed in 7.3-rc4 with commit cbdd39ce42530a193c56beb206a3356cb6d01016 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-2026-98321 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_nat_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/79084567cd082fb4482e1ea457580e7d6504dd99 https://git.kernel.org/stable/c/df80342f4bfc023ad7d6703df5e27f583ff0cb8d https://git.kernel.org/stable/c/cbdd39ce42530a193c56beb206a3356cb6d01016