[FreeBSD-Announce] FreeBSD Errata Notice FreeBSD-EN-22:01.fsck_ffs

From: FreeBSD Errata Notices <errata-notices_at_freebsd.org>
Date: Tue, 11 Jan 2022 19:38:14 UTC
Hash: SHA512

FreeBSD-EN-22:01.fsck_ffs                                       Errata Notice
                                                          The FreeBSD Project

Topic:          fsck_ffs fails to correct certain errors

Category:       base
Module:         fsck_ffs
Announced:      2022-01-11
Affects:        FreeBSD 13.0
Corrected:      2021-05-19 21:38:21 UTC (stable/13, 13.0-STABLE)
                2022-01-11 18:14:57 UTC (releng/13.0, 13.0-RELEASE-p6)

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

The fsck_ffs(8) program checks and corrects errors in the UFS/FFS
filesystem.  One error that it detects and corrects is when two
different files both claim the same block on the disk.  This error
occurs rarely and is usually caused by hardware failure.

II.  Problem Description

fsck_ffs(8) was not able to correct blocks claimed by multiple files.

III. Impact

When duplicate block allocation has occurred, the filesystem is
unusable until it is corrected.

IV.  Workaround

No practical workaround is available.

Duplicate blocks can be eliminated using the fsdb(8) program, but
requires hours of work by a filesystem expert.

V.   Solution

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

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
arm64 platforms can be updated via the freebsd-update(8) utility:

# freebsd-update fetch
# freebsd-update install

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 https://security.FreeBSD.org/patches/EN-22:01/fsck_ffs.patch
# fetch https://security.FreeBSD.org/patches/EN-22:01/fsck_ffs.patch.asc
# gpg --verify fsck_ffs.patch.asc

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

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

c) Recompile the operating system using buildworld and installworld as
described in <URL:https://www.FreeBSD.org/handbook/makeworld.html>.

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
- -------------------------------------------------------------------------
stable/13/                              e198c1dc8f6f    stable/13-n245745
releng/13.0/                            3286a8dc8382  releng/13.0-n244768
- -------------------------------------------------------------------------

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

# git show --stat <commit hash>

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