================================================================== BUG: KASAN: slab-out-of-bounds in watch_queue_set_filter+0x78d/0x810 kernel/watch_queue.c:343 Write of size 4 at addr ffff88801b61be1c by task syz-executor.5/4780 CPU: 1 PID: 4780 Comm: syz-executor.5 Not tainted 5.17.0-rc6-next-20220303-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+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 watch_queue_set_filter+0x78d/0x810 kernel/watch_queue.c:343 pipe_ioctl+0x25b/0x2b0 fs/pipe.c:637 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 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 RIP: 0033:0x7fc473889049 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc474ac9168 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007fc47399bf60 RCX: 00007fc473889049 RDX: 0000000020000c80 RSI: 0000000000005761 RDI: 0000000000000004 RBP: 00007fc4738e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff5b433adf R14: 00007fc474ac9300 R15: 0000000000022000 Allocated by task 4780: 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:436 [inline] ____kasan_kmalloc mm/kasan/common.c:515 [inline] ____kasan_kmalloc mm/kasan/common.c:474 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:524 kmalloc include/linux/slab.h:589 [inline] kzalloc include/linux/slab.h:717 [inline] watch_queue_set_filter+0x2f2/0x810 kernel/watch_queue.c:332 pipe_ioctl+0x25b/0x2b0 fs/pipe.c:637 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:870 [inline] __se_sys_ioctl fs/ioctl.c:856 [inline] __x64_sys_ioctl+0x193/0x200 fs/ioctl.c:856 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 The buggy address belongs to the object at ffff88801b61be00 which belongs to the cache kmalloc-32 of size 32 The buggy address is located 28 bytes inside of 32-byte region [ffff88801b61be00, ffff88801b61be20) The buggy address belongs to the physical page: page:ffffea00006d86c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1b61b flags: 0xfff00000000200(slab|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000000200 ffffea00007a5180 dead000000000002 ffff888010c41500 raw: 0000000000000000 0000000080400040 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x112820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_HARDWALL), pid 917, tgid 917 (kworker/0:2), ts 186877201545, free_ts 186809537179 prep_new_page mm/page_alloc.c:2438 [inline] get_page_from_freelist+0xa7f/0x3ec0 mm/page_alloc.c:4182 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5400 alloc_pages+0x1aa/0x310 mm/mempolicy.c:2268 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+0x8d0/0xf30 mm/slub.c:3018 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc_trace+0x310/0x3f0 mm/slub.c:3269 kmalloc include/linux/slab.h:584 [inline] kzalloc include/linux/slab.h:717 [inline] ref_tracker_alloc+0x14c/0x550 lib/ref_tracker.c:85 __netdev_tracker_alloc include/linux/netdevice.h:3862 [inline] dev_hold_track include/linux/netdevice.h:3891 [inline] dst_init+0xe0/0x520 net/core/dst.c:52 dst_alloc+0x16b/0x1f0 net/core/dst.c:96 ip6_dst_alloc+0x2e/0x90 net/ipv6/route.c:344 icmp6_dst_alloc+0x6d/0x680 net/ipv6/route.c:3273 ndisc_send_skb+0x1146/0x17f0 net/ipv6/ndisc.c:487 ndisc_send_ns+0xa6/0x120 net/ipv6/ndisc.c:665 addrconf_dad_work+0xc3f/0x1340 net/ipv6/addrconf.c:4155 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1353 [inline] free_pcp_prepare+0x549/0xd20 mm/page_alloc.c:1403 free_unref_page_prepare mm/page_alloc.c:3325 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3420 __unfreeze_partials+0x17c/0x1a0 mm/slub.c:2536 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:3230 [inline] kmem_cache_alloc_node+0x255/0x3f0 mm/slub.c:3280 __alloc_skb+0x215/0x340 net/core/skbuff.c:414 alloc_skb include/linux/skbuff.h:1233 [inline] alloc_skb_with_frags+0x93/0x730 net/core/skbuff.c:5987 sock_alloc_send_pskb+0x793/0x920 net/core/sock.c:2600 mld_newpack.isra.0+0x1be/0x750 net/ipv6/mcast.c:1754 add_grhead+0x283/0x360 net/ipv6/mcast.c:1857 add_grec+0x106a/0x1530 net/ipv6/mcast.c:1995 mld_send_cr net/ipv6/mcast.c:2121 [inline] mld_ifc_work+0x452/0xdc0 net/ipv6/mcast.c:2659 process_one_work+0x996/0x1610 kernel/workqueue.c:2289 worker_thread+0x665/0x1080 kernel/workqueue.c:2436 Memory state around the buggy address: ffff88801b61bd00: 00 00 00 00 fc fc fc fc fa fb fb fb fc fc fc fc ffff88801b61bd80: fa fb fb fb fc fc fc fc 00 00 00 00 fc fc fc fc >ffff88801b61be00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc ^ ffff88801b61be80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ffff88801b61bf00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc ==================================================================