Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Free the allocated avrule in define_te_avtab_xperms_helper() on failures. Also free the target classes ebitmap on allocation failure. Direct leak of 136 byte(s) in 1 object(s) allocated from: #0 0x49bb5d in __interceptor_malloc (./checkpolicy/checkpolicy+0x49bb5d) SELinuxProject#1 0x4e6eea in define_te_avtab_xperms_helper ./checkpolicy/policy_define.c:2041:24 SELinuxProject#2 0x4e6eea in define_te_avtab_extended_perms ./checkpolicy/policy_define.c:2487:6 SELinuxProject#3 0x4cef0b in yyparse ./checkpolicy/policy_parse.y:494:30 SELinuxProject#4 0x4e0575 in read_source_policy ./checkpolicy/parse_util.c:63:6 SELinuxProject#5 0x4ff121 in main ./checkpolicy/checkpolicy.c:616:7 SELinuxProject#6 0x7fe31628b7ec in __libc_start_main csu/../csu/libc-start.c:332:16 Indirect leak of 32 byte(s) in 1 object(s) allocated from: #0 0x4877b4 in strdup (./checkpolicy/checkpolicy+0x4877b4) SELinuxProject#1 0x4e6fa7 in define_te_avtab_xperms_helper ./checkpolicy/policy_define.c:2051:28 SELinuxProject#2 0x4e6fa7 in define_te_avtab_extended_perms ./checkpolicy/policy_define.c:2487:6 SELinuxProject#3 0x4cef0b in yyparse ./checkpolicy/policy_parse.y:494:30 SELinuxProject#4 0x4e0575 in read_source_policy ./checkpolicy/parse_util.c:63:6 SELinuxProject#5 0x4ff121 in main ./checkpolicy/checkpolicy.c:616:7 SELinuxProject#6 0x7fe31628b7ec in __libc_start_main csu/../csu/libc-start.c:332:16 Indirect leak of 24 byte(s) in 1 object(s) allocated from: #0 0x49bb5d in __interceptor_malloc (./checkpolicy/checkpolicy+0x49bb5d) SELinuxProject#1 0x50f2fa in ebitmap_set_bit ./libsepol/src/ebitmap.c:346:27 SELinuxProject#2 0x4eb632 in set_types ./checkpolicy/policy_define.c SELinuxProject#3 0x4e7055 in define_te_avtab_xperms_helper ./checkpolicy/policy_define.c:2059:7 SELinuxProject#4 0x4e7055 in define_te_avtab_extended_perms ./checkpolicy/policy_define.c:2487:6 SELinuxProject#5 0x4cef0b in yyparse ./checkpolicy/policy_parse.y:494:30 SELinuxProject#6 0x4e0575 in read_source_policy ./checkpolicy/parse_util.c:63:6 SELinuxProject#7 0x4ff121 in main ./checkpolicy/checkpolicy.c:616:7 SELinuxProject#8 0x7fe31628b7ec in __libc_start_main csu/../csu/libc-start.c:332:16 Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
- Loading branch information