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

[Report] server UAF when client send poc message #235

Closed
50u1w4y opened this issue Aug 4, 2022 · 4 comments
Closed

[Report] server UAF when client send poc message #235

50u1w4y opened this issue Aug 4, 2022 · 4 comments

Comments

@50u1w4y
Copy link

50u1w4y commented Aug 4, 2022

Firstly, make the librtmp RELEASE to avoid it exit early because of assert.

And then, run the rtmp server using test with command test -c rtmp_server_forward_aio_test 127.0.0.1 1935

After server run, push flow to server with something like ffmpeg -re -i source.flv -c copy -f flv -y rtmp://localhost/live/livestream

Finally, send poc message to server with command python3 sender.py 127.0.0.1 1935 poc. The attachment is script and poc file.

After send the poc message, the server execute an UAF and finally crash.

@ireader
Copy link
Owner

ireader commented Aug 5, 2022

try with ffmpeg?

  1. cd sdk && make
  2. cd media-server && make && make test
  3. cd media-server && ./test/debug.linux/test -c rtmp_server_forward_aio_test 0.0.0.0 1935
  4. ffmpeg -re -i poc/source.flv -c copy -f flv rtmp://127.0.0.1/live/test
  5. ffplay rtmp://127.0.0.1/live/test

@ireader
Copy link
Owner

ireader commented Aug 5, 2022

make sure you have same DEBUG or RELEASE version program/library.

@50u1w4y
Copy link
Author

50u1w4y commented Aug 5, 2022

I know the program works well, I have tested it to play with vlc.

I mean, if the problem indeed exist, anyone using the library to develop rtmp server will get a DoS if client send malicious packets.

RELEASE version is only to avoid early exit because of assert.

@ireader
Copy link
Owner

ireader commented Aug 5, 2022

Thanks, I got it!

image

@ireader ireader closed this as completed in 3e0f63f Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants