All of lore.kernel.org
 help / color / mirror / Atom feed
From: Amy Griffis <amy.griffis@hp.com>
To: linux-audit@redhat.com
Subject: [PATCH git] fix null dereference in fs audit patch
Date: Tue, 30 May 2006 10:35:22 -0400	[thread overview]
Message-ID: <20060530143522.GA25312@zk3.dec.com> (raw)

Check watch pointer before dereferencing.

Al, please fold in with latest filesystem auditing patch
1d9d3267853cc4368c923f1ab7037db8c8805b73.

Signed-off-by: Amy Griffis <amy.griffis@hp.com>

diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 7f2fcd6..f993842 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -1032,12 +1032,13 @@ static inline int audit_do_del_rule(stru
 
 	list_for_each_entry(e, list, list) {
 		struct audit_watch *watch = e->rule.watch;
-		struct audit_parent *parent = watch->parent;
 
 		if (audit_compare_rule(&entry->rule, &e->rule))
 			continue;
 
 		if (watch) {
+			struct audit_parent *parent = watch->parent;
+
 			list_del(&e->rule.rlist);
 
 			if (list_empty(&watch->rules)) {
-- 
1.3.0

                 reply	other threads:[~2006-05-30 14:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060530143522.GA25312@zk3.dec.com \
    --to=amy.griffis@hp.com \
    --cc=linux-audit@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.