My nfs server now always panics when it attempts to export ufs
filesystems.  This is caused by my mount(8) being slightly out of
date.  This shouldn't be a problem, but `struct export_args' contains
a `struct ucred' which contains a `struct mtx', so when `struct mtx'
shrunk by 1 pointer yesterday, the out of date mount(8) started
supplying garbage for all the export args following the ucred one.
FreeBSD does very little checking of the export args and panics in
the following malloc() in vfs_hang_addrlist():

        i = sizeof(struct netcred) + argp->ex_addrlen + argp->ex_masklen;
        np = (struct netcred *)malloc(i, M_NETADDR, M_WAITOK | M_ZERO);

ISTR a PR about lack of checking of export args.

Somehow there were few problems when `struct mtx' was added to
`struct ucred'.  The critical args were probably usually 0.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to