• Jan Harkes's avatar
    coda: fix 'kernel memory exposure attempt' in fsync · 7b7a1c39
    Jan Harkes authored
    commit d337b66a upstream.
    
    When an application called fsync on a file in Coda a small request with
    just the file identifier was allocated, but the declared length was set
    to the size of union of all possible upcall requests.
    
    This bug has been around for a very long time and is now caught by the
    extra checking in usercopy that was introduced in Linux-4.8.
    
    The exposure happens when the Coda cache manager process reads the fsync
    upcall request at which point it is killed. As a result there is nobody
    servicing any further upcalls, trapping any processes that try to access
    the mounted Coda filesystem.
    Signed-off-by: default avatarJan Harkes <jaharkes@cs.cmu.edu>
    Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    7b7a1c39
upcall.c 22.8 KB