[Libwebsockets] [libwebsockets] #28: Crash due to file descriptor being accessed from union storing header data

Trac trac at libwebsockets.org
Tue Apr 23 10:55:48 CEST 2013


#28: Crash due to file descriptor being accessed from union storing header data
-----------------------------------+--------------------
 Reporter:  simonwulf              |      Owner:  agreen
     Type:  defect                 |     Status:  new
 Priority:  critical               |  Milestone:
Component:  libwebsockets library  |    Version:
 Keywords:  server union crash     |
-----------------------------------+--------------------
 I'm building a simple server using libwebsockets and I've been having
 troubles with it crashing if I try to connect using mobile Safari 5.
 Further testing revealed that the same crash occurs if I return non-zero
 from my protocol callback function on
 LWS_CALLBACK_FILTER_PROTOCOL_CONNECTION.

 I've been looking into the cause of the crash and it seems that
 libwebsockets is trying to close the socket by referring to the file
 descriptor stored in wsi->u.http.fd while the union is storing header data
 (line 205 in libwebsockets.c).

-- 
Ticket URL: <http://libwebsockets.org/trac/ticket/28>
libwebsockets <http://libwebsockets.org>
libwebsockets C library



More information about the Libwebsockets mailing list