lkml.org 
[lkml]   [2004]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] compat bug in sys_recvmsg, MSG_CMSG_COMPAT check missing
On Sat, 5 Jun 2004 22:43:34 +0200
Olaf Hering <olh@suse.de> wrote:

> 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

Not just packet_recvmsg() (frankly, I'm stumped how tcpdump is working
on my sparc64 boxes due to this bug!), every other sendmsg/recvmsg
implementation has a test like this verifying the msg_flags for bogons.

Let's ask a better question, why do we need to pass this thing down
into the implementations anyways?

I can't see a reason, can anyone else? If there is no reason, the
right fix is simply to mask it out at the top level, for both
sendmsg and recvmsg.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.061 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site