aa-logprof crash

Bug #1490289 reported by Moshe Kaplan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
AppArmor
Invalid
Undecided
Unassigned

Bug Description

moshe@moshe-desktop:~/Downloads/apparmor/utils$ sudo python3 ./aa-logprof
Reading log entries from /var/log/audit/audit.log.
Updating AppArmor profiles in /etc/apparmor.d.

Profile: /home/moshe/Desktop/aircrack_dev/src/aireplay-ng^/bin/dash
Execute: /bin/ls
Severity: unknown

(I)nherit / (C)hild / (N)amed / (X) ix On / (D)eny / Abo(r)t / (F)inish
Complain-mode changes:
Enforce-mode changes:

Profile: /home/moshe/Desktop/aircrack_dev/src/aireplay-ng^/bin/dash
Path: /etc/ld.so.cache
Mode: r
Severity: 1

  1 - #include <abstractions/base>
  2 - #include <abstractions/evince>
  3 - #include <abstractions/gnome>
  4 - #include <abstractions/kde>
  5 - #include <abstractions/lightdm>
  6 - #include <abstractions/ubuntu-browsers.d/firefox>
  7 - #include <abstractions/ubuntu-browsers.d/kde>
  8 - #include <abstractions/ubuntu-browsers.d/mailto>
  9 - #include <abstractions/ubuntu-gnome-terminal>
  10 - #include <abstractions/ubuntu-konsole>
  11 - #include <abstractions/ubuntu-unity7-base>
 [12 - /etc/ld.so.cache]
(A)llow / [(D)eny] / (I)gnore / (G)lob / Glob with (E)xtension / (N)ew / Abo(r)t / (F)inish / (M)ore

Profile: /home/moshe/Desktop/aircrack_dev/src/aireplay-ng^/bin/dash
Path: /etc/ld.so.cache
Mode: r
Severity: 1

  1 - #include <abstractions/base>
  2 - #include <abstractions/evince>
  3 - #include <abstractions/gnome>
  4 - #include <abstractions/kde>
  5 - #include <abstractions/lightdm>
  6 - #include <abstractions/ubuntu-browsers.d/firefox>
  7 - #include <abstractions/ubuntu-browsers.d/kde>
  8 - #include <abstractions/ubuntu-browsers.d/mailto>
 [9 - #include <abstractions/ubuntu-gnome-terminal>]
  10 - #include <abstractions/ubuntu-konsole>
  11 - #include <abstractions/ubuntu-unity7-base>
  12 - /etc/ld.so.cache
(A)llow / [(D)eny] / (I)gnore / (G)lob / Glob with (E)xtension / (N)ew / Abo(r)t / (F)inish / (M)ore
Traceback (most recent call last):
  File "./aa-logprof", line 50, in <module>
    apparmor.do_logprof_pass(logmark)
  File "/home/moshe/Downloads/apparmor/utils/apparmor/aa.py", line 2189, in do_logprof_pass
    ask_the_questions()
  File "/home/moshe/Downloads/apparmor/utils/apparmor/aa.py", line 1902, in ask_the_questions
    deleted = delete_duplicates(aa[profile][hat], inc)
  File "/home/moshe/Downloads/apparmor/utils/apparmor/aa.py", line 2088, in delete_duplicates
    deleted += profile[rule_type].delete_duplicates(include[incname][incname][rule_type])
AttributeError: 'collections.defaultdict' object has no attribute 'delete_duplicates'

An unexpected error occoured!

Tags: aa-tools
Revision history for this message
Moshe Kaplan (moshekaplan) wrote :
Revision history for this message
Moshe Kaplan (moshekaplan) wrote :

Version information:
Apparmor from bzr revision 3230
Ubuntu 14.04 x64

Revision history for this message
Christian Boltz (cboltz) wrote :

From the log, it looks like aa['/home/moshe/Desktop/aircrack_dev/src/aireplay-ng']['/bin/dash'] was not initialized using profile_storage() - however I have no idea why.

The only possibly relevant change since r3230 (until r3265) was r3253 ("Fix missing profile init in create_new_profile()"), however what you pasted looks like the /bin/dash child profile already existed, so r3253 shouldn't be relevant to it.

Unfortunately I have no idea what went wrong - from looking at the code, everything looks correct :-/

Can you still reproduce this bug (maybe using a hand-made log entry with profile"/home/moshe/Desktop/aircrack_dev/src/aireplay-ng///bin/dash")? If yes, I'd be interested in the detailed reproducer steps and a copy of the involved profiles.

Revision history for this message
Moshe Kaplan (moshekaplan) wrote :

Sorry, I don't have the time to reproduce this bug. :(

Revision history for this message
Christian Boltz (cboltz) wrote :

Did you find out how to reproduce this in the meantime? Or was it a strange[tm] one-time crash that never happened again?

tags: added: aa-tools
Changed in apparmor:
status: New → Incomplete
Revision history for this message
Moshe Kaplan (moshekaplan) wrote :

I never had the time to attempt to attempt to reproduce this crash. Sorry :(

Revision history for this message
Christian Boltz (cboltz) wrote :

At least this sounds like it only happened once ;-)

Since I have no idea what caused the crash, I'll close this bug for now.

If you see this or another crash again, please to open a new bugreport (ideally with a reproducer ;-)

Changed in apparmor:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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