servers/slapd/back-mdb/search.c in OpenLDAP through 2.4.44 is prone to a double free vulnerability. A user with access to search the directory can crash slapd by issuing a search including the Paged Results control with a page size of 0.
https://www.oracle.com/security-alerts/cpuapr2022.html
https://kc.mcafee.com/corporate/index?page=content&id=SB10365
https://bugs.debian.org/863563