Related Vulnerabilities: CVE-2022-32746  

A flaw was found in the Samba AD LDAP server. The AD DC database audit logging module can access LDAP message values freed by a preceding database module, resulting in a use-after-free issue. This issue is only possible when modifying certain privileged attributes, such as userAccountControl.

Description

A flaw was found in the Samba AD LDAP server. The AD DC database audit logging module can access LDAP message values freed by a preceding database module, resulting in a use-after-free issue. This issue is only possible when modifying certain privileged attributes, such as userAccountControl.

Statement

Although versions of Samba shipped with Red Hat Enterprise Linux do not support Samba in AD mode, the affected code is shipped in RHEL with the `libldb` package.

Although versions of Samba shipped with Red Hat Enterprise Linux do not support Samba in AD mode, the affected code is shipped in RHEL with the libldb package.

Mitigation

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.

Additional Information

  • Bugzilla 2108215: CVE-2022-32746 samba: AD users can induce a use-after-free in the server process with an LDAP add or modify request
  • CWE-416: Use After Free
  • FAQ: Frequently asked questions about CVE-2022-32746