Kernel bug: INFO: task hung in process_measurement (3)
Subsystem: integrity, lsm
Status: open

Crash report:
INFO: task syz.0.17:6034 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.17        state:D stack:27608 pid:6034  tgid:6027  ppid:5927   task_flags:0x400140 flags:0x00080002
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5256 [inline]
 __schedule+0x145f/0x5070 kernel/sched/core.c:6863
 __schedule_loop kernel/sched/core.c:6945 [inline]
 rt_mutex_schedule+0x77/0xf0 kernel/sched/core.c:7241
 rt_mutex_slowlock_block kernel/locking/rtmutex.c:1647 [inline]
 __rt_mutex_slowlock kernel/locking/rtmutex.c:1721 [inline]
 __rt_mutex_slowlock_locked+0x1dfe/0x25e0 kernel/locking/rtmutex.c:1760
 rt_mutex_slowlock+0xb5/0x160 kernel/locking/rtmutex.c:1800
 __rt_mutex_lock kernel/locking/rtmutex.c:1815 [inline]
 rwbase_write_lock+0x14f/0x750 kernel/locking/rwbase_rt.c:244
 inode_lock include/linux/fs.h:1027 [inline]
 process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
 ima_file_check+0xd9/0x130 security/integrity/ima/ima_main.c:663
 security_file_post_open+0xbb/0x290 security/security.c:2652
 do_open fs/namei.c:4630 [inline]
 path_openat+0x3472/0x3df0 fs/namei.c:4787
 do_filp_open+0x1fa/0x410 fs/namei.c:4814
 do_sys_openat2+0x121/0x200 fs/open.c:1430
 do_sys_open fs/open.c:1436 [inline]
 __do_sys_openat fs/open.c:1452 [inline]
 __se_sys_openat fs/open.c:1447 [inline]
 __x64_sys_openat+0x138/0x170 fs/open.c:1447
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7ffbd045f749
RSP: 002b:00007ffbcfaad038 EFLAGS: 00000246 ORIG_RAX: 0000000000000101
RAX: ffffffffffffffda RBX: 00007ffbd06b6090 RCX: 00007ffbd045f749
RDX: 0000000000183042 RSI: 0000200000000740 RDI: ffffffffffffff9c
RBP: 00007ffbd04e3f91 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000004 R11: 0000000000000246 R12: 0000000000000000
R13: 00007ffbd06b6128 R14: 00007ffbd06b6090 R15: 00007ffe4be3c698
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/38:
 #0: ffffffff8d5ae940 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:331 [inline]
 #0: ffffffff8d5ae940 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:867 [inline]
 #0: ffffffff8d5ae940 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180 kernel/locking/lockdep.c:6775
3 locks held by kworker/1:1/45:
 #0: ffff88813ff55138 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3232 [inline]
 #0: ffff88813ff55138 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x1770 kernel/workqueue.c:3340
 #1: ffffc90000b77bc0 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3233 [inline]
 #1: ffffc90000b77bc0 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x1770 kernel/workqueue.c:3340
 #2: ffff8880331a4260 (&data->fib_lock){+.+.}-{4:4}, at: nsim_fib_event_work+0x224/0x3e0 drivers/net/netdevsim/fib.c:1490
3 locks held by kworker/u8:7/1152:
 #0: ffff88814d33a938 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3232 [inline]
 #0: ffff88814d33a938 ((wq_completion)ipv6_addrconf){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x1770 kernel/workqueue.c:3340
 #1: ffffc90004e47bc0 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3233 [inline]
 #1: ffffc90004e47bc0 ((work_completion)(&(&ifa->dad_work)->work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x1770 kernel/workqueue.c:3340
 #2: ffffffff8e8a5838 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:130 [inline]
 #2: ffffffff8e8a5838 (rtnl_mutex){+.+.}-{4:4}, at: addrconf_dad_work+0x119/0x15a0 net/ipv6/addrconf.c:4194
7 locks held by kworker/u8:14/5099:
3 locks held by kworker/u9:1/5115:
 #0: ffff888059cb6138 ((wq_completion)hci2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3232 [inline]
 #0: ffff888059cb6138 ((wq_completion)hci2){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x1770 kernel/workqueue.c:3340
 #1: ffffc9000dd7fbc0 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3233 [inline]
 #1: ffffc9000dd7fbc0 ((work_completion)(&hdev->cmd_sync_work)){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x1770 kernel/workqueue.c:3340
 #2: ffff8880575b4f80 (&hdev->req_lock){+.+.}-{4:4}, at: hci_cmd_sync_work+0x1d3/0x400 net/bluetooth/hci_sync.c:331
2 locks held by getty/5556:
 #0: ffff88814e18a0a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:243
 #1: ffffc90003e8b2e0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x44f/0x1460 drivers/tty/n_tty.c:2211
3 locks held by syz.0.17/6028:
1 lock held by syz.0.17/6034:
 #0: ffff88805726f6f8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff88805726f6f8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
2 locks held by syz.1.18/6076:
1 lock held by syz.1.18/6077:
 #0: ffff8880571e1ab8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff8880571e1ab8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
2 locks held by syz.2.20/6103:
1 lock held by syz.2.20/6104:
 #0: ffff8880498d5838 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff8880498d5838 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
3 locks held by syz.3.21/6127:
1 lock held by syz.3.21/6128:
 #0: ffff88804991b978 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff88804991b978 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
2 locks held by syz.4.22/6166:
1 lock held by syz.4.22/6167:
 #0: ffff88805712aa18 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff88805712aa18 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
2 locks held by syz.5.23/6201:
1 lock held by syz.5.23/6202:
 #0: ffff8880571e48d8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff8880571e48d8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
3 locks held by kworker/1:6/6203:
 #0: ffff88813ff55138 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3232 [inline]
 #0: ffff88813ff55138 ((wq_completion)events){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x1770 kernel/workqueue.c:3340
 #1: ffffc90004ae7bc0 (deferred_process_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3233 [inline]
 #1: ffffc90004ae7bc0 (deferred_process_work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x1770 kernel/workqueue.c:3340
 #2: ffffffff8e8a5838 (rtnl_mutex){+.+.}-{4:4}, at: switchdev_deferred_process_work+0xe/0x20 net/switchdev/switchdev.c:104
3 locks held by syz.6.24/6244:
1 lock held by syz.6.24/6246:
 #0: ffff8880498d1ab8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #0: ffff8880498d1ab8 (&sb->s_type->i_mutex_key#23){+.+.}-{4:4}, at: process_measurement+0x3de/0x1a80 security/integrity/ima/ima_main.c:281
1 lock held by syz-executor/6254:
 #0: ffffffff8e8a5838 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:130 [inline]
 #0: ffffffff8e8a5838 (rtnl_mutex){+.+.}-{4:4}, at: inet_rtm_newaddr+0x3b0/0x18b0 net/ipv4/devinet.c:978

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 38 Comm: khungtaskd Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
 nmi_cpu_backtrace+0x274/0x2d0 lib/nmi_backtrace.c:113
 nmi_trigger_cpumask_backtrace+0x17a/0x300 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:160 [inline]
 __sys_info lib/sys_info.c:157 [inline]
 sys_info+0x135/0x170 lib/sys_info.c:165
 check_hung_uninterruptible_tasks kernel/hung_task.c:346 [inline]
 watchdog+0xf95/0xfe0 kernel/hung_task.c:515
 kthread+0x711/0x8a0 kernel/kthread.c:463
 ret_from_fork+0x510/0xa50 arch/x86/kernel/process.c:158
 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 6244 Comm: syz.6.24 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/25/2025
RIP: 0010:instrument_read_write include/linux/instrumented.h:54 [inline]
RIP: 0010:atomic_try_cmpxchg_acquire include/linux/atomic/atomic-instrumented.h:1301 [inline]
RIP: 0010:rwbase_read_trylock kernel/locking/rwbase_rt.c:62 [inline]
RIP: 0010:rwbase_read_lock kernel/locking/rwbase_rt.c:144 [inline]
RIP: 0010:__down_read kernel/locking/rwsem.c:1466 [inline]
RIP: 0010:down_read+0x17c/0x1f0 kernel/locking/rwsem.c:1539
Code: 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc 4c 8d 7c 24 20 41 ff c6 48 89 df be 04 00 00 00 e8 8c e2 4e f7 4c 89 ff be 04 00 00 00 <e8> 7f e2 4e f7 8b 44 24 20 f0 44 0f b1 33 74 9b 41 89 c6 89 44 24
RSP: 0018:ffffc90004d477c0 EFLAGS: 00000256
RAX: 0000000000000001 RBX: ffff8880498d1840 RCX: ffffffff8ad30384
RDX: 0000000000000001 RSI: 0000000000000004 RDI: ffffc90004d477e0
RBP: ffffc90004d47850 R08: ffff8880498d1843 R09: 1ffff1100931a308
R10: dffffc0000000000 R11: ffffed100931a309 R12: dffffc0000000000
R13: 1ffff920009a8ef8 R14: 0000000080000001 R15: ffffc90004d477e0
FS:  00007fb1c82866c0(0000) GS:ffff888126def000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000564d0b801a70 CR3: 0000000041a86000 CR4: 00000000003526f0
Call Trace:
 <TASK>
 attr_data_get_block+0x10f/0x1ec0 fs/ntfs3/attrib.c:906
 ntfs_compress_write+0x59b/0x1c10 fs/ntfs3/file.c:1074
 ntfs_file_write_iter+0x4cf/0x870 fs/ntfs3/file.c:1317
 new_sync_write fs/read_write.c:593 [inline]
 vfs_write+0x5d5/0xb40 fs/read_write.c:686
 ksys_pwrite64 fs/read_write.c:793 [inline]
 __do_sys_pwrite64 fs/read_write.c:801 [inline]
 __se_sys_pwrite64 fs/read_write.c:798 [inline]
 __x64_sys_pwrite64+0x196/0x220 fs/read_write.c:798
 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
 do_syscall_64+0xec/0xf80 arch/x86/entry/syscall_64.c:94
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb1c8c1f749
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007fb1c8286038 EFLAGS: 00000246 ORIG_RAX: 0000000000000012
RAX: ffffffffffffffda RBX: 00007fb1c8e75fa0 RCX: 00007fb1c8c1f749
RDX: 0000000000000002 RSI: 0000200000000180 RDI: 0000000000000005
RBP: 00007fb1c8ca3f91 R08: 0000000000000000 R09: 0000000000000000
R10: 000000000000cbc5 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb1c8e76038 R14: 00007fb1c8e75fa0 R15: 00007ffe33b3cae8
 </TASK>