[Top][All Lists]

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

[lwip-devel] [bug #58441] Invalid PPP data accumulates forever

From: Ashley Duncan
Subject: [lwip-devel] [bug #58441] Invalid PPP data accumulates forever
Date: Sun, 24 May 2020 23:50:43 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36


                 Summary: Invalid PPP data accumulates forever
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: ashesman
            Submitted on: Mon 25 May 2020 03:50:41 AM UTC
                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.1.1



Today I had an issue with the wifi module I use where it crashes and resets,
dropping its baud rate in the process and dumping a whole lot of rubbish on
the serial port.  This is received as a long series of 0x80, 0x80, 0x80, x80,
... due to the baud rate mismatch.

I did a bit of debugging and noticed that this sequence of data just keeps
getting added to a pbuf forever by pppos_input, there are no checks that
result in the data being discarded.

Forgive me if this is just a side effect of the PPP protocol that I don't
understand that is unavoidable.  I am also unable to propose a suitable
solution due to my lack of PPP protocol knowledge.  The correct solution is to
discard the UART received bytes that were corrupt as UART would have received
them with an error flag.

There is a check at line 629 of pppos.c that is currently disabled.  This
check would have caught this situation.

        case PDCONTROL:                 /* Process control field. */
          /* If we don't get a valid control code, restart. */
          if (cur_char == PPP_UI) {
            pppos->in_state = PDPROTOCOL1;
          /* no break */

#if 0
          else {
                     ("pppos_input[%d]: Invalid control <%d>\n",
ppp->netif->num, cur_char));
            pppos->in_state = PDSTART;
          /* Fall through */

Below is some example PPP test data that shows what I received:




Reply to this item at:


  Message sent via Savannah

reply via email to

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