Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsepol/cil: Check that sym_index is within bounds
Make sure sym_index is within the bounds of symtab array before using it to index the array. Fixes: Error: OVERRUN (CWE-119): libsepol-3.6/cil/src/cil_resolve_ast.c:3157: assignment: Assigning: "sym_index" = "CIL_SYM_UNKNOWN". libsepol-3.6/cil/src/cil_resolve_ast.c:3189: overrun-call: Overrunning callee's array of size 19 by passing argument "sym_index" (which evaluates to 20) in call to "cil_resolve_name". \# 3187| switch (curr->flavor) { \# 3188| case CIL_STRING: \# 3189|-> rc = cil_resolve_name(parent, curr->data, sym_index, db, &res_datum); \# 3190| if (rc != SEPOL_OK) { \# 3191| goto exit; Signed-off-by: Vit Mojzis <[email protected]>
- Loading branch information