]> 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)
committerPablo Neira Ayuso <pablo@netfilter.org>
Thu, 1 Sep 2022 00:01:56 +0000 (02:01 +0200)
commit3ab5885c831c717729e0799aa292f2ecc0484ce4
tree330bb73faf138404fc0b687822fbb8342521069b
parent4e4d3d57c77b12dc9dd376607952dfdd2f7c7413
netfilter: nf_conntrack_irc: Fix forged IP logic

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>
net/netfilter/nf_conntrack_irc.c