[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #36318] Wrong UDP data size for small datagrams
From: |
dagos |
Subject: |
[lwip-devel] [bug #36318] Wrong UDP data size for small datagrams |
Date: |
Thu, 26 Apr 2012 15:51:53 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0 |
URL:
<http://savannah.nongnu.org/bugs/?36318>
Summary: Wrong UDP data size for small datagrams
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: dagos
Submitted on: jeu. 26 avril 2012 15:51:52 GMT
Category: UDP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: 1.4.0
_______________________________________________________
Details:
When a UDP datagram WITH PADDING is read by LWIP, p->tot_len includes padding
size.
This is wrong for 2 reasons:
- CheckSum calculation will fail (p->tot_len is used instead of UDP total size
field), and the paquet is rejected (if CHECKSUM_CHECK_UDP = 1)
- Data size given by p->tot_len is wrong so more data could be read by the
application.
To solve the problem, add in udp.c, l.114:
+ p->tot_len = ntohs(udphdr->len); // DELETE PADDING
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?36318>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #36318] Wrong UDP data size for small datagrams,
dagos <=