The Linux kernel is 38 million LOC. #curl is 170K. The kernel is 223 times bigger.
The Linux kernel ships 60 CVEs per week, 3100 per year.
curl ships on average 13 CVEs per year, 3100/223 = 14
== Roughly the same CVE/line of code ratio.
@bagder Do you know what proportion of them are memory-related?
@AugierLe42e for #curl issues, we know that the "C mistake" share is a little over 40%. Those are mostly memory related.
@AugierLe42e they are not C mistakes. Typically logical mistakes of various sorts.
@ljs I don't think I would be qualified to judge that
@ljs sure, but I believe the opposite is also true: the frequency is just so high so people can't spend enough time and energy to full go to the bottom of each possible flaw there.
@bagder @ljs my experience as a GDB developer, a project with extremely minimal security requeriments and an unreasonable amount of CVEs says otherwise. The general rule send to be that if it looks like security and smells like security it turns into a CVE to make my CV Exceptional
And so you get people saying "you can fresh GDB by feeding this python code (...)" as is it was a denial of service attack when "system exit(0)" will also quit GDB. And many similar regarding reading debug information, where they don't even bother to think of the internal error (which is actually a failed assert, basically) is exploitable or was detected early enough
If we math this out, that's around 1300 lines of code per vulnerability
The @ecosystems folks are tracking 200 million repos and 9 million packages
2024 will see about 40,000 CVE IDs total
This is fine
@joshbressers @bagder @ecosystems current package count is 10.5 million 😅
@joshbressers @ecosystems one CVE per 13K LOC per year according to my math.
So if 10 million packages average at 100K lines each (blatant assumption), we could be looking at about 76 million CVEs/year. =)
@bagder @ecosystems hah, still too early for math
But yeah, the numbers are staggering
@joshbressers @bagder @ecosystems although there’s a huge amount of npm spam in there, so it’s probably closer to 8m of real-ish things
@andrewnez @bagder @ecosystems It’s completely mind boggling that 2 million could be spam and there’s still 8 million left
@lidicrous a CVE is a public unique identifier for a security vulnerability in a software product. https://en.wikipedia.org/wiki/Common_Vulnerabilities_and_Exposures
@ljs @bagder @GwenTheKween in a way, you could argue this is basically the logical extension of the Linus quote "security problems are just bugs" from 2017