Date
July 11, 2025, 11:09 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.792372] ================================================================== [ 16.792431] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x300/0x338 [ 16.792486] Read of size 1 at addr fff00000c3f2f628 by task kunit_try_catch/185 [ 16.792723] [ 16.792881] CPU: 0 UID: 0 PID: 185 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT [ 16.792974] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.793000] Hardware name: linux,dummy-virt (DT) [ 16.793204] Call trace: [ 16.793232] show_stack+0x20/0x38 (C) [ 16.793460] dump_stack_lvl+0x8c/0xd0 [ 16.793510] print_report+0x118/0x608 [ 16.793563] kasan_report+0xdc/0x128 [ 16.793778] __asan_report_load1_noabort+0x20/0x30 [ 16.793882] kmalloc_uaf+0x300/0x338 [ 16.793923] kunit_try_run_case+0x170/0x3f0 [ 16.793970] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.794021] kthread+0x328/0x630 [ 16.794061] ret_from_fork+0x10/0x20 [ 16.794123] [ 16.794141] Allocated by task 185: [ 16.794543] kasan_save_stack+0x3c/0x68 [ 16.794605] kasan_save_track+0x20/0x40 [ 16.794943] kasan_save_alloc_info+0x40/0x58 [ 16.795119] __kasan_kmalloc+0xd4/0xd8 [ 16.795155] __kmalloc_cache_noprof+0x16c/0x3c0 [ 16.795195] kmalloc_uaf+0xb8/0x338 [ 16.795247] kunit_try_run_case+0x170/0x3f0 [ 16.795283] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.795329] kthread+0x328/0x630 [ 16.795525] ret_from_fork+0x10/0x20 [ 16.795716] [ 16.795816] Freed by task 185: [ 16.795993] kasan_save_stack+0x3c/0x68 [ 16.796046] kasan_save_track+0x20/0x40 [ 16.796355] kasan_save_free_info+0x4c/0x78 [ 16.796734] __kasan_slab_free+0x6c/0x98 [ 16.797208] kfree+0x214/0x3c8 [ 16.797664] kmalloc_uaf+0x11c/0x338 [ 16.797798] kunit_try_run_case+0x170/0x3f0 [ 16.798437] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.798579] kthread+0x328/0x630 [ 16.798610] ret_from_fork+0x10/0x20 [ 16.798647] [ 16.799295] The buggy address belongs to the object at fff00000c3f2f620 [ 16.799295] which belongs to the cache kmalloc-16 of size 16 [ 16.799543] The buggy address is located 8 bytes inside of [ 16.799543] freed 16-byte region [fff00000c3f2f620, fff00000c3f2f630) [ 16.799964] [ 16.799992] The buggy address belongs to the physical page: [ 16.800276] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103f2f [ 16.801159] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.801296] page_type: f5(slab) [ 16.801782] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.801995] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.802913] page dumped because: kasan: bad access detected [ 16.802972] [ 16.802990] Memory state around the buggy address: [ 16.803373] fff00000c3f2f500: fa fb fc fc fa fb fc fc fa fb fc fc 00 04 fc fc [ 16.803533] fff00000c3f2f580: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 16.803797] >fff00000c3f2f600: fa fb fc fc fa fb fc fc fc fc fc fc fc fc fc fc [ 16.804079] ^ [ 16.804584] fff00000c3f2f680: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.804996] fff00000c3f2f700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.805134] ==================================================================
[ 12.593364] ================================================================== [ 12.593844] BUG: KASAN: slab-use-after-free in kmalloc_uaf+0x320/0x380 [ 12.594131] Read of size 1 at addr ffff888100a6e188 by task kunit_try_catch/201 [ 12.594711] [ 12.594827] CPU: 0 UID: 0 PID: 201 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc5 #1 PREEMPT(voluntary) [ 12.594869] Tainted: [B]=BAD_PAGE, [N]=TEST [ 12.594880] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 12.594899] Call Trace: [ 12.594910] <TASK> [ 12.594936] dump_stack_lvl+0x73/0xb0 [ 12.594968] print_report+0xd1/0x650 [ 12.594990] ? __virt_addr_valid+0x1db/0x2d0 [ 12.595012] ? kmalloc_uaf+0x320/0x380 [ 12.595031] ? kasan_complete_mode_report_info+0x64/0x200 [ 12.595054] ? kmalloc_uaf+0x320/0x380 [ 12.595074] kasan_report+0x141/0x180 [ 12.595171] ? kmalloc_uaf+0x320/0x380 [ 12.595196] __asan_report_load1_noabort+0x18/0x20 [ 12.595221] kmalloc_uaf+0x320/0x380 [ 12.595240] ? __pfx_kmalloc_uaf+0x10/0x10 [ 12.595260] ? __schedule+0x10cc/0x2b60 [ 12.595282] ? __pfx_read_tsc+0x10/0x10 [ 12.595302] ? ktime_get_ts64+0x86/0x230 [ 12.595326] kunit_try_run_case+0x1a5/0x480 [ 12.595350] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.595372] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 12.595395] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 12.595419] ? __kthread_parkme+0x82/0x180 [ 12.595438] ? preempt_count_sub+0x50/0x80 [ 12.595462] ? __pfx_kunit_try_run_case+0x10/0x10 [ 12.595486] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.595512] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 12.595536] kthread+0x337/0x6f0 [ 12.595554] ? trace_preempt_on+0x20/0xc0 [ 12.595577] ? __pfx_kthread+0x10/0x10 [ 12.595597] ? _raw_spin_unlock_irq+0x47/0x80 [ 12.595618] ? calculate_sigpending+0x7b/0xa0 [ 12.595641] ? __pfx_kthread+0x10/0x10 [ 12.595662] ret_from_fork+0x116/0x1d0 [ 12.595680] ? __pfx_kthread+0x10/0x10 [ 12.595700] ret_from_fork_asm+0x1a/0x30 [ 12.595731] </TASK> [ 12.595740] [ 12.603122] Allocated by task 201: [ 12.603318] kasan_save_stack+0x45/0x70 [ 12.603512] kasan_save_track+0x18/0x40 [ 12.603647] kasan_save_alloc_info+0x3b/0x50 [ 12.603809] __kasan_kmalloc+0xb7/0xc0 [ 12.604092] __kmalloc_cache_noprof+0x189/0x420 [ 12.604323] kmalloc_uaf+0xaa/0x380 [ 12.604504] kunit_try_run_case+0x1a5/0x480 [ 12.604723] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.604944] kthread+0x337/0x6f0 [ 12.605320] ret_from_fork+0x116/0x1d0 [ 12.605466] ret_from_fork_asm+0x1a/0x30 [ 12.605661] [ 12.605752] Freed by task 201: [ 12.605905] kasan_save_stack+0x45/0x70 [ 12.606054] kasan_save_track+0x18/0x40 [ 12.606188] kasan_save_free_info+0x3f/0x60 [ 12.606367] __kasan_slab_free+0x56/0x70 [ 12.606578] kfree+0x222/0x3f0 [ 12.606981] kmalloc_uaf+0x12c/0x380 [ 12.607238] kunit_try_run_case+0x1a5/0x480 [ 12.607405] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 12.607580] kthread+0x337/0x6f0 [ 12.607699] ret_from_fork+0x116/0x1d0 [ 12.607830] ret_from_fork_asm+0x1a/0x30 [ 12.608032] [ 12.608128] The buggy address belongs to the object at ffff888100a6e180 [ 12.608128] which belongs to the cache kmalloc-16 of size 16 [ 12.608658] The buggy address is located 8 bytes inside of [ 12.608658] freed 16-byte region [ffff888100a6e180, ffff888100a6e190) [ 12.609319] [ 12.609396] The buggy address belongs to the physical page: [ 12.609566] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x100a6e [ 12.609933] flags: 0x200000000000000(node=0|zone=2) [ 12.610324] page_type: f5(slab) [ 12.610498] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 12.610753] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 12.610990] page dumped because: kasan: bad access detected [ 12.611160] [ 12.611331] Memory state around the buggy address: [ 12.611559] ffff888100a6e080: fa fb fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.611876] ffff888100a6e100: 00 05 fc fc fa fb fc fc fa fb fc fc fa fb fc fc [ 12.612175] >ffff888100a6e180: fa fb fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.612550] ^ [ 12.612725] ffff888100a6e200: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.612963] ffff888100a6e280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 12.613272] ==================================================================