Re: [PATCH] new UDPCP Communication Protocol

From: Stefani Seibold
Date: Sun Jan 02 2011 - 17:54:23 EST


Am Sonntag, den 02.01.2011, 23:49 +0100 schrieb Eric Dumazet:
> Le dimanche 02 janvier 2011 à 23:39 +0100, stefani@xxxxxxxxxxx a écrit :
> > +
> > +/*
> > + * Create a new destination descriptor for the given IPV4 address and port
> > + */
> > +static struct udpcp_dest *new_dest(struct sock *sk, __be32 addr, __be16 port)
> > +{
> > + struct udpcp_dest *dest;
> > + struct udpcp_sock *usk = udpcp_sk(sk);
> > +
> > + if (usk->connections >= udpcp_max_connections)
> > + return NULL;
> > +
> > + dest = kzalloc(sizeof(*dest), sk->sk_allocation);
> > +
> > + if (dest) {
> > + usk->connections++;
> > + skb_queue_head_init(&dest->xmit);
> > + dest->addr = addr;
> > + dest->port = port;
> > + dest->ackmode = UDPCP_ACK;
> > + list_add_tail(&dest->list, &usk->destlist);
> > + }
> > +
> > + return dest;
> > +}
> > +
>
> Hmm, so 'connections' is increased, never decreased.
>
> This seems a fatal flaw in this protocol, since a malicious user can
> easily fill the list with garbage, and block regular communications.

You are right, there is now way to detect which connection is no longer
needed. I have not designed this protocol, so i cannot fix it.

But in our environment this will be used together with an firewall
and/or ipsec. In this case it it safe.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/