Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CFE_TBL_DUMP_CC can overwrite .so in /cf/ #2640

Open
junfuture1103 opened this issue Feb 23, 2025 · 0 comments
Open

CFE_TBL_DUMP_CC can overwrite .so in /cf/ #2640

junfuture1103 opened this issue Feb 23, 2025 · 0 comments

Comments

@junfuture1103
Copy link

junfuture1103 commented Feb 23, 2025

Describe the bug
CFE_TBL_DUMP_CC can overwrite a .so file inside /cf/. If the currently running APP overwrites the .so file that it is using by some App with the TABLE_DUMP content, a Bus Error occurs.

To Reproduce
Steps to reproduce the behavior:

  1. CFE_ES_QUERY_ALL_CC with parameter
    a. query_all
  2. check loaded Table in the cFS (check /dev/shm/osal:RAM/query_all)
  3. send CFE_TBL_DUMP_CC Command with parameter
    a.1
    b.SAMPLE_APP.ExampleTable (or Any Table in the cFS Process that can check at 2.)
    c./cf/ci_lab.so (or Any .so file name in /cf/)
  4. Bus error

Expected behavior
When performing a Table Dump using the CFE_TBL_DUMP_CC command, it should be prevented from overwriting .so files inside /cf/ that are currently being used by the App.

Code snips
I can check below log at the every .so case (SAMPLE_APP / to_lab / ci_lab)

Thread 13 "CI_LAB_APP" received signal SIGBUS, Bus error.
[Switching to Thread 0x7ffff7b42700 (LWP 118401)]
BFD: error: ./cf/ci_lab.so(.eh_frame) section size (0x284 bytes) is larger than file size (0x78 bytes)
warning: Can't read data for section '.eh_frame' in file './cf/ci_lab.so'
0x00007ffff7b4568f in CI_LAB_AppMain ()
    at /home/jun/jun/cFS/apps/ci_lab/fsw/src/ci_lab_app.c:68

Image

System observed on:

Additional context
You can check the POC video here :
https://youtu.be/xA_9MAgPUAM

Reporter Info
Junhak Lee(juntheworld) - KAIST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant