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: <m1d3wk2s7y.fsf@fess.ebiederm.org>
Date:	Tue, 25 May 2010 03:25:37 -0700
From:	ebiederm@...ssion.com (Eric W. Biederman)
To:	Dan Carpenter <error27@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...e.de>,
	"David S. Miller" <davem@...emloft.net>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] kobject: free memory if netlink_kernel_create() fails

Dan Carpenter <error27@...il.com> writes:

> There is a kfree(ue_sk) missing on the error path if 
> netlink_kernel_create() fails.
>
> Signed-off-by: Dan Carpenter <error27@...il.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@...ssion.com>

Oops.

> diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
> index 59c1551..08e15f7 100644
> --- a/lib/kobject_uevent.c
> +++ b/lib/kobject_uevent.c
> @@ -378,6 +378,7 @@ static int uevent_net_init(struct net *net)
>  	if (!ue_sk->sk) {
>  		printk(KERN_ERR
>  		       "kobject_uevent: unable to create netlink socket!\n");
> +		kfree(ue_sk);
>  		return -ENODEV;
>  	}
>  	mutex_lock(&uevent_sock_mutex);
--
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