https://bugs.openldap.org/show_bug.cgi?id=10421
Issue ID: 10421
Summary: mdb_load can crash on malicious input
Product: LMDB
Version: 0.9.14
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: minor
Priority: ---
Component: tools
Assignee: bugs(a)openldap.org
Reporter: hyc(a)openldap.org
Target Milestone: ---
This is being reported as a DOS vulnerability, which is incorrect.
https://www.socdefenders.ai/item/01d72f7a-9622-4384-a936-d99925a19a8f
mdb_load is a command-line tool, not a server nor a library function that could
be run in a server. There is no service to deny.
Reading a line containing an embedded NUL byte may cause mdb_load to crash, but
as it's a one-shot commandline tool such crashes have no consequences.
The report claims "heap metadata leak" which is also irrelevant since this is a
one-shot tool and the only potential metadata is that which was contained in
the input file, whose contents are already known to the attacker.
The report is supposedly released under "responsible disclosure" and yet it was
never reported directly to the OpenLDAP Project (not in this bug tracker nor
anywhere else). This despite the fact that the reporter clearly knows that
mdb_load is a piece of OpenLDAP software.
https://seclists.org/fulldisclosure/2026/Jan/5
The malicious input file must be constructed with a valid header and a line
containing a single space followed by a single NUL byte. The dump/load file
format only uses printable characters, so an embedded NUL byte never occurs in
valid files.
It is unclear why any DB admin would ever fall victim to such a malicious
input. The mdb_load utility is only used to load files generated by mdb_dump,
and mdb_dump will never produce such an invalid file. If an attacker went to
the trouble to binary patch a dump file to create this crashing character
sequence, they clearly have enough privileges to read and alter any other
relevant files, so this crash doesn't give them any particular advantage. Nor
does the crash reveal any memory content that they don't already know.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10355
Issue ID: 10355
Summary: mplay doesn't compile on musl
Product: LMDB
Version: 0.9.33
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: tools
Assignee: bugs(a)openldap.org
Reporter: bgilbert(a)backtick.net
Target Milestone: ---
With the musl C library (e.g. Alpine Linux) mplay doesn't compile:
gcc -pthread -O2 -g -W -Wall -Wno-unused-parameter -Wbad-function-cast
-Wuninitialized -c mplay.c
mplay.c: In function 'addpid':
mplay.c:490:23: error: assignment of read-only variable 'stdin'
490 | stdin = fdopen(0, "r");
| ^
mplay.c:491:24: error: assignment of read-only variable 'stdout'
491 | stdout = fdopen(1, "w");
| ^
make: *** [Makefile:99: mplay.o] Error 1
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10341
Issue ID: 10341
Summary: Two potential buffer overruns in function
mdb_cmp_cint.
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: alexguo1023(a)gmail.com
Target Milestone: ---
Created attachment 1068
--> https://bugs.openldap.org/attachment.cgi?id=1068&action=edit
Patch: Fix buffer overrun in function mdb_cmp_cint
We found two potential bugs in `mdb_cmp_cint`’s backward‐scan loop:
```c
u = (unsigned short *)((char *)a->mv_data + a->mv_size);
c = (unsigned short *)((char *)b->mv_data + a->mv_size);
do {
x = *--u - *--c;
} while (!x && u > (unsigned short *)a->mv_data);
```
1. **Underflow when `a->mv_size == 0`**
If `a->mv_size` is zero, `u` is initialized to point one past the end of the
zero‐length buffer. The first `--u` then moves it before `a->mv_data`, and the
subsequent dereference is undefined. The original API allows lengths from 0 to
`0xFFFFFFFF`, so a zero length is possible can could lead to pointer underflow
here.
2. **Overflow of `b->mv_data` when `b->mv_size < a->mv_size`**
The code uses `a->mv_size` to advance both `u` and `c`, and only
bounds‐checks `u`. If `b->mv_size` is smaller than `a->mv_size`, `c` may run
past the end of its buffer before the loop terminates, causing a buffer
overrun.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10340
Issue ID: 10340
Summary: Potential Buffer Overflow in mdb_rebalance
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: alexguo1023(a)gmail.com
Target Milestone: ---
Created attachment 1067
--> https://bugs.openldap.org/attachment.cgi?id=1067&action=edit
Add an early return when `mc->mc_top == 0`
In `mdb_rebalance`, we do:
```c
int ptop = mc->mc_top - 1;
node = mc->mc_pg[ptop];
```
However, `mc->mc_top` defaults to 0 in many contexts, so `ptop` can become
`-1`. Indexing `mc->mc_pg[-1]` causes invalid memory access. Elsewhere this is
handled by checking `mc->mc_top > 0` before decrementing.
To fix this, we add an early return when `mc->mc_top == 0`. A root page (or one
without a parent) doesn’t need rebalancing, so this guard prevents `ptop` from
ever being negative and eliminates the out-of-bounds access.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10132
Issue ID: 10132
Summary: manage syncrepl as a cn=config entry
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: slapd
Assignee: bugs(a)openldap.org
Reporter: ondra(a)mistotebe.net
Target Milestone: ---
Maybe it being exposed through both places (olcSyncrepl and the entry) could be
a way to manage the transition (unless we have a way to handle cn=config schema
upgrades internally). Uncertain as to how that affects cn=config replication.
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=7392
Ondřej Kuzník <ondra(a)mistotebe.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |SUSPENDED
Target Milestone|2.7.0 |---
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=10426
Issue ID: 10426
Summary: liblber: ber_get_stringbvl integer overflow enables
heap buffer overflow via {M} parsing (32-bit builds)
Product: OpenLDAP
Version: 2.6.10
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: libraries
Assignee: bugs(a)openldap.org
Reporter: lukas(a)artiphishell.com
Target Milestone: ---
Created attachment 1105
--> https://bugs.openldap.org/attachment.cgi?id=1105&action=edit
build.sh
## Issue description
Vulnerable location: `libraries/liblber/decode.c` in `ber_get_stringbvl()`
Root cause: in the first pass that counts elements, `tot_size += siz` is
performed with `ber_len_t` and no overflow check. On 32-bit builds, a large BER
sequence (e.g., SearchRequest attributes parsed via `{M}`) wraps `tot_size`.
The allocation uses the wrapped value (`ber_memalloc_x(tot_size + siz, ...)`),
producing an undersized buffer. The second pass then writes `i` elements into
the vector (BvOff mode for `{M}`), advancing `tot_size` by `siz` and storing
`struct berval` at `res.bo + tot_size`, which overruns the allocation.
Call path observed in the ASAN trace:
`slapd` -> `do_search` (`servers/slapd/search.c:145`, `ber_scanf("{M}}")`) ->
`ber_scanf` (`libraries/liblber/decode.c:815`) -> `ber_get_stringbvl`
(`libraries/liblber/decode.c:471`) -> heap buffer overflow.
## Reproduction Steps
Build instructions:
```bash
mkdir /tmp/openldap-ber-get-stringbvl-overflow
cd /tmp/openldap-ber-get-stringbvl-overflow
# create the following files in this directory
chmod +x build.sh poc.sh
git clone https://github.com/openldap/openldap
./build.sh ./openldap
# Run the PoC
./poc.sh
```
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8988
--- Comment #29 from Quanah Gibson-Mount <quanah(a)openldap.org> ---
• 8ba07ad7
by Howard Chu at 2025-12-16T17:33:38+00:00
ITS#8988 lmdb: make all keys and data 2-byte aligned
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=8178
--- Comment #2 from Ondřej Kuzník <ondra(a)mistotebe.net> ---
back-sock currently uses stdio (fgets()) to read from the socket, the thing
would need to be reworked to move away from STDIO towards non-blocking read()
and select().
--
You are receiving this mail because:
You are on the CC list for the issue.
https://bugs.openldap.org/show_bug.cgi?id=9884
Issue ID: 9884
Summary: Document "set" patterns in ACLs
Product: OpenLDAP
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Keywords: needs_review
Severity: normal
Priority: ---
Component: documentation
Assignee: bugs(a)openldap.org
Reporter: quanah(a)openldap.org
Target Milestone: ---
The slapd.access(5) man page has this exceptionally unhelpful line where sets
are concerned:
"The statement set=<pattern> is undocumented yet."
Even if it is an experimental feature, it should still be documented on how it
is meant to operate.
--
You are receiving this mail because:
You are on the CC list for the issue.