From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH v4] ima: fix races when deleting measurement list records
Date: Fri, 13 Nov 2026 15:06:55 +0000 [thread overview]
Message-ID: <sashiko-outbox-213054@kernel.org> (raw)
In-Reply-To: <20261113145610.1826692-1-liuwb@xiaopeng.com>
> Without this patch, ima_queue_delete_partial() looks up the queue entry
> at which the measurement list has to be cut without holding
> ima_extend_list_mutex, and only takes the mutex afterwards for
> __list_cut_position(). The comment above the cut justifies this with
> "ima_fs.c enforces single-writer exclusion".
>
> That exclusion only covers cross-process opens and is only enforced at
> open() and release() time. ima_measure_lock() registers measure_writer
> at open() time and even lets the same task open the file again by
> incrementing measure_writer_extra_writes, while
> _ima_measurements_write() never checks the caller's identity. A
> privileged task can therefore open several descriptors for the
> measurement list and use them concurrently from its own threads. Each
> open() creates a separate struct file, so the f_pos_lock taken by
> fdget_pos() serializes neither these writers nor their readers.
> [ ... ]
> Fixes: e9b491e27bf6 ("ima: Add support for staging measurements with prompt")
> Fixes: fcb0318a2969 ("ima: Support staging and deleting N measurements records")
> Cc: stable@vger.kernel.org # v7.2+
> Reviewed-by: Lin Qiaojie <linqj@xiaopeng.com>
> Signed-off-by: Weibin Liu <liuwb@xiaopeng.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261113145610.1826692-1-liuwb@xiaopeng.com?part=1
prev parent reply other threads:[~2026-11-13 15:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 14:56 [PATCH v4] ima: fix races when deleting measurement list records Weibin Liu
2026-11-13 15:06 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-213054@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.