]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nf_conntrack_irc: Fix forged IP logic
authorDavid Leadbeater <dgl@dgl.cx>
Fri, 26 Aug 2022 04:56:58 +0000 (14:56 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:04:55 +0000 (12:04 +0200)
commit022fa48710aeecba4478f91308a1ca0f93031f90
tree03644f573b33cca4e4a8b4e95fb014f7a3131d8a
parent3854511ed2c59e795e50e5104f8cb8b659a49eb7
netfilter: nf_conntrack_irc: Fix forged IP logic

[ Upstream commit c99ddfd90563584922185bb5da2242fd82e3a2ad ]

Ensure the match happens in the right direction, previously the
destination used was the server, not the NAT host, as the comment
shows the code intended.

Additionally nf_nat_irc uses port 0 as a signal and there's no valid way
it can appear in a DCC message, so consider port 0 also forged.

Fixes: f8a64fc724f9 ("[NETFILTER]: nf_conntrack/nf_nat: add IRC helper port")
Signed-off-by: David Leadbeater <dgl@dgl.cx>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/netfilter/nf_conntrack_irc.c