net: dsa: mt7530: fix NULL dereference on unbind of MT7531 and MT7621
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
net: dsa: mt7530: fix NULL dereference on unbind of MT7531 and MT7621
The core and io supplies are only requested for ID_MT7530: both the devm_regulator_get() in probe and the regulator_enable() in mt7530_setup() are guarded by the switch id, but mt7530_remove() disables them unconditionally. On an MT7621 or an MT7531 both pointers are still NULL from devm_kzalloc(), so rmmod or a sysfs unbind calls regulator_disable() on NULL.
From the CVE record · Linux
The Linux kernel’s mt7530 DSA driver unconditionally disables regulator pointers that remain NULL on MT7531 and MT7621 devices. Removing the module or unbinding the device through sysfs triggers a NULL pointer dereference. The input does not specify whether an attacker can initiate either action or what privileges are required.
Engineers running Linux kernels with MT7531 or MT7621 devices should check whether their kernel includes the fix; affected versions are not specified.