linux-stable/drivers/acpi/acpica
Nikita Kiryushin e8ed357a6f ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields()
[ Upstream commit 40e2710860 ]

ACPICA commit 9061cd9aa131205657c811a52a9f8325a040c6c9

Errors in acpi_evaluate_object() can lead to incorrect state of buffer.

This can lead to access to data in previously ACPI_FREEd buffer and
secondary ACPI_FREE to the same buffer later.

Handle errors in acpi_evaluate_object the same way it is done earlier
with acpi_ns_handle_to_pathname.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Link: https://github.com/acpica/acpica/commit/9061cd9a
Fixes: 5fd033288a ("ACPICA: debugger: add command to dump all fields of particular subtype")
Signed-off-by: Nikita Kiryushin <kiryushin@ancud.ru>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 12:59:15 +02:00
..
acapps.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
accommon.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acconvert.h ACPICA: ASL-ASL+ converter: make root file a parameter for cv_init_file_tree 2020-02-16 10:19:51 +01:00
acdebug.h ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
acdispat.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acevents.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acglobal.h ACPICA: Avoid evaluating methods too early during system resume 2021-11-18 14:03:56 +01:00
achware.h ACPICA: Introduce special struct type for GPE register addresses 2020-09-04 19:34:15 +02:00
acinterp.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
aclocal.h ACPICA: Introduce special struct type for GPE register addresses 2020-09-04 19:34:15 +02:00
acmacros.h ACPICA: ASL-ASL+ converter: make root file a parameter for cv_init_file_tree 2020-02-16 10:19:51 +01:00
acnamesp.h ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
acobject.h ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-03-11 14:17:21 +01:00
acopcode.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acparser.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acpredef.h ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
acresrc.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acstruct.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
actables.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
acutils.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
amlcode.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
amlresrc.h ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dbcmds.c
dbconvert.c ACPICA: debugger: remove leading whitespaces when converting a string to a buffer 2019-10-28 22:12:46 +01:00
dbdisply.c ACPICA: iASL: add new OperationRegion subtype keyword PlatformRtMechanism 2020-06-05 13:34:23 +02:00
dbexec.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbfileio.c ACPICA: make acpi_load_table() return table index 2019-10-28 22:12:46 +01:00
dbhistry.c ACPICA: Move acpi_gbl_next_cmd_num definition to acglobal.h 2020-05-09 10:55:53 +02:00
dbinput.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbmethod.c ACPICA: Debugger: Add a new command: "ALL <NameSeg>" 2020-10-08 18:03:55 +02:00
dbnames.c ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields() 2024-04-13 12:59:15 +02:00
dbobject.c ACPICA: Results from Clang 2019-10-28 22:12:46 +01:00
dbstats.c ACPICA: Fully deploy ACPI_PRINTF_LIKE macro 2019-08-21 00:00:37 +02:00
dbtest.c ACPICA: Debugger: Fix possible fault with the "test objects" command 2019-02-18 11:21:10 +01:00
dbutils.c
dbxface.c ACPICA: acpiexec: remove redeclaration of acpi_gbl_db_opt_no_region_support 2020-03-30 14:52:32 +02:00
dsargs.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dscontrol.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsdebug.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsfield.c ACPICA: Dispatcher: add status checks 2020-05-09 10:55:54 +02:00
dsinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsmethod.c ACPICA: Fix error code path in acpi_ds_call_control_method() 2023-01-14 10:16:14 +01:00
dsmthdat.c
dsobject.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsopcode.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dspkginit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dsutils.c ACPICA: Remove defines that use deprecated flag 2018-12-13 22:40:51 +01:00
dswexec.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
dswload.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
dswload2.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
dswscope.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
dswstate.c ACPICA: Avoid undefined behavior: applying zero offset to null pointer 2023-05-30 12:57:48 +01:00
evevent.c Merge branch 'acpica' 2020-03-30 14:53:36 +02:00
evglock.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evgpe.c ACPICA: Introduce acpi_hw_gpe_read() and acpi_hw_gpe_write() 2020-09-04 19:34:15 +02:00
evgpeblk.c ACPICA: Introduce special struct type for GPE register addresses 2020-09-04 19:34:15 +02:00
evgpeinit.c ACPICA: Add support for using logical addresses of GPE blocks 2020-09-11 16:44:45 +02:00
evgpeutil.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evhandler.c ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-03-11 14:17:21 +01:00
evmisc.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evregion.c ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-03-11 14:17:21 +01:00
evrgnini.c ACPICA: Preserve memory opregion mappings 2020-07-27 12:29:02 +02:00
evsci.c
evxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evxfevnt.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
evxfgpe.c ACPICA: Allow acpi_any_gpe_status_set() to skip one GPE 2020-03-25 12:57:27 +01:00
evxfregn.c ACPICA: Fix race in generic_serial_bus (I2C) and GPIO op_region parameter handling 2021-03-11 14:17:21 +01:00
exconcat.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exconfig.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exconvrt.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
excreate.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exdebug.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exdump.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exfield.c ACPICA: Fix wrong interpretation of PCC address 2022-01-27 10:54:19 +01:00
exfldio.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exmisc.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exmutex.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exnames.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg1.c ACPICA: Executer: Fix the REFCLASS_REFOF case in acpi_ex_opcode_1A_0T_1R() 2022-01-27 10:54:19 +01:00
exoparg2.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg3.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exoparg6.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exprep.c ACPICA: Do not increment operation_region reference counts for field units 2020-07-27 14:55:42 +02:00
exregion.c ACPICA: Preserve memory opregion mappings 2020-07-27 12:29:02 +02:00
exresnte.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exresolv.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exresop.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exserial.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exstore.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exstoren.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exstorob.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exsystem.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
extrace.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
exutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwacpi.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwesleep.c ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5 2022-01-27 10:54:19 +01:00
hwgpe.c ACPICA: Add missing type casts in GPE register access code 2020-10-19 14:46:39 +02:00
hwpci.c
hwregs.c
hwsleep.c ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5 2022-01-27 10:54:19 +01:00
hwtimer.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwvalid.c ACPICA: Drop port I/O validation for some regions 2023-03-11 16:39:19 +01:00
hwxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
hwxfsleep.c ACPICA: Hardware: Do not flush CPU cache when entering S4 and S5 2022-01-27 10:54:19 +01:00
Makefile ACPI: Don't build ACPICA with '-Os' 2023-03-11 16:39:50 +01:00
nsaccess.c ACPICA: Always create namespace nodes using acpi_ns_create_node() 2021-03-30 14:31:54 +02:00
nsalloc.c ACPICA: Remove unnecessary semicolon 2020-10-08 18:03:56 +02:00
nsarguments.c ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
nsconvert.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsdump.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsdumpdv.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nseval.c ACPICA: remove legacy module-level code due to deprecation 2019-07-04 00:59:43 +02:00
nsinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsload.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsnames.c ACPICA: Fixes for acpiExec namespace init file 2020-03-30 14:52:33 +02:00
nsobject.c ACPICA: Namespace: remove address node from global list after method termination 2019-04-09 10:05:11 +02:00
nsparse.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nspredef.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsprepkg.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nsrepair.c ACPICA: nsrepair: handle cases without a return value correctly 2023-03-11 16:39:20 +01:00
nsrepair2.c Revert "ACPICA: Fix memory leak caused by _CID repair function" 2021-08-12 13:22:01 +02:00
nssearch.c
nsutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
nswalk.c ACPICA: Avoid walking the ACPI Namespace if it is not there 2022-04-08 14:40:31 +02:00
nsxfeval.c
nsxfname.c ACPICA: cast the result of the pointer difference to u32 2020-02-16 10:19:53 +01:00
nsxfobj.c ACPICA: Tree-wide: fix various typos and spelling mistakes 2020-10-08 18:03:55 +02:00
psargs.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psloop.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psobject.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psopcode.c ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer 2023-09-23 11:01:04 +02:00
psopinfo.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psparse.c ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
psscope.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
pstree.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
pswalk.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
psxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
rsaddr.c
rscalc.c
rscreate.c ACPICA: More Clang changes 2019-10-28 22:12:46 +01:00
rsdump.c
rsdumpinfo.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rsinfo.c
rsio.c
rsirq.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rslist.c
rsmemory.c
rsmisc.c
rsserial.c ACPI/ACPICA: Trivial: fix spelling mistakes and fix whitespace formatting 2019-02-24 21:12:01 +01:00
rsutils.c
rsxface.c ACPICA: Rename nameseg compare macro for clarity 2019-04-09 10:08:28 +02:00
tbdata.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbfadt.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbfind.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbinstal.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbprint.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbutils.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbxface.c ACPICA: Table Manager: Update comments in a function header 2020-02-16 10:19:52 +01:00
tbxfload.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
tbxfroot.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utaddress.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utalloc.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utascii.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utbuffer.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utcache.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utcopy.c ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage() 2023-01-14 10:15:21 +01:00
utdebug.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utdecode.c ACPICA: iASL: add new OperationRegion subtype keyword PlatformRtMechanism 2020-06-05 13:34:23 +02:00
utdelete.c ACPICA: Utilities: Avoid deleting the same object twice in a row 2022-01-27 10:54:18 +01:00
uterror.c ACPICA: Increase total number of possible Owner IDs 2019-08-21 00:00:36 +02:00
uteval.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utexcep.c
utglobal.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
uthex.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utids.c ACPICA: Replace one-element array with flexible-array 2020-07-27 14:55:42 +02:00
utinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utlock.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utmath.c
utmisc.c ACPICA: Rename nameseg compare macro for clarity 2019-04-09 10:08:28 +02:00
utmutex.c
utnonansi.c
utobject.c ACPICA: Fix a couple of typos 2020-02-16 10:19:53 +01:00
utosi.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utownerid.c ACPICA: Increase total number of possible Owner IDs 2019-08-21 00:00:36 +02:00
utpredef.c ACPICA: Add predefined names found in the SMBus sepcification 2020-10-08 18:03:55 +02:00
utprint.c ACPICA: utilities: fix sprintf() 2020-03-30 14:52:32 +02:00
utresdecode.c
utresrc.c
utstate.c
utstring.c ACPICA: Rename nameseg length macro/define for clarity 2019-04-09 11:24:48 +02:00
utstrsuppt.c ACPICA: iASL: Return exceptions for string-to-integer conversions 2020-10-08 18:03:55 +02:00
utstrtoul64.c
uttrack.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utuuid.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utxface.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utxferror.c ACPICA: Convert more ACPI errors to firmware errors 2019-01-15 18:04:02 +01:00
utxfinit.c ACPICA: All acpica: Update copyrights to 2020 Including tool signons. 2020-01-13 11:52:48 +01:00
utxfmutex.c