error Python 3.6.8: /usr/bin/python3 Sat Oct 26 23:08:04 2019 A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred. /usr/sbin/aa-logprof in () 48 49 if profiledir: 50 apparmor.profile_dir = apparmor.get_full_path(profiledir) 51 if not os.path.isdir(apparmor.profile_dir): 52 raise apparmor.AppArmorException("%s is not a directory."%profiledir) 53 54 apparmor.loadincludes() 55 56 apparmor.do_logprof_pass(logmark) 57 apparmor = apparmor.do_logprof_pass = logmark = '' /usr/lib/python3/dist-packages/apparmor/aa.py in do_logprof_pass(logmark='', passno=0, log_pid={2701: [[2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', ''], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::r', 'r'}, '/var/lib/flatpak/app/org.gimp.GIMP/x86_64/stable...f/export/share/applications/org.gimp.GIMP.desktop', ''], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::r', 'r'}, '/var/lib/flatpak/app/org.gimp.GIMP/x86_64/stable...f/export/share/applications/org.gimp.GIMP.desktop', ''], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [2701, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}']], 2762: [[2762, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2762/uid_map', ''], [2762, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2762/setgroups', ''], [2762, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2762/gid_map', ''], [2762, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [2762, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', '']], 2826: [[2826, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2826/uid_map', ''], [2826, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2826/setgroups', ''], [2826, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2826/gid_map', ''], [2826, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [2826, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', '']], 2903: [[2903, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2903/uid_map', ''], [2903, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2903/setgroups', ''], [2903, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2903/gid_map', ''], [2903, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [2903, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', '']], 2957: [[2957, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2957/uid_map', ''], [2957, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2957/setgroups', ''], [2957, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/2957/gid_map', ''], [2957, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [2957, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', '']], 3024: [[3024, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/3024/uid_map', ''], [3024, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/3024/setgroups', ''], [3024, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/3024/gid_map', ''], [3024, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [3024, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', '']], 3568: [[3568, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/opt/local/lib/libassuan.so.0.8.3', ''], [3568, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::m', '::r', 'm', 'r'}, '/opt/local/lib/libassuan.so.0.8.3', ''], [3568, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/opt/local/lib/libgpg-error.so.0.24.3', ''], [3568, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::m', '::r', 'm', 'r'}, '/opt/local/lib/libgpg-error.so.0.24.3', ''], [3568, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [3568, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::m', '::r', 'm', 'r'}, '/opt/local/lib/libgcrypt.so.20.2.4', '']], 3589: [[3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/usr/share/drirc.d/00-mesa-defaults.conf', ''], [3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/usr/share/drirc.d/00-mesa-defaults.conf', ''], [3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/usr/share/drirc.d/00-mesa-defaults.conf', ''], [3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/usr/share/drirc.d/00-mesa-defaults.conf', ''], [3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/usr/share/drirc.d/00-mesa-defaults.conf', ''], [3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'::r', 'r'}, '/usr/share/libdrm/amdgpu.ids', ''], [3589, 'libreoffice-soffice', 'libreoffice-soffice', 'HINT', 'PERMITTING', {'a', 'r', 'w'}, '/home/yadav/.cache/mesa_shader_cache/index', '']], 3672: [[3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', ''], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::r', 'r'}, '/var/lib/flatpak/app/org.gimp.GIMP/x86_64/stable...f/export/share/applications/org.gimp.GIMP.desktop', ''], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::r', 'r'}, '/var/lib/flatpak/app/org.gimp.GIMP/x86_64/stable...f/export/share/applications/org.gimp.GIMP.desktop', ''], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'k'}, '/home/yadav/.mozilla/firefox/6pnaui5n.default-release/mediacapabilities/lock.mdb', ''], [3672, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', 'trace', '/usr/lib/firefox/firefox{,*[^s][^h]}'], ...], 4074: [[4074, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/4074/uid_map', ''], [4074, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/4074/setgroups', ''], [4074, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'a', 'w'}, '/proc/4074/gid_map', ''], [4074, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgcrypt.so.20.2.4', ''], [4074, '/usr/lib/firefox/firefox{,*[^s][^h]}', '/usr/lib/firefox/firefox{,*[^s][^h]}', 'HINT', 'PERMITTING', {'::m', 'm'}, '/opt/local/lib/libgpg-error.so.0.24.3', '']], ...}) 1814 #log[root] = handle_children('', '', log[root]) 1815 #print(log) 1816 for pid in sorted(profile_changes.keys()): 1817 set_process(pid, profile_changes[pid]) 1818 1819 log_dict = collapse_log() 1820 1821 ask_the_questions(log_dict) 1822 1823 finishing = False log_dict undefined global collapse_log = /usr/lib/python3/dist-packages/apparmor/aa.py in collapse_log() 2006 2007 ptrace = prelog[aamode][profile][hat]['ptrace'] 2008 for peer in ptrace.keys(): 2009 for access in ptrace[peer].keys(): 2010 ptrace_event = PtraceRule(access, peer, log_event=True) 2011 if not is_known_rule(aa[profile][hat], 'ptrace', ptrace_event): 2012 log_dict[aamode][profile][hat]['ptrace'].add(ptrace_event) 2013 2014 sig = prelog[aamode][profile][hat]['signal'] 2015 for peer in sig.keys(): global is_known_rule = global aa = defaultdict(,...rage.ProfileStorage object at 0x7f53c0b9cba8>})}) profile = '/usr/lib/firefox/firefox{,*[^s][^h]}' hat = '/usr/lib/firefox/firefox{,*[^s][^h]}' ptrace_event = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, /usr/lib/python3/dist-packages/apparmor/aa.py in is_known_rule(profile=, rule_type='ptrace', rule_obj= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},) 3366 original_aa[profile] = deepcopy(aa[profile]) 3367 3368 def is_known_rule(profile, rule_type, rule_obj): 3369 # XXX get rid of get() checks after we have a proper function to initialize a profile 3370 if profile.get(rule_type, False): 3371 if profile[rule_type].is_covered(rule_obj, False): 3372 return True 3373 3374 includelist = list(profile['include'].keys()) 3375 checked = [] profile = rule_type = 'ptrace' ].is_covered undefined rule_obj = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in is_covered(self= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, , rule= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},, check_allow_deny=False, check_audit=False) 413 414 def is_covered(self, rule, check_allow_deny=True, check_audit=False): 415 '''return True if rule is covered by existing rules, otherwise False''' 416 417 for r in self.rules: 418 if r.is_covered(rule, check_allow_deny, check_audit): 419 return True 420 421 return False 422 r = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, r.is_covered = rule = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, check_allow_deny = False check_audit = False /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in is_covered(self= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},, other_rule= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},, check_allow_deny=False, check_audit=False) 153 154 if other_rule.audit and not self.audit: 155 return False 156 157 # still here? -> then the common part is covered, check rule-specific things now 158 return self.is_covered_localvars(other_rule) 159 160 # @abstractmethod FIXME - uncomment when python3 only 161 def is_covered_localvars(self, other_rule): 162 '''check if the rule-specific parts of other_rule is covered by this rule object''' self = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, self.is_covered_localvars = other_rule = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, /usr/lib/python3/dist-packages/apparmor/rule/ptrace.py in is_covered_localvars(self= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},, other_rule= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},) 136 '''check if other_rule is covered by this rule object''' 137 138 if not self._is_covered_list(self.access, self.all_access, other_rule.access, other_rule.all_access, 'access'): 139 return False 140 141 if not self._is_covered_aare_compat(self.peer, self.all_peers, other_rule.peer, other_rule.all_peers, 'peer'): 142 return False 143 144 # still here? -> then it is covered 145 return True self = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, self._is_covered_aare_compat = self.peer = AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}') self.all_peers = False other_rule = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, other_rule.peer = AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}') other_rule.all_peers = False /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in _is_covered_aare_compat(self= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},, self_value=AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}'), self_all=False, other_value=r'/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}', other_all=False, cond_name='peer') 197 Note: this function checks against other_value.regex, which is not really correct, but avoids overly strict results when matching one regex against another 198 ''' 199 if type(other_value) == AARE: 200 other_value = other_value.regex 201 202 return self._is_covered_aare(self_value, self_all, other_value, other_all, cond_name) 203 204 def _is_covered_aare(self, self_value, self_all, other_value, other_all, cond_name): 205 '''check if other_* is covered by self_* - for AARE''' 206 self = ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}, self._is_covered_aare = self_value = AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}') self_all = False other_value = r'/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}' other_all = False cond_name = 'peer' /usr/lib/python3/dist-packages/apparmor/rule/__init__.py in _is_covered_aare(self= ptrace trace peer=/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\},, self_value=AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}'), self_all=False, other_value=r'/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}', other_all=False, cond_name='peer') 208 raise AppArmorBug('No %(cond_name)s specified in other %(rule_name)s rule' % {'cond_name': cond_name, 'rule_name': self.rule_name}) 209 210 if not self_all: 211 if other_all: 212 return False 213 if not self_value.match(other_value): 214 return False 215 216 # still here? -> then it is covered 217 return True self_value = AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}') self_value.match = other_value = r'/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}' /usr/lib/python3/dist-packages/apparmor/aare.py in match(self=AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}'), expression=r'/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}') 70 return self.is_equal(expression) # better safe than sorry 71 elif not type_is_str(expression): 72 raise AppArmorBug('AARE.match() called with unknown object: %s' % str(expression)) 73 74 if self._regex_compiled is None: 75 self._regex_compiled = re.compile(convert_regexp(self.regex)) 76 77 return bool(self._regex_compiled.match(expression)) 78 79 def is_equal(self, expression): self = AARE('/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}') self._regex_compiled = None global re = re.compile = global convert_regexp = self.regex = r'/usr/lib/firefox/firefox\{,\*\[^s\]\[^h\]\}' /usr/lib/python3.6/re.py in compile(pattern='^/usr/lib/firefox/firefox\\(|\\(((?<=/)[^/\x00]+)|((? pattern = '^/usr/lib/firefox/firefox\\(|\\(((?<=/)[^/\x00]+)|((?= _MAXCACHE: 304 _cache.clear() 305 if p.flags & LOCALE: p undefined global sre_compile = sre_compile.compile = pattern = '^/usr/lib/firefox/firefox\\(|\\(((?<=/)[^/\x00]+)|((? sre_parse.parse = flags = 0 /usr/lib/python3.6/sre_parse.py in parse(str='^/usr/lib/firefox/firefox\\(|\\(((?<=/)[^/\x00]+)|((?) 864 865 p.pattern.flags = fix_flags(str, p.pattern.flags) 866 867 if source.next is not None: 868 assert source.next == ")" 869 raise source.error("unbalanced parenthesis") 870 871 if flags & SRE_FLAG_DEBUG: 872 p.dump() 873 source = source.error = > error: unbalanced parenthesis at position 59 __cause__ = None __class__ = __context__ = None __delattr__ = __dict__ = {'colno': 60, 'lineno': 1, 'msg': 'unbalanced parenthesis', 'pattern': '^/usr/lib/firefox/firefox\\(|\\(((?<=/)[^/\x00]+)|((? __doc__ = 'Exception raised for invalid regular expressions...he column corresponding to pos (may be None)\n ' __eq__ = __format__ = __ge__ = __getattribute__ = __gt__ = __hash__ = __init__ = __init_subclass__ = __le__ = __lt__ = __module__ = 'sre_constants' __ne__ = __new__ = __reduce__ = __reduce_ex__ = __repr__ = __setattr__ = __setstate__ = __sizeof__ = __str__ = __subclasshook__ = __suppress_context__ = False __traceback__ = __weakref__ = None args = ('unbalanced parenthesis at position 59',) colno = 60 lineno = 1 msg = 'unbalanced parenthesis' pattern = '^/usr/lib/firefox/firefox\\(|\\(((?<=/)[^/\x00]+)|((? The above is a description of an error in a Python program. Here is the original traceback: Traceback (most recent call last): File "/usr/sbin/aa-logprof", line 56, in apparmor.do_logprof_pass(logmark) File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 1819, in do_logprof_pass log_dict = collapse_log() File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 2011, in collapse_log if not is_known_rule(aa[profile][hat], 'ptrace', ptrace_event): File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 3371, in is_known_rule if profile[rule_type].is_covered(rule_obj, False): File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 418, in is_covered if r.is_covered(rule, check_allow_deny, check_audit): File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 158, in is_covered return self.is_covered_localvars(other_rule) File "/usr/lib/python3/dist-packages/apparmor/rule/ptrace.py", line 141, in is_covered_localvars if not self._is_covered_aare_compat(self.peer, self.all_peers, other_rule.peer, other_rule.all_peers, 'peer'): File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 202, in _is_covered_aare_compat return self._is_covered_aare(self_value, self_all, other_value, other_all, cond_name) File "/usr/lib/python3/dist-packages/apparmor/rule/__init__.py", line 213, in _is_covered_aare if not self_value.match(other_value): File "/usr/lib/python3/dist-packages/apparmor/aare.py", line 75, in match self._regex_compiled = re.compile(convert_regexp(self.regex)) File "/usr/lib/python3.6/re.py", line 233, in compile return _compile(pattern, flags) File "/usr/lib/python3.6/re.py", line 301, in _compile p = sre_compile.compile(pattern, flags) File "/usr/lib/python3.6/sre_compile.py", line 562, in compile p = sre_parse.parse(p, flags) File "/usr/lib/python3.6/sre_parse.py", line 869, in parse raise source.error("unbalanced parenthesis") sre_constants.error: unbalanced parenthesis at position 59 Please consider reporting a bug at https://bugs.launchpad.net/apparmor/ and attach this file.