Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 971a8577 authored by Pratham Pratap's avatar Pratham Pratap
Browse files

usb: f_fs: Fix use-after-free for epfile



Commit 1c3b63b8 ("usb: f_fs: Avoid use-after-free of
epfile") fixed use-after-free in ffs_func_eps_disable but
there is still a possiblilty of ffs_epfile_release going
ahead and freeing the buffer while ffs_func_eps_disable has
acquired the spin_lock and initialized local copy of epfile.
Since ffs_epfile_release doesn't have spin_lock protection
for freeing up the read buffer, fix this by putting it under
spin_lock protection as well.

Change-Id: I85b1a0aea88c0033fbeef4c5db5104caac211540
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
parent 336a29e7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment