Skip to contentSkip to conversation

CVE-2026-46022: misc: ibmasm: fix OOB MMIO read in ibmasm_handle_mouse_interrupt()

DISCUSSION Greg Kroah-Hartman 1 participant 1 message May 27

lore
Share & tools
lore
#0 lore raw

From: Greg Kroah-Hartman <[email protected]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

misc: ibmasm: fix OOB MMIO read in ibmasm_handle_mouse_interrupt()

ibmasm_handle_mouse_interrupt() performs an out-of-bounds MMIO read when the queue reader or writer index from hardware exceeds REMOTE_QUEUE_SIZE (60).

A compromised service processor can trigger this by writing an out-of-range value to the reader or writer MMIO register before asserting an interrupt. Since writer is re-read from hardware on every loop iteration, it can also be set to an out-of-range value after the loop has already started.

The root cause is that get_queue_reader() and get_queue_writer() return raw readl() values that are passed directly into get_queue_entry(), which computes:

queue_begin + reader * sizeof(struct remote_input)

with no bounds check. This unchecked MMIO address is then passed to memcpy_fromio(), reading 8 bytes from unintended device registers. For sufficiently large values the address falls outside the PCI BAR mapping entirely, triggering a machine check exception.

Fix by checking both indices against REMOTE_QUEUE_SIZE at the top of the loop body, before any call to get_queue_entry(). On an out-of-range value, reset the reader register to 0 via set_queue_reader() before breaking, so that normal queue operation can resume if the corrupted hardware state is transient.

The Linux kernel CVE team has assigned CVE-2026-46022 to this issue.

Affected and fixed versions
===========================

	Issue introduced in 2.6.13 with commit 278d72ae8803ffcd16070c95fe1d53f4466dc741 and fixed in 6.6.140 with commit fc7e9a74e32299d7e93e178ca482a0b59ef1595b
	Issue introduced in 2.6.13 with commit 278d72ae8803ffcd16070c95fe1d53f4466dc741 and fixed in 6.12.86 with commit 07c4f18b303106e6b24492c12b95d48a4b985841
	Issue introduced in 2.6.13 with commit 278d72ae8803ffcd16070c95fe1d53f4466dc741 and fixed in 6.18.27 with commit 22a16d3eafee92a165c756081587c95850127107
	Issue introduced in 2.6.13 with commit 278d72ae8803ffcd16070c95fe1d53f4466dc741 and fixed in 7.0.4 with commit 1ca75f6b74ec7f685464e5745ecfcf3a76d284e9
	Issue introduced in 2.6.13 with commit 278d72ae8803ffcd16070c95fe1d53f4466dc741 and fixed in 7.1-rc1 with commit 4b6e6ead556734bdc14024c5f837132b1e7a4b84

Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community.

Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at

	https://cve.org/CVERecord/?id=CVE-2026-46022

will be updated if fixes are backported, please check that for the most up to date information about this issue.

Affected files
==============

The file(s) affected by this issue are:
drivers/misc/ibmasm/remote.c

Mitigation
==========

The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits:

	https://git.kernel.org/stable/c/fc7e9a74e32299d7e93e178ca482a0b59ef1595b
	https://git.kernel.org/stable/c/07c4f18b303106e6b24492c12b95d48a4b985841
	https://git.kernel.org/stable/c/22a16d3eafee92a165c756081587c95850127107
	https://git.kernel.org/stable/c/1ca75f6b74ec7f685464e5745ecfcf3a76d284e9
	https://git.kernel.org/stable/c/4b6e6ead556734bdc14024c5f837132b1e7a4b84