From: Daniel Almeida <dwlsalmeida@gmail.com>
To: Hans Verkuil <hverkuil@xs4all.nl>, Zhou Qingyang <zhou1615@umn.edu>
Cc: kjlu@umn.edu, Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] media: vidtv: Fix a wild pointer dereference in vidtv_channel_pmt_match_sections()
Date: Thu, 2 Dec 2021 14:07:04 -0300 [thread overview]
Message-ID: <805c6ead-1e8f-19a1-dc0f-565fb0563a1c@gmail.com> (raw)
In-Reply-To: <94dbfe62-43b3-a293-5f59-d8bd1f35bde1@xs4all.nl>
Hi Zhou Qingyang, thanks for the patch.
Yes this is a real issue.
> +
> + if (!tail) {
> + vidtv_psi_pmt_stream_destroy(head);
> + dev_warn_ratelimited(m->dev,
> + "No enough memory for vidtv_psi_pmt_stream_init");
> + return;
> + }
Yes this is the right thing to do, as vidtv_psi_pmt_stream_destroy will
free the stream chain and all descriptors associated with it, if any.
By then aborting out of this function, we will have a PMT section
without any streams. This is OK if the allocation failed.
Reviewed-by Daniel Almeida <daniel.almeida@collabora.com>
Thanks,
-- Daniel
prev parent reply other threads:[~2021-12-02 17:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-30 16:39 Zhou Qingyang
2021-12-02 13:42 ` Hans Verkuil
2021-12-02 17:07 ` Daniel Almeida [this message]
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=805c6ead-1e8f-19a1-dc0f-565fb0563a1c@gmail.com \
--to=dwlsalmeida@gmail.com \
--cc=hverkuil@xs4all.nl \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=zhou1615@umn.edu \
/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®