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: <20141212.213313.1419808296502891420.davem@davemloft.net>
Date:	Fri, 12 Dec 2014 21:33:13 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	viro@...IV.linux.org.uk
Cc:	kaber@...sh.net, netdev@...r.kernel.org
Subject: Re: [WTF?] random test in netlink_sendmsg()

From: Al Viro <viro@...IV.linux.org.uk>
Date: Sat, 13 Dec 2014 01:54:15 +0000

> On Fri, Dec 12, 2014 at 08:07:58PM -0500, David Miller wrote:
>> From: Al Viro <viro@...IV.linux.org.uk>
>> Date: Fri, 12 Dec 2014 21:32:43 +0000
>> 
>> > What do we want sendmsg(fd, &msg, 0) to do when fd is AF_NETLINK socket
>> > that had setsockopt(fd, SOL_NETLINK, NETLINK_TX_RING, ...) successfully done
>> > to it and msg.msg_iovlen is 0?
>> 
>> We had a similar issue with msg_name/msg_namelen and we ended up saying
>> that if msg_namelen is zero then we force msg_name to NULL.
> 
> Hmm...  The thing is, there might be legitimate users with empty payload,
> making this call for the sake of SCM_CREDENTIALS.  IOW, what should happen
> if we have
> 	msg_iovlen = 0
> 	msg_iov = <anything>
> 	msg_control = &cmsg
> 	msg_controllen = cmsg_len
> Sure, both paths will pass creds, but what about the payload?  And the number
> of datagram actually transmitted, for that matter?

Ok, so we just adjust the AF_PACKET check to test msg_iovlen==1 as
well, and that takes care of that case.

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