Skip to content

lib/vsprintf: pointer handling fixes for bstr_printf() and vbin_printf()

Josh Law lkml 2 versions – NAK

Status from this message: NAK

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 5 repliesNAK
  2. v14 patches 22 repliesSuperseded

Changes in v2 from the cover letter

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)

Patches in v2

#Subject and filesSizeRepliesApplied
1/2lib/vsprintf: always advance args in bstr_printf() pointer pathlib/vsprintf.c+4 -35 replies
2/2lib/vsprintf: fix OOB write in vbin_printf() when size is zerolib/vsprintf.c+1 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] lib/vsprintf: pointer handling fixes for bstr_printf() and vbin_printf()

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)

Signature · 1 line
2.34.1