CVE-2026-31740
JSON

5.5medium

counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member

Severity
5.5medium CVSS:3.1 by NVD
Exploit likelihood
0.13% (higher than 2% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Linux

Description

In the Linux kernel, the following vulnerability has been resolved: counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member The counter driver can use HW channels 1 and 2, while the PWM driver can use HW channels 0, 1, 2, 3, 4, 6, 7. The dev member is assigned both by the counter driver and the PWM driver for channels 1 and 2, to their own struct device instance, overwriting the previous value. The sub-drivers race to assign their own struct device pointer to the same struct rz_mtu3_channel's dev member. The dev member of struct rz_mtu3_channel is used by the counter sub-driver for runtime PM. Depending on the probe order of the counter and PWM sub-drivers, the dev member may point to the wrong struct device instance, causing the counter sub-driver to do runtime PM actions on the wrong device. To fix this, use the parent pointer of the counter, which is assigned during probe to the correct struct device, not the struct device pointer inside the shared struct rz_mtu3_channel.

Affected

Product or packageVersionsReported by
Linux Linuxfrom 0be8907359df4c62319f5cb2c6981ff0d9ebf35a before 28a371be901ef44ee03726c2575d7d6795521fe0, from 0be8907359df4c62319f5cb2c6981ff0d9ebf35a before 633dfbf0eb2766c597c1a59dd83035c82e14791d, from 0be8907359df4c62319f5cb2c6981ff0d9ebf35a before 6562290225c197e2e193a53de2a517815288dcd1, from 0be8907359df4c62319f5cb2c6981ff0d9ebf35a before 63be324c795262f0e316c6fe9b329d83afa1ec93, from 0be8907359df4c62319f5cb2c6981ff0d9ebf35a before 2932095c114b98cbb40ccf34fc00d613cb17cead, 6.4
Not affected: before 6.4, from 6.6.134 up to 6.6.*, from 6.12.81 up to 6.12.*, from 6.18.22 up to 6.18.*, from 6.19.12 up to 6.19.*, from 7.0 up to *
CVE List
linux linux_kernelfrom 6.4 before 6.6.134, from 6.7 before 6.12.81, from 6.13 before 6.18.22, from 6.19 before 6.19.12, 7.0NVD

What each source says

CVE List

In the Linux kernel, the following vulnerability has been resolved: counter: rz-mtu3-cnt: do not use struct rz_mtu3_channel's dev member The counter driver can use HW channels 1 and 2, while the PWM driver can use HW channels 0, 1, 2, 3, 4, 6, 7. The dev member is assigned both by the counter driver and the PWM driver for channels 1 and 2, to their own struct device instance, overwriting the previous value. The sub-drivers race to assign their own struct device pointer to the same struct rz_mtu3_channel's dev member. The dev member of struct rz_mtu3_channel is used by the counter sub-driver for runtime PM. Depending on the probe order of the counter and PWM sub-drivers, the dev member may point to the wrong struct device instance, causing the counter sub-driver to do runtime PM actions on the wrong device. To fix this, use the parent pointer of the counter, which is assigned during probe to the correct struct device, not the struct device pointer inside the shared struct rz_mtu3_channel.

NVD (es)

En el kernel de Linux, la siguiente vulnerabilidad ha sido resuelta: contador: rz-mtu3-cnt: no usar el miembro dev de struct rz_mtu3_channel El controlador de contador puede usar los canales HW 1 y 2, mientras que el controlador PWM puede usar los canales HW 0, 1, 2, 3, 4, 6, 7. El miembro dev es asignado tanto por el controlador de contador como por el controlador PWM para los canales 1 y 2, a su propia instancia de struct device, sobrescribiendo el valor anterior. Los subcontroladores compiten por asignar su propio puntero a struct device al mismo miembro dev de struct rz_mtu3_channel. El miembro dev de struct rz_mtu3_channel es usado por el subcontrolador de contador para PM en tiempo de ejecución. Dependiendo del orden de sondeo de los subcontroladores de contador y PWM, el miembro dev puede apuntar a la instancia incorrecta de struct device, haciendo que el subcontrolador de contador realice acciones de PM en tiempo de ejecución en el dispositivo incorrecto. Para solucionar esto, usar el puntero padre del contador, el cual es asignado durante el sondeo a la struct device correcta, no el puntero a struct device dentro de la struct rz_mtu3_channel compartida.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-31740 changed 2026-05-11CVE Terms of Use
NVDCVE-2026-31740 changed 2026-11-11Public domain