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: <CAJZ5v0iw6v+X_UM0QNzj0MC7hdvmoqUK2mt3caOn-4YbbQRkeg@mail.gmail.com>
Date: Fri, 2 Aug 2024 16:52:29 +0200
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: xiaopeitux@...mail.com
Cc: robert.moore@...el.com, rafael.j.wysocki@...el.com, 
	acpica-devel@...ts.linux.dev, linux-kernel@...r.kernel.org, 
	linux-acpi@...r.kernel.org, xiaopei01@...inos.cn
Subject: Re: [PATCH] ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED
 in acpi_db_convert_to_package ACPICA commit 4d4547cf13cca820ff7e0f859ba83e1a610b9fd0

On Thu, Jul 18, 2024 at 8:12 AM <xiaopeitux@...mail.com> wrote:
>
> From: Pei Xiao <xiaopei01@...inos.cn>
>
> ACPI_ALLOCATE_ZEROED may fails, elements might be null and will cause
> null pointer dereference later.
>
> Link: https://github.com/acpica/acpica/commit/4d4547cf
> Signed-off-by: Pei Xiao <xiaopei01@...inos.cn>
> ---
>  drivers/acpi/acpica/dbconvert.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/acpi/acpica/dbconvert.c b/drivers/acpi/acpica/dbconvert.c
> index 2b84ac093698..8dbab6932049 100644
> --- a/drivers/acpi/acpica/dbconvert.c
> +++ b/drivers/acpi/acpica/dbconvert.c
> @@ -174,6 +174,8 @@ acpi_status acpi_db_convert_to_package(char *string, union acpi_object *object)
>         elements =
>             ACPI_ALLOCATE_ZEROED(DB_DEFAULT_PKG_ELEMENTS *
>                                  sizeof(union acpi_object));
> +       if (!elements)
> +               return (AE_NO_MEMORY);
>
>         this = string;
>         for (i = 0; i < (DB_DEFAULT_PKG_ELEMENTS - 1); i++) {
> --

Applied (with edited subject and changelog) as 6.12 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ