https://bugs.openldap.org/show_bug.cgi?id=9278
Issue ID: 9278
Summary: liblmdb: robust mutexes should not be unmapped
Product: LMDB
Version: unspecified
Hardware: All
OS: FreeBSD
Status: UNCONFIRMED
Severity: normal
Priority: ---
Component: liblmdb
Assignee: bugs(a)openldap.org
Reporter: delphij(a)freebsd.org
Target Milestone: ---
Created attachment 736
--> https://bugs.openldap.org/attachment.cgi?id=736&action=edit
A possible workaround
We recently noticed that lmdb would have the memory region containing the
robust mutex unmapped on mdb_env_close0():
munmap((void *)env->me_txns,
(env->me_maxreaders-1)*sizeof(MDB_reader)+sizeof(MDB_txninfo));
Note that if this is the last unmap for a robust mutex, the FreeBSD
implementation would garbage-collect the mutex, making it no longer visible to
other processes. As the result, a second instance of the attached test.c (from
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=244493 with minor changes)
would trigger the assertion at mdb_txn_begin() because the acquisition of the
mutex would return 22 (EINVAL), because the mutex appeared to be a robust
mutex, but was invalid.
The attached lmdb.diff is a possible workaround for this (it would skip
unmapping when setting up the robust mutex for the first time).
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10077
Issue ID: 10077
Summary: Integer overflow in util-int.c
Product: OpenLDAP
Version: 2.6.3
Hardware: All
OS: Windows
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: michal.pura(a)gmail.com
Target Milestone: ---
Created attachment 971
--> https://bugs.openldap.org/attachment.cgi?id=971&action=edit
the fix proposal for ldap_pvt_gettimensec() function
Hello,
I found the issue with contextCNS generating process which cause that its
format is invalid (minus sign in nanoseconds filed).
Example:
"generated new csn=20230630080704.-489933Z#000000#000#000000"
The bug can introduce the minus sign in the contextCSN what could have an
impact in replication process, backup restoring etc. Everywhere when the format
of contextCSN is checked before processing it.
According to the source code and reference documents the contextCSN nanoseconds
filed should have the value from range: 000000-999999.
https://www.openldap.org/faq/data/cache/1145.html
The problem is in the function ldap_pvt_gettimensec() in util-int.c file. For
example in line:
count.QuadPart += (10 * BILLION);
The value of (10 * BILLION) will be treated as 32-bit value by compilator and
will cause the integer overflow. Then the random value is added to
count.QuadPart what in some specific cases can produce the negative value which
is returned from the function. At the end the value is passed to the function
ldap_pvt_csnstr() so the contextCSN is wrongly generated (with minus sign).
There is missing 'LL' qualifier, code should looks like this:
count.QuadPart += (10LL * BILLION);
I also suggest to change the type of _ldap_pvt_gt_offset variable from int to
long long.
In attachment you will find fix proposal as there are more places in the
function where changes are required.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8485
Quanah Gibson-Mount <quanah(a)openldap.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |VERIFIED
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8485
Quanah Gibson-Mount <quanah(a)openldap.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|2.7.0 |---
Resolution|--- |SUSPENDED
Status|UNCONFIRMED |RESOLVED
--- Comment #14 from Quanah Gibson-Mount <quanah(a)openldap.org> ---
A patch along the lines on comment#12 welcome.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8197
Quanah Gibson-Mount <quanah(a)openldap.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FEEDBACK
Status|UNCONFIRMED |RESOLVED
Target Milestone|2.7.0 |---
--- Comment #3 from Quanah Gibson-Mount <quanah(a)openldap.org> ---
Need information on what constraint(s) have been implemented that trigger the
issue.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=9714
Issue ID: 9714
Summary: Use xorshift in libldap/dnssrv.c
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: quanah(a)openldap.org
Target Milestone: ---
As discussed in https://git.openldap.org/openldap/openldap/-/merge_requests/417
we may want to shift to using xorshift in libldap/dnssrv.c in a future release.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8196
Quanah Gibson-Mount <quanah(a)openldap.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |TEST
Status|UNCONFIRMED |RESOLVED
Assignee|bugs(a)openldap.org |ondra(a)mistotebe.net
--- Comment #2 from Quanah Gibson-Mount <quanah(a)openldap.org> ---
commit 1220282dd5f941829e999d612eeb226e532b55d7
Author: OndÅ™ej KuznÃk <ondra(a)mistotebe.net>
Date: Fri Sep 16 14:49:11 2022 +0100
ITS#8196/ITS#9714 Switch to xorshift
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8149
Quanah Gibson-Mount <quanah(a)openldap.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|replication |
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=7981
Quanah Gibson-Mount <quanah(a)openldap.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|bugs(a)openldap.org |ondra(a)mistotebe.net
--
You are receiving this mail because:
You are on the CC list for the issue.