pc: fix use-after-free in AllocateSctpSids AllocateSctpSids iterates over newly assigned channels using raw pointers and calls OnTransportReady on each one. OnTransportReady can synchronously fail (e.g. if sending the DCEP OPEN message fails), which may cause the channel to close and be deleted, leaving the controller with a dangling pointer. This change ensures the channels are kept alive during the loop by using scoped_refptr for the temporary collection. This fixes the UAF for any failure mode that prevents synchronous sending of the initialization message. Bug: chromium:503422316 Change-Id: I1b927386fb4ed4279036835a244320aba6acf875 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/465701 Commit-Queue: Harald Alvestrand <hta@webrtc.org> Auto-Submit: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org> Cr-Commit-Position: refs/heads/main@{#47503}
WebRTC is a free, open software project that provides browsers and mobile applications with Real-Time Communications (RTC) capabilities via simple APIs. The WebRTC components have been optimized to best serve this purpose.
Our mission: To enable rich, high-quality RTC applications to be developed for the browser, mobile platforms, and IoT devices, and allow them all to communicate via a common set of protocols.
The WebRTC initiative is a project supported by Google, Mozilla and Opera, amongst others.
See here for instructions on how to get started developing with the native code.
Authoritative list of directories that contain the native API header files.