From owner-freebsd-security@freebsd.org Wed Sep 2 17:46:04 2020 Return-Path: Delivered-To: freebsd-security@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 850C73DE8D5 for ; Wed, 2 Sep 2020 17:46:04 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BhWZM53FXz3bFW; Wed, 2 Sep 2020 17:46:03 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1599068764; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=hiRsugYPJy1sq0ut/ZvHuE7PwGuNJXYoiAnGaL8jmkQ=; b=aPnwxLhizSZzgS81cQMgQfcb50Ph9HeIrK2Lz3dEstEpI0zt2dZ/ylP49JGvzALxxcrdh8 7TImAUwpUqZhEeKGZqIiMRhVUxfUUhFrzd2OoW3t5Rk+nRVxHoUHWWNh0s2Xg9FX6z0Qgr 4Yg4Ukrsnel0KzV1rKHtzNaJDkJ4yQrXexcphlOiyR6mS80Jggs4MZ3A08PHIlcFoHI8Kp KdYXlaQl669tlaNWmRrFgORJZwWZxCBO6+PRf0fJWoszHnkWk2F4AG3SAEC+mMGb7ouKFM VU+4jMP7eLHA4MC4QJ57EKvNetPccrvsTLkG0S5Xo5hsDRlmFIsfSdXbTJh4MQ== Received: by freefall.freebsd.org (Postfix, from userid 945) id 982C6C8CB; Wed, 2 Sep 2020 17:46:03 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-20:26.dhclient Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20200902174603.982C6C8CB@freefall.freebsd.org> Date: Wed, 2 Sep 2020 17:46:03 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1599068764; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=hiRsugYPJy1sq0ut/ZvHuE7PwGuNJXYoiAnGaL8jmkQ=; b=kAgXtnVylatjGgpZ0SjHPtBpgznWWfWFjoEjFnympgobJy30ab+dpA/KCOdO9B4uTFd1GK cwfyhNf/oBnnuQ/5mYjQRYMCCNizxV+kcSeo6iRxFeCSaKfT+AtPOvLeFk3Ea9YHf9520p hQiacKIUtferqMWCVvahKVNqACaGwo8moio+seFbjjWrPEvwSvdo3CbpSO7CA0AXFXc8fc xKy58BBIhB5KrHds7ATpmFXBUla4lCRvMnJROhkdQLnK3j8YZy40EbA5p3Qr/n1o2bzfg1 OfX72h+5JTxsxE2k9uSOlX85hTWyEJzWBJyUl03e91LrtsZg9eBji1fvEZlRFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1599068764; a=rsa-sha256; cv=none; b=iZDhP2pblftlO9EHR/WJeyE5uavjz+kfADh/0j5jaH6xbeCZpwpJC4v8zKEueSLKNC52SN BGLir85zJszAzJJFlIXVPaYBbwCSrFj6HQxT/MUM6fSl0tEpSwmwW8iJL06NjJd+U4ptJO zPeJMLLnMtQL+1yd0h0LD2kEerYyIi/HXexteJqZlShyLM31uMzt68Ic8owtBIBH4C5kBQ bihTyiyvXtm3DKUQhDcYQIFa+ciGAoIMhOpNt8Oi39qHTfYJtjtwrn4raZ1aQWhYTtsm8j hOHqQrwn8sDk+SJ/YTsqHOydFRR8zGUNXw1BGYLk1vaLxtQt+p2nMzZoaCUMQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.33 List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2020 17:46:04 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-20:26.dhclient Security Advisory The FreeBSD Project Topic: dhclient heap overflow Category: core Module: dhclient Announced: 2020-09-02 Credits: Shlomi Oberman, JSOF Affects: All supported versions of FreeBSD. Corrected: 2020-08-31 21:28:09 UTC (stable/12, 12.1-STABLE) 2020-09-02 16:25:31 UTC (releng/12.1, 12.1-RELEASE-p9) 2020-08-31 21:28:57 UTC (stable/11, 11.4-STABLE) 2020-09-02 16:25:31 UTC (releng/11.4, 11.4-RELEASE-p3) 2020-09-02 16:25:31 UTC (releng/11.3, 11.3-RELEASE-p13) CVE Name: CVE-2020-7461 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background dhclient(8) is the default IPv4 DHCP client used on FreeBSD. It is responsible for contacting DHCP servers on a network segment, and for initializing and configuring network interfaces and configuring name resolution based on received information. dhclient(8) handles DHCP option 119, the Domain Search Option, which provides a list of domains to search when resolving names using DNS. The option data format uses a compression scheme to avoid transmitting duplicate domain name labels. II. Problem Description When parsing option 119 data, dhclient(8) computes the uncompressed domain list length so that it can allocate an appropriately sized buffer to store the uncompressed list. The code to compute the length failed to handle certain malformed input, resulting in a heap overflow when the uncompressed list is copied into in inadequately sized buffer. III. Impact The heap overflow could in principle be exploited to achieve remote code execution. The affected process runs with reduced privileges in a Capsicum sandbox, limiting the immediate impact of an exploit. However, it is possible the bug could be combined with other vulnerabilities to escape the sandbox. IV. Workaround No workaround is available. To trigger the bug, a system must be running dhclient(8) on the same network as a malicious DHCP server. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date, and restart dhclient or reboot. Perform one of the following: 1) To update your vulnerable 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 # shutdown -r +10min "Rebooting for a security update" 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-20:26/dhclient.patch # fetch https://security.FreeBSD.org/patches/SA-20:26/dhclient.patch.asc # gpg --verify dhclient.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 The following list contains the correction revision numbers for each affected branch. Branch/path Revision - ------------------------------------------------------------------------- stable/12/ r365010 releng/12.1/ r365257 stable/11/ r365011 releng/11.4/ r365257 releng/11.3/ r365257 - ------------------------------------------------------------------------- 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: VII. References The latest revision of this advisory is available at -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEE/A6HiuWv54gCjWNV05eS9J6n5cIFAl9PzTtfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEZD MEU4NzhBRTVBRkU3ODgwMjhENjM1NUQzOTc5MkY0OUVBN0U1QzIACgkQ05eS9J6n 5cLLPxAAhg/FSqWLykYAiQ8czoy98X00VIWAP1f4InfUKm8qOB8/7ptzv3A+2Hov 7lHlyN0D4OwhJFt7fw9oTwNe4UgxShso6QrezaTJZR7juFELy9WODbRFnNK4i8w9 NCBab+NIn1o7nFZnB0M5TMKfa4gc1jAV+Q/U/zi+ONvwZegmjXJxuop3Sq8wfBd2 Vp9VAvEJvvBlQKExR2xNRDKV/0LpW+VffIuzlWT2ex3WwGpFVeVSL0ZNJsPbzMYX j0aqGo9B/mHfXtKSQ415kGxiaQctnu5FqjNgSc00byzOU0YTiLsPwPdUgIt+nuQd WFSePoZsDYstkkJ8YaCA/LVzmZo0tNR8m+z7xmhCszUbMIV+iRSycUexEbCXoPx/ Ebg6ycyYMwguK7rL2dkjNWTkr3hP5CgLD7VnzVBYGiBY7ha0zOgbaYWl/33Az5Fb 0eaIyJRFCDmI32NZfri1WLc06K1gFcVcR6VO+BUqRHG6bkYnF/4xlla8ERhYgNeC Y9cs4Y9TNRges79k7jovpu9B5nicTEqMRQBubcARX5+w9zLg8h2aKH6inuVy1srn M9H/mjdCHMkySpSSrENw9Jk5I7RAgHHRgA1OTkB6Da02aMzPEh6fYHWeR7IpvxPc 2A/hxnZy0tTeZ4aKbds1GYZWUVDd3I8DlSVcT5Bq1g5kk6I+PN8= =jfay -----END PGP SIGNATURE-----