]> git.itanic.dy.fi Git - linux-stable/commit
netfilter: nf_conntrack_irc: Tighten matching on DCC message
authorDavid Leadbeater <dgl@dgl.cx>
Fri, 26 Aug 2022 04:56:57 +0000 (14:56 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Sep 2022 09:02:55 +0000 (11:02 +0200)
commit468adf7aab7a30ffe4467e2c981a65568ba84f0b
treec6b79a524611a551c7ed1132f6b30c52b90c64d7
parent9431ef7d832692b8c62af68d214dd5fedac3aa01
netfilter: nf_conntrack_irc: Tighten matching on DCC message

[ Upstream commit e8d5dfd1d8747b56077d02664a8838c71ced948e ]

CTCP messages should only be at the start of an IRC message, not
anywhere within it.

While the helper only decodes packes in the ORIGINAL direction, its
possible to make a client send a CTCP message back by empedding one into
a PING request.  As-is, thats enough to make the helper believe that it
saw a CTCP message.

Fixes: 869f37d8e48f ("[NETFILTER]: nf_conntrack/nf_nat: add IRC helper port")
Signed-off-by: David Leadbeater <dgl@dgl.cx>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_conntrack_irc.c