IPVS: length: 24 != 8 ================================================================== BUG: KASAN: slab-out-of-bounds in strnlen+0xc1/0xd0 lib/string.c:498 Read of size 1 at addr ffff8801d413a350 by task syz-executor3/4620 CPU: 1 PID: 4620 Comm: syz-executor3 Not tainted 4.4.113-ge70c132 #27 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 ddde6458495441b5 ffff8801d161f580 ffffffff81d0278d ffffea0007504e80 ffff8801d413a350 0000000000000000 ffff8801d413a350 ffff8801d161f850 ffff8801d161f5b8 ffffffff814fd053 ffff8801d413a350 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 4620: [] 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 3016: [] 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 [] free_bprm+0x19d/0x200 fs/exec.c:1246 [] do_execveat_common.isra.33+0x1711/0x1e60 fs/exec.c:1644 [] do_execve fs/exec.c:1679 [inline] [] SYSC_execve fs/exec.c:1760 [inline] [] SyS_execve+0x42/0x50 fs/exec.c:1755 [] return_from_execve+0x0/0x23 The buggy address belongs to the object at ffff8801d413a280 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 208 bytes inside of 256-byte region [ffff8801d413a280, ffff8801d413a380) The buggy address belongs to the page: page:ffffea0007504e80 count:1 mapcount:-2146697203 mapping: (null) index:0x0 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: 0 PID: 710 Comm: kworker/u4:3 Not tainted 4.4.113-ge70c132 #27 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) task: ffff8801d7e78000 task.stack: ffff8801d7e80000 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:ffff8801db207d18 EFLAGS: 00010806 RAX: ffff8801db219c40 RBX: ffffea0007504e80 RCX: 1000000000000012 RDX: dffffc0000000000 RSI: ffff8801db219710 RDI: ffffea0007504e90 RBP: ffff8801db207d60 R08: ffffffff8580af08 R09: 0000000000000001 R10: 0000000000000000 R11: 1ffff1003b640f62 R12: 8000000000000090 R13: 8000000000000080 R14: 8000000000000080 R15: ffff8801db219c48 FS: 0000000000000000(0000) GS:ffff8801db200000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000008452798 CR3: 00000001d7446000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff842bdb20 ffff8801d7e78870 0000000000000005 ffff8801db207d70 ffff8801db219c40 dffffc0000000000 0000000000000000 ffff8801db219710 ffff8801cd717e00 ffff8801db207db0 ffffffff81d20067 ffff8801db219c58 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 [] rep_nop arch/x86/include/asm/processor.h:562 [inline] [] cpu_relax arch/x86/include/asm/processor.h:567 [inline] [] csd_lock_wait kernel/smp.c:111 [inline] [] smp_call_function_single+0x13e/0x3b0 kernel/smp.c:303 [] smp_call_function_many+0x47d/0x720 kernel/smp.c:435 [] native_flush_tlb_others+0xfe/0x710 arch/x86/mm/tlb.c:292 [] flush_tlb_others arch/x86/include/asm/paravirt.h:338 [inline] [] flush_tlb_mm_range+0x103/0x560 arch/x86/mm/tlb.c:358 [] flush_tlb_page arch/x86/include/asm/tlbflush.h:287 [inline] [] ptep_clear_flush+0xd5/0x110 mm/pgtable-generic.c:80 [] page_mkclean_one+0x10d/0x1e0 mm/rmap.c:1015 [] rmap_walk_file mm/rmap.c:1673 [inline] [] rmap_walk+0x275/0xa90 mm/rmap.c:1692 [] page_mkclean+0x135/0x1b0 mm/rmap.c:1059 [] clear_page_dirty_for_io+0x1a9/0x3e0 mm/page-writeback.c:2693 [] mpage_submit_page+0x77/0x230 fs/ext4/inode.c:1971 [] mpage_process_page_bufs+0x3c1/0x490 fs/ext4/inode.c:2095 [] mpage_prepare_extent_to_map+0x601/0x9f0 fs/ext4/inode.c:2473 [] ext4_writepages+0xb64/0x2cd0 fs/ext4/inode.c:2627 [] do_writepages+0xed/0x1c0 mm/page-writeback.c:2350 [] __writeback_single_inode+0xfd/0x1370 fs/fs-writeback.c:1284 [] writeback_sb_inodes+0x501/0xed0 fs/fs-writeback.c:1547 [] wb_writeback+0x2df/0xd20 fs/fs-writeback.c:1723 [] wb_do_writeback fs/fs-writeback.c:1857 [inline] [] wb_workfn+0x248/0xf70 fs/fs-writeback.c:1893 [] 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 0ad0c53123ddf959 ]---