================================================================== BUG: KASAN: use-after-free in skb_update_prio net/core/dev.c:3896 [inline] BUG: KASAN: use-after-free in __dev_queue_xmit+0x611/0x35c0 net/core/dev.c:4161 Read of size 8 at addr ffff88818223abd8 by task aoe_tx0/1228 CPU: 0 PID: 1228 Comm: aoe_tx0 Not tainted 5.16.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1dc/0x2d8 lib/dump_stack.c:106 print_address_description+0x65/0x380 mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report+0x19a/0x1f0 mm/kasan/report.c:450 skb_update_prio net/core/dev.c:3896 [inline] __dev_queue_xmit+0x611/0x35c0 net/core/dev.c:4161 tx+0x6f/0x110 drivers/block/aoe/aoenet.c:63 kthread+0x241/0x450 drivers/block/aoe/aoecmd.c:1230 kthread+0x468/0x490 kernel/kthread.c:327 ret_from_fork+0x1f/0x30 Allocated by task 13493: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc+0xdc/0x110 mm/kasan/common.c:513 kasan_kmalloc include/linux/kasan.h:269 [inline] __kmalloc_node+0x28e/0x420 mm/slub.c:4471 kmalloc_node include/linux/slab.h:613 [inline] kvmalloc_node+0x81/0x110 mm/util.c:587 kvmalloc include/linux/slab.h:741 [inline] kvzalloc include/linux/slab.h:749 [inline] alloc_netdev_mqs+0x85/0xc40 net/core/dev.c:10828 sixpack_open+0xe6/0x9e0 drivers/net/hamradio/6pack.c:557 tty_ldisc_open drivers/tty/tty_ldisc.c:449 [inline] tty_set_ldisc+0x530/0x950 drivers/tty/tty_ldisc.c:579 tiocsetd drivers/tty/tty_io.c:2455 [inline] tty_ioctl+0x1477/0x17d0 drivers/tty/tty_io.c:2741 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xfb/0x170 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 13486: kasan_save_stack mm/kasan/common.c:38 [inline] kasan_set_track+0x4c/0x80 mm/kasan/common.c:46 kasan_set_free_info+0x1f/0x40 mm/kasan/generic.c:370 ____kasan_slab_free+0x10d/0x150 mm/kasan/common.c:366 kasan_slab_free include/linux/kasan.h:235 [inline] slab_free_hook mm/slub.c:1723 [inline] slab_free_freelist_hook+0x12e/0x1a0 mm/slub.c:1749 slab_free mm/slub.c:3513 [inline] kfree+0xe1/0x330 mm/slub.c:4561 device_release+0x98/0x1c0 kobject_cleanup+0x1c0/0x280 lib/kobject.c:705 tty_ldisc_close drivers/tty/tty_ldisc.c:474 [inline] tty_ldisc_kill drivers/tty/tty_ldisc.c:629 [inline] tty_ldisc_release+0x362/0x7f0 drivers/tty/tty_ldisc.c:803 tty_release_struct+0x27/0xd0 drivers/tty/tty_io.c:1706 tty_release+0xc5f/0xef0 drivers/tty/tty_io.c:1878 __fput+0x3fc/0x870 fs/file_table.c:280 task_work_run+0x146/0x1c0 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+0x209/0x220 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x2e/0x70 kernel/entry/common.c:300 do_syscall_64+0x53/0xd0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff88818223a000 which belongs to the cache kmalloc-cg-4k of size 4096 The buggy address is located 3032 bytes inside of 4096-byte region [ffff88818223a000, ffff88818223b000) The buggy address belongs to the page: page:ffffea0006088e00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x182238 head:ffffea0006088e00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x57ff00000010200(slab|head|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000010200 0000000000000000 dead000000000122 ffff88801144c280 raw: 0000000000000000 0000000000040004 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 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 13463, ts 2650824150065, free_ts 2650790907400 prep_new_page mm/page_alloc.c:2418 [inline] get_page_from_freelist+0x729/0x9e0 mm/page_alloc.c:4149 __alloc_pages+0x255/0x580 mm/page_alloc.c:5369 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab+0xcc/0x4d0 mm/slub.c:1930 new_slab mm/slub.c:1993 [inline] ___slab_alloc+0x41e/0xc40 mm/slub.c:3022 __slab_alloc mm/slub.c:3109 [inline] slab_alloc_node mm/slub.c:3200 [inline] __kmalloc_node+0x2ec/0x420 mm/slub.c:4467 kmalloc_node include/linux/slab.h:613 [inline] kvmalloc_node+0x81/0x110 mm/util.c:587 kvmalloc include/linux/slab.h:741 [inline] seq_buf_alloc fs/seq_file.c:38 [inline] seq_read_iter+0x205/0xdc0 fs/seq_file.c:210 proc_reg_read_iter+0x19c/0x260 fs/proc/inode.c:300 call_read_iter include/linux/fs.h:2156 [inline] new_sync_read fs/read_write.c:400 [inline] vfs_read+0xaf9/0xe60 fs/read_write.c:481 ksys_read+0x18f/0x2c0 fs/read_write.c:619 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae 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+0xd1c/0xe00 mm/page_alloc.c:1389 free_unref_page_prepare mm/page_alloc.c:3309 [inline] free_unref_page+0x7d/0x580 mm/page_alloc.c:3388 free_slab mm/slub.c:2033 [inline] discard_slab mm/slub.c:2039 [inline] __unfreeze_partials+0x1ab/0x200 mm/slub.c:2527 put_cpu_partial+0x116/0x180 mm/slub.c:2603 do_slab_free mm/slub.c:3501 [inline] ___cache_free+0xe6/0x120 mm/slub.c:3520 qlist_free_all mm/kasan/quarantine.c:165 [inline] kasan_quarantine_reduce+0x151/0x1c0 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0x2f/0xf0 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+0x1c9/0x310 mm/slub.c:3247 vm_area_dup kernel/fork.c:356 [inline] dup_mmap+0x6b2/0xfd0 kernel/fork.c:551 dup_mm+0x8c/0x310 kernel/fork.c:1450 copy_mm kernel/fork.c:1502 [inline] copy_process+0x28d7/0x5ca0 kernel/fork.c:2191 kernel_clone+0x22a/0x7e0 kernel/fork.c:2582 __do_sys_clone kernel/fork.c:2699 [inline] __se_sys_clone kernel/fork.c:2683 [inline] __x64_sys_clone+0x245/0x2b0 kernel/fork.c:2683 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x44/0xd0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae Memory state around the buggy address: ffff88818223aa80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88818223ab00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff88818223ab80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88818223ac00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88818223ac80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================