mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging/rdma/hfi1: close shared context security hole
Driver does not verify userid for shared context assignments, allowing malicious user access. Reviewed by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Jareer H Abdel-Qader <jareer.h.abdel-qader@intel.com> Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f4d26d81ad
commit
07839049db
@ -948,6 +948,7 @@ static int find_shared_ctxt(struct file *fp,
|
||||
/* Skip ctxt if it doesn't match the requested one */
|
||||
if (memcmp(uctxt->uuid, uinfo->uuid,
|
||||
sizeof(uctxt->uuid)) ||
|
||||
uctxt->jkey != generate_jkey(current_uid()) ||
|
||||
uctxt->subctxt_id != uinfo->subctxt_id ||
|
||||
uctxt->subctxt_cnt != uinfo->subctxt_cnt)
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user