]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ACPI: SPCR: Check for table version when using precise baudrate
authorPunit Agrawal <punit.agrawal@oss.qualcomm.com>
Fri, 24 Oct 2025 12:31:25 +0000 (13:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:37:48 +0000 (15:37 -0500)
commit7fa9e0ee49170bf66d0c114b8029e62231cb04fa
treec14525483b70489cbba85185b95f585226053caa
parent8c845ed3cd13c45fdf6fe0264958243567c4452f
ACPI: SPCR: Check for table version when using precise baudrate

commit 543d35004007a06ef247acf2fc55efa8388aa741 upstream.

Commit 4d330fe54145 ("ACPI: SPCR: Support Precise Baud Rate field")
added support to use the precise baud rate available since SPCR 1.09
(revision 4) but failed to check the version of the table provided by
the firmware.

Accessing an older version of SPCR table causes accesses beyond the
end of the table and can lead to garbage data to be used for the baud
rate.

Check the version of the firmware provided SPCR to ensure that the
precise baudrate is vaild before using it.

Fixes: 4d330fe54145 ("ACPI: SPCR: Support Precise Baud Rate field")
Signed-off-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
Link: https://patch.msgid.link/20251024123125.1081612-1-punit.agrawal@oss.qualcomm.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/acpi/spcr.c