Skip to content
Commit 6e540309 authored by Shawn Bohrer's avatar Shawn Bohrer Committed by David S. Miller
Browse files

ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()

421b3885

 "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: default avatarShawn Bohrer <sbohrer@rgmadvisors.com>
Reported-by: default avatarYurij M. Plotnikov <Yurij.Plotnikov@oktetlabs.ru>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 640b2b10
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment