FreeBSD Errata Notice FreeBSD-EN-22:13.zfs

From: FreeBSD Errata Notices <>
Date: Mon, 21 Mar 2022 19:38:55 UTC
Hash: SHA512

FreeBSD-EN-22:13.zfs                                      Errata Notice
                                                          The FreeBSD Project

Topic:          ZFS data loss

Category:       contrib
Module:         zfs
Announced:      2022-03-21
Affects:        FreeBSD 13.0-p8
Corrected:      2022-03-20 14:10:36 UTC (releng/13.0, 13.0-RELEASE-p9)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit

I.   Background

ZFS is one of several filesystems available on FreeBSD.  ZFS supports
many advanced features, including checksumming, transparent compression,
and snapshots.

II.  Problem Description

Erratum FreeBSD-EN-22:11.zfs was addressed by a patch which modified a
ZFS kernel function that determines whether the in-memory copy of a
filesystem object is dirty with respect to its representation on stable
storage.  The modification contained a bug which could cause the
function to return false negatives.

III. Impact

Under heavy load, files written to a ZFS filesystem may not be correctly
saved to disk.

IV.  Workaround

No workaround is available, but systems not using ZFS are not affected.

V.   Solution

Upgrade your system to a supported FreeBSD stable or release / security
branch (releng) dated after the correction date and reboot.

Perform one of the following:

1) To update your system via a binary patch:

Systems running a RELEASE version of FreeBSD on the amd64, i386, or
(on FreeBSD 13 and later) arm64 platforms can be updated via the
freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install
# shutdown -r +10min "Rebooting for an errata update"

2) To update your system via a source code patch:

The following patches have been verified to apply to the applicable
FreeBSD release branches.

a) Download the relevant patch from the location below, and verify the
detached PGP signature using your PGP utility.

# fetch
# fetch
# gpg --verify zfs.patch.asc

b) Apply the patch.  Execute the following commands as root:

# cd /usr/src
# patch < /path/to/patch

c) Recompile your kernel as described in
<URL:> and reboot the

VI.  Correction details

This issue is corrected by the corresponding Git commit hash or Subversion
revision number in the following stable and release branches:

Branch/path                             Hash                     Revision
- -------------------------------------------------------------------------
releng/13.0/                            b8ae329db949  releng/13.0-n244788
- -------------------------------------------------------------------------

For FreeBSD 13 and later:

Run the following command to see which files were modified by a
particular commit:

# git show --stat NNNNNNNNNNNN

Or visit the following URL, replacing NNNNNN with the hash:


To determine the commit count in a working tree (for comparison against
nNNNNNN in the table above), run:

# git rev-list --count --first-parent HEAD

VII. References

The latest revision of this advisory is available at