buglwIP - A Lightweight TCP/IP stack - Bugs: bug #57376, Assertion "inconsistent...


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

bug #57376: Assertion "inconsistent oversize vs. space" failed

Submitted by:  Hiromasa Ito <vhertz>
Submitted on:  Sat 07 Dec 2019 01:15:12 PM UTC  
Category:  TCP Severity:  3 - Normal
Item Group:  Crash Error Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  Other

Sat 07 Dec 2019 01:15:12 PM UTC, original submission:  

Hi, all.

This is one of the assertion failures I found by fuzzing (to lwIP ver2.1.0.RC1).
The following LWIP_ASSERT() at lwip/src/core/tcp_out.c:504 fails.

LWIP_ASSERT("inconsistent oversize vs. space", oversize <= space);

From my point of view, this is caused by an incoming packet set MSS.
Before checking this assertion, the value of `space` and `oversize` are set as below:

space = mss_local - (last_unsent->len + unsent_optlen);

oversize = pcb->unsent_oversize;

The value of `space` depends on MSS when tcp_write() is called.
On the other hand, the value of `oversize` depends on `pcb->unsent_oversize` only.
In lwIP, incoming packets can change the MSS at an arbitrary timing.
As a result, the assertion can fail.

You can reproduce this failure with 'crashed_inputs/005' attached to the following message of lwip-devel:

Hiromasa Ito <vhertz>


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 vhertz (Submitted the item)

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

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.5