NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/41879: openssl ocsp -port uses a signed short



>Number:         41879
>Category:       bin
>Synopsis:       openssl ocsp -port uses as signed short
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Aug 12 17:30:00 +0000 2009
>Originator:     Emmanuel Dreyfus
>Release:        NetBSD 5.0_STABLE
>Organization:
>Environment:
System: NetBSD glop.example.net 5.0_STABLE NetBSD 5.0_STABLE (XEN3_DOMU) #0: 
Sat Aug 1 15:33:02 UTC 2009 
builds%b7.netbsd.org@localhost:/home/builds/ab/netbsd-5/i386/200908010000Z-obj/home/builds/ab/netbsd-5/src/sys/arch/i386/compile/XEN3_DOMU
 i386
Architecture: i386
Machine: i386

>Description:
openssl ocsp -port uses a signed short. This means that in order to listen 
on port 8080, one need to use openssl ocsp -port -57456

We get to this result because: 57456 + 8080 = 0 % 2^16

Using openssl ocsp -port 8080 will lead to a bind failure followed by a
 crash:

#         openssl ocsp -index /htdocs/ocsp/index.txt \
                -url http://localhost -port 8080 -CA certs/ca.crt \
                -text -rsigner certs/ocsp2009.crt \
                -rkey private/www.example.net.key \
                -nrequest 1 -out log.txt
3148069572:error:02006016:system library:bind:Invalid 
argument:/home/builds/ab/netbsd-5/src/crypto/dist/openssl/crypto/bio/b_sock.c:759:port='8080'
3148069572:error:20069075:BIO routines:BIO_get_accept_socket:unable to bind 
socket:/home/builds/ab/netbsd-5/src/crypto/dist/openssl/crypto/bio/b_sock.c:761:
[1]   Segmentation fault (core dumped) openssl ocsp -in...


>How-To-Repeat:
See above.
>Fix:
Unknown yet. That bug did not exist in NetBSD 4.0.



Home | Main Index | Thread Index | Old Index