[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381285806.23937.51.camel@joe-AO722>
Date: Tue, 08 Oct 2013 19:30:06 -0700
From: Joe Perches <joe@...ches.com>
To: Ryan Mallon <rmallon@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, eldad@...refinery.com,
Jiri Kosina <jkosina@...e.cz>, jgunthorpe@...idianresearch.com,
Dan Rosenberg <dan.j.rosenberg@...il.com>,
Kees Cook <keescook@...omium.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
George Spelvin <linux@...izon.com>,
"kernel-hardening@...ts.openwall.com"
<kernel-hardening@...ts.openwall.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] vsprintf: Check real user/group id for %pK
On Wed, 2013-10-09 at 13:22 +1100, Ryan Mallon wrote:
> Anyway, updated patch below:
nit:
> diff --git a/lib/vsprintf.c b/lib/vsprintf.c
[]
> @@ -1312,11 +1313,36 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr,
> spec.field_width = default_width;
> return string(buf, end, "pK-error", spec);
> }
> - if (!((kptr_restrict == 0) ||
> - (kptr_restrict == 1 &&
> - has_capability_noaudit(current, CAP_SYSLOG))))
> +
> + switch (kptr_restrict) {
> + case 0:
> + /* Always print %pK values */
> + break;
> + case 1: {
> + /*
> + * Only print the real pointer value if the current
> + * proccess has CAP_SYSLOG and is running with the
s/proccess/process/ typo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists