uboot/tools
Michal Simek ebe0f53f48 tools: mkimage: Use fstat instead of stat to avoid malicious hacks
The patch is fixing:
"tools: mkimage: Check if file is regular file"
(sha1: 56c7e80155)
which contains two issues reported by Coverity
Unchecked return value from stat and incorrect calling sequence where
attack can happen between calling stat and fopen.
Using pair in opposite order (fopen and fstat) is fixing this issue
because fstat is using the same file descriptor (FILE *).

Also fixing issue with:
"tools: mkimage: Add support for initialization table for Zynq and
ZynqMP" (sha1: 3b6460809c)
where file wasn't checked that it is regular file.

Reported-by: Coverity (CID: 154711, 154712)
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2016-12-09 08:40:23 -05:00
..
buildman buildman: Rename do_build to config_only 2016-12-02 20:53:18 -07:00
dtoc dtoc: Make integer division python 3.x safe 2016-10-09 09:30:32 -06:00
easylogo
env tools/env: fix environment alignment tests for block devices 2016-11-28 15:10:36 -05:00
gdb
kermit
logos imx: ventana: enable splashscreen support 2016-09-06 18:22:48 +02:00
omap
patman patman: Fix doctest StringIO import for python 3.x 2016-10-09 09:30:32 -06:00
scripts
tbot
.gitignore
Makefile tools/Makefile: suppress "which swig" error output 2016-11-28 15:10:35 -05:00
aisimage.c
aisimage.h
atmel_pmecc_params.c
atmelimage.c
bin2header.c
bmp_logo.c
default_image.c
dumpimage.c
dumpimage.h
envcrc.c tools/env: Correct include kconfig 2016-11-23 23:41:23 -08:00
fdt_host.h
fdtgrep.c Various, accumulated typos collected from around the tree. 2016-10-06 20:57:40 -04:00
fit_check_sign.c
fit_common.c
fit_common.h
fit_image.c mkimage: Allow including a ramdisk in FIT auto mode 2016-11-06 07:33:42 -05:00
fit_info.c
gen_eth_addr.c
genboardscfg.py
getline.c
getline.h
gpheader.h
gpimage-common.c
gpimage.c
ifdtool.c
ifdtool.h
image-host.c image: Combine image_sig_algo with image_sign_info 2016-11-21 14:07:31 -05:00
imagetool.c
imagetool.h mkimage: Allow including a ramdisk in FIT auto mode 2016-11-06 07:33:42 -05:00
img2brec.sh
img2srec.c
imximage.c tools: imximage: display DCD block offset, length 2016-11-29 16:37:37 +01:00
imximage.h tools: imximage: add plugin support 2016-10-24 10:57:16 +02:00
jtagconsole
kwbimage.c tools/kwbimage: add DEBUG option 2016-12-01 09:10:49 +01:00
kwbimage.h tools/kwbimage: add DEBUG option 2016-12-01 09:10:49 +01:00
kwboot.c tools: kwboot: patch destaddr only for SoCs with header version 1 2016-08-26 08:42:50 +02:00
lpc32xximage.c
microcode-tool
microcode-tool.py
mingw_support.c
mingw_support.h
mkenvimage.c
mkexynosspl.c
mkimage.c mkimage: Allow including a ramdisk in FIT auto mode 2016-11-06 07:33:42 -05:00
mkimage.h
mksunxiboot.c tools: add mksunxiboot to tools-all target 2016-10-30 11:38:04 +01:00
moveconfig.py tools: moveconfig: support wildcards in --defconfigs file 2016-10-24 08:04:42 -04:00
mxsboot.c
mxsimage.c
mxsimage.h
ncb.c
netconsole
omapimage.c
omapimage.h
os_support.c
os_support.h
pbl_crc32.c
pbl_crc32.h
pblimage.c pbl: use "wait" command instead of "flush" command 2016-10-14 10:21:30 -07:00
pblimage.h
proftool.c
relocate-rela.c
rkcommon.c mkimage: rockchip: add suport for rk33 serial 2016-07-25 20:46:45 -06:00
rkcommon.h
rkimage.c
rkmux.py
rksd.c
rkspi.c
socfpgaimage.c
ublimage.c
ublimage.h
ubsha1.c
vybridimage.c tools: mkimage: add support for Vybrid image format 2016-10-06 09:06:16 +02:00
xway-swap-bytes.c
zynqimage.c tools: mkimage: Use fstat instead of stat to avoid malicious hacks 2016-12-09 08:40:23 -05:00
zynqmpimage.c tools: mkimage: Use fstat instead of stat to avoid malicious hacks 2016-12-09 08:40:23 -05:00