CVE Vulnerabilities

CVE-2021-3738

Use After Free

Published: Mar 02, 2022 | Modified: Nov 21, 2024
CVSS 3.x
8.8
HIGH
Source:
NVD
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
CVSS 2.x
6.5 MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:P
RedHat/V2
RedHat/V3
7.6 MODERATE
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:H
Ubuntu
MEDIUM

In DCE/RPC it is possible to share the handles (cookies for resource state) between multiple connections via a mechanism called association groups. These handles can reference connections to our sam.ldb database. However while the database was correctly shared, the user credentials state was only pointed at, and when one connection within that association group ended, the database would be left pointing at an invalid struct session_info. The most likely outcome here is a crash, but it is possible that the use-after-free could instead allow different user state to be pointed at and this might allow more privileged access.

Weakness

The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. Any operations using the original pointer are no longer valid because the memory “belongs” to the code that operates on the new pointer.

Affected Software

Name Vendor Start Version End Version
Samba Samba 4.0.0 (including) 4.13.14 (excluding)
Samba Samba 4.14.0 (including) 4.14.10 (excluding)
Samba Samba 4.15.0 (including) 4.15.2 (excluding)
Samba Ubuntu bionic *
Samba Ubuntu devel *
Samba Ubuntu esm-infra-legacy/trusty *
Samba Ubuntu esm-infra/bionic *
Samba Ubuntu esm-infra/focal *
Samba Ubuntu esm-infra/xenial *
Samba Ubuntu focal *
Samba Ubuntu hirsute *
Samba Ubuntu impish *
Samba Ubuntu jammy *
Samba Ubuntu kinetic *
Samba Ubuntu lunar *
Samba Ubuntu trusty/esm *
Samba Ubuntu upstream *

Potential Mitigations

References