lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #19162] lwip_sendto: possible to corrupt remote addr/p


From: Jonathan Larmour
Subject: [lwip-devel] [bug #19162] lwip_sendto: possible to corrupt remote addr/port connection state
Date: Thu, 12 Apr 2007 02:47:34 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060513 Fedora/1.0.8-1.1.fc3.1.legacy Firefox/1.0.8

Follow-up Comment #20, bug #19162 (project lwip):

I have some queries about the patch:

* re api_msg.c changes, fromport and fromaddr being used when sending. I
think their names would need changing in that case.

* In any case, these fields would now need initialising in netbuf_new,
otherwise they may have any value.

* But I'm uneasy about additions within the netconn API to support the BSD
API. These changes do nothing for netconn API users - they're only to fit the
BSD API requirements. Given that, I think it would therefore be better to be
like before and change the connection temporarily. I've mentioned
tcpip_callback() already a few times just this evening, but perhaps that
would be better than creating a new message type just for the BSD sockets.

* The changed lwip_sendto seems to return lwip error codes, and not set
errno.

* If that's fixed, lwip_send would also need changing so errno is only set in
TCP branch.

* According to the standards, send(s,buf,len,fl) is the same as
sendto(s,buf,len,fl,NULL,0) (see "Application usage" at
http://www.opengroup.org/onlinepubs/007908799/xns/send.html ). So allowing a
NULL sockaddr in lwip_sendto would be better than having to set up a dummy
struct sockaddr in lwip_send to avoid the assert. I think lwip_send() (and
lwip_write()) can be made to just call lwip_sendto() directly.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?19162>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]