Removing a watched file will oops if audit is disabled (auditctl -e 0).
To reproduce:
- auditctl -e 1
- touch /tmp/foo
- auditctl -w /tmp/foo
- auditctl -e 0
- rm /tmp/foo (or mv)
Signed-off-by: Tony Jones <[email protected]>
---
diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
index 74cc0fc..ce61f42 100644
--- a/kernel/auditfilter.c
+++ b/kernel/auditfilter.c
@@ -947,7 +947,7 @@ static void audit_update_watch(struct au
/* If the update involves invalidating rules, do the inode-based
* filtering now, so we don't omit records. */
- if (invalidating &&
+ if (invalidating && current->audit_context &&
audit_filter_inodes(current, current->audit_context) == AUDIT_RECORD_CONTEXT)
audit_set_auditable(current->audit_context);
> On Wed, 20 Jun 2007 15:38:20 -0700 Tony Jones <[email protected]> wrote:
> Removing a watched file will oops if audit is disabled (auditctl -e 0).
>
> To reproduce:
> - auditctl -e 1
> - touch /tmp/foo
> - auditctl -w /tmp/foo
> - auditctl -e 0
> - rm /tmp/foo (or mv)
>
> Signed-off-by: Tony Jones <[email protected]>
> ---
>
> diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
> index 74cc0fc..ce61f42 100644
> --- a/kernel/auditfilter.c
> +++ b/kernel/auditfilter.c
> @@ -947,7 +947,7 @@ static void audit_update_watch(struct au
>
> /* If the update involves invalidating rules, do the inode-based
> * filtering now, so we don't omit records. */
> - if (invalidating &&
> + if (invalidating && current->audit_context &&
> audit_filter_inodes(current, current->audit_context) == AUDIT_RECORD_CONTEXT)
> audit_set_auditable(current->audit_context);
This looks like 2.6.22 material to me.
Question is: is it also 2.6.21.x material?
23 Haz 2007 Cts tarihinde, Andrew Morton şunları yazmıştı:
> This looks like 2.6.22 material to me.
>
> Question is: is it also 2.6.21.x material?
I even can reproduce same oops with 2.6.18 :)
Cheers
--
S.Çağlar Onur <[email protected]>
http://cekirdek.pardus.org.tr/~caglar/
Linux is like living in a teepee. No Windows, no Gates and an Apache in house!
On Sat, Jun 23, 2007 at 09:51:53AM -0700, Andrew Morton wrote:
> This looks like 2.6.22 material to me.
>
> Question is: is it also 2.6.21.x material?
Yes, it is.
On Sat, 23 Jun 2007 20:16:09 +0100 Al Viro <[email protected]> wrote:
> On Sat, Jun 23, 2007 at 09:51:53AM -0700, Andrew Morton wrote:
> > This looks like 2.6.22 material to me.
> >
> > Question is: is it also 2.6.21.x material?
>
> Yes, it is.
OK, thanks, I queued it for both kernels.