lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 25 Jan 2022 20:07:14 -0500
From:   Mimi Zohar <zohar@...ux.ibm.com>
To:     GUO Zihua <guozihua@...wei.com>, corbet@....net
Cc:     linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        roberto.sassu@...wei.com, wangweiyang2@...wei.com,
        xiujianfeng@...wei.com, linux-integrity@...r.kernel.org
Subject: Re: [RESEND][PATCH] Documentation: added order requirement for
 ima_hash=

On Tue, 2022-01-25 at 17:02 +0800, GUO Zihua wrote:
> From: Guo Zihua <guozihua@...wei.com>
> 
> Commandline parameter ima_hash= and ima_template= has order requirement
> for them to work correctly together. Namely ima_hash= must be
> specified after ima_template=, otherwise ima_template= will be ignored.
> 
> The reason is that when handling ima_hash=, ima template would be set to
> the default value if it has not been initialized already, and that value
> cannot be changed afterwards by ima_template=.
> 
> This patch adds this limitation to the documentation.
> 
> Reviewed-by: Roberto Sassu <roberto.sassu@...wei.com>
> Signed-off-by: Guo Zihua <guozihua@...wei.com>

This issue should be limited to the original "ima" template format,
which only supports hash algorithms of 20 bytes or less.  The "ima_ng"
template has been the default since larger digests and templates were
upstreamed back in Linux 3.13[1]. Do you really still have kernels
built with the original "ima" template?

[1] Refer to commit 4286587dccd4 ("ima: add Kconfig default measurement
list template").

thanks,

Mimi

> ---
>  Documentation/admin-guide/kernel-parameters.txt | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index f5a27f067db9..1b5aa6ca65f8 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -1843,6 +1843,10 @@
>  			The list of supported hash algorithms is defined
>  			in crypto/hash_info.h.
>  
> +			This parameter must be specified after ima_template=,
> +			as it would set the default template and that cannot be
> +			changed by ima_template= afterwards.
> +
>  	ima_policy=	[IMA]
>  			The builtin policies to load during IMA setup.
>  			Format: "tcb | appraise_tcb | secure_boot |
> @@ -1879,6 +1883,9 @@
>  			Formats: { "ima" | "ima-ng" | "ima-sig" }
>  			Default: "ima-ng"
>  
> +			This parameter must be specified before ima_hash=.
> +			Please refer to ima_hash= for further explanation.
> +
>  	ima_template_fmt=
>  			[IMA] Define a custom template format.
>  			Format: { "field1|...|fieldN" }


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ