Article View: linux.kernel.netdev
Article #4983[PATCH net 08/10] netfilter: xt_dccp: handle reserved options as single-byte
From: Pablo Neira Ayuso
Date: Mon, 19 Oct 2026 15:02
Date: Mon, 19 Oct 2026 15:02
45 lines
9916 bytes
9916 bytes
From: Sung Byeongchan <tjdqudcks0424@naver.com>
The DCCP UAPI defines option numbers 3 through 31 as reserved. Like
Padding and Mandatory, these options occupy one byte. dccp_find_option()
only treats values below 2 as single-byte and interprets the byte after a
reserved option as a TLV length.
This can skip a later option and invert an XT_DCCP_OPTION rule result. A
local production-hook fixture installed the same DROP rule for IPv4 and
IPv6. In three fresh boots per kernel, a target-only packet was dropped
20/20 times, while adding reserved option 3 before the same target let
20/20 packets reach the protected receiver. The fixed kernel dropped all
trigger packets in three fresh boots and preserved the normal controls.
Treat every option up to DCCPO_MAX_RESERVED as single-byte, matching the
protocol definition. Triggering requires
CONFIG_NETFILTER_XTABLES_LEGACY, CONFIG_NETFILTER_XT_MATCH_DCCP, an
option-based rule, and remote protocol-33 reachability. The touched source
is unchanged at 0c2669a9f4a1d607e7591ae50ccf3c432a0aff08, where the patch
applies and builds cleanly.
Fixes: 1d3de414eb20 ("[NETFILTER]: New iptables DCCP protocol header match")
Assisted-by: LLM
Signed-off-by: Sung Byeongchan <tjdqudcks0424@naver.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/xt_dccp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/xt_dccp.c b/net/netfilter/xt_dccp.c
index 3db81e041af9..23a4e3e8df7d 100644
--- a/net/netfilter/xt_dccp.c
+++ b/net/netfilter/xt_dccp.c
@@ -62,7 +62,7 @@ dccp_find_option(u_int8_t option,
return true;
}
- if (op[i] < 2 || i == optlen - 1)
+ if (op[i] <= DCCPO_MAX_RESERVED || i == optlen - 1)
i++;
else
i += op[i + 1] ? : 1;
--
2.47.3
Technical Details
Message-ID:
<20261019150249.1879516-9-pablo@netfilter.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348654-linux-kernel-netdev=dewy.ruReferences:
<20261019150249.1879516-1-pablo@netfilter.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348654-linux-kernel-netdev=dewy.ru From: pablo@netfilter.org (Pablo Neira Ayuso) Newsgroups: linux.kernel.netdev Subject: [PATCH net 08/10] netfilter: xt_dccp: handle reserved options as single-byte Date: Mon, 19 Oct 2026 17:02:47 +0200 Organization: Usenet Network Message-ID: <20261019150249.1879516-9-pablo@netfilter.org> References: <20261019150249.1879516-1-pablo@netfilter.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="3645169"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:RtDgvZMM8jTPffkgmqiCj6TqI6I= sha256:K/+COsGEdH5LLx+k85b1HO/LX7Sq8Df6ktzhJJQWgWg= sha1:6oeZ4tZyGjSs9+dYwLnab+H1QAo= sha256:8kNFq5lYrqJ5KEK35BaxCPqbdjoFYzO9E4df7RvD7FI= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 741F5110A45; Mon, 19 Oct 2026 18:41:37 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.15 X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=netfilter.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SFGfiOjqdqST; Mon, 19 Oct 2026 18:41:31 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-348654-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=netfilter.org X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 653401109E0; Mon, 19 Oct 2026 18:41:21 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (aws-us-west-2-korg-listserv-alma10-1.taild15c8.ts.net [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 3E0BC6253BE; Mon, 19 Oct 2026 15:31:41 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=fail; t=1792423884; b=BUaP2JP5f8PoiiVAEGFMBpjQh8pI7nBPwbUVRoBqgbbMK3Ehc8JsRBqZlrwz/wTuKnVu HFu791JFyKmBvMfcX3ZwgFHxWg/bA/K2ZD3a9tOwwtDI5fYeEjigNCJ9n0CpY5QcbyPCf sjv1/xEM4vLRUevBUlD2Ox+akei7ws+xYaHrU3B+qhfKS6TWb7oAL7cWr665s/thJyq7r SnmbAsIDnIE7YLVQZN4aberzHObcoIxrxekQ6U7e9BxOrKCgkr+Q2+gUa7JjPfSIxyLax Fafv2CQTeDtV+10daDCTtmd3jYDJB7p07eT84/t/eiCDaNkYbqagR+ZYMQpnKNcPw+Q== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792423884; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:From:To: Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version: Content-Transfer-Encoding; bh=lV8QWm9Z+HIg2Nt43ShwKmzN3Kg/Clf/xBBfQiQHPFE=; b=nFQWcKLtL4gWKvZFLzQ8qgFKsqk/HlqSKXV5wLnl5cLkNFiUkOqreyN6jHoRyyGP6ITy q2hBZN8DlgQ3HcX23Thdf4XM1O1SxnSKWYxeQ5xe9j3EaXrqlKdW4A4TaC4isNHjuPUg1 VqB4At9vDZO0WFXG2TWJTA26YW/chTlQYaEDNiYxVpSwi4sQU3inwbJi/fWZmgU1NJMuC clfw8fS9sKPu6kbnLwaEd9S4A+YXS8UimY+M8OXtcyElIbFkzXJczjalwGFul41lhJW/s yb3/UiHaWhZHm/yutUigHtQJeR3bxGaB3pHKlI2I28jMRcz97vuoeDAB3pap3IQ0kEg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=kTac9Tr+; dmarc=none header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; arc=fail smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 448D0607BF17; Mon, 19 Oct 2026 15:31:24 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=kTac9Tr+ X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=217.70.190.124 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1792422191; b=yxhNFIJ1kBJ0FwiyFzExuaosTofD9KhhZmxNv8OdV+2oF387TH0URaCsljWr1uzcBVvC E2/2g0gWAYketQ5qDirZDA4P1s2LBT8MJHbW9cJH+gX0hq9nInJzKBTHH+hjhdV07SBzo tKqTlOsUbZ6ne79E3zlU5cG86IRWgjfTHhQ15XtuN20FpLYd9p/m9lawUcllUId7qPx/o CXVLNWu12SnF15DBh0pBeR3tm7LRae495nPDgKo+B/rW6+1rRSJo4MPOG7lJdMgA3NW8P 8SmqbqkvZVsm4s21DZWHVuHdDqCsr4Dh2sdUFdCetJjOBZeAJ3w2uphogp4Jvvq5dzQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1792422191; h=DMARC-Filter:DKIM-Signature:Received:From:To:Cc:Subject:Date: Message-ID:X-Mailer:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Spam-Status:X-Spam-Checker-Version; bh=lV8QWm9Z+HIg2Nt43ShwKmzN3Kg/Clf/xBBfQiQHPFE=; b=hsPDeJXvh7TStFFg53TJ7pwOoNibbSNFR/5/XvzhOjEgUie2pouac7WAM/aUl/N15HP3 AyZ0aMet++Kk3zpTKDmbhOy4UMoA70/HfiWlsKyJtCXJrLUEsswBZxrDkdMB98USRnTI3 r9JsZ9kaFU+vdkw3eMKWRMRRqRvK5ksEnaNigzeP/lzfy8ut/FdG6pUfdEXDLIds5NuwP cl1s14XyggdoE9wV1oeW0J5Iei3CK77vXF2idjGo7IVn8McqmE1S7UdKrh5910TCYI+nH 7Qh0Y1P/y5ADhmqV662hDKcOkjkfCx42KCTa/AbE51XhYyZFPWfg5mgC/HZ2uCa58Jg== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=netfilter.org; spf=pass smtp.mailfrom=netfilter.org; dkim=pass header.d=netfilter.org header.i=@netfilter.org header.a=rsa-sha256 header.s=2025 header.b=kTac9Tr+; arc=none smtp.remote-ip=217.70.190.124 X-Received: from mail.netfilter.org (mail.netfilter.org [217.70.190.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BED2607D36A; Mon, 19 Oct 2026 15:03:11 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5BED2607D36A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=netfilter.org X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netfilter.org X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netfilter.org; s=2025; t=1792422189; bh=lV8QWm9Z+HIg2Nt43ShwKmzN3Kg/Clf/xBBfQiQHPFE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kTac9Tr+ZKpzFp2Ydj2EmcVUU/+DixAqxXGrKHiXZgsmMROBz6sdDyQnpyYRNIugy LwG33zWe6UpfeuD973xRmeJSlcdKKbKeoU4yUefFg/v02bgh33bOE5SbSalTj1b0sR R0ROZJ23GPMvF9XJaGOn1R9yZ1hY3iWEUeTR2rIRRA3sMWIS9gsetoTPUYEdgi0CIM h3q7BK1y87ijxM34hAcsikNk60YpNxhMwTs8x8Y2kSoowugsI62DiGL6YbBAnjX/57 R31oXdTOFJG5a001IFUcigzXA2VICjdk+m7D146U3T25ER9SwW0S3i3xyI31F6gVXo l9c6zkpy9GYRg== X-Received: from localhost.localdomain (mail-agni [217.70.190.124]) by mail.netfilter.org (Postfix) with ESMTPSA id EBE2E6005D; Mon, 19 Oct 2026 17:03:08 +0200 (CEST) X-Cc: davem@davemloft.net, netdev@vger.kernel.org, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, horms@kernel.org, fw@strlen.de, ja@ssi.bg X-Mailer: git-send-email 2.47.3 X-In-Reply-To: <20261019150249.1879516-1-pablo@netfilter.org> X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list