[moderation] [kernfs?] KCSAN: data-race in set_nlink / set_nlink

6 views
Skip to first unread message

syzbot

unread,
Dec 7, 2023, 7:02:35 PM12/7/23
to syzkaller-upst...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 9ace34a8e446 Merge tag 'cgroup-for-6.7-rc4-fixes' of git:/..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=10ac0736e80000
kernel config: https://syzkaller.appspot.com/x/.config?x=ac34c1f29a8029df
dashboard link: https://syzkaller.appspot.com/bug?extid=1b6aa3108f79850c5fa6
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
CC: [gre...@linuxfoundation.org linux-...@vger.kernel.org linux-...@vger.kernel.org t...@kernel.org]

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/955528ed37c5/disk-9ace34a8.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/ed03c0892611/vmlinux-9ace34a8.xz
kernel image: https://storage.googleapis.com/syzbot-assets/b4d56563956a/bzImage-9ace34a8.xz

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

==================================================================
BUG: KCSAN: data-race in set_nlink / set_nlink

write to 0xffff88812db86528 of 4 bytes by task 3339 on cpu 0:
set_nlink+0x98/0xb0 fs/inode.c:373
kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
kernfs_iop_permission+0x1dd/0x220 fs/kernfs/inode.c:288
do_inode_permission fs/namei.c:462 [inline]
inode_permission+0x184/0x300 fs/namei.c:529
may_lookup fs/namei.c:1724 [inline]
link_path_walk+0x19e/0x7e0 fs/namei.c:2271
path_openat+0x1a0/0x1d70 fs/namei.c:3775
do_filp_open+0xf6/0x200 fs/namei.c:3809
do_sys_openat2+0xab/0x110 fs/open.c:1440
do_sys_open fs/open.c:1455 [inline]
__do_sys_openat fs/open.c:1471 [inline]
__se_sys_openat fs/open.c:1466 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1466
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

read to 0xffff88812db86528 of 4 bytes by task 2782 on cpu 1:
set_nlink+0x2b/0xb0
kernfs_refresh_inode fs/kernfs/inode.c:180 [inline]
kernfs_iop_permission+0x1dd/0x220 fs/kernfs/inode.c:288
do_inode_permission fs/namei.c:462 [inline]
inode_permission+0x184/0x300 fs/namei.c:529
may_lookup fs/namei.c:1724 [inline]
link_path_walk+0x19e/0x7e0 fs/namei.c:2271
path_openat+0x1a0/0x1d70 fs/namei.c:3775
do_filp_open+0xf6/0x200 fs/namei.c:3809
do_sys_openat2+0xab/0x110 fs/open.c:1440
do_sys_open fs/open.c:1455 [inline]
__do_sys_openat fs/open.c:1471 [inline]
__se_sys_openat fs/open.c:1466 [inline]
__x64_sys_openat+0xf3/0x120 fs/open.c:1466
do_syscall_x64 arch/x86/entry/common.c:52 [inline]
do_syscall_64+0x44/0x110 arch/x86/entry/common.c:83
entry_SYSCALL_64_after_hwframe+0x63/0x6b

value changed: 0x00000004 -> 0x00000003

Reported by Kernel Concurrency Sanitizer on:
CPU: 1 PID: 2782 Comm: udevd Not tainted 6.7.0-rc4-syzkaller-00039-g9ace34a8e446 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
==================================================================


---
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