From: syzbot <syzbot+ac020fbb657e00356ca2@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH] media: dvb-usb-v2: fix NULL pointer dereference in dvb_usb_start_feed
Date: Sun, 04 Oct 2026 07:12:08 -0700 [thread overview]
Message-ID: <6ac25eb8.5aa89728.278400.0000.GAE@google.com> (raw)
In-Reply-To: <6ac21b16.34119e79.2f92f3.0020.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH] media: dvb-usb-v2: fix NULL pointer dereference in dvb_usb_start_feed
Author: kartikey406@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
dvb_usb_start_feed() only checks that adap->active_fe is not -1 before
calling streaming_ctrl() with adap->fe[adap->active_fe]. If the frontend
was detached and adap->fe[active_fe] is NULL while active_fe still holds
a stale index, a NULL frontend is passed to the driver. For gl861
this crashes in friio_streaming_ctrl() when it evaluates fe_to_adap(fe).
Check that adap->fe[adap->active_fe] is not NULL and return -EINVAL
otherwise.
Reported-by: syzbot+ac020fbb657e00356ca2@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=ac020fbb657e00356ca2
Signed-off-by: Deepanshu Kartikey <kartikey406@gmail.com>
---
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 bd86d250433d..eabf020431c8 100644
--- a/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
+++ b/drivers/media/usb/dvb-usb-v2/dvb_usb_core.c
@@ -254,7 +254,7 @@ static int dvb_usb_start_feed(struct dvb_demux_feed *dvbdmxfeed)
/* wait init is done */
wait_on_bit(&adap->state_bits, ADAP_INIT, TASK_UNINTERRUPTIBLE);
- if (adap->active_fe == -1)
+ if (adap->active_fe == -1 || !adap->fe[adap->active_fe])
return -EINVAL;
/* skip feed setup if we are already feeding */
--
2.43.0
next prev parent reply other threads:[~2026-10-04 14:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 9:23 [syzbot] [media?] general protection fault in friio_streaming_ctrl syzbot
2026-10-04 14:12 ` syzbot [this message]
2026-10-04 14:39 ` Nguyen Ngoc Thang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6ac25eb8.5aa89728.278400.0000.GAE@google.com \
--to=syzbot+ac020fbb657e00356ca2@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®