Hay
Date
Dec. 4, 2024, 3:07 p.m.

Environment
qemu-arm64
qemu-x86_64

[   39.159297] ==================================================================
[   39.160923] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x204/0x250
[   39.161997] Read of size 8 at addr fff00000c6646978 by task kunit_try_catch/269
[   39.162848] 
[   39.163252] CPU: 0 UID: 0 PID: 269 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   39.165945] Tainted: [B]=BAD_PAGE, [N]=TEST
[   39.166887] Hardware name: linux,dummy-virt (DT)
[   39.167365] Call trace:
[   39.167959]  show_stack+0x20/0x38 (C)
[   39.168951]  dump_stack_lvl+0x8c/0xd0
[   39.169606]  print_report+0x118/0x5e0
[   39.170479]  kasan_report+0xc8/0x118
[   39.171181]  __asan_report_load8_noabort+0x20/0x30
[   39.172812]  copy_to_kernel_nofault+0x204/0x250
[   39.173561]  copy_to_kernel_nofault_oob+0x158/0x418
[   39.174375]  kunit_try_run_case+0x14c/0x3d0
[   39.175680]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.177391]  kthread+0x24c/0x2d0
[   39.178093]  ret_from_fork+0x10/0x20
[   39.178870] 
[   39.179285] Allocated by task 269:
[   39.179905]  kasan_save_stack+0x3c/0x68
[   39.180490]  kasan_save_track+0x20/0x40
[   39.181295]  kasan_save_alloc_info+0x40/0x58
[   39.182084]  __kasan_kmalloc+0xd4/0xd8
[   39.183353]  __kmalloc_cache_noprof+0x15c/0x3c0
[   39.184756]  copy_to_kernel_nofault_oob+0xc8/0x418
[   39.185412]  kunit_try_run_case+0x14c/0x3d0
[   39.186116]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.187374]  kthread+0x24c/0x2d0
[   39.188165]  ret_from_fork+0x10/0x20
[   39.188768] 
[   39.189249] The buggy address belongs to the object at fff00000c6646900
[   39.189249]  which belongs to the cache kmalloc-128 of size 128
[   39.191319] The buggy address is located 0 bytes to the right of
[   39.191319]  allocated 120-byte region [fff00000c6646900, fff00000c6646978)
[   39.192680] 
[   39.192982] The buggy address belongs to the physical page:
[   39.194741] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106646
[   39.195845] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   39.196488] page_type: f5(slab)
[   39.197175] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   39.198487] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   39.199766] page dumped because: kasan: bad access detected
[   39.200579] 
[   39.201066] Memory state around the buggy address:
[   39.201828]  fff00000c6646800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
[   39.203421]  fff00000c6646880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   39.204169] >fff00000c6646900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   39.205058]                                                                 ^
[   39.207184]  fff00000c6646980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   39.208203]  fff00000c6646a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   39.209102] ==================================================================
[   39.212007] ==================================================================
[   39.212751] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x8c/0x250
[   39.213877] Write of size 8 at addr fff00000c6646978 by task kunit_try_catch/269
[   39.215153] 
[   39.215490] CPU: 0 UID: 0 PID: 269 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   39.218547] Tainted: [B]=BAD_PAGE, [N]=TEST
[   39.219491] Hardware name: linux,dummy-virt (DT)
[   39.220955] Call trace:
[   39.221492]  show_stack+0x20/0x38 (C)
[   39.222609]  dump_stack_lvl+0x8c/0xd0
[   39.223327]  print_report+0x118/0x5e0
[   39.224168]  kasan_report+0xc8/0x118
[   39.224968]  kasan_check_range+0x100/0x1a8
[   39.225615]  __kasan_check_write+0x20/0x30
[   39.226854]  copy_to_kernel_nofault+0x8c/0x250
[   39.227383]  copy_to_kernel_nofault_oob+0x1bc/0x418
[   39.227909]  kunit_try_run_case+0x14c/0x3d0
[   39.228726]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.229600]  kthread+0x24c/0x2d0
[   39.230650]  ret_from_fork+0x10/0x20
[   39.231332] 
[   39.231778] Allocated by task 269:
[   39.232454]  kasan_save_stack+0x3c/0x68
[   39.233039]  kasan_save_track+0x20/0x40
[   39.234383]  kasan_save_alloc_info+0x40/0x58
[   39.235050]  __kasan_kmalloc+0xd4/0xd8
[   39.235372]  __kmalloc_cache_noprof+0x15c/0x3c0
[   39.235753]  copy_to_kernel_nofault_oob+0xc8/0x418
[   39.236558]  kunit_try_run_case+0x14c/0x3d0
[   39.237487]  kunit_generic_run_threadfn_adapter+0x88/0x100
[   39.238638]  kthread+0x24c/0x2d0
[   39.239074]  ret_from_fork+0x10/0x20
[   39.239763] 
[   39.240188] The buggy address belongs to the object at fff00000c6646900
[   39.240188]  which belongs to the cache kmalloc-128 of size 128
[   39.241908] The buggy address is located 0 bytes to the right of
[   39.241908]  allocated 120-byte region [fff00000c6646900, fff00000c6646978)
[   39.243913] 
[   39.244933] The buggy address belongs to the physical page:
[   39.245987] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x106646
[   39.247878] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff)
[   39.248319] page_type: f5(slab)
[   39.248586] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000
[   39.249074] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   39.249513] page dumped because: kasan: bad access detected
[   39.251919] 
[   39.252319] Memory state around the buggy address:
[   39.252991]  fff00000c6646800: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc fc
[   39.253891]  fff00000c6646880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   39.254783] >fff00000c6646900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   39.256201]                                                                 ^
[   39.257143]  fff00000c6646980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   39.258580]  fff00000c6646a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   39.259917] ==================================================================

[   30.481565] ==================================================================
[   30.482359] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x99/0x260
[   30.483156] Write of size 8 at addr ffff888101b00078 by task kunit_try_catch/289
[   30.484016] 
[   30.484331] CPU: 0 UID: 0 PID: 289 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   30.485418] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.485814] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   30.486655] Call Trace:
[   30.486938]  <TASK>
[   30.487287]  dump_stack_lvl+0x73/0xb0
[   30.487824]  print_report+0xd1/0x640
[   30.488757]  ? __virt_addr_valid+0x1db/0x2d0
[   30.489119]  ? kasan_complete_mode_report_info+0x2a/0x200
[   30.489998]  kasan_report+0x102/0x140
[   30.490766]  ? copy_to_kernel_nofault+0x99/0x260
[   30.491819]  ? copy_to_kernel_nofault+0x99/0x260
[   30.492190]  kasan_check_range+0x10c/0x1c0
[   30.492931]  __kasan_check_write+0x18/0x20
[   30.493597]  copy_to_kernel_nofault+0x99/0x260
[   30.494116]  copy_to_kernel_nofault_oob+0x214/0x4e0
[   30.494799]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   30.495492]  ? finish_task_switch.isra.0+0x153/0x700
[   30.495927]  ? __schedule+0xc3e/0x2790
[   30.496340]  ? trace_hardirqs_on+0x37/0xe0
[   30.497239]  ? irqentry_exit+0x2a/0x60
[   30.497897]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   30.498746]  ? __pfx_read_tsc+0x10/0x10
[   30.499372]  ? ktime_get_ts64+0x86/0x230
[   30.499762]  kunit_try_run_case+0x1b3/0x490
[   30.501123]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.501898]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   30.502399]  ? __kthread_parkme+0x82/0x160
[   30.502848]  ? __kthread_parkme+0x82/0x160
[   30.503272]  ? preempt_count_sub+0x50/0x80
[   30.503745]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.504218]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   30.504957]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.505405]  kthread+0x257/0x310
[   30.505876]  ? __pfx_kthread+0x10/0x10
[   30.506362]  ret_from_fork+0x41/0x80
[   30.506872]  ? __pfx_kthread+0x10/0x10
[   30.507213]  ret_from_fork_asm+0x1a/0x30
[   30.507649]  </TASK>
[   30.508142] 
[   30.508380] Allocated by task 289:
[   30.509008]  kasan_save_stack+0x3d/0x60
[   30.509637]  kasan_save_track+0x18/0x40
[   30.510300]  kasan_save_alloc_info+0x3b/0x50
[   30.510847]  __kasan_kmalloc+0xb7/0xc0
[   30.511319]  __kmalloc_cache_noprof+0x184/0x410
[   30.511660]  copy_to_kernel_nofault_oob+0xc5/0x4e0
[   30.511986]  kunit_try_run_case+0x1b3/0x490
[   30.512654]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.514014]  kthread+0x257/0x310
[   30.514455]  ret_from_fork+0x41/0x80
[   30.514936]  ret_from_fork_asm+0x1a/0x30
[   30.515430] 
[   30.515592] The buggy address belongs to the object at ffff888101b00000
[   30.515592]  which belongs to the cache kmalloc-128 of size 128
[   30.516276] The buggy address is located 0 bytes to the right of
[   30.516276]  allocated 120-byte region [ffff888101b00000, ffff888101b00078)
[   30.518983] 
[   30.519280] The buggy address belongs to the physical page:
[   30.520120] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101b00
[   30.521460] flags: 0x200000000000000(node=0|zone=2)
[   30.522595] page_type: f5(slab)
[   30.523119] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   30.524284] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.525896] page dumped because: kasan: bad access detected
[   30.526801] 
[   30.526958] Memory state around the buggy address:
[   30.528631]  ffff888101afff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.529353]  ffff888101afff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.531072] >ffff888101b00000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.531565]                                                                 ^
[   30.532845]  ffff888101b00080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.533922]  ffff888101b00100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.534776] ==================================================================
[   30.428122] ==================================================================
[   30.429625] BUG: KASAN: slab-out-of-bounds in copy_to_kernel_nofault+0x225/0x260
[   30.431131] Read of size 8 at addr ffff888101b00078 by task kunit_try_catch/289
[   30.432205] 
[   30.432730] CPU: 0 UID: 0 PID: 289 Comm: kunit_try_catch Tainted: G    B            N 6.13.0-rc1-next-20241204 #1
[   30.433585] Tainted: [B]=BAD_PAGE, [N]=TEST
[   30.434123] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
[   30.434958] Call Trace:
[   30.435561]  <TASK>
[   30.435861]  dump_stack_lvl+0x73/0xb0
[   30.436393]  print_report+0xd1/0x640
[   30.436862]  ? __virt_addr_valid+0x1db/0x2d0
[   30.437455]  ? kasan_complete_mode_report_info+0x2a/0x200
[   30.437986]  kasan_report+0x102/0x140
[   30.438432]  ? copy_to_kernel_nofault+0x225/0x260
[   30.438929]  ? copy_to_kernel_nofault+0x225/0x260
[   30.439430]  __asan_report_load8_noabort+0x18/0x20
[   30.440195]  copy_to_kernel_nofault+0x225/0x260
[   30.440837]  copy_to_kernel_nofault_oob+0x179/0x4e0
[   30.441466]  ? __pfx_copy_to_kernel_nofault_oob+0x10/0x10
[   30.442155]  ? finish_task_switch.isra.0+0x153/0x700
[   30.442711]  ? __schedule+0xc3e/0x2790
[   30.443405]  ? trace_hardirqs_on+0x37/0xe0
[   30.443941]  ? irqentry_exit+0x2a/0x60
[   30.444481]  ? sysvec_apic_timer_interrupt+0x50/0x90
[   30.444931]  ? __pfx_read_tsc+0x10/0x10
[   30.445558]  ? ktime_get_ts64+0x86/0x230
[   30.445942]  kunit_try_run_case+0x1b3/0x490
[   30.446571]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.446989]  ? _raw_spin_lock_irqsave+0xa2/0x110
[   30.448351]  ? __kthread_parkme+0x82/0x160
[   30.449087]  ? __kthread_parkme+0x82/0x160
[   30.449850]  ? preempt_count_sub+0x50/0x80
[   30.450152]  ? __pfx_kunit_try_run_case+0x10/0x10
[   30.450478]  ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10
[   30.451198]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.452281]  kthread+0x257/0x310
[   30.452641]  ? __pfx_kthread+0x10/0x10
[   30.452985]  ret_from_fork+0x41/0x80
[   30.453348]  ? __pfx_kthread+0x10/0x10
[   30.453810]  ret_from_fork_asm+0x1a/0x30
[   30.454149]  </TASK>
[   30.454452] 
[   30.456173] Allocated by task 289:
[   30.456626]  kasan_save_stack+0x3d/0x60
[   30.457408]  kasan_save_track+0x18/0x40
[   30.457999]  kasan_save_alloc_info+0x3b/0x50
[   30.458921]  __kasan_kmalloc+0xb7/0xc0
[   30.459926]  __kmalloc_cache_noprof+0x184/0x410
[   30.460923]  copy_to_kernel_nofault_oob+0xc5/0x4e0
[   30.461804]  kunit_try_run_case+0x1b3/0x490
[   30.462665]  kunit_generic_run_threadfn_adapter+0x85/0xf0
[   30.463813]  kthread+0x257/0x310
[   30.464547]  ret_from_fork+0x41/0x80
[   30.465304]  ret_from_fork_asm+0x1a/0x30
[   30.465878] 
[   30.466236] The buggy address belongs to the object at ffff888101b00000
[   30.466236]  which belongs to the cache kmalloc-128 of size 128
[   30.468541] The buggy address is located 0 bytes to the right of
[   30.468541]  allocated 120-byte region [ffff888101b00000, ffff888101b00078)
[   30.470626] 
[   30.470959] The buggy address belongs to the physical page:
[   30.472384] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x101b00
[   30.473051] flags: 0x200000000000000(node=0|zone=2)
[   30.473419] page_type: f5(slab)
[   30.473796] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000
[   30.474422] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000
[   30.475065] page dumped because: kasan: bad access detected
[   30.475556] 
[   30.475834] Memory state around the buggy address:
[   30.476351]  ffff888101afff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.476794]  ffff888101afff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.477723] >ffff888101b00000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc
[   30.478432]                                                                 ^
[   30.479181]  ffff888101b00080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.479791]  ffff888101b00100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
[   30.480285] ==================================================================