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
root.io logo minimus.io logo echo.ai logo

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

NameVendorStart VersionEnd Version
SambaSamba4.0.0 (including)4.13.14 (excluding)
SambaSamba4.14.0 (including)4.14.10 (excluding)
SambaSamba4.15.0 (including)4.15.2 (excluding)
SambaUbuntubionic*
SambaUbuntudevel*
SambaUbuntuesm-infra-legacy/trusty*
SambaUbuntuesm-infra/bionic*
SambaUbuntuesm-infra/focal*
SambaUbuntuesm-infra/xenial*
SambaUbuntufocal*
SambaUbuntuhirsute*
SambaUbuntuimpish*
SambaUbuntujammy*
SambaUbuntukinetic*
SambaUbuntulunar*
SambaUbuntutrusty/esm*
SambaUbuntuupstream*

Potential Mitigations

References