Re: [PATCH] slub: Relocate freelist pointer to middle of object

From: Christopher Lameter
Date: Sun Mar 15 2020 - 10:11:41 EST


On Wed, 11 Mar 2020, Kees Cook wrote:

> > Sounds good. You could even randomize the position to avoid attacks on via
> > the freelist pointer.
>
> That's a good point. "offset" is just calculated once, and for many
> slabs, the available space is quite large. I wonder what the best

Correct.

> practice might be for how far from the edge to stay. Hmmm. Maybe simply
> carve it into thirds, and randomize the offset within the middle third?

Take off the first and last word and randomize within the space that is
left?