CVE-2024-50169

Description

A flaw was found in the Linux kernel's vsock component. A local attacker can exploit an imbalance in the rx_bytes tracking mechanism, specifically after vsock_transport::read_skb() fails to update the received bytes count when a packet is dequeued. This can lead to a warning message indicating an empty receive queue with non-zero rx_bytes, potentially resulting in a denial of service (DoS) for the system.

Mitigation

To mitigate this issue, prevent the `vsock` kernel module from loading if it is not required. This can be achieved by blacklisting the module.

1. Create a new file `/etc/modprobe.d/blacklist-vsock.conf` with the following content:

   blacklist vsock

2. Regenerate the initramfs to ensure the blacklist is applied during boot:
   For RHEL 8 and 9:

bash
sudo dracut -f
   For RHEL 7:
bash
sudo dracut -f -v

3. Reboot the system for the changes to take effect.

**Warning:** Blacklisting the `vsock` module will disable inter-VM communication using `vsock` and may impact functionality that relies on it. A system reboot is required for the mitigation to be fully applied.

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.55.5
Attack VectorLocalLocalLocal
Attack ComplexityLowLowLow
Privileges RequiredLowLowLow
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityNoneNoneNone
Integrity ImpactNoneNoneNone
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:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Understanding the Weakness (CWE)

Integrity,Confidentiality,Availability

Technical Impact: Execute Unauthorized Code or Commands; Modify Memory

If the memory accessible by the attacker can be effectively controlled, it may be possible to execute arbitrary code, as with a standard buffer overflow. If the attacker can overwrite a pointer's worth of memory (usually 32 or 64 bits), they can alter the intended control flow by redirecting a function pointer to their own malicious code. Even when the attacker can only modify a single byte arbitrary code execution can be possible. Sometimes this is because the same problem can be exploited repeatedly to the same effect. Other times it is because the attacker can overwrite security-critical application-specific data -- such as a flag indicating whether the user is an administrator.

Availability,Confidentiality

Technical Impact: Read Memory; DoS: Crash, Exit, or Restart; DoS: Resource Consumption (CPU); DoS: Resource Consumption (Memory)

Out of bounds memory access will very likely result in the corruption of relevant memory, and perhaps instructions, possibly leading to a crash. Other attacks leading to lack of availability are possible, including putting the program into an infinite loop.

Confidentiality

Technical Impact: Read Memory

In the case of an out-of-bounds read, the attacker may have access to sensitive information. If the sensitive information contains system details, such as the current buffer's position in memory, this knowledge can be used to craft further attacks, possibly with more severe consequences.

Frequently Asked Questions

Want to get errata notifications? Sign up here.