[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YE6LswIxL1N+8AS4@grain>
Date: Mon, 15 Mar 2021 01:18:27 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
security@...nel.org
Subject: Re: [PATCH] prctl: fix PR_SET_MM_AUXV kernel stack leak
On Sun, Mar 14, 2021 at 11:51:14PM +0300, Alexey Dobriyan wrote:
> prctl(PR_SET_MM, PR_SET_MM_AUXV, addr, 1);
>
> will copy 1 byte from userspace to (quite big) on-stack array
> and then stash everything to mm->saved_auxv.
> AT_NULL terminator will be inserted at the very end.
>
> /proc/*/auxv handler will find that AT_NULL terminator
> and copy original stack contents to userspace.
>
> This devious scheme requires CAP_SYS_RESOURCE.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
> ---
Thanks for catching up, Alexey!
Powered by blists - more mailing lists