================================================================== BUG: KASAN: slab-use-after-free in handle_tx+0x1b4/0x5fc drivers/net/caif/caif_serial.c:222 Read of size 8 at addr ffff0000c25cf020 by task aoe_tx0/2456 CPU: 0 UID: 0 PID: 2456 Comm: aoe_tx0 Not tainted syzkaller #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/30/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:499 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 print_address_description+0xa8/0x238 mm/kasan/report.c:378 print_report+0x68/0x84 mm/kasan/report.c:482 kasan_report+0xb0/0x110 mm/kasan/report.c:595 __asan_report_load8_noabort+0x20/0x2c mm/kasan/report_generic.c:381 handle_tx+0x1b4/0x5fc drivers/net/caif/caif_serial.c:222 caif_xmit+0x108/0x150 drivers/net/caif/caif_serial.c:268 __netdev_start_xmit include/linux/netdevice.h:5248 [inline] netdev_start_xmit include/linux/netdevice.h:5257 [inline] xmit_one net/core/dev.c:3845 [inline] dev_hard_start_xmit+0x2b0/0x890 net/core/dev.c:3861 __dev_queue_xmit+0x1600/0x32a8 net/core/dev.c:4763 dev_queue_xmit include/linux/netdevice.h:3365 [inline] tx+0x9c/0x1cc drivers/block/aoe/aoenet.c:62 kthread+0x164/0x354 drivers/block/aoe/aoecmd.c:1241 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Allocated by task 7611: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 kasan_save_alloc_info+0x44/0x54 mm/kasan/generic.c:573 poison_kmalloc_redzone mm/kasan/common.c:400 [inline] __kasan_kmalloc+0x9c/0xb4 mm/kasan/common.c:417 kasan_kmalloc include/linux/kasan.h:262 [inline] __kmalloc_cache_noprof+0x3a4/0x65c mm/slub.c:5748 kmalloc_noprof include/linux/slab.h:957 [inline] kzalloc_noprof include/linux/slab.h:1094 [inline] alloc_tty_struct+0xb8/0x654 drivers/tty/tty_io.c:3102 tty_init_dev+0x60/0x3e8 drivers/tty/tty_io.c:1400 tty_open_by_driver drivers/tty/tty_io.c:2073 [inline] tty_open+0x6e0/0xb54 drivers/tty/tty_io.c:2120 chrdev_open+0x1b0/0x4b0 fs/char_dev.c:414 do_dentry_open+0x7a4/0x10bc fs/open.c:965 vfs_open+0x44/0x2d4 fs/open.c:1097 do_open fs/namei.c:3975 [inline] path_openat+0x2424/0x2c40 fs/namei.c:4134 do_filp_open+0x18c/0x36c fs/namei.c:4161 do_sys_openat2+0x11c/0x1b4 fs/open.c:1437 do_sys_open fs/open.c:1452 [inline] __do_sys_openat fs/open.c:1468 [inline] __se_sys_openat fs/open.c:1463 [inline] __arm64_sys_openat+0x120/0x158 fs/open.c:1463 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x254 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x5c/0x254 arch/arm64/kernel/entry-common.c:746 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 Freed by task 6618: kasan_save_stack mm/kasan/common.c:56 [inline] kasan_save_track+0x40/0x78 mm/kasan/common.c:77 __kasan_save_free_info+0x58/0x70 mm/kasan/generic.c:587 kasan_save_free_info mm/kasan/kasan.h:406 [inline] poison_slab_object mm/kasan/common.c:252 [inline] __kasan_slab_free+0x74/0xa4 mm/kasan/common.c:284 kasan_slab_free include/linux/kasan.h:234 [inline] slab_free_hook mm/slub.c:2523 [inline] slab_free mm/slub.c:6611 [inline] kfree+0x184/0x600 mm/slub.c:6818 free_tty_struct drivers/tty/tty_io.c:174 [inline] release_one_tty+0x224/0x240 drivers/tty/tty_io.c:1533 process_one_work+0x7e8/0x155c kernel/workqueue.c:3263 process_scheduled_works kernel/workqueue.c:3346 [inline] worker_thread+0x958/0xed8 kernel/workqueue.c:3427 kthread+0x5fc/0x75c kernel/kthread.c:463 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:844 Last potentially related work creation: kasan_save_stack+0x40/0x6c mm/kasan/common.c:56 kasan_record_aux_stack+0xb0/0xc8 mm/kasan/generic.c:559 insert_work+0x54/0x2cc kernel/workqueue.c:2186 __queue_work+0xdb0/0x1210 kernel/workqueue.c:2341 queue_work_on+0xdc/0x18c kernel/workqueue.c:2392 queue_work include/linux/workqueue.h:669 [inline] schedule_work include/linux/workqueue.h:730 [inline] queue_release_one_tty drivers/tty/tty_io.c:1544 [inline] kref_put include/linux/kref.h:65 [inline] tty_kref_put+0x144/0x1b8 drivers/tty/tty_io.c:1557 release_tty+0x3e8/0x4a4 drivers/tty/tty_io.c:1593 tty_release_struct+0xb4/0xd4 drivers/tty/tty_io.c:1692 tty_release+0xa0c/0x1208 drivers/tty/tty_io.c:1852 __fput+0x340/0x75c fs/file_table.c:468 ____fput+0x20/0x58 fs/file_table.c:496 task_work_run+0x1dc/0x260 kernel/task_work.c:227 exit_task_work include/linux/task_work.h:40 [inline] do_exit+0x524/0x1a14 kernel/exit.c:966 do_group_exit+0x194/0x22c kernel/exit.c:1107 get_signal+0x11dc/0x12f8 kernel/signal.c:3034 arch_do_signal_or_restart+0x274/0x4414 arch/arm64/kernel/signal.c:1619 exit_to_user_mode_loop+0x7c/0x178 kernel/entry/common.c:40 exit_to_user_mode_prepare include/linux/irq-entry-common.h:225 [inline] arm64_exit_to_user_mode arch/arm64/kernel/entry-common.c:103 [inline] el0_svc+0x170/0x254 arch/arm64/kernel/entry-common.c:747 el0t_64_sync_handler+0x84/0x12c arch/arm64/kernel/entry-common.c:765 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:596 The buggy address belongs to the object at ffff0000c25cf000 which belongs to the cache kmalloc-cg-2k of size 2048 The buggy address is located 32 bytes inside of freed 2048-byte region [ffff0000c25cf000, ffff0000c25cf800) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff0000c25cd000 pfn:0x1025c8 head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 memcg:ffff0000d7adf281 flags: 0x5ffc00000000240(workingset|head|node=0|zone=2|lastcpupid=0x7ff) page_type: f5(slab) raw: 05ffc00000000240 ffff0000c000b3c0 fffffdffc33fd210 fffffdffc3dc4c10 raw: ffff0000c25cd000 0000000000080006 00000000f5000000 ffff0000d7adf281 head: 05ffc00000000240 ffff0000c000b3c0 fffffdffc33fd210 fffffdffc3dc4c10 head: ffff0000c25cd000 0000000000080006 00000000f5000000 ffff0000d7adf281 head: 05ffc00000000003 fffffdffc3097201 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff0000c25cef00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff0000c25cef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff0000c25cf000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff0000c25cf080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff0000c25cf100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================