mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mathias Krause <minipli@googlemail.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Davidlohr Bueso <davidlohr@hp.com>,
	Pax Team <pageexec@freemail.hu>,
	Brad Spengler <spender@grsecurity.net>,
	linux-kernel@vger.kernel.org,
	Mathias Krause <minipli@googlemail.com>
Subject: [PATCHv2 0/2] IPC DoS fix
Date: Sun,  3 Nov 2013 12:36:26 +0100	[thread overview]
Message-ID: <1383478588-7011-1-git-send-email-minipli@googlemail.com> (raw)
In-Reply-To: <CA+55aFxeGaZjWM37e4p1tAhjwocpv0_iU0jTYUfaAFagvCBxmQ@mail.gmail.com>

Hi Linus,

version 2 of this series uses your approach to fix the issues by changing
load_msg() and friends to use a size_t for the message length. It differs
slightly from your patch to cover a few more places where the message
length is evaluated in sign extension problematic expressions. Also the
sysctl change is still a separate patch to allow reverting it in case it
breaks existing userland. It now handles all three sysctls: msgmax, msgmnb
and msgmni. All still capped at INT_MAX, though. They're privileged
sysctls after all. And setting them to INT_MAX does not end up in a system
crash, as it is now for negative values, but in an OOM killer invocation
instead which can be handled gracefully.

Regards,
Mathias


Mathias Krause (2):
  ipc, msg: fix message length check for negative values
  ipc, msg: forbid negative values for "msg{max,mnb,mni}"

 include/linux/ipc_namespace.h |    6 +++---
 include/linux/msg.h           |    6 +++---
 ipc/ipc_sysctl.c              |   20 ++++++++++++--------
 ipc/msgutil.c                 |   20 ++++++++++----------
 ipc/util.h                    |    4 ++--
 5 files changed, 30 insertions(+), 26 deletions(-)

-- 
1.7.10.4


  parent reply	other threads:[~2013-11-03 11:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-02 21:26 [PATCH " Mathias Krause
2013-11-02 21:26 ` [PATCH 1/2] ipc, msg: fix message length check for negative values Mathias Krause
2013-11-03  0:35   ` Linus Torvalds
2013-11-03  8:36     ` Mathias Krause
2013-11-03 11:36     ` Mathias Krause [this message]
2013-11-03 11:36       ` [PATCHv2 " Mathias Krause
2013-11-03 11:36       ` [PATCHv2 2/2] ipc, msg: forbid negative values for "msg{max,mnb,mni}" Mathias Krause
2013-11-02 21:26 ` [PATCH 2/2] ipc, msg: forbid negative values for "msgmax" Mathias Krause

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1383478588-7011-1-git-send-email-minipli@googlemail.com \
    --to=minipli@googlemail.com \
    --cc=akpm@linux-foundation.org \
    --cc=davidlohr@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pageexec@freemail.hu \
    --cc=spender@grsecurity.net \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®