[FUGSPBR] [Off Toppic] NetBSD e AMD64

Alexandre darkwesker2000 em yahoo.com.br
Qua Jul 21 13:10:05 BRT 2004


Esse "NX-bit" seria o "Non-executable stack and heap"?

Se for está disponível a partir do NetBSD 2.0:
http://www.netbsd.org/Documentation/kernel/non-exec.html


Non-executable stack and heap

Starting with version 2.0, NetBSD supports non-executable mappings on
platforms where the hardware allows it. Process stack and heap mappings
are non-executable by default. This makes exploiting potential buffer
overflows harder. NetBSD supports PROT_EXEC permission via mmap() for
all platforms where the hardware differentiates execute access from data
access, though not necessarily with single-page granularity. When the
hardware has a larger granularity, the rule is that if any page in the
larger unit is executable, then the entire larger unit is executable,
otherwise the entire larger unit is not executable.

No compile-time option is needed to enable this software support, it's
always available.


Supported platforms

Here is a list of support levels based on hardware limitations. In this
list "the stack" refers to the traditional UNIX process stack, not
pthreads stacks.

**amd64**, sparc64, sparc (sun4m, sun4d), powerpc (ibm4xx), alpha, sh5,
hppa: Full support, each page is independently executable or not.

powerpc (eg. macppc): The hardware granularity is a segment (256MB)
instead of a page. By default, the segment containing the stack is not
executable.

i386: The hardware support is pretty limited, so the granularity is
very coarse. The current software implementation in NetBSD is that there
are only two regions of the application address space which may be
independently executable or not: the stack and everything else. By
default, the stack is not executable and everything else is executable

Everything else; arm, m68k, mips, pc532, sh3, sparc(sun, sun4c), vax:
No support, the hardware does not differentiate execute vs. data
accesses, so anything readable to a process as data is executable by the
process as code.

> On Sun, 18 Jul 2004 12:41:25 -0300, Joao Rocha Braga Filho  
> <goffredo em webkey.com.br> wrote:
>
>>     Eu estou procurando informações sobe o suporte ao
>> NX-bit do AMD64, mas não achei nada do NetBSD.
>>
>>     Do FreeBSD achei referências datando de Novembro
>> de 2003. O FreeBSD 5.2 já tinha suporte. Mas, se não
>> me engano, a primeira release do FreeBSD para o AMD64
>> foi a 5.1.
>>
>>     O OpenBSD oficialmente tem suporte na sua versão
>> de 1/5/2004, que foi também a primeira versão para o
>> AMD64.
>>
>>     O Suse Linux tem suporte para o AMD64 desde final
>> de Novembro, mas sem o NX-bit. O primeiro suporte do
>> NX-bit para o Linux foi lançado em 2/06/2004, e foi
>> desenvolvido pela Red Hat em um protótipo da Intel. No
>> artigo que li não falou sobre compatibilidade ou testes
>> com o AMD64.
>>
>>     A Microsoft adiou o Service pack 2 para o Windows
>> XP, que daria suporte para o NX-bit. No dia 14/07/2004
>> lançou uma versão beta. Pode ser que o service pack
>> seja adiado de novo.
>>
>>     Mas ainda não achei nada sobre o NetBSD. Sei que ele
>> tem suporte para o AMD64, e mais nada, e que preparou
>> o port em 1 mês, mas adiou o lançamento oficial para coincidir
>> com o lançamento de uma versão. Mas nada sobre o NX-bit.
>>
>>     Se alguém souber algo sobre o NX-bit para o NetBSD,
>> por favor, me informe.
>>
>>
>>        João Rocha.
>




_______________________________________________________________
Para enviar um novo email para a lista: fugspbr em fugspbr.org
Sair da Lista: http://lists.fugspbr.org/listinfo.cgi
Historico: http://www4.fugspbr.org/lista/html/FUG-BR/



Mais detalhes sobre a lista de discussão freebsd