syzbot


possible deadlock in process_measurement (3)

Status: closed as dup on 2023/06/06 09:59
Subsystems: overlayfs
[Documentation on labels]
Reported-by: syzbot+ccfcdc8958f74084f16d@syzkaller.appspotmail.com
First crash: 1245d, last: 336d
Cause bisection: failed (error log, bisect log)
  
Duplicate of
Title Repro Cause bisect Fix bisect Count Last Reported
possible deadlock in mnt_want_write (2) integrity overlayfs C done 867 338d 1206d
Discussions (2)
Title Replies (including bot) Last reply
[syzbot] [ext4] Monthly Report 0 (1) 2023/03/24 15:59
[syzbot] possible deadlock in process_measurement (3) 0 (1) 2021/05/10 12:19
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in process_measurement (4) integrity lsm C done 2676 now 6d05h 0/28 upstream: reported C repro on 2024/09/28 07:32
upstream possible deadlock in process_measurement (2) integrity lsm C done done 56 1400d 1767d 15/28 fixed on 2021/01/06 01:14
linux-4.19 possible deadlock in process_measurement 156 751d 1723d 0/1 auto-obsoleted due to no activity on 2023/01/11 22:20
upstream possible deadlock in process_measurement lsm integrity C 51 1948d 2180d 0/28 closed as invalid on 2019/07/15 16:35
linux-6.1 possible deadlock in process_measurement origin:lts-only C unreliable 8 320d 398d 0/3 upstream: reported C repro on 2023/09/02 00:54
linux-5.15 possible deadlock in process_measurement origin:lts-only C done 4 320d 396d 0/3 auto-obsoleted due to no activity on 2024/10/03 14:31
Last patch testing requests (1)
Created Duration User Patch Repo Result
2021/11/16 14:11 11m phind.uet@gmail.com linux-next report log
Fix bisection attempts (2)
Created Duration User Patch Repo Result
2021/11/07 14:08 20m bisect fix upstream OK (0) job log log
2021/08/15 19:59 19m bisect fix upstream OK (0) job log log

Sample crash report:
======================================================
WARNING: possible circular locking dependency detected
6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #0 Not tainted
------------------------------------------------------
syz-executor284/5062 is trying to acquire lock:
ffff8880256a3e00 (&iint->mutex){+.+.}-{3:3}, at: process_measurement+0x7c9/0x1cf0 security/integrity/ima/ima_main.c:266

but task is already holding lock:
ffff88814be9a410 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:403

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 (sb_writers#4){.+.+}-{0:0}:
       percpu_down_read include/linux/percpu-rwsem.h:51 [inline]
       __sb_start_write include/linux/fs.h:1600 [inline]
       sb_start_write+0x4d/0x1c0 include/linux/fs.h:1675
       mnt_want_write+0x3f/0x90 fs/namespace.c:403
       ovl_maybe_copy_up+0x115/0x180 fs/overlayfs/copy_up.c:1176
       ovl_open+0x12b/0x310 fs/overlayfs/file.c:166
       do_dentry_open+0x80f/0x1430 fs/open.c:929
       vfs_open fs/open.c:1063 [inline]
       dentry_open+0xcb/0x120 fs/open.c:1079
       ima_calc_file_hash+0x166/0x1d20 security/integrity/ima/ima_crypto.c:558
       ima_collect_measurement+0x4a5/0x890 security/integrity/ima/ima_api.c:289
       process_measurement+0xfea/0x1cf0 security/integrity/ima/ima_main.c:345
       ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:543
       do_open fs/namei.c:3641 [inline]
       path_openat+0x2812/0x3180 fs/namei.c:3796
       do_filp_open+0x234/0x490 fs/namei.c:3823
       do_sys_openat2+0x13e/0x1d0 fs/open.c:1422
       do_sys_open fs/open.c:1437 [inline]
       __do_sys_open fs/open.c:1445 [inline]
       __se_sys_open fs/open.c:1441 [inline]
       __x64_sys_open+0x225/0x270 fs/open.c:1441
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x41/0xc0 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:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3868 [inline]
       __lock_acquire+0x39ff/0x7f70 kernel/locking/lockdep.c:5136
       lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5753
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747
       process_measurement+0x7c9/0x1cf0 security/integrity/ima/ima_main.c:266
       ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:543
       do_open fs/namei.c:3641 [inline]
       path_openat+0x2812/0x3180 fs/namei.c:3796
       do_filp_open+0x234/0x490 fs/namei.c:3823
       do_sys_openat2+0x13e/0x1d0 fs/open.c:1422
       do_sys_open fs/open.c:1437 [inline]
       __do_sys_open fs/open.c:1445 [inline]
       __se_sys_open fs/open.c:1441 [inline]
       __x64_sys_open+0x225/0x270 fs/open.c:1441
       do_syscall_x64 arch/x86/entry/common.c:50 [inline]
       do_syscall_64+0x41/0xc0 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
       ----                    ----
  rlock(sb_writers#4);
                               lock(&iint->mutex);
                               lock(sb_writers#4);
  lock(&iint->mutex);

 *** DEADLOCK ***

1 lock held by syz-executor284/5062:
 #0: ffff88814be9a410 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x3f/0x90 fs/namespace.c:403

stack backtrace:
CPU: 1 PID: 5062 Comm: syz-executor284 Not tainted 6.6.0-rc2-syzkaller-00018-g2cf0f7156238 #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+0x1e7/0x2d0 lib/dump_stack.c:106
 check_noncircular+0x375/0x4a0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3868 [inline]
 __lock_acquire+0x39ff/0x7f70 kernel/locking/lockdep.c:5136
 lock_acquire+0x1e3/0x520 kernel/locking/lockdep.c:5753
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x136/0xd60 kernel/locking/mutex.c:747
 process_measurement+0x7c9/0x1cf0 security/integrity/ima/ima_main.c:266
 ima_file_check+0xf1/0x170 security/integrity/ima/ima_main.c:543
 do_open fs/namei.c:3641 [inline]
 path_openat+0x2812/0x3180 fs/namei.c:3796
 do_filp_open+0x234/0x490 fs/namei.c:3823
 do_sys_openat2+0x13e/0x1d0 fs/open.c:1422
 do_sys_open fs/open.c:1437 [inline]
 __do_sys_open fs/open.c:1445 [inline]
 __se_sys_open fs/open.c:1441 [inline]
 __x64_sys_open+0x225/0x270 fs/open.c:1441
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7f9c9e5bdc89
Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 b1 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:00007f9c97159218 EFLAGS: 00000246 ORIG_RAX: 0000000000000002
RAX: ffffffffffffffda RBX: 00007f9c9e64b6b8 RCX: 00007f9c9e5bdc89
RDX: 0000000000000000 RSI: 000000000004c37e RDI: 0000000020000000
RBP: 00007f9c9e64b6b0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f9c9e617660
R13: 0031656c69662f2e R14: 6e6f3d7865646e69 R15: 0079616c7265766f
 </TASK>

Crashes (223):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/09/19 08:27 upstream 2cf0f7156238 0b6a67ac .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in process_measurement
2023/08/06 11:46 upstream f6a691685962 4ffcc9ef .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/02/12 07:53 upstream d12aca5c0cee 93e26d60 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-upstream-fs possible deadlock in process_measurement
2022/12/03 22:52 upstream a1e9185d20b5 e080de16 .config console log report syz C [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2022/10/01 14:31 upstream ffb4d94b4314 feb56351 .config console log report syz C [disk image] [vmlinux] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2022/09/29 03:20 upstream 49c13ed0316d a41a2080 .config console log report syz C [disk image] [vmlinux] ci2-upstream-fs possible deadlock in process_measurement
2021/09/08 03:32 upstream a2b28235335f 064c9eb7 .config console log report syz C ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2021/09/08 02:39 upstream a2b28235335f 064c9eb7 .config console log report syz C ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2021/07/16 05:27 upstream dd9c7df94c1b f115ae98 .config console log report syz C ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2021/06/18 14:24 upstream fd0aa1a4567d aba2b2fb .config console log report syz C ci-upstream-kasan-gce-selinux-root possible deadlock in process_measurement
2021/06/18 12:27 upstream fd0aa1a4567d aba2b2fb .config console log report syz C ci-upstream-kasan-gce-selinux-root possible deadlock in process_measurement
2021/05/16 07:56 upstream c12a29ed9094 f54a5c09 .config console log report syz C ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2021/05/16 06:51 upstream c12a29ed9094 f54a5c09 .config console log report syz C ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2021/05/15 07:27 upstream 25a1298726e9 8bdd5343 .config console log report syz C ci-upstream-kasan-gce-root possible deadlock in process_measurement
2021/05/15 05:59 upstream 25a1298726e9 8bdd5343 .config console log report syz C ci-upstream-kasan-gce-root possible deadlock in process_measurement
2021/05/08 15:38 upstream d2b6f8a17919 bc5434be .config console log report syz C ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/06/02 16:26 linux-next 715abedee4cd a4ae4f42 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
2021/06/09 11:14 linux-next a1f92694393a 5c2fe346 .config console log report syz C ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
2021/06/09 09:41 linux-next a1f92694393a 5c2fe346 .config console log report syz C ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
2022/03/16 15:51 upstream 56e337f2cf13 9e8eaa75 .config console log report syz ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/11/02 22:47 upstream babe393974de b5f07fd3 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/10/31 18:30 upstream 5a6a09e97199 58499c95 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/10/09 05:47 upstream 37faf07bf90a 5e837c76 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in process_measurement
2023/10/02 05:58 upstream e81a2dabc3f3 8e26a358 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/09/28 06:39 upstream 633b47cb009d c2ab1e5d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/09/20 22:30 upstream 5d2f53532ecc 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/09/19 20:35 upstream 2cf0f7156238 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in process_measurement
2023/09/19 00:56 upstream 2cf0f7156238 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in process_measurement
2023/09/17 21:07 upstream e789286468a9 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/09/17 08:59 upstream f0b0d403eabb 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in process_measurement
2023/09/17 01:18 upstream f0b0d403eabb 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/09/16 10:01 upstream 57d88e8a5974 0b6a67ac .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/08/25 08:27 upstream 4f9e7fabf864 49be837e .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/08/07 10:30 upstream 52a93d39b17d 0ef3dfda .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/07/15 10:28 upstream bde7f150276b 35d9ecc5 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/07/14 06:45 upstream 4b810bf037e5 d624500f .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/07/13 03:04 upstream eb26cbb1a754 86081196 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/07/08 18:08 upstream 8689f4f2ea56 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in process_measurement
2023/07/08 12:50 upstream 8689f4f2ea56 668cb1fa .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/07/06 15:23 upstream c17414a273b8 1a2f6297 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/07/05 02:21 upstream b5641a5d8b8b 17a98177 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-selinux-root possible deadlock in process_measurement
2023/06/19 11:57 upstream 45a3e24f65e9 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/06/18 22:35 upstream 8c1f0c38b310 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/06/18 00:36 upstream 1b29d271614a f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/06/17 13:40 upstream 1639fae5132b f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/06/17 07:09 upstream 40f71e7cd3c6 f3921d4d .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/06/15 18:03 upstream b6dad5178cea 757d26ed .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/06/05 05:40 upstream 9561de3a55be a4ae4f42 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/05/11 08:59 upstream d295b66a7b66 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/05/10 16:42 upstream ad2fd53a7870 0fbd49f4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/05/10 10:13 upstream 16a8829130ca 14b12a99 .config console log report info ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/05/08 21:07 upstream ba0ad6ed89fd 90c93c40 .config console log report info ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/05/07 12:03 upstream fc4354c6e5c2 90c93c40 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/05/05 17:28 upstream 78b421b6a7c6 4cec9341 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/04/24 00:10 upstream 457391b03803 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/04/23 21:59 upstream 457391b03803 2b32bd34 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/04/19 15:55 upstream 789b4a41c247 94b4184e .config console log report info ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/04/19 05:20 upstream af67688dca57 d931e9f0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/04/15 01:22 upstream 95abc817ab3a ec410564 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/04/10 04:40 upstream 09a9639e56c0 71147e29 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/04/01 13:32 upstream 7b50567bdcad f325deb0 .config console log report info [disk image] [vmlinux] [kernel image] ci2-upstream-fs possible deadlock in process_measurement
2023/03/28 10:53 upstream 3a93e40326c8 47f3aaf1 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-gce-smack-root possible deadlock in process_measurement
2023/01/10 15:24 upstream 40c18f363a08 48bc529a .config console log report info ci-qemu-upstream possible deadlock in process_measurement
2021/05/08 12:55 upstream d2b6f8a17919 bc5434be .config console log report info ci-upstream-kasan-gce-root possible deadlock in process_measurement
2023/07/09 23:41 upstream 06c2afb862f9 668cb1fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in process_measurement
2023/07/09 10:02 upstream 1c7873e33645 668cb1fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in process_measurement
2023/07/08 19:54 upstream 8fc3b8f082cc 668cb1fa .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in process_measurement
2023/07/06 13:20 upstream c17414a273b8 1a2f6297 .config console log report info [disk image (non-bootable)] [vmlinux] [kernel image] ci-qemu-upstream-386 possible deadlock in process_measurement
2023/07/17 20:25 linux-next 2205be537aeb e5f10889 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
2023/07/07 04:33 linux-next 123212f53f3e 1a2f6297 .config console log report info ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
2023/05/23 08:38 linux-next 715abedee4cd 4bce1a3e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
2023/04/25 21:16 linux-next f600e0bbde85 65320f8e .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in process_measurement
* Struck through repros no longer work on HEAD.