Date
Dec. 4, 2024, 3:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 31.984585] ================================================================== [ 31.985701] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0 [ 31.986511] Write of size 128 at addr fff00000c6723d00 by task kunit_try_catch/158 [ 31.987480] [ 31.988177] CPU: 1 UID: 0 PID: 158 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 31.989371] Tainted: [B]=BAD_PAGE, [N]=TEST [ 31.990511] Hardware name: linux,dummy-virt (DT) [ 31.991135] Call trace: [ 31.991649] show_stack+0x20/0x38 (C) [ 31.992230] dump_stack_lvl+0x8c/0xd0 [ 31.992881] print_report+0x118/0x5e0 [ 31.993407] kasan_report+0xc8/0x118 [ 31.994383] kasan_check_range+0x100/0x1a8 [ 31.995039] __asan_memset+0x34/0x78 [ 31.995586] kmalloc_oob_in_memset+0x144/0x2d0 [ 31.996316] kunit_try_run_case+0x14c/0x3d0 [ 31.996946] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 31.998126] kthread+0x24c/0x2d0 [ 31.998620] ret_from_fork+0x10/0x20 [ 31.999214] [ 31.999573] Allocated by task 158: [ 32.000036] kasan_save_stack+0x3c/0x68 [ 32.000699] kasan_save_track+0x20/0x40 [ 32.001243] kasan_save_alloc_info+0x40/0x58 [ 32.001920] __kasan_kmalloc+0xd4/0xd8 [ 32.002808] __kmalloc_cache_noprof+0x15c/0x3c0 [ 32.003495] kmalloc_oob_in_memset+0xb0/0x2d0 [ 32.004179] kunit_try_run_case+0x14c/0x3d0 [ 32.004729] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.005545] kthread+0x24c/0x2d0 [ 32.006108] ret_from_fork+0x10/0x20 [ 32.006677] [ 32.007036] The buggy address belongs to the object at fff00000c6723d00 [ 32.007036] which belongs to the cache kmalloc-128 of size 128 [ 32.008839] The buggy address is located 0 bytes inside of [ 32.008839] allocated 120-byte region [fff00000c6723d00, fff00000c6723d78) [ 32.011305] [ 32.011796] The buggy address belongs to the physical page: [ 32.012893] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106723 [ 32.013947] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.014879] page_type: f5(slab) [ 32.015503] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 32.016416] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 32.017391] page dumped because: kasan: bad access detected [ 32.018428] [ 32.018955] Memory state around the buggy address: [ 32.019580] fff00000c6723c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc [ 32.020522] fff00000c6723c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.022228] >fff00000c6723d00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 32.023213] ^ [ 32.023924] fff00000c6723d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.025016] fff00000c6723e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.027048] ==================================================================
[ 22.802831] ================================================================== [ 22.804089] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x160/0x320 [ 22.805165] Write of size 128 at addr ffff88810298bc00 by task kunit_try_catch/178 [ 22.806833] [ 22.807083] CPU: 1 UID: 0 PID: 178 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 22.808948] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.809940] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.810733] Call Trace: [ 22.811783] <TASK> [ 22.812009] dump_stack_lvl+0x73/0xb0 [ 22.812221] print_report+0xd1/0x640 [ 22.812943] ? __virt_addr_valid+0x1db/0x2d0 [ 22.814015] ? kasan_complete_mode_report_info+0x2a/0x200 [ 22.814848] kasan_report+0x102/0x140 [ 22.815528] ? kmalloc_oob_in_memset+0x160/0x320 [ 22.816661] ? kmalloc_oob_in_memset+0x160/0x320 [ 22.817156] kasan_check_range+0x10c/0x1c0 [ 22.818147] __asan_memset+0x27/0x50 [ 22.818703] kmalloc_oob_in_memset+0x160/0x320 [ 22.819229] ? __pfx_kmalloc_oob_in_memset+0x10/0x10 [ 22.820228] ? __schedule+0xc3e/0x2790 [ 22.820698] ? __pfx_read_tsc+0x10/0x10 [ 22.821368] ? ktime_get_ts64+0x86/0x230 [ 22.822657] kunit_try_run_case+0x1b3/0x490 [ 22.823010] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.823800] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 22.824728] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.825099] ? __kthread_parkme+0x82/0x160 [ 22.826067] ? preempt_count_sub+0x50/0x80 [ 22.826661] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.827501] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.828135] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.829139] kthread+0x257/0x310 [ 22.829696] ? __pfx_kthread+0x10/0x10 [ 22.830308] ret_from_fork+0x41/0x80 [ 22.831057] ? __pfx_kthread+0x10/0x10 [ 22.831829] ret_from_fork_asm+0x1a/0x30 [ 22.832652] </TASK> [ 22.833170] [ 22.833448] Allocated by task 178: [ 22.834368] kasan_save_stack+0x3d/0x60 [ 22.834992] kasan_save_track+0x18/0x40 [ 22.835662] kasan_save_alloc_info+0x3b/0x50 [ 22.836117] __kasan_kmalloc+0xb7/0xc0 [ 22.836673] __kmalloc_cache_noprof+0x184/0x410 [ 22.837627] kmalloc_oob_in_memset+0xad/0x320 [ 22.838234] kunit_try_run_case+0x1b3/0x490 [ 22.838854] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.839799] kthread+0x257/0x310 [ 22.840136] ret_from_fork+0x41/0x80 [ 22.840785] ret_from_fork_asm+0x1a/0x30 [ 22.841113] [ 22.841351] The buggy address belongs to the object at ffff88810298bc00 [ 22.841351] which belongs to the cache kmalloc-128 of size 128 [ 22.843467] The buggy address is located 0 bytes inside of [ 22.843467] allocated 120-byte region [ffff88810298bc00, ffff88810298bc78) [ 22.844438] [ 22.844644] The buggy address belongs to the physical page: [ 22.845353] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10298b [ 22.845927] flags: 0x200000000000000(node=0|zone=2) [ 22.846768] page_type: f5(slab) [ 22.847114] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 22.848014] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 22.848825] page dumped because: kasan: bad access detected [ 22.849631] [ 22.849893] Memory state around the buggy address: [ 22.850486] ffff88810298bb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc [ 22.851459] ffff88810298bb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.851998] >ffff88810298bc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 22.852979] ^ [ 22.853714] ffff88810298bc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.854744] ffff88810298bd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.855555] ==================================================================