Lucene search

K
sambaSamba SecuritySAMBA:CVE-2022-32746
HistoryJul 27, 2022 - 12:00 a.m.

Samba AD users can induce a use-after-free in the

2022-07-2700:00:00
Samba Security
www.samba.org
46

5.4 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

LOW

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L

Description

Some database modules make a shallow copy of an LDAP add/delete
message so they can make modifications to its elements without
affecting the original message. Each element in a message points to an
array of values, and these arrays are shared between the original
message and the copy.

The issue arises when a database module adds new values to an existing
array. A call to realloc() increases the array’s size to accommodate
new elements, but at the same time, frees the old array. This leaves
the original message element with a dangling pointer to a now-freed
array. When the database audit logging module subsequently logs the
details of the original message, it will access this freed data,
generally resulting in corrupted log output or a crash.

The code paths susceptible to this issue are reachable when certain
specific attributes, such as userAccountControl, are added or
modified. These attributes are not editable by default without having
a privilege assigned, such as Write Property.

Patch Availability

Patches addressing both these issues have been posted to:

https://www.samba.org/samba/security/

Additionally, Samba 4.16.4, 4.15.9, and 4.14.14 have been issued
as security releases to correct the defect. Samba administrators are
advised to upgrade to these releases or apply the patch as soon
as possible.

CVSSv3 calculation

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L (5.4)

Workaround

Disabling AD DC database audit logging prevents the use-after-free
from occurring, as that is the only component that will access the
original message.

Credits

Initial report, patches, and this advisory by Joseph Sutton and Andrew
Bartlett of Catalyst and the Samba Team.

== Our Code, Our Bugs, Our Responsibility.
== The Samba Team

5.4 Medium

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

LOW

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

LOW

Availability Impact

LOW

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:L