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 "ipath: Restrict use of the write() interface" has been added to the 4.4-stable tree
Date: Sun, 14 Aug 2016 18:00:07 +0200 [thread overview]
Message-ID: <147119040756197@kroah.com> (raw)
In-Reply-To: <20160531023356.GI7555@decadent.org.uk>
This is a note to let you know that I've just added the patch titled
ipath: Restrict use of the write() interface
to the 4.4-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:
ipath-restrict-use-of-the-write-interface.patch
and it can be found in the queue-4.4 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 16:54:26 2016
From: Ben Hutchings <ben@decadent.org.uk>
Date: Tue, 31 May 2016 03:33:57 +0100
Subject: ipath: 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: <20160531023356.GI7555@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/staging/rdma/ipath/ipath_file_ops.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/staging/rdma/ipath/ipath_file_ops.c
+++ b/drivers/staging/rdma/ipath/ipath_file_ops.c
@@ -45,6 +45,8 @@
#include <linux/uio.h>
#include <asm/pgtable.h>
+#include <rdma/ib.h>
+
#include "ipath_kernel.h"
#include "ipath_common.h"
#include "ipath_user_sdma.h"
@@ -2243,6 +2245,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-4.4/ipath-restrict-use-of-the-write-interface.patch
prev parent reply other threads:[~2016-08-14 16:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-31 2:33 [PATCH 4.4] ipath: Restrict use of the write() interface Ben Hutchings
2016-08-14 16:00 ` 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=147119040756197@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).