]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
misc: fastrpc: Fix copy buffer page size
authorEkansh Gupta <quic_ekangupt@quicinc.com>
Fri, 10 Jan 2025 13:42:39 +0000 (13:42 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:41 +0000 (10:05 +0100)
commit24a79c6bc8de763f7c50f4f84f8b0c183bc25a51
tree80e4ca24040dce5f8df98026aaae7995ffe04435
parent67419ee2c52b3eaa1538fd204364ed3c34959435
misc: fastrpc: Fix copy buffer page size

commit e966eae72762ecfdbdb82627e2cda48845b9dd66 upstream.

For non-registered buffer, fastrpc driver copies the buffer and
pass it to the remote subsystem. There is a problem with current
implementation of page size calculation which is not considering
the offset in the calculation. This might lead to passing of
improper and out-of-bounds page size which could result in
memory issue. Calculate page start and page end using the offset
adjusted address instead of absolute address.

Fixes: 02b45b47fbe8 ("misc: fastrpc: fix remote page size calculation")
Cc: stable@kernel.org
Signed-off-by: Ekansh Gupta <quic_ekangupt@quicinc.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20250110134239.123603-4-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c