Skip to content
  • David Howells's avatar
    afs: Fix missing XDR advance in xdr_decode_{AFS,YFS}FSFetchStatus() · c72057b5
    David Howells authored
    If we receive a status record that has VNOVNODE set in the abort field,
    xdr_decode_AFSFetchStatus() and xdr_decode_YFSFetchStatus() don't advance
    the XDR pointer, thereby corrupting anything subsequent decodes from the
    same block of data.
    
    This has the potential to affect AFS.InlineBulkStatus and
    YFS.InlineBulkStatus operation, but probably doesn't since the status
    records are extracted as individual blocks of data and the buffer pointer
    is reset between blocks.
    
    It does affect YFS.RemoveFile2 operation, corrupting the volsync record -
    though that is not currently used.
    
    Other operations abort the entire operation rather than returning an error
    inline, in which case there is no decoding to be done.
    
    Fix this by unconditionally advancing the xdr pointer.
    
    Fixes: 684b0f68
    
     ("afs: Fix AFSFetchStatus decoder to provide OpenAFS compatibility")
    Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
    c72057b5