mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
msm: ADSPRPC: Restrict untrusted applications from attaching to GuestOS
Untrusted application can attach to guestOS and staticPD if it can somehow make INIT IOCTL call with ATTACH flag. This is a potential security issue as the untrusted application can crash guestOS or staticPD. Restrict attach to guestOS or staticPD request if request is being made using non-secure device node. Change-Id: I322c7b242fd0baaf1c1bce2d83b992fecb0ca593 Acked-by: Ekansh Gupta <ekangupt@qti.qualcomm.com> Signed-off-by: Vamsi Krishna Gattupalli <quic_vgattupa@quicinc.com>
This commit is contained in:
parent
50e706ca69
commit
ccb839ea48
1 changed files with 13 additions and 0 deletions
|
|
@ -3637,6 +3637,12 @@ static int fastrpc_init_attach_process(struct fastrpc_file *fl,
|
|||
remote_arg_t ra[1];
|
||||
struct fastrpc_ioctl_invoke_async ioctl;
|
||||
|
||||
if (fl->dev_minor == MINOR_NUM_DEV) {
|
||||
err = -ECONNREFUSED;
|
||||
ADSPRPC_ERR(
|
||||
"untrusted app trying to attach to privileged DSP PD\n");
|
||||
return err;
|
||||
}
|
||||
/*
|
||||
* Prepare remote arguments for creating thread group
|
||||
* in guestOS/staticPD on the remote subsystem.
|
||||
|
|
@ -3911,6 +3917,13 @@ static int fastrpc_init_create_static_process(struct fastrpc_file *fl,
|
|||
unsigned int pageslen;
|
||||
} inbuf;
|
||||
|
||||
if (fl->dev_minor == MINOR_NUM_DEV) {
|
||||
err = -ECONNREFUSED;
|
||||
ADSPRPC_ERR(
|
||||
"untrusted app trying to attach to audio PD\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
if (!init->filelen)
|
||||
goto bail;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue