Date: Sun, 19 Sep 2004 09:00:37 +0200 From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: Julian Elischer <julian@elischer.org> Cc: gerarra@tin.it Subject: Re: FreeBSD Kernel buffer overflow Message-ID: <20040919070037.GD30151@darkness.comp.waw.pl> In-Reply-To: <414D0776.9010805@elischer.org> References: <200409181808.i8II8doH002297@gw.catspoiler.org> <414D0776.9010805@elischer.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Sat, Sep 18, 2004 at 09:13:42PM -0700, Julian Elischer wrote: +> >>+#if (__i386__) && (INVARIANTS) +> >>+ KASSERT(new_sysent->nargs >= 0 && new_sysent->nargs <= +> >>i386_SYS_ARGS, +> >>+ "invalid number of syscalls"); +> >>+#endif +> >>+ +> >> *old_sysent = sysent[*offset]; +> >> sysent[*offset] = *new_sysent; +> >> return 0; +> > +> > +> >Why panic the machine at this point? Just refuse to install the syscall +> >and return an error. +> +> and the test for INVARIANTS is un-needed.. KASSERT only compiles to anything +> when INVARIANTS is defined. ...and it should be '#ifdef', not '#if'. ...and the panic message should be inside (). -- Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFBTS6VForvXbEpPzQRAnwUAJ9vhbpHMeMKrueynpXwGJQa8muTQgCbBywj fgUju2xIMmaTPX4vjZqQkls= =qh40 -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040919070037.GD30151>
