Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.rc > #392072 > unrolled thread

Bug#1106035: zfs: Upstream patch for old encryption data corruption bug

Started byLeseratte10@vodafone.de
First post2025-05-19 07:00 +0200
Last post2025-07-02 18:20 +0200
Articles 6 — 3 participants

Back to article view | Back to linux.debian.bugs.rc


Contents

  Bug#1106035: zfs: Upstream patch for old encryption data corruption bug Leseratte10@vodafone.de - 2025-05-19 07:00 +0200
    Processed: Re: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream  patch for old encryption data corruption bug "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-05-19 08:00 +0200
    Bug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug Florian Bach <Leseratte10@vodafone.de> - 2025-05-19 19:40 +0200
    Bug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug Leseratte10@vodafone.de - 2025-05-21 16:30 +0200
    Bug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug Florian Bach <Leseratte10@vodafone.de> - 2025-06-21 14:30 +0200
    Processed: Deliberately removing zfs from trixie "Debian Bug Tracking System" <owner@bugs.debian.org> - 2025-07-02 18:20 +0200

#392072 — Bug#1106035: zfs: Upstream patch for old encryption data corruption bug

FromLeseratte10@vodafone.de
Date2025-05-19 07:00 +0200
SubjectBug#1106035: zfs: Upstream patch for old encryption data corruption bug
Message-ID<KO0Lw-48CS-1@gated-at.bofh.it>
Package: zfs-dkms
Version: 2.3.2-1
Severity: grave
Tags: upstream patch

Dear Maintainer,

since the release of ZFS 2.0.0 back in 2020, ZFS contains a corruption 
bug where snapshots and/or a dataset can get corrupted when using ZFS 
encryption, if you're performing a "zfs send" at the same time as making 
a snapshot (which can lead to data loss in specific scenarios, which is 
why I tagged this as 'grave'; feel free to downgrade if you disagree).

This has been discussed upstream for years at 
https://github.com/openzfs/zfs/issues/12014, but since the corruption 
wasn't deterministic and it was hard to create a proper test, this was 
apparently extremely hard to bisect.

Recently, though, people finally managed to reproduce this issue in a 
controlled environment, were able to bisect the bug to merge request 
https://github.com/openzfs/zfs/pull/7958.

A proposed fix for the issue is available at 
https://github.com/openzfs/zfs/pull/17340. If I'm reading the comments 
correctly, then this is clear broken behavior (two functions are called 
that should never be called in this way), and even though it's not 100% 
certain yet that this is definitely the fix for this long-standing 
issue, people are fairly certain it is, and there's already discussions 
about backporting it to 2.2.x (https://github.com/openzfs/zfs/pull/17325).

Given that we're in Hard Freeze already, I doubt that zfs-2.3.3 will get 
released in time to still make it into trixie.

However, given that A) the fix is extremely simple (two lines of code 
changed), B) it fixes a bug that can lead to data loss, C) the current 
implementation is definitely wrong, I was wondering if that change can 
be added to Debian's package and released as a 2.3.2-2 or similar (and 
maybe even backported to bookworm-bpo).

[toc] | [next] | [standalone]


#392073 — Processed: Re: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-05-19 08:00 +0200
SubjectProcessed: Re: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug
Message-ID<KO1Hz-49bu-1@gated-at.bofh.it>
In reply to#392072
Processing control commands:

> found -1 2.0.3-1
Bug #1106035 [zfs-dkms] zfs: Upstream patch for old encryption data corruption bug
Marked as found in versions zfs-linux/2.0.3-1.

-- 
1106035: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106035
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#392111 — Bug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug

FromFlorian Bach <Leseratte10@vodafone.de>
Date2025-05-19 19:40 +0200
SubjectBug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug
Message-ID<KOcD0-4g9q-3@gated-at.bofh.it>
In reply to#392072

Am 19.05.25 um 07:46 schrieb Antonio Russo:
> 
> There is progress on this, but it is occurring in real time.  My suggestion
> is to wait for upstream to decide they understand it, finalize the PR, 
> merge
> it, and then back port the fix to 2.3.  This last step may be painful, 
> since
> the analysis may have to be re-done on the early state of the code in 2.3.

The fix has just been merged into master so it seems like upstream 
thinks it's finalized enough.

As for backporting, should be fairly easy. I took a look at the affected 
file, and that file (or at least the related code) hasn't been modified 
since it was introduced 6 years ago, so should be fairly simple to 
backport to whatever version, even way back to 2.0.0 if necessary. 
Unless I'm missing something?


> I would recommend reducing the severity of this bug to important so that
> zfs is not removed from trixie.

I thought a bug with potential data loss would be correctly classified 
as "grave", but I don't know much about how Debian usually handles 
situations like these where the bug has existed for a long time already. 
I'm happy to downgrade this to important (if necessary) if the package 
will be removed from trixie otherwise. But right now, at least to me, 
there should still be enough time to get this fixed, right?

Best,
Florian Bach

[toc] | [prev] | [next] | [standalone]


#392194 — Bug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug

FromLeseratte10@vodafone.de
Date2025-05-21 16:30 +0200
SubjectBug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug
Message-ID<KOSCd-4HNB-1@gated-at.bofh.it>
In reply to#392072
On Tue, 20 May 2025 05:54:30 -0600 Antonio Russo wrote:
> See also [1], which presumably will cherry-pick the fix onto 2.2
> without changes.  If that is indeed the case, we should probably
> cherry pick it as is, too.

One of the other patches referenced in that discussion ([1]) should 
probably be included as well. Either as part of a 2.3.3 release (if that 
happens soon enough) or as a debian patch. That patch is basically the 
same error (mismatch between dsl_dataset_rele and 
dsl_dataset_rele_flags) as the one that's confirmed to cause the data 
corruption, just in another location (so it might be causing other 
corruption elsewhere) and it's also mentioned for inclusion in 2.2.8.

Best,
Florian

[1] https://github.com/openzfs/zfs/pull/17353

[toc] | [prev] | [next] | [standalone]


#393187 — Bug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug

FromFlorian Bach <Leseratte10@vodafone.de>
Date2025-06-21 14:30 +0200
SubjectBug#1106035: [Pkg-zfsonlinux-devel] Bug#1106035: zfs: Upstream patch for old encryption data corruption bug
Message-ID<L05w5-c7X9-1@gated-at.bofh.it>
In reply to#392072
Is there any update about this bug report yet? Will the fix be 
backported to the current release or will zfs 2.3.3 still make it into 
trixie?

ZFS 2.3.3 which includes all these fixes has been released last 
Thursday. Is there any work being done either getting this version 
packaged, or back-porting the bugfixes?

In its current state, zfs would get autoremoved on July 2nd, so either a 
backport or a new release is needed until then, or the severity needs to 
be reduced (which is a solution I don't really like).

Best,
Florian

[toc] | [prev] | [next] | [standalone]


#393347 — Processed: Deliberately removing zfs from trixie

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2025-07-02 18:20 +0200
SubjectProcessed: Deliberately removing zfs from trixie
Message-ID<L48lH-eKBD-1@gated-at.bofh.it>
In reply to#392072
Processing control commands:

> severity -1 important
Bug #1106035 [zfs-dkms] zfs: Upstream patch for old encryption data corruption bug
Severity set to 'important' from 'grave'

-- 
1106035: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106035
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.rc


csiph-web