Hay
Date
June 26, 2025, 11:12 a.m.

Environment
e850-96
qemu-x86_64

[   27.068756] ==================================================================
[   27.077790] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x144/0x2d0
[   27.085079] Write of size 128 at addr ffff000801ed6400 by task kunit_try_catch/219
[   27.092627] 
[   27.094116] CPU: 7 UID: 0 PID: 219 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc3 #1 PREEMPT 
[   27.094171] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.094186] Hardware name: WinLink E850-96 board (DT)
[   27.094210] Call trace:
[   27.094225]  show_stack+0x20/0x38 (C)
[   27.094259]  dump_stack_lvl+0x8c/0xd0
[   27.094298]  print_report+0x118/0x608
[   27.094329]  kasan_report+0xdc/0x128
[   27.094360]  kasan_check_range+0x100/0x1a8
[   27.094390]  __asan_memset+0x34/0x78
[   27.094422]  kmalloc_oob_in_memset+0x144/0x2d0
[   27.094456]  kunit_try_run_case+0x170/0x3f0
[   27.094493]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.094532]  kthread+0x328/0x630
[   27.094568]  ret_from_fork+0x10/0x20
[   27.094604] 
[   27.160075] Allocated by task 219:
[   27.163463]  kasan_save_stack+0x3c/0x68
[   27.167278]  kasan_save_track+0x20/0x40
[   27.171098]  kasan_save_alloc_info+0x40/0x58
[   27.175351]  __kasan_kmalloc+0xd4/0xd8
[   27.179085]  __kmalloc_cache_noprof+0x16c/0x3c0
[   27.183598]  kmalloc_oob_in_memset+0xb0/0x2d0
[   27.187938]  kunit_try_run_case+0x170/0x3f0
[   27.192105]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.197573]  kthread+0x328/0x630
[   27.200785]  ret_from_fork+0x10/0x20
[   27.204344] 
[   27.205821] The buggy address belongs to the object at ffff000801ed6400
[   27.205821]  which belongs to the cache kmalloc-128 of size 128
[   27.218322] The buggy address is located 0 bytes inside of
[   27.218322]  allocated 120-byte region [ffff000801ed6400, ffff000801ed6478)
[   27.230733] 
[   27.232211] The buggy address belongs to the physical page:
[   27.237769] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x881ed6
[   27.245753] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   27.253390] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   27.260336] page_type: f5(slab)
[   27.263474] raw: 0bfffe0000000040 ffff000800002a00 dead000000000122 0000000000000000
[   27.271190] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   27.278917] head: 0bfffe0000000040 ffff000800002a00 dead000000000122 0000000000000000
[   27.286728] head: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   27.294541] head: 0bfffe0000000001 fffffdffe007b581 00000000ffffffff 00000000ffffffff
[   27.302353] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   27.310158] page dumped because: kasan: bad access detected
[   27.315715] 
[   27.317191] Memory state around the buggy address:
[   27.321973]  ffff000801ed6300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
[   27.329172]  ffff000801ed6380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.336379] >ffff000801ed6400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   27.343578]                                                                 ^
[   27.350702]  ffff000801ed6480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.357904]  ffff000801ed6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.365107] ==================================================================

[   10.931666] ==================================================================
[   10.932184] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_in_memset+0x15f/0x320
[   10.932442] Write of size 128 at addr ffff8881029f9000 by task kunit_try_catch/189
[   10.933483] 
[   10.933893] CPU: 0 UID: 0 PID: 189 Comm: kunit_try_catch Tainted: G    B            N  6.15.4-rc3 #1 PREEMPT(voluntary) 
[   10.933959] Tainted: [B]=BAD_PAGE, [N]=TEST
[   10.933972] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   10.933995] Call Trace:
[   10.934010]  <TASK>
[   10.934028]  dump_stack_lvl+0x73/0xb0
[   10.934058]  print_report+0xd1/0x650
[   10.934082]  ? __virt_addr_valid+0x1db/0x2d0
[   10.934105]  ? kmalloc_oob_in_memset+0x15f/0x320
[   10.934127]  ? kasan_complete_mode_report_info+0x2a/0x200
[   10.934149]  ? kmalloc_oob_in_memset+0x15f/0x320
[   10.934171]  kasan_report+0x141/0x180
[   10.934193]  ? kmalloc_oob_in_memset+0x15f/0x320
[   10.934220]  kasan_check_range+0x10c/0x1c0
[   10.934239]  __asan_memset+0x27/0x50
[   10.934259]  kmalloc_oob_in_memset+0x15f/0x320
[   10.934281]  ? __pfx_kmalloc_oob_in_memset+0x10/0x10
[   10.934303]  ? __schedule+0x10cc/0x2b60
[   10.934327]  ? __pfx_read_tsc+0x10/0x10
[   10.934347]  ? ktime_get_ts64+0x86/0x230
[   10.934372]  kunit_try_run_case+0x1a5/0x480
[   10.934398]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.934419]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   10.934443]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   10.934466]  ? __kthread_parkme+0x82/0x180
[   10.934488]  ? preempt_count_sub+0x50/0x80
[   10.934513]  ? __pfx_kunit_try_run_case+0x10/0x10
[   10.934536]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.934748]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   10.934777]  kthread+0x337/0x6f0
[   10.934795]  ? trace_preempt_on+0x20/0xc0
[   10.934855]  ? __pfx_kthread+0x10/0x10
[   10.934875]  ? _raw_spin_unlock_irq+0x47/0x80
[   10.934897]  ? calculate_sigpending+0x7b/0xa0
[   10.934928]  ? __pfx_kthread+0x10/0x10
[   10.934946]  ret_from_fork+0x41/0x80
[   10.934968]  ? __pfx_kthread+0x10/0x10
[   10.934986]  ret_from_fork_asm+0x1a/0x30
[   10.935016]  </TASK>
[   10.935028] 
[   10.947569] Allocated by task 189:
[   10.948164]  kasan_save_stack+0x45/0x70
[   10.948356]  kasan_save_track+0x18/0x40
[   10.948549]  kasan_save_alloc_info+0x3b/0x50
[   10.948723]  __kasan_kmalloc+0xb7/0xc0
[   10.948986]  __kmalloc_cache_noprof+0x189/0x420
[   10.949184]  kmalloc_oob_in_memset+0xac/0x320
[   10.949374]  kunit_try_run_case+0x1a5/0x480
[   10.949572]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   10.949749]  kthread+0x337/0x6f0
[   10.950040]  ret_from_fork+0x41/0x80
[   10.950244]  ret_from_fork_asm+0x1a/0x30
[   10.950432] 
[   10.950509] The buggy address belongs to the object at ffff8881029f9000
[   10.950509]  which belongs to the cache kmalloc-128 of size 128
[   10.951019] The buggy address is located 0 bytes inside of
[   10.951019]  allocated 120-byte region [ffff8881029f9000, ffff8881029f9078)
[   10.951708] 
[   10.951805] The buggy address belongs to the physical page:
[   10.952018] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029f9
[   10.952386] flags: 0x200000000000000(node=0|zone=2)
[   10.953095] page_type: f5(slab)
[   10.953271] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   10.953536] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   10.953986] page dumped because: kasan: bad access detected
[   10.954235] 
[   10.954315] Memory state around the buggy address:
[   10.954515]  ffff8881029f8f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.954929]  ffff8881029f8f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.955231] >ffff8881029f9000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   10.955517]                                                                 ^
[   10.955820]  ffff8881029f9080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.956089]  ffff8881029f9100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   10.956350] ==================================================================