lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <600cc65678331b0c419d0b517d6c9003481223b8.camel@collabora.com>
Date: Fri, 06 Feb 2026 15:59:42 -0500
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Detlev Casanova <detlev.casanova@...labora.com>, 
	linux-kernel@...r.kernel.org
Cc: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>, Mauro Carvalho Chehab	
 <mchehab@...nel.org>, Heiko Stuebner <heiko@...ech.de>, 
	linux-media@...r.kernel.org, linux-rockchip@...ts.infradead.org, 
	linux-arm-kernel@...ts.infradead.org, kernel@...labora.com, Christian
 Hewitt	 <christianshewitt@...il.com>, Jonas Karlman <jonas@...boo.se>
Subject: Re: [PATCH] media: rkvdec: Improve handling missing short/long term
 RPS

Le vendredi 23 janvier 2026 à 14:22 -0500, Detlev Casanova a écrit :
> The values of ext_sps_st_rps and ext_sps_lt_rps in struct rkvdec_hevc_run
> are not initialized when the respective controls are not set by userspace.
> 
> When this is the case, set them to NULL so the rkvdec_hevc_run_preamble
> function that parses controls does not access garbage data which leads to
> a panic on unaccessible memory.
> 
> Fixes: c9a59dc2acc7 ("media: rkvdec: Add HEVC support for the VDPU381 variant")
> Reported-by: Christian Hewitt <christianshewitt@...il.com>
> Suggested-by: Jonas Karlman <jonas@...boo.se>
> Signed-off-by: Detlev Casanova <detlev.casanova@...labora.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>

I'll pick this in fixes, so we don't release 6.20 (or 7) with that bug.

cheers,
Nicolas

> ---
>  drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c b/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c
> index 28267ee30190..3119f3bc9f98 100644
> --- a/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c
> +++ b/drivers/media/platform/rockchip/rkvdec/rkvdec-hevc-common.c
> @@ -500,11 +500,15 @@ void rkvdec_hevc_run_preamble(struct rkvdec_ctx *ctx,
>  		ctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,
>  				      V4L2_CID_STATELESS_HEVC_EXT_SPS_ST_RPS);
>  		run->ext_sps_st_rps = ctrl ? ctrl->p_cur.p : NULL;
> +	} else {
> +		run->ext_sps_st_rps = NULL;
>  	}
>  	if (ctx->has_sps_lt_rps) {
>  		ctrl = v4l2_ctrl_find(&ctx->ctrl_hdl,
>  				      V4L2_CID_STATELESS_HEVC_EXT_SPS_LT_RPS);
>  		run->ext_sps_lt_rps = ctrl ? ctrl->p_cur.p : NULL;
> +	} else {
> +		run->ext_sps_lt_rps = NULL;
>  	}
>  
>  	rkvdec_run_preamble(ctx, &run->base);

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ