Bug 1971101

Summary: ceph: potential data corruption in cephfs write_begin codepath
Product: Red Hat Enterprise Linux 8 Reporter: Jeff Layton <jlayton>
Component: kernelAssignee: Jeff Layton <jlayton>
kernel sub component: CephFS QA Contact: Yogesh Mane <ymane>
Status: CLOSED ERRATA Docs Contact: John Wilkins <jowilkin>
Severity: unspecified    
Priority: urgent CC: acaringi, brdeoliv, dhowells, dwysocha, jasonborden79, mbukatov, nmurray, owasserm, pdonnell, swhiteho, tchandra, vereddy, xzhou, ymane
Version: 8.4Keywords: Triaged, ZStream
Target Milestone: beta   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kernel-4.18.0-323.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1996680 (view as bug list) Environment:
Last Closed: 2021-11-09 19:21:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1989301, 1996680    

Description Jeff Layton 2021-06-12 00:22:58 UTC
RHEL 8.4 has an incorrect optimization in the write_begin codepath, such that we could corrupt data if writing to an offset beyond the EOF, but that is within a page that already has data.

There is a fix proposed here that should go into stable kernels v5.10..v5.12. We'll want the same fix for RHEL8.4.z and RHEL8.5.

https://lore.kernel.org/ceph-devel/20210612001141.167797-1-jlayton@kernel.org/T/#mfd7fe6b4251433bd7beb6f49e01fde50f370fc70

Comment 9 Veera Raghava Reddy 2021-07-07 10:48:26 UTC
Hi Yogesh,
Plan for this BZ verification

Comment 10 Jeff Layton 2021-07-07 11:45:57 UTC
I should mention too that there is a new xfstest for this problem:

    https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/commit/?id=80b8fe47d01347d9c5c433440861f41b8954463e

I recommend using that to verify this bug.

Comment 25 errata-xmlrpc 2021-11-09 19:21:19 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: kernel security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2021:4356