Subject: kern/9516: unp_* in sys/kern/uipc_socket.c does not obey RFC2292 description for ancillary data alignment
To: None <gnats-bugs@gnats.netbsd.org>
From: Jun-ichiro itojun Hagino <itojun@itojun.org>
List: netbsd-bugs
Date: 02/29/2000 23:27:33
>Number:         9516
>Category:       kern
>Synopsis:       unp_* in sys/kern/uipc_socket.c does not obey RFC2292 description for ancillary data alignment
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 29 23:27:00 2000
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Organization:
	itojun.org
>Release:        
>Environment:

>Description:
	unp_* uses ancillary data (cmsg_xx).  the way it manipulates the
	ancillary data item does not meet with padding requirement imposed by
	sys/socket.h.  sys/socket.h is obeying RFC2292.
	it looks that unp_* is assuming certain alignment which conflicts with
	RFC2292.

	how many userland programs manipulate credentals generated by
	unp_externalize?  if there's no userland program, and if unp_* are
	agreeing on each other, this problem shows no real harm on i386.

	the alignment issue may raise some problem on picky-to-alignment
	architectures (64bit, specifically).  maybe not.

>How-To-Repeat:
	look at the code.
>Fix:
>Audit-Trail:
>Unformatted:
	latest -currnt, 1.4.1