public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] lib/vsprintf: pointer handling fixes for bstr_printf() and vbin_printf()
@ 2026-03-30 19:34 Josh Law
  2026-03-30 19:34 ` [PATCH v2 1/2] lib/vsprintf: always advance args in bstr_printf() pointer path Josh Law
  2026-03-30 19:34 ` [PATCH v2 2/2] lib/vsprintf: fix OOB write in vbin_printf() when size is zero Josh Law
  0 siblings, 2 replies; 8+ messages in thread
From: Josh Law @ 2026-03-30 19:34 UTC (permalink / raw)
  To: akpm, pmladek, rostedt
  Cc: andriy.shevchenko, linux, senozhatsky, linux-kernel, Josh Law

These patches address multiple bugs in vsprintf pointer handling


Patch one: Regards argument pointer advancement in bstr_printf(),
when the buffer is full..
Patch two: Fixes a OOB write in vbin_printf() when size is 0

Josh Law (2):
  lib/vsprintf: always advance args in bstr_printf() pointer path
  lib/vsprintf: fix OOB write in vbin_printf() when size is zero

 lib/vsprintf.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


Changes since V1:
Dropped 2 patches, probably not needed.
For patch 2: Instead of using else if (end > (char *)bin_buf),
instead guard size with else if (size) /* do nothing if size is zero */
(suggested by steven Rostedt)
-- 
2.34.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-04-02 13:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-30 19:34 [PATCH v2 0/2] lib/vsprintf: pointer handling fixes for bstr_printf() and vbin_printf() Josh Law
2026-03-30 19:34 ` [PATCH v2 1/2] lib/vsprintf: always advance args in bstr_printf() pointer path Josh Law
2026-03-31  7:26   ` Krzysztof Kozlowski
2026-03-31 14:47     ` Steven Rostedt
2026-04-02  3:47       ` Kuan-Wei Chiu
2026-04-02  8:03         ` Josh Law
2026-04-02 13:34           ` Steven Rostedt
2026-03-30 19:34 ` [PATCH v2 2/2] lib/vsprintf: fix OOB write in vbin_printf() when size is zero Josh Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox