acrn-kernel/drivers/bus/mhi
Jeffrey Hugo a2cbb1a45a bus: mhi: host: Range check CHDBOFF and ERDBOFF
commit 6a0c637bfe upstream.

If the value read from the CHDBOFF and ERDBOFF registers is outside the
range of the MHI register space then an invalid address might be computed
which later causes a kernel panic.  Range check the read value to prevent
a crash due to bad data from the device.

Fixes: 6cd330ae76 ("bus: mhi: core: Add support for ringing channel/event ring doorbells")
Cc: stable@vger.kernel.org
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Link: https://lore.kernel.org/r/1679674384-27209-1-git-send-email-quic_jhugo@quicinc.com
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-11 23:03:05 +09:00
..
ep bus: mhi: ep: Change state_lock to mutex 2023-03-17 08:50:19 +01:00
host bus: mhi: host: Range check CHDBOFF and ERDBOFF 2023-05-11 23:03:05 +09:00
Kconfig bus: mhi: ep: Add support for registering MHI endpoint controllers 2022-04-26 13:17:40 +02:00
Makefile bus: mhi: ep: Add support for registering MHI endpoint controllers 2022-04-26 13:17:40 +02:00
common.h bus: mhi: ep: Add support for sending events to the host 2022-04-26 13:17:41 +02:00