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-next>] [day] [month] [year] [list]
Message-Id: <200803042256.m24Muogl001357@imap1.linux-foundation.org>
Date:	Tue, 04 Mar 2008 14:56:49 -0800
From:	akpm@...ux-foundation.org
To:	davem@...emloft.net
Cc:	netdev@...r.kernel.org, akpm@...ux-foundation.org,
	dhowells@...hat.com
Subject: [patch (for 2.6.25?) 2/2] RxRPC: fix rxrpc_recvmsg()'s returning of msg_name

From: David Howells <dhowells@...hat.com>

Fix rxrpc_recvmsg() to return msg_name correctly.  We shouldn't overwrite the
*msg struct, but should rather write into msg->msg_name (there's a '&' unary
operator that shouldn't be there).

Signed-off-by: David Howells <dhowells@...hat.com>
Cc: "David S. Miller" <davem@...emloft.net>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---

 net/rxrpc/ar-recvmsg.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff -puN net/rxrpc/ar-recvmsg.c~rxrpc-fix-rxrpc_recvmsgs-returning-of-msg_name net/rxrpc/ar-recvmsg.c
--- a/net/rxrpc/ar-recvmsg.c~rxrpc-fix-rxrpc_recvmsgs-returning-of-msg_name
+++ a/net/rxrpc/ar-recvmsg.c
@@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, st
 		/* copy the peer address and timestamp */
 		if (!continue_call) {
 			if (msg->msg_name && msg->msg_namelen > 0)
-				memcpy(&msg->msg_name, &call->conn->trans->peer->srx,
+				memcpy(msg->msg_name,
+				       &call->conn->trans->peer->srx,
 				       sizeof(call->conn->trans->peer->srx));
 			sock_recv_timestamp(msg, &rx->sk, skb);
 		}
_
--
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