Date
July 1, 2025, 11:08 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.408965] ================================================================== [ 18.409051] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x150/0x2f8 [ 18.409119] Write of size 2 at addr fff00000c7732177 by task kunit_try_catch/173 [ 18.409220] [ 18.409325] CPU: 1 UID: 0 PID: 173 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 18.409419] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.409581] Hardware name: linux,dummy-virt (DT) [ 18.409618] Call trace: [ 18.409714] show_stack+0x20/0x38 (C) [ 18.409909] dump_stack_lvl+0x8c/0xd0 [ 18.409984] print_report+0x118/0x608 [ 18.410086] kasan_report+0xdc/0x128 [ 18.410147] kasan_check_range+0x100/0x1a8 [ 18.410217] __asan_memset+0x34/0x78 [ 18.410272] kmalloc_oob_memset_2+0x150/0x2f8 [ 18.410342] kunit_try_run_case+0x170/0x3f0 [ 18.410444] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.410501] kthread+0x328/0x630 [ 18.410576] ret_from_fork+0x10/0x20 [ 18.410630] [ 18.410650] Allocated by task 173: [ 18.410681] kasan_save_stack+0x3c/0x68 [ 18.410889] kasan_save_track+0x20/0x40 [ 18.410932] kasan_save_alloc_info+0x40/0x58 [ 18.410975] __kasan_kmalloc+0xd4/0xd8 [ 18.411013] __kmalloc_cache_noprof+0x16c/0x3c0 [ 18.411055] kmalloc_oob_memset_2+0xb0/0x2f8 [ 18.411116] kunit_try_run_case+0x170/0x3f0 [ 18.411277] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.411395] kthread+0x328/0x630 [ 18.411491] ret_from_fork+0x10/0x20 [ 18.411543] [ 18.411565] The buggy address belongs to the object at fff00000c7732100 [ 18.411565] which belongs to the cache kmalloc-128 of size 128 [ 18.411631] The buggy address is located 119 bytes inside of [ 18.411631] allocated 120-byte region [fff00000c7732100, fff00000c7732178) [ 18.411701] [ 18.411725] The buggy address belongs to the physical page: [ 18.411933] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107732 [ 18.411994] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 18.412051] page_type: f5(slab) [ 18.412097] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 18.412162] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 18.412317] page dumped because: kasan: bad access detected [ 18.412394] [ 18.412414] Memory state around the buggy address: [ 18.412464] fff00000c7732000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.412554] fff00000c7732080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.412601] >fff00000c7732100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 18.412694] ^ [ 18.412842] fff00000c7732180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.412889] fff00000c7732200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.413120] ==================================================================
[ 11.601579] ================================================================== [ 11.602051] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_2+0x166/0x330 [ 11.602468] Write of size 2 at addr ffff888102ef5877 by task kunit_try_catch/189 [ 11.602922] [ 11.603039] CPU: 1 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.603088] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.603100] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.603122] Call Trace: [ 11.603135] <TASK> [ 11.603154] dump_stack_lvl+0x73/0xb0 [ 11.603185] print_report+0xd1/0x650 [ 11.603209] ? __virt_addr_valid+0x1db/0x2d0 [ 11.603234] ? kmalloc_oob_memset_2+0x166/0x330 [ 11.603254] ? kasan_complete_mode_report_info+0x2a/0x200 [ 11.603276] ? kmalloc_oob_memset_2+0x166/0x330 [ 11.603298] kasan_report+0x141/0x180 [ 11.603318] ? kmalloc_oob_memset_2+0x166/0x330 [ 11.603343] kasan_check_range+0x10c/0x1c0 [ 11.603366] __asan_memset+0x27/0x50 [ 11.603397] kmalloc_oob_memset_2+0x166/0x330 [ 11.603418] ? __pfx_kmalloc_oob_memset_2+0x10/0x10 [ 11.603440] ? __schedule+0x10cc/0x2b60 [ 11.603462] ? __pfx_read_tsc+0x10/0x10 [ 11.603483] ? ktime_get_ts64+0x86/0x230 [ 11.603509] kunit_try_run_case+0x1a5/0x480 [ 11.603535] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.603555] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.603579] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.603600] ? __kthread_parkme+0x82/0x180 [ 11.603621] ? preempt_count_sub+0x50/0x80 [ 11.603645] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.603667] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.603812] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.603839] kthread+0x337/0x6f0 [ 11.603857] ? trace_preempt_on+0x20/0xc0 [ 11.603882] ? __pfx_kthread+0x10/0x10 [ 11.603901] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.603923] ? calculate_sigpending+0x7b/0xa0 [ 11.604016] ? __pfx_kthread+0x10/0x10 [ 11.604037] ret_from_fork+0x116/0x1d0 [ 11.604055] ? __pfx_kthread+0x10/0x10 [ 11.604074] ret_from_fork_asm+0x1a/0x30 [ 11.604105] </TASK> [ 11.604116] [ 11.611668] Allocated by task 189: [ 11.611867] kasan_save_stack+0x45/0x70 [ 11.612113] kasan_save_track+0x18/0x40 [ 11.612282] kasan_save_alloc_info+0x3b/0x50 [ 11.612448] __kasan_kmalloc+0xb7/0xc0 [ 11.612580] __kmalloc_cache_noprof+0x189/0x420 [ 11.612736] kmalloc_oob_memset_2+0xac/0x330 [ 11.612960] kunit_try_run_case+0x1a5/0x480 [ 11.613165] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.613423] kthread+0x337/0x6f0 [ 11.613590] ret_from_fork+0x116/0x1d0 [ 11.613775] ret_from_fork_asm+0x1a/0x30 [ 11.613969] [ 11.614153] The buggy address belongs to the object at ffff888102ef5800 [ 11.614153] which belongs to the cache kmalloc-128 of size 128 [ 11.614696] The buggy address is located 119 bytes inside of [ 11.614696] allocated 120-byte region [ffff888102ef5800, ffff888102ef5878) [ 11.615245] [ 11.615340] The buggy address belongs to the physical page: [ 11.615592] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102ef5 [ 11.615910] flags: 0x200000000000000(node=0|zone=2) [ 11.616169] page_type: f5(slab) [ 11.616333] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 11.616686] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 11.617067] page dumped because: kasan: bad access detected [ 11.617241] [ 11.617311] Memory state around the buggy address: [ 11.617483] ffff888102ef5700: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.617699] ffff888102ef5780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.618102] >ffff888102ef5800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 11.618431] ^ [ 11.618804] ffff888102ef5880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.619019] ffff888102ef5900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.619233] ==================================================================