Abstract socket paths start with \0, which caused os.stat() to crash
Fixes:
# cat avc
type=AVC msg=audit(1574094303.139:1096): avc: denied { sendto } for pid=18278 comm="dcbtool" path=002F636F6D2F696E74656C2F6C6C64706164 scontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=system_u:system_r:lldpad_t:s0 tclass=unix_dgram_socket permissive=0
#sealert -a avc
99% doneTraceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 676, in task
self.new_audit_record_handler(record_type, event_id, body_text, fields, line_number)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 701, in new_audit_record_handler
self.avc_event_handler(audit_event)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 689, in avc_event_handler
self.analyzer.analyze_avc(avc, self.report_receiver, False)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 154, in analyze_avc
avc.update()
File "/usr/lib64/python2.7/site-packages/setroubleshoot/audit_data.py", line 740, in update
self.derive_environmental_info()
File "/usr/lib64/python2.7/site-packages/setroubleshoot/audit_data.py", line 1008, in derive_environmental_info
rpm = get_rpm_nvr_by_file_path(self.tpath)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/util.py", line 337, in get_rpm_nvr_by_file_path
return get_rpm_nvr_by_file_path_temporary(path)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/util.py", line 300, in get_rpm_nvr_by_file_path_temporary
if not os.path.exists(name):
File "/usr/lib64/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: must be encoded string without NULL bytes, not str
Abstract socket paths start with \0, which caused os.stat() to crash
Fixes:
# cat avc
type=AVC msg=audit(1574094303.139:1096): avc: denied { sendto } for pid=18278 comm="dcbtool" path=002F636F6D2F696E74656C2F6C6C64706164 scontext=sysadm_u:sysadm_r:sysadm_t:s0-s0:c0.c1023 tcontext=system_u:system_r:lldpad_t:s0 tclass=unix_dgram_socket permissive=0
#sealert -a avc
99% doneTraceback (most recent call last):
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 676, in task
self.new_audit_record_handler(record_type, event_id, body_text, fields, line_number)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 701, in new_audit_record_handler
self.avc_event_handler(audit_event)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 689, in avc_event_handler
self.analyzer.analyze_avc(avc, self.report_receiver, False)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/analyze.py", line 154, in analyze_avc
avc.update()
File "/usr/lib64/python2.7/site-packages/setroubleshoot/audit_data.py", line 740, in update
self.derive_environmental_info()
File "/usr/lib64/python2.7/site-packages/setroubleshoot/audit_data.py", line 1008, in derive_environmental_info
rpm = get_rpm_nvr_by_file_path(self.tpath)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/util.py", line 337, in get_rpm_nvr_by_file_path
return get_rpm_nvr_by_file_path_temporary(path)
File "/usr/lib64/python2.7/site-packages/setroubleshoot/util.py", line 300, in get_rpm_nvr_by_file_path_temporary
if not os.path.exists(name):
File "/usr/lib64/python2.7/genericpath.py", line 18, in exists
os.stat(path)
TypeError: must be encoded string without NULL bytes, not str