• Andrew Morton's avatar
    [PATCH] Zero last byte of mount option page. · d2ca78bb
    Andrew Morton authored
    From: James Morris <jmorris@redhat.com>
    
    Here's a patch which zeroes the last byte of the mount option data copied
    from userspace during mount(2).
    
    For filesystems which parse mount options as strings (the majority), lack
    of a zero terminator could cause the page to be overrun.  The source code
    comments specify that the maximum size of the mount data is PAGE_SIZE-1, so
    this patch will not affect any valid binary-formatted mount data.
    d2ca78bb
namespace.c 27.6 KB