[....] Starting periodic command scheduler: cron[?25l[?1c7[ ok 8[?25h[?0c. [....] Starting OpenBSD Secure Shell server: sshd[ 14.286246] random: sshd: uninitialized urandom read (32 bytes read) [?25l[?1c7[ ok 8[?25h[?0c. Debian GNU/Linux 7 syzkaller ttyS0 syzkaller login: [ 16.496287] random: sshd: uninitialized urandom read (32 bytes read) [ 16.866221] random: sshd: uninitialized urandom read (32 bytes read) [ 17.723035] random: sshd: uninitialized urandom read (32 bytes read) [ 17.855356] random: sshd: uninitialized urandom read (32 bytes read) Warning: Permanently added '10.128.0.11' (ECDSA) to the list of known hosts. [ 23.363155] random: sshd: uninitialized urandom read (32 bytes read) executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 23.483600] hrtimer: interrupt took 31668 ns executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program executing program [ 23.759862] ================================================================== [ 23.767621] BUG: KASAN: use-after-free in l2tp_session_queue_purge+0xf4/0x100 [ 23.774975] Read of size 4 at addr ffff8801cb587680 by task syz-executor177/3810 [ 23.782505] [ 23.784132] CPU: 0 PID: 3810 Comm: syz-executor177 Not tainted 4.9.110-g00a0bcb #4 [ 23.791942] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 23.801424] ffff8801b5ef7cb0 ffffffff81eb2329 ffffea00072d6180 ffff8801cb587680 executing program executing program executing program [ 23.809561] 0000000000000000 ffff8801cb587680 ffffffff83011be0 ffff8801b5ef7ce8 [ 23.817662] ffffffff81567a89 ffff8801cb587680 0000000000000004 0000000000000000 [ 23.825780] Call Trace: [ 23.828366] [] dump_stack+0xc1/0x128 [ 23.833729] [] ? sock_release+0x1c0/0x1c0 [ 23.839523] [] print_address_description+0x6c/0x234 [ 23.846212] [] ? sock_release+0x1c0/0x1c0 [ 23.852025] [] kasan_report.cold.6+0x242/0x2fe executing program executing program executing program [ 23.858700] [] ? l2tp_session_queue_purge+0xf4/0x100 [ 23.866071] [] __asan_report_load4_noabort+0x14/0x20 [ 23.872915] [] l2tp_session_queue_purge+0xf4/0x100 [ 23.879506] [] ? sock_release+0x1c0/0x1c0 [ 23.885324] [] pppol2tp_release+0x1fb/0x2e0 [ 23.891294] [] sock_release+0x96/0x1c0 [ 23.897102] [] sock_close+0x16/0x20 [ 23.902383] [] __fput+0x263/0x700 executing program executing program executing program [ 23.907492] [] ____fput+0x15/0x20 [ 23.912597] [] task_work_run+0x10c/0x180 [ 23.918482] [] exit_to_usermode_loop+0xfc/0x120 [ 23.924816] [] do_syscall_64+0x364/0x490 [ 23.930559] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 23.937484] [ 23.939159] Allocated by task 3824: [ 23.943392] save_stack_trace+0x16/0x20 [ 23.947381] save_stack+0x43/0xd0 [ 23.950866] kasan_kmalloc+0xc7/0xe0 [ 23.954721] __kmalloc+0x11d/0x300 executing program [ 23.958276] l2tp_session_create+0x38/0x16f0 [ 23.962789] pppol2tp_connect+0x10d7/0x18f0 [ 23.967104] SYSC_connect+0x1b8/0x300 [ 23.970896] SyS_connect+0x24/0x30 [ 23.974677] do_syscall_64+0x1a6/0x490 [ 23.978667] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 23.985011] [ 23.986648] Freed by task 3824: [ 23.990007] save_stack_trace+0x16/0x20 [ 23.993986] save_stack+0x43/0xd0 [ 23.997453] kasan_slab_free+0x72/0xc0 [ 24.001347] kfree+0xfb/0x310 [ 24.004474] l2tp_session_free+0x166/0x200 executing program executing program executing program [ 24.008739] l2tp_tunnel_closeall+0x284/0x350 [ 24.013250] l2tp_udp_encap_destroy+0x87/0xe0 [ 24.017918] udpv6_destroy_sock+0xb1/0xd0 [ 24.022423] sk_common_release+0x6d/0x300 [ 24.026587] udp_lib_close+0x15/0x20 [ 24.030306] inet_release+0xff/0x1d0 [ 24.034026] inet6_release+0x50/0x70 [ 24.037943] sock_release+0x96/0x1c0 [ 24.041656] sock_close+0x16/0x20 [ 24.045128] __fput+0x263/0x700 [ 24.048402] ____fput+0x15/0x20 [ 24.051687] task_work_run+0x10c/0x180 [ 24.055571] exit_to_usermode_loop+0xfc/0x120 [ 24.060060] do_syscall_64+0x364/0x490 [ 24.063942] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 24.069032] [ 24.070654] The buggy address belongs to the object at ffff8801cb587680 [ 24.070654] which belongs to the cache kmalloc-512 of size 512 [ 24.083330] The buggy address is located 0 bytes inside of [ 24.083330] 512-byte region [ffff8801cb587680, ffff8801cb587880) [ 24.095291] The buggy address belongs to the page: [ 24.100497] page:ffffea00072d6180 count:1 mapcount:0 mapping: (null) index:0x0 compound_mapcount: 0 [ 24.111090] flags: 0x8000000000004080(slab|head) [ 24.115920] page dumped because: kasan: bad access detected [ 24.121631] [ 24.123259] Memory state around the buggy address: [ 24.128198] ffff8801cb587580: 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc [ 24.135674] ffff8801cb587600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.143125] >ffff8801cb587680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.150485] ^ [ 24.153889] ffff8801cb587700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb executing program executing program executing program executing program executing program executing program [ 24.161246] ffff8801cb587780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.168595] ================================================================== [ 24.176053] Disabling lock debugging due to kernel taint [ 24.184238] ------------[ cut here ]------------ [ 24.189110] kernel BUG at net/l2tp/l2tp_core.c:917! [ 24.194121] invalid opcode: 0000 [#1] PREEMPT SMP KASAN [ 24.199489] Dumping ftrace buffer: [ 24.203014] (ftrace buffer empty) [ 24.206717] Modules linked in: [ 24.210614] CPU: 1 PID: 3823 Comm: syz-executor177 Tainted: G B 4.9.110-g00a0bcb #4 [ 24.219736] Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 [ 24.229093] task: ffff8801c35f0000 task.stack: ffff8801c2468000 [ 24.235289] RIP: 0010:[] [] l2tp_session_queue_purge+0xe0/0x100 [ 24.244716] RSP: 0018:ffff8801c246fd50 EFLAGS: 00010293 [ 24.250187] RAX: ffff8801c35f0000 RBX: ffff8801ca5ce000 RCX: ffffffff836b9994 [ 24.257453] RDX: 0000000000000000 RSI: ffffffff836b9980 RDI: ffff8801ca5ce000 [ 24.264933] RBP: ffff8801c246fd78 R08: ffff8801c246fa40 R09: 0000000000000000 [ 24.272199] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8801ca5ce000 [ 24.279535] R13: ffff8801b67ad9a0 R14: ffff8801c02135d8 R15: ffffffff83011be0 [ 24.286814] FS: 00007fa1cbaa9700(0000) GS:ffff8801db300000(0000) knlGS:0000000000000000 [ 24.295213] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 24.301133] CR2: 00007fa1cbac9da8 CR3: 00000001c34d4000 CR4: 00000000001606f0 [ 24.303544] Kernel panic - not syncing: panic_on_warn set ... [ 24.303544] [ 24.315844] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 24.323096] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 24.330358] Stack: [ 24.332499] ffff8801c0213300 ffff8801ca5ce000 ffff8801b67ad9a0 ffff8801c02135d8 [ 24.341317] ffffffff83011be0 ffff8801c246fda8 ffffffff836c561b ffff8801b67ad980 [ 24.349389] ffffffff8417a320 ffff8801b67ad9a8 0000000000000000 ffff8801c246fdd8 [ 24.357623] Call Trace: [ 24.360199] [] ? sock_release+0x1c0/0x1c0 [ 24.366331] [] pppol2tp_release+0x1fb/0x2e0 [ 24.372812] [] sock_release+0x96/0x1c0 [ 24.378775] [] sock_close+0x16/0x20 [ 24.384050] [] __fput+0x263/0x700 [ 24.389138] [] ____fput+0x15/0x20 [ 24.394313] [] task_work_run+0x10c/0x180 [ 24.400007] [] exit_to_usermode_loop+0xfc/0x120 [ 24.406442] [] do_syscall_64+0x364/0x490 [ 24.412256] [] entry_SYSCALL_64_after_swapgs+0x5d/0xdb [ 24.419596] Code: 4f ca fd 31 c0 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 d6 4f ca fd 48 89 df e8 ee 7b 34 00 eb ca e8 c7 4f ca fd 0f 0b e8 c0 4f ca fd <0f> 0b 4c 89 ff e8 46 21 e8 fd eb a6 48 89 df e8 1c 21 e8 fd e9 [ 24.447565] RIP [] l2tp_session_queue_purge+0xe0/0x100 [ 24.454701] RSP [ 24.459019] Dumping ftrace buffer: [ 24.462562] (ftrace buffer empty) [ 24.466257] Kernel Offset: disabled [ 24.469866] Rebooting in 86400 seconds..