fstat triggered INVARIANTS panic in memrw()

Poul-Henning Kamp phk at phk.freebsd.dk
Fri Jan 28 04:59:24 PST 2005


In message <200501280254.j0S2sMJH050277 at blue.mwk.domain>, "Mark W. Krentel" writes:
>I've looked a little deeper into Kris's fstat panic.
>Turns out there are bugs in three places.
>
>(1) fstat(1) sometimes calls kvm_read() with a ridiculously out-of-
>bounds value for nbytes.

The only real problem here is that fstat(1) uses kvm in the first place.
The necessary information should be exported via sysctls.

No program used as part of regular system operation should use kvm.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list