On Wed, 16 Aug 2023, Siddhesh Poyarekar wrote:

> > Yeah, indicating scenarios that fall outside of intended guarantees should
> > be helpful. I feel the exact text quoted above will be hard to decipher
> > without knowing the discussion that led to it. Some sort of supplementary
> > section with examples might help there.
> 
> Ah, so I had started out by listing examples but dropped them before emailing.
> How about:
> 
>     Similarly, GCC may transform code in a way that the correctness of
>     the expressed algorithm is preserved but supplementary properties
>     that are observable only outside the program or through a
>     vulnerability in the program, may not be preserved.  Examples
>     of such supplementary properties could be the state of memory after
>     it is no longer in use, performance and timing characteristics of a
>     program, state of the CPU cache, etc. Such issues are not security
>     vulnerabilities in GCC and in such cases, the vulnerability that
>     caused exposure of the supplementary properties must be fixed.

I would say that as follows:

        Similarly, GCC may transform code in a way that the correctness of
        the expressed algorithm is preserved, but supplementary properties
        that are not specifically expressible in a high-level language
        are not preserved. Examples of such supplementary properties
        include absence of sensitive data in the program's address space
        after an attempt to wipe it, or data-independent timing of code.
        When the source code attempts to express such properties, failure
        to preserve them in resulting machine code is not a security issue
        in GCC.

Alexander

Reply via email to