Skip to content
Commit e4ae95ea authored by Raju Rangoju's avatar Raju Rangoju Committed by Zeng Heng
Browse files

ACPICA: Revert "ACPICA: avoid Info: mapping multiple BARs. Your kernel is fine."

stable inclusion
from stable-v4.19.317
commit 435ecc978c3d5d0c4e172ec5b956dc1904061d98
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAD09L
CVE: CVE-2024-40984

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=435ecc978c3d5d0c4e172ec5b956dc1904061d98

--------------------------------

[ Upstream commit a83e1385b780d41307433ddbc86e3c528db031f0 ]

Undo the modifications made in commit d410ee51 ("ACPICA: avoid
"Info: mapping multiple BARs. Your kernel is fine.""). The initial
purpose of this commit was to stop memory mappings for operation
regions from overlapping page boundaries, as it can trigger warnings
if different page attributes are present.

However, it was found that when this situation arises, mapping
continues until the boundary's end, but there is still an attempt to
read/write the entire length of the map, leading to a NULL pointer
deference. For example, if a four-byte mapping request is made but
only one byte is mapped because it hits the current page boundary's
end, a four-byte read/write attempt is still made, resulting in a NULL
pointer deference.

Instead, map the entire length, as the ACPI specification does not
mandate that it must be within the same page boundary. It is
permissible for it to be mapped across different regions.

Link: https://github.com/acpica/acpica/pull/954
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218849


Fixes: d410ee51 ("ACPICA: avoid "Info: mapping multiple BARs. Your kernel is fine."")
Co-developed-by: default avatarSanath S <Sanath.S@amd.com>
Signed-off-by: default avatarSanath S <Sanath.S@amd.com>
Signed-off-by: default avatarRaju Rangoju <Raju.Rangoju@amd.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarZeng Heng <zengheng4@huawei.com>
parent 1400673e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment