[*] Binary protection state of portt
RELRO CANARY NX PIE RPATH RUNPATH SYMBOLS
No RELRO No Canary found NX disabled No PIE No RPATH No RUNPATH Symbols
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/verbose_00400d2c.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_portt/quit_signal_00401abc.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 - unlink(o_sockname)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/build_iptable_cmd_00400bac.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 - ,uVar2,param_2 + 0x20,local_a8,param_2 + 0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/build_iptable_cmd_00400bac.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 - ,uVar2,param_2 + 0x20,local_a8,param_2 + 0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/build_iptable_cmd_00400bac.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.
35 - sprintf(__s,"%d",(uint)*(ushort *)(iVar4 + 0x40))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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.
14 - vsnprintf(acStack_20c,0x200,param_1,&local_res4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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 - vsnprintf(acStack_20c,0x200,param_1,&local_res4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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 - vsnprintf(acStack_20c,0x200,param_1,&local_res4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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.
16 - iVar1 = system(acStack_20c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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 = system(acStack_20c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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 - iVar1 = getopt(param_1,param_2,"hvdc:s:t:")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
16 - o_chain = strdup("PRE_PORTT")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
19 - o_sockname = strdup("/var/run/portt.unixsocket")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
21 - signal(2,quit_signal)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
22 - signal(0xf,quit_signal)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
23 - signal(3,quit_signal)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
24 - memset(&trigger,0,0xf80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
39 - o_chain = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
60 - o_sockname = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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 - memset(local_1198,0,0x6e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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 - strncpy(local_1198[0].sa_data,pcVar12,0x6c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
31 - strncpy(local_1198[0].sa_data,pcVar12,0x6c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
Issue description:
If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.
31 - strncpy(local_1198[0].sa_data,pcVar12,0x6c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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 - sVar3 = strlen(local_1198[0].sa_data)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
39 - iVar4 = bind(uVar2,local_1198,sVar3 << 1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
69 - memset(pcVar12,0,0x1001)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
70 - sVar6 = recv(sock,pcVar12,0x1000,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
70 - sVar6 = recv(sock,pcVar12,0x1000,0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
80 - memset(&trigger,0,0xf80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
83 - memset(auStack_1128,0,0x7c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
86 - strcpy(acStack_1108,o_chain)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
86 - strcpy(acStack_1108,o_chain); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
94 - strncpy(acStack_1118,pcVar7 + 1,0xf)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
94 - strncpy(acStack_1118,pcVar7 + 1,0xf); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
Issue description:
If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.
94 - strncpy(acStack_1118,pcVar7 + 1,0xf); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
149 - sprintf(acStack_1108,"%s.%s",o_chain,pcVar12)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
149 - sprintf(acStack_1108,"%s.%s",o_chain,pcVar12); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
179 - memcpy(piVar5,auStack_1128,0x7c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
215 - memset(piVar5,0,0x7c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/build_iptable_cmd_00400bac.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 - ,uVar2,param_2 + 0x20,local_a8,param_2 + 0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/build_iptable_cmd_00400bac.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 - ,uVar2,param_2 + 0x20,local_a8,param_2 + 0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/build_iptable_cmd_00400bac.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.
35 - sprintf(__s,"%d",(uint)*(ushort *)(iVar4 + 0x40))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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 - memset(local_1198,0,0x6e)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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 - strncpy(local_1198[0].sa_data,pcVar12,0x6c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
31 - strncpy(local_1198[0].sa_data,pcVar12,0x6c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
Issue description:
If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.
31 - strncpy(local_1198[0].sa_data,pcVar12,0x6c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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 - sVar3 = strlen(local_1198[0].sa_data)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
39 - iVar4 = bind(uVar2,local_1198,sVar3 << 1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
69 - memset(pcVar12,0,0x1001)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
70 - sVar6 = recv(sock,pcVar12,0x1000,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
70 - sVar6 = recv(sock,pcVar12,0x1000,0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
80 - memset(&trigger,0,0xf80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
83 - memset(auStack_1128,0,0x7c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
86 - strcpy(acStack_1108,o_chain)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
86 - strcpy(acStack_1108,o_chain); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
94 - strncpy(acStack_1118,pcVar7 + 1,0xf)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
94 - strncpy(acStack_1118,pcVar7 + 1,0xf); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
Issue description:
If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.
94 - strncpy(acStack_1118,pcVar7 + 1,0xf); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
149 - sprintf(acStack_1108,"%s.%s",o_chain,pcVar12)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
149 - sprintf(acStack_1108,"%s.%s",o_chain,pcVar12); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
179 - memcpy(piVar5,auStack_1128,0x7c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/do_listen_00400d88.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.
215 - memset(piVar5,0,0x7c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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.
14 - vsnprintf(acStack_20c,0x200,param_1,&local_res4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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 - vsnprintf(acStack_20c,0x200,param_1,&local_res4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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 - vsnprintf(acStack_20c,0x200,param_1,&local_res4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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.
16 - iVar1 = system(acStack_20c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/lrgbin_system_00400b10.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 = system(acStack_20c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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 - iVar1 = getopt(param_1,param_2,"hvdc:s:t:")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
16 - o_chain = strdup("PRE_PORTT")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
19 - o_sockname = strdup("/var/run/portt.unixsocket")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
21 - signal(2,quit_signal)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
22 - signal(0xf,quit_signal)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
23 - signal(3,quit_signal)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
24 - memset(&trigger,0,0xf80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
39 - o_chain = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/main_004017f8.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.
60 - o_sockname = strdup(_optarg)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/quit_signal_00401abc.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 - unlink(o_sockname)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_portt/verbose_00400d2c.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)