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: <cde00350-2a18-1759-d53b-2e7489b6cc0e@i-love.sakura.ne.jp>
Date:   Tue, 23 Mar 2021 22:37:39 +0900
From:   Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
To:     Mimi Zohar <zohar@...ux.ibm.com>,
        Dmitry Vyukov <dvyukov@...gle.com>
Cc:     linux-integrity@...r.kernel.org, James Morris <jmorris@...ei.org>,
        "Serge E . Hallyn" <serge@...lyn.com>,
        linux-security-module <linux-security-module@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Eric Biggers <ebiggers@...nel.org>
Subject: Re: [RFC PATCH 2/2] integrity: double check iint_cache was
 initialized

On 2021/03/23 21:09, Mimi Zohar wrote:
> Please take a look at the newer version of this patch.   Do you want to
> add any tags?

Oh, I didn't know that you already posted the newer version.

> diff --git a/security/integrity/iint.c b/security/integrity/iint.c
> index 1d20003243c3..0ba01847e836 100644
> --- a/security/integrity/iint.c
> +++ b/security/integrity/iint.c
> @@ -98,6 +98,14 @@ struct integrity_iint_cache *integrity_inode_get(struct inode *inode)
>  	struct rb_node *node, *parent = NULL;
>  	struct integrity_iint_cache *iint, *test_iint;
>  
> +	/*
> +	 * The integrity's "iint_cache" is initialized at security_init(),
> +	 * unless it is not included in the ordered list of LSMs enabled
> +	 * on the boot command line.
> +	 */
> +	if (!iint_cache)
> +		panic("%s: lsm=integrity required.\n", __func__);
> +

This looks strange. If "lsm=" parameter must include "integrity",
it implies that nobody is allowed to disable "integrity" at boot.
Then, why not unconditionally call integrity_iintcache_init() by
not counting on DEFINE_LSM(integrity) declaration?

>  	iint = integrity_iint_find(inode);
>  	if (iint)
>  		return iint;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ