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]
Message-ID: <4DF1D41F.6010300@cn.fujitsu.com>
Date:	Fri, 10 Jun 2011 16:21:51 +0800
From:	Wei Yongjun <yjwei@...fujitsu.com>
To:	Michio Honda <micchie@....wide.ad.jp>
CC:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH] sctp: kzalloc() error handling on deleting last address


> From 49a66ecad72af8c367b125c695a113d3f3870320 Mon Sep 17 00:00:00 2001
> From: Michio Honda <micchie@....wide.ad.jp>
> Date: Fri, 10 Jun 2011 16:42:14 +0900
> Subject: [PATCH] sctp: kzalloc() error handling on deleting last address
>
> Signed-off-by: Michio Honda <micchie@....wide.ad.jp>
> ---
>  net/sctp/socket.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index e7e1b14..a23d898 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -786,6 +786,8 @@ static int sctp_send_asconf_del_ip(struct sock		*sk,
>  				continue;
>  			asoc->asconf_addr_del_pending =
>  			    kzalloc(sizeof(union sctp_addr), GFP_ATOMIC);
> +			if (asoc->asconf_addr_del_pending == NULL) 
> +				continue;

better to return with ENOMEM.

if (asoc->asconf_addr_del_pending == NULL) {
	retval = -ENOMEM;
	goto out;
}


>  			asoc->asconf_addr_del_pending->sa.sa_family =
>  				    addrs->sa_family;
>  			asoc->asconf_addr_del_pending->v4.sin_port =
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ