Hello,
syzbot found the following issue on:
HEAD commit: faeab166167f Merge tag 'pinctrl-v7.1-1' of git://git.kerne..
git tree: upstream
console output:
https://syzkaller.appspot.com/x/log.txt?x=15259906580000
kernel config:
https://syzkaller.appspot.com/x/.config?x=ee80db3558490125
dashboard link:
https://syzkaller.appspot.com/bug?extid=293fd2dc7dc96ba80fd6
compiler: gcc (Debian 14.2.0-19) 14.2.0, GNU ld (GNU Binutils for Debian) 2.44
CC: [
ak...@linux-foundation.org axelra...@google.com bao...@kernel.org b...@redhat.com chr...@kernel.org kas...@tencent.com linux-...@vger.kernel.org linu...@kvack.org nph...@gmail.com shik...@huaweicloud.com wei...@google.com youngj...@lge.com yua...@google.com]
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image:
https://storage.googleapis.com/syzbot-assets/c02fad232330/disk-faeab166.raw.xz
vmlinux:
https://storage.googleapis.com/syzbot-assets/8be6f4da9dd3/vmlinux-faeab166.xz
kernel image:
https://storage.googleapis.com/syzbot-assets/307fe2ace209/bzImage-faeab166.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by:
syzbot+293fd2...@syzkaller.appspotmail.com
==================================================================
BUG: KASAN: slab-use-after-free in __debug_check_no_obj_freed lib/debugobjects.c:1106 [inline]
BUG: KASAN: slab-use-after-free in debug_check_no_obj_freed+0x2f0/0x630 lib/debugobjects.c:1146
Read of size 8 at addr ffff888023730001 by task syz.0.541/8364
CPU: 0 UID: 0 PID: 8364 Comm: syz.0.541 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 03/18/2026
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
print_address_description mm/kasan/report.c:378 [inline]
print_report+0x13d/0x4b0 mm/kasan/report.c:482
kasan_report+0xdf/0x1d0 mm/kasan/report.c:595
__debug_check_no_obj_freed lib/debugobjects.c:1106 [inline]
debug_check_no_obj_freed+0x2f0/0x630 lib/debugobjects.c:1146
__free_pages_prepare mm/page_alloc.c:1401 [inline]
free_unref_folios+0x441/0x16f0 mm/page_alloc.c:2996
folios_put_refs+0x53c/0x840 mm/swap.c:1002
folio_batch_release include/linux/folio_batch.h:101 [inline]
shmem_undo_range+0x5e5/0x1570 mm/shmem.c:1149
shmem_truncate_range mm/shmem.c:1277 [inline]
shmem_evict_inode+0x3f3/0xc40 mm/shmem.c:1407
evict+0x3c2/0xad0 fs/inode.c:841
iput_final fs/inode.c:1960 [inline]
iput.part.0+0x605/0xf50 fs/inode.c:2009
iput+0x35/0x40 fs/inode.c:1975
dentry_unlink_inode+0x2a1/0x490 fs/dcache.c:467
__dentry_kill+0x1d0/0x600 fs/dcache.c:670
finish_dput+0x76/0x480 fs/dcache.c:879
dput.part.0+0x456/0x570 fs/dcache.c:928
dput+0x1f/0x30 fs/dcache.c:920
__fput+0x519/0xb50 fs/file_table.c:518
task_work_run+0x150/0x240 kernel/task_work.c:233
exit_task_work include/linux/task_work.h:40 [inline]
do_exit+0x8d2/0x2a60 kernel/exit.c:975
do_group_exit+0xd5/0x2a0 kernel/exit.c:1117
get_signal+0x1ec7/0x21e0 kernel/signal.c:3037
arch_do_signal_or_restart+0x91/0x770 arch/x86/kernel/signal.c:337
__exit_to_user_mode_loop kernel/entry/common.c:64 [inline]
exit_to_user_mode_loop kernel/entry/common.c:98 [inline]
__exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline]
irqentry_exit_to_user_mode_prepare include/linux/irq-entry-common.h:252 [inline]
irqentry_exit_to_user_mode include/linux/irq-entry-common.h:323 [inline]
irqentry_exit+0x403/0x790 kernel/entry/common.c:162
asm_exc_page_fault+0x26/0x30 arch/x86/include/asm/idtentry.h:618
RIP: 0033:0x7faad639c821
Code: Unable to access opcode bytes at 0x7faad639c7f7.
RSP: 002b:0000000080000001 EFLAGS: 00010217
RAX: 0000000000000000 RBX: 00007faad6615fa0 RCX: 00007faad639c819
RDX: 0000200000000040 RSI: 0000000080000001 RDI: 0000000000000009
RBP: 00007faad6432c91 R08: 0000000000000008 R09: 0000000000000000
R10: 0000200000000340 R11: 0000000000000246 R12: 0000000000000000
R13: 00007faad6616038 R14: 00007faad6615fa0 R15: 00007ffc4eb1d228
</TASK>
Allocated by task 8326:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
poison_kmalloc_redzone mm/kasan/common.c:398 [inline]
__kasan_kmalloc+0xaa/0xb0 mm/kasan/common.c:415
kasan_kmalloc include/linux/kasan.h:263 [inline]
__do_kmalloc_node mm/slub.c:5295 [inline]
__kmalloc_noprof+0x301/0x850 mm/slub.c:5307
kmalloc_noprof include/linux/slab.h:954 [inline]
tomoyo_realpath_from_path+0xb6/0x690 security/tomoyo/realpath.c:251
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_number_perm+0x23c/0x580 security/tomoyo/file.c:728
security_file_ioctl+0xd3/0x230 security/security.c:2512
__do_sys_ioctl fs/ioctl.c:591 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0xb7/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Freed by task 8326:
kasan_save_stack+0x30/0x50 mm/kasan/common.c:57
kasan_save_track+0x14/0x30 mm/kasan/common.c:78
kasan_save_free_info+0x3b/0x70 mm/kasan/generic.c:584
poison_slab_object mm/kasan/common.c:253 [inline]
__kasan_slab_free+0x5f/0x80 mm/kasan/common.c:285
kasan_slab_free include/linux/kasan.h:235 [inline]
slab_free_hook mm/slub.c:2689 [inline]
slab_free mm/slub.c:6246 [inline]
kfree+0x223/0x6c0 mm/slub.c:6561
tomoyo_realpath_from_path+0x19c/0x690 security/tomoyo/realpath.c:286
tomoyo_get_realpath security/tomoyo/file.c:151 [inline]
tomoyo_path_number_perm+0x23c/0x580 security/tomoyo/file.c:728
security_file_ioctl+0xd3/0x230 security/security.c:2512
__do_sys_ioctl fs/ioctl.c:591 [inline]
__se_sys_ioctl fs/ioctl.c:583 [inline]
__x64_sys_ioctl+0xb7/0x210 fs/ioctl.c:583
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
The buggy address belongs to the object at ffff888023730000
which belongs to the cache kmalloc-4k of size 4096
The buggy address is located 1 bytes inside of
freed 4096-byte region [ffff888023730000, ffff888023731000)
The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x23730
head: order:3 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0xfff00000000040(head|node=0|zone=1|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 00fff00000000040 ffff88813fe88140 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800040004 00000000f5000000 0000000000000000
head: 00fff00000000040 ffff88813fe88140 dead000000000100 dead000000000122
head: 0000000000000000 0000000800040004 00000000f5000000 0000000000000000
head: 00fff00000000003 fffffffffffffe01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000008
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 3, migratetype Unmovable, gfp_mask 0xd2820(GFP_ATOMIC|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 13, tgid 13 (kworker/u8:1), ts 127298147177, free_ts 126261801480
set_page_owner include/linux/page_owner.h:32 [inline]
post_alloc_hook+0x153/0x170 mm/page_alloc.c:1850
prep_new_page mm/page_alloc.c:1858 [inline]
get_page_from_freelist+0x11a6/0x33b0 mm/page_alloc.c:3938
__alloc_frozen_pages_noprof+0x27c/0x2bc0 mm/page_alloc.c:5218
alloc_slab_page mm/slub.c:3278 [inline]
allocate_slab mm/slub.c:3467 [inline]
new_slab+0xa6/0x6c0 mm/slub.c:3525
refill_objects+0x277/0x420 mm/slub.c:7251
refill_sheaf mm/slub.c:2816 [inline]
__pcs_replace_empty_main+0x375/0x650 mm/slub.c:4651
alloc_from_pcs mm/slub.c:4749 [inline]
slab_alloc_node mm/slub.c:4883 [inline]
__do_kmalloc_node mm/slub.c:5294 [inline]
__kmalloc_node_track_caller_noprof+0x694/0x850 mm/slub.c:5403
kmalloc_reserve+0xe8/0x350 net/core/skbuff.c:635
__alloc_skb+0x185/0x710 net/core/skbuff.c:713
alloc_skb include/linux/skbuff.h:1383 [inline]
nsim_dev_trap_skb_build drivers/net/netdevsim/dev.c:819 [inline]
nsim_dev_trap_report drivers/net/netdevsim/dev.c:876 [inline]
nsim_dev_trap_report_work+0x2af/0xd10 drivers/net/netdevsim/dev.c:922
process_one_work+0xa0e/0x1980 kernel/workqueue.c:3302
process_scheduled_works kernel/workqueue.c:3385 [inline]
worker_thread+0x5ef/0xe50 kernel/workqueue.c:3466
kthread+0x370/0x450 kernel/kthread.c:436
ret_from_fork+0x72b/0xd50 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
page last free pid 6627 tgid 6623 stack trace:
reset_page_owner include/linux/page_owner.h:25 [inline]
__free_pages_prepare mm/page_alloc.c:1394 [inline]
__free_frozen_pages+0x747/0x1040 mm/page_alloc.c:2935
qlink_free mm/kasan/quarantine.c:163 [inline]
qlist_free_all+0x47/0xf0 mm/kasan/quarantine.c:179
kasan_quarantine_reduce+0x1a0/0x1f0 mm/kasan/quarantine.c:286
__kasan_slab_alloc+0x69/0x90 mm/kasan/common.c:350
kasan_slab_alloc include/linux/kasan.h:253 [inline]
slab_post_alloc_hook mm/slub.c:4569 [inline]
slab_alloc_node mm/slub.c:4898 [inline]
__do_kmalloc_node mm/slub.c:5294 [inline]
__kmalloc_noprof+0x2b9/0x850 mm/slub.c:5307
kmalloc_noprof include/linux/slab.h:954 [inline]
kzalloc_noprof include/linux/slab.h:1188 [inline]
iter_file_splice_write+0x1d8/0x10a0 fs/splice.c:678
do_splice_from fs/splice.c:936 [inline]
direct_splice_actor+0x192/0x6c0 fs/splice.c:1159
splice_direct_to_actor+0x345/0xa30 fs/splice.c:1103
do_splice_direct_actor fs/splice.c:1202 [inline]
do_splice_direct+0x174/0x240 fs/splice.c:1228
do_sendfile+0xadc/0xe20 fs/read_write.c:1372
__do_sys_sendfile64 fs/read_write.c:1433 [inline]
__se_sys_sendfile64 fs/read_write.c:1419 [inline]
__x64_sys_sendfile64+0x1d8/0x220 fs/read_write.c:1419
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x10b/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
Memory state around the buggy address:
ffff88802372ff00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
ffff88802372ff80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>ffff888023730000: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
^
ffff888023730080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
ffff888023730100: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
---
This report is generated by a bot. It may contain errors.
See
https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at
syzk...@googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title
If you want to overwrite report's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)
If the report is a duplicate of another one, reply with:
#syz dup: exact-subject-of-another-report
If you want to undo deduplication, reply with:
#syz undup