================================================================== BUG: KASAN: slab-out-of-bounds in __rb_change_child include/linux/rbtree_augmented.h:173 [inline] BUG: KASAN: slab-out-of-bounds in __rb_erase_augmented include/linux/rbtree_augmented.h:283 [inline] BUG: KASAN: slab-out-of-bounds in rb_erase+0xd47/0x1210 lib/rbtree.c:443 Read of size 8 at addr ffff888077777784 by task kworker/u4:6/8206 CPU: 1 PID: 8206 Comm: kworker/u4:6 Not tainted 5.16.0-rc2-next-20211125-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 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.constprop.0.cold+0xa5/0x3ed mm/kasan/report.c:247 __kasan_report mm/kasan/report.c:433 [inline] kasan_report.cold+0x83/0xdf mm/kasan/report.c:450 __rb_change_child include/linux/rbtree_augmented.h:173 [inline] __rb_erase_augmented include/linux/rbtree_augmented.h:283 [inline] rb_erase+0xd47/0x1210 lib/rbtree.c:443 kernfs_unlink_sibling fs/kernfs/dir.c:400 [inline] __kernfs_remove+0x659/0xab0 fs/kernfs/dir.c:1359 kernfs_remove_by_name_ns+0x4f/0xa0 fs/kernfs/dir.c:1544 kernfs_remove_by_name include/linux/kernfs.h:570 [inline] remove_files+0x96/0x1c0 fs/sysfs/group.c:28 sysfs_remove_group+0x87/0x170 fs/sysfs/group.c:288 sysfs_remove_groups fs/sysfs/group.c:312 [inline] sysfs_remove_groups+0x5c/0xa0 fs/sysfs/group.c:304 destroy_port drivers/infiniband/core/sysfs.c:1284 [inline] ib_free_port_attrs+0x162/0x460 drivers/infiniband/core/sysfs.c:1409 remove_one_compat_dev drivers/infiniband/core/device.c:1001 [inline] rdma_dev_exit_net+0x2b2/0x550 drivers/infiniband/core/device.c:1139 ops_exit_list+0xb0/0x160 net/core/net_namespace.c:168 cleanup_net+0x4ea/0xb00 net/core/net_namespace.c:593 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2299 worker_thread+0x658/0x11f0 kernel/workqueue.c:2446 kthread+0x405/0x4f0 kernel/kthread.c:345 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Allocated by task 46: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:434 [inline] ____kasan_kmalloc mm/kasan/common.c:513 [inline] ____kasan_kmalloc mm/kasan/common.c:472 [inline] __kasan_kmalloc+0xa9/0xd0 mm/kasan/common.c:522 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] l2cap_conn_add.part.0+0x64/0xdf0 net/bluetooth/l2cap_core.c:7718 l2cap_conn_add include/net/bluetooth/l2cap.h:860 [inline] l2cap_connect_cfm+0x5be/0xf40 net/bluetooth/l2cap_core.c:8115 hci_connect_cfm include/net/bluetooth/hci_core.h:1529 [inline] hci_remote_features_evt net/bluetooth/hci_event.c:3427 [inline] hci_event_packet+0x3866/0x7ec0 net/bluetooth/hci_event.c:6485 hci_rx_work+0x4fa/0xd30 net/bluetooth/hci_core.c:3808 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2299 worker_thread+0x658/0x11f0 kernel/workqueue.c:2446 kthread+0x405/0x4f0 kernel/kthread.c:345 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xfe/0x1b0 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1354 __queue_work+0x5ca/0xf30 kernel/workqueue.c:1520 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1421 expire_timers kernel/time/timer.c:1461 [inline] __run_timers.part.0+0x49f/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 Second to last potentially related work creation: kasan_save_stack+0x1e/0x50 mm/kasan/common.c:38 __kasan_record_aux_stack+0xfe/0x1b0 mm/kasan/generic.c:348 insert_work+0x48/0x370 kernel/workqueue.c:1354 __queue_work+0x5ca/0xf30 kernel/workqueue.c:1520 queue_work_on+0xee/0x110 kernel/workqueue.c:1548 queue_work include/linux/workqueue.h:502 [inline] l2cap_conn_ready net/bluetooth/l2cap_core.c:1752 [inline] l2cap_connect_cfm+0x9d0/0xf40 net/bluetooth/l2cap_core.c:8156 hci_connect_cfm include/net/bluetooth/hci_core.h:1529 [inline] hci_remote_features_evt net/bluetooth/hci_event.c:3427 [inline] hci_event_packet+0x3866/0x7ec0 net/bluetooth/hci_event.c:6485 hci_rx_work+0x4fa/0xd30 net/bluetooth/hci_core.c:3808 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2299 worker_thread+0x658/0x11f0 kernel/workqueue.c:2446 kthread+0x405/0x4f0 kernel/kthread.c:345 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 The buggy address belongs to the object at ffff888077777000 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 900 bytes to the right of 1024-byte region [ffff888077777000, ffff888077777400) The buggy address belongs to the page: page:ffffea0001dddc00 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x77770 head:ffffea0001dddc00 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head|node=0|zone=1|lastcpupid=0x7ff) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888010c41dc0 raw: 0000000000000000 0000000000100010 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 0x52820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP), pid 2963, ts 245192628068, free_ts 245190232172 prep_new_page mm/page_alloc.c:2433 [inline] get_page_from_freelist+0xa72/0x2f40 mm/page_alloc.c:4164 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5376 alloc_pages+0x1a7/0x300 mm/mempolicy.c:2192 alloc_slab_page mm/slub.c:1793 [inline] allocate_slab mm/slub.c:1930 [inline] new_slab+0x261/0x460 mm/slub.c:1993 ___slab_alloc+0x798/0xf30 mm/slub.c:3022 __slab_alloc.constprop.0+0x4d/0xa0 mm/slub.c:3109 slab_alloc_node mm/slub.c:3200 [inline] slab_alloc mm/slub.c:3242 [inline] __kmalloc+0x2fb/0x340 mm/slub.c:4419 kmalloc include/linux/slab.h:595 [inline] kzalloc include/linux/slab.h:724 [inline] neigh_alloc net/core/neighbour.c:433 [inline] ___neigh_create+0x14dd/0x2970 net/core/neighbour.c:618 ip6_finish_output2+0x106a/0x14f0 net/ipv6/ip6_output.c:123 __ip6_finish_output net/ipv6/ip6_output.c:191 [inline] __ip6_finish_output+0x61e/0xe80 net/ipv6/ip6_output.c:170 ip6_finish_output+0x32/0x200 net/ipv6/ip6_output.c:201 NF_HOOK_COND include/linux/netfilter.h:296 [inline] ip6_output+0x1e4/0x530 net/ipv6/ip6_output.c:224 dst_output include/net/dst.h:450 [inline] NF_HOOK include/linux/netfilter.h:307 [inline] NF_HOOK include/linux/netfilter.h:301 [inline] mld_sendpack+0x9a1/0xe40 net/ipv6/mcast.c:1826 mld_send_cr net/ipv6/mcast.c:2127 [inline] mld_ifc_work+0x71c/0xdc0 net/ipv6/mcast.c:2659 process_one_work+0x9b2/0x1690 kernel/workqueue.c:2299 worker_thread+0x658/0x11f0 kernel/workqueue.c:2446 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1351 [inline] free_pcp_prepare+0x414/0xb60 mm/page_alloc.c:1403 free_unref_page_prepare mm/page_alloc.c:3324 [inline] free_unref_page+0x19/0x690 mm/page_alloc.c:3403 __unfreeze_partials+0x19f/0x1c0 mm/slub.c:2527 qlink_free mm/kasan/quarantine.c:146 [inline] qlist_free_all+0x5a/0xf0 mm/kasan/quarantine.c:165 kasan_quarantine_reduce+0x180/0x200 mm/kasan/quarantine.c:272 __kasan_slab_alloc+0xa2/0xc0 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_trace+0x1e9/0x2c0 mm/slub.c:3259 kmalloc include/linux/slab.h:590 [inline] kzalloc include/linux/slab.h:724 [inline] fib6_info_alloc+0xc1/0x210 net/ipv6/ip6_fib.c:155 ip6_route_info_create+0x33e/0x1aa0 net/ipv6/route.c:3771 ip6_route_add+0x24/0x150 net/ipv6/route.c:3865 addrconf_add_mroute+0x1e1/0x310 net/ipv6/addrconf.c:2488 addrconf_add_dev+0x156/0x1c0 net/ipv6/addrconf.c:2506 addrconf_dev_config+0x1ec/0x420 net/ipv6/addrconf.c:3364 addrconf_notify+0xdb5/0x1ba0 net/ipv6/addrconf.c:3613 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:1919 Memory state around the buggy address: ffff888077777680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff888077777700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff888077777780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff888077777800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888077777880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================