iio: gyro: mpu3050-core: fix pm_runtime error handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 3904b28efb2c780c23dcddfb87e07fe0230661e5 · < 42685cf96e28262e0b84d74447f3d99f3f6a72e0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
iio: gyro: mpu3050-core: fix pm_runtime error handling
The return value of pm_runtime_get_sync() is not checked, allowing the driver to access hardware that may fail to resume. The device usage count is also unconditionally incremented. Use pm_runtime_resume_and_get() which propagates errors and avoids incrementing the usage count on failure.
In preenable, add pm_runtime_put_autosuspend() on set_8khz_samplerate() failure since postdisable does not run when preenable fails.
From the CVE record · Linux
The Linux kernel’s mpu3050 gyro driver does not handle runtime-resume and samplerate-setting failures correctly. This can cause it to access hardware that failed to resume or mishandle the device usage count; the input does not specify an attacker path, authentication requirements, or user interaction.
Engineers running Linux kernels with the mpu3050 gyro driver should check their kernel versions; affected versions are not specified.