ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ================================================================== BUG: KASAN: slab-use-after-free in tty_write_room+0x35/0x80 drivers/tty/tty_ioctl.c:80 Read of size 8 at addr ffff88802c891018 by task aoe_tx0/1217 CPU: 1 PID: 1217 Comm: aoe_tx0 Not tainted 6.3.0-syzkaller-12049-g58390c8ce1bd #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/14/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 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+0x35/0x80 drivers/tty/tty_ioctl.c:80 handle_tx+0x164/0x620 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+0x241/0x750 net/core/dev.c:3594 __dev_queue_xmit+0x19b9/0x38b0 net/core/dev.c:4244 dev_queue_xmit include/linux/netdevice.h:3085 [inline] tx+0x6a/0x110 drivers/block/aoe/aoenet.c:63 kthread+0x238/0x440 drivers/block/aoe/aoecmd.c:1229 kthread+0x2b8/0x350 kernel/kthread.c:379 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:308 Allocated by task 24589: 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+0xa9/0x7a0 drivers/tty/tty_io.c:3090 tty_init_dev+0x5b/0x4b0 drivers/tty/tty_io.c:1408 ptmx_open+0xda/0x2b0 drivers/tty/pty.c:824 chrdev_open+0x54e/0x630 fs/char_dev.c:414 do_dentry_open+0x7f9/0x10f0 fs/open.c:920 do_open fs/namei.c:3636 [inline] path_openat+0x27b3/0x3170 fs/namei.c:3791 do_filp_open+0x234/0x490 fs/namei.c:3818 do_sys_openat2+0x13f/0x500 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+0x247/0x290 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 5006: 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+0x8a0/0x10e0 kernel/workqueue.c:2405 worker_thread+0xa63/0x1210 kernel/workqueue.c:2552 kthread+0x2b8/0x350 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+0x54/0x3d0 kernel/workqueue.c:1365 __queue_work+0xb37/0xf10 kernel/workqueue.c:1526 queue_work_on+0x14f/0x250 kernel/workqueue.c:1554 tty_release_struct+0xbc/0xe0 drivers/tty/tty_io.c:1700 tty_release+0xcff/0x12b0 drivers/tty/tty_io.c:1860 __fput+0x3b7/0x890 fs/file_table.c:321 task_work_run+0x24a/0x300 kernel/task_work.c:179 exit_task_work include/linux/task_work.h:38 [inline] do_exit+0x68f/0x2290 kernel/exit.c:871 do_group_exit+0x206/0x2c0 kernel/exit.c:1021 __do_sys_exit_group kernel/exit.c:1032 [inline] __se_sys_exit_group kernel/exit.c:1030 [inline] __x64_sys_exit_group+0x3f/0x40 kernel/exit.c:1030 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 The buggy address belongs to the object at ffff88802c891000 which belongs to the cache kmalloc-cg-2k of size 2048 The buggy address is located 24 bytes inside of freed 2048-byte region [ffff88802c891000, ffff88802c891800) The buggy address belongs to the physical page: page:ffffea0000b22400 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2c890 head:ffffea0000b22400 order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff888029a52201 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000010200 ffff88801244f3c0 ffffea000171d000 dead000000000002 raw: 0000000000000000 0000000000080008 00000001ffffffff ffff888029a52201 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0x1d20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 5031, tgid 5031 (syz-executor.2), ts 302595131795, free_ts 302589205796 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x1e6/0x210 mm/page_alloc.c:1722 prep_new_page mm/page_alloc.c:1729 [inline] get_page_from_freelist+0x321c/0x33a0 mm/page_alloc.c:3493 __alloc_pages+0x255/0x670 mm/page_alloc.c:4759 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+0xa7/0x230 mm/slab_common.c:973 kmalloc_node include/linux/slab.h:579 [inline] kvmalloc_node+0x72/0x180 mm/util.c:604 kvmalloc include/linux/slab.h:697 [inline] kvmalloc_array include/linux/slab.h:715 [inline] alloc_fdtable+0xe7/0x280 fs/file.c:136 dup_fd+0x835/0xc50 fs/file.c:354 copy_files+0x14f/0x290 kernel/fork.c:1795 copy_process+0x18b1/0x42f0 kernel/fork.c:2495 kernel_clone+0x222/0x800 kernel/fork.c:2918 __do_sys_clone kernel/fork.c:3061 [inline] __se_sys_clone kernel/fork.c:3045 [inline] __x64_sys_clone+0x258/0x2a0 kernel/fork.c:3045 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 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:2555 free_unref_page+0x37/0x3f0 mm/page_alloc.c:2650 page_to_skb+0x3dc/0x9a0 drivers/net/virtio_net.c:545 receive_mergeable drivers/net/virtio_net.c:1344 [inline] receive_buf+0x465/0x53c0 drivers/net/virtio_net.c:1479 virtnet_receive drivers/net/virtio_net.c:1777 [inline] virtnet_poll+0x6d7/0x1470 drivers/net/virtio_net.c:1849 __napi_poll+0xc7/0x470 net/core/dev.c:6496 napi_poll net/core/dev.c:6563 [inline] net_rx_action+0x78b/0x1010 net/core/dev.c:6696 __do_softirq+0x2ab/0x908 kernel/softirq.c:571 Memory state around the buggy address: ffff88802c890f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802c890f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88802c891000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88802c891080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88802c891100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================