From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jann Horn <jannh@google.com>
Cc: Doug Gilbert <dgilbert@interlog.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-scsi@vger.kernel.org, Christoph Hellwig <hch@infradead.org>,
Al Viro <viro@zeniv.linux.org.uk>,
Andy Lutomirski <luto@kernel.org>,
linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
kernel-hardening@lists.openwall.com, security@kernel.org,
Benjamin Block <bblock@linux.vnet.ibm.com>
Subject: Re: [PATCH v3] sg: mitigate read/write abuse
Date: Tue, 26 Jun 2018 13:11:56 -0400 [thread overview]
Message-ID: <yq1bmbx321v.fsf@oracle.com> (raw)
In-Reply-To: <20180625142544.182673-1-jannh@google.com> (Jann Horn's message of "Mon, 25 Jun 2018 16:25:44 +0200")
Jann,
> As Al Viro noted in commit 128394eff343 ("sg_write()/bsg_write() is
> not fit to be called under KERNEL_DS"), sg improperly accesses
> userspace memory outside the provided buffer, permitting kernel memory
> corruption via splice(). But it doesn't just do it on ->write(), also
> on ->read().
>
> As a band-aid, make sure that the ->read() and ->write() handlers can
> not be called in weird contexts (kernel context or credentials
> different from file opener), like for ib_safe_file_access().
Applied to 4.18/scsi-fixes with the naming fix pointed out by Doug.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
prev parent reply other threads:[~2018-06-26 17:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 14:25 [PATCH v3] sg: mitigate read/write abuse Jann Horn
2018-06-25 23:18 ` Douglas Gilbert
2018-06-26 17:11 ` Martin K. Petersen [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=yq1bmbx321v.fsf@oracle.com \
--to=martin.petersen@oracle.com \
--cc=axboe@kernel.dk \
--cc=bblock@linux.vnet.ibm.com \
--cc=dgilbert@interlog.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hch@infradead.org \
--cc=jannh@google.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=kernel-hardening@lists.openwall.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=luto@kernel.org \
--cc=security@kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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