Linux Security Modules development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Nicolai Kuntze <nicolai.kuntze@hs-mainz.de>,
	 linux-integrity@vger.kernel.org
Cc: Mimi Zohar <zohar@linux.ibm.com>,
	Roberto Sassu <roberto.sassu@huawei.com>,
	 Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	Eric Snowberg <eric.snowberg@oracle.com>,
	Paul Moore	 <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E. Hallyn"	 <serge@hallyn.com>,
	linux-security-module@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Subject: Re: [RFC] IMA: periodic runtime re-measurement of process .text/GOT
Date: Fri, 21 Aug 2026 10:12:27 +0100	[thread overview]
Message-ID: <b13a1741eceeba4d4ec50e1c898e011ea81a178b.camel@HansenPartnership.com> (raw)
In-Reply-To: <20260817102323.35950-1-nicolai.kuntze@hs-mainz.de>

On Mon, 2026-08-17 at 12:23 +0200, Nicolai Kuntze wrote:
> Hi,
> 
> This is a design RFC, not a patch submission -- I'd like feedback on
> the approach before polishing the patch series further. A working
> reference implementation exists today for demonstration; details and
> links below.
> 
> Problem
> 
> Every existing IMA hook (FILE_CHECK, MMAP_CHECK, BPRM_CHECK,
> MODULE_CHECK, ...) measures once, at load time: file open, exec,
> mmap, module load, or an explicit ima_measure_critical_data() call.
> Nothing in IMA today re-measures an object after it's already
> resident. A process's .text

A processes text segment is mapped ro and cannot change.  We're looking
to apply the kernel ROX guarantees to user processes, which would make
it very hard even for someone with privilege to modify the text
segment, but if you're looking to fix something like the copy fail
cache corruption, then a strengthened ROX mechanism would be way better
than trying to detect it.

>  or GOT can be modified in memory after load

The GOT (and GOT.PLT) sections are updated by the dynamic linker
*after* the binary is measured.  They're also often constructed lazily
by just in time symbol resolution meaning they change throughout the
lifetime of the process ... therefore if you include them, practically
every measurement will be different and there'll be no way to
reconstruct what measurement you should have seen or relate it back to
the original measurement.  It is possible to do non-lazy linking and
then seal the GOT read only, but that incurs a huge startup cost, so
what is the actual threat model here?

>  (ptrace(), a kernel exploit writing through /proc/pid/mem, or
> similar) without IMA ever re-examining it

Those are all privileged operations, so what is the threat model you're
guarding against?  because if it's something like container mutations,
then using dm-verity and proper ROX handling is likely a better
guarantor.

Regards,

James

      parent reply	other threads:[~2026-08-21  9:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 10:23 [RFC] IMA: periodic runtime re-measurement of process .text/GOT Nicolai Kuntze
2026-08-19 17:45 ` Mimi Zohar
2026-08-21  9:12 ` James Bottomley [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=b13a1741eceeba4d4ec50e1c898e011ea81a178b.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=eric.snowberg@oracle.com \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=nicolai.kuntze@hs-mainz.de \
    --cc=paul@paul-moore.com \
    --cc=roberto.sassu@huawei.com \
    --cc=serge@hallyn.com \
    --cc=zohar@linux.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox