patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8425, netconn_free needs to check...

 
 

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

patch #8425: netconn_free needs to check validity of semaphores

Submitter:  TabascoEye <tabascoeye>
Submitted:  Thu 27 Mar 2014 03:41:20 PM UTC
   
 
Category:  sockets/netconn Priority:  7 - High
Status:  Invalid Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Sun 18 Jan 2015 08:07:52 AM UTC, comment #1: 

Checking for a valid op_completed won't help you here: you must not call netconn_free a second time as it calls memp_free on the netconn. And this is obviously not allowed a second time.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 27 Mar 2014 03:41:20 PM UTC, original submission:  

When a netconn_free() is called a second time on an already free'd netconn, the sys_sem_free(&conn->op_completed); call is being executed without first checking if the sem is still valid.
On my sys_arch implementation, calling sys_sem_free() on an already freed semaphore leads to an assertion.

I propose in the attached patch that a check for validity of the semaphore should be done before freeing and invalidating it (again).

TabascoEye <tabascoeye>

 

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

Attached Files
file #31061:  lwip_netcon_free.patch added by tabascoeye (475B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-18 goldsimon StatusNone Invalid
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-03-27 tabascoeye Attached File- Added lwip_netcon_free.patch, #31061

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code