From owner-freebsd-security-notifications@freebsd.org Tue Aug 24 20:52:50 2021 Return-Path: Delivered-To: freebsd-security-notifications@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44C48660738 for ; Tue, 24 Aug 2021 20:52:50 +0000 (UTC) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GvLsY5YzFz4ppv; Tue, 24 Aug 2021 20:52:49 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838370; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=SLTFutSfddXhbGN47tHpCiqeYUNc4DsBUilA4PTzyag=; b=WiW9Aif9Ao5NLs61lYfJ7u0s4G91075SnREhRA7U6zQmFJtdyHl+mRLrgzY1Gtnwuix7Vo cNh/jcAlvBTcJNmSILmde41xtXD9nzvvEogh8mhMJZDev0uAiyPlVXgaN2SfAoP42M1GXO 0i7YJWP+ccGKw8D7bStyRjwUdk7ynWRoPof4hvH39SEq0jqkriu0aVL/WMxX9igPmW30xD i55gJiqrbJQBgYCCDmNTtaWmolmw8eAaZbCmkQkxtGJavLgEQKH6Q7Q0ruoHRCdjlbskvD Ebjw6AIs8e/yVwMwHRd1SMV+gAuWwgqqHiT1ckFrgkD6NljK8EdH9bbWqqanWw== Received: by freefall.freebsd.org (Postfix, from userid 945) id 8D89373E2; Tue, 24 Aug 2021 20:52:49 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-21:14.ggatec Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20210824205249.8D89373E2@freefall.freebsd.org> Date: Tue, 24 Aug 2021 20:52:49 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1629838370; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=SLTFutSfddXhbGN47tHpCiqeYUNc4DsBUilA4PTzyag=; b=IgD2CbClQepj21ybpydmm2Ylv4Mkj0f9VDVWwIvFHSwWpTe0QYzhXwm6zgfABlaRVukVvI QMyh2JBPElBiot8vrBb4pPyKgSVw8rfUFCEgyosHn8qmK3DhLzlepl8yGIEEM8VHPC8A8U b9L48i18hQSHffQ1xe3ojfJ2dq1fewa0UpnA+zLuY1mDORYW1hPEtO+WSZxvcSVtKkoODY 9hnuSqc6OYbWNS5uCy2xJ9ovRuViOrujFsHceKV09sBL5tnt+eV7IB2ucf1UkLfFbm/+EZ 4iU3TZkPAHykw9Ph6J4cUQVIFfLPG/z44SEQHMoAo67HwCRWaUhaRTzWqHE3rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1629838370; a=rsa-sha256; cv=none; b=WTyu82U3AGY6xnCvtrDt6HZECQQNdR0K8KXH9Q5dmmele+wXaVviaMaZnLDKpIgxCMa15A Lw3Slr4Wh9l0NtIRIrAE563fyaHgSeTlC0P7xJgfUbo1Cx7hmlY7uLvEc1ZhgHGUX9F0Jn ZwhKgGYGDU/L5oKDZY3/87Zwn8RebH0bBJ6KtBsnM0huxJjcr+/o7391QR6F0XrCo+tKGy byHlo0SrK1hswFhzhfTZgk/WPWi6ogk12koG2JwBJES/ZhcOfiin+vO+dIo16frx8AnJRU +CDSOGbQQrJ04HT4IfCWjUj/hQnsyH1Ll1pLDFnl64RIbDu+P7M1mlbxngYRRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security-notifications@freebsd.org X-Mailman-Version: 2.1.34 List-Id: "Moderated Security Notifications \[moderated, low volume\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2021 20:52:50 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-21:14.ggatec Security Advisory The FreeBSD Project Topic: Remote code execution in ggatec(8) Category: core Module: ggatec Announced: 2021-08-24 Credits: Johannes Totz Affects: All supported versions of FreeBSD. Corrected: 2021-08-24 17:50:50 UTC (stable/13, 13.0-STABLE) 2021-08-24 17:37:45 UTC (releng/13.0, 13.0-RELEASE-p4) 2021-08-24 18:30:13 UTC (stable/12, 12.2-STABLE) 2021-08-24 18:32:15 UTC (releng/12.2, 12.2-RELEASE-p10) 2021-08-24 18:29:35 UTC (stable/11, 11.4-STABLE) 2021-08-24 18:31:29 UTC (releng/11.4, 11.4-RELEASE-p13) CVE Name: CVE-2021-29630 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background GEOM Gate is a GEOM module that reflects I/O requests into user mode where the ggatec(8) daemon fowards those requests to ggated(8), possibly over the network to another machine. II. Problem Description The ggatec(8) daemon does not validate the size of a response before writing it to a fixed-sized buffer. This allows to overwrite the stack of ggatec(8). III. Impact A malicious ggated(8) or an attacker in a priviledged network position can overwrite the stack with crafted content and potentially execute arbitrary code. IV. Workaround No workaround is available but systems not using ggatec(8) are not affected. Neither ggatec(8) nor ggated(8) are enabled by default and need explicit configuration by the super-user. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date. Restart any ggatec(8) instances. Existing ggate devices can be kept alive and restarted with `ggatec rescue`. Perform one of the following: 1) To update your vulnerable 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 2) 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. # fetch https://security.FreeBSD.org/patches/SA-21:14/ggatec.patch # fetch https://security.FreeBSD.org/patches/SA-21:14/ggatec.patch.asc # gpg --verify ggatec.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 . Restart the applicable daemons, or reboot the system. 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/ 0729ba2f49c9 stable/13-n246938 releng/13.0/ c8a2cc4ba845 releng/13.0-n244757 stable/12/ r370383 releng/12.2/ r370394 stable/11/ r370381 releng/11.4/ r370387 - ------------------------------------------------------------------------- For FreeBSD 13 and later: 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 For FreeBSD 12 and earlier: Run the following command to see which files were modified by a particular revision, replacing NNNNNN with the revision number: # svn diff -cNNNNNN --summarize svn://svn.freebsd.org/base Or visit the following URL, replacing NNNNNN with the revision number: VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/A6HiuWv54gCjWNV05eS9J6n5cIFAmElV14ACgkQ05eS9J6n 5cKyqBAAi7eHUJ5Ud4dNJac8zbaj5uIlYF1XUPBfm5XlevfW1b1vgrfrs0QM3Sw5 9efTVTESFUC+T9wVMYO3s9POEwiu3x0A/eRsH2tq9oaZPQKdpAhkEEQ/uqnNRKfm qHZ8YuSJGT+EWEFp1ib5O4Y78TvjL7ST0+IG/O5vBMKqgsxy29o6tOAy3q9+RVqj hNQNo7KbXBXEns/I7HN4JssQSjeWOmK65Ty5YAp1VsNGbD/7rSqsCp4P/CatvRQ7 0kzVMb/hkaDn1G7jYOXbAPk+XrUr9cFriChjLuAAyZRBfWcNlPmoxRgNoDVDY44x elnBAEmSPD9adwy2hoHeusiiUnN7Vrz6DJeox7BSnbQx1lbU+j6qev0EBaMAmEUJ POxn9wjfth3hdfRSx5p2jSVaD/086BBpMQ9KXojVONgqE7hFF402+ooCnorA2XTh s08cIy38TEyHoW/rqr3SoXwyvkM3vAjQBmYzocDqocfufQ7UCH+SDFSsORuof+4N 9T2j/UvGqmrQvnMhAsRfbdFImvwUut+ZLJzNqTEjYWlZv58QEKocU0OOvrd2Wb5i ok2CRIhCy08UnDItFSYI28TaMv8ZiCoWLx7H0+20mQeLaPF45dQWXz1o4FrFHVjx EdMZpmh9tFU8j5bm0J5l8CpoiTZsqZ41gTrFyEdSnOnS1uvT8jQ= =6Z2C -----END PGP SIGNATURE-----