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 995C2366048 for ; Sat, 25 Apr 2026 08:47:52 +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=1777106872; cv=none; b=UtwNY762KTb7cRlMl9RjSbDDF2OAJiunXxet7Vxlo6KSKYt3mMk5Glqz/8UeD7l7TVylMj3uFsWonwcq75q/rw9V7RkinOFgDFpz/H+txkzM8illrgGPxk9K3g3IU1iReO5kAe9G+Ve+Vg5wvomZqUCQPFFPdhPnjwneeGRKzxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777106872; c=relaxed/simple; bh=P0HKHeJLkEhtQhv56F2PgYgDx7gn6rEsWiMt1FUA0Dc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=krbjlJD877eTB8FWRcDEWhVDkv8FweEoJbCAbl0biTmvrpBPQbqSkCXD1lNgYOGIZc2mqaLPzSFvpHtR75FH4b3f67IUq/vlB2QJSylahQa9rHaPfG4bVwfnLxNpS/F0gmks0GCqtXuxceYPbOV/moRncZ3ul7tmOnA0c3njaT8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=1pykZZPE; 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="1pykZZPE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB1F5C2BCB0; Sat, 25 Apr 2026 08:47:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1777106872; bh=P0HKHeJLkEhtQhv56F2PgYgDx7gn6rEsWiMt1FUA0Dc=; h=From:To:Cc:Subject:Date:Reply-To:From; b=1pykZZPEtFYqLacwGmj0lg/qcXVkTCPgWFeT/ZSS9bscEniqVVrhe8aFE0WN2OBOv 9F1B1c19QWNjcGIfFB6T/Lo+lKEyY58bWLu1GzSljH5Y5AmOchpoecZoaQCynKZ66U GJXHx3W5okHbpj0KVpDhiJwY5PzytOE+r+njM5BQ= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2026-31681: netfilter: xt_multiport: validate range encoding in checkentry Date: Sat, 25 Apr 2026 10:46:48 +0200 Message-ID: <2026042545-CVE-2026-31681-3c5b@gregkh> X-Mailer: git-send-email 2.54.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=2916; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=IDIWbNml0wYQLXQ3srd7Iu4KVPzP/6DsmU6eYq3Vj/Q=; b=owGbwMvMwCRo6H6F97bub03G02pJDJlv6kv1xP+yTXA+2GK3aeG6zHVN3m8yw11rH+7o7fOaf /BIS/ahjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZhIJSPDXOk7BSUbV7qJeRn/ 2JI6tetfQrOCIsMcXoWJIofrt9ldM5bKCv8up3fRVnsaAA== 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: xt_multiport: validate range encoding in checkentry ports_match_v1() treats any non-zero pflags entry as the start of a port range and unconditionally consumes the next ports[] element as the range end. The checkentry path currently validates protocol, flags and count, but it does not validate the range encoding itself. As a result, malformed rules can mark the last slot as a range start or place two range starts back to back, leaving ports_match_v1() to step past the last valid ports[] element while interpreting the rule. Reject malformed multiport v1 rules in checkentry by validating that each range start has a following element and that the following element is not itself marked as another range start. The Linux kernel CVE team has assigned CVE-2026-31681 to this issue. Affected and fixed versions =========================== Issue introduced in 2.6.17 with commit a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 and fixed in 6.12.83 with commit aec14808271f2bf2b656de6ff12dfe73c5fd3b67 Issue introduced in 2.6.17 with commit a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 and fixed in 6.18.24 with commit 8368ce8eb01f0b91111d814703696e780d0ef12f Issue introduced in 2.6.17 with commit a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 and fixed in 6.19.14 with commit 1e4baa853f1cc4227e04f52d6860524707cfb294 Issue introduced in 2.6.17 with commit a89ecb6a2ef732d04058d87801e2b6bd7e5c7089 and fixed in 7.0 with commit ff64c5bfef12461df8450e0f50bb693b5269c720 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-31681 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/xt_multiport.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/aec14808271f2bf2b656de6ff12dfe73c5fd3b67 https://git.kernel.org/stable/c/8368ce8eb01f0b91111d814703696e780d0ef12f https://git.kernel.org/stable/c/1e4baa853f1cc4227e04f52d6860524707cfb294 https://git.kernel.org/stable/c/ff64c5bfef12461df8450e0f50bb693b5269c720