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:	Mon, 23 Nov 2015 23:35:47 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	ying.xue@...driver.com
Cc:	jon.maloy@...csson.com, scan-admin@...erity.com,
	stephen@...workplumber.org, netdev@...r.kernel.org,
	tipc-discussion@...ts.sourceforge.net
Subject: Re: [PATCH] tipc: fix error handling of expanding buffer headroom

From: Ying Xue <ying.xue@...driver.com>
Date: Sun, 22 Nov 2015 15:38:39 +0800

> @@ -158,8 +158,11 @@ static int tipc_udp_send_msg(struct net *net, struct sk_buff *skb,
>  	struct udp_media_addr *src = (struct udp_media_addr *)&b->addr.value;
>  	struct rtable *rt;
>  
> -	if (skb_headroom(skb) < UDP_MIN_HEADROOM)
> -		pskb_expand_head(skb, UDP_MIN_HEADROOM, 0, GFP_ATOMIC);
> +	if (skb_headroom(skb) < UDP_MIN_HEADROOM) {
> +		err = pskb_expand_head(skb, UDP_MIN_HEADROOM, 0, GFP_ATOMIC);
> +		if (!err)
> +			goto tx_error;
> +	}

pskb_expand_head() returns negative error codes, therefore zero means
success and therefore this "!err" check is reversed.
--
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