misc: fastrpc: restrict user apps from sending kernel RPC messages
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 12 Feb 2021 19:26:58 +0000 (22:26 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:31 +0000 (17:06 +0100)
commit52feb58f9b5b078b5a39ed8ba8ab3b4546e16ff2
tree544d9d10cb6951a3593a4ae12fde3ff53faf9549
parent7ae2482c7042e2b4057f0b54f1c4cbac553daa75
misc: fastrpc: restrict user apps from sending kernel RPC messages

commit 20c40794eb85ea29852d7bc37c55713802a543d6 upstream.

Verify that user applications are not using the kernel RPC message
handle to restrict them from directly attaching to guest OS on the
remote subsystem. This is a port of CVE-2019-2308 fix.

Fixes: c68cfb718c8f ("misc: fastrpc: Add support for context Invoke method")
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Jonathan Marek <jonathan@marek.ca>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210212192658.3476137-1-dmitry.baryshkov@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c