ACPI: LPIT: Avoid u32 multiplication overflow
stable inclusion from stable-v4.19.306 commit 647d1d50c31e60ef9ccb9756a8fdf863329f7aee category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I970CO CVE: NA -------------------------------- [ Upstream commit 56d2eeda87995245300836ee4dbd13b002311782 ] In lpit_update_residency() there is a possibility of overflow in multiplication, if tsc_khz is large enough (> UINT_MAX/1000). Change multiplication to mul_u32_u32(). Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: eeb2d80d ("ACPI / LPIT: Add Low Power Idle Table (LPIT) support") Signed-off-by:Nikita Kiryushin <kiryushin@ancud.ru> Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yongqiang Liu <liuyongqiang13@huawei.com>
Loading
Please sign in to comment