bisecting fixing commit since 4762bcd451a9e92e79d5146d3d4a5ffe2b4e0ec5 building syzkaller on 048f2d494ee4a016e2386c28bf8cccdd87896cbd testing commit 4762bcd451a9e92e79d5146d3d4a5ffe2b4e0ec5 with gcc (GCC) 8.1.0 kernel signature: 95ae4153a06425ffc90d7601e05c2cd4b67c599a8b142b0f967f4f11ebdc0a01 run #0: crashed: general protection fault in rxrpc_get_skb run #1: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #2: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #3: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #4: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #5: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #6: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #7: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #8: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet run #9: crashed: BUG: unable to handle kernel NULL pointer dereference in rxrpc_send_data_packet testing current HEAD c6db52a88798e5a0dfef80041ad4d33cc8cf04eb testing commit c6db52a88798e5a0dfef80041ad4d33cc8cf04eb with gcc (GCC) 8.1.0 kernel signature: 9fa76f7e0df4d47081f5f2610827afac58f91d60adec4e28d6e3fda4fd684da2 run #0: crashed: general protection fault in rxrpc_get_skb run #1: crashed: general protection fault in rxrpc_get_skb run #2: crashed: general protection fault in rxrpc_get_skb run #3: crashed: general protection fault in rxrpc_get_skb run #4: crashed: general protection fault in rxrpc_get_skb run #5: crashed: general protection fault in rxrpc_get_skb run #6: crashed: KASAN: use-after-free Read in rxrpc_see_skb run #7: crashed: general protection fault in rxrpc_get_skb run #8: crashed: general protection fault in rxrpc_get_skb run #9: crashed: KASAN: use-after-free Read in rxrpc_free_skb revisions tested: 2, total time: 23m50.398554884s (build: 15m46.853220627s, test: 7m5.408163088s) the crash still happens on HEAD commit msg: Linux 4.14.183 crash: KASAN: use-after-free Read in rxrpc_free_skb ================================================================== BUG: KASAN: use-after-free in __read_once_size include/linux/compiler.h:183 [inline] BUG: KASAN: use-after-free in atomic_read arch/x86/include/asm/atomic.h:27 [inline] BUG: KASAN: use-after-free in refcount_read include/linux/refcount.h:42 [inline] BUG: KASAN: use-after-free in rxrpc_free_skb+0x222/0x2e0 net/rxrpc/skbuff.c:66 Read of size 4 at addr ffff88808917e6a4 by task kworker/0:3/6747 CPU: 0 PID: 6747 Comm: kworker/0:3 Not tainted 4.14.183-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: krxrpcd rxrpc_process_call Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 print_address_description.cold.7+0x9/0x1c9 mm/kasan/report.c:252 kasan_report_error mm/kasan/report.c:351 [inline] kasan_report.cold.8+0x11a/0x2d3 mm/kasan/report.c:409 __asan_report_load4_noabort+0x14/0x20 mm/kasan/report.c:429 __read_once_size include/linux/compiler.h:183 [inline] atomic_read arch/x86/include/asm/atomic.h:27 [inline] refcount_read include/linux/refcount.h:42 [inline] rxrpc_free_skb+0x222/0x2e0 net/rxrpc/skbuff.c:66 rxrpc_resend net/rxrpc/call_event.c:323 [inline] rxrpc_process_call+0xc03/0xffd net/rxrpc/call_event.c:407 process_one_work+0x79e/0x16c0 kernel/workqueue.c:2116 worker_thread+0xcc/0xee0 kernel/workqueue.c:2250 kthread+0x338/0x400 kernel/kthread.c:232 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404 Allocated by task 28560: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_kmalloc+0xc7/0xe0 mm/kasan/kasan.c:551 kasan_slab_alloc+0x12/0x20 mm/kasan/kasan.c:489 kmem_cache_alloc_node+0x144/0x790 mm/slab.c:3642 __alloc_skb+0x92/0x500 net/core/skbuff.c:193 alloc_skb include/linux/skbuff.h:980 [inline] alloc_skb_with_frags+0x75/0x490 net/core/skbuff.c:5228 sock_alloc_send_pskb+0x53a/0x710 net/core/sock.c:2081 sock_alloc_send_skb+0x13/0x20 net/core/sock.c:2098 rxrpc_send_data+0x12ce/0x2980 net/rxrpc/sendmsg.c:280 rxrpc_do_sendmsg+0x846/0x1247 net/rxrpc/sendmsg.c:636 rxrpc_sendmsg+0x448/0x590 net/rxrpc/af_rxrpc.c:543 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xb5/0xf0 net/socket.c:656 ___sys_sendmsg+0x282/0x920 net/socket.c:2062 __sys_sendmmsg+0x126/0x300 net/socket.c:2152 SYSC_sendmmsg net/socket.c:2183 [inline] SyS_sendmmsg+0xd/0x20 net/socket.c:2178 do_syscall_64+0x1c7/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x46/0xbb Freed by task 28540: save_stack_trace+0x16/0x20 arch/x86/kernel/stacktrace.c:59 save_stack+0x43/0xd0 mm/kasan/kasan.c:447 set_track mm/kasan/kasan.c:459 [inline] kasan_slab_free+0x71/0xc0 mm/kasan/kasan.c:524 __cache_free mm/slab.c:3496 [inline] kmem_cache_free+0x80/0x2d0 mm/slab.c:3758 kfree_skbmem+0x88/0xf0 net/core/skbuff.c:586 __kfree_skb net/core/skbuff.c:646 [inline] kfree_skb+0x92/0x2b0 net/core/skbuff.c:663 rxrpc_free_skb+0xab/0x2e0 net/rxrpc/skbuff.c:67 rxrpc_release_call+0x474/0x970 net/rxrpc/call_object.c:512 rxrpc_release_calls_on_socket+0x4e0/0xab0 net/rxrpc/call_object.c:599 rxrpc_release_sock net/rxrpc/af_rxrpc.c:851 [inline] rxrpc_release+0x259/0x500 net/rxrpc/af_rxrpc.c:881 __sock_release+0xc2/0x2a0 net/socket.c:602 sock_close+0x10/0x20 net/socket.c:1139 __fput+0x232/0x750 fs/file_table.c:210 ____fput+0x9/0x10 fs/file_table.c:244 task_work_run+0xe5/0x170 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:191 [inline] exit_to_usermode_loop+0x16a/0x1b0 arch/x86/entry/common.c:164 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x416/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb The buggy address belongs to the object at ffff88808917e5c0 which belongs to the cache skbuff_head_cache of size 232 The buggy address is located 228 bytes inside of 232-byte region [ffff88808917e5c0, ffff88808917e6a8) The buggy address belongs to the page: page:ffffea0002245f80 count:1 mapcount:0 mapping:ffff88808917e0c0 index:0xffff88808917ec00 flags: 0x1fffc0000000100(slab) raw: 01fffc0000000100 ffff88808917e0c0 ffff88808917ec00 0000000100000009 raw: ffffea00023e1020 ffffea00023bf520 ffff88821b75e540 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff88808917e580: fc fc fc fc fc fc fc fc fb fb fb fb fb fb fb fb ffff88808917e600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88808917e680: fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc fc ^ ffff88808917e700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88808917e780: fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc fc ==================================================================