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 4646B3D75CE; Tue, 16 Jun 2026 18:17:14 +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=1781633835; cv=none; b=d47s9ADAlE+bFF2kBGZpYyXoswTD+bqgXVgai6MKpJ1PwzZN3/TFlOYkK1oggQBD5/7tJZ7oAByWTP/03wNDL6xYZzXa1Aw6NhQBsGpsCKmPPKJtJb8XYe8xTEtb6w34Tp8e0tKGAb1NAcbfU+qz4AmUX2lNNbatekcXxsbRm3c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781633835; c=relaxed/simple; bh=eQJwlRLUHc5gsu1R8I5Ra+2+/BiwS73OGjPRxBwpytY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=t2t/Dl0ECiULZ6yCRA8juh2jQHmNCgdyi+zjt+DYkeO27GGBZrcheArzF9CwoYaCZ4S5yRxaIcSInYkdSUxw/XqXuqzoWccd48eNLvfkr40ow5Ri0cjF/sZ8dFqn4OA2Pn6iIRlaQb/7KrXQrjCChoK8Bb+RyMVaPUYVlen2YSE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=yFJynD+L; 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="yFJynD+L" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3392B1F000E9; Tue, 16 Jun 2026 18:17:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781633834; bh=qIXMPefimXkFoH6QaY1zhsdwvxIuve4ZNiMqdo+Qt1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=yFJynD+L4qP+dfVJC/cjLRy1d8AKBuOH6BIy4WQCtpuJRC0T3Kk79qXoCPmaH2jJ4 g9oMyRlpG49zGUgY7WQdQwcqx5Ei3m/a/gIG2yK7FZOnfyPK61xq6xtRpdIrc9WTU6 wb8jp9L6VdXPYdD4PL9aYTHo0Xc4uWkdV2xSH+Tg= 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 5.15 153/411] netfilter: conntrack_irc: fix possible out-of-bounds read Date: Tue, 16 Jun 2026 20:26:31 +0530 Message-ID: <20260616145108.574509386@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145100.376842714@linuxfoundation.org> References: <20260616145100.376842714@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 5.15-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 159e1e4441a433..7a0c645a11c390 100644 --- a/net/netfilter/nf_conntrack_irc.c +++ b/net/netfilter/nf_conntrack_irc.c @@ -202,7 +202,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", @@ -216,7 +216,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