mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 05:29:04 -04:00
soc: qcom: mem-buf: Limit the number of input ACL entries
The number of ACL entries is currently not sanitized, which can allow for unreasonably large ACL to be allocated for later processing. Allowing for this to happen doesn't make much sense, as there aren't any valid usecases that require a large ACL, so restrict the number of ACL entries to 16. Also, while we're here, fix up some of the error handling in a few places. Change-Id: I5d1371ed180608486bcde1e208a36782986313af Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
This commit is contained in:
parent
75455dfc54
commit
0d121e6dc3
2 changed files with 26 additions and 11 deletions
|
|
@ -31,6 +31,8 @@ enum mem_buf_mem_type {
|
|||
(MEM_BUF_PERM_FLAG_READ | MEM_BUF_PERM_FLAG_WRITE |\
|
||||
MEM_BUF_PERM_FLAG_EXEC)
|
||||
|
||||
#define MEM_BUF_MAX_NR_ACL_ENTS 16
|
||||
|
||||
/**
|
||||
* struct acl_entry: Represents the access control permissions for a VMID.
|
||||
* @vmid: The mem-buf VMID specifier associated with the VMID that will access
|
||||
|
|
|
|||
Loading…
Reference in a new issue