android_kernel_sony_msm8994/net
Herbert Xu 428d82f4c2
netlink: Fix dump skb leak/double free
When we free cb->skb after a dump, we do it after releasing the
lock.  This means that a new dump could have started in the time
being and we'll end up freeing their skb instead of ours.

This patch saves the skb and module before we unlock so we free
the right memory.

Fixes: 16b304f3404f ("netlink: Eliminate kmalloc in netlink dump operation.")
Reported-by: Baozeng Ding <sploving1@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-15 22:18:51 +02:00
..
9p 9p/trans_virtio.c: Fix broken zero-copy on vmalloc() buffers 2014-03-06 21:30:03 -08:00
802
8021q 8021q: fix a potential memory leak 2014-07-28 08:00:04 -07:00
appletalk appletalk: Fix socket referencing in skb 2014-07-28 08:00:05 -07:00
atm arch: Mass conversion of smp_mb__*() 2014-08-15 11:45:28 -07:00
ax25 net: add validation for the socket syscall protocol argument 2017-09-12 16:35:40 +02:00
batman-adv batman-adv: set up network coding packet handlers during module init 2013-11-20 12:27:47 -08:00
bluetooth bluetooth: Validate socket address length in sco_sock_bind(). 2017-09-12 16:41:36 +02:00
bridge This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
caif This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
can can: add missing initialisations in CAN related skbuffs 2015-03-26 15:00:58 +01:00
ceph libceph: introduce ceph_crypt() for in-place en/decryption 2017-09-02 18:04:02 +02:00
core net: fix infoleak in rtnetlink 2017-09-02 18:04:06 +02:00
dcb net: Use netlink_ns_capable to verify the permisions of netlink messages 2014-06-26 15:12:37 -04:00
dccp dccp: fix freeing skb too early for IPV6_RECVPKTINFO 2017-08-23 02:53:04 -07:00
decnet net: add validation for the socket syscall protocol argument 2017-09-12 16:35:40 +02:00
dns_resolver dns_resolver: Null-terminate the right string 2014-07-28 08:00:06 -07:00
dsa
ethernet
ieee802154 6lowpan: fix lockdep splats 2014-03-06 21:30:02 -08:00
ipc_router net: ipc_router: Register services only on client port 2017-01-02 21:16:25 -08:00
ipv4 ipv4: Don't do expensive useless work during inetdev destroy. 2017-09-14 17:05:41 +02:00
ipv6 netfilter: x_tables: don't move to non-existent next rule 2017-09-13 17:36:29 +02:00
ipx ipx: fix locking regression in ipx_sendmsg and ipx_recvmsg 2014-12-06 15:05:47 -08:00
irda net: add validation for the socket syscall protocol argument 2017-09-12 16:35:40 +02:00
iucv Merge upstream tag 'v3.10.49' into msm-3.10 2014-08-20 13:23:09 -07:00
key Merge upstream linux-stable v3.10.28 into msm-3.10 2014-03-24 14:28:34 -07:00
l2tp l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() 2017-03-17 05:49:35 -07:00
lapb
llc net: llc: use correct size for sysctl timeout entries 2015-04-19 10:10:50 +02:00
mac80211 This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
mac802154
netfilter netfilter: x_tables: check for size overflow 2017-09-14 17:05:36 +02:00
netlabel
netlink netlink: Fix dump skb leak/double free 2017-09-15 22:18:51 +02:00
netrom net: rework recvmsg handler msg_name and msg_namelen logic 2013-12-08 07:29:25 -08:00
nfc 32.1.A.1.185 2016-04-09 16:46:03 +02:00
openvswitch openvswitch: fix panic with multiple vlan headers 2014-10-15 08:31:57 +02:00
packet Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.16' into HEAD 2017-09-11 19:49:59 +02:00
phonet Merge upstream tag 'v3.10.49' into msm-3.10 2014-08-20 13:23:09 -07:00
rds This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
rfkill 32.1.A.1.185 2016-04-09 16:46:03 +02:00
rmnet_data net: rmnet_data: Fix incorrect netlink handling 2017-01-26 09:47:45 -08:00
rose net: rose: restore old recvmsg behavior 2014-01-15 15:28:49 -08:00
rxrpc net: add length argument to skb_copy_and_csum_datagram_iovec 2017-09-02 18:04:00 +02:00
sched This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
sctp sctp: validate chunk len before actually using it 2017-09-15 22:16:49 +02:00
sunrpc This is the 3.10.84 stable release 2015-08-13 14:38:09 -07:00
tipc tipc: clear 'next'-pointer of message fragments before reassembly 2014-07-28 08:00:05 -07:00
unix unix: properly account for FDs passed over unix sockets 2017-09-02 18:03:57 +02:00
vmw_vsock net: rework recvmsg handler msg_name and msg_namelen logic 2013-12-08 07:29:25 -08:00
wimax
wireless Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.16' into HEAD 2017-09-11 19:49:59 +02:00
x25 net: rework recvmsg handler msg_name and msg_namelen logic 2013-12-08 07:29:25 -08:00
xfrm Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.15' into HEAD 2017-09-02 17:48:55 +02:00
activity_stats.c
compat.c net: compat: Update get_compat_msghdr() to match copy_msghdr_from_user() behaviour 2015-03-26 15:00:56 +01:00
Kconfig kernel: remove CONFIG_USE_GENERIC_SMP_HELPERS cleanly 2014-07-09 13:21:25 +03:00
Makefile msm: ipc: Support multi-platform 2014-01-13 13:51:09 -07:00
nonet.c
socket.c Merge remote-tracking branch 'caf/LA.BF64.1.2.3_rb1.6' into HEAD 2017-01-31 13:27:32 +01:00
sysctl_net.c net: Update the sysctl permissions handler to test effective uid/gid 2013-10-13 16:08:34 -07:00