RDMA/irdma: Prevent some integer underflows
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/irdma: Prevent some integer underflows
My static checker complains that:
drivers/infiniband/hw/irdma/ctrl.c:3605 irdma_sc_ceq_init() warn: can subtract underflow 'info->dev->hmc_fpm_misc.max_ceqs'?
It appears that "info->dev->hmc_fpm_misc.max_ceqs" comes from the firmware in irdma_sc_parse_fpm_query_buf() so, yes, there is a chance that it could be zero. Even if we trust the firmware, it's easy enough to change the condition just as a hardenning measure.
From the CVE record · Linux
The Linux kernel’s RDMA/irdma driver can subtract with an integer underflow when a value obtained from firmware is zero. The input does not establish whether an attacker can trigger this condition or whether network access, local access, authentication, or user interaction is required.
Engineers running Linux kernels with the RDMA/irdma driver should check their versions; affected versions are not specified.