Re: [PATCH] proc: Fix uninitialized byte read in get_mm_cmdline()
From: Oleg Nesterov
Date: Fri Jul 12 2019 - 12:36:30 EST
On 07/12, Alexey Izbyshev wrote:
>
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@ -275,6 +275,8 @@ static ssize_t get_mm_cmdline(struct mm_struct *mm, char __user *buf,
> if (got <= offset)
> break;
> got -= offset;
> + if (got < size)
> + size = got;
Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx>