FreeBSD Kernel buffer overflow
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Sep 19 00:00:47 PDT 2004
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 at FreeBSD.org http://garage.freebsd.pl
FreeBSD committer Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20040919/81cff504/attachment.bin
More information about the freebsd-hackers
mailing list