• Chuck Lever's avatar
    NFSD: Watch for rq_pages bounds checking errors in nfsd_splice_actor() · 0f516248
    Chuck Lever authored
    There have been several bugs over the years where the NFSD splice
    actor has attempted to write outside the rq_pages array.
    
    This is a "should never happen" condition, but if for some reason
    the pipe splice actor should attempt to walk past the end of
    rq_pages, it needs to terminate the READ operation to prevent
    corruption of the pointer addresses in the fields just beyond the
    array.
    
    A server crash is thus prevented. Since the code is not behaving,
    the READ operation returns -EIO to the client. None of the READ
    payload data can be trusted if the splice actor isn't operating as
    expected.
    Suggested-by: default avatarJeff Layton <jlayton@kernel.org>
    Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
    Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
    0f516248
svc.c 41.2 KB