CVE-2026-138981: ASoC: rt712-sdca-dmic: fix drvdata type in the gain controls
In the Linux kernel, the following vulnerability has been resolved:
ASoC: rt712-sdca-dmic: fix drvdata type in the gain controls
rt712sdcadmicsetgainget() and rt712sdcadmicsetgainput() take the component drvdata as struct rt712sdcapriv, but this driver stores a struct rt712sdcadmicpriv.
regmap and mbqregmap are at the same offsets in both structs, so the register accesses work. slave is not: rt712sdcapriv has dmiccomponent in front of it, so its slave overlays rt712sdcadmicpriv's params, which this driver never writes. When regmapwrite() fails in the put handler, deverr() is called with &NULL->dev (RSI below):
rt712-sdca-dmic sdw:0:3:025d:1713:01: Defer on undeferrable control: 40800f13 BUG: kernel NULL pointer dereference, address: 0000000000000058 RIP: 0010:devprintk+0x10/0x70 RDX: ffffcdac45f83cd0 RSI: 0000000000000008 RDI: ffffffffa09cb5cb Call Trace: deverr+0x7f/0x99 rt712sdcadmicsetgainput.cold+0x20/0x25 [sndsocrt712sdcadmic] sndctlelemwrite+0x19a/0x1f0 [snd] sndctlioctl+0x658/0x8a0 [snd]
Seen on a Dell Precision 5690 running 7.2.5-200.fc44, with alsactl writing the control during boot. Compile-tested only.