• FreeBSD Errata Notice FreeBSD-EN-26:30.vfs

    From FreeBSD Errata Notices@3:633/10 to All on Wednesday, November 18, 2026 01:00:13
    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA512

    ============================================================================= FreeBSD-EN-26:30.vfs Errata Notice
    The FreeBSD Project

    Topic: Large file reads produce incorrect return value

    Category: core
    Module: vfs
    Announced: 2026-11-17
    Credits: Thomas Waldmann <tw@waldmann-edv.de>
    Affects: All supported versions of FreeBSD.
    Corrected: 2026-11-05 19:32:59 UTC (stable/15, 15.1-STABLE)
    2026-11-17 17:07:29 UTC (releng/15.1, 15.1-RELEASE-p7)
    2026-11-14 15:49:06 UTC (stable/14, 14.5-STABLE)
    2026-11-17 17:04:55 UTC (releng/14.5, 14.5-RELEASE-p4)
    2026-11-17 17:03:55 UTC (releng/14.4, 14.4-RELEASE-p13)

    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

    The uiomove() function is used within the kernel to copy data between
    buffers when either the source, the destination, or both are in user
    space, particularly for the read(2) / recv(2) and write(2) / send(2)
    families of system calls. A single uiomove() call can process at most
    2^31 - 1 bytes (one less than 2 GiB), less than a single read(2) may
    request.

    II. Problem Description

    When a process read from a file, the kernel first issued a dummy
    uiomove() call to ensure that the destination buffer was mapped and
    loaded into physical memory, without checking that the requested
    length was within the range that uiomove() accepts. As a consequence
    of arithmetic overflow, although the read itself was performed
    correctly, uiomove() miscounted the amount of memory that was mapped,
    and this incorrect value was returned to the caller as the amount of
    data that was received.

    III. Impact

    The exact impact will depend on how closely the application checks the
    return value from the read operation. In the most common case, a read(2)
    call will appear to return more data than was requested, and the
    application will either interpret this as an I/O error or blindly attempt
    to access the additional data and crash. Applications that never attempt
    to read 2 GiB or more in a single operation are not affected.

    IV. Workaround

    Set the debug.vn_io_fault_enable sysctl to 0:

    # sysctl debug.vn_io_fault_enable=0

    To keep this setting after a reboot, add the line
    "debug.vn_io_fault_enable=0" to /etc/sysctl.conf.

    V. Solution

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

    Perform one of the following:

    1) To update your system installed from base system packages:

    Systems running a 15.0-RELEASE or later version of FreeBSD on the amd64 or arm64 platforms, which were installed using base system packages, can be updated via the pkg(8) utility:

    # pkg upgrade -r FreeBSD-base
    # shutdown -r +10min "Rebooting for an erratum fix"

    2) To update your system installed from binary distribution sets:

    Systems running a RELEASE version of FreeBSD on the amd64 or arm64 platforms which were not installed using base system packages can be updated via the freebsd-update(8) utility:

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

    3) 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.

    [FreeBSD 15.x]
    # fetch https://security.FreeBSD.org/patches/EN-26:30/vfs-15.patch
    # fetch https://security.FreeBSD.org/patches/EN-26:30/vfs-15.patch.asc
    # gpg --verify vfs-15.patch.asc

    [FreeBSD 14.x]
    # fetch https://security.FreeBSD.org/patches/EN-26:30/vfs-14.patch
    # fetch https://security.FreeBSD.org/patches/EN-26:30/vfs-14.patch.asc
    # gpg --verify vfs-14.patch.asc

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

    # cd /usr/src
    # patch -E -p0 < /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

    This issue is corrected as of the corresponding Git commit hash in the following stable and release branches:

    Branch/path Hash Revision
    - ------------------------------------------------------------------------- stable/15/ 094663270363 stable/15-n286667 releng/15.1/ c86b8f818fb9 releng/15.1-n283646 stable/14/ 488e9144c154 stable/14-n275538 releng/14.5/ de97544ca485 releng/14.5-n274901 releng/14.4/ 8bd1c62819d3 releng/14.4-n273800
    - -------------------------------------------------------------------------

    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:

    <URL:https://cgit.freebsd.org/src/commit/?id=NNNNNN>

    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

    <URL:https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=298159>

    The latest revision of this advisory is available at <URL:https://security.FreeBSD.org/advisories/FreeBSD-EN-26:30.vfs.asc> -----BEGIN PGP SIGNATURE-----

    iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmr82iEbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrvHbsP/1rkzWrIeq5QyEYmsgFX ttOOPTjOodBVE5b6bsUkscpA+eP/kPkV96R5mwPHIOzu5oxqTMWI9GEYz6rjQ0XI H/IRk9ju4MCoDApi89mQk/uVhUTWOuUqUC1y52zqynEj5j677J/I9OY8bz/tobRa bUqNcQ8rLgKGqOM9AiFTaWIEresxQaHW5GGTEB5caki6Xn0lVS50YsIDSYTQimnS ACL+JyTel27Yyb7hWwjigoOy+c6M5ygjSy41I9FzufczR3Jq8k9xF5WCJAVjYbZ4 ozK0BK06eY7Gh20J1dnvvr4+0G4CKW++HUojanC3zIvQOBazXxalY3p68lyVZipa ZtlsvpSnSJLyWiBukXW8WPqxkDnzej4b4qa3Abww43i+FwbWLU3ElNaWz5WMWDtV Wh8LSU0+1spvrYe5/t/h5Y5TbvyauddAA0HOD9SMgZMdcEbC60RY613LHGIcsU54 HsK5D1+f1zwFkuZ8Ze6yz23aBsOIHc8lLdowOHnzSvfxRFhC0sFS8jvawS49HBwd 5ZXsPqx+O8AaF6srFezjAt39NXKJXyw4hHVePALKLHJNwS4oRaRmf52OLyDTh+Ma 8g4doKlkhuLyh3Pr7oC9JRqzE0M96M7yP1tyKr9Le22gs/X9933qZiKJs3w5Id5P B+2ixQVvhaNrcDr1hB55QO1H
    =nQsk
    -----END PGP SIGNATURE-----


    --- PyGate Linux v1.5.19
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)