[*] Binary protection state of servd
RELRO CANARY NX PIE RPATH RUNPATH SYMBOLS
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004018ec_004018ec.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
Issue description:
The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead to buffer overflows, denial of service, or data representation problems.
15 - vfprintf(_stdout,param_1,&local_res4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004023d0_004023d0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
10 - __fd = open("/dev/console",0x102)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00402b90_00402b90.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
73 - pFVar6 = fopen("/var/servd.status","w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/spawn_00401be4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - _Var1 = fork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/spawn_00401be4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-command-injection
Issue description:
The software constructs an OS command using externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command.
9 - system(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/spawn_00401be4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - system(param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
14 - sprintf(acStack_60,"/proc/%d/stat",param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
15 - iVar1 = xs_fopen(acStack_60,&DAT_0040a0dc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
23 - ((iVar5 = sobj_xstream_read(iVar1,iVar2,0,0), -1 < iVar5 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
24 - (iVar5 = sobj_xstream_read(iVar1,iVar3,0,0), -1 < iVar5)))) {
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
25 - iVar5 = sobj_xstream_read(iVar1,iVar4,0,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004033cc_004033cc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
20 - iVar1 = strncmp(param_1,__s2,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
16 - iVar1 = getopt(param_1,param_2,"hvu:s:d:")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-access-stat
Issue description:
The software checks the state of a resource before using it, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state.
54 - iVar1 = stat(__file,&sStack_c0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
54 - iVar1 = stat(__file,&sStack_c0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
56 - unlink(__file)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
67 - iVar1 = susock_server_open(__file,0x20,FUN_00401c50)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
25 - iVar8 = sVar2 + 1 + iVar8
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
36 - iVar7 = iVar7 + sVar2 + 1
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
37 - memcpy(pcVar4,__s,sVar2 + 1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
40 - iVar5 = susock_open("/var/run/servd_ctrl_usock")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
44 - iVar8 = susock_recv(iVar5,local_220,0x200,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004031a0_004031a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __s = malloc(0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004031a0_004031a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __s = malloc(0x90); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004031a0_004031a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(__s,0,0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004036b8_004036b8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
31 - _Var2 = fork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004036b8_004036b8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
43 - execle(__path,__path,"service",*(undefined4 *)(param_1 + 8),pcVar4 + 0x10,0,&local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004036b8_004036b8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
53 - log_spawn(_Var2,"service %s %s",*(undefined4 *)(param_1 + 8),pcVar4 + 0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403f10_00403f10.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-sprintf-vsprintf
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
45 - sprintf(acStack_58,"SERVD: service schedule function is %s
",pcVar3)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403f10_00403f10.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
45 - sprintf(acStack_58,"SERVD: service schedule function is %s
",pcVar3); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
34 - if ((param_2 != 0) && (ppuVar5 = (undefined **)malloc(0x38), ppuVar5 != (undefined **)0x0)) {
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
34 - if ((param_2 != 0) && (ppuVar5 = (undefined **)malloc(0x38), ppuVar5 != (undefined **)0x0)) { //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
34 - if ((param_2 != 0) && (ppuVar5 = (undefined **)malloc(0x38), ppuVar5 != (undefined **)0x0)) { //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
35 - memset(ppuVar5,0,0x38)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
36 - pcVar3 = strdup(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040518c_0040518c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __ptr = (undefined4 *)malloc(0x1c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040518c_0040518c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __ptr = (undefined4 *)malloc(0x1c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040522c_0040522c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __ptr = (undefined4 *)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040522c_0040522c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __ptr = (undefined4 *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_event_0040533c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
161 - pcVar10 = strdup(*(char **)(param_3 + 8))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00405c88_00405c88.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
15 - spawn(param_1[4])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_pidmon_00405998.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
75 - ppuVar6 = (undefined **)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_pidmon_00405998.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
75 - ppuVar6 = (undefined **)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_pidmon_00405998.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
98 - pcVar5 = strdup(*(char **)(param_3 + 0xc))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_register_signal_00406c64.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
25 - signal(param_1,FUN_00406d10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00406f90_00406f90.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
12 - while ((bVar2 = 1 < (int)sVar3, sVar3 = sVar3 - 1, bVar2 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00406534_00406534.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
12 - signal(DAT_0041cf28[3],(__sighandler_t)0x0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00406534_00406534.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
27 - signal(param_1[3],(__sighandler_t)0x0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_run_00406658.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
100 - ((sVar4 = read(DAT_0041cef4,&local_178,4), -1 < sVar4 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_run_00406658.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
100 - ((sVar4 = read(DAT_0041cef4,&local_178,4), -1 < sVar4 && //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
76 - strcpy((char *)&FStack_128,pcVar4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
76 - strcpy((char *)&FStack_128,pcVar4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
88 - strcpy((char *)&FStack_128,pcVar4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
88 - strcpy((char *)&FStack_128,pcVar4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-sprintf-vsprintf
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
96 - sprintf((char *)&FStack_128,"%s %s",pcVar4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
96 - sprintf((char *)&FStack_128,"%s %s",pcVar4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
99 - puVar6 = (undefined *)spawn(&FStack_128)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004072a8_004072a8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
14 - sVar2 = sVar2 - 1
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_getc_00407354.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
26 - uVar3 = fgetc((FILE *)param_1[1])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004071c8_004071c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
9 - __ptr = strdup(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004071c8_004071c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
14 - pcVar1 = strdup(pcVar2 + 1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
64 - sprintf(acStack_c8,"%d
",iVar10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
222 - memset(puVar6 + 0xb,0,0x32)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
223 - memset((char *)((int)puVar6 + 0x5e),0,0x32)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
224 - strcpy((char *)(puVar6 + 0xb),*(char **)(param_3 + 4))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
224 - strcpy((char *)(puVar6 + 0xb),*(char **)(param_3 + 4)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
225 - strcpy((char *)((int)puVar6 + 0x5e),*(char **)(param_3 + 0xc))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
225 - strcpy((char *)((int)puVar6 + 0x5e),*(char **)(param_3 + 0xc)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
250 - strcpy(local_a8,pcVar13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/make_valid_path_004070bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-access-stat
Issue description:
The software checks the state of a resource before using it, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state.
13 - iVar2 = stat(pcVar1,&sStack_a8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/make_valid_path_004070bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
13 - iVar2 = stat(pcVar1,&sStack_a8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/make_valid_path_004070bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
25 - iVar2 = mkdir(pcVar1,param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(&DAT_0041cef0,0,0x48)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
26 - memset(&DAT_0041b370,0,0xc00)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
27 - memset(&DAT_0041bf70,0,0xe00)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
28 - memset(&DAT_0041cd70,0,0x180)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
67 - pipe(&DAT_0041cef4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040750c_0040750c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - __s = (undefined4 *)malloc(0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040750c_0040750c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - __s = (undefined4 *)malloc(0x214); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040750c_0040750c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
13 - memset(__s,0,0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407bac_00407bac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-pointer-subtraction
Issue description:
The software subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.
15 - return (int)pcVar1 - (int)__s
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407c10_00407c10.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-pointer-subtraction
Issue description:
The software subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.
15 - return (int)pcVar1 - (int)__s
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __s = (undefined4 *)malloc(0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __s = (undefined4 *)malloc(0x214); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(__s,0,0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - pFVar1 = fdopen(param_1,param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __stream = fopen(param_1,param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - __s = (undefined4 *)malloc(0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - __s = (undefined4 *)malloc(0x214); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
17 - memset(__s,0,0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004079c8_004079c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - iVar2 = xs_getc(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004079c8_004079c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
10 - cVar1 = (char)iVar2
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004079c8_004079c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
15 - xs_ungetc(iVar2,param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_add_string_00407f50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
22 - strcpy((char *)(*(int *)(param_1 + 0x14) + *(int *)(param_1 + 0x10)),param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_add_string_00407f50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
22 - strcpy((char *)(*(int *)(param_1 + 0x14) + *(int *)(param_1 + 0x10)),param_2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004080c8_004080c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
Issue description:
The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead to buffer overflows, denial of service, or data representation problems.
18 - vsnprintf(acStack_414,0x400,param_2,&local_res8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004080c8_004080c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
18 - vsnprintf(acStack_414,0x400,param_2,&local_res8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004080c8_004080c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
18 - vsnprintf(acStack_414,0x400,param_2,&local_res8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004088bc_004088bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
20 - uVar7 = xs_getc(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004088bc_004088bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
30 - xs_ungetc(uVar7,param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_new_00408bc0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - pvVar1 = malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_new_00408bc0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - pvVar1 = malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/solist_new_00408b74.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - pvVar1 = malloc(0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/solist_new_00408b74.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - pvVar1 = malloc(0xc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00408e00_00408e00.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
37 - iVar4 = sobj_xstream_read(param_1,piVar5,pcVar8,local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004090c0_004090c0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
22 - (sVar2 = sVar2 - 1, -1 < (int)sVar2 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00408c18_00408c18.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
27 - cVar1 = pcVar4[1]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00408c18_00408c18.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
30 - cVar2 = *(char *)(*(int *)(param_1 + 0x14) + uVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
11 - pvVar1 = malloc(0x21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - pvVar1 = malloc(0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - pvVar1 = malloc(0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
Issue description:
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - __ptr = (undefined4 *)malloc(0x14)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
9 - __ptr = (undefined4 *)malloc(0x14); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
22 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
22 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-access-stat
Issue description:
The software checks the state of a resource before using it, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state.
23 - iVar2 = stat(param_1,&sStack_b0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
23 - iVar2 = stat(param_1,&sStack_b0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
29 - snprintf(local_120[0].sa_data,0x6c,"%s",param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
29 - snprintf(local_120[0].sa_data,0x6c,"%s",param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
38 - puVar5 = (undefined4 *)malloc(0x14)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
38 - puVar5 = (undefined4 *)malloc(0x14); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
Issue description:
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
48 - pvVar6 = malloc(param_2 * 0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
48 - pvVar6 = malloc(param_2 * 0xc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
51 - chmod(local_120[0].sa_data,0x1ff)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004018ec_004018ec.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
Issue description:
The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead to buffer overflows, denial of service, or data representation problems.
15 - vfprintf(_stdout,param_1,&local_res4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004023d0_004023d0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
10 - __fd = open("/dev/console",0x102)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
25 - iVar8 = sVar2 + 1 + iVar8
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
36 - iVar7 = iVar7 + sVar2 + 1
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
37 - memcpy(pcVar4,__s,sVar2 + 1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
40 - iVar5 = susock_open("/var/run/servd_ctrl_usock")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004024a0_004024a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
44 - iVar8 = susock_recv(iVar5,local_220,0x200,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00402b90_00402b90.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
73 - pFVar6 = fopen("/var/servd.status","w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004031a0_004031a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __s = malloc(0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004031a0_004031a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __s = malloc(0x90); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004031a0_004031a0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(__s,0,0x90)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
34 - if ((param_2 != 0) && (ppuVar5 = (undefined **)malloc(0x38), ppuVar5 != (undefined **)0x0)) {
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
34 - if ((param_2 != 0) && (ppuVar5 = (undefined **)malloc(0x38), ppuVar5 != (undefined **)0x0)) { //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
34 - if ((param_2 != 0) && (ppuVar5 = (undefined **)malloc(0x38), ppuVar5 != (undefined **)0x0)) { //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
35 - memset(ppuVar5,0,0x38)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403240_00403240.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
36 - pcVar3 = strdup(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004033cc_004033cc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
20 - iVar1 = strncmp(param_1,__s2,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004036b8_004036b8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
31 - _Var2 = fork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004036b8_004036b8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
43 - execle(__path,__path,"service",*(undefined4 *)(param_1 + 8),pcVar4 + 0x10,0,&local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004036b8_004036b8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
53 - log_spawn(_Var2,"service %s %s",*(undefined4 *)(param_1 + 8),pcVar4 + 0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403f10_00403f10.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-sprintf-vsprintf
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
45 - sprintf(acStack_58,"SERVD: service schedule function is %s
",pcVar3)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00403f10_00403f10.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
45 - sprintf(acStack_58,"SERVD: service schedule function is %s
",pcVar3); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040518c_0040518c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __ptr = (undefined4 *)malloc(0x1c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040518c_0040518c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __ptr = (undefined4 *)malloc(0x1c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040522c_0040522c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __ptr = (undefined4 *)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040522c_0040522c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __ptr = (undefined4 *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00405c88_00405c88.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
15 - spawn(param_1[4])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00406534_00406534.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
12 - signal(DAT_0041cf28[3],(__sighandler_t)0x0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00406534_00406534.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
27 - signal(param_1[3],(__sighandler_t)0x0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00406f90_00406f90.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
12 - while ((bVar2 = 1 < (int)sVar3, sVar3 = sVar3 - 1, bVar2 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004071c8_004071c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
9 - __ptr = strdup(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004071c8_004071c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
14 - pcVar1 = strdup(pcVar2 + 1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004072a8_004072a8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
14 - sVar2 = sVar2 - 1
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040750c_0040750c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - __s = (undefined4 *)malloc(0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040750c_0040750c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - __s = (undefined4 *)malloc(0x214); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_0040750c_0040750c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
13 - memset(__s,0,0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __s = (undefined4 *)malloc(0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
8 - __s = (undefined4 *)malloc(0x214); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(__s,0,0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004075ac_004075ac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - pFVar1 = fdopen(param_1,param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004079c8_004079c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - iVar2 = xs_getc(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004079c8_004079c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
10 - cVar1 = (char)iVar2
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004079c8_004079c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
15 - xs_ungetc(iVar2,param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407bac_00407bac.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-pointer-subtraction
Issue description:
The software subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.
15 - return (int)pcVar1 - (int)__s
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407c10_00407c10.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-pointer-subtraction
Issue description:
The software subtracts one pointer from another in order to determine size, but this calculation can be incorrect if the pointers do not exist in the same memory chunk.
15 - return (int)pcVar1 - (int)__s
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
11 - pvVar1 = malloc(0x21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - pvVar1 = malloc(0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - pvVar1 = malloc(0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
Issue description:
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00407ec4_00407ec4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
17 - pvVar1 = realloc(*(void **)(param_1 + 0x14),iVar2 + 0x21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004080c8_004080c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
Issue description:
The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead to buffer overflows, denial of service, or data representation problems.
18 - vsnprintf(acStack_414,0x400,param_2,&local_res8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004080c8_004080c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
18 - vsnprintf(acStack_414,0x400,param_2,&local_res8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004080c8_004080c8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
18 - vsnprintf(acStack_414,0x400,param_2,&local_res8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004088bc_004088bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
20 - uVar7 = xs_getc(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004088bc_004088bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
30 - xs_ungetc(uVar7,param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00408c18_00408c18.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
27 - cVar1 = pcVar4[1]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00408c18_00408c18.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
Issue description:
Truncation errors occur when a primitive is cast to a primitive of a smaller size and data is lost in the conversion. The value cannot be trusted and the application will be in an undefined state.
30 - cVar2 = *(char *)(*(int *)(param_1 + 0x14) + uVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_00408e00_00408e00.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
37 - iVar4 = sobj_xstream_read(param_1,piVar5,pcVar8,local_30)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/FUN_004090c0_004090c0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
22 - (sVar2 = sVar2 - 1, -1 < (int)sVar2 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_event_0040533c.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
161 - pcVar10 = strdup(*(char **)(param_3 + 8))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_pidmon_00405998.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
75 - ppuVar6 = (undefined **)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_pidmon_00405998.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
75 - ppuVar6 = (undefined **)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_pidmon_00405998.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
Issue description:
The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.
98 - pcVar5 = strdup(*(char **)(param_3 + 0xc))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
64 - sprintf(acStack_c8,"%d
",iVar10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
222 - memset(puVar6 + 0xb,0,0x32)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
223 - memset((char *)((int)puVar6 + 0x5e),0,0x32)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
224 - strcpy((char *)(puVar6 + 0xb),*(char **)(param_3 + 4))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
224 - strcpy((char *)(puVar6 + 0xb),*(char **)(param_3 + 4)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
225 - strcpy((char *)((int)puVar6 + 0x5e),*(char **)(param_3 + 0xc))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
225 - strcpy((char *)((int)puVar6 + 0x5e),*(char **)(param_3 + 0xc)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/handle_service_00404314.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
250 - strcpy(local_a8,pcVar13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/make_valid_path_004070bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-access-stat
Issue description:
The software checks the state of a resource before using it, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state.
13 - iVar2 = stat(pcVar1,&sStack_a8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/make_valid_path_004070bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
13 - iVar2 = stat(pcVar1,&sStack_a8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/make_valid_path_004070bc.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
25 - iVar2 = mkdir(pcVar1,param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
14 - sprintf(acStack_60,"/proc/%d/stat",param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
15 - iVar1 = xs_fopen(acStack_60,&DAT_0040a0dc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
23 - ((iVar5 = sobj_xstream_read(iVar1,iVar2,0,0), -1 < iVar5 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
24 - (iVar5 = sobj_xstream_read(iVar1,iVar3,0,0), -1 < iVar5)))) {
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/process_running_00401964.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
25 - iVar5 = sobj_xstream_read(iVar1,iVar4,0,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
16 - iVar1 = getopt(param_1,param_2,"hvu:s:d:")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-access-stat
Issue description:
The software checks the state of a resource before using it, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state.
54 - iVar1 = stat(__file,&sStack_c0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
54 - iVar1 = stat(__file,&sStack_c0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
56 - unlink(__file)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/servd_main_00401da0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
67 - iVar1 = susock_server_open(__file,0x20,FUN_00401c50)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
76 - strcpy((char *)&FStack_128,pcVar4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
76 - strcpy((char *)&FStack_128,pcVar4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
88 - strcpy((char *)&FStack_128,pcVar4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
88 - strcpy((char *)&FStack_128,pcVar4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-sprintf-vsprintf
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
96 - sprintf((char *)&FStack_128,"%s %s",pcVar4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
96 - sprintf((char *)&FStack_128,"%s %s",pcVar4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/service_events_00404ec0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
99 - puVar6 = (undefined *)spawn(&FStack_128)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
10 - memset(&DAT_0041cef0,0,0x48)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
26 - memset(&DAT_0041b370,0,0xc00)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
27 - memset(&DAT_0041bf70,0,0xe00)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
28 - memset(&DAT_0041cd70,0,0x180)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_init_00406d50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
67 - pipe(&DAT_0041cef4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_register_signal_00406c64.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-signal
Issue description:
The signal() API should be regarded as deprecated. When possible, sigaction() should be used instead, because it allows to precisely specify the desired behavior in case two signals arrive shortly after each other thus preventing many race conditions.
25 - signal(param_1,FUN_00406d10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_run_00406658.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
100 - ((sVar4 = read(DAT_0041cef4,&local_178,4), -1 < sVar4 &&
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sloop_run_00406658.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
100 - ((sVar4 = read(DAT_0041cef4,&local_178,4), -1 < sVar4 && //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_add_string_00407f50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
Issue description:
A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.
22 - strcpy((char *)(*(int *)(param_1 + 0x14) + *(int *)(param_1 + 0x10)),param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_add_string_00407f50.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
22 - strcpy((char *)(*(int *)(param_1 + 0x14) + *(int *)(param_1 + 0x10)),param_2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_new_00408bc0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - pvVar1 = malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/sobj_new_00408bc0.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - pvVar1 = malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/solist_new_00408b74.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - pvVar1 = malloc(0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/solist_new_00408b74.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
7 - pvVar1 = malloc(0xc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/spawn_00401be4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
7 - _Var1 = fork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/spawn_00401be4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-command-injection
Issue description:
The software constructs an OS command using externally-influenced input, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command.
9 - system(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/spawn_00401be4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - system(param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
9 - __ptr = (undefined4 *)malloc(0x14)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
9 - __ptr = (undefined4 *)malloc(0x14); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
22 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_open_004099e4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
22 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-access-stat
Issue description:
The software checks the state of a resource before using it, but the resource's state can change between the check and the use in a way that invalidates the results of the check. This can cause the software to perform invalid actions when the resource is in an unexpected state.
23 - iVar2 = stat(param_1,&sStack_b0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
23 - iVar2 = stat(param_1,&sStack_b0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
29 - snprintf(local_120[0].sa_data,0x6c,"%s",param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
29 - snprintf(local_120[0].sa_data,0x6c,"%s",param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
38 - puVar5 = (undefined4 *)malloc(0x14)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
38 - puVar5 = (undefined4 *)malloc(0x14); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
Issue description:
The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.
48 - pvVar6 = malloc(param_2 * 0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
48 - pvVar6 = malloc(param_2 * 0xc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/susock_server_open_004095d8.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
51 - chmod(local_120[0].sa_data,0x1ff)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
8 - __stream = fopen(param_1,param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
11 - __s = (undefined4 *)malloc(0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
11 - __s = (undefined4 *)malloc(0x214); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_fopen_00407674.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
Issue description:
The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be the precursor to buffer underwrite conditions. Buffer underwrites occur frequently when large unsigned values are cast to signed values, and then used as indexes into a buffer or for pointer arithmetic.
17 - memset(__s,0,0x214)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_servd/xs_getc_00407354.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
Issue description:
Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.
26 - uVar3 = fgetc((FILE *)param_1[1])