All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: ben@decadent.org.uk, dledford@redhat.com,
	gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "IB/security: Restrict use of the write() interface" has been added to the 3.14-stable tree
Date: Sun, 14 Aug 2016 17:43:02 +0200	[thread overview]
Message-ID: <1471189382109113@kroah.com> (raw)
In-Reply-To: <20160531024050.GL7555@decadent.org.uk>


This is a note to let you know that I've just added the patch titled

    IB/security: Restrict use of the write() interface

to the 3.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     ib-security-restrict-use-of-the-write-interface.patch
and it can be found in the queue-3.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From ben@decadent.org.uk  Sun Aug 14 17:34:33 2016
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 31 May 2016 03:40:50 +0100
Subject: IB/security: Restrict use of the write() interface
To: stable@vger.kernel.org
Cc: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>, Doug Ledford <dledford@redhat.com>, linux-rdma@vger.kernel.org
Message-ID: <20160531024050.GL7555@decadent.org.uk>
Content-Disposition: inline

From: Ben Hutchings <ben@decadent.org.uk>

Commit e6bd18f57aad ("IB/security: Restrict use of the write()
interface") fixed a security problem with various write()
implementations in the Infiniband subsystem.  In older kernel versions
the ipath_write() function has the same problem and needs the same
restriction.  (The ipath driver has been completely removed upstream.)

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/ipath/ipath_file_ops.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -45,6 +45,8 @@
 #include <linux/cpu.h>
 #include <asm/pgtable.h>
 
+#include <rdma/ib.h>
+
 #include "ipath_kernel.h"
 #include "ipath_common.h"
 #include "ipath_user_sdma.h"
@@ -2240,6 +2242,9 @@ static ssize_t ipath_write(struct file *
 	ssize_t ret = 0;
 	void *dest;
 
+	if (WARN_ON_ONCE(!ib_safe_file_access(fp)))
+		return -EACCES;
+
 	if (count < sizeof(cmd.type)) {
 		ret = -EINVAL;
 		goto bail;


Patches currently in stable-queue which might be from ben@decadent.org.uk are

queue-3.14/sctp-prevent-soft-lockup-when-sctp_accept-is-called-during-a-timeout-event.patch
queue-3.14/ib-security-restrict-use-of-the-write-interface.patch
queue-3.14/usb-quirk-fix.patch

      reply	other threads:[~2016-08-14 15:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31  2:40 [stable 3.2-3.16] IB/security: Restrict use of the write() interface Ben Hutchings
2016-05-31  2:40 ` Ben Hutchings
2016-08-14 15:43 ` gregkh [this message]

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=1471189382109113@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ben@decadent.org.uk \
    --cc=dledford@redhat.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.