binder_alloc: 26626: binder_alloc_buf, no vma binder: 26626:26667 transaction failed 29189/-3, size 0-0 line 2963 binder: release 26626:26646 transaction 100 in, still active binder: send failed reply for transaction 100 to 26626:26646 ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0x144/0x150 lib/list_debug.c:54 Read of size 8 at addr ffff8801d36f6f10 by task kworker/1:3/13710 CPU: 1 PID: 13710 Comm: kworker/1:3 Not tainted 4.16.0-rc5+ #356 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events binder_deferred_func Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x194/0x24d lib/dump_stack.c:53 print_address_description+0x73/0x250 mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report+0x23c/0x360 mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __list_del_entry_valid+0x144/0x150 lib/list_debug.c:54 __list_del_entry include/linux/list.h:117 [inline] list_del_init include/linux/list.h:159 [inline] binder_dequeue_work_head_ilocked drivers/android/binder.c:893 [inline] binder_dequeue_work_head drivers/android/binder.c:913 [inline] binder_release_work+0x163/0x490 drivers/android/binder.c:4191 binder_thread_release+0x4d0/0x720 drivers/android/binder.c:4396 binder_deferred_release drivers/android/binder.c:4939 [inline] binder_deferred_func+0x4f4/0x1340 drivers/android/binder.c:5022 process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406 Allocated by task 26646: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:552 kmem_cache_alloc_trace+0x136/0x740 mm/slab.c:3607 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] binder_transaction+0x13c1/0x81c0 drivers/android/binder.c:2900 binder_thread_write+0xb50/0x3840 drivers/android/binder.c:3513 binder_ioctl_write_read.isra.38+0x261/0xcb0 drivers/android/binder.c:4451 binder_ioctl+0xb72/0x1417 drivers/android/binder.c:4591 vfs_ioctl fs/ioctl.c:46 [inline] do_vfs_ioctl+0x1b1/0x1520 fs/ioctl.c:686 SYSC_ioctl fs/ioctl.c:701 [inline] SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692 do_syscall_64+0x281/0x940 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 Freed by task 13710: save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:520 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:527 __cache_free mm/slab.c:3485 [inline] kfree+0xd9/0x260 mm/slab.c:3800 binder_free_transaction+0x6a/0x90 drivers/android/binder.c:1966 binder_send_failed_reply+0x1c9/0x380 drivers/android/binder.c:2005 binder_thread_release+0x4bb/0x720 drivers/android/binder.c:4395 binder_deferred_release drivers/android/binder.c:4939 [inline] binder_deferred_func+0x4f4/0x1340 drivers/android/binder.c:5022 process_one_work+0xc47/0x1bb0 kernel/workqueue.c:2113 worker_thread+0x223/0x1990 kernel/workqueue.c:2247 kthread+0x33c/0x400 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:406 The buggy address belongs to the object at ffff8801d36f6f00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 16 bytes inside of 192-byte region [ffff8801d36f6f00, ffff8801d36f6fc0) The buggy address belongs to the page: page:ffffea00074dbd80 count:1 mapcount:0 mapping:ffff8801d36f6000 index:0xffff8801d36f6900 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801d36f6000 ffff8801d36f6900 000000010000000c raw: ffffea000740e0e0 ffffea0006c8c2e0 ffff8801dac00040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d36f6e00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801d36f6e80: 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801d36f6f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d36f6f80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801d36f7000: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ==================================================================