# CVE-2025-39742: RDMA: hfi1: fix possible divide-by-zero in find_hw_thread_mask()

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.18%, higher than 8% of CVEs (2026-12-01)
- Published: 2025-09-11T16:52:16.339Z
- Modified: 2026-10-19T21:10:00.160Z
- Weaknesses: CWE-369
- Assigned by: Linux

## 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.

(As written by CVE List.)

## Affected

- Linux Linux: from b094a36f90975373c3a241839869217a65f17d81 before 9bba1a9994c523b44db64f63b564b4719ea2b7ef; from b094a36f90975373c3a241839869217a65f17d81 before 1a7cf828ed861de5be1aff99e10f114b363c19d3; from b094a36f90975373c3a241839869217a65f17d81 before 9d3211cb61a0773a2440d0a0698c1e6e7429f907; from b094a36f90975373c3a241839869217a65f17d81 before 4b4317b0d758ff92ba96f4e448a8992a6fe607bf; from b094a36f90975373c3a241839869217a65f17d81 before 89fdac333a17ed990b41565630ef4791782e02f5; from b094a36f90975373c3a241839869217a65f17d81 before 9b05e91afe948ed819bf87d7ba0fccf451ed79a6; from b094a36f90975373c3a241839869217a65f17d81 before 31d0599a23efdbfe579bfbd1eb8f8c942f13744d; from b094a36f90975373c3a241839869217a65f17d81 before ac53f377393cc85156afdc90b636e84e544a6f96; from b094a36f90975373c3a241839869217a65f17d81 before 59f7d2138591ef8f0e4e4ab5f1ab674e8181ad3a; 4.8 (not affected: before 4.8; from 5.4.297 up to 5.4.*; from 5.10.241 up to 5.10.*; from 5.15.190 up to 5.15.*; from 6.1.149 up to 6.1.*; from 6.6.103 up to 6.6.*; from 6.12.43 up to 6.12.*; from 6.15.11 up to 6.15.*; from 6.16.2 up to 6.16.*; from 6.17 up to *)
- linux linux_kernel: from 4.8 before 5.4.297; from 5.5 before 5.10.241; from 5.11 before 5.15.190; from 5.16 before 6.1.149; from 6.2 before 6.6.103; from 6.7 before 6.12.43; from 6.13 before 6.15.11; from 6.16 before 6.16.2
- debian debian_linux: 11.0

## References

- <https://git.kernel.org/stable/c/9bba1a9994c523b44db64f63b564b4719ea2b7ef> (patch)
- <https://git.kernel.org/stable/c/1a7cf828ed861de5be1aff99e10f114b363c19d3> (patch)
- <https://git.kernel.org/stable/c/9d3211cb61a0773a2440d0a0698c1e6e7429f907> (patch)
- <https://git.kernel.org/stable/c/4b4317b0d758ff92ba96f4e448a8992a6fe607bf> (patch)
- <https://git.kernel.org/stable/c/89fdac333a17ed990b41565630ef4791782e02f5> (patch)
- <https://git.kernel.org/stable/c/9b05e91afe948ed819bf87d7ba0fccf451ed79a6> (patch)
- <https://git.kernel.org/stable/c/31d0599a23efdbfe579bfbd1eb8f8c942f13744d> (patch)
- <https://git.kernel.org/stable/c/ac53f377393cc85156afdc90b636e84e544a6f96> (patch)
- <https://git.kernel.org/stable/c/59f7d2138591ef8f0e4e4ab5f1ab674e8181ad3a> (patch)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00008.html> (mailing-list, third-party-advisory)
- <https://lists.debian.org/debian-lts-announce/2025/10/msg00007.html> (mailing-list, third-party-advisory)
- <https://cert-portal.siemens.com/productcert/html/ssa-032379.html>

## Sources

- CVE List: [CVE-2025-39742](https://www.cve.org/CVERecord?id=CVE-2025-39742), CVE Terms of Use, modified 2026-05-12
- NVD: [CVE-2025-39742](https://nvd.nist.gov/vuln/detail/CVE-2025-39742), Public domain, modified 2026-10-19

---

Page: https://cve.day/CVE-2025-39742 · Whole record: https://cve.day/CVE-2025-39742.json · Rebuilt by cve.day 2026-11-25T22:59:04.543Z
