Branch: refs/heads/master
Home: https://github.com/OpenSIPS/opensips
Commit: c9fb284de6f1ede5f407b03a789ecffa1b5f251b
https://github.com/OpenSIPS/opensips/commit/c9fb284de6f1ede5f407b03a789ecffa1b5f251b
Author: Yury Kirsanov <[email protected]>
Date: 2026-10-09 (Fri, 09 Oct 2026)
Changed paths:
M modules/proto_ws/ws_handshake_common.h
Log Message:
-----------
proto_ws: release the handshake headers under ws_http_parse_lock
The WebSocket handshake (server and client side) is processed on a TCP IO
thread, and its headers are parsed with parse_headers_aux(), which allocates
the header list from the process' pkg memory. pkg memory is not thread safe,
so the parsing already runs under ws_http_parse_lock - but the matching
free_hdr_field_lst() did not. A thread releasing its list while another one
parses corrupts the pkg free lists, and the next allocation crashes in
qm_detach_free() / fm_malloc().
Release the list through ws_free_parsed_headers(), which takes the same lock,
on both the success and the error path of ws_parse_req_handshake() and
ws_parse_rpl_handshake().
To unsubscribe from these emails, change your notification settings at
https://github.com/OpenSIPS/opensips/settings/notifications
_______________________________________________
Devel mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel