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 2183556 - dm: discard IOs on striped or snap LVs can trigger data corruption [RHEL-9.3]
Summary: dm: discard IOs on striped or snap LVs can trigger data corruption [RHEL-9.3]
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: kernel
Version: 9.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Ben Marzinski
QA Contact: Filip Suba
URL:
Whiteboard:
Depends On:
Blocks: 2183559 2184420 2184429
TreeView+ depends on / blocked
 
Reported: 2023-03-31 15:29 UTC by Ben Marzinski
Modified: 2023-11-07 10:41 UTC (History)
5 users (show)

Fixed In Version: kernel-5.14.0-304.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2183559 2184420 2184429 (view as bug list)
Environment:
Last Closed: 2023-11-07 08:43:49 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
reproducer script (270 bytes, application/x-shellscript)
2023-03-31 17:52 UTC, Ben Marzinski
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Gitlab redhat/centos-stream/src/kernel centos-stream-9 merge_requests 2289 0 None opened dm: discard IOs on striped or snap LVs can trigger data corruption 2023-04-01 02:20:03 UTC
Red Hat Issue Tracker RHELPLAN-153767 0 None None None 2023-03-31 15:32:40 UTC
Red Hat Knowledge Base (Solution) 7010432 0 None None None 2023-05-02 16:25:28 UTC
Red Hat Product Errata RHSA-2023:6583 0 None None None 2023-11-07 08:44:24 UTC

Description Ben Marzinski 2023-03-31 15:29:38 UTC
Description of problem:
DM is improperly processing of duplicate abnormal bios, such as discards, write zeros and secure erase. This can cause dm-stripe and dm-snap to send IO to the wrong disk or wrong part of a disk, potentially causing data corruption

Version-Release number of selected component (if applicable):
kernel-5.14.0-124.el9

How reproducible:
Always

Steps to Reproduce:
1. # vgcreate vg <dev1> <dev2> <dev3> <dev4>
2. # lvcreate -l 100%VG  --stripes 2 vg -n lv
3. # blkdiscard /dev/vg/lv

Actual results:
blkdiscard: /dev/vg/lv: BLKDISCARD ioctl failed: Input/output error

[  875.631996] blkdiscard: attempt to access beyond end of device
[  875.631996] loop0: rw=2051, sector=2048, nr_sectors = 147456 limit=81920
[  875.632009] blkdiscard: attempt to access beyond end of device
[  875.632009] loop1: rw=2051, sector=2048, nr_sectors = 147456 limit=81920

Expected results:
No error

Additional info:

Comment 1 Ben Marzinski 2023-03-31 17:27:27 UTC
The fix for this issue is in the following linux-dm commits:

f7b58a69fad9 dm: fix improper splitting for abnormal bios
666eed46769d dm: fix __send_duplicate_bios() to always allow for splitting IO

The upstream kernel bug for this issue is here:
https://bugzilla.kernel.org/show_bug.cgi?id=217273

Comment 2 Ben Marzinski 2023-03-31 17:52:19 UTC
Created attachment 1954924 [details]
reproducer script

Comment 6 Ben Marzinski 2023-04-04 15:59:57 UTC
Moving zstream request to rhel-8.2 version of this bug, bz 2184420.

Comment 11 Filip Suba 2023-05-01 13:06:17 UTC
Verified with kernel-5.14.0-304.el9.

Comment 13 errata-xmlrpc 2023-11-07 08:43:49 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 (Important: 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-2023:6583


Note You need to log in before you can comment on or make changes to this bug.