Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1990134

Summary: Fix data corruption in nbdkit-cow-filter and nbdkit-cache-filter
Product: Red Hat Enterprise Linux 9 Reporter: Richard W.M. Jones <rjones>
Component: nbdkitAssignee: Virtualization Maintenance <virt-maint>
Status: CLOSED CURRENTRELEASE QA Contact: mxie <mxie>
Severity: high Docs Contact:
Priority: high    
Version: 9.0CC: eblake, juzhou, kkiwi, mxie, rjones, tyan, tzheng, virt-maint, vwu, xiaodwan
Target Milestone: betaKeywords: Triaged
Target Release: ---Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: nbdkit-1.26.3-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1990135 (view as bug list) Environment:
Last Closed: 2021-12-07 21:35:16 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: 1990135, 2040775    

Description Richard W.M. Jones 2021-08-04 19:56:37 UTC
Description of problem:

A data corrupter bug has been identified in the following
nbdkit filters:

https://libguestfs.org/nbdkit-cow-filter.1.html
https://libguestfs.org/nbdkit-cache-filter.1.html

It's quite subtle, but it affects modular virt-v2v and was
picked up by Ming Xie during testing.

The full bug is described in this link, as well as a simple way
to reproduce it, and the fix:

https://listman.redhat.com/archives/libguestfs/2021-August/msg00044.html

Version-Release number of selected component (if applicable):

All versions of nbdkit since 1.14 up to 1.27.4

How reproducible:

100%

Steps to Reproduce:
1. See link above.

Comment 3 mxie@redhat.com 2021-08-06 05:44:56 UTC
Reproduce the bug with nbdkit-1.26.2-2.el9.x86_64 

Steps to reproduce:

1. # nbdkit --filter=cow data "33 * 100000" --run 'nbdsh -u $uri -c "h.trim(100000, 0)" ; nbdcopy $uri - | hexdump -C'
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00010000  21 21 21 21 21 21 21 21  21 21 21 21 21 21 21 21  |!!!!!!!!!!!!!!!!|
*
000186a0


Verify the bug with nbdkit-1.26.3-1.el9.x86_64

Steps:
1.# nbdkit --filter=cow data "33 * 100000" --run 'nbdsh -u $uri -c "h.trim(100000, 0)" ; nbdcopy $uri - | hexdump -C'
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000186a0


Result:
   The bug has been fixed, so move the bug from ON_QA to VERIFIED