media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 7fd4828f6cc5bd4339ff58e372ccb5f528548b30 · < 08dfcbd03b2b7f918c4f87c6ff637054e510df74| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
In dw2102_i2c_transfer, msg is controlled by user. When msg[i].buf is null and msg[i].len is zero, former checks on msg[i].buf would be passed. Malicious data finally reach dw2102_i2c_transfer. If accessing msg[i].buf[0] without sanity check, null ptr deref would happen. We add check on msg[i].len to prevent crash.
Similar commit: commit 950e252cb469 ("[media] dw2102: limit messages to buffer size")
From the CVE record · Linux
The Linux kernel's dw2102_i2c_transfer() can dereference a null pointer when a user-controlled message has a null buffer and zero length. An attacker able to supply such a message could crash the kernel; the input does not specify the access or authentication required.
Engineers running Linux kernels with the dw2102 media driver should check whether their kernel includes the fix; affected versions are not specified.