Re: Using x86 segments against NULL pointer deference exploit
From: Andi Kleen
Date: Fri Nov 06 2009 - 15:19:04 EST
castet.matthieu@xxxxxxx writes:
> Hi,
>
> I am wondering why we can't set the KERNEL_DS data segment to not contain the
> first page, ie changing it from R/W flat model to R/W expand down from
> 0xffffffff to 4096.
As Alan pointed out setting segment limits/bases has large penalties.
This has been already addressed by the mmap limit defaults
on the VM level by disallowing to place something on the zero page.
In fact a lot of systems should already run with that default.
> PS : why x86_64 segment got access bit set and x86_32 doesn't ?
It's a extremly minor optimization, but the CPU sets it on the first
access anyways.
-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/