<div dir="ltr"><div dir="ltr">Hey Sandro, thanks for putting this together. I frankly have been a little puzzled and a bit disappointed by the lack of response from you on that topic. But then Daniel mentioned some "special relationship" he has with you, so I just wrote it off to old-good cronyism. I am glad that I was wrong on that matter.<div><br></div><div>I won't beat this dead horse too much again, just to reply to *many* here who said "Kamailio community has no time/resources to deal with this stuff". From my vantage point of view the amount of time Kamailio community as a whole spent on "debunking header smuggling as a real security threat" would probably be enough to create 5 security advisories in a better structured project. Whether or not any lessons have been learned and improvements made we will see the next time.</div><div><br></div><div>With that being said I'd probably go back to my usual read-mostly mode and wish everyone a good and productive week!</div><div><br></div><div>-Max</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Sep 22, 2020 at 2:34 AM Sandro Gauci <<a href="mailto:sandro@enablesecurity.com">sandro@enablesecurity.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><u></u><div><div>I know I am waking up an old debate by replying to this thread. Deeply sorry :-)<br></div><div><br></div><div>Finally got around to writing up a blog post about this very thread where I (think) I spared absolutely no one, not even myself. <br></div><div><br></div><div>My post is called "The great Kamailio security debate and some misconceptions debunked" and can be read here:<br></div><div><br></div><div><a href="https://www.rtcsec.com/2020/09/02-kamailio-security-debate-and-misconceptions/" target="_blank">https://www.rtcsec.com/2020/09/02-kamailio-security-debate-and-misconceptions/</a><br></div><div><br></div><div>The ToC:<br></div><ol><li>Introduction<br></li><li>A bit of background before diving in<br></li><li>Claim: this issue does not affect many organisations<br></li><li>Claim: custom headers are only known to internal users<br></li><li>Claim: if it’s an 18 year old bug, it can’t have been high risk<br></li><li>Claim: this should have been found if people were doing proper testing<br></li><li>Claim: infrequent advisories = project is not serious about security<br></li><li>Claim: limited number of advisories = project is more secure<br></li><li>Claim: if you’re serious about security, monitor the mailing lists<br></li><li>Claim: security experts should decide what is a security vulnerability<br></li><li>Discussion: when should the project publish an advisory?<br></li><li>Discussion: educational security role<br></li><li>Moving forward<br></li></ol><div>Hope that it is at least interesting and perhaps even constructive!<br></div><div><br></div><div>Best wishes,<br></div><div id="gmail-m_1273912216539377282sig45665722"><div><br></div><div>--<br></div><div> <br></div><div>    Sandro Gauci, CEO at Enable Security GmbH<br></div><div><br></div><div>    Register of Companies:      AG Charlottenburg HRB 173016 B<br></div><div>    Company HQ:                       Pappelallee 78/79, 10437 Berlin, Germany<br></div><div>    PGP/Encrypted comms:     <a href="https://keybase.io/sandrogauci" target="_blank">https://keybase.io/sandrogauci</a><br></div><div>    Our blog:                                <a href="https://www.rtcsec.com" target="_blank">https://www.rtcsec.com</a><br></div><div>    Other points of contact:      <a href="https://enablesecurity.com/#contact-us" target="_blank">https://enablesecurity.com/#contact-us</a><br></div><div><br></div></div><div><br></div><div><br></div><div>On Thu, 3 Sep 2020, at 10:34 AM, Olle E. Johansson wrote:<br></div><blockquote type="cite" id="gmail-m_1273912216539377282qt"><div>Well, you have defined one definitive line between being stupid and following some current practise :-)<br></div><div><br></div><div>I like to think we as a project have an educational role as well. In this case explaining the bug we had and what it can cause.<br></div><div>We should definitely add a warning along the lines you write too - relying on headers alone is bad and not best current practise.<br></div><div><br></div><div><div>/O<br></div><div><div><br></div><blockquote type="cite"><div>On 3 Sep 2020, at 10:14, davy van de moere <<a href="mailto:davy.van.de.moere@gmail.com" target="_blank">davy.van.de.moere@gmail.com</a>> wrote:<br></div><div><br></div><div><div dir="ltr"><div>After 20 years in voip, my 2 cents on this, if you succeed in creating a voip system where the security of the whole relies on the ability to remove (or only keep specific) custom sip headers, you will wake up one morning realizing a bunch of people in Palestine made a gazillion calls over your system to expensive destinations, bringing you to or over the edge of bankruptcy.<br></div><div><br></div><div>Security should be multilayered, one header sneaking through should not give any big problems. <br></div><div><br></div><div><div>From a security point of view, this could be called a 'normal' security risk, I think. It's a bit more than low as you can do more than just get some info, but it's not high, as you would need to have many other factors going wrong to get to a successful exploit. <br></div><div><br></div><div><br></div><div><br></div></div></div><div><br></div><div><div dir="ltr">Op do 3 sep. 2020 om 09:18 schreef Olle E. Johansson <<a href="mailto:oej@edvina.net" target="_blank">oej@edvina.net</a>>:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>One thought - we may have to separate security vulnerability reporting from security advisory documents. I think in some cases, where a common use of a product can lead to issues (but it is not clearly a bug that cause crashes in our code) we may have to send out an advisory and publish it in the same way. The problem with that is where the border is between just doing stupid things like taking SQL statements from SIP headers and issues like this that are harder to catch.<br></div><div><br></div><div>We had a long and hard discussion about this in the Asterisk project many years ago - a very common dialplan construct (that was documented in many places) was indeed very dangerous. It wasn’t any code in asterisk that caused the issue, just a common dialplan construct that existed in many, many production systems. In the end, if I remember correctly, the project issued an advisory and added a README about it.<br></div><div><br></div><div>Maybe that’s a way forward.<br></div><div><br></div><div><div>/O<br></div><div><div><br></div><blockquote type="cite"><div>On 2 Sep 2020, at 21:25, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>> wrote:<br></div><div><br></div><div><div style="font-family:Helvetica;font-size:14px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span>Hello Maxim,<u></u><u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span><u></u> <u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">have a look to the first sentence:<u></u><u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"><u></u> <u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">“A security vulnerability is (for example) when a user of Kamailio can cause Kamailio to crash or lock up by sending messages to the server process.”<u></u><u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"><u></u> <u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">So there is some limitation regarding vulnerability criticality defined in there. But of course (as I already mentioned), it might be improved to e.g. use CVSS scoring instead.</span><span lang="EN-GB"><u></u><u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"><u></u> <u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Cheers,<u></u><u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"><u></u> <u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Henning<u></u><u></u></span><br></div><div style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"><u></u> <u></u></span><br></div><div style="border-style:solid none none;border-top-width:1pt;border-top-color:rgb(225,225,225);padding:3pt 0cm 0cm"><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><b><span lang="EN-GB">From:</span></b><span lang="EN-GB"><span> </span>Maxim Sobolev <<a href="mailto:sobomax@sippysoft.com" style="color:blue;text-decoration:underline" target="_blank">sobomax@sippysoft.com</a>><span> </span><br><b>Sent:</b><span> </span>Wednesday, September 2, 2020 9:15 PM<br><b>To:</b><span> </span>Henning Westerholt <<a href="mailto:hw@skalatan.de" style="color:blue;text-decoration:underline" target="_blank">hw@skalatan.de</a>><br><b>Cc:</b><span> </span>Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com" style="color:blue;text-decoration:underline" target="_blank">miconda@gmail.com</a>>;<span> </span><a href="mailto:yufei.tao@gmail.com" style="color:blue;text-decoration:underline" target="_blank">yufei.tao@gmail.com</a>; Olle E. Johansson <<a href="mailto:oej@edvina.net" style="color:blue;text-decoration:underline" target="_blank">oej@edvina.net</a>>; Gerry | Rigatta <<a href="mailto:gjacobsen@rigatta.com" style="color:blue;text-decoration:underline" target="_blank">gjacobsen@rigatta.com</a>>; Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" style="color:blue;text-decoration:underline" target="_blank">sr-users@lists.kamailio.org</a>>;<span> </span><a href="mailto:jbrower@signalogic.com" style="color:blue;text-decoration:underline" target="_blank">jbrower@signalogic.com</a><br><b>Subject:</b><span> </span>Re: [SR-Users] Kamailio vulnerable to header smuggling possible due to bypass of remove_hf<u></u><u></u></span></div></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"><u></u> <u></u></span><br></div><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">On Wed, Sep 2, 2020 at 11:30 AM Henning Westerholt <<a href="mailto:hw@skalatan.de" style="color:blue;text-decoration:underline" target="_blank">hw@skalatan.de</a>> wrote:<u></u><u></u><br></div></div><div><blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Hello Maxim,</span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"> </span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">thank you for the clarification, appreciated.</span><u></u><u></u><br></div></div></div></blockquote><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">No worries, hope to have a civilized discussion.<u></u><u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u><br></div></div><blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Just one clarification, my comment regarding the advisory from 2018 was not meant as advertisement etc..</span><u></u><u></u><br></div></div></div></blockquote><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">Point taken, I dramatized of course to underline my point. <u></u><u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u><br></div></div><blockquote style="border-style:none none none solid;border-left-width:1pt;border-left-color:rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm"><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">One suggestion to objectify the whole discussion, there exists a well-known and accepted metric for vulnerabilities: CVSS [1]<u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">If I calculate the CVSS score for this issue, it results in a medium level with score 5.8. But this is of course again (at least somewhat) influenced from my point of view to this bug.</span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"> </span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Some projects have a policy to only do a security announcement for vulnerabilities with score high and critical. For Kamailio this is not yet defined in a detailed way, due to the size of the project and other factors.</span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"> </span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">So, If people in this discussion (or other people on the list) are interested in improving the project security processes – this wiki page with the current process might be a good starting point:<a href="https://www.kamailio.org/wiki/security/policy" style="color:blue;text-decoration:underline" target="_blank">https://www.kamailio.org/wiki/security/policy</a></span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"> </span><u></u><u></u><br></div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Please suggest your improvements to the existing process (preferable in a new discussion thread) on the sr-dev list. If you want to do it in private, feel free contact the management list.</span><u></u><u></u><br></div></div></div></blockquote><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">Well, first suggestion after having read it: to start actually following what's documented before any improvements are made. ;-) The policy says plain and simple (quote):<u></u><u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u><br></div></div></div><blockquote style="margin-left:30pt;margin-right:0cm"><div><div><h4 id="gmail-m_1273912216539377282qt-gmail-m_-221075449414644861gmail-publishing_security_vulnerabilities" style="margin-right:0cm;margin-left:35.4pt;font-size:12pt;font-family:Calibri,sans-serif;margin-bottom:12pt"><span style="color:rgb(51,51,51)"><span style="font-family:Arial,sans-serif"><span style="font-size:10.5pt">Publishing security vulnerabilities<u></u><u></u></span></span></span><br></h4></div></div></blockquote><blockquote style="margin-left:30pt;margin-right:0cm"><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="color:rgb(51,51,51)"><span style="font-family:Arial,sans-serif"><span style="font-size:10.5pt">Kamailio will publish security vulnerabilities, including an CVE ID, on the kamailio-business mailing list, sr-dev, sr-users as well as related lists.<span> </span></span></span></span><span style="color:red"><span style="font-family:Arial,sans-serif"><span style="font-size:10.5pt">The advisories will also be published on the<span> </span><a href="http://kamailio.org/" style="color:blue;text-decoration:underline" target="_blank">kamailio.org</a><span> </span>web site</span></span></span><span style="color:rgb(51,51,51)"><span style="font-family:Arial,sans-serif"><span style="font-size:10.5pt">.</span></span></span> <u></u><u></u><br></div></div></div><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u><br></div></div></div><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><span style="color:rgb(51,51,51)"><span style="font-family:Arial,sans-serif"><span style="font-size:10.5pt">CVE entries should be created for vulnerabilities in the core and major modules, for rarely used modules this is not necessary. If there are several security issues together in one release, they should be announced together.</span></span></span>  <u></u><u></u><br></div></div></div></blockquote><div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"> <u></u><u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">I might be missing something obvious, but there is no "if" or "maybe" or "it depends". Any module that has been 18 years with the project qualifies to be a "major module" to me... <u></u><u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif"><u></u> <u></u><br></div></div><div><div style="margin:0cm 0cm 0cm 35.4pt;font-size:11pt;font-family:Calibri,sans-serif">-Max<br></div></div></div></div></div></div></blockquote></div><div><br></div></div></div><div>_______________________________________________<br></div><div> Kamailio (SER) - Users Mailing List<br></div><div> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br></div><div> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br></div></blockquote></div><div>_______________________________________________<br></div><div>Kamailio (SER) - Users Mailing List<br></div><div><a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br></div><div><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br></div></div></blockquote></div></div><div>_______________________________________________<br></div><div>Kamailio (SER) - Users Mailing List<br></div><div><a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br></div><div><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br></div><div><br></div></blockquote><div><br></div></div>_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div></div>