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]
Message-ID: <alpine.LRH.2.21.2003271107000.14767@namei.org>
Date:   Fri, 27 Mar 2020 11:07:07 +1100 (AEDT)
From:   James Morris <jmorris@...ei.org>
To:     Roberto Sassu <roberto.sassu@...wei.com>
cc:     zohar@...ux.ibm.com, James.Bottomley@...senPartnership.com,
        linux-integrity@...r.kernel.org,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, silviu.vlasceanu@...wei.com,
        stable@...r.kernel.org
Subject: Re: [PATCH v4 2/7] ima: Evaluate error in init_ima()

On Wed, 25 Mar 2020, Roberto Sassu wrote:

> Evaluate error in init_ima() before register_blocking_lsm_notifier() and
> return if not zero.
> 
> Cc: stable@...r.kernel.org # 5.3.x
> Fixes: b16942455193 ("ima: use the lsm policy update notifier")
> Signed-off-by: Roberto Sassu <roberto.sassu@...wei.com>
> ---
>  security/integrity/ima/ima_main.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> index 9d0abedeae77..f96f151294e6 100644
> --- a/security/integrity/ima/ima_main.c
> +++ b/security/integrity/ima/ima_main.c
> @@ -792,6 +792,9 @@ static int __init init_ima(void)
>  		error = ima_init();
>  	}
>  
> +	if (error)
> +		return error;
> +
>  	error = register_blocking_lsm_notifier(&ima_lsm_policy_notifier);
>  	if (error)
>  		pr_warn("Couldn't register LSM notifier, error %d\n", error);
> 


Reviewed-by: James Morris <jamorris@...ux.microsoft.com>

-- 
James Morris
<jmorris@...ei.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ