Date
July 1, 2025, 12:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 17.544277] ================================================================== [ 17.544340] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 17.544393] Read of size 1 at addr fff00000c45518a8 by task kunit_try_catch/184 [ 17.544460] [ 17.544494] CPU: 1 UID: 0 PID: 184 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 17.544580] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.544607] Hardware name: linux,dummy-virt (DT) [ 17.544639] Call trace: [ 17.544660] show_stack+0x20/0x38 (C) [ 17.544709] dump_stack_lvl+0x8c/0xd0 [ 17.544756] print_report+0x118/0x608 [ 17.544803] kasan_report+0xdc/0x128 [ 17.544848] __asan_report_load1_noabort+0x20/0x30 [ 17.544900] kmalloc_uaf+0x300/0x338 [ 17.544941] kunit_try_run_case+0x170/0x3f0 [ 17.544990] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.545042] kthread+0x328/0x630 [ 17.545081] ret_from_fork+0x10/0x20 [ 17.545129] [ 17.545147] Allocated by task 184: [ 17.545175] kasan_save_stack+0x3c/0x68 [ 17.545214] kasan_save_track+0x20/0x40 [ 17.545251] kasan_save_alloc_info+0x40/0x58 [ 17.545291] __kasan_kmalloc+0xd4/0xd8 [ 17.545328] __kmalloc_cache_noprof+0x16c/0x3c0 [ 17.545369] kmalloc_uaf+0xb8/0x338 [ 17.545401] kunit_try_run_case+0x170/0x3f0 [ 17.545440] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.546896] kthread+0x328/0x630 [ 17.546975] ret_from_fork+0x10/0x20 [ 17.547016] [ 17.547035] Freed by task 184: [ 17.547064] kasan_save_stack+0x3c/0x68 [ 17.547306] kasan_save_track+0x20/0x40 [ 17.547539] kasan_save_free_info+0x4c/0x78 [ 17.547759] __kasan_slab_free+0x6c/0x98 [ 17.547808] kfree+0x214/0x3c8 [ 17.547842] kmalloc_uaf+0x11c/0x338 [ 17.548154] kunit_try_run_case+0x170/0x3f0 [ 17.548333] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 17.548652] kthread+0x328/0x630 [ 17.548740] ret_from_fork+0x10/0x20 [ 17.548900] [ 17.548970] The buggy address belongs to the object at fff00000c45518a0 [ 17.548970] which belongs to the cache kmalloc-16 of size 16 [ 17.549261] The buggy address is located 8 bytes inside of [ 17.549261] freed 16-byte region [fff00000c45518a0, fff00000c45518b0) [ 17.549420] [ 17.549541] The buggy address belongs to the physical page: [ 17.549615] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104551 [ 17.549740] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 17.549964] page_type: f5(slab) [ 17.550398] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 17.550632] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.551010] page dumped because: kasan: bad access detected [ 17.551045] [ 17.551088] Memory state around the buggy address: [ 17.551362] fff00000c4551780: fa fb fc fc fa fb fc fc 00 05 fc fc fa fb fc fc [ 17.551649] fff00000c4551800: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.551703] >fff00000c4551880: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 17.551898] ^ [ 17.552160] fff00000c4551900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.552321] fff00000c4551980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.552364] ==================================================================
[ 11.693790] ================================================================== [ 11.694346] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 11.694609] Read of size 1 at addr ffff8881027a10c8 by task kunit_try_catch/201 [ 11.694905] [ 11.695019] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.695073] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.695085] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.695106] Call Trace: [ 11.695118] <TASK> [ 11.695132] dump_stack_lvl+0x73/0xb0 [ 11.695160] print_report+0xd1/0x650 [ 11.695182] ? __virt_addr_valid+0x1db/0x2d0 [ 11.695204] ? kmalloc_uaf+0x320/0x380 [ 11.695223] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.695243] ? kmalloc_uaf+0x320/0x380 [ 11.695262] kasan_report+0x141/0x180 [ 11.695282] ? kmalloc_uaf+0x320/0x380 [ 11.695306] __asan_report_load1_noabort+0x18/0x20 [ 11.695329] kmalloc_uaf+0x320/0x380 [ 11.695347] ? __pfx_kmalloc_uaf+0x10/0x10 [ 11.695367] ? __schedule+0x10cc/0x2b60 [ 11.695387] ? __pfx_read_tsc+0x10/0x10 [ 11.695407] ? ktime_get_ts64+0x86/0x230 [ 11.695431] kunit_try_run_case+0x1a5/0x480 [ 11.695453] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.695474] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.695495] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.695516] ? __kthread_parkme+0x82/0x180 [ 11.695535] ? preempt_count_sub+0x50/0x80 [ 11.695558] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.695579] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.695600] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.695622] kthread+0x337/0x6f0 [ 11.695657] ? trace_preempt_on+0x20/0xc0 [ 11.695679] ? __pfx_kthread+0x10/0x10 [ 11.695698] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.695718] ? calculate_sigpending+0x7b/0xa0 [ 11.695739] ? __pfx_kthread+0x10/0x10 [ 11.695760] ret_from_fork+0x116/0x1d0 [ 11.695776] ? __pfx_kthread+0x10/0x10 [ 11.695796] ret_from_fork_asm+0x1a/0x30 [ 11.695825] </TASK> [ 11.695835] [ 11.702529] Allocated by task 201: [ 11.702713] kasan_save_stack+0x45/0x70 [ 11.702882] kasan_save_track+0x18/0x40 [ 11.705125] kasan_save_alloc_info+0x3b/0x50 [ 11.705370] __kasan_kmalloc+0xb7/0xc0 [ 11.705545] __kmalloc_cache_noprof+0x189/0x420 [ 11.705731] kmalloc_uaf+0xaa/0x380 [ 11.705858] kunit_try_run_case+0x1a5/0x480 [ 11.706073] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.706421] kthread+0x337/0x6f0 [ 11.706543] ret_from_fork+0x116/0x1d0 [ 11.706730] ret_from_fork_asm+0x1a/0x30 [ 11.706927] [ 11.707021] Freed by task 201: [ 11.708057] kasan_save_stack+0x45/0x70 [ 11.710165] kasan_save_track+0x18/0x40 [ 11.710343] kasan_save_free_info+0x3f/0x60 [ 11.710490] __kasan_slab_free+0x56/0x70 [ 11.710685] kfree+0x222/0x3f0 [ 11.710821] kmalloc_uaf+0x12c/0x380 [ 11.710979] kunit_try_run_case+0x1a5/0x480 [ 11.711195] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.711471] kthread+0x337/0x6f0 [ 11.711639] ret_from_fork+0x116/0x1d0 [ 11.711803] ret_from_fork_asm+0x1a/0x30 [ 11.711968] [ 11.712073] The buggy address belongs to the object at ffff8881027a10c0 [ 11.712073] which belongs to the cache kmalloc-16 of size 16 [ 11.712459] The buggy address is located 8 bytes inside of [ 11.712459] freed 16-byte region [ffff8881027a10c0, ffff8881027a10d0) [ 11.714069] [ 11.714165] The buggy address belongs to the physical page: [ 11.714390] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1027a1 [ 11.714690] flags: 0x200000000000000(node=0|zone=2) [ 11.714898] page_type: f5(slab) [ 11.715059] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 11.715356] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 11.715652] page dumped because: kasan: bad access detected [ 11.715865] [ 11.715953] Memory state around the buggy address: [ 11.717206] ffff8881027a0f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.717988] ffff8881027a1000: fa fb fc fc fa fb fc fc 00 05 fc fc fa fb fc fc [ 11.720085] >ffff8881027a1080: fa fb fc fc fa fb fc fc fa fb fc fc fc fc fc fc [ 11.721342] ^ [ 11.721565] ffff8881027a1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.721857] ffff8881027a1180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.722166] ==================================================================