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]
Date:	Sun, 12 Jul 2009 07:57:51 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Catalin Marinas <catalin.marinas@....com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Parag Warudkar <parag.warudkar@...il.com>,
	linux-kernel@...r.kernel.org, Greg Kroah-Hartman <gregkh@...e.de>,
	Al Viro <viro@...IV.linux.org.uk>
Subject: Re: [PATCH] Free the memory allocated by memdup_user() in fs/sysfs/bin.c

Catalin Marinas <catalin.marinas@....com> writes:

> Commit 1c8542c7bb replaced kmalloc() with memdup_user() in the write()
> function but also dropped the kfree(temp). The memdup_user() function
> allocates memory which is never freed.

Acked-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> Signed-off-by: Catalin Marinas <catalin.marinas@....com>
> Cc: Parag Warudkar <parag.warudkar@...il.com>
> ---
>  fs/sysfs/bin.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/fs/sysfs/bin.c b/fs/sysfs/bin.c
> index 9345806..2524714 100644
> --- a/fs/sysfs/bin.c
> +++ b/fs/sysfs/bin.c
> @@ -171,6 +171,7 @@ static ssize_t write(struct file *file, const char __user *userbuf,
>  	if (count > 0)
>  		*off = offs + count;
>  
> +	kfree(temp);
>  	return count;
>  }
>  
>
> --
> 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/
--
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