Skip to content
Snippets Groups Projects
Forked from drm / msm
86973 commits behind the upstream repository.
  • Chris Riches's avatar
    022732e3
    audit: Send netlink ACK before setting connection in auditd_set · 022732e3
    Chris Riches authored
    
    When auditd_set sets the auditd_conn pointer, audit messages can
    immediately be put on the socket by other kernel threads. If the backlog
    is large or the rate is high, this can immediately fill the socket
    buffer. If the audit daemon requested an ACK for this operation, a full
    socket buffer causes the ACK to get dropped, also setting ENOBUFS on the
    socket.
    
    To avoid this race and ensure ACKs get through, fast-track the ACK in
    this specific case to ensure it is sent before auditd_conn is set.
    
    Signed-off-by: default avatarChris Riches <chris.riches@nutanix.com>
    [PM: fix some tab vs space damage]
    Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
    022732e3
    History
    audit: Send netlink ACK before setting connection in auditd_set
    Chris Riches authored
    
    When auditd_set sets the auditd_conn pointer, audit messages can
    immediately be put on the socket by other kernel threads. If the backlog
    is large or the rate is high, this can immediately fill the socket
    buffer. If the audit daemon requested an ACK for this operation, a full
    socket buffer causes the ACK to get dropped, also setting ENOBUFS on the
    socket.
    
    To avoid this race and ensure ACKs get through, fast-track the ACK in
    this specific case to ensure it is sent before auditd_conn is set.
    
    Signed-off-by: default avatarChris Riches <chris.riches@nutanix.com>
    [PM: fix some tab vs space damage]
    Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
audit.c 65.18 KiB