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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 30 Nov 2023 16:32:10 +0530
From: Ritesh Harjani (IBM) <>
To: Jan Kara <>, Ted Tso <>
Cc:, Jan Kara <>,
Subject: Re: [PATCH v2] ext4: Fix warning in ext4_dio_write_end_io()

Jan Kara <> writes:

> The syzbot has reported that it can hit the warning in
> ext4_dio_write_end_io() because i_size < i_disksize. Indeed the
> reproducer creates a race between DIO IO completion and truncate
> expanding the file and thus ext4_dio_write_end_io() sees an inconsistent
> inode state where i_disksize is already updated but i_size is not
> updated yet. Since we are careful when setting up DIO write and consider
> it extending (and thus performing the IO synchronously with i_rwsem held
> exclusively) whenever it goes past either of i_size or i_disksize, we
> can use the same test during IO completion without risking entering
> ext4_handle_inode_extension() without i_rwsem held. This way we make it
> obvious both i_size and i_disksize are large enough when we report DIO
> completion without relying on unreliable WARN_ON.
> Reported-by:
> Fixes: 91562895f803 ("ext4: properly sync file size update after O_SYNC direct IO")
> Signed-off-by: Jan Kara <>
> ---
>  fs/ext4/file.c | 14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> Changes since v1:
> * Expanded comment in ext4_inode_extension_cleanup()

Looks good to me. Please feel free to add - 

Reviewed-by: Ritesh Harjani (IBM) <>

Powered by blists - more mailing lists