[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180430111535.gnycdzkok7cgi3ue@mwanda>
Date: Mon, 30 Apr 2018 14:15:35 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Wenwen Wang <wang6495@....edu>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
Aastha Gupta <aastha.gupta4104@...il.com>,
"Dilger, Andreas" <andreas.dilger@...el.com>,
Jeff Layton <jlayton@...hat.com>,
"Drokin, Oleg" <oleg.drokin@...el.com>,
"kjlu@....edu" <kjlu@....edu>, NeilBrown <neilb@...e.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Ben Evans <bevans@...y.com>,
"lustre-devel@...ts.lustre.org" <lustre-devel@...ts.lustre.org>
Subject: Re: [PATCH] staging: luster: llite: fix a potential missing-check
bug when copying lumv
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
Powered by blists - more mailing lists