Date
Nov. 22, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 33.400041] ================================================================== [ 33.401347] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x4c8/0x520 [ 33.402368] Read of size 1 at addr fff00000c17b8800 by task kunit_try_catch/153 [ 33.404364] [ 33.405102] CPU: 1 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 33.406421] Tainted: [B]=BAD_PAGE, [N]=TEST [ 33.407166] Hardware name: linux,dummy-virt (DT) [ 33.407813] Call trace: [ 33.408187] show_stack+0x20/0x38 (C) [ 33.408878] dump_stack_lvl+0x8c/0xd0 [ 33.409472] print_report+0x118/0x5e0 [ 33.410041] kasan_report+0xc8/0x118 [ 33.410632] __asan_report_load1_noabort+0x20/0x30 [ 33.411258] krealloc_uaf+0x4c8/0x520 [ 33.411800] kunit_try_run_case+0x14c/0x3d0 [ 33.412569] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.413456] kthread+0x24c/0x2d0 [ 33.413984] ret_from_fork+0x10/0x20 [ 33.414614] [ 33.414974] Allocated by task 153: [ 33.415518] kasan_save_stack+0x3c/0x68 [ 33.416181] kasan_save_track+0x20/0x40 [ 33.416766] kasan_save_alloc_info+0x40/0x58 [ 33.417469] __kasan_kmalloc+0xd4/0xd8 [ 33.418130] __kmalloc_cache_noprof+0x15c/0x3c8 [ 33.418673] krealloc_uaf+0xc8/0x520 [ 33.419335] kunit_try_run_case+0x14c/0x3d0 [ 33.420057] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.420680] kthread+0x24c/0x2d0 [ 33.421215] ret_from_fork+0x10/0x20 [ 33.421856] [ 33.422249] Freed by task 153: [ 33.422799] kasan_save_stack+0x3c/0x68 [ 33.423324] kasan_save_track+0x20/0x40 [ 33.424070] kasan_save_free_info+0x4c/0x78 [ 33.424693] __kasan_slab_free+0x6c/0x98 [ 33.425240] kfree+0x114/0x3d0 [ 33.425742] krealloc_uaf+0x12c/0x520 [ 33.426390] kunit_try_run_case+0x14c/0x3d0 [ 33.427021] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.427770] kthread+0x24c/0x2d0 [ 33.428228] ret_from_fork+0x10/0x20 [ 33.428983] [ 33.429283] The buggy address belongs to the object at fff00000c17b8800 [ 33.429283] which belongs to the cache kmalloc-256 of size 256 [ 33.430784] The buggy address is located 0 bytes inside of [ 33.430784] freed 256-byte region [fff00000c17b8800, fff00000c17b8900) [ 33.432246] [ 33.432571] The buggy address belongs to the physical page: [ 33.433327] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017b8 [ 33.434305] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 33.435268] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 33.436174] page_type: f5(slab) [ 33.436733] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 33.437654] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 33.438693] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 33.439654] head: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 33.440609] head: 0bfffe0000000001 ffffc1ffc305ee01 ffffffffffffffff 0000000000000000 [ 33.441568] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 33.442501] page dumped because: kasan: bad access detected [ 33.443098] [ 33.443473] Memory state around the buggy address: [ 33.444189] fff00000c17b8700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.445062] fff00000c17b8780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.445925] >fff00000c17b8800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.446831] ^ [ 33.447402] fff00000c17b8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.448392] fff00000c17b8900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.449240] ================================================================== [ 33.333833] ================================================================== [ 33.335531] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x180/0x520 [ 33.337237] Read of size 1 at addr fff00000c17b8800 by task kunit_try_catch/153 [ 33.338094] [ 33.338538] CPU: 1 UID: 0 PID: 153 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 33.340097] Tainted: [B]=BAD_PAGE, [N]=TEST [ 33.340716] Hardware name: linux,dummy-virt (DT) [ 33.341967] Call trace: [ 33.342503] show_stack+0x20/0x38 (C) [ 33.343133] dump_stack_lvl+0x8c/0xd0 [ 33.343881] print_report+0x118/0x5e0 [ 33.344802] kasan_report+0xc8/0x118 [ 33.345539] __kasan_check_byte+0x54/0x70 [ 33.346131] krealloc_noprof+0x44/0x360 [ 33.346742] krealloc_uaf+0x180/0x520 [ 33.347307] kunit_try_run_case+0x14c/0x3d0 [ 33.347937] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.350124] kthread+0x24c/0x2d0 [ 33.350631] ret_from_fork+0x10/0x20 [ 33.351045] [ 33.351503] Allocated by task 153: [ 33.351867] kasan_save_stack+0x3c/0x68 [ 33.354143] kasan_save_track+0x20/0x40 [ 33.354760] kasan_save_alloc_info+0x40/0x58 [ 33.355711] __kasan_kmalloc+0xd4/0xd8 [ 33.357876] __kmalloc_cache_noprof+0x15c/0x3c8 [ 33.360168] krealloc_uaf+0xc8/0x520 [ 33.361377] kunit_try_run_case+0x14c/0x3d0 [ 33.363224] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.364742] kthread+0x24c/0x2d0 [ 33.366623] ret_from_fork+0x10/0x20 [ 33.367115] [ 33.367376] Freed by task 153: [ 33.367787] kasan_save_stack+0x3c/0x68 [ 33.368345] kasan_save_track+0x20/0x40 [ 33.369937] kasan_save_free_info+0x4c/0x78 [ 33.370733] __kasan_slab_free+0x6c/0x98 [ 33.371510] kfree+0x114/0x3d0 [ 33.372059] krealloc_uaf+0x12c/0x520 [ 33.372902] kunit_try_run_case+0x14c/0x3d0 [ 33.373708] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 33.374848] kthread+0x24c/0x2d0 [ 33.375509] ret_from_fork+0x10/0x20 [ 33.376339] [ 33.376814] The buggy address belongs to the object at fff00000c17b8800 [ 33.376814] which belongs to the cache kmalloc-256 of size 256 [ 33.378635] The buggy address is located 0 bytes inside of [ 33.378635] freed 256-byte region [fff00000c17b8800, fff00000c17b8900) [ 33.379900] [ 33.380456] The buggy address belongs to the physical page: [ 33.381211] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1017b8 [ 33.382523] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 33.383377] flags: 0xbfffe0000000040(head|node=0|zone=2|lastcpupid=0x1ffff) [ 33.384232] page_type: f5(slab) [ 33.384748] raw: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 33.385979] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 33.387094] head: 0bfffe0000000040 fff00000c0001b40 dead000000000122 0000000000000000 [ 33.388074] head: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 33.389091] head: 0bfffe0000000001 ffffc1ffc305ee01 ffffffffffffffff 0000000000000000 [ 33.390062] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 33.391042] page dumped because: kasan: bad access detected [ 33.391664] [ 33.392013] Memory state around the buggy address: [ 33.392691] fff00000c17b8700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.393573] fff00000c17b8780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.394546] >fff00000c17b8800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.395377] ^ [ 33.395890] fff00000c17b8880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 33.396874] fff00000c17b8900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 33.397794] ==================================================================
[ 24.851402] ================================================================== [ 24.852783] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x1b9/0x5e0 [ 24.853649] Read of size 1 at addr ffff888100a25800 by task kunit_try_catch/172 [ 24.854227] [ 24.854430] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 24.856102] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.856871] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.857856] Call Trace: [ 24.858423] <TASK> [ 24.858607] dump_stack_lvl+0x73/0xb0 [ 24.859570] print_report+0xd1/0x640 [ 24.860035] ? __virt_addr_valid+0x1db/0x2d0 [ 24.861366] ? kasan_complete_mode_report_info+0x64/0x200 [ 24.862279] kasan_report+0x102/0x140 [ 24.862728] ? krealloc_uaf+0x1b9/0x5e0 [ 24.863170] ? krealloc_uaf+0x1b9/0x5e0 [ 24.863711] ? krealloc_uaf+0x1b9/0x5e0 [ 24.864793] __kasan_check_byte+0x3d/0x50 [ 24.865295] krealloc_noprof+0x3f/0x340 [ 24.865651] krealloc_uaf+0x1b9/0x5e0 [ 24.866549] ? __pfx_krealloc_uaf+0x10/0x10 [ 24.866996] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 24.868151] ? __pfx_krealloc_uaf+0x10/0x10 [ 24.868558] kunit_try_run_case+0x1b3/0x490 [ 24.869312] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.869577] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 24.870270] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.871332] ? __kthread_parkme+0x82/0x160 [ 24.871990] ? preempt_count_sub+0x50/0x80 [ 24.872696] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.873586] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.874642] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.875244] kthread+0x257/0x310 [ 24.875870] ? __pfx_kthread+0x10/0x10 [ 24.876265] ret_from_fork+0x41/0x80 [ 24.877468] ? __pfx_kthread+0x10/0x10 [ 24.877811] ret_from_fork_asm+0x1a/0x30 [ 24.878854] </TASK> [ 24.879154] [ 24.879328] Allocated by task 172: [ 24.879561] kasan_save_stack+0x3d/0x60 [ 24.880586] kasan_save_track+0x18/0x40 [ 24.881286] kasan_save_alloc_info+0x3b/0x50 [ 24.881583] __kasan_kmalloc+0xb7/0xc0 [ 24.882015] __kmalloc_cache_noprof+0x184/0x410 [ 24.882971] krealloc_uaf+0xbc/0x5e0 [ 24.883616] kunit_try_run_case+0x1b3/0x490 [ 24.884512] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.885373] kthread+0x257/0x310 [ 24.885693] ret_from_fork+0x41/0x80 [ 24.886049] ret_from_fork_asm+0x1a/0x30 [ 24.886559] [ 24.886791] Freed by task 172: [ 24.887198] kasan_save_stack+0x3d/0x60 [ 24.887689] kasan_save_track+0x18/0x40 [ 24.889074] kasan_save_free_info+0x3f/0x60 [ 24.889684] __kasan_slab_free+0x56/0x70 [ 24.889996] kfree+0x123/0x3f0 [ 24.890777] krealloc_uaf+0x13e/0x5e0 [ 24.891893] kunit_try_run_case+0x1b3/0x490 [ 24.892266] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.892583] kthread+0x257/0x310 [ 24.893428] ret_from_fork+0x41/0x80 [ 24.893846] ret_from_fork_asm+0x1a/0x30 [ 24.894469] [ 24.894708] The buggy address belongs to the object at ffff888100a25800 [ 24.894708] which belongs to the cache kmalloc-256 of size 256 [ 24.895612] The buggy address is located 0 bytes inside of [ 24.895612] freed 256-byte region [ffff888100a25800, ffff888100a25900) [ 24.896841] [ 24.897682] The buggy address belongs to the physical page: [ 24.898606] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a24 [ 24.899633] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 24.900192] flags: 0x200000000000040(head|node=0|zone=2) [ 24.900880] page_type: f5(slab) [ 24.901305] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 24.902013] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 24.902492] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 24.903794] head: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 24.904275] head: 0200000000000001 ffffea0004028901 ffffffffffffffff 0000000000000000 [ 24.905037] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 24.906174] page dumped because: kasan: bad access detected [ 24.906511] [ 24.906802] Memory state around the buggy address: [ 24.907655] ffff888100a25700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.908312] ffff888100a25780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.909151] >ffff888100a25800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.909592] ^ [ 24.910131] ffff888100a25880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.910850] ffff888100a25900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.911433] ================================================================== [ 24.913407] ================================================================== [ 24.913882] BUG: KASAN: slab-use-after-free in krealloc_uaf+0x53e/0x5e0 [ 24.915168] Read of size 1 at addr ffff888100a25800 by task kunit_try_catch/172 [ 24.915954] [ 24.916203] CPU: 1 UID: 0 PID: 172 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 24.918639] Tainted: [B]=BAD_PAGE, [N]=TEST [ 24.919228] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 24.919847] Call Trace: [ 24.920202] <TASK> [ 24.920703] dump_stack_lvl+0x73/0xb0 [ 24.921459] print_report+0xd1/0x640 [ 24.922286] ? __virt_addr_valid+0x1db/0x2d0 [ 24.922730] ? kasan_complete_mode_report_info+0x64/0x200 [ 24.923805] kasan_report+0x102/0x140 [ 24.924480] ? krealloc_uaf+0x53e/0x5e0 [ 24.924921] ? krealloc_uaf+0x53e/0x5e0 [ 24.925323] __asan_report_load1_noabort+0x18/0x20 [ 24.926348] krealloc_uaf+0x53e/0x5e0 [ 24.927106] ? __pfx_krealloc_uaf+0x10/0x10 [ 24.927697] ? sysvec_apic_timer_interrupt+0x50/0x90 [ 24.928336] ? __pfx_krealloc_uaf+0x10/0x10 [ 24.929604] kunit_try_run_case+0x1b3/0x490 [ 24.930089] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.930894] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 24.931637] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 24.932439] ? __kthread_parkme+0x82/0x160 [ 24.932904] ? preempt_count_sub+0x50/0x80 [ 24.933365] ? __pfx_kunit_try_run_case+0x10/0x10 [ 24.933771] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 24.934331] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.934758] kthread+0x257/0x310 [ 24.935557] ? __pfx_kthread+0x10/0x10 [ 24.935999] ret_from_fork+0x41/0x80 [ 24.936307] ? __pfx_kthread+0x10/0x10 [ 24.936574] ret_from_fork_asm+0x1a/0x30 [ 24.937143] </TASK> [ 24.937491] [ 24.938167] Allocated by task 172: [ 24.938742] kasan_save_stack+0x3d/0x60 [ 24.939084] kasan_save_track+0x18/0x40 [ 24.939342] kasan_save_alloc_info+0x3b/0x50 [ 24.939895] __kasan_kmalloc+0xb7/0xc0 [ 24.941104] __kmalloc_cache_noprof+0x184/0x410 [ 24.941871] krealloc_uaf+0xbc/0x5e0 [ 24.942445] kunit_try_run_case+0x1b3/0x490 [ 24.942734] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.943261] kthread+0x257/0x310 [ 24.944597] ret_from_fork+0x41/0x80 [ 24.945352] ret_from_fork_asm+0x1a/0x30 [ 24.945850] [ 24.946083] Freed by task 172: [ 24.946625] kasan_save_stack+0x3d/0x60 [ 24.947000] kasan_save_track+0x18/0x40 [ 24.947263] kasan_save_free_info+0x3f/0x60 [ 24.948154] __kasan_slab_free+0x56/0x70 [ 24.948620] kfree+0x123/0x3f0 [ 24.949365] krealloc_uaf+0x13e/0x5e0 [ 24.950634] kunit_try_run_case+0x1b3/0x490 [ 24.951228] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 24.951794] kthread+0x257/0x310 [ 24.952193] ret_from_fork+0x41/0x80 [ 24.952672] ret_from_fork_asm+0x1a/0x30 [ 24.953167] [ 24.953528] The buggy address belongs to the object at ffff888100a25800 [ 24.953528] which belongs to the cache kmalloc-256 of size 256 [ 24.954963] The buggy address is located 0 bytes inside of [ 24.954963] freed 256-byte region [ffff888100a25800, ffff888100a25900) [ 24.956149] [ 24.956312] The buggy address belongs to the physical page: [ 24.956812] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a24 [ 24.957812] head: order:1 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0 [ 24.958225] flags: 0x200000000000040(head|node=0|zone=2) [ 24.958877] page_type: f5(slab) [ 24.959531] raw: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 24.960631] raw: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 24.961517] head: 0200000000000040 ffff888100041b40 dead000000000122 0000000000000000 [ 24.963084] head: 0000000000000000 0000000080100010 00000001f5000000 0000000000000000 [ 24.963865] head: 0200000000000001 ffffea0004028901 ffffffffffffffff 0000000000000000 [ 24.964551] head: 0000000000000002 0000000000000000 00000000ffffffff 0000000000000000 [ 24.965528] page dumped because: kasan: bad access detected [ 24.966256] [ 24.966919] Memory state around the buggy address: [ 24.967419] ffff888100a25700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.968347] ffff888100a25780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.969287] >ffff888100a25800: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.969924] ^ [ 24.970565] ffff888100a25880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 24.971345] ffff888100a25900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 24.972477] ==================================================================