linux/drivers/acpi
Rafael J. Wysocki 8f0b960a42 ACPI: utils: Fix error path in acpi_evaluate_reference()
If a pointer to an uninitialized struct acpi_handle_list is passed to
acpi_evaluate_reference() and it decides to bail out early, either
because acpi_evaluate_object() fails, or because it produces invalid
data, the handles pointer from the struct acpi_handle_list will be
passed to kfree() and if it is not NULL, the kernel will crash on an
attempt to free unallocated memory.

Address this by moving the "end" label in acpi_evaluate_reference() to
the end of the function, which is sufficient, because no cleanup is
needed in that case.

Fixes: 2e57d10a65 ("ACPI: utils: Dynamically determine acpi_handle_list size")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Woody Suwalski <terraluna977@gmail.com>
2023-12-07 21:38:21 +01:00
..
acpica
apei ACPI: APEI: Use ERST timeout for slow devices 2023-10-24 20:50:17 +02:00
arm64 amba: bus: balance firmware node reference counting 2023-10-17 13:37:35 -05:00
dptf
nfit Merge branch 'acpi-bus' 2023-10-26 15:04:49 +02:00
numa Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
pmic
riscv RISC-V: ACPI: RHCT: Add function to get CBO block sizes 2023-10-26 09:40:33 -07:00
x86 Merge branches 'acpi-ec', 'acpi-sysfs', 'acpi-misc' and 'acpi-uid' 2023-10-26 14:59:52 +02:00
ac.c ACPI: AC: Rename ACPI device from device to adev 2023-10-17 15:43:30 +02:00
acpi_adxl.c
acpi_apd.c
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c
acpi_ffh.c
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-10-03 21:12:22 +02:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c
acpi_lpss.c Merge branches 'acpi-utils', 'acpi-resource', 'acpi-property' and 'acpi-soc' 2023-10-26 14:55:04 +02:00
acpi_memhotplug.c
acpi_pad.c Many singleton patches against the MM code. The patch series which are 2023-11-02 19:38:47 -10:00
acpi_pcc.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c cpu-hotplug: Provide prototypes for arch CPU registration 2023-10-11 14:27:37 +02:00
acpi_tad.c
acpi_video.c ACPI: video: Use acpi_video_device for cooling-dev driver data 2023-11-27 21:05:03 +01:00
acpi_watchdog.c
battery.c ACPI: bus: Add context argument to acpi_dev_install_notify_handler() 2023-10-06 17:32:51 +02:00
bgrt.c
blacklist.c
bus.c Merge branch 'acpi-bus' 2023-10-26 15:04:49 +02:00
button.c
container.c
cppc_acpi.c
custom_method.c
debugfs.c
device_pm.c ACPI: PM: Add acpi_device_fix_up_power_children() function 2023-11-20 17:31:49 +01:00
device_sysfs.c Merge branches 'acpi-ec', 'acpi-sysfs', 'acpi-misc' and 'acpi-uid' 2023-10-26 14:59:52 +02:00
dock.c
ec_sys.c
ec.c ACPI: EC: Add quirk for HP 250 G7 Notebook PC 2023-10-24 21:53:14 +02:00
event.c
evged.c
fan_attr.c
fan_core.c
fan.h
glue.c
hed.c ACPI: bus: Add context argument to acpi_dev_install_notify_handler() 2023-10-06 17:32:51 +02:00
internal.h
ioapic.c
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-18 13:11:04 +02:00
Kconfig cxl for v6.7 2023-11-04 16:20:36 -10:00
Makefile
nvs.c
osi.c ACPI: OSI: refactor deprecated strncpy() 2023-09-21 20:55:43 +02:00
osl.c asm-generic updates for v6.7 2023-11-01 15:28:33 -10:00
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c ACPI: PCI: Switch to use acpi_evaluate_dsm_typed() 2023-10-03 15:46:14 +02:00
pci_slot.c
pfr_telemetry.c
pfr_update.c
platform_profile.c
power.c
pptt.c
prmt.c ACPI: PRM: Annotate struct prm_module_info with __counted_by 2023-10-03 21:24:10 +02:00
proc.c
processor_core.c arm64, irqchip/gic-v3, ACPI: Move MADT GICC enabled check into a helper 2023-10-24 15:12:09 +01:00
processor_driver.c
processor_idle.c ACPI: processor_idle: use raw_safe_halt() in acpi_idle_play_dead() 2023-11-20 17:26:20 +01:00
processor_pdc.c ACPI: processor: Fix uninitialized access of buf in acpi_set_pdc_bits() 2023-09-18 12:16:16 +02:00
processor_perflib.c
processor_thermal.c
processor_throttling.c
property.c ACPI: property: Document the _DSD data buffer GUID 2023-10-03 15:57:05 +02:00
reboot.c
resource.c ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA 2023-11-20 17:43:59 +01:00
sbs.c
sbshc.c
sbshc.h
scan.c iommu: Avoid more races around device probe 2023-11-27 10:53:55 +01:00
sleep.c
sleep.h
spcr.c
sysfs.c
tables.c acpi: Move common tables helper functions to common lib 2023-10-27 20:48:03 -07:00
thermal.c ACPI fix for 6.7-rc1 2023-11-04 07:54:21 -10:00
tiny-power-button.c
utils.c ACPI: utils: Fix error path in acpi_evaluate_reference() 2023-12-07 21:38:21 +01:00
video_detect.c ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 2023-10-03 20:33:58 +02:00
viot.c
wakeup.c