AirenSoft / OvenMediaEngine

OvenMediaEngine (OME) is a Sub-Second Latency Live Streaming Server with Large-Scale and High-Definition. #WebRTC #LLHLS
https://airensoft.com/ome.html
GNU Affero General Public License v3.0
2.6k stars 1.06k forks source link

OME crashes with LLHLS publisher when empty policy provided but signature correct #1714

Closed bchah closed 1 month ago

bchah commented 1 month ago

Describe the bug OME seems to crash immediately when you try to access an LLHLS URL with a valid signature, but an empty argument for policy.

To Reproduce Steps to reproduce the behavior: Set up a signed policy, start a stream with LLHLS provider enabled, and try accessing a URL such as:

http://yourserver.com/your-app/your-stream/llhls.m3u8?policy=&signature=your-valid-signature

If the signature is invalid or the empty policy argument is not included, OME returns the expected response. However with this configuration it seems to immediately crash.

Expected behavior No type of request should crash OME.

Logs omelog.txt

(I had to reproduce it a second time to get the crash dump but the nature of the crash is the same every time) crashdump.txt

Here is the server config too. Perhaps there is a setting here that is causing the issue? config.txt

Server (please complete the following information):

getroot commented 1 month ago

Thank you for the great report. I’ll check it out soon.

bchah commented 1 month ago

Thank you for the great report. I’ll check it out soon.

Thank you! I would not have discovered this if not for a bug in my own program that failed to insert the encoded policy in the LLHLS URL. Maybe this isn't just LLHLS, maybe it is more related to the checking of SignedPolicy. I will see if I can reproduce it under different circumstances.

choigilhoon commented 1 month ago

@bchah Thanks to your report, I easily identified and resolved the issue. As you mentioned, it was a checking problem in SignedPolicy, unrelated to the protocol. This issue has been fixed in https://github.com/AirenSoft/OvenMediaEngine/commit/83cb9c8094c44eeacd0370e8e76456562c642332 and will be included in the next release.

bchah commented 1 month ago

Thank you @choigilhoon!