[PATCH v4 03/11] seq_buf: Copy what fits when seq_buf_puts() and seq_buf_putmem() overflow
Kees Cook
kees at kernel.org
Mon Oct 5 10:06:22 UTC 2026
On Sat, Oct 03, 2026 at 04:50:58AM +0000, bot+bpf-ci at kernel.org wrote:
> Can this break callers that rely on seq_buf_puts() dropping a string whole
> when it does not fit?
Yes, good catch; lpfc does. For v5 there's a new patch ahead of this one
that has lpfc_rx_monitor_report() print each record with
seq_buf_printf() and, when one doesn't fit, end the string where it
began, so its debugfs output still stops at the last whole record.
I've checked all the other users of seq_buf_puts() and didn't find any
other cases like this.
-Kees
--
Kees Cook
More information about the Linux-security-module-archive
mailing list