Commit 1352c61
committed
checkpolicy: free avrule on error
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 <[email protected]>1 parent 7f2e272 commit 1352c61
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2064 | 2064 | | |
2065 | 2065 | | |
2066 | 2066 | | |
2067 | | - | |
| 2067 | + | |
| 2068 | + | |
2068 | 2069 | | |
2069 | 2070 | | |
2070 | 2071 | | |
| |||
2125 | 2126 | | |
2126 | 2127 | | |
2127 | 2128 | | |
| 2129 | + | |
2128 | 2130 | | |
2129 | 2131 | | |
2130 | 2132 | | |
| |||
2164 | 2166 | | |
2165 | 2167 | | |
2166 | 2168 | | |
| 2169 | + | |
2167 | 2170 | | |
| 2171 | + | |
| 2172 | + | |
| 2173 | + | |
2168 | 2174 | | |
2169 | 2175 | | |
2170 | 2176 | | |
| |||
0 commit comments