Date
Dec. 4, 2024, 3:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 32.627877] ================================================================== [ 32.629586] BUG: KASAN: double-free in kfree_sensitive+0x3c/0xb0 [ 32.630744] Free of addr fff00000c5b31d20 by task kunit_try_catch/180 [ 32.632043] [ 32.632330] CPU: 0 UID: 0 PID: 180 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 32.633606] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.634263] Hardware name: linux,dummy-virt (DT) [ 32.635207] Call trace: [ 32.635517] show_stack+0x20/0x38 (C) [ 32.636122] dump_stack_lvl+0x8c/0xd0 [ 32.637196] print_report+0x118/0x5e0 [ 32.637932] kasan_report_invalid_free+0xb0/0xd8 [ 32.639252] check_slab_allocation+0xd4/0x108 [ 32.640025] __kasan_slab_pre_free+0x2c/0x48 [ 32.641150] kfree+0xe8/0x3c8 [ 32.641934] kfree_sensitive+0x3c/0xb0 [ 32.642667] kmalloc_double_kzfree+0x168/0x308 [ 32.643147] kunit_try_run_case+0x14c/0x3d0 [ 32.643661] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.644554] kthread+0x24c/0x2d0 [ 32.645063] ret_from_fork+0x10/0x20 [ 32.645719] [ 32.646390] Allocated by task 180: [ 32.647329] kasan_save_stack+0x3c/0x68 [ 32.648226] kasan_save_track+0x20/0x40 [ 32.648836] kasan_save_alloc_info+0x40/0x58 [ 32.649417] __kasan_kmalloc+0xd4/0xd8 [ 32.650338] __kmalloc_cache_noprof+0x15c/0x3c0 [ 32.651393] kmalloc_double_kzfree+0xb8/0x308 [ 32.652180] kunit_try_run_case+0x14c/0x3d0 [ 32.652853] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.653693] kthread+0x24c/0x2d0 [ 32.654212] ret_from_fork+0x10/0x20 [ 32.654835] [ 32.655206] Freed by task 180: [ 32.656278] kasan_save_stack+0x3c/0x68 [ 32.656915] kasan_save_track+0x20/0x40 [ 32.657587] kasan_save_free_info+0x4c/0x78 [ 32.658331] __kasan_slab_free+0x6c/0x98 [ 32.659229] kfree+0x114/0x3c8 [ 32.660560] kfree_sensitive+0x80/0xb0 [ 32.661163] kmalloc_double_kzfree+0x11c/0x308 [ 32.661907] kunit_try_run_case+0x14c/0x3d0 [ 32.662669] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 32.663431] kthread+0x24c/0x2d0 [ 32.664348] ret_from_fork+0x10/0x20 [ 32.664785] [ 32.665057] The buggy address belongs to the object at fff00000c5b31d20 [ 32.665057] which belongs to the cache kmalloc-16 of size 16 [ 32.667900] The buggy address is located 0 bytes inside of [ 32.667900] 16-byte region [fff00000c5b31d20, fff00000c5b31d30) [ 32.670325] [ 32.671122] The buggy address belongs to the physical page: [ 32.672064] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105b31 [ 32.673130] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 32.674372] page_type: f5(slab) [ 32.675174] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 32.676269] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 32.677048] page dumped because: kasan: bad access detected [ 32.678095] [ 32.678519] Memory state around the buggy address: [ 32.679908] fff00000c5b31c00: 00 06 fc fc 00 06 fc fc fa fb fc fc 00 06 fc fc [ 32.681219] fff00000c5b31c80: 00 06 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 32.683061] >fff00000c5b31d00: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 32.683959] ^ [ 32.684517] fff00000c5b31d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.685382] fff00000c5b31e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.686520] ==================================================================
[ 23.431604] ================================================================== [ 23.432108] BUG: KASAN: double-free in kfree_sensitive+0x2e/0x90 [ 23.433233] Free of addr ffff888101adf0e0 by task kunit_try_catch/200 [ 23.435518] [ 23.435795] CPU: 0 UID: 0 PID: 200 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 23.436754] Tainted: [B]=BAD_PAGE, [N]=TEST [ 23.437164] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 23.438222] Call Trace: [ 23.438823] <TASK> [ 23.439052] dump_stack_lvl+0x73/0xb0 [ 23.439615] print_report+0xd1/0x640 [ 23.440031] ? __virt_addr_valid+0x1db/0x2d0 [ 23.440540] ? kfree_sensitive+0x2e/0x90 [ 23.441057] ? kasan_complete_mode_report_info+0x64/0x200 [ 23.441734] ? kfree_sensitive+0x2e/0x90 [ 23.442146] kasan_report_invalid_free+0xc0/0xf0 [ 23.442999] ? kfree_sensitive+0x2e/0x90 [ 23.443626] ? kfree_sensitive+0x2e/0x90 [ 23.443991] check_slab_allocation+0x101/0x130 [ 23.444557] __kasan_slab_pre_free+0x28/0x40 [ 23.445081] kfree+0xf1/0x3f0 [ 23.445635] ? kfree_sensitive+0x2e/0x90 [ 23.446108] kfree_sensitive+0x2e/0x90 [ 23.446869] kmalloc_double_kzfree+0x19d/0x360 [ 23.447330] ? __pfx_kmalloc_double_kzfree+0x10/0x10 [ 23.447729] ? __schedule+0xc3e/0x2790 [ 23.448190] ? __pfx_read_tsc+0x10/0x10 [ 23.448582] ? ktime_get_ts64+0x86/0x230 [ 23.448912] kunit_try_run_case+0x1b3/0x490 [ 23.449818] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.450654] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 23.451011] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 23.451740] ? __kthread_parkme+0x82/0x160 [ 23.452230] ? preempt_count_sub+0x50/0x80 [ 23.452787] ? __pfx_kunit_try_run_case+0x10/0x10 [ 23.453493] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 23.454095] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.454978] kthread+0x257/0x310 [ 23.455399] ? __pfx_kthread+0x10/0x10 [ 23.455840] ret_from_fork+0x41/0x80 [ 23.456220] ? __pfx_kthread+0x10/0x10 [ 23.456802] ret_from_fork_asm+0x1a/0x30 [ 23.457216] </TASK> [ 23.457639] [ 23.457876] Allocated by task 200: [ 23.458202] kasan_save_stack+0x3d/0x60 [ 23.459013] kasan_save_track+0x18/0x40 [ 23.459579] kasan_save_alloc_info+0x3b/0x50 [ 23.459963] __kasan_kmalloc+0xb7/0xc0 [ 23.460419] __kmalloc_cache_noprof+0x184/0x410 [ 23.461082] kmalloc_double_kzfree+0xaa/0x360 [ 23.461700] kunit_try_run_case+0x1b3/0x490 [ 23.462115] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.462991] kthread+0x257/0x310 [ 23.463460] ret_from_fork+0x41/0x80 [ 23.463760] ret_from_fork_asm+0x1a/0x30 [ 23.464208] [ 23.464607] Freed by task 200: [ 23.465001] kasan_save_stack+0x3d/0x60 [ 23.466292] kasan_save_track+0x18/0x40 [ 23.467009] kasan_save_free_info+0x3f/0x60 [ 23.467668] __kasan_slab_free+0x56/0x70 [ 23.468148] kfree+0x123/0x3f0 [ 23.468392] kfree_sensitive+0x67/0x90 [ 23.469167] kmalloc_double_kzfree+0x12c/0x360 [ 23.470035] kunit_try_run_case+0x1b3/0x490 [ 23.470647] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 23.471474] kthread+0x257/0x310 [ 23.471893] ret_from_fork+0x41/0x80 [ 23.472460] ret_from_fork_asm+0x1a/0x30 [ 23.472872] [ 23.473142] The buggy address belongs to the object at ffff888101adf0e0 [ 23.473142] which belongs to the cache kmalloc-16 of size 16 [ 23.474297] The buggy address is located 0 bytes inside of [ 23.474297] 16-byte region [ffff888101adf0e0, ffff888101adf0f0) [ 23.475990] [ 23.476208] The buggy address belongs to the physical page: [ 23.476724] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101adf [ 23.478143] flags: 0x200000000000000(node=0|zone=2) [ 23.478871] page_type: f5(slab) [ 23.479204] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 23.480367] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 23.481423] page dumped because: kasan: bad access detected [ 23.482322] [ 23.482507] Memory state around the buggy address: [ 23.482979] ffff888101adef80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.484059] ffff888101adf000: fa fb fc fc 00 04 fc fc 00 05 fc fc fa fb fc fc [ 23.484771] >ffff888101adf080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 23.485383] ^ [ 23.485916] ffff888101adf100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.486877] ffff888101adf180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 23.487598] ==================================================================