Bug 8764 - check null return of ACPI_ALLOCATE_ZEROED in AcpiDbConvertToPackage
Summary: check null return of ACPI_ALLOCATE_ZEROED in AcpiDbConvertToPackage
Status: CONFIRMED
Alias: None
Product: ANCK 5.10 Dev
Classification: ANCK
Component: drivers (show other bugs) drivers
Version: 5.10.y-16
Hardware: All Linux
: P3-Medium S3-normal
Target Milestone: ---
Assignee: Shiloong
QA Contact: shuming
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-16 10:00 UTC by Shiloong
Modified: 2024-04-29 09:36 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shiloong admin 2024-04-16 10:00:14 UTC
(on behalf of Huai-Yuan Liu <qq810974084@gmail.com>)

The memory allocation function ACPI_ALLOCATE_ZEROED does not guarantee a
successful allocation, but the subsequent code directly dereferences the
pointer that receives it, which may lead to null pointer dereference.

To fix this issue, a null pointer check should be added. If it is null, 
return exception code AE_NO_MEMORY.
Comment 1 Shiloong admin 2024-04-16 10:20:03 UTC
The bugfix has been accepted by upstream:
https://github.com/acpica/acpica/pull/946/commits/4d4547cf13cca820ff7e0f859ba83e1a610b9fd0