CVE-2026-93165: platform/chrome: sensorhub: Fix memory overread in ring handler
In the Linux kernel, the following vulnerability has been resolved:
platform/chrome: sensorhub: Fix memory overread in ring handler
maxresponse and sensornum are read from different EC commands:
- maxresponse is from crosecgetprotoinfo(). ecdev->maxresponse = info->maxresponsepacketsize - sizeof(struct echostresponse);
- sensornum is from crosecgetsensorcount(). sensornum = crosecgetsensorcount(ec);
With a malfunctioning EC firmware, it is possible that the msg->insize (i.e., fifoinfolength in the context) could be clamped in croseccmdxfer() because msg->insize is greater than maxresponse.
int fifoinfolength = sizeof(struct ecresponsemotionsensefifoinfo) + sizeof(u16) sensorhub->sensornum;
This means the number of read bytes could be less than expected. As a result, the subsequent memcpy() in crosecsensorhubringhandler() overreads the resp->fifoinfo buffer.
Check the return value of croseccmdxferstatus() and abort if the number of bytes read does not match the expected length.
Affected Software
Event History
Frequently Asked Questions
What conditions are required for this overread to occur?
The issue requires a malfunctioning EC firmware that causes the motion-sense FIFO response length to be clamped because the requested response exceeds the EC-reported maximum response size. The sensor count and maximum response size are obtained through separate EC commands, allowing inconsistent values to produce a shorter-than-expected response.
Which systems are realistically exposed?
Systems using the Linux kernel Chrome platform sensorhub driver and communicating with an EC that provides motion-sense sensor data are relevant. The described trigger depends on malfunctioning EC firmware; the provided information does not establish that normal EC firmware triggers it.
How does the fix prevent the overread?
The fix checks the return value from cros_ec_cmd_xfer_status() and aborts when the number of bytes read does not equal the expected FIFO-info response length. This prevents the subsequent memcpy() from reading beyond the received fifo_info buffer.