Date
May 12, 2025, 6:12 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 18.537659] ================================================================== [ 18.538288] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520 [ 18.538981] Read of size 1 at addr fff00000c49e1200 by task kunit_try_catch/153 [ 18.539716] [ 18.540063] CPU: 1 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 18.540310] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.540378] Hardware name: linux,dummy-virt (DT) [ 18.540438] Call trace: [ 18.540485] show_stack+0x20/0x38 (C) [ 18.540587] dump_stack_lvl+0x8c/0xd0 [ 18.540667] print_report+0x118/0x608 [ 18.540770] kasan_report+0xdc/0x128 [ 18.540854] __asan_report_load1_noabort+0x20/0x30 [ 18.540955] krealloc_uaf+0x4c8/0x520 [ 18.541045] kunit_try_run_case+0x170/0x3f0 [ 18.541127] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.541221] kthread+0x318/0x620 [ 18.541303] ret_from_fork+0x10/0x20 [ 18.541395] [ 18.547228] Allocated by task 153: [ 18.547675] kasan_save_stack+0x3c/0x68 [ 18.548279] kasan_save_track+0x20/0x40 [ 18.548795] kasan_save_alloc_info+0x40/0x58 [ 18.549273] __kasan_kmalloc+0xd4/0xd8 [ 18.549761] __kmalloc_cache_noprof+0x15c/0x3c0 [ 18.550321] krealloc_uaf+0xc8/0x520 [ 18.550943] kunit_try_run_case+0x170/0x3f0 [ 18.551478] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.552114] kthread+0x318/0x620 [ 18.552529] ret_from_fork+0x10/0x20 [ 18.553034] [ 18.553307] Freed by task 153: [ 18.553687] kasan_save_stack+0x3c/0x68 [ 18.554201] kasan_save_track+0x20/0x40 [ 18.554899] kasan_save_free_info+0x4c/0x78 [ 18.555395] __kasan_slab_free+0x6c/0x98 [ 18.555837] kfree+0x214/0x3c8 [ 18.556195] krealloc_uaf+0x12c/0x520 [ 18.556631] kunit_try_run_case+0x170/0x3f0 [ 18.557096] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.557659] kthread+0x318/0x620 [ 18.558076] ret_from_fork+0x10/0x20 [ 18.558707] [ 18.558961] The buggy address belongs to the object at fff00000c49e1200 [ 18.558961] which belongs to the cache kmalloc-256 of size 256 [ 18.560677] The buggy address is located 0 bytes inside of [ 18.560677] freed 256-byte region [fff00000c49e1200, fff00000c49e1300) [ 18.561657] [ 18.561907] The buggy address belongs to the physical page: [ 18.562501] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1049e0 [ 18.563148] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 18.563727] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 18.564564] page_type: f5(slab) [ 18.564992] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 18.565684] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 18.566406] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 18.567237] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 18.567854] head: 0bfffe0000000001 ffffc1ffc3127801 ffffffffffffffff 0000000000000000 [ 18.568487] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 18.569113] page dumped because: kasan: bad access detected [ 18.569554] [ 18.569853] Memory state around the buggy address: [ 18.570296] fff00000c49e1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.571188] fff00000c49e1180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.571863] >fff00000c49e1200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.572437] ^ [ 18.572734] fff00000c49e1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.573357] fff00000c49e1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.573956] ================================================================== [ 18.497371] ================================================================== [ 18.498162] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520 [ 18.499491] Read of size 1 at addr fff00000c49e1200 by task kunit_try_catch/153 [ 18.500480] [ 18.500715] CPU: 1 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 18.500923] Tainted: [B]=BAD_PAGE, [N]=TEST [ 18.500983] Hardware name: linux,dummy-virt (DT) [ 18.501052] Call trace: [ 18.501104] show_stack+0x20/0x38 (C) [ 18.501222] dump_stack_lvl+0x8c/0xd0 [ 18.501325] print_report+0x118/0x608 [ 18.501419] kasan_report+0xdc/0x128 [ 18.501514] __kasan_check_byte+0x54/0x70 [ 18.501607] krealloc_noprof+0x44/0x360 [ 18.501666] krealloc_uaf+0x180/0x520 [ 18.501727] kunit_try_run_case+0x170/0x3f0 [ 18.502147] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.502207] kthread+0x318/0x620 [ 18.502258] ret_from_fork+0x10/0x20 [ 18.502314] [ 18.507393] Allocated by task 153: [ 18.507996] kasan_save_stack+0x3c/0x68 [ 18.508656] kasan_save_track+0x20/0x40 [ 18.509179] kasan_save_alloc_info+0x40/0x58 [ 18.509773] __kasan_kmalloc+0xd4/0xd8 [ 18.510295] __kmalloc_cache_noprof+0x15c/0x3c0 [ 18.511103] krealloc_uaf+0xc8/0x520 [ 18.511621] kunit_try_run_case+0x170/0x3f0 [ 18.512178] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.512713] kthread+0x318/0x620 [ 18.513141] ret_from_fork+0x10/0x20 [ 18.513628] [ 18.513921] Freed by task 153: [ 18.514342] kasan_save_stack+0x3c/0x68 [ 18.515049] kasan_save_track+0x20/0x40 [ 18.515404] kasan_save_free_info+0x4c/0x78 [ 18.515899] __kasan_slab_free+0x6c/0x98 [ 18.516394] kfree+0x214/0x3c8 [ 18.516791] krealloc_uaf+0x12c/0x520 [ 18.517024] kunit_try_run_case+0x170/0x3f0 [ 18.517580] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 18.518151] kthread+0x318/0x620 [ 18.519773] ret_from_fork+0x10/0x20 [ 18.520050] [ 18.520385] The buggy address belongs to the object at fff00000c49e1200 [ 18.520385] which belongs to the cache kmalloc-256 of size 256 [ 18.521554] The buggy address is located 0 bytes inside of [ 18.521554] freed 256-byte region [fff00000c49e1200, fff00000c49e1300) [ 18.522803] [ 18.523130] The buggy address belongs to the physical page: [ 18.523868] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1049e0 [ 18.524595] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 18.525288] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 18.525964] page_type: f5(slab) [ 18.526405] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 18.527042] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 18.527861] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 18.528491] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 18.529145] head: 0bfffe0000000001 ffffc1ffc3127801 ffffffffffffffff 0000000000000000 [ 18.529864] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 18.530825] page dumped because: kasan: bad access detected [ 18.531272] [ 18.531542] Memory state around the buggy address: [ 18.532038] fff00000c49e1100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.532502] fff00000c49e1180: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.533242] >fff00000c49e1200: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.533786] ^ [ 18.534237] fff00000c49e1280: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 18.535035] fff00000c49e1300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 18.535551] ==================================================================
[ 12.310088] ================================================================== [ 12.310896] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b9/0x5e0 [ 12.311618] Read of size 1 at addr ffff8881003b0c00 by task kunit_try_catch/172 [ 12.312447] [ 12.312716] CPU: 0 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 12.312765] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.312778] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.312801] Call Trace: [ 12.312815] <TASK> [ 12.312835] dump_stack_lvl+0x73/0xb0 [ 12.312877] print_report+0xd1/0x650 [ 12.312899] ? __virt_addr_valid+0x1db/0x2d0 [ 12.312923] ? krealloc_uaf+0x1b9/0x5e0 [ 12.312943] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.312967] ? krealloc_uaf+0x1b9/0x5e0 [ 12.312987] kasan_report+0x140/0x180 [ 12.313069] ? krealloc_uaf+0x1b9/0x5e0 [ 12.313092] ? krealloc_uaf+0x1b9/0x5e0 [ 12.313112] __kasan_check_byte+0x3d/0x50 [ 12.313132] krealloc_noprof+0x3f/0x340 [ 12.313158] krealloc_uaf+0x1b9/0x5e0 [ 12.313178] ? __pfx_krealloc_uaf+0x10/0x10 [ 12.313197] ? finish_task_switch.isra.0+0x153/0x700 [ 12.313222] ? __switch_to+0x5d9/0xf60 [ 12.313249] ? __schedule+0xce8/0x2840 [ 12.313276] ? __pfx_read_tsc+0x10/0x10 [ 12.313298] ? ktime_get_ts64+0x86/0x230 [ 12.313324] kunit_try_run_case+0x1a6/0x480 [ 12.313348] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.313368] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 12.313388] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.313412] ? __kthread_parkme+0x82/0x160 [ 12.313435] ? preempt_count_sub+0x50/0x80 [ 12.313458] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.313479] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.313504] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.313529] kthread+0x324/0x6e0 [ 12.313550] ? trace_preempt_on+0x20/0xc0 [ 12.313575] ? __pfx_kthread+0x10/0x10 [ 12.313596] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.313619] ? calculate_sigpending+0x7b/0xa0 [ 12.313640] ? __pfx_kthread+0x10/0x10 [ 12.313662] ret_from_fork+0x41/0x80 [ 12.313681] ? __pfx_kthread+0x10/0x10 [ 12.313702] ret_from_fork_asm+0x1a/0x30 [ 12.313754] </TASK> [ 12.313765] [ 12.327956] Allocated by task 172: [ 12.328374] kasan_save_stack+0x45/0x70 [ 12.328852] kasan_save_track+0x18/0x40 [ 12.329259] kasan_save_alloc_info+0x3b/0x50 [ 12.329493] __kasan_kmalloc+0xb7/0xc0 [ 12.329626] __kmalloc_cache_noprof+0x18a/0x420 [ 12.329788] krealloc_uaf+0xbc/0x5e0 [ 12.329930] kunit_try_run_case+0x1a6/0x480 [ 12.330227] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.330410] kthread+0x324/0x6e0 [ 12.330535] ret_from_fork+0x41/0x80 [ 12.330664] ret_from_fork_asm+0x1a/0x30 [ 12.330804] [ 12.330916] Freed by task 172: [ 12.331061] kasan_save_stack+0x45/0x70 [ 12.331479] kasan_save_track+0x18/0x40 [ 12.331856] kasan_save_free_info+0x3f/0x60 [ 12.332265] __kasan_slab_free+0x56/0x70 [ 12.332615] kfree+0x224/0x3f0 [ 12.332950] krealloc_uaf+0x13e/0x5e0 [ 12.333311] kunit_try_run_case+0x1a6/0x480 [ 12.333767] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.334390] kthread+0x324/0x6e0 [ 12.334740] ret_from_fork+0x41/0x80 [ 12.335128] ret_from_fork_asm+0x1a/0x30 [ 12.335563] [ 12.335774] The buggy address belongs to the object at ffff8881003b0c00 [ 12.335774] which belongs to the cache kmalloc-256 of size 256 [ 12.337134] The buggy address is located 0 bytes inside of [ 12.337134] freed 256-byte region [ffff8881003b0c00, ffff8881003b0d00) [ 12.338307] [ 12.338580] The buggy address belongs to the physical page: [ 12.339126] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1003b0 [ 12.339547] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 12.339779] flags: 0x200000000000040(head|node=0|zone=2) [ 12.339974] page_type: f5(slab) [ 12.340349] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.341060] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.341818] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.342876] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.343609] head: 0200000000000001 ffffea000400ec01 ffffffffffffffff 0000000000000000 [ 12.344391] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 12.344625] page dumped because: kasan: bad access detected [ 12.344795] [ 12.344880] Memory state around the buggy address: [ 12.345123] ffff8881003b0b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.345852] ffff8881003b0b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.346603] >ffff8881003b0c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.347347] ^ [ 12.347659] ffff8881003b0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.348445] ffff8881003b0d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.349534] ================================================================== [ 12.350358] ================================================================== [ 12.351350] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53e/0x5e0 [ 12.352043] Read of size 1 at addr ffff8881003b0c00 by task kunit_try_catch/172 [ 12.352803] [ 12.352928] CPU: 0 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G B N 6.14.7-rc1 #1 [ 12.352973] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.352985] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.353007] Call Trace: [ 12.353034] <TASK> [ 12.353054] dump_stack_lvl+0x73/0xb0 [ 12.353084] print_report+0xd1/0x650 [ 12.353106] ? __virt_addr_valid+0x1db/0x2d0 [ 12.353128] ? krealloc_uaf+0x53e/0x5e0 [ 12.353148] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.353172] ? krealloc_uaf+0x53e/0x5e0 [ 12.353192] kasan_report+0x140/0x180 [ 12.353214] ? krealloc_uaf+0x53e/0x5e0 [ 12.353238] __asan_report_load1_noabort+0x18/0x20 [ 12.353262] krealloc_uaf+0x53e/0x5e0 [ 12.353282] ? __pfx_krealloc_uaf+0x10/0x10 [ 12.353301] ? finish_task_switch.isra.0+0x153/0x700 [ 12.353325] ? __switch_to+0x5d9/0xf60 [ 12.353352] ? __schedule+0xce8/0x2840 [ 12.353376] ? __pfx_read_tsc+0x10/0x10 [ 12.353398] ? ktime_get_ts64+0x86/0x230 [ 12.353422] kunit_try_run_case+0x1a6/0x480 [ 12.353445] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.353465] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 12.353485] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.353509] ? __kthread_parkme+0x82/0x160 [ 12.353531] ? preempt_count_sub+0x50/0x80 [ 12.353553] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.353575] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.353599] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.353624] kthread+0x324/0x6e0 [ 12.353645] ? trace_preempt_on+0x20/0xc0 [ 12.353667] ? __pfx_kthread+0x10/0x10 [ 12.353689] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.353711] ? calculate_sigpending+0x7b/0xa0 [ 12.353732] ? __pfx_kthread+0x10/0x10 [ 12.353759] ret_from_fork+0x41/0x80 [ 12.353778] ? __pfx_kthread+0x10/0x10 [ 12.353800] ret_from_fork_asm+0x1a/0x30 [ 12.353831] </TASK> [ 12.353852] [ 12.361652] Allocated by task 172: [ 12.361823] kasan_save_stack+0x45/0x70 [ 12.362000] kasan_save_track+0x18/0x40 [ 12.362135] kasan_save_alloc_info+0x3b/0x50 [ 12.362340] __kasan_kmalloc+0xb7/0xc0 [ 12.362528] __kmalloc_cache_noprof+0x18a/0x420 [ 12.362753] krealloc_uaf+0xbc/0x5e0 [ 12.362948] kunit_try_run_case+0x1a6/0x480 [ 12.363364] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.363555] kthread+0x324/0x6e0 [ 12.363717] ret_from_fork+0x41/0x80 [ 12.363913] ret_from_fork_asm+0x1a/0x30 [ 12.364300] [ 12.364398] Freed by task 172: [ 12.364546] kasan_save_stack+0x45/0x70 [ 12.364684] kasan_save_track+0x18/0x40 [ 12.364818] kasan_save_free_info+0x3f/0x60 [ 12.364974] __kasan_slab_free+0x56/0x70 [ 12.365110] kfree+0x224/0x3f0 [ 12.365275] krealloc_uaf+0x13e/0x5e0 [ 12.365482] kunit_try_run_case+0x1a6/0x480 [ 12.365684] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.365950] kthread+0x324/0x6e0 [ 12.366243] ret_from_fork+0x41/0x80 [ 12.366430] ret_from_fork_asm+0x1a/0x30 [ 12.366619] [ 12.366690] The buggy address belongs to the object at ffff8881003b0c00 [ 12.366690] which belongs to the cache kmalloc-256 of size 256 [ 12.367286] The buggy address is located 0 bytes inside of [ 12.367286] freed 256-byte region [ffff8881003b0c00, ffff8881003b0d00) [ 12.367807] [ 12.367901] The buggy address belongs to the physical page: [ 12.368264] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1003b0 [ 12.368560] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 12.368877] flags: 0x200000000000040(head|node=0|zone=2) [ 12.369164] page_type: f5(slab) [ 12.369329] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.369559] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.369796] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 12.371778] head: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 12.372964] head: 0200000000000001 ffffea000400ec01 ffffffffffffffff 0000000000000000 [ 12.373615] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 12.374696] page dumped because: kasan: bad access detected [ 12.375458] [ 12.375610] Memory state around the buggy address: [ 12.375777] ffff8881003b0b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.376007] ffff8881003b0b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.376232] >ffff8881003b0c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.376443] ^ [ 12.376563] ffff8881003b0c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 12.376777] ffff8881003b0d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.378226] ==================================================================