Date
Dec. 6, 2024, 3:11 p.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 38.149292] ================================================================== [ 38.149851] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0 [ 38.150780] Write of size 121 at addr fff00000c66d6400 by task kunit_try_catch/274 [ 38.151687] [ 38.152121] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 38.153273] Tainted: [B]=BAD_PAGE, [N]=TEST [ 38.153910] Hardware name: linux,dummy-virt (DT) [ 38.154499] Call trace: [ 38.154996] show_stack+0x20/0x38 (C) [ 38.155646] dump_stack_lvl+0x8c/0xd0 [ 38.156352] print_report+0x118/0x5e0 [ 38.156985] kasan_report+0xc8/0x118 [ 38.157604] kasan_check_range+0x100/0x1a8 [ 38.158283] __kasan_check_write+0x20/0x30 [ 38.158930] strncpy_from_user+0x3c/0x2a0 [ 38.159500] copy_user_test_oob+0x5c0/0xec0 [ 38.160144] kunit_try_run_case+0x14c/0x3d0 [ 38.160838] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 38.161650] kthread+0x24c/0x2d0 [ 38.162243] ret_from_fork+0x10/0x20 [ 38.162761] [ 38.163138] Allocated by task 274: [ 38.163700] kasan_save_stack+0x3c/0x68 [ 38.164194] kasan_save_track+0x20/0x40 [ 38.164847] kasan_save_alloc_info+0x40/0x58 [ 38.165358] __kasan_kmalloc+0xd4/0xd8 [ 38.166027] __kmalloc_noprof+0x188/0x4c8 [ 38.166581] kunit_kmalloc_array+0x34/0x88 [ 38.167237] copy_user_test_oob+0xac/0xec0 [ 38.167805] kunit_try_run_case+0x14c/0x3d0 [ 38.168405] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 38.169174] kthread+0x24c/0x2d0 [ 38.169772] ret_from_fork+0x10/0x20 [ 38.170366] [ 38.170722] The buggy address belongs to the object at fff00000c66d6400 [ 38.170722] which belongs to the cache kmalloc-128 of size 128 [ 38.171917] The buggy address is located 0 bytes inside of [ 38.171917] allocated 120-byte region [fff00000c66d6400, fff00000c66d6478) [ 38.172985] [ 38.173354] The buggy address belongs to the physical page: [ 38.174098] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066d6 [ 38.175061] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 38.175757] page_type: f5(slab) [ 38.176323] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 38.177292] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 38.178124] page dumped because: kasan: bad access detected [ 38.178891] [ 38.179251] Memory state around the buggy address: [ 38.179935] fff00000c66d6300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.180649] fff00000c66d6380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.181420] >fff00000c66d6400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 38.182332] ^ [ 38.183064] fff00000c66d6480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.183912] fff00000c66d6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.184666] ================================================================== [ 38.186880] ================================================================== [ 38.187776] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0 [ 38.188407] Write of size 1 at addr fff00000c66d6478 by task kunit_try_catch/274 [ 38.189372] [ 38.189862] CPU: 1 UID: 0 PID: 274 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 38.190970] Tainted: [B]=BAD_PAGE, [N]=TEST [ 38.191597] Hardware name: linux,dummy-virt (DT) [ 38.192300] Call trace: [ 38.192823] show_stack+0x20/0x38 (C) [ 38.193472] dump_stack_lvl+0x8c/0xd0 [ 38.194187] print_report+0x118/0x5e0 [ 38.194783] kasan_report+0xc8/0x118 [ 38.195471] __asan_report_store1_noabort+0x20/0x30 [ 38.196257] strncpy_from_user+0x270/0x2a0 [ 38.196983] copy_user_test_oob+0x5c0/0xec0 [ 38.197732] kunit_try_run_case+0x14c/0x3d0 [ 38.198577] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 38.199374] kthread+0x24c/0x2d0 [ 38.200013] ret_from_fork+0x10/0x20 [ 38.200661] [ 38.201017] Allocated by task 274: [ 38.201613] kasan_save_stack+0x3c/0x68 [ 38.202228] kasan_save_track+0x20/0x40 [ 38.202868] kasan_save_alloc_info+0x40/0x58 [ 38.203498] __kasan_kmalloc+0xd4/0xd8 [ 38.204145] __kmalloc_noprof+0x188/0x4c8 [ 38.204776] kunit_kmalloc_array+0x34/0x88 [ 38.205421] copy_user_test_oob+0xac/0xec0 [ 38.206077] kunit_try_run_case+0x14c/0x3d0 [ 38.206650] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 38.207419] kthread+0x24c/0x2d0 [ 38.207995] ret_from_fork+0x10/0x20 [ 38.208633] [ 38.209008] The buggy address belongs to the object at fff00000c66d6400 [ 38.209008] which belongs to the cache kmalloc-128 of size 128 [ 38.210334] The buggy address is located 0 bytes to the right of [ 38.210334] allocated 120-byte region [fff00000c66d6400, fff00000c66d6478) [ 38.211718] [ 38.212156] The buggy address belongs to the physical page: [ 38.212826] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1066d6 [ 38.213762] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 38.214540] page_type: f5(slab) [ 38.215097] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 38.215909] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 38.216993] page dumped because: kasan: bad access detected [ 38.217659] [ 38.218060] Memory state around the buggy address: [ 38.218722] fff00000c66d6300: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 38.219621] fff00000c66d6380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.220560] >fff00000c66d6400: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 38.221384] ^ [ 38.222179] fff00000c66d6480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.223056] fff00000c66d6500: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 38.223895] ==================================================================
[ 32.047331] ================================================================== [ 32.047989] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1e0 [ 32.048958] Write of size 121 at addr ffff888102933c00 by task kunit_try_catch/293 [ 32.050077] [ 32.050359] CPU: 0 UID: 0 PID: 293 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 32.050975] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.051255] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 32.052434] Call Trace: [ 32.052829] <TASK> [ 32.053388] dump_stack_lvl+0x73/0xb0 [ 32.053895] print_report+0xd1/0x640 [ 32.054373] ? __virt_addr_valid+0x1db/0x2d0 [ 32.054966] ? kasan_complete_mode_report_info+0x2a/0x200 [ 32.055701] kasan_report+0x102/0x140 [ 32.056570] ? strncpy_from_user+0x2e/0x1e0 [ 32.056955] ? strncpy_from_user+0x2e/0x1e0 [ 32.057544] kasan_check_range+0x10c/0x1c0 [ 32.059853] __kasan_check_write+0x18/0x20 [ 32.060666] strncpy_from_user+0x2e/0x1e0 [ 32.061066] ? __kasan_check_read+0x15/0x20 [ 32.061580] copy_user_test_oob+0x761/0x10f0 [ 32.062202] ? __pfx_copy_user_test_oob+0x10/0x10 [ 32.062551] ? finish_task_switch.isra.0+0x153/0x700 [ 32.063136] ? __switch_to+0x5d9/0xf60 [ 32.063446] ? __schedule+0xc70/0x27e0 [ 32.063998] ? __pfx_read_tsc+0x10/0x10 [ 32.064458] ? ktime_get_ts64+0x86/0x230 [ 32.065038] kunit_try_run_case+0x1b3/0x490 [ 32.066138] ? __pfx_kunit_try_run_case+0x10/0x10 [ 32.066580] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 32.067042] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 32.067403] ? __kthread_parkme+0x82/0x160 [ 32.067906] ? preempt_count_sub+0x50/0x80 [ 32.068414] ? __pfx_kunit_try_run_case+0x10/0x10 [ 32.068992] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 32.069715] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 32.070893] kthread+0x257/0x310 [ 32.071573] ? __pfx_kthread+0x10/0x10 [ 32.072041] ret_from_fork+0x41/0x80 [ 32.072513] ? __pfx_kthread+0x10/0x10 [ 32.072967] ret_from_fork_asm+0x1a/0x30 [ 32.073514] </TASK> [ 32.074123] [ 32.074345] Allocated by task 293: [ 32.074618] kasan_save_stack+0x3d/0x60 [ 32.075026] kasan_save_track+0x18/0x40 [ 32.075601] kasan_save_alloc_info+0x3b/0x50 [ 32.076231] __kasan_kmalloc+0xb7/0xc0 [ 32.076521] __kmalloc_noprof+0x1c4/0x500 [ 32.077064] kunit_kmalloc_array+0x25/0x60 [ 32.077670] copy_user_test_oob+0xac/0x10f0 [ 32.078161] kunit_try_run_case+0x1b3/0x490 [ 32.078728] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 32.079117] kthread+0x257/0x310 [ 32.079427] ret_from_fork+0x41/0x80 [ 32.080167] ret_from_fork_asm+0x1a/0x30 [ 32.081091] [ 32.081296] The buggy address belongs to the object at ffff888102933c00 [ 32.081296] which belongs to the cache kmalloc-128 of size 128 [ 32.082697] The buggy address is located 0 bytes inside of [ 32.082697] allocated 120-byte region [ffff888102933c00, ffff888102933c78) [ 32.083964] [ 32.084129] The buggy address belongs to the physical page: [ 32.084712] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102933 [ 32.086277] flags: 0x200000000000000(node=0|zone=2) [ 32.086873] page_type: f5(slab) [ 32.087799] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 32.088780] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 32.089635] page dumped because: kasan: bad access detected [ 32.090725] [ 32.090977] Memory state around the buggy address: [ 32.092018] ffff888102933b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.093446] ffff888102933b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.094465] >ffff888102933c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 32.095199] ^ [ 32.096397] ffff888102933c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.097239] ffff888102933d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.097871] ================================================================== [ 32.099956] ================================================================== [ 32.100870] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a7/0x1e0 [ 32.102433] Write of size 1 at addr ffff888102933c78 by task kunit_try_catch/293 [ 32.103025] [ 32.103594] CPU: 0 UID: 0 PID: 293 Comm: kunit_try_catch Tainted: G B N 6.13.0-rc1-next-20241206 #1 [ 32.105135] Tainted: [B]=BAD_PAGE, [N]=TEST [ 32.105572] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 32.107269] Call Trace: [ 32.107618] <TASK> [ 32.107844] dump_stack_lvl+0x73/0xb0 [ 32.108265] print_report+0xd1/0x640 [ 32.108666] ? __virt_addr_valid+0x1db/0x2d0 [ 32.109700] ? kasan_complete_mode_report_info+0x2a/0x200 [ 32.110296] kasan_report+0x102/0x140 [ 32.111167] ? strncpy_from_user+0x1a7/0x1e0 [ 32.111799] ? strncpy_from_user+0x1a7/0x1e0 [ 32.112481] __asan_report_store1_noabort+0x1b/0x30 [ 32.112724] strncpy_from_user+0x1a7/0x1e0 [ 32.112953] copy_user_test_oob+0x761/0x10f0 [ 32.113266] ? __pfx_copy_user_test_oob+0x10/0x10 [ 32.114324] ? finish_task_switch.isra.0+0x153/0x700 [ 32.114769] ? __switch_to+0x5d9/0xf60 [ 32.115506] ? __schedule+0xc70/0x27e0 [ 32.115928] ? __pfx_read_tsc+0x10/0x10 [ 32.116408] ? ktime_get_ts64+0x86/0x230 [ 32.116957] kunit_try_run_case+0x1b3/0x490 [ 32.117473] ? __pfx_kunit_try_run_case+0x10/0x10 [ 32.118713] ? _raw_spin_lock_irqsave+0xa2/0x110 [ 32.119147] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 32.119778] ? __kthread_parkme+0x82/0x160 [ 32.120169] ? preempt_count_sub+0x50/0x80 [ 32.121446] ? __pfx_kunit_try_run_case+0x10/0x10 [ 32.121919] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 32.122875] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 32.123520] kthread+0x257/0x310 [ 32.124358] ? __pfx_kthread+0x10/0x10 [ 32.124713] ret_from_fork+0x41/0x80 [ 32.125039] ? __pfx_kthread+0x10/0x10 [ 32.125593] ret_from_fork_asm+0x1a/0x30 [ 32.126168] </TASK> [ 32.126576] [ 32.126853] Allocated by task 293: [ 32.127138] kasan_save_stack+0x3d/0x60 [ 32.127696] kasan_save_track+0x18/0x40 [ 32.128239] kasan_save_alloc_info+0x3b/0x50 [ 32.128691] __kasan_kmalloc+0xb7/0xc0 [ 32.129123] __kmalloc_noprof+0x1c4/0x500 [ 32.129682] kunit_kmalloc_array+0x25/0x60 [ 32.130200] copy_user_test_oob+0xac/0x10f0 [ 32.130721] kunit_try_run_case+0x1b3/0x490 [ 32.131272] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 32.131689] kthread+0x257/0x310 [ 32.132233] ret_from_fork+0x41/0x80 [ 32.132675] ret_from_fork_asm+0x1a/0x30 [ 32.132991] [ 32.133220] The buggy address belongs to the object at ffff888102933c00 [ 32.133220] which belongs to the cache kmalloc-128 of size 128 [ 32.134135] The buggy address is located 0 bytes to the right of [ 32.134135] allocated 120-byte region [ffff888102933c00, ffff888102933c78) [ 32.135964] [ 32.136255] The buggy address belongs to the physical page: [ 32.136912] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x102933 [ 32.137991] flags: 0x200000000000000(node=0|zone=2) [ 32.138572] page_type: f5(slab) [ 32.139074] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 32.139917] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 32.140922] page dumped because: kasan: bad access detected [ 32.141809] [ 32.142145] Memory state around the buggy address: [ 32.143003] ffff888102933b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 32.144264] ffff888102933b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.145077] >ffff888102933c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 32.145804] ^ [ 32.146925] ffff888102933c80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.148541] ffff888102933d00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 32.149126] ==================================================================