Hay
Date
April 20, 2025, 11:09 p.m.

Environment
qemu-arm64
qemu-x86_64
rk3399-rock-pi-4b

[   24.218856] ==================================================================
[   24.219000] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   24.219368] Free of addr fff00000c680d001 by task kunit_try_catch/213
[   24.219584] 
[   24.219791] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   24.220242] Tainted: [B]=BAD_PAGE, [N]=TEST
[   24.220338] Hardware name: linux,dummy-virt (DT)
[   24.220424] Call trace:
[   24.220485]  show_stack+0x20/0x38 (C)
[   24.220647]  dump_stack_lvl+0x8c/0xd0
[   24.220835]  print_report+0x118/0x608
[   24.221141]  kasan_report_invalid_free+0xc0/0xe8
[   24.221561]  check_slab_allocation+0xfc/0x108
[   24.221836]  __kasan_slab_pre_free+0x2c/0x48
[   24.221977]  kmem_cache_free+0xf0/0x470
[   24.222099]  kmem_cache_invalid_free+0x184/0x3c8
[   24.222684]  kunit_try_run_case+0x170/0x3f0
[   24.223203]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.223954]  kthread+0x328/0x630
[   24.224120]  ret_from_fork+0x10/0x20
[   24.224591] 
[   24.224677] Allocated by task 213:
[   24.224756]  kasan_save_stack+0x3c/0x68
[   24.225119]  kasan_save_track+0x20/0x40
[   24.225341]  kasan_save_alloc_info+0x40/0x58
[   24.225877]  __kasan_slab_alloc+0xa8/0xb0
[   24.225995]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   24.226500]  kmem_cache_invalid_free+0x12c/0x3c8
[   24.226781]  kunit_try_run_case+0x170/0x3f0
[   24.227250]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   24.227430]  kthread+0x328/0x630
[   24.227521]  ret_from_fork+0x10/0x20
[   24.228054] 
[   24.228114] The buggy address belongs to the object at fff00000c680d000
[   24.228114]  which belongs to the cache test_cache of size 200
[   24.228800] The buggy address is located 1 bytes inside of
[   24.228800]  200-byte region [fff00000c680d000, fff00000c680d0c8)
[   24.229170] 
[   24.229231] The buggy address belongs to the physical page:
[   24.229403] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10680d
[   24.229725] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   24.230190] page_type: f5(slab)
[   24.230290] raw: 0bfffe0000000000 fff00000c17438c0 dead000000000122 0000000000000000
[   24.230872] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   24.231010] page dumped because: kasan: bad access detected
[   24.231433] 
[   24.231482] Memory state around the buggy address:
[   24.231647]  fff00000c680cf00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.232427]  fff00000c680cf80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.232575] >fff00000c680d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   24.232700]                    ^
[   24.232778]  fff00000c680d080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   24.233147]  fff00000c680d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   24.233245] ==================================================================

[   12.209493] ==================================================================
[   12.209955] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x1d8/0x460
[   12.210367] Free of addr ffff88810274d001 by task kunit_try_catch/231
[   12.210709] 
[   12.210871] CPU: 0 UID: 0 PID: 231 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT(voluntary) 
[   12.210916] Tainted: [B]=BAD_PAGE, [N]=TEST
[   12.210927] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   12.210947] Call Trace:
[   12.210959]  <TASK>
[   12.210974]  dump_stack_lvl+0x73/0xb0
[   12.211009]  print_report+0xd1/0x650
[   12.211033]  ? __virt_addr_valid+0x1db/0x2d0
[   12.211056]  ? kasan_complete_mode_report_info+0x2a/0x200
[   12.211078]  ? kmem_cache_invalid_free+0x1d8/0x460
[   12.211099]  kasan_report_invalid_free+0x10a/0x130
[   12.211123]  ? kmem_cache_invalid_free+0x1d8/0x460
[   12.211204]  ? kmem_cache_invalid_free+0x1d8/0x460
[   12.211225]  check_slab_allocation+0x11f/0x130
[   12.211247]  __kasan_slab_pre_free+0x28/0x40
[   12.211317]  kmem_cache_free+0xed/0x420
[   12.211354]  ? kasan_save_track+0x18/0x40
[   12.211373]  ? kasan_save_stack+0x45/0x70
[   12.211392]  ? kmem_cache_invalid_free+0x1d8/0x460
[   12.211412]  ? kmem_cache_invalid_free+0x157/0x460
[   12.211450]  kmem_cache_invalid_free+0x1d8/0x460
[   12.211470]  ? __pfx_kmem_cache_invalid_free+0x10/0x10
[   12.211489]  ? finish_task_switch.isra.0+0x153/0x700
[   12.211511]  ? __switch_to+0x5d9/0xf60
[   12.211531]  ? dequeue_task_fair+0x166/0x4e0
[   12.211558]  ? __pfx_read_tsc+0x10/0x10
[   12.211577]  ? ktime_get_ts64+0x86/0x230
[   12.211603]  kunit_try_run_case+0x1a5/0x480
[   12.211626]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.211647]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   12.211670]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   12.211693]  ? __kthread_parkme+0x82/0x180
[   12.211713]  ? preempt_count_sub+0x50/0x80
[   12.211737]  ? __pfx_kunit_try_run_case+0x10/0x10
[   12.211759]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.211781]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   12.211802]  kthread+0x337/0x6f0
[   12.211823]  ? trace_preempt_on+0x20/0xc0
[   12.211845]  ? __pfx_kthread+0x10/0x10
[   12.211867]  ? _raw_spin_unlock_irq+0x47/0x80
[   12.211888]  ? calculate_sigpending+0x7b/0xa0
[   12.211908]  ? __pfx_kthread+0x10/0x10
[   12.211930]  ret_from_fork+0x41/0x80
[   12.211950]  ? __pfx_kthread+0x10/0x10
[   12.211971]  ret_from_fork_asm+0x1a/0x30
[   12.212002]  </TASK>
[   12.212012] 
[   12.224644] Allocated by task 231:
[   12.224988]  kasan_save_stack+0x45/0x70
[   12.225192]  kasan_save_track+0x18/0x40
[   12.225650]  kasan_save_alloc_info+0x3b/0x50
[   12.225879]  __kasan_slab_alloc+0x91/0xa0
[   12.226131]  kmem_cache_alloc_noprof+0x123/0x3f0
[   12.226378]  kmem_cache_invalid_free+0x157/0x460
[   12.226659]  kunit_try_run_case+0x1a5/0x480
[   12.227396]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   12.227641]  kthread+0x337/0x6f0
[   12.227811]  ret_from_fork+0x41/0x80
[   12.227975]  ret_from_fork_asm+0x1a/0x30
[   12.228163] 
[   12.228260] The buggy address belongs to the object at ffff88810274d000
[   12.228260]  which belongs to the cache test_cache of size 200
[   12.228740] The buggy address is located 1 bytes inside of
[   12.228740]  200-byte region [ffff88810274d000, ffff88810274d0c8)
[   12.229175] 
[   12.229273] The buggy address belongs to the physical page:
[   12.229762] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10274d
[   12.230125] flags: 0x200000000000000(node=0|zone=2)
[   12.231095] page_type: f5(slab)
[   12.231250] raw: 0200000000000000 ffff888101a70280 dead000000000122 0000000000000000
[   12.231648] raw: 0000000000000000 00000000800f000f 00000000f5000000 0000000000000000
[   12.232231] page dumped because: kasan: bad access detected
[   12.232744] 
[   12.232836] Memory state around the buggy address:
[   12.233045]  ffff88810274cf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.233490]  ffff88810274cf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.233854] >ffff88810274d000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   12.234563]                    ^
[   12.234729]  ffff88810274d080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   12.235052]  ffff88810274d100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   12.235666] ==================================================================

[   22.196119] ==================================================================
[   22.197216] BUG: KASAN: invalid-free in kmem_cache_invalid_free+0x184/0x3c8
[   22.197884] Free of addr ffff000010130001 by task kunit_try_catch/265
[   22.198483] 
[   22.198648] CPU: 3 UID: 0 PID: 265 Comm: kunit_try_catch Tainted: G    B            N  6.15.0-rc3 #1 PREEMPT 
[   22.198698] Tainted: [B]=BAD_PAGE, [N]=TEST
[   22.198713] Hardware name: Radxa ROCK Pi 4B (DT)
[   22.198730] Call trace:
[   22.198743]  show_stack+0x20/0x38 (C)
[   22.198775]  dump_stack_lvl+0x8c/0xd0
[   22.198807]  print_report+0x118/0x608
[   22.198837]  kasan_report_invalid_free+0xc0/0xe8
[   22.198869]  check_slab_allocation+0xfc/0x108
[   22.198898]  __kasan_slab_pre_free+0x2c/0x48
[   22.198928]  kmem_cache_free+0xf0/0x470
[   22.198957]  kmem_cache_invalid_free+0x184/0x3c8
[   22.198994]  kunit_try_run_case+0x170/0x3f0
[   22.199030]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.199069]  kthread+0x328/0x630
[   22.199104]  ret_from_fork+0x10/0x20
[   22.199136] 
[   22.205530] Allocated by task 265:
[   22.205857]  kasan_save_stack+0x3c/0x68
[   22.206230]  kasan_save_track+0x20/0x40
[   22.206602]  kasan_save_alloc_info+0x40/0x58
[   22.207014]  __kasan_slab_alloc+0xa8/0xb0
[   22.207401]  kmem_cache_alloc_noprof+0x10c/0x3a0
[   22.207844]  kmem_cache_invalid_free+0x12c/0x3c8
[   22.208292]  kunit_try_run_case+0x170/0x3f0
[   22.208698]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   22.209222]  kthread+0x328/0x630
[   22.209545]  ret_from_fork+0x10/0x20
[   22.209894] 
[   22.210048] The buggy address belongs to the object at ffff000010130000
[   22.210048]  which belongs to the cache test_cache of size 200
[   22.211175] The buggy address is located 1 bytes inside of
[   22.211175]  200-byte region [ffff000010130000, ffff0000101300c8)
[   22.212226] 
[   22.212380] The buggy address belongs to the physical page:
[   22.212897] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10130
[   22.213629] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
[   22.214335] flags: 0x3fffe0000000040(head|node=0|zone=0|lastcpupid=0x1ffff)
[   22.214988] page_type: f5(slab)
[   22.215302] raw: 03fffe0000000040 ffff0000100bc140 dead000000000122 0000000000000000
[   22.216018] raw: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   22.216734] head: 03fffe0000000040 ffff0000100bc140 dead000000000122 0000000000000000
[   22.217458] head: 0000000000000000 00000000801f001f 00000000f5000000 0000000000000000
[   22.218181] head: 03fffe0000000001 fffffdffc0404c01 00000000ffffffff 00000000ffffffff
[   22.218904] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002
[   22.219619] page dumped because: kasan: bad access detected
[   22.220134] 
[   22.220286] Memory state around the buggy address:
[   22.220734]  ffff00001012ff00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.221401]  ffff00001012ff80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   22.222068] >ffff000010130000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[   22.222730]                    ^
[   22.223041]  ffff000010130080: 00 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc
[   22.223708]  ffff000010130100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   22.224371] ==================================================================