Date
Dec. 4, 2024, 3:07 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 35.200814] ================================================================== [ 35.204481] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 35.206689] Read of size 1 at addr fff00000c6643a90 by task kunit_try_catch/247 [ 35.207473] [ 35.207891] CPU: 0 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 35.209390] Tainted: [B]=BAD_PAGE, [N]=TEST [ 35.210734] Hardware name: linux,dummy-virt (DT) [ 35.212030] Call trace: [ 35.212576] show_stack+0x20/0x38 (C) [ 35.213398] dump_stack_lvl+0x8c/0xd0 [ 35.214004] print_report+0x118/0x5e0 [ 35.215020] kasan_report+0xc8/0x118 [ 35.215758] __asan_report_load1_noabort+0x20/0x30 [ 35.216669] strcmp+0xc0/0xc8 [ 35.217186] kasan_strings+0x228/0x8d8 [ 35.217955] kunit_try_run_case+0x14c/0x3d0 [ 35.219040] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.219796] kthread+0x24c/0x2d0 [ 35.220482] ret_from_fork+0x10/0x20 [ 35.221113] [ 35.221455] Allocated by task 247: [ 35.222144] kasan_save_stack+0x3c/0x68 [ 35.222970] kasan_save_track+0x20/0x40 [ 35.224053] kasan_save_alloc_info+0x40/0x58 [ 35.224580] __kasan_kmalloc+0xd4/0xd8 [ 35.226230] __kmalloc_cache_noprof+0x15c/0x3c0 [ 35.226849] kasan_strings+0xb0/0x8d8 [ 35.227345] kunit_try_run_case+0x14c/0x3d0 [ 35.228069] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.228704] kthread+0x24c/0x2d0 [ 35.229281] ret_from_fork+0x10/0x20 [ 35.230532] [ 35.230978] Freed by task 247: [ 35.231509] kasan_save_stack+0x3c/0x68 [ 35.232117] kasan_save_track+0x20/0x40 [ 35.232731] kasan_save_free_info+0x4c/0x78 [ 35.233362] __kasan_slab_free+0x6c/0x98 [ 35.233896] kfree+0x114/0x3c8 [ 35.234474] kasan_strings+0x124/0x8d8 [ 35.235478] kunit_try_run_case+0x14c/0x3d0 [ 35.236189] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 35.236879] kthread+0x24c/0x2d0 [ 35.237456] ret_from_fork+0x10/0x20 [ 35.237930] [ 35.238666] The buggy address belongs to the object at fff00000c6643a80 [ 35.238666] which belongs to the cache kmalloc-32 of size 32 [ 35.240234] The buggy address is located 16 bytes inside of [ 35.240234] freed 32-byte region [fff00000c6643a80, fff00000c6643aa0) [ 35.241670] [ 35.241982] The buggy address belongs to the physical page: [ 35.243855] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106643 [ 35.244700] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 35.245604] page_type: f5(slab) [ 35.246570] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 35.247502] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 35.248447] page dumped because: kasan: bad access detected [ 35.249164] [ 35.249470] Memory state around the buggy address: [ 35.250617] fff00000c6643980: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.251477] fff00000c6643a00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 35.252427] >fff00000c6643a80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.253279] ^ [ 35.254021] fff00000c6643b00: fa fb fb fb fc fc fc fc 00 00 00 fc fc fc fc fc [ 35.254859] fff00000c6643b80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 35.256084] ==================================================================
[ 26.008702] ================================================================== [ 26.012292] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 26.012932] Read of size 1 at addr ffff88810299ded0 by task kunit_try_catch/267 [ 26.013526] [ 26.014086] CPU: 1 UID: 0 PID: 267 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241204 #1 [ 26.015823] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.016921] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 26.018149] Call Trace: [ 26.018383] <TASK> [ 26.019120] dump_stack_lvl+0x73/0xb0 [ 26.019513] print_report+0xd1/0x640 [ 26.020509] ? __virt_addr_valid+0x1db/0x2d0 [ 26.021050] ? kasan_complete_mode_report_info+0x64/0x200 [ 26.021651] kasan_report+0x102/0x140 [ 26.022358] ? strcmp+0xb0/0xc0 [ 26.022681] ? strcmp+0xb0/0xc0 [ 26.023544] __asan_report_load1_noabort+0x18/0x20 [ 26.024115] strcmp+0xb0/0xc0 [ 26.024861] kasan_strings+0x2d3/0xb60 [ 26.025233] ? __pfx_kasan_strings+0x10/0x10 [ 26.026274] ? __pfx_kasan_strings+0x10/0x10 [ 26.026915] kunit_try_run_case+0x1b3/0x490 [ 26.027717] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.028677] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 26.029217] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 26.030103] ? __kthread_parkme+0x82/0x160 [ 26.030886] ? preempt_count_sub+0x50/0x80 [ 26.031933] ? __pfx_kunit_try_run_case+0x10/0x10 [ 26.032873] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 26.033522] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.034093] kthread+0x257/0x310 [ 26.034897] ? __pfx_kthread+0x10/0x10 [ 26.035659] ret_from_fork+0x41/0x80 [ 26.036394] ? __pfx_kthread+0x10/0x10 [ 26.036638] ret_from_fork_asm+0x1a/0x30 [ 26.037133] </TASK> [ 26.037639] [ 26.038048] Allocated by task 267: [ 26.038887] kasan_save_stack+0x3d/0x60 [ 26.039238] kasan_save_track+0x18/0x40 [ 26.040029] kasan_save_alloc_info+0x3b/0x50 [ 26.040738] __kasan_kmalloc+0xb7/0xc0 [ 26.041453] __kmalloc_cache_noprof+0x184/0x410 [ 26.042042] kasan_strings+0xb9/0xb60 [ 26.042441] kunit_try_run_case+0x1b3/0x490 [ 26.043054] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.043816] kthread+0x257/0x310 [ 26.044154] ret_from_fork+0x41/0x80 [ 26.044954] ret_from_fork_asm+0x1a/0x30 [ 26.045323] [ 26.045480] Freed by task 267: [ 26.046080] kasan_save_stack+0x3d/0x60 [ 26.046820] kasan_save_track+0x18/0x40 [ 26.047265] kasan_save_free_info+0x3f/0x60 [ 26.047559] __kasan_slab_free+0x56/0x70 [ 26.048405] kfree+0x123/0x3f0 [ 26.048764] kasan_strings+0x13c/0xb60 [ 26.049487] kunit_try_run_case+0x1b3/0x490 [ 26.050022] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 26.050871] kthread+0x257/0x310 [ 26.051404] ret_from_fork+0x41/0x80 [ 26.051674] ret_from_fork_asm+0x1a/0x30 [ 26.052263] [ 26.052689] The buggy address belongs to the object at ffff88810299dec0 [ 26.052689] which belongs to the cache kmalloc-32 of size 32 [ 26.054158] The buggy address is located 16 bytes inside of [ 26.054158] freed 32-byte region [ffff88810299dec0, ffff88810299dee0) [ 26.055536] [ 26.055910] The buggy address belongs to the physical page: [ 26.056544] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10299d [ 26.057700] flags: 0x200000000000000(node=0|zone=2) [ 26.058084] page_type: f5(slab) [ 26.058770] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 26.059575] raw: 0000000000000000 0000000000400040 00000000f5000000 0000000000000000 [ 26.060229] page dumped because: kasan: bad access detected [ 26.061002] [ 26.061214] Memory state around the buggy address: [ 26.061590] ffff88810299dd80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.062794] ffff88810299de00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.063559] >ffff88810299de80: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 26.064432] ^ [ 26.065490] ffff88810299df00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.066529] ffff88810299df80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 26.067231] ==================================================================