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: <1864.1176487711@redhat.com>
Date:	Fri, 13 Apr 2007 19:08:31 +0100
From:	David Howells <dhowells@...hat.com>
To:	netdev@...r.kernel.org
Subject: Possible bug in netlink_recvmsg()


As I understand it, according to the recvmsg() manual page, if the packet
being returned is larger than the buffer provided, and the protocol does not
support piecemeal reception of data, then:

 (1) the buffer should be filled,

 (2) MSG_TRUNC should be set in msg_flags, and

 (3) the length of the full packet, including the discarded bit should be
     returned.

AF_NETLINK sockets, however, do not do (3).  See this bit in netlink_recvmsg():

	copied = skb->len;
	if (len < copied) {
		msg->msg_flags |= MSG_TRUNC;
		copied = len;
	}

Or is this only true if the caller of recvmsg() passes MSG_TRUNC in?

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