From owner-freebsd-security-notifications Thu Mar 20 8:10: 7 2003 Delivered-To: freebsd-security-notifications@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E087537B404; Thu, 20 Mar 2003 08:10:04 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EAE243FBF; Thu, 20 Mar 2003 08:10:03 -0800 (PST) (envelope-from security-advisories@freebsd.org) Received: from freefall.freebsd.org (jedgar@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id h2KGA3NS008483; Thu, 20 Mar 2003 08:10:03 -0800 (PST) (envelope-from security-advisories@freebsd.org) Received: (from jedgar@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id h2KGA3aa008481; Thu, 20 Mar 2003 08:10:03 -0800 (PST) Date: Thu, 20 Mar 2003 08:10:03 -0800 (PST) Message-Id: <200303201610.h2KGA3aa008481@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: jedgar set sender to security-advisories@freebsd.org using -f From: FreeBSD Security Advisories To: FreeBSD Security Advisories Subject: FreeBSD Security Advisory FreeBSD-SA-03:05.xdr Sender: owner-freebsd-security-notifications@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: Reply-To: postmaster@freebsd.org X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 ============================================================================= FreeBSD-SA-03:05.xdr Security Advisory The FreeBSD Project Topic: remote denial-of-service in XDR encoder/decoder Category: core Module: libc Announced: 2003-03-20 Credits: Riley Hassell, eEye Todd Miller Affects: All releases of FreeBSD prior to 4.6-RELEASE-p11, 4.7-RELEASE-p8, 4.8-RELEASE and 5.0-RELEASE-p5 Corrected: 2003-03-20 12:59:55 UTC (RELENG_4) 2003-03-20 13:05:04 UTC (RELENG_4_6) 2003-03-20 13:05:27 UTC (RELENG_4_7) 2003-03-20 13:04:46 UTC (RELENG_5_0) FreeBSD only: NO I. Background XDR (eXternal Data Representation) is a standard developed by Sun Microsystems for platform-independent encoding of data types. It is widely used by the Sun RPC (Remote Procedure Call) protocol and other protocols. FreeBSD's standard C library includes routines for encoding and decoding XDR, derived from a library originally distributed by Sun Microsystems. II. Problem Description The xdrmem XDR stream object does incorrect bounds-checking. An internal variable used for tracking bounds is a signed integer. Bounds-checking is performed by subtracting the object length from this signed integer, and then testing for a negative result. However, if the object length is sufficiently large, the internal variable will wrap and the result will be positive. III. Impact For some operations on the xdrmem XDR stream object, the bounds-checking is followed by a memory copy. If the bounds-checking error is exploited, then the memory copy will operate on a huge region of memory, resulting in a segmentation violation. Thus, it may be possible for an attacker to send maliciously formatted messages to a service which utilizes the xdrmem XDR stream object and cause a denial-of-service. IV. Workaround None known. V. Solution Do one of the following: 1) Upgrade your vulnerable system to the FreeBSD 4-STABLE branch; or to the RELENG_4_7 (4.7-RELEASE-p8), RELENG_4_6 (4.6-RELEASE-p11), or RELENG_5_0 (5.0-RELEASE-p5) security branch dated after the correction date. 2) To patch your present system: The following patch has been verified to apply to FreeBSD 4.6, and 4.7 systems. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:05/xdr-4.patch # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:05/xdr-4.patch.asc The following patch has been verified to apply to FreeBSD 5.0 systems. a) Download the relevant patch from the location below, and verify the detached PGP signature using your PGP utility. # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:05/xdr-5.patch # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-03:05/xdr-5.patch.asc b) Execute the following commands as root: # cd /usr/src # patch < /path/to/patch c) Recompile the operating system as described in . Note that any statically linked applications that are not part of the base system (i.e. from the Ports Collection or other 3rd-party sources) must be recompiled. All affected applications must be restarted for them to use the corrected library. Though not required, rebooting may be the easiest way to accomplish this. VI. Correction details The following list contains the revision numbers of each file that was corrected in FreeBSD. Branch Revision Path - ------------------------------------------------------------------------- RELENG_4 src/include/rpc/xdr.h 1.14.2.1 src/lib/libc/xdr/xdr_mem.c 1.8.2.1 RELENG_4_6 src/UPDATING 1.73.2.68.2.38 src/include/rpc/xdr.h 1.14.10.1 src/lib/libc/xdr/xdr_mem.c 1.8.10.1 src/sys/conf/newvers.sh 1.44.2.23.2.28 RELENG_4_7 src/UPDATING 1.73.2.74.2.10 src/include/rpc/xdr.h 1.14.12.1 src/lib/libc/xdr/xdr_mem.c 1.8.12.1 src/sys/conf/newvers.sh 1.44.2.26.2.10 RELENG_5_0 src/UPDATING 1.229.2.10 src/include/rpc/xdr.h 1.21.2.1 src/lib/libc/xdr/xdr_mem.c 1.11.2.1 src/sys/conf/newvers.sh 1.48.2.6 - ------------------------------------------------------------------------- VII. References -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) Comment: FreeBSD: The Power To Serve iD8DBQE+eb5xFdaIBMps37IRAiG+AJ4yWC/mnLQJAinaxAgt/CfvHY2wrQCfeaCR W5v39BKPf1fGIK5T3/Rwcp8= =MXpP -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security-notifications" in the body of the message