+ kernel-auditfilterc-fix-leak-in-audit_add_rule-error-path.patch added to -mm tree
Subject: + kernel-auditfilterc-fix-leak-in-audit_add_rule-error-path.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Wed, 22 May 2013 14:19:00 -0700
The patch titled
Subject: kernel/auditfilter.c: fix leak in audit_add_rule() error path
has been added to the -mm tree. Its filename is
kernel-auditfilterc-fix-leak-in-audit_add_rule-error-path.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Chen Gang <[email protected]>
Subject: kernel/auditfilter.c: fix leak in audit_add_rule() error path
If both 'tree' and 'watch' are valid we must call audit_put_tree(), just like the preceding code within audit_add_rule().
---
kernel/auditfilter.c | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/auditfilter.c renamed from kernel/auditfilter.c~kernel-auditfilterc-fix-leak-in-audit_add_rule-error-path +6 -0
@@ -865,6 +865,12 @@ static inline int audit_add_rule(struct err =audit_add_watch (&entry->rule, &list);if (err) {mutex_unlock (&audit_filter_mutex); +/* +* normally audit_add_tree_rule() will free it +* on failure +*/ +if (tree) +audit_put_tree (tree); goto error; } }
_
Patches currently in -mm which might be from [email protected] are
linux-next.patch kernel-audit_treec-audit_add_tree_rule-protect-rule-from-kill_rules.patch kernel-auditfilterc-fix-leak-in-audit_add_rule-error-path.patch posix-timers-correctly-get-dying-task-time-sample-in-posix_cpu_timer_schedule.patch