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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 20 Mar 2023 18:02:02 +0100
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Kang Chen <void0red@...il.com>
Cc:     lenb@...nel.org, robert.moore@...el.com,
        rafael.j.wysocki@...el.com, linux-acpi@...r.kernel.org,
        acpica-devel@...ts.linuxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects

On Sun, Feb 26, 2023 at 7:19 AM Kang Chen <void0red@...il.com> wrote:
>
> ACPI_ALLOCATE_ZEROED may fails, object_info might be null and will
> cause null pointer dereference later.
>
> Signed-off-by: Kang Chen <void0red@...il.com>

As a rule, ACPICA changes need to be submitted as pull requests to the
upstream ACPICA project on GitHub in the first place.

When this happens, please resend the patch with a Link tag pointing to
the corresponding upstream pull request.

> ---
>  drivers/acpi/acpica/dbnames.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/acpi/acpica/dbnames.c b/drivers/acpi/acpica/dbnames.c
> index 3615e1a6e..b91155ea9 100644
> --- a/drivers/acpi/acpica/dbnames.c
> +++ b/drivers/acpi/acpica/dbnames.c
> @@ -652,6 +652,9 @@ acpi_status acpi_db_display_objects(char *obj_type_arg, char *display_count_arg)
>                 object_info =
>                     ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_object_info));
>
> +               if (!object_info)
> +                       return (AE_NO_MEMORY);
> +
>                 /* Walk the namespace from the root */
>
>                 (void)acpi_walk_namespace(ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ