]> git.baikalelectronics.ru Git - kernel.git/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:04:05 +0000 (11:04 +0200)
commitf6425a7891213f8cbfef990d3c6f92e6b55574c3
treeb0451cb620ece0f680d9545039625515a5d71c60
parentf7c7b2472aaaaf947e014a137ea984b6d567a876
netfilter: nf_conntrack_irc: Tighten matching on DCC message

[ Upstream commit 1a4d9c173aca24ccb5b9020fc191aa005486e44b ]

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: f8a64fc724f9 ("[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