CVE-2023-53649

Description

A memory leak flaw was found in the Linux kernel's perf trace tool in the event selector cleanup logic. A local user can trigger this issue by running perf trace commands, causing the tool to free memory based on an incorrect condition check that inverts the intended logic for non-syscall tracepoints. This results in allocated memory never being freed, leading to resource exhaustion and denial of service through memory depletion.

Statement

The perf trace cleanup code contains inverted logic when freeing the evsel->priv area. Memory is allocated when the tracepoint system is not "syscalls", but the cleanup code only frees when it is "syscalls", creating a mismatch. This means memory allocated for non-syscall tracepoints is never released, causing a permanent leak with each perf trace invocation. The issue was detected using AddressSanitizer during testing and manifests as 40-byte leaks per event selector. While a single perf trace command leaks relatively small amounts of memory, repeated invocations or long-running trace sessions can accumulate significant memory consumption.

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.5N/A
Attack VectorLocalLocalN/A
Attack ComplexityLowLowN/A
Privileges RequiredLowLowN/A
User InteractionNoneNoneN/A
ScopeUnchangedUnchangedN/A
ConfidentialityNoneNoneN/A
Integrity ImpactNoneNoneN/A
Availability ImpactHighHighN/A

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

Understanding the Weakness (CWE)

Availability

Technical Impact: DoS: Resource Consumption (Other)

An attacker that can influence the allocation of resources that are not properly maintained could deplete the available resource pool and prevent all other processes from accessing the same type of resource.

Frequently Asked Questions

Want to get errata notifications? Sign up here.