buglwIP - A Lightweight TCP/IP stack - Bugs: bug #21698, netconn->recv_avail is not...

 
 

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

bug #21698: netconn->recv_avail is not protected

Submitted by:  Simon Goldschmidt <goldsimon>
Submitted on:  Sun 02 Dec 2007 03:42:27 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

(Jump to the original submission Jump to the original submission)

Fri 21 Dec 2007 02:59:17 PM UTC, comment #6:

checked in

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 16 Dec 2007 05:11:01 PM UTC, comment #5:

I guess you mean the use of SYS_ARCH_GET in recv_raw() and recv_udp(). You're right about that, it should be inside the #if LWIP_SO_RCVBUF!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 16 Dec 2007 04:58:40 PM UTC, comment #4:

The only problem is you don't use LWIP_SO_RCVBUF option to avoid to do some part of the code in api_msg.c

Frédéric Bernon <fbernon>
Project Member
Sun 16 Dec 2007 04:30:08 PM UTC, comment #3:

This patch introduces SYS_ARCH_SET/_GET/_INC_/DEC macros (slightly different than in file file #14484 from task #7421) in sys.h.

These are then used to protect access to conn->recv_avail.

These macros also would be the base for implementing a listen backlog.

(file #14636)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 02 Dec 2007 06:29:46 PM UTC, comment #2:

Ah, that's where I saw it...

Anyway, I'd leave this open just to remember the bug.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sun 02 Dec 2007 05:13:15 PM UTC, comment #1:

See https://savannah.nongnu.org/task/?7421 "task #7421 : Implement SO_RCVBUF". The problem is common for FIONREAD and SO_RCVBUF.

Frédéric Bernon <fbernon>
Project Member
Sun 02 Dec 2007 03:42:27 PM UTC, original submission:

Access to recv_avail in struct netconn should be protected against concurrent access. I think we have talke about that already somewhere, but I don't remember where...

I think Frédéric has proposed interlocked increase/decrease/get macros for that.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.

 

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 21 Dec 2007 02:59:17 PM UTCgoldsimonStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Sun 16 Dec 2007 04:30:08 PM UTCgoldsimonAttached File-=>Added lwip_protect_recv_avail.patch, #14636
      StatusNone=>In Progress
      Assigned toNone=>goldsimon

    Back to the top


    Powered by Savane 3.1-cleanup1