[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] RAW PCB disconnected
From: |
Sylvain Rochet |
Subject: |
Re: [lwip-users] RAW PCB disconnected |
Date: |
Mon, 25 Jul 2016 10:06:15 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi Frédéric,
On Mon, Jul 25, 2016 at 05:17:37AM +0000, Frédéric Grandjean wrote:
> Dear community members,
>
> I need your lights about a behavior of LwIP;
>
> We just solved an issue in our app, in RAW mode, when a PCB was
> disconnected (RESET) by the remote host. In that case, the bug was we
> called the tcp_close function anyway.
>
> This led to a strange behavior, where the PCB management (chained
> list) finally looped the same PCB to itself, ending in an endless
> loop.
>
> In the beginning this looked like an issue in LwIP. Of course, finally
> it was just in our app! But I would say there is a weakness in the
> stack in that case !?
>
> What's your opinion about this?
That's a use after free programming error, behavior is then undefined.
> How can I make sure this kind of scenario won't happen again ?
Well, don't do use after free :-)
Sylvain
signature.asc
Description: Digital signature