Input: elan_i2c - prevent division by zero and arithmetic underflow
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6696777c6506fa52b2a0282121195843ed855be6 · < 01e0317c256c560d8dcce2e9825eb6142ee34611| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
Input: elan_i2c - prevent division by zero and arithmetic underflow
The Elan I2C touchpad driver queries the device for its physical dimensions and trace counts to calculate the device resolution and width. However, if the device firmware or device tree provides invalid zero values for x_traces or y_traces, it results in a fatal division-by-zero exception leading to a kernel panic during device probe.
Add checks to ensure these parameters are non-zero before performing the division. If invalid trace values are detected, fall back to a safe default of 1.
Additionally, prevent an arithmetic underflow in the touch reporting logic. Previously, if the calculated or fallback width was smaller than ETP_FWIDTH_REDUCE (90), the subtraction would underflow, resulting in a massive unsigned integer being reported to userspace. Clamp the adjusted width to a minimum of 0 to safely handle small physical dimensions and fallback scenarios.
Completing the probe with safe fallback values ensures the sysfs nodes are created, keeping the firmware update path intact so a recovery firmware can be flashed to the device.
From the CVE record · Linux
The Linux kernel’s Elan I2C touchpad driver can divide by zero during device probe if device firmware or the device tree supplies zero trace counts, causing a kernel panic. Small width values can also cause an arithmetic underflow that reports a very large width to userspace. The input does not identify an attack route, authentication requirement, or user interaction.
Engineers running Linux systems with an Elan I2C touchpad should check their kernel; affected versions are not specified.