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 9E0FC3A3E78; Tue, 16 Jun 2026 17:35:37 +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=1781631338; cv=none; b=MLyxYZlXmQbd3+DyQKdsh37QfPCKL5djacdeVLzJHqawbaQ7wRoxY1Xr+c4u0LfAHCFkk7l3vuH6BlRpHkpHi+o338i3kOqp+4XAn18bihPQISM1qcYcYJ48KtM3pdFlp+3laMYW7qrGES2ipZWaHJ2ws0YC7HzTqRRTnaQ+YH4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781631338; c=relaxed/simple; bh=YYvtI3J8dMp3KHuEgURZ/DyMs3bcdNHm1l6csbZ6vQ0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z85LCiInE/2OGwAPtCJrdNxa+AU7t5XTIzKmbXQRDtoJ4ZDkVJ3k/msNGr7LssCSnkCfkEchA7IOxeinQzOcTwYBBn+y0J852deh/zkqaC9rjmnJo4P/4/XBvScVCBslI4ugS5T8eIuXFLqK0jCOhsqR2mQW1BH5u8T8gz48Dr4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NgZZnVeV; 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="NgZZnVeV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A25C11F000E9; Tue, 16 Jun 2026 17:35:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781631337; bh=pqtwEUWGZbAJwn1sWfU81ftmdF5M80TcH6zP2qbCfHs=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NgZZnVeVnKINSTx7iBwTgtjV3o0qu4Hoy3U/uewGVezdjXGZrKgKeIlmjiLThdHI9 +sFDy7NnLZg3wXw27/H6s5DF4ijBAvdnEAKv833PB5y0zBTKFnOqAO5qh6c5NKavao +VTu9M9ZPGZgNW0Q0jGtnii3QY6UhEk3MWDax7JY= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Westphal , Fernando Fernandez Mancera , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.1 201/522] netfilter: conntrack_irc: fix possible out-of-bounds read Date: Tue, 16 Jun 2026 20:25:48 +0530 Message-ID: <20260616145135.486114978@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145125.307082728@linuxfoundation.org> References: <20260616145125.307082728@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal [ Upstream commit 66eba0ffce3b7e11449946b4cbbef8ea36112f56 ] 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 Reviewed-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- 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 5703846bea3b69..0f50ea92ced9df 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c @@ -208,7 +208,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", @@ -222,7 +222,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