From nobody Wed Apr 6 04:08:10 2022 X-Original-To: freebsd-security@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id AF4761A9921F for ; Wed, 6 Apr 2022 04:08:10 +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 4KY9wV1mhyz3Hq1; Wed, 6 Apr 2022 04:08:10 +0000 (UTC) (envelope-from security-advisories@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649218090; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=T+5674eor00pjuj0iGeY+OzY8xjueiPuV8+yaoUVyy4=; b=pBJsltLxAVvE+ZFiPX8IauULwwosv9Mlc6oqRmBMcSH6V0XEmXi+1EPEvpeN9Nf2ypfb6J yk+484Zp9RT+PsFrS/x4d7MmAseSpRnpGnyC1VDYaVt/DH7x4r855Jk0QgD8kYS7sa8p9h 0EkKomXyDJJvqmKGNAeVv0rtOlBzvriehqyq55pZNeJh3n2u7H0TBBS71osF6Yrz2YEmYS URiDxYoll3pd2bglYepZZVFtQxgfd4eAl4EStYBXnhqKQDcaj3l+ioT11zxh6QZ+34ZcIc JDvUCmbddlv6NFwCB7BEmVOX4aaCC75w3wIq3or39kA1qLk588z7XKqegU2qcw== Received: by freefall.freebsd.org (Postfix, from userid 945) id 06096388D; Wed, 6 Apr 2022 04:08:10 +0000 (UTC) From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-22:06.ioctl Reply-To: freebsd-security@freebsd.org Precedence: bulk Message-Id: <20220406040810.06096388D@freefall.freebsd.org> Date: Wed, 6 Apr 2022 04:08:10 +0000 (UTC) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649218090; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc; bh=T+5674eor00pjuj0iGeY+OzY8xjueiPuV8+yaoUVyy4=; b=YnMcrv+trGKB4B9yWU5JUoWjRAUjgSNMrLi1vPr01aiNTlha8Z+Jpt5aDQijhsL6kJ/72E /ImcTQ7RC6AuToFmJ0OldoUKrHp/0pj2UjUSFQr50TMEKD4IjTgKphRVsX/znNAsfgodja 8uRTG7pC07EigvA5VRnSlUt24mU9jakW5nrJlv0Gy53KncRSP6GXVSHdnOpAOlQffz0kcz +adPTgFDj1nTa3Cw9jZa2yKcqNZoDhrkHscoSh+SiCtX0GfFolnCaIO8cLQGzKhaamQKDK qJfeCAWQntanNs4FPj+x5/O5EV6bnzqWZwrgP43Kl7lJhF1egdXUmS36rmFrwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649218090; a=rsa-sha256; cv=none; b=TzVXD54P5INjd9xnVCCO0dZ8r/Ss+GdMPT6q77W3nbBYpUB6mUoF4ZqF/mfuGDK/NYCrgO HuUPxfnITyxtIAMcQJx/hqp0gZn+SaJe0mBGDCFsh5RCfC2WvpcMyHVFzIWXn2vFoGIUqY aQSzNFGm5DCUPDqqE9HB41g68SnSd3hpKpvD5LO//+6ICyDQsmz0p5EanZIRZDM0swgBdk K8Dn3d333/VfXppDMWhJI2TMT6d6aipwNy18A6whnD2smy0HinPhIm3ncJuMLgcFmjqElw AL53mUf0qlKNthox0AhgCqrabZQVVlgM58Wo0RjVIt0O4EQQW6oFg0fzA7GzgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N List-Id: Security issues List-Archive: https://lists.freebsd.org/archives/freebsd-security List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-security@freebsd.org X-BeenThere: freebsd-security@freebsd.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 ============================================================================= FreeBSD-SA-22:06.ioctl Security Advisory The FreeBSD Project Topic: mpr/mps/mpt driver ioctl heap out-of-bounds write Category: core Module: mpr, mps, mpt Announced: 2022-04-06 Credits: Lucas Leong (@_wmliang_), Trend Micro Zero Day Initiative Affects: All supported versions of FreeBSD. Corrected: 2022-04-04 00:46:25 UTC (stable/13, 13.1-STABLE) 2022-04-04 16:24:36 UTC (releng/13.1, 13.1-RC1-p1) 2022-04-06 03:04:16 UTC (releng/13.0, 13.0-RELEASE-p11) 2022-04-04 00:47:44 UTC (stable/12, 12.3-STABLE) 2022-04-06 03:06:31 UTC (releng/12.3, 12.3-RELEASE-p5) CVE Name: CVE-2022-23086 For general information regarding FreeBSD Security Advisories, including descriptions of the fields above, security branches, and the following sections, please visit . I. Background mpr(4), mps(4), and mpt(4) are disk controller drivers. They export an ioctl(2) interface used by command-line utilities to query or set properties on the device. II. Problem Description Handlers for *_CFG_PAGE read / write ioctls in the mpr, mps, and mpt drivers allocated a buffer of a caller-specified size, but copied to it a fixed size header. Other heap content would be overwritten if the specified size was too small. III. Impact Users with access to the mpr, mps or mpt device node may overwrite heap data, potentially resulting in privilege escalation. Note that the device node is only accessible to root and members of the operator group. IV. Workaround No workaround is available. Systems that do not use mpr(4), mps(4) or mpt(4) are not affected. V. Solution Upgrade your vulnerable system to a supported FreeBSD stable or release / security branch (releng) dated after the correction date, and 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 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 # 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-22:06/ioctl.patch # fetch https://security.FreeBSD.org/patches/SA-22:06/ioctl.patch.asc # gpg --verify ioctl.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 and 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/ 0b29e1b9f9df stable/13-n250225 releng/13.1/ aef190f298af releng/13.1-n250066 releng/13.0/ e724f3ce7970 releng/13.0-n244796 stable/12/ r371855 releng/12.3/ r371872 - ------------------------------------------------------------------------- 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/A6HiuWv54gCjWNV05eS9J6n5cIFAmJNDgYACgkQ05eS9J6n 5cJ1FRAAopRAsQL1viniZ9DvKUbq5cDwRvvaoTn4nzTs5+T51KoTwkzwfsAZy6jR ixOlaGTSRxWzTrLa5Kq6DxHEevrzxmJRc03YZ0GrfbSQNoaW6SGv+lXY9SEbm86K T3D//J42pSAmxLOteQDXqds5I4Xd9eDrrLzQjATxb9KqO1BYCWXCvPUQfRNksL6t eXnwT0+1AluGOw0YkyZ4nB62mtO5qwFPI1T/paIRAe8G38gW5xn821fYcJUR/fbd K6GUDdHvVsobI99nohiZcPoMH8peAoBntmWsOxMtd2goc6useAGE5xdvXB1EDBMe W/4ZCUNg5jhw+ceVIPw248DcvT9YVp6NtYbqvxcz2SQ5MNY3B4sgZCSuYeDUqtYF uYmJN5EHALyQPe1vPwTqM+INm5/T3Ft3Y3kWKgk5+PNSrClJNpkOASPps3hnJmM+ i7kK/GnH0TEZbinPY4J//8o6IuZpX1o+5JWWbSZPcDo/2IxlR+sAe72hOVq5w/Bp 2GT9aJmktRlJ8Spfr7QYy2LJBRUVN9zAlnfyZJ2Hil4i03lrmP/nByEBiAWxSfo4 ECIs5viR34U0gTJ8qbl6YJQrikWqUcYPcrPcx3iMT0fLXCaVGfB7jxZZc7jXsVc+ nf+uJPY4z95eqbCrTHuLj9ReBLOA7nG3Vi/FI0N3sEJkBOb1tHU= =kPAj -----END PGP SIGNATURE-----