Hay
Date
June 24, 2025, 11:37 a.m.

Environment
dragonboard-845c
qemu-arm64
qemu-x86_64

[   44.107018] ==================================================================
[   44.118706] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   44.125779] Free of addr ffff000083322001 by task kunit_try_catch/309
[   44.132304] 
[   44.133846] CPU: 1 UID: 0 PID: 309 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250624 #1 PREEMPT 
[   44.133886] Tainted: [B]=BAD_PAGE, [N]=TEST
[   44.133896] Hardware name: Thundercomm Dragonboard 845c (DT)
[   44.133911] Call trace:
[   44.133920]  show_stack+0x20/0x38 (C)
[   44.133945]  dump_stack_lvl+0x8c/0xd0
[   44.133969]  print_report+0x118/0x608
[   44.133991]  kasan_report_invalid_free+0xc0/0xe8
[   44.134013]  check_slab_allocation+0xfc/0x108
[   44.134034]  __kasan_slab_pre_free+0x2c/0x48
[   44.134055]  kmem_cache_free+0xf0/0x468
[   44.134078]  kmem_cache_invalid_free+0x184/0x3c8
[   44.134097]  kunit_try_run_case+0x170/0x3f0
[   44.134121]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   44.134147]  kthread+0x328/0x630
[   44.134166]  ret_from_fork+0x10/0x20
[   44.134192] 
[   44.209162] Allocated by task 309:
[   44.212626]  kasan_save_stack+0x3c/0x68
[   44.216538]  kasan_save_track+0x20/0x40
[   44.220447]  kasan_save_alloc_info+0x40/0x58
[   44.224786]  __kasan_slab_alloc+0xa8/0xb0
[   44.228870]  kmem_cache_alloc_noprof+0x10c/0x398
[   44.233570]  kmem_cache_invalid_free+0x12c/0x3c8
[   44.238267]  kunit_try_run_case+0x170/0x3f0
[   44.242519]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   44.248090]  kthread+0x328/0x630
[   44.251382]  ret_from_fork+0x10/0x20
[   44.255021] 
[   44.256557] The buggy address belongs to the object at ffff000083322000
[   44.256557]  which belongs to the cache test_cache of size 200
[   44.269134] The buggy address is located 1 bytes inside of
[   44.269134]  200-byte region [ffff000083322000, ffff0000833220c8)
[   44.280838] 
[   44.282371] The buggy address belongs to the physical page:
[   44.288017] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103322
[   44.296138] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   44.303899] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff)
[   44.310967] page_type: f5(slab)
[   44.314177] raw: 0bfffe0000000040 ffff000083320000 dead000000000122 0000000000000000
[   44.322024] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   44.329871] head: 0bfffe0000000040 ffff000083320000 dead000000000122 0000000000000000
[   44.337807] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   44.345738] head: 0bfffe0000000001 fffffdffc20cc881 00000000ffffffff 00000000ffffffff
[   44.353669] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   44.361597] page dumped because: kasan: bad access detected
[   44.367247] 
[   44.368784] Memory state around the buggy address:
[   44.373652]  ffff000083321f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   44.380977]  ffff000083321f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   44.388304] >ffff000083322000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   44.395619]                    ^
[   44.398909]  ffff000083322080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   44.406223]  ffff000083322100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   44.413534] ==================================================================

[   34.015585] ==================================================================
[   34.016151] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   34.016523] Free of addr fff00000c77d6001 by task kunit_try_catch/222
[   34.016624] 
[   34.016706] CPU: 0 UID: 0 PID: 222 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250624 #1 PREEMPT 
[   34.016941] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.017011] Hardware name: linux,dummy-virt (DT)
[   34.017089] Call trace:
[   34.017164]  show_stack+0x20/0x38 (C)
[   34.017707]  dump_stack_lvl+0x8c/0xd0
[   34.018008]  print_report+0x118/0x608
[   34.018824]  kasan_report_invalid_free+0xc0/0xe8
[   34.019265]  check_slab_allocation+0xfc/0x108
[   34.019722]  __kasan_slab_pre_free+0x2c/0x48
[   34.020092]  kmem_cache_free+0xf0/0x468
[   34.020415]  kmem_cache_invalid_free+0x184/0x3c8
[   34.021025]  kunit_try_run_case+0x170/0x3f0
[   34.021180]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.021550]  kthread+0x328/0x630
[   34.021682]  ret_from_fork+0x10/0x20
[   34.021807] 
[   34.022072] Allocated by task 222:
[   34.022170]  kasan_save_stack+0x3c/0x68
[   34.022370]  kasan_save_track+0x20/0x40
[   34.022488]  kasan_save_alloc_info+0x40/0x58
[   34.022754]  __kasan_slab_alloc+0xa8/0xb0
[   34.023151]  kmem_cache_alloc_noprof+0x10c/0x398
[   34.023555]  kmem_cache_invalid_free+0x12c/0x3c8
[   34.023678]  kunit_try_run_case+0x170/0x3f0
[   34.023995]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.024184]  kthread+0x328/0x630
[   34.024286]  ret_from_fork+0x10/0x20
[   34.024468] 
[   34.024516] The buggy address belongs to the object at fff00000c77d6000
[   34.024516]  which belongs to the cache test_cache of size 200
[   34.025058] The buggy address is located 1 bytes inside of
[   34.025058]  200-byte region [fff00000c77d6000, fff00000c77d60c8)
[   34.025229] 
[   34.025288] The buggy address belongs to the physical page:
[   34.025566] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1077d6
[   34.025837] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.025977] page_type: f5(slab)
[   34.026454] raw: 0bfffe0000000000 fff00000c11b8dc0 dead000000000122 0000000000000000
[   34.027048] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   34.027162] page dumped because: kasan: bad access detected
[   34.027265] 
[   34.027316] Memory state around the buggy address:
[   34.027788]  fff00000c77d5f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.027916]  fff00000c77d5f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.028679] >fff00000c77d6000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   34.028782]                    ^
[   34.028906]  fff00000c77d6080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   34.029089]  fff00000c77d6100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.029286] ==================================================================

[   30.092744] ==================================================================
[   30.093481] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460
[   30.094323] Free of addr ffff888103b4a001 by task kunit_try_catch/241
[   30.094755] 
[   30.095739] CPU: 1 UID: 0 PID: 241 Comm: kunit_try_catch Tainted: G    B            N  6.16.0-rc3-next-20250624 #1 PREEMPT(voluntary) 
[   30.095849] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.095876] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   30.095917] Call Trace:
[   30.095945]  <TASK>
[   30.095979]  dump_stack_lvl+0x73/0xb0
[   30.096028]  print_report+0xd1/0x650
[   30.096084]  ? __virt_addr_valid+0x1db/0x2d0
[   30.096143]  ? kasan_complete_mode_report_info+0x2a/0x200
[   30.096192]  ? kmem_cache_invalid_free+0x1d8/0x460
[   30.096225]  kasan_report_invalid_free+0x10a/0x130
[   30.096257]  ? kmem_cache_invalid_free+0x1d8/0x460
[   30.096290]  ? kmem_cache_invalid_free+0x1d8/0x460
[   30.096321]  check_slab_allocation+0x11f/0x130
[   30.096349]  __kasan_slab_pre_free+0x28/0x40
[   30.096375]  kmem_cache_free+0xed/0x420
[   30.096401]  ? kmem_cache_alloc_noprof+0x123/0x3f0
[   30.096433]  ? kmem_cache_invalid_free+0x1d8/0x460
[   30.096466]  kmem_cache_invalid_free+0x1d8/0x460
[   30.096497]  ? __pfx_kmem_cache_invalid_free+0x10/0x10
[   30.096526]  ? finish_task_switch.isra.0+0x153/0x700
[   30.096579]  ? __switch_to+0x47/0xf50
[   30.096617]  ? __pfx_read_tsc+0x10/0x10
[   30.096673]  ? ktime_get_ts64+0x86/0x230
[   30.096708]  kunit_try_run_case+0x1a5/0x480
[   30.096743]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.096772]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   30.096806]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   30.096837]  ? __kthread_parkme+0x82/0x180
[   30.096864]  ? preempt_count_sub+0x50/0x80
[   30.096893]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.096923]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.096954]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   30.096984]  kthread+0x337/0x6f0
[   30.097010]  ? trace_preempt_on+0x20/0xc0
[   30.097041]  ? __pfx_kthread+0x10/0x10
[   30.097082]  ? _raw_spin_unlock_irq+0x47/0x80
[   30.097132]  ? calculate_sigpending+0x7b/0xa0
[   30.097176]  ? __pfx_kthread+0x10/0x10
[   30.097206]  ret_from_fork+0x116/0x1d0
[   30.097232]  ? __pfx_kthread+0x10/0x10
[   30.097259]  ret_from_fork_asm+0x1a/0x30
[   30.097300]  </TASK>
[   30.097314] 
[   30.113419] Allocated by task 241:
[   30.113830]  kasan_save_stack+0x45/0x70
[   30.114152]  kasan_save_track+0x18/0x40
[   30.114483]  kasan_save_alloc_info+0x3b/0x50
[   30.114919]  __kasan_slab_alloc+0x91/0xa0
[   30.115303]  kmem_cache_alloc_noprof+0x123/0x3f0
[   30.116227]  kmem_cache_invalid_free+0x157/0x460
[   30.116743]  kunit_try_run_case+0x1a5/0x480
[   30.117290]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.117695]  kthread+0x337/0x6f0
[   30.118165]  ret_from_fork+0x116/0x1d0
[   30.118575]  ret_from_fork_asm+0x1a/0x30
[   30.118864] 
[   30.119000] The buggy address belongs to the object at ffff888103b4a000
[   30.119000]  which belongs to the cache test_cache of size 200
[   30.120503] The buggy address is located 1 bytes inside of
[   30.120503]  200-byte region [ffff888103b4a000, ffff888103b4a0c8)
[   30.121678] 
[   30.121893] The buggy address belongs to the physical page:
[   30.122320] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103b4a
[   30.122957] flags: 0x200000000000000(node=0|zone=2)
[   30.123810] page_type: f5(slab)
[   30.124744] raw: 0200000000000000 ffff888101ba6c80 dead000000000122 0000000000000000
[   30.125537] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   30.126156] page dumped because: kasan: bad access detected
[   30.126579] 
[   30.126790] Memory state around the buggy address:
[   30.127205]  ffff888103b49f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.128190]  ffff888103b49f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.128831] >ffff888103b4a000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   30.129478]                    ^
[   30.129808]  ffff888103b4a080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   30.130527]  ffff888103b4a100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.130996] ==================================================================