buglwIP - A Lightweight TCP/IP stack - Bugs: bug #51937, Leaking tcp_pcbs on passive close...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #51937: Leaking tcp_pcbs on passive close with unacked data

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Mon 04 Sep 2017 06:40:03 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  2.0.2

Sat 09 Sep 2017 07:48:09 PM UTC, comment #1: 

Should be fixed in git master. Since this is in 2.0.x, we probably should roll out 2.0.3 soon...

Simon Goldschmidt <goldsimon>
Group administrator
Mon 04 Sep 2017 06:40:03 PM UTC, original submission:  

When an application gets a FIN indication (recv callback with NULL pbuf) and calls 'tcp_close()' from this callback when not having all received data ACKed so far, the pcb can be leaked because it is removed from all pcb lists but the check for freeing it delayed is not executed any more when unwinding the call stack.

This is in since 2.0.0.

Suggested fix: move the "if (recv_flags & TF_CLOSED)" check in tcp_input() further down.

Simon Goldschmidt <goldsimon>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-09-09 goldsimon StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code