binder: 4504:4556 transaction failed 29189/-22, size 0-0 line 2848 binder: send failed reply for transaction 19 to 4488:4515 binder: 4547:4548 ERROR: BC_REGISTER_LOOPER called without request ================================================================== binder: 4547:4548 got new transaction with bad transaction stack, transaction 42 has target 4547:0 BUG: KASAN: use-after-free in __list_del_entry_valid+0xe7/0xf3 lib/list_debug.c:54 Read of size 8 at addr ffff8801b5ca3310 by task kworker/1:1/25 CPU: 1 PID: 25 Comm: kworker/1:1 Not tainted 4.16.0+ #17 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: 4547:4548 transaction failed 29201/-71, size 0-0 line 2875 print_address_description+0x6c/0x20b mm/kasan/report.c:256 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report.cold.7+0xac/0x2f5 mm/kasan/report.c:412 binder: 4503:4533 BC_INCREFS_DONE u0000000000000000 no match __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: 4503:4533 DecRefs 0 refcount change on invalid ref 2 ret -22 binder_thread_release+0x519/0x660 drivers/android/binder.c:4396 binder: 4503:4533 DecRefs 0 refcount change on invalid ref 4 ret -22 binder_deferred_release drivers/android/binder.c:4939 [inline] binder_deferred_func+0x6ce/0x1320 drivers/android/binder.c:5022 binder: 4503:4533 BC_CLEAR_DEATH_NOTIFICATION invalid ref 2 binder: 4502:4527 BC_INCREFS_DONE u0000000000000000 no match process_one_work+0xc1e/0x1b50 kernel/workqueue.c:2145 binder: 4502:4527 DecRefs 0 refcount change on invalid ref 2 ret -22 binder: 4502:4527 DecRefs 0 refcount change on invalid ref 4 ret -22 binder: 4502:4527 BC_CLEAR_DEATH_NOTIFICATION invalid ref 2 binder: 4504:4528 BC_INCREFS_DONE u0000000000000000 no match binder: 4504:4528 DecRefs 0 refcount change on invalid ref 2 ret -22 worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 binder: 4504:4528 DecRefs 0 refcount change on invalid ref 4 ret -22 binder: 4504:4528 BC_CLEAR_DEATH_NOTIFICATION invalid ref 2 binder: 4551:4552 ERROR: BC_REGISTER_LOOPER called without request binder: release 4547:4548 transaction 42 out, still active kthread+0x345/0x410 kernel/kthread.c:238 binder: release 4547:4548 transaction 40 in, still active ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:411 binder: undelivered TRANSACTION_COMPLETE Allocated by task 4515: 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 binder: undelivered TRANSACTION_ERROR: 29201 kmalloc include/linux/slab.h:512 [inline] kzalloc include/linux/slab.h:701 [inline] binder_transaction+0x144e/0x7930 drivers/android/binder.c:2900 binder_thread_write+0xdbb/0x2c40 drivers/android/binder.c:3513 binder_ioctl_write_read.isra.41+0x2be/0xaf0 drivers/android/binder.c:4451 binder: 4504:4528 BC_REQUEST_DEATH_NOTIFICATION invalid ref 2 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/0x1650 fs/ioctl.c:684 ksys_ioctl+0xa9/0xd0 fs/ioctl.c:701 SYSC_ioctl fs/ioctl.c:708 [inline] SyS_ioctl+0x24/0x30 fs/ioctl.c:706 do_syscall_64+0x29e/0x9d0 arch/x86/entry/common.c:287 entry_SYSCALL_64_after_hwframe+0x42/0xb7 binder: 4503:4533 BC_REQUEST_DEATH_NOTIFICATION invalid ref 2 Freed by task 25: 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: 4502:4527 BC_REQUEST_DEATH_NOTIFICATION invalid ref 2 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 binder: 4554:4555 ERROR: BC_REGISTER_LOOPER called without request worker_thread+0x1cc/0x1440 kernel/workqueue.c:2279 binder: BINDER_SET_CONTEXT_MGR already set kthread+0x345/0x410 kernel/kthread.c:238 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:411 The buggy address belongs to the object at ffff8801b5ca3300 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 16 bytes inside of 192-byte region [ffff8801b5ca3300, ffff8801b5ca33c0) The buggy address belongs to the page: page:ffffea0006d728c0 count:1 mapcount:0 mapping:ffff8801b5ca3000 index:0x0 flags: 0x2fffc0000000100(slab) raw: 02fffc0000000100 ffff8801b5ca3000 0000000000000000 0000000100000010 binder: 4565:4572 ioctl 40046207 0 returned -16 raw: ffffea0007659b60 ffffea000765dd60 ffff8801dac00040 0000000000000000 binder: 4565:4572 ERROR: BC_REGISTER_LOOPER called without request page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8801b5ca3200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff8801b5ca3280: 00 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc >ffff8801b5ca3300: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8801b5ca3380: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8801b5ca3400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================