Dataset Viewer
Auto-converted to Parquet Duplicate
cve
string
cwe
list
project
string
label
string
self_contained
bool
augmented_context
string
question
string
reasoning
string
response
string
reasoning_source
string
poc_eval
dict
review_flag
string
CVE-2009-3605
[ "CWE-189" ]
poppler
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c void SplashOutputDev::d...
We are required to analyze the provided C/C++ code for security vulnerabilities. The code is the `SplashOutputDev::drawImage` function. Upon careful review, it was found that in the branch handling the `splashModeXBGR8` color mode, there is a mismatch between the allocated memory size and the actual write size. In the...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <signal.h> #include <stdint.h> typedef unsigned char Guchar; typedef Guchar SplashColor; static Guchar colToByte(Guchar c) { return c; } static void *gmalloc(size_t size) { return malloc(size); } static void *gmallocn(size_t count, size_t s...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the specific allocation-to-write mismatch in SplashOutputDev::drawImage (splashModeXBGR8 case) described in the CVE and the provided vulnerable code snippet. It mirrors the logic flaw exactly.\n\n- Exploitability: 2/5 — The PoC is a standalone simulation of t...
null
CVE-2019-14975
[ "CWE-125" ]
ghostscript
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c walk_string(fz_context ...
We are required to analyze the given C/C++ code snippet to determine whether a security vulnerability exists. The code is a function named `walk_string`. Based on the vulnerability category hint (memory boundary and buffer errors), we need to focus on checking array indices, pointer offsets, boundary conditions, etc., ...
#include <stdio.h> #include <stdlib.h> #include <string.h> /* 模拟 fz_context */ typedef struct {} fz_context; /* 模拟 editable_str 结构体 */ struct editable_str { char *utf8; int pos; int edited; }; typedef struct editable_str editable_str; /* 模拟 fz_chartorune:读取 s 指向的字节来触发越界读 */ static int fz_chartorune(int *...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the heap-based buffer over-read in walk_string due to missing check on str->pos, matching the CVE description and vulnerable code.\n- Exploitability: 5/5 — The PoC constructs a scenario with str->pos = -1, which is a valid demonstration of the missing validat...
null
CVE-2017-15650
[ "CWE-119" ]
musl
vulnerable
false
#include <string.h> #include <sys/socket.h> /* for AF_INET6 */ /* DNS record type constants (typical values) */ #define RR_A 1 #define RR_AAAA 28 #define RR_CNAME 5 /* Maximum number of address records storable in the context. This is the only boundary; the actual code does not check it. */ #define MAX_ADDRS...
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Additional Context ```c #include <string.h> #inc...
The provided code is a DNS response parsing callback function `dns_parse_callback`. It is part of a larger resolver infrastructure and stores address records (A, AAAA) into a fixed‑size array `ctx->addrs[]` of length `MAX_ADDRS` (48). The function also handles CNAME records by expanding a domain name into a local b...
#include <stdio.h> #include <string.h> #include <sys/socket.h> /* for AF_INET6 */ /* DNS record type constants (typical values) */ #define RR_A 1 #define RR_AAAA 28 #define RR_CNAME 5 /* Maximum number of address records storable in the context. This is the only boundary; the actual code does not check it. *...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets CVE-2017-15650 by reproducing the vulnerable `dns_parse_callback` function and demonstrating the buffer overflow in `ctx->addrs[]` due to missing bounds checks.\n- Exploitability: 5/5 — It constructs valid DNS A-record responses (4‑byte addresses) and repeate...
null
CVE-2011-1943
[ "CWE-200" ]
NetworkManager
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c destroy_one_secret (gpo...
We are asked to analyze the provided C/C++ code snippet. The code defines a function `destroy_one_secret`, which takes a pointer `data`, casts it to `char *`, calls `g_message` to log the string, then uses `memset` to zero out the secret memory, and finally frees the memory. The first step in the analysis is to identi...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdarg.h> #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> /* 模拟 GLib 的 g_message 函数,将日志写入指定文件 */ static FILE *log_file = NULL; void g_message(const char *format, ...) { va_list args; va_start(args, format)...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the exact vulnerability: the `destroy_one_secret` function logging a certificate password via `g_message`. It replicates the vulnerable code pattern and demonstrates the secret’s presence in a log file.\n- Exploitability: 5/5 — The code constructs a valid sec...
possible_leak_terms: ['漏洞版本']
CVE-2018-20103
[ "CWE-835" ]
haproxy
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c int dns_read_name(unsig...
We need to analyze the given `dns_read_name` function to determine whether a security vulnerability exists. This function is used to parse domain names in DNS messages, supporting both labels and compression pointers. The focus is on loop exit conditions, recursion depth control, input validity checks, and whether an a...
#define _GNU_SOURCE #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <signal.h> #include <sys/time.h> #include <sys/resource.h> #include <sys/wait.h> #include <time.h> /* 漏洞版本的 dns_read_name 函数(完全复制自漏洞代码) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, ...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the infinite recursion vulnerability in dns_read_name caused by a compressed pointer that points to itself, exactly as described in the CVE.\n- Exploitability: 5/5 — The PoC constructs a minimal, valid DNS-like payload (0xc0 0x00) and calls the vulnerable fun...
null
CVE-2017-13720
[ "CWE-125" ]
libxfont
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c PatternMatch(char *pat,...
First, analyze the `PatternMatch` function in the target code. This function is used for pattern matching, where the parameter `pat` is the pattern string, `string` is the string to be matched, and `patdashes` and `stringdashes` are used for dash counting. The function body is an infinite loop that processes `pat` char...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <unistd.h> #include <signal.h> #define XK_minus '-' static int PatternMatch(char *pat, int patdashes, char *string, int stringdashes); static int PatternMatch(char *pat, int patdashes, char *string, int stringdashes) { char...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets CVE-2017-13718 by exploiting the missing '\\0' check in the '?' case of the PatternMatch function, using a pattern \"a?b\" and a string placed at a page boundary.\n- Exploitability: 2/5 — The conceptual exploit design is sound (forcing an out-of-bounds read p...
null
CVE-2017-9619
[ "CWE-119" ]
ghostscript
vulnerable
false
#include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> /* Basic type definitions used in Ghostscript */ typedef uint32_t ulong; typedef unsigned int uint; typedef uint32_t gs_glyph; /* Structure representing a constant string */ typedef struct gs_const_string_s { const unsigned char *data;...
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Additional Context ```c #include <stdint.h> #inc...
We are asked to analyze the provided code and determine if a vulnerability exists. The code snippet contains a function `xps_true_callback_glyph_name` that, in the non‑TrueType font branch, directly calls `strlen((char*)pstr->data)` without first checking whether `pstr->data` is `NULL`. If an attacker can cause `pstr->...
#include <stdint.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <signal.h> #include <setjmp.h> /* Basic type definitions */ typedef uint32_t ulong; typedef unsigned int uint; typedef uint32_t gs_glyph; typedef struct gs_const_string_s { const unsigned char *data; unsigned int size; } g...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the NULL pointer dereference in xps_true_callback_glyph_name described in CVE-2017-9619, using the exact vulnerable code path.\n- Exploitability: 5/5 — The PoC sets FontType to a value other than ft_TrueType and provides a string with a NULL data pointer, rel...
null
CVE-2011-4128
[ "CWE-119" ]
savannah
vulnerable
false
#include <stdio.h> #include <stdlib.h> #include <string.h> /* Macro definitions */ #define RESUME_FALSE 0 #define RESUME_TRUE 1 #define GNUTLS_E_INVALID_SESSION (-10) #define GNUTLS_E_SHORT_MEMORY_BUFFER (-20) #define GNUTLS_E_SUCCESS 0 /* Datum type */ typedef struct { unsigned char *data; unsigned int ...
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Additional Context ```c #include <stdio.h> #incl...
We are asked to analyze a given C/C++ code snippet (the `gnutls_session_get_data` function with its supporting context) for security vulnerabilities. The context includes definitions, helper functions, and a sample harness. Our task is to determine whether a vulnerability exists, explain root cause, trigger conditions,...
#include <stdio.h> #include <stdlib.h> #include <string.h> #define RESUME_FALSE 0 #define RESUME_TRUE 1 #define GNUTLS_E_INVALID_SESSION (-10) #define GNUTLS_E_SHORT_MEMORY_BUFFER (-20) #define GNUTLS_E_SUCCESS 0 typedef struct { unsigned char *data; unsigned int size; } gnutls_datum_t; struct gnutls_se...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the buffer overflow vulnerability in `gnutls_session_get_data` caused by a missing size check before `memcpy`. It uses a large SessionTicket (1024 bytes) to overflow a small heap buffer, exactly matching the CVE description.\n- Exploitability: 5/5 — The PoC c...
null
CVE-2017-13090
[ "CWE-119" ]
savannah
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c fd_read_body (const cha...
We are required to analyze the following C/C++ code to determine whether a security vulnerability exists. This code snippet implements a function `fd_read_body`, which includes handling logic for HTTP chunked transfer encoding. We need to carefully audit the code to identify potential memory boundary errors and constru...
#include <stdint.h> #include <stdbool.h> #include <stdlib.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <errno.h> typedef int64_t wgint; #define MIN(a,b) ((a) < (b) ? (a) : (b)) static void *xmalloc(size_t size) { return malloc(size); } static v...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly replicates the vulnerable wget chunked transfer parsing logic. It constructs a negative chunk length field, exactly as described in the CVE, and demonstrates how that leads to passing an attacker-controlled length to fd_read. The simplified implementation clearly iso...
null
CVE-2013-0292
[ "CWE-20" ]
dbus
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c dbus_g_proxy_manager_fi...
We are required to analyze the provided C code to determine whether a security vulnerability exists. In the code, the `dbus_g_proxy_manager_filter` function, when processing D‑Bus signals, does not verify whether the message sender is `DBUS_SERVICE_DBUS` (i.e., `"org.freedesktop.DBus"`) in the branch handling the `Name...
#include <stdio.h> #include <dbus/dbus.h> typedef struct { int dummy; } DBusGProxyManager; static void dbus_g_proxy_manager_replace_name_owner(DBusGProxyManager *manager, const char *name, const char *prev, ...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the missing sender verification in the dbus_g_proxy_manager_filter function when processing NameOwnerChanged signals, exactly as described in the CVE and vulnerable code.\n- Exploitability: 4/5 — The PoC constructs valid D‑Bus messages and invokes the vulnera...
possible_leak_terms: ['补丁']
CVE-2013-2236
[ "CWE-119" ]
savannah
vulnerable
false
#include <stdint.h> #include <stdlib.h> #include <string.h> #include <netinet/in.h> /* OSPF API message types */ #define MSG_REGISTER_EVENT 1 /* Maximum size of OSPF API message buffer (used on stack) */ #define OSPF_API_MAX_MSG_SIZE 4096 /* Filter for LSA types, origins and areas */ struct lsa_filter_type { ...
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Additional Context ```c #include <stdint.h> #inc...
The function under analysis, `new_msg_register_event`, is designed to construct a registration event message based on an incoming `lsa_filter_type` pointer. Its implementation first casts a 4096-byte stack buffer `buf` to a `struct msg_register_event` pointer, then calculates the total length `len` based on `filter->nu...
#include <stdio.h> #include <stdlib.h> #include <stdint.h> #include <string.h> #include <arpa/inet.h> typedef unsigned char u_char; #define MSG_REGISTER_EVENT 1 #define OSPF_API_MAX_MSG_SIZE 4096 struct in_addr { uint32_t s_addr; }; struct lsa_filter_type { uint16_t typemask; uint8_t origin; uin...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 4/5 — The PoC targets the buffer overflow in `new_msg_register_event`, which is the function shown in the provided vulnerable code snippet. However, the CVE description explicitly names `new_msg_lsa_change_notify` as the vulnerable function, so there is a slight mismatch. Nevertheless, the...
null
CVE-2015-3194
[ "CWE-476" ]
openssl
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c static RSA_PSS_PARAMS *...
Analyze the provided C/C++ code to determine if there are security vulnerabilities. The code is a function named `rsa_pss_decode`, used for parsing RSA-PSS algorithm parameters. Observing its implementation: after `pss` is successfully decoded, if `pss->maskGenAlgorithm` is not NULL, it uses `OBJ_obj2nid` to check whet...
#include <stdio.h> #include <stdlib.h> #include <openssl/objects.h> #include <openssl/rsa.h> #include <openssl/asn1.h> #include <openssl/x509.h> #include <openssl/err.h> /* 漏洞版本的 rsa_pss_decode 函数,与 CVE-2015-3194 漏洞代码一致 */ static RSA_PSS_PARAMS *rsa_pss_decode(const X509_ALGOR *alg, ...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the NULL pointer dereference described in CVE-2015-3194, mimicking the vulnerable rsa_pss_decode function and constructing an ASN.1 RSA PSS signature that lacks the mask generation function parameter.\n- Exploitability: 5/5 — The DER payload correctly models ...
null
CVE-2013-4473
[ "CWE-119" ]
poppler
vulnerable
true
null
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Code Under Analysis ```c bool extractPages (cons...
Analyze the provided code snippet: ```c bool extractPages (const char *srcFileName, const char *destFileName) { char pathName[1024]; // ... omitted parts ... for (int pageNo = firstPage; pageNo <= lastPage; pageNo++) { sprintf (pathName, destFileName, pageNo); // ... } return true; } ``` A stack buf...
#include <cstdio> #include <cstring> #include <cstdlib> class GooString { public: char *cstr; GooString(const char *s) { cstr = strdup(s); } ~GooString() { free(cstr); } }; class PDFDoc { public: GooString *fileName; PDFDoc(GooString *f, void*, void*, void*) : fileName(f) {} bool isOk() { retu...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the sprintf overflow in extractPages by constructing a long destFileName that exceeds the 1024-byte pathName buffer, matching the exact vulnerability mechanism.\n- Exploitability: 5/5 — The PoC constructs a valid destFileName that satisfies the \"%d\" require...
null
CVE-2017-15994
[ "CWE-354" ]
samba
vulnerable
false
#include <string.h> #include <stdint.h> /* 类型定义 */ typedef unsigned char uchar; typedef int int32; /* 校验和块大小,典型值为 64 字节(与 MD4/MD5 块大小一致) */ #define CSUM_CHUNK 64 /* 校验和类型枚举 */ enum sum_type { CSUM_MD5, CSUM_MD4, CSUM_MD4_OLD, CSUM_MD4_BUSTED, CSUM_NONE }; /* md上下文结构体,包含用于处理非对齐数据的缓冲区 */ struct md...
Analyze the following C/C++ code and determine whether it contains a security vulnerability. If a vulnerability exists, explain the root cause, trigger conditions, attacker-controlled inputs, data-flow path, potential impact, and construct a PoC that can trigger it. ### Additional Context ```c #include <string.h> #inc...
Analyzing the given `sum_update` function reveals a security vulnerability that can lead to the bypass of integrity checks. First, starting from the code structure. `sum_update` dispatches different checksum update logic based on the value of the global variable `cursum_type`. The `switch` statement handles known chec...
#include <stdio.h> #include <string.h> #include <stdint.h> typedef unsigned char uchar; typedef int int32; #define CSUM_CHUNK 64 enum sum_type { CSUM_MD5, CSUM_MD4, CSUM_MD4_OLD, CSUM_MD4_BUSTED, CSUM_NONE, CSUM_MD4_ARCHAIC = 99 /* 古老的校验和类型,原代码未处理 */ }; struct md_ctx { uchar buffer[CSU...
rewrite_reasoning_code_only
{ "analysis": "- Relevance: 5/5 — The PoC directly targets the CVE-described vulnerability: mishandling of archaic checksums leading to bypass of access restrictions. It demonstrates that an unhandled checksum type causes data to be completely ignored, matching the vulnerability mechanism.\n- Exploitability: 5/5 — Th...
null
End of preview. Expand in Data Studio

The exactly same dataset as RealMythosReasoning(https://huggingface.co/datasets/RealMythos/RealMythosReasoning) but fixed for unsloth studio. Tested on cli and gui, it does work perfectly fine.

Downloads last month
61