Skip site navigation (1)Skip section navigation (2)
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



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