buglwIP - A Lightweight TCP/IP stack - Bugs: bug #51379, Sockets: prevent select_waiting...

 
 

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

bug #51379: Sockets: prevent select_waiting overflow

Submitted by:  Joan Lledó <jllledo>
Submitted on:  Tue 04 Jul 2017 10:49:32 AM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Fri 14 Jul 2017 06:18:17 PM UTC, comment #1:

Fixed slightly different (your fix did not decrease "select_waiting" of already handled sockets).

Thanks for reporting. Although I doubt anyone really has that many threads waiting on a socket, crashing a system with that shouldn't be possible!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 04 Jul 2017 10:49:32 AM UTC, original submission:

From the mailing list:
-------------------------

I'm having an overflow in my select_waiting due to a bug, and the
assertion "sock->select_waiting > 0" is failing and aborting the
stack.

Would it not be better to use LWIP_ERROR instead of LWIP_ASSERT?, to
allow the user to return gracefully with a proper errno. The current
assertion could be used in a DoS attack to abort the stack from a
client.

--------------------------

I don't know if this can be solved by just using LWIP_ERROR, because I don't know the effects this may have on the FULL_DUPLEX thread handling... anyway, attached is a patch that uses LWIP_ERROR.

Joan Lledó <jllledo>

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by jllledo (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 14 Jul 2017 06:18:17 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed
    Tue 04 Jul 2017 10:49:32 AM UTCjllledoAttached File-=>Added 0001-Sockets-prevent-select_waiting-overflow.patch, #41117

    Back to the top


    Powered by Savane 3.1-cleanup1