Re: [PATCH] Input: applespi - validate ACPI property buffer length

From: Dmitry Torokhov

Date: Mon Oct 26 2026 - 21:04:27 EST


Hi Tristan,

On Tue, Oct 27, 2026 at 12:29:19AM +0000, Tristan Madani wrote:
> applespi_get_spi_settings() reads three ACPI _DSD properties
> (spiCSDelay, resetA2RUsec, resetRecUsec) as u64 values from their
> buffer pointers without verifying that the buffer is at least 8
> bytes long. If a firmware implementation provides a shorter buffer,
> the u64 dereference reads beyond the allocated object.
>
> Add buffer length checks before each u64 dereference.
>
> Fixes: 038b1a05eae6 ("Input: add Apple SPI keyboard and trackpad driver")
> Cc: stable@xxxxxxxxxxxxxxx

This makes sense but we somewhat trust system firmware so why is this
needed in stable?

> Signed-off-by: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>

Why is the difference with From: ?

Thanks.

--
Dmitry