Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [91.216.245.30]) (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 2786C37AA72 for ; Wed, 27 May 2026 10:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.216.245.30 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779877232; cv=none; b=kMUzB7mdWIJccm/goFywpSI4rnhvIj5a+JfDG80xOVJfYqMYpCfHXYzdoXLdvFoGpbXQbVChTYxzfobcwMXZ9TI2XdfPSY7PNMkLYuD3UyMH3ziEbJsRgqY8/jFqih/jQY4vrUiwApoJKi86C+rGlopePGCzmCi1bbo1B7wlRyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779877232; c=relaxed/simple; bh=D7R3NEXzyBDnfFkY+IYFVisO+/BfmUiQz+ADsxPjBCc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=cSFtJM6q8WrCJfhhhtso689mhr05fWX7Q63bkQIkTgPhQpuy3OI3XEgmla4JI0aYXtWI/QbFdEeeOzz18XgJfsd/vSzZw18B5/tj/QRlZi2iURHqz90SW8FIWl7X/ppt551czlHKhzFZmcN48UBAlKJKGFScu8hnH+UMx+lqvsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc; arc=none smtp.client-ip=91.216.245.30 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=strlen.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=Chamillionaire.breakpoint.cc Received: by Chamillionaire.breakpoint.cc (Postfix, from userid 1003) id E69CC60551; Wed, 27 May 2026 12:20:27 +0200 (CEST) From: Florian Westphal To: Cc: Florian Westphal Subject: [PATCH nf] netfilter: conntrack_irc: fix possible out-of-bounds read Date: Wed, 27 May 2026 12:20:19 +0200 Message-ID: <20260527102022.9977-1-fw@strlen.de> X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: netfilter-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When parsing fails after we've matched the command string we should bail out instead of trying to match a different command. This helper should be deprecated, given prevalence of TLS I doubt it has any relevance in 2026. Fixes: 869f37d8e48f ("[NETFILTER]: nf_conntrack/nf_nat: add IRC helper port") Closes: https://sashiko.dev/#/patchset/20260525182924.28456-1-fw%40strlen.de Signed-off-by: Florian Westphal --- Noticed as part of a drive-by-review of another unrelated change. net/netfilter/nf_conntrack_irc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/netfilter/nf_conntrack_irc.c b/net/netfilter/nf_conntrack_irc.c index 522183b9a604..2ebe4cb47cf6 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c @@ -203,7 +203,7 @@ static int help(struct sk_buff *skb, unsigned int protoff, if (parse_dcc(data, data_limit, &dcc_ip, &dcc_port, &addr_beg_p, &addr_end_p)) { pr_debug("unable to parse dcc command\n"); - continue; + goto out; } pr_debug("DCC bound ip/port: %pI4:%u\n", @@ -217,7 +217,7 @@ static int help(struct sk_buff *skb, unsigned int protoff, net_warn_ratelimited("Forged DCC command from %pI4: %pI4:%u\n", &tuple->src.u3.ip, &dcc_ip, dcc_port); - continue; + goto out; } exp = nf_ct_expect_alloc(ct); -- 2.53.0