<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/dccp, branch v2.6.27.9</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/net/dccp?h=v2.6.27.9</id>
<link rel='self' href='https://git.amat.us/linux/atom/net/dccp?h=v2.6.27.9'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2008-08-19T04:14:20Z</updated>
<entry>
<title>dccp: Fix panic caused by too early termination of retransmission mechanism</title>
<updated>2008-08-19T04:14:20Z</updated>
<author>
<name>Gerrit Renker</name>
<email>gerrit@erg.abdn.ac.uk</email>
</author>
<published>2008-08-19T04:14:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d28934ad8a4e87203a95de9c376611de8bc2f013'/>
<id>urn:sha1:d28934ad8a4e87203a95de9c376611de8bc2f013</id>
<content type='text'>
Thanks is due to Wei Yongjun for the detailed analysis and description of this
bug at http://marc.info/?l=dccp&amp;m=121739364909199&amp;w=2

The problem is that invalid packets received by a client in state REQUEST cause
the retransmission timer for the DCCP-Request to be reset. This includes freeing
the Request-skb ( in dccp_rcv_request_sent_state_process() ). As a consequence,
 * the arrival of further packets cause a double-free, triggering a panic(),
 * the connection then may hang, since further retransmissions are blocked.

This patch changes the order of statements so that the retransmission timer is
reset, and the pending Request freed, only if a valid Response has arrived (or
the number of sysctl-retries has been exhausted).

Further changes:
----------------
To be on the safe side, replaced __kfree_skb with kfree_skb so that if due to
unexpected circumstances the sk_send_head is NULL the WARN_ON is used instead.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

</content>
</entry>
<entry>
<title>dccp: change L/R must have at least one byte in the dccpsf_val field</title>
<updated>2008-08-13T20:48:39Z</updated>
<author>
<name>Arnaldo Carvalho de Melo</name>
<email>acme@redhat.com</email>
</author>
<published>2008-08-13T20:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3e8a0a559c66ee9e7468195691a56fefc3589740'/>
<id>urn:sha1:3e8a0a559c66ee9e7468195691a56fefc3589740</id>
<content type='text'>
    
Thanks to Eugene Teo for reporting this problem.
    
Signed-off-by: Eugene Teo &lt;eugenete@kernel.sg&gt;
Signed-off-by: Arnaldo Carvalho de Melo &lt;acme@redhat.com&gt;
Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>tcp: Fix kernel panic when calling tcp_v(4/6)_md5_do_lookup</title>
<updated>2008-08-07T06:50:04Z</updated>
<author>
<name>Gui Jianfeng</name>
<email>guijianfeng@cn.fujitsu.com</email>
</author>
<published>2008-08-07T06:50:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6edafaaf6f5e70ef1e620ff01bd6bacebe1e0718'/>
<id>urn:sha1:6edafaaf6f5e70ef1e620ff01bd6bacebe1e0718</id>
<content type='text'>
If the following packet flow happen, kernel will panic.
MathineA			MathineB
		SYN
	----------------------&gt;    
        	SYN+ACK
	&lt;----------------------
		ACK(bad seq)
	----------------------&gt;
When a bad seq ACK is received, tcp_v4_md5_do_lookup(skb-&gt;sk, ip_hdr(skb)-&gt;daddr))
is finally called by tcp_v4_reqsk_send_ack(), but the first parameter(skb-&gt;sk) is 
NULL at that moment, so kernel panic happens.
This patch fixes this bug.

OOPS output is as following:
[  302.812793] IP: [&lt;c05cfaa6&gt;] tcp_v4_md5_do_lookup+0x12/0x42
[  302.817075] Oops: 0000 [#1] SMP 
[  302.819815] Modules linked in: ipv6 loop dm_multipath rtc_cmos rtc_core rtc_lib pcspkr pcnet32 mii i2c_piix4 parport_pc i2c_core parport ac button ata_piix libata dm_mod mptspi mptscsih mptbase scsi_transport_spi sd_mod scsi_mod crc_t10dif ext3 jbd mbcache uhci_hcd ohci_hcd ehci_hcd [last unloaded: scsi_wait_scan]
[  302.849946] 
[  302.851198] Pid: 0, comm: swapper Not tainted (2.6.27-rc1-guijf #5)
[  302.855184] EIP: 0060:[&lt;c05cfaa6&gt;] EFLAGS: 00010296 CPU: 0
[  302.858296] EIP is at tcp_v4_md5_do_lookup+0x12/0x42
[  302.861027] EAX: 0000001e EBX: 00000000 ECX: 00000046 EDX: 00000046
[  302.864867] ESI: ceb69e00 EDI: 1467a8c0 EBP: cf75f180 ESP: c0792e54
[  302.868333]  DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[  302.871287] Process swapper (pid: 0, ti=c0792000 task=c0712340 task.ti=c0746000)
[  302.875592] Stack: c06f413a 00000000 cf75f180 ceb69e00 00000000 c05d0d86 000016d0 ceac5400 
[  302.883275]        c05d28f8 000016d0 ceb69e00 ceb69e20 681bf6e3 00001000 00000000 0a67a8c0 
[  302.890971]        ceac5400 c04250a3 c06f413a c0792eb0 c0792edc cf59a620 cf59a620 cf59a634 
[  302.900140] Call Trace:
[  302.902392]  [&lt;c05d0d86&gt;] tcp_v4_reqsk_send_ack+0x17/0x35
[  302.907060]  [&lt;c05d28f8&gt;] tcp_check_req+0x156/0x372
[  302.910082]  [&lt;c04250a3&gt;] printk+0x14/0x18
[  302.912868]  [&lt;c05d0aa1&gt;] tcp_v4_do_rcv+0x1d3/0x2bf
[  302.917423]  [&lt;c05d26be&gt;] tcp_v4_rcv+0x563/0x5b9
[  302.920453]  [&lt;c05bb20f&gt;] ip_local_deliver_finish+0xe8/0x183
[  302.923865]  [&lt;c05bb10a&gt;] ip_rcv_finish+0x286/0x2a3
[  302.928569]  [&lt;c059e438&gt;] dev_alloc_skb+0x11/0x25
[  302.931563]  [&lt;c05a211f&gt;] netif_receive_skb+0x2d6/0x33a
[  302.934914]  [&lt;d0917941&gt;] pcnet32_poll+0x333/0x680 [pcnet32]
[  302.938735]  [&lt;c05a3b48&gt;] net_rx_action+0x5c/0xfe
[  302.941792]  [&lt;c042856b&gt;] __do_softirq+0x5d/0xc1
[  302.944788]  [&lt;c042850e&gt;] __do_softirq+0x0/0xc1
[  302.948999]  [&lt;c040564b&gt;] do_softirq+0x55/0x88
[  302.951870]  [&lt;c04501b1&gt;] handle_fasteoi_irq+0x0/0xa4
[  302.954986]  [&lt;c04284da&gt;] irq_exit+0x35/0x69
[  302.959081]  [&lt;c0405717&gt;] do_IRQ+0x99/0xae
[  302.961896]  [&lt;c040422b&gt;] common_interrupt+0x23/0x28
[  302.966279]  [&lt;c040819d&gt;] default_idle+0x2a/0x3d
[  302.969212]  [&lt;c0402552&gt;] cpu_idle+0xb2/0xd2
[  302.972169]  =======================
[  302.974274] Code: fc ff 84 d2 0f 84 df fd ff ff e9 34 fe ff ff 83 c4 0c 5b 5e 5f 5d c3 90 90 57 89 d7 56 53 89 c3 50 68 3a 41 6f c0 e8 e9 55 e5 ff &lt;8b&gt; 93 9c 04 00 00 58 85 d2 59 74 1e 8b 72 10 31 db 31 c9 85 f6 
[  303.011610] EIP: [&lt;c05cfaa6&gt;] tcp_v4_md5_do_lookup+0x12/0x42 SS:ESP 0068:c0792e54
[  303.018360] Kernel panic - not syncing: Fatal exception in interrupt

Signed-off-by: Gui Jianfeng &lt;guijianfeng@cn.fujitsu.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>dccp: Add check for truncated ICMPv6 DCCP error packets</title>
<updated>2008-07-26T10:59:11Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-07-26T10:59:11Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=860239c56bbc7c830bdbcec93b140f22a5a5219b'/>
<id>urn:sha1:860239c56bbc7c830bdbcec93b140f22a5a5219b</id>
<content type='text'>
This patch adds a minimum-length check for ICMPv6 packets, as per the previous
patch for ICMPv4 payloads.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
</content>
</entry>
<entry>
<title>dccp: Fix incorrect length check for ICMPv4 packets</title>
<updated>2008-07-26T10:59:10Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-07-26T10:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=18e1d836002ad970f42736bad09b7be9cfe99545'/>
<id>urn:sha1:18e1d836002ad970f42736bad09b7be9cfe99545</id>
<content type='text'>
Unlike TCP, which only needs 8 octets of original packet data, DCCP requires
minimally 12 or 16 bytes for ICMP-payload sequence number checks.

This patch replaces the insufficient length constant of 8 with a two-stage
test, making sure that 12 bytes are available, before computing the basic
header length required for sequence number checks.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
</content>
</entry>
<entry>
<title>dccp: Add check for sequence number in ICMPv6 message</title>
<updated>2008-07-26T10:59:10Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-07-26T10:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e0bcfb0c6a6ed9ebd68746b306298dc5797fd426'/>
<id>urn:sha1:e0bcfb0c6a6ed9ebd68746b306298dc5797fd426</id>
<content type='text'>
This adds a sequence number check for ICMPv6 DCCP error packets, in the same
manner as it has been done for ICMPv4 in the previous patch.

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Acked-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
</content>
</entry>
<entry>
<title>dccp: Fix sequence number check for ICMPv4 packets</title>
<updated>2008-07-26T10:59:10Z</updated>
<author>
<name>Wei Yongjun</name>
<email>yjwei@cn.fujitsu.com</email>
</author>
<published>2008-07-26T10:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d68f0866f76e2bc4ddc07e88e2cb1bc8959a6d7e'/>
<id>urn:sha1:d68f0866f76e2bc4ddc07e88e2cb1bc8959a6d7e</id>
<content type='text'>
The payload of ICMP message is a part of the packet sent by ourself,
so the sequence number check must use AWL and AWH, not SWL and SWH.

For example:
     Endpoint A                  Endpoint B

     DATA-ACK       --------&gt;
     (SEQ=X)
                    &lt;--------    ICMP (Fragmentation Needed)
                                 (SEQ=X)

Signed-off-by: Wei Yongjun &lt;yjwei@cn.fujitsu.com&gt;
Acked-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
</content>
</entry>
<entry>
<title>dccp: Bug-Fix - AWL was never updated</title>
<updated>2008-07-26T10:59:10Z</updated>
<author>
<name>Gerrit Renker</name>
<email>gerrit@erg.abdn.ac.uk</email>
</author>
<published>2008-07-26T10:59:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=73f18fdbca3f92b90aeaee16f5175fe30496e218'/>
<id>urn:sha1:73f18fdbca3f92b90aeaee16f5175fe30496e218</id>
<content type='text'>
The AWL lower Ack validity window advances in proportion to GSS, the greatest
sequence number sent. Updating AWL other than at connection setup (in the
DCCP-Request sent by dccp_v{4,6}_connect()) was missing in the DCCP code.

This bug lead to syslog messages such as

 "kernel: dccp_check_seqno: DCCP: Step 6 failed for DATAACK packet, [...] 
  P.ackno exists or LAWL(82947089) &lt;= P.ackno(82948208)
                                   &lt;= S.AWH(82948728), sending SYNC..."

The difference between AWL/AWH here is 1639 packets, while the expected value
(the Sequence Window) would have been 100 (the default).  A closer look showed
that LAWL = AWL = 82947089 equalled the ISS on the Response.

The patch now updates AWL with each increase of GSS.


Further changes:
----------------
The patch also enforces more stringent checks on the ISS sequence number:

 * AWL is initialised to ISS at connection setup and remains at this value;
 * AWH is then always set to GSS (via dccp_update_gss());
 * so on the first Request: AWL =      AWH = ISS,
   and on the n-th Request: AWL = ISS, AWH = ISS + n.

As a consequence, only Response packets that refer to Requests sent by this
host will pass, all others are discarded. This is the intention and in effect 
implements the initial adjustments for AWL as specified in RFC 4340, 7.5.1.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;   
Acked-by: Ian McDonald &lt;ian.mcdonald@jandi.co.nz&gt;
</content>
</entry>
<entry>
<title>dccp: Allow to distinguish original and retransmitted packets</title>
<updated>2008-07-26T10:59:09Z</updated>
<author>
<name>Gerrit Renker</name>
<email>gerrit@erg.abdn.ac.uk</email>
</author>
<published>2008-07-26T10:59:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=59435444a13ed52d3444c5df26b73d3086bcd57b'/>
<id>urn:sha1:59435444a13ed52d3444c5df26b73d3086bcd57b</id>
<content type='text'>
This patch allows the sender to distinguish original and retransmitted packets,
which is in particular needed for the retransmission of DCCP-Requests:
 * the first Request uses ISS (generated in net/dccp/ip*.c), and sets GSS = ISS;
 * all retransmitted Requests use GSS' = GSS + 1, so that the n-th retransmitted
   Request has sequence number ISS + n (mod 48).

To add generic support, the patch reorganises existing code so that:
 * icsk_retransmits == 0     for the original packet and
 * icsk_retransmits = n &gt; 0  for the n-th retransmitted packet
at the time dccp_transmit_skb() is called, via dccp_retransmit_skb().
 
Thanks to Wei Yongjun for pointing this problem out.

Further changes:
----------------
 * removed the `skb' argument from dccp_retransmit_skb(), since sk_send_head
   is used for all retransmissions (the exception is client-Acks in PARTOPEN
   state, but these do not use sk_send_head);
 * since sk_send_head always contains the original skb (via dccp_entail()),
   skb_cloned() never evaluated to true and thus pskb_copy() was never used.

Signed-off-by: Gerrit Renker &lt;gerrit@erg.abdn.ac.uk&gt;
</content>
</entry>
<entry>
<title>net: convert BUG_TRAP to generic WARN_ON</title>
<updated>2008-07-26T04:43:18Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@helsinki.fi</email>
</author>
<published>2008-07-26T04:43:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=547b792cac0a038b9dbf958d3c120df3740b5572'/>
<id>urn:sha1:547b792cac0a038b9dbf958d3c120df3740b5572</id>
<content type='text'>
Removes legacy reinvent-the-wheel type thing. The generic
machinery integrates much better to automated debugging aids
such as kerneloops.org (and others), and is unambiguous due to
better naming. Non-intuively BUG_TRAP() is actually equal to
WARN_ON() rather than BUG_ON() though some might actually be
promoted to BUG_ON() but I left that to future.

I could make at least one BUILD_BUG_ON conversion.

Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@helsinki.fi&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
