[Bug 202819] Fix a bug in net/openldap24-server affecting UDP packets

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Sep 1 23:27:15 UTC 2015


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202819

            Bug ID: 202819
           Summary: Fix a bug in net/openldap24-server affecting UDP
                    packets
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: delphij at FreeBSD.org
          Reporter: brd at FreeBSD.org
             Flags: maintainer-feedback?(delphij at FreeBSD.org)
          Assignee: delphij at FreeBSD.org

Created attachment 160609
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=160609&action=edit
patch

Recent update of openladap-sasl-client changed the sendto(2) "tolen" argument
from:
sendto(..., dst, sizeof(sruct sockaddr));
to:
sendto(..., dst, sizeof(struct sockaddr_storage)); 

On FreeBSD with UDP sockets this change is invalid.

FreeBSD's getsockaddr() will copyin((dst, sa, len); and then set sa->sa_len =
len. With the above change sa_len will be 128.

Later in in_pcbconnect_setup() this socket address will be rejected with EINVAL
because sa_len != sizeof(struct sockaddr_in)

Patch openldap's liblber to always issue a the sendto(2) as follows:
sendto(..., dst, dst->sa_len);

This fixes both IPv4 and IPv6 sockaddrs in a manner compatible with the
kernel's getsockaddr() semantics.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list