[v6.1] possible deadlock in process_measurement

12 views
Skip to first unread message

syzbot

unread,
Sep 1, 2023, 8:54:53 PM9/1/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: a2943d2d9a00 Linux 6.1.50
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13997387a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=bbd1612e7e5e605c
dashboard link: https://syzkaller.appspot.com/bug?extid=78eb33cdf1c121f4c30e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/533ea1c74b65/disk-a2943d2d.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9f5e91b6c37c/vmlinux-a2943d2d.xz
kernel image: https://storage.googleapis.com/syzbot-assets/bfd7a380f68a/bzImage-a2943d2d.xz

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

======================================================
WARNING: possible circular locking dependency detected
6.1.50-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.4/23243 is trying to acquire lock:
ffff888029733980 (&iint->mutex){+.+.}-{3:3}, at: process_measurement+0x7fe/0x1cf0 security/integrity/ima/ima_main.c:260

but task is already holding lock:
ffff888023784460 (sb_writers#19){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sb_writers#19){.+.+}-{0:0}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
__sb_start_write include/linux/fs.h:1832 [inline]
sb_start_write+0x4d/0x1c0 include/linux/fs.h:1907
mnt_want_write+0x3b/0x80 fs/namespace.c:393
ovl_maybe_copy_up+0x111/0x180 fs/overlayfs/copy_up.c:1089
ovl_open+0x108/0x2a0 fs/overlayfs/file.c:153
do_dentry_open+0x7f9/0x10f0 fs/open.c:882
vfs_open fs/open.c:1013 [inline]
dentry_open+0xc1/0x120 fs/open.c:1029
ima_calc_file_hash+0x159/0x1c00 security/integrity/ima/ima_crypto.c:558
ima_collect_measurement+0x4d4/0x970 security/integrity/ima/ima_api.c:292
process_measurement+0x1018/0x1cf0 security/integrity/ima/ima_main.c:337
ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:520
do_open fs/namei.c:3559 [inline]
path_openat+0x2687/0x2e60 fs/namei.c:3714
do_filp_open+0x230/0x480 fs/namei.c:3741
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&iint->mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3098 [inline]
check_prevs_add kernel/locking/lockdep.c:3217 [inline]
validate_chain+0x1667/0x58e0 kernel/locking/lockdep.c:3832
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5056
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
__mutex_lock_common+0x1d4/0x2520 kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
process_measurement+0x7fe/0x1cf0 security/integrity/ima/ima_main.c:260
ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:520
do_open fs/namei.c:3559 [inline]
path_openat+0x2687/0x2e60 fs/namei.c:3714
do_filp_open+0x230/0x480 fs/namei.c:3741
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(sb_writers#19);
lock(&iint->mutex);
lock(sb_writers#19);
lock(&iint->mutex);

*** DEADLOCK ***

1 lock held by syz-executor.4/23243:
#0: ffff888023784460 (sb_writers#19){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393

stack backtrace:
CPU: 0 PID: 23243 Comm: syz-executor.4 Not tainted 6.1.50-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
check_noncircular+0x2fa/0x3b0 kernel/locking/lockdep.c:2178
check_prev_add kernel/locking/lockdep.c:3098 [inline]
check_prevs_add kernel/locking/lockdep.c:3217 [inline]
validate_chain+0x1667/0x58e0 kernel/locking/lockdep.c:3832
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5056
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5669
__mutex_lock_common+0x1d4/0x2520 kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
process_measurement+0x7fe/0x1cf0 security/integrity/ima/ima_main.c:260
ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:520
do_open fs/namei.c:3559 [inline]
path_openat+0x2687/0x2e60 fs/namei.c:3714
do_filp_open+0x230/0x480 fs/namei.c:3741
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f773ee7cae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f773fc3a0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007f773ef9c050 RCX: 00007f773ee7cae9
RDX: 000000000000275a RSI: 0000000020000040 RDI: ffffffffffffff9c
RBP: 00007f773eec847a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007f773ef9c050 R15: 00007fffe28de608
</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 syzk...@googlegroups.com.

syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.

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

If you want to overwrite bug's subsystems, reply with:
#syz set subsystems: new-subsystem
(See the list of subsystem names on the web dashboard)

If the bug is a duplicate of another bug, reply with:
#syz dup: exact-subject-of-another-report

If you want to undo deduplication, reply with:
#syz undup

syzbot

unread,
Sep 4, 2023, 3:52:52 AM9/4/23
to syzkaller...@googlegroups.com
Hello,

syzbot found the following issue on:

HEAD commit: 8f790700c974 Linux 5.15.130
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=119d7848680000
kernel config: https://syzkaller.appspot.com/x/.config?x=a22cff001b9b10b3
dashboard link: https://syzkaller.appspot.com/bug?extid=797f2199fb8d6d24883b
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40

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

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/97d68b3e1757/disk-8f790700.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4ecbd3f0457b/vmlinux-8f790700.xz
kernel image: https://storage.googleapis.com/syzbot-assets/68019fbed619/bzImage-8f790700.xz

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

======================================================
WARNING: possible circular locking dependency detected
5.15.130-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor.5/15215 is trying to acquire lock:
ffff8880715debc0 (&iint->mutex){+.+.}-{3:3}, at: process_measurement+0x733/0x1d60 security/integrity/ima/ima_main.c:260

but task is already holding lock:
ffff88807f4c2460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sb_writers#5){.+.+}-{0:0}:
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
__sb_start_write include/linux/fs.h:1742 [inline]
sb_start_write+0x4f/0x1c0 include/linux/fs.h:1812
mnt_want_write+0x3b/0x80 fs/namespace.c:377
ovl_maybe_copy_up+0x111/0x180 fs/overlayfs/copy_up.c:1076
ovl_open+0xa4/0x200 fs/overlayfs/file.c:150
do_dentry_open+0x807/0xfb0 fs/open.c:826
vfs_open fs/open.c:956 [inline]
dentry_open+0xc6/0x120 fs/open.c:972
ima_calc_file_hash+0x15f/0x1c00 security/integrity/ima/ima_crypto.c:558
ima_collect_measurement+0x293/0x530 security/integrity/ima/ima_api.c:254
process_measurement+0x1038/0x1d60 security/integrity/ima/ima_main.c:337
ima_file_check+0xf3/0x180 security/integrity/ima/ima_main.c:519
do_open fs/namei.c:3540 [inline]
path_openat+0x2745/0x2f20 fs/namei.c:3672
do_filp_open+0x21c/0x460 fs/namei.c:3699
do_sys_openat2+0x13b/0x500 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_open fs/open.c:1235 [inline]
__se_sys_open fs/open.c:1231 [inline]
__x64_sys_open+0x221/0x270 fs/open.c:1231
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb

-> #0 (&iint->mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1646/0x58b0 kernel/locking/lockdep.c:3787
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
process_measurement+0x733/0x1d60 security/integrity/ima/ima_main.c:260
ima_file_check+0xf3/0x180 security/integrity/ima/ima_main.c:519
do_open fs/namei.c:3540 [inline]
path_openat+0x2745/0x2f20 fs/namei.c:3672
do_filp_open+0x21c/0x460 fs/namei.c:3699
do_sys_openat2+0x13b/0x500 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_openat fs/open.c:1243 [inline]
__se_sys_openat fs/open.c:1238 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1238
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(sb_writers#5);
lock(&iint->mutex);
lock(sb_writers#5);
lock(&iint->mutex);

*** DEADLOCK ***

1 lock held by syz-executor.5/15215:
#0: ffff88807f4c2460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377

stack backtrace:
CPU: 0 PID: 15215 Comm: syz-executor.5 Not tainted 5.15.130-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133
check_prev_add kernel/locking/lockdep.c:3053 [inline]
check_prevs_add kernel/locking/lockdep.c:3172 [inline]
validate_chain+0x1646/0x58b0 kernel/locking/lockdep.c:3787
__lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5011
lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5622
__mutex_lock_common+0x1da/0x25a0 kernel/locking/mutex.c:596
__mutex_lock kernel/locking/mutex.c:729 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
process_measurement+0x733/0x1d60 security/integrity/ima/ima_main.c:260
ima_file_check+0xf3/0x180 security/integrity/ima/ima_main.c:519
do_open fs/namei.c:3540 [inline]
path_openat+0x2745/0x2f20 fs/namei.c:3672
do_filp_open+0x21c/0x460 fs/namei.c:3699
do_sys_openat2+0x13b/0x500 fs/open.c:1211
do_sys_open fs/open.c:1227 [inline]
__do_sys_openat fs/open.c:1243 [inline]
__se_sys_openat fs/open.c:1238 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1238
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x61/0xcb
RIP: 0033:0x7fc87fb9aae9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 e1 20 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fc87e0fb0c8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fc87fcba050 RCX: 00007fc87fb9aae9
RDX: 000000000000275a RSI: 0000000020000080 RDI: ffffffffffffff9c
RBP: 00007fc87fbe647a R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 000000000000006e R14: 00007fc87fcba050 R15: 00007fff4b7ce0c8

syzbot

unread,
Sep 4, 2023, 5:47:10 AM9/4/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 8f790700c974 Linux 5.15.130
git tree: linux-5.15.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13af7a57a80000
kernel config: https://syzkaller.appspot.com/x/.config?x=a22cff001b9b10b3
dashboard link: https://syzkaller.appspot.com/bug?extid=797f2199fb8d6d24883b
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10ea2ce7a80000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1334d868680000
mounted in repro: https://storage.googleapis.com/syzbot-assets/84e3b4632aad/mount_0.gz

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

======================================================
WARNING: possible circular locking dependency detected
5.15.130-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor298/3684 is trying to acquire lock:
ffff8880198e6740 (
&iint->mutex){+.+.}-{3:3}, at: process_measurement+0x733/0x1d60 security/integrity/ima/ima_main.c:260

but task is already holding lock:
ffff888023a72460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377
1 lock held by syz-executor298/3684:
#0: ffff888023a72460 (sb_writers#5){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:377

stack backtrace:
CPU: 1 PID: 3684 Comm: syz-executor298 Not tainted 5.15.130-syzkaller #0
RIP: 0033:0x7fde8d9cf5b9
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 18 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fde8656a218 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007fde8da5d6b8 RCX: 00007fde8d9cf5b9
RDX: 000000000000275a RSI: 0000000020000080 RDI: 00000000ffffff9c
RBP: 00007fde8da5d6b0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007fde8da298e0
R13: 0031656c69662f2e R14: 6e6f3d7865646e69 R15: 0079616c7265766f
</TASK>


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

syzbot

unread,
Sep 5, 2023, 11:51:27 AM9/5/23
to syzkaller...@googlegroups.com
syzbot suspects this issue could be fixed by backporting the following commit:

commit a0e6a017ab56936c0405fe914a793b241ed25ee0
git tree: upstream
Author: Maíra Canal <mca...@igalia.com>
Date: Tue May 23 12:32:08 2023 +0000

drm/vkms: Fix race-condition between the hrtimer and the atomic commit

bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=10a13f50680000
Please keep in mind that other backports might be required as well.

For information about bisection process see: https://goo.gl/tpsmEJ#bisection

syzbot

unread,
Sep 15, 2023, 5:02:01 AM9/15/23
to syzkaller...@googlegroups.com
syzbot has found a reproducer for the following issue on:

HEAD commit: 09045dae0d90 Linux 6.1.53
git tree: linux-6.1.y
console output: https://syzkaller.appspot.com/x/log.txt?x=13f95a72680000
kernel config: https://syzkaller.appspot.com/x/.config?x=195b6ef285251409
dashboard link: https://syzkaller.appspot.com/bug?extid=78eb33cdf1c121f4c30e
compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=10a023e8680000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=113df562680000

Downloadable assets:
disk image: https://storage.googleapis.com/syzbot-assets/c3b1bb820e74/disk-09045dae.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/4c5cfb0563d9/vmlinux-09045dae.xz
kernel image: https://storage.googleapis.com/syzbot-assets/c682edb60d96/bzImage-09045dae.xz

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

======================================================
WARNING: possible circular locking dependency detected
6.1.53-syzkaller #0 Not tainted
------------------------------------------------------
syz-executor231/3774 is trying to acquire lock:
ffff88807e8f23e0 (&iint->mutex){+.+.}-{3:3}, at: process_measurement+0x7fe/0x1cf0 security/integrity/ima/ima_main.c:260

but task is already holding lock:
ffff88814c972460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sb_writers#4){.+.+}-{0:0}:
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5661
percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
__sb_start_write include/linux/fs.h:1832 [inline]
sb_start_write+0x4d/0x1c0 include/linux/fs.h:1907
mnt_want_write+0x3b/0x80 fs/namespace.c:393
ovl_maybe_copy_up+0x111/0x180 fs/overlayfs/copy_up.c:1089
ovl_open+0x108/0x2a0 fs/overlayfs/file.c:153
do_dentry_open+0x7f9/0x10f0 fs/open.c:882
vfs_open fs/open.c:1013 [inline]
dentry_open+0xc1/0x120 fs/open.c:1029
ima_calc_file_hash+0x159/0x1c00 security/integrity/ima/ima_crypto.c:558
ima_collect_measurement+0x4d4/0x970 security/integrity/ima/ima_api.c:292
process_measurement+0x1018/0x1cf0 security/integrity/ima/ima_main.c:337
ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:520
do_open fs/namei.c:3559 [inline]
path_openat+0x2687/0x2e60 fs/namei.c:3714
do_filp_open+0x230/0x480 fs/namei.c:3741
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_open fs/open.c:1342 [inline]
__se_sys_open fs/open.c:1338 [inline]
__x64_sys_open+0x221/0x270 fs/open.c:1338
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd

-> #0 (&iint->mutex){+.+.}-{3:3}:
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1667/0x58e0 kernel/locking/lockdep.c:3824
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5048
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5661
__mutex_lock_common+0x1d4/0x2520 kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
process_measurement+0x7fe/0x1cf0 security/integrity/ima/ima_main.c:260
ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:520
do_open fs/namei.c:3559 [inline]
path_openat+0x2687/0x2e60 fs/namei.c:3714
do_filp_open+0x230/0x480 fs/namei.c:3741
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd

other info that might help us debug this:

Possible unsafe locking scenario:

CPU0 CPU1
---- ----
lock(sb_writers#4);
lock(&iint->mutex);
lock(sb_writers#4);
lock(&iint->mutex);

*** DEADLOCK ***

1 lock held by syz-executor231/3774:
#0: ffff88814c972460 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3b/0x80 fs/namespace.c:393

stack backtrace:
CPU: 1 PID: 3774 Comm: syz-executor231 Not tainted 6.1.53-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/04/2023
Call Trace:
<TASK>
__dump_stack lib/dump_stack.c:88 [inline]
dump_stack_lvl+0x1e3/0x2cb lib/dump_stack.c:106
check_noncircular+0x2fa/0x3b0 kernel/locking/lockdep.c:2170
check_prev_add kernel/locking/lockdep.c:3090 [inline]
check_prevs_add kernel/locking/lockdep.c:3209 [inline]
validate_chain+0x1667/0x58e0 kernel/locking/lockdep.c:3824
__lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5048
lock_acquire+0x1f8/0x5a0 kernel/locking/lockdep.c:5661
__mutex_lock_common+0x1d4/0x2520 kernel/locking/mutex.c:603
__mutex_lock kernel/locking/mutex.c:747 [inline]
mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:799
process_measurement+0x7fe/0x1cf0 security/integrity/ima/ima_main.c:260
ima_file_check+0xed/0x170 security/integrity/ima/ima_main.c:520
do_open fs/namei.c:3559 [inline]
path_openat+0x2687/0x2e60 fs/namei.c:3714
do_filp_open+0x230/0x480 fs/namei.c:3741
do_sys_openat2+0x13b/0x500 fs/open.c:1318
do_sys_open fs/open.c:1334 [inline]
__do_sys_openat fs/open.c:1350 [inline]
__se_sys_openat fs/open.c:1345 [inline]
__x64_sys_openat+0x243/0x290 fs/open.c:1345
do_syscall_x64 arch/x86/entry/common.c:50 [inline]
do_syscall_64+0x3d/0xb0 arch/x86/entry/common.c:80
entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7ff23630c899
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 a1 1a 00 00 90 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 b0 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ff2362cb218 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007ff2363963e8 RCX: 00007ff23630c899
RDX: 000000000000275a RSI: 0000000020000040 RDI: 00000000ffffff9c
RBP: 00007ff2363963e0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007ff2363632d4
R13: 0030656c69662f2e R14: 00737570635f6576 R15: 0079616c7265766f
Reply all
Reply to author
Forward
0 new messages