binder: 20370:20397 transaction failed 29189/-3, size 0-0 line 2963 binder: undelivered TRANSACTION_ERROR: 29189 binder: release 20370:20397 transaction 48 in, still active binder: send failed reply for transaction 48 to 20370:20397 ================================================================== BUG: KASAN: use-after-free in __list_del_entry_valid+0xe7/0xf3 lib/list_debug.c:54 binder: 20403:20415 ERROR: BC_REGISTER_LOOPER called without request Read of size 8 at addr ffff8801d2d80110 by task kworker/1:3/4960 CPU: 1 PID: 4960 Comm: kworker/1:3 Not tainted 4.17.0-rc2+ #15 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:77 [inline] dump_stack+0x1b9/0x294 lib/dump_stack.c:113 binder: 20415 RLIMIT_NICE not set print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:412 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 __list_del_entry_valid+0xe7/0xf3 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+0x114/0x4b0 drivers/android/binder.c:4191 binder: BINDER_SET_CONTEXT_MGR already set binder_thread_release+0x519/0x660 drivers/android/binder.c:4396 binder_deferred_release drivers/android/binder.c:4939 [inline] binder_deferred_func+0x6ce/0x1320 drivers/android/binder.c:5022 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 Allocated by task 20397: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] kasan_kmalloc+0xc4/0xe0 mm/kasan/kasan.c:553 kmem_cache_alloc_trace+0x152/0x780 mm/slab.c:3620 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] binder_transaction+0x144e/0x78b0 drivers/android/binder.c:2900 binder_thread_write+0xdbb/0x2c30 drivers/android/binder.c:3513 binder_ioctl_write_read.isra.41+0x2be/0xaf0 drivers/android/binder.c:4451 binder_ioctl+0xcbe/0x13fd drivers/android/binder.c:4591 vfs_ioctl fs/ioctl.c:46 [inline] file_ioctl fs/ioctl.c:500 [inline] do_vfs_ioctl+0x1cf/0x16a0 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 __do_sys_ioctl fs/ioctl.c:708 [inline] __se_sys_ioctl fs/ioctl.c:706 [inline] __x64_sys_ioctl+0x73/0xb0 fs/ioctl.c:706 do_syscall_64+0x1b1/0x800 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 4960: save_stack+0x43/0xd0 mm/kasan/kasan.c:448 set_track mm/kasan/kasan.c:460 [inline] __kasan_slab_free+0x11a/0x170 mm/kasan/kasan.c:521 kasan_slab_free+0xe/0x10 mm/kasan/kasan.c:528 __cache_free mm/slab.c:3498 [inline] kfree+0xd9/0x260 mm/slab.c:3813 binder_free_transaction+0x6a/0xa0 drivers/android/binder.c:1966 binder_send_failed_reply+0x214/0x290 drivers/android/binder.c:2005 binder_thread_release+0x504/0x660 drivers/android/binder.c:4395 binder_deferred_release drivers/android/binder.c:4939 [inline] binder_deferred_func+0x6ce/0x1320 drivers/android/binder.c:5022 process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 kthread+0x345/0x410 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:412 The buggy address belongs to the object at ffff8801d2d80100 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 16 bytes inside of 192-byte region [ffff8801d2d80100, ffff8801d2d801c0) The buggy address belongs to the page: page:ffffea00074b6000 count:1 mapcount:0 mapping:ffff8801d2d80000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801d2d80000 0000000000000000 0000000100000010 raw: ffffea00074b6520 ffffea00074be7e0 ffff8801da800040 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801d2d80000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801d2d80080: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8801d2d80100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801d2d80180: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801d2d80200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================