buglwIP - A Lightweight TCP/IP stack - Bugs: bug #49744, pppos_connect() zeroes in_head and...

 
 

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

bug #49744: pppos_connect() zeroes in_head and in_tail, possibly causing a memory leak.

Submitted by:  Art Heers <artheers>
Submitted on:  Wed 30 Nov 2016 08:19:16 PM UTC  
 
Category: PPPSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Sylvain Rochet <gradator>
Open/Closed: ClosedPlanned Release: 2.0.1
lwIP version: 2.0.0

Sat 03 Dec 2016 03:29:45 PM UTC, comment #3:

Fixed in commit bcaf2f08aa.

Sylvain Rochet <gradator>
Project MemberIn charge of this item.
Fri 02 Dec 2016 05:08:02 PM UTC, comment #2:

Thank you. Your fix is good.

Art Heers <artheers>
Wed 30 Nov 2016 09:04:47 PM UTC, comment #1:

Absolutely, thank you for reporting it.

Here is my fix about this issue, could you try/comment it ?

Sylvain

(file #39113)

Sylvain Rochet <gradator>
Project MemberIn charge of this item.
Wed 30 Nov 2016 08:19:16 PM UTC, original submission:

pppos_input() can call ppp_input() which can call pppos_disconnect() to disconnect the interface. However, it will continue to read in characters and allocate a pbuf from the PBUF_POOL and keep it in pppos->in_head and in_tail. When a re-connect happens and pppos_connect() is called, this pppos->in_head and in_tail are zeroed, hence a memory leak. (This happens with PPP_INPROC_IRQ_SAFE not defined.)

A fix would be inside pppos_input() to break out of the loop inputting characters after calling ppp_input() if pppos->open == 0. Note that the loop is not even entered if pppos->open == 0.

ppp_input(ppp, inp);
if(pppos->open == 0) //get out if they disconnected
break;

Art Heers <artheers>

 

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by gradator (Updated the item)
  • -unavailable- added by artheers (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 03 Dec 2016 03:29:45 PM UTCgradatorStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 30 Nov 2016 09:04:47 PM UTCgradatorAttached File-=>Added 0001-PPP-PPPoS-fix-memory-leak-when-disconnecting-if-ther.patch, #39113
      StatusNone=>Ready For Test
      Assigned toNone=>gradator
      Planned ReleaseNone=>2.0.1

    Back to the top


    Powered by Savane 3.1-cleanup1