From: Alexander Viro <aviro@redhat.com>
To: "John D. Ramsdell" <ramsdell@mitre.org>
Cc: bsniffen@mitre.org, Linux Audit <linux-audit@redhat.com>
Subject: Re: [PATCH] Reporting file descriptors and exec args
Date: Tue, 12 Sep 2006 17:31:02 -0400 [thread overview]
Message-ID: <20060912213102.GM4144@devserv.devel.redhat.com> (raw)
In-Reply-To: <ogtvensyfmc.fsf@divan.mitre.org>
On Tue, Sep 12, 2006 at 04:49:47PM -0400, John D. Ramsdell wrote:
> +static const char *elide(const char *str)
> +{
> + static char buf[1025];
> +
> + if (strnlen(str, 1025) >= 1025) {
> + memcpy(buf, str, 1021);
> + buf[1021] = '.';
> + buf[1022] = '.';
> + buf[1023] = '.';
> + buf[1024] = '\0';
> + return buf;
> + }
> +
> + return str;
> +}
... serialized by...?
> static void audit_log_exit(struct audit_context *context, gfp_t gfp_mask)
> {
> int i;
> @@ -820,6 +851,16 @@ static void audit_log_exit(struct audit_
> audit_log_format(ab, " success=%s exit=%ld",
> (context->return_valid==AUDITSC_SUCCESS)?"yes":"no",
> context->return_code);
> +
> + switch (context->major) {
> + case __NR_open:
> + audit_log_format(ab, " filename=");
> + audit_log_untrustedstring(ab,
> + elide((const char *)context->argv[0]));
Oh, lovely. So let me see if I've got it right - now anybody can trigger
reading from any location in kernel memory. Including iomem. Or not mapped
address range - less interesting (oops instead of mangling hardware), but
easier to guess.
BTW, you still have problem with __NR_open on biarch targets...
next prev parent reply other threads:[~2006-09-12 21:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-12 20:49 [PATCH] Reporting file descriptors and exec args John D. Ramsdell
2006-09-12 21:31 ` Alexander Viro [this message]
2006-09-12 22:10 ` Linda Knippers
2006-09-14 9:38 ` John D. Ramsdell
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=20060912213102.GM4144@devserv.devel.redhat.com \
--to=aviro@redhat.com \
--cc=bsniffen@mitre.org \
--cc=linux-audit@redhat.com \
--cc=ramsdell@mitre.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox