summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorMark Langsdorf <mlangsdo@redhat.com>2022-01-05 11:47:14 -0600
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-01-11 16:39:14 +0100
commitee3fe99ff0a27108ac38d9766ac0e92f5ec35692 (patch)
tree04191cd3135a5fc1aee346d98e9f94c5d2890c89 /crypto
parentbca21755b9fc00dbe371994b53389eb5d70b8e72 (diff)
downloadlinux-stable-ee3fe99ff0a27108ac38d9766ac0e92f5ec35692.tar.gz
linux-stable-ee3fe99ff0a27108ac38d9766ac0e92f5ec35692.tar.bz2
linux-stable-ee3fe99ff0a27108ac38d9766ac0e92f5ec35692.zip
ACPI: SPCR: check if table->serial_port.access_width is too wide
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' Use the new ACPI_ACCESS_ defines to test that serial_port.access_width is less than 30 and set it to 6 if it is not. Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'crypto')
0 files changed, 0 insertions, 0 deletions