ci starts bisection 2023-05-31 12:16:43.471205033 +0000 UTC m=+58778.268483318 bisecting fixing commit since 58390c8ce1bddb6c623f62e7ed36383e7fa5c02f building syzkaller on 62df2017e3b1edd786a4c737bd4ccba2b4581d88 ensuring issue is reproducible on original commit 58390c8ce1bddb6c623f62e7ed36383e7fa5c02f testing commit 58390c8ce1bddb6c623f62e7ed36383e7fa5c02f gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: a2eaef8bf8871ad13ada7945f603e23994b783b10b65c374b72114235688946a run #0: crashed: KASAN: slab-use-after-free Read in tty_write_room run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK reproducer seems to be flaky testing current HEAD 48b1320a674e1ff5de2fad8606bee38f724594dc testing commit 48b1320a674e1ff5de2fad8606bee38f724594dc gcc compiler: Debian clang version 15.0.7, GNU ld (GNU Binutils for Debian) 2.35.2 kernel signature: f35c1b77bda84672e746601494ff026f1cd92a99e8bbe33f97f1b24df53d58bb run #0: crashed: KASAN: slab-use-after-free Read in tty_write_room run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK run #10: OK run #11: OK run #12: OK run #13: OK run #14: OK run #15: OK run #16: OK run #17: OK run #18: OK run #19: OK crash still not fixed/happens on the oldest tested release Reproducer flagged being flaky revisions tested: 2, total time: 37m20.329399363s (build: 18m41.681768683s, test: 18m5.686257397s) crash still not fixed on HEAD or HEAD had kernel test errors commit msg: Merge tag 'for-6.4-rc4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux crash: KASAN: slab-use-after-free Read in tty_write_room ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ================================================================== BUG: KASAN: slab-use-after-free in tty_write_room+0x30/0x70 drivers/tty/tty_ioctl.c:80 Read of size 8 at addr ffff88801d128018 by task aoe_tx0/1217 CPU: 1 PID: 1217 Comm: aoe_tx0 Not tainted 6.4.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/25/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x167/0x220 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:351 [inline] print_report+0x163/0x540 mm/kasan/report.c:462 kasan_report+0x176/0x1b0 mm/kasan/report.c:572 tty_write_room+0x30/0x70 drivers/tty/tty_ioctl.c:80 handle_tx+0x12a/0x530 drivers/net/caif/caif_serial.c:226 __netdev_start_xmit include/linux/netdevice.h:4915 [inline] netdev_start_xmit include/linux/netdevice.h:4929 [inline] xmit_one net/core/dev.c:3578 [inline] dev_hard_start_xmit+0x1f1/0x560 net/core/dev.c:3594 __dev_queue_xmit+0x12b2/0x2d50 net/core/dev.c:4244 dev_queue_xmit include/linux/netdevice.h:3085 [inline] tx+0x87/0xc0 drivers/block/aoe/aoenet.c:63 kthread+0x249/0x3f0 drivers/block/aoe/aoecmd.c:1229 kthread+0x27c/0x2f0 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 17281: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 ____kasan_kmalloc mm/kasan/common.c:374 [inline] __kasan_kmalloc+0x98/0xb0 mm/kasan/common.c:383 kmalloc include/linux/slab.h:559 [inline] kzalloc include/linux/slab.h:680 [inline] alloc_tty_struct+0xa5/0x770 drivers/tty/tty_io.c:3090 tty_init_dev+0x5a/0x430 drivers/tty/tty_io.c:1408 ptmx_open+0xae/0x270 drivers/tty/pty.c:824 chrdev_open+0x4c3/0x580 fs/char_dev.c:414 do_dentry_open+0x5fc/0xdd0 fs/open.c:920 do_open fs/namei.c:3636 [inline] path_openat+0x255a/0x2c10 fs/namei.c:3791 do_filp_open+0x22a/0x440 fs/namei.c:3818 do_sys_openat2+0x10f/0x430 fs/open.c:1356 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x20d/0x260 fs/open.c:1383 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 5004: kasan_save_stack mm/kasan/common.c:45 [inline] kasan_set_track+0x4f/0x70 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:521 ____kasan_slab_free+0xd6/0x120 mm/kasan/common.c:236 kasan_slab_free include/linux/kasan.h:162 [inline] slab_free_hook mm/slub.c:1781 [inline] slab_free_freelist_hook mm/slub.c:1807 [inline] slab_free mm/slub.c:3786 [inline] __kmem_cache_free+0x264/0x3c0 mm/slub.c:3799 process_one_work+0x797/0xe20 kernel/workqueue.c:2405 worker_thread+0x8c9/0xfd0 kernel/workqueue.c:2552 kthread+0x27c/0x2f0 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 insert_work+0x4f/0x330 kernel/workqueue.c:1365 __queue_work+0x886/0xb30 kernel/workqueue.c:1526 queue_work_on+0xfb/0x1b0 kernel/workqueue.c:1554 tty_release_struct+0xa4/0xc0 drivers/tty/tty_io.c:1700 tty_release+0xbc3/0x1080 drivers/tty/tty_io.c:1860 __fput+0x33f/0x720 fs/file_table.c:321 task_work_run+0x20a/0x290 kernel/task_work.c:179 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline] exit_to_user_mode_loop+0xd9/0x100 kernel/entry/common.c:171 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:204 __syscall_exit_to_user_mode_work kernel/entry/common.c:286 [inline] syscall_exit_to_user_mode+0x64/0x280 kernel/entry/common.c:297 do_syscall_64+0x4d/0xc0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x63/0xcd Second to last potentially related work creation: kasan_save_stack+0x3f/0x60 mm/kasan/common.c:45 __kasan_record_aux_stack+0xb0/0xc0 mm/kasan/generic.c:491 __call_rcu_common kernel/rcu/tree.c:2627 [inline] call_rcu+0x167/0xa70 kernel/rcu/tree.c:2741 in6_dev_put include/net/addrconf.h:380 [inline] addrconf_ifdown+0x141e/0x1690 net/ipv6/addrconf.c:3911 addrconf_notify+0x1b3/0xcf0 notifier_call_chain+0x120/0x260 kernel/notifier.c:93 call_netdevice_notifiers_info net/core/dev.c:1935 [inline] call_netdevice_notifiers_extack net/core/dev.c:1973 [inline] call_netdevice_notifiers net/core/dev.c:1987 [inline] unregister_netdevice_many_notify+0xbd4/0x14d0 net/core/dev.c:10882 unregister_netdevice_many net/core/dev.c:10938 [inline] unregister_netdevice_queue+0x2a9/0x310 net/core/dev.c:10818 unregister_netdevice include/linux/netdevice.h:3109 [inline] ser_release+0x24f/0x290 drivers/net/caif/caif_serial.c:310 process_one_work+0x797/0xe20 kernel/workqueue.c:2405 worker_thread+0x8c9/0xfd0 kernel/workqueue.c:2552 kthread+0x27c/0x2f0 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 The buggy address belongs to the object at ffff88801d128000 which belongs to the cache kmalloc-cg-2k of size 2048 The buggy address is located 24 bytes inside of freed 2048-byte region [ffff88801d128000, ffff88801d128800) The buggy address belongs to the physical page: page:ffffea0000744a00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1d128 head:ffffea0000744a00 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff8880200da181 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff88801104f3c0 ffffea000081de00 dead000000000002 raw: 0000000000000000 0000000000080008 00000001ffffffff ffff8880200da181 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 4660, tgid 4660 (dhcpcd), ts 25009363537, free_ts 25006412564 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1731 prep_new_page mm/page_alloc.c:1738 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3502 __alloc_pages+0x255/0x670 mm/page_alloc.c:4768 alloc_slab_page+0x6a/0x160 mm/slub.c:1851 allocate_slab mm/slub.c:1998 [inline] new_slab+0x84/0x2f0 mm/slub.c:2051 ___slab_alloc+0xa85/0x10a0 mm/slub.c:3192 __slab_alloc mm/slub.c:3291 [inline] __slab_alloc_node mm/slub.c:3344 [inline] slab_alloc_node mm/slub.c:3441 [inline] __kmem_cache_alloc_node+0x1b8/0x290 mm/slub.c:3490 __do_kmalloc_node mm/slab_common.c:965 [inline] __kmalloc_node_track_caller+0xa5/0x230 mm/slab_common.c:986 kmalloc_reserve+0xd1/0x1f0 net/core/skbuff.c:585 __alloc_skb+0x143/0x3b0 net/core/skbuff.c:654 alloc_skb include/linux/skbuff.h:1288 [inline] alloc_skb_with_frags+0x82/0x640 net/core/skbuff.c:6380 sock_alloc_send_pskb+0x7f3/0x8f0 net/core/sock.c:2729 unix_dgram_sendmsg+0x4ca/0x1cd0 net/unix/af_unix.c:1944 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] sock_write_iter+0x31e/0x490 net/socket.c:1140 do_iter_write+0x776/0xbd0 fs/read_write.c:860 vfs_writev fs/read_write.c:933 [inline] do_writev+0x221/0x3d0 fs/read_write.c:976 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1302 [inline] free_unref_page_prepare+0x903/0xa30 mm/page_alloc.c:2564 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2659 discard_slab mm/slub.c:2097 [inline] __unfreeze_partials+0x1b1/0x1f0 mm/slub.c:2636 put_cpu_partial+0x116/0x180 mm/slub.c:2712 qlist_free_all+0x22/0x60 mm/kasan/quarantine.c:185 kasan_quarantine_reduce+0x14b/0x160 mm/kasan/quarantine.c:292 __kasan_slab_alloc+0x23/0x70 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:186 [inline] slab_post_alloc_hook+0x68/0x3a0 mm/slab.h:711 slab_alloc_node mm/slub.c:3451 [inline] kmem_cache_alloc_node+0x157/0x350 mm/slub.c:3496 __alloc_skb+0x11e/0x3b0 net/core/skbuff.c:644 alloc_skb include/linux/skbuff.h:1288 [inline] netlink_alloc_large_skb net/netlink/af_netlink.c:1211 [inline] netlink_sendmsg+0x5ec/0xb50 net/netlink/af_netlink.c:1888 sock_sendmsg_nosec net/socket.c:724 [inline] sock_sendmsg net/socket.c:747 [inline] __sys_sendto+0x3e8/0x570 net/socket.c:2144 __do_sys_sendto net/socket.c:2156 [inline] __se_sys_sendto net/socket.c:2152 [inline] __x64_sys_sendto+0xd9/0xf0 net/socket.c:2152 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88801d127f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88801d127f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88801d128000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801d128080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801d128100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================