Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chrome: Warn: Discard message from (x.x.x.x), integrity check failed #2776

Closed
BertoldVdb opened this issue May 29, 2024 · 1 comment
Closed

Comments

@BertoldVdb
Copy link

BertoldVdb commented May 29, 2024

I am not sure this is a Pion bug, I don't know enought about WebRTC internals to tell

Your environment.

  • Version: v4.0.0-beta.19
  • Browser: Google-Chrome on Linux 125.0.6422.112 (other versions also trigger issue, Firefox, Safari, iPhone, Android works)

What did you do?

I have a WebRTC application (browser produces offer, Pion answers) that generally works well. However when talking to a Chrome peer the connection sometimes fails to establish. I have traced this to verifying the integrity of the initial ICE probing STUN packets. We send the STUN Request to chrome and fail to validate the response.

Pion properly decodes the RemotePwd/Ufrag and other info, and tries to verify the signature. The expected signature and buffer to calculate it on match the packet as decoded by wireshark. Yet the calculated signature does not match.

Verifying incoming requests from Chrome with our LocalPwd works, and the answer is accepted according to chrome webrtc stats. I can provided packet traces if this is useful.

This is the function that is failing: https://github.com/pion/stun/blob/master/integrity.go#L95 . To verify I have removed the check by always returning nil. The connection then establishes 100% of the time (did around 1000 runs).

I have tried to invert the flow where Pion makes the offer and Chrome answers. This also works 100% of the time.

I think it is possible this is a bug in Chrome, unless the Pion answer or ICE candidates can change chromes idea of the RemotePwd?

What did you expect?

Connection establishes properly every time, no integrity check errors.

What happened?

See above

@Sean-Der
Copy link
Member

Hi @BertoldVdb

Sorry I missed this. Did you make any progress on this. I would love to help you debug if it's still a problem.

thanks

@Sean-Der Sean-Der closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants