drm/log: Fix out-of-bounds read on empty message length
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
6.18.467.1.107.2In the Linux kernel, the following vulnerability has been resolved:
drm/log: Fix out-of-bounds read on empty message length
drm_log_draw_kmsg_record() accesses s[len - 1] to strip the trailing newline, but len is unsigned int. If len is 0, the subtraction wraps to UINT_MAX, causing an out-of-bounds read.
Add an early return when len is 0.
From the CVE record · Linux
The Linux kernel's drm_log_draw_kmsg_record() reads out of bounds when given an empty message because the unsigned length wraps during a trailing-newline check. The input does not specify how an attacker could trigger this condition, or whether access or user interaction is required.
Teams running Linux kernel versions without the fix should check their exposure; affected versions are not specified.