Date
July 8, 2025, 7:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.288929] ================================================================== [ 19.289033] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0 [ 19.289101] Write of size 128 at addr fff00000c1d5fd00 by task kunit_try_catch/170 [ 19.289257] [ 19.289293] CPU: 1 UID: 0 PID: 170 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 19.289629] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.289681] Hardware name: linux,dummy-virt (DT) [ 19.290007] Call trace: [ 19.290098] show_stack+0x20/0x38 (C) [ 19.290153] dump_stack_lvl+0x8c/0xd0 [ 19.290196] print_report+0x118/0x608 [ 19.290240] kasan_report+0xdc/0x128 [ 19.290322] kasan_check_range+0x100/0x1a8 [ 19.290375] __asan_memset+0x34/0x78 [ 19.290462] kmalloc_oob_in_memset+0x144/0x2d0 [ 19.290549] kunit_try_run_case+0x170/0x3f0 [ 19.290595] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.290657] kthread+0x328/0x630 [ 19.290698] ret_from_fork+0x10/0x20 [ 19.290753] [ 19.290771] Allocated by task 170: [ 19.290946] kasan_save_stack+0x3c/0x68 [ 19.291001] kasan_save_track+0x20/0x40 [ 19.291182] kasan_save_alloc_info+0x40/0x58 [ 19.291235] __kasan_kmalloc+0xd4/0xd8 [ 19.291270] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.291307] kmalloc_oob_in_memset+0xb0/0x2d0 [ 19.291350] kunit_try_run_case+0x170/0x3f0 [ 19.291386] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.291461] kthread+0x328/0x630 [ 19.291551] ret_from_fork+0x10/0x20 [ 19.291752] [ 19.291785] The buggy address belongs to the object at fff00000c1d5fd00 [ 19.291785] which belongs to the cache kmalloc-128 of size 128 [ 19.291843] The buggy address is located 0 bytes inside of [ 19.291843] allocated 120-byte region [fff00000c1d5fd00, fff00000c1d5fd78) [ 19.291903] [ 19.291922] The buggy address belongs to the physical page: [ 19.292187] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101d5f [ 19.292288] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.292498] page_type: f5(slab) [ 19.292605] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 19.292785] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.292903] page dumped because: kasan: bad access detected [ 19.292945] [ 19.292963] Memory state around the buggy address: [ 19.293008] fff00000c1d5fc00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.293056] fff00000c1d5fc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.293122] >fff00000c1d5fd00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 19.293158] ^ [ 19.293204] fff00000c1d5fd80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.293253] fff00000c1d5fe00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.293311] ==================================================================
[ 12.951287] ================================================================== [ 12.952149] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320 [ 12.952464] Write of size 128 at addr ffff888102602700 by task kunit_try_catch/187 [ 12.952766] [ 12.952882] CPU: 1 UID: 0 PID: 187 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.952926] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.952937] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.952957] Call Trace: [ 12.952970] <TASK> [ 12.952986] dump_stack_lvl+0x73/0xb0 [ 12.953012] print_report+0xd1/0x650 [ 12.953033] ? __virt_addr_valid+0x1db/0x2d0 [ 12.953089] ? kmalloc_oob_in_memset+0x15f/0x320 [ 12.953110] ? kasan_complete_mode_report_info+0x2a/0x200 [ 12.953134] ? kmalloc_oob_in_memset+0x15f/0x320 [ 12.953155] kasan_report+0x141/0x180 [ 12.953176] ? kmalloc_oob_in_memset+0x15f/0x320 [ 12.953202] kasan_check_range+0x10c/0x1c0 [ 12.953224] __asan_memset+0x27/0x50 [ 12.953242] kmalloc_oob_in_memset+0x15f/0x320 [ 12.953263] ? __pfx_kmalloc_oob_in_memset+0x10/0x10 [ 12.953285] ? __schedule+0x10cc/0x2b60 [ 12.953306] ? __pfx_read_tsc+0x10/0x10 [ 12.953326] ? ktime_get_ts64+0x86/0x230 [ 12.953350] kunit_try_run_case+0x1a5/0x480 [ 12.953373] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.953393] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.953416] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.953437] ? __kthread_parkme+0x82/0x180 [ 12.953456] ? preempt_count_sub+0x50/0x80 [ 12.953478] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.953517] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.953539] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.953566] kthread+0x337/0x6f0 [ 12.953585] ? trace_preempt_on+0x20/0xc0 [ 12.953607] ? __pfx_kthread+0x10/0x10 [ 12.953626] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.953646] ? calculate_sigpending+0x7b/0xa0 [ 12.953668] ? __pfx_kthread+0x10/0x10 [ 12.953688] ret_from_fork+0x116/0x1d0 [ 12.953706] ? __pfx_kthread+0x10/0x10 [ 12.953725] ret_from_fork_asm+0x1a/0x30 [ 12.953755] </TASK> [ 12.953766] [ 12.960783] Allocated by task 187: [ 12.960910] kasan_save_stack+0x45/0x70 [ 12.961060] kasan_save_track+0x18/0x40 [ 12.961369] kasan_save_alloc_info+0x3b/0x50 [ 12.961699] __kasan_kmalloc+0xb7/0xc0 [ 12.961897] __kmalloc_cache_noprof+0x189/0x420 [ 12.962088] kmalloc_oob_in_memset+0xac/0x320 [ 12.962237] kunit_try_run_case+0x1a5/0x480 [ 12.962449] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.962735] kthread+0x337/0x6f0 [ 12.962902] ret_from_fork+0x116/0x1d0 [ 12.963227] ret_from_fork_asm+0x1a/0x30 [ 12.963393] [ 12.963466] The buggy address belongs to the object at ffff888102602700 [ 12.963466] which belongs to the cache kmalloc-128 of size 128 [ 12.963835] The buggy address is located 0 bytes inside of [ 12.963835] allocated 120-byte region [ffff888102602700, ffff888102602778) [ 12.964353] [ 12.964450] The buggy address belongs to the physical page: [ 12.964700] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102602 [ 12.965006] flags: 0x200000000000000(node=0|zone=2) [ 12.965205] page_type: f5(slab) [ 12.965328] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 12.965602] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.965957] page dumped because: kasan: bad access detected [ 12.966228] [ 12.966321] Memory state around the buggy address: [ 12.966547] ffff888102602600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.966866] ffff888102602680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.967179] >ffff888102602700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 12.967442] ^ [ 12.967724] ffff888102602780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.968000] ffff888102602800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.968248] ==================================================================