public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] audit: fix recursive locking deadlock and dangling rule removal
@ 2026-04-14 20:00 Ricardo Robaina
  2026-04-14 20:00 ` [PATCH 1/2] audit: fix recursive locking deadlock in audit_dupe_exe() Ricardo Robaina
  2026-04-14 20:00 ` [PATCH 2/2] audit: fix removal of dangling executable rules Ricardo Robaina
  0 siblings, 2 replies; 5+ messages in thread
From: Ricardo Robaina @ 2026-04-14 20:00 UTC (permalink / raw)
  To: audit, linux-kernel; +Cc: paul, eparis, rgb, longman, Ricardo Robaina

This patch series fixes a recursive locking deadlock in audit_dupe_exe()
code path, as well as, a bug that prevents the deletion of dangling
audit rules.

The first patch fixes the deadlock in audit_dupe_exe() by introducing
the audit_watch_ctx struct to pass the fsnotify event context down the
call chain. This safely bypasses the need for kern_path_parent() during
move events, avoiding a double acquisition of the I_MUTEX_PARENT lock.

The second one, simply removes the d_really_is_negative() check in
audit_alloc_mark() to allow dummy mark allocation, fixing the -ENOENT
failure when deleting dangling rules for unlinked executables.

Acked-by: Waiman Long <longman@redhat.com>
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
---
Ricardo Robaina (2):
  audit: fix recursive locking deadlock in audit_dupe_exe()
  audit: fix removal of dangling executable rules

 kernel/audit.h          | 13 ++++++++++---
 kernel/audit_fsnotify.c | 29 ++++++++++++++++++-----------
 kernel/audit_watch.c    | 25 +++++++++++++++++--------
 kernel/auditfilter.c    |  9 +++++----
 4 files changed, 50 insertions(+), 26 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-04-15 18:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-14 20:00 [PATCH 0/2] audit: fix recursive locking deadlock and dangling rule removal Ricardo Robaina
2026-04-14 20:00 ` [PATCH 1/2] audit: fix recursive locking deadlock in audit_dupe_exe() Ricardo Robaina
2026-04-15 18:21   ` Richard Guy Briggs
2026-04-14 20:00 ` [PATCH 2/2] audit: fix removal of dangling executable rules Ricardo Robaina
2026-04-15 18:22   ` Richard Guy Briggs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox