lwIP - A Lightweight TCP/IP stack - Bugs: bug #43361, select() crashes with stale FDs
You are not allowed to post comments on this tracker with your current authentication level.
bug #43361: select() crashes with stale FDs
| Submitter: | Joel Cunningham <jcunningham> | ||
| Submitted: | Sun 05 Oct 2014 09:01:14 PM UTC | ||
| Category: | sockets/netconn | Severity: | 3 - Normal |
| Item Group: | Crash Error | Status: | Fixed |
| Privacy: | Public | Assigned to: | goldsimon |
| Open/Closed: | Closed | Planned Release: | None |
| lwIP version: | 1.4.1 | ||
|
Sat 17 Jan 2015 08:13:34 PM UTC, comment #1: |
Simon Goldschmidt <goldsimon> |
|
Sun 05 Oct 2014 09:01:14 PM UTC, original submission:
If an application calls select() with FDs set that do not correspond to valid open sockets, a data abort will occur.
|
Joel Cunningham <jcunningham> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
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 3 latest changes.
| Date | Changed by | Updated Field | Previous Value | => | Replaced by |
|---|---|---|---|---|---|
| 2015-01-17 | goldsimon | Status | None | Fixed | |
| Assigned to | None | goldsimon | |||
| Open/Closed | Open | Closed |
Powered by Savane 3.12.
Corresponding source code

Fixed by checking the return value of tryget_socket(): if one socket fails, the function is aborted after decreasing 'select_waiting' of the lower sockets.
There is however still one possible bug of a lower socket getting closed and reused between 'select_waiting++' and 'select_waiting--', but that's a more advanced use case than this one...