summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorIvan Hu <ivan.hu@canonical.com>2026-10-19 16:54:17 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-10-22 20:07:16 +0200
commitec696f34774db985841bac9a2df179c0040ef073 (patch)
treebebc07f21b442473df936a5c5af2dac706c96a86 /scripts/Makefile.thinlto
parent7be4bc52fd9e0e55dc9a2e0232b89427d2c4b614 (diff)
downloadlinux-ec696f34774db985841bac9a2df179c0040ef073.tar.gz
linux-ec696f34774db985841bac9a2df179c0040ef073.zip
ACPICA: Initialize parser_state.aml_end in acpi_install_method()
In AcpiInstallMethod(), the local ParserState is stack-allocated and only ParserState.Aml was initialized. Parser helpers called by this path read ParserState.AmlEnd for bounds checking: AcpiPsPeekOpcode() reads it before validating the first AML opcode, and AcpiPsGetNextPackageEnd() reads it indirectly via AcpiPsGetNextPackageLength(). The subsequent package-limit check also compares against ParserState.AmlEnd. Because AmlEnd was never set, these checks operated on an uninitialized value, which Coverity flagged as an uninitialized read (CID 1684785) and which could lead to incorrect parser bounds decisions. Coverity report: *** CID 1684785: Memory - illegal accesses (UNINIT) /src/acpica/source/components/namespace/nsxfname.c: 712 in AcpiInstallMethod() ParserState.Aml += AcpiPsGetOpcodeSize (Opcode); >>> CID 1684785: Memory - illegal accesses (UNINIT) >>> Using uninitialized value "ParserState.AmlEnd" when calling "AcpiPsGetNextPackageEnd". ParserState.PkgEnd = AcpiPsGetNextPackageEnd (&ParserState); Initialize ParserState.AmlEnd to the end of the table (Buffer + Table->Length) so the parser bounds checks operate on a valid limit. Link: https://github.com/open-acpica/acpica/commit/19429ef91ebfb2144c918038dce13e297b4ef051 Fixes: bdc357540129 ("ACPICA: add boundary checks in two places") Signed-off-by: Ivan Hu <ivan.hu@canonical.com> Signed-off-by: Maciej Wieczor-Retman <maciej.wieczor-retman@intel.com> Signed-off-by: Leonard Lausen <leonard@lausen.nl> [ rjw: Subject tweaks ] Link: https://patch.msgid.link/20261019145421.47181-2-leonard@lausen.nl Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions