Hay
Date
May 23, 2025, 11:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   28.393550] ==================================================================
[   28.393963] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x344/0x430
[   28.394141] Read of size 1 at addr fff00000c77780c8 by task kunit_try_catch/209
[   28.394290] 
[   28.394386] CPU: 0 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT 
[   28.395359] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.395898] Hardware name: linux,dummy-virt (DT)
[   28.396105] Call trace:
[   28.396236]  show_stack+0x20/0x38 (C)
[   28.396693]  dump_stack_lvl+0x8c/0xd0
[   28.397013]  print_report+0x118/0x608
[   28.397136]  kasan_report+0xdc/0x128
[   28.397255]  __asan_report_load1_noabort+0x20/0x30
[   28.397917]  kmem_cache_oob+0x344/0x430
[   28.398464]  kunit_try_run_case+0x170/0x3f0
[   28.398939]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.399176]  kthread+0x328/0x630
[   28.399739]  ret_from_fork+0x10/0x20
[   28.400075] 
[   28.400188] Allocated by task 209:
[   28.400375]  kasan_save_stack+0x3c/0x68
[   28.400528]  kasan_save_track+0x20/0x40
[   28.400634]  kasan_save_alloc_info+0x40/0x58
[   28.400908]  __kasan_slab_alloc+0xa8/0xb0
[   28.401308]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   28.401466]  kmem_cache_oob+0x12c/0x430
[   28.401751]  kunit_try_run_case+0x170/0x3f0
[   28.402115]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   28.402477]  kthread+0x328/0x630
[   28.402786]  ret_from_fork+0x10/0x20
[   28.403158] 
[   28.403259] The buggy address belongs to the object at fff00000c7778000
[   28.403259]  which belongs to the cache test_cache of size 200
[   28.403719] The buggy address is located 0 bytes to the right of
[   28.403719]  allocated 200-byte region [fff00000c7778000, fff00000c77780c8)
[   28.403934] 
[   28.403985] The buggy address belongs to the physical page:
[   28.404075] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107778
[   28.404238] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   28.404393] page_type: f5(slab)
[   28.404519] raw: 0bfffe0000000000 fff00000c11fd3c0 dead000000000122 0000000000000000
[   28.404649] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   28.405280] page dumped because: kasan: bad access detected
[   28.405621] 
[   28.405859] Memory state around the buggy address:
[   28.406145]  fff00000c7777f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.406683]  fff00000c7778000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   28.407071] >fff00000c7778080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   28.407207]                                               ^
[   28.407323]  fff00000c7778100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.407486]  fff00000c7778180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.407610] ==================================================================

[   13.287321] ==================================================================
[   13.288113] BUG: KASAN: slab-out-of-bounds in kmem_cache_oob+0x402/0x530
[   13.288606] Read of size 1 at addr ffff8881027090c8 by task kunit_try_catch/226
[   13.289427] 
[   13.289572] CPU: 0 UID: 0 PID: 226 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc7 #1 PREEMPT(voluntary) 
[   13.289624] Tainted: [B]=BAD_PAGE, [N]=TEST
[   13.289637] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   13.289659] Call Trace:
[   13.289671]  <TASK>
[   13.289690]  dump_stack_lvl+0x73/0xb0
[   13.289844]  print_report+0xd1/0x650
[   13.289877]  ? __virt_addr_valid+0x1db/0x2d0
[   13.289901]  ? kmem_cache_oob+0x402/0x530
[   13.289920]  ? kasan_complete_mode_report_info+0x2a/0x200
[   13.289942]  ? kmem_cache_oob+0x402/0x530
[   13.289961]  kasan_report+0x141/0x180
[   13.289983]  ? kmem_cache_oob+0x402/0x530
[   13.290006]  __asan_report_load1_noabort+0x18/0x20
[   13.290026]  kmem_cache_oob+0x402/0x530
[   13.290044]  ? trace_hardirqs_on+0x37/0xe0
[   13.290068]  ? __pfx_kmem_cache_oob+0x10/0x10
[   13.290087]  ? finish_task_switch.isra.0+0x153/0x700
[   13.290111]  ? __switch_to+0x5d9/0xf60
[   13.290132]  ? dequeue_task_fair+0x156/0x4e0
[   13.290159]  ? __pfx_read_tsc+0x10/0x10
[   13.290179]  ? ktime_get_ts64+0x86/0x230
[   13.290203]  kunit_try_run_case+0x1a5/0x480
[   13.290227]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.290248]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   13.290271]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   13.290303]  ? __kthread_parkme+0x82/0x180
[   13.290325]  ? preempt_count_sub+0x50/0x80
[   13.290348]  ? __pfx_kunit_try_run_case+0x10/0x10
[   13.290371]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.290393]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   13.290415]  kthread+0x337/0x6f0
[   13.290432]  ? trace_preempt_on+0x20/0xc0
[   13.290453]  ? __pfx_kthread+0x10/0x10
[   13.290471]  ? _raw_spin_unlock_irq+0x47/0x80
[   13.290491]  ? calculate_sigpending+0x7b/0xa0
[   13.290512]  ? __pfx_kthread+0x10/0x10
[   13.290530]  ret_from_fork+0x41/0x80
[   13.290549]  ? __pfx_kthread+0x10/0x10
[   13.290567]  ret_from_fork_asm+0x1a/0x30
[   13.290597]  </TASK>
[   13.290609] 
[   13.300644] Allocated by task 226:
[   13.300883]  kasan_save_stack+0x45/0x70
[   13.301094]  kasan_save_track+0x18/0x40
[   13.301494]  kasan_save_alloc_info+0x3b/0x50
[   13.301669]  __kasan_slab_alloc+0x91/0xa0
[   13.301869]  kmem_cache_alloc_noprof+0x123/0x3f0
[   13.302096]  kmem_cache_oob+0x157/0x530
[   13.302237]  kunit_try_run_case+0x1a5/0x480
[   13.302582]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   13.302849]  kthread+0x337/0x6f0
[   13.303156]  ret_from_fork+0x41/0x80
[   13.303366]  ret_from_fork_asm+0x1a/0x30
[   13.303609] 
[   13.303681] The buggy address belongs to the object at ffff888102709000
[   13.303681]  which belongs to the cache test_cache of size 200
[   13.304793] The buggy address is located 0 bytes to the right of
[   13.304793]  allocated 200-byte region [ffff888102709000, ffff8881027090c8)
[   13.305735] 
[   13.305844] The buggy address belongs to the physical page:
[   13.306405] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102709
[   13.306876] flags: 0x200000000000000(node=0|zone=2)
[   13.307502] page_type: f5(slab)
[   13.307810] raw: 0200000000000000 ffff888102707000 dead000000000122 0000000000000000
[   13.308374] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   13.309115] page dumped because: kasan: bad access detected
[   13.309588] 
[   13.309845] Memory state around the buggy address:
[   13.310453]  ffff888102708f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.310754]  ffff888102709000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   13.311259] >ffff888102709080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   13.311716]                                               ^
[   13.312139]  ffff888102709100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.312655]  ffff888102709180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   13.313226] ==================================================================