Skip to content
  • Rick Macklem's avatar
    nfsd: Fix sanity check for NFSv4.2 Allocate operations · 06afb53b
    Rick Macklem authored
    The NFSv4.2 Allocate operation sanity checks the aa_offset
    and aa_length arguments.  Since they are assigned to variables
    of type off_t (signed) it was possible for them to be negative.
    It was also possible for aa_offset+aa_length to exceed OFF_MAX
    when stored in lo_end, which is uint64_t.
    
    This patch adds checks for these cases to the sanity check.
    
    Reviewed by:	kib
    MFC after:	2 weeks
    Differential Revision:	https://reviews.freebsd.org/D31511
    06afb53b