Bug 2427133 - Unable to process audit event: cannot access local variable 'syslog' where it is not associated with a value
Summary: Unable to process audit event: cannot access local variable 'syslog' where it...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot
Version: 43
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Petr Lautrbach
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-01-05 10:33 UTC by Eduard Kohler
Modified: 2026-01-07 00:50 UTC (History)
4 users (show)

Fixed In Version: setroubleshoot-3.3.36-2.fc43
Clone Of:
Environment:
Last Closed: 2026-01-07 00:50:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Eduard Kohler 2026-01-05 10:33:16 UTC
RPM version:
setroubleshoot-server-3.3.35-10.fc43.x86_64

Running sealert -a <log file> triggers the following error:

/usr/sbin/sealert[3003803]: Unable to process audit event: cannot access local variable 'syslog' where it is not associated with a value
/usr/sbin/sealert[3003803]: Traceback (most recent call last):
/usr/sbin/sealert[3003803]:   File "/usr/lib/python3.14/site-packages/setroubleshoot/audit_data.py", line 1106, in compute_avcs
/usr/sbin/sealert[3003803]:     avcs.append(AVC(audit_event, record))
/usr/sbin/sealert[3003803]:                 ~~~^^^^^^^^^^^^^^^^^^^^^
/usr/sbin/sealert[3003803]:   File "/usr/lib/python3.14/site-packages/setroubleshoot/audit_data.py", line 675, in __init__
/usr/sbin/sealert[3003803]:     self.derive_avc_info_from_audit_event(avc_record)
/usr/sbin/sealert[3003803]:     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
/usr/sbin/sealert[3003803]:   File "/usr/lib/python3.14/site-packages/setroubleshoot/audit_data.py", line 1021, in derive_avc_info_from_audit_event
/usr/sbin/sealert[3003803]:     raise AVCError(_("%s \n**** Recorded AVC is allowed in current policy ****\n") % self.avc_record)
/usr/sbin/sealert[3003803]: setroubleshoot.audit_data.AVCError: type=AVC msg=audit(1767484098.30:20821): avc:  denied  { connectto } for  pid=2741285 comm="runuser" path="/run/systemd/io.systemd.Login" s>
/usr/sbin/sealert[3003803]:
/usr/sbin/sealert[3003803]: **** Recorded AVC is allowed in current policy ****
/usr/sbin/sealert[3003803]: During handling of the above exception, another exception occurred:
/usr/sbin/sealert[3003803]: Traceback (most recent call last):
/usr/sbin/sealert[3003803]:   File "/usr/lib/python3.14/site-packages/setroubleshoot/audit_data.py", line 1108, in compute_avcs
/usr/sbin/sealert[3003803]:     syslog.syslog(syslog.LOG_ERR, "%s" % e)
/usr/sbin/sealert[3003803]:     ^^^^^^
/usr/sbin/sealert[3003803]: UnboundLocalError: cannot access local variable 'syslog' where it is not associated with a value


Reproducible: Always

Steps to Reproduce:
1. sealert -a <log file>
   This outputs a normal avc information.
2. ausearch -c 'runuser' --raw | audit2allow -M my-runuser
   semodule -X 300 -i my-runuser.pp
   Allow the new policy
3. sealert -a <log file>



Additional Information:
This is due to missing "import syslog" in the "/usr/lib/python3.14/site-packages/setroubleshoot/audit_data.py" file, "def compute_avcs(audit_event)" method.

Adding "import syslog" after line 1107: "except AVCError as e:" solves the issue. I don't know python enough to add this at a better place.

Comment 1 Fedora Update System 2026-01-05 13:41:49 UTC
FEDORA-2026-62b81c5687 (setroubleshoot-3.3.36-2.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-62b81c5687

Comment 2 Fedora Update System 2026-01-06 01:53:44 UTC
FEDORA-2026-62b81c5687 has been pushed to the Fedora 43 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2026-62b81c5687`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2026-62b81c5687

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 3 Fedora Update System 2026-01-07 00:50:25 UTC
FEDORA-2026-62b81c5687 (setroubleshoot-3.3.36-2.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.