From timon@netherworld.ru  Wed Jul 10 10:03:41 2002
Return-Path: <timon@netherworld.ru>
Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP
	id 4D40837B400; Wed, 10 Jul 2002 10:03:41 -0700 (PDT)
Received: from netherworld.ru (memphis.mephi.ru [194.67.67.234])
	by mx1.FreeBSD.org (Postfix) with ESMTP
	id B5D8C43E52; Wed, 10 Jul 2002 10:03:37 -0700 (PDT)
	(envelope-from timon@netherworld.ru)
Received: from netherworld.ru (localhost [127.0.0.1])
	by netherworld.ru (8.12.3/8.12.3) with ESMTP id g6AGu6ap005996;
	Wed, 10 Jul 2002 20:56:07 +0400 (MSD)
	(envelope-from timon@netherworld.ru)
Received: (from timon@localhost)
	by netherworld.ru (8.12.3/8.12.3/Submit) id g6AGu4f5005995;
	Wed, 10 Jul 2002 20:56:04 +0400 (MSD)
Message-Id: <20020710205604.A5518@netherworld.ru>
Date: Wed, 10 Jul 2002 20:56:04 +0400
From: "Artem 'Zazoobr' Ignatjev" <timon@netherworld.ru>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
In-Reply-To: <200206281220.g5SCK1QC022319@freefall.freebsd.org>; from FreeBSD-gnats-submit@FreeBSD.org on Fri, Jun 28, 2002 at 05:20:01AM -0700
Subject: Re: .12.3 and `msgs' alias
References: <200206281208.g5SC81CR049970@netherworld.ru> <200206281220.g5SCK1QC022319@freefall.freebsd.org>

>Number:         40427
>Category:       bin
>Synopsis:       Re: .12.3 and `msgs' alias
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 10 10:10:01 PDT 2002
>Closed-Date:    Wed Jul 10 18:12:20 PDT 2002
>Last-Modified:  Wed Oct 26 04:55:13 GMT 2005
>Originator:     
>Release:        
>Organization:
>Environment:
>Description:
 --BOKacYhQ+x31HxR3
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Fri, Jun 28, 2002 at 05:20:01AM -0700, FreeBSD-gnats-submit@FreeBSD.org =
 wrote:
 > Thank you very much for your problem report.
 > It has the internal identification `misc/39951'.
 > The individual assigned to look at your
 > report is: freebsd-bugs.=20
 >=20
 > >Category:       misc
 > >Responsible:    freebsd-bugs
 > >Synopsis:       Sendmail 8.12.3 and `msgs' alias
 > >Arrival-Date:   Fri Jun 28 05:20:01 PDT 2002
 More digging lead me to following hack (msgs will now be suid, so if it
 can be exploited, that'll be one more hole):
 
 ---- Begin patch ----
 diff -U 3 -r usr.bin/msgs/Makefile usr.bin/msgs/Makefile
 --- usr.bin/msgs/Makefile	Wed Jul 10 20:44:12 2002
 +++ usr.bin/msgs/Makefile	Wed Jul 10 20:41:08 2002
 @@ -4,5 +4,6 @@
  PROG=3D	msgs
  DPADD=3D	${LIBTERMCAP}
  LDADD=3D	-ltermcap
 +BINMODE=3D 4755
 =20
  .include <bsd.prog.mk>
 diff -U 3 -r usr.bin/msgs/msgs.c usr.bin/msgs/msgs.c
 --- usr.bin/msgs/msgs.c	Wed Jul 10 20:40:12 2002
 +++ usr.bin/msgs/msgs.c	Wed Jul 10 20:41:21 2002
 @@ -179,7 +179,7 @@
  	setlocale(LC_ALL, "");
 =20
  	time(&t);
 -	setuid(uid =3D getuid());
 +	setuid(uid =3D geteuid());
  	ruptible =3D (signal(SIGINT, SIG_IGN) =3D=3D SIG_DFL);
  	if (ruptible)
  		signal(SIGINT, SIG_DFL);
 ----  End patch  ----
 
 Directions: apply this standing in source tree root (shake well before
 using :-) )
 			Sinceherely yours, Artem 'Zazoobr' Ignatjev.
 --- Unix is like a wigwam: No windows, no gates and an apache inside.
 
 --BOKacYhQ+x31HxR3
 Content-Type: application/pgp-signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.0.6 (FreeBSD)
 Comment: For info see http://www.gnupg.org
 
 iD8DBQE9LGcjgvMkrc2+hzYRApnaAKCtYKfvpCpxyZYRH/FLCepgON+OlQCghtvi
 Hy5p8Lsoc+nasx4N2s48MXI=
 =lZAc
 -----END PGP SIGNATURE-----
 
 --BOKacYhQ+x31HxR3--
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Wed Jul 10 18:10:25 PDT 2002 
State-Changed-Why:  
Followup to misc/39951 misfiled as a new PR.  You have used MIME when 
posting this reply.  Can you please follow up to misc/39951 again, 
this time without using MIME and with a subject of: 

Subject: Re: misc/39951: Sendmail 8.12.3 and `msgs' alias 

Thanks for submitting this, and the original misc/39951 report. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=40427 
>Unformatted:
