lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXu5jJhwy9=dmY_6WZWWxJ2MG2Vb2nwsh5zoQ3ocbvrt7HH0w@mail.gmail.com>
Date:	Sat, 31 Mar 2012 19:10:10 -0700
From:	Kees Cook <keescook@...omium.org>
To:	Phillip Lougher <plougher@...hat.com>
Cc:	linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Richard Weinberger <richard@....at>,
	Dan Rosenberg <drosenberg@...curity.com>,
	"Serge E. Hallyn" <serge@...lyn.com>, Eugene Teo <eteo@...hat.com>,
	Eric Paris <eparis@...hat.com>,
	James Morris <jmorris@...ei.org>
Subject: Re: [PATCH] sysctl: fix restrict write access to dmesg_restrict

Actually, proc_dmesg_restrict is just a CAP_SYSADMIN-checking wrapper
around proc_dointvec_minmax. Probably both dmesg_restrict and
kptr_restrict should use it.

On Fri, Mar 30, 2012 at 4:43 PM, Phillip Lougher <plougher@...hat.com> wrote:
> Commit bfdc0b4 adds code to restrict access to dmesg_restrict,
> however, it incorrectly alters kptr_restrict rather than
> dmesg_restrict.
>
> The original patch from Richard Weinberger
> (https://lkml.org/lkml/2011/3/14/362) alters dmesg_restrict as
> expected, and so the patch seems to have been misapplied.
>
> Signed-off-by: Phillip Lougher <plougher@...hat.com>
> ---
>  kernel/sysctl.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/sysctl.c b/kernel/sysctl.c
> index f487f25..72a5302 100644
> --- a/kernel/sysctl.c
> +++ b/kernel/sysctl.c
> @@ -713,7 +713,7 @@ static struct ctl_table kern_table[] = {
>                .data           = &dmesg_restrict,
>                .maxlen         = sizeof(int),
>                .mode           = 0644,
> -               .proc_handler   = proc_dointvec_minmax,
> +               .proc_handler   = proc_dmesg_restrict,
>                .extra1         = &zero,
>                .extra2         = &one,
>        },
> @@ -722,7 +722,7 @@ static struct ctl_table kern_table[] = {
>                .data           = &kptr_restrict,
>                .maxlen         = sizeof(int),
>                .mode           = 0644,
> -               .proc_handler   = proc_dmesg_restrict,
> +               .proc_handler   = proc_dointvec_minmax,
>                .extra1         = &zero,
>                .extra2         = &two,
>        },
> --
> 1.7.9.5
>



-- 
Kees Cook
ChromeOS Security
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ