diff options
| author | Frederick Lawler <fred@cloudflare.com> | 2026-08-19 18:45:23 -0500 |
|---|---|---|
| committer | Mimi Zohar <zohar@linux.ibm.com> | 2026-09-01 22:29:08 -0400 |
| commit | 8e22ce504f8a332c57ca9676ab804da5ac4a1325 (patch) | |
| tree | b51cc5c33aa68d092ae9c66fb16776c31e1415c5 /scripts/Makefile.thinlto | |
| parent | ab84c314417e4743f72f4d3d5e58cf96e07213cc (diff) | |
| download | linux-8e22ce504f8a332c57ca9676ab804da5ac4a1325.tar.gz linux-8e22ce504f8a332c57ca9676ab804da5ac4a1325.zip | |
ima: don't measure/appraise files on configfs
IMA measurement of a configfs file causes process_measurement() to hold
iint->mutex while performing a kernel_read() to hash it, which re-enters
configfs's own file locking (buffer->mutex, frag_sem).
Separately, opening any file with O_TRUNC now causes ima_file_truncate()
to take iint->mutex to reset the cached action flags, while sb_writers is
already held for that mount.
When a configfs-backed nvmet namespace is involved, these two independent
lock chains combine into a cycle:
iint->mutex -> configfs locks -> subsys->lock -> sb_writers -> iint->mutex
Add configfs to the builtin don't measure/appraise rules, similarly to
other pseudo file systems, so IMA never takes iint->mutex for configfs
file in the first place.
Reported-by: syzbot+448c2e24b1ceff13ed2a@syzkaller.appspotmail.com
Link: https://lore.kernel.org/all/6a77c7cd.b50370da.49fe0.0031.GAE@google.com/
Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Frederick Lawler <fred@cloudflare.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
