CVE-2023-54066: media: dvb-usb-v2: gl861: Fix null-ptr-deref in gl861_i2c_master_xfer
From: Greg Kroah-Hartman <[email protected]>
Description
===========
In the Linux kernel, the following vulnerability has been resolved:
media: dvb-usb-v2: gl861: Fix null-ptr-deref in gl861_i2c_master_xfer
In gl861_i2c_master_xfer, 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 gl861_i2c_master_xfer. 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 0ed554fd769a
("media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()")
The Linux kernel CVE team has assigned CVE-2023-54066 to this issue.
Affected and fixed versions
===========================
Fixed in 5.10.197 with commit 578b67614ae0e4fba3945b66a4c8f9ae77115bcb Fixed in 5.15.133 with commit 2a33fc57133d6f39d62285df6706aeb1714967f1 Fixed in 6.1.55 with commit dfcd3c010209927b9f45b860f046635dc32e32e1 Fixed in 6.5.5 with commit 72af676551efe820e309a6c7681c2c4372f37376 Fixed in 6.6 with commit b97719a66970601cd3151a3e2020f4454a1c4ff6
Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.
Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at
https://cve.org/CVERecord/?id=CVE-2023-54066
will be updated if fixes are backported, please check that for the most up to date information about this issue.
Affected files
==============
The file(s) affected by this issue are:
drivers/media/usb/dvb-usb-v2/gl861.c
Mitigation
==========
The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:
https://git.kernel.org/stable/c/578b67614ae0e4fba3945b66a4c8f9ae77115bcb https://git.kernel.org/stable/c/2a33fc57133d6f39d62285df6706aeb1714967f1 https://git.kernel.org/stable/c/dfcd3c010209927b9f45b860f046635dc32e32e1 https://git.kernel.org/stable/c/72af676551efe820e309a6c7681c2c4372f37376 https://git.kernel.org/stable/c/b97719a66970601cd3151a3e2020f4454a1c4ff6