netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] compat bug in sys_recvmsg, MSG_CMSG_COMPAT check missing
@ 2004-06-05 20:43 Olaf Hering
  2004-06-05 21:01 ` David S. Miller
  2004-06-05 21:14 ` Olaf Hering
  0 siblings, 2 replies; 14+ messages in thread
From: Olaf Hering @ 2004-06-05 20:43 UTC (permalink / raw)
  To: linux-kernel, netdev


packet_recvmsg() gets the flags from the compat_sys_socketcall(), but it
does not check for the active MSG_CMSG_COMPAT bit. As a result, it
returns -EINVAL and makes the user rather unhappy


diff -purN linux-2.6.7-rc2-bk5.orig/net/packet/af_packet.c linux-2.6.7-rc2-bk5/net/packet/af_packet.c
--- linux-2.6.7-rc2-bk5.orig/net/packet/af_packet.c	2004-06-05 09:34:48.000000000 +0200
+++ linux-2.6.7-rc2-bk5/net/packet/af_packet.c	2004-06-05 22:32:16.000000000 +0200
@@ -1037,7 +1037,7 @@ static int packet_recvmsg(struct kiocb *
 	int copied, err;
 
 	err = -EINVAL;
-	if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC))
+	if (flags & ~(MSG_PEEK|MSG_DONTWAIT|MSG_TRUNC|MSG_CMSG_COMPAT))
 		goto out;
 
 #if 0
-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2004-06-05 22:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-06-05 20:43 [PATCH] compat bug in sys_recvmsg, MSG_CMSG_COMPAT check missing Olaf Hering
2004-06-05 21:01 ` David S. Miller
2004-06-05 21:05   ` David S. Miller
2004-06-05 21:21     ` Andreas Schwab
2004-06-05 21:36       ` David S. Miller
2004-06-05 21:47         ` Andreas Schwab
2004-06-05 21:53           ` David S. Miller
2004-06-05 22:05             ` Andreas Schwab
2004-06-05 22:29               ` David S. Miller
2004-06-05 22:37                 ` Olaf Hering
2004-06-05 22:55                   ` David S. Miller
2004-06-05 21:17   ` Olaf Hering
2004-06-05 21:37     ` David S. Miller
2004-06-05 21:14 ` Olaf Hering

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).