From: Kees Cook <kees@kernel.org>
To: Alejandro Colomar <alx+linux-hardening@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Alejandro Colomar <alx@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Bill Wendling <morbo@google.com>, Petr Mladek <pmladek@suse.com>,
Randy Dunlap <rdunlap@infradead.org>,
Shuvam Pandey <shuvampandey1@gmail.com>,
linux-kernel@vger.kernel.org, linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] seq_buf: Mark a seq_buf overflowed when terminating it loses a byte
Date: Tue, 10 Nov 2026 14:06:07 -0800 [thread overview]
Message-ID: <20261110220602.272c5b-kees@kernel.org> (raw)
In-Reply-To: <ausTcdh966BNVA-_@devuan>
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
next prev parent reply other threads:[~2026-11-10 22:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-04 3:31 [PATCH v3] seq_buf: Mark a seq_buf overflowed when terminating it loses a byte Kees Cook
2026-11-04 11:17 ` Alejandro Colomar
2026-11-10 22:06 ` Kees Cook [this message]
2026-11-10 23:33 ` Alejandro Colomar
2026-11-04 11:28 ` Alejandro Colomar
2026-11-10 22:07 ` Kees Cook
2026-11-10 23:35 ` Alejandro Colomar
2026-11-11 6:16 ` Kees Cook
2026-11-11 8:51 ` Andy Shevchenko
2026-11-11 8:49 ` Andy Shevchenko
2026-11-04 13:40 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261110220602.272c5b-kees@kernel.org \
--to=kees@kernel.org \
--cc=alx+linux-hardening@kernel.org \
--cc=alx@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=morbo@google.com \
--cc=pmladek@suse.com \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=shuvampandey1@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.