Hay
Date
July 15, 2025, 11:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   15.584659] ==================================================================
[   15.584731] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x150/0x2f8
[   15.584791] Write of size 8 at addr fff00000c592cc71 by task kunit_try_catch/177
[   15.584840] 
[   15.584878] CPU: 1 UID: 0 PID: 177 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT 
[   15.587134] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.587418] Hardware name: linux,dummy-virt (DT)
[   15.588146] Call trace:
[   15.588188]  show_stack+0x20/0x38 (C)
[   15.588252]  dump_stack_lvl+0x8c/0xd0
[   15.588301]  print_report+0x118/0x5d0
[   15.588347]  kasan_report+0xdc/0x128
[   15.589345]  kasan_check_range+0x100/0x1a8
[   15.589487]  __asan_memset+0x34/0x78
[   15.590344]  kmalloc_oob_memset_8+0x150/0x2f8
[   15.590819]  kunit_try_run_case+0x170/0x3f0
[   15.590995]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.591048]  kthread+0x328/0x630
[   15.591091]  ret_from_fork+0x10/0x20
[   15.592072] 
[   15.592175] Allocated by task 177:
[   15.592292]  kasan_save_stack+0x3c/0x68
[   15.593079]  kasan_save_track+0x20/0x40
[   15.593320]  kasan_save_alloc_info+0x40/0x58
[   15.593369]  __kasan_kmalloc+0xd4/0xd8
[   15.593405]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.593444]  kmalloc_oob_memset_8+0xb0/0x2f8
[   15.594236]  kunit_try_run_case+0x170/0x3f0
[   15.594612]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.594831]  kthread+0x328/0x630
[   15.594972]  ret_from_fork+0x10/0x20
[   15.595272] 
[   15.595344] The buggy address belongs to the object at fff00000c592cc00
[   15.595344]  which belongs to the cache kmalloc-128 of size 128
[   15.595406] The buggy address is located 113 bytes inside of
[   15.595406]  allocated 120-byte region [fff00000c592cc00, fff00000c592cc78)
[   15.595469] 
[   15.595489] The buggy address belongs to the physical page:
[   15.595520] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10592c
[   15.597038] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.597100] page_type: f5(slab)
[   15.597510] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   15.598194] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   15.598680] page dumped because: kasan: bad access detected
[   15.599047] 
[   15.599067] Memory state around the buggy address:
[   15.599101]  fff00000c592cb00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   15.599147]  fff00000c592cb80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.599206] >fff00000c592cc00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   15.599244]                                                                 ^
[   15.600419]  fff00000c592cc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.600650]  fff00000c592cd00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.600691] ==================================================================

[   12.646511] ==================================================================
[   12.647096] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_memset_8+0x166/0x330
[   12.647343] Write of size 8 at addr ffff888102afc271 by task kunit_try_catch/193
[   12.647580] 
[   12.647665] CPU: 1 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc6 #1 PREEMPT(voluntary) 
[   12.647707] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.647719] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.647739] Call Trace:
[   12.647750]  <TASK>
[   12.647775]  dump_stack_lvl+0x73/0xb0
[   12.647805]  print_report+0xd1/0x610
[   12.647830]  ? __virt_addr_valid+0x1db/0x2d0
[   12.647854]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.647876]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.647901]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.647923]  kasan_report+0x141/0x180
[   12.647945]  ? kmalloc_oob_memset_8+0x166/0x330
[   12.647972]  kasan_check_range+0x10c/0x1c0
[   12.647995]  __asan_memset+0x27/0x50
[   12.648015]  kmalloc_oob_memset_8+0x166/0x330
[   12.648572]  ? __pfx_kmalloc_oob_memset_8+0x10/0x10
[   12.648606]  ? __schedule+0x10cc/0x2b60
[   12.648630]  ? __pfx_read_tsc+0x10/0x10
[   12.648651]  ? ktime_get_ts64+0x86/0x230
[   12.648676]  kunit_try_run_case+0x1a5/0x480
[   12.648702]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.648724]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.648749]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.648784]  ? __kthread_parkme+0x82/0x180
[   12.648804]  ? preempt_count_sub+0x50/0x80
[   12.648828]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.648852]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.648877]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.648902]  kthread+0x337/0x6f0
[   12.648921]  ? trace_preempt_on+0x20/0xc0
[   12.648945]  ? __pfx_kthread+0x10/0x10
[   12.648965]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.648987]  ? calculate_sigpending+0x7b/0xa0
[   12.649011]  ? __pfx_kthread+0x10/0x10
[   12.649032]  ret_from_fork+0x116/0x1d0
[   12.649051]  ? __pfx_kthread+0x10/0x10
[   12.649071]  ret_from_fork_asm+0x1a/0x30
[   12.649102]  </TASK>
[   12.649112] 
[   12.665546] Allocated by task 193:
[   12.665950]  kasan_save_stack+0x45/0x70
[   12.666359]  kasan_save_track+0x18/0x40
[   12.666967]  kasan_save_alloc_info+0x3b/0x50
[   12.667443]  __kasan_kmalloc+0xb7/0xc0
[   12.667582]  __kmalloc_cache_noprof+0x189/0x420
[   12.668231]  kmalloc_oob_memset_8+0xac/0x330
[   12.668765]  kunit_try_run_case+0x1a5/0x480
[   12.669221]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.669452]  kthread+0x337/0x6f0
[   12.669599]  ret_from_fork+0x116/0x1d0
[   12.670015]  ret_from_fork_asm+0x1a/0x30
[   12.670458] 
[   12.670663] The buggy address belongs to the object at ffff888102afc200
[   12.670663]  which belongs to the cache kmalloc-128 of size 128
[   12.671176] The buggy address is located 113 bytes inside of
[   12.671176]  allocated 120-byte region [ffff888102afc200, ffff888102afc278)
[   12.672274] 
[   12.672582] The buggy address belongs to the physical page:
[   12.673281] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102afc
[   12.674236] flags: 0x200000000000000(node=0|zone=2)
[   12.674968] page_type: f5(slab)
[   12.675448] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   12.676031] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   12.676580] page dumped because: kasan: bad access detected
[   12.677086] 
[   12.677164] Memory state around the buggy address:
[   12.677338]  ffff888102afc100: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   12.677556]  ffff888102afc180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.677803] >ffff888102afc200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   12.678401]                                                                 ^
[   12.679106]  ffff888102afc280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.680029]  ffff888102afc300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.680839] ==================================================================