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]
Date:	Mon, 07 Oct 2013 15:12:33 -0400 (EDT)
From:	David Miller <davem@...emloft.net>
To:	sar@...-labs.com
Cc:	luto@...capital.net, netdev@...r.kernel.org,
	mtk.manpages@...il.com, ebiederm@...ssion.com
Subject: Re: bug in passing file descriptors

From: Steve Rago <sar@...-labs.com>
Date: Mon, 7 Oct 2013 15:06:02 -0400

> Maybe.  So a client expecting to receive x bytes of control
> information should make sure their buffer is at least CMSG_SPACE(x)
> bytes long instead of CMSG_LEN(x) bytes long, because you feel
> compelled to copy the final padding from kernel space to user space?
> Seems wrong to me.  IMHO, the final padding should only come into play
> when calculating where the next header should begin.

Yes, all control messages must be aligned to, and be of a length of a
multiple of, "sizeof(long)".

This is the only correct way to program control messages.
--
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