mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-26 11:28:28 +00:00
icmp: Don't leak original dst into ip_route_input()
ip_route_input() unconditionally overwrites the dst. Hide the original dst attached to the skb by calling skb_dst_set(skb, NULL) prior to ip_route_input(). Reported-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
1d8fff9073
commit
773a69d64b
@ -496,6 +496,7 @@ static struct rtable *icmp_route_lookup(struct net *net,
|
|||||||
}
|
}
|
||||||
/* Ugh! */
|
/* Ugh! */
|
||||||
orefdst = skb_in->_skb_refdst; /* save old refdst */
|
orefdst = skb_in->_skb_refdst; /* save old refdst */
|
||||||
|
skb_dst_set(skb_in, NULL);
|
||||||
err = ip_route_input(skb_in, fl4_dec.daddr, fl4_dec.saddr,
|
err = ip_route_input(skb_in, fl4_dec.daddr, fl4_dec.saddr,
|
||||||
RT_TOS(tos), rt2->dst.dev);
|
RT_TOS(tos), rt2->dst.dev);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user