public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 0/6] handle compression buffer overflows
@ 2013-08-16 14:59 Kees Cook
  2013-08-16 14:59 ` [U-Boot] [PATCH 1/6] sandbox: add compression tests Kees Cook
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Kees Cook @ 2013-08-16 14:59 UTC (permalink / raw)
  To: u-boot

v2: added acks, various suggested cleanups

This series fixes gzip, lzma, and lzo to not overflow when writing
to output buffers. Without this, it might be possible for untrusted
compressed input to overflow the buffers used to hold the decompressed
image.

To catch these conditions, I added a series of compression tests available
in the sandbox build. Without the fixes in patches 3, 4, and 5, the
overflows are visible.

Thanks,

-Kees

Kees Cook (6):
      sandbox: add compression tests
      documentation: add more compression configs
      gzip: correctly bounds-check output buffer
      lzma: correctly bounds-check output buffer
      lzo: correctly bounds-check output buffer
      bootm: allow correct bounds-check of destination

 README                     |    9 ++
 common/cmd_bootm.c         |    2 +-
 include/configs/sandbox.h  |    5 +
 lib/gunzip.c               |    4 +-
 lib/lzma/LzmaTools.c       |    8 +-
 lib/lzo/lzo1x_decompress.c |    8 +-
 test/Makefile              |    1 +
 test/compression.c         |  335 ++++++++++++++++++++++++++++++++++++++++++++
 8 files changed, 366 insertions(+), 6 deletions(-)
 create mode 100644 test/compression.c

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [U-Boot] [PATCH 0/6] handle compression buffer overflows
@ 2013-08-12 23:01 Kees Cook
  2013-08-12 23:02 ` [U-Boot] [PATCH 3/6] gzip: correctly bounds-check output buffer Kees Cook
  0 siblings, 1 reply; 17+ messages in thread
From: Kees Cook @ 2013-08-12 23:01 UTC (permalink / raw)
  To: u-boot

[sending, now subscribed so mailman won't yell at me]

This series fixes gzip, lzma, and lzo to not overflow when writing
to output buffers. Without this, it might be possible for untrusted
compressed input to overflow the buffers used to hold the decompressed
image.

To catch these conditions, I added a series of compression tests available
in the sandbox build. Without the fixes in patches 3, 4, and 5, the
overflows are visible.

Thanks,

-Kees

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

end of thread, other threads:[~2013-11-08 15:50 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-16 14:59 [U-Boot] [PATCH v2 0/6] handle compression buffer overflows Kees Cook
2013-08-16 14:59 ` [U-Boot] [PATCH 1/6] sandbox: add compression tests Kees Cook
2013-08-19 17:11   ` Simon Glass
2013-08-16 14:59 ` [U-Boot] [PATCH 2/6] documentation: add more compression configs Kees Cook
2013-08-19 17:12   ` Simon Glass
2013-08-16 14:59 ` [U-Boot] [PATCH 3/6] gzip: correctly bounds-check output buffer Kees Cook
2013-11-08 12:04   ` Michal Simek
2013-11-08 15:21     ` Kees Cook
2013-11-08 15:40       ` Michal Simek
2013-11-08 15:50         ` Michal Simek
2013-08-16 14:59 ` [U-Boot] [PATCH 4/6] lzma: " Kees Cook
2013-08-16 14:59 ` [U-Boot] [PATCH 5/6] lzo: " Kees Cook
2013-08-16 14:59 ` [U-Boot] [PATCH 6/6] bootm: allow correct bounds-check of destination Kees Cook
2013-08-28 18:13 ` [U-Boot] [PATCH v2 0/6] handle compression buffer overflows Kees Cook
2013-08-28 23:27   ` Simon Glass
  -- strict thread matches above, loose matches on Subject: below --
2013-08-12 23:01 [U-Boot] [PATCH " Kees Cook
2013-08-12 23:02 ` [U-Boot] [PATCH 3/6] gzip: correctly bounds-check output buffer Kees Cook
2013-08-14 17:37   ` Simon Glass

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