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>] [day] [month] [year] [list]
Date:	Thu, 16 May 2013 20:38:53 +0200
From:	Oleg Nesterov <oleg@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Colin Walters <walters@...bum.org>,
	Denys Vlasenko <vda.linux@...glemail.com>,
	Jiri Slaby <jslaby@...e.cz>,
	Lennart Poettering <mzxreary@...inter.de>,
	Lucas De Marchi <lucas.de.marchi@...il.com>,
	Neil Horman <nhorman@...driver.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/6] coredump: avoid the uninitialized cn->corename if
	core_pattern is empty

off-topic...

Perhaps do_coredump() should warn if filp_open() fails?

And I'd wish I could understand d_unhashed() check...

And why filp_open() uses O_RDWR passed as hardcoded 2.

On 05/16, Oleg Nesterov wrote:
>
> If core_pattern is "" or "|", cn->corename is used uninitialized
> by filp_open() or call_usermodehelper_exec().
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>
> ---
>  fs/coredump.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/coredump.c b/fs/coredump.c
> index 5968064..72f816d 100644
> --- a/fs/coredump.c
> +++ b/fs/coredump.c
> @@ -165,6 +165,7 @@ static int format_corename(struct core_name *cn, struct coredump_params *cprm)
>  	cn->corename = NULL;
>  	if (expand_corename(cn, core_name_size))
>  		return -ENOMEM;
> +	cn->corename[0] = '\0';
>  
>  	if (ispipe)
>  		++pat_ptr;
> -- 
> 1.5.5.1
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ