Date
July 1, 2025, 12:10 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 20.774640] ================================================================== [ 20.774857] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x3c/0x2a0 [ 20.775048] Write of size 121 at addr fff00000c79f0a00 by task kunit_try_catch/285 [ 20.775390] [ 20.775695] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.776255] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.776321] Hardware name: linux,dummy-virt (DT) [ 20.776421] Call trace: [ 20.776783] show_stack+0x20/0x38 (C) [ 20.776962] dump_stack_lvl+0x8c/0xd0 [ 20.777094] print_report+0x118/0x608 [ 20.777563] kasan_report+0xdc/0x128 [ 20.777797] kasan_check_range+0x100/0x1a8 [ 20.778002] __kasan_check_write+0x20/0x30 [ 20.778340] strncpy_from_user+0x3c/0x2a0 [ 20.778440] copy_user_test_oob+0x5c0/0xec8 [ 20.778878] kunit_try_run_case+0x170/0x3f0 [ 20.779077] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.779391] kthread+0x328/0x630 [ 20.779621] ret_from_fork+0x10/0x20 [ 20.779686] [ 20.779714] Allocated by task 285: [ 20.779886] kasan_save_stack+0x3c/0x68 [ 20.780335] kasan_save_track+0x20/0x40 [ 20.780469] kasan_save_alloc_info+0x40/0x58 [ 20.780635] __kasan_kmalloc+0xd4/0xd8 [ 20.780740] __kmalloc_noprof+0x198/0x4c8 [ 20.780902] kunit_kmalloc_array+0x34/0x88 [ 20.781051] copy_user_test_oob+0xac/0xec8 [ 20.781250] kunit_try_run_case+0x170/0x3f0 [ 20.781387] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.781865] kthread+0x328/0x630 [ 20.781925] ret_from_fork+0x10/0x20 [ 20.782049] [ 20.782130] The buggy address belongs to the object at fff00000c79f0a00 [ 20.782130] which belongs to the cache kmalloc-128 of size 128 [ 20.782214] The buggy address is located 0 bytes inside of [ 20.782214] allocated 120-byte region [fff00000c79f0a00, fff00000c79f0a78) [ 20.782549] [ 20.783029] The buggy address belongs to the physical page: [ 20.783088] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079f0 [ 20.783313] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.783739] page_type: f5(slab) [ 20.783926] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 20.784020] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 20.784332] page dumped because: kasan: bad access detected [ 20.784488] [ 20.784530] Memory state around the buggy address: [ 20.784715] fff00000c79f0900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.784826] fff00000c79f0980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.784993] >fff00000c79f0a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 20.785050] ^ [ 20.785107] fff00000c79f0a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.785171] fff00000c79f0b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.785214] ================================================================== [ 20.788394] ================================================================== [ 20.788468] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x270/0x2a0 [ 20.788524] Write of size 1 at addr fff00000c79f0a78 by task kunit_try_catch/285 [ 20.788575] [ 20.788980] CPU: 0 UID: 0 PID: 285 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT [ 20.789456] Tainted: [B]=BAD_PAGE, [N]=TEST [ 20.789526] Hardware name: linux,dummy-virt (DT) [ 20.789591] Call trace: [ 20.789617] show_stack+0x20/0x38 (C) [ 20.789669] dump_stack_lvl+0x8c/0xd0 [ 20.789721] print_report+0x118/0x608 [ 20.789865] kasan_report+0xdc/0x128 [ 20.789917] __asan_report_store1_noabort+0x20/0x30 [ 20.790206] strncpy_from_user+0x270/0x2a0 [ 20.790345] copy_user_test_oob+0x5c0/0xec8 [ 20.790630] kunit_try_run_case+0x170/0x3f0 [ 20.790685] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.790896] kthread+0x328/0x630 [ 20.790983] ret_from_fork+0x10/0x20 [ 20.791146] [ 20.791168] Allocated by task 285: [ 20.791201] kasan_save_stack+0x3c/0x68 [ 20.791245] kasan_save_track+0x20/0x40 [ 20.791285] kasan_save_alloc_info+0x40/0x58 [ 20.791328] __kasan_kmalloc+0xd4/0xd8 [ 20.791368] __kmalloc_noprof+0x198/0x4c8 [ 20.791837] kunit_kmalloc_array+0x34/0x88 [ 20.792118] copy_user_test_oob+0xac/0xec8 [ 20.792313] kunit_try_run_case+0x170/0x3f0 [ 20.792533] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 20.792624] kthread+0x328/0x630 [ 20.792700] ret_from_fork+0x10/0x20 [ 20.792928] [ 20.793014] The buggy address belongs to the object at fff00000c79f0a00 [ 20.793014] which belongs to the cache kmalloc-128 of size 128 [ 20.793208] The buggy address is located 0 bytes to the right of [ 20.793208] allocated 120-byte region [fff00000c79f0a00, fff00000c79f0a78) [ 20.793288] [ 20.793312] The buggy address belongs to the physical page: [ 20.793356] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1079f0 [ 20.793434] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 20.793506] page_type: f5(slab) [ 20.793547] raw: 0bfffe0000000000 fff00000c0001a00 dead000000000122 0000000000000000 [ 20.793601] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 20.793661] page dumped because: kasan: bad access detected [ 20.793697] [ 20.793717] Memory state around the buggy address: [ 20.793753] fff00000c79f0900: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 20.793800] fff00000c79f0980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.793853] >fff00000c79f0a00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 20.793905] ^ [ 20.793959] fff00000c79f0a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.794017] fff00000c79f0b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 20.794065] ==================================================================
[ 15.430925] ================================================================== [ 15.431897] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x2e/0x1d0 [ 15.432566] Write of size 121 at addr ffff888103917500 by task kunit_try_catch/302 [ 15.432905] [ 15.433015] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 15.433068] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.433081] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.433103] Call Trace: [ 15.433117] <TASK> [ 15.433132] dump_stack_lvl+0x73/0xb0 [ 15.433161] print_report+0xd1/0x650 [ 15.433184] ? __virt_addr_valid+0x1db/0x2d0 [ 15.433206] ? strncpy_from_user+0x2e/0x1d0 [ 15.433229] ? kasan_complete_mode_report_info+0x2a/0x200 [ 15.433252] ? strncpy_from_user+0x2e/0x1d0 [ 15.433298] kasan_report+0x141/0x180 [ 15.433321] ? strncpy_from_user+0x2e/0x1d0 [ 15.433349] kasan_check_range+0x10c/0x1c0 [ 15.433384] __kasan_check_write+0x18/0x20 [ 15.433404] strncpy_from_user+0x2e/0x1d0 [ 15.433425] ? __kasan_check_read+0x15/0x20 [ 15.433447] copy_user_test_oob+0x760/0x10f0 [ 15.433473] ? __pfx_copy_user_test_oob+0x10/0x10 [ 15.433498] ? finish_task_switch.isra.0+0x153/0x700 [ 15.433521] ? __switch_to+0x47/0xf50 [ 15.433546] ? __schedule+0x10cc/0x2b60 [ 15.433569] ? __pfx_read_tsc+0x10/0x10 [ 15.433590] ? ktime_get_ts64+0x86/0x230 [ 15.433614] kunit_try_run_case+0x1a5/0x480 [ 15.433638] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.433662] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.433687] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.433710] ? __kthread_parkme+0x82/0x180 [ 15.433731] ? preempt_count_sub+0x50/0x80 [ 15.433754] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.433778] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.433802] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.433826] kthread+0x337/0x6f0 [ 15.433846] ? trace_preempt_on+0x20/0xc0 [ 15.433870] ? __pfx_kthread+0x10/0x10 [ 15.433891] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.433912] ? calculate_sigpending+0x7b/0xa0 [ 15.433936] ? __pfx_kthread+0x10/0x10 [ 15.433958] ret_from_fork+0x116/0x1d0 [ 15.433977] ? __pfx_kthread+0x10/0x10 [ 15.433997] ret_from_fork_asm+0x1a/0x30 [ 15.434038] </TASK> [ 15.434049] [ 15.441717] Allocated by task 302: [ 15.441893] kasan_save_stack+0x45/0x70 [ 15.442112] kasan_save_track+0x18/0x40 [ 15.442338] kasan_save_alloc_info+0x3b/0x50 [ 15.442560] __kasan_kmalloc+0xb7/0xc0 [ 15.442751] __kmalloc_noprof+0x1c9/0x500 [ 15.442943] kunit_kmalloc_array+0x25/0x60 [ 15.443182] copy_user_test_oob+0xab/0x10f0 [ 15.443377] kunit_try_run_case+0x1a5/0x480 [ 15.443587] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.443815] kthread+0x337/0x6f0 [ 15.443992] ret_from_fork+0x116/0x1d0 [ 15.444193] ret_from_fork_asm+0x1a/0x30 [ 15.444381] [ 15.444474] The buggy address belongs to the object at ffff888103917500 [ 15.444474] which belongs to the cache kmalloc-128 of size 128 [ 15.444973] The buggy address is located 0 bytes inside of [ 15.444973] allocated 120-byte region [ffff888103917500, ffff888103917578) [ 15.445560] [ 15.445634] The buggy address belongs to the physical page: [ 15.445890] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103917 [ 15.446290] flags: 0x200000000000000(node=0|zone=2) [ 15.446508] page_type: f5(slab) [ 15.446674] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 15.447058] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 15.447368] page dumped because: kasan: bad access detected [ 15.447622] [ 15.447724] Memory state around the buggy address: [ 15.447897] ffff888103917400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.448124] ffff888103917480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.448339] >ffff888103917500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 15.448585] ^ [ 15.448951] ffff888103917580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.449395] ffff888103917600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.449657] ================================================================== [ 15.450150] ================================================================== [ 15.450529] BUG: KASAN: slab-out-of-bounds in strncpy_from_user+0x1a5/0x1d0 [ 15.451074] Write of size 1 at addr ffff888103917578 by task kunit_try_catch/302 [ 15.451786] [ 15.451913] CPU: 1 UID: 0 PID: 302 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc4 #1 PREEMPT(voluntary) [ 15.451955] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.451980] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.452008] Call Trace: [ 15.452022] <TASK> [ 15.452054] dump_stack_lvl+0x73/0xb0 [ 15.452091] print_report+0xd1/0x650 [ 15.452115] ? __virt_addr_valid+0x1db/0x2d0 [ 15.452138] ? strncpy_from_user+0x1a5/0x1d0 [ 15.452172] ? kasan_complete_mode_report_info+0x2a/0x200 [ 15.452196] ? strncpy_from_user+0x1a5/0x1d0 [ 15.452219] kasan_report+0x141/0x180 [ 15.452242] ? strncpy_from_user+0x1a5/0x1d0 [ 15.452270] __asan_report_store1_noabort+0x1b/0x30 [ 15.452291] strncpy_from_user+0x1a5/0x1d0 [ 15.452317] copy_user_test_oob+0x760/0x10f0 [ 15.452343] ? __pfx_copy_user_test_oob+0x10/0x10 [ 15.452367] ? finish_task_switch.isra.0+0x153/0x700 [ 15.452398] ? __switch_to+0x47/0xf50 [ 15.452423] ? __schedule+0x10cc/0x2b60 [ 15.452445] ? __pfx_read_tsc+0x10/0x10 [ 15.452476] ? ktime_get_ts64+0x86/0x230 [ 15.452500] kunit_try_run_case+0x1a5/0x480 [ 15.452525] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.452557] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.452580] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.452603] ? __kthread_parkme+0x82/0x180 [ 15.452635] ? preempt_count_sub+0x50/0x80 [ 15.452658] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.452682] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.452706] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.452730] kthread+0x337/0x6f0 [ 15.452750] ? trace_preempt_on+0x20/0xc0 [ 15.452774] ? __pfx_kthread+0x10/0x10 [ 15.452794] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.452815] ? calculate_sigpending+0x7b/0xa0 [ 15.452839] ? __pfx_kthread+0x10/0x10 [ 15.452860] ret_from_fork+0x116/0x1d0 [ 15.452879] ? __pfx_kthread+0x10/0x10 [ 15.452900] ret_from_fork_asm+0x1a/0x30 [ 15.452931] </TASK> [ 15.452952] [ 15.460691] Allocated by task 302: [ 15.460858] kasan_save_stack+0x45/0x70 [ 15.461057] kasan_save_track+0x18/0x40 [ 15.461302] kasan_save_alloc_info+0x3b/0x50 [ 15.461475] __kasan_kmalloc+0xb7/0xc0 [ 15.461633] __kmalloc_noprof+0x1c9/0x500 [ 15.461832] kunit_kmalloc_array+0x25/0x60 [ 15.462066] copy_user_test_oob+0xab/0x10f0 [ 15.462281] kunit_try_run_case+0x1a5/0x480 [ 15.462480] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.462723] kthread+0x337/0x6f0 [ 15.462901] ret_from_fork+0x116/0x1d0 [ 15.463082] ret_from_fork_asm+0x1a/0x30 [ 15.463360] [ 15.463465] The buggy address belongs to the object at ffff888103917500 [ 15.463465] which belongs to the cache kmalloc-128 of size 128 [ 15.463969] The buggy address is located 0 bytes to the right of [ 15.463969] allocated 120-byte region [ffff888103917500, ffff888103917578) [ 15.464372] [ 15.464446] The buggy address belongs to the physical page: [ 15.464620] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103917 [ 15.464860] flags: 0x200000000000000(node=0|zone=2) [ 15.465060] page_type: f5(slab) [ 15.465354] raw: 0200000000000000 ffff888100041a00 dead000000000122 0000000000000000 [ 15.465692] raw: 0000000000000000 0000000080100010 00000000f5000000 0000000000000000 [ 15.466023] page dumped because: kasan: bad access detected [ 15.466471] [ 15.466568] Memory state around the buggy address: [ 15.466786] ffff888103917400: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb [ 15.467008] ffff888103917480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.467477] >ffff888103917500: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 fc [ 15.467826] ^ [ 15.468201] ffff888103917580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.468521] ffff888103917600: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.468843] ==================================================================