From: Kamal Mostafa <kamal@canonical.com>
To: Doug Ledford <dledford@redhat.com>
Cc: stable@vger.kernel.org, linux-rdma@vger.kernel.org
Subject: Re: [PATCH] IB/security: restrict use of the write() interface
Date: Wed, 18 May 2016 13:40:13 -0700 [thread overview]
Message-ID: <20160518204012.GA4268@whence.com> (raw)
In-Reply-To: <616598d79c0b8750d74e50cf22f8b61a9ef55c1d.1463589971.git.dledford@redhat.com>
On Wed, May 18, 2016 at 12:46:11PM -0400, Doug Ledford wrote:
> Upstream commit e6bd18f57aad (IB/security: Restrict use of the write()
> interface) handled the cases for all drivers in the current upstream
> kernel. The ipath driver had recently been deprecated and moved to
> staging, and then removed entirely. It had the same security flaw as
> the qib driver. Fix that up with this separate patch.
>
> Note: The ipath driver only supports hardware that ended production
> over 10 years ago, so there should be none of this hardware still
> present in the wild.
>
> Cc: stable@vger.kernel.org # 4.4.x
> Signed-off-by: Doug Ledford <dledford@redhat.com>
> ---
> drivers/staging/rdma/ipath/ipath_file_ops.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/staging/rdma/ipath/ipath_file_ops.c b/drivers/staging/rdma/ipath/ipath_file_ops.c
> index 13c3cd11ab92..f237a2e2a086 100644
> --- 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 *fp, const char __user *data,
> ssize_t ret = 0;
> void *dest;
>
> + if (WARN_ON_ONCE(!ib_safe_file_access(fp)))
> + return -EACCESS;
This needs to be "EACCES" (one fewer 'S').
-Kamal
> +
> if (count < sizeof(cmd.type)) {
> ret = -EINVAL;
> goto bail;
> --
> 2.5.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-05-18 20:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-18 16:46 [PATCH] IB/security: restrict use of the write() interface Doug Ledford
2016-05-18 20:40 ` Kamal Mostafa [this message]
2016-05-21 5:32 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2016-05-18 16:58 [PATCH] IB/security: Restrict " Doug Ledford
[not found] ` <02bf2ebafbc5d757c0d250d8e5fba3ebdc7393fd.1463590718.git.dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-05-18 17:20 ` Greg KH
2016-05-18 17:57 ` Doug Ledford
2016-05-18 18:59 ` Or Gerlitz
2016-05-18 19:05 ` Doug Ledford
2016-05-18 19:47 ` Or Gerlitz
2016-05-18 19:59 ` Doug Ledford
2016-05-18 20:36 ` Or Gerlitz
2016-05-18 21:42 ` Doug Ledford
2016-05-18 16:41 [PATCH] IB/security: restrict " Doug Ledford
2016-05-18 20:42 ` Kamal Mostafa
2016-05-18 21:40 ` Doug Ledford
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=20160518204012.GA4268@whence.com \
--to=kamal@canonical.com \
--cc=dledford@redhat.com \
--cc=linux-rdma@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