[moderation] [i2c?] WARNING: refcount bug in i2c_get_adapter (2)

1 view
Skip to first unread message

syzbot

unread,
Mar 23, 2026, 8:05:37 PM (11 hours ago) Mar 23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: c612261bedd6 Merge tag 'io_uring-7.0-20260320' of git://gi..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=11a960ca580000
kernel config: https://syzkaller.appspot.com/x/.config?x=45cb3c58fd963c27
dashboard link: https://syzkaller.appspot.com/bug?extid=8c70254ca4923b1d494b
compiler: Debian clang version 21.1.8 (++20251221033036+2078da43e25a-1~exp1~20251221153213.50), Debian LLD 21.1.8
CC: [linu...@vger.kernel.org linux-...@vger.kernel.org wsa+r...@sang-engineering.com]

Unfortunately, I don't have any reproducer for this issue yet.

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c49e0ba4f48f/disk-c612261b.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4f0c24b72eda/vmlinux-c612261b.xz
kernel image: https://storage.googleapis.com/syzbot-assets/3c41cc7611e2/bzImage-c612261b.xz

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+8c7025...@syzkaller.appspotmail.com

------------[ cut here ]------------
refcount_t: addition on 0; use-after-free.
WARNING: lib/refcount.c:25 at refcount_warn_saturate+0x9f/0x110 lib/refcount.c:25, CPU#1: syz.4.1001/8081
Modules linked in:
CPU: 1 UID: 0 PID: 8081 Comm: syz.4.1001 Not tainted syzkaller #0 PREEMPT_{RT,(full)}
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2026
RIP: 0010:refcount_warn_saturate+0x9f/0x110 lib/refcount.c:25
Code: eb 66 85 db 74 3e 83 fb 01 75 4c e8 8b 64 26 fd 48 8d 3d 94 65 d6 0a 67 48 0f b9 3a eb 4a e8 78 64 26 fd 48 8d 3d 91 65 d6 0a <67> 48 0f b9 3a eb 37 e8 65 64 26 fd 48 8d 3d 8e 65 d6 0a 67 48 0f
RSP: 0018:ffffc9000e02f6d8 EFLAGS: 00010283
RAX: ffffffff849e12a8 RBX: 0000000000000002 RCX: 0000000000080000
RDX: ffffc9000f233000 RSI: 000000000000071b RDI: ffffffff8f747840
RBP: 0000000000000000 R08: ffff88803bccbd00 R09: 0000000000000005
R10: 0000000000000100 R11: 0000000000000004 R12: ffffffff8c049348
R13: dffffc0000000000 R14: ffff8880607f1188 R15: dffffc0000000000
FS: 00007f9af098e6c0(0000) GS:ffff88812643c000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000001b2ef20ff8 CR3: 000000004ecd4000 CR4: 00000000003526f0
Call Trace:
<TASK>
__refcount_add include/linux/refcount.h:-1 [inline]
__refcount_inc include/linux/refcount.h:366 [inline]
refcount_inc include/linux/refcount.h:383 [inline]
kref_get include/linux/kref.h:45 [inline]
kobject_get+0xfa/0x120 lib/kobject.c:643
i2c_get_adapter+0x6d/0xa0 drivers/i2c/i2c-core-base.c:2612
i2cdev_open+0x48/0x190 drivers/i2c/i2c-dev.c:603
chrdev_open+0x4d0/0x5f0 fs/char_dev.c:411
do_dentry_open+0x83d/0x13e0 fs/open.c:949
vfs_open+0x3b/0x350 fs/open.c:1081
do_open fs/namei.c:4671 [inline]
path_openat+0x2e43/0x38a0 fs/namei.c:4830
do_file_open+0x23e/0x4a0 fs/namei.c:4859
do_sys_openat2+0x113/0x200 fs/open.c:1366
do_sys_open fs/open.c:1372 [inline]
__do_sys_openat fs/open.c:1388 [inline]
__se_sys_openat fs/open.c:1383 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1383
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0x14d/0xf80 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f9af26fcfce
Code: 08 0f 85 a5 a8 ff ff 49 89 fb 48 89 f0 48 89 d7 48 89 ce 4c 89 c2 4d 89 ca 4c 8b 44 24 08 4c 8b 4c 24 10 4c 89 5c 24 08 0f 05 <c3> 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 80 00 00 00 00 48 83 ec 08
RSP: 002b:00007f9af098db28 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f9af098e6c0 RCX: 00007f9af26fcfce
RDX: 0000000000002003 RSI: 00007f9af098dc00 RDI: ffffffffffffff9c
RBP: 00007f9af098dc00 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: cccccccccccccccd
R13: 00007f9af29b6038 R14: 00007f9af29b5fa0 R15: 00007fffd0b11c68
</TASK>
----------------
Code disassembly (best guess):
0: eb 66 jmp 0x68
2: 85 db test %ebx,%ebx
4: 74 3e je 0x44
6: 83 fb 01 cmp $0x1,%ebx
9: 75 4c jne 0x57
b: e8 8b 64 26 fd call 0xfd26649b
10: 48 8d 3d 94 65 d6 0a lea 0xad66594(%rip),%rdi # 0xad665ab
17: 67 48 0f b9 3a ud1 (%edx),%rdi
1c: eb 4a jmp 0x68
1e: e8 78 64 26 fd call 0xfd26649b
23: 48 8d 3d 91 65 d6 0a lea 0xad66591(%rip),%rdi # 0xad665bb
* 2a: 67 48 0f b9 3a ud1 (%edx),%rdi <-- trapping instruction
2f: eb 37 jmp 0x68
31: e8 65 64 26 fd call 0xfd26649b
36: 48 8d 3d 8e 65 d6 0a lea 0xad6658e(%rip),%rdi # 0xad665cb
3d: 67 addr32
3e: 48 rex.W
3f: 0f .byte 0xf


---
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
Reply all
Reply to author
Forward
0 new messages