BSDSec

deadsimple BSD Security Advisories and Announcements

FreeBSD Errata Notice FreeBSD-EN-15:07.zfs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

=============================================================================
FreeBSD-EN-15:07.zfs                                            Errata Notice
                                                          The FreeBSD Project

Topic:          ZFS Reliability Improvements

Category:       contrib
Module:         zfs
Announced:      2015-06-09
Affects:        FreeBSD 10.1 and later
Corrected:      2014-12-05 00:32:33 UTC (stable/10, 10.1-STABLE)
                2015-06-09 22:13:25 UTC (releng/10.1, 10.1-RELEASE-p11)

For general information regarding FreeBSD Errata Notices and Security
Advisories, including descriptions of the fields above, security
branches, and the following sections, please visit
<URL:https://security.freebsd.org/>.

I.   Background

ZFS is one of several filesystems available on FreeBSD.

ZFS on FreeBSD supports TRIM/UNMAP which helps flash based storage medium to
maintain peek performance.

ZFS uses different layers of disk cache to speed up read and write
operations, and supports second level ARC (L2ARC) which can be used as a
second layer cache, which provides storage for less frequently accessed
data that would not fit into RAM but still accessed often, providing
optimal cost for performance.

ZFS supports compression in L2ARC data which optimizes its space efficiency.

II.  Problem Description

When the ZFS filesystem on a file backed pool is used with TRIM support
enabled, which is the default, ZIO_TYPE_FREE requests where incorrectly
processed as a write request.

When the ZFS filesystem is using L2ARC and when L2ARC compression is used,
the compression buffer are not properly released sometimes.

III. Impact

The first problem will panic the system when it happens.

The second problem will exhibit as a memory leak, which would lead to
performance degradation and eventually a memory overflow, which would
lead to a panic.

IV.  Workaround

The first issue can be mitigated by disabling TRIM for ZFS using
the loader option vfs.zfs.trim.enabled=0.

The second issue can be mitigated by disabling L2ARC.

V.   Solution

Perform one of the following:

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

2) To update your present system via a binary patch:

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

# freebsd-update fetch
# freebsd-update install

3) To update your present 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-15:07/zfs.patch
# fetch https://security.FreeBSD.org/patches/EN-15:07/zfs.patch.asc
# 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:https://www.FreeBSD.org/handbook/kernelconfig.html> and reboot the
system.

VI.  Correction details

The following list contains the correction revision numbers for each
affected branch.

Branch/path                                                      Revision
- -------------------------------------------------------------------------
stable/10/                                                        r275492
releng/10.1/                                                      r284193
- -------------------------------------------------------------------------

To see which files were modified by a particular revision, run the
following command, replacing NNNNNN with the revision number, on a
machine with Subversion installed:

# svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base

Or visit the following URL, replacing NNNNNN with the revision number:

<URL:https://svnweb.freebsd.org/base?view=revision&revision=NNNNNN>

VII. References

The latest revision of this Errata Notice is available at
https://security.FreeBSD.org/advisories/FreeBSD-EN-15:07.zfs.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.1.4 (FreeBSD)

iQIcBAEBCgAGBQJVd2mmAAoJEO1n7NZdz2rnNCQQAJzkz6y4TkdJ5Qn+cj5Z/VdV
LTgFnETzhHTck4TwE6xw+iRRRkwFnIC6srCJZt+ueMp1DPILTOK0WivFn1HLsHlN
nhnCjhhqpOsHyuYGPyH3ca0S5ObA9F+yE7uMtIbacYTgQHCx1lmjasNY6c1zc39v
6DkdP+qejMa4X2Fro7Glf6aHN+nV6hNTrXEbOlncf3sKqVdGoW6xZ0E+JCBELYnl
ojVUTbnrNmdj/syIDoo2Wrl0h7xTaIc9rjAtDqKJ45F2z7E156PRYf3/0SaRJOdU
w+NFr0YU87Ho5o+X5YkovpGi1Da+nTBSXkkkwGe+1eRrsbvFG5Imi0c100ZMxG9L
TXq8Ny/fIb6IIJftrwIDlTqLiB2vmiZB4NNh9BrpxAvII3dON0uUexvpp4I6mABE
s4VeSgYLGIOTq8wEVVtoPWNVfAEjMZfn7v9nkviItdY4sX8S+crxiHeFeVc8Uko5
bBH8ddXL6x55DG9qzWK/owaN7oSbbVSVPRAxghpdppAAeE8SUPANRn/RE0pZCx/a
dquTVZlIR87BLFCK5KURi2B1PH7QmzZXzMFHDyOfKQtkOmnqeZqlYbaVM6zZ54ZP
a11CmVKPu/pyviO49OBH/SFDkzVuwoqsqR7NfqZd4mj9kIbqxAxjxgxi3n3bA96l
YNNoIXxML3p8aRyS3UOZ
=7KJF
-----END PGP SIGNATURE-----
_______________________________________________
freebsd-announce@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-announce
To unsubscribe, send any mail to "freebsd-announce-unsubscribe@freebsd.org"