Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
hierarchy.c:638:8: runtime error: applying zero offset to null pointer
    #0 0x60e6a7 in hierarchy_add_role_callback /home/christian/Coding/workspaces/selinux_userland/libsepol/src/hierarchy.c:638:8
    SELinuxProject#1 0x607201 in hashtab_map /home/christian/Coding/workspaces/selinux_userland/libsepol/src/hashtab.c:234:10
    SELinuxProject#2 0x60c823 in hierarchy_add_bounds /home/christian/Coding/workspaces/selinux_userland/libsepol/src/hierarchy.c:653:7
    SELinuxProject#3 0x60fbf5 in hierarchy_check_constraints /home/christian/Coding/workspaces/selinux_userland/libsepol/src/hierarchy.c:674:7
    SELinuxProject#4 0x557023 in LLVMFuzzerTestOneInput /home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer.c:115:6
    SELinuxProject#5 0x45cf31 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*, unsigned long) (/home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer+0x45cf31)
    SELinuxProject#6 0x45e546 in fuzzer::Fuzzer::ReadAndExecuteSeedCorpora(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) (/home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer+0x45e546)
    SELinuxProject#7 0x45e9d9 in fuzzer::Fuzzer::Loop(std::__Fuzzer::vector<fuzzer::SizedFile, fuzzer::fuzzer_allocator<fuzzer::SizedFile> >&) (/home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer+0x45e9d9)
    SELinuxProject#8 0x44cfc6 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char const*, unsigned long)) (/home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer+0x44cfc6)
    SELinuxProject#9 0x476ee2 in main (/home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer+0x476ee2)
    SELinuxProject#10 0x7fdbc2259d09 in __libc_start_main csu/../csu/libc-start.c:308:16
    SELinuxProject#11 0x4216f9 in _start (/home/christian/Coding/workspaces/selinux_userland/checkpolicy/checkmodule-fuzzer+0x4216f9)

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
  • Loading branch information
cgzones committed Jun 1, 2021
1 parent 4943131 commit 7b55c94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libsepol/src/hierarchy.c
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ int bounds_check_users(sepol_handle_t *handle, policydb_t *p)
prefix##_datum_t *parent; \
char *parent_name, *datum_name, *tmp; \
\
if (!datum->bounds) { \
if (p->p_##prefix##_val_to_name && !datum->bounds) { \
datum_name = p->p_##prefix##_val_to_name[datum->s.value - 1]; \
\
tmp = strrchr(datum_name, '.'); \
Expand Down

0 comments on commit 7b55c94

Please sign in to comment.