binder: send failed reply for transaction 72, target dead ================================================================== BUG: KASAN: slab-out-of-bounds in strnlen+0xc1/0xd0 lib/string.c:498 Read of size 1 at addr ffff8801cd241350 by task syz-executor7/14685 CPU: 0 PID: 14685 Comm: syz-executor7 Not tainted 4.4.113-gef588ef #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 07cf148c17ef4295 ffff8800b653f580 ffffffff81d0278d ffffea0007349040 ffff8801cd241350 0000000000000000 ffff8801cd241350 ffff8800b653f850 ffff8800b653f5b8 ffffffff814fd053 ffff8801cd241350 Call Trace: [] __dump_stack lib/dump_stack.c:15 [inline] [] dump_stack+0xc1/0x124 lib/dump_stack.c:51 [] print_address_description+0x73/0x260 mm/kasan/report.c:252 [] kasan_report_error mm/kasan/report.c:351 [inline] [] kasan_report+0x285/0x370 mm/kasan/report.c:408 [] __asan_report_load1_noabort+0x14/0x20 mm/kasan/report.c:426 [] strnlen+0xc1/0xd0 lib/string.c:498 [] string.isra.4+0x4c/0x240 lib/vsprintf.c:518 [] vsnprintf+0x766/0x15f0 lib/vsprintf.c:1907 [] __request_module+0x14f/0x810 kernel/kmod.c:146 [] xt_request_find_target+0x8b/0xb0 net/netfilter/x_tables.c:255 [] check_compat_entry_size_and_hooks net/ipv4/netfilter/ip_tables.c:1490 [inline] [] translate_compat_table+0x568/0x1760 net/ipv4/netfilter/ip_tables.c:1582 [] ? 0xffffffff810002b8 [] compat_do_replace.isra.15+0x1f1/0x410 net/ipv4/netfilter/ip_tables.c:1690 [] compat_do_ipt_set_ctl+0x106/0x150 net/ipv4/netfilter/ip_tables.c:1721 [] compat_nf_sockopt net/netfilter/nf_sockopt.c:143 [inline] [] compat_nf_setsockopt+0x88/0x130 net/netfilter/nf_sockopt.c:155 [] compat_ip_setsockopt+0x9d/0xf0 net/ipv4/ip_sockglue.c:1255 [] inet_csk_compat_setsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:914 [] compat_tcp_setsockopt+0x3d/0x70 net/ipv4/tcp.c:2643 [] compat_sock_common_setsockopt+0xb2/0x140 net/core/sock.c:2670 [] C_SYSC_setsockopt net/compat.c:384 [inline] [] compat_SyS_setsockopt+0x149/0x290 net/compat.c:367 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 Allocated by task 14685: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_kmalloc+0xad/0xe0 mm/kasan/kasan.c:616 [] __kmalloc+0x124/0x320 mm/slub.c:3613 [] kmalloc include/linux/slab.h:481 [inline] [] xt_alloc_table_info+0x71/0x100 net/netfilter/x_tables.c:911 [] compat_do_replace.isra.15+0x16b/0x410 net/ipv4/netfilter/ip_tables.c:1679 [] compat_do_ipt_set_ctl+0x106/0x150 net/ipv4/netfilter/ip_tables.c:1721 [] compat_nf_sockopt net/netfilter/nf_sockopt.c:143 [inline] [] compat_nf_setsockopt+0x88/0x130 net/netfilter/nf_sockopt.c:155 [] compat_ip_setsockopt+0x9d/0xf0 net/ipv4/ip_sockglue.c:1255 [] inet_csk_compat_setsockopt+0x95/0x120 net/ipv4/inet_connection_sock.c:914 [] compat_tcp_setsockopt+0x3d/0x70 net/ipv4/tcp.c:2643 [] compat_sock_common_setsockopt+0xb2/0x140 net/core/sock.c:2670 [] C_SYSC_setsockopt net/compat.c:384 [inline] [] compat_SyS_setsockopt+0x149/0x290 net/compat.c:367 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 Freed by task 9867: [] save_stack_trace+0x26/0x50 arch/x86/kernel/stacktrace.c:63 [] save_stack+0x43/0xd0 mm/kasan/kasan.c:512 [] set_track mm/kasan/kasan.c:524 [inline] [] kasan_slab_free+0x72/0xc0 mm/kasan/kasan.c:589 [] slab_free_hook mm/slub.c:1383 [inline] [] slab_free_freelist_hook mm/slub.c:1405 [inline] [] slab_free mm/slub.c:2859 [inline] [] kfree+0xfc/0x300 mm/slub.c:3749 [] iter_file_splice_write+0x4a3/0xae0 fs/splice.c:1053 [] do_splice_from fs/splice.c:1128 [inline] [] direct_splice_actor+0x125/0x180 fs/splice.c:1294 [] splice_direct_to_actor+0x2d2/0x830 fs/splice.c:1247 [] do_splice_direct+0x1a7/0x270 fs/splice.c:1337 [] do_sendfile+0x54c/0xd30 fs/read_write.c:1227 [] C_SYSC_sendfile fs/read_write.c:1303 [inline] [] compat_SyS_sendfile+0xd1/0x160 fs/read_write.c:1292 [] do_syscall_32_irqs_on arch/x86/entry/common.c:390 [inline] [] do_fast_syscall_32+0x314/0x890 arch/x86/entry/common.c:457 [] sysenter_flags_fixed+0xd/0x17 The buggy address belongs to the object at ffff8801cd241280 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 208 bytes inside of 256-byte region [ffff8801cd241280, ffff8801cd241380) The buggy address belongs to the page: ------------[ cut here ]------------ kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 19 Comm: kworker/u4:1 Not tainted 4.4.113-gef588ef #26 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: binder binder_deferred_func task: ffff8801d982af80 task.stack: ffff8801d9900000 RIP: 0010:[] [] __rb_change_child include/linux/rbtree_augmented.h:125 [inline] RIP: 0010:[] [] __rb_rotate_set_parents lib/rbtree.c:93 [inline] RIP: 0010:[] [] __rb_insert lib/rbtree.c:181 [inline] RIP: 0010:[] [] rb_insert_color+0x1d0/0xcb0 lib/rbtree.c:420 RSP: 0018:ffff8801db307d18 EFLAGS: 00010806 RAX: ffff8801db319c40 RBX: ffffea0007349040 RCX: 1000000000000012 RDX: dffffc0000000000 RSI: ffff8801db319710 RDI: ffffea0007349050 RBP: ffff8801db307d60 R08: ffffffff857d3748 R09: 0000000000000001 R10: 0000000000000000 R11: 1ffff1003b660f62 R12: 8000000000000090 R13: 8000000000000080 R14: 8000000000000080 R15: ffff8801db319c48 FS: 0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000008ad11b4 CR3: 00000001c7002000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff842bdb20 ffff8801d982b7f0 0000000000000003 ffff8801db307d70 ffff8801db319c40 dffffc0000000000 0000000000000000 ffff8801db319710 ffff8800b122fe00 ffff8801db307db0 ffffffff81d20067 ffff8801db319c58 Call Trace: [] timerqueue_add+0x157/0x2a0 lib/timerqueue.c:57 [] enqueue_hrtimer+0x168/0x450 kernel/time/hrtimer.c:890 [] __run_hrtimer kernel/time/hrtimer.c:1268 [inline] [] __hrtimer_run_queues+0x732/0xfe0 kernel/time/hrtimer.c:1317 [] hrtimer_interrupt+0x1a6/0x440 kernel/time/hrtimer.c:1351 [] local_apic_timer_interrupt+0x6a/0xb0 arch/x86/kernel/apic/apic.c:901 [] smp_apic_timer_interrupt+0x76/0xa0 arch/x86/kernel/apic/apic.c:925 [] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:737 [] smp_call_function_many+0x47d/0x720 kernel/smp.c:435 [] smp_call_function+0x5d/0xa0 kernel/smp.c:491 [] on_each_cpu+0x2f/0xc0 kernel/smp.c:597 [] flush_tlb_kernel_range+0xc6/0xd0 arch/x86/mm/tlb.c:397 [] unmap_kernel_range+0x2b/0x30 mm/vmalloc.c:1290 [] binder_alloc_deferred_release+0x2dc/0x640 drivers/android/binder_alloc.c:789 [] binder_free_proc drivers/android/binder.c:4468 [inline] [] binder_proc_dec_tmpref+0x157/0x200 drivers/android/binder.c:2061 [] binder_deferred_release drivers/android/binder.c:5128 [inline] [] binder_deferred_func+0x9d4/0xd10 drivers/android/binder.c:5154 [] process_one_work+0x7d7/0x16e0 kernel/workqueue.c:2064 [] worker_thread+0xd9/0xfc0 kernel/workqueue.c:2196 [] kthread+0x268/0x300 kernel/kthread.c:211 [] ret_from_fork+0x55/0x80 arch/x86/entry/entry_64.S:506 Code: 48 c1 e9 03 80 3c 11 00 0f 85 83 06 00 00 4d 85 ed 48 89 03 74 5b 4d 8d 65 10 48 ba 00 00 00 00 00 fc ff df 4c 89 e1 48 c1 e9 03 <80> 3c 11 00 0f 85 19 07 00 00 49 3b 5d 10 0f 84 eb 04 00 00 49 RIP [] __rb_change_child include/linux/rbtree_augmented.h:125 [inline] RIP [] __rb_rotate_set_parents lib/rbtree.c:93 [inline] RIP [] __rb_insert lib/rbtree.c:181 [inline] RIP [] rb_insert_color+0x1d0/0xcb0 lib/rbtree.c:420 RSP ---[ end trace 4b3d5d8a3c2e0d29 ]---