lkml.org 
[lkml]   [2011]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH 1/2] ax25: integer overflows in ax25_setsockopt()
    All these magic numbers come from net/ax25/sysctl_net_ax25.c, where
    min/max values of each field are set for sysctl. Is it okay to use
    them?

    - xi

    On Wed, Nov 23, 2011 at 5:44 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
    >>       case AX25_T1:
    >> -             if (opt < 1) {
    >> +             if (opt < 1 || opt > 30) {
    >
    > Where do these values come from ? If they are from some 'standard' then
    > really we should avoid restricting needlessly to it, particularly as
    > AX.25 isn't well defined and is used for all sorts of crazy stuff where
    > the usual range of settings isn't useful.
    >
    > Restricting to the point it would overflow makes sense however.
    >
    > Alan
    >
    >
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2011-11-23 15:07    [W:0.023 / U:0.216 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site