CVE-2024-36489

tls: fix missing memory barrier in tls_init

MEDIUM
5.5
CVSS Score
Published: June 21, 2024 at 10:18 AM UTC
Updated: October 15, 2026 at 01:18 AM UTC
7 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 TM MFPRUGGEDCOM RST2428P Firmware

Using Linux by Linux?

Get instant alerts when new vulnerabilities affect Linux - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
MEDIUM5.5
Exploit prediction
EPSS 0.3%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

5.11 ≤ v < 5.15.1615.16 ≤ v < 6.1.935.7 ≤ v < 5.10.2196.2 ≤ v < 6.6.336.7 ≤ v < 6.9.45.7d5bee7374b68de3c44586d46e9e61ffc97a1e886
Vendor states this is fixed in 2c260a24cf1c4d30ea3646124f766ee46169280b (fixed)
Vendor states this is fixed in 335c8f1566d8e44c384d16b450a18554896d4e8b (fixed)
Vendor states this is fixed in 91e61dd7a0af660408e87372d8330ceb218be302 (fixed)
Vendor states this is fixed in ab67c2fd3d070a21914d0c31319d3858ab4e199c (fixed)
Vendor states this is fixed in d72e126e9a36d3d33889829df8fc90100bb0e071 (fixed)
Vendor states this is fixed in ef21007a7b581c7fe64d5a10c320880a033c837b (fixed)
Vendor states this is fixed in 5.10.219 (unaffected)
Vendor states this is fixed in 5.15.161 (unaffected)
Vendor states this is fixed in 5.7 (unaffected)
Vendor states this is fixed in 6.1.93 (unaffected)
Vendor states this is fixed in 6.10 (unaffected)
Vendor states this is fixed in 6.6.33 (unaffected)
Vendor states this is fixed in 6.9.4 (unaffected)
v < V3.1
Affected range stops below V3.1, so it looks safe — our inference, not a vendor statement
v < V3.1
Affected range stops below V3.1, so it looks safe — our inference, not a vendor statement
v < V3.1
Affected range stops below V3.1, so it looks safe — our inference, not a vendor statement
v < V3.1
Affected range stops below V3.1, so it looks safe — our inference, not a vendor statement
v < V3.1
Affected range stops below V3.1, so it looks safe — our inference, not a vendor statement

References (8)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/2c260a24cf1c4d30ea3646124f766ee46169280b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/335c8f1566d8e44c384d16b450a18554896d4e8b
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/91e61dd7a0af660408e87372d8330ceb218be302
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ab67c2fd3d070a21914d0c31319d3858ab4e199c
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/d72e126e9a36d3d33889829df8fc90100bb0e071
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ef21007a7b581c7fe64d5a10c320880a033c837b
Source: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
https://cert-portal.siemens.com/productcert/html/ssa-265688.html
Source: 0b142b55-0307-4c5a-b3c9-f314f3fb7c5e
https://cert-portal.siemens.com/productcert/html/ssa-613116.html

SSVC — Action Prioritization

SSVCNo known exploitNot automatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
LOCAL
Complexity
LOW
Privileges
LOW
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
NONE
Integrity
NONE
Availability
HIGH
Vector?

Quick Info

StatusMODIFIED
CWE
CWE-476

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card