Friendica
daniel:// stenberg://
daniel:// stenberg://

daniel:// stenberg://

bagder@mastodon.social

daniel:// stenberg://

bagder@mastodon.social
I write curl. I don't know anything.
ActivityPub
2023-05-20 08:14:41 2023-05-18 12:50:50 2023-05-18 12:50:48 3258462

daniel:// stenberg://
daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

2 years ago • •

daniel:// stenberg://

2 years ago • •


The #curl graph we always get to debate over. Number of *C mistakes* vs *non-C mistakes* among the existing 145 reported vulnerabilities. Updated with the latest 4 reports, and the LOC graph added as a comparison.
#curl
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

Lambda
mastodon - Link to source

Lambda

in reply to daniel:// stenberg:// • 2 years ago • •
how do you distinguish "C mistakes" from "non-C mistakes"? Just memory safety, or also considering better abstractions that would've been used in anything other than a line-by-line translation?
  •  Languages
  •  Search Text
  •  Share via ...
in reply to Lambda

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

in reply to Lambda • 2 years ago • •

I qualify "C mistakes" to be one of: OVERFLOW, OVERREAD, DOUBLE_FREE, USE_AFTER_FREE, NULL_MISTAKE or UNINIT.

They have all been manually assessed by me, so there's a of course a risk of mistakes in there.

My thinking has been to identify problems that *likely* would not have happened if we had not used C.

This entry was edited (2 years ago)
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

Troed Sångberg
mastodon - Link to source

Troed Sångberg

in reply to daniel:// stenberg:// • 2 years ago • •
Why did I not know of this graph before. It's so going into basic cybersecurity-for-developers material.
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

Rob Napier
mastodon - Link to source

Rob Napier

in reply to daniel:// stenberg:// • 2 years ago • •

The sharp uptick in 2014 is interesting. Was there a particular effort that year that exposed so many (valgrind?), or just the randomness of data? I didn't see you discuss the history in your blog post.

(These reports are a real asset. Thank you for so much transparency and helpful data.)

  •  Languages
  •  Search Text
  •  Share via ...
in reply to Rob Napier

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

in reply to Rob Napier • 2 years ago • •
@cocoaphony the graph shows when the flaws were introduced, not found. I really don't know how it happened so much in that particular period. We have adjusted and improved internals since then, which possibly have helped.
@Rob Napier
  •  Languages
  •  Search Text
  •  Share via ...
Unknown parent

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

Unknown parent • 2 years ago • •
@ironiridis I have the numbers separated. This graph shows product code only, no test code.
  •  Languages
  •  Search Text
  •  Share via ...
Unknown parent

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

Unknown parent • 2 years ago • •
@ironiridis the number of test cases over time follows the LOC pretty closely. I have a graph for that as well 😄
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

brk, a.k.a. @evanrichter
mastodon - Link to source

brk, a.k.a. @evanrichter

in reply to daniel:// stenberg:// • 2 years ago • •
should be "Non-C mistakes Given a C codebase"
  •  Languages
  •  Search Text
  •  Share via ...
in reply to brk, a.k.a. @evanrichter

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

in reply to brk, a.k.a. @evanrichter • 2 years ago • •
@brk it would be tricky to compare C vs non-C mistakes in something that is *not* C code...
@brk, a.k.a. @evanrichter
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

Alexander Shendi
mastodon - Link to source

Alexander Shendi

in reply to daniel:// stenberg:// • 2 years ago • •

It would be interesting to know what distinguishes 'C' from 'non C' mistakes.

My summary of the graph:
* 'C mistakes' account for roughly 2/3 of all nistakes.
* Both 'C' and 'non C' mistakes strongly correlated with LOC.

  •  Languages
  •  Search Text
  •  Share via ...
in reply to Alexander Shendi

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

in reply to Alexander Shendi • 2 years ago • •
@alexshendi the C mistakes are at ~41% of the total
@Alexander Shendi
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

Alexander Shendi
mastodon - Link to source

Alexander Shendi

in reply to daniel:// stenberg:// • 2 years ago • •

True, my mistake. Now, what counts as 'C' mistake? Links or references to papers ok.

TIA.

  •  Languages
  •  Search Text
  •  Share via ...
in reply to Alexander Shendi

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

in reply to Alexander Shendi • 2 years ago • •
@alexshendi Two years ago we were still at ~50% C mistakes and then I blogged this: daniel.haxx.se/blog/2021/03/09…

half of curl’s vulnerabilities are C mistakes | daniel.haxx.se

daniel.haxx.se
@Alexander Shendi
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

Alexander Shendi
mastodon - Link to source

Alexander Shendi

in reply to daniel:// stenberg:// • 2 years ago • •

Thank you, very interesting.
The chart at:
daniel.haxx.se/blog/wp-content…

was what I wanted to know. I hope I haven't offended you, I just was looking for an opportunity to learn something.

  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

ArneBab
mastodon - Link to source

ArneBab

in reply to daniel:// stenberg:// • 2 years ago • •

In this graph it looks much more like the C vulnerabilities are stagnating than it sounds like in the article 2 years ago.

Thank you for sharing!

  •  Languages
  •  Search Text
  •  Share via ...
in reply to ArneBab

daniel:// stenberg://
mastodon - Link to source

daniel:// stenberg://

in reply to ArneBab • 2 years ago • •
@ArneBab clearly the c mistake share has decreased significantly the last two years. I suppose we will learn if this was just a fluke or something real as we go forward!
@ArneBab
  •  Languages
  •  Search Text
  •  Share via ...
in reply to daniel:// stenberg://

ArneBab
mastodon - Link to source

ArneBab

in reply to daniel:// stenberg:// • 2 years ago • •
even the mistake per lines of code — I’m looking forward very much to more blog posts the next years (data collection takes time …).
  •  Languages
  •  Search Text
  •  Share via ...
⇧