Date
June 7, 2025, 10:40 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 22.671160] ================================================================== [ 22.672107] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 22.672809] Read of size 16 at addr fff00000c570be60 by task kunit_try_catch/157 [ 22.673539] [ 22.673900] CPU: 1 UID: 0 PID: 157 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 22.674114] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.674199] Hardware name: linux,dummy-virt (DT) [ 22.674284] Call trace: [ 22.674347] show_stack+0x20/0x38 (C) [ 22.674489] dump_stack_lvl+0x8c/0xd0 [ 22.674625] print_report+0x118/0x608 [ 22.674763] kasan_report+0xdc/0x128 [ 22.674951] __asan_report_load16_noabort+0x20/0x30 [ 22.675081] kmalloc_uaf_16+0x3bc/0x438 [ 22.675234] kunit_try_run_case+0x170/0x3f0 [ 22.675354] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.675478] kthread+0x318/0x620 [ 22.675572] ret_from_fork+0x10/0x20 [ 22.675636] [ 22.682904] Allocated by task 157: [ 22.683514] kasan_save_stack+0x3c/0x68 [ 22.684108] kasan_save_track+0x20/0x40 [ 22.684537] kasan_save_alloc_info+0x40/0x58 [ 22.685311] __kasan_kmalloc+0xd4/0xd8 [ 22.685859] __kmalloc_cache_noprof+0x16c/0x3c0 [ 22.686595] kmalloc_uaf_16+0x140/0x438 [ 22.687566] kunit_try_run_case+0x170/0x3f0 [ 22.688182] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.688854] kthread+0x318/0x620 [ 22.689792] ret_from_fork+0x10/0x20 [ 22.690322] [ 22.690683] Freed by task 157: [ 22.691101] kasan_save_stack+0x3c/0x68 [ 22.691680] kasan_save_track+0x20/0x40 [ 22.692095] kasan_save_free_info+0x4c/0x78 [ 22.692634] __kasan_slab_free+0x6c/0x98 [ 22.693249] kfree+0x214/0x3c8 [ 22.694104] kmalloc_uaf_16+0x190/0x438 [ 22.694556] kunit_try_run_case+0x170/0x3f0 [ 22.695114] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 22.695639] kthread+0x318/0x620 [ 22.696150] ret_from_fork+0x10/0x20 [ 22.696722] [ 22.697068] The buggy address belongs to the object at fff00000c570be60 [ 22.697068] which belongs to the cache kmalloc-16 of size 16 [ 22.698594] The buggy address is located 0 bytes inside of [ 22.698594] freed 16-byte region [fff00000c570be60, fff00000c570be70) [ 22.699662] [ 22.699978] The buggy address belongs to the physical page: [ 22.700613] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10570b [ 22.701419] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 22.702483] page_type: f5(slab) [ 22.702949] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 22.703695] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 22.704450] page dumped because: kasan: bad access detected [ 22.705378] [ 22.705650] Memory state around the buggy address: [ 22.706234] fff00000c570bd00: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 22.706958] fff00000c570bd80: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 22.707642] >fff00000c570be00: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 22.708384] ^ [ 22.709076] fff00000c570be80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.709780] fff00000c570bf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.710825] ==================================================================
[ 17.567839] ================================================================== [ 17.568490] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47d/0x4c0 [ 17.569965] Read of size 16 at addr ffff8881024b0160 by task kunit_try_catch/176 [ 17.571109] [ 17.571383] CPU: 0 UID: 0 PID: 176 Comm: kunit_try_catch Tainted: G B N 6.14.11-rc1 #1 [ 17.571494] Tainted: [B]=BAD_PAGE, [N]=TEST [ 17.571524] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 17.571568] Call Trace: [ 17.571614] <TASK> [ 17.571672] dump_stack_lvl+0x73/0xb0 [ 17.571784] print_report+0xd1/0x650 [ 17.571835] ? __virt_addr_valid+0x1db/0x2d0 [ 17.571911] ? kmalloc_uaf_16+0x47d/0x4c0 [ 17.571960] ? kasan_complete_mode_report_info+0x64/0x200 [ 17.572028] ? kmalloc_uaf_16+0x47d/0x4c0 [ 17.572096] kasan_report+0x140/0x180 [ 17.572154] ? kmalloc_uaf_16+0x47d/0x4c0 [ 17.572213] __asan_report_load16_noabort+0x18/0x20 [ 17.572264] kmalloc_uaf_16+0x47d/0x4c0 [ 17.572293] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 17.572333] ? __schedule+0xce8/0x2840 [ 17.572372] ? __pfx_read_tsc+0x10/0x10 [ 17.572402] ? ktime_get_ts64+0x86/0x230 [ 17.572447] kunit_try_run_case+0x1a6/0x480 [ 17.572498] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.572539] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 17.572575] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 17.572605] ? __kthread_parkme+0x82/0x160 [ 17.572636] ? preempt_count_sub+0x50/0x80 [ 17.572667] ? __pfx_kunit_try_run_case+0x10/0x10 [ 17.572695] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.572728] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 17.572760] kthread+0x324/0x6e0 [ 17.572786] ? trace_preempt_on+0x20/0xc0 [ 17.572817] ? __pfx_kthread+0x10/0x10 [ 17.572844] ? _raw_spin_unlock_irq+0x47/0x80 [ 17.572894] ? calculate_sigpending+0x7b/0xa0 [ 17.572923] ? __pfx_kthread+0x10/0x10 [ 17.572951] ret_from_fork+0x41/0x80 [ 17.572976] ? __pfx_kthread+0x10/0x10 [ 17.573003] ret_from_fork_asm+0x1a/0x30 [ 17.573044] </TASK> [ 17.573059] [ 17.589595] Allocated by task 176: [ 17.590062] kasan_save_stack+0x45/0x70 [ 17.590914] kasan_save_track+0x18/0x40 [ 17.591410] kasan_save_alloc_info+0x3b/0x50 [ 17.591627] __kasan_kmalloc+0xb7/0xc0 [ 17.591766] __kmalloc_cache_noprof+0x18a/0x420 [ 17.591964] kmalloc_uaf_16+0x15c/0x4c0 [ 17.592241] kunit_try_run_case+0x1a6/0x480 [ 17.592676] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.593371] kthread+0x324/0x6e0 [ 17.593610] ret_from_fork+0x41/0x80 [ 17.594108] ret_from_fork_asm+0x1a/0x30 [ 17.594550] [ 17.594751] Freed by task 176: [ 17.595092] kasan_save_stack+0x45/0x70 [ 17.595475] kasan_save_track+0x18/0x40 [ 17.596847] kasan_save_free_info+0x3f/0x60 [ 17.597588] __kasan_slab_free+0x56/0x70 [ 17.598161] kfree+0x224/0x3f0 [ 17.598362] kmalloc_uaf_16+0x1d7/0x4c0 [ 17.598947] kunit_try_run_case+0x1a6/0x480 [ 17.599200] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 17.600257] kthread+0x324/0x6e0 [ 17.601113] ret_from_fork+0x41/0x80 [ 17.601897] ret_from_fork_asm+0x1a/0x30 [ 17.602298] [ 17.602559] The buggy address belongs to the object at ffff8881024b0160 [ 17.602559] which belongs to the cache kmalloc-16 of size 16 [ 17.603684] The buggy address is located 0 bytes inside of [ 17.603684] freed 16-byte region [ffff8881024b0160, ffff8881024b0170) [ 17.604495] [ 17.605412] The buggy address belongs to the physical page: [ 17.605943] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1024b0 [ 17.606234] flags: 0x200000000000000(node=0|zone=2) [ 17.606450] page_type: f5(slab) [ 17.606955] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 17.607424] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 17.608124] page dumped because: kasan: bad access detected [ 17.608514] [ 17.608641] Memory state around the buggy address: [ 17.610029] ffff8881024b0000: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.610642] ffff8881024b0080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 17.611273] >ffff8881024b0100: fa fb fc fc fa fb fc fc 00 00 fc fc fa fb fc fc [ 17.611761] ^ [ 17.612129] ffff8881024b0180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.613024] ffff8881024b0200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 17.613434] ==================================================================