Module Name: src Committed By: riastradh Date: Sun Apr 12 01:12:03 UTC 2020
Modified Files: src/sys/dev/acpi: acpi_ec.c Log Message: Reject overly large widths, from mlelstv. We are returning an ACPI_INTEGER (= uint64_t), so it doesn't make sense to handle more than 64 bits. Apparently there are some ACPIs out there that ask for unreasonably large widths here. Just reject those requests, rather than writing past the caller's stack buffer. Previously we attempted to fix this by copying byte by byte as large as the caller asked, in order to avoid the undefined behaviour of shifting past the size of ACPI_INTEGER, but that just turned a shift (which might have been harmless on real machines) into a stack buffer overflow (!). ok msaitoh To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/dev/acpi/acpi_ec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.