Skip to content

Commit

Permalink
mqueue: revert bump up DFLT_*MAX
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Doug Ledford <[email protected]>
Acked-by: Joe Korty <[email protected]>
Cc: Amerigo Wang <[email protected]>
Acked-by: Serge E. Hallyn <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: Manfred Spraul <[email protected]>
Cc: Dave Hansen <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
kosaki authored and torvalds committed Jun 1, 2012
1 parent 5b5c4d1 commit e6315bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/linux/ipc_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ 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 DFLT_MSGSIZEMAX 8192
#define HARD_MSGSIZEMAX (16*1024*1024)
#else
static inline int mq_init_ns(struct ipc_namespace *ns) { return 0; }
Expand Down

0 comments on commit e6315bb

Please sign in to comment.