mbox series

[mtd-utils,0/7] misc-utils: flashcp: Bugfixes to --partition

Message ID 20221102224757.58012-1-brandon.maier@collins.com
Headers show
Series misc-utils: flashcp: Bugfixes to --partition | expand

Message

Brandon Maier Nov. 2, 2022, 10:47 p.m. UTC
Discovered an assortment of issues with the flashcp --partition code:
- not checking lseek() for errors
- overflowing the src and dest buffers
- not verifying data is written succesfully
- silently ignoring --erase-all

The patches "add safe_*" and "simplify logging" do not fix bugs but are
code cleanup.

Brandon Maier (7):
  misc-utils: flashcp: add safe_write
  misc-utils: flashcp: check for lseek errors
  misc-utils: flashcp: add safe_memerase
  misc-utils: flashcp: simplify logging
  misc-utils: flashcp: fix buffer overflow
  misc-utils: flashcp: verify data in --partition
  misc-utils: flashcp: abort on --partition and --erase-all

 misc-utils/flashcp.c | 284 +++++++++++++++++++++----------------------
 1 file changed, 138 insertions(+), 146 deletions(-)

Comments

David Oberhollenzer Nov. 9, 2022, 7:39 p.m. UTC | #1
Applied to mtd-utils.git master.

Thanks,

David