Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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


Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.