Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 Dec 1999 15:33:24 GMT
From:      Udo Schweigert <ust@cert.siemens.de>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   misc/15373: patch for sendmail 8.9.3 to avoid alias database deletion
Message-ID:  <199912091533.PAA92944@alaska.cert.siemens.de>

index | next in thread | raw e-mail


>Number:         15373
>Category:       misc
>Synopsis:       patch for sendmail 8.9.3 to avoid alias database deletion
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Dec  9 07:40:00 PST 1999
>Closed-Date:
>Last-Modified:
>Originator:     Udo Schweigert
>Release:        FreeBSD 3.4-RC i386
>Organization:
>Environment:

FreeBSD -STABLE and -CURRENT

>Description:

There is a bug in sendmail 8.x.x which allows a local user to destroy the
alias database by doing sendmail -bi and immediately sending an signal to
it.

>How-To-Repeat:


>Fix:
	
The attached patch (taken from Debian GNU Linux) fixes the problems (in use
on our Mail-Server without problems for 2 days).

With this patch non-root users (exactly spoken: non-trusted users) 
are not able to rebuild the database (which is to me not a problem).

--- contrib/sendmail/src/main.c.orig Sun Jan 10 00:31:13 1999
+++ contrib/sendmail/src/main.c Wed Dec  8 12:51:35 1999
@@ -984,6 +984,18 @@
 		usrerr("Permission denied");
 		finis(FALSE, EX_USAGE);
 	}
+	if (OpMode == MD_INITALIAS &&
+			RealUid != 0 &&
+			RealUid != TrustedUid &&
+			!wordinclass(RealUserName, 't'))
+	{
+		if (LogLevel > 1)
+			sm_syslog(LOG_ALERT, NOQID,
+					"user %d attempted to rebuild the alias map",
+					RealUid);
+		usrerr("Permission denied");
+		finis(FALSE, EX_USAGE);
+	}
 
 	if (MeToo)
 		BlankEnvelope.e_flags |= EF_METOO;

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199912091533.PAA92944>