Re: [PATCH v3] seq_buf: Mark a seq_buf overflowed when terminating it loses a byte
From: Kees Cook
Date: Tue Nov 10 2026 - 17:06:20 EST
On Wed, Nov 04, 2026 at 12:17:00PM +0100, Alejandro Colomar wrote:
> > No current caller checks for overflow after terminating a seq_buf that
> > can be left exactly full, so none of them behaves differently.
>
> Okay for this patch, but still some question:
>
> Since data truncation is almost always wrong, is it a bug that those
> users are not verifying that no overflow happened? Or do they have a
> good reason to not verify?
Right, this would need a case-by-case analysis. Some expect it and some
don't. This change to the API is to make it defensive in the general
case without making existing truncation worse.
-Kees
--
Kees Cook