noloader(a)gmail.com wrote:
> Full_Name: JW
> Version: 2.4.47
> OS: Linux (Fedora 29, x86_64, fully patched)
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (151.196.22.177)
>
>
> CFLAGS includes -fsanitize=undefined. These can be cleared with 1U << 31.
>
> id2entry.c:622:9: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
> id2entry.c:691:11: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
> id2entry.c:708:22: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
> id2entry.c:709:20: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
Fixed in git
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
Full_Name: JW
Version: 2.4.47
OS: Linux (Fedora 29, x86_64, fully patched)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (151.196.22.177)
CFLAGS includes -fsanitize=undefined. These can be cleared with 1U << 31.
id2entry.c:622:9: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
id2entry.c:691:11: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
id2entry.c:708:22: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
id2entry.c:709:20: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
Full_Name: JW
Version: 2.4.47
OS: Linux (Fedora 29, x86_64, fully patched)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (151.196.22.177)
I'm building OpenLDAP 2.4.47 from sources on Fedora 29, x86_64. These look like
a valid complaints:
cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../../include
-I../../../include -I.. -I./.. -I/usr/local/include -DNDEBUG -c ldif.c -o
ldif.o
bconfig.c: In function ‘config_rename_one’:
bconfig.c:4487:38: warning: passing argument 3 of ‘ldap_bv2rdn’ from
incompatible pointer type [-Wincompatible-pointer-types]
rc = ldap_bv2rdn( &e->e_name, &rDN, &text, LDAP_DN_FORMAT_LDAP );
^~~~~
In file included from ../../include/portable.h:1171,
from bconfig.c:21:
../../include/ldap.h:1711:9: note: expected ‘char **’ but argument is of type
‘const char **’
char **next,
~~~~~~~^~~~
../../include/ldap_cdefs.h:32:25: note: in definition of macro ‘LDAP_P’
# define LDAP_P(protos) protos
^~~~~~
bconfig.c: In function ‘config_build_entry’:
bconfig.c:6505:31: warning: passing argument 3 of ‘ldap_bv2rdn’ from
incompatible pointer type [-Wincompatible-pointer-types]
rc = ldap_bv2rdn( rdn, &rDN, &text, LDAP_DN_FORMAT_LDAP );
^~~~~
In file included from ../../include/portable.h:1171,
from bconfig.c:21:
../../include/ldap.h:1711:9: note: expected ‘char **’ but argument is of type
‘const char **’
char **next,
~~~~~~~^~~~
../../include/ldap_cdefs.h:32:25: note: in definition of macro ‘LDAP_P’
# define LDAP_P(protos) protos
^~~~~~
cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../include -I.
-I./slapi -I. -I../../include -I/usr/local/include -DNDEBUG -c -o
backends.o backends.c
backend.c: In function ‘fe_acl_group’:
backend.c:1503:56: warning: comparison between pointer and zero character
constant [-Wpointer-compare]
if ( ludp->lud_filter != NULL && ludp->lud_filter != '\0') {
^~
backend.c:1503:39: note: did you mean to dereference the pointer?
if ( ludp->lud_filter != NULL && ludp->lud_filter != '\0') {
^
cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../../include
-I../../../include -I.. -I./.. -I. -I./../back-bdb -I/usr/local/include -DNDEBUG
-c tools.c -o tools.o
In file included from ../../../include/portable.h:1171,
from init.c:17:
init.c: In function 'hdb_db_open':
../back-bdb/proto-bdb.h:22:35: warning: passing argument 2 of
'db->bdi_db->set_dup_compare' from incompatible pointer type
[-Wincompatible-pointer-types]
#define BDB_SYMBOL(x) LDAP_CONCAT(hdb_,x)
^~~~
syntax.c: In function ‘syn_add’:
syntax.c:222:33: warning: comparison between pointer and zero character constant
[-Wpointer-compare]
if ( (*lsei)->lsei_values[0] == '\0'
^~
syntax.c:222:9: note: did you mean to dereference the pointer?
if ( (*lsei)->lsei_values[0] == '\0'
^
syntax.c:223:32: warning: comparison between pointer and zero character constant
[-Wpointer-compare]
|| (*lsei)->lsei_values[1] != '\0' )
^~
syntax.c:223:8: note: did you mean to dereference the pointer?
|| (*lsei)->lsei_values[1] != '\0' )
^
cc -g2 -O2 -fsanitize=undefined -march=native -fPIC -I../../include
-I../../include -I/usr/local/include -DNDEBUG -c -o slapd-addel.o
slapd-addel.c
slapd-addel.c: In function ‘main’:
slapd-addel.c:176:36: warning: comparison between pointer and zero character
constant [-Wpointer-compare]
if (( attrs == NULL ) || ( *attrs == '\0' )) {
^~
Full_Name: Ka Ho Ng
Version: mdb.master
OS: FreeBSD 12.0-RELEASE
URL: ftp://ftp.openldap.org/incoming/Ka-Ho-Ng-190306.patch
Submission from: (NULL) (2001:470:fa95:1300::1)
Starting from __FreeBSD_version 1200059 union semun definition was removed
from userspace headers in order to comply with POSIX. In order to resurrect
the defintion we need to define _WANT_SEMUN before including sys/sem.h for
__FreeBSD_version >= 1200059.
I tried to touch as small amount of code as possible here to avoid interfering
with other platforms I do not use.
--On Wednesday, February 20, 2019 2:30 PM -0500 Vern Smith
<vsmith(a)interlinknetworks.com> wrote:
>
> The attached files are derived from OpenLDAP Software. All of the
> modifications to OpenLDAP Software represented in the following patch(es)
> were developed by Interlink Networks LLC. Interlink Networks LLC has not
> assigned rights and/or interest in this work to any party. I, Vernon
> Smith am authorized by Interlink Networks LLC, my employer, to release
> this work under the following terms.
Thanks! This has been applied to git master.
Regards,
Quanah
--
Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>
Full_Name: Nadezhda Ivanova
Version: 2.5
OS: Ubuntu 18.04
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (93.152.142.241)
The attached patches provide a fix for a problem, reported by a customer:
Occasionally, when the remote target of an asyncmeta database is restarted,
slapd crashes with assertion error in connection_init:
assert( c->c_struct_state == SLAP_C_UNUSED );
The issue occurs very rarely, but I managed to reproduce it.
It was caused by the fact that on socket error, try_read1msg would close the
LDAP connection (ld) to that target, making the fd available to be used again
for another connection. Asyncmeta is not aware of that, so it doesn't stop the
listener on the corresponding Connection. If a new LDAP connection is opened to
a different, active target using the same fd, asyncmeta would call
connection_init on an already used Connection, which causes the assertion
failure.
The fix consists of three separate patches:
ftp://ftp.openldap.org/incoming/nadezhda-ivanova-190228_2.patch
This moves initizalization of c_mutex to connections_init, and therefore any
further access to a Connection can be synchronized, eliminating some race
conditions.
ftp://ftp.openldap.org/incoming/nadezhda-ivanova-190228_3.patch
This adds the LDAP_OPT_KEEPCONN option, which instructs try_read1msg that the
connection will be freed by the client.
ftp://ftp.openldap.org/incoming/nadezhda-ivanova-190228_4.patch
This updates asyncmeta to make use of LDAP_OPT_KEEPCONN.
IPR:
The attached files are derived from OpenLDAP Software. All of the modifications
to OpenLDAP Software represented in the following patch were developed by Symas
Corporation. Symas Corporation has not assigned rights and/or interest in this
work to any party. I, Nadezhda Ivanova, am authorized by Symas Corporation, my
employer, to release this work under the following terms.
The attached modifications to OpenLDAP Software are subject to the following
notice:
Copyright 2019 Symas Corporation
Redistribution and use in source and binary forms, with or without
modification,
are permitted only as authorized by the OpenLDAP Public License.