lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 14 Nov 2018 13:54:39 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <yuchao0@...wei.com>
Cc:     Chao Yu <chao@...nel.org>, Yunlong Song <yunlong.song@...wei.com>,
        yunlong.song@...oud.com, miaoxie@...wei.com,
        bintian.wang@...wei.com, shengyong1@...wei.com,
        heyunlei@...wei.com, linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] f2fs: avoid GC causing encrypted file corrupted

On 11/13, Chao Yu wrote:
> Jaegeuk,
> 
> On 2018/9/18 21:21, Chao Yu wrote:
> > On 2018/9/18 20:39, Yunlong Song wrote:
> >> The encrypted file may be corrupted by GC in following case:
> >>
> >> Time 1: | segment 1 blkaddr = A |  GC -> | segment 2 blkaddr = B |
> >> Encrypted block 1 is moved from blkaddr A of segment 1 to blkaddr B of
> >> segment 2,
> >>
> >> Time 2: | segment 1 blkaddr = B |  GC -> | segment 3 blkaddr = C |
> >>
> >> Before page 1 is written back and if segment 2 become a victim, then
> >> page 1 is moved from blkaddr B of segment 2 to blkaddr Cof segment 3,
> >> during the GC process of Time 2, f2fs should wait for page 1 written back
> >> before reading it, or move_data_block will read a garbage block from
> >> blkaddr B since page is not written back to blkaddr B yet.
> >>
> >> Commit 6aa58d8a ("f2fs: readahead encrypted block during GC") introduce
> >> ra_data_block to read encrypted block, but it forgets to add
> >> f2fs_wait_on_page_writeback to avoid racing between GC and flush.
> >>
> >> Signed-off-by: Yunlong Song <yunlong.song@...wei.com>
> > 
> > Reviewed-by: Chao Yu <yuchao0@...wei.com>
> 
> I've reviewed this patch, could you add missing tag in the patch located in
> dev-test branch?

Sorry, done.

> 
> Thanks,
> 
> > 
> > Thanks,
> > 
> > .
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ