From owner-freebsd-security-notifications Tue Jun 2 12:24:19 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA22769 for freebsd-security-notifications-outgoing; Tue, 2 Jun 1998 12:24:19 -0700 (PDT) (envelope-from owner-freebsd-security-notifications@FreeBSD.ORG) Received: from gvr.gvr.org (guido@gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA22642; Tue, 2 Jun 1998 12:24:00 -0700 (PDT) (envelope-from security-officer@freebsd.org) Received: (from guido@localhost) by gvr.gvr.org (8.8.8/8.8.5) id VAA13079; Tue, 2 Jun 1998 21:23:51 +0200 (MET DST) Date: Tue, 2 Jun 1998 21:23:51 +0200 (MET DST) Message-Id: <199806021923.VAA13079@gvr.gvr.org> From: FreeBSD Security Officer Subject: Announcement regarding FreeBSD Security advisories To: undisclosed-recipients:; Sender: owner-freebsd-security-notifications@FreeBSD.ORG Precedence: bulk Reply-To: postmaster@FreeBSD.ORG X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- This document explains the policy currently in use by the FreeBSD security officer with respect to security advisories. FreeBSD provides security advisories. The advisories will cover recent releases of FreeBSD. The security advisories will cover these releases: the most recent official release of FreeBSD, FreeBSD-current, FreeBSD-stable, when 2 releases are based on it. the previous FreeBSD-stable in case the new stable does not yet have 2 releases based on it. At this time, security advisories are available for: FreeBSD 2.2.6 FreeBSD-current FreeBSD-stable Older releases will not be actively maintained. You are encouraged to upgrade to one of the supported releases. An advisory will be sent out when a security hole exists that is either being actively abused (as indicated to us via reports from end users or CERT like organizations), or when the security hole is public knowledge (e.g. because a report has been posted to a public mailing list). Like all development efforts, security fixes are first brought into the FreeBSD-current branch. After a couple of days, the fix will be retrofitted into the covered FreeBSD-stable branch(es). Then an advisory will be sent out. Advisories will be sent to the following FreeBSD mailing lists: FreeBSD-security-notifications FreeBSD-security FreeBSD-announce Advisories will always be signed using the FreeBSD security-officer PGP key. This key can be found at ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc Advisories are archived at ftp://ftp.freebsd.org/pub/FreeBSD/CERT/advisories Patches mentioned in advisories are archived (both signed and unsigned) at ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv iQCVAwUBNXRPbFUuHi5z0oilAQFLagP+I6ZuGubJnmVBd6Geysrhrgfd38hsN5XA 8zKnHVMckmfueneDBv2AQj+J1DzdAP//K2keow50ZpIRZh+SBSjlk2NVlDIL6MUP aO28cmjgWnIwP14sRQHzRsXJzZ6aBf48uIUHuPouh1J2hAUNeiQls0+mqqgHS2Ue BF1MbjYcNGI= =9YV4 -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security-notifications" in the body of the message From owner-freebsd-security-notifications Wed Jun 3 10:44:57 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA22924 for freebsd-security-notifications-outgoing; Wed, 3 Jun 1998 10:44:57 -0700 (PDT) (envelope-from owner-freebsd-security-notifications@FreeBSD.ORG) Received: from gvr.gvr.org (guido@gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA22869; Wed, 3 Jun 1998 10:44:34 -0700 (PDT) (envelope-from security-officer@freebsd.org) Received: (from guido@localhost) by gvr.gvr.org (8.8.8/8.8.5) id TAA17439; Wed, 3 Jun 1998 19:44:29 +0200 (MET DST) Date: Wed, 3 Jun 1998 19:44:29 +0200 (MET DST) Message-Id: <199806031744.TAA17439@gvr.gvr.org> From: FreeBSD Security Officer Subject: FreeBSD Security Advisory: FreeBSD-SA-98:04.mmap To: undisclosed-recipients:; Sender: owner-freebsd-security-notifications@FreeBSD.ORG Precedence: bulk Reply-To: postmaster@FreeBSD.ORG X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-98:04 Security Advisory FreeBSD, Inc. Topic: security compromise via mmap Category: core Module: kernel Announced: 1998-06-02 Affects: FreeBSD 2.2.*, FreeBSD-stable before 1998/05/24 and FreeBSD-current before 1998/05/19 suffer from this problem. Corrected: FreeBSD-current as of 1998/05/19 FreeBSD-stable as of 1998/05/24 FreeBSD only: no (also other 4.4BSD based systems may be affected) Patches: ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:04/ ============================================================================= IMPORTANT MESSAGE: The FreeBSD security officer now uses the policy ftp://freebsd.org/pub/CERT to ftp://ftp.freebsd.org/pub/FreeBSD/POLICY for sending out advisories. ============================================================================= I. Background The 4.4BSD VM system allows files to be "memory mapped", which causes the specified contents of a file to be made available to a process via its address space. Manipulations of that file can then be performed simply by manipulating memory, rather than using filesystem I/O calls. This technique is used to simplify code, speed up access to files, and provide interprocess communication. In 4.4BSD, 4 new FFS flags were added that give the possibility to mark files as append-only or immutable. II. Problem Description It is possible for a process to open an append-only file according to the limitations of the flags, and then mmap the file shared with write permission even when the file is marked as append-only or immutable. This circumvents the concept of the the append-only flag. III. Impact It is possible to change the contents of append-only files. IV. Workaround No workaround is known. V. Solution Apply one of the following patches, rebuild your kernel, install it and reboot your system. The patches below can be found on ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:04/ NOTE: Users of FreeBSD 2.2.5 or FreeBSD-current or FreeBSD-stable dated before 1998/03/12 will need to apply the patch mentioned in FreeBSD advisory SA-98:02. Patch for 3.0-current systems: Index: vm_mmap.c =================================================================== RCS file: /home/cvsup/freebsd/CVS/src/sys/vm/vm_mmap.c,v retrieving revision 1.75 retrieving revision 1.77 diff -u -r1.75 -r1.77 --- vm_mmap.c 1998/03/12 19:36:18 1.75 +++ vm_mmap.c 1998/05/19 07:13:21 1.77 @@ -58,6 +58,7 @@ #include #include #include +#include #include #include @@ -295,12 +296,25 @@ * we're at securelevel < 1, to allow the XIG X server * to continue to work. */ - if (((flags & MAP_SHARED) != 0 || - (vp->v_type == VCHR && disablexworkaround)) && - (fp->f_flag & FWRITE) == 0 && (prot & PROT_WRITE) != 0) - return (EACCES); - else + + if ((flags & MAP_SHARED) != 0 || + (vp->v_type == VCHR && disablexworkaround)) { + if ((fp->f_flag & FWRITE) != 0) { + struct vattr va; + if ((error = + VOP_GETATTR(vp, &va, + p->p_ucred, p))) + return (error); + if ((va.va_flags & + (IMMUTABLE|APPEND)) == 0) + maxprot |= VM_PROT_WRITE; + else if (prot & PROT_WRITE) + return (EPERM); + } else if ((prot & PROT_WRITE) != 0) + return (EACCES); + } else maxprot |= VM_PROT_WRITE; + handle = (void *)vp; } } Patch for 2.2 systems: Index: vm_mmap.c =================================================================== RCS file: /home/cvsup/freebsd/CVS/src/sys/vm/vm_mmap.c,v retrieving revision 1.53.2.3 retrieving revision 1.53.2.4 diff -u -r1.53.2.3 -r1.53.2.4 --- vm_mmap.c 1998/03/12 19:36:50 1.53.2.3 +++ vm_mmap.c 1998/05/24 19:47:02 1.53.2.4 @@ -57,6 +57,7 @@ #include #include #include +#include #include #include @@ -275,12 +276,26 @@ * we're at securelevel < 1, to allow the XIG X server * to continue to work. */ - if (((flags & MAP_SHARED) != 0 || - (vp->v_type == VCHR && disablexworkaround)) && - (fp->f_flag & FWRITE) == 0 && (prot & PROT_WRITE) != 0) - return (EACCES); - else + + if ((flags & MAP_SHARED) != 0 || + (vp->v_type == VCHR && disablexworkaround)) { + if ((fp->f_flag & FWRITE) != 0) { + struct vattr va; + + if ((error = + VOP_GETATTR(vp, &va, + p->p_ucred, p))) + return (error); + if ((va.va_flags & + (IMMUTABLE|APPEND)) == 0) + maxprot |= VM_PROT_WRITE; + else if (prot & PROT_WRITE) + return (EPERM); + } else if ((prot & PROT_WRITE) != 0) + return (EACCES); + } else maxprot |= VM_PROT_WRITE; + handle = (caddr_t) vp; } } VI. Thanks This advisory is based on NetBSD Security Advisory 1998-003. In porting the NetBSD patch, we accidentally mentioned that we obtained the patch from OpenBSD, which was evidently wrong. ============================================================================= FreeBSD, Inc. Web Site: http://www.freebsd.org/ Confidential contacts: security-officer@freebsd.org Security notifications: security-notifications@freebsd.org Security public discussion: freebsd-security@freebsd.org PGP Key: ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc Notice: Any patches in this document may not apply cleanly due to modifications caused by digital signature or mailer software. Please reference the URL listed at the top of this document for original copies of all patches if necessary. ============================================================================= -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv iQCVAwUBNXWJC1UuHi5z0oilAQG3nAP9GjmOtlc1WxPJjcbRwvXmKzhRInCfuVTL f5k7dAyFmUmo6wnyQwsBoQUsa7d/kS0YCnfTIkFYrGkFvBa8hnw/i9VVdMFaUFFV kTo6YLQfgG35znTxftACAs4uzjeRbh/6dr1YsERYxWNW0PabKbYfjMQapmY5GUVm px3WF/jRI5k= =Umgx -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security-notifications" in the body of the message From owner-freebsd-security-notifications Thu Jun 4 10:58:24 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id KAA24550 for freebsd-security-notifications-outgoing; Thu, 4 Jun 1998 10:58:24 -0700 (PDT) (envelope-from owner-freebsd-security-notifications@FreeBSD.ORG) Received: from gvr.gvr.org (guido@gvr.gvr.org [194.151.74.97]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id KAA24169; Thu, 4 Jun 1998 10:56:40 -0700 (PDT) (envelope-from security-officer@freebsd.org) Received: (from guido@localhost) by gvr.gvr.org (8.8.8/8.8.5) id TAA22999; Thu, 4 Jun 1998 19:56:36 +0200 (MET DST) Date: Thu, 4 Jun 1998 19:56:36 +0200 (MET DST) Message-Id: <199806041756.TAA22999@gvr.gvr.org> From: FreeBSD Security Officer Subject: FreeBSD Security Advisory: FreeBSD-SA-98:05.nfs To: undisclosed-recipients:; Sender: owner-freebsd-security-notifications@FreeBSD.ORG Precedence: bulk Reply-To: postmaster@FreeBSD.ORG X-Loop: FreeBSD.org -----BEGIN PGP SIGNED MESSAGE----- ============================================================================= FreeBSD-SA-98:05 Security Advisory FreeBSD, Inc. Topic: system crash with NFS Category: core Module: kernel Announced: 1998-06-04 Affects: FreeBSD 2.2.* and FreeBSD-stable before 1998/05/31 this problem. Corrected: FreeBSD-current as of 1998/05/31 FreeBSD only: no (also other 4.4BSD based systems may be affected) Patches: ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:05/ ============================================================================= IMPORTANT MESSAGE: The FreeBSD security officer now uses the policy ftp://ftp.freebsd.org/pub/FreeBSD/POLICY.asc for sending out advisories. ============================================================================= I. Background NFS can be used to mount remote file systems. Apart from being remote, it acts like a normal UFS file system. Among others, This means that creating hard links can be done in NFS file systems II. Problem Description When creating hard links on file systems, the kernel checks that both the original file and the link to it are located on the same file system. Unfortunately, there is an error in the NFS kernel code in FreeBSD 2.2.* systems that performs this check. III. Impact It is possible to crash a FreeBSD 2.2.* system by hard linking a device special files to a file on an NFS mounted file system. FreeBSD-current is not vulnerable. IV. Workaround No real work around is known (except for unmounting your NFS file systems). V. Solution Apply one of the following patches, rebuild your kernel, install it and reboot your system. The patches below can be found on ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-98:05/ Patch for 2.2.5 and 2.2.6 systems: Index: nfs_vnops.c =================================================================== RCS file: /home/cvsup/freebsd/CVS/src/sys/nfs/nfs_vnops.c,v retrieving revision 1.36.2.6 retrieving revision 1.36.2.7 diff -u -r1.36.2.6 -r1.36.2.7 --- nfs_vnops.c 1998/05/13 05:48:45 1.36.2.6 +++ nfs_vnops.c 1998/05/31 00:07:29 1.36.2.7 @@ -1755,17 +1755,8 @@ struct componentname *a_cnp; } */ *ap; { -#if defined(__NetBSD__) - /* - * Since the args are reversed in the VOP_LINK() calls, - * switch them back. Argh! - */ - register struct vnode *vp = ap->a_tdvp; - register struct vnode *tdvp = ap->a_vp; -#else register struct vnode *vp = ap->a_vp; register struct vnode *tdvp = ap->a_tdvp; -#endif register struct componentname *cnp = ap->a_cnp; register u_long *tl; register caddr_t cp; @@ -1776,11 +1767,8 @@ int v3 = NFS_ISV3(vp); if (vp->v_mount != tdvp->v_mount) { - VOP_ABORTOP(vp, cnp); - if (tdvp == vp) - vrele(tdvp); - else - vput(tdvp); + VOP_ABORTOP(tdvp, cnp); + vput(tdvp); return (EXDEV); } ============================================================================= FreeBSD, Inc. Web Site: http://www.freebsd.org/ Confidential contacts: security-officer@freebsd.org Security notifications: security-notifications@freebsd.org Security public discussion: freebsd-security@freebsd.org PGP Key: ftp://ftp.freebsd.org/pub/FreeBSD/CERT/public_key.asc Notice: Any patches in this document may not apply cleanly due to modifications caused by digital signature or mailer software. Please reference the URL listed at the top of this document for original copies of all patches if necessary. ============================================================================= -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: noconv iQCVAwUBNXbehFUuHi5z0oilAQHS8gQAgIgUrioo3hT+mJLyxUp//ASoFPSf2+vw fmq2D9qEYyV5Od/HLBnzgb3jz5xyqWDLBx6pNV3QIPAimw3+S0oHOUYG+UCn96yD 58kEx6mc8KanEHs0lzdgoqFi6ioVkPzCplxzqy+QfQvDCJPE+w7BbFkwVXhJHNof 4JvVbewoA9c= =ILgB -----END PGP SIGNATURE----- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security-notifications" in the body of the message