================================================================== BUG: KASAN: slab-out-of-bounds in strnlen+0xc1/0xd0 lib/string.c:498 Read of size 1 at addr ffff8800b3d7fad0 by task syzkaller099913/3318 CPU: 1 PID: 3318 Comm: syzkaller099913 Not tainted 4.4.113-ge70c132 #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 be618883e4fbbd92 ffff8801d012f710 ffffffff81d0278d ffffea0002cf5fc0 ffff8800b3d7fad0 0000000000000000 ffff8800b3d7fad0 ffff8801d012f9e0 ffff8801d012f748 ffffffff814fd053 ffff8800b3d7fad0 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 [] find_check_entry net/ipv4/netfilter/ip_tables.c:685 [inline] [] translate_table+0x12c1/0x1cf0 net/ipv4/netfilter/ip_tables.c:872 [] ? 0xffffffff810002b8 [] do_replace net/ipv4/netfilter/ip_tables.c:1289 [inline] [] do_ipt_set_ctl+0x2a3/0x450 net/ipv4/netfilter/ip_tables.c:1852 [] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:114 [] ip_setsockopt+0xa1/0xb0 net/ipv4/ip_sockglue.c:1226 [] tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2632 [] sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2659 [] SYSC_setsockopt net/socket.c:1767 [inline] [] SyS_setsockopt+0x160/0x250 net/socket.c:1746 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Allocated by task 3318: [] 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 [] do_replace net/ipv4/netfilter/ip_tables.c:1278 [inline] [] do_ipt_set_ctl+0x232/0x450 net/ipv4/netfilter/ip_tables.c:1852 [] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [] nf_setsockopt+0x67/0xc0 net/netfilter/nf_sockopt.c:114 [] ip_setsockopt+0xa1/0xb0 net/ipv4/ip_sockglue.c:1226 [] tcp_setsockopt+0x82/0xd0 net/ipv4/tcp.c:2632 [] sock_common_setsockopt+0x95/0xd0 net/core/sock.c:2659 [] SYSC_setsockopt net/socket.c:1767 [inline] [] SyS_setsockopt+0x160/0x250 net/socket.c:1746 [] entry_SYSCALL_64_fastpath+0x1c/0x98 Freed by task 1768: [] 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 [] seq_release+0x59/0x70 fs/seq_file.c:372 [] kernfs_fop_release+0xcb/0x140 fs/kernfs/file.c:735 [] __fput+0x233/0x6d0 fs/file_table.c:208 [] ____fput+0x15/0x20 fs/file_table.c:244 [] task_work_run+0x104/0x180 kernel/task_work.c:115 [] tracehook_notify_resume include/linux/tracehook.h:191 [inline] [] exit_to_usermode_loop+0x13d/0x160 arch/x86/entry/common.c:251 [] prepare_exit_to_usermode arch/x86/entry/common.c:282 [inline] [] syscall_return_slowpath+0x1b5/0x1f0 arch/x86/entry/common.c:347 [] int_ret_from_sys_call+0x25/0xa3 The buggy address belongs to the object at ffff8800b3d7fa00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 208 bytes inside of 256-byte region [ffff8800b3d7fa00, ffff8800b3d7fb00) The buggy address belongs to the page: PANIC: double fault, error_code: 0x0 CPU: 1 PID: 3318 Comm: syzkaller099913 Not tainted 4.4.113-ge70c132 #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff8800b53117c0 task.stack: ffff8801d0128000 RIP: 0010:[] [] dump_page_badflags+0x1a/0x250 mm/debug.c:84 RSP: 0018:ffff880100000000 EFLAGS: 00010086 RAX: ffff8800b53117c0 RBX: ffffea0002cf5fc0 RCX: ffffffff8148f8d0 RDX: 0000000000000000 RSI: ffffffff838a8de0 RDI: ffffea0002cf5fc0 RBP: ffff880100000030 R08: 0000000000000001 R09: 0000000000000000 R10: 0000000000000002 R11: fffffbfff0ad7e26 R12: 0000000000000000 R13: ffffffff838a8de0 R14: 0000000000000000 R15: 0000000000000000 FS: 000000000230b880(0063) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: ffff8800fffffff8 CR3: 00000001d2cda000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: Call Trace: Code: df 06 00 e9 1d fd ff ff 66 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 49 89 f5 41 54 49 89 d4 53 48 89 fb 48 83 ec 08 b1 04 ed ff 48 8d 7b 10 48 b8 00 00 00 00 00 fc ff df 48 89