5 Replies Latest reply on Jun 2, 2011 9:59 AM by jheld

    Address space randomization with sccLinux?

    yongjun

      Hi.

       

      I wish to know if the SCCLinux performs address space layout randomization.

       

      When I boot SCCLinux on all cores, does each core's kernel layout always differ from one another?

      Is it different every time it is booted?

       

      If the SCCLinux does perform code/data randomization, is there a way to turn it off and boot SCCLinux in a way that the kernel code/data layout is always the same?

       

      Thank you.

        • 1. Re: Address space randomization with sccLinux?
          michael.riepen

          The pre-compiled Linux image that comes with sccKit has a static setup. In fact, we replicate the very same Linux instance 48 times (each core get's its private copy). Until that point in time, all Linux memory layouts are exact copies with different memory offsets, distributed over all four memory controllers (MCs). At the moment you release the resets, the memory layouts will start to diverge, as each core reads it's own Tile-ID (Who am I?) and boots Linux. Depending on the workloads that have been executed, the memory layouts will now differ (different amount of allocated memory, different stack size, etc.). Does this answer the question?

          • 2. Re: Address space randomization with sccLinux?
            yongjun

            Hi, Michael.

            Thank you for your reply.

             

            I understand what you've told me, but I wanted to know if the SCCLinux performs the typical address space randomization routine.

             

            More specifically, I am curious about whether all the code of the SCCLinux kernel shall reside in the same memory location on all cores, and also everytime SCCLinux boots on a core.

             

            I get it from your reply that user memory areas and kernel data areas would differ once the cores boot and start functioning, but how about the kernel code areas?

            If there is no address space randomization performed, shouldn't the kernel code ALWAYS be in the same memory location?

             

            Any hints on this?

            • 3. Re: Address space randomization with sccLinux?
              jheld

              Are you referring to the security measure: http://en.wikipedia.org/wiki/Address_space_layout_randomization?

              SCC Linux does nothing beyond what standard Linux does.    There are no specific security measures taken with SCC Linux as it is offered as a tool for research.  Why do you ask?

               

              Source code is available so you could experiment with some of the patchsets that provide more complete ASLR, though I believe that would be off topic for the SCC research projects I'm aware of.

              -Jim

              • 4. Re: Address space randomization with sccLinux?
                yongjun

                Hi, Jim.

                 

                I'm asking this question because I would like to be sure that all the kernel code is always at the same address location.

                 

                As you said, I am talking about something like the wikipedia link you mentioned.

                I've heard that most Linux systems use such randomization techniques.

                 

                Also, I looked at some code in the SCCLinux and I think that when locating the stack area, the address is given somewhat randomly.

                Am I right?

                What I concern about is the code area, not data like stack, especially the kernel code.

                If the SCCLinux doesn't do any such things like you said, the kernel code should always be at the same address, doesn't it?

                • 5. Re: Address space randomization with sccLinux?
                  jheld

                  SCCLinux does not do anything in this regard beyond stock Linux.

                  You can always check, source is there. Instrument the kernel routines you care about to report their location.

                   

                  This entire SW stack is meant as a starting point for experimentation, not a product, so it is very straightforward/minimal.

                  -Jim