• Eric W. Biederman's avatar
    [AF_PACKET]: Allow for > 8 byte hardware addresses. · 0fb375fb
    Eric W. Biederman authored
    The convention is that longer addresses will simply extend
    the hardeware address byte arrays at the end of sockaddr_ll and
    packet_mreq.
    
    In making this change a small information leak was also closed.
    The code only initializes the hardware address bytes that are
    used, but all of struct sockaddr_ll was copied to userspace.
    Now we just copy sockaddr_ll to the last byte of the hardware
    address used.
    
    For error checking larger structures than our internal
    maximums continue to be allowed but an error is signaled if we can
    not fit the hardware address into our internal structure.
    Signed-off-by: default avatarEric W. Biederman <ebiederm@xmission.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0fb375fb
af_packet.c 42.7 KB