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

Brandon Maier brandon.maier at collins.com
Wed Nov 2 15:47:50 PDT 2022


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(-)

-- 
2.38.1




More information about the linux-mtd mailing list