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

Skip to content
Commit 5235024c authored by Pratham Pratap's avatar Pratham Pratap Committed by Gerrit - the friendly Code Review server
Browse files

usb: f_fs: Prevent race & use after free scenario on epfile



In case of fast composition switch along with disconnect/connect
performed, there are chances that the process of ep_disable,
function_disable, epfile_release & ep0_release race between each
other causing use after free scenarios.
This is seen with epfile struct itself and also with the read_buffer
member variable as well.

This change is a squash of below commits.

(1c3b63b8d818) usb: f_fs: Avoid use-after-free of epfile.
(971a85773340) usb: f_fs: Fix use-after-free for epfile.
(a008a43c5cd8) usb: f_fs: Prevent race between ep0_release & reset_work.
(f7fbba49e4a8) usb: f_fs: Fix Double free from ffs_data_clear.

Change-Id: If3f69e1e25be810aa82931b65fa2506b2e9f33bd
Signed-off-by: default avatarPratham Pratap <prathampratap@codeaurora.org>
Signed-off-by: default avatarUdipto Goswami <quic_ugoswami@quicinc.com>
parent a4341e9d
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