net/mlx5: fw_tracer, Validate format string parameters
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 70dd6fdb8987b14f7b6105f6be0617299e459398 · < 8c35c2448086870509ede43947845be0833251f0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: fw_tracer, Validate format string parameters
Add validation for format string parameters in the firmware tracer to prevent potential security vulnerabilities and crashes from malformed format strings received from firmware.
The firmware tracer receives format strings from the device firmware and uses them to format trace messages. Without proper validation, bad firmware could provide format strings with invalid format specifiers (e.g., %s, %p, %n) that could lead to crashes, or other undefined behavior.
Add mlx5_tracer_validate_params() to validate that all format specifiers in trace strings are limited to safe integer/hex formats (%x, %d, %i, %u, %llx, %lx, etc.). Reject strings containing other format types that could be used to access arbitrary memory or cause crashes. Invalid format strings are added to the trace output for visibility with "BAD_FORMAT: " prefix.
From the CVE record · Linux
The Linux kernel mlx5 firmware tracer did not validate format strings received from device firmware. Malformed strings from bad firmware could cause crashes or undefined behavior; the input does not specify an attack route, authentication requirement, or user interaction.
Anyone running the Linux kernel with the mlx5 firmware tracer should check their kernel; affected versions are not specified.