RDMA/mlx5: Fix stack out-of-bounds read in cc_params debugfs
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 4a2da0b8c0782816f3ae6846ae7942fcbb0f8172 · < 4599311e78e88c893ad551aca622de2bfdf1c31f| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
RDMA/mlx5: Fix stack out-of-bounds read in cc_params debugfs
get_param() reads a congestion parameter as a u32 but formats it with the signed "%d" into an 11-byte stack buffer. A value with bit 31 set, such as 0x80000000, renders as "-2147483648\n" whose full length is 12. snprintf() stores only 11 bytes yet returns 12, so simple_read_from_buffer() treats 12 bytes as valid and reads one byte past lbuf[].
Size the buffer for the widest unsigned decimal, format with "%u" to match the u32, and use scnprintf() so the length passed to simple_read_from_buffer() reflects the bytes actually stored.
From the CVE record · Linux
The Linux kernel’s RDMA/mlx5 cc_params debugfs code can read one byte past a stack buffer when a congestion parameter has bit 31 set. This occurs when the parameter is read through debugfs; the input does not specify access requirements or any user interaction beyond that read.
Engineers running Linux kernels with RDMA/mlx5 should check their exposure; affected versions are not specified.