From owner-freebsd-hackers@FreeBSD.ORG Tue Jul 15 02:41:35 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFC4637B401; Tue, 15 Jul 2003 02:41:35 -0700 (PDT) Received: from milla.ask33.net (milla.ask33.net [217.197.166.60]) by mx1.FreeBSD.org (Postfix) with ESMTP id AB9AD43FBF; Tue, 15 Jul 2003 02:41:34 -0700 (PDT) (envelope-from nick@milla.ask33.net) Received: by milla.ask33.net (Postfix, from userid 1001) id 47F3D3ABB4C; Tue, 15 Jul 2003 11:47:08 +0200 (CEST) Date: Tue, 15 Jul 2003 11:47:08 +0200 From: Pawel Jakub Dawidek To: "Alan L. Cox" Message-ID: <20030715094708.GL4973@garage.freebsd.pl> References: <20030712202216.GG4973@garage.freebsd.pl> <3F10762E.D17A7307@imimic.com> <20030712213249.GJ4973@garage.freebsd.pl> <20030715080501.GA34504@HAL9000.homeunix.com> <20030715085721.GJ4973@garage.freebsd.pl> <3F13C40A.E2ACE104@imimic.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="20Vs8q+K0csnIr5j" Content-Disposition: inline In-Reply-To: <3F13C40A.E2ACE104@imimic.com> X-PGP-Key-URL: http://garage.freebsd.pl/jules.asc X-OS: FreeBSD 4.8-RELEASE i386 X-URL: http://garage.freebsd.pl User-Agent: Mutt/1.5.1i cc: freebsd-hackers@freebsd.org cc: das@freebsd.org Subject: Re: Bug in VM pages protection handling. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Jul 2003 09:41:36 -0000 --20Vs8q+K0csnIr5j Content-Type: multipart/mixed; boundary="ckw48dMXwVCm+GhK" Content-Disposition: inline --ckw48dMXwVCm+GhK Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 15, 2003 at 04:06:18AM -0500, Alan L. Cox wrote: +> Could you post a pointer to the kernel module's source code? It is hard to reproduce, you need majordomo for this:) Here is discussion about this: https://sourceforge.net/mailarchive/forum.php?thread_id=3D2722479&forum_id= =3D7642 And here is procedure that should handle everything: # cd /usr/ports/mail/majordomo # make install clean # cd /tmp # cvs -d:pserver:anonymous@cvs.sf.net:/cvsroot/cerb-ng co -D "July 11, 200= 3" cerb-ng # cd cerb-ng # make; make install # kldload cerb # /sbin/cbctl -f /path/to/majordomo-test.cb and: # echo test | /usr/local/majordomo/wrapper resend -l test-l test-l-outgoing Here you should have 'Bus error'. Policy majordomo-test.cb is attached. Look into logs for PIDs of processes that was monitored by cerb, they got read-only pages and look at PID of process exiting with SIGBUS. I've spend two days(?) on tracking this down in cerb, so good luck! PS. Note that we're talking about FreeBSD 4.x here. --=20 Pawel Jakub Dawidek pawel@dawidek.net UNIX Systems Programmer/Administrator http://garage.freebsd.pl Am I Evil? Yes, I Am! http://cerber.sourceforge.net --ckw48dMXwVCm+GhK Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: attachment; filename="majordomo-test.cb" #include "addons.cbh" beginrules REGISTER("majorodomo-test") ADD_SYSCALL(SYS_execve); if (syscall == SYS_execve && ruid > 0) { log(LOG_INFO, "PROCESS: %s PID=%u, ruid=%u, euid=%u", pname, pid, ruid, euid); /* * Because here we're using syscall argument (arg[0]) new page * page will be allocated for this argument and this page * will be marked as read-only. */ log(LOG_INFO, "ARG[0]: %s", arg[0]); return call(); } endrules --ckw48dMXwVCm+GhK-- --20Vs8q+K0csnIr5j Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iQCVAwUBPxPNnD/PhmMH/Mf1AQEYwwQAjfTGygGawrmdn+rxY9WxqcS4w8g5AtF9 7P7Y26VSsOIn8c9Eld6lJDQgY+eNS4pOz6I0oImYWZhAh8AzyEI62bRH7q8OdrWS cDHsIHa3ul1b+BMYQGWR/a+VVXsO0ZGj2AUmFQkFWFjrruYHJcn7IUCr1BCmfJ+5 1jB+lQPTn+g= =SAHc -----END PGP SIGNATURE----- --20Vs8q+K0csnIr5j--