Re: Possible NULL dereference caused by -stable commitef81bb40bf15f350fe865f31fa42f1082772a576

From: David Miller
Date: Wed Sep 28 2011 - 14:34:34 EST


From: Eric Dumazet <eric.dumazet@xxxxxxxxx>
Date: Wed, 28 Sep 2011 14:09:09 +0200

> 1) Discussion on current kernel :
>
> All we need here is not the route but inet_peer, so that inet_getid()
> can be called on it.
>
> If no route is given to ipv6_select_ident(), at least we can try to get
> inet_peer, and release it before exiting from ipv6_select_ident()

Ok, after some auditing, there is only one call site of ipv6_select_ident()
that can happen with a NULL route and that is udp6_ufo_fragment().

ipv6_gso_segment() already walks the extension headers via
ipv6_gso_pull_exthdrs() so maybe we can calculate the true destination
address there and get that passed down somehow into the fragment ID
selection for an inetpeer lookup.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/