CVE-2025-39742

RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask()

MEDIUM
5.5
CVSS Score
Published: September 11, 2025 at 04:52 PM UTC
Updated: October 19, 2026 at 09:10 PM UTC
3 products affected across 3 vendorsLinux KernelDebian LinuxSIMATIC CN 4100

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.2%

Description

In the Linux kernel, the following vulnerability has been resolved: RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask() The function divides number of online CPUs by num_core_siblings, and later checks the divider by zero. This implies a possibility to get and divide-by-zero runtime error. Fix it by moving the check prior to division. This also helps to save one indentation level.

Affected

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

All versions4.8 ≤ v < 5.4.2975.11 ≤ v < 5.15.1905.16 ≤ v < 6.1.1495.5 ≤ v < 5.10.2416.13 ≤ v < 6.15.116.16 ≤ v < 6.16.26.2 ≤ v < 6.6.1036.7 ≤ v < 6.12.434.8b094a36f90975373c3a241839869217a65f17d81
Vendor states this is fixed in 1a7cf828ed861de5be1aff99e10f114b363c19d3 (fixed)
Vendor states this is fixed in 31d0599a23efdbfe579bfbd1eb8f8c942f13744d (fixed)
Vendor states this is fixed in 4b4317b0d758ff92ba96f4e448a8992a6fe607bf (fixed)
Vendor states this is fixed in 59f7d2138591ef8f0e4e4ab5f1ab674e8181ad3a (fixed)
Vendor states this is fixed in 89fdac333a17ed990b41565630ef4791782e02f5 (fixed)
Vendor states this is fixed in 9b05e91afe948ed819bf87d7ba0fccf451ed79a6 (fixed)
Vendor states this is fixed in 9bba1a9994c523b44db64f63b564b4719ea2b7ef (fixed)
Vendor states this is fixed in 9d3211cb61a0773a2440d0a0698c1e6e7429f907 (fixed)
Vendor states this is fixed in ac53f377393cc85156afdc90b636e84e544a6f96 (fixed)
Vendor states this is fixed in 4.8 (unaffected)
Vendor states this is fixed in 5.10.241 (unaffected)
Vendor states this is fixed in 5.15.190 (unaffected)
Vendor states this is fixed in 5.4.297 (unaffected)
Vendor states this is fixed in 6.1.149 (unaffected)
Vendor states this is fixed in 6.12.43 (unaffected)
Vendor states this is fixed in 6.15.11 (unaffected)
Vendor states this is fixed in 6.16.2 (unaffected)
Vendor states this is fixed in 6.17 (unaffected)
Vendor states this is fixed in 6.6.103 (unaffected)
v < V5.0
Affected range stops below V5.0, so it looks safe — our inference, not a vendor statement

References (12)

Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/1a7cf828ed861de5be1aff99e10f114b363c19d3
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/31d0599a23efdbfe579bfbd1eb8f8c942f13744d
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/4b4317b0d758ff92ba96f4e448a8992a6fe607bf
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/59f7d2138591ef8f0e4e4ab5f1ab674e8181ad3a
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/89fdac333a17ed990b41565630ef4791782e02f5
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9b05e91afe948ed819bf87d7ba0fccf451ed79a6
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9bba1a9994c523b44db64f63b564b4719ea2b7ef
Patch
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
https://git.kernel.org/stable/c/9d3211cb61a0773a2440d0a0698c1e6e7429f907

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-369

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