aa-genprof crash

Bug #1840582 reported by Marco Aurelio
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Fix Released
Undecided
Unassigned
apparmor (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Hi,
I run aa-genprof against an executable link (( #!/usr/bin/env ./script.sh )), that run a bash script, that run firefox bin.
Because aa-genprof seems not to see the firefox run, I pressed (S)can two or three times.

At the last time I have the following error:

 [(S)can system log for AppArmor events] / (F)inish
Reading log entries from /var/log/syslog.
Traceback (most recent call last):
  File "/usr/sbin/aa-genprof", line 163, in <module>
    lp_ret = apparmor.do_logprof_pass(logmark, passno)
  File "/usr/lib/python3/dist-packages/apparmor/aa.py", line 1816, in do_logprof_pass
    log = log_reader.read_log(logmark)
  File "/usr/lib/python3/dist-packages/apparmor/logparser.py", line 384, in read_log
    self.add_event_to_tree(event)
  File "/usr/lib/python3/dist-packages/apparmor/logparser.py", line 198, in add_event_to_tree
    e = self.parse_event_for_tree(e)
  File "/usr/lib/python3/dist-packages/apparmor/logparser.py", line 246, in parse_event_for_tree
    if profile != 'null-complain-profile' and not self.profile_exists(profile):
  File "/usr/lib/python3/dist-packages/apparmor/logparser.py", line 457, in profile_exists
    raise AppArmorBug('This should never happen, please open a bugreport!')
apparmor.common.AppArmorBug: This should never happen, please open a bugreport!

An unexpected error occoured!

Tags: aa-tools
Revision history for this message
Christian Boltz (cboltz) wrote :

This was already fixed upstream, see https://gitlab.com/apparmor/apparmor/merge_requests/296 for details and the patch. Master as well as the latest 2.12.3 and 2.13.3 releases include the fix. Therefore I'll close this bugreport as fixed (but still read additional comments).

Which distribution do you use? It might be a good idea to ask for a maintenance update (with 2.12.3 or 2.13.3) to get this and other bugs fixed ;-)

> Because aa-genprof seems not to see the firefox run, I pressed (S)can two or three times.

I'd guess you had too many log events and the audit.log was rotated away in the meantime.

Changed in apparmor:
status: New → Fix Released
tags: added: aa-tools
Revision history for this message
Marco Aurelio (marc0aurelio) wrote :

Thank you for your answer. I have ubuntu 19.04 and I written to one of the dev to ask if he has time to build an update.

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

This was fixed in 2.13.3-5ubuntu1 in Ubunt 19.10

Changed in apparmor (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.