ieee802154 phy0 wpan0: encryption failed: -22 ieee802154 phy1 wpan1: encryption failed: -22 ================================================================== BUG: KASAN: use-after-free in tty_write_room+0x76/0x80 drivers/tty/tty_ioctl.c:78 Read of size 8 at addr ffff88806c6cf018 by task aoe_tx0/1351 CPU: 0 PID: 1351 Comm: aoe_tx0 Not tainted 5.16.0-rc6-syzkaller #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description.constprop.0.cold+0x8d/0x320 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 tty_write_room+0x76/0x80 drivers/tty/tty_ioctl.c:78 handle_tx+0x159/0x610 drivers/net/caif/caif_serial.c:226 __netdev_start_xmit include/linux/netdevice.h:4994 [inline] netdev_start_xmit include/linux/netdevice.h:5008 [inline] xmit_one net/core/dev.c:3590 [inline] dev_hard_start_xmit+0x1eb/0x920 net/core/dev.c:3606 __dev_queue_xmit+0x299a/0x3650 net/core/dev.c:4229 tx+0x68/0xb0 drivers/block/aoe/aoenet.c:63 kthread+0x1e7/0x3b0 drivers/block/aoe/aoecmd.c:1230 kthread+0x405/0x4f0 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 3944: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] alloc_tty_struct+0x94/0x920 drivers/tty/tty_io.c:3122 tty_init_dev.part.0+0x20/0x610 drivers/tty/tty_io.c:1422 tty_init_dev+0x5b/0x80 drivers/tty/tty_io.c:1419 ptmx_open drivers/tty/pty.c:834 [inline] ptmx_open+0x112/0x360 drivers/tty/pty.c:800 chrdev_open+0x266/0x770 fs/char_dev.c:414 do_dentry_open+0x4c8/0x1250 fs/open.c:822 do_open fs/namei.c:3426 [inline] path_openat+0x1cad/0x2750 fs/namei.c:3559 do_filp_open+0x1aa/0x400 fs/namei.c:3586 do_sys_openat2+0x16d/0x4d0 fs/open.c:1212 do_sys_open fs/open.c:1228 [inline] __do_compat_sys_openat fs/open.c:1288 [inline] __se_compat_sys_openat fs/open.c:1286 [inline] __ia32_compat_sys_openat+0x13f/0x1f0 fs/open.c:1286 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline] __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xf5/0x120 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1354 __queue_work+0x5ca/0xee0 kernel/workqueue.c:1520 queue_work_on+0xee/0x110 kernel/workqueue.c:1547 kref_put include/linux/kref.h:65 [inline] tty_kref_put drivers/tty/tty_io.c:1581 [inline] release_tty+0x4e9/0x610 drivers/tty/tty_io.c:1618 tty_release_struct+0xb4/0xe0 drivers/tty/tty_io.c:1717 tty_release+0xc70/0x1200 drivers/tty/tty_io.c:1878 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 __do_fast_syscall_32+0x72/0xf0 arch/x86/entry/common.c:181 do_fast_syscall_32+0x2f/0x70 arch/x86/entry/common.c:203 entry_SYSENTER_compat_after_hwframe+0x4d/0x5c The buggy address belongs to the object at ffff88806c6cf000 which belongs to the cache kmalloc-2k of size 2048 The buggy address is located 24 bytes inside of 2048-byte region [ffff88806c6cf000, ffff88806c6cf800) The buggy address belongs to the page: page:ffffea0001b1b200 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffff88806c6cf000 pfn:0x6c6c8 head:ffffea0001b1b200 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x4fff00000010200(slab|head|node=1|zone=1|lastcpupid=0x7ff) raw: 04fff00000010200 ffffea0001b1f808 ffffea0001be1208 ffff888010c42f00 raw: ffff88806c6cf000 0000000000080006 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 3698, ts 189202121734, free_ts 188633198031 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0xa72/0x2f50 mm/page_alloc.c:4149 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5369 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2191 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0x32d/0x4a0 mm/slub.c:1993 ___slab_alloc+0x918/0xfe0 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] __kmalloc_node_track_caller+0x2cb/0x360 mm/slub.c:4956 kmalloc_reserve net/core/skbuff.c:354 [inline] pskb_expand_head+0x15e/0x1060 net/core/skbuff.c:1701 netlink_trim+0x1ea/0x240 net/netlink/af_netlink.c:1301 netlink_broadcast+0x5b/0xd50 net/netlink/af_netlink.c:1497 nlmsg_multicast include/net/netlink.h:1033 [inline] nlmsg_notify+0x8f/0x280 net/netlink/af_netlink.c:2539 rtnl_notify net/core/rtnetlink.c:730 [inline] rtmsg_ifinfo_send net/core/rtnetlink.c:3832 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3847 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3835 [inline] rtmsg_ifinfo+0xf0/0x120 net/core/rtnetlink.c:3853 __dev_notify_flags+0x226/0x2b0 net/core/dev.c:8830 dev_change_flags+0x112/0x170 net/core/dev.c:8872 do_setlink+0x96d/0x3970 net/core/rtnetlink.c:2719 __rtnl_newlink+0xde6/0x1750 net/core/rtnetlink.c:3391 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1338 [inline] free_pcp_prepare+0x374/0x870 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3388 __unfreeze_partials+0x343/0x360 mm/slub.c:2527 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xc0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:444 kasan_slab_alloc include/linux/kasan.h:259 [inline] slab_post_alloc_hook mm/slab.h:519 [inline] slab_alloc_node mm/slub.c:3234 [inline] slab_alloc mm/slub.c:3242 [inline] kmem_cache_alloc_trace+0x1e9/0x2c0 mm/slub.c:3259 kmalloc include/linux/slab.h:590 [inline] netdevice_queue_work drivers/infiniband/core/roce_gid_mgmt.c:643 [inline] netdevice_event+0x1a8/0x8a0 drivers/infiniband/core/roce_gid_mgmt.c:802 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2002 call_netdevice_notifiers_extack net/core/dev.c:2014 [inline] call_netdevice_notifiers net/core/dev.c:2028 [inline] __dev_notify_flags+0x110/0x2b0 net/core/dev.c:8834 dev_change_flags+0x112/0x170 net/core/dev.c:8872 do_setlink+0x96d/0x3970 net/core/rtnetlink.c:2719 __rtnl_newlink+0xde6/0x1750 net/core/rtnetlink.c:3391 rtnl_newlink+0x64/0xa0 net/core/rtnetlink.c:3506 rtnetlink_rcv_msg+0x413/0xb80 net/core/rtnetlink.c:5571 Memory state around the buggy address: ffff88806c6cef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88806c6cef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88806c6cf000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88806c6cf080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88806c6cf100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================