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: <20131223031706.GL14073@order.stressinduktion.org>
Date:	Mon, 23 Dec 2013 04:17:06 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Florian Westphal <fw@...len.de>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] net: rose: restore old recvmsg behavior

On Mon, Dec 23, 2013 at 12:32:31AM +0100, Florian Westphal wrote:
> --- a/net/rose/af_rose.c
> +++ b/net/rose/af_rose.c
> @@ -1253,6 +1253,7 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
>  
>  	if (msg->msg_name) {
>  		struct sockaddr_rose *srose;
> +		struct full_sockaddr_rose *full_srose = msg->msg_name;
>  
>  		memset(msg->msg_name, 0, sizeof(struct full_sockaddr_rose));
>  		srose = msg->msg_name;
> @@ -1260,18 +1261,9 @@ static int rose_recvmsg(struct kiocb *iocb, struct socket *sock,
>  		srose->srose_addr   = rose->dest_addr;
>  		srose->srose_call   = rose->dest_call;
>  		srose->srose_ndigis = rose->dest_ndigis;
> -		if (msg->msg_namelen >= sizeof(struct full_sockaddr_rose)) {
> -			struct full_sockaddr_rose *full_srose = (struct full_sockaddr_rose *)msg->msg_name;
> -			for (n = 0 ; n < rose->dest_ndigis ; n++)
> -				full_srose->srose_digis[n] = rose->dest_digis[n];
> -			msg->msg_namelen = sizeof(struct full_sockaddr_rose);
> -		} else {
> -			if (rose->dest_ndigis >= 1) {
> -				srose->srose_ndigis = 1;
> -				srose->srose_digi = rose->dest_digis[0];
> -			}
> -			msg->msg_namelen = sizeof(struct sockaddr_rose);
> -		}
> +		for (n = 0 ; n < rose->dest_ndigis ; n++)
> +			full_srose->srose_digis[n] = rose->dest_digis[n];
> +		msg->msg_namelen = sizeof(struct full_sockaddr_rose);
>  	}
>  
>  	skb_free_datagram(sk, skb);

Looks good. I guess we want to push that to stable, too?

Acked-by: Hannes Frederic Sowa <hannes@...essinduktion.org>

--
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