selinux/libsepol
Vit Mojzis 6b5626fd30 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 <vmojzis@redhat.com>
Acked-by: James Carter <jwcart2@gmail.com>
2024-08-14 08:27:23 -04:00
..
cil libsepol/cil: Check that sym_index is within bounds 2024-08-14 08:27:23 -04:00
fuzz libsepol/fuzz: handle empty and non kernel policies 2023-12-06 13:32:50 -05:00
include libsepol: rework permission enabled check 2024-06-14 09:10:49 -04:00
man Do not automatically install Russian translations 2023-08-16 13:33:47 -04:00
src libsepol/sepol_compute_sid: Do not destroy uninitialized context 2024-07-30 13:18:08 -04:00
tests libsepol/tests: Update the order of neverallow test results 2023-11-21 08:55:45 -05:00
utils libsepol/utils: improve wording 2022-07-06 15:57:24 -04:00
.gitignore libsepol: add policy utilities 2022-04-12 13:09:19 -04:00
LICENSE docs: provide a top level LICENSE file 2022-10-05 08:20:38 -04:00
Makefile
VERSION Release 3.7 2024-06-26 17:30:41 +02:00