[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1300878116.3063.101.camel@edumazet-laptop>
Date: Wed, 23 Mar 2011 12:01:56 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: Feng Gao <kernel.goter@...il.com>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] ip_fragment:kernel may panic when replay big packet
with RST flag
Le mercredi 23 mars 2011 à 18:49 +0800, Feng Gao a écrit :
> Hello everyone:
>
> PC(A)-linux(B)-PC(C)
> computer(linux B) with two net interface,eth0 and eth1.
> PC(A) send syn to PC(C) though linux B.
> then PC(C) replay a big packet with RST flag(use tcpsic or other tools).
>
> This RST packet(1480) come in from eth0(mtu 1500) and go out from
> eth1(mtu 700), so this RST packet should fragment.
>
> BUT in tcp_packet func: if the connection has no reply packet,and
> receive the RST packet.ip_conntrack should destroy.
> if (!test_bit(IPS_SEEN_REPLY_BIT, &ct->status)) {
> /* If only reply is a RST, we can consider ourselves not to
> have an established connection: this is a fairly common
> problem case, so we can delete the conntrack
> immediately. --RR */
> if (th->rst) {
> nf_ct_kill_acct(ct, ctinfo, skb);
> return NF_ACCEPT;
> }
> }
>
> BUT the skb->nfct is not set NULL in func nf_ct_kill_acct.
> so when this RST packet goto ip_fragment,ip_fragment call nf_copy, in
> __nf_copy func
> the fragment skb->nfct point to the destory mem.
> dst->nfct = src->nfct;
> nf_conntrack_get(src->nfct);
>
> SO finally.kfree_skb call destroy_conntrack again. this may result in
> LINUX B kernel panic.
>
>
> here is the patch,sorry ,i dont know how to use diff to generate patch.
> :-D
>
Hi Feng
Oh well, please learn how to do this. If you are able to make such
analysis, you sure can learn how to use diff !!!
What is the version of linux you use ?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists