Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Posted Mar 14, 2024 9:55 UTC (Thu) by ianmcc (subscriber, #88379)In reply to: Herb Sutter on increasing safety in C++ by itsmycpu
Parent article: Herb Sutter on increasing safety in C++
Posted Mar 14, 2024 13:28 UTC (Thu)
by tialaramex (subscriber, #21167)
[Link] (4 responses)
I think the fact you were able to look at the C++ vulnerabilities reported in most of 2023 and decide they can't "definitely be attributed to C++" reminds us that the only value CVEs were definitively intended to deliver was to allow us to agree about which vulnerability we're talking about. We don't know what the bug really is, which language the code was written in, or really anything but we've got an ID for it so that's something.
Posted Mar 14, 2024 16:23 UTC (Thu)
by ianmcc (subscriber, #88379)
[Link] (3 responses)
Posted Mar 15, 2024 0:11 UTC (Fri)
by tialaramex (subscriber, #21167)
[Link] (2 responses)
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=c++
The URL you'd obviously actually write to search for the text C++ is:
https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=c%2B%2B
I further assumed you were talking about the actual C++ CVEs reported in the last year, rather than that you'd taken Herb's word for it and assumed whatever nonsense he found by searching for the letter C is the C++ vulnerabilities. It's definitely possible (if you're a C++ proponent) to insist that all the bugs in C++ just aren't really C++, just as a "True" Scotsman would never use sugar on porridge.
But yeah, sure, if you follow Herb's link you're mostly looking at the spew of Linux kernel CVEs and you learn nothing.
Posted Mar 15, 2024 1:48 UTC (Fri)
by tialaramex (subscriber, #21167)
[Link]
This is asking GitHub to match CWE-787 (bounds miss write) against 2024 CVEs. Obviously not all of these will be C++ either, but it should be much less noisy than Herb's "Every CVE with the letter C in it" link, and of course "bounds misses" are exactly one of the things the Memory Safe Languages defend against.
Posted Mar 15, 2024 14:31 UTC (Fri)
by ianmcc (subscriber, #88379)
[Link]
Posted Mar 14, 2024 19:49 UTC (Thu)
by roc (subscriber, #30627)
[Link] (1 responses)
Posted Mar 14, 2024 19:53 UTC (Thu)
by roc (subscriber, #30627)
[Link]
Posted Mar 14, 2024 20:01 UTC (Thu)
by draco (subscriber, #1792)
[Link]
One year, there were more "rust" CVEs than "C++" ones by 2:1, and I just don't find that remotely credible. Mind you, my processing of the data was extremely sloppy (counting every hit of a token that matched the CVE ID pattern in each HTML page, removing duplicates and collating by year).
But implementation language isn't a field in the CVE records, so I think this is all just noise. Getting usable data for this question would require a fair amount of research, and even then, commercial software doesn't tend to talk about implementation language, so you're going to have gaps/skews in the data.
Anyway, I doubt that's what ultimately swayed him to concede that C/C++ has a problem. I think he was really using this data to say that C++ doesn't need to eliminate 100% of memory safety issues to be "good enough," which is an interesting statement since I don't think anyone informed is even claiming that.
The whole response is an interesting mix of "giving context" and concession.
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
Herb Sutter on increasing safety in C++
