Skip to main content


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.

#curl
This entry was edited (4 weeks ago)
in reply to daniel:// stenberg://

if you actually go read the kernel 'CVEs' you'll see that this rationalisation is simply inaccurate.

Greg is trolling the system it's as simple as that. But ah well.

in reply to daniel:// stenberg://

I don't claim to be an authoritative expert on all, but it's a widely held opinion among kernel devs (at least those I have spoken to in person). And there are numerous examples of questionable things.

Essentially all commits tagged as fixes are assumed to be exploitable security flaws.

You could go further and argue every single commit is a potential security flaw, and by the logic applied, that is absolutely valid. Luckily Greg hasn't quite gone that far...

The issue is there are serious downstream effects for enterprise kernels whose customers demand that CVEs are addressed, so overnight companies have to scramble to handle the deluge.

Of course this all speaks to CVEs being a poor system for this kind of thing, which is why this troll is happening, a sort of 'well the official definition of a CVE is X so I will give you all the Xes'.

Anyway it's all a bit moot, this is just how things are now...

in reply to Lorenzo Stoakes

@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.
in reply to daniel:// stenberg://

is there a betting pool for how many replies will be “but what if you rewrite it in Rust?” *scnr*
in reply to daniel:// stenberg://

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

in reply to Josh Bressers

@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. =)

in reply to daniel:// stenberg://

This applies to bugs in general. Studies have shown that programmers, using the same language, will average out at the same rate of "faults per line". IIRC, this was mentioned even in "Mythical Man Month" - which may, of course, be dated.
This entry was edited (4 weeks ago)
in reply to daniel:// stenberg://

That's an interesting perspective. Never thought of it this way when getting drowned in kernel CVEs.