Bug 2030307 (CVE-2021-4091) - CVE-2021-4091 389-ds-base: double free of the virtual attribute context in persistent search
Summary: CVE-2021-4091 389-ds-base: double free of the virtual attribute context in pe...
Keywords:
Status: CLOSED ERRATA
Alias: CVE-2021-4091
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
URL:
Whiteboard:
Depends On: 2027783 2030367 2030368 2031046 2039356 2047261 2048530 2056481 2060110 2065569
Blocks: 2028842 2031062
TreeView+ depends on / blocked
 
Reported: 2021-12-08 12:36 UTC by Cedric Buissart
Modified: 2022-10-02 21:52 UTC (History)
8 users (show)

Fixed In Version: 389-ds-base 2.2.0
Doc Type: If docs needed, set a value
Doc Text:
A double free was found in the way 389-ds-base handles virtual attributes context in persistent searches. An attacker could send a series of search requests, forcing the server to behave unexpectedly, and crash.
Clone Of:
Environment:
Last Closed: 2022-03-16 19:01:29 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:0628 0 None None None 2022-02-22 17:05:24 UTC
Red Hat Product Errata RHSA-2022:0889 0 None None None 2022-03-15 10:06:04 UTC
Red Hat Product Errata RHSA-2022:0952 0 None None None 2022-03-16 15:19:13 UTC
Red Hat Product Errata RHSA-2022:1410 0 None None None 2022-04-19 15:37:06 UTC

Description Cedric Buissart 2021-12-08 12:36:11 UTC
When a worker thread processes a persisten search, it duplicates the private pblock and spawns a dedicated thread to handle the persistent search.
It will later free that cloned pblock.

However, both pblock (original an cloned) refer to the same virtual attribute context, resulting in the context be freed once per pblock instance.

389-ds-base-1.3.6.4 and newer (including 1.4 and 2.0) are expected to be vulnerable to this flaw.

The flaw has been introduced by the following commit : https://github.com/389ds/389-ds-base/commit/74c666b83e3e1789c2ef3f7935c327bd7555193e

Comment 6 Cedric Buissart 2022-01-27 13:25:46 UTC
Created 389-ds-base tracking bugs for this issue:

Affects: fedora-all [bug 2047261]

Comment 7 errata-xmlrpc 2022-02-22 17:05:22 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 7

Via RHSA-2022:0628 https://access.redhat.com/errata/RHSA-2022:0628

Comment 8 errata-xmlrpc 2022-03-15 10:06:01 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2022:0889 https://access.redhat.com/errata/RHSA-2022:0889

Comment 9 errata-xmlrpc 2022-03-16 15:19:11 UTC
This issue has been addressed in the following products:

  Red Hat Directory Server 11.3 for RHEL 8

Via RHSA-2022:0952 https://access.redhat.com/errata/RHSA-2022:0952

Comment 10 Product Security DevOps Team 2022-03-16 19:01:27 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-4091

Comment 11 Cedric Buissart 2022-03-22 09:35:07 UTC
Upstream fix :
- Issue 5218 - double-free of the virtual attribute context in persistent search
https://github.com/389ds/389-ds-base/commit/a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b

Comment 12 errata-xmlrpc 2022-04-19 15:37:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

Via RHSA-2022:1410 https://access.redhat.com/errata/RHSA-2022:1410


Note You need to log in before you can comment on or make changes to this bug.