Date
May 12, 2025, 11:48 a.m.
Environment | |
---|---|
qemu-arm64 | |
qemu-x86_64 |
[ 16.198848] ================================================================== [ 16.199104] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x2ec/0x320 [ 16.199224] Read of size 1 at addr fff00000c10cc79f by task kunit_try_catch/138 [ 16.199331] [ 16.199388] CPU: 1 UID: 0 PID: 138 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT [ 16.199557] Tainted: [B]=BAD_PAGE, [N]=TEST [ 16.199603] Hardware name: linux,dummy-virt (DT) [ 16.199662] Call trace: [ 16.199706] show_stack+0x20/0x38 (C) [ 16.199798] dump_stack_lvl+0x8c/0xd0 [ 16.199897] print_report+0x118/0x608 [ 16.200000] kasan_report+0xdc/0x128 [ 16.200112] __asan_report_load1_noabort+0x20/0x30 [ 16.200209] kmalloc_oob_left+0x2ec/0x320 [ 16.200309] kunit_try_run_case+0x170/0x3f0 [ 16.200401] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 16.200491] kthread+0x328/0x630 [ 16.200574] ret_from_fork+0x10/0x20 [ 16.200666] [ 16.200702] Allocated by task 26: [ 16.200759] kasan_save_stack+0x3c/0x68 [ 16.200834] kasan_save_track+0x20/0x40 [ 16.200904] kasan_save_alloc_info+0x40/0x58 [ 16.201014] __kasan_kmalloc+0xd4/0xd8 [ 16.201121] __kmalloc_node_track_caller_noprof+0x18c/0x4c0 [ 16.201224] kstrdup+0x54/0xc8 [ 16.201354] devtmpfs_work_loop+0x6f8/0xa58 [ 16.201474] devtmpfsd+0x50/0x58 [ 16.201579] kthread+0x328/0x630 [ 16.201677] ret_from_fork+0x10/0x20 [ 16.201781] [ 16.201879] Freed by task 26: [ 16.202022] kasan_save_stack+0x3c/0x68 [ 16.202120] kasan_save_track+0x20/0x40 [ 16.202198] kasan_save_free_info+0x4c/0x78 [ 16.202275] __kasan_slab_free+0x6c/0x98 [ 16.202344] kfree+0x214/0x3c8 [ 16.202401] devtmpfs_work_loop+0x804/0xa58 [ 16.202470] devtmpfsd+0x50/0x58 [ 16.202543] kthread+0x328/0x630 [ 16.202620] ret_from_fork+0x10/0x20 [ 16.202701] [ 16.202740] The buggy address belongs to the object at fff00000c10cc780 [ 16.202740] which belongs to the cache kmalloc-16 of size 16 [ 16.202868] The buggy address is located 15 bytes to the right of [ 16.202868] allocated 16-byte region [fff00000c10cc780, fff00000c10cc790) [ 16.203014] [ 16.203065] The buggy address belongs to the physical page: [ 16.203137] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1010cc [ 16.203324] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 16.203436] page_type: f5(slab) [ 16.203580] raw: 0bfffe0000000000 fff00000c0001640 dead000000000122 0000000000000000 [ 16.203920] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 16.204118] page dumped because: kasan: bad access detected [ 16.204507] [ 16.204553] Memory state around the buggy address: [ 16.204632] fff00000c10cc680: fa fb fc fc fa fb fc fc 00 01 fc fc fa fb fc fc [ 16.204726] fff00000c10cc700: fa fb fc fc 00 07 fc fc fa fb fc fc fa fb fc fc [ 16.204815] >fff00000c10cc780: fa fb fc fc 00 07 fc fc fc fc fc fc fc fc fc fc [ 16.204898] ^ [ 16.204962] fff00000c10cc800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.205061] fff00000c10cc880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 16.205146] ==================================================================
[ 15.512492] ================================================================== [ 15.513889] BUG: KASAN: slab-out-of-bounds in kmalloc_oob_left+0x361/0x3c0 [ 15.514178] Read of size 1 at addr ffff8881026fb8ff by task kunit_try_catch/155 [ 15.515452] [ 15.516015] CPU: 1 UID: 0 PID: 155 Comm: kunit_try_catch Tainted: G B N 6.15.0-rc6-next-20250512 #1 PREEMPT(voluntary) [ 15.516118] Tainted: [B]=BAD_PAGE, [N]=TEST [ 15.516138] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 15.516174] Call Trace: [ 15.516199] <TASK> [ 15.516232] dump_stack_lvl+0x73/0xb0 [ 15.516309] print_report+0xd1/0x650 [ 15.516347] ? __virt_addr_valid+0x1db/0x2d0 [ 15.516386] ? kmalloc_oob_left+0x361/0x3c0 [ 15.516424] ? kasan_complete_mode_report_info+0x2a/0x200 [ 15.516466] ? kmalloc_oob_left+0x361/0x3c0 [ 15.516507] kasan_report+0x141/0x180 [ 15.516552] ? kmalloc_oob_left+0x361/0x3c0 [ 15.516607] __asan_report_load1_noabort+0x18/0x20 [ 15.516651] kmalloc_oob_left+0x361/0x3c0 [ 15.516977] ? __pfx_kmalloc_oob_left+0x10/0x10 [ 15.517081] ? __pfx_kmalloc_oob_left+0x10/0x10 [ 15.517131] kunit_try_run_case+0x1a5/0x480 [ 15.517176] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.517210] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 15.517249] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 15.517299] ? __kthread_parkme+0x82/0x180 [ 15.517334] ? preempt_count_sub+0x50/0x80 [ 15.517374] ? __pfx_kunit_try_run_case+0x10/0x10 [ 15.517410] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 15.517448] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 15.517484] kthread+0x337/0x6f0 [ 15.517517] ? trace_preempt_on+0x20/0xc0 [ 15.517555] ? __pfx_kthread+0x10/0x10 [ 15.517589] ? _raw_spin_unlock_irq+0x47/0x80 [ 15.517622] ? calculate_sigpending+0x7b/0xa0 [ 15.517692] ? __pfx_kthread+0x10/0x10 [ 15.517730] ret_from_fork+0x116/0x1d0 [ 15.517761] ? __pfx_kthread+0x10/0x10 [ 15.517796] ret_from_fork_asm+0x1a/0x30 [ 15.517844] </TASK> [ 15.517865] [ 15.533115] Allocated by task 1: [ 15.533637] kasan_save_stack+0x45/0x70 [ 15.534021] kasan_save_track+0x18/0x40 [ 15.534691] kasan_save_alloc_info+0x3b/0x50 [ 15.535302] __kasan_kmalloc+0xb7/0xc0 [ 15.535479] __kmalloc_node_track_caller_noprof+0x1cb/0x500 [ 15.536066] kstrdup+0x3e/0xa0 [ 15.536457] kstrdup_const+0x2c/0x40 [ 15.536982] __kernfs_new_node+0xa7/0x6d0 [ 15.537519] kernfs_new_node+0x140/0x1e0 [ 15.538132] __kernfs_create_file+0x2d/0x290 [ 15.538889] sysfs_add_bin_file_mode_ns+0x13f/0x4f0 [ 15.539534] sysfs_create_bin_file+0x150/0x200 [ 15.539854] pci_create_attr+0x1e2/0x460 [ 15.540022] pci_create_resource_files+0xb0/0x160 [ 15.540182] pci_sysfs_init+0x32/0x90 [ 15.541048] do_one_initcall+0xd8/0x370 [ 15.541699] kernel_init_freeable+0x420/0x6f0 [ 15.542278] kernel_init+0x23/0x1e0 [ 15.542837] ret_from_fork+0x116/0x1d0 [ 15.543383] ret_from_fork_asm+0x1a/0x30 [ 15.544029] [ 15.544237] The buggy address belongs to the object at ffff8881026fb8e0 [ 15.544237] which belongs to the cache kmalloc-16 of size 16 [ 15.545200] The buggy address is located 21 bytes to the right of [ 15.545200] allocated 10-byte region [ffff8881026fb8e0, ffff8881026fb8ea) [ 15.545580] [ 15.546181] The buggy address belongs to the physical page: [ 15.546871] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1026fb [ 15.547764] flags: 0x200000000000000(node=0|zone=2) [ 15.548401] page_type: f5(slab) [ 15.548913] raw: 0200000000000000 ffff888100041640 dead000000000122 0000000000000000 [ 15.549960] raw: 0000000000000000 0000000080800080 00000000f5000000 0000000000000000 [ 15.550637] page dumped because: kasan: bad access detected [ 15.551294] [ 15.551397] Memory state around the buggy address: [ 15.551605] ffff8881026fb780: 00 05 fc fc 00 05 fc fc 00 05 fc fc 00 02 fc fc [ 15.552635] ffff8881026fb800: 00 03 fc fc fa fb fc fc 00 02 fc fc 00 05 fc fc [ 15.553401] >ffff8881026fb880: 00 02 fc fc 00 02 fc fc 00 02 fc fc 00 02 fc fc [ 15.554371] ^ [ 15.555242] ffff8881026fb900: 00 07 fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.555934] ffff8881026fb980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 15.556165] ==================================================================