pinctrl: bcm2835: Don't remove an unregistered GPIO chip
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 266423e60ea1b953fcc0cd97f3dad85857e434d1 · < 68ea6dd23b732081826c36033835468383487864| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: bcm2835: Don't remove an unregistered GPIO chip
If the devm_pinctrl_register() function fails, bcm2835_pinctrl_probe() calls gpiochip_remove() before gpiochip_add_data() has registered the GPIO chip.
This means that upon failure the gpio_chip.gpiodev is NULL resulting in a null pointer dereference inside the gpiochip_remove() function.
Remove the unnecessary function call to gpiochip_remove(). No GPIO cleanup is required because the GPIO chip has not yet been registered. Without this change there is potential for a kernel panic upon registration failure
From the CVE record · Linux
The Linux kernel’s bcm2835 pinctrl probe can dereference a null pointer if pinctrl registration fails, potentially causing a kernel panic. The input does not describe an attacker trigger, access requirements, or required user interaction.
Operators running Linux kernels with the bcm2835 pinctrl driver should check whether their kernel includes the fix; affected versions are not specified.