[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a77ce068-aa0f-77f3-abc4-58c0224757b0@huawei.com>
Date: Fri, 30 Oct 2020 09:23:38 +0800
From: yangerkun <yangerkun@...wei.com>
To: Ritesh Harjani <riteshh@...ux.ibm.com>, <adilger@...ger.ca>
CC: <tytso@....edu>, <jack@...e.com>, <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] ext4: do not use extent after put_bh
在 2020/10/30 0:08, Ritesh Harjani 写道:
>
>
> On 10/28/20 11:26 AM, yangerkun wrote:
>> ext4_ext_search_right will read more extent block and call put_bh after
>> we get the information we need. However ret_ex will break this and may
>> cause use-after-free once pagecache has been freed. Fix it by dup the
>> extent we need.
>
>
> It would be good if we have a test case to reproduce it. Do you?
> Ideally it should go in fstests, if you have some way to forcefully
> reproduce it/simulate it. Let me know, if needed, I can as well help to
> get those into fstests.
Sorry for that. I found this bug while reading source code. Not with a
testcase.
And time leave for drop pagecache is so small(time between
get_implied_cluster_alloc and ext4_ext_search_right in
ext4_ext_map_blocks, other caller for ext4_ext_search_right won't use
@ret_ex). It may difficult to reproduce it expect a delay injection.
Thanks,
Kun.
>
> -ritesh
> .
Powered by blists - more mailing lists