================================================================== BUG: KASAN: slab-out-of-bounds in nexthop_is_blackhole include/net/nexthop.h:372 [inline] BUG: KASAN: slab-out-of-bounds in __find_rr_leaf+0xd40/0xe00 net/ipv6/route.c:855 Read of size 1 at addr ffff88802d75791e by task kworker/u32:0/12 CPU: 2 UID: 0 PID: 12 Comm: kworker/u32:0 Not tainted 6.15.0-syzkaller-12426-ge271ed52b344 #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Workqueue: ipv6_addrconf addrconf_dad_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_address_description mm/kasan/report.c:408 [inline] print_report+0xcd/0x680 mm/kasan/report.c:521 kasan_report+0xe0/0x110 mm/kasan/report.c:634 nexthop_is_blackhole include/net/nexthop.h:372 [inline] __find_rr_leaf+0xd40/0xe00 net/ipv6/route.c:855 find_rr_leaf net/ipv6/route.c:899 [inline] rt6_select net/ipv6/route.c:934 [inline] fib6_table_lookup+0x7b3/0xa30 net/ipv6/route.c:2232 ip6_pol_route+0x1cc/0x1230 net/ipv6/route.c:2268 pol_lookup_func include/net/ip6_fib.h:617 [inline] fib6_rule_lookup+0x536/0x720 net/ipv6/fib6_rules.c:120 ip6_route_input_lookup net/ipv6/route.c:2337 [inline] ip6_route_input+0x662/0xc00 net/ipv6/route.c:2640 ip6_rcv_finish_core.constprop.0+0x1a0/0x5d0 net/ipv6/ip6_input.c:66 ip6_rcv_finish net/ipv6/ip6_input.c:77 [inline] NF_HOOK include/linux/netfilter.h:317 [inline] NF_HOOK include/linux/netfilter.h:311 [inline] ipv6_rcv+0x1e8/0x680 net/ipv6/ip6_input.c:309 __netif_receive_skb_one_core+0x12d/0x1e0 net/core/dev.c:5977 __netif_receive_skb+0x1d/0x160 net/core/dev.c:6090 process_backlog+0x442/0x15e0 net/core/dev.c:6442 __napi_poll.constprop.0+0xba/0x550 net/core/dev.c:7414 napi_poll net/core/dev.c:7478 [inline] net_rx_action+0xa9f/0xfe0 net/core/dev.c:7605 handle_softirqs+0x219/0x8e0 kernel/softirq.c:579 do_softirq kernel/softirq.c:480 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:467 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:407 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:910 [inline] __dev_queue_xmit+0x8ab/0x43e0 net/core/dev.c:4740 dev_queue_xmit include/linux/netdevice.h:3355 [inline] neigh_resolve_output net/core/neighbour.c:1512 [inline] neigh_resolve_output+0x53a/0x940 net/core/neighbour.c:1492 neigh_output include/net/neighbour.h:539 [inline] ip6_finish_output2+0xaeb/0x2020 net/ipv6/ip6_output.c:141 __ip6_finish_output net/ipv6/ip6_output.c:215 [inline] ip6_finish_output+0x3f9/0x1360 net/ipv6/ip6_output.c:226 NF_HOOK_COND include/linux/netfilter.h:306 [inline] ip6_output+0x1f9/0x540 net/ipv6/ip6_output.c:247 dst_output include/net/dst.h:459 [inline] NF_HOOK include/linux/netfilter.h:317 [inline] ndisc_send_skb+0xa91/0x1e40 net/ipv6/ndisc.c:513 ndisc_send_ns+0xc6/0x140 net/ipv6/ndisc.c:671 addrconf_dad_work+0xbc1/0x14e0 net/ipv6/addrconf.c:4286 process_one_work+0x9cf/0x1b70 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3321 [inline] worker_thread+0x6c8/0xf10 kernel/workqueue.c:3402 kthread+0x3c5/0x780 kernel/kthread.c:464 ret_from_fork+0x5d4/0x6f0 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 Allocated by task 7524: kasan_save_stack+0x33/0x60 mm/kasan/common.c:47 kasan_save_track+0x14/0x30 mm/kasan/common.c:68 poison_kmalloc_redzone mm/kasan/common.c:377 [inline] __kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:394 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] binderfs_binder_device_create.isra.0+0x189/0xc30 drivers/android/binderfs.c:147 binderfs_fill_super+0x8d4/0x1360 drivers/android/binderfs.c:730 vfs_get_super fs/super.c:1323 [inline] get_tree_nodev+0xdd/0x190 fs/super.c:1342 vfs_get_tree+0x8e/0x340 fs/super.c:1802 do_new_mount fs/namespace.c:3856 [inline] path_mount+0x14d4/0x1f70 fs/namespace.c:4180 do_mount fs/namespace.c:4193 [inline] __do_sys_mount fs/namespace.c:4404 [inline] __se_sys_mount fs/namespace.c:4381 [inline] __x64_sys_mount+0x28d/0x310 fs/namespace.c:4381 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f The buggy address belongs to the object at ffff88802d757800 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 6 bytes to the right of allocated 280-byte region [ffff88802d757800, ffff88802d757918) The buggy address belongs to the physical page: page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x2d754 head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff) page_type: f5(slab) raw: 00fff00000000040 ffff88801b842c80 dead000000000122 0000000000000000 raw: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000040 ffff88801b842c80 dead000000000122 0000000000000000 head: 0000000000000000 0000000000100010 00000000f5000000 0000000000000000 head: 00fff00000000002 ffffea0000b5d501 00000000ffffffff 00000000ffffffff head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5347, tgid 5347 (udevd), ts 77901008040, free_ts 74490867957 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1c0/0x230 mm/page_alloc.c:1704 prep_new_page mm/page_alloc.c:1712 [inline] get_page_from_freelist+0x1321/0x3890 mm/page_alloc.c:3669 __alloc_frozen_pages_noprof+0x261/0x23f0 mm/page_alloc.c:4959 alloc_pages_mpol+0x1fb/0x550 mm/mempolicy.c:2419 alloc_slab_page mm/slub.c:2451 [inline] allocate_slab mm/slub.c:2619 [inline] new_slab+0x23b/0x330 mm/slub.c:2673 ___slab_alloc+0xd9c/0x1940 mm/slub.c:3859 __slab_alloc.constprop.0+0x56/0xb0 mm/slub.c:3949 __slab_alloc_node mm/slub.c:4024 [inline] slab_alloc_node mm/slub.c:4185 [inline] __kmalloc_cache_noprof+0xfb/0x3e0 mm/slub.c:4354 kmalloc_noprof include/linux/slab.h:905 [inline] kzalloc_noprof include/linux/slab.h:1039 [inline] kernfs_fop_open+0x244/0xda0 fs/kernfs/file.c:623 do_dentry_open+0x741/0x1c10 fs/open.c:964 vfs_open+0x82/0x3f0 fs/open.c:1094 do_open fs/namei.c:3887 [inline] path_openat+0x1de4/0x2cb0 fs/namei.c:4046 do_filp_open+0x20b/0x470 fs/namei.c:4073 do_sys_openat2+0x11b/0x1d0 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] __x64_sys_openat+0x174/0x210 fs/open.c:1463 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94 page last free pid 5944 tgid 5944 stack trace: reset_page_owner include/linux/page_owner.h:25 [inline] free_pages_prepare mm/page_alloc.c:1248 [inline] __free_frozen_pages+0x7fe/0x1180 mm/page_alloc.c:2706 discard_slab mm/slub.c:2717 [inline] __put_partials+0x16d/0x1c0 mm/slub.c:3186 qlink_free mm/kasan/quarantine.c:163 [inline] qlist_free_all+0x4d/0x120 mm/kasan/quarantine.c:179 kasan_quarantine_reduce+0x195/0x1e0 mm/kasan/quarantine.c:286 __kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:329 kasan_slab_alloc include/linux/kasan.h:250 [inline] slab_post_alloc_hook mm/slub.c:4148 [inline] slab_alloc_node mm/slub.c:4197 [inline] __kmalloc_cache_node_noprof+0x217/0x420 mm/slub.c:4367 kmalloc_node_noprof include/linux/slab.h:928 [inline] __get_vm_area_node+0x101/0x330 mm/vmalloc.c:3168 __vmalloc_node_range_noprof+0x271/0x14b0 mm/vmalloc.c:3845 __vmalloc_node_noprof+0xad/0xf0 mm/vmalloc.c:3948 alloc_counters net/ipv4/netfilter/ip_tables.c:799 [inline] copy_entries_to_user net/ipv4/netfilter/ip_tables.c:821 [inline] get_entries net/ipv4/netfilter/ip_tables.c:1022 [inline] do_ipt_get_ctl+0x6b6/0xaa0 net/ipv4/netfilter/ip_tables.c:1668 nf_getsockopt+0x79/0xe0 net/netfilter/nf_sockopt.c:116 ip_getsockopt+0x18c/0x1e0 net/ipv4/ip_sockglue.c:1777 tcp_getsockopt+0x9e/0x100 net/ipv4/tcp.c:4760 do_sock_getsockopt+0x3ff/0x800 net/socket.c:2357 __sys_getsockopt+0x12f/0x260 net/socket.c:2386 __do_sys_getsockopt net/socket.c:2393 [inline] __se_sys_getsockopt net/socket.c:2390 [inline] __x64_sys_getsockopt+0xbd/0x160 net/socket.c:2390 Memory state around the buggy address: ffff88802d757800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ffff88802d757880: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 >ffff88802d757900: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc ^ ffff88802d757980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff88802d757a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================