Open cure53 opened 10 years ago
Ooo! to avoid duplicating work, for networking code, please review the new branch that's about to land... https://github.com/uProxy/uproxy-networking/tree/iislucas-webrtc_pc3
Thanks!
Nice find by the way!
Aye, we shall ;) Thx!
The files rtc-to-net.ts and socks-to-rtc.ts loop over an array that is received over the network as JSON - without checking that the array is not actually an object. By supplying a specifically crafted object, it is possible to remotely cause an endless loop:
PoC:
{ version: 1, messages: {length: 9007199254740992} }
To test this, one can modify the code using this JSON object whenever a sendSignalToPeer event is emitted. In our tests, when such a modified client connected to the server, this caused the server to loop for a few seconds before it was terminated by Chrome and had to be restarted manually.
Steps to reproduce:
_Attacker:_ Open the directory containing the chrome app, apply the following patch:
_Attacker:_ Request permission to proxy from the victim _Victim:_ Grant permission to proxy _Attacker:_ Connect to proxy
To mitigate this issue, it should be verified that incoming JSON objects conform to the expected format. It might be an option to use the “conform” helper provided by freedom.js for that very purpose.