linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: syzbot <syzbot+5b19bad23ac7f44bf8b8@syzkaller.appspotmail.com>
To: Liam.Howlett@oracle.com, akpm@linux-foundation.org,
	 liam.howlett@oracle.com, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org,  lorenzo.stoakes@oracle.com,
	shakeel.butt@linux.dev, surenb@google.com,
	 syzkaller-bugs@googlegroups.com, vbabka@suse.cz,
	willy@infradead.org
Subject: [syzbot] [mm?] WARNING: refcount bug in __vma_enter_locked
Date: Mon, 24 Nov 2025 19:20:22 -0800	[thread overview]
Message-ID: <69252076.a70a0220.d98e3.009b.GAE@google.com> (raw)

Hello,

syzbot found the following issue on:

HEAD commit:    88cbd8ac379c Add linux-next specific files for 20251120
git tree:       linux-next
console output: https://syzkaller.appspot.com/x/log.txt?x=114d9a12580000
kernel config:  https://syzkaller.appspot.com/x/.config?x=270004e181b25d45
dashboard link: https://syzkaller.appspot.com/bug?extid=5b19bad23ac7f44bf8b8
compiler:       Debian clang version 20.1.8 (++20250708063551+0c9f909b7976-1~exp1~20250708183702.136), Debian LLD 20.1.8
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=147e7a12580000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=11b3d658580000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/7d546d2103e3/disk-88cbd8ac.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/af9601889c35/vmlinux-88cbd8ac.xz
kernel image: https://storage.googleapis.com/syzbot-assets/7747417abb8f/bzImage-88cbd8ac.xz

The issue was bisected to:

commit c52a4e7b13eaa55a2c4bb08488b2cf9bd188ea85
Author: Matthew Wilcox (Oracle) <willy@infradead.org>
Date:   Mon Nov 10 20:32:02 2025 +0000

    mm: use vma_start_write_killable() in dup_mmap()

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=13e9da12580000
final oops:     https://syzkaller.appspot.com/x/report.txt?x=1019da12580000
console output: https://syzkaller.appspot.com/x/log.txt?x=17e9da12580000

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+5b19bad23ac7f44bf8b8@syzkaller.appspotmail.com
Fixes: c52a4e7b13ea ("mm: use vma_start_write_killable() in dup_mmap()")

------------[ cut here ]------------
refcount_t: saturated; leaking memory.
WARNING: lib/refcount.c:19 at refcount_warn_saturate+0x13a/0x1d0 lib/refcount.c:19, CPU#1: syz.0.48/6130
Modules linked in:
CPU: 1 UID: 0 PID: 6130 Comm: syz.0.48 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:refcount_warn_saturate+0x13a/0x1d0 lib/refcount.c:19
Code: e0 cd be 8b e8 17 da f3 fc 90 0f 0b 90 90 eb b7 e8 fb be 31 fd c6 05 39 0d d8 0a 01 90 48 c7 c7 20 cd be 8b e8 f7 d9 f3 fc 90 <0f> 0b 90 90 eb 97 e8 db be 31 fd c6 05 1d 0d d8 0a 01 90 48 c7 c7
RSP: 0018:ffffc9000411f568 EFLAGS: 00010246
RAX: df83eb6d8e87c500 RBX: 0000000000000000 RCX: ffff8880790bbd00
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000002
RBP: ffffc9000411f690 R08: ffff8880b87247d3 R09: 1ffff110170e48fa
R10: dffffc0000000000 R11: ffffed10170e48fb R12: ffff888025562a80
R13: 1ffff92000823ec0 R14: ffff888025562a80 R15: 0000000000000000
FS:  00007fdb5cf9a6c0(0000) GS:ffff888125fb9000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fdb5cf99f98 CR3: 00000000289ea000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 __refcount_add_not_zero include/linux/refcount.h:187 [inline]
 refcount_add_not_zero include/linux/refcount.h:212 [inline]
 __vma_enter_locked+0x593/0x5d0 mm/mmap_lock.c:67
 __vma_start_write+0x23/0x140 mm/mmap_lock.c:99
 vma_start_write include/linux/mmap_lock.h:213 [inline]
 vma_merge_existing_range mm/vma.c:900 [inline]
 vma_modify+0xf62/0x1a70 mm/vma.c:1611
 vma_modify_flags_uffd+0x204/0x250 mm/vma.c:1704
 userfaultfd_clear_vma mm/userfaultfd.c:1997 [inline]
 userfaultfd_release_all+0x34c/0x5d0 mm/userfaultfd.c:2116
 userfaultfd_release+0xe7/0x1b0 fs/userfaultfd.c:887
 __fput+0x44c/0xa70 fs/file_table.c:468
 task_work_run+0x1d4/0x260 kernel/task_work.c:233
 get_signal+0x11ec/0x1340 kernel/signal.c:2807
 arch_do_signal_or_restart+0x9a/0x7a0 arch/x86/kernel/signal.c:337
 __exit_to_user_mode_loop kernel/entry/common.c:41 [inline]
 exit_to_user_mode_loop+0x87/0x4f0 kernel/entry/common.c:75
 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:226 [inline]
 syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:256 [inline]
 syscall_exit_to_user_mode_work include/linux/entry-common.h:159 [inline]
 syscall_exit_to_user_mode include/linux/entry-common.h:194 [inline]
 do_syscall_64+0x2e9/0xfa0 arch/x86/entry/syscall_64.c:100
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fdb5c18f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fdb5cf9a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: fffffffffffffffc RBX: 00007fdb5c3e5fa0 RCX: 00007fdb5c18f749
RDX: 0000200000000100 RSI: 00000000c028aa05 RDI: 0000000000000003
RBP: 00007fdb5c213f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fdb5c3e6038 R14: 00007fdb5c3e5fa0 R15: 00007fff2e39e5c8
 </TASK>


---
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 syzkaller@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection

If the report is already addressed, let syzbot know by replying with:
#syz fix: exact-commit-title

If you want syzbot to run the reproducer, reply with:
#syz test: git://repo/address.git branch-or-commit-hash
If you attach or paste a git patch, syzbot will apply it before testing.

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


             reply	other threads:[~2025-11-25  3:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25  3:20 syzbot [this message]
2025-11-25  4:27 ` Matthew Wilcox
2025-11-25  4:55   ` syzbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=69252076.a70a0220.d98e3.009b.GAE@google.com \
    --to=syzbot+5b19bad23ac7f44bf8b8@syzkaller.appspotmail.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=shakeel.butt@linux.dev \
    --cc=surenb@google.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox