================================================================== BUG: KASAN: slab-out-of-bounds in walk_stackframe+0x11c/0x260 arch/riscv/kernel/stacktrace.c:57 Read of size 8 at addr ffffaf800a1a7f10 by task syz-executor.0/2041 CPU: 0 PID: 2041 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 [] walk_stackframe+0x11c/0x260 arch/riscv/kernel/stacktrace.c:57 [] arch_stack_walk+0x2c/0x3c arch/riscv/kernel/stacktrace.c:146 [] stack_trace_save+0xa6/0xd8 kernel/stacktrace.c:122 Allocated by task 1: (stack is not available) 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] __kmalloc+0x190/0x318 mm/slub.c:4424 kmalloc include/linux/slab.h:586 [inline] aa_str_alloc+0x26/0x64 security/apparmor/lib.c:139 aa_policy_init+0x15a/0x178 security/apparmor/lib.c:499 alloc_ns+0xae/0x46c security/apparmor/policy_ns.c:95 aa_alloc_root_ns+0x24/0x46 security/apparmor/policy_ns.c:392 apparmor_init+0x9e/0x47e security/apparmor/lsm.c:1848 initialize_lsm+0xac/0xfc security/security.c:237 ordered_lsm_init security/security.c:361 [inline] security_init+0x510/0x53e security/security.c:407 start_kernel+0x60a/0x698 init/main.c:1117 The buggy address belongs to the object at ffffaf800a1a72c0 which belongs to the cache signal_cache of size 1544 The buggy address is located 1608 bytes to the right of 1544-byte region [ffffaf800a1a72c0, ffffaf800a1a78c8) The buggy address belongs to the page: page:ffffaf807a920500 refcount:1 mapcount:0 mapping:0000000000000000 index:0xffffaf800a1a4a40 pfn:0x8a3a0 head:ffffaf807a920500 order:3 compound_mapcount:0 compound_pincount:0 flags: 0x8800010200(slab|head|section=17|node=0|zone=0) raw: 0000008800010200 ffffaf807a909408 ffffaf807a903e88 ffffaf800723ec80 raw: ffffaf800a1a4a40 0000000000120002 00000001ffffffff 0000000000000000 raw: 00000000000007ff page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 7, ts 26408213100, free_ts 0 __set_page_owner+0x48/0x136 mm/page_owner.c:183 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0xd0/0x10a mm/page_alloc.c:2427 prep_new_page mm/page_alloc.c:2434 [inline] get_page_from_freelist+0x8da/0x12d8 mm/page_alloc.c:4165 __alloc_pages+0x150/0x3b6 mm/page_alloc.c:5389 alloc_pages+0x132/0x2a6 mm/mempolicy.c:2271 alloc_slab_page.constprop.0+0xc2/0xfa mm/slub.c:1799 allocate_slab mm/slub.c:1944 [inline] new_slab+0x25a/0x2cc mm/slub.c:2004 ___slab_alloc+0x56e/0x918 mm/slub.c:3018 __slab_alloc.constprop.0+0x50/0x8c mm/slub.c:3105 slab_alloc_node mm/slub.c:3196 [inline] slab_alloc mm/slub.c:3238 [inline] kmem_cache_alloc+0x39c/0x3de mm/slub.c:3243 kmem_cache_zalloc include/linux/slab.h:705 [inline] copy_signal kernel/fork.c:1616 [inline] copy_process+0x15a8/0x3c34 kernel/fork.c:2161 kernel_clone+0xee/0x920 kernel/fork.c:2555 kernel_thread+0xf8/0x130 kernel/fork.c:2607 call_usermodehelper_exec_work kernel/umh.c:174 [inline] call_usermodehelper_exec_work+0xc8/0x122 kernel/umh.c:160 process_one_work+0x654/0xffe kernel/workqueue.c:2307 worker_thread+0x360/0x8fa kernel/workqueue.c:2454 page_owner free stack trace missing Memory state around the buggy address: ffffaf800a1a7e00: 00 00 00 00 fc fc fc fc 00 00 00 00 00 00 00 00 ffffaf800a1a7e80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffffaf800a1a7f00: fc fc fc fc fc fc fc fc fc fc fc fc f1 f1 f1 f1 ^ ffffaf800a1a7f80: 00 00 00 f3 f3 f3 f3 f3 00 00 00 00 fc fc fc fc ffffaf800a1a8000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================