public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [resend][PATCH 1/3] mqueue: revert bump up DFLT_*MAX
@ 2011-12-09 22:35 kosaki.motohiro
  2011-12-09 22:35 ` [resend][PATCH 2/3] mqueue: don't use kmalloc with KMALLOC_MAX_SIZE kosaki.motohiro
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: kosaki.motohiro @ 2011-12-09 22:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, KOSAKI Motohiro, Amerigo Wang, Serge E. Hallyn, Jiri Slaby,
	Doug Ledford, Eric W. Biederman, Joe Korty, David Howells

From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>

Mqueue limitation is slightly naieve parameter likes other ipcs
because unprivileged user can consume kernel memory by using ipcs.

Thus, too aggressive raise bring us security issue. Example,
current setting allow evil unprivileged user use 256GB (= 256
* 1024 * 1024*1024) and it's enough large to system will belome
unresponsive. Don't do that.

Instead, every admin should adjust the knobs for their own systems.

Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Acked-by: Doug Ledford <dledford@redhat.com>
Acked-by: Joe Korty <joe.korty@ccur.com>
Cc: Amerigo Wang <amwang@redhat.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Jiri Slaby <jslaby@suse.cz>
---
 include/linux/ipc_namespace.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h
index e2bac00..2488535 100644
--- a/include/linux/ipc_namespace.h
+++ b/include/linux/ipc_namespace.h
@@ -118,13 +118,13 @@ extern int mq_init_ns(struct ipc_namespace *ns);
 #define DFLT_QUEUESMAX		      256
 #define HARD_QUEUESMAX		     1024
 #define MIN_MSGMAX			1
-#define DFLT_MSG		       64U
-#define DFLT_MSGMAX		     1024
+#define DFLT_MSG		       10U
+#define DFLT_MSGMAX		       10
 #define HARD_MSGMAX		    65536
 #define MIN_MSGSIZEMAX		      128
 #define DFLT_MSGSIZE		     8192U
-#define DFLT_MSGSIZEMAX		(1024*1024)
-#define HARD_MSGSIZEMAX	     (16*1024*1024)
+#define DFLT_MSGSIZEMAX		     8192
+#define HARD_MSGSIZEMAX	    (16*1024*1024)
 #else
 static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
 #endif
-- 
1.7.1


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

end of thread, other threads:[~2012-03-19 20:50 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-09 22:35 [resend][PATCH 1/3] mqueue: revert bump up DFLT_*MAX kosaki.motohiro
2011-12-09 22:35 ` [resend][PATCH 2/3] mqueue: don't use kmalloc with KMALLOC_MAX_SIZE kosaki.motohiro
2011-12-09 22:35 ` [resend][PATCH 3/3] mqueue: separate mqueue default value from maximum value kosaki.motohiro
2011-12-18 18:29 ` [resend][PATCH 1/3] mqueue: revert bump up DFLT_*MAX KOSAKI Motohiro
2011-12-18 18:29 ` KOSAKI Motohiro
2011-12-18 18:38   ` Andrew Morton
2012-03-14 21:28     ` Doug Ledford
2012-03-14 21:38       ` Andrew Morton
2012-03-14 21:45         ` Doug Ledford
2012-03-19 18:02           ` KOSAKI Motohiro
2012-03-19 18:16             ` Doug Ledford
2012-03-19 20:49               ` KOSAKI Motohiro

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