* [PATCH] media: vidtv: fix general protection fault in vidtv_psi_ts_psi_write_into
@ 2026-02-07 20:16 Soham Kute
2026-02-07 20:16 ` syzbot
0 siblings, 1 reply; 3+ messages in thread
From: Soham Kute @ 2026-02-07 20:16 UTC (permalink / raw)
To: dwlsalmeida, mchehab
Cc: linux-media, linux-kernel, syzbot+814c351d094f41a1b86, Soham Kute
Add defensive validation for psi_write_args pointers to avoid
null pointer dereference reported by syzbot.
Reported-by: syzbot+814c351d094f41a1b86@syzkaller.appspotmail.com
Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
---
drivers/media/test-drivers/vidtv/vidtv_psi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
index 2a51c898c..bac0ea03b 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
@@ -156,7 +156,13 @@ static void vidtv_psi_set_sec_len(struct vidtv_psi_table_header *h, u16 new_len)
* add stuffing (i.e. padding bytes) after the CRC
*/
static u32 vidtv_psi_ts_psi_write_into(struct psi_write_args *args)
-{
+{
+ if (!args || !args->dest_buf || !args->from ||
+ !args->continuity_counter) {
+ pr_warn_once("%s: invalid write arguments\n", __func__);
+ return 0;
+ }
+
struct vidtv_mpeg_ts ts_header = {
.sync_byte = TS_SYNC_BYTE,
.bitfield = cpu_to_be16((args->new_psi_section << 14) | args->pid),
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] media: vidtv: fix general protection fault in vidtv_psi_ts_psi_write_into
2026-02-07 20:16 [PATCH] media: vidtv: fix general protection fault in vidtv_psi_ts_psi_write_into Soham Kute
@ 2026-02-07 20:16 ` syzbot
2026-02-07 20:48 ` Soham Kute
0 siblings, 1 reply; 3+ messages in thread
From: syzbot @ 2026-02-07 20:16 UTC (permalink / raw)
To: officialsohamkute
Cc: dwlsalmeida, linux-kernel, linux-media, mchehab,
officialsohamkute
> Add defensive validation for psi_write_args pointers to avoid
> null pointer dereference reported by syzbot.
>
> Reported-by: syzbot+814c351d094f41a1b86@syzkaller.appspotmail.com
>
> Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
> ---
> drivers/media/test-drivers/vidtv/vidtv_psi.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
> index 2a51c898c..bac0ea03b 100644
> --- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
> +++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
> @@ -156,7 +156,13 @@ static void vidtv_psi_set_sec_len(struct vidtv_psi_table_header *h, u16 new_len)
> * add stuffing (i.e. padding bytes) after the CRC
> */
> static u32 vidtv_psi_ts_psi_write_into(struct psi_write_args *args)
> -{
> +{
> + if (!args || !args->dest_buf || !args->from ||
> + !args->continuity_counter) {
> + pr_warn_once("%s: invalid write arguments\n", __func__);
> + return 0;
> + }
> +
> struct vidtv_mpeg_ts ts_header = {
> .sync_byte = TS_SYNC_BYTE,
> .bitfield = cpu_to_be16((args->new_psi_section << 14) | args->pid),
> --
> 2.34.1
>
I see the command but can't find the corresponding bug.
The email is sent to syzbot+HASH@syzkaller.appspotmail.com address
but the HASH does not correspond to any known bug.
Please double check the address.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] media: vidtv: fix general protection fault in vidtv_psi_ts_psi_write_into
2026-02-07 20:16 ` syzbot
@ 2026-02-07 20:48 ` Soham Kute
0 siblings, 0 replies; 3+ messages in thread
From: Soham Kute @ 2026-02-07 20:48 UTC (permalink / raw)
To: syzbot; +Cc: dwlsalmeida, linux-kernel, linux-media, mchehab
[-- Attachment #1.1: Type: text/plain, Size: 1743 bytes --]
v2: resend with correct syzbot Reported-by and maintainer To: list.
On Sun, Feb 8, 2026 at 1:52 AM syzbot <syzbot@syzkaller.appspotmail.com>
wrote:
> > Add defensive validation for psi_write_args pointers to avoid
> > null pointer dereference reported by syzbot.
> >
> > Reported-by: syzbot+814c351d094f41a1b86@syzkaller.appspotmail.com
> >
> > Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
> > ---
> > drivers/media/test-drivers/vidtv/vidtv_psi.c | 8 +++++++-
> > 1 file changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c
> b/drivers/media/test-drivers/vidtv/vidtv_psi.c
> > index 2a51c898c..bac0ea03b 100644
> > --- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
> > +++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
> > @@ -156,7 +156,13 @@ static void vidtv_psi_set_sec_len(struct
> vidtv_psi_table_header *h, u16 new_len)
> > * add stuffing (i.e. padding bytes) after the CRC
> > */
> > static u32 vidtv_psi_ts_psi_write_into(struct psi_write_args *args)
> > -{
> > +{
> > + if (!args || !args->dest_buf || !args->from ||
> > + !args->continuity_counter) {
> > + pr_warn_once("%s: invalid write arguments\n", __func__);
> > + return 0;
> > + }
> > +
> > struct vidtv_mpeg_ts ts_header = {
> > .sync_byte = TS_SYNC_BYTE,
> > .bitfield = cpu_to_be16((args->new_psi_section << 14) |
> args->pid),
> > --
> > 2.34.1
> >
>
> I see the command but can't find the corresponding bug.
> The email is sent to syzbot+HASH@syzkaller.appspotmail.com address
> but the HASH does not correspond to any known bug.
> Please double check the address.
>
>
[-- Attachment #1.2: Type: text/html, Size: 2576 bytes --]
[-- Attachment #2: 0001-PATCH-v2-media-vidtv-fix-general-protection-fault-in.patch --]
[-- Type: text/x-patch, Size: 1391 bytes --]
From fd746b95987239073f7872275cd68fe8cb29e0ed Mon Sep 17 00:00:00 2001
From: Soham Kute <officialsohamkute@gmail.com>
Date: Sun, 8 Feb 2026 01:43:40 +0530
Subject: [PATCH] [PATCH v2] media: vidtv: fix general protection fault in
vidtv_psi_ts_psi_write_into
Add defensive validation for psi_write_args pointers to avoid
null pointer dereference reported by syzbot.
Reported-by: syzbot+814c351d094f41a1b86@syzkaller.appspotmail.com
Signed-off-by: Soham Kute <officialsohamkute@gmail.com>
---
drivers/media/test-drivers/vidtv/vidtv_psi.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/test-drivers/vidtv/vidtv_psi.c b/drivers/media/test-drivers/vidtv/vidtv_psi.c
index 2a51c898c..bac0ea03b 100644
--- a/drivers/media/test-drivers/vidtv/vidtv_psi.c
+++ b/drivers/media/test-drivers/vidtv/vidtv_psi.c
@@ -156,7 +156,13 @@ static void vidtv_psi_set_sec_len(struct vidtv_psi_table_header *h, u16 new_len)
* add stuffing (i.e. padding bytes) after the CRC
*/
static u32 vidtv_psi_ts_psi_write_into(struct psi_write_args *args)
-{
+{
+ if (!args || !args->dest_buf || !args->from ||
+ !args->continuity_counter) {
+ pr_warn_once("%s: invalid write arguments\n", __func__);
+ return 0;
+ }
+
struct vidtv_mpeg_ts ts_header = {
.sync_byte = TS_SYNC_BYTE,
.bitfield = cpu_to_be16((args->new_psi_section << 14) | args->pid),
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-07 20:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-07 20:16 [PATCH] media: vidtv: fix general protection fault in vidtv_psi_ts_psi_write_into Soham Kute
2026-02-07 20:16 ` syzbot
2026-02-07 20:48 ` Soham Kute
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox