* [syzbot] [fs?] possible deadlock in ima_path_truncate
@ 2026-08-26 4:45 syzbot
2026-11-25 2:29 ` [syzbot] [overlayfs?] " syzbot
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2026-08-26 4:45 UTC (permalink / raw)
To: a.hindborg, leitao, linux-fsdevel, linux-kernel, syzkaller-bugs
Hello,
syzbot found the following issue on:
HEAD commit: 818bebeb63dd drm/xe: Don't hand out the flat CCS storage a..
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=17c6be79580000
kernel config: https://syzkaller.appspot.com/x/.config?x=3c35c7e43de75adb
dashboard link: https://syzkaller.appspot.com/bug?extid=ecf337bf2c6f75c1ddd8
compiler: Debian clang version 22.1.8 (++20260613092233+e80beda6e255-1~exp1~20260613092250.77), Debian LLD 22.1.8
Unfortunately, I don't have any reproducer for this issue yet.
Downloadable assets:
disk image (non-bootable): https://storage.googleapis.com/syzbot-assets/d900f083ada3/non_bootable_disk-818bebeb.raw.xz
vmlinux: https://storage.googleapis.com/syzbot-assets/9adea981957f/vmlinux-818bebeb.xz
kernel image: https://storage.googleapis.com/syzbot-assets/6676075cd03e/bzImage-818bebeb.xz
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ecf337bf2c6f75c1ddd8@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz.0.0/5310 is trying to acquire lock:
ffff888043b8ecc0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: ima_reset_action_flags security/integrity/ima/ima_main.c:708 [inline]
ffff888043b8ecc0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:717
but task is already holding lock:
ffff8880347c0460 (sb_writers#11){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #4 (sb_writers#11){.+.+}-{0:0}:
percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
__sb_start_write include/linux/fs/super.h:19 [inline]
sb_start_write+0x4d/0x1d0 include/linux/fs/super.h:125
mnt_want_write+0x41/0x90 fs/namespace.c:494
lookup_open+0x1e6/0x1a40 fs/namei.c:4451
open_last_lookups fs/namei.c:4767 [inline]
path_openat+0x677/0x1d60 fs/namei.c:4997
do_file_open+0x23e/0x4a0 fs/namei.c:5029
file_open_name fs/open.c:1375 [inline]
filp_open+0x16d/0x1d0 fs/open.c:1392
fsg_lun_open+0x6c/0xdf0 drivers/usb/gadget/function/storage_common.c:194
fsg_store_file+0x19e/0x400 drivers/usb/gadget/function/storage_common.c:455
flush_write_buffer fs/configfs/file.c:207 [inline]
configfs_write_iter+0x337/0x430 fs/configfs/file.c:229
new_sync_write fs/read_write.c:595 [inline]
vfs_write+0x612/0xba0 fs/read_write.c:687
ksys_write+0x150/0x270 fs/read_write.c:739
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #3 (&common->filesem){++++}-{4:4}:
down_read+0x4a/0x330 kernel/locking/rwsem.c:1574
fsg_show_file+0x2d/0x140 drivers/usb/gadget/function/storage_common.c:339
fill_read_buffer fs/configfs/file.c:68 [inline]
configfs_read_iter+0x2b7/0x620 fs/configfs/file.c:88
__kernel_read+0x4ca/0x960 fs/read_write.c:532
integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline]
ima_calc_file_hash+0x451/0x890 security/integrity/ima/ima_crypto.c:280
ima_collect_measurement+0x51b/0xa00 security/integrity/ima/ima_api.c:300
process_measurement+0x1272/0x1c10 security/integrity/ima/ima_main.c:425
ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685
security_file_post_open+0xb3/0x260 security/security.c:2755
do_open fs/namei.c:4839 [inline]
path_openat+0x1485/0x1d60 fs/namei.c:5000
do_file_open+0x23e/0x4a0 fs/namei.c:5029
do_sys_openat2+0x115/0x200 fs/open.c:1417
do_sys_open fs/open.c:1423 [inline]
__do_sys_openat fs/open.c:1439 [inline]
__se_sys_openat fs/open.c:1434 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1434
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #2 (&p->frag_sem){.+.+}-{4:4}:
down_read+0x4a/0x330 kernel/locking/rwsem.c:1574
fill_read_buffer fs/configfs/file.c:66 [inline]
configfs_read_iter+0x1cc/0x620 fs/configfs/file.c:88
__kernel_read+0x4ca/0x960 fs/read_write.c:532
integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline]
ima_calc_file_hash+0x451/0x890 security/integrity/ima/ima_crypto.c:280
ima_collect_measurement+0x51b/0xa00 security/integrity/ima/ima_api.c:300
process_measurement+0x1272/0x1c10 security/integrity/ima/ima_main.c:425
ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685
security_file_post_open+0xb3/0x260 security/security.c:2755
do_open fs/namei.c:4839 [inline]
path_openat+0x1485/0x1d60 fs/namei.c:5000
do_file_open+0x23e/0x4a0 fs/namei.c:5029
do_sys_openat2+0x115/0x200 fs/open.c:1417
do_sys_open fs/open.c:1423 [inline]
__do_sys_openat fs/open.c:1439 [inline]
__se_sys_openat fs/open.c:1434 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1434
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&buffer->mutex){+.+.}-{4:4}:
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
configfs_read_iter+0x70/0x620 fs/configfs/file.c:86
__kernel_read+0x4ca/0x960 fs/read_write.c:532
integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline]
ima_calc_file_hash+0x451/0x890 security/integrity/ima/ima_crypto.c:280
ima_collect_measurement+0x51b/0xa00 security/integrity/ima/ima_api.c:300
process_measurement+0x1272/0x1c10 security/integrity/ima/ima_main.c:425
ima_file_check+0xe1/0x130 security/integrity/ima/ima_main.c:685
security_file_post_open+0xb3/0x260 security/security.c:2755
do_open fs/namei.c:4839 [inline]
path_openat+0x1485/0x1d60 fs/namei.c:5000
do_file_open+0x23e/0x4a0 fs/namei.c:5029
do_sys_openat2+0x115/0x200 fs/open.c:1417
do_sys_open fs/open.c:1423 [inline]
__do_sys_openat fs/open.c:1439 [inline]
__se_sys_openat fs/open.c:1434 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1434
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3181 [inline]
check_prevs_add kernel/locking/lockdep.c:3300 [inline]
validate_chain kernel/locking/lockdep.c:3924 [inline]
__lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5253
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
ima_reset_action_flags security/integrity/ima/ima_main.c:708 [inline]
ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:717
security_path_truncate+0x1d0/0x310 security/security.c:1563
vfs_truncate+0x46b/0x540 fs/open.c:116
ksys_truncate+0xf3/0x1c0 fs/open.c:142
__do_sys_truncate fs/open.c:154 [inline]
__se_sys_truncate fs/open.c:152 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:152
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&ima_iint_mutex_key[depth] --> &common->filesem --> sb_writers#11
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(sb_writers#11);
lock(&common->filesem);
lock(sb_writers#11);
lock(&ima_iint_mutex_key[depth]);
*** DEADLOCK ***
locks held by syz.0.0/5310: 1, last CPU#0:
#0: ffff8880347c0460 (sb_writers#11){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:494
stack backtrace:
CPU: 0 UID: 0 PID: 5310 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2059
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2191
check_prev_add kernel/locking/lockdep.c:3181 [inline]
check_prevs_add kernel/locking/lockdep.c:3300 [inline]
validate_chain kernel/locking/lockdep.c:3924 [inline]
__lock_acquire+0x1520/0x2cf0 kernel/locking/lockdep.c:5253
lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5886
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x19d/0x1550 kernel/locking/mutex.c:821
ima_reset_action_flags security/integrity/ima/ima_main.c:708 [inline]
ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:717
security_path_truncate+0x1d0/0x310 security/security.c:1563
vfs_truncate+0x46b/0x540 fs/open.c:116
ksys_truncate+0xf3/0x1c0 fs/open.c:142
__do_sys_truncate fs/open.c:154 [inline]
__se_sys_truncate fs/open.c:152 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:152
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x166/0x520 arch/x86/entry/syscall_64.c:84
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f92a899e0d9
Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f92a97d3fe8 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 00007f92a8c26090 RCX: 00007f92a899e0d9
RDX: 0000000000000000 RSI: 0000000000000c88 RDI: 0000200000000100
RBP: 00007f92a8a35024 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f92a8c26128 R14: 00007f92a8c26090 R15: 00007ffcdcc3c1d8
</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.
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [overlayfs?] possible deadlock in ima_path_truncate
2026-08-26 4:45 [syzbot] [fs?] possible deadlock in ima_path_truncate syzbot
@ 2026-11-25 2:29 ` syzbot
2026-11-25 8:43 ` Amir Goldstein
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2026-11-25 2:29 UTC (permalink / raw)
To: a.hindborg, amir73il, leitao, linux-fsdevel, linux-kernel,
linux-unionfs, miklos, syzkaller-bugs
syzbot has found a reproducer for the following issue on:
HEAD commit: 8d7fe9885c62 Merge tag 'hid-for-linus-2026112301' of git:/..
git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
console output: https://syzkaller.appspot.com/x/log.txt?x=12615bbe580000
kernel config: https://syzkaller.appspot.com/x/.config?x=462e918ed4cc6d73
dashboard link: https://syzkaller.appspot.com/bug?extid=ecf337bf2c6f75c1ddd8
compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=112be823580000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+ecf337bf2c6f75c1ddd8@syzkaller.appspotmail.com
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
syz-executor272/5659 is trying to acquire lock:
ffff88801359bed0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: ima_reset_action_flags security/integrity/ima/ima_main.c:709 [inline]
ffff88801359bed0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:718
but task is already holding lock:
ffff888051144478 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #3 (sb_writers#4){.+.+}-{0:0}:
percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
__sb_start_write include/linux/fs/super.h:19 [inline]
sb_start_write+0x48/0x1c0 include/linux/fs/super.h:125
mnt_want_write+0x41/0x90 fs/namespace.c:531
ovl_xattr_set+0x15c/0x5e0 fs/overlayfs/xattrs.c:61
__vfs_setxattr+0x442/0x480 fs/xattr.c:223
__vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257
vfs_setxattr+0x151/0x370 fs/xattr.c:344
cachefiles_preset_object_xattr+0x142/0x3e0 fs/cachefiles/xattr.c:58
cachefiles_create_tmpfile+0x3e7/0x790 fs/cachefiles/namei.c:455
cachefiles_create_file+0x78/0x140 fs/cachefiles/namei.c:487
cachefiles_look_up_object+0x38c/0x7b0 fs/cachefiles/namei.c:622
cachefiles_lookup_cookie+0x374/0x750 fs/cachefiles/interface.c:125
fscache_perform_lookup fs/netfs/fscache_cookie.c:518 [inline]
fscache_cookie_state_machine fs/netfs/fscache_cookie.c:729 [inline]
fscache_cookie_worker+0xa77/0x1170 fs/netfs/fscache_cookie.c:835
process_one_work kernel/workqueue.c:3495 [inline]
process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
kthread+0x38b/0x480 kernel/kthread.c:436
ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #2 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}:
down_write+0x91/0x200 kernel/locking/rwsem.c:1631
inode_lock include/linux/fs.h:1027 [inline]
ovl_write_iter+0x1fb/0x3b0 fs/overlayfs/file.c:358
vfs_iocb_iter_write+0x245/0x5e0 fs/read_write.c:930
__cachefiles_write+0x6c9/0xbd0 fs/cachefiles/io.c:355
netfs_issue_write fs/netfs/write_issue.c:290 [inline]
netfs_advance_write+0x328/0x4b0 fs/netfs/write_issue.c:331
netfs_write_folio fs/netfs/write_issue.c:510 [inline]
netfs_writepages+0x12d3/0x22b0 fs/netfs/write_issue.c:600
do_writepages+0x338/0x560 mm/page-writeback.c:2562
filemap_writeback mm/filemap.c:386 [inline]
filemap_fdatawrite_range mm/filemap.c:411 [inline]
filemap_fdatawrite+0x1e9/0x2f0 mm/filemap.c:417
v9fs_vfs_setattr_dotl+0x4dc/0xab0 fs/9p/vfs_inode_dotl.c:585
notify_change+0xbba/0xea0 fs/attr.c:556
do_truncate+0x1c2/0x250 fs/open.c:68
handle_truncate fs/namei.c:4306 [inline]
do_open fs/namei.c:4855 [inline]
path_openat+0x18a6/0x20f0 fs/namei.c:5016
do_file_open+0x23e/0x4a0 fs/namei.c:5045
do_sys_openat2+0x115/0x200 fs/open.c:1443
do_sys_open fs/open.c:1449 [inline]
__do_sys_openat fs/open.c:1465 [inline]
__se_sys_openat fs/open.c:1460 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1460
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&sb->s_type->i_mutex_key#25){++++}-{4:4}:
down_read_interruptible+0x4b/0x3b0 kernel/locking/rwsem.c:1584
netfs_start_io_read+0x25/0x180 fs/netfs/locking.c:67
netfs_buffered_read_iter+0xd6/0x160 fs/netfs/buffered_read.c:940
__kernel_read+0x4ca/0x960 fs/read_write.c:512
integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline]
ima_calc_file_hash+0x451/0x890 security/integrity/ima/ima_crypto.c:280
ima_collect_measurement+0x51b/0xa00 security/integrity/ima/ima_api.c:300
process_measurement+0x1272/0x1c10 security/integrity/ima/ima_main.c:425
ima_file_check+0xdc/0x130 security/integrity/ima/ima_main.c:686
security_file_post_open+0xb3/0x260 security/security.c:2777
do_open fs/namei.c:4853 [inline]
path_openat+0x1748/0x20f0 fs/namei.c:5016
do_file_open+0x23e/0x4a0 fs/namei.c:5045
do_sys_openat2+0x115/0x200 fs/open.c:1443
do_sys_open fs/open.c:1449 [inline]
__do_sys_openat fs/open.c:1465 [inline]
__se_sys_openat fs/open.c:1460 [inline]
__x64_sys_openat+0x138/0x170 fs/open.c:1460
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}:
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
ima_reset_action_flags security/integrity/ima/ima_main.c:709 [inline]
ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:718
security_path_truncate+0x1d0/0x310 security/security.c:1578
vfs_truncate+0x46e/0x540 fs/open.c:116
ksys_truncate+0xf3/0x1c0 fs/open.c:142
__do_sys_truncate fs/open.c:154 [inline]
__se_sys_truncate fs/open.c:152 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:152
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
other info that might help us debug this:
Chain exists of:
&ima_iint_mutex_key[depth] --> &ovl_i_mutex_key[depth] --> sb_writers#4
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
rlock(sb_writers#4);
lock(&ovl_i_mutex_key[depth]);
lock(sb_writers#4);
lock(&ima_iint_mutex_key[depth]);
*** DEADLOCK ***
locks held by syz-executor272/5659: 1, on CPU#0:
#0: ffff888051144478 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531
stack backtrace:
CPU: 0 UID: 0 PID: 5659 Comm: syz-executor272 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Call Trace:
<TASK>
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
check_prev_add kernel/locking/lockdep.c:3209 [inline]
check_prevs_add kernel/locking/lockdep.c:3328 [inline]
validate_chain kernel/locking/lockdep.c:3952 [inline]
__lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
__mutex_lock_common kernel/locking/mutex.c:646 [inline]
__mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
ima_reset_action_flags security/integrity/ima/ima_main.c:709 [inline]
ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:718
security_path_truncate+0x1d0/0x310 security/security.c:1578
vfs_truncate+0x46e/0x540 fs/open.c:116
ksys_truncate+0xf3/0x1c0 fs/open.c:142
__do_sys_truncate fs/open.c:154 [inline]
__se_sys_truncate fs/open.c:152 [inline]
__x64_sys_truncate+0x5b/0x70 fs/open.c:152
do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f0e2c62c7c7
Code: 44 00 00 31 ff e8 89 f7 ff ff 48 8b 2d f2 81 2a 00 85 c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 00 b8 4c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 d0 ff ff ff f7 d8 64 89 02 b8
RSP: 002b:00007ffe754e2898 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0e2c62c7c7
RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00007f0e2c69ea92
RBP: 00007ffe754e2940 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0e2c69eab0
R13: 00007ffe754e28c0 R14: 00007ffe754e2980 R15: 00007f0e2c69e8cf
</TASK>
CacheFiles: File cache on CacheFiles unregistering
netfs: Withdrawing cache "CacheFiles" (6 objs)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [syzbot] [overlayfs?] possible deadlock in ima_path_truncate
2026-11-25 2:29 ` [syzbot] [overlayfs?] " syzbot
@ 2026-11-25 8:43 ` Amir Goldstein
0 siblings, 0 replies; 3+ messages in thread
From: Amir Goldstein @ 2026-11-25 8:43 UTC (permalink / raw)
To: syzbot
Cc: a.hindborg, leitao, linux-fsdevel, linux-kernel, linux-unionfs,
miklos, syzkaller-bugs, zohar, ngocthang2710.1999, roberto.sassu
On Tue, Nov 24, 2026 at 06:29:29PM -0800, syzbot wrote:
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 8d7fe9885c62 Merge tag 'hid-for-linus-2026112301' of git:/..
> git tree: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> console output: https://syzkaller.appspot.com/x/log.txt?x=12615bbe580000
> kernel config: https://syzkaller.appspot.com/x/.config?x=462e918ed4cc6d73
> dashboard link: https://syzkaller.appspot.com/bug?extid=ecf337bf2c6f75c1ddd8
> compiler: Debian clang version 22.1.8 (1~deb13u5), Debian LLD 22.1.8
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=112be823580000
>
> IMPORTANT: if you fix the issue, please add the following tag to the commit:
> Reported-by: syzbot+ecf337bf2c6f75c1ddd8@syzkaller.appspotmail.com
>
#syz dup: possible deadlock in vfs_iocb_iter_write
This looks like the same lockdep false positive as syzbot+deb8af81d91415fabac1,
fixed by "ima: key iint mutex lockdep class per filesystem type":
https://lore.kernel.org/r/20261123111452.237422-1-ngocthang2710.1999@gmail.com/
> ======================================================
> WARNING: possible circular locking dependency detected
> syzkaller #0 Not tainted
> ------------------------------------------------------
> syz-executor272/5659 is trying to acquire lock:
> ffff88801359bed0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: ima_reset_action_flags security/integrity/ima/ima_main.c:709 [inline]
> ffff88801359bed0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}, at: ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:718
>
> but task is already holding lock:
> ffff888051144478 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531
>
> which lock already depends on the new lock.
>
>
> the existing dependency chain (in reverse order) is:
>
> -> #3 (sb_writers#4){.+.+}-{0:0}:
> percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
> percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
> __sb_start_write include/linux/fs/super.h:19 [inline]
> sb_start_write+0x48/0x1c0 include/linux/fs/super.h:125
> mnt_want_write+0x41/0x90 fs/namespace.c:531
> ovl_xattr_set+0x15c/0x5e0 fs/overlayfs/xattrs.c:61
> __vfs_setxattr+0x442/0x480 fs/xattr.c:223
> __vfs_setxattr_noperm+0x12a/0x660 fs/xattr.c:257
> vfs_setxattr+0x151/0x370 fs/xattr.c:344
> cachefiles_preset_object_xattr+0x142/0x3e0 fs/cachefiles/xattr.c:58
> cachefiles_create_tmpfile+0x3e7/0x790 fs/cachefiles/namei.c:455
> cachefiles_create_file+0x78/0x140 fs/cachefiles/namei.c:487
> cachefiles_look_up_object+0x38c/0x7b0 fs/cachefiles/namei.c:622
> cachefiles_lookup_cookie+0x374/0x750 fs/cachefiles/interface.c:125
> fscache_perform_lookup fs/netfs/fscache_cookie.c:518 [inline]
> fscache_cookie_state_machine fs/netfs/fscache_cookie.c:729 [inline]
> fscache_cookie_worker+0xa77/0x1170 fs/netfs/fscache_cookie.c:835
> process_one_work kernel/workqueue.c:3495 [inline]
> process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578
> worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659
> kthread+0x38b/0x480 kernel/kthread.c:436
> ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158
> ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
>
> -> #2 (&ovl_i_mutex_key[depth]){+.+.}-{4:4}:
> down_write+0x91/0x200 kernel/locking/rwsem.c:1631
> inode_lock include/linux/fs.h:1027 [inline]
> ovl_write_iter+0x1fb/0x3b0 fs/overlayfs/file.c:358
> vfs_iocb_iter_write+0x245/0x5e0 fs/read_write.c:930
> __cachefiles_write+0x6c9/0xbd0 fs/cachefiles/io.c:355
> netfs_issue_write fs/netfs/write_issue.c:290 [inline]
> netfs_advance_write+0x328/0x4b0 fs/netfs/write_issue.c:331
> netfs_write_folio fs/netfs/write_issue.c:510 [inline]
> netfs_writepages+0x12d3/0x22b0 fs/netfs/write_issue.c:600
> do_writepages+0x338/0x560 mm/page-writeback.c:2562
> filemap_writeback mm/filemap.c:386 [inline]
> filemap_fdatawrite_range mm/filemap.c:411 [inline]
> filemap_fdatawrite+0x1e9/0x2f0 mm/filemap.c:417
> v9fs_vfs_setattr_dotl+0x4dc/0xab0 fs/9p/vfs_inode_dotl.c:585
> notify_change+0xbba/0xea0 fs/attr.c:556
> do_truncate+0x1c2/0x250 fs/open.c:68
> handle_truncate fs/namei.c:4306 [inline]
> do_open fs/namei.c:4855 [inline]
> path_openat+0x18a6/0x20f0 fs/namei.c:5016
> do_file_open+0x23e/0x4a0 fs/namei.c:5045
> do_sys_openat2+0x115/0x200 fs/open.c:1443
> do_sys_open fs/open.c:1449 [inline]
> __do_sys_openat fs/open.c:1465 [inline]
> __se_sys_openat fs/open.c:1460 [inline]
> __x64_sys_openat+0x138/0x170 fs/open.c:1460
> do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
> do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> -> #1 (&sb->s_type->i_mutex_key#25){++++}-{4:4}:
> down_read_interruptible+0x4b/0x3b0 kernel/locking/rwsem.c:1584
> netfs_start_io_read+0x25/0x180 fs/netfs/locking.c:67
> netfs_buffered_read_iter+0xd6/0x160 fs/netfs/buffered_read.c:940
> __kernel_read+0x4ca/0x960 fs/read_write.c:512
> integrity_kernel_read+0x89/0xd0 security/integrity/iint.c:28
> ima_calc_file_hash_tfm security/integrity/ima/ima_crypto.c:222 [inline]
> ima_calc_file_hash+0x451/0x890 security/integrity/ima/ima_crypto.c:280
> ima_collect_measurement+0x51b/0xa00 security/integrity/ima/ima_api.c:300
> process_measurement+0x1272/0x1c10 security/integrity/ima/ima_main.c:425
> ima_file_check+0xdc/0x130 security/integrity/ima/ima_main.c:686
> security_file_post_open+0xb3/0x260 security/security.c:2777
> do_open fs/namei.c:4853 [inline]
> path_openat+0x1748/0x20f0 fs/namei.c:5016
> do_file_open+0x23e/0x4a0 fs/namei.c:5045
> do_sys_openat2+0x115/0x200 fs/open.c:1443
> do_sys_open fs/open.c:1449 [inline]
> __do_sys_openat fs/open.c:1465 [inline]
> __se_sys_openat fs/open.c:1460 [inline]
> __x64_sys_openat+0x138/0x170 fs/open.c:1460
> do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
> do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> -> #0 (&ima_iint_mutex_key[depth]){+.+.}-{4:4}:
> check_prev_add kernel/locking/lockdep.c:3209 [inline]
> check_prevs_add kernel/locking/lockdep.c:3328 [inline]
> validate_chain kernel/locking/lockdep.c:3952 [inline]
> __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
> lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
> __mutex_lock_common kernel/locking/mutex.c:646 [inline]
> __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
> ima_reset_action_flags security/integrity/ima/ima_main.c:709 [inline]
> ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:718
> security_path_truncate+0x1d0/0x310 security/security.c:1578
> vfs_truncate+0x46e/0x540 fs/open.c:116
> ksys_truncate+0xf3/0x1c0 fs/open.c:142
> __do_sys_truncate fs/open.c:154 [inline]
> __se_sys_truncate fs/open.c:152 [inline]
> __x64_sys_truncate+0x5b/0x70 fs/open.c:152
> do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
> do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
>
> other info that might help us debug this:
>
> Chain exists of:
> &ima_iint_mutex_key[depth] --> &ovl_i_mutex_key[depth] --> sb_writers#4
>
> Possible unsafe locking scenario:
>
> CPU0 CPU1
> ---- ----
> rlock(sb_writers#4);
> lock(&ovl_i_mutex_key[depth]);
> lock(sb_writers#4);
> lock(&ima_iint_mutex_key[depth]);
>
> *** DEADLOCK ***
>
> locks held by syz-executor272/5659: 1, on CPU#0:
> #0: ffff888051144478 (sb_writers#4){.+.+}-{0:0}, at: mnt_want_write+0x41/0x90 fs/namespace.c:531
>
> stack backtrace:
> CPU: 0 UID: 0 PID: 5659 Comm: syz-executor272 Not tainted syzkaller #0 PREEMPT(full)
> Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
> Call Trace:
> <TASK>
> dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
> print_circular_bug+0x2e2/0x300 kernel/locking/lockdep.c:2087
> check_noncircular+0x12f/0x150 kernel/locking/lockdep.c:2219
> check_prev_add kernel/locking/lockdep.c:3209 [inline]
> check_prevs_add kernel/locking/lockdep.c:3328 [inline]
> validate_chain kernel/locking/lockdep.c:3952 [inline]
> __lock_acquire+0x164c/0x2de0 kernel/locking/lockdep.c:5288
> lock_acquire+0x115/0x350 kernel/locking/lockdep.c:5942
> __mutex_lock_common kernel/locking/mutex.c:646 [inline]
> __mutex_lock+0x197/0x15a0 kernel/locking/mutex.c:821
> ima_reset_action_flags security/integrity/ima/ima_main.c:709 [inline]
> ima_path_truncate+0xd3/0x190 security/integrity/ima/ima_main.c:718
> security_path_truncate+0x1d0/0x310 security/security.c:1578
> vfs_truncate+0x46e/0x540 fs/open.c:116
> ksys_truncate+0xf3/0x1c0 fs/open.c:142
> __do_sys_truncate fs/open.c:154 [inline]
> __se_sys_truncate fs/open.c:152 [inline]
> __x64_sys_truncate+0x5b/0x70 fs/open.c:152
> do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
> do_syscall_64+0x171/0x540 arch/x86/entry/syscall_64.c:89
> entry_SYSCALL_64_after_hwframe+0x77/0x7f
> RIP: 0033:0x7f0e2c62c7c7
> Code: 44 00 00 31 ff e8 89 f7 ff ff 48 8b 2d f2 81 2a 00 85 c0 79 93 eb d5 48 8d 7c 1d 00 eb 99 0f 1f 44 00 00 b8 4c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 01 c3 48 c7 c2 d0 ff ff ff f7 d8 64 89 02 b8
> RSP: 002b:00007ffe754e2898 EFLAGS: 00000246 ORIG_RAX: 000000000000004c
> RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0e2c62c7c7
> RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00007f0e2c69ea92
> RBP: 00007ffe754e2940 R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000246 R12: 00007f0e2c69eab0
> R13: 00007ffe754e28c0 R14: 00007ffe754e2980 R15: 00007f0e2c69e8cf
> </TASK>
> CacheFiles: File cache on CacheFiles unregistering
> netfs: Withdrawing cache "CacheFiles" (6 objs)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-11-25 8:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 4:45 [syzbot] [fs?] possible deadlock in ima_path_truncate syzbot
2026-11-25 2:29 ` [syzbot] [overlayfs?] " syzbot
2026-11-25 8:43 ` Amir Goldstein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox