[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1uwD66oqzLGufuq@kroah.com>
Date: Fri, 28 Oct 2022 12:33:51 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Anastasia Belova <abelova@...ralinux.ru>
Cc: Tiffany Lin <tiffany.lin@...iatek.com>,
Andrew-CT Chen <andrew-ct.chen@...iatek.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
linux-media@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
lvc-project@...uxtesting.org
Subject: Re: [PATCH 5.10 1/1] vdec_vp9_if: add check for NULL for
vsi->frm_bufs[vsi->new_fb_idx].buf.fb in vp9_swap_frm_bufs
On Fri, Oct 28, 2022 at 01:05:39PM +0300, Anastasia Belova wrote:
> If vsi->frm_bufs[vsi->new_fb_idx].buf.fb == NULL while cleaning
> fb_free_list NULL-pointer is dereferenced.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Signed-off-by: Anastasia Belova <abelova@...ralinux.ru>
> ---
> drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> index d9880210b2ab..dea056689b48 100644
> --- a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> +++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp9_if.c
> @@ -512,7 +512,7 @@ static void vp9_swap_frm_bufs(struct vdec_vp9_inst *inst)
> * clean fb_free_list
> */
> if (vsi->frm_bufs[vsi->new_fb_idx].ref_cnt == 0) {
> - if (!vp9_is_sf_ref_fb(
> + if (vsi->frm_bufs[vsi->new_fb_idx].buf.fb != NULL && !vp9_is_sf_ref_fb(
> inst, vsi->frm_bufs[vsi->new_fb_idx].buf.fb)) {
> struct vdec_fb *fb;
>
> --
> 2.30.2
>
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
Powered by blists - more mailing lists