Re: How to develop a random number generation device



MooseFET wrote:
On Sep 12, 2:39 pm, David Brown
<david.br...@xxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
MooseFET wrote:
On Sep 11, 4:58 pm, John Larkin
<jjlar...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
[... buffer overflow ...]
It sounds to me like C compilers/linkers tend to allocate memory to
code, buffers, and stack sort of anywhere they like.
It's up to the linker to build the segments, and the run-time
link-loader picks the addresses - the compiler is not involved in the
process.

I included the linker in the "compiler/linker" in many cases they are
the same program. In many environments the segments end up in memory
in the same order as they were in the file.


The linker is not the same program (for C) in any environment I have ever heard of - but it is generally *called* by the compiler automatically, so it just looks like it is part of the compiler. The point is, any linking issues are handled by linking directives and not by anything you give to the compiler (i.e., the source code).

The link-loader is a different animal altogether - it is what the operating system uses to actually load and run a program. It handles the final linking of the binary with any required run-time libraries, it allocates space and addresses for the different segments of the program, and it links the parts together. It is at that stage that the addresses are finalised. In particular, if you are using a system with randomised addresses, each time a program is loaded it is linked to a different random address.
.



Relevant Pages

  • Re: How to develop a random number generation device
    ... buffer overflow ...] ... The linker is not the same program in any environment I have ... ever heard of - but it is generally *called* by the compiler ... The link-loader is a different animal altogether - it is what the ...
    (sci.electronics.design)
  • Re: Nasm 0.99.00
    ... "snprintf" to get rid of a buffer overflow). ... constantly having to convert snprintf() code for DJGPP. ... char arr; ... so, yeah, if I ever do get my compiler functional, likely at least some ...
    (alt.lang.asm)
  • Re: bare bones file encrypter/decrypter using 128 bit Serpent algorithm
    ... if not producing any warnings is sufficient to prove a program is bug free then here is my implementation in standard C of the "Do whatever you want" program. ... misuse strncpy, you don't seed rand(). ... Such as a buffer overflow even if the user followed the instructions. ... and in fact they cannot because the compiler does not know what you intend only what you tell it. ...
    (comp.lang.c)
  • Re: INTERNAL COMPILER ERROR: compiler file msc1.cpp, line 1794
    ... > to the current file path. ... It may cause buffer overflow in the compiler. ... >> Anyway I think I figured out a satisfactory workaround that has minimal ...
    (microsoft.public.vc.language)
  • Re: Wu-ftpd FTP server contains remotely exploitable off-by-one bug
    ... a different compiler and OS ... buffer overflow does not exist on a different system. ... That being said, I havent ... To unsubscribe, ...
    (FreeBSD-Security)