Bug 1487906 - BUG: error resetting the audit daemon PID
Summary: BUG: error resetting the audit daemon PID
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 26
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: Paul Moore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-03 07:24 UTC by Pierre Juhen
Modified: 2018-01-28 14:21 UTC (History)
27 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-28 14:21:21 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github linux-audit audit-kernel issues 69 0 None closed BUG: error resetting the audit daemon PID 2020-07-08 04:10:57 UTC

Description Pierre Juhen 2017-09-03 07:24:53 UTC
Description of problem:
Message : 
auditd[1127]: Error setting audit daemon pid (Invalid argument)

appears in /var/log/messages (at shutdown, when auditd is about to stop)

Version-Release number of selected component (if applicable):
audit-2.7.7-1.fc26.x86_64

How reproducible:
Everytime

No impact.

Comment 1 Steve Grubb 2017-09-13 16:31:14 UTC
This appears to be related to 

https://github.com/linux-audit/audit-kernel/commit/48d0e023af9799cd7220335baf8e3ba61eeafbeb

At line 471 in audit.c, it now checks for !pid and returns -EINVAL. Setting the pid to 0 is exactly how auditing is supposed to end.

Comment 2 Laura Abbott 2017-09-13 17:08:52 UTC
Paul, was this change intended?

Comment 3 Paul Moore 2017-09-13 17:12:47 UTC
What kernel version are we talking about?

 # uname -r

Comment 4 Pierre Juhen 2017-09-13 18:45:08 UTC
Hi

My kernel version is :

4.12.11-300.fc26.x86_64

The problem was already present in previous  4.12 versions.

Regards,

Comment 5 Paul Moore 2017-10-02 15:20:33 UTC
Since this surely isn't Fedora specific, and because it may be some time before I can address this, let's create an upstream issue tracker.

* https://github.com/linux-audit/audit-kernel/issues/69

Comment 6 Paul Moore 2018-01-28 13:59:22 UTC
FYI: this is fixed upstream in the commit below and should be v4.15 which I expect to be released later today.

Laura, is F26 going to see v4.15?  If so, I'm not sure it is worth backporting this.

 commit 33e8a907804428109ce1d12301c3365d619cc4df
 Author: Steve Grubb <sgrubb@redhat.com>
 Date:   Tue Oct 17 18:29:22 2017 -0400

    audit: Allow auditd to set pid to 0 to end auditing
    
    The API to end auditing has historically been for auditd to set the
    pid to 0. This patch restores that functionality.
    
    See: https://github.com/linux-audit/audit-kernel/issues/69
    
    Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
    Signed-off-by: Steve Grubb <sgrubb@redhat.com>
    Signed-off-by: Paul Moore <paul@paul-moore.com>

Comment 7 Laura Abbott 2018-01-28 14:04:37 UTC
Yes, F26 (and F27) will be getting 4.15, probably by the end of February assuming standard kernel timing holds.

Comment 8 Paul Moore 2018-01-28 14:21:21 UTC
Okay, thank you.  I'm going to close this as UPSTREAM, if anyone has a strong objection, speak your mind now.


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