Re: [BK PATCH] Fix ip_conntrack_amanda data corruption bug thatbreaks amanda dumps

From: David S. Miller
Date: Thu Nov 04 2004 - 16:19:37 EST


On Fri, 05 Nov 2004 07:45:53 +1100
Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> wrote:

> Patrick McHardy <kaber@xxxxxxxxx> wrote:
> >
> > The data that is changed is only a copy, the actual packet is not touched.
>
> Does it call skb_ip_make_writable anywhere? If not then it may be
> shared/cloned and can't be written at all.

You're right... the bug was introduced by my skb_header_pointer() changes.
Look at this:

amp = skb_header_pointer(skb, dataoff,
skb->len - dataoff, amanda_buffer);
BUG_ON(amp == NULL);
data = amp;
data_limit = amp + skb->len - dataoff;
*data_limit = '\0';

It should just use the amanda_buffer always.
-
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/