Closed sandrogauci closed 4 years ago
Hi @sandrogauci
Looks like this was fixed while performing the changes for #327 in these lines:
https://github.com/irontec/sngrep/blob/ed41e9e1cc11e03df850be93e288e48079b1fa4f/src/media.c#L62-L66
Thanks again for a so detailed issue!!
will test and confirm the fix
HI @Kaian thanks for the fixes and the warm response! We tested the fix and it does address the issue. We ran a bit of blackbox fuzzing again and didn't find new obvious issues.
@Kaian are you planning on doing a release sometime soon by any chance? We'll mention these fixes in our blog (rtcsec.com) so if you're doing a release we could link to that as a fixed version.
I will try to release 1.4.8 during the first week of November
For our introductory hello and a bit of background information, please see #327
Report follows:
sngrep crashes due to a buffer overflow caused by a malformed SDP media type
Description
When sending a specially crafted SIP message with a malformed SDP media type,
sngrep
crashes due to a buffer overflow. The following backtrace was generated during our tests:The issue was originally discovered during OpenSIPIt; tracked down and analyzed for severity and impact later.
Impact
Since most modern build systems will automatically include run-time best practice checks, it is highly unlikely that this issue is exploited in a way that it overwrites to adjacent memory locations. However, due to how fortify protection works, the program will still end up crashing. Nonetheless, this issue should not be dismissed by relying on build system protections and should be adequately fixed.
How to reproduce the issue
sngrep
sngrep
has crashedSolutions and recommendations
It is recommended that the length of the string passed to function
media_set_type
inmedia.c
is checked againstMEDIATYPELEN
, which is of length 15.About Enable Security
Enable Security develops offensive security tools and provides quality penetration testing to help protect your real-time communications systems against attack.
Disclaimer
The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.
Disclosure policy
This report is subject to Enable Security's vulnerability disclosure policy which can be found at https://github.com/EnableSecurity/Vulnerability-Disclosure-Policy.