Linux Integrity Measurement development
 help / color / mirror / Atom feed
* ima: zeroed out digest values
@ 2023-01-03  5:41 Matt Bobrowski
  2023-01-03 16:37 ` Mimi Zohar
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Bobrowski @ 2023-01-03  5:41 UTC (permalink / raw)
  To: zohar, dmitry.kasatkin; +Cc: linux-integrity, paul, eparis

Hi Mimi/Dmitry,

In commit 54f03916fb892 [0] the way which errors [1, 2] are being
handled by some of the IMA measurement routines had slightly
changed. Specifically, in the ima_collect_measurement() helper if the
hash calculation failed for whatever reason (i.e. received a software
interrupt whilst executing in a late stage of the ima_bprm_check
security hook), rather than returning to the caller early we continue
with populating the ima_digest_data within the respective iint entry,
in which case is all zeroes given that we initialize the hash buffer
with zeroes prior to calculating a hash. Some interfaces that piggy
back of IMA measurements i.e. BPF and Audit, are now left with
reporting zeroed hash values in some cases.

I wanted to confirm whether this is expected behavior?

[0]
https://github.com/torvalds/linux/commit/54f03916fb892441f9a9b579db9ad7925cdeb395
[1] https://github.com/torvalds/linux/commit/54f03916fb892441f9a9b579db9ad7925cdeb395#diff-a7813ab229aa21485d06aed8f7f36aef97e38d8a0b18a77ecccd64c9abe91194L254
[2] https://github.com/torvalds/linux/commit/54f03916fb892441f9a9b579db9ad7925cdeb395#diff-7fb0c7b8604559abf88f1313cd798710a86e2f0fa2fab3b0f32bc7972c82846fL338

/M

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ima: zeroed out digest values
  2023-01-03  5:41 ima: zeroed out digest values Matt Bobrowski
@ 2023-01-03 16:37 ` Mimi Zohar
  0 siblings, 0 replies; 2+ messages in thread
From: Mimi Zohar @ 2023-01-03 16:37 UTC (permalink / raw)
  To: Matt Bobrowski, dmitry.kasatkin; +Cc: linux-integrity, paul, eparis

On Tue, 2023-01-03 at 05:41 +0000, Matt Bobrowski wrote:
> Hi Mimi/Dmitry,
> 
> In commit 54f03916fb892 [0] the way which errors [1, 2] are being
> handled by some of the IMA measurement routines had slightly
> changed. Specifically, in the ima_collect_measurement() helper if the
> hash calculation failed for whatever reason (i.e. received a software
> interrupt whilst executing in a late stage of the ima_bprm_check
> security hook), rather than returning to the caller early we continue
> with populating the ima_digest_data within the respective iint entry,
> in which case is all zeroes given that we initialize the hash buffer
> with zeroes prior to calculating a hash. Some interfaces that piggy
> back of IMA measurements i.e. BPF and Audit, are now left with
> reporting zeroed hash values in some cases.
> 
> I wanted to confirm whether this is expected behavior?

Definitely not.  Thank you for finding and reporting it.

Mimi

> 
> [0]
> https://github.com/torvalds/linux/commit/54f03916fb892441f9a9b579db9ad7925cdeb395
> [1] https://github.com/torvalds/linux/commit/54f03916fb892441f9a9b579db9ad7925cdeb395#diff-a7813ab229aa21485d06aed8f7f36aef97e38d8a0b18a77ecccd64c9abe91194L254
> [2] https://github.com/torvalds/linux/commit/54f03916fb892441f9a9b579db9ad7925cdeb395#diff-7fb0c7b8604559abf88f1313cd798710a86e2f0fa2fab3b0f32bc7972c82846fL338
> 
> /M





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-01-03 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-03  5:41 ima: zeroed out digest values Matt Bobrowski
2023-01-03 16:37 ` Mimi Zohar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox