Skip to content
  • Christian Boltz's avatar
    Fix aa-logprof crash on ptrace garbage log events · 962d4afb
    Christian Boltz authored
    (garbage) ptrace events like
        ... apparmor="DENIED" operation="ptrace" profile="/bin/netstat" pid=1962 comm="netstat" target=""
    cause an empty name2 field, which leads to a crash in the tools.
    
    This patch lets logparser.py ignore such garbage log events, which also
    avoids the crash.
    
    As usual, add some testcases.
    
    test-libapparmor-test_multi.py needs some special handling to ignore the
    empty name2 field in one of the testcases.
    
    
    References: https://bugs.launchpad.net/apparmor/+bug/1689667
    
    
    Acked-by: Seth Arnold <seth.arnold@canonical.com> for trunk and 2.11.
    
    Older releases can't handle ptrace log events and therefore can't crash ;-)
    962d4afb