anolis-cloud-kernel/drivers/acpi
Thomas Weißschuh d969457e60 ACPI: sysfs: validate return type of _STR method
ANBZ: #12603

commit 4bb1e7d027 upstream.

Only buffer objects are valid return values of _STR.

If something else is returned description_show() will access invalid
memory.

Fixes: d1efe3c324 ("ACPI: Add new sysfs interface to export device description")
Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240709-acpi-sysfs-groups-v2-1-058ab0667fa8@weissschuh.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Fixes: CVE-2024-49860
Signed-off-by: Xiao Long <xiaolong@openanolis.org>
Signed-off-by: Kun(llfl) <llfl@linux.alibaba.com>
Reviewed-by: Xunlei Pang <xlpang@linux.alibaba.com>
Link: https://gitee.com/anolis/cloud-kernel/pulls/4275
2025-07-04 07:16:23 +00:00
..
acpica ACPICA: debugger: check status of acpi_evaluate_object() in acpi_db_walk_for_fields() 2024-08-12 11:28:30 +00:00
apei ACPI: APEI: Better fix to avoid spamming the console with old error logs 2025-01-02 05:54:42 +00:00
arm64 perf/smmuv3: Enable HiSilicon Erratum quirk 2024-12-19 04:48:20 +00:00
dptf ACPI: DPTF: Fix reading of attributes 2021-08-04 12:46:39 +02:00
nfit ACPI: NFIT: fix a potential deadlock during NFIT teardown 2023-03-31 03:15:38 +00:00
numa ACPI: HMAT: Fix initiator registration for single-initiator systems 2024-08-12 11:28:30 +00:00
pmic ACPI: PMIC: Fix intel_pmic_regs_handler() read accesses 2021-11-18 14:04:26 +01:00
x86 ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win 2022-01-27 10:54:13 +01:00
Kconfig anolis: sw64: topology: support initializing topology via DT or ACPI 2024-11-18 07:24:46 +00:00
Makefile ACPI: PRM: implement OperationRegion handler for the PlatformRtMechanism subtype 2023-02-22 09:50:11 +00:00
ac.c ACPI: AC: Quirk GK45 to skip reading _PSR 2021-11-18 14:04:00 +01:00
acpi_adxl.c
acpi_amba.c ACPI: AMBA: Fix resource name in /proc/iomem 2021-07-20 16:05:49 +02:00
acpi_apd.c anolis: sw64: clk: further fix the clock frequency of SPI and I2C 2024-11-18 07:24:46 +00:00
acpi_cmos_rtc.c ACPI: cmos_rtc: Remove leftover ACPI_MODULE_NAME() 2020-09-25 18:25:51 +02:00
acpi_configfs.c ACPI: configfs: add missing check after configfs_register_default_group() 2021-03-04 11:38:22 +01:00
acpi_dbg.c ACPI: debug: don't allow debugging when ACPI is disabled 2020-10-16 17:58:52 +02:00
acpi_extlog.c ACPI: extlog: fix NULL pointer dereference check 2024-08-12 11:28:30 +00:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c ACPI: LPIT: Avoid u32 multiplication overflow 2024-08-12 11:28:30 +00:00
acpi_lpss.c drm next for 5.10-rc1 2020-10-15 10:46:16 -07:00
acpi_memhotplug.c ACPI: memhotplug: use a single static memory group for a single memory device 2022-08-01 12:21:24 +00:00
acpi_pad.c anolis: ACPI, x86: Add Zhaoxin processors support for NONSTOP TSC 2023-01-18 08:07:05 +00:00
acpi_pcc.c ACPI: PCC: Implement OperationRegion handler for the PCC Type 3 subtype 2022-09-01 19:34:58 +08:00
acpi_platform.c ACPI: platform: Remove ACPI_MODULE_NAME() 2020-09-25 18:25:51 +02:00
acpi_pnp.c ACPI: PNP: compare the string length in the matching_id() 2020-12-30 11:54:06 +01:00
acpi_processor.c anolis: ACPI: add detection for core die topology 2022-08-02 12:58:08 +08:00
acpi_tad.c ACPI: Use DEVICE_ATTR_<RW|RO|WO> macros 2021-07-14 16:56:12 +02:00
acpi_video.c ACPI: video: Add quirk for the Dell Vostro 3350 2021-07-20 16:05:49 +02:00
acpi_watchdog.c
battery.c ACPI: battery: Add device HID and quirk for Microsoft Surface Go 3 2022-03-28 09:57:10 +02:00
bgrt.c ACPI: bgrt: Fix CFI violation 2021-07-14 16:56:12 +02:00
blacklist.c
bus.c anolis: sw64: irqchip: support ACPI-based interrupt controller initialization 2024-04-19 03:08:46 +00:00
button.c ACPI: button: Add DMI quirk for Medion Akoya E2228T 2020-11-09 19:29:41 +01:00
container.c ACPI: container: Remove leftover ACPICA debug functionality 2020-09-25 18:25:51 +02:00
cppc_acpi.c ACPI: CPPC: Do not prevent CPPC from working in the future 2024-08-12 11:28:30 +00:00
custom_method.c ACPI: custom_method: fix a possible memory leak 2021-05-11 14:47:12 +02:00
debugfs.c ACPI: debugfs: Remove dead ACPICA debug code 2020-09-25 18:25:51 +02:00
device_pm.c ACPI: Check StorageD3Enable _DSD property in ACPI code 2024-08-12 11:28:30 +00:00
device_sysfs.c ACPI: sysfs: validate return type of _STR method 2025-07-04 07:16:23 +00:00
dock.c ACPI: Use DEVICE_ATTR_<RW|RO|WO> macros 2021-07-14 16:56:12 +02:00
ec.c ACPI: EC: Fix oops when removing custom query handlers 2024-08-12 11:28:30 +00:00
ec_sys.c
event.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
evged.c ACPI: GED: fix -Wformat 2020-11-09 19:25:20 +01:00
fan.c ACPI: PM / fan: Put fan device IDs into separate header file 2021-07-14 16:56:11 +02:00
fan.h ACPI: PM / fan: Put fan device IDs into separate header file 2021-07-14 16:56:11 +02:00
glue.c
hed.c
internal.h ACPI: EC: Rework flushing of EC work while suspended to idle 2022-01-27 10:53:52 +01:00
ioapic.c
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2024-08-12 11:28:30 +00:00
nvs.c
osi.c
osl.c ACPI: OSL: Make ACPICA use logical addresses of GPE blocks 2020-09-11 16:45:00 +02:00
pci_irq.c anolis: irqchip/ACPI: Introduce ACPI_IRQ_MODEL_LPIC for LoongArch 2023-07-27 01:36:36 +00:00
pci_link.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
pci_mcfg.c anolis: sw64: pci: rename some functions 2024-09-06 17:11:52 +08:00
pci_root.c ACPI: APEI: explicit init HEST and GHES in apci_init 2022-08-01 12:22:20 +00:00
pci_slot.c ACPI: PCI: Remove unused ACPICA debug code 2020-09-25 18:25:51 +02:00
power.c ACPI: Use DEVICE_ATTR_<RW|RO|WO> macros 2021-07-14 16:56:12 +02:00
pptt.c anolis: arm64: refactor kunpeng mpam frame 2024-12-20 04:05:11 +00:00
prmt.c ACPI: PRM: Check whether EFI runtime is available 2023-03-02 09:28:52 +00:00
proc.c ACPI: proc: Remove dead ACPICA debug code 2020-09-25 18:25:51 +02:00
processor_core.c openEuler: ACPI / processor: Add helper to convert acpi_id to a phys_cpuid 2022-08-01 11:16:27 +00:00
processor_driver.c
processor_idle.c ACPI: processor_idle: Fix memory leak in acpi_processor_power_exit() 2024-08-12 11:28:30 +00:00
processor_pdc.c
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2024-08-12 11:28:30 +00:00
processor_thermal.c ACPI: processor: Remove freq Qos request for all CPUs 2024-08-12 11:28:30 +00:00
processor_throttling.c
property.c acpi: property: Let args be NULL in __acpi_node_get_property_reference 2024-08-12 11:28:30 +00:00
reboot.c ACPI: reboot: Avoid racing after writing to ACPI RESET_REG 2020-10-16 18:04:52 +02:00
resource.c Revert "ACPI: resources: Add checks for ACPI IRQ override" 2021-08-04 12:46:39 +02:00
sbs.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
sbshc.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
sbshc.h ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00
scan.c ACPI: scan: Create platform device for BCM4752 and LNV4752 ACPI nodes 2022-01-27 10:54:00 +01:00
sleep.c ACPI: PM: Block ASUS B1400CEAE from suspend to idle by default 2022-06-09 10:20:54 +02:00
sleep.h
spcr.c
sysfs.c ACPI: sysfs: Enable ACPI sysfs support for CCEL records 2024-12-25 09:52:20 +00:00
tables.c memblock: make memblock_find_in_range method private 2024-07-10 01:38:34 +00:00
thermal.c ACPI: thermal: drop an always true check 2024-08-12 11:28:30 +00:00
tiny-power-button.c ACPI: tiny-power-button: Remove dead ACPICA debug code 2020-09-25 18:25:51 +02:00
utils.c ACPI: utils: remove unreachable breaks 2020-10-22 18:58:26 +02:00
video_detect.c ACPI: video: Force backlight native for Clevo NL5xRU and NL5xNU 2022-03-28 09:57:10 +02:00
wakeup.c ACPI: Fix whitespace inconsistencies 2020-11-09 19:08:06 +01:00