Date
July 20, 2025, 11:12 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 15.339763] ================================================================== [ 15.339817] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x3bc/0x438 [ 15.339895] Read of size 16 at addr fff00000c3fc61c0 by task kunit_try_catch/168 [ 15.339952] [ 15.339989] CPU: 0 UID: 0 PID: 168 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT [ 15.340067] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.340128] Hardware name: linux,dummy-virt (DT) [ 15.340176] Call trace: [ 15.340204] show_stack+0x20/0x38 (C) [ 15.340308] dump_stack_lvl+0x8c/0xd0 [ 15.340373] print_report+0x118/0x5d0 [ 15.340450] kasan_report+0xdc/0x128 [ 15.340526] __asan_report_load16_noabort+0x20/0x30 [ 15.340578] kmalloc_uaf_16+0x3bc/0x438 [ 15.340690] kunit_try_run_case+0x170/0x3f0 [ 15.340755] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.340816] kthread+0x328/0x630 [ 15.340874] ret_from_fork+0x10/0x20 [ 15.340949] [ 15.341020] Allocated by task 168: [ 15.341048] kasan_save_stack+0x3c/0x68 [ 15.341086] kasan_save_track+0x20/0x40 [ 15.341122] kasan_save_alloc_info+0x40/0x58 [ 15.341440] __kasan_kmalloc+0xd4/0xd8 [ 15.341485] __kmalloc_cache_noprof+0x16c/0x3c0 [ 15.341522] kmalloc_uaf_16+0x140/0x438 [ 15.341562] kunit_try_run_case+0x170/0x3f0 [ 15.341704] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.341747] kthread+0x328/0x630 [ 15.341843] ret_from_fork+0x10/0x20 [ 15.341878] [ 15.341895] Freed by task 168: [ 15.341922] kasan_save_stack+0x3c/0x68 [ 15.341974] kasan_save_track+0x20/0x40 [ 15.342010] kasan_save_free_info+0x4c/0x78 [ 15.342074] __kasan_slab_free+0x6c/0x98 [ 15.342131] kfree+0x214/0x3c8 [ 15.342212] kmalloc_uaf_16+0x190/0x438 [ 15.342247] kunit_try_run_case+0x170/0x3f0 [ 15.342284] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 15.342327] kthread+0x328/0x630 [ 15.342358] ret_from_fork+0x10/0x20 [ 15.342392] [ 15.342469] The buggy address belongs to the object at fff00000c3fc61c0 [ 15.342469] which belongs to the cache kmalloc-16 of size 16 [ 15.342525] The buggy address is located 0 bytes inside of [ 15.342525] freed 16-byte region [fff00000c3fc61c0, fff00000c3fc61d0) [ 15.342582] [ 15.342601] The buggy address belongs to the physical page: [ 15.342630] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103fc6 [ 15.342689] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 15.342735] page_type: f5(slab) [ 15.342771] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 15.342819] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.342867] page dumped because: kasan: bad access detected [ 15.342914] [ 15.342960] Memory state around the buggy address: [ 15.343022] fff00000c3fc6080: 00 00 fc fc 00 02 fc fc 00 02 fc fc 00 06 fc fc [ 15.343084] fff00000c3fc6100: 00 06 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 15.343222] >fff00000c3fc6180: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 15.343310] ^ [ 15.343374] fff00000c3fc6200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.343511] fff00000c3fc6280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.343638] ==================================================================
[ 12.298805] ================================================================== [ 12.299802] BUG: KASAN: slab-use-after-free in kmalloc_uaf_16+0x47b/0x4c0 [ 12.300192] Read of size 16 at addr ffff888101d1f540 by task kunit_try_catch/185 [ 12.300895] [ 12.301175] CPU: 0 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc6 #1 PREEMPT(voluntary) [ 12.301223] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.301234] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.301253] Call Trace: [ 12.301266] <TASK> [ 12.301279] dump_stack_lvl+0x73/0xb0 [ 12.301318] print_report+0xd1/0x610 [ 12.301340] ? __virt_addr_valid+0x1db/0x2d0 [ 12.301361] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.301392] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.301412] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.301432] kasan_report+0x141/0x180 [ 12.301452] ? kmalloc_uaf_16+0x47b/0x4c0 [ 12.301476] __asan_report_load16_noabort+0x18/0x20 [ 12.301498] kmalloc_uaf_16+0x47b/0x4c0 [ 12.301517] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.301540] ? __pfx_kmalloc_uaf_16+0x10/0x10 [ 12.301563] kunit_try_run_case+0x1a5/0x480 [ 12.301585] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.301606] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.301629] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.301650] ? __kthread_parkme+0x82/0x180 [ 12.301669] ? preempt_count_sub+0x50/0x80 [ 12.301751] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.301775] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.301797] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.301819] kthread+0x337/0x6f0 [ 12.301838] ? trace_preempt_on+0x20/0xc0 [ 12.301860] ? __pfx_kthread+0x10/0x10 [ 12.301880] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.301900] ? calculate_sigpending+0x7b/0xa0 [ 12.301932] ? __pfx_kthread+0x10/0x10 [ 12.301952] ret_from_fork+0x116/0x1d0 [ 12.301969] ? __pfx_kthread+0x10/0x10 [ 12.301988] ret_from_fork_asm+0x1a/0x30 [ 12.302016] </TASK> [ 12.302026] [ 12.309152] Allocated by task 185: [ 12.309334] kasan_save_stack+0x45/0x70 [ 12.309492] kasan_save_track+0x18/0x40 [ 12.309685] kasan_save_alloc_info+0x3b/0x50 [ 12.309896] __kasan_kmalloc+0xb7/0xc0 [ 12.310040] __kmalloc_cache_noprof+0x189/0x420 [ 12.310196] kmalloc_uaf_16+0x15b/0x4c0 [ 12.310331] kunit_try_run_case+0x1a5/0x480 [ 12.310474] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.310711] kthread+0x337/0x6f0 [ 12.311026] ret_from_fork+0x116/0x1d0 [ 12.311227] ret_from_fork_asm+0x1a/0x30 [ 12.311426] [ 12.311527] Freed by task 185: [ 12.311679] kasan_save_stack+0x45/0x70 [ 12.311884] kasan_save_track+0x18/0x40 [ 12.312029] kasan_save_free_info+0x3f/0x60 [ 12.312173] __kasan_slab_free+0x56/0x70 [ 12.312602] kfree+0x222/0x3f0 [ 12.312928] kmalloc_uaf_16+0x1d6/0x4c0 [ 12.313128] kunit_try_run_case+0x1a5/0x480 [ 12.313341] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.313604] kthread+0x337/0x6f0 [ 12.313810] ret_from_fork+0x116/0x1d0 [ 12.313982] ret_from_fork_asm+0x1a/0x30 [ 12.314119] [ 12.314212] The buggy address belongs to the object at ffff888101d1f540 [ 12.314212] which belongs to the cache kmalloc-16 of size 16 [ 12.314775] The buggy address is located 0 bytes inside of [ 12.314775] freed 16-byte region [ffff888101d1f540, ffff888101d1f550) [ 12.315190] [ 12.315264] The buggy address belongs to the physical page: [ 12.315437] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101d1f [ 12.315675] flags: 0x200000000000000(node=0|zone=2) [ 12.315914] page_type: f5(slab) [ 12.316077] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.316416] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.316783] page dumped because: kasan: bad access detected [ 12.317469] [ 12.317579] Memory state around the buggy address: [ 12.317827] ffff888101d1f400: 00 02 fc fc 00 02 fc fc 00 02 fc fc fa fb fc fc [ 12.318081] ffff888101d1f480: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.318404] >ffff888101d1f500: fa fb fc fc 00 00 fc fc fa fb fc fc fc fc fc fc [ 12.318716] ^ [ 12.318927] ffff888101d1f580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.319212] ffff888101d1f600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.319488] ==================================================================