Date
July 3, 2025, 11:10 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 19.592355] ================================================================== [ 19.592469] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520 [ 19.592587] Read of size 1 at addr fff00000c17b3400 by task kunit_try_catch/164 [ 19.592698] [ 19.592774] CPU: 0 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.592968] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.593057] Hardware name: linux,dummy-virt (DT) [ 19.593132] Call trace: [ 19.593203] show_stack+0x20/0x38 (C) [ 19.593363] dump_stack_lvl+0x8c/0xd0 [ 19.593479] print_report+0x118/0x608 [ 19.593645] kasan_report+0xdc/0x128 [ 19.594165] __asan_report_load1_noabort+0x20/0x30 [ 19.594841] krealloc_uaf+0x4c8/0x520 [ 19.595332] kunit_try_run_case+0x170/0x3f0 [ 19.595544] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.595734] kthread+0x328/0x630 [ 19.595854] ret_from_fork+0x10/0x20 [ 19.595960] [ 19.595999] Allocated by task 164: [ 19.596094] kasan_save_stack+0x3c/0x68 [ 19.596221] kasan_save_track+0x20/0x40 [ 19.596334] kasan_save_alloc_info+0x40/0x58 [ 19.596455] __kasan_kmalloc+0xd4/0xd8 [ 19.596583] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.596713] krealloc_uaf+0xc8/0x520 [ 19.596797] kunit_try_run_case+0x170/0x3f0 [ 19.596882] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.596987] kthread+0x328/0x630 [ 19.597117] ret_from_fork+0x10/0x20 [ 19.597241] [ 19.597282] Freed by task 164: [ 19.597339] kasan_save_stack+0x3c/0x68 [ 19.597419] kasan_save_track+0x20/0x40 [ 19.597497] kasan_save_free_info+0x4c/0x78 [ 19.597581] __kasan_slab_free+0x6c/0x98 [ 19.597660] kfree+0x214/0x3c8 [ 19.597765] krealloc_uaf+0x12c/0x520 [ 19.597837] kunit_try_run_case+0x170/0x3f0 [ 19.597917] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.598095] kthread+0x328/0x630 [ 19.598165] ret_from_fork+0x10/0x20 [ 19.598267] [ 19.598307] The buggy address belongs to the object at fff00000c17b3400 [ 19.598307] which belongs to the cache kmalloc-256 of size 256 [ 19.598427] The buggy address is located 0 bytes inside of [ 19.598427] freed 256-byte region [fff00000c17b3400, fff00000c17b3500) [ 19.598567] [ 19.598605] The buggy address belongs to the physical page: [ 19.598665] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017b2 [ 19.598764] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 19.598854] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 19.598967] page_type: f5(slab) [ 19.599053] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 19.599155] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.599263] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 19.599365] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.599487] head: 0bfffe0000000001 ffffc1ffc305ec81 00000000ffffffff 00000000ffffffff [ 19.599638] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 19.599728] page dumped because: kasan: bad access detected [ 19.599798] [ 19.599832] Memory state around the buggy address: [ 19.599916] fff00000c17b3300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.600102] fff00000c17b3380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.600266] >fff00000c17b3400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.600349] ^ [ 19.600448] fff00000c17b3480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.600567] fff00000c17b3500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.600648] ================================================================== [ 19.582582] ================================================================== [ 19.582771] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520 [ 19.582884] Read of size 1 at addr fff00000c17b3400 by task kunit_try_catch/164 [ 19.582988] [ 19.583358] CPU: 0 UID: 0 PID: 164 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 19.583599] Tainted: [B]=BAD_PAGE, [N]=TEST [ 19.583681] Hardware name: linux,dummy-virt (DT) [ 19.583760] Call trace: [ 19.583818] show_stack+0x20/0x38 (C) [ 19.583933] dump_stack_lvl+0x8c/0xd0 [ 19.584064] print_report+0x118/0x608 [ 19.584170] kasan_report+0xdc/0x128 [ 19.584266] __kasan_check_byte+0x54/0x70 [ 19.584367] krealloc_noprof+0x44/0x360 [ 19.584458] krealloc_uaf+0x180/0x520 [ 19.584682] kunit_try_run_case+0x170/0x3f0 [ 19.585727] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.585877] kthread+0x328/0x630 [ 19.586008] ret_from_fork+0x10/0x20 [ 19.586103] [ 19.586125] Allocated by task 164: [ 19.586160] kasan_save_stack+0x3c/0x68 [ 19.586206] kasan_save_track+0x20/0x40 [ 19.586266] kasan_save_alloc_info+0x40/0x58 [ 19.586307] __kasan_kmalloc+0xd4/0xd8 [ 19.586343] __kmalloc_cache_noprof+0x16c/0x3c0 [ 19.586382] krealloc_uaf+0xc8/0x520 [ 19.586416] kunit_try_run_case+0x170/0x3f0 [ 19.586453] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.586494] kthread+0x328/0x630 [ 19.586526] ret_from_fork+0x10/0x20 [ 19.586561] [ 19.586603] Freed by task 164: [ 19.586645] kasan_save_stack+0x3c/0x68 [ 19.586684] kasan_save_track+0x20/0x40 [ 19.586720] kasan_save_free_info+0x4c/0x78 [ 19.586758] __kasan_slab_free+0x6c/0x98 [ 19.586795] kfree+0x214/0x3c8 [ 19.586827] krealloc_uaf+0x12c/0x520 [ 19.586861] kunit_try_run_case+0x170/0x3f0 [ 19.586897] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 19.586938] kthread+0x328/0x630 [ 19.586970] ret_from_fork+0x10/0x20 [ 19.587012] [ 19.587083] The buggy address belongs to the object at fff00000c17b3400 [ 19.587083] which belongs to the cache kmalloc-256 of size 256 [ 19.587301] The buggy address is located 0 bytes inside of [ 19.587301] freed 256-byte region [fff00000c17b3400, fff00000c17b3500) [ 19.587434] [ 19.587476] The buggy address belongs to the physical page: [ 19.587530] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017b2 [ 19.587628] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 19.587737] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 19.587895] page_type: f5(slab) [ 19.588010] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 19.588187] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.588302] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 19.588445] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 19.588630] head: 0bfffe0000000001 ffffc1ffc305ec81 00000000ffffffff 00000000ffffffff [ 19.588800] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 19.588911] page dumped because: kasan: bad access detected [ 19.588993] [ 19.590181] Memory state around the buggy address: [ 19.590295] fff00000c17b3300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.590507] fff00000c17b3380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.590603] >fff00000c17b3400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.590673] ^ [ 19.590756] fff00000c17b3480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 19.590858] fff00000c17b3500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 19.590947] ==================================================================
[ 11.464279] ================================================================== [ 11.464864] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b8/0x5e0 [ 11.465184] Read of size 1 at addr ffff888100333000 by task kunit_try_catch/181 [ 11.465470] [ 11.465632] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.465675] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.465686] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.465706] Call Trace: [ 11.465717] <TASK> [ 11.465730] dump_stack_lvl+0x73/0xb0 [ 11.465756] print_report+0xd1/0x650 [ 11.465778] ? __virt_addr_valid+0x1db/0x2d0 [ 11.465800] ? krealloc_uaf+0x1b8/0x5e0 [ 11.465819] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.465840] ? krealloc_uaf+0x1b8/0x5e0 [ 11.465860] kasan_report+0x141/0x180 [ 11.465881] ? krealloc_uaf+0x1b8/0x5e0 [ 11.465903] ? krealloc_uaf+0x1b8/0x5e0 [ 11.465924] __kasan_check_byte+0x3d/0x50 [ 11.465944] krealloc_noprof+0x3f/0x340 [ 11.465966] krealloc_uaf+0x1b8/0x5e0 [ 11.465987] ? __pfx_krealloc_uaf+0x10/0x10 [ 11.466006] ? finish_task_switch.isra.0+0x153/0x700 [ 11.466027] ? __switch_to+0x47/0xf50 [ 11.466051] ? __schedule+0x10cc/0x2b60 [ 11.466072] ? __pfx_read_tsc+0x10/0x10 [ 11.466091] ? ktime_get_ts64+0x86/0x230 [ 11.466116] kunit_try_run_case+0x1a5/0x480 [ 11.466152] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.466173] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.466194] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.466216] ? __kthread_parkme+0x82/0x180 [ 11.466237] ? preempt_count_sub+0x50/0x80 [ 11.466258] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.466280] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.466301] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.466323] kthread+0x337/0x6f0 [ 11.466341] ? trace_preempt_on+0x20/0xc0 [ 11.466363] ? __pfx_kthread+0x10/0x10 [ 11.466382] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.466401] ? calculate_sigpending+0x7b/0xa0 [ 11.466425] ? __pfx_kthread+0x10/0x10 [ 11.466445] ret_from_fork+0x116/0x1d0 [ 11.466462] ? __pfx_kthread+0x10/0x10 [ 11.466481] ret_from_fork_asm+0x1a/0x30 [ 11.466518] </TASK> [ 11.466529] [ 11.474041] Allocated by task 181: [ 11.474262] kasan_save_stack+0x45/0x70 [ 11.474527] kasan_save_track+0x18/0x40 [ 11.474705] kasan_save_alloc_info+0x3b/0x50 [ 11.474872] __kasan_kmalloc+0xb7/0xc0 [ 11.475061] __kmalloc_cache_noprof+0x189/0x420 [ 11.475516] krealloc_uaf+0xbb/0x5e0 [ 11.475703] kunit_try_run_case+0x1a5/0x480 [ 11.475858] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.476076] kthread+0x337/0x6f0 [ 11.476260] ret_from_fork+0x116/0x1d0 [ 11.476542] ret_from_fork_asm+0x1a/0x30 [ 11.476680] [ 11.476774] Freed by task 181: [ 11.476962] kasan_save_stack+0x45/0x70 [ 11.477240] kasan_save_track+0x18/0x40 [ 11.477434] kasan_save_free_info+0x3f/0x60 [ 11.477637] __kasan_slab_free+0x56/0x70 [ 11.477782] kfree+0x222/0x3f0 [ 11.477905] krealloc_uaf+0x13d/0x5e0 [ 11.478035] kunit_try_run_case+0x1a5/0x480 [ 11.478193] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.478488] kthread+0x337/0x6f0 [ 11.478891] ret_from_fork+0x116/0x1d0 [ 11.479077] ret_from_fork_asm+0x1a/0x30 [ 11.479425] [ 11.479532] The buggy address belongs to the object at ffff888100333000 [ 11.479532] which belongs to the cache kmalloc-256 of size 256 [ 11.479989] The buggy address is located 0 bytes inside of [ 11.479989] freed 256-byte region [ffff888100333000, ffff888100333100) [ 11.480949] [ 11.481037] The buggy address belongs to the physical page: [ 11.481612] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100332 [ 11.481941] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 11.482359] flags: 0x200000000000040(head|node=0|zone=2) [ 11.482594] page_type: f5(slab) [ 11.482760] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 11.483073] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 11.483539] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 11.483807] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 11.484119] head: 0200000000000001 ffffea000400cc81 00000000ffffffff 00000000ffffffff [ 11.484573] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 11.484875] page dumped because: kasan: bad access detected [ 11.485071] [ 11.485164] Memory state around the buggy address: [ 11.485474] ffff888100332f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.485759] ffff888100332f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.486061] >ffff888100333000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.486411] ^ [ 11.486584] ffff888100333080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.486860] ffff888100333100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.487165] ================================================================== [ 11.488188] ================================================================== [ 11.488917] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53c/0x5e0 [ 11.489266] Read of size 1 at addr ffff888100333000 by task kunit_try_catch/181 [ 11.489492] [ 11.489579] CPU: 0 UID: 0 PID: 181 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 11.489620] Tainted: [B]=BAD_PAGE, [N]=TEST [ 11.489679] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 11.489701] Call Trace: [ 11.489715] <TASK> [ 11.489732] dump_stack_lvl+0x73/0xb0 [ 11.489760] print_report+0xd1/0x650 [ 11.489781] ? __virt_addr_valid+0x1db/0x2d0 [ 11.489804] ? krealloc_uaf+0x53c/0x5e0 [ 11.489824] ? kasan_complete_mode_report_info+0x64/0x200 [ 11.489844] ? krealloc_uaf+0x53c/0x5e0 [ 11.489865] kasan_report+0x141/0x180 [ 11.489885] ? krealloc_uaf+0x53c/0x5e0 [ 11.489910] __asan_report_load1_noabort+0x18/0x20 [ 11.489933] krealloc_uaf+0x53c/0x5e0 [ 11.489953] ? __pfx_krealloc_uaf+0x10/0x10 [ 11.489973] ? finish_task_switch.isra.0+0x153/0x700 [ 11.489994] ? __switch_to+0x47/0xf50 [ 11.490019] ? __schedule+0x10cc/0x2b60 [ 11.490039] ? __pfx_read_tsc+0x10/0x10 [ 11.490059] ? ktime_get_ts64+0x86/0x230 [ 11.490082] kunit_try_run_case+0x1a5/0x480 [ 11.490106] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.490141] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 11.490163] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 11.490184] ? __kthread_parkme+0x82/0x180 [ 11.490204] ? preempt_count_sub+0x50/0x80 [ 11.490225] ? __pfx_kunit_try_run_case+0x10/0x10 [ 11.490247] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.490268] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 11.490290] kthread+0x337/0x6f0 [ 11.490352] ? trace_preempt_on+0x20/0xc0 [ 11.490377] ? __pfx_kthread+0x10/0x10 [ 11.490397] ? _raw_spin_unlock_irq+0x47/0x80 [ 11.490416] ? calculate_sigpending+0x7b/0xa0 [ 11.490439] ? __pfx_kthread+0x10/0x10 [ 11.490459] ret_from_fork+0x116/0x1d0 [ 11.490476] ? __pfx_kthread+0x10/0x10 [ 11.490495] ret_from_fork_asm+0x1a/0x30 [ 11.490530] </TASK> [ 11.490540] [ 11.498539] Allocated by task 181: [ 11.498722] kasan_save_stack+0x45/0x70 [ 11.498889] kasan_save_track+0x18/0x40 [ 11.499026] kasan_save_alloc_info+0x3b/0x50 [ 11.499213] __kasan_kmalloc+0xb7/0xc0 [ 11.499568] __kmalloc_cache_noprof+0x189/0x420 [ 11.499800] krealloc_uaf+0xbb/0x5e0 [ 11.499980] kunit_try_run_case+0x1a5/0x480 [ 11.500213] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.500516] kthread+0x337/0x6f0 [ 11.500670] ret_from_fork+0x116/0x1d0 [ 11.500803] ret_from_fork_asm+0x1a/0x30 [ 11.500940] [ 11.501035] Freed by task 181: [ 11.501281] kasan_save_stack+0x45/0x70 [ 11.501552] kasan_save_track+0x18/0x40 [ 11.501756] kasan_save_free_info+0x3f/0x60 [ 11.501993] __kasan_slab_free+0x56/0x70 [ 11.502221] kfree+0x222/0x3f0 [ 11.502570] krealloc_uaf+0x13d/0x5e0 [ 11.502739] kunit_try_run_case+0x1a5/0x480 [ 11.502922] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 11.503147] kthread+0x337/0x6f0 [ 11.503327] ret_from_fork+0x116/0x1d0 [ 11.503461] ret_from_fork_asm+0x1a/0x30 [ 11.503598] [ 11.503669] The buggy address belongs to the object at ffff888100333000 [ 11.503669] which belongs to the cache kmalloc-256 of size 256 [ 11.504063] The buggy address is located 0 bytes inside of [ 11.504063] freed 256-byte region [ffff888100333000, ffff888100333100) [ 11.504732] [ 11.504833] The buggy address belongs to the physical page: [ 11.505086] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100332 [ 11.505530] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 11.505763] flags: 0x200000000000040(head|node=0|zone=2) [ 11.505938] page_type: f5(slab) [ 11.506059] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 11.506596] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 11.506949] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 11.507558] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 11.507844] head: 0200000000000001 ffffea000400cc81 00000000ffffffff 00000000ffffffff [ 11.508077] head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000002 [ 11.508640] page dumped because: kasan: bad access detected [ 11.508934] [ 11.509003] Memory state around the buggy address: [ 11.509198] ffff888100332f00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.510533] ffff888100332f80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.510873] >ffff888100333000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.511584] ^ [ 11.511846] ffff888100333080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 11.512341] ffff888100333100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 11.512763] ==================================================================