Re: [PATCH net] ipv4/route: fail early when inet dev is missing

2019-03-05 Thread David Miller
From: Paolo Abeni Date: Tue, 5 Mar 2019 13:49:39 +0100 > If a non local multicast packet reaches ip_route_input_rcu() while > the ingress device is NULL, we end up doing a NULL pointer > dereference in IN_DEV_MFORWARD(). > > Since the later call to ip_route_input_mc() is going to fail if > !in_

Re: [PATCH net] ipv4/route: fail early when inet dev is missing

2019-03-05 Thread David Ahern
On 3/5/19 5:49 AM, Paolo Abeni wrote: > If a non local multicast packet reaches ip_route_input_rcu() while > the ingress device is NULL, we end up doing a NULL pointer A clarification: the ingress device is not NULL; it's the IPv4 private data (in_device). > dereference in IN_DEV_MFORWARD(). > >

[PATCH net] ipv4/route: fail early when inet dev is missing

2019-03-05 Thread Paolo Abeni
If a non local multicast packet reaches ip_route_input_rcu() while the ingress device is NULL, we end up doing a NULL pointer dereference in IN_DEV_MFORWARD(). Since the later call to ip_route_input_mc() is going to fail if !in_dev, we can fail early in such scenario and avoid the dangerous code p