From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 19 07:00:47 2004 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 16E1A16A4D0; Sun, 19 Sep 2004 07:00:39 +0000 (GMT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.136]) by mx1.FreeBSD.org (Postfix) with ESMTP id 496B343D31; Sun, 19 Sep 2004 07:00:39 +0000 (GMT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 65127ACBCF; Sun, 19 Sep 2004 09:00:37 +0200 (CEST) Date: Sun, 19 Sep 2004 09:00:37 +0200 From: Pawel Jakub Dawidek To: Julian Elischer Message-ID: <20040919070037.GD30151@darkness.comp.waw.pl> References: <200409181808.i8II8doH002297@gw.catspoiler.org> <414D0776.9010805@elischer.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4QouUtKuvByFBvSj" Content-Disposition: inline In-Reply-To: <414D0776.9010805@elischer.org> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org cc: Don Lewis cc: gerarra@tin.it Subject: Re: FreeBSD Kernel buffer overflow 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: Sun, 19 Sep 2004 07:00:47 -0000 --4QouUtKuvByFBvSj Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Sep 18, 2004 at 09:13:42PM -0700, Julian Elischer wrote: +> >>+#if (__i386__) && (INVARIANTS) +> >>+ KASSERT(new_sysent->nargs >=3D 0 && new_sysent->nargs <=3D=20 +> >>i386_SYS_ARGS, +> >>+ "invalid number of syscalls"); +> >>+#endif +> >>+ +> >> *old_sysent =3D sysent[*offset]; +> >> sysent[*offset] =3D *new_sysent; +> >> return 0; +> > +> > +> >Why panic the machine at this point? Just refuse to install the syscall +> >and return an error. +>=20 +> and the test for INVARIANTS is un-needed.. KASSERT only compiles to anyt= hing +> when INVARIANTS is defined. =2E..and it should be '#ifdef', not '#if'. =2E..and the panic message should be inside (). --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --4QouUtKuvByFBvSj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBTS6VForvXbEpPzQRAnwUAJ9vhbpHMeMKrueynpXwGJQa8muTQgCbBywj fgUju2xIMmaTPX4vjZqQkls= =qh40 -----END PGP SIGNATURE----- --4QouUtKuvByFBvSj--