Skip to contentSkip to conversation

CVE-2022-49404: RDMA/hfi1: Fix potential integer multiplication overflow errors

DISCUSSION Greg Kroah-Hartman 1 participant 1 message Feb 26, 2025

lore
Share & tools
lore
#0 lore raw

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

RDMA/hfi1: Fix potential integer multiplication overflow errors

When multiplying of different types, an overflow is possible even when storing the result in a larger type. This is because the conversion is done after the multiplication. So arithmetic overflow and thus in incorrect value is possible.

Correct an instance of this in the inter packet delay calculation. Fix by ensuring one of the operands is u64 which will promote the other to u64 as well ensuring no overflow.

The Linux kernel CVE team has assigned CVE-2022-49404 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 4.9.318 with commit 252f4afd4557a2e7075f793a5c80fe6dd9e9ee4a
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 4.14.283 with commit a89cb7ddf6a89bab6012e19da38b7cdb26175c19
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 4.19.247 with commit 79c164e61f818054cd6012e9035701840d895c51
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 5.4.198 with commit 8858284dd74906fa00f04f0252c75df4893a7959
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 5.10.121 with commit 31dca00d0cc9f4133320d72eb7e3720badc6d6e6
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 5.15.46 with commit 3f09ec80f115d2875d747ed28adc1773037e0f8b
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 5.17.14 with commit 06039d8afefdbac05bcea5f397188407eba2996d
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 5.18.3 with commit ef5ab2e48a5f9960e2352332b7cdb7064bb49032
	Issue introduced in 4.3 with commit 7724105686e718ac476a6ad3304fea2fbcfcffde and fixed in 5.19 with commit f93e91a0372c922c20d5bee260b0f43b4b8a1bee

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2022-49404

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/infiniband/hw/hfi1/init.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/252f4afd4557a2e7075f793a5c80fe6dd9e9ee4a
	https://git.kernel.org/stable/c/a89cb7ddf6a89bab6012e19da38b7cdb26175c19
	https://git.kernel.org/stable/c/79c164e61f818054cd6012e9035701840d895c51
	https://git.kernel.org/stable/c/8858284dd74906fa00f04f0252c75df4893a7959
	https://git.kernel.org/stable/c/31dca00d0cc9f4133320d72eb7e3720badc6d6e6
	https://git.kernel.org/stable/c/3f09ec80f115d2875d747ed28adc1773037e0f8b
	https://git.kernel.org/stable/c/06039d8afefdbac05bcea5f397188407eba2996d
	https://git.kernel.org/stable/c/ef5ab2e48a5f9960e2352332b7cdb7064bb49032
	https://git.kernel.org/stable/c/f93e91a0372c922c20d5bee260b0f43b4b8a1bee