================================================================== BUG: KASAN: slab-out-of-bounds in instrument_atomic_read_write include/linux/instrumented.h:101 [inline] BUG: KASAN: slab-out-of-bounds in atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] BUG: KASAN: slab-out-of-bounds in __refcount_add include/linux/refcount.h:193 [inline] BUG: KASAN: slab-out-of-bounds in __refcount_inc include/linux/refcount.h:250 [inline] BUG: KASAN: slab-out-of-bounds in refcount_inc include/linux/refcount.h:267 [inline] BUG: KASAN: slab-out-of-bounds in sock_hold include/net/sock.h:721 [inline] BUG: KASAN: slab-out-of-bounds in sco_sock_timeout+0x64/0x290 net/bluetooth/sco.c:89 Write of size 4 at addr ffff888074ee7080 by task kworker/0:4/3680 CPU: 0 PID: 3680 Comm: kworker/0:4 Not tainted 5.18.0-rc6-syzkaller-01459-gd9713088158b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: events sco_sock_timeout 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+0xeb/0x495 mm/kasan/report.c:313 print_report mm/kasan/report.c:429 [inline] kasan_report.cold+0xf4/0x1c6 mm/kasan/report.c:491 check_region_inline mm/kasan/generic.c:183 [inline] kasan_check_range+0x13d/0x180 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_fetch_add_relaxed include/linux/atomic/atomic-instrumented.h:116 [inline] __refcount_add include/linux/refcount.h:193 [inline] __refcount_inc include/linux/refcount.h:250 [inline] refcount_inc include/linux/refcount.h:267 [inline] sock_hold include/net/sock.h:721 [inline] sco_sock_timeout+0x64/0x290 net/bluetooth/sco.c:89 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 Allocated by task 0: (stack is not available) Freed by task 6: 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:366 [inline] ____kasan_slab_free+0x166/0x1a0 mm/kasan/common.c:328 kasan_slab_free include/linux/kasan.h:200 [inline] slab_free_hook mm/slub.c:1728 [inline] slab_free_freelist_hook+0x8b/0x1c0 mm/slub.c:1754 slab_free mm/slub.c:3510 [inline] kfree+0xd6/0x4d0 mm/slub.c:4552 skb_free_head+0xac/0x110 net/core/skbuff.c:654 skb_release_data+0x67a/0x810 net/core/skbuff.c:676 skb_release_all net/core/skbuff.c:741 [inline] __kfree_skb net/core/skbuff.c:755 [inline] consume_skb net/core/skbuff.c:914 [inline] consume_skb+0xc2/0x160 net/core/skbuff.c:908 nsim_dev_trap_report drivers/net/netdevsim/dev.c:815 [inline] nsim_dev_trap_report_work+0x855/0xba0 drivers/net/netdevsim/dev.c:840 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 The buggy address belongs to the object at ffff888074ee6000 which belongs to the cache kmalloc-4k of size 4096 The buggy address is located 128 bytes to the right of 4096-byte region [ffff888074ee6000, ffff888074ee7000) The buggy address belongs to the physical page: page:ffffea0001d3b800 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x74ee0 head:ffffea0001d3b800 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010c42140 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 0x1d2a20(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC|__GFP_HARDWALL), pid 7458, tgid 7458 (kworker/0:9), ts 229180158506, free_ts 228871736057 prep_new_page mm/page_alloc.c:2441 [inline] get_page_from_freelist+0xba2/0x3e00 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5408 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2272 alloc_slab_page mm/slub.c:1799 [inline] allocate_slab+0x26c/0x3c0 mm/slub.c:1944 new_slab mm/slub.c:2004 [inline] ___slab_alloc+0x8df/0xf20 mm/slub.c:3005 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3092 slab_alloc_node mm/slub.c:3183 [inline] __kmalloc_node_track_caller+0x2cb/0x360 mm/slub.c:4947 kmalloc_reserve net/core/skbuff.c:353 [inline] __alloc_skb+0xde/0x340 net/core/skbuff.c:425 alloc_skb include/linux/skbuff.h:1425 [inline] nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:742 [inline] nsim_dev_trap_report drivers/net/netdevsim/dev.c:799 [inline] nsim_dev_trap_report_work+0x291/0xba0 drivers/net/netdevsim/dev.c:840 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 kthread+0x2e9/0x3a0 kernel/kthread.c:376 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:298 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1356 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1406 free_unref_page_prepare mm/page_alloc.c:3328 [inline] free_unref_page+0x19/0x6a0 mm/page_alloc.c:3423 qlink_free mm/kasan/quarantine.c:157 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:176 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:283 __kasan_slab_alloc+0xa2/0xc0 mm/kasan/common.c:446 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slub.c:3217 [inline] slab_alloc mm/slub.c:3225 [inline] __kmalloc+0x200/0x350 mm/slub.c:4410 kmalloc include/linux/slab.h:586 [inline] tomoyo_realpath_from_path+0xc3/0x620 security/tomoyo/realpath.c:254 tomoyo_get_realpath security/tomoyo/file.c:151 [inline] tomoyo_path2_perm+0x264/0x6b0 security/tomoyo/file.c:922 tomoyo_path_rename+0xd2/0x130 security/tomoyo/tomoyo.c:278 security_path_rename+0x1b5/0x2e0 security/security.c:1207 do_renameat2+0x472/0xc80 fs/namei.c:4813 __do_sys_rename fs/namei.c:4872 [inline] __se_sys_rename fs/namei.c:4870 [inline] __x64_sys_rename+0x7d/0xa0 fs/namei.c:4870 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+0x44/0xae Memory state around the buggy address: ffff888074ee6f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888074ee7000: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888074ee7080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888074ee7100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888074ee7180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================