Because no one ever wrote an insecure website in Java? And certainly PHP must also be completely safe since it has no buffer overflows to worry about.
Are you sure the language is at fault?
When simply trying to concatenate 2 strings can result in arbitrary code getting executed, memory leaks, actual data-loss or fatal program instability (or all of those), it's pretty obvious the C language itself is made out of shotguns.
Making simple things simple and safe will produce fewer errors and fewer security issues. I don't see how anyone can try to argue anything else.
The length of the string is however by convention determined by the first NULL byte (zero termination), so it is important that there is a NULL byte within the bounds of the allocated array.
Concatenating two "strings", is not particularily difficult, it just needs to be done with care.
If you find it complicated, then you should not use C, nor should you use it for things it's not intended for.
In theory, string handling in C is straightforward enough. In practice, string handling in C is the source of a crazy number of security vulnerabilities and other bugs, even in popular and relatively well regarded software written by experts.
No-one should still need to use C in 2016. We know how to fix many of its problems and create much better programming languages now. Unfortunately, there is so much momentum behind the C ecosystem that in reality there are few practical alternatives yet, at least for low-level systems programming or high-performance number crunching work. Worse, there may not be enough commercial justification for the few organisations big enough to significantly move the industry in a better direction to actually commit the resources to do so, and this seems unlikely to change unless and until influential people start to care about the real costs of poor quality software.
Rust.
Driving home is not particularly difficult, it just needs to be done with care. Consequently tens of thousands die every year doing it.
Really, it's probably the case that if you find it simple, you shouldn't be using C. You will make mistakes doing that, and if you don't think so, those mistakes will be released.
Now, about things C was intended for... It was intended for everything. Nowadays we have better options for most uses, but it was indeed intended for web development.
You are hitting the hammer where there is no nail! In this instance, the Dell WEBSITE was hacked which are (99% of the time) written in high-level programming languages like php, python or Java. No sane business uses C/C++ to develop a website. C/C++ is used for INTERNAL SYSTEM PROGRAMMING and those systems are already linux based and almost impossible to hack (Even in the rare instance that they DO get hacked, C/C++ has nothing to do with it).
According to CVEDetails the Linux kernel has 1338 (known) vulnerabilities. http://www.cvedetails.com/product/47/Linux-Linux-Kernel.html...
Pot. Kettle. Black.
> In this instance, the Dell WEBSITE was hacked ...
I saw absolutely nothing in the article that could even remotely be considered proof of this.
Making things simple and safe is what leads an average careless programmmer to develop insecure websites. It's not simple to write a non trivial website that is safe for sensitive data. And the language is a small part of overall system security.
There are lots of alternative "safe" string libraries for C, so string handling is not a good argument against C.
"another dangerous dell root cert dicovered" http://www.pcworld.com/article/3008478/security/and-then-the...
"dell attacks on scada doubled" http://securityaffairs.co/wordpress/35967/hacking/dell-attac...
"in what some experts are calling the biggest data theft in US history." http://www.abc.net.au/news/stories/2011/04/07/3185296.htm
It should be illegal for anybody to spoof Caller-ID for deception. The only acceptable caller-id transmitted should be one of:
a) the actual origin number;
b) the number for a company switchboard that accepts incoming calls to the originating group; or
c) blocked number.
Not quite sure I understand your premise on that one. You can't stop people from pretending to be from the IRS any more than you can stop criminal activity by outlawing it.
Essentially anyone can call anyone else and pretend to be from a government agency. Ultimately you're going to have to verify that or otherwise know better, there is no practical technical means to stop it. There's a certain level of personal responsibility that comes into play there. That goes with similar things like falling for investment scams over the phone as well. Such should be pursued by the authorities obviously - and you're still responsible for your own person regardless, you can't be saved from everything: the IRS doesn't call people like that, it would take 30 seconds to figure that out via google. The same type of problem would arise if an impostor showed up at your door pretending to be from the IRS. How do you stop it completely? You don't, you arrest after the fact if you can; if it gets widespread enough to be a big problem, you attempt education outreach to teach people not to fall for it. These types of scams are ancient, and will never stop existing (the scammers will always adapt); the only highly effective means of stopping it is awareness.
But that doesn't mean there's no solution for tracing calls. It needs just one extra law for telcos to solve most of this issue: "Either you can prove/point to the interconnect which originated this call, or you take full responsibility for this call and its contents." Then law enforcement can just continue to the next company and the next until they get to the subscriber.
Two answers to questions I expect: - What about international numbers? If you get a call from Russia claiming it's IRS, that's really not plausible - that can be understood by everyone. If telco gets a call from Russia with US callerid, then again, its their responsibility to only choose partners which they can query to check if that's valid. (it's not a huge barrier - telcos are already aware of various international issues)
- This will require registration of all subscribers with real details, what about privacy? Yes, yes it will.
Whether or not a call with domestic looking CPN from an international location will be accepted is up to the switches handling it, but they're designed to successfully complete a call in almost any possible circumstance. It's possible that the international gateway might rewrite the CPN field with something else, but I doubt they'd go as far as refusing to let it through.
The screen parameter within SS7 details whether or not the CPN field has been defined by the end user. Most SIP users won't have access to this either, but the vast majority of calls from them (but not from other sources) will look like the number is user provided. For that reason, some voicemail systems that've historically let you log in automatically just by setting your CPN to the subscriber number have started to only let you do that when the screen parameter is set to network provided.
The security there is in the type system at compile time, no Trusted Computing shenanigans, and you still avoid buffer overflows and SQL injections (if you use them properly).
Even something as lowly as Python mostly protects you from buffer overflows.
> That is not what either Rust or Haskell are.
Nor even Python.
What I am talking about is that some languages make writing safe code easier, that is code that behaves well as a program when compiled to machine language (or interpreted as is). Especially in the face of hostile inputs.
As an example, it is pretty hard to make your Python interpreter crash with a segfault using just pure Python code. (It is, of course, easy to generate a Python exception.)
Even though, this safety doesn't come at the expense of power: it is easy to tell the interpreter to get out of the way and let you muck around with raw bytes (ie by calling into C).
In the case of Python, the safety-by-default comes at the expense of performance. In the case of Haskell, it is either performance or program complexity. (Ie you can write fast Haskell code, but it looks weird.)
If you do call into something low level, it will be clearly visibly in your code that something potentially dangerous is going on.
Safe and correct behaviour by default is good. Profiling can help you find the few spots where you want to take over safety obligations from the automatic systems in return for extra performance.
Being secure against that kind of attack is going to require an entire paradigm shift in how we approach security. New languages, new operating systems, and new assumptions about how much an attacker has compromised, including learning to keep things heavily compartmentalized.
Maybe its really high time for C and its buffer overflows to go... And SQL injection.
We're tech savy here, yet sometime even we fall for these things. Its starting to get actually expensive.
I hate to be all conspiracy theory about this, but if/when the banks fall down like this....