But how is that related to separating the cabin from the passenger space on planes? (So that you totally don't even have a door between the two, I presume? And then we don't need checks in the airports?)
Range checks are all right, but those are not about separating the data from the code, and automatic memory management is not about separating the data from the code.
I don't know, I feel that the whole thing might seem to make some sense at a casual glance, but if you try to make sense of it, things just don't connect.
Graham's central point is that languages with automatically managed memory tend to disallow accidental conversions of data to code, so the class of attacks which relies on doing that is thwarted. That may not be what automatic memory management is "about", but it's certainly a feature that it tends to have, which follows from its underlying principles.
But how is that related to separating the cabin from the passenger space on planes?
In languages without automatically managed memory, buffer overflows can allow an attacker to promote data to code - for example, overwriting a function pointer in an area of memory that wasn't supposed to be written to. In Graham's analogy, this is like a passenger promoting himself to pilot.
If memory is managed in such a way that data cannot be accidentally promoted to code, this is not possible. Most automatic memory management have this property, as a consequence of their basic design, in which it is not possible for an ordinary program in the language to write past the end of an allocated region, or reuse a deallocated region, etc.
Of course, many such languages allow you to promoted data to code explicitly, using a function such as 'eval'.
1
u/moor-GAYZ Mar 11 '13
But how is that related to separating the cabin from the passenger space on planes? (So that you totally don't even have a door between the two, I presume? And then we don't need checks in the airports?)
Range checks are all right, but those are not about separating the data from the code, and automatic memory management is not about separating the data from the code.
I don't know, I feel that the whole thing might seem to make some sense at a casual glance, but if you try to make sense of it, things just don't connect.