Page MenuHomeFreeBSD

sys/rpc: UNIX auth: Use AUTH_SYS_MAX_{GROUPS,HOSTNAME} as limits (1/2)
AcceptedPublic

Authored by olce on Tue, Oct 7, 5:14 PM.
Tags
None
Referenced Files
F131956518: D52962.diff
Sun, Oct 12, 12:11 PM
Unknown Object (File)
Wed, Oct 8, 1:26 PM
Unknown Object (File)
Wed, Oct 8, 10:47 AM
Unknown Object (File)
Wed, Oct 8, 5:43 AM
Unknown Object (File)
Wed, Oct 8, 4:06 AM
Unknown Object (File)
Wed, Oct 8, 3:54 AM
Unknown Object (File)
Wed, Oct 8, 3:26 AM
Subscribers

Details

Reviewers
rmacklem
dfr
Summary

Consistently with the XDR_INLINE() variant of xdr_authunix_parms()
(_svcauth_unix() in 'svc_auth_unix.c'), reject messages with credentials
having a machine name length in excess of AUTH_SYS_MAX_HOSTNAME or more
than AUTH_SYS_MAX_GROUPS supplementary groups, which do not conform to
RFC 5531. This is done mainly because we cannot store excess groups
anyway, even if at odds with the robustness principle ("be liberal in
what you accept").

Fixes: dfdcada31e79 ("Add the new kernel-mode NFS Lock Manager.")
Sponsored by: The FreeBSD Foundation

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 67620
Build 64503: arc lint + arc unit

Event Timeline

olce requested review of this revision.Tue, Oct 7, 5:14 PM

Looks ok to me. You can decide whether or not to add the
KASSERT for x_op != XDR_FREE?

sys/rpc/authunix_prot.c
64

These xdr functions usually have a case where
xdrs->x_op is XDR_FREE.

Maybe adding a KASSERT to check that x_op != XDR_FREE
might be useful?

This revision is now accepted and ready to land.Fri, Oct 10, 10:29 PM