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

Failed to detect the missing type checks #1

Open
citypw opened this issue Sep 23, 2024 · 6 comments
Open

Failed to detect the missing type checks #1

citypw opened this issue Sep 23, 2024 · 6 comments

Comments

@citypw
Copy link

citypw commented Sep 23, 2024

Hello GC maintainers, I've removed all type check in a TA and try to test if GC can detect the check was missing but it seem thing went wrong. Have you guys done the test on DWARF v5 that was supported not long ago in Ghidra?

openjdk version "18.0.2-ea" 2022-07-19
OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode)
INFO  Using log config file: jar:file:/ghidra/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)  
INFO  Using log file: /root/.ghidra/.ghidra_10.4_PUBLIC/application.log (LoggingInitialization)  
INFO  Loading user preferences: /root/.ghidra/.ghidra_10.4_PUBLIC/preferences (Preferences)  
INFO  Searching for classes... (ClassSearcher)  
INFO  Class search complete (757 ms) (ClassSearcher)  
INFO  Initializing SSL Context (SSLContextInitializer)  
INFO  Initializing Random Number Generator... (SecureRandomFactory)  
INFO  Random Number Generator initialization complete: NativePRNGNonBlocking (SecureRandomFactory)  
INFO  Trust manager disabled, cacerts have not been set (ApplicationTrustManagerFactory)  
INFO  HEADLESS Script Paths:
    /root/.ghidra/.ghidra_10.4_PUBLIC/Extensions/mclf-loader/ghidra_scripts
    /ghidra/Ghidra/Features/Decompiler/ghidra_scripts
    /ghidra/Ghidra/Features/Base/ghidra_scripts
    /ghidra/Ghidra/Features/BytePatterns/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger-rmi-trace/ghidra_scripts
    /ghidra/Ghidra/Processors/8051/ghidra_scripts
    /ghidra/Ghidra/Features/Python/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger/ghidra_scripts
    /ghidra/Ghidra/Features/FileFormats/ghidra_scripts
    /ghidra/Ghidra/Processors/PIC/ghidra_scripts
    /ghidra/Ghidra/Features/SystemEmulation/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger-agent-frida/ghidra_scripts
    /ghidra/Ghidra/Processors/DATA/ghidra_scripts
    /root/.ghidra/.ghidra_10.4_PUBLIC/Extensions/ghidrathon/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger-agent-dbgmodel-traceloader/ghidra_scripts
    /ghidra/Ghidra/Features/VersionTracking/ghidra_scripts
    /ghidra/Ghidra/Features/PDB/ghidra_scripts
    /src/ghidra_scripts
    /ghidra/Ghidra/Processors/Atmel/ghidra_scripts
    /ghidra/Ghidra/Features/FunctionID/ghidra_scripts
    /ghidra/Ghidra/Processors/JVM/ghidra_scripts
    /ghidra/Ghidra/Features/GnuDemangler/ghidra_scripts
    /ghidra/Ghidra/Features/MicrosoftCodeAnalyzer/ghidra_scripts (HeadlessAnalyzer)  
INFO  HEADLESS: execution starts (HeadlessAnalyzer)  
INFO  Creating project: /tmp/ghidraproj/SharingCaringTmpProj (HeadlessAnalyzer)  
INFO  Creating project: /tmp/ghidraproj/SharingCaringTmpProj (DefaultProject)  
INFO  REPORT: Processing input files:  (HeadlessAnalyzer)  
INFO       project: /tmp/ghidraproj/SharingCaringTmpProj (HeadlessAnalyzer)  
INFO  IMPORTING: /data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  Starting cache cleanup: /tmp/root-Ghidra/fscache2 (FileCacheMaintenanceDaemon)  
INFO  Finished cache cleanup, estimated storage used: 0 (FileCacheMaintenanceDaemon)  
WARN  149 NOP constructors found (SleighCompile)  
WARN  Use -n switch to list each individually (SleighCompile)  
WARN  1 operations wrote to temporaries that were not read (SleighCompile)  
WARN  Use -t switch to list each individually (SleighCompile)  
INFO  Using Loader: Executable and Linking Format (ELF) (AutoImporter)  
INFO  Using Language/Compiler: AARCH64:LE:64:v8A:default (AutoImporter)  
INFO  IMPORTING: Loaded 0 additional files (HeadlessAnalyzer)  
INFO  SCRIPT: /src/ghidra_scripts/FunctionIDHeadlessPrescript.java (HeadlessAnalyzer)  
INFO  ANALYZING all memory and code: /data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
ERROR Error during DWARFAnalyzer import:  (DWARFAnalyzer) ghidra.app.util.bin.format.dwarf4.DWARFException: Only DWARF version 2, 3, or 4 information is currently supported (detected 5).
	at ghidra.app.util.bin.format.dwarf4.DWARFCompilationUnit.readCompilationUnit(DWARFCompilationUnit.java:155)
	at ghidra.app.util.bin.format.dwarf4.next.DWARFProgram.bootstrapCompilationUnits(DWARFProgram.java:618)
	at ghidra.app.util.bin.format.dwarf4.next.DWARFProgram.<init>(DWARFProgram.java:259)
	at ghidra.app.plugin.core.analysis.DWARFAnalyzer.added(DWARFAnalyzer.java:190)
	at ghidra.app.plugin.core.analysis.AnalysisScheduler.runAnalyzer(AnalysisScheduler.java:186)
	at ghidra.app.plugin.core.analysis.AnalysisTask.applyTo(AnalysisTask.java:39)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisTaskWrapper.run(AutoAnalysisManager.java:686)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:786)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:665)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:630)
	at ghidra.app.util.headless.HeadlessAnalyzer.analyzeProgram(HeadlessAnalyzer.java:1019)
	at ghidra.app.util.headless.HeadlessAnalyzer.processFileWithImport(HeadlessAnalyzer.java:1544)
	at ghidra.app.util.headless.HeadlessAnalyzer.processWithImport(HeadlessAnalyzer.java:1661)
	at ghidra.app.util.headless.HeadlessAnalyzer.processWithImport(HeadlessAnalyzer.java:1726)
	at ghidra.app.util.headless.HeadlessAnalyzer.processLocal(HeadlessAnalyzer.java:448)
	at ghidra.app.util.headless.AnalyzeHeadless.launch(AnalyzeHeadless.java:127)
	at ghidra.GhidraLauncher.launch(GhidraLauncher.java:78)
	at ghidra.Ghidra.main(Ghidra.java:54)
 
INFO  Packed database cache: /tmp/root-Ghidra/packed-db-cache (PackedDatabaseCache)  
WARN  258 NOP constructors found (SleighCompile)  
WARN  Use -n switch to list each individually (SleighCompile)  
WARN  ia.sinc:677: Table 'pcRelSimm32' exports size 0 (SleighCompile)  
WARN  180 unnecessary extensions/truncations were converted to copies (SleighCompile)  
WARN  Use -u switch to list each individually (SleighCompile)  
WARN  13 operations wrote to temporaries that were not read (SleighCompile)  
WARN  Use -t switch to list each individually (SleighCompile)  
WARN  ia.sinc:660: Unreferenced table: 'imm32_64' (SleighCompile)  
INFO  Applied data type archive: generic_clib_64 (ApplyDataArchiveAnalyzer)  
INFO  -----------------------------------------------------
    AARCH64 ELF PLT Thunks                     0.000 secs
    ASCII Strings                              0.158 secs
    Apply Data Archives                        2.785 secs
    Basic Constant Reference Analyzer          0.917 secs
    Call Convention ID                         0.164 secs
    Call-Fixup Installer                       0.004 secs
    Create Address Tables                      0.020 secs
    Create Address Tables - One Time           0.005 secs
    Create Function                            0.000 secs
    DWARF                                      0.016 secs
    Data Reference                             0.020 secs
    Decompiler Switch Analysis                 0.286 secs
    Demangler GNU                              0.023 secs
    Disassemble Entry Points                   0.589 secs
    Embedded Media                             0.013 secs
    External Entry References                  0.002 secs
    Function Start Search                      0.031 secs
    Function Start Search After Code           0.014 secs
    Function Start Search After Data           0.017 secs
    GCC Exception Handlers                     0.152 secs
    Non-Returning Functions - Known            0.004 secs
    Reference                                  0.027 secs
    Shared Return Calls                        0.029 secs
    Stack                                      1.114 secs
    Subroutine References                      0.014 secs
-----------------------------------------------------
     Total Time   6 secs
-----------------------------------------------------
 (AutoAnalysisManager)  
INFO  REPORT: Analysis succeeded for file: /data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  SCRIPT: /src/ghidra_scripts/tipi.py (HeadlessAnalyzer)  
INFO  Addings configuration to user settings at /root/.ghidra/.ghidra_10.4_PUBLIC/GhidrathonConfig.xml (GhidrathonUtils)  
2024-09-23:14:58:25,987 INFO     Initializing...
2024-09-23:14:58:25,988 INFO     args.tee: optee
2024-09-23:14:58:26,19 DEBUG    Starting analysis of TA_InvokeCommandEntryPoint@00100970
2024-09-23:14:58:26,40 DEBUG    descendants: ItemsView(NodeView((15, <ghidra.program.model.pcode.SequenceNumber object at 0x752ff4a61450>, <ghidra.program.model.pcode.SequenceNumber object at 0x752ff4a61630>)))
2024-09-23:14:58:26,40 DEBUG    (ram, 0x100978, 3, 2): (register, 0x4000, 4) CALL (ram, 0x1055c8, 8) , (register, 0x4000, 4) , (register, 0x4008, 4) , (register, 0x4010, 4) , (register, 0x4018, 8) , (unique, 0x10000009, 8)
2024-09-23:14:58:26,40 INFO     `param_types` passed to __ta_invoke_cmd at idx 2
2024-09-23:14:58:26,40 DEBUG    (ram, 0x100978, 4, 3):  ---  RETURN (const, 0x0, 8) , (register, 0x4000, 4)
2024-09-23:14:58:26,40 DEBUG    checker nodes: []
2024-09-23:14:58:26,40 DEBUG    caller nodes: [(<ghidra.program.model.pcode.PcodeOpAST object at 0x752ff4a614b0>, <ghidra.program.database.function.FunctionDB object at 0x752ff4a60cd0>, 2)]
`params` passed to __ta_invoke_cmd at arg idx 3
global_offset: 0
2024-09-23:14:58:26,50 INFO     animator for param_idx 0
2024-09-23:14:58:26,50 INFO     checkers: []
2024-09-23:14:58:26,50 INFO     derefs: []
2024-09-23:14:58:26,51 INFO     0x100970 path: ['0x100970']
2024-09-23:14:58:26,51 WARNING  Func __ta_invoke_cmd does not consume arg at idx 2
2024-09-23:14:58:26,51 INFO     0x100970 path: ['0x100970']
2024-09-23:14:58:26,51 WARNING  Func __ta_invoke_cmd does not consume arg at idx 3
2024-09-23:14:58:26,63 DEBUG    Starting analysis of __ta_invoke_cmd@001055c8
2024-09-23:14:58:26,66 DEBUG    checker nodes: []
2024-09-23:14:58:26,66 DEBUG    caller nodes: []
2024-09-23:14:58:26,66 INFO     checkers: []
2024-09-23:14:58:26,66 INFO     derefs: []
2024-09-23:14:58:26,94 INFO     {'ghidra_start': 1727103490, 'decomp_finish': 1727103505, 'gp_detect': 1727103505, 'TA_InvokeCommandEntryPoint': {'desc': {'result': 1, 'desc': 'no check, no memref found'}, 'children': {'__ta_invoke_cmd': {'desc': {'result': 1, 'desc': 'no check, no memref found'}, 'children': {}}}}, 'is_vuln': False, 'analyze_func': 1727103506}
INFO  ANALYZING changes made by post scripts: /data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  REPORT: Post-analysis succeeded for file: /data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  REPORT: Save succeeded for: /f4e750bb-1437-4fbf-8785-8d3580c34994.elf (SharingCaringTmpProj:/f4e750bb-1437-4fbf-8785-8d3580c34994.elf) (HeadlessAnalyzer)  
INFO  REPORT: Import succeeded (HeadlessAnalyzer)  
@0ddc0de
Copy link
Collaborator

0ddc0de commented Sep 24, 2024

Hi @citypw, we did not encouter any DWARF v5 errors yet. But, maybe you want to upgrade the Ghidra version in our Dockerfile (pull requests welcome ;)).

From the output I cannot really see what your TA is doing. Note that the TA is only considered vulnerable if the check is missing AND one of the params is used as a memref.

@citypw
Copy link
Author

citypw commented Sep 24, 2024

@0ddc0de DWARF v5 is merged in Ghidra v11.1.2:

NationalSecurityAgency/ghidra@44eedbe

GC is failed to build with Ghidra v11.x.x:

[+] Creating 1/0
 ✔ Network globalconfusion_default  Created                                                                                                                                                      0.1s 
f4e750bb-1437-4fbf-8785-8d3580c34994.elf optee 600
openjdk version "18.0.2-ea" 2022-07-19
OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode)
INFO  Using log config file: jar:file:/ghidra/Ghidra/Framework/Generic/lib/Generic.jar!/generic.log4j.xml (LoggingInitialization)  
INFO  Using log file: /root/.ghidra/.ghidra_11.0_PUBLIC/application.log (LoggingInitialization)  
INFO  Loading user preferences: /root/.ghidra/.ghidra_11.0_PUBLIC/preferences (Preferences)  
INFO  Searching for classes... (ClassSearcher)  
INFO  Class search complete (777 ms) (ClassSearcher)  
INFO  Initializing SSL Context (SSLContextInitializer)  
INFO  Initializing Random Number Generator... (SecureRandomFactory)  
INFO  Random Number Generator initialization complete: NativePRNGNonBlocking (SecureRandomFactory)  
INFO  Trust manager disabled, cacerts have not been set (ApplicationTrustManagerFactory)  
INFO  Starting cache cleanup: /tmp/root-Ghidra/fscache2 (FileCacheMaintenanceDaemon)  
INFO  Finished cache cleanup, estimated storage used: 0 (FileCacheMaintenanceDaemon)  
INFO  HEADLESS Script Paths:
    /ghidra/Ghidra/Features/Base/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger-rmi-trace/ghidra_scripts
    /ghidra/Ghidra/Processors/8051/ghidra_scripts
    /ghidra/Ghidra/Features/BSim/ghidra_scripts
    /ghidra/Ghidra/Features/Python/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger/ghidra_scripts
    /ghidra/Ghidra/Features/FileFormats/ghidra_scripts
    /ghidra/Ghidra/Processors/PIC/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger-agent-frida/ghidra_scripts
    /ghidra/Ghidra/Processors/DATA/ghidra_scripts
    /root/.ghidra/.ghidra_11.0_PUBLIC/Extensions/ghidrathon/ghidra_scripts
    /ghidra/Ghidra/Debug/Debugger-agent-dbgmodel-traceloader/ghidra_scripts
    /ghidra/Ghidra/Features/VersionTracking/ghidra_scripts
    /ghidra/Ghidra/Features/PDB/ghidra_scripts
    /ghidra/Ghidra/Processors/Atmel/ghidra_scripts
    /ghidra/Ghidra/Features/FunctionID/ghidra_scripts
    /ghidra/Ghidra/Processors/JVM/ghidra_scripts
    /ghidra/Ghidra/Features/GnuDemangler/ghidra_scripts
    /root/.ghidra/.ghidra_11.0_PUBLIC/Extensions/mclf-loader/ghidra_scripts
    /ghidra/Ghidra/Features/Decompiler/ghidra_scripts
    /ghidra/Ghidra/Features/BytePatterns/ghidra_scripts
    /ghidra/Ghidra/Features/SystemEmulation/ghidra_scripts
    /src/ghidra_scripts
    /ghidra/Ghidra/Features/MicrosoftCodeAnalyzer/ghidra_scripts (HeadlessAnalyzer)  
INFO  HEADLESS: execution starts (HeadlessAnalyzer)  
INFO  Creating project: /tmp/ghidraproj/SharingCaringTmpProj (HeadlessAnalyzer)  
INFO  Creating project: /tmp/ghidraproj/SharingCaringTmpProj (DefaultProject)  
INFO  REPORT: Processing input files:  (HeadlessAnalyzer)  
INFO       project: /tmp/ghidraproj/SharingCaringTmpProj (HeadlessAnalyzer)  
INFO  IMPORTING: file:///data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
WARN  149 NOP constructors found (SleighCompile)  
WARN  Use -n switch to list each individually (SleighCompile)  
WARN  1 operations wrote to temporaries that were not read (SleighCompile)  
WARN  Use -t switch to list each individually (SleighCompile)  
INFO  Using Loader: Executable and Linking Format (ELF) (AutoImporter)  
INFO  Using Language/Compiler: AARCH64:LE:64:v8A:default (AutoImporter)  
INFO  IMPORTING: Loaded 0 additional files (HeadlessAnalyzer)  
INFO  SCRIPT: /ghidra/Ghidra/Features/FunctionID/ghidra_scripts/FunctionIDHeadlessPrescript.java (HeadlessAnalyzer)  
INFO  ANALYZING all memory and code: file:///data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
ERROR Error during DWARFAnalyzer import:  (DWARFAnalyzer) ghidra.app.util.bin.format.dwarf4.DWARFException: Only DWARF version 2, 3, or 4 information is currently supported (detected 5).
	at ghidra.app.util.bin.format.dwarf4.DWARFCompilationUnit.readCompilationUnit(DWARFCompilationUnit.java:155)
	at ghidra.app.util.bin.format.dwarf4.next.DWARFProgram.bootstrapCompilationUnits(DWARFProgram.java:629)
	at ghidra.app.util.bin.format.dwarf4.next.DWARFProgram.<init>(DWARFProgram.java:262)
	at ghidra.app.plugin.core.analysis.DWARFAnalyzer.added(DWARFAnalyzer.java:109)
	at ghidra.app.plugin.core.analysis.AnalysisScheduler.runAnalyzer(AnalysisScheduler.java:186)
	at ghidra.app.plugin.core.analysis.AnalysisTask.applyTo(AnalysisTask.java:39)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager$AnalysisTaskWrapper.run(AutoAnalysisManager.java:686)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:786)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:665)
	at ghidra.app.plugin.core.analysis.AutoAnalysisManager.startAnalysis(AutoAnalysisManager.java:630)
	at ghidra.app.util.headless.HeadlessAnalyzer.analyzeProgram(HeadlessAnalyzer.java:1027)
	at ghidra.app.util.headless.HeadlessAnalyzer.processFileWithImport(HeadlessAnalyzer.java:1550)
	at ghidra.app.util.headless.HeadlessAnalyzer.processWithLoader(HeadlessAnalyzer.java:1732)
	at ghidra.app.util.headless.HeadlessAnalyzer.processWithImport(HeadlessAnalyzer.java:1673)
	at ghidra.app.util.headless.HeadlessAnalyzer.processWithImport(HeadlessAnalyzer.java:1757)
	at ghidra.app.util.headless.HeadlessAnalyzer.processLocal(HeadlessAnalyzer.java:458)
	at ghidra.app.util.headless.AnalyzeHeadless.launch(AnalyzeHeadless.java:127)
	at ghidra.GhidraLauncher.launch(GhidraLauncher.java:78)
	at ghidra.Ghidra.main(Ghidra.java:54)
 
INFO  Packed database cache: /tmp/root-Ghidra/packed-db-cache (PackedDatabaseCache)  
WARN  258 NOP constructors found (SleighCompile)  
WARN  Use -n switch to list each individually (SleighCompile)  
WARN  ia.sinc:679: Table 'pcRelSimm32' exports size 0 (SleighCompile)  
WARN  180 unnecessary extensions/truncations were converted to copies (SleighCompile)  
WARN  Use -u switch to list each individually (SleighCompile)  
WARN  13 operations wrote to temporaries that were not read (SleighCompile)  
WARN  Use -t switch to list each individually (SleighCompile)  
WARN  ia.sinc:662: Unreferenced table: 'imm32_64' (SleighCompile)  
INFO  Applied data type archive: generic_clib_64 (ApplyDataArchiveAnalyzer)  
INFO  -----------------------------------------------------
    AARCH64 ELF PLT Thunks                     0.000 secs
    ASCII Strings                              0.189 secs
    Apply Data Archives                        2.745 secs
    Basic Constant Reference Analyzer          0.950 secs
    Call Convention ID                         0.179 secs
    Call-Fixup Installer                       0.004 secs
    Create Address Tables                      0.025 secs
    Create Address Tables - One Time           0.005 secs
    Create Function                            0.000 secs
    DWARF                                      0.029 secs
    Data Reference                             0.027 secs
    Decompiler Switch Analysis                 0.345 secs
    Disassemble Entry Points                   0.582 secs
    Embedded Media                             0.013 secs
    External Entry References                  0.002 secs
    Function Start Search                      0.034 secs
    Function Start Search After Code           0.014 secs
    Function Start Search After Data           0.017 secs
    GCC Exception Handlers                     0.181 secs
    Non-Returning Functions - Discovered       0.046 secs
    Non-Returning Functions - Known            0.047 secs
    Reference                                  0.031 secs
    Shared Return Calls                        0.034 secs
    Stack                                      0.967 secs
    Subroutine References                      0.018 secs
-----------------------------------------------------
     Total Time   6 secs
-----------------------------------------------------
 (AutoAnalysisManager)  
INFO  REPORT: Analysis succeeded for file: file:///data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  SCRIPT: /src/ghidra_scripts/tipi.py (HeadlessAnalyzer)  
INFO  Addings configuration to user settings at /root/.ghidra/.ghidra_11.0_PUBLIC/GhidrathonConfig.xml (GhidrathonUtils)  
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/jep/java_import_hook.py", line 45, in __getattr__
    return super(module, self).__getattribute__(name)
AttributeError: module 'ghidra.app.util' has no attribute 'DisplayableEol'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/.ghidra/.ghidra_11.0_PUBLIC/Extensions/ghidrathon/data/python/jeprunscript.py", line 31, in jep_runscript
    exec(compile(source, path, "exec"), {**globals(), **additional_globals})
  File "/src/ghidra_scripts/tipi.py", line 11, in <module>
    from gpdetect import detect_less_dumb
  File "/src/ghidra_scripts/gpdetect.py", line 3, in <module>
    from ghidra.app.util import DisplayableEol
  File "/usr/local/lib/python3.10/dist-packages/jep/java_import_hook.py", line 57, in __getattr__
    clazz = forName('{0}.{1}'.format(self.__name__, name))
ImportError: java.lang.ClassNotFoundException: ghidra.app.util.DisplayableEol
INFO  ANALYZING changes made by post scripts: file:///data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  REPORT: Post-analysis succeeded for file: file:///data/new/f4e750bb-1437-4fbf-8785-8d3580c34994.elf (HeadlessAnalyzer)  
INFO  REPORT: Save succeeded for: /f4e750bb-1437-4fbf-8785-8d3580c34994.elf (SharingCaringTmpProj:/f4e750bb-1437-4fbf-8785-8d3580c34994.elf) (HeadlessAnalyzer)  
INFO  REPORT: Import succeeded (HeadlessAnalyzer)  

The latest versions of Ghidra and Ghidrathon are failed to build due to something went wrong with JEP:

[+] Building 282.4s (26/31)                                                                                                                                                            docker:default
 => [ghidrathon-headless internal] load build definition from Dockerfile                                                                                                                         0.0s
 => => transferring dockerfile: 4.32kB                                                                                                                                                           0.0s
 => [ghidrathon-headless internal] load .dockerignore                                                                                                                                            0.0s
 => => transferring context: 2B                                                                                                                                                                  0.0s
 => [tipi internal] load build definition from Dockerfile                                                                                                                                        0.0s
 => => transferring dockerfile: 4.32kB                                                                                                                                                           0.0s
 => [tipi internal] load .dockerignore                                                                                                                                                           0.0s
 => => transferring context: 2B                                                                                                                                                                  0.0s
 => [tipi] resolve image config for docker.io/docker/dockerfile:latest                                                                                                                           1.4s
 => [tipi] docker-image://docker.io/docker/dockerfile:latest@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5                                                             1.2s
 => => resolve docker.io/docker/dockerfile:latest@sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5                                                                        0.0s
 => => sha256:1e45ed8b8be3fcf5baec105c530196be8d0b853893e209e4adf6c0e925079ff0 12.49MB / 12.49MB                                                                                                 1.0s
 => => sha256:865e5dd094beca432e8c0a1d5e1c465db5f998dca4e439981029b3b81fb39ed5 8.40kB / 8.40kB                                                                                                   0.0s
 => => sha256:e3171ba32039ebf6fef09a7cbe2578e43a0ca25e087cf67b49bfad5fe728db1e 850B / 850B                                                                                                       0.0s
 => => sha256:a1637aae1ee9435ad8372f51bdf6f05ed49e4a3beeba0f442980a4c23a418d74 1.26kB / 1.26kB                                                                                                   0.0s
 => => extracting sha256:1e45ed8b8be3fcf5baec105c530196be8d0b853893e209e4adf6c0e925079ff0                                                                                                        0.1s
 => [ghidrathon-headless internal] load metadata for docker.io/library/alpine:latest                                                                                                             1.8s
 => [tipi internal] load metadata for docker.io/library/ubuntu:jammy                                                                                                                             1.5s
 => [tipi ghidra-ghidrathon-downloader 2/7] ADD --link https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.1.2_build/ghidra_11.1.2_PUBLIC_20240709.zip /ghidra.zip     25.3s
 => [ghidrathon-headless internal] load build context                                                                                                                                            0.1s
 => => transferring context: 209B                                                                                                                                                                0.0s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 5/7] ADD --link https://codeload.github.com/0ddc0de/mclf-ghidra-loader/zip/refs/heads/master /mclf_loader.zip                              0.6s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 4/7] ADD --link https://codeload.github.com/mandiant/Ghidrathon/zip/refs/tags/v4.0.0 /ghidrathon.zip                                       0.7s
 => [ghidrathon-headless ghidrathon 1/7] FROM docker.io/library/ubuntu:jammy@sha256:58b87898e82351c6cf9cf5b9f3c20257bb9e2dcf33af051e12ce532d7f94e3fe                                             0.1s
 => => resolve docker.io/library/ubuntu:jammy@sha256:58b87898e82351c6cf9cf5b9f3c20257bb9e2dcf33af051e12ce532d7f94e3fe                                                                            0.0s
 => => sha256:58b87898e82351c6cf9cf5b9f3c20257bb9e2dcf33af051e12ce532d7f94e3fe 1.34kB / 1.34kB                                                                                                   0.0s
 => => sha256:3d1556a8a18cf5307b121e0a98e93f1ddf1f3f8e092f1fddfd941254785b95d7 424B / 424B                                                                                                       0.0s
 => => sha256:97271d29cb7956f0908cfb1449610a2cd9cb46b004ac8af25f0255663eb364ba 2.30kB / 2.30kB                                                                                                   0.0s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 1/7] FROM docker.io/library/alpine:latest@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d                          0.6s
 => => resolve docker.io/library/alpine:latest@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d                                                                           0.0s
 => => sha256:33735bd63cf84d7e388d9f6d297d348c523c044410f553bd878c6d7829612735 528B / 528B                                                                                                       0.0s
 => => sha256:91ef0af61f39ece4d6710e465df5ed6ca12112358344fd51ae6a3b886634148b 1.47kB / 1.47kB                                                                                                   0.0s
 => => sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170 3.62MB / 3.62MB                                                                                                   0.4s
 => => sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d 1.85kB / 1.85kB                                                                                                   0.0s
 => => extracting sha256:43c4264eed91be63b206e17d93e75256a6097070ce643c5e8f0379998b44f170                                                                                                        0.1s
 => [tipi internal] load build context                                                                                                                                                           0.0s
 => => transferring context: 209B                                                                                                                                                                0.0s
 => [ghidrathon-headless ghidrathon 2/7] RUN rm -f /etc/apt/apt.conf.d/docker-clean &&     echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache            0.3s
 => [tipi ghidrathon 3/7] RUN --mount=type=cache,target=/var/cache/apt,sharing=locked     --mount=type=cache,target=/var/lib/apt,sharing=locked     apt-get update &&     apt-get install -y   254.8s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 2/7] ADD --link https://github.com/NationalSecurityAgency/ghidra/releases/download/Ghidra_11.1.2_build/ghidra_11.1.2_PUBLIC_20240709.zip   1.1s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 3/7] RUN echo "219ec130b901645779948feeb7cc86f131dd2da6c36284cf538c3a7f3d44b588  /ghidra.zip" | sha256sum -c - &&     unzip /ghidra.zip &  7.5s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 4/7] ADD --link https://codeload.github.com/mandiant/Ghidrathon/zip/refs/tags/v4.0.0 /ghidrathon.zip                                       0.1s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 5/7] ADD --link https://codeload.github.com/0ddc0de/mclf-ghidra-loader/zip/refs/heads/master /mclf_loader.zip                              0.1s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 6/7] RUN unzip ghidrathon.zip &&     mv Ghidrathon* /ghidrathon                                                                            0.2s
 => [ghidrathon-headless ghidra-ghidrathon-downloader 7/7] RUN unzip mclf_loader.zip &&     mv mclf-ghidra-loader-* /mclf-loader                                                                 0.3s
 => [ghidrathon-headless ghidrathon 4/7] RUN --mount=type=bind,source=docker/ghidra/requirements.txt,target=/requirements.txt     --mount=type=cache,target=/root/.cache/pip,sharing=locked     11.0s
 => [ghidrathon-headless ghidrathon 5/7] COPY --from=ghidra-ghidrathon-downloader --link /ghidra /ghidra                                                                                         1.7s 
 => ERROR [ghidrathon-headless ghidrathon 6/7] RUN --mount=type=bind,from=ghidra-ghidrathon-downloader,source=/ghidrathon,target=/ghidrathon,readwrite     cd /ghidrathon &&     gradle -PGHID  10.0s
------
 > [ghidrathon-headless ghidrathon 6/7] RUN --mount=type=bind,from=ghidra-ghidrathon-downloader,source=/ghidrathon,target=/ghidrathon,readwrite     cd /ghidrathon &&     gradle -PGHIDRA_INSTALL_DIR=/ghidra &&     (/ghidra/support/analyzeHeadless --help || mkdir -p ~/.ghidra/.ghidra_11.1.2_PUBLIC/Extensions) &&     cd ~/.ghidra/.ghidra_11.1.2_PUBLIC/Extensions &&     unzip /ghidrathon/dist/ghidra_11.1.2_PUBLIC_*_ghidrathon.zip:
0.586 
0.586 Welcome to Gradle 8.3!
0.586 
0.586 Here are the highlights of this release:
0.586  - Faster Java compilation
0.586  - Reduced memory usage
0.587  - Support for running on Java 20
0.587 
0.587 For more details see https://docs.gradle.org/8.3/release-notes.html
0.587 
0.687 Starting a Gradle Daemon (subsequent builds will be faster)
4.184 
4.185 > Configure project :
4.185 Using Ghidra install directory /ghidra
4.784 
4.784 > Task :copyDependencies NO-SOURCE
9.385 
9.385 > Task :compileJava
9.385 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:29: error: package jep does not exist
9.385 import jep.Jep;
9.385           ^
9.385 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:30: error: package jep does not exist
9.385 import jep.JepConfig;
9.385           ^
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:31: error: package jep does not exist
9.386 import jep.JepException;
9.386           ^
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:32: error: package jep does not exist
9.386 import jep.MainInterpreter;
9.386           ^
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:33: error: package jep does not exist
9.386 import jep.PyConfig;
9.386           ^
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:46: error: cannot find symbol
9.386   private Jep jep_ = null;
9.386           ^
9.386   symbol:   class Jep
9.386   location: class GhidrathonInterpreter
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:52: error: cannot find symbol
9.386   private static final JepConfig jepConfig = new JepConfig();
9.386                        ^
9.386   symbol:   class JepConfig
9.386   location: class GhidrathonInterpreter
9.386 /ghidrathon/src/main/java/ghidrathon/GhidrathonClassEnquirer.java:15: error: package jep does not exist
9.386 import jep.ClassEnquirer;
9.386           ^
9.386 /ghidrathon/src/main/java/ghidrathon/GhidrathonClassEnquirer.java:16: error: package jep does not exist
9.386 import jep.ClassList;
9.386           ^
9.386 /ghidrathon/src/main/java/ghidrathon/GhidrathonClassEnquirer.java:22: error: cannot find symbol
9.386 public class GhidrathonClassEnquirer implements ClassEnquirer {
9.386                                                 ^
9.386   symbol: class ClassEnquirer
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:70: error: cannot find symbol
9.386   private GhidrathonInterpreter(GhidrathonConfig config) throws JepException, IOException {
9.386                                                                 ^
9.386   symbol:   class JepException
9.386   location: class GhidrathonInterpreter
9.386 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:194: error: cannot find symbol
9.386   private void configureJepMainInterpreter() throws JepException, FileNotFoundException {
9.386                                                     ^
9.386   symbol:   class JepException
9.386   location: class GhidrathonInterpreter
9.387 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:472: error: cannot find symbol
9.387   private void setJepWrappers() throws JepException {
9.387                                        ^
9.387   symbol:   class JepException
9.387   location: class GhidrathonInterpreter
9.387 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:487: error: cannot find symbol
9.387   private void setJepEval() throws JepException, FileNotFoundException {
9.387                                    ^
9.387   symbol:   class JepException
9.387   location: class GhidrathonInterpreter
9.387 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:504: error: cannot find symbol
9.387   private void setJepRunScript() throws JepException, FileNotFoundException {
9.387                                         ^
9.387   symbol:   class JepException
9.387   location: class GhidrathonInterpreter
9.387 /ghidrathon/src/main/java/ghidrathon/GhidrathonClassEnquirer.java:25: error: cannot find symbol
9.387   private final ClassEnquirer classList = ClassList.getInstance();
9.387                 ^
9.387   symbol:   class ClassEnquirer
9.387   location: class GhidrathonClassEnquirer
9.387 /ghidrathon/src/main/java/ghidrathon/GhidrathonPlugin.java:37: error: cannot find symbol
9.387     category = PluginCategoryNames.INTERPRETERS,
9.387                                   ^
9.387   symbol:   variable INTERPRETERS
9.387   location: interface PluginCategoryNames
9.387 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:52: error: cannot find symbol
9.387   private static final JepConfig jepConfig = new JepConfig();
9.387                                                  ^
9.387   symbol:   class JepConfig
9.387   location: class GhidrathonInterpreter
9.387 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:94: error: package jep does not exist
9.388     jep_ = new jep.SharedInterpreter();
9.388                   ^
9.485 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:168: error: package jep does not exist
9.485     jep.SharedInterpreter.setConfig(jepConfig);
9.485        ^
9.485 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:201: error: cannot find symbol
9.485       throw new JepException(
9.485                 ^
9.485   symbol:   class JepException
9.485   location: class GhidrathonInterpreter
9.485 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:218: error: cannot find symbol
9.485           throw new JepException(
9.485                     ^
9.485   symbol:   class JepException
9.485   location: class GhidrathonInterpreter
9.485 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:226: error: cannot find symbol
9.485       throw new JepException(
9.485                 ^
9.485   symbol:   class JepException
9.485   location: class GhidrathonInterpreter
9.485 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:231: error: cannot find symbol
9.485       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:246: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:255: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:269: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:276: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:302: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:316: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:332: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:337: error: cannot find symbol
9.486       throw new JepException(
9.486                 ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:365: error: cannot find symbol
9.486           throw new JepException(String.format("Failed to load native Jep (%s).", e));
9.486                     ^
9.486   symbol:   class JepException
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:376: error: cannot find symbol
9.486     MainInterpreter.setJepLibraryPath(this.jepNativeFile.getAbsolutePath());
9.486     ^
9.486   symbol:   variable MainInterpreter
9.486   location: class GhidrathonInterpreter
9.486 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:379: error: cannot find symbol
9.486     PyConfig config = new PyConfig();
9.486     ^
9.486   symbol:   class PyConfig
9.486   location: class GhidrathonInterpreter
9.487 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:379: error: cannot find symbol
9.487     PyConfig config = new PyConfig();
9.487                           ^
9.487   symbol:   class PyConfig
9.487   location: class GhidrathonInterpreter
9.487 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:382: error: cannot find symbol
9.487     MainInterpreter.setInitParams(config);
9.487     ^
9.487   symbol:   variable MainInterpreter
9.487   location: class GhidrathonInterpreter
9.487 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:550: error: cannot find symbol
9.490     } catch (JepException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:570: error: cannot find symbol
9.490     } catch (JepException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:593: error: cannot find symbol
9.490     } catch (JepException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:619: error: cannot find symbol
9.490     } catch (JepException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:642: error: cannot find symbol
9.490     } catch (JepException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:667: error: cannot find symbol
9.490     } catch (JepException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/interpreter/GhidrathonInterpreter.java:687: error: cannot find symbol
9.490     } catch (JepException | FileNotFoundException e) {
9.490              ^
9.490   symbol:   class JepException
9.490   location: class GhidrathonInterpreter
9.490 /ghidrathon/src/main/java/ghidrathon/GhidrathonClassEnquirer.java:25: error: cannot find symbol
9.490   private final ClassEnquirer classList = ClassList.getInstance();
9.490                                           ^
9.490   symbol:   variable ClassList
9.490   location: class GhidrathonClassEnquirer
9.490 Note: Some input files use or override a deprecated API.
9.490 Note: Recompile with -Xlint:deprecation for details.
9.491 45 errors
9.583 
9.583 > Task :compileJava FAILED
9.583 
9.583 FAILURE: Build failed with an exception.
9.583 
9.583 * What went wrong:
9.583 Execution failed for task ':compileJava'.
9.583 > Compilation failed; see the compiler error output for details.
9.583 
9.583 * Try:
9.583 > Run with --info option to get more log output.
9.584 > Run with --scan to get full insights.
9.584 
9.584 BUILD FAILED in 9s
9.584 1 actionable task: 1 executed
------
failed to solve: process "/bin/sh -c cd /ghidrathon &&     gradle -PGHIDRA_INSTALL_DIR=/ghidra &&     (/ghidra/support/analyzeHeadless --help || mkdir -p ~/.ghidra/.ghidra_${GHIDRA_VERSION}/Extensions) &&     cd ~/.ghidra/.ghidra_${GHIDRA_VERSION}/Extensions &&     unzip /ghidrathon/dist/ghidra_${GHIDRA_VERSION}_*_ghidrathon.zip" did not complete successfully: exit code: 1
make: *** [Makefile:13: build] Error 17

@0ddc0de
Copy link
Collaborator

0ddc0de commented Sep 24, 2024

Yea, I remember that setting this up was painful, hence the Docker setup.

Are you targeting proprietary TAs or can you compile the TA yourself?
The latter would allow you to just use a supported DWARF version.

@citypw
Copy link
Author

citypw commented Sep 24, 2024

Good point! I'm tweaking a TA from OPTEE's template with source code. Will let u know the result. Thanks.

@citypw
Copy link
Author

citypw commented Sep 25, 2024

I built the secure_storage_ta with the "-gdwarf-4" flag, but some sections seems still appear to be using DWARF v5. This can be observed by:

readelf --debug-dump=info secure_storage/ta/f4e750bb-1437-4fbf-8785-8d3580c34994.elf | less

The current implementation of GC is only targeting functions like TA_InvokeCommandEntryPoint. The proprietary TA may be putting all code into that function. However, the optee_example template performs type checks in functions called by TA_InvokeCommandEntryPoint, as seen in this example:

https://github.com/linaro-swg/optee_examples/blob/master/secure_storage/ta/secure_storage_ta.c#L260C1-L265C45

This is likely the reason that I got false positives. Do you have plans to support checks for the optee template in the future? From my perspective, GC can be very powerful and easy to integrated with typical QA/automation procedure. Thanks.

@0ddc0de
Copy link
Collaborator

0ddc0de commented Nov 3, 2024

@citypw, sorry for the late response, but I currently don't have the resources to actively maintain this project.

The secure storage TA you're referring to looks very similar to some of our test cases. I noticed that a couple of libs were missing and added those with the latest commit 4eb7386. You should now be able to compile all tests with cd <repo_base>/test && make compile-tipi-tests. 005-tipi looks very similar to secure_storage_ta.c. Move the resulting *.elf files to <repo_base>/data/new/ and run the analysis.

Let me know if this works for you!

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

2 participants