RDMA/mlx5: Fix integer overflow of user QP buffer size
No exploitation in the wild has been reported. EPSS puts the chance of exploitation in the next 30 days at 0%. Fixed in Kernel f917707f0de0832b8ab582391b1f64e549995c6c, Kernel 42fb8aefffff5b458aaa66803364a16e0ea44129, Kernel 5b6cfc6d7ff0959dd9766fdc24286a253b59ca77 and 12 more.
In the Linux kernel, the following vulnerability has been resolved: RDMA/mlx5: Fix integer overflow of user QP buffer size set_user_buf_size() computes the QP buffer size by left-shifting the user-supplied rq.wqe_cnt and rq.wqe_shift values as signed integers. A sufficiently large rq.wqe_cnt causes signed integer overflow, which is undefined behavior, and yields a small or negative buf_size, causing ib_umem_get() to map a buffer smaller than the hardware will actually write into. Replace the shifts and addition with check_shl_overflow() and check_add_overflow(), rejecting invalid user inputs. Moreover, guard the identical shift computing qp->sq.offset in _create_user_qp() before set_user_buf_size() is reached.
Affected
Vendors, products and packages with version ranges
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| Linux | Kernel | >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <f917707f0de0832b8ab582391b1f64e549995c6c, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <42fb8aefffff5b458aaa66803364a16e0ea44129, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <5b6cfc6d7ff0959dd9766fdc24286a253b59ca77, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <c845e5e05140ea1bc64a5b1107942d93c876034d, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <ccce6b7ef1d7efc59ccba3421e1339c6e63a3d20, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <d7fa2ff72ad1861eac194a4e0075d504ba8c246e, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <d99622e40aaa910ade681dfd4dc0fa240a011331, >=e126ba97dba9edeb6fafa3665b5f8497fc9cdf8c <dec47e4b0fe34afdf38caa72b4408ba95502e5de, =3.11 | f917707f0de0832b8ab582391b1f64e549995c6c, 42fb8aefffff5b458aaa66803364a16e0ea44129, 5b6cfc6d7ff0959dd9766fdc24286a253b59ca77, c845e5e05140ea1bc64a5b1107942d93c876034d, ccce6b7ef1d7efc59ccba3421e1339c6e63a3d20, d7fa2ff72ad1861eac194a4e0075d504ba8c246e, d99622e40aaa910ade681dfd4dc0fa240a011331, dec47e4b0fe34afdf38caa72b4408ba95502e5de |
| linux-kernel: Kernel | >=5.11.0 <5.15.221, >=5.16.0 <6.1.188, >=6.13.0 <6.18.52, >=6.19.0 <7.2.6, >=6.2.0 <6.6.157, >=6.7.0 <6.12.110, >=3.11.0 <5.10.270 | 5.15.221, 6.1.188, 6.18.52, 7.2.6, 6.6.157, 6.12.110, 5.10.270 |
Timeline
Every event on this vulnerability
Related
Other vulnerabilities in Kernel, strongest first
Embed
A live severity badge for an advisory, README or ticket