5.5
MEDIUM
CVE-2024-36489
Linux Kernel TLS NULL Dereference Vulnerability
Description

In the Linux kernel, the following vulnerability has been resolved: tls: fix missing memory barrier in tls_init In tls_init(), a write memory barrier is missing, and store-store reordering may cause NULL dereference in tls_{setsockopt,getsockopt}. CPU0 CPU1 ----- ----- // In tls_init() // In tls_ctx_create() ctx = kzalloc() ctx->sk_proto = READ_ONCE(sk->sk_prot) -(1) // In update_sk_prot() WRITE_ONCE(sk->sk_prot, tls_prots) -(2) // In sock_common_setsockopt() READ_ONCE(sk->sk_prot)->setsockopt() // In tls_{setsockopt,getsockopt}() ctx->sk_proto->setsockopt() -(3) In the above scenario, when (1) and (2) are reordered, (3) can observe the NULL value of ctx->sk_proto, causing NULL dereference. To fix it, we rely on rcu_assign_pointer() which implies the release barrier semantic. By moving rcu_assign_pointer() after ctx->sk_proto is initialized, we can ensure that ctx->sk_proto are visible when changing sk->sk_prot.

INFO

Published Date :

June 21, 2024, 11:15 a.m.

Last Modified :

Sept. 9, 2024, 1:32 p.m.

Source :

416baaa9-dc9f-4396-8d5f-8c081fb06d67

Remotely Exploitable :

No

Impact Score :

3.6

Exploitability Score :

1.8
Affected Products

The following products are affected by CVE-2024-36489 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Linux linux_kernel

We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).

Results are limited to the first 15 repositories due to potential performance issues.

The following list is the news that have been mention CVE-2024-36489 vulnerability anywhere in the article.

The following table lists the changes that have been made to the CVE-2024-36489 vulnerability over time.

Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.

  • Initial Analysis by [email protected]

    Sep. 09, 2024

    Action Type Old Value New Value
    Added CVSS V3.1 NIST AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
    Changed Reference Type https://git.kernel.org/stable/c/2c260a24cf1c4d30ea3646124f766ee46169280b No Types Assigned https://git.kernel.org/stable/c/2c260a24cf1c4d30ea3646124f766ee46169280b Patch
    Changed Reference Type https://git.kernel.org/stable/c/335c8f1566d8e44c384d16b450a18554896d4e8b No Types Assigned https://git.kernel.org/stable/c/335c8f1566d8e44c384d16b450a18554896d4e8b Patch
    Changed Reference Type https://git.kernel.org/stable/c/91e61dd7a0af660408e87372d8330ceb218be302 No Types Assigned https://git.kernel.org/stable/c/91e61dd7a0af660408e87372d8330ceb218be302 Patch
    Changed Reference Type https://git.kernel.org/stable/c/ab67c2fd3d070a21914d0c31319d3858ab4e199c No Types Assigned https://git.kernel.org/stable/c/ab67c2fd3d070a21914d0c31319d3858ab4e199c Patch
    Changed Reference Type https://git.kernel.org/stable/c/d72e126e9a36d3d33889829df8fc90100bb0e071 No Types Assigned https://git.kernel.org/stable/c/d72e126e9a36d3d33889829df8fc90100bb0e071 Patch
    Changed Reference Type https://git.kernel.org/stable/c/ef21007a7b581c7fe64d5a10c320880a033c837b No Types Assigned https://git.kernel.org/stable/c/ef21007a7b581c7fe64d5a10c320880a033c837b Patch
    Added CWE NIST CWE-476
    Added CPE Configuration OR *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.7 up to (excluding) 5.10.219 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.11 up to (excluding) 5.15.161 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 5.16 up to (excluding) 6.1.93 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.2 up to (excluding) 6.6.33 *cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* versions from (including) 6.7 up to (excluding) 6.9.4
  • CVE Received by 416baaa9-dc9f-4396-8d5f-8c081fb06d67

    Jun. 21, 2024

    Action Type Old Value New Value
    Added Description In the Linux kernel, the following vulnerability has been resolved: tls: fix missing memory barrier in tls_init In tls_init(), a write memory barrier is missing, and store-store reordering may cause NULL dereference in tls_{setsockopt,getsockopt}. CPU0 CPU1 ----- ----- // In tls_init() // In tls_ctx_create() ctx = kzalloc() ctx->sk_proto = READ_ONCE(sk->sk_prot) -(1) // In update_sk_prot() WRITE_ONCE(sk->sk_prot, tls_prots) -(2) // In sock_common_setsockopt() READ_ONCE(sk->sk_prot)->setsockopt() // In tls_{setsockopt,getsockopt}() ctx->sk_proto->setsockopt() -(3) In the above scenario, when (1) and (2) are reordered, (3) can observe the NULL value of ctx->sk_proto, causing NULL dereference. To fix it, we rely on rcu_assign_pointer() which implies the release barrier semantic. By moving rcu_assign_pointer() after ctx->sk_proto is initialized, we can ensure that ctx->sk_proto are visible when changing sk->sk_prot.
    Added Reference kernel.org https://git.kernel.org/stable/c/d72e126e9a36d3d33889829df8fc90100bb0e071 [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/2c260a24cf1c4d30ea3646124f766ee46169280b [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/335c8f1566d8e44c384d16b450a18554896d4e8b [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/ab67c2fd3d070a21914d0c31319d3858ab4e199c [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/ef21007a7b581c7fe64d5a10c320880a033c837b [No types assigned]
    Added Reference kernel.org https://git.kernel.org/stable/c/91e61dd7a0af660408e87372d8330ceb218be302 [No types assigned]
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
CWE - Common Weakness Enumeration

While CVE identifies specific instances of vulnerabilities, CWE categorizes the common flaws or weaknesses that can lead to vulnerabilities. CVE-2024-36489 is associated with the following CWEs:

Common Attack Pattern Enumeration and Classification (CAPEC)

Common Attack Pattern Enumeration and Classification (CAPEC) stores attack patterns, which are descriptions of the common attributes and approaches employed by adversaries to exploit the CVE-2024-36489 weaknesses.

CVSS31 - Vulnerability Scoring System
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality
Integrity
Availability