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]
Date:	Sun, 29 Oct 2006 13:33:52 +0100
From:	Thomas Graf <tgraf@...g.ch>
To:	Oleg Nesterov <oleg@...sign.ru>
Cc:	Andrew Morton <akpm@...l.org>,
	Shailabh Nagar <nagar@...son.ibm.com>,
	Balbir Singh <balbir@...ibm.com>, Jay Lan <jlan@....com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] taskstats: fix? sk_buff leak

* Oleg Nesterov <oleg@...sign.ru> 2006-10-29 16:24
> Compile tested only, and I know nothing about net/. Needs an ack from
> maintainer.
> 
> 'return genlmsg_cancel()' in taskstats_user_cmd/taskstats_exit_send looks
> wrong to me. Unless we pass 'rep_skb' to the netlink layer we own sk_buff,
> yes? This means we should always do kfree_skb() on failure.

That's right.

> Signed-off-by: Oleg Nesterov <oleg@...sign.ru>
> 
> --- STATS/kernel/taskstats.c~1_skb	2006-10-29 15:12:51.000000000 +0300
> +++ STATS/kernel/taskstats.c	2006-10-29 16:16:05.000000000 +0300
> @@ -411,7 +411,7 @@ static int taskstats_user_cmd(struct sk_
>  	return send_reply(rep_skb, info->snd_pid);
>  
>  nla_put_failure:
> -	return genlmsg_cancel(rep_skb, reply);
> +	genlmsg_cancel(rep_skb, reply);

rc = genlmsg_cancel(...) or return value is undefined.

>  err:
>  	nlmsg_free(rep_skb);
>  	return rc;
> @@ -507,7 +507,6 @@ send:
>  
>  nla_put_failure:
>  	genlmsg_cancel(rep_skb, reply);
> -	goto ret;
>  err_skb:
>  	nlmsg_free(rep_skb);
>  ret:
> 
-
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