[Cryptography] Buffer overflows from 1974

D. Hugh Redelmeier hugh at mimosa.com
Tue Jan 6 10:34:04 EST 2026


> From: Peter Gutmann via cryptography <cryptography at metzdowd.com>
> 
> It was written on a PDP-11... I'm guessing 45 with 32KW memory using ed on a
> Model 33 teletype, it couldn't run anything beyond the most basic pre-K&R C.

(This triggered a bunch of memories.  I hope they don't bore everyone.)

Compilers have a tough time enforcing things that they don't know about.  
Strong typing is really important for improving safety.

My mental model of the C compiler at a little later (1975; 5th edition?) 
was that the language was really B (typeless), with a few nods to typing 
so that byte operations could be expressed.

Have you seen .hi and .lo in the kernel code?  You could do that with 
ints!  Field names were global, not just for structs in which they were 
declared!  I don't think union existed then but the global nature of field 
names made them less necessary.  Yikes!

C functions could be called with completely random parameters: no type 
checking of number or types of parameters.  This was intentionally 
exploited in printf.

For me, C was a nice improvement on assembly code (I had done a lot of 
programming in various assemblers).  I immediately knew that I would 
miss strong typing compared with Algol W, my favourite among the 
languages I had previously used seriously.

Before C, the decent languages for the PDP-11 were cross-compiled, a 
horrible state of affairs.  I used cross-compiled Harvey (a BLISS subset) 
and Sue (a very nice systems implementation language for Project Sue at 
the University of Toronto).

DEC itself used BLISS-11 sometimes, I think.  Horribly inhumane: typeless 
AND no implicit dereferencing.
	i := .i + 1;
If you left out the dot, the statement would take the address of i, add 
one to it, and store that in i.  But the compiler was very good at 
optimizing.

The l-value / r-value distinction that Strachey (I think) made explicit 
was a lot more humane that the Algol 68 approach of using the type system 
and implicit conversions to do the work.  BLISS copied that without the 
implicit conversion (since it was typeless).  B, derived from BCPL, 
derived from CPL did have the l-value / r-value concept.


More information about the cryptography mailing list