android_kernel_google_msm/net
Daniel Borkmann d22586ffdd net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv
[ Upstream commit 3a1c756590 ]

In tcp_v6_do_rcv() code, when processing pkt options, we soley work
on our skb clone opt_skb that we've created earlier before entering
tcp_rcv_established() on our way. However, only in condition ...

  if (np->rxopt.bits.rxtclass)
    np->rcv_tclass = ipv6_get_dsfield(ipv6_hdr(skb));

... we work on skb itself. As we extract every other information out
of opt_skb in ipv6_pktoptions path, this seems wrong, since skb can
already be released by tcp_rcv_established() earlier on. When we try
to access it in ipv6_hdr(), we will dereference freed skb.

[ Bug added by commit 4c507d2897 ("net: implement IP_RECVTOS for
  IP_PKTOPTIONS") ]

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-14 06:02:10 -07:00
..
9p 9p: fix off by one causing access violations and memory corruption 2013-07-28 16:26:05 -07:00
802
8021q vlan: fix a race in egress prio management 2013-07-28 16:26:08 -07:00
appletalk
atm atm: update msg_namelen in vcc_recvmsg() 2013-05-01 09:41:04 -07:00
ax25 ax25: fix info leak via msg_name in ax25_recvmsg() 2013-05-01 09:41:04 -07:00
batman-adv batman-adv: fix random jitter calculation 2013-01-11 09:07:03 -08:00
bluetooth Bluetooth: Fix crash in l2cap_build_cmd() with small MTU 2013-07-03 10:59:00 -07:00
bridge net: bridge: convert MLDv2 Query MRC into msecs_to_jiffies for max_delay 2013-09-14 06:02:10 -07:00
caif caif: Fix missing msg_namelen update in caif_seqpkt_recvmsg() 2013-05-01 09:41:04 -07:00
can can: gw: use kmem_cache_free() instead of kfree() 2013-04-12 09:38:47 -07:00
ceph libceph: Fix NULL pointer dereference in auth client code 2013-07-13 11:03:40 -07:00
core neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup 2013-09-14 06:02:08 -07:00
dcb dcbnl: fix various netlink info leaks 2013-03-20 13:05:02 -07:00
dccp inet: Fix kmemleak in tcp_v4/6_syn_recv_sock and dccp_v4/6_request_recv_sock 2013-01-11 09:07:14 -08:00
decnet
dns_resolver
dsa
econet
ethernet
ieee802154 6lowpan: Fix endianness issue in is_addr_link_local(). 2013-03-20 13:05:02 -07:00
ipv4 tcp: cubic: fix bug in bictcp_acked() 2013-09-14 06:02:09 -07:00
ipv6 net: ipv6: tcp: fix potential use after free in tcp_v6_do_rcv 2013-09-14 06:02:10 -07:00
ipx
irda irda: Fix missing msg_namelen update in irda_recvmsg_dgram() 2013-05-01 09:41:05 -07:00
iucv iucv: Fix missing msg_namelen update in iucv_sock_recvmsg() 2013-05-01 09:41:05 -07:00
key af_key: initialize satype in key_notify_policy_flush() 2013-08-20 08:26:28 -07:00
l2tp l2tp: add missing .owner to struct pppox_proto 2013-07-28 16:26:02 -07:00
lapb
llc llc: Fix missing msg_namelen update in llc_ui_recvmsg() 2013-05-01 09:41:05 -07:00
mac80211 mac80211: fix duplicate retransmission detection 2013-08-11 15:38:42 -07:00
netfilter ipvs: ip_vs_sip_fill_param() BUG: bad check of return value 2013-05-11 13:48:08 -07:00
netlabel netlabel: improve domain mapping validation 2013-06-27 11:27:31 -07:00
netlink thermal: shorten too long mcast group name 2013-04-05 10:04:38 -07:00
netrom netrom: fix invalid use of sizeof in nr_recvmsg() 2013-05-01 09:41:06 -07:00
nfc NFC: llcp: fix info leaks via msg_name in llcp_sock_recvmsg() 2013-05-01 09:41:05 -07:00
openvswitch
packet packet: packet_getname_spkt: make sure string is always 0-terminated 2013-06-27 11:27:33 -07:00
phonet
rds rds: limit the size allocated by rds_message_alloc() 2013-03-20 13:05:01 -07:00
rfkill
rose rose: fix info leak via msg_name in rose_recvmsg() 2013-05-01 09:41:05 -07:00
rxrpc
sched htb: fix sign extension bug 2013-09-14 06:02:08 -07:00
sctp sctp: fully initialize sctp_outq in sctp_outq_init 2013-08-11 15:38:44 -07:00
sunrpc SUNRPC: Fix memory corruption issue on 32-bit highmem systems 2013-09-07 21:58:15 -07:00
tipc tipc: fix info leaks via msg_name in recv_msg/recv_stream 2013-05-01 09:41:05 -07:00
unix af_unix: If we don't care about credentials coallesce all messages 2013-05-01 09:41:07 -07:00
wanrouter
wimax
wireless nl80211: fix mgmt tx status and testmode reporting for netns 2013-08-11 15:38:41 -07:00
x25 x25: Fix broken locking in ioctl error paths. 2013-07-28 16:25:58 -07:00
xfrm
compat.c net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg 2013-06-27 11:27:32 -07:00
Kconfig
Makefile
nonet.c
socket.c net: Block MSG_CMSG_COMPAT in send(m)msg and recv(m)msg 2013-06-27 11:27:32 -07:00
sysctl_net.c