random: sshd: uninitialized urandom read (32 bytes read, 125 bits of entropy available) ================================================================== BUG: KASAN: slab-out-of-bounds in strnlen+0xc1/0xd0 lib/string.c:498 Read of size 1 at addr ffff8800b415aad0 by task syzkaller338142/3316 CPU: 0 PID: 3316 Comm: syzkaller338142 Not tainted 4.4.113-ge70c132 #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 0000000000000000 14f2d61e3e3a496e ffff8800b43df718 ffffffff81d0278d ffffea0002d05680 ffff8800b415aad0 0000000000000000 ffff8800b415aad0 ffff8800b43df9e8 ffff8800b43df750 ffffffff814fd053 ffff8800b415aad0 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 [] udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2154 [] 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 3316: [] 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 [] udp_setsockopt+0x45/0x80 net/ipv4/udp.c:2154 [] 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 1773: [] 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 [] kernfs_fop_release+0xff/0x140 fs/kernfs/file.c:737 [] __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 ffff8800b415aa00 which belongs to the cache kmalloc-256 of size 256 The buggy address is located 208 bytes inside of 256-byte region [ffff8800b415aa00, ffff8800b415ab00) The buggy address belongs to the page: BUG: unable to handle kernel paging request at fffffbfff3602d20 IP: [] cpuacct_charge+0x14c/0x390 kernel/sched/cpuacct.c:247 PGD 21ff67067 PUD 21ff66067 PMD 0 Oops: 0000 [#1] PREEMPT SMP KASAN Dumping ftrace buffer: (ftrace buffer empty) Modules linked in: CPU: 1 PID: 183 Comm: kworker/1:1 Not tainted 4.4.113-ge70c132 #34 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events vmstat_shepherd task: ffff8800bb8bc740 task.stack: ffff8801d9420000 RIP: 0010:[] [] cpuacct_charge+0x14c/0x390 kernel/sched/cpuacct.c:247 RSP: 0018:ffff8801d94278a0 EFLAGS: 00010046 RAX: 1ffffffff0854fff RBX: 0000000000018528 RCX: ffffffff847eb500 RDX: fffffbfff3602d20 RSI: ffffffff9b016900 RDI: ffffffff842a7ff8 RBP: ffff8801d94278e8 R08: 0000000000000001 R09: 0000000000000001 R10: 0000000000000000 R11: 1ffff1003b284ee0 R12: ffffffff842a7f20 R13: dffffc0000000000 R14: 000000001d35d8c6 R15: 0000000002d05680 FS: 0000000000000000(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: fffffbfff3602d20 CR3: 00000000b7980000 CR4: 0000000000160670 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Stack: ffffffff8122a430 ffff8801d94278d0 0000000000000046 0000000000000003 ffff8801d2348060 ffffffff83844340 000000001d35d8c6 ffff8801d23480b0 ffff8801d2348000 ffff8801d9427938 ffffffff811dbea7 ffff8801db21f4c0 Call Trace: [] update_curr+0x2c7/0x6c0 kernel/sched/fair.c:882 [] enqueue_entity kernel/sched/fair.c:3511 [inline] [] enqueue_task_fair+0x313/0x2940 kernel/sched/fair.c:4694 [] enqueue_task kernel/sched/core.c:856 [inline] [] activate_task+0x148/0x270 kernel/sched/core.c:872 [] ttwu_activate kernel/sched/core.c:1734 [inline] [] ttwu_do_activate.constprop.131+0xbf/0x1e0 kernel/sched/core.c:1787 [] ttwu_queue kernel/sched/core.c:1932 [inline] [] try_to_wake_up+0x68d/0xf60 kernel/sched/core.c:2066 [] wake_up_process+0x15/0x20 kernel/sched/core.c:2140 [] wake_up_worker kernel/workqueue.c:846 [inline] [] insert_work+0x171/0x210 kernel/workqueue.c:1318 [] __queue_work+0x3dc/0xea0 kernel/workqueue.c:1433 [] __queue_delayed_work+0x237/0x390 kernel/workqueue.c:1495 [] queue_delayed_work_on+0x59/0xb0 kernel/workqueue.c:1533 [] vmstat_shepherd+0x1c1/0x220 mm/vmstat.c:1488 [] 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: 89 f2 48 c1 ea 03 4c 01 ea 49 8d bc 24 d8 00 00 00 48 89 f8 48 c1 e8 03 42 80 3c 28 00 0f 85 9e 01 00 00 49 8b 9c 24 d8 00 00 00 <80> 3a 00 0f 85 0a 02 00 00 4a 03 1c f9 48 89 d8 48 c1 e8 03 42 RIP [] cpuacct_charge+0x14c/0x390 kernel/sched/cpuacct.c:247 RSP CR2: fffffbfff3602d20 ---[ end trace 969bce89233f17c3 ]---