Re: [PATCH] ACPI: SPCR: check if table->serial_port.access_width is too wide

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/24/21 11:10 AM, Rafael J. Wysocki wrote:
On Thu, Sep 16, 2021 at 9:50 PM Mark Langsdorf <mlangsdo@xxxxxxxxxx> wrote:
If table->serial_port.access_width is more than 29, it causes
undefined behavior when ACPI_ACCESS_BIT_WIDTH shifts it to
(1 << ((size) + 2)):

[    0.000000] UBSAN: Undefined behaviour in drivers/acpi/spcr.c:114:11
[    0.000000] shift exponent 102 is too large for 32-bit type 'int'

Test that serial_port.access_width is less than 30 and set it to 6
if it is not.

This consists of a Linux part and an ACPICA part (the changes in
actypes.h).  The ACPICA part needs to be submitted to the upstream
project before applying this.

Thanks, I wasn't sure of the procedure. I'll get the ACPICA part accepted and come back with the rest.

--Mark Langsdorf




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux