public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sysctl: fix restrict write access to dmesg_restrict
@ 2012-03-30 23:43 Phillip Lougher
  2012-03-30 23:50 ` Richard Weinberger
  2012-04-01  2:10 ` Kees Cook
  0 siblings, 2 replies; 12+ messages in thread
From: Phillip Lougher @ 2012-03-30 23:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Andrew Morton, Richard Weinberger, Dan Rosenberg, Serge E. Hallyn,
	Eugene Teo, Eric Paris, James Morris, Kees Cook

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@redhat.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


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-04-05  5:11 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 23:43 [PATCH] sysctl: fix restrict write access to dmesg_restrict Phillip Lougher
2012-03-30 23:50 ` Richard Weinberger
2012-03-31  0:55   ` Andrew Morton
2012-03-31  1:58     ` Phillip Lougher
2012-03-31 16:13       ` Greg Kroah-Hartman
2012-04-01  2:10 ` Kees Cook
2012-04-04  2:30   ` Serge E. Hallyn
2012-04-04 18:40     ` [PATCH] sysctl: fix write access to dmesg_restrict/kptr_restrict Kees Cook
2012-04-04 19:07       ` Richard Weinberger
2012-04-04 21:27       ` Serge E. Hallyn
2012-04-04 21:43         ` Kees Cook
2012-04-05  5:11       ` James Morris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox