CVE-2024-50152

Description

A doubly freeing memory vulnerability exists in the Linux kernel smb client. After the first successful memory allocation for 'ea', the second memory release for 'ea' will result in double free, leading to loss of availability of the system.

Statement

A moderate impact double-free vulnerability was found in the Linux kernel SMB client, in the smb2_set_ea() function in fs/smb/client/smb2ops.c. If an SMB2 set-extended-attributes operation fails after a successful memory allocation for the EA buffer and the request is subsequently retried through the replay path, the already freed EA pointer can be released a second time. This double free can corrupt kernel memory and crash the system, resulting in a denial of service. Red Hat rates this flaw Moderate severity (CVSS 3.1: 5.5, AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) because triggering it requires local access and privileges and it impacts system availability only; this differs significantly from the 9.8 score in the upstream CVE record, which assumes an unauthenticated network attacker with confidentiality, integrity, and availability impact that the actual code path does not support. Within Red Hat's product scope, this issue affects Red Hat Enterprise Linux 9 (kernel and kernel-rt in the rhel-9.5.z and rhel-9.6 streams), where a fix is being pursued through the kernel team; in the rhel-9.5.z stream the fix was declined, with the fix delivered through the rhel-9.6 stream. Red Hat Enterprise Linux 6, 7, and 8, as well as the hosted OpenShift (ARO/OSD) environments, are not affected. Fedora is affected as a community project and is addressed through the upstream kernel community process.

Mitigation

Mitigation for this issue is either not available or the currently available options don't meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

Common Vulnerability Scoring System (CVSS) Score Details

Info alert:Important note

CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score5.55.59.8
Attack VectorLocalLocalNetwork
Attack ComplexityLowLowLow
Privileges RequiredLowLowNone
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityNoneNoneHigh
Integrity ImpactNoneNoneHigh
Availability ImpactHighHighHigh

Vector

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

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

cve.org: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Understanding the Weakness (CWE)

Integrity,Confidentiality,Availability

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

When a program calls free() twice with the same argument, the program's memory management data structures may become corrupted, potentially leading to the reading or modification of unexpected memory addresses. This corruption can cause the program to crash or, in some circumstances, cause two later calls to malloc() to return the same pointer. If malloc() returns the same value twice and the program later gives the attacker control over the data that is written into this doubly-allocated memory, the program becomes vulnerable to a buffer overflow attack. Doubly freeing memory may result in a write-what-where condition, allowing an attacker to execute arbitrary code.

Frequently Asked Questions

Want to get errata notifications? Sign up here.