summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorZhenghang Xiao <kipreyyy@gmail.com>2026-05-30 21:45:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-06-05 17:20:51 +0200
commit07ebe87915d8accdaba20c4f88c5ae430fe62fbb (patch)
tree7ee945410c34ff7879be453678c38a708add9cba /scripts
parent5401fb4fe10fac6134c308495df18ed74aebb9c4 (diff)
misc: fastrpc: fix use-after-free race in fastrpc_map_create
fastrpc_map_lookup returns a raw pointer after releasing fl->lock. The caller fastrpc_map_create then calls fastrpc_map_get (kref_get_unless_zero) on this unprotected pointer. A concurrent MEM_UNMAP can free the map between the lock release and the kref operation, resulting in a use-after-free on the freed slab object. Restore the take_ref parameter to fastrpc_map_lookup so the reference is acquired atomically under fl->lock before the pointer is exposed to the caller. Fixes: 10df039834f8 ("misc: fastrpc: Skip reference for DMA handles") Cc: stable@vger.kernel.org Signed-off-by: Zhenghang Xiao <kipreyyy@gmail.com> Signed-off-by: Srinivas Kandagatla <srini@kernel.org> Link: https://patch.msgid.link/20260530204528.116920-5-srini@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions