Hay
Date
July 4, 2025, 3:11 p.m.

Environment
e850-96
qemu-arm64
qemu-x86_64

[   27.657561] ==================================================================
[   27.666837] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468
[   27.673432] Read of size 1 at addr ffff00080656b028 by task kunit_try_catch/237
[   27.680720] 
[   27.682207] CPU: 1 UID: 0 PID: 237 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc2 #1 PREEMPT 
[   27.682263] Tainted: [B]=BAD_PAGE, [N]=TEST
[   27.682280] Hardware name: WinLink E850-96 board (DT)
[   27.682302] Call trace:
[   27.682314]  show_stack+0x20/0x38 (C)
[   27.682352]  dump_stack_lvl+0x8c/0xd0
[   27.682389]  print_report+0x118/0x608
[   27.682421]  kasan_report+0xdc/0x128
[   27.682452]  __asan_report_load1_noabort+0x20/0x30
[   27.682490]  kmalloc_uaf2+0x3f4/0x468
[   27.682520]  kunit_try_run_case+0x170/0x3f0
[   27.682554]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.682594]  kthread+0x328/0x630
[   27.682630]  ret_from_fork+0x10/0x20
[   27.682665] 
[   27.744522] Allocated by task 237:
[   27.747909]  kasan_save_stack+0x3c/0x68
[   27.751725]  kasan_save_track+0x20/0x40
[   27.755545]  kasan_save_alloc_info+0x40/0x58
[   27.759798]  __kasan_kmalloc+0xd4/0xd8
[   27.763531]  __kmalloc_cache_noprof+0x16c/0x3c0
[   27.768045]  kmalloc_uaf2+0xc4/0x468
[   27.771605]  kunit_try_run_case+0x170/0x3f0
[   27.775770]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.781239]  kthread+0x328/0x630
[   27.784451]  ret_from_fork+0x10/0x20
[   27.788010] 
[   27.789487] Freed by task 237:
[   27.792524]  kasan_save_stack+0x3c/0x68
[   27.796343]  kasan_save_track+0x20/0x40
[   27.800163]  kasan_save_free_info+0x4c/0x78
[   27.804329]  __kasan_slab_free+0x6c/0x98
[   27.808235]  kfree+0x214/0x3c8
[   27.811273]  kmalloc_uaf2+0x134/0x468
[   27.814919]  kunit_try_run_case+0x170/0x3f0
[   27.819087]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   27.824554]  kthread+0x328/0x630
[   27.827766]  ret_from_fork+0x10/0x20
[   27.831325] 
[   27.832802] The buggy address belongs to the object at ffff00080656b000
[   27.832802]  which belongs to the cache kmalloc-64 of size 64
[   27.845130] The buggy address is located 40 bytes inside of
[   27.845130]  freed 64-byte region [ffff00080656b000, ffff00080656b040)
[   27.857193] 
[   27.858673] The buggy address belongs to the physical page:
[   27.864228] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x88656b
[   27.872211] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   27.878722] page_type: f5(slab)
[   27.881859] raw: 0bfffe0000000000 ffff0008000028c0 dead000000000122 0000000000000000
[   27.889578] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   27.897299] page dumped because: kasan: bad access detected
[   27.902852] 
[   27.904327] Memory state around the buggy address:
[   27.909109]  ffff00080656af00: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.916311]  ffff00080656af80: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[   27.923519] >ffff00080656b000: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   27.930716]                                   ^
[   27.935234]  ffff00080656b080: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc
[   27.942438]  ffff00080656b100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   27.949641] ==================================================================

[   15.693870] ==================================================================
[   15.693933] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x3f4/0x468
[   15.694092] Read of size 1 at addr fff00000c636bba8 by task kunit_try_catch/193
[   15.694463] 
[   15.694517] CPU: 0 UID: 0 PID: 193 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc2 #1 PREEMPT 
[   15.694693] Tainted: [B]=BAD_PAGE, [N]=TEST
[   15.694741] Hardware name: linux,dummy-virt (DT)
[   15.694859] Call trace:
[   15.694884]  show_stack+0x20/0x38 (C)
[   15.694981]  dump_stack_lvl+0x8c/0xd0
[   15.695033]  print_report+0x118/0x608
[   15.695106]  kasan_report+0xdc/0x128
[   15.695441]  __asan_report_load1_noabort+0x20/0x30
[   15.695547]  kmalloc_uaf2+0x3f4/0x468
[   15.695677]  kunit_try_run_case+0x170/0x3f0
[   15.695803]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.695889]  kthread+0x328/0x630
[   15.696024]  ret_from_fork+0x10/0x20
[   15.696366] 
[   15.696455] Allocated by task 193:
[   15.696580]  kasan_save_stack+0x3c/0x68
[   15.696724]  kasan_save_track+0x20/0x40
[   15.696844]  kasan_save_alloc_info+0x40/0x58
[   15.696991]  __kasan_kmalloc+0xd4/0xd8
[   15.697114]  __kmalloc_cache_noprof+0x16c/0x3c0
[   15.697153]  kmalloc_uaf2+0xc4/0x468
[   15.697189]  kunit_try_run_case+0x170/0x3f0
[   15.697416]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.697587]  kthread+0x328/0x630
[   15.697713]  ret_from_fork+0x10/0x20
[   15.697977] 
[   15.698091] Freed by task 193:
[   15.698136]  kasan_save_stack+0x3c/0x68
[   15.698174]  kasan_save_track+0x20/0x40
[   15.699228]  kasan_save_free_info+0x4c/0x78
[   15.699328]  __kasan_slab_free+0x6c/0x98
[   15.699390]  kfree+0x214/0x3c8
[   15.699492]  kmalloc_uaf2+0x134/0x468
[   15.699577]  kunit_try_run_case+0x170/0x3f0
[   15.699654]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   15.699730]  kthread+0x328/0x630
[   15.699784]  ret_from_fork+0x10/0x20
[   15.699819] 
[   15.699992] The buggy address belongs to the object at fff00000c636bb80
[   15.699992]  which belongs to the cache kmalloc-64 of size 64
[   15.700305] The buggy address is located 40 bytes inside of
[   15.700305]  freed 64-byte region [fff00000c636bb80, fff00000c636bbc0)
[   15.700548] 
[   15.700588] The buggy address belongs to the physical page:
[   15.700620] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10636b
[   15.700721] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   15.700769] page_type: f5(slab)
[   15.700825] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000
[   15.701820] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   15.701904] page dumped because: kasan: bad access detected
[   15.701982] 
[   15.702031] Memory state around the buggy address:
[   15.702355]  fff00000c636ba80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   15.702481]  fff00000c636bb00: 00 00 00 00 00 00 00 00 fc fc fc fc fc fc fc fc
[   15.702855] >fff00000c636bb80: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   15.703015]                                   ^
[   15.703105]  fff00000c636bc00: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc
[   15.703190]  fff00000c636bc80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   15.703349] ==================================================================

[   14.651452] ==================================================================
[   14.652107] BUG: KASAN: slab-use-after-free in kmalloc_uaf2+0x4a8/0x520
[   14.652681] Read of size 1 at addr ffff8881029f1328 by task kunit_try_catch/209
[   14.653057] 
[   14.653272] CPU: 1 UID: 0 PID: 209 Comm: kunit_try_catch Tainted: G    B            N  6.15.5-rc2 #1 PREEMPT(voluntary) 
[   14.653610] Tainted: [B]=BAD_PAGE, [N]=TEST
[   14.653646] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   14.653694] Call Trace:
[   14.653726]  <TASK>
[   14.653769]  dump_stack_lvl+0x73/0xb0
[   14.653841]  print_report+0xd1/0x650
[   14.653888]  ? __virt_addr_valid+0x1db/0x2d0
[   14.653961]  ? kmalloc_uaf2+0x4a8/0x520
[   14.654006]  ? kasan_complete_mode_report_info+0x64/0x200
[   14.654049]  ? kmalloc_uaf2+0x4a8/0x520
[   14.654123]  kasan_report+0x141/0x180
[   14.654191]  ? kmalloc_uaf2+0x4a8/0x520
[   14.654410]  __asan_report_load1_noabort+0x18/0x20
[   14.654448]  kmalloc_uaf2+0x4a8/0x520
[   14.654479]  ? __pfx_kmalloc_uaf2+0x10/0x10
[   14.654506]  ? finish_task_switch.isra.0+0x153/0x700
[   14.654539]  ? __switch_to+0x5d9/0xf60
[   14.654575]  ? dequeue_task_fair+0x166/0x4e0
[   14.654612]  ? __schedule+0x10cc/0x2b60
[   14.654638]  ? __pfx_read_tsc+0x10/0x10
[   14.654660]  ? ktime_get_ts64+0x86/0x230
[   14.654686]  kunit_try_run_case+0x1a5/0x480
[   14.654713]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.654735]  ? _raw_spin_lock_irqsave+0xa1/0x100
[   14.654761]  ? _raw_spin_unlock_irqrestore+0x5f/0x90
[   14.654784]  ? __kthread_parkme+0x82/0x180
[   14.654807]  ? preempt_count_sub+0x50/0x80
[   14.654830]  ? __pfx_kunit_try_run_case+0x10/0x10
[   14.654854]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.654877]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   14.654900]  kthread+0x337/0x6f0
[   14.654918]  ? trace_preempt_on+0x20/0xc0
[   14.654942]  ? __pfx_kthread+0x10/0x10
[   14.654961]  ? _raw_spin_unlock_irq+0x47/0x80
[   14.654983]  ? calculate_sigpending+0x7b/0xa0
[   14.655005]  ? __pfx_kthread+0x10/0x10
[   14.655024]  ret_from_fork+0x41/0x80
[   14.655045]  ? __pfx_kthread+0x10/0x10
[   14.655075]  ret_from_fork_asm+0x1a/0x30
[   14.655119]  </TASK>
[   14.655132] 
[   14.668882] Allocated by task 209:
[   14.669513]  kasan_save_stack+0x45/0x70
[   14.669953]  kasan_save_track+0x18/0x40
[   14.670549]  kasan_save_alloc_info+0x3b/0x50
[   14.670961]  __kasan_kmalloc+0xb7/0xc0
[   14.671354]  __kmalloc_cache_noprof+0x189/0x420
[   14.671772]  kmalloc_uaf2+0xc6/0x520
[   14.672032]  kunit_try_run_case+0x1a5/0x480
[   14.673034]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.673599]  kthread+0x337/0x6f0
[   14.673789]  ret_from_fork+0x41/0x80
[   14.674326]  ret_from_fork_asm+0x1a/0x30
[   14.674759] 
[   14.674954] Freed by task 209:
[   14.675174]  kasan_save_stack+0x45/0x70
[   14.675727]  kasan_save_track+0x18/0x40
[   14.675953]  kasan_save_free_info+0x3f/0x60
[   14.676781]  __kasan_slab_free+0x56/0x70
[   14.676991]  kfree+0x222/0x3f0
[   14.677205]  kmalloc_uaf2+0x14c/0x520
[   14.677738]  kunit_try_run_case+0x1a5/0x480
[   14.678226]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   14.678757]  kthread+0x337/0x6f0
[   14.679002]  ret_from_fork+0x41/0x80
[   14.679393]  ret_from_fork_asm+0x1a/0x30
[   14.679678] 
[   14.679864] The buggy address belongs to the object at ffff8881029f1300
[   14.679864]  which belongs to the cache kmalloc-64 of size 64
[   14.680553] The buggy address is located 40 bytes inside of
[   14.680553]  freed 64-byte region [ffff8881029f1300, ffff8881029f1340)
[   14.681160] 
[   14.681280] The buggy address belongs to the physical page:
[   14.682097] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1029f1
[   14.682593] flags: 0x200000000000000(node=0|zone=2)
[   14.683020] page_type: f5(slab)
[   14.683560] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000
[   14.684363] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000
[   14.684961] page dumped because: kasan: bad access detected
[   14.685510] 
[   14.685628] Memory state around the buggy address:
[   14.686024]  ffff8881029f1200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   14.687149]  ffff8881029f1280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   14.687671] >ffff8881029f1300: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc
[   14.687826]                                   ^
[   14.687927]  ffff8881029f1380: 00 00 00 00 00 03 fc fc fc fc fc fc fc fc fc fc
[   14.688059]  ffff8881029f1400: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   14.688347] ==================================================================