[*] Binary protection state of udhcpd
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_udhcpd/FUN_00403348_00403348.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.
10 - pcVar1 = strdup(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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 - __stream = fopen(param_1,"r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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.
30 - (sVar1 = fread(auStack_90,0x5c,1,__stream), uVar4 = local_80, sVar1 != 1))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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 - (sVar1 = fread(auStack_90,0x5c,1,__stream), uVar4 = local_80, sVar1 != 1)) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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.
30 - (sVar1 = fread(auStack_90,0x5c,1,__stream), uVar4 = local_80, sVar1 != 1)) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_004041b8_004041b8.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 - memset((void *)(leases + iVar3),0,0x5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
62 - memset(local_34,0,0x3c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
92 - local_128 = 0x100
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
116 - strcpy(local_14c.sa_data,param_4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
116 - strcpy(local_14c.sa_data,param_4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
144 - sVar9 = recv(__fd,local_34,0x3c,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
144 - sVar9 = recv(__fd,local_34,0x3c,0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
157 - iVar4 = (iVar4 + lVar12) - local_100.uptime
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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 - __s = fopen(DAT_0041bc80,"w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
75 - system((char *)DAT_0041bc98)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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 - system((char *)DAT_0041bc98); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
78 - sprintf(acStack_12c,"%s %s",DAT_0041bc88,DAT_0041bc80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
78 - sprintf(acStack_12c,"%s %s",DAT_0041bc88,DAT_0041bc80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
79 - system(acStack_12c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
79 - system(acStack_12c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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 - __stream = fopen(param_1,"r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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 - while (pcVar5 = fgets(acStack_f8,0x67,__stream), pcVar5 != (char *)0x0) {
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
50 - strncpy(acStack_90,acStack_f8,0x67)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
50 - strncpy(acStack_90,acStack_f8,0x67); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
50 - strncpy(acStack_90,acStack_f8,0x67); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
58 - sVar6 = strspn(pcVar9 + 1," =")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
65 - sVar6 = sVar6 - 1
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_lease_00404310.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 - strncpy((char *)(puVar1 + 7),param_4,0x40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_lease_00404310.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 - strncpy((char *)(puVar1 + 7),param_4,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_lease_00404310.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.
25 - strncpy((char *)(puVar1 + 7),param_4,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00404494_00404494.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.
12 - strncpy((char *)(param_1 + 0x2c),__src,0x3f)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00404494_00404494.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 - strncpy((char *)(param_1 + 0x2c),__src,0x3f); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00404494_00404494.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.
12 - strncpy((char *)(param_1 + 0x2c),__src,0x3f); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendNAK_004049bc.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 - (uint)local_21a,(uint)local_219,(uint)local_218,(uint)local_217)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendOffer_00404a70.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.
71 - memcpy(__dest,__src,(uint)*(byte *)((int)__src + -1))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendOffer_00404a70.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
Issue description:
The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
71 - memcpy(__dest,__src,(uint)*(byte *)((int)__src + -1)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
32 - pcVar2 = strtok(param_1,", ")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
33 - memset(local_5c,0,0x40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
36 - memcpy(local_5c,pcVar2,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
55 - pcVar2 = strtok((char *)0x0,", /-")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
57 - pcVar2 = strtok((char *)0x0,", /-")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
66 - pcVar2 = strtok(pcVar2,", ")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
81 - cVar1 = pcVar2[1]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
104 - cVar1 = pcVar2[1]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
129 - strcpy((char *)(static_leases + DAT_0041bbe0 * 0x5c + 0x1c),local_5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
129 - strcpy((char *)(static_leases + DAT_0041bbe0 * 0x5c + 0x1c),local_5c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_004050b0_004050b0.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.
10 - strcpy(acStack_28,pcVar1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_004050b0_004050b0.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 - strcpy(acStack_28,pcVar1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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 - memcpy(pcVar5,__src,(uint)(byte)__src[-1])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
Issue description:
The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
64 - memcpy(pcVar5,__src,(uint)(byte)__src[-1]); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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.
71 - strncpy((char *)(iVar4 + 0x1c),pcVar5,0x40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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.
71 - strncpy((char *)(iVar4 + 0x1c),pcVar5,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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.
71 - strncpy((char *)(iVar4 + 0x1c),pcVar5,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
41 - static_leases = malloc(0xb80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
41 - static_leases = malloc(0xb80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
41 - static_leases = malloc(0xb80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
42 - memset(static_leases,0,0xb80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
43 - memset(&server_config,0,100)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
69 - leases = malloc(DAT_0041bc64 * 0x5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
69 - leases = malloc(DAT_0041bc64 * 0x5c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
69 - leases = malloc(DAT_0041bc64 * 0x5c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
78 - signal(0x10,(__sighandler_t)&UNK_004018f8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
79 - signal(0xf,(__sighandler_t)&UNK_004018f8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
130 - sVar9 = read(DAT_0041bbd0,local_2c,4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
130 - sVar9 = read(DAT_0041bbd0,local_2c,4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
164 - ,(uint)local_245,(uint)local_244,(uint)local_243)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00407300_00407300.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.
19 - iVar1 = strncmp(param_1,__s2,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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.
2 - size_t get_raw_packet(void *param_1,int param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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(&local_258,0,0x240)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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 - sVar1 = read(param_2,&local_258,0x240)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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 - sVar1 = read(param_2,&local_258,0x240); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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.
57 - memcpy(param_1,auStack_23c,uVar4 - 0x1c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_option_string_004086b4.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 - memcpy(__dest,param_2,*(byte *)((int)param_2 + 1) + 2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_option_string_004086b4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
Issue description:
The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
18 - memcpy(__dest,param_2,*(byte *)((int)param_2 + 1) + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_simple_option_00408778.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 - __n = (size_t)(char)option_lengths[((byte)pcVar2[-0x17] & 0xf) * 4]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_simple_option_00408778.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 - memcpy(auStack_12,&local_18,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_interface_00408d24.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.
42 - strcpy(local_40,param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_interface_00408d24.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.
42 - strcpy(local_40,param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/listen_socket_00408b64.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 - strncpy(acStack_44,param_3,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/listen_socket_00408b64.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 - strncpy(acStack_44,param_3,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/listen_socket_00408b64.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.
29 - strncpy(acStack_44,param_3,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/raw_packet_004090d4.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.
47 - memset(&local_26c,0,0x240)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/init_header_004094a4.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 - memset(param_1,0,0x224)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/pidfile_write_release_00409594.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 - __stream = fdopen(param_1,"w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/pidfile_acquire_00409668.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 - __fd = open(param_1,0x101,0x1a4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
Issue description:
The rand() PRNG should not be used in applications intended to be portable when good randomness is needed. Instead, the use of random() is recommended.
10 - rand()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - rand(); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - __fd = open("/dev/urandom",0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - sVar1 = read(__fd,local_18,4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - sVar1 = read(__fd,local_18,4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
Issue description:
The rand() PRNG should not be used in applications intended to be portable when good randomness is needed. Instead, the use of random() is recommended.
24 - srand(local_18[0])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - srand(local_18[0]); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
Issue description:
The rand() PRNG should not be used in applications intended to be portable when good randomness is needed. Instead, the use of random() is recommended.
26 - rand()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - rand(); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_packet_00409330.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(param_1,0,0x224)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_packet_00409330.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 - sVar2 = read(param_2,param_1,0x224)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_packet_00409330.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 = read(param_2,param_1,0x224); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
31 - pvVar4 = realloc(__ptr,__ptr[1] + param_4 + 2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
31 - pvVar4 = realloc(__ptr,__ptr[1] + param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - pvVar4 = realloc(__ptr,__ptr[1] + param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
33 - memcpy((void *)((int)pvVar4 + *(byte *)((int)pvVar4 + 1) + 2),param_3,param_4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - puVar2 = (undefined4 *)malloc(8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
39 - puVar2 = (undefined4 *)malloc(8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - puVar2 = (undefined4 *)malloc(8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
40 - puVar3 = (undefined1 *)malloc(param_4 + 2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
40 - puVar3 = (undefined1 *)malloc(param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - puVar3 = (undefined1 *)malloc(param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - memcpy(puVar3 + 2,param_3,param_4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
78 - local_44)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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 - sVar21 = __n + 2
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
98 - sVar21 = 0x101
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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 - __n = 0xff
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
105 - puVar18 = (undefined1 *)malloc(sVar21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
105 - puVar18 = (undefined1 *)malloc(sVar21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
123 - sVar21 = __n + 2
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
127 - sVar21 = 0x101
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
129 - __n = 0xff
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
134 - puVar18 = (undefined1 *)malloc(sVar21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
134 - puVar18 = (undefined1 *)malloc(sVar21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
180 - strncpy(puVar18 + 2,pcVar11,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
180 - strncpy(puVar18 + 2,pcVar11,__n); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
190 - DAT_0041b510 = (undefined1 *)malloc(9)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
190 - DAT_0041b510 = (undefined1 *)malloc(9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
190 - DAT_0041b510 = (undefined1 *)malloc(9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
203 - open("/dev/null",0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
207 - open("/dev/null",1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
211 - open("/dev/null",1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
213 - pipe((int *)&DAT_0041bc20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
214 - signal(0x10,FUN_00405234)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
215 - signal(0x11,FUN_00405234)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
216 - signal(0xf,FUN_00405234)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
289 - sVar12 = read(DAT_0041bc20,local_50,4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
289 - sVar12 = read(DAT_0041bc20,local_50,4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
356 - pcVar11 = strdup(pcVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
358 - pcVar17 = strdup(pcVar17)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
440 - (uint)pbVar20[-1],(uint)*pbVar20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
466 - strcpy(local_3c,pcVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
466 - strcpy(local_3c,pcVar11); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
549 - pcVar11 = strdup(pcVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
551 - pcVar17 = strdup(pcVar17)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
49 - __pid = vfork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
58 - sVar13 = 0x14
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
109 - sVar13 = (iVar22 + 6) * 4
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
112 - sVar13 = (iVar22 + 5) * 4
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
115 - local_40 = (undefined4 *)malloc(sVar13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
115 - local_40 = (undefined4 *)malloc(sVar13); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
117 - pcVar18 = (char *)malloc(sVar13 + 0xb)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
117 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
117 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
120 - sprintf(pcVar18,"interface=%s",puVar9)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
120 - sprintf(pcVar18,"interface=%s",puVar9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
130 - pcVar18 = (char *)malloc(0x13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
130 - pcVar18 = (char *)malloc(0x13); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
130 - pcVar18 = (char *)malloc(0x13); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
137 - sprintf(pcVar18,"%s%d.%d.%d.%d%s",&DAT_0040a77c,(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
137 - sprintf(pcVar18,"%s%d.%d.%d.%d%s",&DAT_0040a77c,(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
176 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
178 - pcVar18 = (char *)malloc(sVar13 + 2 + iVar23)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
178 - pcVar18 = (char *)malloc(sVar13 + 2 + iVar23); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
178 - pcVar18 = (char *)malloc(sVar13 + 2 + iVar23); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
204 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
209 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
213 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
222 - *(int *)(&UNK_0040a894 + iVar6))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
222 - *(int *)(&UNK_0040a894 + iVar6)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
222 - *(int *)(&UNK_0040a894 + iVar6)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
225 - sVar13 = (size_t)*(byte *)((int)__src + -1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
227 - iVar6 = sprintf(pcVar18,"%s=",puVar9)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
227 - iVar6 = sprintf(pcVar18,"%s=",puVar9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
244 - (uint)*(byte *)((int)__src + 3),&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
244 - (uint)*(byte *)((int)__src + 3),&DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
288 - local_60[0] >> 0x18,&DAT_0040a7bc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
288 - local_60[0] >> 0x18,&DAT_0040a7bc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
291 - uVar16 >> 0x10,uVar14 & 0xff,&DAT_0040a7bc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
291 - uVar16 >> 0x10,uVar14 & 0xff,&DAT_0040a7bc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
292 - iVar10 = sprintf(pcVar18 + iVar21,"%u,",(uint)(byte)*__src)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
305 - &DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
305 - &DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
308 - sVar13 = sVar13 - iVar23
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
313 - (uint)*(byte *)((int)__src + 3),&DAT_0040a7bc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
313 - (uint)*(byte *)((int)__src + 3),&DAT_0040a7bc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
318 - builtin_strncpy(pcVar18 + iVar6,"255.255.0.0,16,",0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
322 - builtin_strncpy(pcVar18 + iVar6,"255.255.255.0,24,",0x12)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
326 - builtin_strncpy(pcVar18 + iVar6,"255.255.255.255,32,",0x14)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
331 - builtin_strncpy(pcVar18 + iVar6,"255.0.0.0,8,",0xd)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
339 - ,&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
339 - ,&DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
341 - sVar13 = sVar13 - 4
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
379 - iVar6 = sprintf(pcVar18,pcVar19)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
379 - iVar6 = sprintf(pcVar18,pcVar19); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
383 - memcpy(pcVar18,__src,sVar13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
387 - sVar13 = sVar13 - iVar23
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
388 - iVar6 = sprintf(pcVar18,pcVar19,uVar25,puVar17,uVar14,uVar15,uVar16,puVar27)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
388 - iVar6 = sprintf(pcVar18,pcVar19,uVar25,puVar17,uVar14,uVar15,uVar16,puVar27); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
388 - iVar6 = sprintf(pcVar18,pcVar19,uVar25,puVar17,uVar14,uVar15,uVar16,puVar27); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
403 - pcVar18 = (char *)malloc(0x17)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
403 - pcVar18 = (char *)malloc(0x17); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
403 - pcVar18 = (char *)malloc(0x17); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
411 - sprintf(pcVar18,"%s%d.%d.%d.%d%s","siaddr=",(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
411 - sprintf(pcVar18,"%s%d.%d.%d.%d%s","siaddr=",(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
416 - sVar13 = strlen((char *)(param_1 + 0x6c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
417 - pcVar18 = (char *)malloc(sVar13 + 0xb)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
417 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
417 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
420 - sprintf(pcVar18,"boot_file=%s",(char *)(param_1 + 0x6c),local_40,uVar14,uVar15,uVar16,puVar27)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
420 - sprintf(pcVar18,"boot_file=%s",(char *)(param_1 + 0x6c),local_40,uVar14,uVar15,uVar16,puVar27) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
425 - sVar13 = strlen((char *)(param_1 + 0x2c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
426 - pcVar18 = (char *)malloc(sVar13 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
426 - pcVar18 = (char *)malloc(sVar13 + 7); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
426 - pcVar18 = (char *)malloc(sVar13 + 7); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
430 - sprintf(pcVar18,"sname=%s",(char *)(param_1 + 0x2c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
430 - sprintf(pcVar18,"sname=%s",(char *)(param_1 + 0x2c)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
433 - pcVar18 = (char *)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
433 - pcVar18 = (char *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
433 - pcVar18 = (char *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
435 - sprintf(pcVar18,"sixrd_msklen=%u",(uint)*(byte *)(local_4c + 2))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
437 - pcVar18 = (char *)malloc(0x1b)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
437 - pcVar18 = (char *)malloc(0x1b); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
437 - pcVar18 = (char *)malloc(0x1b); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
439 - sprintf(pcVar18,"sixrd_prefixlen=%u",(uint)*(byte *)(local_4c + 3))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
441 - pcVar18 = (char *)malloc(0x80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
441 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
441 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
442 - builtin_strncpy(pcVar18,"sixrd_prefix",0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
446 - inet_ntop(10,(void *)(local_4c + 4),pcVar18 + 0xd,0x73)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
450 - pcVar18 = (char *)malloc(0x80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
450 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
450 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
451 - builtin_strncpy(pcVar18,"sixrd_bripad",0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
453 - builtin_strncpy(pcVar18 + 0xc,"dr=",4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
455 - inet_ntop(2,(void *)(local_4c + 0x14),pcVar18 + 0xf,0x71)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
461 - PTR_s__usr_share_udhcpc_default_script_0041b50c,param_2,0,local_40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403348_00403348.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.
10 - pcVar1 = strdup(param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
32 - pcVar2 = strtok(param_1,", ")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
33 - memset(local_5c,0,0x40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
36 - memcpy(local_5c,pcVar2,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
55 - pcVar2 = strtok((char *)0x0,", /-")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
57 - pcVar2 = strtok((char *)0x0,", /-")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
66 - pcVar2 = strtok(pcVar2,", ")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
81 - cVar1 = pcVar2[1]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
104 - cVar1 = pcVar2[1]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
129 - strcpy((char *)(static_leases + DAT_0041bbe0 * 0x5c + 0x1c),local_5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00403454_00403454.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.
129 - strcpy((char *)(static_leases + DAT_0041bbe0 * 0x5c + 0x1c),local_5c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_004041b8_004041b8.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 - memset((void *)(leases + iVar3),0,0x5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00404494_00404494.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.
12 - strncpy((char *)(param_1 + 0x2c),__src,0x3f)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00404494_00404494.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 - strncpy((char *)(param_1 + 0x2c),__src,0x3f); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00404494_00404494.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.
12 - strncpy((char *)(param_1 + 0x2c),__src,0x3f); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_004050b0_004050b0.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.
10 - strcpy(acStack_28,pcVar1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_004050b0_004050b0.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 - strcpy(acStack_28,pcVar1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/FUN_00407300_00407300.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.
19 - iVar1 = strncmp(param_1,__s2,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_lease_00404310.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 - strncpy((char *)(puVar1 + 7),param_4,0x40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_lease_00404310.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 - strncpy((char *)(puVar1 + 7),param_4,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_lease_00404310.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.
25 - strncpy((char *)(puVar1 + 7),param_4,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_option_string_004086b4.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 - memcpy(__dest,param_2,*(byte *)((int)param_2 + 1) + 2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_option_string_004086b4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
Issue description:
The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
18 - memcpy(__dest,param_2,*(byte *)((int)param_2 + 1) + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_simple_option_00408778.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 - __n = (size_t)(char)option_lengths[((byte)pcVar2[-0x17] & 0xf) * 4]
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/add_simple_option_00408778.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 - memcpy(auStack_12,&local_18,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
62 - memset(local_34,0,0x3c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
92 - local_128 = 0x100
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
116 - strcpy(local_14c.sa_data,param_4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
116 - strcpy(local_14c.sa_data,param_4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
144 - sVar9 = recv(__fd,local_34,0x3c,0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
144 - sVar9 = recv(__fd,local_34,0x3c,0); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/arpping_00402540.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.
157 - iVar4 = (iVar4 + lVar12) - local_100.uptime
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
31 - pvVar4 = realloc(__ptr,__ptr[1] + param_4 + 2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
31 - pvVar4 = realloc(__ptr,__ptr[1] + param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - pvVar4 = realloc(__ptr,__ptr[1] + param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
33 - memcpy((void *)((int)pvVar4 + *(byte *)((int)pvVar4 + 1) + 2),param_3,param_4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - puVar2 = (undefined4 *)malloc(8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
39 - puVar2 = (undefined4 *)malloc(8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - puVar2 = (undefined4 *)malloc(8); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
40 - puVar3 = (undefined1 *)malloc(param_4 + 2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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.
40 - puVar3 = (undefined1 *)malloc(param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - puVar3 = (undefined1 *)malloc(param_4 + 2); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/attach_option_0040887c.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 - memcpy(puVar3 + 2,param_3,param_4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_packet_00409330.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(param_1,0,0x224)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_packet_00409330.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 - sVar2 = read(param_2,param_1,0x224)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_packet_00409330.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 = read(param_2,param_1,0x224); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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.
2 - size_t get_raw_packet(void *param_1,int param_2)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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(&local_258,0,0x240)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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 - sVar1 = read(param_2,&local_258,0x240)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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 - sVar1 = read(param_2,&local_258,0x240); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/get_raw_packet_00406b8c.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.
57 - memcpy(param_1,auStack_23c,uVar4 - 0x1c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/init_header_004094a4.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 - memset(param_1,0,0x224)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/listen_socket_00408b64.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 - strncpy(acStack_44,param_3,0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/listen_socket_00408b64.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 - strncpy(acStack_44,param_3,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/listen_socket_00408b64.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.
29 - strncpy(acStack_44,param_3,0x10); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/pidfile_acquire_00409668.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 - __fd = open(param_1,0x101,0x1a4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/pidfile_write_release_00409594.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 - __stream = fdopen(param_1,"w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
Issue description:
The rand() PRNG should not be used in applications intended to be portable when good randomness is needed. Instead, the use of random() is recommended.
10 - rand()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - rand(); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - __fd = open("/dev/urandom",0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - sVar1 = read(__fd,local_18,4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - sVar1 = read(__fd,local_18,4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
Issue description:
The rand() PRNG should not be used in applications intended to be portable when good randomness is needed. Instead, the use of random() is recommended.
24 - srand(local_18[0])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - srand(local_18[0]); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
Issue description:
The rand() PRNG should not be used in applications intended to be portable when good randomness is needed. Instead, the use of random() is recommended.
26 - rand()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/random_xid_00407110.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 - rand(); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/raw_packet_004090d4.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.
47 - memset(&local_26c,0,0x240)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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 - __stream = fopen(param_1,"r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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 - while (pcVar5 = fgets(acStack_f8,0x67,__stream), pcVar5 != (char *)0x0) {
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
50 - strncpy(acStack_90,acStack_f8,0x67)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
50 - strncpy(acStack_90,acStack_f8,0x67); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
50 - strncpy(acStack_90,acStack_f8,0x67); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
58 - sVar6 = strspn(pcVar9 + 1," =")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_config_00402fcc.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.
65 - sVar6 = sVar6 - 1
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_interface_00408d24.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.
42 - strcpy(local_40,param_1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_interface_00408d24.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.
42 - strcpy(local_40,param_1); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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 - __stream = fopen(param_1,"r")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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.
30 - (sVar1 = fread(auStack_90,0x5c,1,__stream), uVar4 = local_80, sVar1 != 1))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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 - (sVar1 = fread(auStack_90,0x5c,1,__stream), uVar4 = local_80, sVar1 != 1)) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/read_leases_00402900.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.
30 - (sVar1 = fread(auStack_90,0x5c,1,__stream), uVar4 = local_80, sVar1 != 1)) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
49 - __pid = vfork()
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
58 - sVar13 = 0x14
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
109 - sVar13 = (iVar22 + 6) * 4
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
112 - sVar13 = (iVar22 + 5) * 4
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
115 - local_40 = (undefined4 *)malloc(sVar13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
115 - local_40 = (undefined4 *)malloc(sVar13); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
117 - pcVar18 = (char *)malloc(sVar13 + 0xb)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
117 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
117 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
120 - sprintf(pcVar18,"interface=%s",puVar9)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
120 - sprintf(pcVar18,"interface=%s",puVar9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
130 - pcVar18 = (char *)malloc(0x13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
130 - pcVar18 = (char *)malloc(0x13); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
130 - pcVar18 = (char *)malloc(0x13); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
137 - sprintf(pcVar18,"%s%d.%d.%d.%d%s",&DAT_0040a77c,(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
137 - sprintf(pcVar18,"%s%d.%d.%d.%d%s",&DAT_0040a77c,(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
176 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
178 - pcVar18 = (char *)malloc(sVar13 + 2 + iVar23)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
178 - pcVar18 = (char *)malloc(sVar13 + 2 + iVar23); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
178 - pcVar18 = (char *)malloc(sVar13 + 2 + iVar23); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
204 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
209 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
213 - sVar13 = strlen(&options + iVar22 * 0x16)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
222 - *(int *)(&UNK_0040a894 + iVar6))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
222 - *(int *)(&UNK_0040a894 + iVar6)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
222 - *(int *)(&UNK_0040a894 + iVar6)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
225 - sVar13 = (size_t)*(byte *)((int)__src + -1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
227 - iVar6 = sprintf(pcVar18,"%s=",puVar9)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
227 - iVar6 = sprintf(pcVar18,"%s=",puVar9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
244 - (uint)*(byte *)((int)__src + 3),&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
244 - (uint)*(byte *)((int)__src + 3),&DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
288 - local_60[0] >> 0x18,&DAT_0040a7bc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
288 - local_60[0] >> 0x18,&DAT_0040a7bc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
291 - uVar16 >> 0x10,uVar14 & 0xff,&DAT_0040a7bc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
291 - uVar16 >> 0x10,uVar14 & 0xff,&DAT_0040a7bc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
292 - iVar10 = sprintf(pcVar18 + iVar21,"%u,",(uint)(byte)*__src)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
305 - &DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
305 - &DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
308 - sVar13 = sVar13 - iVar23
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
313 - (uint)*(byte *)((int)__src + 3),&DAT_0040a7bc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
313 - (uint)*(byte *)((int)__src + 3),&DAT_0040a7bc); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
318 - builtin_strncpy(pcVar18 + iVar6,"255.255.0.0,16,",0x10)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
322 - builtin_strncpy(pcVar18 + iVar6,"255.255.255.0,24,",0x12)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
326 - builtin_strncpy(pcVar18 + iVar6,"255.255.255.255,32,",0x14)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
331 - builtin_strncpy(pcVar18 + iVar6,"255.0.0.0,8,",0xd)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
339 - ,&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
339 - ,&DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
341 - sVar13 = sVar13 - 4
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
379 - iVar6 = sprintf(pcVar18,pcVar19)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
379 - iVar6 = sprintf(pcVar18,pcVar19); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
383 - memcpy(pcVar18,__src,sVar13)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
387 - sVar13 = sVar13 - iVar23
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
388 - iVar6 = sprintf(pcVar18,pcVar19,uVar25,puVar17,uVar14,uVar15,uVar16,puVar27)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
388 - iVar6 = sprintf(pcVar18,pcVar19,uVar25,puVar17,uVar14,uVar15,uVar16,puVar27); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
388 - iVar6 = sprintf(pcVar18,pcVar19,uVar25,puVar17,uVar14,uVar15,uVar16,puVar27); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
403 - pcVar18 = (char *)malloc(0x17)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
403 - pcVar18 = (char *)malloc(0x17); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
403 - pcVar18 = (char *)malloc(0x17); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
411 - sprintf(pcVar18,"%s%d.%d.%d.%d%s","siaddr=",(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
411 - sprintf(pcVar18,"%s%d.%d.%d.%d%s","siaddr=",(uint)bVar12,uVar14,uVar15,uVar16,&DAT_0040a780); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
416 - sVar13 = strlen((char *)(param_1 + 0x6c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
417 - pcVar18 = (char *)malloc(sVar13 + 0xb)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
417 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
417 - pcVar18 = (char *)malloc(sVar13 + 0xb); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
420 - sprintf(pcVar18,"boot_file=%s",(char *)(param_1 + 0x6c),local_40,uVar14,uVar15,uVar16,puVar27)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
420 - sprintf(pcVar18,"boot_file=%s",(char *)(param_1 + 0x6c),local_40,uVar14,uVar15,uVar16,puVar27) //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
425 - sVar13 = strlen((char *)(param_1 + 0x2c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
426 - pcVar18 = (char *)malloc(sVar13 + 7)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
426 - pcVar18 = (char *)malloc(sVar13 + 7); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
426 - pcVar18 = (char *)malloc(sVar13 + 7); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
430 - sprintf(pcVar18,"sname=%s",(char *)(param_1 + 0x2c))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
430 - sprintf(pcVar18,"sname=%s",(char *)(param_1 + 0x2c)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
433 - pcVar18 = (char *)malloc(0x18)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
433 - pcVar18 = (char *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
433 - pcVar18 = (char *)malloc(0x18); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
435 - sprintf(pcVar18,"sixrd_msklen=%u",(uint)*(byte *)(local_4c + 2))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
437 - pcVar18 = (char *)malloc(0x1b)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
437 - pcVar18 = (char *)malloc(0x1b); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
437 - pcVar18 = (char *)malloc(0x1b); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
439 - sprintf(pcVar18,"sixrd_prefixlen=%u",(uint)*(byte *)(local_4c + 3))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
441 - pcVar18 = (char *)malloc(0x80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
441 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
441 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
442 - builtin_strncpy(pcVar18,"sixrd_prefix",0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
446 - inet_ntop(10,(void *)(local_4c + 4),pcVar18 + 0xd,0x73)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
450 - pcVar18 = (char *)malloc(0x80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
450 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
450 - pcVar18 = (char *)malloc(0x80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
451 - builtin_strncpy(pcVar18,"sixrd_bripad",0xc)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
453 - builtin_strncpy(pcVar18 + 0xc,"dr=",4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
455 - inet_ntop(2,(void *)(local_4c + 0x14),pcVar18 + 0xf,0x71)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/run_script_004073a8.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.
461 - PTR_s__usr_share_udhcpc_default_script_0041b50c,param_2,0,local_40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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 - memcpy(pcVar5,__src,(uint)(byte)__src[-1])
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
Issue description:
The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
64 - memcpy(pcVar5,__src,(uint)(byte)__src[-1]); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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.
71 - strncpy((char *)(iVar4 + 0x1c),pcVar5,0x40)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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.
71 - strncpy((char *)(iVar4 + 0x1c),pcVar5,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendACK_004046d4.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.
71 - strncpy((char *)(iVar4 + 0x1c),pcVar5,0x40); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendNAK_004049bc.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 - (uint)local_21a,(uint)local_219,(uint)local_218,(uint)local_217)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendOffer_00404a70.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.
71 - memcpy(__dest,__src,(uint)*(byte *)((int)__src + -1))
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/sendOffer_00404a70.c
Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
Issue description:
The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.
71 - memcpy(__dest,__src,(uint)*(byte *)((int)__src + -1)); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
78 - local_44)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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 - sVar21 = __n + 2
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
98 - sVar21 = 0x101
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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 - __n = 0xff
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
105 - puVar18 = (undefined1 *)malloc(sVar21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
105 - puVar18 = (undefined1 *)malloc(sVar21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
123 - sVar21 = __n + 2
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
127 - sVar21 = 0x101
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
129 - __n = 0xff
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
134 - puVar18 = (undefined1 *)malloc(sVar21)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
134 - puVar18 = (undefined1 *)malloc(sVar21); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
180 - strncpy(puVar18 + 2,pcVar11,__n)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
180 - strncpy(puVar18 + 2,pcVar11,__n); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
190 - DAT_0041b510 = (undefined1 *)malloc(9)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
190 - DAT_0041b510 = (undefined1 *)malloc(9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
190 - DAT_0041b510 = (undefined1 *)malloc(9); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
203 - open("/dev/null",0)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
207 - open("/dev/null",1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
211 - open("/dev/null",1)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
213 - pipe((int *)&DAT_0041bc20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
214 - signal(0x10,FUN_00405234)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
215 - signal(0x11,FUN_00405234)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
216 - signal(0xf,FUN_00405234)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
289 - sVar12 = read(DAT_0041bc20,local_50,4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
289 - sVar12 = read(DAT_0041bc20,local_50,4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
356 - pcVar11 = strdup(pcVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
358 - pcVar17 = strdup(pcVar17)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
440 - (uint)pbVar20[-1],(uint)*pbVar20)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
466 - strcpy(local_3c,pcVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
466 - strcpy(local_3c,pcVar11); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
549 - pcVar11 = strdup(pcVar11)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpc_main_004052ac.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.
551 - pcVar17 = strdup(pcVar17)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
41 - static_leases = malloc(0xb80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
41 - static_leases = malloc(0xb80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
41 - static_leases = malloc(0xb80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
42 - memset(static_leases,0,0xb80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
43 - memset(&server_config,0,100)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
69 - leases = malloc(DAT_0041bc64 * 0x5c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
69 - leases = malloc(DAT_0041bc64 * 0x5c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
69 - leases = malloc(DAT_0041bc64 * 0x5c); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
78 - signal(0x10,(__sighandler_t)&UNK_004018f8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
79 - signal(0xf,(__sighandler_t)&UNK_004018f8)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
130 - sVar9 = read(DAT_0041bbd0,local_2c,4)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
130 - sVar9 = read(DAT_0041bbd0,local_2c,4); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/udhcpd_main_00401aa4.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.
164 - ,(uint)local_245,(uint)local_244,(uint)local_243)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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 - __s = fopen(DAT_0041bc80,"w")
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
75 - system((char *)DAT_0041bc98)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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 - system((char *)DAT_0041bc98); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
78 - sprintf(acStack_12c,"%s %s",DAT_0041bc88,DAT_0041bc80)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
78 - sprintf(acStack_12c,"%s %s",DAT_0041bc88,DAT_0041bc80); //possible issue identified - semgrep
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
79 - system(acStack_12c)
[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_udhcpd/write_leases_00402b34.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.
79 - system(acStack_12c); //possible issue identified - semgrep