All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3 0/8] Fix CVE-2018-18440 and CVE-2018-18439
@ 2018-11-17 12:24 Simon Goldschmidt
  2018-11-17 12:24 ` [U-Boot] [PATCH v3 1/8] lib: lmb: reserving overlapping regions should fail Simon Goldschmidt
                   ` (8 more replies)
  0 siblings, 9 replies; 22+ messages in thread
From: Simon Goldschmidt @ 2018-11-17 12:24 UTC (permalink / raw)
  To: u-boot

This series fixes CVE-2018-18440 ("insufficient boundary checks in
filesystem image load") by adding restrictions to the 'load'
command and fixes CVE-2018-18439 ("insufficient boundary checks in
network image boot") by adding restrictions to the tftp code.

The functions from lmb.c are used to setup regions of allowed and
reserved memory. Then, the file size to load is checked against these
addresses and loading the file is aborted if it would overwrite
reserved memory.

The memory reservation code is reused from bootm/image.

Changes in v3:
- No patch changes, but needed to resend since patman added too many cc
  addresses that gmail seemed to detect as spam :-(

Changes in v2:
- added code to reserve devicetree reserved-memory in lmb
- added tftp fixes (patches 7 and 8)
- fixed a bug in new function lmb_alloc_addr

Simon Goldschmidt (8):
  lib: lmb: reserving overlapping regions should fail
  fdt: parse "reserved-memory" for memory reservation
  lib: lmb: extend lmb for checks at load time
  fs: prevent overwriting reserved memory
  bootm: use new common function lmb_init_and_reserve
  lmb: remove unused extern declaration
  net: remove CONFIG_MCAST_TFTP
  tftp: prevent overwriting reserved memory

 README                       |   9 --
 common/bootm.c               |   8 +-
 common/image-fdt.c           |  52 ++++++-
 drivers/net/rtl8139.c        |   9 --
 drivers/net/tsec.c           |  52 -------
 drivers/usb/gadget/ether.c   |   3 -
 fs/fs.c                      |  56 ++++++-
 include/lmb.h                |   7 +-
 include/net.h                |  17 ---
 lib/lmb.c                    |  69 +++++++++
 net/eth-uclass.c             |   4 -
 net/eth_legacy.c             |  46 ------
 net/net.c                    |   9 +-
 net/tftp.c                   | 289 +++++++----------------------------
 scripts/config_whitelist.txt |   1 -
 15 files changed, 232 insertions(+), 399 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-12-05 14:13 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-17 12:24 [U-Boot] [PATCH v3 0/8] Fix CVE-2018-18440 and CVE-2018-18439 Simon Goldschmidt
2018-11-17 12:24 ` [U-Boot] [PATCH v3 1/8] lib: lmb: reserving overlapping regions should fail Simon Goldschmidt
2018-11-17 12:24 ` [U-Boot] [PATCH v3 2/8] fdt: parse "reserved-memory" for memory reservation Simon Goldschmidt
2018-11-17 12:24 ` [U-Boot] [PATCH v3 3/8] lib: lmb: extend lmb for checks at load time Simon Goldschmidt
2018-11-17 12:25 ` [U-Boot] [PATCH v3 4/8] fs: prevent overwriting reserved memory Simon Goldschmidt
2018-11-17 12:25 ` [U-Boot] [PATCH v3 5/8] bootm: use new common function lmb_init_and_reserve Simon Goldschmidt
2018-11-17 12:25 ` [U-Boot] [PATCH v3 6/8] lmb: remove unused extern declaration Simon Goldschmidt
2018-11-17 12:25 ` [U-Boot] [PATCH v3 7/8] net: remove CONFIG_MCAST_TFTP Simon Goldschmidt
2018-11-17 16:03   ` Joe Hershberger
2018-11-17 16:48     ` Simon Goldschmidt
2018-11-17 19:18       ` Chris Packham
2018-11-17 12:25 ` [U-Boot] [PATCH v3 8/8] tftp: prevent overwriting reserved memory Simon Goldschmidt
2018-11-27  1:02 ` [U-Boot] [PATCH v3 0/8] Fix CVE-2018-18440 and CVE-2018-18439 Simon Glass
2018-11-27  5:45   ` Simon Goldschmidt
2018-12-03  7:50     ` Simon Goldschmidt
2018-12-03 18:20       ` Simon Glass
2018-12-03 19:04         ` Simon Goldschmidt
2018-12-03 23:44           ` Simon Glass
2018-12-04 11:53             ` Simon Goldschmidt
2018-12-05 13:13               ` Simon Glass
2018-12-05 13:16                 ` Simon Goldschmidt
2018-12-05 14:13                   ` 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.