Theo de Raadt wrote:
> Theo de Raadt wrote:
>
> > > Yet another version of the diff as I incrementally get it working better.
> > > Call it version 22..
>
> This is around version 30.
New version.
uvm_unmap_remove() now avoids doing entry splits as it scans for immutables
in the region.
Lot
On Thu, Sep 15, 2022 at 08:31:06AM -0600, Theo de Raadt wrote:
> RCS file: lib/libc/sys/mimmutable.2
...
> +Unmapped pages in the region do not retain immutability, but this
> +behaviour should not be relied up.
s/relied up/relied on/
or
s/relied up/relied upon/
Theo de Raadt wrote:
> > Yet another version of the diff as I incrementally get it working better.
> > Call it version 22..
This is around version 30.
There is still a subtle problem with RELRO, but it is masked with a hack.
arm64 also works correctly, and I'm onto the next architecture. Syste
Theo de Raadt wrote:
> Theo de Raadt wrote:
>
> > Theo de Raadt wrote:
> >
> > > In this version of the diff, the kernel manages to mark immutable most of
> > > the main binary, and in the shared-binary case, also most of ld.so. But
> > > it
> > > cannot mark all of the ELF mapping -- becau
Theo de Raadt wrote:
> Theo de Raadt wrote:
>
> > In this version of the diff, the kernel manages to mark immutable most of
> > the main binary, and in the shared-binary case, also most of ld.so. But it
> > cannot mark all of the ELF mapping -- because of two remaining problems
> > (RELRO
> >
Theo de Raadt wrote:
> In this version of the diff, the kernel manages to mark immutable most of
> the main binary, and in the shared-binary case, also most of ld.so. But it
> cannot mark all of the ELF mapping -- because of two remaining problems (RELRO
> in .data, and the malloc.c self-protect
In the last few years, I have been improving the strictness of userland
memory layout.
An example is the recent addition of MAP_STACK and msyscall(). The first one
marks pages that are stack, so that upon entry to the kernel we can check if
the stack-pointer is pointing in the stack range. If it