pinctrl: mcp23s08: Initialize mcp->dev and mcp->addr before regmap init
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
pinctrl: mcp23s08: Initialize mcp->dev and mcp->addr before regmap init
Regmap initialization triggers regcache_maple_populate() which attempts SPI read to populate cache. SPI read requires mcp->dev and mcp->addr to be set, without them, NULL pointer dereference occurs during probe.
Move initialization before mcp23s08_spi_regmap_init() call.
From the CVE record · Linux
The Linux kernel’s mcp23s08 pinctrl driver can dereference a NULL pointer during probe because regmap initialization attempts an SPI read before required fields are set. The input does not describe an attacker, access requirements, or user interaction.
Engineers running Linux kernels with the mcp23s08 pinctrl driver should check their deployments; affected versions are not specified.