CVE-2024-42265

protect the fetch of ->fd[fd] in do_dup2() from mispredictions

MEDIUM
5.5
CVSS Score
Published: August 17, 2024 at 08:54 AM UTC
Updated: October 15, 2026 at 01:18 AM UTC
2 products affected across 2 vendorsLinux KernelSIMATIC S7-1500 TM MFP

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: protect the fetch of ->fd[fd] in do_dup2() from mispredictions both callers have verified that fd is not greater than ->max_fds; however, misprediction might end up with tofree = fdt->fd[fd]; being speculatively executed. That's wrong for the same reasons why it's wrong in close_fd()/file_close_fd_locked(); the same solution applies - array_index_nospec(fd, fdt->max_fds) could differ from fd only in case of speculative execution on mispredicted path.

Affected

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

v < 4.19.3204.20 ≤ v < 5.4.2825.11 ≤ v < 5.15.1655.16 ≤ v < 6.1.1045.5 ≤ v < 5.10.2246.2 ≤ v < 6.6.456.7 ≤ v < 6.10.43.76.116.11 rc18280d16172243702ed43432f826ca6130edb4086
Vendor states this is fixed in 08775b3d6ed117cf4518754ec7300ee42b6a5368 (fixed)
Vendor states this is fixed in 1171ceccabfd596ca370c5d2cbb47d110c3f2fe1 (fixed)
Vendor states this is fixed in 3f480493550b6a23d3a65d095d6569d4a7f56a0f (fixed)
Vendor states this is fixed in 41a6c31df77bd8e050136b0a200b537da9e1084a (fixed)
Vendor states this is fixed in 5db999fff545b924b24c9afd368ef5c17279b176 (fixed)
Vendor states this is fixed in 8aa37bde1a7b645816cda8b80df4753ecf172bf1 (fixed)
Vendor states this is fixed in da72e783afd27d9f487836b2e6738146c0edd149 (fixed)
Vendor states this is fixed in ed42e8ff509d2a61c6642d1825032072dab79f26 (fixed)
Vendor states this is fixed in 3.7 (unaffected)
Vendor states this is fixed in 4.19.320 (unaffected)
Vendor states this is fixed in 5.10.224 (unaffected)
Vendor states this is fixed in 5.15.165 (unaffected)
Vendor states this is fixed in 5.4.282 (unaffected)
Vendor states this is fixed in 6.1.104 (unaffected)
Vendor states this is fixed in 6.10.4 (unaffected)
Vendor states this is fixed in 6.11 (unaffected)
Vendor states this is fixed in 6.6.45 (unaffected)

References (11)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/08775b3d6ed117cf4518754ec7300ee42b6a5368
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1171ceccabfd596ca370c5d2cbb47d110c3f2fe1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/3f480493550b6a23d3a65d095d6569d4a7f56a0f
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/41a6c31df77bd8e050136b0a200b537da9e1084a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/5db999fff545b924b24c9afd368ef5c17279b176
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/8aa37bde1a7b645816cda8b80df4753ecf172bf1
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/da72e783afd27d9f487836b2e6738146c0edd149
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/ed42e8ff509d2a61c6642d1825032072dab79f26

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
NVD-CWE-noinfo

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