#1125664 aa-genprof error reading from audit.log

Package:
apparmor-utils
Source:
apparmor-utils
Submitter:
Alessandro Baggi
Date:
2026-05-13 02:43:13 UTC
Severity:
normal
Tags:
#1125664#5
Date:
2026-01-15 17:19:46 UTC
From:
To:
I'm trying to create an AA profile for sshd for pam_apparmor usage.
When running aa-genprof sshd -f /var/log/audit/audit.log (during an SSH
login) I get:

Traceback (most recent call last):
   File "/usr/sbin/aa-genprof", line 183, in <module>
     apparmor.do_logprof_pass(logmark, out_dir=args.output_dir)
     ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 1499, in
do_logprof_pass
     hashlog = log_reader.read_log(logmark)
   File "/usr/lib/python3/dist-packages/apparmor/logparser.py", line
411, in read_log
     self.parse_event_for_tree(event)
     ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^
   File "/usr/lib/python3/dist-packages/apparmor/logparser.py", line
341, in parse_event_for_tree

FileRule.hashlog_from_event(self.hashlog[aamode][full_profile]['file'], e)

~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   File "/usr/lib/python3/dist-packages/apparmor/rule/file.py", line
456, in hashlog_from_event
     dmask = dmask.replace('c', 'w')
             ^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'

An unexpected error occurred!

Please consider reporting a bug at
https://gitlab.com/apparmor/apparmor/-/issues

I found a bug report on https://gitlab.com/apparmor/apparmor/-/issues/526


I'm running this on Debian Trixie (13) (6.12.63+deb13-amd64) (libc6
2.41-12+deb13u1)


There is something I can do to help the resolution?