* Re: [PATCH 2.6.19] net/dccp: set safe upper bound for option length
@ 2006-09-22 14:50 Arnaldo Carvalho de Melo
2006-09-22 15:20 ` Gerrit Renker
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-09-22 14:50 UTC (permalink / raw)
To: dccp
On 9/22/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> [DCCP]: current upper limit for option length is 128 bytes;
> much less than actually possible. This patch sets a safe upper
> bound on option length of 992, under worst-case assumptions.
>
> This patches against the 2.6.19 tree by David.
Gerrit, could you please use my net-2.6.19? I'm going over the pending
dccp patches backlog and it is possible that this patch now doesn't
applies, haven't checked tho as I'm going out, will check in 20
minutes or so.
Ah, and please keep dccp@vger.kernel.org instead of netdev when the
patch is only dccp specific.
Thanks,
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2.6.19] net/dccp: set safe upper bound for option length
2006-09-22 14:50 [PATCH 2.6.19] net/dccp: set safe upper bound for option length Arnaldo Carvalho de Melo
@ 2006-09-22 15:20 ` Gerrit Renker
2006-09-22 15:49 ` Arnaldo Carvalho de Melo
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Gerrit Renker @ 2006-09-22 15:20 UTC (permalink / raw)
To: dccp
Hi Arnaldo
| Gerrit, could you please use my net-2.6.19?
Of course - I didn't know it was active. I have just pulled your tree and
the patch applies without problem.
Will use this tree now for all dccp work.
Gerrit
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2.6.19] net/dccp: set safe upper bound for option length
2006-09-22 14:50 [PATCH 2.6.19] net/dccp: set safe upper bound for option length Arnaldo Carvalho de Melo
2006-09-22 15:20 ` Gerrit Renker
@ 2006-09-22 15:49 ` Arnaldo Carvalho de Melo
2006-09-22 19:41 ` Arnaldo Carvalho de Melo
2006-09-25 8:33 ` Gerrit Renker
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-09-22 15:49 UTC (permalink / raw)
To: dccp
On 9/22/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> Hi Arnaldo
> | Gerrit, could you please use my net-2.6.19?
> Of course - I didn't know it was active. I have just pulled your tree and
> the patch applies without problem.
OK, going over it now.
> Will use this tree now for all dccp work.
Thanks,
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.19] net/dccp: set safe upper bound for option length
2006-09-22 14:50 [PATCH 2.6.19] net/dccp: set safe upper bound for option length Arnaldo Carvalho de Melo
2006-09-22 15:20 ` Gerrit Renker
2006-09-22 15:49 ` Arnaldo Carvalho de Melo
@ 2006-09-22 19:41 ` Arnaldo Carvalho de Melo
2006-09-25 8:33 ` Gerrit Renker
3 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-09-22 19:41 UTC (permalink / raw)
To: dccp
On 9/22/06, Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com> wrote:
> On 9/22/06, Gerrit Renker <gerrit@erg.abdn.ac.uk> wrote:
> > Hi Arnaldo
> > | Gerrit, could you please use my net-2.6.19?
> > Of course - I didn't know it was active. I have just pulled your tree and
> > the patch applies without problem.
>
> OK, going over it now.
> diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h
> index 272e858..9e6344f 100644
> --- a/net/dccp/dccp.h
> +++ b/net/dccp/dccp.h
> @@ -40,12 +40,17 @@ extern void dccp_tw_deschedule(struct in
>
> extern void dccp_time_wait(struct sock *sk, int state, int timeo);
>
> -/* FIXME: Right size this */
> -#define DCCP_MAX_OPT_LEN 128
> -
> -#define DCCP_MAX_PACKET_HDR 32
> -
> -#define MAX_DCCP_HEADER (DCCP_MAX_PACKET_HDR + DCCP_MAX_OPT_LEN + MAX_HEADER)
> +/*
> + * Set safe upper bounds for header and option length. Since Data Offset is 8
> + * bits (RFC 4340, sec. 5.1), the total header length can never be more than
> + * 4 * 255 = 1020 bytes. The largest possible header length is 28 bytes (X=1):
> + * - DCCP-Response with ACK Subheader and 4 bytes of Service code OR
> + * - DCCP-Reset with ACK Subheader and 4 bytes of Reset Code fields
> + * Hence a safe upper bound for the maximum option length is 1020-28 = 992
> + */
> +#define DCCP_MAX_OPT_LEN 992
> +#define DCCP_MAX_PACKET_HDR 28
> +#define MAX_DCCP_HEADER (1020 + MAX_HEADER)
With this change DCCP_MAX_PACKET_HDR is not used anywhere, I'm
rewriting it so that we use it to calculate MAX_DCCP_HEADER, something
like:
#define MAX_DCCP_SPECIFIC_HEADER (255 * sizeof(int))
#define DCCP_MAX_PACKET_HDR 28
#define DCCP_MAX_OPT_LEN (MAX_DCCP_SPECIFIC_HEADER - DCCP_MAX_PACKET_HDR)
#define MAX_DCCP_HEADER (MAX_DCCP_SPECIFIC_HEADER + MAX_HEADER)
Thanks,
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.19] net/dccp: set safe upper bound for option length
2006-09-22 14:50 [PATCH 2.6.19] net/dccp: set safe upper bound for option length Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2006-09-22 19:41 ` Arnaldo Carvalho de Melo
@ 2006-09-25 8:33 ` Gerrit Renker
3 siblings, 0 replies; 5+ messages in thread
From: Gerrit Renker @ 2006-09-25 8:33 UTC (permalink / raw)
To: dccp
Hi Arnaldo
| With this change DCCP_MAX_PACKET_HDR is not used anywhere, I'm
| rewriting it so that we use it to calculate MAX_DCCP_HEADER,
That is great, thank you for updating.
Gerrit
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-09-25 8:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-22 14:50 [PATCH 2.6.19] net/dccp: set safe upper bound for option length Arnaldo Carvalho de Melo
2006-09-22 15:20 ` Gerrit Renker
2006-09-22 15:49 ` Arnaldo Carvalho de Melo
2006-09-22 19:41 ` Arnaldo Carvalho de Melo
2006-09-25 8:33 ` Gerrit Renker
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox