Date
May 12, 2025, 6:12 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.087241] ================================================================== [ 19.087976] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 19.088689] Free of addr fff00000c59b8560 by task kunit_try_catch/181 [ 19.089214] [ 19.089767] CPU: 1 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 19.089949] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.090043] Hardware name: linux,dummy-virt (DT) [ 19.090105] Call trace: [ 19.090154] show_stack+0x20/0x38 (C) [ 19.090223] dump_stack_lvl+0x8c/0xd0 [ 19.090280] print_report+0x118/0x608 [ 19.090334] kasan_report_invalid_free+0xc0/0xe8 [ 19.090390] check_slab_allocation+0xd4/0x108 [ 19.090444] __kasan_slab_pre_free+0x2c/0x48 [ 19.090682] kfree+0xe8/0x3c8 [ 19.090818] kfree_sensitive+0x3c/0xb0 [ 19.090916] kmalloc_double_kzfree+0x168/0x308 [ 19.091027] kunit_try_run_case+0x170/0x3f0 [ 19.091137] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.091257] kthread+0x318/0x620 [ 19.091358] ret_from_fork+0x10/0x20 [ 19.091481] [ 19.098406] Allocated by task 181: [ 19.099653] kasan_save_stack+0x3c/0x68 [ 19.100306] kasan_save_track+0x20/0x40 [ 19.100888] kasan_save_alloc_info+0x40/0x58 [ 19.101295] __kasan_kmalloc+0xd4/0xd8 [ 19.101475] __kmalloc_cache_noprof+0x15c/0x3c0 [ 19.101656] kmalloc_double_kzfree+0xb8/0x308 [ 19.101853] kunit_try_run_case+0x170/0x3f0 [ 19.102022] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.102236] kthread+0x318/0x620 [ 19.102387] ret_from_fork+0x10/0x20 [ 19.103667] [ 19.103891] Freed by task 181: [ 19.104236] kasan_save_stack+0x3c/0x68 [ 19.104607] kasan_save_track+0x20/0x40 [ 19.104961] kasan_save_free_info+0x4c/0x78 [ 19.105325] __kasan_slab_free+0x6c/0x98 [ 19.105668] kfree+0x214/0x3c8 [ 19.106677] kfree_sensitive+0x80/0xb0 [ 19.107284] kmalloc_double_kzfree+0x11c/0x308 [ 19.107653] kunit_try_run_case+0x170/0x3f0 [ 19.107911] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.108104] kthread+0x318/0x620 [ 19.108251] ret_from_fork+0x10/0x20 [ 19.108399] [ 19.108506] The buggy address belongs to the object at fff00000c59b8560 [ 19.108506] which belongs to the cache kmalloc-16 of size 16 [ 19.109786] The buggy address is located 0 bytes inside of [ 19.109786] 16-byte region [fff00000c59b8560, fff00000c59b8570) [ 19.111828] [ 19.112032] The buggy address belongs to the physical page: [ 19.112498] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1059b8 [ 19.113072] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 19.113570] page_type: f5(slab) [ 19.114327] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 19.115354] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 19.116186] page dumped because: kasan: bad access detected [ 19.116732] [ 19.117008] Memory state around the buggy address: [ 19.117539] fff00000c59b8400: fa fb fc fc 00 03 fc fc 00 03 fc fc 00 00 fc fc [ 19.118078] fff00000c59b8480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.119456] >fff00000c59b8500: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 19.119933] ^ [ 19.120612] fff00000c59b8580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.121179] fff00000c59b8600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.121862] ==================================================================
[ 12.808420] ================================================================== [ 12.809040] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 12.809258] Free of addr ffff888101b28040 by task kunit_try_catch/200 [ 12.809551] [ 12.809665] CPU: 1 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 12.809708] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.809720] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.809749] Call Trace: [ 12.809764] <TASK> [ 12.809785] dump_stack_lvl+0x73/0xb0 [ 12.809814] print_report+0xd1/0x650 [ 12.809846] ? __virt_addr_valid+0x1db/0x2d0 [ 12.809871] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.809896] ? kfree_sensitive+0x2e/0x90 [ 12.809916] kasan_report_invalid_free+0xfc/0x120 [ 12.809939] ? kfree_sensitive+0x2e/0x90 [ 12.809959] ? kfree_sensitive+0x2e/0x90 [ 12.809978] check_slab_allocation+0x101/0x130 [ 12.809999] __kasan_slab_pre_free+0x28/0x40 [ 12.810018] kfree+0xf1/0x3f0 [ 12.810039] ? kfree_sensitive+0x2e/0x90 [ 12.810061] kfree_sensitive+0x2e/0x90 [ 12.810080] kmalloc_double_kzfree+0x19d/0x360 [ 12.810102] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 12.810124] ? __schedule+0xce8/0x2840 [ 12.810150] ? __pfx_read_tsc+0x10/0x10 [ 12.810172] ? ktime_get_ts64+0x86/0x230 [ 12.810199] kunit_try_run_case+0x1a6/0x480 [ 12.810223] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.810243] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 12.810265] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.810289] ? __kthread_parkme+0x82/0x160 [ 12.810312] ? preempt_count_sub+0x50/0x80 [ 12.810337] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.810358] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.810383] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.810408] kthread+0x324/0x6e0 [ 12.810429] ? trace_preempt_on+0x20/0xc0 [ 12.810754] ? __pfx_kthread+0x10/0x10 [ 12.810777] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.810801] ? calculate_sigpending+0x7b/0xa0 [ 12.810823] ? __pfx_kthread+0x10/0x10 [ 12.810858] ret_from_fork+0x41/0x80 [ 12.810878] ? __pfx_kthread+0x10/0x10 [ 12.810899] ret_from_fork_asm+0x1a/0x30 [ 12.810932] </TASK> [ 12.810943] [ 12.818935] Allocated by task 200: [ 12.819233] kasan_save_stack+0x45/0x70 [ 12.819402] kasan_save_track+0x18/0x40 [ 12.819540] kasan_save_alloc_info+0x3b/0x50 [ 12.819692] __kasan_kmalloc+0xb7/0xc0 [ 12.819906] __kmalloc_cache_noprof+0x18a/0x420 [ 12.820241] kmalloc_double_kzfree+0xaa/0x360 [ 12.820457] kunit_try_run_case+0x1a6/0x480 [ 12.820632] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.820856] kthread+0x324/0x6e0 [ 12.820987] ret_from_fork+0x41/0x80 [ 12.821169] ret_from_fork_asm+0x1a/0x30 [ 12.821330] [ 12.821429] Freed by task 200: [ 12.821557] kasan_save_stack+0x45/0x70 [ 12.821755] kasan_save_track+0x18/0x40 [ 12.821934] kasan_save_free_info+0x3f/0x60 [ 12.822129] __kasan_slab_free+0x56/0x70 [ 12.822604] kfree+0x224/0x3f0 [ 12.822772] kfree_sensitive+0x67/0x90 [ 12.822920] kmalloc_double_kzfree+0x12c/0x360 [ 12.823275] kunit_try_run_case+0x1a6/0x480 [ 12.823492] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.823753] kthread+0x324/0x6e0 [ 12.823915] ret_from_fork+0x41/0x80 [ 12.824176] ret_from_fork_asm+0x1a/0x30 [ 12.824341] [ 12.824442] The buggy address belongs to the object at ffff888101b28040 [ 12.824442] which belongs to the cache kmalloc-16 of size 16 [ 12.824923] The buggy address is located 0 bytes inside of [ 12.824923] 16-byte region [ffff888101b28040, ffff888101b28050) [ 12.825412] [ 12.825487] The buggy address belongs to the physical page: [ 12.825661] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101b28 [ 12.825954] flags: 0x200000000000000(node=0|zone=2) [ 12.826191] page_type: f5(slab) [ 12.826374] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.826707] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.827244] page dumped because: kasan: bad access detected [ 12.827492] [ 12.827568] Memory state around the buggy address: [ 12.827771] ffff888101b27f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.828133] ffff888101b27f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.828435] >ffff888101b28000: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 12.828653] ^ [ 12.828827] ffff888101b28080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.829167] ffff888101b28100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.829485] ==================================================================