-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-26:55.elf Security Advisory The FreeBSD Project Topic: Race condition in ELF core dump segment counting Category: core Module: elf Announced: 2026-07-29 Credits: Maik Muench of Secfault Security Affects: All supported versions of FreeBSD. Corrected: 2026-07-29 17:48:45 UTC (stable/15, 15.1-STABLE) 2026-07-29 17:50:37 UTC (releng/15.1, 15.1-RELEASE-p2) 2026-07-29 17:50:11 UTC (releng/15.0, 15.0-RELEASE-p12) 2026-07-29 17:49:04 UTC (stable/14, 14.4-STABLE) 2026-07-29 17:49:38 UTC (releng/14.4, 14.4-RELEASE-p8) CVE Name: CVE-2026-58088 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background When a process dumps core, the kernel writes an ELF file containing the process's register state and memory contents. Each dumpable region of the process's virtual memory map is represented by an ELF segment in the core file. II. Problem Description The ELF core dump code counted the number of dumpable VM map entries, allocated a buffer for the corresponding program headers, then iterated over the map a second time to populate them. A process sharing the address space via rfork(2) can mutate the map between the two passes, causing the second pass to write program headers past the end of the buffer. III. Impact An unprivileged local user sharing an address space with a process that dumps core can trigger an out-of-bounds write on the kernel heap, potentially leading to privilege escalation. IV. Workaround Set sysctl kern.coredump=0 to disable core dumps entirely. V. Solution Upgrade your vulnerable 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 vulnerable 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 a security update" 2) To update your vulnerable 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 a security update" 3) To update your vulnerable 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/SA-26:55/elf-15.patch # fetch https://security.FreeBSD.org/patches/SA-26:55/elf-15.patch.asc # gpg --verify elf-15.patch.asc [FreeBSD 14.x] # fetch https://security.FreeBSD.org/patches/SA-26:55/elf-14.patch # fetch https://security.FreeBSD.org/patches/SA-26:55/elf-14.patch.asc # gpg --verify elf-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 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/ 008d3bafa124 stable/15-n284648 releng/15.1/ 8592efddadf6 releng/15.1-n283595 releng/15.0/ 475a72f75478 releng/15.0-n281098 stable/14/ 89a88e4f2ddc stable/14-n274646 releng/14.4/ d46ec216104e releng/14.4-n273753 - ------------------------------------------------------------------------- Run the following command to see which files were modified by a particular commit: # git show --stat 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 -----BEGIN PGP SIGNATURE----- iQJPBAEBCgA5FiEEthUnfoEIffdcgYM7bljekB8AGu8FAmpqblIbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMCwzAAoJEG5Y3pAfABrvlBMQANG+Id+ZqIheEim9bCQc +Rxfqu3VgaAz8JET1VtOWew6C7xGPe3ii2g+Q/MIN28Lss9ndn1NoyEojKxJhWpb 4e7yUgA1p24pKcrV23uuMtbn/nWH/BnkIqZXhK1yPxRZ59uv7D1CCr1Qhh6HjADZ T6fG5anrUivmTDxDLJZb7OpIuMeVahH9TUvxAvH3MQDEVkv8S0ig8Lghdmf8Ytua zZa1gGMiA/LnTGcd13dysGtKSXECRYutD2ak2GV416vPVThCgd1yzdFp4axdopBg gMAJK9F3+0C7Mn53ATUGsRXYyAfb6PNNsF5vAc5aojHBluf5hEQTNDK0QumOpYfQ Gt6ZvS0lBJ1Lj3nNSKVF2fgBAQeHY80FFeRYABNwPPRWz1X41GMs0ngK6laJVP41 /m0P6Ad+7KbEWJ5mhfRMx0igApHqpprFMHMMr5HZAd3H8pgclkb7k09PuDBjBFsk Y/UsxJ6T5P0IZ5PnExGB5D1K6cql86n8PRDI5mu9aU3wEPQJFsykIeSQU41SWOoc GQyAmvUCU4qRjRVaIrULiCowUwhM6TQbuOgrQcJVp/n8MMh92bvpb+sCRniKZDSV IvD/6gLXoNBmPEOMR7Bgq1Lz/wUCLPBAQgNmEcFb+HLEMURj+QDXX6heSkZV/6GI brmHeN390GhTuutDmJTGgQCK =CL/m -----END PGP SIGNATURE-----