From: "Theodore Ts'o" <tytso@mit.edu>
To: Sahitya Tummala <stummala@codeaurora.org>
Cc: Andreas Dilger <adilger.kernel@dilger.ca>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] ext4: fix use-after-free in dx_release()
Date: Fri, 10 May 2019 22:01:59 -0400 [thread overview]
Message-ID: <20190511020159.GF2534@mit.edu> (raw)
In-Reply-To: <1557304443-18653-1-git-send-email-stummala@codeaurora.org>
On Wed, May 08, 2019 at 02:04:03PM +0530, Sahitya Tummala wrote:
> The buffer_head (frames[0].bh) and it's corresping page can be
> potentially free'd once brelse() is done inside the for loop
> but before the for loop exits in dx_release(). It can be free'd
> in another context, when the page cache is flushed via
> drop_caches_sysctl_handler(). This results into below data abort
> when accessing info->indirect_levels in dx_release().
>
> Unable to handle kernel paging request at virtual address ffffffc17ac3e01e
> Call trace:
> dx_release+0x70/0x90
> ext4_htree_fill_tree+0x2d4/0x300
> ext4_readdir+0x244/0x6f8
> iterate_dir+0xbc/0x160
> SyS_getdents64+0x94/0x174
>
> Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Nice catch. Thanks, applied.
- Ted
prev parent reply other threads:[~2019-05-11 17:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 8:34 [PATCH v2] ext4: fix use-after-free in dx_release() Sahitya Tummala
2019-05-08 8:49 ` Andreas Dilger
2019-05-11 2:01 ` Theodore Ts'o [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=20190511020159.GF2534@mit.edu \
--to=tytso@mit.edu \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stummala@codeaurora.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;
as well as URLs for NNTP newsgroup(s).