android_kernel_google_msm/net
Eric Dumazet 60469792e1 ipv4: keep skb->dst around in presence of IP options
Andrey Konovalov got crashes in __ip_options_echo() when a NULL skb->dst
is accessed.

ipv4_pktinfo_prepare() should not drop the dst if (evil) IP options
are present.

We could refine the test to the presence of ts_needtime or srr,
but IP options are not often used, so let's be conservative.

Thanks to syzkaller team for finding this bug.

Fixes: d826eb14ec ("ipv4: PKTINFO doesnt need dst reference")
Change-Id: I4684e44431021585a6b967feb1cba2ded8c5bddc
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-07-17 05:11:36 +00:00
..
9p
802 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
8021q Revert "net: maintain namespace isolation between vlan and real device" 2012-05-10 23:03:34 -04:00
appletalk
atm Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ax25 net: add validation for the socket syscall protocol argument 2016-10-29 23:12:11 +08:00
batman-adv
bluetooth bluetooth: Validate socket address length in sco_sock_bind(). 2016-10-29 23:12:11 +08:00
bridge Merge commit 'v3.4-rc6' into android-3.4 2012-05-07 18:20:34 -07:00
caif caif: Fix memory leakage in the chnl_net.c. 2012-04-13 11:01:44 -04:00
can
ceph libceph: isolate kmap() call in write_partial_msg_pages() 2012-03-22 10:47:52 -05:00
core unix: correctly track in-flight fds in sending process user_struct 2017-06-26 16:09:55 +03:00
dcb
dccp ipv6/dccp: do not inherit ipv6_mc_list from parent 2017-06-07 12:42:53 -06:00
decnet net: add validation for the socket syscall protocol argument 2016-10-29 23:12:11 +08:00
dns_resolver
dsa
econet Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ethernet Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
ieee802154 6lowpan: add missing spin_lock_init() 2012-04-26 05:32:55 -04:00
ipv4 ipv4: keep skb->dst around in presence of IP options 2017-07-17 05:11:36 +00:00
ipv6 tcp: do not lock listener to process SYN packets 2017-07-02 13:03:27 +03:00
ipx
irda irda: Fix lockdep annotations in hashbin_delete(). 2017-07-04 01:31:41 +03:00
iucv Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2012-03-22 18:15:32 -07:00
key net/key/af_key.c: add missing kfree_skb 2012-04-13 11:01:44 -04:00
l2tp l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() 2017-03-07 05:41:51 +00:00
lapb Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
llc net/llc: avoid BUG_ON() in skb_orphan() 2017-03-07 05:47:26 +00:00
mac80211 mac80211: fix AP powersave TX vs. wakeup race 2017-04-04 09:44:43 -06:00
netfilter netfilter: Change %p to %pK in debug messages 2016-12-22 22:05:10 +11:00
netlabel netlabel: use GFP flags from caller instead of GFP_ATOMIC 2012-03-22 19:29:57 -04:00
netlink netlink: validate addr_len on bind 2013-07-03 10:34:22 -07:00
netrom Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
nfc NFC: Fix the LLCP Tx fragmentation loop 2012-04-11 15:09:33 -04:00
openvswitch openvswitch: checking wrong variable in queue_userspace_packet() 2012-05-13 15:47:34 -04:00
packet net/packet: fix overflow in check for tp_frame_nr 2017-07-04 12:34:18 +03:00
phonet phonet: Sort out initiailziation and cleanup code. 2012-04-13 11:01:43 -04:00
rds RDS: use gfp flags from caller in conn_alloc() 2012-03-22 19:29:58 -04:00
rfkill rfkill: Introduce CONFIG_RFKILL_PM and use instead of CONFIG_PM to power down 2012-04-09 13:57:48 -07:00
rose Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-04-02 17:53:39 -07:00
rxrpc net: add length argument to skb_copy_and_csum_datagram_iovec 2016-10-31 22:26:43 +11:00
sched net: sched: export an api to enable/disable flow on sch 2013-03-07 15:20:04 -08:00
sctp sctp: validate chunk len before actually using it 2017-07-04 01:08:55 +03:00
sunrpc sunrpc: Fix possibly uninitialized variable warnings 2016-10-29 23:12:09 +08:00
tipc
unix unix: correctly track in-flight fds in sending process user_struct 2017-06-26 16:09:55 +03:00
wanrouter
wimax
wireless cfg80211: fix possible circular lock on reg_regdb_search() 2016-10-29 23:12:27 +08:00
x25
xfrm xfrm_user: validate XFRM_MSG_NEWAE incoming ESN size harder 2017-05-02 18:31:30 -06:00
activity_stats.c net: activity_stats: Add statistics for network transmission activity 2012-04-09 13:57:50 -07:00
compat.c net/compat.c,linux/filter.h: share compat_sock_fprog 2014-10-31 19:46:10 -07:00
Kconfig net: Fix CONFIG_RPS option to be turned off 2012-04-09 13:57:51 -07:00
Makefile net: activity_stats: Add statistics for network transmission activity 2012-04-09 13:57:50 -07:00
nonet.c
socket.c net: Fix use after free in the recvmmsg exit path 2016-10-31 23:25:23 +11:00
sysctl_net.c