of: module: add buffer overflow check in of_modalias()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ bc575064d688c8933a6ca51429bea9bc63628d3b · < ee332023adfd5882808f2dabf037b32d6ce36f9e| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
of: module: add buffer overflow check in of_modalias()
In of_modalias(), if the buffer happens to be too small even for the 1st snprintf() call, the len parameter will become negative and str parameter (if not NULL initially) will point beyond the buffer's end. Add the buffer overflow check after the 1st snprintf() call and fix such check after the strlen() call (accounting for the terminating NUL char).
From the CVE record · Linux
The Linux kernel's of_modalias() has a buffer overflow flaw when the supplied buffer is too small for its first snprintf() call. This can leave a pointer beyond the buffer's end. The input does not specify how an attacker could trigger the flaw or whether authentication or user interaction is required.
Engineers running the Linux kernel should check their versions; affected versions are not specified.