Hay
Date
July 22, 2025, 5:13 a.m.

Environment
qemu-arm64
qemu-x86_64

[   29.942643] ==================================================================
[   29.942750] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320
[   29.943130] Read of size 1 at addr fff00000c7b7a7df by task kunit_try_catch/169
[   29.943184] 
[   29.943221] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   29.943422] Tainted: [B]=BAD_PAGE, [N]=TEST
[   29.943456] Hardware name: linux,dummy-virt (DT)
[   29.943487] Call trace:
[   29.943509]  show_stack+0x20/0x38 (C)
[   29.944029]  dump_stack_lvl+0x8c/0xd0
[   29.944162]  print_report+0x118/0x5e8
[   29.944226]  kasan_report+0xdc/0x128
[   29.944286]  __asan_report_load1_noabort+0x20/0x30
[   29.944508]  kmalloc_oob_left+0x2ec/0x320
[   29.944810]  kunit_try_run_case+0x170/0x3f0
[   29.945002]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.945101]  kthread+0x328/0x630
[   29.945147]  ret_from_fork+0x10/0x20
[   29.945195] 
[   29.945366] Allocated by task 104:
[   29.945404]  kasan_save_stack+0x3c/0x68
[   29.945447]  kasan_save_track+0x20/0x40
[   29.945482]  kasan_save_alloc_info+0x40/0x58
[   29.945526]  __kasan_kmalloc+0xd4/0xd8
[   29.945560]  __kmalloc_node_track_caller_noprof+0x194/0x4b8
[   29.945900]  kvasprintf+0xe0/0x180
[   29.946008]  kasprintf+0xd0/0x110
[   29.946075]  miscdev_test_can_open+0xac/0x2c8
[   29.946412]  miscdev_test_collision_reverse+0x3b8/0x650
[   29.946660]  kunit_try_run_case+0x170/0x3f0
[   29.947042]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   29.947098]  kthread+0x328/0x630
[   29.947308]  ret_from_fork+0x10/0x20
[   29.947365] 
[   29.947410] Freed by task 3350701984:
[   29.947594] ------------[ cut here ]------------
[   29.947647] pool index -1 out of bounds (219) for stack id fff00000
[   29.951614] WARNING: lib/stackdepot.c:500 at depot_fetch_stack+0x68/0x88, CPU#1: kunit_try_catch/169
[   30.008495] Modules linked in:
[   30.010083] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   30.011122] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.011446] Hardware name: linux,dummy-virt (DT)
[   30.012356] pstate: 614000c9 (nZCv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[   30.013213] pc : depot_fetch_stack+0x68/0x88
[   30.013575] lr : depot_fetch_stack+0x68/0x88
[   30.013846] sp : ffff800080b37a50
[   30.014038] x29: ffff800080b37a50 x28: ffff800080087b08 x27: 1ffff00010010f61
[   30.015029] x26: 1ffff00010010f60 x25: ffff800080087b00 x24: ffff97f86b378044
[   30.015620] x23: ffffc1ffc31ede80 x22: ffff97f86fea4788 x21: ffff97f86fea7ae8
[   30.016213] x20: fff00000c7b7a7df x19: ffff800080b37b60 x18: 000000004344aacd
[   30.016830] x17: 0000000000000001 x16: 00000000f1f1f1f1 x15: 0000000000000007
[   30.017763] x14: 0000000000000000 x13: 0000000000000007 x12: ffff700010166ea7
[   30.018677] x11: 1ffff00010166ea6 x10: ffff700010166ea6 x9 : ffff97f86acf118c
[   30.019637] x8 : ffff800080b37537 x7 : 0000000000000001 x6 : ffff700010166ea6
[   30.020546] x5 : ffff800080b37530 x4 : 1ffe00001934d511 x3 : dfff800000000000
[   30.020933] x2 : 0000000000000000 x1 : 0000000000000000 x0 : fff00000c9a6a880
[   30.021832] Call trace:
[   30.022000]  depot_fetch_stack+0x68/0x88 (P)
[   30.022221]  stack_depot_print+0x24/0x60
[   30.022421]  print_report+0x5e4/0x5e8
[   30.022613]  kasan_report+0xdc/0x128
[   30.022797]  __asan_report_load1_noabort+0x20/0x30
[   30.023339]  kmalloc_oob_left+0x2ec/0x320
[   30.023599]  kunit_try_run_case+0x170/0x3f0
[   30.023865]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.024148]  kthread+0x328/0x630
[   30.024356]  ret_from_fork+0x10/0x20
[   30.024653] ---[ end trace 0000000000000000 ]---
[   30.025172] ------------[ cut here ]------------
[   30.025222] corrupt handle or use after stack_depot_put()
[   30.025314] WARNING: lib/stackdepot.c:772 at stack_depot_print+0x54/0x60, CPU#1: kunit_try_catch/169
[   30.026565] Modules linked in:
[   30.026838] CPU: 1 UID: 0 PID: 169 Comm: kunit_try_catch Tainted: G    B   W        N  6.16.0-rc7-next-20250722 #1 PREEMPT 
[   30.027498] Tainted: [B]=BAD_PAGE, [W]=WARN, [N]=TEST
[   30.027798] Hardware name: linux,dummy-virt (DT)
[   30.028092] pstate: 614000c9 (nZCv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[   30.028457] pc : stack_depot_print+0x54/0x60
[   30.028765] lr : stack_depot_print+0x54/0x60
[   30.029351] sp : ffff800080b37a60
[   30.029631] x29: ffff800080b37a60 x28: ffff800080087b08 x27: 1ffff00010010f61
[   30.030129] x26: 1ffff00010010f60 x25: ffff800080087b00 x24: ffff97f86b378044
[   30.030596] x23: ffffc1ffc31ede80 x22: ffff97f86fea4788 x21: ffff97f86fea7ae8
[   30.031061] x20: fff00000c7b7a7df x19: ffff800080b37b60 x18: 000000004344aacd
[   30.031521] x17: 0000000000000001 x16: 00000000f1f1f1f1 x15: 00000000f3f3f3f3
[   30.031981] x14: ffff700010166f2c x13: 1ffe00001934d511 x12: ffff72ff0e3954f1
[   30.032443] x11: 1ffff2ff0e3954f0 x10: ffff72ff0e3954f0 x9 : ffff97f86acf118c
[   30.033059] x8 : ffff97f871caa783 x7 : 0000000000000001 x6 : ffff72ff0e3954f0
[   30.033541] x5 : ffff97f871caa780 x4 : 1ffe00001934d511 x3 : dfff800000000000
[   30.033988] x2 : 0000000000000000 x1 : 0000000000000000 x0 : fff00000c9a6a880
[   30.034432] Call trace:
[   30.034597]  stack_depot_print+0x54/0x60 (P)
[   30.034893]  print_report+0x5e4/0x5e8
[   30.035172]  kasan_report+0xdc/0x128
[   30.035397]  __asan_report_load1_noabort+0x20/0x30
[   30.035691]  kmalloc_oob_left+0x2ec/0x320
[   30.035955]  kunit_try_run_case+0x170/0x3f0
[   30.036235]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   30.036562]  kthread+0x328/0x630
[   30.036822]  ret_from_fork+0x10/0x20
[   30.037057] ---[ end trace 0000000000000000 ]---
[   30.037405] 
[   30.037434] The buggy address belongs to the object at fff00000c7b7a7c0
[   30.037434]  which belongs to the cache kmalloc-16 of size 16
[   30.037493] The buggy address is located 15 bytes to the right of
[   30.037493]  allocated 16-byte region [fff00000c7b7a7c0, fff00000c7b7a7d0)
[   30.037669] 
[   30.037691] The buggy address belongs to the physical page:
[   30.037744] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x107b7a
[   30.037799] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   30.037868] page_type: f5(slab)
[   30.037910] raw: 0bfffe0000000000 fff00000c0001640 dead000000000100 dead000000000122
[   30.037959] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   30.037998] page dumped because: kasan: bad access detected
[   30.038027] 
[   30.038045] Memory state around the buggy address:
[   30.038076]  fff00000c7b7a680: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   30.038118]  fff00000c7b7a700: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   30.038164] >fff00000c7b7a780: fa fb fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   30.038199]                                                     ^
[   30.038236]  fff00000c7b7a800: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc
[   30.038276]  fff00000c7b7a880: fa fb fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   30.038313] ==================================================================

[   24.466104] ==================================================================
[   24.466868] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0
[   24.467195] Read of size 1 at addr ffff88810585ea5f by task kunit_try_catch/186
[   24.467578] 
[   24.467709] CPU: 1 UID: 0 PID: 186 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc7-next-20250722 #1 PREEMPT(voluntary) 
[   24.467758] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.467770] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   24.467791] Call Trace:
[   24.467804]  <TASK>
[   24.467818]  dump_stack_lvl+0x73/0xb0
[   24.467858]  print_report+0xd1/0x640
[   24.467881]  ? __virt_addr_valid+0x1db/0x2d0
[   24.467904]  ? kmalloc_oob_left+0x361/0x3c0
[   24.467926]  ? kasan_complete_mode_report_info+0x64/0x200
[   24.467953]  ? kmalloc_oob_left+0x361/0x3c0
[   24.467975]  kasan_report+0x141/0x180
[   24.467999]  ? kmalloc_oob_left+0x361/0x3c0
[   24.468027]  __asan_report_load1_noabort+0x18/0x20
[   24.468054]  kmalloc_oob_left+0x361/0x3c0
[   24.468077]  ? __pfx_kmalloc_oob_left+0x10/0x10
[   24.468100]  ? __schedule+0x10da/0x2b60
[   24.468126]  ? __pfx_read_tsc+0x10/0x10
[   24.468147]  ? ktime_get_ts64+0x86/0x230
[   24.468173]  kunit_try_run_case+0x1a5/0x480
[   24.468199]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.468222]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   24.468247]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   24.468273]  ? __kthread_parkme+0x82/0x180
[   24.468294]  ? preempt_count_sub+0x50/0x80
[   24.468318]  ? __pfx_kunit_try_run_case+0x10/0x10
[   24.468352]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   24.468378]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   24.468403]  kthread+0x337/0x6f0
[   24.468423]  ? trace_preempt_on+0x20/0xc0
[   24.468447]  ? __pfx_kthread+0x10/0x10
[   24.468469]  ? _raw_spin_unlock_irq+0x47/0x80
[   24.468493]  ? calculate_sigpending+0x7b/0xa0
[   24.468517]  ? __pfx_kthread+0x10/0x10
[   24.468540]  ret_from_fork+0x116/0x1d0
[   24.468559]  ? __pfx_kthread+0x10/0x10
[   24.468581]  ret_from_fork_asm+0x1a/0x30
[   24.468616]  </TASK>
[   24.468626] 
[   24.477321] Allocated by task 21:
[   24.477637]  kasan_save_stack+0x45/0x70
[   24.477976]  kasan_save_track+0x18/0x40
[   24.478132]  kasan_save_alloc_info+0x3b/0x50
[   24.478462]  __kasan_kmalloc+0xb7/0xc0
[   24.478647]  __kmalloc_cache_node_noprof+0x188/0x420
[   24.478880]  build_sched_domains+0x38c/0x5d80
[   24.479073]  partition_sched_domains+0x471/0x9c0
[   24.479534]  rebuild_sched_domains_locked+0x97d/0xd50
[   24.479869]  cpuset_update_active_cpus+0x80f/0x1a90
[   24.480101]  sched_cpu_activate+0x2bf/0x330
[   24.480464]  cpuhp_invoke_callback+0x2a1/0xf00
[   24.480733]  cpuhp_thread_fun+0x2ce/0x5c0
[   24.480991]  smpboot_thread_fn+0x2bc/0x730
[   24.481287]  kthread+0x337/0x6f0
[   24.481424]  ret_from_fork+0x116/0x1d0
[   24.481616]  ret_from_fork_asm+0x1a/0x30
[   24.481974] 
[   24.482075] Freed by task 21:
[   24.482242]  kasan_save_stack+0x45/0x70
[   24.482734]  kasan_save_track+0x18/0x40
[   24.482930]  kasan_save_free_info+0x3f/0x60
[   24.483119]  __kasan_slab_free+0x56/0x70
[   24.483279]  kfree+0x222/0x3f0
[   24.483634]  build_sched_domains+0x2072/0x5d80
[   24.483844]  partition_sched_domains+0x471/0x9c0
[   24.484133]  rebuild_sched_domains_locked+0x97d/0xd50
[   24.484471]  cpuset_update_active_cpus+0x80f/0x1a90
[   24.484696]  sched_cpu_activate+0x2bf/0x330
[   24.484898]  cpuhp_invoke_callback+0x2a1/0xf00
[   24.485087]  cpuhp_thread_fun+0x2ce/0x5c0
[   24.485268]  smpboot_thread_fn+0x2bc/0x730
[   24.485674]  kthread+0x337/0x6f0
[   24.485843]  ret_from_fork+0x116/0x1d0
[   24.486114]  ret_from_fork_asm+0x1a/0x30
[   24.486296] 
[   24.486533] The buggy address belongs to the object at ffff88810585ea40
[   24.486533]  which belongs to the cache kmalloc-16 of size 16
[   24.487111] The buggy address is located 15 bytes to the right of
[   24.487111]  allocated 16-byte region [ffff88810585ea40, ffff88810585ea50)
[   24.487731] 
[   24.487842] The buggy address belongs to the physical page:
[   24.488075] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10585e
[   24.488598] flags: 0x200000000000000(node=0|zone=2)
[   24.488901] page_type: f5(slab)
[   24.489043] raw: 0200000000000000 ffff888100041640 dead000000000100 dead000000000122
[   24.489567] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000
[   24.489988] page dumped because: kasan: bad access detected
[   24.490176] 
[   24.490287] Memory state around the buggy address:
[   24.490577]  ffff88810585e900: fa fb fc fc fa fb fc fc 00 06 fc fc 00 06 fc fc
[   24.490883]  ffff88810585e980: 00 06 fc fc 00 00 fc fc fa fb fc fc fa fb fc fc
[   24.491191] >ffff88810585ea00: fa fb fc fc fa fb fc fc fa fb fc fc 00 07 fc fc
[   24.491710]                                                     ^
[   24.492050]  ffff88810585ea80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.492337]  ffff88810585eb00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.492758] ==================================================================