rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ fadfd092ee9138825d8c2a4f95719d2e2e3202b9 · < e5e06455760f2995b16a176033909347929d1128| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
rtc: pcf85063: fix potential OOB write in PCF85063 NVMEM read
The nvmem interface supports variable buffer sizes, while the regmap interface operates with fixed-size storage. If an nvmem client uses a buffer size less than 4 bytes, regmap_read will write out of bounds as it expects the buffer to point at an unsigned int.
Fix this by using an intermediary unsigned int to hold the value.
From the CVE record · Linux
The Linux kernel’s PCF85063 NVMEM read path can write beyond a client buffer when the buffer is smaller than four bytes. This happens because regmap_read expects storage for an unsigned int; the input does not specify an attacker access path or authentication requirements.
Engineers running Linux kernels with the PCF85063 driver should check whether their kernel includes the fix; affected versions are not specified.