Date
Dec. 9, 2024, 6:35 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 26.938403] ================================================================== [ 26.940726] BUG: KASAN: slab-use-after-free in strcmp+0xc0/0xc8 [ 26.941254] Read of size 1 at addr fff00000c1204c50 by task kunit_try_catch/247 [ 26.941929] [ 26.942523] CPU: 0 UID: 0 PID: 247 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc2-next-20241209 #1 [ 26.943633] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.944279] Hardware name: linux,dummy-virt (DT) [ 26.945564] Call trace: [ 26.946368] show_stack+0x20/0x38 (C) [ 26.947327] dump_stack_lvl+0x8c/0xd0 [ 26.947858] print_report+0x118/0x5e0 [ 26.948426] kasan_report+0xc8/0x118 [ 26.949113] __asan_report_load1_noabort+0x20/0x30 [ 26.949828] strcmp+0xc0/0xc8 [ 26.950358] kasan_strings+0x228/0x8d8 [ 26.951576] kunit_try_run_case+0x14c/0x3d0 [ 26.952240] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.952962] kthread+0x24c/0x2d0 [ 26.953511] ret_from_fork+0x10/0x20 [ 26.954122] [ 26.954449] Allocated by task 247: [ 26.955050] kasan_save_stack+0x3c/0x68 [ 26.955819] kasan_save_track+0x20/0x40 [ 26.956590] kasan_save_alloc_info+0x40/0x58 [ 26.957215] __kasan_kmalloc+0xd4/0xd8 [ 26.957740] __kmalloc_cache_noprof+0x15c/0x3c0 [ 26.958424] kasan_strings+0xb0/0x8d8 [ 26.959077] kunit_try_run_case+0x14c/0x3d0 [ 26.960322] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.960647] kthread+0x24c/0x2d0 [ 26.961346] ret_from_fork+0x10/0x20 [ 26.961976] [ 26.962341] Freed by task 247: [ 26.962905] kasan_save_stack+0x3c/0x68 [ 26.963556] kasan_save_track+0x20/0x40 [ 26.964403] kasan_save_free_info+0x4c/0x78 [ 26.964946] __kasan_slab_free+0x6c/0x98 [ 26.965435] kfree+0x114/0x3c8 [ 26.965887] kasan_strings+0x124/0x8d8 [ 26.966381] kunit_try_run_case+0x14c/0x3d0 [ 26.967108] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.968244] kthread+0x24c/0x2d0 [ 26.968640] ret_from_fork+0x10/0x20 [ 26.969133] [ 26.969486] The buggy address belongs to the object at fff00000c1204c40 [ 26.969486] which belongs to the cache kmalloc-32 of size 32 [ 26.970635] The buggy address is located 16 bytes inside of [ 26.970635] freed 32-byte region [fff00000c1204c40, fff00000c1204c60) [ 26.971854] [ 26.972151] The buggy address belongs to the physical page: [ 26.973169] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101204 [ 26.974133] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 26.975251] page_type: f5(slab) [ 26.975950] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000 [ 26.977007] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 26.977815] page dumped because: kasan: bad access detected [ 26.978471] [ 26.978796] Memory state around the buggy address: [ 26.979675] fff00000c1204b00: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc [ 26.980424] fff00000c1204b80: 00 00 00 fc fc fc fc fc 00 00 00 04 fc fc fc fc [ 26.981155] >fff00000c1204c00: 00 00 07 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 26.981997] ^ [ 26.982679] fff00000c1204c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 26.983722] fff00000c1204d00: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 26.984460] ==================================================================
[ 27.359890] ================================================================== [ 27.362745] BUG: KASAN: slab-use-after-free in strcmp+0xb0/0xc0 [ 27.363460] Read of size 1 at addr ffff888102964dd0 by task kunit_try_catch/266 [ 27.364919] [ 27.365474] CPU: 0 UID: 0 PID: 266 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc2-next-20241209 #1 [ 27.366810] Tainted: [B]=BAD_PAGE, [N]=TEST [ 27.367341] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 27.368478] Call Trace: [ 27.368792] <TASK> [ 27.369862] dump_stack_lvl+0x73/0xb0 [ 27.370240] print_report+0xd1/0x640 [ 27.370920] ? __virt_addr_valid+0x1db/0x2d0 [ 27.371584] ? kasan_complete_mode_report_info+0x64/0x200 [ 27.372420] kasan_report+0x102/0x140 [ 27.373066] ? strcmp+0xb0/0xc0 [ 27.373627] ? strcmp+0xb0/0xc0 [ 27.374306] __asan_report_load1_noabort+0x18/0x20 [ 27.375137] strcmp+0xb0/0xc0 [ 27.375504] kasan_strings+0x2d3/0xb60 [ 27.376222] ? __pfx_kasan_strings+0x10/0x10 [ 27.376697] ? __schedule+0xc70/0x27e0 [ 27.377641] ? __pfx_read_tsc+0x10/0x10 [ 27.378082] ? ktime_get_ts64+0x86/0x230 [ 27.378986] kunit_try_run_case+0x1b3/0x490 [ 27.379482] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.380396] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 27.381059] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 27.381689] ? __kthread_parkme+0x82/0x160 [ 27.382228] ? preempt_count_sub+0x50/0x80 [ 27.382686] ? __pfx_kunit_try_run_case+0x10/0x10 [ 27.383552] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 27.384399] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.385366] kthread+0x257/0x310 [ 27.385908] ? __pfx_kthread+0x10/0x10 [ 27.386410] ret_from_fork+0x41/0x80 [ 27.386753] ? __pfx_kthread+0x10/0x10 [ 27.387591] ret_from_fork_asm+0x1a/0x30 [ 27.388033] </TASK> [ 27.388319] [ 27.388505] Allocated by task 266: [ 27.388816] kasan_save_stack+0x3d/0x60 [ 27.390009] kasan_save_track+0x18/0x40 [ 27.390368] kasan_save_alloc_info+0x3b/0x50 [ 27.391065] __kasan_kmalloc+0xb7/0xc0 [ 27.391468] __kmalloc_cache_noprof+0x184/0x410 [ 27.392518] kasan_strings+0xb9/0xb60 [ 27.393072] kunit_try_run_case+0x1b3/0x490 [ 27.393272] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.394125] kthread+0x257/0x310 [ 27.394558] ret_from_fork+0x41/0x80 [ 27.394934] ret_from_fork_asm+0x1a/0x30 [ 27.395353] [ 27.395538] Freed by task 266: [ 27.395838] kasan_save_stack+0x3d/0x60 [ 27.396259] kasan_save_track+0x18/0x40 [ 27.396731] kasan_save_free_info+0x3f/0x60 [ 27.397645] __kasan_slab_free+0x56/0x70 [ 27.398141] kfree+0x123/0x3f0 [ 27.398516] kasan_strings+0x13c/0xb60 [ 27.399693] kunit_try_run_case+0x1b3/0x490 [ 27.400343] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 27.400975] kthread+0x257/0x310 [ 27.401670] ret_from_fork+0x41/0x80 [ 27.402140] ret_from_fork_asm+0x1a/0x30 [ 27.403039] [ 27.403228] The buggy address belongs to the object at ffff888102964dc0 [ 27.403228] which belongs to the cache kmalloc-32 of size 32 [ 27.404577] The buggy address is located 16 bytes inside of [ 27.404577] freed 32-byte region [ffff888102964dc0, ffff888102964de0) [ 27.406361] [ 27.406586] The buggy address belongs to the physical page: [ 27.407714] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102964 [ 27.408623] flags: 0x200000000000000(node=0|zone=2) [ 27.409457] page_type: f5(slab) [ 27.409809] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000 [ 27.410320] raw: 0000000000000000 0000000080400040 00000000f5000000 0000000000000000 [ 27.411031] page dumped because: kasan: bad access detected [ 27.411647] [ 27.411896] Memory state around the buggy address: [ 27.412587] ffff888102964c80: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.413115] ffff888102964d00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.413990] >ffff888102964d80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.414547] ^ [ 27.415258] ffff888102964e00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc [ 27.415967] ffff888102964e80: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc [ 27.416663] ==================================================================