4 ms·
> Add to this the disastrously central role that C has played in our ongoing computer security nightmare Hindsight is 20/20. C was simply the pervasive langua
by raarts 9y ago
> Add to this the disastrously central role that C has played in our ongoing computer security nightmare
Hindsight is 20/20.
C was simply the pervasive language when the internet happened. C was designed when the world was a friendlier place, where buffer overflows did not exist. It was embraced by everyone because of its speed and simplicity.
No C programmer was raised/educated to have security in the front of his mind. Hell, many programmers of any language still don't.
Stop bashing C and start using Oauth instead of inventing your own authentication schemes.
- taeric 9y agoI fully agree with the advice, but I do worry that we are creating a monoculture for authentication. The pessimist in me says it is not if, but when a major vulnerability appears in the Oauth stack. Good thing about most vulnerabilities is that the blast radius can be rather small.
- lomnakkus 9y ago> No C programmer was raised/educated to have security in the front of his mind. It's not about having security in the front of his/her mind. People make mistakes and always will. In C those mistakes very frequently turn into easily exploitable bugs. That is the security problem with C -- not that programmers somehow don't think about security enough[1]. [1] Of course this is also true, but it's not part of the argument against C.
- mrec 9y ago> many programmers of any language still don't I wonder if anyone's trying an explicitly adversarial approach to early CS education. Split your class into two teams, each team produces an implementation, each team scores points for finding vulnerabilities in the other team's implementation. Doesn't really matter what they're implementing as long as there's untrusted input involved.
- eighthnate 9y ago> It was embraced by everyone because of its speed and simplicity. Exactly. The same thing with TCP/IP. People complain about C and TCP/IP because security wasn't baked into these technologies. That's because that wasn't the big concern back then. And the reason C and TCP/IP have legs is because they are very good at what they do. You get the same thing with people complaining about SQL, HTML and every other language/protocol/technology.
- pjmlp 9y agoHoare in 1981 referring to C. "Many years later we asked our customers whether they wished us to provide an option to switch off these checks in the interests of efficiency on production runs. Unanimously, they urged us not to--they already knew how frequently subscript errors occur on production runs where failure to detect them could be disastrous. I note with fear and horror that even in 1980, language designers and users have not learned this lesson. In any respectable branch of engineering, failure to observe such elementary precautions would have long been against the law." Fran Allen on "Coders at Work," about C. "Oh, yeah. That would have been fine. And, in fact, you need to have something like that, something where experts can really fine-tune without big bottlenecks because those are key problems to solve. By 1960, we had a long list of amazing languages: Lisp, APL, Fortran, COBOL, Algol 60. These are higher-level than C. We have seriously regressed, since C developed. C has destroyed our ability to advance the state of the art in automatic optimization, automatic parallelization, automatic mapping of a high-level language to the machine. This is one of the reasons compilers are ... basically not taught much anymore in the colleges and universities."