[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <689285efaf59e_cff9910066@dwillia2-xfh.jf.intel.com.notmuch>
Date: Tue, 5 Aug 2025 15:30:07 -0700
From: <dan.j.williams@...el.com>
To: Nikolay Borisov <nik.borisov@...e.com>,
<linux-security-module@...r.kernel.org>
CC: <linux-kernel@...r.kernel.org>, <paul@...l-moore.com>, <serge@...lyn.com>,
<jmorris@...ei.org>, <dan.j.williams@...el.com>, Nikolay Borisov
<nik.borisov@...e.com>
Subject: Re: [PATCH v2 3/3] lockdown: Use snprintf in lockdown_read
Nikolay Borisov wrote:
> Since individual features are now locked down separately ensure that if
> the printing code is change to list them a buffer overrun won't be
> introduced. As per Serge's recommendation switch from using sprintf to
> using snprintf and return EINVAL in case longer than 80 char string hasi
> to be printed.
I would have expected this safety to come before patch1, but it also
feels like the maximum buffer size could be calculated at compile time
to make the maximum output always fit.
Powered by blists - more mailing lists