regmap: sdw-mbq: don't call an unset readable_reg callback
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 |
|
|
6.18.467.1.107.2In the Linux kernel, the following vulnerability has been resolved:
regmap: sdw-mbq: don't call an unset readable_reg callback
regmap_sdw_mbq_poll_busy() decides whether to poll the Function Busy bit by calling ctx->readable_reg(), which is a straight copy of config->readable_reg. That callback is optional: regmap_readable() treats a NULL ->readable_reg as "every register is readable", and drivers rely on that. es9356 and tac5xx2-sdw both build an MBQ regmap without one.
Since commit ca1b11b36d82 ("regmap: sdw-mbq: Allow defers on undeferrable controls") the poll runs on every -ENODATA, not only for Controls the driver marked deferrable, so any of those devices answering COMMAND_IGNORED takes the kernel through a NULL function pointer.
Treat a missing callback the way the rest of regmap does and poll.
From the CVE record · Linux
The Linux kernel's SoundWire MBQ regmap can call an unset optional readable_reg callback. If an affected device answers COMMAND_IGNORED and the operation returns -ENODATA, this can cause a NULL function-pointer call. The input does not describe an attacker path, authentication requirement, or user interaction.
Teams running Linux kernels with SoundWire MBQ regmaps for es9356 or tac5xx2-sdw devices should check; affected versions are not specified.