CVE-2024-56640

Description

A flaw was found in the Linux kernel's Shared Memory Communications (SMC) subsystem. Missing lock protection during connection abort operations in server listening routines allows a race condition to repeatedly release link group resources, leading to a use-after-free condition. An attacker establishing SMC connections could exploit this vulnerability to crash the system, resulting in a Denial of Service (DoS), or potentially execute arbitrary code.

Statement

This vulnerability is rated as Moderate severity because exploitation requires active Shared Memory Communications (SMC) socket operations over specialized RDMA or direct memory access infrastructure, which is not commonly enabled in standard environments. The flaw stems from unsynchronized connection abort operations in SMC listener workflows, allowing a race condition that can release link resources prematurely and cause a use-after-free condition. An attacker with access to establish SMC sessions could leverage this to crash the kernel and trigger a denial of service, though successful exploitation requires precise timing.

Mitigation

To mitigate this issue, prevent module smc from being loaded. Please see https://access.redhat.com/solutions/41278 for how to blacklist a kernel module to prevent it from loading automatically.

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 Score6.47.89.8
Attack VectorAdjacent NetworkLocalNetwork
Attack ComplexityHighLowLow
Privileges RequiredHighLowNone
User InteractionNoneNoneNone
ScopeUnchangedUnchangedUnchanged
ConfidentialityHighHighHigh
Integrity ImpactHighHighHigh
Availability ImpactHighHighHigh

Vector

Red Hat: CVSS:3.1/AV:A/AC:H/PR:H/UI:N/S:U/C:H/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:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Red Hat CVSS v3 Score Explanation

The bug happens only when sockets over RDMA being used. It can happen as result of race condition (with function smc_listen_work). The security impact is limited, because could happen only when direct memory access (RDMA) network fabrics being used and for some complex conditions (means that attack complexity is high and requires some authorization for the usage of this protocol).

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.