From owner-freebsd-security Wed Jan 8 8:19:39 2003 Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D4DF337B401 for ; Wed, 8 Jan 2003 08:19:35 -0800 (PST) Received: from kumprang.or.id (mrtg.kumprang.or.id [202.143.103.227]) by mx1.FreeBSD.org (Postfix) with SMTP id 80DBF43ED1 for ; Wed, 8 Jan 2003 08:19:20 -0800 (PST) (envelope-from budsz@kumprang.or.id) Received: (qmail 48856 invoked by uid 1008); 8 Jan 2003 16:21:59 -0000 Date: Wed, 8 Jan 2003 23:21:58 +0700 From: budsz To: FreeBSD-Security Subject: [security-advisories@freebsd.org: FreeBSD Security Advisory FreeBSD-SA-02:44.filedesc] Message-ID: <20030108162158.GC48296@kumprang.or.id> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-URL: "http://www.kumprang.or.id/~budsz/" X-Pubkey: "http://www.kumprang.or.id/~budsz/pubkey.txt" X-Pubkey-MD5: "http://www.kumprang.or.id/~budsz/pubkey-checksum.md5" X-Finger-Print: "A05A 268C 3CD4 ABBD D9EB 11E1 F64C 4B4E 6269 5304" X-Organization: "Internet Cafe and Game PC Kumprang" User-Agent: Mutt/1.5.3i X-Virus-Scanned: by AMaViS perl-11 Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org II. Problem Description A programming error in the fpathconf system call can result in the given file descriptor's reference count being erroneously incremented. A similar problem exists in the developer preview versions of FreeBSD 5.0, affecting the lseek(2), dup(2), and other system calls. III. Impact A local attacker may cause the operating system to crash by repeatedly calling fpathconf on a file descriptor until the reference count wraps to a negative value, and then calling close on that file descriptor. Similarly, it may be possible to cause a file descriptor to reference unallocated kernel memory, but remain valid. If a new file is later opened and the kernel allocates the new file structure at the same memory location, then an attacker may be able to gain read or write access to that file. This may in turn lead to privilege escalation. IV. Workaround There is no workaround. V. Solution The following patch has been verified to apply to FreeBSD 4.4, 4.5, 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-02:44/filedesc.patch # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-02:44/filedesc.patch.asc b) Apply the patch. # cd /usr/src # patch < /path/to/patch c) Recompile your kernel as described in and reboot the system. The question: If I periodicly upgrade with cvsup stable and compile kernel it's will fix that problem, or I must patch only. does cvsup will replace all of source? -- budsz To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message