Edward Cree
8c057efaeb
net: core: fix uses-after-free in list processing
...
In netif_receive_skb_list_internal(), all of skb_defer_rx_timestamp(),
do_xdp_generic() and enqueue_to_backlog() can lead to kfree(skb). Thus,
we cannot wait until after they return to remove the skb from the list;
instead, we remove it first and, in the pass case, add it to a sublist
afterwards.
In the case of enqueue_to_backlog() we have already decided not to pass
when we call the function, so we do not need a sublist.
Fixes: 7da517a3bc ("net: core: Another step of skb receive list processing")
Reported-by: Dan Carpenter <[email protected] >
Signed-off-by: Edward Cree <[email protected] >
Signed-off-by: David S. Miller <[email protected] >
2018-07-09 14:55:53 -07:00
..
6lowpan
9p
802
8021q
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
appletalk
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
atm
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
ax25
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
batman-adv
net: drivers/net: Convert random_ether_addr to eth_random_addr
2018-06-23 10:49:14 +09:00
bluetooth
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
bpf
bpfilter
bpfilter: include bpfilter_umh in assembly instead of using objcopy
2018-06-28 21:39:16 +09:00
bridge
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-06-16 07:39:34 +09:00
caif
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
can
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
ceph
The main piece is a set of libceph changes that revamps how OSD
2018-06-15 07:24:58 +09:00
core
net: core: fix uses-after-free in list processing
2018-07-09 14:55:53 -07:00
dcb
dccp
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
decnet
net: decnet: dn_nsp_in: mark expected switch fall-through
2018-07-05 20:25:29 +09:00
dns_resolver
dsa
net: sched: pass extack pointer to block binds and cb registration
2018-06-26 23:21:32 +09:00
ethernet
net: Convert GRO SKB handling to list_head.
2018-06-26 11:33:04 +09:00
hsr
ieee802154
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
ife
ipv4
tcp: remove redundant SOCK_DONE checks
2018-07-08 17:14:58 +09:00
ipv6
ip: unconditionally set cork gso_size
2018-07-07 10:58:49 +09:00
iucv
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
kcm
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
key
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
l2tp
ipv6: fold sockcm_cookie into ipcm6_cookie
2018-07-07 10:58:49 +09:00
l3mdev
lapb
llc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
mac80211
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
mac802154
mpls
ncsi
net/ncsi: Use netdev_dbg for debug messages
2018-06-20 07:26:58 +09:00
netfilter
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
netlabel
netlink
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
netrom
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
nfc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
nsh
openvswitch
openvswitch: kernel datapath clone action
2018-07-08 11:13:25 +09:00
packet
sock: sockc cookie initializer
2018-07-07 10:58:49 +09:00
phonet
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
psample
qrtr
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
rds
rds: clean up loopback rds_connections on netns deletion
2018-06-27 10:11:03 +09:00
rfkill
rose
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
rxrpc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
sched
net: sched: Fix warnings from xchg() on RCU'd cookie pointer.
2018-07-08 17:02:59 +09:00
sctp
sctp: check for ipv6_pinfo legal sndflow with flowlabel in sctp_v6_get_dst
2018-07-04 11:36:54 +09:00
smc
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
strparser
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
sunrpc
NFS client bugfixes for Linux 4.18
2018-06-22 06:21:34 +09:00
switchdev
tipc
tipc: extend link reset criteria for stale packet retransmission
2018-07-07 21:16:01 +09:00
tls
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
unix
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
vmw_vsock
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
wimax
wireless
Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net
2018-07-03 10:29:26 +09:00
x25
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
xdp
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
xfrm
compat.c
Kconfig
Makefile
bpfilter: check compiler capability in Kconfig
2018-06-28 13:36:39 +09:00
socket.c
net: handle NULL ->poll gracefully
2018-06-29 06:51:51 -07:00
sysctl_net.c