Use After Free Affecting samba package, versions <2:4.13.14+dfsg-0ubuntu0.21.04.1


Severity

Recommended
medium

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.16% (54th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Use After Free vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UBUNTU2104-SAMBA-1913130
  • published10 Nov 2021
  • disclosed2 Mar 2022

Introduced: 10 Nov 2021

CVE-2021-3738  (opens in a new tab)
CWE-416  (opens in a new tab)

How to fix?

Upgrade Ubuntu:21.04 samba to version 2:4.13.14+dfsg-0ubuntu0.21.04.1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream samba package and not the samba package as distributed by Ubuntu. See How to fix? for Ubuntu:21.04 relevant fixed versions and status.

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.

CVSS Scores

version 3.1