selinux/checkpolicy
Christian Göttsche a0a342c37b checkpolicy: free extended permission memory
define_te_avtab_xperms_helper() allocates memory for the avrule, while
define_te_avtab_ioctl() does not transfer any ownership of it.
Free the affected memory.

    Direct leak of 272 byte(s) in 2 object(s) allocated from:
        #0 0x49bb8d in __interceptor_malloc (./checkpolicy/checkmodule+0x49bb8d)
        #1 0x4f379c in define_te_avtab_xperms_helper ./checkpolicy/policy_define.c:2047:24
        #2 0x4f379c in define_te_avtab_extended_perms ./checkpolicy/policy_define.c:2469:6
        #3 0x4cf417 in yyparse ./checkpolicy/policy_parse.y:494:30
        #4 0x4eaf35 in read_source_policy ./checkpolicy/parse_util.c:63:6
        #5 0x50cccd in main ./checkpolicy/checkmodule.c:278:7
        #6 0x7fbfa455ce49 in __libc_start_main csu/../csu/libc-start.c:314:16

    Direct leak of 32 byte(s) in 2 object(s) allocated from:
        #0 0x49bb8d in __interceptor_malloc (./checkpolicy/checkmodule+0x49bb8d)
        #1 0x4f4a38 in avrule_sort_ioctls ./checkpolicy/policy_define.c:1844:12
        #2 0x4f4a38 in avrule_ioctl_ranges ./checkpolicy/policy_define.c:2021:6
        #3 0x4f4a38 in define_te_avtab_ioctl ./checkpolicy/policy_define.c:2399:6
        #4 0x4f4a38 in define_te_avtab_extended_perms ./checkpolicy/policy_define.c:2475:7
        #5 0x4cf417 in yyparse ./checkpolicy/policy_parse.y:494:30
        #6 0x4eaf35 in read_source_policy ./checkpolicy/parse_util.c:63:6
        #7 0x50cccd in main ./checkpolicy/checkmodule.c:278:7
        #8 0x7fbfa455ce49 in __libc_start_main csu/../csu/libc-start.c:314:16

Reported-by: liwugang <liwugang@163.com>
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
2021-09-15 10:14:42 -04:00
..
ru checkpolicy: Minor tweaks to the names of the contributors to the manpages 2020-06-04 16:06:25 -04:00
test checkpolicy: avoid implicit conversion 2021-09-15 10:14:27 -04:00
.gitignore
COPYING
Makefile checkpolicy: drop -pipe compile option 2021-07-13 21:02:04 +02:00
VERSION Update VERSIONs and Python bindings version to 3.3-rc1 for release 2021-09-08 09:49:46 +02:00
checkmodule.8 checkpolicy: Minor tweaks to the names of the contributors to the manpages 2020-06-04 16:06:25 -04:00
checkmodule.c checkpolicy: misc checkmodule tweaks 2021-09-15 10:13:51 -04:00
checkpolicy.8 checkpolicy: Minor tweaks to the names of the contributors to the manpages 2020-06-04 16:06:25 -04:00
checkpolicy.c checkpolicy: misc checkpolicy tweaks 2021-09-15 10:13:54 -04:00
checkpolicy.h checkpolicy: remove unused te_assertions 2020-01-27 10:51:21 -05:00
module_compiler.c checkpolicy: mark read-only parameters in module compiler const 2021-09-15 10:13:58 -04:00
module_compiler.h checkpolicy: mark read-only parameters in module compiler const 2021-09-15 10:13:58 -04:00
parse_util.c checkpolicy: parse_util drop unused declaration 2021-07-13 21:02:09 +02:00
parse_util.h
policy_define.c checkpolicy: free extended permission memory 2021-09-15 10:14:42 -04:00
policy_define.h checkpolicy: Add support for ibendportcon labels 2017-05-23 16:20:55 -04:00
policy_parse.y checkpolicy: error out on parsing too big integers 2021-09-15 10:14:33 -04:00
policy_scan.l checkpolicy: print warning on source line overflow 2021-09-15 10:14:37 -04:00
queue.c checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00
queue.h checkpolicy,libselinux,libsepol,policycoreutils: Update my email address 2017-08-17 14:17:12 -04:00