From: Richard Guy Briggs <rgb@redhat.com>
To: linux-audit@redhat.com
Cc: Richard Guy Briggs <rgb@redhat.com>
Subject: [PATCH] audit: log on the future execution of a path
Date: Mon, 5 May 2014 16:41:53 -0400 [thread overview]
Message-ID: <cover.1399319317.git.rgb@redhat.com> (raw)
Here is another attempt at getting closer to auditing on the future execution
of a path.
Storing the dev/inode of the path in the rule won't help us because the path
may not exist yet.
Please see the accompanying userspace patch. I don't expect the userspace
interface to change appreciably unless I've overlooked something important. I
am able to set and get rules as expected.
It will be slow because it has to do a string compare on every sys_execve()
invocation. The compare function uses the process' struct filename *. I'm
guessing a hash of the string could speed that up.
Only problem is, it doesn't work. What assumptions am I making that aren't
valid about the approach in this kernel code?
I also considered adding the path string pointer to the struct audit_field.
Any suggestions?
See: (I'd use the redhat.com/archives/linux-audit links, but they don't link across months.)
"auditing syscalls made 'by' an inode?"
http://comments.gmane.org/gmane.linux.redhat.security.audit/4255
"audit: audit on the future execution of a binary."
http://comments.gmane.org/gmane.linux.redhat.security.audit/4388
"Support for auditing on the actions of a not-yet-executed process."
http://comments.gmane.org/gmane.linux.redhat.security.audit/4389
"Excluding events by command"
http://comments.gmane.org/gmane.linux.redhat.security.audit/4428
Richard Guy Briggs (1):
audit: audit on the future execution of a binary.
include/linux/audit.h | 1 +
include/uapi/linux/audit.h | 2 ++
kernel/auditfilter.c | 35 +++++++++++++++++++++++++++++++++++
kernel/auditsc.c | 35 +++++++++++++++++++++++++++++++++++
4 files changed, 73 insertions(+), 0 deletions(-)
next reply other threads:[~2014-05-05 20:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 20:41 Richard Guy Briggs [this message]
2014-05-05 20:41 ` [PATCH] audit: audit on the future execution of a binary Richard Guy Briggs
2014-05-05 21:10 ` [PATCH] audit: log on the future execution of a path Steve Grubb
2014-05-06 14:57 ` Eric Paris
2014-05-06 15:10 ` Steve Grubb
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=cover.1399319317.git.rgb@redhat.com \
--to=rgb@redhat.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.