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] [day] [month] [year] [list]
Message-ID: <20231011073405.GB34982@atomide.com>
Date:   Wed, 11 Oct 2023 10:34:05 +0300
From:   Tony Lindgren <tony@...mide.com>
To:     Petr Mladek <pmladek@...e.com>,
        Steven Rostedt <rostedt@...dmis.org>,
        John Ogness <john.ogness@...utronix.de>,
        Sergey Senozhatsky <senozhatsky@...omium.org>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH] printk: Check valid console index for preferred console

* Tony Lindgren <tony@...mide.com> [700101 02:00]:
> --- a/kernel/printk/printk.c
> +++ b/kernel/printk/printk.c
> @@ -2410,6 +2410,10 @@ static int __add_preferred_console(char *name, int idx, char *options,
>  	struct console_cmdline *c;
>  	int i;
>  
> +	/* See struct console */
> +	if (idx > SHRT_MAX)
> +		return -EINVAL;
> +

We can just use const short idx for preferred console and return an error
for negative values for preferred console. I'll send out v2 patch.

Regards,

Tony

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ