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: <20240801073406.GAZqs6biPeFEG-0wPF@fat_crate.local>
Date: Thu, 1 Aug 2024 09:34:06 +0200
From: Borislav Petkov <bp@...en8.de>
To: KP Singh <kpsingh@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org,
	paul@...l-moore.com, sfr@...b.auug.org.au
Subject: Re: [PATCH] init/main.c: Do jump_label_init before
 early_security_init

On Wed, Jul 31, 2024 at 11:34:29PM +0200, KP Singh wrote:
> LSM indirect calls being are now replaced by static calls, this requires
> a jumpt_table_init before early_security_init where LSM hooks and their
> static calls and keys are initialized.
> 
> Fixes: 2732ad5ecd5b ("lsm: replace indirect LSM hook calls with static calls")
> Signed-off-by: KP Singh <kpsingh@...nel.org>
> ---
>  init/main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/init/main.c b/init/main.c
> index 206acdde51f5..5bd45af7a49e 100644
> --- a/init/main.c
> +++ b/init/main.c
> @@ -922,6 +922,8 @@ void start_kernel(void)
>  	boot_cpu_init();
>  	page_address_init();
>  	pr_notice("%s", linux_banner);
> +	/* LSM and command line parameters use static keys */
> +	jump_label_init();
>  	early_security_init();
>  	setup_arch(&command_line);
>  	setup_boot_config();
> @@ -933,8 +935,6 @@ void start_kernel(void)
>  	boot_cpu_hotplug_init();
>  
>  	pr_notice("Kernel command line: %s\n", saved_command_line);
> -	/* parameters may set static keys */
> -	jump_label_init();
>  	parse_early_param();
>  	after_dashes = parse_args("Booting kernel",
>  				  static_command_line, __start___param,
> -- 

I was gonna be very surprised if you could simply change the boot ordering
like that and it would simply work. The early boot order is a nightmare so
without proper audit of what uses which facilities when, you won't be really
successful, I'd say.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ