Date
Nov. 22, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 37.363684] ================================================================== [ 37.366742] BUG: KASAN: slab-use-after-free in kasan_strings+0x858/0x8f8 [ 37.368287] Read of size 1 at addr fff00000c6a4c550 by task kunit_try_catch/248 [ 37.369632] [ 37.370231] CPU: 1 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 37.373003] Tainted: [B]=BAD_PAGE, [N]=TEST [ 37.373481] Hardware name: linux,dummy-virt (DT) [ 37.373932] Call trace: [ 37.374218] show_stack+0x20/0x38 (C) [ 37.376198] dump_stack_lvl+0x8c/0xd0 [ 37.377781] print_report+0x118/0x5e0 [ 37.378298] kasan_report+0xc8/0x118 [ 37.378790] __asan_report_load1_noabort+0x20/0x30 [ 37.379179] kasan_strings+0x858/0x8f8 [ 37.379545] kunit_try_run_case+0x14c/0x3d0 [ 37.381692] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 37.382884] kthread+0x24c/0x2d0 [ 37.383655] ret_from_fork+0x10/0x20 [ 37.384200] [ 37.384634] Allocated by task 248: [ 37.385140] kasan_save_stack+0x3c/0x68 [ 37.385750] kasan_save_track+0x20/0x40 [ 37.386342] kasan_save_alloc_info+0x40/0x58 [ 37.387748] __kasan_kmalloc+0xd4/0xd8 [ 37.389059] __kmalloc_cache_noprof+0x15c/0x3c8 [ 37.389820] kasan_strings+0xb4/0x8f8 [ 37.390304] kunit_try_run_case+0x14c/0x3d0 [ 37.390968] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 37.391730] kthread+0x24c/0x2d0 [ 37.392262] ret_from_fork+0x10/0x20 [ 37.392837] [ 37.393130] Freed by task 248: [ 37.393710] kasan_save_stack+0x3c/0x68 [ 37.394784] kasan_save_track+0x20/0x40 [ 37.395309] kasan_save_free_info+0x4c/0x78 [ 37.396063] __kasan_slab_free+0x6c/0x98 [ 37.397693] kfree+0x114/0x3d0 [ 37.398224] kasan_strings+0x128/0x8f8 [ 37.398781] kunit_try_run_case+0x14c/0x3d0 [ 37.399396] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 37.400790] kthread+0x24c/0x2d0 [ 37.401280] ret_from_fork+0x10/0x20 [ 37.401965] [ 37.402292] The buggy address belongs to the object at fff00000c6a4c540 [ 37.402292] which belongs to the cache kmalloc-32 of size 32 [ 37.405188] The buggy address is located 16 bytes inside of [ 37.405188] freed 32-byte region [fff00000c6a4c540, fff00000c6a4c560) [ 37.406968] [ 37.407296] The buggy address belongs to the physical page: [ 37.408281] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106a4c [ 37.409552] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 37.410202] page_type: f5(slab) [ 37.410908] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 37.412099] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 37.412983] page dumped because: kasan: bad access detected [ 37.414420] [ 37.414848] Memory state around the buggy address: [ 37.415788] fff00000c6a4c400: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 37.417074] fff00000c6a4c480: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 37.418487] >fff00000c6a4c500: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 37.419678] ^ [ 37.421199] fff00000c6a4c580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.422121] fff00000c6a4c600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 37.423217] ==================================================================
[ 28.251204] ================================================================== [ 28.251951] BUG: KASAN: slab-use-after-free in kasan_strings+0xa0f/0xb60 [ 28.252714] Read of size 1 at addr ffff888102a18a90 by task kunit_try_catch/267 [ 28.253420] [ 28.253612] CPU: 1 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G B N 6.12.0-next-20241122 #1 [ 28.254562] Tainted: [B]=BAD_PAGE, [N]=TEST [ 28.254809] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 28.259102] Call Trace: [ 28.259323] <TASK> [ 28.259517] dump_stack_lvl+0x73/0xb0 [ 28.260937] print_report+0xd1/0x640 [ 28.261770] ? __virt_addr_valid+0x1db/0x2d0 [ 28.262582] ? kasan_complete_mode_report_info+0x64/0x200 [ 28.262941] kasan_report+0x102/0x140 [ 28.263967] ? kasan_strings+0xa0f/0xb60 [ 28.264387] ? kasan_strings+0xa0f/0xb60 [ 28.264846] __asan_report_load1_noabort+0x18/0x20 [ 28.265264] kasan_strings+0xa0f/0xb60 [ 28.266699] ? __pfx_kasan_strings+0x10/0x10 [ 28.266986] ? __schedule+0xc3e/0x2790 [ 28.267840] ? __pfx_read_tsc+0x10/0x10 [ 28.268375] ? ktime_get_ts64+0x84/0x230 [ 28.268837] kunit_try_run_case+0x1b3/0x490 [ 28.269584] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.270362] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 28.271199] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 28.271684] ? __kthread_parkme+0x82/0x160 [ 28.272627] ? preempt_count_sub+0x50/0x80 [ 28.273103] ? __pfx_kunit_try_run_case+0x10/0x10 [ 28.273728] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 28.275081] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.275663] kthread+0x257/0x310 [ 28.276226] ? __pfx_kthread+0x10/0x10 [ 28.276513] ret_from_fork+0x41/0x80 [ 28.277443] ? __pfx_kthread+0x10/0x10 [ 28.277769] ret_from_fork_asm+0x1a/0x30 [ 28.278257] </TASK> [ 28.278482] [ 28.278851] Allocated by task 267: [ 28.279289] kasan_save_stack+0x3d/0x60 [ 28.279693] kasan_save_track+0x18/0x40 [ 28.280036] kasan_save_alloc_info+0x3b/0x50 [ 28.280319] __kasan_kmalloc+0xb7/0xc0 [ 28.280919] __kmalloc_cache_noprof+0x184/0x410 [ 28.281516] kasan_strings+0xb3/0xb60 [ 28.281961] kunit_try_run_case+0x1b3/0x490 [ 28.282862] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.283502] kthread+0x257/0x310 [ 28.283800] ret_from_fork+0x41/0x80 [ 28.284286] ret_from_fork_asm+0x1a/0x30 [ 28.284696] [ 28.284877] Freed by task 267: [ 28.285343] kasan_save_stack+0x3d/0x60 [ 28.285880] kasan_save_track+0x18/0x40 [ 28.286297] kasan_save_free_info+0x3f/0x60 [ 28.286755] __kasan_slab_free+0x56/0x70 [ 28.287319] kfree+0x123/0x3f0 [ 28.287873] kasan_strings+0x13a/0xb60 [ 28.288139] kunit_try_run_case+0x1b3/0x490 [ 28.288545] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 28.289029] kthread+0x257/0x310 [ 28.289495] ret_from_fork+0x41/0x80 [ 28.290398] ret_from_fork_asm+0x1a/0x30 [ 28.290904] [ 28.291135] The buggy address belongs to the object at ffff888102a18a80 [ 28.291135] which belongs to the cache kmalloc-32 of size 32 [ 28.292357] The buggy address is located 16 bytes inside of [ 28.292357] freed 32-byte region [ffff888102a18a80, ffff888102a18aa0) [ 28.293333] [ 28.293653] The buggy address belongs to the physical page: [ 28.293981] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102a18 [ 28.294387] flags: 0x200000000000000(node=0|zone=2) [ 28.294847] page_type: f5(slab) [ 28.295339] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 28.296950] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000 [ 28.297803] page dumped because: kasan: bad access detected [ 28.298131] [ 28.298282] Memory state around the buggy address: [ 28.299051] ffff888102a18980: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 28.299906] ffff888102a18a00: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc [ 28.300561] >ffff888102a18a80: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc [ 28.301377] ^ [ 28.301668] ffff888102a18b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.302375] ffff888102a18b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 28.303031] ==================================================================