[lvc-project] [PATCH 2/2] media: dvb-usb-v2: core: do not use an unititialized frontend

Dmitry Antipov dmantipov at yandex.ru
Thu Oct 1 14:44:57 MSK 2026


Set 'active_fe' of 'struct dvb_usb_adapter' to -1 (indicating that no
frontend is ready) early in dvb_usbv2_adapter_init(), thus preventing
the very premature (before dvb_usbv2_adapter_frontend_init() has even
tried to setup the frontend) streaming attempt from dvb_usb_start_feed().

Reported-by: syzbot+3df044e20e6ff1fb3cf5 at syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=3df044e20e6ff1fb3cf5
Signed-off-by: Dmitry Antipov <dmantipov at yandex.ru>
---
 drivers/media/usb/dvb-usb-v2/dvb_usb_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
index 1f933adae46c..e54a002676b9 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -630,7 +630,6 @@ static int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
 	dev_dbg(&d->udev->dev, "%s: adap=%d\n", __func__, adap->id);
 
 	memset(adap->fe, 0, sizeof(adap->fe));
-	adap->active_fe = -1;
 
 	if (d->props->frontend_attach) {
 		ret = d->props->frontend_attach(adap);
@@ -752,6 +751,7 @@ static int dvb_usbv2_adapter_init(struct dvb_usb_device *d)
 	for (i = 0; i < adapter_count; i++) {
 		adap = &d->adapter[i];
 		adap->id = i;
+		adap->active_fe = -1;
 		adap->props = &d->props->adapter[i];
 
 		/* speed - when running at FULL speed we need a HW PID filter */
-- 
2.55.0




More information about the lvc-project mailing list