* [PATCH v2] media: dvb-usb-v2: ce6230: add ctr_msg check usb_control_msg of size 0
@ 2026-05-14 12:56 Jakov Novak
0 siblings, 0 replies; only message in thread
From: Jakov Novak @ 2026-05-14 12:56 UTC (permalink / raw)
To: linux-kernel, linux-media
Cc: jakovnovak30, crope, mchehab, skhan, syzbot+427909a2e3b2f83d78cb
Currently, the function ce6230_ctrl_msg, doesnt't check the size of the
control message that is supposed to be read/written, which causes the
error Syzbot reported at the usb core function usb_submit_urb after calling
usb_control_msg in the driver code. This patch fixes the issue by returning
an error code if the req->data_len == 0 inside ce6230_ctrl_msg.
Fixes: eebb876b0b8f ("V4L/DVB (11216): Add driver for Intel CE6230 DVB-T USB2.0")
Reported-and-tested-by: syzbot+427909a2e3b2f83d78cb@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=427909a2e3b2f83d78cb
Signed-off-by: Jakov Novak <jakovnovak30@gmail.com>
---
drivers/media/usb/dvb-usb-v2/ce6230.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/media/usb/dvb-usb-v2/ce6230.c b/drivers/media/usb/dvb-usb-v2/ce6230.c
index 7ebaf3ee4491..dd3aa45b56a3 100644
--- a/drivers/media/usb/dvb-usb-v2/ce6230.c
+++ b/drivers/media/usb/dvb-usb-v2/ce6230.c
@@ -23,6 +23,13 @@ static int ce6230_ctrl_msg(struct dvb_usb_device *d, struct usb_req *req)
value = req->value;
index = req->index;
+ if (!req->data_len) {
+ dev_err(&d->udev->dev,
+ "%s: cannot send crtl_msg of size 0",
+ KBUILD_MODNAME);
+ return -ENOBUFS;
+ }
+
switch (req->cmd) {
case I2C_READ:
case DEMOD_READ:
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-14 12:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-14 12:56 [PATCH v2] media: dvb-usb-v2: ce6230: add ctr_msg check usb_control_msg of size 0 Jakov Novak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox