CVE-2023-53553

Description

A compiler warning issue was found in the Linux kernel's Hyper-V HID driver that could lead to potential memory safety issues. A local user can trigger this issue when the fortified memcpy implementation detects potential buffer overflows in the mousevsc_on_receive function, where the compiler cannot verify that memory copy operations stay within bounds. This could potentially result in memory corruption and denial of service.

Statement

The Hyper-V HID driver's mousevsc_on_receive function performs memcpy operations on packet data received from the Hyper-V host. The fortified string functions (enabled with CONFIG_FORTIFY_SOURCE) perform compile-time checks to detect potential buffer overflows. With certain compiler versions (specifically GCC 9), the fortification checks trigger warnings about potential writes beyond field boundaries. While the code includes proper range checks via WARN_ON, the compiler's data flow analysis is confused by the assertion and cannot verify the bounds are correct. This creates a situation where either the range check is insufficient (potential buffer overflow) or the compiler analysis is overly conservative (false positive). The code was reworked to satisfy the compiler while maintaining safety. The issue affects Hyper-V Linux guests.

Mitigation

To mitigate this issue, prevent the hv_hid module from being loaded. See https://access.redhat.com/solutions/41278 for instructions on blacklisting kernel modules.

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)

Integrity

Technical Impact: Modify Memory; Execute Unauthorized Code or Commands

Write operations could cause memory corruption. In some cases, an adversary can modify control data such as return addresses in order to execute unexpected code.

Availability

Technical Impact: DoS: Crash, Exit, or Restart

Attempting to access out-of-range, invalid, or unauthorized memory could cause the product to crash.

Other

Technical Impact: Unexpected State

Subsequent write operations can produce undefined or unexpected results.

Frequently Asked Questions

Want to get errata notifications? Sign up here.