lkml.org 
[lkml]   [2006]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [netfilter-core] Re: [lockup] 2.6.17-rc3: netfilter/sctp: lockup in sctp_new(), do_basic_checks()

    * Ingo Molnar <mingo@elte.hu> wrote:

    > > How about this patch (based on your patch, but typos fixed and also
    > > covers nf_conntrack)?
    >
    > sure, fine with me!

    find updated patch below - quilt complained about 3 cases of
    whitespace-at-end-of-line. (btw., this file at quite a distance from
    proper Documentation/CodingStyle.)

    Ingo

    Index: linux/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
    ===================================================================
    --- linux.orig/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
    +++ linux/net/ipv4/netfilter/ip_conntrack_proto_sctp.c
    @@ -235,12 +235,15 @@ static int do_basic_checks(struct ip_con
    flag = 1;
    }

    - /* Cookie Ack/Echo chunks not the first OR
    - Init / Init Ack / Shutdown compl chunks not the only chunks */
    - if ((sch->type == SCTP_CID_COOKIE_ACK
    + /*
    + * Cookie Ack/Echo chunks not the first OR
    + * Init / Init Ack / Shutdown compl chunks not the only chunks
    + * OR zero-length.
    + */
    + if (((sch->type == SCTP_CID_COOKIE_ACK
    || sch->type == SCTP_CID_COOKIE_ECHO
    || flag)
    - && count !=0 ) {
    + && count !=0) || !sch->length) {
    DEBUGP("Basic checks failed\n");
    return 1;
    }
    Index: linux/net/netfilter/nf_conntrack_proto_sctp.c
    ===================================================================
    --- linux.orig/net/netfilter/nf_conntrack_proto_sctp.c
    +++ linux/net/netfilter/nf_conntrack_proto_sctp.c
    @@ -240,12 +240,15 @@ static int do_basic_checks(struct nf_con
    flag = 1;
    }

    - /* Cookie Ack/Echo chunks not the first OR
    - Init / Init Ack / Shutdown compl chunks not the only chunks */
    - if ((sch->type == SCTP_CID_COOKIE_ACK
    + /*
    + * Cookie Ack/Echo chunks not the first OR
    + * Init / Init Ack / Shutdown compl chunks not the only chunks
    + * OR zero-length.
    + */
    + if (((sch->type == SCTP_CID_COOKIE_ACK
    || sch->type == SCTP_CID_COOKIE_ECHO
    || flag)
    - && count !=0 ) {
    + && count !=0) || !sch->length) {
    DEBUGP("Basic checks failed\n");
    return 1;
    }
    -
    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: 2006-05-02 16:40    [W:0.046 / U:0.608 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site