The US government asks not to use C/C++ due to memory vulnerabilities.

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 782
Joined: Fri Dec 04, 2015 9:26 pm

The US government asks not to use C/C++ due to memory vulnerabilities.

Post by skinkairewalker »

The US government asks not to use C/C++ due to memory vulnerabilities.
What does this imply for the future of C/C++ and purebasic?

sources :
https://blog.stackademic.com/u-s-govern ... 74f8e6c46b
https://www.tribuneindia.com/news/scien ... age-450295
Quin
Addict
Addict
Posts: 1133
Joined: Thu Mar 31, 2022 7:03 pm
Location: Colorado, United States
Contact:

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by Quin »

:lol:
The amount of C++ code out there that's doing things only C++ can do is insane. The pushback from any sort of legislation due to this kind of thing would be absolutely destroyed.
That said, if it simply encourages safer programming (e.g. by using smart pointers or higher level languages when possible), I see nothing wrong with it.
User avatar
skywalk
Addict
Addict
Posts: 4218
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by skywalk »

Nope.
Governmental opinions are extremely short-sighted and prone to hysterical conclusions from lobbied interests.

Global warming, global cooling, global sniffles, global migration and still no global peace?

Now they want to do computer science?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
infratec
Always Here
Always Here
Posts: 7618
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by infratec »

It is a question of programming and not of the language.

C is 'low level'. the programmer has to take care about what he is doing.

Maybe the programmers get worse or lazy.
Or they use 'frameworks' which are not well done. (the fault was done by other programmers :mrgreen: )

To compensate that, a language was needed which tells the programmer what is safe and what is not.
It is called Rust, but that doesn't mean that other code isn't save.

And why is there a keyword 'unsafe' in Rust?
Maybe because it is needed in some cases. And then the code is 'unsafe' :mrgreen:

So it still depends on the programmer.

Look at qmail written in 1996, ok, they found 4 possible points to break it.
But they are fixed in notqmail. Up to now there are no other 'bugs' or vulnerabilities discovered up to now.
And these bugs only occured after the 32bit code was executed or compiled on 64bit CPUs.
DarkDragon
Addict
Addict
Posts: 2345
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by DarkDragon »

There's already a topic about it here:

https://www.purebasic.fr/english/viewtopic.php?t=83696

Rust compared to C(++) is like formal verification compared to testing. So it is definitely safer than C/C++, due to its object lifetime and ownership management. If we can use it, we should, but it's not the solution to everything.
bye,
Daniel
AZJIO
Addict
Addict
Posts: 2191
Joined: Sun May 14, 2017 1:48 am

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by AZJIO »

Of course, the US government will not wish bad things on its competitors. And MS and Google products are listed as alternatives. Only the NSA can control your computer, not some hacker.
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by Piero »

They also asked you to wear a mask they said was unhealthy the day before
DarkDragon
Addict
Addict
Posts: 2345
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by DarkDragon »

Memory safety is also being discussed in the C++ community, it's not the case that only the US government says that.

https://www.youtube.com/watch?v=I8UvQKvOSSw
https://herbsutter.com/2024/03/11/safety-in-context/

There has always been the difference between business critical, mission critical and safety critical applications, however if we can easily broaden the safety into other areas we should do it. I don't know any person writing ASIL-D applications in C++, they're all in MISRA-C, also in medical technology and avionics.
Piero wrote: Sun Mar 17, 2024 4:07 pm They also asked you to wear a mask they said was unhealthy the day before
I'm still wearing my mask in public. If a doctor with asthma can do it throughout the whole day until the end of his life, I can do it for some hours, too.
bye,
Daniel
User avatar
skywalk
Addict
Addict
Posts: 4218
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by skywalk »

Yes, no complaints from me if masks are voluntary. I cannot wear them due to oxygen deprivation. My body needs more O2 than most. I get headaches wearing masks.

Memory safe programming is absolutely possible with good programmers in any language. Maybe the problem is when very large projects demand all contributors not create issues in shared libs.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
BarryG
Addict
Addict
Posts: 4173
Joined: Thu Apr 18, 2019 8:17 am

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by BarryG »

Sounds like the perfect marketing opportunity for Fred: praise the benefits of coding in BASIC instead of C/C++, because he can truthfully advertise that BASIC isn't part of the US government's concerns! :lol: Always a silver lining.
User avatar
Mijikai
Addict
Addict
Posts: 1520
Joined: Sun Sep 11, 2016 2:17 pm

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by Mijikai »

Prob. just want people to use new tech with embedded backdoors instead.
User avatar
idle
Always Here
Always Here
Posts: 5897
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by idle »

Mijikai wrote: Mon Mar 18, 2024 12:39 pm Prob. just want people to use new tech with embedded backdoors instead.
Isn't that's the role of the operating system?
User avatar
the.weavster
Addict
Addict
Posts: 1577
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by the.weavster »

It's not just the USA's government, this guidance has been published across all the Five Eyes.
User avatar
Piero
Addict
Addict
Posts: 923
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by Piero »

idle wrote: Fri Mar 22, 2024 5:18 am
Mijikai wrote: Mon Mar 18, 2024 12:39 pm Prob. just want people to use new tech with embedded backdoors instead.
Isn't that's the role of the operating system?
Also of the """hacked""" firmware of your toys
Nituvious
Addict
Addict
Posts: 1029
Joined: Sat Jul 11, 2009 4:57 am
Location: United States

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

Post by Nituvious »

Meanwhile in java land where logging classes allow remote code execution...
▓▓▓▓▓▒▒▒▒▒░░░░░
Post Reply