]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xen/acpi: off by one in read_acpi_id()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 29 Mar 2018 09:01:53 +0000 (12:01 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:50:42 +0000 (07:50 +0200)
commitf22984237aa3d433a16317c4253ee951d3aab2ba
treeea851a33bfc048dfb1b4c8eacc3a6571bde675b0
parent34f0516b709826c9210ad7e662a47fbef32ce3a1
xen/acpi: off by one in read_acpi_id()

[ Upstream commit c37a3c94775855567b90f91775b9691e10bd2806 ]

If acpi_id is == nr_acpi_bits, then we access one element beyond the end
of the acpi_psd[] array or we set one bit beyond the end of the bit map
when we do __set_bit(acpi_id, acpi_id_present);

Fixes: 59a568029181 ("xen/acpi-processor: C and P-state driver that uploads said data to hypervisor.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/xen/xen-acpi-processor.c