================================================================== BUG: KASAN: slab-out-of-bounds in cfusbl_device_notify+0x78f/0x830 net/caif/caif_usb.c:138 Read of size 8 at addr ffff88803d4e46f0 by task kworker/u4:21/5529 CPU: 0 PID: 5529 Comm: kworker/u4:21 Not tainted 6.0.0-syzkaller-09589-g55be6084c8e0 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/22/2022 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x6e9 mm/kasan/report.c:433 kasan_report+0xb1/0x1e0 mm/kasan/report.c:495 cfusbl_device_notify+0x78f/0x830 net/caif/caif_usb.c:138 notifier_call_chain+0xb5/0x200 kernel/notifier.c:87 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1945 call_netdevice_notifiers_extack net/core/dev.c:1983 [inline] call_netdevice_notifiers net/core/dev.c:1997 [inline] netdev_wait_allrefs_any net/core/dev.c:10233 [inline] netdev_run_todo+0xbc2/0x1100 net/core/dev.c:10347 default_device_exit_batch+0x44e/0x590 net/core/dev.c:11338 ops_exit_list+0x125/0x170 net/core/net_namespace.c:167 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:594 process_one_work+0x991/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e4/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:306 Allocated by task 2971: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:437 [inline] __kasan_slab_alloc+0x85/0xb0 mm/kasan/common.c:470 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc mm/slab.c:3294 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x214/0x520 mm/slab.c:3491 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags+0x9a/0xe0 include/linux/audit.h:320 vfs_fstatat+0x73/0xb0 fs/stat.c:266 __do_sys_newfstatat+0x94/0x120 fs/stat.c:437 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Freed by task 2971: kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track+0x21/0x30 mm/kasan/common.c:45 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:370 ____kasan_slab_free mm/kasan/common.c:367 [inline] ____kasan_slab_free+0x13d/0x1a0 mm/kasan/common.c:329 kasan_slab_free include/linux/kasan.h:200 [inline] __cache_free mm/slab.c:3418 [inline] kmem_cache_free.part.0+0x10f/0x2e0 mm/slab.c:3725 putname fs/namei.c:271 [inline] putname+0xfe/0x140 fs/namei.c:257 vfs_fstatat+0x97/0xb0 fs/stat.c:268 __do_sys_newfstatat+0x94/0x120 fs/stat.c:437 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd The buggy address belongs to the object at ffff88803d4e4e80 which belongs to the cache names_cache of size 4096 The buggy address is located 1936 bytes to the left of 4096-byte region [ffff88803d4e4e80, ffff88803d4e5e80) The buggy address belongs to the physical page: page:ffffea0000f53900 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x3d4e4 head:ffffea0000f53900 order:1 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 ffffea0001e7b488 ffffea0001d55988 ffff8881400a5000 raw: 0000000000000000 ffff88803d4e4e80 0000000100000001 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 1, migratetype Unmovable, gfp_mask 0x3420c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_COMP|__GFP_HARDWALL|__GFP_THISNODE), pid 2971, tgid 2971 (udevd), ts 908211478103, free_ts 908204499803 prep_new_page mm/page_alloc.c:2532 [inline] get_page_from_freelist+0x109b/0x2ce0 mm/page_alloc.c:4283 __alloc_pages+0x1c7/0x510 mm/page_alloc.c:5549 __alloc_pages_node include/linux/gfp.h:243 [inline] kmem_getpages mm/slab.c:1363 [inline] cache_grow_begin+0x75/0x360 mm/slab.c:2569 cache_alloc_refill+0x27f/0x380 mm/slab.c:2942 ____cache_alloc mm/slab.c:3018 [inline] ____cache_alloc mm/slab.c:3001 [inline] __do_cache_alloc mm/slab.c:3246 [inline] slab_alloc mm/slab.c:3287 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x433/0x520 mm/slab.c:3491 getname_flags.part.0+0x50/0x4f0 fs/namei.c:139 getname_flags+0x9a/0xe0 include/linux/audit.h:320 vfs_fstatat+0x73/0xb0 fs/stat.c:266 __do_sys_newfstatat+0x94/0x120 fs/stat.c:437 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1449 [inline] free_pcp_prepare+0x5e4/0xd20 mm/page_alloc.c:1499 free_unref_page_prepare mm/page_alloc.c:3380 [inline] free_unref_page+0x19/0x4d0 mm/page_alloc.c:3476 slab_destroy mm/slab.c:1615 [inline] slabs_destroy+0x89/0xc0 mm/slab.c:1635 cache_flusharray mm/slab.c:3389 [inline] ___cache_free+0x2a8/0x3d0 mm/slab.c:3452 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x4f/0x1b0 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x97/0xb0 mm/kasan/common.c:447 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:727 [inline] slab_alloc mm/slab.c:3294 [inline] __kmem_cache_alloc_lru mm/slab.c:3471 [inline] kmem_cache_alloc+0x214/0x520 mm/slab.c:3491 kmem_cache_zalloc include/linux/slab.h:723 [inline] jbd2_alloc_handle include/linux/jbd2.h:1596 [inline] new_handle fs/jbd2/transaction.c:476 [inline] jbd2__journal_start+0x18c/0x910 fs/jbd2/transaction.c:503 __ext4_journal_start_sb+0x3a3/0x490 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_unlink+0x55e/0x9d0 fs/ext4/namei.c:3276 vfs_unlink+0x351/0x920 fs/namei.c:4229 do_unlinkat+0x3cc/0x650 fs/namei.c:4297 __do_sys_unlink fs/namei.c:4345 [inline] __se_sys_unlink fs/namei.c:4343 [inline] __x64_sys_unlink+0xc6/0x110 fs/namei.c:4343 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd Memory state around the buggy address: ffff88803d4e4580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803d4e4600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff88803d4e4680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88803d4e4700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88803d4e4780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================