Task #841 - libsepol-3.7-1.fc41/scan-results.err
back to task #841download
Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_binary.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_build_ast.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_copy_ast.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1131:4: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1129| goto exit; # 1130| } # 1131|-> curr = cil_create_and_add_avrule(curr, s4, t, p4); # 1132| } else { # 1133| struct cil_symtab_datum *s5, *s6, *ta, *tb; Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1153:5: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1151| curr = cil_create_and_add_avrule(curr, s5, tb, p4); # 1152| if (cil_datum_cardinality(s5) > 1) { # 1153|-> curr = cil_create_and_add_avrule(curr, s5, DATUM(db->othertype), p4); # 1154| } # 1155| } Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1161:4: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1159| /* Nothing else is needed */ # 1160| } else if (t2 == DATUM(db->othertype)) { # 1161|-> curr = cil_create_and_add_avrule(curr, s4, s3, p4); # 1162| } else { # 1163| struct cil_symtab_datum *s5, *s6, *tc, *td; Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1183:5: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1181| curr = cil_create_and_add_avrule(curr, s5, td, p4); # 1182| if (cil_datum_cardinality(s5) > 1) { # 1183|-> curr = cil_create_and_add_avrule(curr, s5, DATUM(db->othertype), p4); # 1184| } # 1185| } Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1201:4: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1199| goto exit; # 1200| } # 1201|-> curr = cil_create_and_add_avrule(curr, s4, t, p4); # 1202| } # 1203| } Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1271:3: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1269| goto exit; # 1270| } # 1271|-> curr = cil_create_and_add_avrule(curr, s5, DATUM(db->selftype), p4); # 1272| } else if (t1 != DATUM(db->selftype) && t2 == DATUM(db->selftype)) { # 1273| struct cil_symtab_datum *s7, *s8, *t8; Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1289:4: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1287| curr = cil_create_and_add_avrule(curr, s8, t8, p4); # 1288| if (cil_datum_cardinality(s8) > 1) { # 1289|-> curr = cil_create_and_add_avrule(curr, s8, DATUM(db->othertype), p4); # 1290| } # 1291| } else { Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_deny.c:1297:3: warning[deadcode.DeadStores]: Value stored to 'curr' is never read # 1295| goto exit; # 1296| } # 1297|-> curr = cil_create_and_add_avrule(curr, s4, t3, p4); # 1298| } # 1299| Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_find.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c: scope_hint: In function ‘cil_yy_create_buffer’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:1578:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.l:89:21: note: in expansion of macro ‘yylex’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:913:21: note: in expansion of macro ‘yylex’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:936:1: note: in expansion of macro ‘YY_DECL’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:960:18: note: in expansion of macro ‘yyensure_buffer_stack’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:960:18: note: in expansion of macro ‘yyensure_buffer_stack’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:1717:13: note: in expansion of macro ‘yyensure_buffer_stack’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:960:18: note: in expansion of macro ‘yyensure_buffer_stack’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:962:26: note: in expansion of macro ‘yy_create_buffer’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:1564:21: note: in expansion of macro ‘yy_create_buffer’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:1568:24: note: in expansion of macro ‘yyalloc’ libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c: scope_hint: In function ‘cil_yy_create_buffer’ # 1576| * we need to put in 2 end-of-buffer characters. # 1577| */ # 1578|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) ); # 1579| if ( ! b->yy_ch_buf ) # 1580| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); Error: CPPCHECK_WARNING (CWE-476): libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:1618: warning[nullPointer]: Possible null pointer dereference: b # 1616| # 1617| yy_flush_buffer( b ); # 1618|-> # 1619| b->yy_input_file = file; # 1620| b->yy_fill_buffer = 1; Error: CPPCHECK_WARNING (CWE-476): libsepol-3.7-build/libsepol-3.7/cil/src/cil_lexer.c:1619: warning[nullPointer]: Possible null pointer dereference: b # 1617| yy_flush_buffer( b ); # 1618| # 1619|-> b->yy_input_file = file; # 1620| b->yy_fill_buffer = 1; # 1621| Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_policy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_post.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_resolve_ast.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_resolve_ast.c:3136:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read # 3134| cil_list_for_each(item, call->args) { # 3135| struct cil_args * arg = item->data; # 3136|-> rc = cil_flavor_to_symtab_index(arg->flavor, ¶m_index); # 3137| if (param_index == sym_index) { # 3138| if (name == arg->param_str) { Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_symtab.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_tree.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_verify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/cil/src/cil_write_ast.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/assertion.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/avrule_block.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/avtab.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/conditional.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/context.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/ebitmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libsepol-3.7-build/libsepol-3.7/src/ebitmap.c: scope_hint: In function ‘ebitmap_read’ libsepol-3.7-build/libsepol-3.7/src/ebitmap.c:616:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘l’ # 614| l = n; # 615| } # 616|-> if (count && l->startbit + MAPSIZE != e->highbit) { # 617| ERR(NULL, "security: ebitmap: high bit %u has not the expected value %zu", # 618| e->highbit, l->startbit + MAPSIZE); Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/expand.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/hierarchy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/ibpkey_record.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/kernel_to_cil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/kernel_to_common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/kernel_to_conf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/link.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/src/link.c:2199:15: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from field 'global') # 2197| * block. This is currently supported by the compiler. # 2198| */ # 2199|-> for (block = pol->global->next; block != NULL; block = block->next) { # 2200| if (block->enabled == NULL) { # 2201| if (block->branch_list->next != NULL) { Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/mls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/module.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-122): libsepol-3.7-build/libsepol-3.7/src/module.c: scope_hint: In function ‘module_package_read_offsets’ libsepol-3.7-build/libsepol-3.7/src/module.c:444:36: warning[-Wanalyzer-out-of-bounds]: heap-based buffer over-read libsepol-3.7-build/libsepol-3.7/src/module.c:28: included_from: Included from here. libsepol-3.7-build/libsepol-3.7/src/private.h:27:25: note: in definition of macro ‘le32_to_cpu’ # └─────────────────┘ # ^ # 442| goto err; # 443| # 444|-> if (nsec && off[nsec] < off[nsec-1]) { # 445| ERR(file->handle, "offset greater than file size (at %u, " # 446| "offset %zu -> %zu", nsec, off[nsec - 1], Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/src/module.c:943:3: warning[deadcode.DeadStores]: Value stored to 'len' is never read # 941| offsets[i] = offsets[i - 1] + len; # 942| buf[i] = cpu_to_le32(offsets[i]); # 943|-> len = p->netfilter_contexts_len + sizeof(uint32_t); # 944| i++; # 945| } Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-476): libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c: scope_hint: In function ‘typealias_list_destroy’ libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c:359:36: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘typealias_lists’ # 357| uint32_t i; # 358| for (i = 0; i < typealias_lists_len; i++) { # 359|-> if (typealias_lists[i] != NULL) { # 360| list_destroy(&typealias_lists[i]); # 361| } Error: GCC_ANALYZER_WARNING (CWE-415): libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c: scope_hint: In function ‘constraint_expr_to_string’ libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c:1946:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘val2’ libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c:55: included_from: Included from here. libsepol-3.7-build/libsepol-3.7/src/debug.h:50:9: note: in expansion of macro ‘msg_write’ libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c:1865:33: note: in expansion of macro ‘ERR’ # 1944| free(new_val); # 1945| free(val1); # 1946|-> free(val2); # 1947| if (stack != NULL) { # 1948| while ((val1 = stack_pop(stack)) != NULL) { Error: CPPCHECK_WARNING (CWE-457): libsepol-3.7-build/libsepol-3.7/src/module_to_cil.c:2954: error[uninitvar]: Uninitialized variable: ocon # 2952| int ocon; # 2953| # 2954|-> static int (*const *ocon_funcs)(struct policydb *pdb, struct ocontext *ocon); # 2955| static int (*const ocon_selinux_funcs[OCON_NUM])(struct policydb *pdb, struct ocontext *ocon) = { # 2956| ocontext_selinux_isid_to_cil, Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/optimize.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/policydb.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/src/policydb.c:4286:8: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc' # 4284| if (p->policy_type == POLICY_MOD) { # 4285| /* Get the module name and version */ # 4286|-> if ((rc = next_entry(buf, fp, sizeof(uint32_t))) < 0) { # 4287| goto bad; # 4288| } Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/src/policydb.c:4294:8: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc' # 4292| goto bad; # 4293| # 4294|-> if ((rc = next_entry(buf, fp, sizeof(uint32_t))) < 0) { # 4295| goto bad; # 4296| } Error: CLANG_WARNING: libsepol-3.7-build/libsepol-3.7/src/policydb.c:4377:9: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc' # 4375| } # 4376| for (i = 0; i < info->sym_num; i++) { # 4377|-> if ((rc = next_entry(buf, fp, sizeof(uint32_t))) < 0) { # 4378| goto bad; # 4379| } Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/services.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-476): libsepol-3.7-build/libsepol-3.7/src/services.c:803: warning[nullPointer]: Possible null pointer dereference: p # 801| while (1) { # 802| p = *r_buf ? (*r_buf + reason_buf_used) : NULL; # 803|-> len = snprintf(p, reason_buf_len - reason_buf_used, # 804| "%s", buffers[x]); # 805| if (len < 0 || len >= reason_buf_len - reason_buf_used) { Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/sidtab.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-401): libsepol-3.7-build/libsepol-3.7/src/util.c: scope_hint: In function ‘tokenize’ libsepol-3.7-build/libsepol-3.7/src/util.c:297:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ # 295| # 296| for (items = 0; items < num_args && *buf_p != '\0'; items++) { # 297|-> arg = va_arg(ap, char **); # 298| # 299| /* Save the remainder of the string in arg */ Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/src/write.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): libsepol-3.7-build/libsepol-3.7/src/write.c:1828: warning[uninitvar]: Uninitialized variable: buf32 # 1826| for (i = 0; i < nel; i++) # 1827| buf32[i] = cpu_to_le32(avrule->xperms->perms[i]); # 1828|-> items = put_entry(buf32, sizeof(uint32_t), nel, fp); # 1829| if (items != nel) # 1830| return POLICYDB_ERROR; Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/utils/sepol_check_access.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/utils/sepol_compute_av.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/utils/sepol_compute_member.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/utils/sepol_compute_relabel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: libsepol-3.7-build/libsepol-3.7/utils/sepol_validate_transition.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.