• Jeff Layton's avatar
    cifs: ignore everything in SPNEGO blob after mechTypes · f853c616
    Jeff Layton authored
    We've had several reports of people attempting to mount Windows 8 shares
    and getting failures with a return code of -EINVAL. The default sec=
    mode changed recently to sec=ntlmssp. With that, we expect and parse a
    SPNEGO blob from the server in the NEGOTIATE reply.
    
    The current decode_negTokenInit function first parses all of the
    mechTypes and then tries to parse the rest of the negTokenInit reply.
    The parser however currently expects a mechListMIC or nothing to follow the
    mechTypes, but Windows 8 puts a mechToken field there instead to carry
    some info for the new NegoEx stuff.
    
    In practice, we don't do anything with the fields after the mechTypes
    anyway so I don't see any real benefit in continuing to parse them.
    This patch just has the kernel ignore the fields after the mechTypes.
    We'll probably need to reinstate some of this if we ever want to support
    NegoEx.
    Reported-by: default avatarJason Burgess <jason@jacknife2.dns2go.com>
    Reported-by: default avatarYan Li <elliot.li.tech@gmail.com>
    Signed-off-by: default avatarJeff Layton <jlayton@redhat.com>
    Cc: <stable@vger.kernel.org>
    Signed-off-by: default avatarSteve French <sfrench@us.ibm.com>
    f853c616
asn1.c 13.5 KB