Re: A Famous Security Bug

Liste des GroupesRevenir à cl c 
Sujet : Re: A Famous Security Bug
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c
Date : 24. Mar 2024, 23:43:32
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <utqaak$kfuv$2@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11
User-Agent : Mozilla Thunderbird
On 24/03/2024 20:56, bart wrote:
On 24/03/2024 14:52, David Brown wrote:
On 23/03/2024 22:21, bart wrote:
 

 
This works on DMC, tcc, mcc, lccwin, but not gcc because that loads programs at high addresses. The problem being that the address involved, while belonging to the program, is outside of any C data objects.
>
>
I think you are being quite unreasonable in blaming gcc - or C - for generating code that cannot access that particular arbitrary address!
 There were two separate points here. One is that a gcc-compiled version won't work because exe images are not loaded at 0x40'0000.
I think that is because your gcc toolchain is creating 64-bit Windows binaries, while the others are creating 32-bit binaries.  I could be wrong here, of course.

The other was me speculating whether the access to 0x40'0000, even when valid memory for this process, was UB in C.
 
Trying to access non-existent memory is UB, yes.  I can't imagine a language where such a thing would be anything else than undefined behaviour, or defined as a hard run-time error.
But you can run something with UB if you want - at your own risk, because C and the compiler give you no guarantees of what will happen. But if you write "x = *(volatile uint8_t *) 0x400000;", then you can guarantee that the code will at least /try/ to read that address.  What happens depends on the OS, memory protection systems, etc.  But it is not exactly difficult to do this kind of thing in C - that's why "volatile" exists.

Date Sujet#  Auteur
22 Mar 24 * Re: A Famous Security Bug52James Kuyper
22 Mar 24 `* Re: A Famous Security Bug51bart
23 Mar 24  +* Re: A Famous Security Bug5Keith Thompson
23 Mar 24  i`* Re: A Famous Security Bug4Kaz Kylheku
23 Mar 24  i `* Re: A Famous Security Bug3David Brown
23 Mar 24  i  `* Re: A Famous Security Bug2bart
24 Mar 24  i   `- Re: A Famous Security Bug1David Brown
23 Mar 24  `* Re: A Famous Security Bug45James Kuyper
23 Mar 24   `* Re: A Famous Security Bug44bart
23 Mar 24    +* Re: A Famous Security Bug37David Brown
23 Mar 24    i`* Re: A Famous Security Bug36bart
24 Mar 24    i +* Re: A Famous Security Bug29David Brown
24 Mar 24    i i`* Re: A Famous Security Bug28bart
24 Mar 24    i i +* Re: A Famous Security Bug12Keith Thompson
24 Mar 24    i i i+- Re: A Famous Security Bug1David Brown
24 Mar 24    i i i+* Re: A Famous Security Bug3Michael S
25 Mar 24    i i ii+- Re: A Famous Security Bug1David Brown
25 Mar 24    i i ii`- Re: A Famous Security Bug1Keith Thompson
25 Mar 24    i i i`* Re: A Famous Security Bug7bart
25 Mar 24    i i i `* Re: A Famous Security Bug6Michael S
25 Mar 24    i i i  +* Re: A Famous Security Bug4bart
25 Mar 24    i i i  i`* Re: A Famous Security Bug3David Brown
25 Mar 24    i i i  i `* Re: A Famous Security Bug2Malcolm McLean
25 Mar 24    i i i  i  `- Re: A Famous Security Bug1Michael S
25 Mar 24    i i i  `- Re: A Famous Security Bug1David Brown
24 Mar 24    i i `* Re: A Famous Security Bug15David Brown
25 Mar 24    i i  `* Re: A Famous Security Bug14Michael S
25 Mar 24    i i   `* Re: A Famous Security Bug13David Brown
25 Mar 24    i i    +* Re: A Famous Security Bug3Michael S
25 Mar 24    i i    i+- Re: A Famous Security Bug1David Brown
25 Mar 24    i i    i`- Re: A Famous Security Bug1bart
25 Mar 24    i i    `* Re: A Famous Security Bug9bart
25 Mar 24    i i     +* Re: A Famous Security Bug7Michael S
25 Mar 24    i i     i`* Re: A Famous Security Bug6bart
25 Mar 24    i i     i +- Re: A Famous Security Bug1David Brown
25 Mar 24    i i     i `* Re: A Famous Security Bug4Michael S
25 Mar 24    i i     i  `* Re: A Famous Security Bug3bart
26 Mar 24    i i     i   `* Re: A Famous Security Bug2Michael S
26 Mar 24    i i     i    `- Re: A Famous Security Bug1bart
25 Mar 24    i i     `- Re: A Famous Security Bug1David Brown
24 Mar 24    i `* Re: A Famous Security Bug6Michael S
24 Mar 24    i  `* Re: A Famous Security Bug5bart
25 Mar 24    i   +* Re: A Famous Security Bug2Michael S
25 Mar 24    i   i`- Re: A Famous Security Bug1Michael S
25 Mar 24    i   +- Re: A Famous Security Bug1David Brown
28 Mar 24    i   `- Re: A Famous Security Bug1James Kuyper
23 Mar 24    +- Re: A Famous Security Bug1Tim Rentsch
24 Mar 24    +- Re: A Famous Security Bug1Michael S
24 Mar 24    +* Re: A Famous Security Bug3Michael S
24 Mar 24    i`* Re: A Famous Security Bug2bart
24 Mar 24    i `- Re: A Famous Security Bug1Michael S
28 Mar 24    `- Re: A Famous Security Bug1James Kuyper

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal