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: <CACMJSesr42T=qr8GoUwxGB51mnr04TB6j4_hztGAFXx008ZJLw@mail.gmail.com>
Date: Mon, 27 Jan 2025 16:46:27 +0100
From: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
To: Johan Hovold <johan+linaro@...nel.org>
Cc: Maximilian Luz <luzmaximilian@...il.com>, Bjorn Andersson <andersson@...nel.org>, 
	Konrad Dybcio <konradybcio@...nel.org>, Elliot Berman <quic_eberman@...cinc.com>, 
	linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	stable@...r.kernel.org
Subject: Re: [PATCH] firmware: qcom: uefisecapp: fix efivars registration race

On Mon, 20 Jan 2025 at 16:10, Johan Hovold <johan+linaro@...nel.org> wrote:
>
> Since the conversion to using the TZ allocator, the efivars service is
> registered before the memory pool has been allocated, something which
> can lead to a NULL-pointer dereference in case of a racing EFI variable
> access.
>
> Make sure that all resources have been set up before registering the
> efivars.
>
> Fixes: 6612103ec35a ("firmware: qcom: qseecom: convert to using the TZ allocator")
> Cc: stable@...r.kernel.org      # 6.11
> Cc: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>

Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@...aro.org>

> ---
>
> Note that commit 40289e35ca52 ("firmware: qcom: scm: enable the TZ mem
> allocator") looks equally broken as it allocates the tzmem pool only
> after qcom_scm_is_available() returns true and other driver can start
> making SCM calls.
>
> That one appears to be a bit harder to fix as qcom_tzmem_enable()
> currently depends on SCM being available, but someone should definitely
> look into untangling that mess.
>
> Johan

Yeah, I have it on my TODO list. I'll get to it.

Bartosz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ