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-next>] [day] [month] [year] [list]
Message-ID: <b6fcc0a0708150204k16997328s9ff723b2a809be@mail.gmail.com>
Date:	Wed, 15 Aug 2007 13:04:05 +0400
From:	"Alexey Dobriyan" <adobriyan@...il.com>
To:	"Fengguang Wu" <wfg@...l.ustc.edu.cn>
Cc:	"Andrew Morton" <akpm@...ux-foundation.org>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	"Al Viro" <viro@....linux.org.uk>
Subject: Re: [PATCH] seqfile: fix uninitialized memory allocation in mounts_open()

On 8/15/07, Fengguang Wu <wfg@...l.ustc.edu.cn> wrote:
> proc_mounts.m.buf is not explicitly zeroed at allocation time, which
> may later confuse the seqfile code and triggle an kfree(m->buf).

It's cleared in seq_open().

> --- linux.orig/fs/proc/base.c
> +++ linux/fs/proc/base.c
> @@ -380,7 +380,7 @@ static int mounts_open(struct inode *ino
>
>  	if (ns) {
>  		ret = -ENOMEM;
> -		p = kmalloc(sizeof(struct proc_mounts), GFP_KERNEL);
> +		p = kzalloc(sizeof(struct proc_mounts), GFP_KERNEL);
>  		if (p) {
>  			file->private_data = &p->m;
>  			ret = seq_open(file, &mounts_op);
-
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