FileX integrity support

Juan Francisco 21 Reputation points
2022-11-10T07:47:01.22+00:00

Hello,

We are currently using FileX to create log files and store device information and would like to know if there is any way to detect integrity modifications of the files. We tried to enable the macro FX_ENABLE_FAULT_TOLERANT and make use of fx_fault_tolerant_enable prior to fx_media_open but we were able to alter some data of the file system by doing the following::

  • Compile our code and obtain hex file (FileX is stored on external NOR flash)
  • Flash the device
  • Read device's flash memory (we use JFlash)
  • Locate a file within FileX address space
  • Modify its content
  • Generate binary file with modified data
  • Overwrite device's flash memory with modified binary

After boot, we can see the modified file is indeed modified and no error occurred.

*Note: filesystem is running on a NXP MCU RT1050 and compiler is IAR

Q1. Are we doing something wrong?
Q2. Does FileX support integrity check over the content of the files?

Thanks in advance

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
383 questions
Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
324 questions
{count} votes

Accepted answer
  1. Xiuwen Cai 366 Reputation points Microsoft Employee
    2022-11-23T12:02:18.023+00:00

    @Juan Francisco FileX Fault Tolerant Module is designed to prevent file system corruption caused by interruption during write operations. But FileX does not check integrity of the file content.


1 additional answer

Sort by: Most helpful
  1. Bhupendra Naphade 91 Reputation points Microsoft Employee
    2022-11-21T16:15:27.643+00:00

    Did you use fx_media_format for the first time using fault tolerant? If not, please try it.
    Also try calling fx_fault_tolerant_enable() after the fx_media_open() and make sure the buffers used by fx_media_open and fx_fault_tolerant_enable are different.

    0 comments No comments