Date
June 26, 2025, 9:10 a.m.
Environment | |
---|---|
dragonboard-845c | |
qemu-arm64 | |
qemu-x86_64 |
[ 40.692743] ================================================================== [ 40.703431] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x170/0x310 [ 40.710662] Write of size 33 at addr ffff000093903980 by task kunit_try_catch/272 [ 40.718247] [ 40.719778] CPU: 0 UID: 0 PID: 272 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250626 #1 PREEMPT [ 40.719806] Tainted: [B]=BAD_PAGE, [N]=TEST [ 40.719815] Hardware name: Thundercomm Dragonboard 845c (DT) [ 40.719827] Call trace: [ 40.719834] show_stack+0x20/0x38 (C) [ 40.719852] dump_stack_lvl+0x8c/0xd0 [ 40.719871] print_report+0x118/0x608 [ 40.719890] kasan_report+0xdc/0x128 [ 40.719908] kasan_check_range+0x100/0x1a8 [ 40.719928] __asan_memset+0x34/0x78 [ 40.719942] kmalloc_uaf_memset+0x170/0x310 [ 40.719959] kunit_try_run_case+0x170/0x3f0 [ 40.719977] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 40.720000] kthread+0x328/0x630 [ 40.720014] ret_from_fork+0x10/0x20 [ 40.720031] [ 40.788647] Allocated by task 272: [ 40.792107] kasan_save_stack+0x3c/0x68 [ 40.796017] kasan_save_track+0x20/0x40 [ 40.799927] kasan_save_alloc_info+0x40/0x58 [ 40.804272] __kasan_kmalloc+0xd4/0xd8 [ 40.808096] __kmalloc_cache_noprof+0x16c/0x3c0 [ 40.812704] kmalloc_uaf_memset+0xb8/0x310 [ 40.816871] kunit_try_run_case+0x170/0x3f0 [ 40.821126] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 40.826699] kthread+0x328/0x630 [ 40.829990] ret_from_fork+0x10/0x20 [ 40.833628] [ 40.835156] Freed by task 272: [ 40.838269] kasan_save_stack+0x3c/0x68 [ 40.842178] kasan_save_track+0x20/0x40 [ 40.846087] kasan_save_free_info+0x4c/0x78 [ 40.850339] __kasan_slab_free+0x6c/0x98 [ 40.854335] kfree+0x214/0x3c8 [ 40.857453] kmalloc_uaf_memset+0x11c/0x310 [ 40.861706] kunit_try_run_case+0x170/0x3f0 [ 40.865958] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 40.871531] kthread+0x328/0x630 [ 40.874821] ret_from_fork+0x10/0x20 [ 40.878461] [ 40.879988] The buggy address belongs to the object at ffff000093903980 [ 40.879988] which belongs to the cache kmalloc-64 of size 64 [ 40.892475] The buggy address is located 0 bytes inside of [ 40.892475] freed 64-byte region [ffff000093903980, ffff0000939039c0) [ 40.904611] [ 40.906142] The buggy address belongs to the physical page: [ 40.911789] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x113903 [ 40.919902] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 40.926516] page_type: f5(slab) [ 40.929720] raw: 0bfffe0000000000 ffff0000800028c0 dead000000000122 0000000000000000 [ 40.937567] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 40.945407] page dumped because: kasan: bad access detected [ 40.951056] [ 40.952590] Memory state around the buggy address: [ 40.957452] ffff000093903880: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 40.964777] ffff000093903900: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 40.972091] >ffff000093903980: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 40.979406] ^ [ 40.982695] ffff000093903a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 40.990017] ffff000093903a80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 40.997339] ==================================================================
[ 26.941568] ================================================================== [ 26.941768] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x170/0x310 [ 26.941884] Write of size 33 at addr fff00000c5753700 by task kunit_try_catch/198 [ 26.942089] [ 26.942236] CPU: 0 UID: 0 PID: 198 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250626 #1 PREEMPT [ 26.942351] Tainted: [B]=BAD_PAGE, [N]=TEST [ 26.942404] Hardware name: linux,dummy-virt (DT) [ 26.942550] Call trace: [ 26.942575] show_stack+0x20/0x38 (C) [ 26.942625] dump_stack_lvl+0x8c/0xd0 [ 26.942726] print_report+0x118/0x608 [ 26.942776] kasan_report+0xdc/0x128 [ 26.942822] kasan_check_range+0x100/0x1a8 [ 26.942869] __asan_memset+0x34/0x78 [ 26.942919] kmalloc_uaf_memset+0x170/0x310 [ 26.943181] kunit_try_run_case+0x170/0x3f0 [ 26.943231] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.943284] kthread+0x328/0x630 [ 26.943326] ret_from_fork+0x10/0x20 [ 26.943371] [ 26.943390] Allocated by task 198: [ 26.943422] kasan_save_stack+0x3c/0x68 [ 26.943625] kasan_save_track+0x20/0x40 [ 26.944010] kasan_save_alloc_info+0x40/0x58 [ 26.944189] __kasan_kmalloc+0xd4/0xd8 [ 26.944659] __kmalloc_cache_noprof+0x16c/0x3c0 [ 26.945006] kmalloc_uaf_memset+0xb8/0x310 [ 26.945068] kunit_try_run_case+0x170/0x3f0 [ 26.945106] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.945150] kthread+0x328/0x630 [ 26.945182] ret_from_fork+0x10/0x20 [ 26.945244] [ 26.945264] Freed by task 198: [ 26.945319] kasan_save_stack+0x3c/0x68 [ 26.945455] kasan_save_track+0x20/0x40 [ 26.945641] kasan_save_free_info+0x4c/0x78 [ 26.945853] __kasan_slab_free+0x6c/0x98 [ 26.945981] kfree+0x214/0x3c8 [ 26.946015] kmalloc_uaf_memset+0x11c/0x310 [ 26.946072] kunit_try_run_case+0x170/0x3f0 [ 26.946133] kunit_generic_run_threadfn_adapter+0x88/0x100 [ 26.946216] kthread+0x328/0x630 [ 26.946400] ret_from_fork+0x10/0x20 [ 26.946582] [ 26.946603] The buggy address belongs to the object at fff00000c5753700 [ 26.946603] which belongs to the cache kmalloc-64 of size 64 [ 26.947164] The buggy address is located 0 bytes inside of [ 26.947164] freed 64-byte region [fff00000c5753700, fff00000c5753740) [ 26.947280] [ 26.947370] The buggy address belongs to the physical page: [ 26.947399] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x105753 [ 26.947574] flags: 0xbfffe0000000000(node=0|zone=2|lastcpupid=0x1ffff) [ 26.947635] page_type: f5(slab) [ 26.947673] raw: 0bfffe0000000000 fff00000c00018c0 dead000000000122 0000000000000000 [ 26.947814] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 26.947857] page dumped because: kasan: bad access detected [ 26.947889] [ 26.948051] Memory state around the buggy address: [ 26.948261] fff00000c5753600: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 26.948315] fff00000c5753680: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 26.948379] >fff00000c5753700: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 26.948656] ^ [ 26.948719] fff00000c5753780: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.948790] fff00000c5753800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 26.948884] ==================================================================
[ 22.390084] ================================================================== [ 22.390513] BUG: KASAN: slab-use-after-free in kmalloc_uaf_memset+0x1a3/0x360 [ 22.391082] Write of size 33 at addr ffff888103ae5280 by task kunit_try_catch/215 [ 22.391814] [ 22.391987] CPU: 1 UID: 0 PID: 215 Comm: kunit_try_catch Tainted: G B N 6.16.0-rc3-next-20250626 #1 PREEMPT(voluntary) [ 22.392040] Tainted: [B]=BAD_PAGE, [N]=TEST [ 22.392177] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 22.392202] Call Trace: [ 22.392216] <TASK> [ 22.392248] dump_stack_lvl+0x73/0xb0 [ 22.392280] print_report+0xd1/0x650 [ 22.392302] ? __virt_addr_valid+0x1db/0x2d0 [ 22.392326] ? kmalloc_uaf_memset+0x1a3/0x360 [ 22.392346] ? kasan_complete_mode_report_info+0x64/0x200 [ 22.392370] ? kmalloc_uaf_memset+0x1a3/0x360 [ 22.392390] kasan_report+0x141/0x180 [ 22.392411] ? kmalloc_uaf_memset+0x1a3/0x360 [ 22.392435] kasan_check_range+0x10c/0x1c0 [ 22.392457] __asan_memset+0x27/0x50 [ 22.392480] kmalloc_uaf_memset+0x1a3/0x360 [ 22.392500] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 22.392522] ? __pfx_kmalloc_uaf_memset+0x10/0x10 [ 22.392546] kunit_try_run_case+0x1a5/0x480 [ 22.392570] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.392592] ? _raw_spin_lock_irqsave+0xa1/0x100 [ 22.392618] ? _raw_spin_unlock_irqrestore+0x5f/0x90 [ 22.392643] ? __kthread_parkme+0x82/0x180 [ 22.392663] ? preempt_count_sub+0x50/0x80 [ 22.392686] ? __pfx_kunit_try_run_case+0x10/0x10 [ 22.392709] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.392732] ? __pfx_kunit_generic_run_threadfn_adapter+0x10/0x10 [ 22.392755] kthread+0x337/0x6f0 [ 22.392774] ? trace_preempt_on+0x20/0xc0 [ 22.392809] ? __pfx_kthread+0x10/0x10 [ 22.392829] ? _raw_spin_unlock_irq+0x47/0x80 [ 22.392853] ? calculate_sigpending+0x7b/0xa0 [ 22.392875] ? __pfx_kthread+0x10/0x10 [ 22.392897] ret_from_fork+0x116/0x1d0 [ 22.392917] ? __pfx_kthread+0x10/0x10 [ 22.392938] ret_from_fork_asm+0x1a/0x30 [ 22.392969] </TASK> [ 22.392980] [ 22.402434] Allocated by task 215: [ 22.402644] kasan_save_stack+0x45/0x70 [ 22.402959] kasan_save_track+0x18/0x40 [ 22.403359] kasan_save_alloc_info+0x3b/0x50 [ 22.403571] __kasan_kmalloc+0xb7/0xc0 [ 22.403904] __kmalloc_cache_noprof+0x189/0x420 [ 22.404254] kmalloc_uaf_memset+0xa9/0x360 [ 22.404437] kunit_try_run_case+0x1a5/0x480 [ 22.404740] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.405058] kthread+0x337/0x6f0 [ 22.405284] ret_from_fork+0x116/0x1d0 [ 22.405439] ret_from_fork_asm+0x1a/0x30 [ 22.405619] [ 22.405709] Freed by task 215: [ 22.405841] kasan_save_stack+0x45/0x70 [ 22.406436] kasan_save_track+0x18/0x40 [ 22.406612] kasan_save_free_info+0x3f/0x60 [ 22.407110] __kasan_slab_free+0x56/0x70 [ 22.407312] kfree+0x222/0x3f0 [ 22.407428] kmalloc_uaf_memset+0x12b/0x360 [ 22.407633] kunit_try_run_case+0x1a5/0x480 [ 22.408431] kunit_generic_run_threadfn_adapter+0x85/0xf0 [ 22.408663] kthread+0x337/0x6f0 [ 22.408837] ret_from_fork+0x116/0x1d0 [ 22.409303] ret_from_fork_asm+0x1a/0x30 [ 22.409482] [ 22.409580] The buggy address belongs to the object at ffff888103ae5280 [ 22.409580] which belongs to the cache kmalloc-64 of size 64 [ 22.410069] The buggy address is located 0 bytes inside of [ 22.410069] freed 64-byte region [ffff888103ae5280, ffff888103ae52c0) [ 22.410545] [ 22.410632] The buggy address belongs to the physical page: [ 22.410862] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x103ae5 [ 22.411691] flags: 0x200000000000000(node=0|zone=2) [ 22.411885] page_type: f5(slab) [ 22.412413] raw: 0200000000000000 ffff8881000418c0 dead000000000122 0000000000000000 [ 22.412843] raw: 0000000000000000 0000000080200020 00000000f5000000 0000000000000000 [ 22.413301] page dumped because: kasan: bad access detected [ 22.413597] [ 22.413750] Memory state around the buggy address: [ 22.414333] ffff888103ae5180: 00 00 00 00 00 fc fc fc fc fc fc fc fc fc fc fc [ 22.414613] ffff888103ae5200: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.415327] >ffff888103ae5280: fa fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc [ 22.415633] ^ [ 22.415956] ffff888103ae5300: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.416312] ffff888103ae5380: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc [ 22.416681] ==================================================================