]> git.baikalelectronics.ru Git - kernel.git/commit
ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()
authorShawn Bohrer <sbohrer@rgmadvisors.com>
Wed, 3 Jun 2015 21:27:38 +0000 (16:27 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 4 Jun 2015 07:46:26 +0000 (00:46 -0700)
commitdc108ce10c21baa6d0d1b927d102168cfe6a6585
tree5e024fab9cf5bd0affa537c2c04389daa551d022
parent8c5fa62b07aa716a7e0460f74a339cef8e8af58d
ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()

c8cbefced7faa8738577f0259af96eaef399ae66 "udp: ipv4: Add udp early
demux" introduced a regression that allowed sockets bound to INADDR_ANY
to receive packets from multicast groups that the socket had not joined.
For example a socket that had joined 224.168.2.9 could also receive
packets from 225.168.2.9 despite not having joined that group if
ip_early_demux is enabled.

Fix this by calling ip_check_mc_rcu() in udp_v4_early_demux() to verify
that the multicast packet is indeed ours.

Signed-off-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
Reported-by: Yurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp.c