leds: uleds: Fix potential buffer overread
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e381322b0190c1253d347de3f28b5c37756fb651 · < 6dd51d84a9502553e58beade72823258871b8111| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
leds: uleds: Fix potential buffer overread
The name string supplied by userspace is not guaranteed to be null-terminated, so using strchr() on it might result in a buffer overread. The same thing will happen when said string is used by the LED class device.
Fix this by using strnchr() instead and explicitly check that the name string is properly null-terminated.
From the CVE record · Linux
The Linux kernel uleds component may read beyond a buffer when userspace supplies a name string that is not null-terminated. This can occur locally when the string is checked or used by the LED class device; the input does not specify authentication requirements or any further user interaction.
Engineers running Linux kernels with the uleds component should check their affected versions; no version range was provided.