• Ralf Baechle's avatar
    NET: AX.25: Check ioctl arguments to avoid overflows further down the road. · be639ac6
    Ralf Baechle authored
    Very large, nonsenical arguments or use in very extreme conditions could
    result in integer overflows.  Check ioctls arguments to avoid such
    overflows and return -EINVAL for too large arguments.
    
    To allow the use of AX.25 for even the most extreme setup (think packet
    radio to the Phase 5E mars probe) we make no further attempt to clamp the
    argument range.
    
    Originally reported by Fan Long <longfancn@gmail.com> and a first patch
    was sent by Xi Wang <xi.wang@gmail.com>.
    Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
    Cc: Xi Wang <xi.wang@gmail.com>
    Cc: Joerg Reuter <jreuter@yaina.de>
    Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
    Cc: Thomas Osterried <thomas@osterried.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    be639ac6
af_ax25.c 44 KB