Date
July 23, 2025, 3:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 30.318864] ================================================================== [ 30.318982] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520 [ 30.319281] Read of size 1 at addr fff00000c91e6600 by task kunit_try_catch/197 [ 30.319463] [ 30.319512] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250723 #1 PREEMPT [ 30.319760] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.319831] Hardware name: linux,dummy-virt (DT) [ 30.320123] Call trace: [ 30.320180] show_stack+0x20/0x38 (C) [ 30.320645] dump_stack_lvl+0x8c/0xd0 [ 30.320828] print_report+0x118/0x5e8 [ 30.321164] kasan_report+0xdc/0x128 [ 30.321246] __kasan_check_byte+0x54/0x70 [ 30.321354] krealloc_noprof+0x44/0x360 [ 30.321421] krealloc_uaf+0x180/0x520 [ 30.321529] kunit_try_run_case+0x170/0x3f0 [ 30.321631] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.321729] kthread+0x328/0x630 [ 30.321837] ret_from_fork+0x10/0x20 [ 30.321954] [ 30.322013] Allocated by task 197: [ 30.322071] kasan_save_stack+0x3c/0x68 [ 30.322143] kasan_save_track+0x20/0x40 [ 30.322614] kasan_save_alloc_info+0x40/0x58 [ 30.322680] __kasan_kmalloc+0xd4/0xd8 [ 30.322865] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.323052] krealloc_uaf+0xc8/0x520 [ 30.323260] kunit_try_run_case+0x170/0x3f0 [ 30.323316] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.323497] kthread+0x328/0x630 [ 30.323628] ret_from_fork+0x10/0x20 [ 30.323793] [ 30.323983] Freed by task 197: [ 30.324159] kasan_save_stack+0x3c/0x68 [ 30.324516] kasan_save_track+0x20/0x40 [ 30.324768] kasan_save_free_info+0x4c/0x78 [ 30.324816] __kasan_slab_free+0x6c/0x98 [ 30.324954] kfree+0x214/0x3c8 [ 30.325040] krealloc_uaf+0x12c/0x520 [ 30.325223] kunit_try_run_case+0x170/0x3f0 [ 30.325310] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.325704] kthread+0x328/0x630 [ 30.325933] ret_from_fork+0x10/0x20 [ 30.326218] [ 30.326365] The buggy address belongs to the object at fff00000c91e6600 [ 30.326365] which belongs to the cache kmalloc-256 of size 256 [ 30.326504] The buggy address is located 0 bytes inside of [ 30.326504] freed 256-byte region [fff00000c91e6600, fff00000c91e6700) [ 30.326950] [ 30.327005] The buggy address belongs to the physical page: [ 30.327050] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1091e6 [ 30.327293] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 30.327548] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 30.327771] page_type: f5(slab) [ 30.327968] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 30.328137] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 30.328234] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 30.328487] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 30.328745] head: 0bfffe0000000001 ffffc1ffc3247981 00000000ffffffff 00000000ffffffff [ 30.328799] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 30.329076] page dumped because: kasan: bad access detected [ 30.329204] [ 30.329275] Memory state around the buggy address: [ 30.329363] fff00000c91e6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.329416] fff00000c91e6580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.329607] >fff00000c91e6600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.329856] ^ [ 30.330048] fff00000c91e6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.330415] fff00000c91e6700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.330575] ================================================================== [ 30.334027] ================================================================== [ 30.334081] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520 [ 30.334132] Read of size 1 at addr fff00000c91e6600 by task kunit_try_catch/197 [ 30.334512] [ 30.334725] CPU: 0 UID: 0 PID: 197 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250723 #1 PREEMPT [ 30.334818] Tainted: [B]=BAD_PAGE, [N]=TEST [ 30.334844] Hardware name: linux,dummy-virt (DT) [ 30.335058] Call trace: [ 30.335081] show_stack+0x20/0x38 (C) [ 30.335133] dump_stack_lvl+0x8c/0xd0 [ 30.335574] print_report+0x118/0x5e8 [ 30.335644] kasan_report+0xdc/0x128 [ 30.335948] __asan_report_load1_noabort+0x20/0x30 [ 30.336076] krealloc_uaf+0x4c8/0x520 [ 30.336187] kunit_try_run_case+0x170/0x3f0 [ 30.336245] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.336312] kthread+0x328/0x630 [ 30.336408] ret_from_fork+0x10/0x20 [ 30.336475] [ 30.336513] Allocated by task 197: [ 30.336547] kasan_save_stack+0x3c/0x68 [ 30.336587] kasan_save_track+0x20/0x40 [ 30.336944] kasan_save_alloc_info+0x40/0x58 [ 30.337077] __kasan_kmalloc+0xd4/0xd8 [ 30.337144] __kmalloc_cache_noprof+0x16c/0x3c0 [ 30.337306] krealloc_uaf+0xc8/0x520 [ 30.337383] kunit_try_run_case+0x170/0x3f0 [ 30.337488] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.337554] kthread+0x328/0x630 [ 30.337607] ret_from_fork+0x10/0x20 [ 30.337980] [ 30.338059] Freed by task 197: [ 30.338088] kasan_save_stack+0x3c/0x68 [ 30.338150] kasan_save_track+0x20/0x40 [ 30.338194] kasan_save_free_info+0x4c/0x78 [ 30.338239] __kasan_slab_free+0x6c/0x98 [ 30.338273] kfree+0x214/0x3c8 [ 30.338306] krealloc_uaf+0x12c/0x520 [ 30.338358] kunit_try_run_case+0x170/0x3f0 [ 30.338403] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 30.338453] kthread+0x328/0x630 [ 30.338503] ret_from_fork+0x10/0x20 [ 30.338538] [ 30.338556] The buggy address belongs to the object at fff00000c91e6600 [ 30.338556] which belongs to the cache kmalloc-256 of size 256 [ 30.338628] The buggy address is located 0 bytes inside of [ 30.338628] freed 256-byte region [fff00000c91e6600, fff00000c91e6700) [ 30.338700] [ 30.338738] The buggy address belongs to the physical page: [ 30.338773] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1091e6 [ 30.338833] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 30.338877] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 30.339213] page_type: f5(slab) [ 30.339517] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 30.339600] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 30.339757] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 30.339847] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 30.339960] head: 0bfffe0000000001 ffffc1ffc3247981 00000000ffffffff 00000000ffffffff [ 30.340019] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 30.340113] page dumped because: kasan: bad access detected [ 30.340372] [ 30.340515] Memory state around the buggy address: [ 30.340613] fff00000c91e6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.340721] fff00000c91e6580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.340859] >fff00000c91e6600: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.340919] ^ [ 30.340949] fff00000c91e6680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 30.340995] fff00000c91e6700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 30.341031] ==================================================================
[ 25.086493] ================================================================== [ 25.087656] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0 [ 25.088763] Read of size 1 at addr ffff888104815200 by task kunit_try_catch/213 [ 25.089143] [ 25.089254] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) [ 25.089307] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.089320] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.089343] Call Trace: [ 25.089364] <TASK> [ 25.089386] dump_stack_lvl+0x73/0xb0 [ 25.089416] print_report+0xd1/0x640 [ 25.089439] ? __virt_addr_valid+0x1db/0x2d0 [ 25.089463] ? krealloc_uaf+0x53c/0x5e0 [ 25.089484] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.089509] ? krealloc_uaf+0x53c/0x5e0 [ 25.089530] kasan_report+0x141/0x180 [ 25.089551] ? krealloc_uaf+0x53c/0x5e0 [ 25.089576] __asan_report_load1_noabort+0x18/0x20 [ 25.089599] krealloc_uaf+0x53c/0x5e0 [ 25.089620] ? __pfx_krealloc_uaf+0x10/0x10 [ 25.089640] ? finish_task_switch.isra.0+0x153/0x700 [ 25.089662] ? __switch_to+0x47/0xf80 [ 25.089688] ? __schedule+0x10da/0x2b60 [ 25.089713] ? __pfx_read_tsc+0x10/0x10 [ 25.089734] ? ktime_get_ts64+0x86/0x230 [ 25.089758] kunit_try_run_case+0x1a5/0x480 [ 25.089783] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.089805] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.089829] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.089854] ? __kthread_parkme+0x82/0x180 [ 25.089874] ? preempt_count_sub+0x50/0x80 [ 25.089896] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.089919] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.089942] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.089964] kthread+0x337/0x6f0 [ 25.089984] ? trace_preempt_on+0x20/0xc0 [ 25.090009] ? __pfx_kthread+0x10/0x10 [ 25.090028] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.090051] ? calculate_sigpending+0x7b/0xa0 [ 25.090075] ? __pfx_kthread+0x10/0x10 [ 25.090095] ret_from_fork+0x116/0x1d0 [ 25.090115] ? __pfx_kthread+0x10/0x10 [ 25.090135] ret_from_fork_asm+0x1a/0x30 [ 25.090176] </TASK> [ 25.090187] [ 25.103291] Allocated by task 213: [ 25.103668] kasan_save_stack+0x45/0x70 [ 25.104088] kasan_save_track+0x18/0x40 [ 25.104475] kasan_save_alloc_info+0x3b/0x50 [ 25.104731] __kasan_kmalloc+0xb7/0xc0 [ 25.104861] __kmalloc_cache_noprof+0x189/0x420 [ 25.105122] krealloc_uaf+0xbb/0x5e0 [ 25.105558] kunit_try_run_case+0x1a5/0x480 [ 25.105939] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.106437] kthread+0x337/0x6f0 [ 25.106785] ret_from_fork+0x116/0x1d0 [ 25.107127] ret_from_fork_asm+0x1a/0x30 [ 25.107380] [ 25.107586] Freed by task 213: [ 25.107862] kasan_save_stack+0x45/0x70 [ 25.108004] kasan_save_track+0x18/0x40 [ 25.108133] kasan_save_free_info+0x3f/0x60 [ 25.108284] __kasan_slab_free+0x56/0x70 [ 25.108640] kfree+0x222/0x3f0 [ 25.108776] krealloc_uaf+0x13d/0x5e0 [ 25.108959] kunit_try_run_case+0x1a5/0x480 [ 25.109140] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.109356] kthread+0x337/0x6f0 [ 25.109517] ret_from_fork+0x116/0x1d0 [ 25.109711] ret_from_fork_asm+0x1a/0x30 [ 25.109993] [ 25.110087] The buggy address belongs to the object at ffff888104815200 [ 25.110087] which belongs to the cache kmalloc-256 of size 256 [ 25.110554] The buggy address is located 0 bytes inside of [ 25.110554] freed 256-byte region [ffff888104815200, ffff888104815300) [ 25.111002] [ 25.111139] The buggy address belongs to the physical page: [ 25.111334] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104814 [ 25.111603] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 25.112044] flags: 0x200000000000040(head|node=0|zone=2) [ 25.112250] page_type: f5(slab) [ 25.112370] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 25.112755] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 25.113169] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 25.113415] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 25.113797] head: 0200000000000001 ffffea0004120501 00000000ffffffff 00000000ffffffff [ 25.114189] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 25.114814] page dumped because: kasan: bad access detected [ 25.115130] [ 25.115242] Memory state around the buggy address: [ 25.115459] ffff888104815100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.115746] ffff888104815180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.116113] >ffff888104815200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.116402] ^ [ 25.116524] ffff888104815280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.116733] ffff888104815300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.117035] ================================================================== [ 25.059181] ================================================================== [ 25.059726] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0 [ 25.060050] Read of size 1 at addr ffff888104815200 by task kunit_try_catch/213 [ 25.060955] [ 25.061087] CPU: 0 UID: 0 PID: 213 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc7-next-20250723 #1 PREEMPT(voluntary) [ 25.061191] Tainted: [B]=BAD_PAGE, [N]=TEST [ 25.061204] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 25.061226] Call Trace: [ 25.061239] <TASK> [ 25.061258] dump_stack_lvl+0x73/0xb0 [ 25.061293] print_report+0xd1/0x640 [ 25.061318] ? __virt_addr_valid+0x1db/0x2d0 [ 25.061344] ? krealloc_uaf+0x1b8/0x5e0 [ 25.061437] ? kasan_complete_mode_report_info+0x64/0x200 [ 25.061465] ? krealloc_uaf+0x1b8/0x5e0 [ 25.061487] kasan_report+0x141/0x180 [ 25.061509] ? krealloc_uaf+0x1b8/0x5e0 [ 25.061533] ? krealloc_uaf+0x1b8/0x5e0 [ 25.061554] __kasan_check_byte+0x3d/0x50 [ 25.061576] krealloc_noprof+0x3f/0x340 [ 25.061603] krealloc_uaf+0x1b8/0x5e0 [ 25.061625] ? __pfx_krealloc_uaf+0x10/0x10 [ 25.061645] ? finish_task_switch.isra.0+0x153/0x700 [ 25.061668] ? __switch_to+0x47/0xf80 [ 25.061695] ? __schedule+0x10da/0x2b60 [ 25.061721] ? __pfx_read_tsc+0x10/0x10 [ 25.061743] ? ktime_get_ts64+0x86/0x230 [ 25.061770] kunit_try_run_case+0x1a5/0x480 [ 25.061796] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.061819] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 25.061844] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 25.061869] ? __kthread_parkme+0x82/0x180 [ 25.061889] ? preempt_count_sub+0x50/0x80 [ 25.061912] ? __pfx_kunit_try_run_case+0x10/0x10 [ 25.061955] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.061978] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 25.062001] kthread+0x337/0x6f0 [ 25.062022] ? trace_preempt_on+0x20/0xc0 [ 25.062047] ? __pfx_kthread+0x10/0x10 [ 25.062068] ? _raw_spin_unlock_irq+0x47/0x80 [ 25.062091] ? calculate_sigpending+0x7b/0xa0 [ 25.062116] ? __pfx_kthread+0x10/0x10 [ 25.062138] ret_from_fork+0x116/0x1d0 [ 25.062166] ? __pfx_kthread+0x10/0x10 [ 25.062187] ret_from_fork_asm+0x1a/0x30 [ 25.062218] </TASK> [ 25.062230] [ 25.070911] Allocated by task 213: [ 25.071122] kasan_save_stack+0x45/0x70 [ 25.071461] kasan_save_track+0x18/0x40 [ 25.071694] kasan_save_alloc_info+0x3b/0x50 [ 25.071920] __kasan_kmalloc+0xb7/0xc0 [ 25.072137] __kmalloc_cache_noprof+0x189/0x420 [ 25.072436] krealloc_uaf+0xbb/0x5e0 [ 25.072600] kunit_try_run_case+0x1a5/0x480 [ 25.072824] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.073083] kthread+0x337/0x6f0 [ 25.073253] ret_from_fork+0x116/0x1d0 [ 25.073440] ret_from_fork_asm+0x1a/0x30 [ 25.073583] [ 25.073649] Freed by task 213: [ 25.073755] kasan_save_stack+0x45/0x70 [ 25.073885] kasan_save_track+0x18/0x40 [ 25.074039] kasan_save_free_info+0x3f/0x60 [ 25.074249] __kasan_slab_free+0x56/0x70 [ 25.074721] kfree+0x222/0x3f0 [ 25.074948] krealloc_uaf+0x13d/0x5e0 [ 25.075187] kunit_try_run_case+0x1a5/0x480 [ 25.075414] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 25.075769] kthread+0x337/0x6f0 [ 25.075965] ret_from_fork+0x116/0x1d0 [ 25.076158] ret_from_fork_asm+0x1a/0x30 [ 25.076423] [ 25.076552] The buggy address belongs to the object at ffff888104815200 [ 25.076552] which belongs to the cache kmalloc-256 of size 256 [ 25.077014] The buggy address is located 0 bytes inside of [ 25.077014] freed 256-byte region [ffff888104815200, ffff888104815300) [ 25.077533] [ 25.077626] The buggy address belongs to the physical page: [ 25.077881] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x104814 [ 25.078280] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 25.078668] flags: 0x200000000000040(head|node=0|zone=2) [ 25.078961] page_type: f5(slab) [ 25.079098] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 25.079336] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 25.079900] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 25.080288] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 25.080717] head: 0200000000000001 ffffea0004120501 00000000ffffffff 00000000ffffffff [ 25.081110] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 25.081556] page dumped because: kasan: bad access detected [ 25.081813] [ 25.081905] Memory state around the buggy address: [ 25.082141] ffff888104815100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.082469] ffff888104815180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.082682] >ffff888104815200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.083028] ^ [ 25.083206] ffff888104815280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 25.083648] ffff888104815300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 25.083994] ==================================================================