Re: [PATCH v2] s390: prevent leaking kernel address in BEAR

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 24 Jan 2020 13:25:15 +0100
Sven Schnelle <svens@xxxxxxxxxxxxx> wrote:

> When userspace executes a syscall or gets interrupted,
> BEAR contains a kernel address when returning to userspace.
> This make it pretty easy to figure out where the kernel is
> mapped even with KASLR enabled. To fix this, add lpswe to
> lowcore and always execute it there, so userspace sees only
> the lowcore address of lpswe. For this we have to extend
> both critical_cleanup and the SWITCH_ASYNC macro to also check
> for lpswe addresses in lowcore.
> 
> Fixes: b2d24b97b2a9 ("s390/kernel: add support for kernel address space layout randomization (KASLR)")
> Cc: <stable@xxxxxxxxxxxxxxx> # v5.2+
> Signed-off-by: Sven Schnelle <svens@xxxxxxxxxxxxx>
> ---

Looks good,
Reviewed-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx>

I think you can push to devel, but this should hang around a bit before
sending upstream (@Vasily). Maybe at least wait until Heiko can also
have a look.

Since the small extra window for critical section cleanup introduced by
the lowcore lpswe is hit surprisingly easy and often, this will get some
good testing on devel branch.




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux