All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/4] Buffer overruns in printf
@ 2011-09-23 17:38 Simon Glass
  2011-09-23 17:38 ` [U-Boot] [PATCH 1/4] Add limits.h to hold basic limits Simon Glass
                   ` (5 more replies)
  0 siblings, 6 replies; 41+ messages in thread
From: Simon Glass @ 2011-09-23 17:38 UTC (permalink / raw)
  To: u-boot

The printf family of functions in U-Boot cannot deal with a situation where
the caller provides a buffer which turns out to be too small for the format
string. This can result in buffer overflows, stack overflows and other bad
behavior.

This patch series tidies this up in the common vsprintf.c code, and also
some network code (as an example of where this might lead).


Simon Glass (2):
  Add limits.h to hold basic limits
  Use snprintf() in network code

Sonny Rao (2):
  Add safe vsnprintf and snprintf library functions
  Make printf and vprintf safe from buffer overruns

 common/console.c |   10 +-
 fs/ubifs/ubifs.h |    4 +-
 include/common.h |    8 ++-
 include/limits.h |   40 +++++++
 lib/vsprintf.c   |  316 ++++++++++++++++++++++++++++++++++++++++++------------
 net/eth.c        |   10 ++-
 net/net.c        |   15 ++-
 net/nfs.c        |    3 +-
 net/tftp.c       |    3 +-
 9 files changed, 323 insertions(+), 86 deletions(-)
 create mode 100644 include/limits.h

-- 
1.7.3.1

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

end of thread, other threads:[~2011-10-10 20:42 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-23 17:38 [U-Boot] [PATCH 0/4] Buffer overruns in printf Simon Glass
2011-09-23 17:38 ` [U-Boot] [PATCH 1/4] Add limits.h to hold basic limits Simon Glass
2011-09-23 17:38 ` [U-Boot] [PATCH 2/4] Add safe vsnprintf and snprintf library functions Simon Glass
2011-09-23 23:56   ` Graeme Russ
2011-09-28 23:26     ` Sonny Rao
2011-09-29  0:00       ` Graeme Russ
2011-09-29  0:38         ` Sonny Rao
2011-09-29  0:44           ` Graeme Russ
2011-09-23 17:38 ` [U-Boot] [PATCH 3/4] Make printf and vprintf safe from buffer overruns Simon Glass
2011-09-23 18:36   ` Kumar Gala
2011-09-23 18:48     ` Simon Glass
2011-09-23 20:31   ` Mike Frysinger
2011-09-23 20:41     ` Simon Glass
2011-09-23 22:36       ` Mike Frysinger
2011-09-23 23:06         ` Simon Glass
2011-09-25 20:16           ` Wolfgang Denk
2011-09-25 20:14       ` Wolfgang Denk
2011-09-26 18:25         ` Simon Glass
2011-09-26 18:47           ` Wolfgang Denk
2011-09-26 19:02             ` Simon Glass
2011-09-23 17:38 ` [U-Boot] [PATCH 4/4] Use snprintf() in network code Simon Glass
2011-09-23 18:15   ` Mike Frysinger
2011-09-23 18:30     ` Simon Glass
2011-09-23 20:09       ` Mike Frysinger
2011-09-23 20:39         ` Simon Glass
2011-09-23 20:40 ` [U-Boot] [PATCH 0/4] Buffer overruns in printf Albert ARIBAUD
2011-09-23 20:46   ` Simon Glass
2011-09-24  9:37     ` Albert ARIBAUD
2011-09-24 14:00       ` Simon Glass
2011-09-25  8:40         ` Albert ARIBAUD
2011-09-25 14:50           ` Simon Glass
2011-09-26 11:20             ` Albert ARIBAUD
2011-09-26 17:50               ` Simon Glass
2011-09-26 18:36                 ` Wolfgang Denk
2011-09-26 22:28               ` Scott Wood
2011-09-27  6:52                 ` Albert ARIBAUD
2011-10-10 19:06                   ` Simon Glass
2011-10-10 20:36                     ` Wolfgang Denk
2011-10-10 20:42                       ` Simon Glass
2011-09-25 20:04 ` Wolfgang Denk
2011-09-26 17:30   ` Simon Glass

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.