Hay
Date
Nov. 26, 2024, 6:09 a.m.

Environment
qemu-arm64
qemu-x86_64

[   34.341719] ==================================================================
[   34.342631] BUG: KASAN: slab-use-after-free in strchr+0xcc/0xd8
[   34.343467] Read of size 1 at addr fff00000c58bc8d0 by task kunit_try_catch/248
[   34.344492] 
[   34.345523] CPU: 1 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   34.346740] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.347473] Hardware name: linux,dummy-virt (DT)
[   34.348048] Call trace:
[   34.348462]  show_stack+0x20/0x38 (C)
[   34.349307]  dump_stack_lvl+0x8c/0xd0
[   34.350024]  print_report+0x118/0x5e0
[   34.350665]  kasan_report+0xc8/0x118
[   34.351480]  __asan_report_load1_noabort+0x20/0x30
[   34.352518]  strchr+0xcc/0xd8
[   34.352836]  kasan_strings+0x180/0x8f8
[   34.353359]  kunit_try_run_case+0x14c/0x3d0
[   34.354436]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.355429]  kthread+0x24c/0x2d0
[   34.355983]  ret_from_fork+0x10/0x20
[   34.356610] 
[   34.357025] Allocated by task 248:
[   34.357746]  kasan_save_stack+0x3c/0x68
[   34.358304]  kasan_save_track+0x20/0x40
[   34.358829]  kasan_save_alloc_info+0x40/0x58
[   34.359402]  __kasan_kmalloc+0xd4/0xd8
[   34.359957]  __kmalloc_cache_noprof+0x15c/0x3c8
[   34.361197]  kasan_strings+0xb4/0x8f8
[   34.361800]  kunit_try_run_case+0x14c/0x3d0
[   34.362380]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.363310]  kthread+0x24c/0x2d0
[   34.363852]  ret_from_fork+0x10/0x20
[   34.364469] 
[   34.365156] Freed by task 248:
[   34.365588]  kasan_save_stack+0x3c/0x68
[   34.366300]  kasan_save_track+0x20/0x40
[   34.366936]  kasan_save_free_info+0x4c/0x78
[   34.367588]  __kasan_slab_free+0x6c/0x98
[   34.368229]  kfree+0x114/0x3d0
[   34.368841]  kasan_strings+0x128/0x8f8
[   34.369873]  kunit_try_run_case+0x14c/0x3d0
[   34.370471]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.371240]  kthread+0x24c/0x2d0
[   34.371824]  ret_from_fork+0x10/0x20
[   34.372420] 
[   34.373188] The buggy address belongs to the object at fff00000c58bc8c0
[   34.373188]  which belongs to the cache kmalloc-32 of size 32
[   34.374500] The buggy address is located 16 bytes inside of
[   34.374500]  freed 32-byte region [fff00000c58bc8c0, fff00000c58bc8e0)
[   34.375742] 
[   34.376135] The buggy address belongs to the physical page:
[   34.377294] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1058bc
[   34.378110] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.378961] page_type: f5(slab)
[   34.379482] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   34.380304] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   34.381430] page dumped because: kasan: bad access detected
[   34.382048] 
[   34.382408] Memory state around the buggy address:
[   34.383068]  fff00000c58bc780: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   34.383989]  fff00000c58bc800: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   34.385250] >fff00000c58bc880: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   34.386035]                                                  ^
[   34.386757]  fff00000c58bc900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.387547]  fff00000c58bc980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.388420] ==================================================================

[   34.362515] ==================================================================
[   34.363588] BUG: KASAN: slab-use-after-free in strchr+0xcc/0xd8
[   34.364359] Read of size 1 at addr fff00000c5ec1d10 by task kunit_try_catch/248
[   34.365098] 
[   34.365497] CPU: 0 UID: 0 PID: 248 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   34.366912] Tainted: [B]=BAD_PAGE, [N]=TEST
[   34.367833] Hardware name: linux,dummy-virt (DT)
[   34.368453] Call trace:
[   34.368938]  show_stack+0x20/0x38 (C)
[   34.369614]  dump_stack_lvl+0x8c/0xd0
[   34.370567]  print_report+0x118/0x5e0
[   34.371118]  kasan_report+0xc8/0x118
[   34.371755]  __asan_report_load1_noabort+0x20/0x30
[   34.372403]  strchr+0xcc/0xd8
[   34.373011]  kasan_strings+0x180/0x8f8
[   34.373653]  kunit_try_run_case+0x14c/0x3d0
[   34.374322]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.375271]  kthread+0x24c/0x2d0
[   34.375777]  ret_from_fork+0x10/0x20
[   34.376440] 
[   34.376826] Allocated by task 248:
[   34.377398]  kasan_save_stack+0x3c/0x68
[   34.378261]  kasan_save_track+0x20/0x40
[   34.378853]  kasan_save_alloc_info+0x40/0x58
[   34.379589]  __kasan_kmalloc+0xd4/0xd8
[   34.380164]  __kmalloc_cache_noprof+0x15c/0x3c8
[   34.380833]  kasan_strings+0xb4/0x8f8
[   34.381322]  kunit_try_run_case+0x14c/0x3d0
[   34.382552]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.383230]  kthread+0x24c/0x2d0
[   34.383826]  ret_from_fork+0x10/0x20
[   34.384400] 
[   34.384737] Freed by task 248:
[   34.385275]  kasan_save_stack+0x3c/0x68
[   34.386003]  kasan_save_track+0x20/0x40
[   34.386645]  kasan_save_free_info+0x4c/0x78
[   34.387052]  __kasan_slab_free+0x6c/0x98
[   34.387831]  kfree+0x114/0x3d0
[   34.388414]  kasan_strings+0x128/0x8f8
[   34.389080]  kunit_try_run_case+0x14c/0x3d0
[   34.390451]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   34.391282]  kthread+0x24c/0x2d0
[   34.391918]  ret_from_fork+0x10/0x20
[   34.392416] 
[   34.392817] The buggy address belongs to the object at fff00000c5ec1d00
[   34.392817]  which belongs to the cache kmalloc-32 of size 32
[   34.394589] The buggy address is located 16 bytes inside of
[   34.394589]  freed 32-byte region [fff00000c5ec1d00, fff00000c5ec1d20)
[   34.395830] 
[   34.396208] The buggy address belongs to the physical page:
[   34.396882] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105ec1
[   34.398005] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   34.398866] page_type: f5(slab)
[   34.399387] raw: 0bfffe0000000000 fff00000c0001780 dead000000000122 0000000000000000
[   34.400398] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   34.401249] page dumped because: kasan: bad access detected
[   34.402224] 
[   34.402611] Memory state around the buggy address:
[   34.403448]  fff00000c5ec1c00: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   34.404514]  fff00000c5ec1c80: 00 00 00 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   34.405331] >fff00000c5ec1d00: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   34.406362]                          ^
[   34.406817]  fff00000c5ec1d80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.407820]  fff00000c5ec1e00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   34.408765] ==================================================================

[   28.519509] ==================================================================
[   28.520046] BUG: KASAN: slab-use-after-free in strchr+0x9c/0xc0
[   28.520046] Read of size 1 at addr ffff88810294c410 by task kunit_try_catch/268
[   28.520046] 
[   28.520046] CPU: 1 UID: 0 PID: 268 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   28.520046] Tainted: [B]=BAD_PAGE, [N]=TEST
[   28.520046] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   28.520046] Call Trace:
[   28.520046]  <TASK>
[   28.520046]  dump_stack_lvl+0x73/0xb0
[   28.520046]  print_report+0xd1/0x640
[   28.520046]  ? __virt_addr_valid+0x1db/0x2d0
[   28.520046]  ? kasan_complete_mode_report_info+0x64/0x200
[   28.520046]  kasan_report+0x102/0x140
[   28.520046]  ? strchr+0x9c/0xc0
[   28.520046]  ? strchr+0x9c/0xc0
[   28.520046]  __asan_report_load1_noabort+0x18/0x20
[   28.520046]  strchr+0x9c/0xc0
[   28.520046]  kasan_strings+0x1b1/0xb60
[   28.520046]  ? __pfx_kasan_strings+0x10/0x10
[   28.520046]  ? __schedule+0xc3e/0x2790
[   28.520046]  ? ktime_get_ts64+0x84/0x230
[   28.520046]  kunit_try_run_case+0x1b3/0x490
[   28.520046]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.520046]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   28.520046]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   28.520046]  ? __kthread_parkme+0x82/0x160
[   28.520046]  ? preempt_count_sub+0x50/0x80
[   28.520046]  ? __pfx_kunit_try_run_case+0x10/0x10
[   28.520046]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   28.520046]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.520046]  kthread+0x257/0x310
[   28.520046]  ? __pfx_kthread+0x10/0x10
[   28.520046]  ret_from_fork+0x41/0x80
[   28.520046]  ? __pfx_kthread+0x10/0x10
[   28.520046]  ret_from_fork_asm+0x1a/0x30
[   28.520046]  </TASK>
[   28.520046] 
[   28.520046] Allocated by task 268:
[   28.520046]  kasan_save_stack+0x3d/0x60
[   28.520046]  kasan_save_track+0x18/0x40
[   28.520046]  kasan_save_alloc_info+0x3b/0x50
[   28.520046]  __kasan_kmalloc+0xb7/0xc0
[   28.520046]  __kmalloc_cache_noprof+0x184/0x410
[   28.520046]  kasan_strings+0xb3/0xb60
[   28.520046]  kunit_try_run_case+0x1b3/0x490
[   28.520046]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.520046]  kthread+0x257/0x310
[   28.520046]  ret_from_fork+0x41/0x80
[   28.520046]  ret_from_fork_asm+0x1a/0x30
[   28.520046] 
[   28.520046] Freed by task 268:
[   28.520046]  kasan_save_stack+0x3d/0x60
[   28.520046]  kasan_save_track+0x18/0x40
[   28.520046]  kasan_save_free_info+0x3f/0x60
[   28.520046]  __kasan_slab_free+0x56/0x70
[   28.520046]  kfree+0x123/0x3f0
[   28.520046]  kasan_strings+0x13a/0xb60
[   28.520046]  kunit_try_run_case+0x1b3/0x490
[   28.520046]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   28.520046]  kthread+0x257/0x310
[   28.520046]  ret_from_fork+0x41/0x80
[   28.520046]  ret_from_fork_asm+0x1a/0x30
[   28.520046] 
[   28.520046] The buggy address belongs to the object at ffff88810294c400
[   28.520046]  which belongs to the cache kmalloc-32 of size 32
[   28.520046] The buggy address is located 16 bytes inside of
[   28.520046]  freed 32-byte region [ffff88810294c400, ffff88810294c420)
[   28.520046] 
[   28.520046] The buggy address belongs to the physical page:
[   28.520046] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10294c
[   28.520046] flags: 0x200000000000000(node=0|zone=2)
[   28.520046] page_type: f5(slab)
[   28.520046] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   28.520046] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   28.520046] page dumped because: kasan: bad access detected
[   28.520046] 
[   28.520046] Memory state around the buggy address:
[   28.520046]  ffff88810294c300: 00 00 07 fc fc fc fc fc 00 00 00 fc fc fc fc fc
[   28.520046]  ffff88810294c380: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   28.520046] >ffff88810294c400: fa fb fb fb fc fc fc fc fc fc fc fc fc fc fc fc
[   28.520046]                          ^
[   28.520046]  ffff88810294c480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.520046]  ffff88810294c500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   28.520046] ==================================================================

[   23.425314] ==================================================================
[   23.426113] BUG: KASAN: slab-use-after-free in strchr+0x9c/0xc0
[   23.426993] Read of size 1 at addr ffff8881028c9250 by task kunit_try_catch/266
[   23.428160] 
[   23.428368] CPU: 0 UID: 0 PID: 266 Comm: kunit_try_catch Tainted: G    B            N 6.12.0-next-20241126 #1
[   23.429342] Tainted: [B]=BAD_PAGE, [N]=TEST
[   23.430169] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   23.430947] Call Trace:
[   23.431321]  <TASK>
[   23.431668]  dump_stack_lvl+0x73/0xb0
[   23.432538]  print_report+0xd1/0x640
[   23.433103]  ? __virt_addr_valid+0x1db/0x2d0
[   23.433720]  ? kasan_complete_mode_report_info+0x64/0x200
[   23.434177]  kasan_report+0x102/0x140
[   23.434809]  ? strchr+0x9c/0xc0
[   23.435232]  ? strchr+0x9c/0xc0
[   23.435538]  __asan_report_load1_noabort+0x18/0x20
[   23.436259]  strchr+0x9c/0xc0
[   23.436748]  kasan_strings+0x1b1/0xb60
[   23.437244]  ? __pfx_kasan_strings+0x10/0x10
[   23.437824]  ? __schedule+0xc3e/0x2790
[   23.438267]  ? __pfx_read_tsc+0x10/0x10
[   23.438831]  ? ktime_get_ts64+0x84/0x230
[   23.439126]  kunit_try_run_case+0x1b3/0x490
[   23.439794]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.440409]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   23.441069]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   23.441473]  ? __kthread_parkme+0x82/0x160
[   23.442108]  ? preempt_count_sub+0x50/0x80
[   23.442817]  ? __pfx_kunit_try_run_case+0x10/0x10
[   23.443229]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   23.443981]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.444345]  kthread+0x257/0x310
[   23.444756]  ? __pfx_kthread+0x10/0x10
[   23.445039]  ret_from_fork+0x41/0x80
[   23.445406]  ? __pfx_kthread+0x10/0x10
[   23.446032]  ret_from_fork_asm+0x1a/0x30
[   23.446650]  </TASK>
[   23.446943] 
[   23.447233] Allocated by task 266:
[   23.447617]  kasan_save_stack+0x3d/0x60
[   23.448095]  kasan_save_track+0x18/0x40
[   23.448647]  kasan_save_alloc_info+0x3b/0x50
[   23.449017]  __kasan_kmalloc+0xb7/0xc0
[   23.449538]  __kmalloc_cache_noprof+0x184/0x410
[   23.450002]  kasan_strings+0xb3/0xb60
[   23.450396]  kunit_try_run_case+0x1b3/0x490
[   23.450948]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.451481]  kthread+0x257/0x310
[   23.451991]  ret_from_fork+0x41/0x80
[   23.452379]  ret_from_fork_asm+0x1a/0x30
[   23.452916] 
[   23.453224] Freed by task 266:
[   23.453552]  kasan_save_stack+0x3d/0x60
[   23.454224]  kasan_save_track+0x18/0x40
[   23.454629]  kasan_save_free_info+0x3f/0x60
[   23.455022]  __kasan_slab_free+0x56/0x70
[   23.455341]  kfree+0x123/0x3f0
[   23.456442]  kasan_strings+0x13a/0xb60
[   23.456741]  kunit_try_run_case+0x1b3/0x490
[   23.457017]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   23.457324]  kthread+0x257/0x310
[   23.457865]  ret_from_fork+0x41/0x80
[   23.458320]  ret_from_fork_asm+0x1a/0x30
[   23.458906] 
[   23.459148] The buggy address belongs to the object at ffff8881028c9240
[   23.459148]  which belongs to the cache kmalloc-32 of size 32
[   23.460393] The buggy address is located 16 bytes inside of
[   23.460393]  freed 32-byte region [ffff8881028c9240, ffff8881028c9260)
[   23.461635] 
[   23.461966] The buggy address belongs to the physical page:
[   23.462616] page: refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1028c9
[   23.463367] flags: 0x200000000000000(node=0|zone=2)
[   23.464025] page_type: f5(slab)
[   23.464470] raw: 0200000000000000 ffff888100041780 dead000000000122 0000000000000000
[   23.465162] raw: 0000000000000000 0000000080400040 00000001f5000000 0000000000000000
[   23.465802] page dumped because: kasan: bad access detected
[   23.466358] 
[   23.466658] Memory state around the buggy address:
[   23.467159]  ffff8881028c9100: 00 00 00 fc fc fc fc fc 00 00 07 fc fc fc fc fc
[   23.467554]  ffff8881028c9180: fa fb fb fb fc fc fc fc fa fb fb fb fc fc fc fc
[   23.468277] >ffff8881028c9200: 00 00 00 fc fc fc fc fc fa fb fb fb fc fc fc fc
[   23.469022]                                                  ^
[   23.469663]  ffff8881028c9280: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.470400]  ffff8881028c9300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   23.470850] ==================================================================