bin/60901: XDR stdio is broken on 64 bit platforms.

Logan Gabriel gersh at sonn.com
Sun Jan 4 11:20:17 PST 2004


>Number:         60901
>Category:       bin
>Synopsis:       XDR stdio is broken on 64 bit platforms.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 04 11:20:13 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Logan Gabriel
>Release:        5.2-CURRENT
>Organization:
Corvus security group
>Environment:
n/a
>Description:
XDR stdio is broken on 64 bit platforms.  If sizeof(int32_t) != sizeof(long) xdrstdio_putlong and xdrstdio_getlong will read/write incorrect values.
>How-To-Repeat:
I have written an example program that may be obtained at:
http://deity.kaosol.net/xdrbug.tgz.

If for some reason that is not available just create an xdrstdio stream and serialize a few values into it.  Compare a md5 of that output on a 64 bit platform with the output on a 32 bit platform and they will differ.
>Fix:
NetBSD has already fixed this issue per PR lib/23960.  See 

http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/rpc/xdr_stdio.c


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list