CVE-2024-42313

Description

A use-after-free vulnerability was found in the Linux kernel. The firmware can add buffer release work to the work queue through HFI callbacks as a normal part of decoding. Randomly closing the decoder device from userspace during normal decoding can incur a read after free. This issue could allow an attacker to execute his own code using the dangling pointer.

Statement

A moderate use-after-free vulnerability was found in the Linux kernel's Qualcomm Venus video decoder driver (drivers/media/platform/qcom/venus/vdec.c). As a normal part of decoding, the video firmware adds buffer release work to a work queue through HFI callbacks; if the decoder device is closed from userspace while decoding is in progress, this queued work can run after the decoder instance has been freed, resulting in a read after free. On systems using affected Qualcomm Venus hardware, a local attacker with access to the decoder device could potentially abuse the dangling pointer to execute code.

No Red Hat Enterprise Linux kernel or kernel-rt stream is listed as affected by this flaw. The only affected Red Hat-tracked product is Fedora, where the fix is delegated to the Fedora community kernel maintainers and has been delivered through Fedora kernel updates.

Red Hat Product Security rates this flaw as Moderate impact, lower than the NIST and CVE.org CVSS 3.1 base scores of 7.8 (Important), because exploitation requires local access with privileges to use the Venus video decoder on specific Qualcomm hardware and no Red Hat Enterprise Linux products are within the affected scope.

Mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability. Affected Fedora systems should apply the kernel updates available through the standard Fedora update channels, which contain the upstream fix.

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).

The following CVSS metrics and score provided are preliminary and subject to review.

CVSS v3 Score Breakdown

Red HatNVDcve.org
Base Score7.37.87.8
Attack VectorLocalLocalLocal
Attack ComplexityLowLowLow
Privileges RequiredLowLowLow
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityLowHighHigh
Integrity ImpactHighHighHigh
Availability ImpactHighHighHigh

Vector

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

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

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

Understanding the Weakness (CWE)

Integrity

Technical Impact: Modify Memory

The use of previously freed memory may corrupt valid data, if the memory area in question has been allocated and used properly elsewhere.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

If chunk consolidation occurs after the use of previously freed data, the process may crash when invalid data is used as chunk information.

Confidentiality

Technical Impact: Read Memory

Read operations on freed memory can sometimes leak sensitive information instead of causing a crash

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands

If malicious data is entered before chunk consolidation can take place, it may be possible to take advantage of a write-what-where primitive to execute arbitrary code. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.

Frequently Asked Questions

Want to get errata notifications? Sign up here.