lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #49744] pppos_connect() zeroes in_head and in_tail, po


From: Art Heers
Subject: [lwip-devel] [bug #49744] pppos_connect() zeroes in_head and in_tail, possibly causing a memory leak.
Date: Wed, 30 Nov 2016 20:19:19 +0000 (UTC)
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?49744>

                 Summary: pppos_connect() zeroes in_head and in_tail, possibly
causing a memory leak.
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: artheers
            Submitted on: Wed 30 Nov 2016 08:19:16 PM GMT
                Category: PPP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.0.0

    _______________________________________________________

Details:

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;





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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