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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 23 Apr 2018 00:57:24 +0200
From:   Jan Kara <jack@...e.cz>
To:     Amir Goldstein <amir73il@...il.com>
Cc:     Theodore Tso <tytso@....edu>, Jan Kara <jack@...e.cz>,
        linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext4: do not update s_last_mounted of a frozen fs

On Sun 22-04-18 09:12:10, Amir Goldstein wrote:
> If fs is frozen after mount and before the first file open, the
> update of s_last_mounted bypasses freeze protection and prints out
> a WARNING splat:
> 
> $ mount /vdf
> $ fsfreeze -f /vdf
> $ cat /vdf/foo
> 
> [   31.578555] WARNING: CPU: 1 PID: 1415 at
> fs/ext4/ext4_jbd2.c:53 ext4_journal_check_start+0x48/0x82
> 
> [   31.614016] Call Trace:
> [   31.614997]  __ext4_journal_start_sb+0xe4/0x1a4
> [   31.616771]  ? ext4_file_open+0xb6/0x189
> [   31.618094]  ext4_file_open+0xb6/0x189
> 
> This fix might not be free of open vs. freeze race, but it closes
> a big hole.
> 
> [backport hint: to apply to stable tree, just need to repace
>                 sb_rdonly(sb) with (sb->s_flags & MS_RDONLY)]
> 

Thanks for the patch. But a proper (race-free) fix for this is to use
sb_start_intwrite(), before starting a handle and sb_end_intwrite() after
stopping it.

								Honza

-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ