bisecting fixing commit since 2d19be4653f5e74ed95560b69f94eb6791d49af3 building syzkaller on 4c37c133e4bf703d023995535f1e264d8658e08e testing commit 2d19be4653f5e74ed95560b69f94eb6791d49af3 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 0f8aa9459ea096aae607f6ba308b993b744f69c5ae0661325be7e0fbfd3dbc77 run #0: basic kernel testing failed: BUG: program execution failed: executor 0: failed to write control pipe: write |1: broken pipe run #1: crashed: general protection fault in tls_sk_proto_close run #2: crashed: general protection fault in tls_sk_proto_close run #3: crashed: general protection fault in tls_sk_proto_close run #4: crashed: KASAN: slab-out-of-bounds Read in __schedule run #5: crashed: general protection fault in tls_sk_proto_close run #6: crashed: BUG: Bad page state run #7: crashed: general protection fault in tls_sk_proto_close run #8: crashed: kernel BUG in do_exit run #9: crashed: general protection fault in corrupted run #10: crashed: general protection fault in tls_sk_proto_close run #11: crashed: general protection fault in tls_sk_proto_close run #12: crashed: general protection fault in tls_sk_proto_close run #13: crashed: general protection fault in tls_sk_proto_close run #14: crashed: general protection fault in corrupted run #15: crashed: general protection fault in tls_sk_proto_close run #16: crashed: kernel panic: corrupted stack end in corrupted run #17: crashed: general protection fault in tls_sk_proto_close run #18: crashed: kernel panic: corrupted stack end in corrupted run #19: crashed: general protection fault in tls_sk_proto_close testing current HEAD 4938296e03bd227e5020d63d418956fe52baf97c testing commit 4938296e03bd227e5020d63d418956fe52baf97c compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: fc9ae46fed12d712c437b9acddebeb0df5bd224efc6a7410de38b89c41487683 run #0: crashed: general protection fault in tls_sk_proto_close run #1: crashed: BUG: Bad page state run #2: crashed: general protection fault in tls_sk_proto_close run #3: crashed: general protection fault in tls_sk_proto_close run #4: crashed: BUG: Bad page state run #5: crashed: general protection fault in tls_sk_proto_close run #6: crashed: general protection fault in tls_sk_proto_close run #7: crashed: general protection fault in tls_sk_proto_close run #8: crashed: KASAN: slab-out-of-bounds Read in __schedule run #9: crashed: general protection fault in corrupted revisions tested: 2, total time: 22m56.777350796s (build: 16m4.195246535s, test: 6m28.337429232s) the crash still happens on HEAD commit msg: Linux 4.19.198 crash: general protection fault in corrupted wlan0: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access wlan0: Creating new IBSS network, BSSID 50:50:50:50:50:50 ================================================================== general protection fault: 0000 [#1] PREEMPT SMP KASAN BUG: KASAN: slab-out-of-bounds in stack_not_used include/linux/sched/task_stack.h:101 [inline] BUG: KASAN: slab-out-of-bounds in check_stack_usage kernel/exit.c:756 [inline] BUG: KASAN: slab-out-of-bounds in do_exit+0x250c/0x2d90 kernel/exit.c:913 CPU: 1 PID: 9890 Comm: syz-executor.5 Not tainted 4.19.198-syzkaller #0 Read of size 8 at addr ffff8880b4df8008 by task kworker/u4:0/9915 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RIP: 0010:__read_once_size include/linux/compiler.h:261 [inline] RIP: 0010:compound_head include/linux/page-flags.h:142 [inline] RIP: 0010:put_page include/linux/mm.h:951 [inline] RIP: 0010:tls_sk_proto_close+0x2af/0x980 net/tls/tls_main.c:277 CPU: 0 PID: 9915 Comm: kworker/u4:0 Not tainted 4.19.198-syzkaller #0 Code: 89 ca 48 89 8d 40 ff ff ff 48 c1 ea 03 4a 8d 0c 2a 48 89 8d 68 ff ff ff 48 83 e0 fc 48 8d 78 08 49 89 c6 48 89 fe 48 c1 ee 03 <42> 80 3c 2e 00 0f 85 63 05 00 00 49 8b 76 08 48 8d 7e ff 83 e6 01 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 RSP: 0018:ffff8880975ffca0 EFLAGS: 00010202 Call Trace: RAX: 0000000000000000 RBX: ffff8880988865c0 RCX: ffffed10154f8035 __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 lib/dump_stack.c:118 RDX: 1ffffffff1322499 RSI: 0000000000000001 RDI: 0000000000000008 print_address_description.cold.6+0x9/0x211 mm/kasan/report.c:256 RBP: ffff8880975ffd60 R08: ffff888097498c50 R09: 1ffffffff18c57f2 kasan_report_error mm/kasan/report.c:354 [inline] kasan_report mm/kasan/report.c:412 [inline] kasan_report.cold.7+0x242/0x2fe mm/kasan/report.c:396 R10: 0000000000000000 R11: 0000000000000000 R12: ffff8880b5300680 R13: dffffc0000000000 R14: 0000000000000000 R15: ffff8880aa7c0180 __asan_report_load8_noabort+0x14/0x20 mm/kasan/report.c:433 FS: 0000000001740400(0000) GS:ffff8880ba300000(0000) knlGS:0000000000000000 stack_not_used include/linux/sched/task_stack.h:101 [inline] check_stack_usage kernel/exit.c:756 [inline] do_exit+0x250c/0x2d90 kernel/exit.c:913 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007ffc73d62fa8 CR3: 0000000098358000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: inet_release+0xb4/0x1b0 net/ipv4/af_inet.c:427 inet6_release+0x46/0x60 net/ipv6/af_inet6.c:472 __sock_release+0xc2/0x290 net/socket.c:599 sock_close+0x10/0x20 net/socket.c:1212 call_usermodehelper_exec_async+0x434/0x630 kernel/umh.c:129 __fput+0x249/0x7f0 fs/file_table.c:278 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 ____fput+0x9/0x10 fs/file_table.c:309 task_work_run+0x108/0x180 kernel/task_work.c:113 Allocated by task 0: tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 (stack is not available) prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 Freed by task 0: entry_SYSCALL_64_after_hwframe+0x49/0xbe (stack is not available) RIP: 0033:0x41920b The buggy address belongs to the object at ffff8880b4df80c0 which belongs to the cache files_cache of size 832 The buggy address is located 184 bytes to the left of 832-byte region [ffff8880b4df80c0, ffff8880b4df8400) Code: 0f 05 48 3d 00 f0 ff ff 77 45 c3 0f 1f 40 00 48 83 ec 18 89 7c 24 0c e8 63 fc ff ff 8b 7c 24 0c 41 89 c0 b8 03 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 35 44 89 c7 89 44 24 0c e8 a1 fc ff ff 8b 44 The buggy address belongs to the page: RSP: 002b:00007ffd6ffb9c70 EFLAGS: 00000293 ORIG_RAX: 0000000000000003 page:ffffea0002d37e00 count:1 mapcount:0 mapping:ffff88813be46800 index:0x0 RAX: 0000000000000000 RBX: 0000000000000004 RCX: 000000000041920b flags: 0xfff00000000100(slab) RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000003 raw: 00fff00000000100 ffffea00025dc0c8 ffff88813be69c48 ffff88813be46800 RBP: 0000000000000001 R08: 0000000000000000 R09: 0000001b2d9200fc raw: 0000000000000000 ffff8880b4df80c0 0000000100000004 0000000000000000 R10: 0000000000000000 R11: 0000000000000293 R12: 000000000056c9e0 page dumped because: kasan: bad access detected R13: 000000000056c9e0 R14: 000000000056bf60 R15: 000000000000b4e7 Modules linked in: Memory state around the buggy address: ---[ end trace 3bc942788576d34c ]--- ffff8880b4df7f00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ffff8880b4df7f80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff >ffff8880b4df8000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff8880b4df8080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc RIP: 0010:__read_once_size include/linux/compiler.h:261 [inline] RIP: 0010:compound_head include/linux/page-flags.h:142 [inline] RIP: 0010:put_page include/linux/mm.h:951 [inline] RIP: 0010:tls_sk_proto_close+0x2af/0x980 net/tls/tls_main.c:277 ffff8880b4df8100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ================================================================== Bluetooth: hci3: command 0x0419 tx timeout IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready Bluetooth: hci4: command 0x0419 tx timeout FAULT_INJECTION: forcing a failure. name failslab, interval 1, probability 0, space 0, times 0 Bluetooth: hci1: command 0x0419 tx timeout Code: 89 ca 48 89 8d 40 ff ff ff 48 c1 ea 03 4a 8d 0c 2a 48 89 8d 68 ff ff ff 48 83 e0 fc 48 8d 78 08 49 89 c6 48 89 fe 48 c1 ee 03 <42> 80 3c 2e 00 0f 85 63 05 00 00 49 8b 76 08 48 8d 7e ff 83 e6 01 Bluetooth: hci5: command 0x0419 tx timeout CPU: 1 PID: 9926 Comm: syz-executor.1 Tainted: G B D 4.19.198-syzkaller #0 Bluetooth: hci0: command 0x0419 tx timeout Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x17c/0x226 lib/dump_stack.c:118 fail_dump lib/fault-inject.c:51 [inline] should_fail.cold.2+0x5/0xa lib/fault-inject.c:149 __should_failslab+0xba/0xf0 mm/failslab.c:32 Bluetooth: hci2: command 0x0419 tx timeout should_failslab+0x9/0x20 mm/slab_common.c:1588 slab_pre_alloc_hook mm/slab.h:424 [inline] slab_alloc mm/slab.c:3383 [inline] __do_kmalloc mm/slab.c:3725 [inline] __kmalloc+0x2b5/0x3d0 mm/slab.c:3736 kmalloc include/linux/slab.h:520 [inline] aead_request_alloc include/crypto/aead.h:427 [inline] tls_push_record+0xff/0x15f0 net/tls/tls_sw.c:209 tls_sw_sendmsg+0xb35/0x1010 net/tls/tls_sw.c:467 inet_sendmsg+0x108/0x440 net/ipv4/af_inet.c:798 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xac/0xf0 net/socket.c:661 __sys_sendto+0x1f2/0x2e0 net/socket.c:1897 RSP: 0018:ffff8880975ffca0 EFLAGS: 00010202 __do_sys_sendto net/socket.c:1909 [inline] __se_sys_sendto net/socket.c:1905 [inline] __x64_sys_sendto+0xdc/0x1a0 net/socket.c:1905 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 RAX: 0000000000000000 RBX: ffff8880988865c0 RCX: ffffed10154f8035 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x465ef9 RDX: 1ffffffff1322499 RSI: 0000000000000001 RDI: 0000000000000008 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007eff5a296188 EFLAGS: 00000246 ORIG_RAX: 000000000000002c RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000465ef9 RDX: 0000000000000001 RSI: 0000000020000180 RDI: 0000000000000003 RBP: 00007eff5a2961d0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000004000 R11: 0000000000000246 R12: 0000000000000001 R13: 00007ffd408d9a9f R14: 00007eff5a296300 R15: 0000000000022000 IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready RBP: ffff8880975ffd60 R08: ffff888097498c50 R09: 1ffffffff18c57f2