[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202409281438.EAC4B88C@keescook>
Date: Sat, 28 Sep 2024 14:39:45 -0700
From: Kees Cook <kees@...nel.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Vegard Nossum <vegard.nossum@...cle.com>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Allen Pais <apais@...ux.microsoft.com>,
Roman Kisel <romank@...ux.microsoft.com>,
Xiaoming Ni <nixiaoming@...wei.com>,
Vijay Nag <nagvijay@...rosoft.com>, linux-kernel@...r.kernel.org,
linux-hardening@...r.kernel.org
Subject: Re: [PATCH] coredump: Do not lock during 'comm' reporting
On Sat, Sep 28, 2024 at 02:35:32PM -0700, Andrew Morton wrote:
> On Sat, 28 Sep 2024 14:08:31 -0700 Kees Cook <kees@...nel.org> wrote:
>
> > The 'comm' member will always be NUL terminated,
>
> Why is this? I thought this is only true if the caller holds task_lock()?
Because it's always written with strscpy_pad(). The final byte will
always be NUL. (And this has been true for a very long time.)
--
Kees Cook
Powered by blists - more mailing lists