From: Gao Xiang <hsiangkao@redhat.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: stable@vger.kernel.org, linux-erofs@lists.ozlabs.org,
Chao Yu <yuchao0@huawei.com>
Subject: Re: [PATCH for-4.19] erofs: fix extended inode could cross boundary
Date: Mon, 26 Apr 2021 16:43:07 +0800 [thread overview]
Message-ID: <20210426084307.GA4042836@xiangao.remote.csb> (raw)
In-Reply-To: <YIZ8UOo0c2CLt8pl@kroah.com>
On Mon, Apr 26, 2021 at 10:39:44AM +0200, Greg Kroah-Hartman wrote:
> On Mon, Apr 26, 2021 at 04:29:33PM +0800, Gao Xiang wrote:
> > commit 0dcd3c94e02438f4a571690e26f4ee997524102a upstream.
> >
> > Each ondisk inode should be aligned with inode slot boundary
> > (32-byte alignment) because of nid calculation formula, so all
> > compact inodes (32 byte) cannot across page boundary. However,
> > extended inode is now 64-byte form, which can across page boundary
> > in principle if the location is specified on purpose, although
> > it's hard to be generated by mkfs due to the allocation policy
> > and rarely used by Android use case now mainly for > 4GiB files.
> >
> > For now, only two fields `i_ctime_nsec` and `i_nlink' couldn't
> > be read from disk properly and cause out-of-bound memory read
> > with random value.
> >
> > Let's fix now.
> >
> > Fixes: 431339ba9042 ("staging: erofs: add inode operations")
> > Cc: <stable@vger.kernel.org> # 4.19+
> > Link: https://lore.kernel.org/r/20200729175801.GA23973@xiangao.remote.csb
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> > [ Gao Xiang: resolve non-trivial conflicts for latest 4.19.y. ]
> > Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
> > ---
> > drivers/staging/erofs/inode.c | 135 ++++++++++++++++++++++------------
> > 1 file changed, 90 insertions(+), 45 deletions(-)
>
> Thanks for the backport, I'll queue it up after this latest round of
> stable kernels is released later this week.
Thanks Greg, sorry about the delay.
Sounds good to me.
Thanks,
Gao Xiang
>
> greg k-h
>
prev parent reply other threads:[~2021-04-26 8:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 8:29 [PATCH for-4.19] erofs: fix extended inode could cross boundary Gao Xiang
2021-04-26 8:39 ` Greg Kroah-Hartman
2021-04-26 8:43 ` Gao Xiang [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=20210426084307.GA4042836@xiangao.remote.csb \
--to=hsiangkao@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-erofs@lists.ozlabs.org \
--cc=stable@vger.kernel.org \
--cc=yuchao0@huawei.com \
/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