Hay
Date
July 2, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64

[   20.395235] ==================================================================
[   20.395299] BUG: KASAN: slab-out-of-bounds in memcmp+0x198/0x1d8
[   20.395357] Read of size 1 at addr fff00000c58a9198 by task kunit_try_catch/257
[   20.395430] 
[   20.395471] CPU: 0 UID: 0 PID: 257 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT 
[   20.395569] Tainted: [B]=BAD_PAGE, [N]=TEST
[   20.396153] Hardware name: linux,dummy-virt (DT)
[   20.396207] Call trace:
[   20.396251]  show_stack+0x20/0x38 (C)
[   20.396402]  dump_stack_lvl+0x8c/0xd0
[   20.396906]  print_report+0x118/0x608
[   20.397995]  kasan_report+0xdc/0x128
[   20.398079]  __asan_report_load1_noabort+0x20/0x30
[   20.398183]  memcmp+0x198/0x1d8
[   20.398312]  kasan_memcmp+0x16c/0x300
[   20.398371]  kunit_try_run_case+0x170/0x3f0
[   20.398594]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.398794]  kthread+0x328/0x630
[   20.399064]  ret_from_fork+0x10/0x20
[   20.399224] 
[   20.399315] Allocated by task 257:
[   20.399390]  kasan_save_stack+0x3c/0x68
[   20.399530]  kasan_save_track+0x20/0x40
[   20.399671]  kasan_save_alloc_info+0x40/0x58
[   20.399748]  __kasan_kmalloc+0xd4/0xd8
[   20.399939]  __kmalloc_cache_noprof+0x16c/0x3c0
[   20.400104]  kasan_memcmp+0xbc/0x300
[   20.400257]  kunit_try_run_case+0x170/0x3f0
[   20.400483]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   20.400699]  kthread+0x328/0x630
[   20.400831]  ret_from_fork+0x10/0x20
[   20.401163] 
[   20.401294] The buggy address belongs to the object at fff00000c58a9180
[   20.401294]  which belongs to the cache kmalloc-32 of size 32
[   20.401525] The buggy address is located 0 bytes to the right of
[   20.401525]  allocated 24-byte region [fff00000c58a9180, fff00000c58a9198)
[   20.401783] 
[   20.401823] The buggy address belongs to the physical page:
[   20.401875] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058a9
[   20.402097] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   20.402274] page_type: f5(slab)
[   20.402590] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   20.402760] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   20.402875] page dumped because: kasan: bad access detected
[   20.403134] 
[   20.403560] Memory state around the buggy address:
[   20.403763]  fff00000c58a9080: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   20.404007]  fff00000c58a9100: 00 00 00 04 fc fc fc fc 00 00 07 fc fc fc fc fc
[   20.404180] >fff00000c58a9180: 00 00 00 fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.404392]                             ^
[   20.404643]  fff00000c58a9200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.404916]  fff00000c58a9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   20.405029] ==================================================================

[   13.321209] ==================================================================
[   13.322367] BUG: KASAN: slab-out-of-bounds in memcmp+0x1b4/0x1d0
[   13.323048] Read of size 1 at addr ffff8881031254d8 by task kunit_try_catch/276
[   13.323742] 
[   13.323953] CPU: 0 UID: 0 PID: 276 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc4 #1 PREEMPT(voluntary) 
[   13.324001] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.324014] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.324036] Call Trace:
[   13.324048]  <TASK>
[   13.324067]  dump_stack_lvl+0x73/0xb0
[   13.324096]  print_report+0xd1/0x650
[   13.324153]  ? __virt_addr_valid+0x1db/0x2d0
[   13.324177]  ? memcmp+0x1b4/0x1d0
[   13.324195]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.324218]  ? memcmp+0x1b4/0x1d0
[   13.324235]  kasan_report+0x141/0x180
[   13.324256]  ? memcmp+0x1b4/0x1d0
[   13.324277]  __asan_report_load1_noabort+0x18/0x20
[   13.324301]  memcmp+0x1b4/0x1d0
[   13.324320]  kasan_memcmp+0x18f/0x390
[   13.324339]  ? trace_hardirqs_on+0x37/0xe0
[   13.324376]  ? __pfx_kasan_memcmp+0x10/0x10
[   13.324396]  ? finish_task_switch.isra.0+0x153/0x700
[   13.324418]  ? __switch_to+0x47/0xf50
[   13.324447]  ? __pfx_read_tsc+0x10/0x10
[   13.324468]  ? ktime_get_ts64+0x86/0x230
[   13.324492]  kunit_try_run_case+0x1a5/0x480
[   13.324517]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.324539]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.324562]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.324598]  ? __kthread_parkme+0x82/0x180
[   13.324619]  ? preempt_count_sub+0x50/0x80
[   13.324641]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.324664]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.324686]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.324709]  kthread+0x337/0x6f0
[   13.324727]  ? trace_preempt_on+0x20/0xc0
[   13.324748]  ? __pfx_kthread+0x10/0x10
[   13.324768]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.324789]  ? calculate_sigpending+0x7b/0xa0
[   13.324812]  ? __pfx_kthread+0x10/0x10
[   13.324833]  ret_from_fork+0x116/0x1d0
[   13.324850]  ? __pfx_kthread+0x10/0x10
[   13.324870]  ret_from_fork_asm+0x1a/0x30
[   13.324901]  </TASK>
[   13.324912] 
[   13.338824] Allocated by task 276:
[   13.339221]  kasan_save_stack+0x45/0x70
[   13.339697]  kasan_save_track+0x18/0x40
[   13.339874]  kasan_save_alloc_info+0x3b/0x50
[   13.340381]  __kasan_kmalloc+0xb7/0xc0
[   13.340814]  __kmalloc_cache_noprof+0x189/0x420
[   13.341042]  kasan_memcmp+0xb7/0x390
[   13.341413]  kunit_try_run_case+0x1a5/0x480
[   13.341890]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.342211]  kthread+0x337/0x6f0
[   13.342554]  ret_from_fork+0x116/0x1d0
[   13.342846]  ret_from_fork_asm+0x1a/0x30
[   13.343224] 
[   13.343298] The buggy address belongs to the object at ffff8881031254c0
[   13.343298]  which belongs to the cache kmalloc-32 of size 32
[   13.343653] The buggy address is located 0 bytes to the right of
[   13.343653]  allocated 24-byte region [ffff8881031254c0, ffff8881031254d8)
[   13.344970] 
[   13.345170] The buggy address belongs to the physical page:
[   13.345469] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103125
[   13.346148] flags: 0x200000000000000(node=0|zone=2)
[   13.346650] page_type: f5(slab)
[   13.346857] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   13.347379] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000
[   13.347668] page dumped because: kasan: bad access detected
[   13.348226] 
[   13.348471] Memory state around the buggy address:
[   13.349153]  ffff888103125380: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   13.349796]  ffff888103125400: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc
[   13.350235] >ffff888103125480: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   13.350464]                                                     ^
[   13.350879]  ffff888103125500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.351627]  ffff888103125580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.352369] ==================================================================