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

Submitter:  Simon Goldschmidt <goldsimon>
Submitted:  Sun 02 Dec 2007 03:42:27 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned Release:  None
lwIP version:  None

Jump to the original submission

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

checked in

Simon Goldschmidt <goldsimon>
Group administrator
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>
Group administrator
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>
Group 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>
Group administrator
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>
Group administrator
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>
Group 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>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by fbernon (Posted a comment)
  • -email is unavailable- added by goldsimon (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-12-21 goldsimon StatusIn Progress Fixed
        Open/ClosedOpen Closed
    2007-12-16 goldsimon Attached File- Added lwip_protect_recv_avail.patch, #14636
        StatusNone In Progress
        Assigned toNone goldsimon

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code