linux-next: manual merge of the audit tree with the origin tree

From: Mark Brown

Date: Fri Oct 16 2026 - 08:31:17 EST


Hi all,

Today's linux-next merge of the audit tree got a conflict in:

kernel/audit_tree.c

between commit:

aa650d87a4988 ("audit: fix exe mark UAF in kill_rules()")

from the origin tree and commit:

ca12826b4aac8 ("audit: Fix filter rule accounting after automatic removal")

from the audit tree. I'm really unsure about this merge, it's not clear
to me if the unaccounting should go in the initial loop or the RCU free
loop.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc kernel/audit_tree.c
index f2e81be8265e8,2d68d2ec2b2a1..0000000000000
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@@ -573,9 -550,17 +573,10 @@@ static void kill_rules(struct audit_con
entry = container_of(rule, struct audit_entry, rule);

list_del_init(&rule->rlist);
- if (rule->tree) {
- /* not a half-baked one */
- audit_tree_log_remove_rule(context, rule);
- if (entry->rule.exe)
- audit_remove_mark(entry->rule.exe);
- rule->tree = NULL;
- list_del_rcu(&entry->list);
- list_del(&entry->rule.list);
- audit_rule_unaccount(rule);
- call_rcu(&entry->rcu, audit_free_rule_rcu);
- }
+ if (entry->rule.exe)
+ audit_remove_mark(entry->rule.exe);
++ audit_rule_unaccount(rule);
+ call_rcu(&entry->rcu, audit_free_rule_rcu);
}
}

Attachment: signature.asc
Description: PGP signature