RDMA/mlx5: Fix undefined shift of user RQ WQE size
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c · < 4b87a2497276a72fd63028e7419abf0fb7ed837b| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Fix undefined shift of user RQ WQE size
set_rq_size() computes the RQ WQE size as "1 << rq_wqe_shift" based on the user-provided rq_wqe_shift, which is only checked to be greater than 32, so shifts of 32 are still accepted. A shift of 31 also overflows a signed integer, leading to undefined behavior.
Use check_shl_overflow() to compute the RQ WQE size and reject any invalid values.
From the CVE record · Linux
The Linux kernel’s RDMA/mlx5 driver can perform an undefined shift when calculating an RQ WQE size from a user-provided value. A user who can supply an invalid shift value can trigger undefined behavior; the input does not specify the required access level or any further impact.
Engineers running Linux kernels with RDMA/mlx5 should check whether their kernel is affected; affected versions were not provided.