[Tee-dev] [PATCH] tee: shm: fix use-after-free via temporarily dropped reference

Volodymyr Babchuk vlad.babchuk at gmail.com
Mon May 7 07:54:02 PDT 2018


Hi Jens,

On 7 May 2018 at 12:58, Jens Wiklander <jens.wiklander at linaro.org> wrote:
> From: Jann Horn <jannh at google.com>
>
> Bump the file's refcount before moving the reference into the fd table,
> not afterwards. The old code could drop the file's refcount to zero for a
> short moment before calling get_file() via get_dma_buf().
>
> This code can only be triggered on ARM systems that use Linaro's OP-TEE.
>
> Fixes: 967c9cca2cc5 ("tee: generic TEE subsystem")
> Signed-off-by: Jann Horn <jannh at google.com>
> Signed-off-by: Jens Wiklander <jens.wiklander at linaro.org>
Reviewed-by: Volodymyr Babchuk <vlad.babchuk at gmail.com>

-- 
WBR Volodymyr Babchuk aka lorc [+380976646013]
mailto: vlad.babchuk at gmail.com



More information about the linux-arm-kernel mailing list