* [stable 3.2-3.16] IB/security: Restrict use of the write() interface
@ 2016-05-31 2:40 Ben Hutchings
2016-08-14 15:43 ` Patch "IB/security: Restrict use of the write() interface" has been added to the 3.14-stable tree gregkh
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2016-05-31 2:40 UTC (permalink / raw)
To: stable; +Cc: Jason Gunthorpe, Doug Ledford, linux-rdma
[-- Attachment #1: Type: text/plain, Size: 954 bytes --]
This commit should be included in all stable branches:
commit e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
Author: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Date: Sun Apr 10 19:13:13 2016 -0600
IB/security: Restrict use of the write() interface
When backporting, please fold the following change to the ipath driver
into the patch.
Ben.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/drivers/infiniband/hw/ipath/ipath_file_ops.c
+++ b/drivers/infiniband/hw/ipath/ipath_file_ops.c
@@ -44,6 +44,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"
@@ -2239,6 +2241,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;
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 811 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Patch "IB/security: Restrict use of the write() interface" has been added to the 3.14-stable tree
2016-05-31 2:40 [stable 3.2-3.16] IB/security: Restrict use of the write() interface Ben Hutchings
@ 2016-08-14 15:43 ` gregkh
0 siblings, 0 replies; 2+ messages in thread
From: gregkh @ 2016-08-14 15:43 UTC (permalink / raw)
To: ben, dledford, gregkh, jgunthorpe; +Cc: stable, stable-commits
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-14 15:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-31 2:40 [stable 3.2-3.16] IB/security: Restrict use of the write() interface Ben Hutchings
2016-08-14 15:43 ` Patch "IB/security: Restrict use of the write() interface" has been added to the 3.14-stable tree gregkh
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).