patacongo commented on issue #3011:
URL: 
https://github.com/apache/incubator-nuttx/issues/3011#issuecomment-793935679


   I don't generally find these commands useful very often.  But when needed 
they are nice to have.
   
   These are controlled by configuration options CONFIG_NSH_DISABLE_MH, 
CONFIG_NSH_DISABLE_MB, and CONFIG_NSH_DISABLE_MW.  The default value is 'n' 
meaning enabled (not disabled).
   
   I think that changing the default to 'y' (disabled) might be a good idea 
especially since the commands are not usually useful.  Perrhaps adding some 
comments to the Kconfig file would be good too.
   
   The FLAT build mode was never intended to be secure.  Anyone who is using 
the FLAT build mode has opened their system up to anyone who has physical 
possession of the hardware.  Changing these commands does not provide any 
additional security.
   
   If you want better security, then you should be using the PROTECTED mode 
when does give you security even if someone has possession of the hardware (at 
least provided that the hardware provides proper FLASH security).  PROTECTED 
mode is the solution for security; FLAT is for no security but simpler logic.
   
   NOTE 1:  In protected mode, the MB, MH, and MW commands *cannot* be used to 
peek into secure kernel memory.  If you attempt that in the PROTECTED build, 
you will get a memory fault.  You can still look at memory inside the 
unprotected application blob (which is almost never useful).
   
   NOTE 2:  There are a few security holes known in PROTECTED mode as well.  
These are all documented as Issues tagged with "Security"


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to