================================================================== BUG: KASAN: slab-out-of-bounds in __bfs+0x154/0x394 kernel/locking/lockdep.c:1708 Read of size 8 at addr ffffaf8007417d50 by task syz-executor.0/2039 CPU: 0 PID: 2039 Comm: syz-executor.0 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0 Hardware name: riscv-virtio,qemu (DT) Call Trace: [] dump_backtrace+0x2e/0x3c arch/riscv/kernel/stacktrace.c:113 [] show_stack+0x34/0x40 arch/riscv/kernel/stacktrace.c:119 [] __dump_stack lib/dump_stack.c:88 [inline] [] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:106 [] print_address_description.constprop.0+0x2a/0x330 mm/kasan/report.c:255 [] __kasan_report mm/kasan/report.c:442 [inline] [] kasan_report+0x184/0x1e0 mm/kasan/report.c:459 [] check_region_inline mm/kasan/generic.c:183 [inline] [] __asan_load8+0x6e/0x96 mm/kasan/generic.c:256 [] __bfs+0x154/0x394 kernel/locking/lockdep.c:1708 [] __bfs_forwards kernel/locking/lockdep.c:1803 [inline] [] check_path.constprop.0+0x24/0x46 kernel/locking/lockdep.c:2104 [] check_noncircular+0x11a/0x1fe kernel/locking/lockdep.c:2131 [] check_prev_add kernel/locking/lockdep.c:3063 [inline] [] check_prevs_add kernel/locking/lockdep.c:3186 [inline] [] validate_chain kernel/locking/lockdep.c:3801 [inline] [] __lock_acquire+0x19a4/0x333e kernel/locking/lockdep.c:5027 [] lock_acquire.part.0+0x1d0/0x424 kernel/locking/lockdep.c:5639 Allocated by task 817: (stack is not available) Last potentially related work creation: ------------[ cut here ]------------ slab index 1510136 out of bounds (327) for stack id 2af70af8 WARNING: CPU: 0 PID: 2039 at lib/stackdepot.c:304 stack_depot_fetch lib/stackdepot.c:304 [inline] WARNING: CPU: 0 PID: 2039 at lib/stackdepot.c:304 stack_depot_print+0x66/0x70 lib/stackdepot.c:276 Modules linked in: CPU: 0 PID: 2039 Comm: syz-executor.0 Not tainted 5.17.0-rc1-syzkaller-00002-g0966d385830d #0 Hardware name: riscv-virtio,qemu (DT) epc : stack_depot_fetch lib/stackdepot.c:304 [inline] epc : stack_depot_print+0x66/0x70 lib/stackdepot.c:276 ra : stack_depot_fetch lib/stackdepot.c:304 [inline] ra : stack_depot_print+0x66/0x70 lib/stackdepot.c:276 epc : ffffffff80c00b8a ra : ffffffff80c00b8a sp : ffffaf8007417ae0 gp : ffffffff85863ac0 tp : ffffaf800b59e100 t0 : ffffffff86bcb657 t1 : fffff5ef0b53910c t2 : 0000000000000000 s0 : ffffaf8007417af0 s1 : ffffaf807a853480 a0 : 000000000000003c a1 : 00000000000f0000 a2 : 0000000000000503 a3 : ffffffff8012252a a4 : 9f46b5015c7fa400 a5 : 9f46b5015c7fa400 a6 : 0000000000f00000 a7 : ffffaf805a9c8863 s2 : ffffaf8007417d50 s3 : ffffaf800723ea00 s4 : ffffaf8007416100 s5 : ffffaf8007417840 s6 : ffffffff8588bb20 s7 : ffffffff85e09180 s8 : ffffaf8007417c60 s9 : ffffaf800b59ec80 s10: ffffffff85899680 s11: ffffaf800b59e100 t3 : ffffffff801163b2 t4 : fffff5ef0b53910c t5 : fffff5ef0b53910d t6 : ffffaf80074175d8 status: 0000000000000100 badaddr: 0000000000000000 cause: 0000000000000003 [] describe_object_stacks mm/kasan/report.c:216 [inline] [] describe_object mm/kasan/report.c:231 [inline] [] print_address_description.constprop.0+0x2fc/0x330 mm/kasan/report.c:263 [] __kasan_report mm/kasan/report.c:442 [inline] [] kasan_report+0x184/0x1e0 mm/kasan/report.c:459 [] check_region_inline mm/kasan/generic.c:183 [inline] [] __asan_load8+0x6e/0x96 mm/kasan/generic.c:256 [] __bfs+0x154/0x394 kernel/locking/lockdep.c:1708 [] __bfs_forwards kernel/locking/lockdep.c:1803 [inline] [] check_path.constprop.0+0x24/0x46 kernel/locking/lockdep.c:2104 [] check_noncircular+0x11a/0x1fe kernel/locking/lockdep.c:2131 [] check_prev_add kernel/locking/lockdep.c:3063 [inline] [] check_prevs_add kernel/locking/lockdep.c:3186 [inline] [] validate_chain kernel/locking/lockdep.c:3801 [inline] [] __lock_acquire+0x19a4/0x333e kernel/locking/lockdep.c:5027 [] lock_acquire.part.0+0x1d0/0x424 kernel/locking/lockdep.c:5639 irq event stamp: 199387 hardirqs last enabled at (199386): [] rmqueue_pcplist mm/page_alloc.c:3671 [inline] hardirqs last enabled at (199386): [] rmqueue mm/page_alloc.c:3698 [inline] hardirqs last enabled at (199386): [] get_page_from_freelist+0xfc8/0x12d8 mm/page_alloc.c:4162 hardirqs last disabled at (199387): [] rmqueue_pcplist mm/page_alloc.c:3660 [inline] hardirqs last disabled at (199387): [] rmqueue mm/page_alloc.c:3698 [inline] hardirqs last disabled at (199387): [] get_page_from_freelist+0xfbe/0x12d8 mm/page_alloc.c:4162 softirqs last enabled at (199348): [] spin_unlock_bh include/linux/spinlock.h:394 [inline] softirqs last enabled at (199348): [] __ip6_ins_rt net/ipv6/route.c:1303 [inline] softirqs last enabled at (199348): [] ip6_route_add+0x7e/0x148 net/ipv6/route.c:3857 softirqs last disabled at (199357): [] do_softirq_own_stack include/asm-generic/softirq_stack.h:10 [inline] softirqs last disabled at (199357): [] invoke_softirq kernel/softirq.c:439 [inline] softirqs last disabled at (199357): [] __irq_exit_rcu+0x142/0x1f8 kernel/softirq.c:637 ---[ end trace 0000000000000000 ]--- Second to last potentially related work creation: stack_trace_save+0xa6/0xd8 kernel/stacktrace.c:122 kasan_save_stack+0x2c/0x58 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+0x80/0xb2 mm/kasan/common.c:524 kasan_kmalloc include/linux/kasan.h:270 [inline] kmem_cache_alloc_trace+0x178/0x2e0 mm/slub.c:3257 kmalloc include/linux/slab.h:581 [inline] kmalloc_array include/linux/slab.h:620 [inline] kcalloc include/linux/slab.h:652 [inline] rtnl_register_internal+0x3b8/0x42a net/core/rtnetlink.c:188 rtnl_register_module+0x38/0x4c net/core/rtnetlink.c:246 ip6_mr_init+0x10e/0x196 net/ipv6/ip6mr.c:1373 inet6_init+0x1f0/0x888 net/ipv6/af_inet6.c:1109 do_one_initcall+0x13a/0x7ea init/main.c:1300 do_initcall_level init/main.c:1373 [inline] do_initcalls init/main.c:1389 [inline] do_basic_setup init/main.c:1408 [inline] kernel_init_freeable+0x510/0x5b4 init/main.c:1613 kernel_init+0x28/0x21c init/main.c:1502 ret_from_exception+0x0/0x10 The buggy address belongs to the object at ffffaf8007416100 which belongs to the cache task_struct of size 5952 The buggy address is located 1296 bytes to the right of 5952-byte region [ffffaf8007416100, ffffaf8007417840) The buggy address belongs to the page: page:ffffaf807a853480 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x87610 head:ffffaf807a853480 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x8000010200(slab|head|section=16|node=0|zone=0) raw: 0000008000010200 0000000000000000 0000000000000122 ffffaf800723ea00 raw: 0000000000000000 0000000000050005 00000001ffffffff 0000000000000000 raw: 00000000000007ff page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x0(), pid 1, ts 1449245400, free_ts 0 stack_trace_save+0xa6/0xd8 kernel/stacktrace.c:122 create_dummy_stack mm/page_owner.c:59 [inline] register_early_stack+0x8a/0xcc mm/page_owner.c:75 init_page_owner+0x8a/0x5cc mm/page_owner.c:87 invoke_init_callbacks mm/page_ext.c:112 [inline] page_ext_init+0x4e6/0x50c mm/page_ext.c:419 page_owner free stack trace missing Memory state around the buggy address: ffffaf8007417c00: f1 f1 f1 f1 00 f3 f3 f3 fc fc fc fc fc fc fc fc ffffaf8007417c80: fc fc fc fc fc fc fc fc fc fc fc fc 00 00 00 00 >ffffaf8007417d00: f1 f1 f1 f1 00 f2 f2 f2 fc fc fc fc 00 00 00 f3 ^ ffffaf8007417d80: f3 f3 f3 f3 fc fc fc fc fc fc fc fc fc fc fc fc ffffaf8007417e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ==================================================================