|
|
Log in / Subscribe / Register

Wi-Fi software security bug could leave Android, Windows, Linux open to attack (Ars Technica)

Wi-Fi software security bug could leave Android, Windows, Linux open to attack (Ars Technica)

Posted Apr 26, 2015 22:16 UTC (Sun) by tpo (subscriber, #25713)
In reply to: Wi-Fi software security bug could leave Android, Windows, Linux open to attack (Ars Technica) by paulj
Parent article: Wi-Fi software security bug could leave Android, Windows, Linux open to attack (Ars Technica)

> It's 2015. Why are we still writing parsers for untrusted, remote input data with direct memcpy's based on remote supplied fields?
>
> Really, it's not difficult to write a bounds-checking abstraction layer and direct IO through it.

So I've been giving systems engineering lectures for a dozen of years. My aim always was to have the students learn C in order to be able to 1) understand existing systems, code and history and 2) also to understand why never ever to use that language, since writing a secure program in it is near impossible (+- ε ≥ 0).

After 45 years of consistent train wreckage C/C++ is *still* the only systems engineering language though (not sure how much of OSX is written in Objective-C).

During all of my time of teaching about C I've been wondering whether it would be possible to define a "secure C" (sub)set consisting of (best practice) rules and to implement wrappers (data structures and methods) around pointer handling, arrays and memory management and other dangers?

Most efforts of "improving C" seem to have resulted in new languages (Ada, Objective-C, C++)... or have concentrated on some constrained problem (Gtk, Gobject...).

My impression always was that with the vast majority of standard C library/POSIX functions being insecure providing a "secure subset + wrappers" would be a nonsensical undertaking.

Maybe not though. Does such a thing - an easy to use set of secure rules and a secure, comprehensive runtime environment - exist? Maybe even with a --strictly-secure-gcc-clang-...-features compiler switch?


to post comments

Safe C?

Posted Apr 27, 2015 5:52 UTC (Mon) by gmatht (subscriber, #58961) [Link]

There is MISRA C. It is not clear to me whether the objective machine checkable rules of MISRA C are sufficient to prevent undefined behaviour, however.

Rust seems like the most promising systems language. Superficially similar to C++ with all the unsafe bits pushed into "unsafe" blocks, and a bit of functional sugar for those who want it. No need for GC, and zero runtime overhead wrappers around C libraries.

Wi-Fi software security bug could leave Android, Windows, Linux open to attack (Ars Technica)

Posted May 5, 2015 11:15 UTC (Tue) by sorokin (guest, #88478) [Link]

> During all of my time of teaching about C I've been wondering whether it would be possible to define a "secure C" (sub)set consisting of (best practice) rules and to implement wrappers (data structures and methods) around pointer handling, arrays and memory management and other dangers?

I think this is more or less what C++ does. For example one can consider std::string as safe and convenient wrapper around strxxx functions.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds