From: Dan Carpenter <dan.carpenter@oracle.com>
To: Wenwen Wang <wang6495@umn.edu>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
Aastha Gupta <aastha.gupta4104@gmail.com>,
"Dilger, Andreas" <andreas.dilger@intel.com>,
Jeff Layton <jlayton@redhat.com>,
"Drokin, Oleg" <oleg.drokin@intel.com>,
"kjlu@umn.edu" <kjlu@umn.edu>, NeilBrown <neilb@suse.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ben Evans <bevans@cray.com>,
"lustre-devel@lists.lustre.org" <lustre-devel@lists.lustre.org>
Subject: Re: [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv
Date: Mon, 30 Apr 2018 14:15:35 +0300 [thread overview]
Message-ID: <20180430111535.gnycdzkok7cgi3ue@mwanda> (raw)
In-Reply-To: <CAAa=b7dPWAsqfQOWzvecHqAHYuhA63_+ya6nOMdPQ7ZaL6JB9w@mail.gmail.com>
On Sun, Apr 29, 2018 at 03:58:55PM -0500, Wenwen Wang wrote:
> It is worth fixing this bug, since it offers an opportunity for adversaries
> to provide inconsistent user data. In addition to the unwanted version
> LOV_USER_MAGIC_V1, a malicious user can also use the version
> LMV_USER_MAGIC, which is also unexpected but allowed in the function
> ll_dir_setstripe(). These inconsistent data can cause potential logical
> errors in the following execution. Hence it is necessary to re-verify the
> data copied from userspace.
>
This change doesn't really prevent any bugs in current kernels since
LMV_USER_MAGIC is the same thing as LOV_USER_MAGIC_V1 and the users are
allowed to use LOV_USER_MAGIC_V1 if they want.
But we should probably verify it just to make the code easier to read
and because there are static analysis tools which will warn about read
verify re-read type bugs.
regards,
dan carpenter
next prev parent reply other threads:[~2018-04-30 11:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-27 23:45 [PATCH] staging: luster: llite: fix a potential missing-check bug when copying lumv Wenwen Wang
2018-04-28 16:04 ` Dilger, Andreas
2018-04-29 13:20 ` Greg Kroah-Hartman
2018-04-29 20:58 ` Wenwen Wang
2018-04-30 11:15 ` Dan Carpenter [this message]
2018-04-30 22:38 ` Dilger, Andreas
2018-04-30 22:43 ` Wenwen Wang
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=20180430111535.gnycdzkok7cgi3ue@mwanda \
--to=dan.carpenter@oracle.com \
--cc=aastha.gupta4104@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=bevans@cray.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=jlayton@redhat.com \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=lustre-devel@lists.lustre.org \
--cc=neilb@suse.com \
--cc=oleg.drokin@intel.com \
--cc=wang6495@umn.edu \
/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