android_kernel_sony_sdm845/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Subash Abhinov Kasiviswanathan 6709ad1462 dst: Use after free in __dst_destroy_metrics_generic
It appears as if memory of the __DST_METRICS_PTR(old) was freed in
some path and allocated to ion driver. ion driver has also freed it.
Finally the memory is freed by the fib gc and crashes since it is
already deallocated. Call stack for reference below -

[<ffffff83c0a289c0>] object_err+0x4c/0x5c
[<ffffff83c0a2b284>] free_debug_processing+0x2e0/0x398
[<ffffff83c0a2b63c>] __slab_free+0x300/0x3e0
[<ffffff83c0a2bfc8>] kfree+0x28c/0x290
[<ffffff83c16b9580>] __dst_destroy_metrics_generic+0x6c/0x78
[<ffffff83c17d3408>] ip6_dst_destroy+0xb0/0xb4
[<ffffff83c16b9714>] dst_destroy+0x88/0x174
[<ffffff83c17d7f64>] icmp6_dst_gc+0x90/0xc0
[<ffffff83c17db52c>] fib6_gc_timer_cb+0x40/0xc0
[<ffffff83c093aef4>] call_timer_fn+0x58/0x1d0
[<ffffff83c093b198>] expire_timers+0x100/0x18c
[<ffffff83c093b2bc>] run_timer_softirq+0x98/0x270
[<ffffff83c0881a00>] __do_softirq+0x150/0x438
[<ffffff83c08af59c>] irq_exit+0xe0/0x138

=====================================================
BUG kmalloc-128 (Tainted: G W  O   ): Object already free
------------------------------------------------------
Disabling lock debugging due to kernel taint
INFO: Allocated in alloc_largest_available+0x58/0x1f0 age=17 cpu=4 pid=649
alloc_debug_processing+0x114/0x1a0
___slab_alloc.constprop.72+0x654/0x690
__slab_alloc.isra.68.constprop.71+0x48/0x80
kmem_cache_alloc_trace+0x198/0x2c4
alloc_largest_available+0x58/0x1f0
ion_system_heap_allocate+0x1b0/0x6e8
__ion_alloc+0x180/0x988
ion_ioctl+0x26c/0x590
do_vfs_ioctl+0xcc/0x888
SyS_ioctl+0x90/0xa4
el0_svc_naked+0x24/0x28
INFO: Freed in process_info+0x188/0x1bc age=21 cpu=4 pid=649
free_debug_processing+0x180/0x398
__slab_free+0x300/0x3e0
kfree+0x28c/0x290
process_info+0x188/0x1bc
ion_system_heap_allocate+0x4b4/0x6e8
__ion_alloc+0x180/0x988
ion_ioctl+0x26c/0x590
do_vfs_ioctl+0xcc/0x888
SyS_ioctl+0x90/0xa4
el0_svc_naked+0x24/0x28

Fix the dst_metrics refcounting logic.

CRs-fixed: 2102892
Change-Id: Ia4472d082e6d89c50d2cf5074709f172d5715d86
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2017-09-08 16:39:10 -06:00
..
6lowpan
9p p9_client_readdir() fix 2017-05-03 08:36:38 -07:00
802
8021q net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev 2017-07-05 14:40:16 +02:00
appletalk
atm
ax25 ax25: Fix segfault after sock connection timeout 2017-02-04 09:47:09 +01:00
batman-adv batman-adv: Check for alloc errors when preparing TT local data 2016-12-02 10:46:59 +01:00
bluetooth This is the 4.9.40 stable release 2017-07-27 15:24:43 -07:00
bridge This is the 4.9.39 stable release 2017-07-21 08:55:50 +02:00
caif net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx 2017-07-05 14:40:14 +02:00
can can: Fix kernel panic at security_sock_rcv_skb 2017-02-18 15:11:40 +01:00
ceph libceph: force GFP_NOIO for socket allocations 2017-04-08 09:30:30 +02:00
core dst: Use after free in __dst_destroy_metrics_generic 2017-09-08 16:39:10 -06:00
dcb net: dcb: set error code on failures 2016-12-03 23:54:25 -05:00
dccp ipv6/dccp: do not inherit ipv6_mc_list from parent 2017-06-07 12:07:42 +02:00
decnet decnet: always not take dst->__refcnt when inserting dst into hash table 2017-07-05 14:40:16 +02:00
dns_resolver
dsa net: dsa: Check return value of phy_connect_direct() 2017-07-05 14:40:23 +02:00
ethernet net: introduce device min_header_len 2017-02-18 15:11:43 +01:00
hsr net/hsr: Remove unused but set variable 2016-10-18 10:28:18 -04:00
ieee802154
ipc_router soc: qcom: ipc_router: Improve IPC attribution 2017-08-07 11:02:51 -07:00
ipv4 Merge remote-tracking branch '4.9/tmp-9ae2c67' into 4.9 2017-07-28 16:52:35 -07:00
ipv6 Merge remote-tracking branch '4.9/tmp-e6b0c64f' into 4.9 2017-08-25 14:37:26 -07:00
ipx ipx: call ipxitf_put() in ioctl error path 2017-05-25 15:44:41 +02:00
irda irda: Fix lockdep annotations in hashbin_delete(). 2017-02-26 11:10:51 +01:00
iucv net/af_iucv: don't use paged skbs for TX on HiperSockets 2017-01-19 20:18:04 +01:00
kcm kcm: return immediately after copy_from_user() failure 2017-05-03 08:36:34 -07:00
key af_key: Add lock to key dump 2017-08-06 18:59:39 -07:00
l2tp This is the 4.9.41 stable release 2017-08-07 14:21:32 -07:00
l3mdev
lapb
llc net/llc: avoid BUG_ON() in skb_orphan() 2017-02-26 11:10:50 +01:00
mac80211 cfg80211: Rename SAE_DATA to more generic AUTH_DATA 2017-07-25 17:23:09 +05:30
mac802154
mpls mpls: Do not decrement alive counter for unregister events 2017-03-22 12:43:34 +01:00
ncsi net/ncsi: Improve HNCDSC AEN handler 2016-10-20 11:23:08 -04:00
netfilter Merge "netfilter: Change %p to %pK in debug messages" 2017-08-31 07:32:58 -07:00
netlabel
netlink Merge remote-tracking branch 'origin/tmp-69973b8' into msm-4.8 2016-12-12 10:21:46 -08:00
netrom
nfc NFC: Add sockaddr length checks before accessing sa_family in bind handlers 2017-07-27 15:07:56 -07:00
openvswitch openvswitch: Add missing case OVS_TUNNEL_KEY_ATTR_PAD 2017-03-30 09:41:21 +02:00
packet net/packet: fix missing net_device reference release 2017-06-07 12:07:43 +02:00
phonet
qrtr
rds rds: tcp: use sock_create_lite() to create the accept socket 2017-07-21 07:42:19 +02:00
rfkill ANDROID: rfkill: fix unused function warning 2017-05-12 14:41:44 +02:00
rmnet_data net: rmnet_data: Unset logical end points in bridge mode 2017-07-18 14:13:22 -06:00
rose
rxrpc rxrpc: Fix several cases where a padded len isn't checked in ticket decode 2017-06-29 13:00:31 +02:00
sched net: sched: Schedule PRIO qdisc when flow control released 2017-08-25 19:09:44 -06:00
sctp sctp: check af before verify address in sctp_addr_id2transport 2017-07-05 14:40:27 +02:00
strparser strparser: destroy workqueue on module exit 2017-03-22 12:43:33 +01:00
sunrpc sunrpc: use constant time memory comparison for mac 2017-07-27 15:08:05 -07:00
switchdev switchdev: Execute bridge ndos only for bridge ports 2016-10-19 10:58:04 -04:00
tipc tipc: allocate user memory with GFP_KERNEL flag 2017-07-05 14:40:27 +02:00
unix Merge remote-tracking branch '4.9/tmp-184ce81' into msm-4.9 2017-07-07 14:25:13 -07:00
vmw_vsock vsock/virtio: fix src/dst cid format 2017-01-09 08:32:23 +01:00
wimax
wireless nl80211: Update ERP info using NL80211_CMD_UPDATE_CONNECT_PARAMS 2017-08-10 12:11:44 +05:30
x25
xfrm This is the 4.9.41 stable release 2017-08-07 14:21:32 -07:00
compat.c
Kconfig Merge remote-tracking branch '4.9/tmp-77d3588' into 4.9 2017-06-09 10:47:52 -07:00
Makefile net: ipc_router: Add snapshot of IPC Router 2016-11-11 17:02:27 -08:00
socket.c Merge "Merge remote-tracking branch '4.9/tmp-4979478' into msm-4.9" into msm-4.9 2017-04-19 11:43:23 -07:00
sysctl_net.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2016-10-06 09:52:23 -07:00