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:   Wed, 13 Feb 2019 08:05:45 -0800
From:   Casey Schaufler <casey@...aufler-ca.com>
To:     Kees Cook <keescook@...omium.org>, James Morris <jmorris@...ei.org>
Cc:     Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] LSM: Ignore "security=" when "lsm=" is specified

On 2/12/2019 10:23 AM, Kees Cook wrote:
> To avoid potential confusion, explicitly ignore "security=" when "lsm=" is
> used on the command line, and report that it is happening.
>
> Suggested-by: Tetsuo Handa <penguin-kernel@...ove.sakura.ne.jp>
> Signed-off-by: Kees Cook <keescook@...omium.org>

Acked-by: Casey Schaufler <casey@...aufler-ca.com>

> ---
>  Documentation/admin-guide/kernel-parameters.txt | 10 ++++------
>  security/security.c                             |  8 ++++++--
>  2 files changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
> index 93d2c97f28fe..a0abd5f56e00 100644
> --- a/Documentation/admin-guide/kernel-parameters.txt
> +++ b/Documentation/admin-guide/kernel-parameters.txt
> @@ -2340,7 +2340,7 @@
>  
>  	lsm=lsm1,...,lsmN
>  			[SECURITY] Choose order of LSM initialization. This
> -			overrides CONFIG_LSM.
> +			overrides CONFIG_LSM, and the "security=" parameter.
>  
>  	machvec=	[IA-64] Force the use of a particular machine-vector
>  			(machvec) in a generic kernel.
> @@ -4129,11 +4129,9 @@
>  			Note: increases power consumption, thus should only be
>  			enabled if running jitter sensitive (HPC/RT) workloads.
>  
> -	security=	[SECURITY] Choose a security module to enable at boot.
> -			If this boot parameter is not specified, only the first
> -			security module asking for security registration will be
> -			loaded. An invalid security module name will be treated
> -			as if no module has been chosen.
> +	security=	[SECURITY] Choose a legacy "major" security module to
> +			enable at boot. This has been deprecated by the
> +			"lsm=" parameter.
>  
>  	selinux=	[SELINUX] Disable or enable SELinux at boot time.
>  			Format: { "0" | "1" }
> diff --git a/security/security.c b/security/security.c
> index 3147785e20d7..23cbb1a295a3 100644
> --- a/security/security.c
> +++ b/security/security.c
> @@ -288,9 +288,13 @@ static void __init ordered_lsm_init(void)
>  	ordered_lsms = kcalloc(LSM_COUNT + 1, sizeof(*ordered_lsms),
>  				GFP_KERNEL);
>  
> -	if (chosen_lsm_order)
> +	if (chosen_lsm_order) {
> +		if (chosen_major_lsm) {
> +			pr_info("security= is ignored because it is superseded by lsm=\n");
> +			chosen_major_lsm = NULL;
> +		}
>  		ordered_lsm_parse(chosen_lsm_order, "cmdline");
> -	else
> +	} else
>  		ordered_lsm_parse(builtin_lsm_order, "builtin");
>  
>  	for (lsm = ordered_lsms; *lsm; lsm++)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ