phdeniel/nfs-ganesha — Issue #66: Major Bug in export list management with mountd
Author: phdeniel
Created: 2012-03-08 12:51:29+00:00
State: open

I saw a major bug with export list management in MOUNTPROC3_MNT. I
suspect this bug occurred during connectathon as we fixed the issue that
prevented Solaris client to authenticate MOUNT3 requests on ganesha.
For every call to the every protocol, a pexport pointer (pointing to an
export entry) is pass to the protocol function. If protocol is MOUNT3,
the first pexport is passed : pexport are chained, this is a way to pass
the whole set of export entries to MOUNT3_MOUNT and MOUNT3_DUMP (which
is what they need). So far, everything is OK.

BUT : the pexport is now used to call export_check_access for all
protocols, including MOUNT. This makes no sense : the MOUNT request are
not attached to an export list, it will provide information on export
entries. This lead to MOUNT to requires authentication by
export_check_access() with the provided pexport... Aka the first in the
config file. Imagine you had two different export entries with two
different client (entry1 export to hostA only and entry2 to hostB only)
: all mount request from hostB, because access will be checked against
entry1's ACL which denies it (it allow only hostA).

I have a fix on that, I'll push it before Today's phone call.
The bug is kind of vicious : I believe that 99.99% of the configuration
that we use for test have only one export entry, or export entries with
similar allowed clients. We need to have, as the first export export
entry, a dumb export entry which allow only one silly IP to access it.
This is how I could reproduce the bug.