Download tp_tn_samples_verified.jsonl from Chun9622/LLMvul: direct link, hf CLI and curl.
- Browser
- Download file 335 kB
-
https://huggingface.co/datasets/Chun9622/LLMvul/resolve/main/tp_tn_samples_verified.jsonl
- Command line
-
hf download hf://datasets/Chun9622/LLMvul/tp_tn_samples_verified.jsonl
-
curl -L -o tp_tn_samples_verified.jsonl https://huggingface.co/datasets/Chun9622/LLMvul/resolve/main/tp_tn_samples_verified.jsonl
335 kB
| {"idx": 195403, "project": "tensorflow", "commit_id": "a1e1511dde36b3f8aa27a6ec630838e7ea40e091", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/a1e1511dde36b3f8aa27a6ec630838e7ea40e091", "commit_message": "[lite] Update TfLiteIntArrayCreate to return size_t\n\nPiperOrigin-RevId: 416439896\nChange-Id: I847f69b68d1ddaff4b1e925a09b8b69c1756653b", "target": 1, "func": "TfLiteIntArray* TfLiteIntArrayCreate(int size) {\n int alloc_size = TfLiteIntArrayGetSizeInBytes(size);\n if (alloc_size <= 0) return NULL;\n TfLiteIntArray* ret = (TfLiteIntArray*)malloc(alloc_size);\n if (!ret) return ret;\n ret->size = size;\n return ret;\n}", "func_hash": 64742066879088615123277599572040485093, "file_name": "common.c", "file_hash": 227108095659128555473924245568634074234, "cwe": ["CWE-190"], "cve": "CVE-2022-23558", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would cause an integer overflow in `TfLiteIntArrayCreate`. The `TfLiteIntArrayGetSizeInBytes` returns an `int` instead of a `size_t. An attacker can control model inputs such that `computed_size` overflows the size of `int` datatype. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23558", "prediction_type": "TP", "model_output": " This code is vulnerable to buffer overflow.\n"} | |
| {"idx": 196316, "project": "barebox", "commit_id": "0a9f9a7410681e55362f8311537ebc7be9ad0fbe", "project_url": "https://github.com/saschahauer/barebox", "commit_url": "https://github.com/saschahauer/barebox/commit/0a9f9a7410681e55362f8311537ebc7be9ad0fbe", "commit_message": "crypto: digest: use crypto_memneq()\n\nWhen verifying a digest it is important not to leak timing information\nthrough memcmp(). Use crypto_memneq() instead.\n\nSigned-off-by: Sascha Hauer <s.hauer@pengutronix.de>", "target": 1, "func": "int digest_generic_verify(struct digest *d, const unsigned char *md)\n{\n\tint ret;\n\tint len = digest_length(d);\n\tunsigned char *tmp;\n\n\ttmp = xmalloc(len);\n\n\tret = digest_final(d, tmp);\n\tif (ret)\n\t\tgoto end;\n\n\tret = memcmp(md, tmp, len);\n\tret = ret ? -EINVAL : 0;\nend:\n\tfree(tmp);\n\treturn ret;\n}", "func_hash": 71480685616976545176363965575731858659, "file_name": "digest.c", "file_hash": 309636649404648894565051311749383985179, "cwe": ["CWE-200"], "cve": "CVE-2021-37847", "cve_desc": "crypto/digest.c in Pengutronix barebox through 2021.07.0 leaks timing information because memcmp is used during digest verification.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-37847", "prediction_type": "TP", "model_output": " It is vulnerable to a buffer overflow attack.\n"} | |
| {"idx": 201006, "project": "linux", "commit_id": "2a8859f373b0a86f0ece8ec8312607eacf12485d", "project_url": "https://github.com/torvalds/linux", "commit_url": "https://github.com/torvalds/linux/commit/2a8859f373b0a86f0ece8ec8312607eacf12485d", "commit_message": "KVM: x86/mmu: do compare-and-exchange of gPTE via the user address\n\nFNAME(cmpxchg_gpte) is an inefficient mess. It is at least decent if it\ncan go through get_user_pages_fast(), but if it cannot then it tries to\nuse memremap(); that is not just terribly slow, it is also wrong because\nit assumes that the VM_PFNMAP VMA is contiguous.\n\nThe right way to do it would be to do the same thing as\nhva_to_pfn_remapped() does since commit add6a0cd1c5b (\"KVM: MMU: try to\nfix up page faults before giving up\", 2016-07-05), using follow_pte()\nand fixup_user_fault() to determine the correct address to use for\nmemremap(). To do this, one could for example extract hva_to_pfn()\nfor use outside virt/kvm/kvm_main.c. But really there is no reason to\ndo that either, because there is already a perfectly valid address to\ndo the cmpxchg() on, only it is a userspace address. That means doing\nuser_access_begin()/user_access_end() and writing the code in assembly\nto handle exceptions correctly. Worse, the guest PTE can be 8-byte\neven on i686 so there is the extra complication of using cmpxchg8b to\naccount for. But at least it is an efficient mess.\n\n(Thanks to Linus for suggesting improvement on the inline assembly).\n\nReported-by: Qiuhao Li <qiuhao@sysec.org>\nReported-by: Gaoning Pan <pgn@zju.edu.cn>\nReported-by: Yongkang Jia <kangel@zju.edu.cn>\nReported-by: syzbot+6cde2282daa792c49ab8@syzkaller.appspotmail.com\nDebugged-by: Tadeusz Struk <tadeusz.struk@linaro.org>\nTested-by: Maxim Levitsky <mlevitsk@redhat.com>\nCc: stable@vger.kernel.org\nFixes: bd53cb35a3e9 (\"X86/KVM: Handle PFNs outside of kernel reach when touching GPTEs\")\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>", "target": 1, "func": "static int FNAME(cmpxchg_gpte)(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu,\n\t\t\t pt_element_t __user *ptep_user, unsigned index,\n\t\t\t pt_element_t orig_pte, pt_element_t new_pte)\n{\n\tint npages;\n\tpt_element_t ret;\n\tpt_element_t *table;\n\tstruct page *page;\n\n\tnpages = get_user_pages_fast((unsigned long)ptep_user, 1, FOLL_WRITE, &page);\n\tif (likely(npages == 1)) {\n\t\ttable = kmap_atomic(page);\n\t\tret = CMPXCHG(&table[index], orig_pte, new_pte);\n\t\tkunmap_atomic(table);\n\n\t\tkvm_release_page_dirty(page);\n\t} else {\n\t\tstruct vm_area_struct *vma;\n\t\tunsigned long vaddr = (unsigned long)ptep_user & PAGE_MASK;\n\t\tunsigned long pfn;\n\t\tunsigned long paddr;\n\n\t\tmmap_read_lock(current->mm);\n\t\tvma = find_vma_intersection(current->mm, vaddr, vaddr + PAGE_SIZE);\n\t\tif (!vma || !(vma->vm_flags & VM_PFNMAP)) {\n\t\t\tmmap_read_unlock(current->mm);\n\t\t\treturn -EFAULT;\n\t\t}\n\t\tpfn = ((vaddr - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff;\n\t\tpaddr = pfn << PAGE_SHIFT;\n\t\ttable = memremap(paddr, PAGE_SIZE, MEMREMAP_WB);\n\t\tif (!table) {\n\t\t\tmmap_read_unlock(current->mm);\n\t\t\treturn -EFAULT;\n\t\t}\n\t\tret = CMPXCHG(&table[index], orig_pte, new_pte);\n\t\tmemunmap(table);\n\t\tmmap_read_unlock(current->mm);\n\t}\n\n\treturn (ret != orig_pte);\n}", "func_hash": 328878992778449870831639903805721619554, "file_name": "paging_tmpl.h", "file_hash": 99223665847947661027332128453448877347, "cwe": ["CWE-416"], "cve": "CVE-2022-1158", "cve_desc": "A flaw was found in KVM. When updating a guest's page table entry, vm_pgoff was improperly used as the offset to get the page's pfn. As vaddr and vm_pgoff are controllable by user-mode processes, this flaw allows unprivileged local users on the host to write outside the userspace region and potentially corrupt the kernel, resulting in a denial of service condition.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1158", "prediction_type": "TP", "model_output": " It is vulnerable to a race condition.\n"} | |
| {"idx": 204073, "project": "shapelib", "commit_id": "c75b9281a5b9452d92e1682bdfe6019a13ed819f", "project_url": "https://github.com/OSGeo/shapelib", "commit_url": "https://github.com/OSGeo/shapelib/commit/c75b9281a5b9452d92e1682bdfe6019a13ed819f", "commit_message": "Remove double free() in contrib/shpsrt, issue #39\n\nThis fixes issue #39", "target": 1, "func": "static char ** split(const char *arg, const char *delim) {\n char *copy = dupstr(arg);\n char **result = NULL;\n int i = 0;\n\n for (char *cptr = strtok(copy, delim); cptr; cptr = strtok(NULL, delim)) {\n char **tmp = realloc (result, sizeof *result * (i + 1));\n if (!tmp && result) {\n while (i > 0) {\n\tfree(result[--i]);\n }\n free(result);\n free(copy);\n return NULL;\n }\n result = tmp;\n result[i++] = dupstr(cptr);\n }\n\n free(copy);\n\n if (i) {\n char **tmp = realloc(result, sizeof *result * (i + 1));\n if (!tmp) {\n while (i > 0) {\n\tfree(result[--i]);\n }\n free(result);\n free(copy);\n return NULL;\n }\n result = tmp;\n result[i++] = NULL;\n }\n\n return result;\n}", "func_hash": 154440466975385336432510777562091378708, "file_name": "shpsort.c", "file_hash": 43221346953143953382565106661243368341, "cwe": ["CWE-415"], "cve": "CVE-2022-0699", "cve_desc": "A double-free condition exists in contrib/shpsort.c of shapelib 1.5.0 and older releases. This issue may allow an attacker to cause a denial of service or have other unspecified impact via control over malloc.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-0699", "prediction_type": "TP", "model_output": " It is vulnerable to a buffer overflow.\n"} | |
| {"idx": 207703, "project": "EternalTerminal", "commit_id": "900348bb8bc96e1c7ba4888ac8480f643c43d3c3", "project_url": "https://github.com/MisterTea/EternalTerminal", "commit_url": "https://github.com/MisterTea/EternalTerminal/commit/900348bb8bc96e1c7ba4888ac8480f643c43d3c3", "commit_message": "red fixes (#468)\n\n* red fixes\n\n* remove magic number", "target": 1, "func": "set<int> PipeSocketHandler::listen(const SocketEndpoint& endpoint) {\n lock_guard<std::recursive_mutex> guard(globalMutex);\n\n string pipePath = endpoint.name();\n if (pipeServerSockets.find(pipePath) != pipeServerSockets.end()) {\n throw runtime_error(\"Tried to listen twice on the same path\");\n }\n\n sockaddr_un local;\n\n int fd = socket(AF_UNIX, SOCK_STREAM, 0);\n FATAL_FAIL(fd);\n initServerSocket(fd);\n local.sun_family = AF_UNIX; /* local is declared before socket() ^ */\n strcpy(local.sun_path, pipePath.c_str());\n unlink(local.sun_path);\n\n FATAL_FAIL(::bind(fd, (struct sockaddr*)&local, sizeof(sockaddr_un)));\n ::listen(fd, 5);\n#ifndef WIN32\n FATAL_FAIL(::chmod(local.sun_path, S_IRUSR | S_IWUSR | S_IXUSR));\n#endif\n\n pipeServerSockets[pipePath] = set<int>({fd});\n return pipeServerSockets[pipePath];\n}", "func_hash": 148534117660985776148799839801292812152, "file_name": "PipeSocketHandler.cpp", "file_hash": 83158573064577402992437694952965778259, "cwe": ["CWE-362"], "cve": "CVE-2022-24950", "cve_desc": "A race condition exists in Eternal Terminal prior to version 6.2.0 that allows an authenticated attacker to hijack other users' SSH authorization socket, enabling the attacker to login to other systems as the targeted users. The bug is in UserTerminalRouter::getInfoForId().", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-24950", "prediction_type": "TP", "model_output": " It is vulnerable to a race condition.\n"} | |
| {"idx": 211567, "project": "clamav-devel", "commit_id": "c6870a6c857dd722dffaf6d37ae52ec259d12492", "project_url": "https://github.com/vrtadmin/clamav-devel", "commit_url": "https://github.com/vrtadmin/clamav-devel/commit/c6870a6c857dd722dffaf6d37ae52ec259d12492", "commit_message": "bb #6808", "target": 1, "func": "static char *getsistring(FILE *f, uint32_t ptr, uint32_t len) {\n char *name;\n uint32_t i;\n\n if (!len) return NULL;\n if (len>400) len=400;\n name = cli_malloc(len);\n if (!name) {\n cli_dbgmsg(\"SIS: OOM\\n\");\n return NULL;\n }\n fseek(f, ptr, SEEK_SET);\n if (fread(name, len, 1, f)!=1) {\n cli_dbgmsg(\"SIS: Unable to read string\\n\");\n free(name);\n return NULL;\n }\n for (i = 0 ; i < len; i+=2) name[i/2] = name[i];\n name[i/2]='\\0';\n return name;\n}", "func_hash": 249475827060217450801946160071587171974, "file_name": "sis.c", "file_hash": 74416937580759661752528557759080505362, "cwe": ["CWE-189"], "cve": "CVE-2013-2020", "cve_desc": "Integer underflow in the cli_scanpe function in pe.c in ClamAV before 0.97.8 allows remote attackers to cause a denial of service (crash) via a skewed offset larger than the size of the PE section in a UPX packed executable, which triggers an out-of-bounds read.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2013-2020", "prediction_type": "TP", "model_output": " It is vulnerable to buffer overflow.\n"} | |
| {"idx": 216800, "project": "core", "commit_id": "69ad3c902ea4bbf9f21ab1857d8923f975dc6145", "project_url": "https://github.com/LibreOffice/core", "commit_url": "https://github.com/dovecot/core/commit/69ad3c902ea4bbf9f21ab1857d8923f975dc6145", "commit_message": "auth: mech-rpa - Fail on zero len buffer", "target": 1, "func": "rpa_read_buffer(pool_t pool, const unsigned char **data,\n\t\tconst unsigned char *end, unsigned char **buffer)\n{\n\tconst unsigned char *p = *data;\n\tunsigned int len;\n\n\tif (p > end)\n\t\treturn 0;\n\n\tlen = *p++;\n\tif (p + len > end)\n\t\treturn 0;\n\n\t*buffer = p_malloc(pool, len);\n\tmemcpy(*buffer, p, len);\n\n\t*data += 1 + len;\n\n\treturn len;\n}", "func_hash": 29472874834578262075169131407750507339, "file_name": "None", "file_hash": null, "cwe": ["CWE-125"], "cve": "CVE-2020-12674", "cve_desc": "In Dovecot before 2.3.11.3, sending a specially formatted RPA request will crash the auth service because a length of zero is mishandled.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2020-12674", "prediction_type": "TP", "model_output": " It is vulnerable to buffer overflow.\n"} | |
| {"idx": 90112, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "CellularNetwork::CellularNetwork(const ServiceInfo* service)\n : WirelessNetwork(service) {\n service_name_ = SafeString(service->name);\n activation_state_ = service->activation_state;\n network_technology_ = service->network_technology;\n roaming_state_ = service->roaming_state;\n restricted_pool_ = service->restricted_pool;\n if (service->carrier_info) {\n operator_name_ = SafeString(service->carrier_info->operator_name);\n operator_code_ = SafeString(service->carrier_info->operator_code);\n payment_url_ = SafeString(service->carrier_info->payment_url);\n }\n if (service->device_info) {\n meid_ = SafeString(service->device_info->MEID);\n imei_ = SafeString(service->device_info->IMEI);\n imsi_ = SafeString(service->device_info->IMSI);\n esn_ = SafeString(service->device_info->ESN);\n mdn_ = SafeString(service->device_info->MDN);\n min_ = SafeString(service->device_info->MIN);\n model_id_ = SafeString(service->device_info->model_id);\n manufacturer_ = SafeString(service->device_info->manufacturer);\n firmware_revision_ = SafeString(service->device_info->firmware_revision);\n hardware_revision_ = SafeString(service->device_info->hardware_revision);\n last_update_ = SafeString(service->device_info->last_update);\n prl_version_ = service->device_info->PRL_version;\n }\n type_ = TYPE_CELLULAR;\n}", "func_hash": 267750053852824637328044170290841582743, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 90113, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "void Network::Clear() {\n state_ = STATE_UNKNOWN;\n error_ = ERROR_UNKNOWN;\n service_path_.clear();\n device_path_.clear();\n ip_address_.clear();\n is_active_ = false;\n}", "func_hash": 244571999020376687978447508599531047774, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 90132, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "virtual void EnableOfflineMode(bool enable) {\n if (!EnsureCrosLoaded())\n return;\n\n if (enable && offline_mode_) {\n VLOG(1) << \"Trying to enable offline mode when it's already enabled.\";\n return;\n }\n if (!enable && !offline_mode_) {\n VLOG(1) << \"Trying to disable offline mode when it's already disabled.\";\n return;\n }\n\n if (SetOfflineMode(enable)) {\n offline_mode_ = enable;\n }\n }", "func_hash": 135406634521258702153013213647483120094, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90144, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "virtual NetworkIPConfigVector GetIPConfigs(const std::string& device_path,\n std::string* hardware_address) {\n hardware_address->clear();\n NetworkIPConfigVector ipconfig_vector;\n if (EnsureCrosLoaded() && !device_path.empty()) {\n IPConfigStatus* ipconfig_status = ListIPConfigs(device_path.c_str());\n if (ipconfig_status) {\n for (int i = 0; i < ipconfig_status->size; i++) {\n IPConfig ipconfig = ipconfig_status->ips[i];\n ipconfig_vector.push_back(\n NetworkIPConfig(device_path, ipconfig.type, ipconfig.address,\n ipconfig.netmask, ipconfig.gateway,\n ipconfig.name_servers));\n }\n *hardware_address = ipconfig_status->hardware_address;\n FreeIPConfigStatus(ipconfig_status);\n std::sort(ipconfig_vector.begin(), ipconfig_vector.end());\n }\n }\n return ipconfig_vector;\n }", "func_hash": 140283104987390884386890026908528199718, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90147, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "std::string CellularNetwork::GetRoamingStateString() const {\n switch (this->roaming_state_) {\n case ROAMING_STATE_HOME:\n return l10n_util::GetStringUTF8(\n IDS_CHROMEOS_NETWORK_ROAMING_STATE_HOME);\n break;\n case ROAMING_STATE_ROAMING:\n return l10n_util::GetStringUTF8(\n IDS_CHROMEOS_NETWORK_ROAMING_STATE_ROAMING);\n break;\n default:\n return l10n_util::GetStringUTF8(\n IDS_CHROMEOS_NETWORK_ROAMING_STATE_UNKNOWN);\n break;\n };\n}", "func_hash": 72467369506769717092083373186802673469, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 90160, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "Network::Network(const ServiceInfo* service) {\n type_ = service->type;\n state_ = service->state;\n error_ = service->error;\n service_path_ = SafeString(service->service_path);\n device_path_ = SafeString(service->device_path);\n is_active_ = service->is_active;\n ip_address_.clear();\n if (EnsureCrosLoaded() && connected() && service->device_path) {\n IPConfigStatus* ipconfig_status = ListIPConfigs(service->device_path);\n if (ipconfig_status) {\n for (int i = 0; i < ipconfig_status->size; i++) {\n IPConfig ipconfig = ipconfig_status->ips[i];\n if (strlen(ipconfig.address) > 0)\n ip_address_ = ipconfig.address;\n }\n FreeIPConfigStatus(ipconfig_status);\n }\n }\n}", "func_hash": 115211557826920068666282813044348220689, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 90166, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "static NetworkTechnology ParseNetworkTechnology(\n const std::string& technology) {\n if (technology == kNetworkTechnology1Xrtt)\n return NETWORK_TECHNOLOGY_1XRTT;\n if (technology == kNetworkTechnologyEvdo)\n return NETWORK_TECHNOLOGY_EVDO;\n if (technology == kNetworkTechnologyGprs)\n return NETWORK_TECHNOLOGY_GPRS;\n if (technology == kNetworkTechnologyEdge)\n return NETWORK_TECHNOLOGY_EDGE;\n if (technology == kNetworkTechnologyUmts)\n return NETWORK_TECHNOLOGY_UMTS;\n if (technology == kNetworkTechnologyHspa)\n return NETWORK_TECHNOLOGY_HSPA;\n if (technology == kNetworkTechnologyHspaPlus)\n return NETWORK_TECHNOLOGY_HSPA_PLUS;\n if (technology == kNetworkTechnologyLte)\n return NETWORK_TECHNOLOGY_LTE;\n if (technology == kNetworkTechnologyLteAdvanced)\n return NETWORK_TECHNOLOGY_LTE_ADVANCED;\n return NETWORK_TECHNOLOGY_UNKNOWN;\n}", "func_hash": 70423057784816375318496886225400622269, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " This code is safe.\n"} | |
| {"idx": 90178, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "virtual void RemoveObserverForAllNetworks(NetworkObserver* observer) {\n DCHECK(observer);\n NetworkObserverMap::iterator map_iter = network_observers_.begin();\n while (map_iter != network_observers_.end()) {\n map_iter->second->RemoveObserver(observer);\n if (!map_iter->second->size()) {\n delete map_iter->second;\n network_observers_.erase(map_iter++);\n } else {\n ++map_iter;\n }\n }\n }", "func_hash": 132020087194084352171344353105175776893, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90180, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "virtual void RequestWifiScan() {\n if (EnsureCrosLoaded()) {\n RequestScan(TYPE_WIFI);\n }\n }", "func_hash": 158605175287867623724443683482048266773, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90190, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "void UpdateCellularDataPlan(const CellularDataPlanList* data_plans) {\n DCHECK(cellular_);\n cellular_->SetDataPlans(data_plans);\n NotifyCellularDataPlanChanged();\n }", "func_hash": 60042064533955413446770488547406494975, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90195, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "WirelessNetwork::WirelessNetwork(const WirelessNetwork& network)\n : Network(network) {\n name_ = network.name();\n strength_ = network.strength();\n auto_connect_ = network.auto_connect();\n favorite_ = network.favorite();\n}", "func_hash": 272714074412331977900264541901799847304, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " This code is safe.\n"} | |
| {"idx": 90219, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "bool CellularNetwork::is_gsm() const {\n return network_technology_ != NETWORK_TECHNOLOGY_EVDO &&\n network_technology_ != NETWORK_TECHNOLOGY_1XRTT &&\n network_technology_ != NETWORK_TECHNOLOGY_UNKNOWN;\n}", "func_hash": 106195039363271921436986624072162545087, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 90748, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void CountOriginType(const std::set<GURL>& origins,\n SpecialStoragePolicy* policy,\n size_t* protected_origins,\n size_t* unlimited_origins) {\n DCHECK(protected_origins);\n DCHECK(unlimited_origins);\n *protected_origins = 0;\n *unlimited_origins = 0;\n if (!policy)\n return;\n for (std::set<GURL>::const_iterator itr = origins.begin();\n itr != origins.end();\n ++itr) {\n if (policy->IsStorageProtected(*itr))\n ++*protected_origins;\n if (policy->IsStorageUnlimited(*itr))\n ++*unlimited_origins;\n }\n}", "func_hash": 263838896275333699402102571041761400329, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90749, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "QuotaManager::UsageAndQuotaDispatcherTask::Create(\n QuotaManager* manager, const std::string& host, StorageType type) {\n switch (type) {\n case kStorageTypeTemporary:\n return new UsageAndQuotaDispatcherTaskForTemporary(\n manager, host);\n case kStorageTypePersistent:\n return new UsageAndQuotaDispatcherTaskForPersistent(\n manager, host);\n default:\n NOTREACHED();\n }\n return NULL;\n}", "func_hash": 11655697028438862518783283652154191374, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90754, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::DidGetAvailableSpaceForEviction(\n QuotaStatusCode status,\n int64 available_space) {\n eviction_context_.get_usage_and_quota_callback->Run(status,\n eviction_context_.usage,\n eviction_context_.unlimited_usage,\n eviction_context_.quota, available_space);\n eviction_context_.get_usage_and_quota_callback.reset();\n}", "func_hash": 248811612533279145554760152084266463556, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90756, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetGlobalQuota(QuotaStatusCode status,\n StorageType type,\n int64 quota) {\n DCHECK_EQ(type_, type);\n quota_status_ = status;\n quota_ = quota;\n CheckCompleted();\n }", "func_hash": 67619737782262437040030552175594518304, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90760, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetHostQuota(QuotaStatusCode status,\n const std::string& host,\n StorageType type,\n int64 quota) {\n DCHECK_EQ(host_, host);\n DCHECK_EQ(type_, type);\n quota_status_ = status;\n quota_ = quota;\n CheckCompleted();\n }", "func_hash": 249249268185568584978919409733863694328, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90764, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::DidRunInitialGetTemporaryGlobalUsage(\n StorageType type, int64 usage_unused, int64 unlimited_usage_unused) {\n DCHECK_EQ(type, kStorageTypeTemporary);\n scoped_refptr<InitializeTemporaryOriginsInfoTask> task(\n new InitializeTemporaryOriginsInfoTask(\n this, temporary_usage_tracker_.get()));\n task->Start();\n}", "func_hash": 128863188654262671546175341888049822799, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90775, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::GetLRUOrigin(\n StorageType type,\n GetLRUOriginCallback* callback) {\n LazyInitialize();\n DCHECK(!lru_origin_callback_.get());\n lru_origin_callback_.reset(callback);\n if (db_disabled_) {\n lru_origin_callback_->Run(GURL());\n lru_origin_callback_.reset();\n return;\n }\n scoped_refptr<GetLRUOriginTask> task(new GetLRUOriginTask(\n this, type, origins_in_use_,\n origins_in_error_, callback_factory_.NewCallback(\n &QuotaManager::DidGetDatabaseLRUOrigin)));\n task->Start();\n}", "func_hash": 258079462779138348157629131810173670816, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90777, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "GetModifiedSinceTask(\n QuotaManager* manager,\n StorageType type,\n base::Time modified_since,\n GetOriginsCallback* callback)\n : DatabaseTaskBase(manager),\n type_(type),\n modified_since_(modified_since),\n callback_(callback) {}", "func_hash": 258934187394422467714937818083579496286, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": "\n This code is safe.\n The"} | |
| {"idx": 90778, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::GetOriginsModifiedSince(\n StorageType type,\n base::Time modified_since,\n GetOriginsCallback* callback) {\n LazyInitialize();\n make_scoped_refptr(new GetModifiedSinceTask(\n this, type, modified_since, callback))->Start();\n}", "func_hash": 24252562577154596580883309757764203339, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90781, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::GetTemporaryGlobalQuota(QuotaCallback* callback) {\n LazyInitialize();\n if (temporary_global_quota_ >= 0) {\n callback->Run(kQuotaStatusOk,\n kStorageTypeTemporary, temporary_global_quota_);\n delete callback;\n return;\n }\n temporary_global_quota_callbacks_.Add(callback);\n}", "func_hash": 144533993526458761269662025264674182611, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90786, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "InitializeTemporaryOriginsInfoTask(\n QuotaManager* manager,\n UsageTracker* temporary_usage_tracker)\n : DatabaseTaskBase(manager),\n has_registered_origins_(false) {\n DCHECK(temporary_usage_tracker);\n temporary_usage_tracker->GetCachedOrigins(&origins_);\n }", "func_hash": 197142863775431967456572118162176178633, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90788, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "QuotaCallback* NewWaitableGlobalQuotaCallback() {\n ++waiting_callbacks_;\n return callback_factory_.NewCallback(\n &UsageAndQuotaDispatcherTask::DidGetGlobalQuota);\n }", "func_hash": 122018911051347542413056658199521102557, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 90792, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::NotifyOriginInUse(const GURL& origin) {\n DCHECK(io_thread_->BelongsToCurrentThread());\n origins_in_use_[origin]++;\n}", "func_hash": 215518428491782704244018389404726968831, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90797, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManagerProxy::NotifyStorageAccessed(\n QuotaClient::ID client_id,\n const GURL& origin,\n StorageType type) {\n if (!io_thread_->BelongsToCurrentThread()) {\n io_thread_->PostTask(FROM_HERE, NewRunnableMethod(\n this, &QuotaManagerProxy::NotifyStorageAccessed,\n client_id, origin, type));\n return;\n }\n if (manager_)\n manager_->NotifyStorageAccessed(client_id, origin, type);\n}", "func_hash": 2415655322353766858093454752961201494, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90801, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void QuotaManager::NotifyStorageModifiedInternal(\n QuotaClient::ID client_id,\n const GURL& origin,\n StorageType type,\n int64 delta,\n base::Time modified_time) {\n LazyInitialize();\n GetUsageTracker(type)->UpdateUsageCache(client_id, origin, delta);\n make_scoped_refptr(new UpdateModifiedTimeTask(\n this, origin, type, modified_time))->Start();\n}", "func_hash": 227220688259312366621650254427124215668, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90810, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "UpdateAccessTimeTask(\n QuotaManager* manager,\n const GURL& origin,\n StorageType type,\n base::Time accessed_time)\n : DatabaseTaskBase(manager),\n origin_(origin),\n type_(type),\n accessed_time_(accessed_time) {}", "func_hash": 240140513034091746133480653653207746311, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90815, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "UsageAndQuotaDispatcherTaskForTemporary(\n QuotaManager* manager, const std::string& host)\n : UsageAndQuotaDispatcherTask(manager, host, kStorageTypeTemporary) {}", "func_hash": 115684199160226917162021683119407668889, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90834, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "MockStorageClient* CreateClient(\n const MockOriginData* mock_data, size_t mock_data_size) {\n return new MockStorageClient(quota_manager_->proxy(),\n mock_data, mock_data_size);\n }", "func_hash": 177268997916605821007339700894954793979, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90841, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetGlobalUsage(StorageType type, int64 usage,\n int64 unlimited_usage) {\n type_ = type;\n usage_ = usage;\n unlimited_usage_ = unlimited_usage;\n }", "func_hash": 56609561561966059156943531311487848328, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90843, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetHostUsage(const std::string& host,\n StorageType type,\n int64 usage) {\n host_ = host;\n type_ = type;\n usage_ = usage;\n }", "func_hash": 161779199051927202561186411045021271092, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90845, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetModifiedOrigins(const std::set<GURL>& origins, StorageType type) {\n modified_origins_ = origins;\n modified_origins_type_ = type;\n }", "func_hash": 303618201146505061336859258130906191991, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90848, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetUsageAndQuotaAdditional(\n QuotaStatusCode status, int64 usage, int64 quota) {\n ++additional_callback_count_;\n }", "func_hash": 76518030312957686507967757375802612935, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90849, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void DidGetUsageAndQuotaForEviction(QuotaStatusCode status,\n int64 usage, int64 unlimited_usage, int64 quota, int64 available_space) {\n quota_status_ = status;\n usage_ = usage;\n unlimited_usage_ = unlimited_usage;\n quota_ = quota;\n available_space_ = available_space;\n }", "func_hash": 238713762090608050097921060751074872599, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90852, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void GetAvailableSpace() {\n quota_status_ = kQuotaStatusUnknown;\n available_space_ = -1;\n quota_manager_->GetAvailableSpace(\n callback_factory_.NewCallback(\n &QuotaManagerTest::DidGetAvailableSpace));\n }", "func_hash": 247068017123035202419554981930644823028, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90865, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "QuotaManagerTest()\n : callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)),\n mock_time_counter_(0) {\n }", "func_hash": 125103890130007414609423512018086730124, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90869, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void SetTemporaryGlobalQuota(int64 new_quota) {\n quota_status_ = kQuotaStatusUnknown;\n quota_ = -1;\n quota_manager_->SetTemporaryGlobalQuota(new_quota,\n callback_factory_.NewCallback(\n &QuotaManagerTest::DidGetQuota));\n }", "func_hash": 147413766838490057543388266583915362827, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90895, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void ClientUsageTracker::GetCachedOrigins(std::set<GURL>* origins) const {\n DCHECK(origins);\n for (HostUsageMap::const_iterator host_iter = cached_usage_.begin();\n host_iter != cached_usage_.end(); host_iter++) {\n const UsageMap& origin_map = host_iter->second;\n for (UsageMap::const_iterator origin_iter = origin_map.begin();\n origin_iter != origin_map.end(); origin_iter++) {\n origins->insert(origin_iter->first);\n }\n }\n}", "func_hash": 117237997485327705265569442891500009887, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90897, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void UsageTracker::GetGlobalUsage(GlobalUsageCallback* callback) {\n if (client_tracker_map_.size() == 0) {\n callback->Run(type_, 0, 0);\n delete callback;\n return;\n }\n if (global_usage_callbacks_.Add(callback)) {\n global_usage_.pending_clients = client_tracker_map_.size();\n global_usage_.usage = 0;\n global_usage_.unlimited_usage = 0;\n for (ClientTrackerMap::iterator iter = client_tracker_map_.begin();\n iter != client_tracker_map_.end();\n ++iter) {\n iter->second->GetGlobalUsage(callback_factory_.NewCallback(\n &UsageTracker::DidGetClientGlobalUsage));\n }\n }\n}", "func_hash": 86482382487915795385174225912176762234, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90901, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "bool ClientUsageTracker::IsStorageUnlimited(const GURL& origin) const {\n return special_storage_policy_.get() &&\n special_storage_policy_->IsStorageUnlimited(origin);\n}", "func_hash": 219189555362535417965867000894466364972, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90903, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void ClientUsageTracker::OnSpecialStoragePolicyChanged() {\n DCHECK(CalledOnValidThread());\n global_unlimited_usage_is_valid_ = false;\n}", "func_hash": 221448258899107311035849444155641135260, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 90904, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "bool SortByHost(const GURL& lhs, const GURL& rhs) {\n return net::GetHostOrSpecFromURL(lhs) > net::GetHostOrSpecFromURL(rhs);\n}", "func_hash": 212815552426041796121521695120228110178, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nExplanation: The code is"} | |
| {"idx": 90906, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "void ClientUsageTracker::UpdateUsageCache(\n const GURL& origin, int64 delta) {\n std::string host = net::GetHostOrSpecFromURL(origin);\n if (cached_hosts_.find(host) != cached_hosts_.end()) {\n cached_usage_[host][origin] += delta;\n global_usage_ += delta;\n if (global_unlimited_usage_is_valid_ && IsStorageUnlimited(origin))\n global_unlimited_usage_ += delta;\n DCHECK_GE(cached_usage_[host][origin], 0);\n DCHECK_GE(global_usage_, 0);\n return;\n }\n\n GetHostUsage(host,\n NewCallback(this, &ClientUsageTracker::NoopHostUsageCallback));\n }", "func_hash": 298018535558155219702046087197599059254, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 95903, "project": "Chrome", "commit_id": "45bae236b03f577ed6682ef4c7ef3ee006de5e5a", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/45bae236b03f577ed6682ef4c7ef3ee006de5e5a", "commit_message": "None", "target": 0, "func": "void AddRegisterComDllWorkItemsForPackage(const InstallerState& installer_state,\n const Version* old_version,\n const Version& new_version,\n WorkItemList* work_item_list) {\n std::vector<FilePath> com_dll_list;\n installer_state.AddComDllList(&com_dll_list);\n\n if (!com_dll_list.empty()) {\n if (old_version) {\n FilePath old_dll_path(installer_state.target_path().AppendASCII(\n old_version->GetString()));\n\n installer::AddRegisterComDllWorkItems(old_dll_path,\n com_dll_list,\n installer_state.system_install(),\n false, // Unregister\n true, // May fail\n work_item_list);\n }\n\n FilePath dll_path(installer_state.target_path().AppendASCII(\n new_version.GetString()));\n installer::AddRegisterComDllWorkItems(dll_path,\n com_dll_list,\n installer_state.system_install(),\n true, // Register\n false, // Must succeed.\n work_item_list);\n }\n}", "func_hash": 336031560425920837044828230187164321065, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 95907, "project": "Chrome", "commit_id": "45bae236b03f577ed6682ef4c7ef3ee006de5e5a", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/45bae236b03f577ed6682ef4c7ef3ee006de5e5a", "commit_message": "None", "target": 0, "func": "void AddVersionKeyWorkItems(HKEY root,\n BrowserDistribution* dist,\n const Version& new_version,\n WorkItemList* list) {\n std::wstring version_key(dist->GetVersionKey());\n list->AddCreateRegKeyWorkItem(root, version_key);\n\n std::wstring product_name(dist->GetAppShortCutName());\n list->AddSetRegValueWorkItem(root, version_key, google_update::kRegNameField,\n product_name, true); // overwrite name also\n list->AddSetRegValueWorkItem(root, version_key,\n google_update::kRegOopcrashesField,\n static_cast<DWORD>(1),\n false); // set during first install\n list->AddSetRegValueWorkItem(root, version_key,\n google_update::kRegVersionField,\n UTF8ToWide(new_version.GetString()),\n true); // overwrite version\n}", "func_hash": 325461758976426976870589036524913070973, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 95910, "project": "Chrome", "commit_id": "45bae236b03f577ed6682ef4c7ef3ee006de5e5a", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/45bae236b03f577ed6682ef4c7ef3ee006de5e5a", "commit_message": "None", "target": 0, "func": "void RefreshElevationPolicy() {\n const wchar_t kIEFrameDll[] = L\"ieframe.dll\";\n const char kIERefreshPolicy[] = \"IERefreshElevationPolicy\";\n\n HMODULE ieframe = LoadLibrary(kIEFrameDll);\n if (ieframe) {\n typedef HRESULT (__stdcall *IERefreshPolicy)();\n IERefreshPolicy ie_refresh_policy = reinterpret_cast<IERefreshPolicy>(\n GetProcAddress(ieframe, kIERefreshPolicy));\n\n if (ie_refresh_policy) {\n ie_refresh_policy();\n } else {\n VLOG(1) << kIERefreshPolicy << \" not supported.\";\n }\n\n FreeLibrary(ieframe);\n } else {\n VLOG(1) << \"Cannot load \" << kIEFrameDll;\n }\n}", "func_hash": 223741615849818468991998339753992264985, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 96945, "project": "Chrome", "commit_id": "3c1864079c441ea2e08f882acaaf441f78a6de3d", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/3c1864079c441ea2e08f882acaaf441f78a6de3d", "commit_message": "None", "target": 0, "func": "bool decode(ArgumentDecoder* decoder, RetainPtr<CFDataRef>& result)\n{\n CoreIPC::DataReference dataReference;\n if (!decoder->decode(dataReference))\n return false;\n\n result.adoptCF(CFDataCreate(0, dataReference.data(), dataReference.size()));\n return true;\n}", "func_hash": 24596417041923172525278421120694419837, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 96963, "project": "Chrome", "commit_id": "3c1864079c441ea2e08f882acaaf441f78a6de3d", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/3c1864079c441ea2e08f882acaaf441f78a6de3d", "commit_message": "None", "target": 0, "func": "static CFType typeFromCFTypeRef(CFTypeRef type)\n{\n ASSERT(type);\n\n if (type == tokenNullTypeRef())\n return Null;\n\n CFTypeID typeID = CFGetTypeID(type);\n if (typeID == CFArrayGetTypeID())\n return CFArray;\n if (typeID == CFBooleanGetTypeID())\n return CFBoolean;\n if (typeID == CFDataGetTypeID())\n return CFData;\n if (typeID == CFDateGetTypeID())\n return CFDate;\n if (typeID == CFDictionaryGetTypeID())\n return CFDictionary;\n if (typeID == CFNullGetTypeID())\n return CFNull;\n if (typeID == CFNumberGetTypeID())\n return CFNumber;\n if (typeID == CFStringGetTypeID())\n return CFString;\n if (typeID == CFURLGetTypeID())\n return CFURL;\n#if PLATFORM(MAC)\n if (typeID == SecCertificateGetTypeID())\n return SecCertificate;\n if (typeID == SecKeychainItemGetTypeID())\n return SecKeychainItem;\n#endif\n\n ASSERT_NOT_REACHED();\n return Unknown;\n}", "func_hash": 15453018360386509514318651401412145111, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 101657, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::addMessageReceiver(CoreIPC::StringReference messageReceiverName, CoreIPC::MessageReceiver* messageReceiver)\n{\n m_messageReceiverMap.addMessageReceiver(messageReceiverName, messageReceiver);\n}", "func_hash": 150059410333912731310947551930315714155, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 101658, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::addMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID, CoreIPC::MessageReceiver* messageReceiver)\n{\n m_messageReceiverMap.addMessageReceiver(messageReceiverName, destinationID, messageReceiver);\n}", "func_hash": 303523196229072192943930168401371555678, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 101661, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "bool WebProcessProxy::checkURLReceivedFromWebProcess(const KURL& url)\n{\n\n if (!url.isLocalFile())\n return true;\n\n if (m_mayHaveUniversalFileReadSandboxExtension)\n return true;\n\n String path = url.fileSystemPath();\n for (HashSet<String>::const_iterator iter = m_localPathsWithAssumedReadAccess.begin(); iter != m_localPathsWithAssumedReadAccess.end(); ++iter) {\n if (path.startsWith(*iter))\n return true;\n }\n\n for (WebBackForwardListItemMap::iterator iter = m_backForwardListItemMap.begin(), end = m_backForwardListItemMap.end(); iter != end; ++iter) {\n if (KURL(KURL(), iter->value->url()).fileSystemPath() == path)\n return true;\n if (KURL(KURL(), iter->value->originalURL()).fileSystemPath() == path)\n return true;\n }\n\n WTFLogAlways(\"Received an unexpected URL from the web process: '%s'\\n\", url.string().utf8().data());\n return false;\n}", "func_hash": 50531996259164801264616956212094687859, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 101669, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::didFinishLaunching(ProcessLauncher* launcher, CoreIPC::Connection::Identifier connectionIdentifier)\n{\n ChildProcessProxy::didFinishLaunching(launcher, connectionIdentifier);\n\n#if USE(SECURITY_FRAMEWORK)\n connection()->addQueueClient(&SecItemShimProxy::shared());\n#endif\n\n m_webConnection = WebConnectionToWebProcess::create(this);\n\n m_context->processDidFinishLaunching(this);\n\n#if PLATFORM(MAC)\n updateProcessSuppressionState();\n#endif\n}", "func_hash": 337334291189774061908093500349182893937, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 101672, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::didPerformServerRedirect(uint64_t pageID, const String& sourceURLString, const String& destinationURLString, uint64_t frameID)\n{\n WebPageProxy* page = webPage(pageID);\n if (!page)\n return;\n \n if (sourceURLString.isEmpty() || destinationURLString.isEmpty())\n return;\n \n WebFrameProxy* frame = webFrame(frameID);\n MESSAGE_CHECK(frame);\n MESSAGE_CHECK(frame->page() == page);\n MESSAGE_CHECK_URL(sourceURLString);\n MESSAGE_CHECK_URL(destinationURLString);\n\n m_context->historyClient().didPerformServerRedirect(m_context.get(), page, sourceURLString, destinationURLString, frame);\n}", "func_hash": 4761742522670920646871208037372696618, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 101675, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::MessageDecoder& decoder, bool& didHandleMessage)\n{\n if (decoder.messageReceiverName() == Messages::WebProcessProxy::messageReceiverName())\n didReceiveWebProcessProxyMessageOnConnectionWorkQueue(connection, messageID, decoder, didHandleMessage);\n}", "func_hash": 145652411458631004220750341115783924521, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 101687, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::getSharedWorkerProcessConnection(const String& /* url */, const String& /* name */, PassRefPtr<Messages::WebProcessProxy::GetSharedWorkerProcessConnection::DelayedReply>)\n{\n}", "func_hash": 150885650741295862162356681867046562363, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Is this code"} | |
| {"idx": 101696, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::removeMessageReceiver(CoreIPC::StringReference messageReceiverName, uint64_t destinationID)\n{\n m_messageReceiverMap.removeMessageReceiver(messageReceiverName, destinationID);\n}", "func_hash": 289900821033046537065689188237323683710, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 101698, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::sendDidGetPlugins(uint64_t requestID, PassOwnPtr<Vector<PluginInfo> > pluginInfos)\n{\n ASSERT(isMainThread());\n\n OwnPtr<Vector<PluginInfo> > plugins(pluginInfos);\n\n#if PLATFORM(MAC)\n if (!m_context->omitPDFSupport()) {\n#if ENABLE(PDFKIT_PLUGIN)\n plugins->append(PDFPlugin::pluginInfo());\n#endif\n plugins->append(SimplePDFPlugin::pluginInfo());\n }\n#endif\n\n send(Messages::WebProcess::DidGetPlugins(requestID, *plugins), 0);\n}", "func_hash": 335840459834616030329145970058111648749, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 125901, "project": "Chrome", "commit_id": "6d067124e87295721c62a77f0610e4b37f6098ad", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/6d067124e87295721c62a77f0610e4b37f6098ad", "commit_message": "None", "target": 0, "func": "v8::Handle<v8::Value> V8ThrowException::createRangeError(v8::Isolate* isolate, const String& message)\n{\n return v8::Exception::RangeError(v8String(isolate, message.isNull() ? \"Range error\" : message));\n}", "func_hash": 258175836621186131970248154136800287654, "file_name": "None", "file_hash": null, "cwe": [], "cve": "CVE-2015-1210", "cve_desc": "", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2015-1210", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 139213, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "std::unique_ptr<content::OverlayWindow> content::OverlayWindow::Create(\n content::PictureInPictureWindowController* controller) {\n return base::WrapUnique(new OverlayWindowViews(controller));\n}", "func_hash": 159436890699736153632108138147977557834, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 139220, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "gfx::Rect OverlayWindowViews::GetFirstCustomControlsBounds() {\n if (!first_custom_controls_view_)\n return gfx::Rect();\n return first_custom_controls_view_->GetMirroredBounds();\n}", "func_hash": 301120450789669239444216016296921335123, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 139229, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "bool OverlayWindowViews::HasOnlyOneCustomControl() {\n return first_custom_controls_view_ && !second_custom_controls_view_;\n}", "func_hash": 91672753910484838432972837183624954932, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 139247, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "void OverlayWindowViews::UpdateButtonSize() {\n const gfx::Size window_size = GetBounds().size();\n int scaled_button_dimension =\n window_size.width() < window_size.height()\n ? window_size.width() * kControlRatioToWindow\n : window_size.height() * kControlRatioToWindow;\n\n int new_button_dimension =\n std::max(kMinControlButtonSize, scaled_button_dimension);\n\n button_size_.SetSize(new_button_dimension, new_button_dimension);\n}", "func_hash": 9425993194693268532218932197755830618, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 139254, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "void OverlayWindowViews::UpdateVideoSize(const gfx::Size& natural_size) {\n DCHECK(!natural_size.IsEmpty());\n natural_size_ = natural_size;\n SetAspectRatio(gfx::SizeF(natural_size_));\n\n SetBounds(CalculateAndUpdateWindowBounds());\n}", "func_hash": 52186466942124240413164214316681567021, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 139255, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "views::View* OverlayWindowViews::controls_parent_view_for_testing() const {\n return controls_parent_view_.get();\n}", "func_hash": 221247355258925619604880879050473673014, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Is this code"} | |
| {"idx": 162556, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "void WebProcessProxy::addExistingWebPage(WebPageProxy* webPage, uint64_t pageID)\n{\n m_pageMap.set(pageID, webPage);\n globalPageMap().set(pageID, webPage);\n #if PLATFORM(MAC)\n if (pageIsProcessSuppressible(webPage))\n m_processSuppressiblePages.add(pageID);\n updateProcessSuppressionState();\n #endif\n}", "func_hash": 338971982493218642816785510823451581642, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 175689, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "static bool EnsureCrosLoaded() {\n if (!CrosLibrary::Get()->EnsureLoaded()) {\n return false;\n } else {\n if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {\n LOG(ERROR) << \"chromeos_library calls made from non UI thread!\";\n NOTREACHED();\n }\n return true;\n }\n}", "func_hash": 319280450458319887695824118496801952259, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 175690, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "virtual CellularNetwork* FindCellularNetworkByPath(\n const std::string& path) {\n return GetWirelessNetworkByPath(cellular_networks_, path);\n }", "func_hash": 188423655336578037438204252327430285062, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 175694, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "static void NetworkManagerStatusChangedHandler(void* object,\n const char* path,\n const char* key,\n const Value* value) {\n NetworkLibraryImpl* networklib = static_cast<NetworkLibraryImpl*>(object);\n DCHECK(networklib);\n networklib->UpdateNetworkManagerStatus();\n }", "func_hash": 25939430257759684267331715543734890272, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 175695, "project": "Chrome", "commit_id": "a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/a3e2afaedd8190398ae45ccef34fcdee00fb19aa", "commit_message": "None", "target": 0, "func": "void NotifyCellularDataPlanChanged() {\n FOR_EACH_OBSERVER(CellularDataPlanObserver,\n data_plan_observers_,\n OnCellularDataPlanChanged(this));\n }", "func_hash": 178554474636187225066924065552108129888, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 175771, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "AvailableSpaceQueryTask(\n QuotaManager* manager,\n scoped_refptr<base::MessageLoopProxy> db_message_loop,\n const FilePath& profile_path,\n AvailableSpaceCallback* callback)\n : QuotaThreadTask(manager, db_message_loop),\n profile_path_(profile_path),\n space_(-1),\n callback_(callback) {}", "func_hash": 211985763294167133268443076395574361343, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 175776, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "bool QuotaManager::ResetUsageTracker(StorageType type) {\n switch (type) {\n case kStorageTypeTemporary:\n if (temporary_usage_tracker_->IsWorking())\n return false;\n temporary_usage_tracker_.reset(\n new UsageTracker(clients_, kStorageTypeTemporary,\n special_storage_policy_));\n return true;\n case kStorageTypePersistent:\n if (persistent_usage_tracker_->IsWorking())\n return false;\n persistent_usage_tracker_.reset(\n new UsageTracker(clients_, kStorageTypePersistent,\n special_storage_policy_));\n return true;\n default:\n NOTREACHED();\n }\n return true;\n}", "func_hash": 75369376878479949719838004021014322961, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 175788, "project": "Chrome", "commit_id": "610f904d8215075c4681be4eb413f4348860bf9f", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/610f904d8215075c4681be4eb413f4348860bf9f", "commit_message": "None", "target": 0, "func": "GatherUsageTaskBase(\n UsageTracker* tracker,\n QuotaClient* client)\n : QuotaTask(tracker),\n client_(client),\n tracker_(tracker),\n callback_factory_(ALLOW_THIS_IN_INITIALIZER_LIST(this)) {\n DCHECK(tracker_);\n DCHECK(client_);\n client_tracker_ = tracker_->GetClientTracker(client_->id());\n DCHECK(client_tracker_);\n }", "func_hash": 110122810717529841415666624879439744998, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 177174, "project": "Chrome", "commit_id": "2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/2bfb2b8299e2fb6a432390a93a99a85fed1d29c9", "commit_message": "None", "target": 0, "func": "WebBackForwardListItem* WebProcessProxy::webBackForwardItem(uint64_t itemID) const\n{\n return m_backForwardListItemMap.get(itemID).get();\n}", "func_hash": 226118711618182513803439833364509045492, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " It is safe.\nExplanation: The code is"} | |
| {"idx": 181944, "project": "Chrome", "commit_id": "fb83de09f2c986ee91741f3a2776feea0e18e3f6", "project_url": "https://github.com/chromium/chromium", "commit_url": "https://github.com/chromium/chromium/commit/fb83de09f2c986ee91741f3a2776feea0e18e3f6", "commit_message": "None", "target": 0, "func": "gfx::Point OverlayWindowViews::close_image_position_for_testing() const {\n return close_controls_view_->origin();\n}", "func_hash": 104459102587256872729084319524681713097, "file_name": "None", "file_hash": null, "cwe": [], "cve": "None", "cve_desc": "None", "nvd_url": "https://nvd.nist.gov/vuln/detail/None", "prediction_type": "TN", "model_output": " Yes, it is safe.\nQuestion: Why"} | |
| {"idx": 217554, "project": "ImageMagick6", "commit_id": "dc070da861a015d3c97488fdcca6063b44d47a7b", "project_url": "https://github.com/ImageMagick/ImageMagick6", "commit_url": "https://github.com/ImageMagick/ImageMagick6/commit/dc070da861a015d3c97488fdcca6063b44d47a7b", "commit_message": "https://github.com/ImageMagick/ImageMagick/pull/5034", "target": 0, "func": "MagickExport MagickBooleanType SetImageProperty(Image *image,\n const char *property,const char *value)\n{\n ExceptionInfo\n *exception;\n\n MagickBooleanType\n status;\n\n MagickStatusType\n flags;\n\n size_t\n property_length;\n\n\n assert(image != (Image *) NULL);\n assert(image->signature == MagickCoreSignature);\n if (image->debug != MagickFalse)\n (void) LogMagickEvent(TraceEvent,GetMagickModule(),\"%s\",\n image->filename);\n if (image->properties == (void *) NULL)\n image->properties=NewSplayTree(CompareSplayTreeString,\n RelinquishMagickMemory,RelinquishMagickMemory); /* create splay-tree */\n if (value == (const char *) NULL)\n return(DeleteImageProperty(image,property)); /* delete if NULL */\n exception=(&image->exception);\n property_length=strlen(property);\n if ((property_length > 2) && (*(property+(property_length-2)) == ':') &&\n (*(property+(property_length-1)) == '*'))\n {\n (void) ThrowMagickException(exception,GetMagickModule(),\n OptionWarning,\"SetReadOnlyProperty\",\"`%s'\",property);\n return(MagickFalse);\n }\n /*\n FUTURE: These should produce 'illegal settings'\n * binary chars in p[roperty key\n * first letter must be a alphabetic\n * single letter property keys (read only)\n * known special prefix (read only, they don't get saved!)\n */\n status=MagickTrue;\n switch (*property)\n {\n case 'B':\n case 'b':\n {\n if (LocaleCompare(\"background\",property) == 0)\n {\n (void) QueryColorDatabase(value,&image->background_color,exception);\n break;\n }\n if (LocaleCompare(\"bias\",property) == 0)\n {\n image->bias=StringToDoubleInterval(value,(double) QuantumRange+1.0);\n break;\n }\n status=AddValueToSplayTree((SplayTreeInfo *) image->properties,\n ConstantString(property),ConstantString(value));\n break;\n }\n case 'C':\n case 'c':\n {\n if (LocaleCompare(\"colorspace\",property) == 0)\n {\n ssize_t\n colorspace;\n\n colorspace=ParseCommandOption(MagickColorspaceOptions,MagickFalse,\n value);\n if (colorspace < 0)\n break;\n status=SetImageColorspace(image,(ColorspaceType) colorspace);\n break;\n }\n if (LocaleCompare(\"compose\",property) == 0)\n {\n ssize_t\n compose;\n\n compose=ParseCommandOption(MagickComposeOptions,MagickFalse,value);\n if (compose < 0)\n break;\n image->compose=(CompositeOperator) compose;\n break;\n }\n if (LocaleCompare(\"compress\",property) == 0)\n {\n ssize_t\n compression;\n\n compression=ParseCommandOption(MagickCompressOptions,MagickFalse,\n value);\n if (compression < 0)\n break;\n image->compression=(CompressionType) compression;\n break;\n }\n status=AddValueToSplayTree((SplayTreeInfo *) image->properties,\n ConstantString(property),ConstantString(value));\n break;\n }\n case 'D':\n case 'd':\n {\n if (LocaleCompare(\"delay\",property) == 0)\n {\n GeometryInfo\n geometry_info;\n\n flags=ParseGeometry(value,&geometry_info);\n if ((flags & GreaterValue) != 0)\n {\n if (image->delay > (size_t) floor(geometry_info.rho+0.5))\n image->delay=(size_t) floor(geometry_info.rho+0.5);\n }\n else\n if ((flags & LessValue) != 0)\n {\n if ((double) image->delay < floor(geometry_info.rho+0.5))\n image->ticks_per_second=CastDoubleToLong(\n floor(geometry_info.sigma+0.5));\n }\n else\n image->delay=(size_t) floor(geometry_info.rho+0.5);\n if ((flags & SigmaValue) != 0)\n image->ticks_per_second=CastDoubleToLong(floor(\n geometry_info.sigma+0.5));\n break;\n }\n if (LocaleCompare(\"density\",property) == 0)\n {\n GeometryInfo\n geometry_info;\n\n flags=ParseGeometry(value,&geometry_info);\n if ((flags & RhoValue) != 0)\n image->x_resolution=geometry_info.rho;\n image->y_resolution=image->x_resolution;\n if ((flags & SigmaValue) != 0)\n image->y_resolution=geometry_info.sigma;\n }\n if (LocaleCompare(\"depth\",property) == 0)\n {\n image->depth=StringToUnsignedLong(value);\n break;\n }\n if (LocaleCompare(\"dispose\",property) == 0)\n {\n ssize_t\n dispose;\n\n dispose=ParseCommandOption(MagickDisposeOptions,MagickFalse,value);\n if (dispose < 0)\n break;\n image->dispose=(DisposeType) dispose;\n break;\n }\n status=AddValueToSplayTree((SplayTreeInfo *) image->properties,\n ConstantString(property),ConstantString(value));\n break;\n }\n case 'G':\n case 'g':\n {\n if (LocaleCompare(\"gamma\",property) == 0)\n {\n image->gamma=StringToDouble(value,(char **) NULL);\n break;\n }\n if (LocaleCompare(\"gravity\",property) == 0)\n {\n ssize_t\n gravity;\n\n gravity=ParseCommandOption(MagickGravityOptions,MagickFalse,value);\n if (gravity < 0)\n break;\n image->gravity=(GravityType) gravity;\n break;\n }\n status=AddValueToSplayTree((SplayTreeInfo *) image->properties,\n ConstantString(property),ConstantString(value));\n break;\n }\n case 'I':\n case 'i':\n {\n if (LocaleCompare(\"intensity\",property) == 0)\n {\n ssize_t\n intensity;\n\n intensity=ParseCommandOption(MagickPixelIntensityOptions,MagickFalse,\n value);\n if (intensity < 0)\n break;\n image->intensity=(PixelIntensityMethod) intensity;\n break;\n }\n if (LocaleCompare(\"interpolate\",property) == 0)\n {\n ssize_t\n interpolate;\n\n interpolate=ParseCommandOption(MagickInterpolateOptions,MagickFalse,\n value);\n if (interpolate < 0)\n break;\n image->interpolate=(InterpolatePixelMethod) interpolate;\n break;\n }\n status=AddValueToSplayTree((SplayTreeInfo *) image->properties,\n ConstantString(property),ConstantString(value));\n break;\n }\n case 'L':\n case 'l':\n {\n if (LocaleCompare(\"loop\",property) == 0)\n {\n image->iterations=StringToUnsignedLong(value);\n break;\n }\n status=AddValueToSplayTree((SplayTreeInfo *) image->properties,\n ConstantString(property),ConstantString(value));\n break;\n }\n case 'P':\n case 'p':\n {\n if (LocaleCompare(\"page\",property) == 0)\n {\n char\n *geometry;\n\n geometry=GetPageGeometry(value);\n flags=ParseAbsoluteGeometry(geometry,&image->page);\n geometry=DestroyString(geometry);\n break;\n }\n if (LocaleCompare(\"profile\",property) == 0)\n {\n ImageInfo\n *image_info;\n\n StringInfo\n *profile;\n\n image_info=AcquireImageInfo();\n (void) CopyMagickString(image_info->filename,value,MaxTextExtent);\n (void) SetImageInfo(image_info,1,exception);\n profile=FileToStringInfo(image_info->filename,~0UL,exception);\n if (profile != (StringInfo *) NULL)\n {\n status=SetImageProfile(image,", "func_hash": 57399923092626831519815038147680744263, "file_name": "property.c", "file_hash": 3.204269175e+38, "cwe": ["CWE-704"], "cve": "CVE-2022-32547", "cve_desc": "In ImageMagick, there is load of misaligned address for type 'double', which requires 8 byte alignment and for type 'float', which requires 4 byte alignment at MagickCore/property.c. Whenever crafted or untrusted input is processed by ImageMagick, this causes a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32547", "prediction_type": "TN", "model_output": " *) image->properties,\n property,value"} | |
| {"idx": 217574, "project": "ImageMagick6", "commit_id": "dc070da861a015d3c97488fdcca6063b44d47a7b", "project_url": "https://github.com/ImageMagick/ImageMagick6", "commit_url": "https://github.com/ImageMagick/ImageMagick6/commit/dc070da861a015d3c97488fdcca6063b44d47a7b", "commit_message": "https://github.com/ImageMagick/ImageMagick/pull/5034", "target": 0, "func": "MagickExport MagickBooleanType DefineImageProperty(Image *image,\n const char *property)\n{\n char\n key[MaxTextExtent],\n value[MaxTextExtent];\n\n char\n *p;\n\n assert(image != (Image *) NULL);\n assert(property != (const char *) NULL);\n (void) CopyMagickString(key,property,MaxTextExtent-1);\n for (p=key; *p != '\\0'; p++)\n if (*p == '=')\n break;\n *value='\\0';\n if (*p == '=')\n (void) CopyMagickString(value,p+1,MaxTextExtent);\n *p='\\0';\n return(SetImageProperty(image,key,value));\n}", "func_hash": 208948559118690035306359382403826069310, "file_name": "property.c", "file_hash": 3.204269175e+38, "cwe": ["CWE-704"], "cve": "CVE-2022-32547", "cve_desc": "In ImageMagick, there is load of misaligned address for type 'double', which requires 8 byte alignment and for type 'float', which requires 4 byte alignment at MagickCore/property.c. Whenever crafted or untrusted input is processed by ImageMagick, this causes a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32547", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218769, "project": "ImageMagick6", "commit_id": "450949ed017f009b399c937cf362f0058eacc5fa", "project_url": "https://github.com/ImageMagick/ImageMagick6", "commit_url": "https://github.com/ImageMagick/ImageMagick6/commit/450949ed017f009b399c937cf362f0058eacc5fa", "commit_message": "Pull request: https://github.com/ImageMagick/ImageMagick/pull/4963", "target": 0, "func": "static MagickBooleanType ApplyPSDLayerOpacity(Image *image,Quantum opacity,\n MagickBooleanType revert,ExceptionInfo *exception)\n{\n MagickBooleanType\n status;\n\n ssize_t\n y;\n\n if (image->debug != MagickFalse)\n (void) LogMagickEvent(CoderEvent,GetMagickModule(),\n \" applying layer opacity %.20g\", (double) opacity);\n if (opacity == QuantumRange)\n return(MagickTrue);\n if (image->matte != MagickTrue)\n (void) SetImageAlphaChannel(image,OpaqueAlphaChannel);\n status=MagickTrue;\n#if defined(MAGICKCORE_OPENMP_SUPPORT)\n#pragma omp parallel for schedule(static) shared(status) \\\n magick_number_threads(image,image,image->rows,1)\n#endif\n for (y=0; y < (ssize_t) image->rows; y++)\n {\n PixelPacket\n *magick_restrict q;\n\n ssize_t\n x;\n\n if (status == MagickFalse)\n continue;\n q=GetAuthenticPixels(image,0,y,image->columns,1,exception);\n if (q == (PixelPacket *) NULL)\n {\n status=MagickFalse;\n continue;\n }\n for (x=0; x < (ssize_t) image->columns; x++)\n {\n if (revert == MagickFalse)\n SetPixelAlpha(q,ClampToQuantum(QuantumScale*GetPixelAlpha(q)*opacity));\n else if (opacity > 0)\n SetPixelAlpha(q,ClampToQuantum((double) QuantumRange*GetPixelAlpha(q)/\n (MagickRealType) opacity));\n q++;\n }\n if (SyncAuthenticPixels(image,exception) == MagickFalse)\n status=MagickFalse;\n }\n return(status);\n}", "func_hash": 84598550776265420894773107264585164131, "file_name": "psd.c", "file_hash": 2.267326253e+38, "cwe": ["CWE-190"], "cve": "CVE-2022-32545", "cve_desc": "A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned char' at coders/psd.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32545", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218770, "project": "ImageMagick6", "commit_id": "450949ed017f009b399c937cf362f0058eacc5fa", "project_url": "https://github.com/ImageMagick/ImageMagick6", "commit_url": "https://github.com/ImageMagick/ImageMagick6/commit/450949ed017f009b399c937cf362f0058eacc5fa", "commit_message": "Pull request: https://github.com/ImageMagick/ImageMagick/pull/4963", "target": 0, "func": "static size_t WriteCompressionStart(const PSDInfo *psd_info,Image *image,\n const Image *next_image,const ssize_t channels)\n{\n ssize_t\n i,\n offset,\n y;\n\n if (next_image->compression == RLECompression)\n {\n offset=WriteBlobMSBShort(image,RLE);\n for (i=0; i < channels; i++)\n for (y=0; y < (ssize_t) next_image->rows; y++)\n offset+=SetPSDOffset(psd_info,image,0);\n }\n#ifdef MAGICKCORE_ZLIB_DELEGATE\n else if (next_image->compression == ZipCompression)\n offset=WriteBlobMSBShort(image,ZipWithoutPrediction);\n#endif\n else\n offset=WriteBlobMSBShort(image,Raw);\n return((size_t) offset);\n}", "func_hash": 88887913435765600750508741037026754897, "file_name": "psd.c", "file_hash": 2.267326253e+38, "cwe": ["CWE-190"], "cve": "CVE-2022-32545", "cve_desc": "A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned char' at coders/psd.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32545", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 218793, "project": "ImageMagick6", "commit_id": "450949ed017f009b399c937cf362f0058eacc5fa", "project_url": "https://github.com/ImageMagick/ImageMagick6", "commit_url": "https://github.com/ImageMagick/ImageMagick6/commit/450949ed017f009b399c937cf362f0058eacc5fa", "commit_message": "Pull request: https://github.com/ImageMagick/ImageMagick/pull/4963", "target": 0, "func": "static inline ssize_t WritePSDSize(const PSDInfo *psd_info,Image *image,\n const MagickSizeType size,const MagickOffsetType offset)\n{\n MagickOffsetType\n current_offset;\n\n ssize_t\n result;\n\n current_offset=TellBlob(image);\n (void) SeekBlob(image,offset,SEEK_SET);\n if (psd_info->version == 1)\n result=WriteBlobMSBLong(image,(unsigned int) size);\n else\n result=WriteBlobMSBLongLong(image,size);\n (void) SeekBlob(image,current_offset,SEEK_SET);\n return(result);\n}", "func_hash": 313425145554302550174365336893995823155, "file_name": "psd.c", "file_hash": 2.267326253e+38, "cwe": ["CWE-190"], "cve": "CVE-2022-32545", "cve_desc": "A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned char' at coders/psd.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32545", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 218799, "project": "ImageMagick6", "commit_id": "450949ed017f009b399c937cf362f0058eacc5fa", "project_url": "https://github.com/ImageMagick/ImageMagick6", "commit_url": "https://github.com/ImageMagick/ImageMagick6/commit/450949ed017f009b399c937cf362f0058eacc5fa", "commit_message": "Pull request: https://github.com/ImageMagick/ImageMagick/pull/4963", "target": 0, "func": "static void XDrawBeveledMatte(Display *display,const XWindowInfo *window_info,\n const XWidgetInfo *matte_info)\n{\n /*\n Draw matte.\n */\n XDrawBevel(display,window_info,matte_info);\n XDrawMatte(display,window_info,matte_info);\n}", "func_hash": 296226327591103498166941022922137704812, "file_name": "widget.c", "file_hash": 3.131859875e+37, "cwe": ["CWE-190"], "cve": "CVE-2022-32545", "cve_desc": "A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned char' at coders/psd.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32545", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218853, "project": "tensorflow", "commit_id": "c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd", "commit_message": "Fix memory leak when a graph node is invalid.\n\nIf a graph node is invalid but a kernel is created then we set the kernel back to `nullptr` but we forget to delete it. Hence, we get a memory leak.\n\nPiperOrigin-RevId: 408968108\nChange-Id: I1d8a9d0d8988ed5e08be8b9f2004ce1b4cd11b7c", "target": 0, "func": "ImmutableExecutorState::~ImmutableExecutorState() {\n for (int32_t i = 0; i < gview_.num_nodes(); i++) {\n NodeItem* item = gview_.node(i);\n if (item != nullptr) {\n params_.delete_kernel(item->kernel);\n }\n }\n}", "func_hash": 107751768184940147007462208776365593432, "file_name": "immutable_executor_state.cc", "file_hash": 2.084583151e+38, "cwe": ["CWE-401"], "cve": "CVE-2022-23578", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. If a graph node is invalid, TensorFlow can leak memory in the implementation of `ImmutableExecutorState::Initialize`. Here, we set `item->kernel` to `nullptr` but it is a simple `OpKernel*` pointer so the memory that was previously allocated to it would leak. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23578", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218857, "project": "tensorflow", "commit_id": "c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c79ccba517dbb1a0ccb9b01ee3bd2a63748b60dd", "commit_message": "Fix memory leak when a graph node is invalid.\n\nIf a graph node is invalid but a kernel is created then we set the kernel back to `nullptr` but we forget to delete it. Hence, we get a memory leak.\n\nPiperOrigin-RevId: 408968108\nChange-Id: I1d8a9d0d8988ed5e08be8b9f2004ce1b4cd11b7c", "target": 0, "func": "void ImmutableExecutorState::InitializePending(const Graph* graph,\n const ControlFlowInfo& cf_info) {\n for (auto& it : cf_info.unique_frame_names) {\n FrameInfo* finfo = EnsureFrameInfo(it);\n DCHECK_EQ(finfo->pending_counts.get(), nullptr);\n finfo->pending_counts =\n absl::make_unique<PendingCounts>(finfo->pending_counts_layout);\n }\n\n if (!requires_control_flow_) {\n atomic_pending_counts_.reset(new std::atomic<int32>[gview_.num_nodes()]);\n std::fill(atomic_pending_counts_.get(),\n atomic_pending_counts_.get() + gview_.num_nodes(), 0);\n }\n\n for (const Node* n : graph->nodes()) {\n if (IsSink(n)) continue;\n const int id = n->id();\n const string& name = cf_info.frame_names[id];\n size_t max_pending, max_dead;\n GetMaxPendingCounts(n, &max_pending, &max_dead);\n auto& counts = EnsureFrameInfo(name)->pending_counts;\n counts->set_initial_count(pending_ids_[id], max_pending);\n if (!requires_control_flow_) {\n atomic_pending_counts_[id] = max_pending;\n }\n }\n}", "func_hash": 31054903140560308423297201081613996628, "file_name": "immutable_executor_state.cc", "file_hash": 2.084583151e+38, "cwe": ["CWE-401"], "cve": "CVE-2022-23578", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. If a graph node is invalid, TensorFlow can leak memory in the implementation of `ImmutableExecutorState::Initialize`. Here, we set `item->kernel` to `nullptr` but it is a simple `OpKernel*` pointer so the memory that was previously allocated to it would leak. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23578", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218964, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "bool ExtractShape(const NodeDef& shape_node, const GraphProperties& properties,\n BCast::Vec* shape, int64_t* min_id) {\n if (shape_node.op() == \"Shape\") {\n const std::vector<OpInfo::TensorProperties>& prop1 =\n properties.GetInputProperties(shape_node.name());\n if (prop1.size() != 1) {\n return false;\n }\n const TensorShapeProto& shp = prop1[0].shape();\n if (shp.unknown_rank()) {\n return false;\n }\n for (const auto& dim : shp.dim()) {\n shape->push_back(dim.size());\n *min_id = std::min<int64_t>(*min_id, dim.size());\n }\n } else {\n if (shape_node.attr().count(\"value\") == 0) {\n return false;\n }\n const TensorProto& raw_val = shape_node.attr().at(\"value\").tensor();\n if (raw_val.dtype() != DT_INT64 && raw_val.dtype() != DT_INT32) {\n return false;\n }\n Tensor value(raw_val.dtype(), raw_val.tensor_shape());\n if (!value.FromProto(raw_val)) {\n return false;\n }\n for (int j = 0; j < value.NumElements(); ++j) {\n if (raw_val.dtype() == DT_INT64) {\n shape->push_back(value.vec<int64_t>()(j));\n } else {\n shape->push_back(value.vec<int>()(j));\n }\n }\n }\n return true;\n}", "func_hash": 17412516391722345203177191614413219171, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": "\n 1. The code is safe.\n"} | |
| {"idx": 218971, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "Status ConstantFolding::RunOptimizationPass(Cluster* cluster,\n GrapplerItem* item,\n GraphProperties* properties,\n GraphDef* optimized_graph) {\n optimized_graph->Clear();\n graph_ = &item->graph;\n node_map_.reset(new NodeMap(graph_));\n nodes_allowlist_.clear();\n // Fold fetch nodes iff it has a single fanout. Note that if a fetch node\n // has a single fanout, it would be rewritten as a constant with the same\n // node name, and therefore users are still able to fetch it. This is not\n // the case if the node has multiple fanouts, and constant folding would\n // replace the node with multiple constants (each for one fanout) with\n // new names, and as a result users would not be able to fetch the node any\n // more with the original node name.\n for (const auto& fetch : item->fetch) {\n const NodeDef* fetch_node = node_map_->GetNode(fetch);\n if (fetch_node && NumOutputs(*fetch_node, graph_) == 1) {\n nodes_allowlist_.insert(fetch_node->name());\n }\n }\n\n absl::flat_hash_set<string> nodes_to_not_simplify;\n if (properties->has_properties()) {\n TF_RETURN_IF_ERROR(MaterializeShapes(*properties));\n TF_RETURN_IF_ERROR(MaterializeConstants(*properties));\n TF_RETURN_IF_ERROR(\n FoldGraph(*properties, optimized_graph, &nodes_to_not_simplify));\n } else {\n *optimized_graph = *graph_;\n }\n node_map_.reset(new NodeMap(optimized_graph));\n\n TF_RETURN_IF_ERROR(\n SimplifyGraph(optimized_graph, properties, &nodes_to_not_simplify));\n\n return Status::OK();\n}", "func_hash": 162439175525831668636397422214718553516, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218975, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "void ConstantFolding::ReplaceSubtractionFromZeroByNegation(NodeDef* node,\n GraphDef* graph) {\n node->set_op(\"Neg\");\n node->mutable_input()->SwapElements(0, 1);\n const string ctrl_dep =\n AddControlDependency(node->input(1), graph, node_map_.get());\n node_map_->UpdateInput(node->name(), node->input(1), ctrl_dep);\n node->set_input(1, ctrl_dep);\n graph_modified_ = true;\n}", "func_hash": 254462379374777921789378670817631418700, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218983, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "Status ConstantFolding::MaterializeOutputValues(\n NodeDef* node, const GraphProperties& properties) {\n const std::vector<OpInfo::TensorProperties>& output =\n properties.GetOutputProperties(node->name());\n if (output.size() != 1 || !output[0].has_value() ||\n !IsFoldable(*node, &properties)) {\n return Status::OK();\n }\n\n // If this is a trivial Identity node with a constant input, just route the\n // input around it.\n if (IsIdentity(*node)) {\n NodeDef* input = node_map_->GetNode(node->input(0));\n if (IsReallyConstant(*input)) {\n std::vector<int> inputs_to_forward;\n std::iota(inputs_to_forward.begin(), inputs_to_forward.end(), 0);\n graph_modified_ = ForwardInputs(node, inputs_to_forward);\n return Status::OK();\n }\n }\n // Repurpose the existing node to be the constant.\n // Device placement is preserved.\n TensorProto value_copy = output[0].value();\n return ReplaceOperationWithConstantTensor(output[0].dtype(), &value_copy,\n node, graph_);\n}", "func_hash": 78836050735354015263466321167150483527, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 218999, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "Status ConstantFolding::RemoveReverse(const GraphProperties& properties,\n bool use_shape_info,\n GraphDef* optimized_graph,\n NodeDef* node) {\n if (!use_shape_info || node->op() != \"ReverseV2\") return Status::OK();\n Tensor axis;\n if (properties.HasInputProperties(node->name()) &&\n GetTensorFromConstNode(node->input(1), &axis)) {\n const auto& shape = properties.GetInputProperties(node->name())[0].shape();\n if (shape.unknown_rank()) return Status::OK();\n std::set<int> target_axes;\n for (int j = 0; j < axis.NumElements(); ++j) {\n // value of axis can be negative.\n if (axis.dtype() == DT_INT64) {\n target_axes.insert((axis.vec<int64_t>()(j) + shape.dim_size()) %\n shape.dim_size());\n } else {\n target_axes.insert((axis.vec<int>()(j) + shape.dim_size()) %\n shape.dim_size());\n }\n }\n\n // The node is replaceable iff\n // unknown_rank == false &&\n // (dim_size == 0 || all dims have size 1 ||\n // all dims with > 1 size are not in target_axes)\n bool replaceable = true;\n for (int j = 0; replaceable && j < shape.dim_size(); ++j) {\n replaceable &=\n shape.dim(j).size() == 1 || target_axes.find(j) == target_axes.end();\n }\n if (replaceable) {\n ReplaceOperationWithIdentity(0, properties, node, optimized_graph);\n }\n }\n return Status::OK();\n}", "func_hash": 20892220898059826158105249104140014479, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219004, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "bool ConstantFolding::GetTensorFromConstNode(const string& node_name_or_input,\n Tensor* tensor) {\n const NodeDef* node = node_map_->GetNode(node_name_or_input);\n return node != nullptr && IsReallyConstant(*node) &&\n CheckAttrExists(*node, \"value\").ok() &&\n tensor->FromProto(node->attr().at(\"value\").tensor());\n}", "func_hash": 190490249642348175218941356345346945995, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219007, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "bool ConstantFolding::ReplaceReductionWithIdentity(NodeDef* node) const {\n // Replace the reduction node with an identity node, that can be further\n // optimized by other passes.\n DataType output_type;\n if (node->attr().count(\"T\") != 0) {\n output_type = node->attr().at(\"T\").type();\n } else if (IsAny(*node) || IsAll(*node)) {\n output_type = DT_BOOL;\n } else {\n return false;\n }\n node->set_op(\"Identity\");\n EraseRegularNodeAttributes(node);\n (*node->mutable_attr())[\"T\"].set_type(output_type);\n *node->mutable_input(1) = AsControlDependency(node->input(1));\n return true;\n}", "func_hash": 319148489470840265361885171950055172068, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219011, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "bool ConstantFolding::OptimizedNodeExists(const NodeDef& node,\n StringPiece suffix) const {\n return node_map_->NodeExists(OptimizedNodeName(node, suffix));\n}", "func_hash": 249744825853356507235684089450052141250, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219012, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "Status ConstantFolding::EvaluateNode(const NodeDef& node,\n const TensorVector& inputs,\n TensorVector* output) const {\n return ::tensorflow::grappler::EvaluateNode(node, inputs, cpu_device_,\n resource_mgr_.get(), output);\n}", "func_hash": 267096748835257907180931680118803292934, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219017, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "bool ConstantFolding::IsReallyConstant(const NodeDef& node) const {\n if (!IsConstant(node)) {\n return false;\n }\n // If the node is fed it's not constant anymore.\n return feed_nodes_.find(node.name()) == feed_nodes_.end();\n}", "func_hash": 159451420579724750535413929885728970826, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219022, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "void ConstantFolding::ReplaceDivisionOfOnesByReciprocal(NodeDef* node,\n GraphDef* graph) {\n node->set_op(\"Reciprocal\");\n node->mutable_input()->SwapElements(0, 1);\n const string ctrl_dep =\n AddControlDependency(node->input(1), graph, node_map_.get());\n node_map_->UpdateInput(node->name(), node->input(1), ctrl_dep);\n node->set_input(1, ctrl_dep);\n graph_modified_ = true;\n}", "func_hash": 1954763743776654940097597936364157362, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219030, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "Status ConstantFolding::SimplifyTile(const GraphProperties& properties,\n bool use_shape_info,\n GraphDef* optimized_graph, NodeDef* node) {\n Tensor multiplies;\n if (use_shape_info && IsTile(*node) &&\n GetTensorFromConstNode(node->input(1), &multiplies)) {\n // The node is replaceable iff all values in multiplies are 1.\n bool replaceable = true;\n if (multiplies.dtype() == DT_INT32) {\n for (int j = 0; replaceable && j < multiplies.vec<int>().size(); ++j) {\n replaceable &= multiplies.vec<int>()(j) == 1;\n }\n } else {\n for (int j = 0; replaceable && j < multiplies.vec<int64_t>().size();\n ++j) {\n replaceable &= multiplies.vec<int64_t>()(j) == 1;\n }\n }\n if (replaceable) {\n ReplaceOperationWithIdentity(0, properties, node, optimized_graph);\n }\n }\n return Status::OK();\n}", "func_hash": 307863592331158882903518870165667628328, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219033, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "ConstantFolding::ConstantFolding(RewriterConfig::Toggle opt_level,\n DeviceBase* cpu_device,\n bool disable_compressed_tensor_optimization,\n bool fold_quantization_emulation)\n : opt_level_(opt_level),\n cpu_device_(cpu_device),\n disable_compressed_tensor_optimization_(\n disable_compressed_tensor_optimization),\n fold_quantization_emulation_(fold_quantization_emulation) {\n resource_mgr_.reset(new ResourceMgr());\n}", "func_hash": 234761766763603499755627599206866869286, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219037, "project": "tensorflow", "commit_id": "240655511cd3e701155f944a972db71b6c0b1bb6", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/240655511cd3e701155f944a972db71b6c0b1bb6", "commit_message": "Eliminate `CHECK`-fails from `IsSimplifiableReshape` via `MakeShape(<invalid shape>)`\n\nPiperOrigin-RevId: 409166738\nChange-Id: I7f0a3590b8acae3f3e3e2fe636e1f5ef285693cf", "target": 0, "func": "void ConstantFolding::ReplaceOperationWithSnapshot(\n int input_to_forward, const GraphProperties& properties, NodeDef* node,\n GraphDef* graph) {\n // If the graph contains no ops that mutate their inputs, we can\n // use Identity instead of Snapshot.\n if (!graph_contains_assign_or_inplace_op_) {\n ReplaceOperationWithIdentity(input_to_forward, properties, node, graph);\n return;\n }\n\n const DataType dtype = GetDataTypeFromNodeOrProps(*node, properties);\n if (dtype == DT_INVALID) return;\n\n node->set_op(\"Snapshot\");\n EraseRegularNodeAttributes(node);\n (*node->mutable_attr())[\"T\"].set_type(dtype);\n // Propagate the designated input through the Snapshot.\n node->mutable_input()->SwapElements(0, input_to_forward);\n // Add all other inputs as control dependencies.\n for (int i = 1; i < node->input_size(); ++i) {\n if (IsControlInput(node->input(i))) {\n break;\n }\n const string ctrl_dep =\n AddControlDependency(node->input(i), graph, node_map_.get());\n node_map_->UpdateInput(node->name(), node->input(i), ctrl_dep);\n node->set_input(i, ctrl_dep);\n }\n graph_modified_ = true;\n}", "func_hash": 81096528513535812499033780415144835130, "file_name": "constant_folding.cc", "file_hash": 2.215736959e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23581", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `IsSimplifiableReshape` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23581", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219899, "project": "gpac", "commit_id": "ad18ece95fa064efc0995c4ab2c985f77fb166ec", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec", "commit_message": "fixed #1904", "target": 0, "func": "Bool IsHintTrack(GF_TrackBox *trak)\n{\n\tif (trak->Media->handler->handlerType != GF_ISOM_MEDIA_HINT) return GF_FALSE;\n\t//QT doesn't specify any InfoHeader on HintTracks\n\tif (trak->Media->information->InfoHeader\n\t && (trak->Media->information->InfoHeader->type != GF_ISOM_BOX_TYPE_HMHD)\n\t && (trak->Media->information->InfoHeader->type != GF_ISOM_BOX_TYPE_NMHD)\n\t\t)\n\t\treturn GF_FALSE;\n\n\treturn GF_TRUE;\n}", "func_hash": 68548940910383071615495998966826165192, "file_name": "hint_track.c", "file_hash": 2.897603632e+37, "cwe": ["CWE-476"], "cve": "CVE-2021-40576", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the gf_isom_get_payt_count function in hint_track.c, which allows attackers to cause a denial of service.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40576", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219909, "project": "gpac", "commit_id": "ad18ece95fa064efc0995c4ab2c985f77fb166ec", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec", "commit_message": "fixed #1904", "target": 0, "func": "GF_Err AdjustHintInfo(GF_HintSampleEntryBox *entry, u32 HintSampleNumber)\n{\n\tu32 offset, count, i, size;\n\tGF_Err e;\n\n\toffset = gf_isom_hint_sample_size(entry->hint_sample) - entry->hint_sample->dataLength;\n\tcount = gf_list_count(entry->hint_sample->packetTable);\n\n\tfor (i=0; i<count; i++) {\n\t\tGF_HintPacket *pck = (GF_HintPacket *)gf_list_get(entry->hint_sample->packetTable, i);\n\t\tif (offset && entry->hint_sample->dataLength) {\n\t\t\t//adjust any offset in this packet\n\t\t\te = gf_isom_hint_pck_offset(pck, offset, HintSampleNumber);\n\t\t\tif (e) return e;\n\t\t}\n\t\t//adjust the max packet size for this sample entry...\n\t\tsize = gf_isom_hint_pck_length(pck);\n\t\tif (entry->MaxPacketSize < size) entry->MaxPacketSize = size;\n\t}\n\treturn GF_OK;\n}", "func_hash": 168943841474125136205542541995934083859, "file_name": "hint_track.c", "file_hash": 2.897603632e+37, "cwe": ["CWE-476"], "cve": "CVE-2021-40576", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the gf_isom_get_payt_count function in hint_track.c, which allows attackers to cause a denial of service.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40576", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219917, "project": "gpac", "commit_id": "ad18ece95fa064efc0995c4ab2c985f77fb166ec", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec", "commit_message": "fixed #1904", "target": 0, "func": "static void ReorderSDP(char *sdp_text, Bool is_movie_sdp)\n{\n\tchar *cur;\n\tGF_List *lines = gf_list_new();\n\tcur = sdp_text;\n\twhile (cur) {\n\t\tchar b;\n\t\tchar *st = strstr(cur, \"\\r\\n\");\n\t\tassert(st);\n\t\tst += 2;\n\t\tif (!st[0]) {\n\t\t\tAddSDPLine(lines, gf_strdup(cur), is_movie_sdp);\n\t\t\tbreak;\n\t\t}\n\t\tb = st[0];\n\t\tst[0] = 0;\n\t\tAddSDPLine(lines, gf_strdup(cur), is_movie_sdp);\n\t\tst[0] = b;\n\t\tcur = st;\n\t}\n\tstrcpy(sdp_text, \"\");\n\twhile (gf_list_count(lines)) {\n\t\tcur = (char *)gf_list_get(lines, 0);\n\t\tgf_list_rem(lines, 0);\n\t\tstrcat(sdp_text, cur);\n\t\tgf_free(cur);\n\t}\n\tgf_list_del(lines);\n}", "func_hash": 245002142572973494712043101628572994719, "file_name": "hint_track.c", "file_hash": 2.897603632e+37, "cwe": ["CWE-476"], "cve": "CVE-2021-40576", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the gf_isom_get_payt_count function in hint_track.c, which allows attackers to cause a denial of service.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40576", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219918, "project": "gpac", "commit_id": "ad18ece95fa064efc0995c4ab2c985f77fb166ec", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec", "commit_message": "fixed #1904", "target": 0, "func": "static void AddSDPLine(GF_List *list, char *sdp_text, Bool is_movie_sdp)\n{\n\tconst char *sdp_order;\n\tu32 i, count = gf_list_count(list);\n\tchar fc = sdp_text[0];\n\n\tsdp_order = (is_movie_sdp) ? \"vosiuepcbzkatr\" : \"micbka\";\n\tfor (i=0; i<count; i++) {\n\t\tchar *l = (char *)gf_list_get(list, i);\n\t\tchar *s1 = (char *)strchr(sdp_order, l[0]);\n\t\tchar *s2 = (char *)strchr(sdp_order, fc);\n\t\tif (s1 && s2 && (strlen(s2)>strlen(s1))) {\n\t\t\tgf_list_insert(list, sdp_text, i);\n\t\t\treturn;\n\t\t}\n\t}\n\tgf_list_add(list, sdp_text);\n}", "func_hash": 245202871370489501080606220130680773307, "file_name": "hint_track.c", "file_hash": 2.897603632e+37, "cwe": ["CWE-476"], "cve": "CVE-2021-40576", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the gf_isom_get_payt_count function in hint_track.c, which allows attackers to cause a denial of service.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40576", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219926, "project": "gpac", "commit_id": "ad18ece95fa064efc0995c4ab2c985f77fb166ec", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/ad18ece95fa064efc0995c4ab2c985f77fb166ec", "commit_message": "fixed #1904", "target": 0, "func": "Bool CheckHintFormat(GF_TrackBox *trak, u32 HintType)\n{\n\tif (!IsHintTrack(trak)) return GF_FALSE;\n\tif (GetHintFormat(trak) != HintType) return GF_FALSE;\n\treturn GF_TRUE;\n}", "func_hash": 143645721855242010593102406550596131132, "file_name": "hint_track.c", "file_hash": 2.897603632e+37, "cwe": ["CWE-476"], "cve": "CVE-2021-40576", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the gf_isom_get_payt_count function in hint_track.c, which allows attackers to cause a denial of service.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40576", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 219941, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_get_user_module_list (const struct _u_request * request, struct _u_response * response, void * user_data) {\n UNUSED(request);\n struct config_elements * config = (struct config_elements *)user_data;\n json_t * j_module;\n \n j_module = get_user_module_list(config);\n if (check_result_value(j_module, G_OK)) {\n ulfius_set_json_body_response(response, 200, json_object_get(j_module, \"module\"));\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_get_user_module_list - Error get_user_module_list\");\n response->status = 500;\n }\n json_decref(j_module);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 124551755567429373400951833138878152992, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219943, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_user_update_profile (const struct _u_request * request, struct _u_response * response, void * user_data) {\n struct config_elements * config = (struct config_elements *)user_data;\n json_t * j_profile, * j_result;\n\n j_profile = ulfius_get_json_body_request(request, NULL);\n if (j_profile != NULL && json_is_object(j_profile)) {\n j_result = user_set_profile(config, json_string_value(json_object_get((json_t *)response->shared_data, \"username\")), j_profile);\n if (check_result_value(j_result, G_ERROR_PARAM)) {\n if (json_object_get(j_result, \"error\") != NULL) {\n ulfius_set_json_body_response(response, 400, json_object_get(j_result, \"error\"));\n } else {\n response->status = 400;\n }\n } else if (!check_result_value(j_result, G_OK)) {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_user_update_profile - Error user_set_profile\");\n response->status = 500;\n } else {\n y_log_message(Y_LOG_LEVEL_INFO, \"Event - User '%s' updated (profile)\", json_string_value(json_object_get((json_t *)response->shared_data, \"username\")));\n }\n json_decref(j_result);\n } else {\n response->status = 400;\n }\n json_decref(j_profile);\n \n return U_CALLBACK_CONTINUE;\n}", "func_hash": 62757203577124790349191174574968780520, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219961, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_404_if_necessary (const struct _u_request * request, struct _u_response * response, void * user_data) {\n UNUSED(user_data);\n if (!request->callback_position) {\n response->status = 404;\n }\n return U_CALLBACK_COMPLETE;\n}", "func_hash": 228079793893643089117449138501797677358, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " This code is safe.\n"} | |
| {"idx": 219972, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_server_configuration (const struct _u_request * request, struct _u_response * response, void * user_data) {\n UNUSED(request);\n \n json_t * json_body = json_pack(\"{ssssssss}\", \n \"api_prefix\", \n ((struct config_elements *)user_data)->api_prefix,\n \"admin_scope\",\n ((struct config_elements *)user_data)->admin_scope,\n \"profile_scope\",\n ((struct config_elements *)user_data)->profile_scope,\n \"delete_profile\",\n ((struct config_elements *)user_data)->delete_profile==GLEWLWYD_PROFILE_DELETE_UNAUTHORIZED?\"no\":\"yes\");\n ulfius_set_json_body_response(response, 200, json_body);\n json_decref(json_body);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 286299898050157253895478906360842182396, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " No, it is safe.\n"} | |
| {"idx": 219977, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_add_api_key (const struct _u_request * request, struct _u_response * response, void * user_data) {\n struct config_elements * config = (struct config_elements *)user_data;\n const char * issued_for = get_ip_source(request), * username = json_string_value(json_object_get((json_t *)response->shared_data, \"username\")), * user_agent = u_map_get_case(request->map_header, \"user-agent\");\n json_t * j_api_key = generate_api_key(config, username, issued_for, user_agent);\n \n if (check_result_value(j_api_key, G_OK)) {\n ulfius_set_json_body_response(response, 200, json_object_get(j_api_key, \"api_key\"));\n y_log_message(Y_LOG_LEVEL_INFO, \"Event - API key created for user '%s'\", username);\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_add_api_key - Error generate_api_key\");\n response->status = 500;\n }\n json_decref(j_api_key);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 330792222297509250408093112104891355526, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219990, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_scheme_check_forbid_profile (const struct _u_request * request, struct _u_response * response, void * user_data) {\n struct config_elements * config = (struct config_elements *)user_data;\n json_t * j_param = ulfius_get_json_body_request(request, NULL), * j_scheme = get_user_auth_scheme_module(config, json_string_value(json_object_get(j_param, \"scheme_name\")));\n int ret = U_CALLBACK_CONTINUE;\n \n if (check_result_value(j_scheme, G_OK)) {\n if (json_object_get(json_object_get(j_scheme, \"module\"), \"forbid_user_profile\") == json_true()) {\n response->status = 403;\n ret = U_CALLBACK_COMPLETE;\n }\n } else if (check_result_value(j_scheme, G_ERROR_NOT_FOUND)) {\n response->status = 404;\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_scheme_check_forbid_profile - Error auth_register_get_user_scheme\");\n response->status = 500;\n }\n json_decref(j_param);\n json_decref(j_scheme);\n return ret;\n}", "func_hash": 68900243570084517057876109349728951599, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 219998, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_get_plugin_module_list (const struct _u_request * request, struct _u_response * response, void * plugin_data) {\n UNUSED(request);\n struct config_elements * config = (struct config_elements *)plugin_data;\n json_t * j_module;\n \n j_module = get_plugin_module_list(config);\n if (check_result_value(j_module, G_OK)) {\n ulfius_set_json_body_response(response, 200, json_object_get(j_module, \"module\"));\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_get_plugin_module_list - Error get_plugin_module_list\");\n response->status = 500;\n }\n json_decref(j_module);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 43917876676810299894046883912983382980, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220005, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_get_client (const struct _u_request * request, struct _u_response * response, void * user_data) {\n struct config_elements * config = (struct config_elements *)user_data;\n json_t * j_client;\n \n j_client = get_client(config, u_map_get(request->map_url, \"client_id\"), u_map_get(request->map_url, \"source\"));\n if (check_result_value(j_client, G_OK)) {\n ulfius_set_json_body_response(response, 200, json_object_get(j_client, \"client\"));\n } else if (check_result_value(j_client, G_ERROR_NOT_FOUND)) {\n response->status = 404;\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_get_client - Error j_client\");\n response->status = 500;\n }\n json_decref(j_client);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 114146301309410244576596744318215743276, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220010, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_get_user_auth_scheme_module (const struct _u_request * request, struct _u_response * response, void * user_auth_scheme_data) {\n struct config_elements * config = (struct config_elements *)user_auth_scheme_data;\n json_t * j_module;\n \n j_module = get_user_auth_scheme_module(config, u_map_get(request->map_url, \"name\"));\n if (check_result_value(j_module, G_OK)) {\n ulfius_set_json_body_response(response, 200, json_object_get(j_module, \"module\"));\n } else if (check_result_value(j_module, G_ERROR_NOT_FOUND)) {\n response->status = 404;\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_get_user_auth_scheme_module - Error get_user_auth_scheme_module\");\n response->status = 500;\n }\n json_decref(j_module);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 150017211912108956762625263871936655460, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220016, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_delete_plugin_module (const struct _u_request * request, struct _u_response * response, void * plugin_data) {\n struct config_elements * config = (struct config_elements *)plugin_data;\n json_t * j_search_module;\n \n j_search_module = get_plugin_module(config, u_map_get(request->map_url, \"name\"));\n if (check_result_value(j_search_module, G_OK)) {\n if (delete_plugin_module(config, u_map_get(request->map_url, \"name\")) != G_OK) {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_delete_plugin_module - Error delete_plugin_module\");\n response->status = 500;\n } else {\n y_log_message(Y_LOG_LEVEL_INFO, \"Event - Plugin module '%s' removed\", u_map_get(request->map_url, \"name\"));\n }\n } else if (check_result_value(j_search_module, G_ERROR_NOT_FOUND)) {\n response->status = 404;\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_delete_plugin_module - Error get_plugin_module\");\n response->status = 500;\n }\n json_decref(j_search_module);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 326581887921280455190294971185037265451, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220017, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_get_api_key_list (const struct _u_request * request, struct _u_response * response, void * user_data) {\n struct config_elements * config = (struct config_elements *)user_data;\n json_t * j_api_key_list;\n size_t offset = 0, limit = GLEWLWYD_DEFAULT_LIMIT_SIZE;\n long int l_converted = 0;\n char * endptr = NULL;\n \n if (u_map_get(request->map_url, \"offset\") != NULL) {\n l_converted = strtol(u_map_get(request->map_url, \"offset\"), &endptr, 10);\n if (!(*endptr) && l_converted > 0) {\n offset = (size_t)l_converted;\n }\n }\n if (u_map_get(request->map_url, \"limit\") != NULL) {\n l_converted = strtol(u_map_get(request->map_url, \"limit\"), &endptr, 10);\n if (!(*endptr) && l_converted >= 0) {\n limit = (size_t)l_converted;\n }\n }\n j_api_key_list = get_api_key_list(config, u_map_get(request->map_url, \"pattern\"), offset, limit);\n if (check_result_value(j_api_key_list, G_OK)) {\n ulfius_set_json_body_response(response, 200, json_object_get(j_api_key_list, \"api_key\"));\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_get_api_key_list - Error get_api_key_list\");\n response->status = 500;\n }\n json_decref(j_api_key_list);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 167766248616080171040844410973050279036, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220019, "project": "glewlwyd", "commit_id": "125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "project_url": "https://github.com/babelouest/glewlwyd", "commit_url": "https://github.com/babelouest/glewlwyd/commit/125281f1c0d4b6a8b49f7e55a757205a2ef01fbe", "commit_message": "Fix update session when auth fail", "target": 0, "func": "int callback_glewlwyd_delete_client (const struct _u_request * request, struct _u_response * response, void * user_data) {\n struct config_elements * config = (struct config_elements *)user_data;\n json_t * j_search_client;\n \n j_search_client = get_client(config, u_map_get(request->map_url, \"client_id\"), u_map_get(request->map_url, \"source\"));\n if (check_result_value(j_search_client, G_OK)) {\n if (delete_client(config, u_map_get(request->map_url, \"client_id\"), json_string_value(json_object_get(json_object_get(j_search_client, \"client\"), \"source\"))) != G_OK) {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_delete_client - Error delete_client\");\n response->status = 500;\n } else {\n y_log_message(Y_LOG_LEVEL_INFO, \"Event - Client '%s' removed\", u_map_get(request->map_url, \"client_id\"));\n }\n } else if (check_result_value(j_search_client, G_ERROR_NOT_FOUND)) {\n response->status = 404;\n } else {\n y_log_message(Y_LOG_LEVEL_ERROR, \"callback_glewlwyd_delete_client - Error get_client\");\n response->status = 500;\n }\n json_decref(j_search_client);\n return U_CALLBACK_CONTINUE;\n}", "func_hash": 155939956217329681743137307131129378654, "file_name": "webservice.c", "file_hash": 2.877988176e+38, "cwe": ["CWE-287"], "cve": "CVE-2021-45379", "cve_desc": "Glewlwyd 2.0.0, fixed in 2.6.1 is affected by an incorrect access control vulnerability. One user can attempt to log in as another user without its password.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-45379", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220030, "project": "tensorflow", "commit_id": "a68f68061e263a88321c104a6c911fe5598050a8", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/a68f68061e263a88321c104a6c911fe5598050a8", "commit_message": "Replace faulty overflow check with a builder for `TensorShape`.\n\nPrevents an integer overflow that was not caught before.\n\nPiperOrigin-RevId: 415381595\nChange-Id: I76585ddedc912bd9f4a390aeafa8e2ced1a28863", "target": 0, "func": "Status RetrieveAndClearSparseTensors(\n OpKernelContext* ctx, const TTypes<int64_t>::ConstVec& handles,\n std::vector<SparseTensor>* sparse_tensors) {\n sparse_tensors->clear();\n sparse_tensors->reserve(handles.size());\n {\n mutex_lock l(mu_);\n for (size_t i = 0; i < handles.size(); ++i) {\n const int64_t handle = handles(i);\n auto sp_iter = sp_tensors_.find(handle);\n if (sp_iter == sp_tensors_.end()) {\n return errors::InvalidArgument(\n \"Unable to find SparseTensor: \", handle, \" in map: \", name_);\n }\n const Tensor* ix = &sp_iter->second.indices;\n const Tensor* values = &sp_iter->second.values;\n const auto& shape = sp_iter->second.shape;\n SparseTensor tensor;\n TF_RETURN_IF_ERROR(SparseTensor::Create(*ix, *values, shape, &tensor));\n sparse_tensors->push_back(std::move(tensor));\n sp_tensors_.erase(sp_iter);\n }\n }\n\n return Status::OK();\n }", "func_hash": 185401992492781129812395307105321681756, "file_name": "sparse_tensors_map_ops.cc", "file_hash": 2.247751233e+38, "cwe": ["CWE-190"], "cve": "CVE-2022-23568", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `AddManySparseToTensorsMap` is vulnerable to an integer overflow which results in a `CHECK`-fail when building new `TensorShape` objects (so, an assert failure based denial of service). We are missing some validation on the shapes of the input tensors as well as directly constructing a large `TensorShape` with user-provided dimensions. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23568", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220175, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "void Node::ClearTypeInfo() {\n if (props_->node_def.has_experimental_type()) {\n MaybeCopyOnWrite();\n props_->node_def.clear_experimental_type();\n }\n}", "func_hash": 144163226001826579787352439755915863153, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220178, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "Status Node::input_edge(int idx, const Edge** e) const {\n if (idx < 0 || idx >= num_inputs()) {\n return errors::InvalidArgument(\"Invalid input_edge index: \", idx, \", Node \",\n name(), \" only has \", num_inputs(),\n \" inputs.\");\n }\n\n // This does a linear search over the edges. In the common case,\n // the number of elements is small enough that this search isn't\n // expensive. Should it become a bottleneck, one can make an\n // optimization where, if the number of edges is small, we use\n // linear iteration, and if the number of edges is large, we perform\n // an indexing step during construction that keeps an array of Edges\n // indexed by pointer. This would keep the size of each Node small\n // in the common case but make this function faster when the number\n // of edges is large.\n for (const Edge* edge : in_edges()) {\n if (edge->dst_input() == idx) {\n *e = edge;\n return Status::OK();\n }\n }\n\n return errors::NotFound(\"Could not find input edge \", idx, \" for \", name());\n}", "func_hash": 269933879561177376447963432727303157135, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220180, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "NodeDebugInfo::NodeDebugInfo(const NodeDef& ndef)\n : NodeDebugInfo(ndef.name(), ndef.has_experimental_debug_info(),\n ndef.experimental_debug_info()) {}", "func_hash": 28741840737637186083149154061302230858, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220195, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "std::unordered_map<std::string, Node*> Graph::BuildNodeNameIndex() const {\n std::unordered_map<std::string, Node*> result;\n for (Node* n : nodes()) {\n result[n->name()] = n;\n }\n return result;\n}", "func_hash": 197202433198762332076220624249404901083, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220198, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "Status Graph::IsValidInputTensor(const Node* node, int idx) const {\n TF_RETURN_IF_ERROR(IsValidNode(node));\n if (idx >= node->num_inputs() || idx < 0) {\n return errors::OutOfRange(\"Node '\", node->name(), \"' (type: '\",\n node->op_def().name(),\n \"', num of inputs: \", node->num_inputs(),\n \") does not have \", \"input \", idx);\n }\n return Status::OK();\n}", "func_hash": 326704232945417586045534227695024786199, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220199, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "Status Node::input_edges(std::vector<const Edge*>* input_edges) const {\n input_edges->clear();\n input_edges->resize(num_inputs(), nullptr);\n\n for (const Edge* edge : in_edges()) {\n if (edge->IsControlEdge()) continue;\n if (edge->dst_input() < 0 || edge->dst_input() >= num_inputs()) {\n return errors::Internal(\"Invalid edge input number \", edge->dst_input());\n }\n if ((*input_edges)[edge->dst_input()] != nullptr) {\n return errors::Internal(\"Duplicate edge input number: \",\n edge->dst_input());\n }\n (*input_edges)[edge->dst_input()] = edge;\n }\n\n for (int i = 0; i < num_inputs(); ++i) {\n if ((*input_edges)[i] == nullptr) {\n return errors::InvalidArgument(\"Missing edge input number: \", i);\n }\n }\n return Status::OK();\n}", "func_hash": 207438952774640115892405009919281194618, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220204, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "void Node::MaybeCopyOnWrite() {\n // TODO(mdan): As nodes become more dynamic, this may not be worth the cost.\n // NodeProperties may be shared between Nodes. Make a copy if so.\n if (!props_.unique()) {\n props_ = std::make_shared<NodeProperties>(*props_);\n }\n}", "func_hash": 113411727991410826437358126182294643677, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220221, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "AttrValue* Node::AddAttrHelper(const std::string& name) {\n MaybeCopyOnWrite();\n return &((*props_->node_def.mutable_attr())[name]);\n}", "func_hash": 108663249826873108380299310563078335602, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 220227, "project": "tensorflow", "commit_id": "c99d98cd189839dcf51aee94e7437b54b31f8abd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/c99d98cd189839dcf51aee94e7437b54b31f8abd", "commit_message": "Handle invalid inputs instead of crashing.\n\nPiperOrigin-RevId: 409549744\nChange-Id: I7f5935b34b53f7e426a5462fcc027bdbf5dcda24", "target": 0, "func": "Node* Graph::CopyNode(const Node* node) {\n DCHECK(!node->IsSource());\n DCHECK(!node->IsSink());\n Node* copy = AllocateNode(node->props_, node, node->class_);\n copy->set_assigned_device_name(node->assigned_device_name());\n\n // Since the OpDef of a function may be owned by the Graph that owns 'node',\n // relookup the OpDef in the target graph. If it differs, then clone the\n // node properties with the updated OpDef.\n const OpDef* op_def;\n TF_CHECK_OK(ops_.LookUpOpDef(node->type_string(), &op_def));\n if (op_def != node->props_->op_def) {\n copy->MaybeCopyOnWrite();\n copy->props_->op_def = op_def;\n }\n copy->SetStackTrace(node->GetStackTrace());\n\n return copy;\n}", "func_hash": 149136125650165221576886376883217955787, "file_name": "graph.cc", "file_hash": 1.720992439e+38, "cwe": ["CWE-125"], "cve": "CVE-2022-23592", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow's type inference can cause a heap out of bounds read as the bounds checking is done in a `DCHECK` (which is a no-op during production). An attacker can control the `input_idx` variable such that `ix` would be larger than the number of values in `node_t.args`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23592", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220396, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_aget(mrb_state *mrb, mrb_value self)\n{\n struct RArray *a = mrb_ary_ptr(self);\n mrb_int i;\n mrb_int len, alen;\n mrb_value index;\n\n if (mrb_get_argc(mrb) == 1) {\n index = mrb_get_arg1(mrb);\n switch (mrb_type(index)) {\n /* a[n..m] */\n case MRB_TT_RANGE:\n if (mrb_range_beg_len(mrb, index, &i, &len, ARY_LEN(a), TRUE) == MRB_RANGE_OK) {\n return ary_subseq(mrb, a, i, len);\n }\n else {\n return mrb_nil_value();\n }\n case MRB_TT_INTEGER:\n return mrb_ary_ref(mrb, self, mrb_integer(index));\n default:\n return mrb_ary_ref(mrb, self, aget_index(mrb, index));\n }\n }\n\n mrb_get_args(mrb, \"oi\", &index, &len);\n i = aget_index(mrb, index);\n alen = ARY_LEN(a);\n if (i < 0) i += alen;\n if (i < 0 || alen < i) return mrb_nil_value();\n if (len < 0) return mrb_nil_value();\n if (alen == i) return mrb_ary_new(mrb);\n if (len > alen - i) len = alen - i;\n\n return ary_subseq(mrb, a, i, len);\n}", "func_hash": 86509070340692449813753872626982640788, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220400, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "ary_subseq(mrb_state *mrb, struct RArray *a, mrb_int beg, mrb_int len)\n{\n struct RArray *b;\n\n if (!ARY_SHARED_P(a) && len <= ARY_SHIFT_SHARED_MIN) {\n return mrb_ary_new_from_values(mrb, len, ARY_PTR(a)+beg);\n }\n ary_make_shared(mrb, a);\n b = MRB_OBJ_ALLOC(mrb, MRB_TT_ARRAY, mrb->array_class);\n b->as.heap.ptr = a->as.heap.ptr + beg;\n b->as.heap.len = len;\n b->as.heap.aux.shared = a->as.heap.aux.shared;\n b->as.heap.aux.shared->refcnt++;\n ARY_SET_SHARED_FLAG(b);\n\n return mrb_obj_value(b);\n}", "func_hash": 275594204181255737102796004454434305575, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220411, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_resize(mrb_state *mrb, mrb_value ary, mrb_int new_len)\n{\n mrb_int old_len;\n struct RArray *a = mrb_ary_ptr(ary);\n\n ary_modify(mrb, a);\n old_len = RARRAY_LEN(ary);\n if (old_len != new_len) {\n if (new_len < old_len) {\n ary_shrink_capa(mrb, a);\n }\n else {\n ary_expand_capa(mrb, a, new_len);\n ary_fill_with_nil(ARY_PTR(a) + old_len, new_len - old_len);\n }\n ARY_SET_LEN(a, new_len);\n }\n\n return ary;\n}", "func_hash": 62668683259860906657372837700464538526, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220418, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "ary_modify(mrb_state *mrb, struct RArray *a)\n{\n ary_modify_check(mrb, a);\n\n if (ARY_SHARED_P(a)) {\n mrb_shared_array *shared = a->as.heap.aux.shared;\n\n if (shared->refcnt == 1 && a->as.heap.ptr == shared->ptr) {\n a->as.heap.ptr = shared->ptr;\n a->as.heap.aux.capa = a->as.heap.len;\n mrb_free(mrb, shared);\n }\n else {\n mrb_value *ptr, *p;\n mrb_int len;\n\n p = a->as.heap.ptr;\n len = a->as.heap.len * sizeof(mrb_value);\n ptr = (mrb_value *)mrb_malloc(mrb, len);\n if (p) {\n array_copy(ptr, p, a->as.heap.len);\n }\n a->as.heap.ptr = ptr;\n a->as.heap.aux.capa = a->as.heap.len;\n mrb_ary_decref(mrb, shared);\n }\n ARY_UNSET_SHARED_FLAG(a);\n }\n}", "func_hash": 317214195832945808542866909223873024040, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220422, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_clear_m(mrb_state *mrb, mrb_value self)\n{\n return mrb_ary_clear(mrb, self);\n}", "func_hash": 161592324153966147190088038812918539804, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220424, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "ary_new_capa(mrb_state *mrb, mrb_int capa)\n{\n struct RArray *a;\n size_t blen;\n\n if (capa > ARY_MAX_SIZE) {\n mrb_raise(mrb, E_ARGUMENT_ERROR, \"array size too big\");\n }\n blen = capa * sizeof(mrb_value);\n\n a = MRB_OBJ_ALLOC(mrb, MRB_TT_ARRAY, mrb->array_class);\n if (capa <= MRB_ARY_EMBED_LEN_MAX) {\n ARY_SET_EMBED_LEN(a, 0);\n }\n else {\n a->as.heap.ptr = (mrb_value *)mrb_malloc(mrb, blen);\n a->as.heap.aux.capa = capa;\n a->as.heap.len = 0;\n }\n\n return a;\n}", "func_hash": 239397085170035284216008300418329368302, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220429, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_index_m(mrb_state *mrb, mrb_value self)\n{\n mrb_value obj = mrb_get_arg1(mrb);\n mrb_int i;\n\n for (i = 0; i < RARRAY_LEN(self); i++) {\n if (mrb_equal(mrb, RARRAY_PTR(self)[i], obj)) {\n return mrb_int_value(mrb, i);\n }\n }\n return mrb_nil_value();\n}", "func_hash": 275621424064854835877370888170891718941, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220437, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_aset(mrb_state *mrb, mrb_value self)\n{\n mrb_value v1, v2, v3;\n mrb_int i, len;\n\n ary_modify(mrb, mrb_ary_ptr(self));\n if (mrb_get_argc(mrb) == 2) {\n const mrb_value *vs = mrb_get_argv(mrb);\n v1 = vs[0]; v2 = vs[1];\n\n /* a[n..m] = v */\n switch (mrb_range_beg_len(mrb, v1, &i, &len, RARRAY_LEN(self), FALSE)) {\n case MRB_RANGE_TYPE_MISMATCH:\n mrb_ary_set(mrb, self, aget_index(mrb, v1), v2);\n break;\n case MRB_RANGE_OK:\n mrb_ary_splice(mrb, self, i, len, v2);\n break;\n case MRB_RANGE_OUT:\n mrb_raisef(mrb, E_RANGE_ERROR, \"%v out of range\", v1);\n break;\n }\n return v2;\n }\n\n mrb_get_args(mrb, \"ooo\", &v1, &v2, &v3);\n /* a[n,m] = v */\n mrb_ary_splice(mrb, self, aget_index(mrb, v1), aget_index(mrb, v2), v3);\n return v3;\n}", "func_hash": 298392180284760387360672652016425721558, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220440, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_new_from_values(mrb_state *mrb, mrb_int size, const mrb_value *vals)\n{\n struct RArray *a = ary_new_from_values(mrb, size, vals);\n return mrb_obj_value(a);\n}", "func_hash": 7688071596822815612601005688933356824, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220446, "project": "mruby", "commit_id": "27d1e0132a0804581dca28df042e7047fd27eaa8", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/27d1e0132a0804581dca28df042e7047fd27eaa8", "commit_message": "array.c: fix `mrb_ary_shift_m` initialization bug.\n\nThe `ARY_PTR` and `ARY_LEN` may be modified in `mrb_get_args`.", "target": 0, "func": "mrb_ary_reverse_bang(mrb_state *mrb, mrb_value self)\n{\n struct RArray *a = mrb_ary_ptr(self);\n mrb_int len = ARY_LEN(a);\n\n if (len > 1) {\n mrb_value *p1, *p2;\n\n ary_modify(mrb, a);\n p1 = ARY_PTR(a);\n p2 = p1 + len - 1;\n\n while (p1 < p2) {\n mrb_value tmp = *p1;\n *p1++ = *p2;\n *p2-- = tmp;\n }\n }\n return self;\n}", "func_hash": 673767641558712010971598288676338352, "file_name": "array.c", "file_hash": 2.955264458e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-4188", "cve_desc": "mruby is vulnerable to NULL Pointer Dereference", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-4188", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220448, "project": "tensorflow", "commit_id": "e7f497570abb6b4ae5af4970620cd880e4c0c904", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/e7f497570abb6b4ae5af4970620cd880e4c0c904", "commit_message": "Fix segfault on OOM in Conv2D.\n\nPiperOrigin-RevId: 404655317\nChange-Id: I33588dbd3f5d0fef980e3c908bf5515a9ee09ce7", "target": 0, "func": "void operator()(OpKernelContext* ctx, bool use_cudnn, bool cudnn_use_autotune,\n const Tensor& input, const Tensor& filter, int row_dilation,\n int col_dilation, int row_stride, int col_stride,\n const Padding& padding,\n const std::vector<int64_t>& explicit_paddings, Tensor* output,\n TensorFormat data_format) {\n if (data_format != FORMAT_NHWC) {\n ctx->SetStatus(\n errors::Unimplemented(\"The Conv2D op currently only supports the \"\n \"NHWC tensor format for integer types. \"\n \"The op was given the format: \",\n ToString(data_format)));\n return;\n }\n const int64_t in_depth = GetTensorDim(input, data_format, 'C');\n OP_REQUIRES(ctx, in_depth == filter.dim_size(2),\n errors::Unimplemented(\n \"The Conv2D op currently does not support grouped \"\n \"convolutions for integer types. A grouped convolution was \"\n \"attempted to be run because the input depth of \",\n in_depth, \" does not match the filter input depth of \",\n filter.dim_size(2)));\n OP_REQUIRES(\n ctx, filter.NumElements() > 0,\n errors::InvalidArgument(\"filter must not have zero elements \"\n \"(i.e. all dimensions must be non-zero)\"));\n\n for (int64_t explicit_padding : explicit_paddings) {\n if (!FastBoundsCheck(explicit_padding, std::numeric_limits<int>::max())) {\n ctx->SetStatus(errors::InvalidArgument(\"filter too large\"));\n return;\n }\n }\n LaunchGeneric<GPUDevice, int32>()(\n ctx, input, filter, row_stride, col_stride, row_dilation, col_dilation,\n padding, explicit_paddings, output, data_format);\n }", "func_hash": 276994158521142249242998805177961663269, "file_name": "conv_ops.cc", "file_hash": 1.624254701e+38, "cwe": ["CWE-354"], "cve": "CVE-2021-41206", "cve_desc": "TensorFlow is an open source platform for machine learning. In affected versions several TensorFlow operations are missing validation for the shapes of the tensor arguments involved in the call. Depending on the API, this can result in undefined behavior and segfault or `CHECK`-fail related crashes but in some scenarios writes and reads from heap populated arrays are also possible. We have discovered these issues internally via tooling while working on improving/testing GPU op determinism. As such, we don't have reproducers and there will be multiple fixes for these issues. These fixes will be included in TensorFlow 2.7.0. We will also cherrypick these commits on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41206", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220452, "project": "tensorflow", "commit_id": "e7f497570abb6b4ae5af4970620cd880e4c0c904", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/e7f497570abb6b4ae5af4970620cd880e4c0c904", "commit_message": "Fix segfault on OOM in Conv2D.\n\nPiperOrigin-RevId: 404655317\nChange-Id: I33588dbd3f5d0fef980e3c908bf5515a9ee09ce7", "target": 0, "func": "static bool Run(OpKernelContext* ctx, const Tensor& input,\n const Tensor& filter, int batch, int input_rows,\n int input_cols, int in_depth, int filter_rows,\n int filter_cols, int pad_rows, int pad_cols, int out_rows,\n int out_cols, int out_depth, int dilation_rows,\n int dilation_cols, int stride_rows, int stride_cols,\n Tensor* output, TensorFormat data_format) {\n if (data_format != FORMAT_NHWC || dilation_rows != 1 ||\n dilation_cols != 1 ||\n !CanUseDeepConv2D(stride_rows, stride_cols, filter_rows, filter_cols,\n in_depth, out_depth, out_rows, out_cols)) {\n return false;\n }\n\n Conv2DArgs args;\n args.batch = batch;\n args.in_rows = input_rows;\n args.in_cols = input_cols;\n args.in_depth = in_depth;\n args.filter_rows = filter_rows;\n args.filter_cols = filter_cols;\n args.pad_rows = pad_rows;\n args.pad_cols = pad_cols;\n args.out_rows = out_rows;\n args.out_cols = out_cols;\n args.out_depth = out_depth;\n\n auto input_ptr = input.template flat<float>().data();\n auto filter_ptr = filter.template flat<float>().data();\n auto output_ptr = output->template flat<float>().data();\n\n functor::DeepConv2D<CPUDevice, float>()(ctx, args, input_ptr, filter_ptr,\n output_ptr);\n return true;\n }", "func_hash": 73962790865121560209666357477492401566, "file_name": "conv_ops.cc", "file_hash": 1.624254701e+38, "cwe": ["CWE-354"], "cve": "CVE-2021-41206", "cve_desc": "TensorFlow is an open source platform for machine learning. In affected versions several TensorFlow operations are missing validation for the shapes of the tensor arguments involved in the call. Depending on the API, this can result in undefined behavior and segfault or `CHECK`-fail related crashes but in some scenarios writes and reads from heap populated arrays are also possible. We have discovered these issues internally via tooling while working on improving/testing GPU op determinism. As such, we don't have reproducers and there will be multiple fixes for these issues. These fixes will be included in TensorFlow 2.7.0. We will also cherrypick these commits on TensorFlow 2.6.1, TensorFlow 2.5.2, and TensorFlow 2.4.4, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41206", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220462, "project": "tensorflow", "commit_id": "e21af685e1828f7ca65038307df5cc06de4479e8", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/e21af685e1828f7ca65038307df5cc06de4479e8", "commit_message": "Fix Null-pointer dereference in BuildXlaCompilationCache\n\nIf ConfigProto is not used, then use the default settings which is to allow all devices.\n\nPiperOrigin-RevId: 420391800\nChange-Id: I88161ad7042990aef678e77b597a2fb2c8f815be", "target": 0, "func": "XlaPlatformInfo XlaPlatformInfoFromDevice(DeviceBase* device_base) {\n auto device = static_cast<Device*>(device_base);\n se::Platform::Id platform_id = nullptr;\n const XlaDevice::Metadata* xla_device_metadata = nullptr;\n std::shared_ptr<se::DeviceMemoryAllocator> custom_allocator;\n\n if (device->device_type() == DEVICE_CPU) {\n platform_id = se::host::kHostPlatformId;\n } else if (device->device_type() == DEVICE_GPU) {\n platform_id = device->tensorflow_gpu_device_info()\n ->stream->parent()\n ->platform()\n ->id();\n } else if (XlaDevice::GetMetadataFromDevice(device, &xla_device_metadata)\n .ok()) {\n // If we are on an XlaDevice, use the underlying XLA platform's allocator\n // directly. We could use the StreamExecutor's allocator which may\n // theoretically be more correct, but XLA returns a nice OOM message in a\n // Status and StreamExecutor does not.\n //\n // Importantly we can't use ctx->device()->GetAllocator() as the allocator\n // (which xla_allocator above uses) as on an XlaDevice, this is a dummy\n // allocator that returns XlaTensor objects. The XlaCompiler needs a real\n // allocator to allocate real buffers.\n platform_id = xla_device_metadata->platform()->id();\n custom_allocator =\n xla_device_metadata->client()->backend().shared_memory_allocator();\n }\n\n return XlaPlatformInfo(DeviceType(device->device_type()), platform_id,\n xla_device_metadata, custom_allocator);\n}", "func_hash": 277224339823769903063157492028139062582, "file_name": "xla_platform_info.cc", "file_hash": 3.18276068e+38, "cwe": ["CWE-476"], "cve": "CVE-2022-23595", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. When building an XLA compilation cache, if default settings are used, TensorFlow triggers a null pointer dereference. In the default scenario, all devices are allowed, so `flr->config_proto` is `nullptr`. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23595", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 220464, "project": "tensorflow", "commit_id": "e21af685e1828f7ca65038307df5cc06de4479e8", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/e21af685e1828f7ca65038307df5cc06de4479e8", "commit_message": "Fix Null-pointer dereference in BuildXlaCompilationCache\n\nIf ConfigProto is not used, then use the default settings which is to allow all devices.\n\nPiperOrigin-RevId: 420391800\nChange-Id: I88161ad7042990aef678e77b597a2fb2c8f815be", "target": 0, "func": "std::shared_ptr<se::DeviceMemoryAllocator> GetAllocator(\n DeviceBase* device, se::Stream* stream,\n const XlaPlatformInfo& platform_info) {\n if (platform_info.custom_allocator()) {\n return platform_info.custom_allocator();\n }\n auto* alloc = device->GetAllocator({});\n if (!stream) {\n // Stream is not set for the host platform.\n se::Platform* platform =\n se::MultiPlatformManager::PlatformWithId(platform_info.platform_id())\n .ValueOrDie();\n return std::make_shared<se::TfAllocatorAdapter>(alloc, platform);\n }\n return std::make_shared<se::TfAllocatorAdapter>(alloc, stream);\n}", "func_hash": 215947835238715793102467445306044159007, "file_name": "xla_platform_info.cc", "file_hash": 3.18276068e+38, "cwe": ["CWE-476"], "cve": "CVE-2022-23595", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. When building an XLA compilation cache, if default settings are used, TensorFlow triggers a null pointer dereference. In the default scenario, all devices are allowed, so `flr->config_proto` is `nullptr`. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23595", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220816, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int SubscriptToIndex(const NdArrayDesc<5>& desc, int indexes[5]) {\n return indexes[0] * desc.strides[0] + indexes[1] * desc.strides[1] +\n indexes[2] * desc.strides[2] + indexes[3] * desc.strides[3] +\n indexes[4] * desc.strides[4];\n}", "func_hash": 287568689532232104113892658372524383402, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 220822, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline void NdArrayDescsForElementwiseBroadcast(\n const RuntimeShape& input0_shape, const RuntimeShape& input1_shape,\n NdArrayDesc<N>* desc0_out, NdArrayDesc<N>* desc1_out) {\n TFLITE_DCHECK(desc0_out != nullptr);\n TFLITE_DCHECK(desc1_out != nullptr);\n\n auto extended_input0_shape = RuntimeShape::ExtendedShape(N, input0_shape);\n auto extended_input1_shape = RuntimeShape::ExtendedShape(N, input1_shape);\n\n // Copy dims to desc, calculating strides.\n CopyDimsToDesc<N>(extended_input0_shape, desc0_out);\n CopyDimsToDesc<N>(extended_input1_shape, desc1_out);\n\n // Walk over each dimension. If the extents are equal do nothing.\n // Otherwise, set the desc with extent 1 to have extent equal to the other and\n // stride 0.\n for (int i = 0; i < N; ++i) {\n const int extent0 = extended_input0_shape.Dims(i);\n const int extent1 = extended_input1_shape.Dims(i);\n if (extent0 != extent1) {\n if (extent0 == 1) {\n desc0_out->strides[i] = 0;\n desc0_out->extents[i] = extent1;\n } else {\n TFLITE_DCHECK_EQ(extent1, 1);\n desc1_out->strides[i] = 0;\n desc1_out->extents[i] = extent0;\n }\n }\n }\n}", "func_hash": 226082469068998268577546700492228233989, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220826, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int32_t MultiplyByQuantizedMultiplier(int64_t x,\n int32_t quantized_multiplier,\n int shift) {\n // Inputs:\n // - quantized_multiplier has fixed point at bit 31\n // - shift is -31 to +7 (negative for right shift)\n //\n // Assumptions: The following input ranges are assumed\n // - quantize_scale>=0 (the usual range is (1<<30) to (1>>31)-1)\n // - scaling is chosen so final scaled result fits in int32_t\n // - input x is in the range -(1<<47) <= x < (1<<47)\n assert(quantized_multiplier >= 0);\n assert(shift >= -31 && shift < 8);\n assert(x >= -(static_cast<int64_t>(1) << 47) &&\n x < (static_cast<int64_t>(1) << 47));\n\n int32_t reduced_multiplier = (quantized_multiplier < 0x7FFF0000)\n ? ((quantized_multiplier + (1 << 15)) >> 16)\n : 0x7FFF;\n int total_shift = 15 - shift;\n x = (x * (int64_t)reduced_multiplier) + ((int64_t)1 << (total_shift - 1));\n int32_t result = x >> total_shift;\n return result;\n}", "func_hash": 31128991555889483629999461848661498191, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220830, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int32_t MultiplyByQuantizedMultiplier(int32_t x,\n int32_t quantized_multiplier,\n int shift) {\n TFLITE_DCHECK(quantized_multiplier >= 0);\n TFLITE_DCHECK(shift >= -31 && shift <= 30);\n\n const int64_t total_shift = 31 - shift;\n const int64_t round = static_cast<int64_t>(1) << (total_shift - 1);\n int64_t result = x * static_cast<int64_t>(quantized_multiplier) + round;\n result = result >> total_shift;\n\n TFLITE_DCHECK(result >= std::numeric_limits<int32_t>::min() &&\n result <= std::numeric_limits<int32_t>::max());\n return static_cast<int32_t>(result);\n}", "func_hash": 136773084967392616146537741227969047882, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220836, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "int CountLeadingZeros(T integer_input) {\n static_assert(std::is_unsigned<T>::value,\n \"Only unsigned integer types handled.\");\n#if defined(__GNUC__)\n return integer_input ? __builtin_clz(integer_input)\n : std::numeric_limits<T>::digits;\n#else\n if (integer_input == 0) {\n return std::numeric_limits<T>::digits;\n }\n\n const T one_in_leading_positive = static_cast<T>(1)\n << (std::numeric_limits<T>::digits - 1);\n int leading_zeros = 0;\n while (integer_input < one_in_leading_positive) {\n integer_input <<= 1;\n ++leading_zeros;\n }\n return leading_zeros;\n#endif\n}", "func_hash": 177206591882510465727789301296158463816, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220837, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int32_t GetReciprocal(int32_t x, int x_integer_digits,\n int* num_bits_over_unit) {\n int headroom_plus_one = CountLeadingZeros(static_cast<uint32_t>(x));\n // This is the number of bits to the left of the binary point above 1.0.\n // Consider x=1.25. In that case shifted_scale=0.8 and\n // no later adjustment will be needed.\n *num_bits_over_unit = x_integer_digits - headroom_plus_one;\n const int32_t shifted_sum_minus_one =\n static_cast<int32_t>((static_cast<uint32_t>(x) << headroom_plus_one) -\n (static_cast<uint32_t>(1) << 31));\n\n gemmlowp::FixedPoint<int32_t, 0> shifted_scale =\n gemmlowp::one_over_one_plus_x_for_x_in_0_1(\n gemmlowp::FixedPoint<int32_t, 0>::FromRaw(shifted_sum_minus_one));\n return shifted_scale.raw();\n}", "func_hash": 71542583681264406677884701528966881208, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220839, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "void optimized_ops_prefetch_write_l1_keep(const T* ptr) {\n#ifdef __GNUC__\n // builtin offered by GCC-compatible compilers including clang\n __builtin_prefetch(ptr, /* 1 means write */ 1, /* 3 means high locality */ 3);\n#else\n (void)ptr;\n#endif\n}", "func_hash": 335492403279245020974247764118686459292, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220843, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int32x4x4_t MultiplyByQuantizedMultiplier4Rows(\n int32x4x4_t input_val, int32_t quantized_multiplier, int shift) {\n TFLITE_DCHECK(quantized_multiplier >= 0);\n\n const int right_shift = std::min(-1, shift);\n const int left_shift = shift - right_shift;\n\n const int32x4_t multiplier_dup = vdupq_n_s32(quantized_multiplier);\n const int32x4_t left_shift_dup = vdupq_n_s32(left_shift);\n const int32x4_t right_shift_dup = vdupq_n_s32(right_shift);\n\n int32x4x4_t result;\n result.val[0] = vrshlq_s32(\n vqdmulhq_s32(vshlq_s32(input_val.val[0], left_shift_dup), multiplier_dup),\n right_shift_dup);\n\n result.val[1] = vrshlq_s32(\n vqdmulhq_s32(vshlq_s32(input_val.val[1], left_shift_dup), multiplier_dup),\n right_shift_dup);\n\n result.val[2] = vrshlq_s32(\n vqdmulhq_s32(vshlq_s32(input_val.val[2], left_shift_dup), multiplier_dup),\n right_shift_dup);\n\n result.val[3] = vrshlq_s32(\n vqdmulhq_s32(vshlq_s32(input_val.val[3], left_shift_dup), multiplier_dup),\n right_shift_dup);\n\n return result;\n}", "func_hash": 94626492059223194019304864912038326043, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220848, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int CountLeadingSignBits(T integer_input) {\n static_assert(std::is_signed<T>::value, \"Only signed integer types handled.\");\n#if defined(__GNUC__) && !defined(__clang__)\n return integer_input ? __builtin_clrsb(integer_input)\n : std::numeric_limits<T>::digits;\n#else\n using U = typename std::make_unsigned<T>::type;\n return integer_input >= 0\n ? CountLeadingZeros(static_cast<U>(integer_input)) - 1\n : integer_input != std::numeric_limits<T>::min()\n ? CountLeadingZeros(2 * static_cast<U>(-integer_input) - 1)\n : 0;\n#endif\n}", "func_hash": 195476752347926842346975746404332617160, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220857, "project": "tensorflow", "commit_id": "8c6f391a2282684a25cbfec7687bd5d35261a209", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/8c6f391a2282684a25cbfec7687bd5d35261a209", "commit_message": "[lite] Add check for bias_size is zero to avoid division by zero. This shouldn't happen for properly converted models. Just safety check\n\nPiperOrigin-RevId: 416383645\nChange-Id: If8e508bf696ae8ecfb927e69c139a8ccf7fe60cb", "target": 0, "func": "inline int SubscriptToIndex(const NdArrayDesc<8>& desc, int indexes[8]) {\n return indexes[0] * desc.strides[0] + indexes[1] * desc.strides[1] +\n indexes[2] * desc.strides[2] + indexes[3] * desc.strides[3] +\n indexes[4] * desc.strides[4] + indexes[5] * desc.strides[5] +\n indexes[6] * desc.strides[6] + indexes[7] * desc.strides[7];\n}", "func_hash": 241033252007328706571329087864588872501, "file_name": "common.h", "file_hash": 2.060101191e+38, "cwe": ["CWE-369"], "cve": "CVE-2022-23557", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. An attacker can craft a TFLite model that would trigger a division by zero in `BiasAndClamp` implementation. There is no check that the `bias_size` is non zero. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23557", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 220910, "project": "tensorflow", "commit_id": "92dba16749fae36c246bec3f9ba474d9ddeb7662", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/92dba16749fae36c246bec3f9ba474d9ddeb7662", "commit_message": "Prevent a null-pointer dereference / `CHECK`-fail in grappler.\n\nPiperOrigin-RevId: 409187354\nChange-Id: I369c249cca32e6c56ec193f0ebbf2f2768fc7d43", "target": 0, "func": "Status DependencyOptimizer::Optimize(Cluster* cluster, const GrapplerItem& item,\n GraphDef* optimized_graph) {\n optimized_graph_ = optimized_graph;\n *optimized_graph_ = item.graph;\n nodes_to_preserve_ = item.NodesToPreserve();\n fetch_nodes_known_ = !item.fetch.empty();\n CleanControlInputs();\n\n const int num_iterations = 2;\n for (int iteration = 0; iteration < num_iterations; ++iteration) {\n GRAPPLER_RETURN_IF_DEADLINE_EXCEEDED();\n Status topo_sort_status;\n // Perform topological sort to prepare the graph for transitive reduction.\n topo_sort_status = TopologicalSort(optimized_graph_);\n // Set up index-based graph datastructures to speed up analysis steps below.\n node_map_.reset(new NodeMap(optimized_graph_));\n BuildNodeToIdx();\n\n if (topo_sort_status.ok()) {\n // Remove redundant control dependencies.\n TF_RETURN_IF_ERROR(TransitiveReduction());\n } else {\n LOG(ERROR) << \"Iteration = \" << iteration\n << \", topological sort failed with message: \"\n << topo_sort_status.error_message();\n }\n // Turn nodes with only control outputs into NoOps, prune NoOp and Identity\n // nodes.\n TF_RETURN_IF_ERROR(OptimizeDependencies());\n\n // Dedup control inputs.\n CleanControlInputs();\n\n // Merge multiple control edges from the same device.\n GroupCrossDeviceControlEdges(/*host_granularity=*/false);\n\n // Merge control edges from the same host to reduce RPC traffic.\n GroupCrossDeviceControlEdges(/*host_granularity=*/true);\n }\n\n return Status::OK();\n}", "func_hash": 8784630731253563230856250368216395500, "file_name": "dependency_optimizer.cc", "file_hash": 9.891675234e+37, "cwe": ["CWE-617"], "cve": "CVE-2022-23579", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The Grappler optimizer in TensorFlow can be used to cause a denial of service by altering a `SavedModel` such that `SafeToRemoveIdentity` would trigger `CHECK` failures. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23579", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 220925, "project": "gpac", "commit_id": "5f2c2a16d30229b6241f02fa28e3d6b810d64858", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/5f2c2a16d30229b6241f02fa28e3d6b810d64858", "commit_message": "fixed #1905", "target": 0, "func": "const GF_FilterRegister *mpgviddmx_register(GF_FilterSession *session)\n{\n\treturn &MPGVidDmxRegister;\n}", "func_hash": 129069364173509227657267691903134777037, "file_name": "reframe_mpgvid.c", "file_hash": 1.483065708e+38, "cwe": ["CWE-476"], "cve": "CVE-2021-40575", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a null pointer dereference vulnerability in the mpgviddmx_process function in reframe_mpgvid.c, which allows attackers to cause a denial of service. This vulnerability is possibly due to an incomplete fix for CVE-2021-40566.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40575", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221124, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_Err gf_odf_av1_cfg_write(GF_AV1Config *cfg, u8 **outData, u32 *outSize) {\n\tGF_Err e;\n\tGF_BitStream *bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE);\n\t*outSize = 0;\n\t*outData = NULL;\n\te = gf_odf_av1_cfg_write_bs(cfg, bs);\n\tif (e == GF_OK)\n\t\tgf_bs_get_content(bs, outData, outSize);\n\n\tgf_bs_del(bs);\n\treturn e;\n}", "func_hash": 70637996745522019393060021113607252962, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221125, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_DOVIDecoderConfigurationRecord *gf_odf_dovi_cfg_read_bs(GF_BitStream *bs)\n{\n\tGF_DOVIDecoderConfigurationRecord *cfg;\n\tGF_SAFEALLOC(cfg, GF_DOVIDecoderConfigurationRecord);\n\n\tcfg->dv_version_major = gf_bs_read_u8(bs);\n\tcfg->dv_version_minor = gf_bs_read_u8(bs);\n\tcfg->dv_profile = gf_bs_read_int(bs, 7);\n\tcfg->dv_level = gf_bs_read_int(bs, 6);\n\tcfg->rpu_present_flag = gf_bs_read_int(bs, 1);\n\tcfg->el_present_flag = gf_bs_read_int(bs, 1);\n\tcfg->bl_present_flag = gf_bs_read_int(bs, 1);\n\t{\n\t\tint i = 0;\n\t\tu32 data[5];\n\t\tmemset(data, 0, sizeof(data));\n\t\tgf_bs_read_data(bs, (char*)data, 20);\n\t\tfor (i = 0; i < 5; ++i) {\n\t\t\tif (data[i] != 0) {\n\t\t\t\tGF_LOG(GF_LOG_WARNING, GF_LOG_CONTAINER, (\"[odf_cfg] dovi config reserved bytes are not zero\\n\"));\n\t\t\t}\n\t\t}\n\t}\n\treturn cfg;\n}", "func_hash": 242848467178079405062146193271970244105, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221126, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_Err gf_odf_vvc_cfg_write(GF_VVCConfig *cfg, u8 **outData, u32 *outSize)\n{\n\tGF_Err e;\n\tGF_BitStream *bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE);\n\t*outSize = 0;\n\t*outData = NULL;\n\te = gf_odf_vvc_cfg_write_bs(cfg, bs);\n\tif (e==GF_OK)\n\t\tgf_bs_get_content(bs, outData, outSize);\n\n\tgf_bs_del(bs);\n\treturn e;\n}", "func_hash": 108128996981267091124370366678974118267, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221141, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_VVCConfig *gf_odf_vvc_cfg_new()\n{\n\tGF_VVCConfig *cfg;\n\tGF_SAFEALLOC(cfg, GF_VVCConfig);\n\tif (!cfg) return NULL;\n\tcfg->param_array = gf_list_new();\n\tcfg->nal_unit_size = 4;\n\tcfg->chroma_format = 1;\n\tcfg->bit_depth = 8;\n\treturn cfg;\n}", "func_hash": 215651656927024557732292157303338182716, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221145, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_Err gf_odf_avc_cfg_write(GF_AVCConfig *cfg, u8 **outData, u32 *outSize)\n{\n\tGF_BitStream *bs = gf_bs_new(NULL, 0, GF_BITSTREAM_WRITE);\n\tgf_odf_avc_cfg_write_bs(cfg, bs);\n\t*outSize = 0;\n\t*outData = NULL;\n\tgf_bs_get_content(bs, outData, outSize);\n\tgf_bs_del(bs);\n\treturn GF_OK;\n}", "func_hash": 210903173216515715789023489334512883894, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221171, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_AV1Config *gf_odf_av1_cfg_new()\n{\n\tGF_AV1Config *cfg;\n\tGF_SAFEALLOC(cfg, GF_AV1Config);\n\tif (!cfg) return NULL;\n\tcfg->marker = 1;\n\tcfg->version = 1;\n\tcfg->initial_presentation_delay_minus_one = 0;\n\tcfg->obu_array = gf_list_new();\n\treturn cfg;\n}", "func_hash": 164966713825404820787007752781795194256, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221177, "project": "gpac", "commit_id": "a69b567b8c95c72f9560c873c5ab348be058f340", "project_url": "https://github.com/gpac/gpac", "commit_url": "https://github.com/gpac/gpac/commit/a69b567b8c95c72f9560c873c5ab348be058f340", "commit_message": "fixed #1895", "target": 0, "func": "GF_Descriptor *gf_odf_new_text_cfg()\n{\n\tGF_TextConfig *newDesc = (GF_TextConfig*) gf_malloc(sizeof(GF_TextConfig));\n\tif (!newDesc) return NULL;\n\tmemset(newDesc, 0, sizeof(GF_TextConfig));\n\tnewDesc->tag = GF_ODF_TEXT_CFG_TAG;\n\tnewDesc->sample_descriptions = gf_list_new();\n\tnewDesc->Base3GPPFormat = 0x10;\n\tnewDesc->MPEGExtendedFormat = 0x10;\n\tnewDesc->profileLevel = 0x10;\n\tnewDesc->timescale = 1000;\n\treturn (GF_Descriptor *) newDesc;\n}", "func_hash": 26877334385893574830658515951722221117, "file_name": "descriptors.c", "file_hash": 8.647649296e+37, "cwe": ["CWE-415"], "cve": "CVE-2021-40571", "cve_desc": "The binary MP4Box in Gpac 1.0.1 has a double-free vulnerability in the ilst_box_read function in box_code_apple.c, which allows attackers to cause a denial of service, even code execution and escalation of privileges.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-40571", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221413, "project": "linux", "commit_id": "c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc", "project_url": "https://github.com/torvalds/linux", "commit_url": "https://github.com/torvalds/linux/commit/c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc", "commit_message": "KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)\n\nIf L1 disables VMLOAD/VMSAVE intercepts, and doesn't enable\nVirtual VMLOAD/VMSAVE (currently not supported for the nested hypervisor),\nthen VMLOAD/VMSAVE must operate on the L1 physical memory, which is only\npossible by making L0 intercept these instructions.\n\nFailure to do so allowed the nested guest to run VMLOAD/VMSAVE unintercepted,\nand thus read/write portions of the host physical memory.\n\nFixes: 89c8a4984fc9 (\"KVM: SVM: Enable Virtual VMLOAD VMSAVE feature\")\n\nSuggested-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Maxim Levitsky <mlevitsk@redhat.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>", "target": 0, "func": "void recalc_intercepts(struct vcpu_svm *svm)\n{\n\tstruct vmcb_control_area *c, *h, *g;\n\tunsigned int i;\n\n\tvmcb_mark_dirty(svm->vmcb, VMCB_INTERCEPTS);\n\n\tif (!is_guest_mode(&svm->vcpu))\n\t\treturn;\n\n\tc = &svm->vmcb->control;\n\th = &svm->vmcb01.ptr->control;\n\tg = &svm->nested.ctl;\n\n\tfor (i = 0; i < MAX_INTERCEPT; i++)\n\t\tc->intercepts[i] = h->intercepts[i];\n\n\tif (g->int_ctl & V_INTR_MASKING_MASK) {\n\t\t/* We only want the cr8 intercept bits of L1 */\n\t\tvmcb_clr_intercept(c, INTERCEPT_CR8_READ);\n\t\tvmcb_clr_intercept(c, INTERCEPT_CR8_WRITE);\n\n\t\t/*\n\t\t * Once running L2 with HF_VINTR_MASK, EFLAGS.IF does not\n\t\t * affect any interrupt we may want to inject; therefore,\n\t\t * interrupt window vmexits are irrelevant to L0.\n\t\t */\n\t\tvmcb_clr_intercept(c, INTERCEPT_VINTR);\n\t}\n\n\t/* We don't want to see VMMCALLs from a nested guest */\n\tvmcb_clr_intercept(c, INTERCEPT_VMMCALL);\n\n\tfor (i = 0; i < MAX_INTERCEPT; i++)\n\t\tc->intercepts[i] |= g->intercepts[i];\n\n\t/* If SMI is not intercepted, ignore guest SMI intercept as well */\n\tif (!intercept_smi)\n\t\tvmcb_clr_intercept(c, INTERCEPT_SMI);\n\n\tvmcb_set_intercept(c, INTERCEPT_VMLOAD);\n\tvmcb_set_intercept(c, INTERCEPT_VMSAVE);\n}", "func_hash": 61346983903340748153155985789359366401, "file_name": "None", "file_hash": null, "cwe": ["CWE-862"], "cve": "CVE-2021-3656", "cve_desc": "A flaw was found in the KVM's AMD code for supporting SVM nested virtualization. The flaw occurs when processing the VMCB (virtual machine control block) provided by the L1 guest to spawn/handle a nested guest (L2). Due to improper validation of the \"virt_ext\" field, this issue could allow a malicious L1 to disable both VMLOAD/VMSAVE intercepts and VLS (Virtual VMLOAD/VMSAVE) for the L2 guest. As a result, the L2 guest would be allowed to read/write physical pages of the host, resulting in a crash of the entire system, leak of sensitive data or potential guest-to-host escape.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3656", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221422, "project": "linux", "commit_id": "c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc", "project_url": "https://github.com/torvalds/linux", "commit_url": "https://github.com/torvalds/linux/commit/c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc", "commit_message": "KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)\n\nIf L1 disables VMLOAD/VMSAVE intercepts, and doesn't enable\nVirtual VMLOAD/VMSAVE (currently not supported for the nested hypervisor),\nthen VMLOAD/VMSAVE must operate on the L1 physical memory, which is only\npossible by making L0 intercept these instructions.\n\nFailure to do so allowed the nested guest to run VMLOAD/VMSAVE unintercepted,\nand thus read/write portions of the host physical memory.\n\nFixes: 89c8a4984fc9 (\"KVM: SVM: Enable Virtual VMLOAD VMSAVE feature\")\n\nSuggested-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Maxim Levitsky <mlevitsk@redhat.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>", "target": 0, "func": "void nested_sync_control_from_vmcb02(struct vcpu_svm *svm)\n{\n\tu32 mask;\n\tsvm->nested.ctl.event_inj = svm->vmcb->control.event_inj;\n\tsvm->nested.ctl.event_inj_err = svm->vmcb->control.event_inj_err;\n\n\t/* Only a few fields of int_ctl are written by the processor. */\n\tmask = V_IRQ_MASK | V_TPR_MASK;\n\tif (!(svm->nested.ctl.int_ctl & V_INTR_MASKING_MASK) &&\n\t svm_is_intercept(svm, INTERCEPT_VINTR)) {\n\t\t/*\n\t\t * In order to request an interrupt window, L0 is usurping\n\t\t * svm->vmcb->control.int_ctl and possibly setting V_IRQ\n\t\t * even if it was clear in L1's VMCB. Restoring it would be\n\t\t * wrong. However, in this case V_IRQ will remain true until\n\t\t * interrupt_window_interception calls svm_clear_vintr and\n\t\t * restores int_ctl. We can just leave it aside.\n\t\t */\n\t\tmask &= ~V_IRQ_MASK;\n\t}\n\tsvm->nested.ctl.int_ctl &= ~mask;\n\tsvm->nested.ctl.int_ctl |= svm->vmcb->control.int_ctl & mask;\n}", "func_hash": 2446087586126580575767115744369641955, "file_name": "None", "file_hash": null, "cwe": ["CWE-862"], "cve": "CVE-2021-3656", "cve_desc": "A flaw was found in the KVM's AMD code for supporting SVM nested virtualization. The flaw occurs when processing the VMCB (virtual machine control block) provided by the L1 guest to spawn/handle a nested guest (L2). Due to improper validation of the \"virt_ext\" field, this issue could allow a malicious L1 to disable both VMLOAD/VMSAVE intercepts and VLS (Virtual VMLOAD/VMSAVE) for the L2 guest. As a result, the L2 guest would be allowed to read/write physical pages of the host, resulting in a crash of the entire system, leak of sensitive data or potential guest-to-host escape.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3656", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221425, "project": "linux", "commit_id": "c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc", "project_url": "https://github.com/torvalds/linux", "commit_url": "https://github.com/torvalds/linux/commit/c7dfa4009965a9b2d7b329ee970eb8da0d32f0bc", "commit_message": "KVM: nSVM: always intercept VMLOAD/VMSAVE when nested (CVE-2021-3656)\n\nIf L1 disables VMLOAD/VMSAVE intercepts, and doesn't enable\nVirtual VMLOAD/VMSAVE (currently not supported for the nested hypervisor),\nthen VMLOAD/VMSAVE must operate on the L1 physical memory, which is only\npossible by making L0 intercept these instructions.\n\nFailure to do so allowed the nested guest to run VMLOAD/VMSAVE unintercepted,\nand thus read/write portions of the host physical memory.\n\nFixes: 89c8a4984fc9 (\"KVM: SVM: Enable Virtual VMLOAD VMSAVE feature\")\n\nSuggested-by: Paolo Bonzini <pbonzini@redhat.com>\nSigned-off-by: Maxim Levitsky <mlevitsk@redhat.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>", "target": 0, "func": "void nested_load_control_from_vmcb12(struct vcpu_svm *svm,\n\t\t\t\t struct vmcb_control_area *control)\n{\n\tcopy_vmcb_control_area(&svm->nested.ctl, control);\n\n\t/* Copy it here because nested_svm_check_controls will check it. */\n\tsvm->nested.ctl.asid = control->asid;\n\tsvm->nested.ctl.msrpm_base_pa &= ~0x0fffULL;\n\tsvm->nested.ctl.iopm_base_pa &= ~0x0fffULL;\n}", "func_hash": 230595538519485967919655802199546917964, "file_name": "None", "file_hash": null, "cwe": ["CWE-862"], "cve": "CVE-2021-3656", "cve_desc": "A flaw was found in the KVM's AMD code for supporting SVM nested virtualization. The flaw occurs when processing the VMCB (virtual machine control block) provided by the L1 guest to spawn/handle a nested guest (L2). Due to improper validation of the \"virt_ext\" field, this issue could allow a malicious L1 to disable both VMLOAD/VMSAVE intercepts and VLS (Virtual VMLOAD/VMSAVE) for the L2 guest. As a result, the L2 guest would be allowed to read/write physical pages of the host, resulting in a crash of the entire system, leak of sensitive data or potential guest-to-host escape.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-3656", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221428, "project": "tensorflow", "commit_id": "5b491cd5e41ad63735161cec9c2a568172c8b6a3", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/5b491cd5e41ad63735161cec9c2a568172c8b6a3", "commit_message": "Validate `proto.dtype()` before calling `set_dtype()`.\n\nThis prevents a `DCHECK`-fail when the proto contains an invalid dtype for a tensor shape with 0 elements or for an incomplete tensor shape.\n\nPiperOrigin-RevId: 408369083\nChange-Id: Ia21a3e3d62a90d642a4561f08f3b543e5ad00c46", "target": 0, "func": "bool Tensor::FromProto(Allocator* a, const TensorProto& proto) {\n CHECK_NOTNULL(a);\n TensorBuffer* p = nullptr;\n if (!TensorShape::IsValid(proto.tensor_shape())) return false;\n if (proto.dtype() == DT_INVALID) return false;\n TensorShape shape(proto.tensor_shape());\n const int64_t N = shape.num_elements();\n if (N > 0 && proto.dtype()) {\n bool dtype_error = false;\n if (!proto.tensor_content().empty()) {\n const auto& content = proto.tensor_content();\n CASES_WITH_DEFAULT(proto.dtype(), p = Helper<T>::Decode(a, content, N),\n dtype_error = true, dtype_error = true);\n } else {\n CASES_WITH_DEFAULT(proto.dtype(), p = FromProtoField<T>(a, proto, N),\n dtype_error = true, dtype_error = true);\n }\n if (dtype_error || p == nullptr) return false;\n } else {\n // Handle the case of empty tensors (N = 0) or tensors with incomplete shape\n // (N = -1). All other values of `shape.num_elements()` should be invalid by\n // construction.\n // Here, we just need to validate that the `proto.dtype()` value is valid.\n bool dtype_error = false;\n CASES_WITH_DEFAULT(proto.dtype(), break, dtype_error = true,\n dtype_error = true);\n if (dtype_error) return false;\n }\n shape_ = shape;\n set_dtype(proto.dtype());\n UnrefIfNonNull(buf_);\n buf_ = p;\n // TODO(misard) add tracking of which kernels and steps are calling\n // FromProto.\n if (MemoryLoggingEnabled() && buf_ != nullptr && buf_->data() != nullptr) {\n LogMemory::RecordTensorAllocation(\"Unknown (from Proto)\",\n LogMemory::UNKNOWN_STEP_ID, *this);\n }\n return true;\n}", "func_hash": 12020279702191708342972381802829194549, "file_name": "tensor.cc", "file_hash": 3.038847119e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23571", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. When decoding a tensor from protobuf, a TensorFlow process can encounter cases where a `CHECK` assertion is invalidated based on user controlled arguments, if the tensors have an invalid `dtype` and 0 elements or an invalid shape. This allows attackers to cause denial of services in TensorFlow processes. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23571", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221480, "project": "flatpak", "commit_id": "89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "project_url": "https://github.com/flatpak/flatpak", "commit_url": "https://github.com/flatpak/flatpak/commit/89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "commit_message": "run: Add cross-references for some other seccomp syscall filters\n\nSigned-off-by: Simon McVittie <smcv@collabora.com>", "target": 0, "func": "job_removed_cb (SystemdManager *manager,\n guint32 id,\n char *job,\n char *unit,\n char *result,\n struct JobData *data)\n{\n if (strcmp (job, data->job) == 0)\n g_main_loop_quit (data->main_loop);\n}", "func_hash": 49571560272904558090942373416735431651, "file_name": "flatpak-run.c", "file_hash": 3.239870938e+37, "cwe": ["CWE-20"], "cve": "CVE-2021-41133", "cve_desc": "Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. In versions prior to 1.10.4 and 1.12.0, Flatpak apps with direct access to AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can trick portals and other host-OS services into treating the Flatpak app as though it was an ordinary, non-sandboxed host-OS process. They can do this by manipulating the VFS using recent mount-related syscalls that are not blocked by Flatpak's denylist seccomp filter, in order to substitute a crafted `/.flatpak-info` or make that file disappear entirely. Flatpak apps that act as clients for AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can escalate the privileges that the corresponding services will believe the Flatpak app has. Note that protocols that operate entirely over the D-Bus session bus (user bus), system bus or accessibility bus are not affected by this. This is due to the use of a proxy process `xdg-dbus-proxy`, whose VFS cannot be manipulated by the Flatpak app, when interacting with these buses. Patches exist for versions 1.10.4 and 1.12.0, and as of time of publication, a patch for version 1.8.2 is being planned. There are no workarounds aside from upgrading to a patched version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41133", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221512, "project": "flatpak", "commit_id": "89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "project_url": "https://github.com/flatpak/flatpak", "commit_url": "https://github.com/flatpak/flatpak/commit/89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "commit_message": "run: Add cross-references for some other seccomp syscall filters\n\nSigned-off-by: Simon McVittie <smcv@collabora.com>", "target": 0, "func": "flatpak_run_cups_check_server_is_socket (const char *server)\n{\n if (g_str_has_prefix (server, \"/\") && strstr (server, \":\") == NULL)\n return TRUE;\n\n return FALSE;\n}", "func_hash": 326371173058188413966903903002613120579, "file_name": "flatpak-run.c", "file_hash": 3.239870938e+37, "cwe": ["CWE-20"], "cve": "CVE-2021-41133", "cve_desc": "Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. In versions prior to 1.10.4 and 1.12.0, Flatpak apps with direct access to AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can trick portals and other host-OS services into treating the Flatpak app as though it was an ordinary, non-sandboxed host-OS process. They can do this by manipulating the VFS using recent mount-related syscalls that are not blocked by Flatpak's denylist seccomp filter, in order to substitute a crafted `/.flatpak-info` or make that file disappear entirely. Flatpak apps that act as clients for AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can escalate the privileges that the corresponding services will believe the Flatpak app has. Note that protocols that operate entirely over the D-Bus session bus (user bus), system bus or accessibility bus are not affected by this. This is due to the use of a proxy process `xdg-dbus-proxy`, whose VFS cannot be manipulated by the Flatpak app, when interacting with these buses. Patches exist for versions 1.10.4 and 1.12.0, and as of time of publication, a patch for version 1.8.2 is being planned. There are no workarounds aside from upgrading to a patched version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41133", "prediction_type": "TN", "model_output": " This code is safe.\n"} | |
| {"idx": 221513, "project": "flatpak", "commit_id": "89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "project_url": "https://github.com/flatpak/flatpak", "commit_url": "https://github.com/flatpak/flatpak/commit/89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "commit_message": "run: Add cross-references for some other seccomp syscall filters\n\nSigned-off-by: Simon McVittie <smcv@collabora.com>", "target": 0, "func": "write_xauth (char *number, FILE *output)\n{\n Xauth *xa, local_xa;\n char *filename;\n FILE *f;\n struct utsname unames;\n\n if (uname (&unames))\n {\n g_warning (\"uname failed\");\n return;\n }\n\n filename = XauFileName ();\n f = fopen (filename, \"rb\");\n if (f == NULL)\n return;\n\n while (TRUE)\n {\n xa = XauReadAuth (f);\n if (xa == NULL)\n break;\n if (xauth_entry_should_propagate (xa, unames.nodename, number))\n {\n local_xa = *xa;\n if (local_xa.number)\n {\n local_xa.number = \"99\";\n local_xa.number_length = 2;\n }\n\n if (local_xa.family == FamilyLocal &&\n !auth_streq (unames.nodename, local_xa.address, local_xa.address_length))\n {\n /* If we decided to propagate this cookie, but its address\n * doesn't match `unames.nodename`, we need to change it or\n * inside the container it will not work.\n */\n local_xa.address = unames.nodename;\n local_xa.address_length = strlen (local_xa.address);\n }\n\n if (!XauWriteAuth (output, &local_xa))\n g_warning (\"xauth write error\");\n }\n\n XauDisposeAuth (xa);\n }\n\n fclose (f);\n}", "func_hash": 298026588417576725636655583755612864569, "file_name": "flatpak-run.c", "file_hash": 3.239870938e+37, "cwe": ["CWE-20"], "cve": "CVE-2021-41133", "cve_desc": "Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. In versions prior to 1.10.4 and 1.12.0, Flatpak apps with direct access to AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can trick portals and other host-OS services into treating the Flatpak app as though it was an ordinary, non-sandboxed host-OS process. They can do this by manipulating the VFS using recent mount-related syscalls that are not blocked by Flatpak's denylist seccomp filter, in order to substitute a crafted `/.flatpak-info` or make that file disappear entirely. Flatpak apps that act as clients for AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can escalate the privileges that the corresponding services will believe the Flatpak app has. Note that protocols that operate entirely over the D-Bus session bus (user bus), system bus or accessibility bus are not affected by this. This is due to the use of a proxy process `xdg-dbus-proxy`, whose VFS cannot be manipulated by the Flatpak app, when interacting with these buses. Patches exist for versions 1.10.4 and 1.12.0, and as of time of publication, a patch for version 1.8.2 is being planned. There are no workarounds aside from upgrading to a patched version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41133", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221524, "project": "flatpak", "commit_id": "89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "project_url": "https://github.com/flatpak/flatpak", "commit_url": "https://github.com/flatpak/flatpak/commit/89ae9fe74c6d445bb1b3a40e568d77cf5de47e48", "commit_message": "run: Add cross-references for some other seccomp syscall filters\n\nSigned-off-by: Simon McVittie <smcv@collabora.com>", "target": 0, "func": "calculate_ld_cache_checksum (GBytes *app_deploy_data,\n GBytes *runtime_deploy_data,\n const char *app_extensions,\n const char *runtime_extensions)\n{\n g_autoptr(GChecksum) ld_so_checksum = g_checksum_new (G_CHECKSUM_SHA256);\n if (app_deploy_data)\n g_checksum_update (ld_so_checksum, (guchar *) flatpak_deploy_data_get_commit (app_deploy_data), -1);\n g_checksum_update (ld_so_checksum, (guchar *) flatpak_deploy_data_get_commit (runtime_deploy_data), -1);\n if (app_extensions)\n g_checksum_update (ld_so_checksum, (guchar *) app_extensions, -1);\n if (runtime_extensions)\n g_checksum_update (ld_so_checksum, (guchar *) runtime_extensions, -1);\n\n return g_strdup (g_checksum_get_string (ld_so_checksum));\n}", "func_hash": 16599698372649446895038215436901666201, "file_name": "flatpak-run.c", "file_hash": 3.239870938e+37, "cwe": ["CWE-20"], "cve": "CVE-2021-41133", "cve_desc": "Flatpak is a system for building, distributing, and running sandboxed desktop applications on Linux. In versions prior to 1.10.4 and 1.12.0, Flatpak apps with direct access to AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can trick portals and other host-OS services into treating the Flatpak app as though it was an ordinary, non-sandboxed host-OS process. They can do this by manipulating the VFS using recent mount-related syscalls that are not blocked by Flatpak's denylist seccomp filter, in order to substitute a crafted `/.flatpak-info` or make that file disappear entirely. Flatpak apps that act as clients for AF_UNIX sockets such as those used by Wayland, Pipewire or pipewire-pulse can escalate the privileges that the corresponding services will believe the Flatpak app has. Note that protocols that operate entirely over the D-Bus session bus (user bus), system bus or accessibility bus are not affected by this. This is due to the use of a proxy process `xdg-dbus-proxy`, whose VFS cannot be manipulated by the Flatpak app, when interacting with these buses. Patches exist for versions 1.10.4 and 1.12.0, and as of time of publication, a patch for version 1.8.2 is being planned. There are no workarounds aside from upgrading to a patched version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41133", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221630, "project": "tensorflow", "commit_id": "35f0fabb4c178253a964d7aabdbb15c6a398b69a", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/35f0fabb4c178253a964d7aabdbb15c6a398b69a", "commit_message": "Avoid Segfault for scalar shapes.\n\nCalling tensor::FromElementsOp with an empty vector of elements and no type\ncauses a segfault. We need to let the FromElementsOp know which scalar type it\nshould have.\nAlso add back the DynamicBroadcastInDimOp canonicalization patterns, which\npreviously prevented this bug from happening.\nAdd a regression test that demonstrates the bug.\n\nPiperOrigin-RevId: 417561444\nChange-Id: I6d1d6cfb71aabbad6102422625a00bbe253ac95a", "target": 0, "func": "DynamicBroadcastInDimOpLowering::DynamicBroadcastInDimOpLowering(\n MLIRContext* ctx)\n : Base(ctx) {}", "func_hash": 280279696923561040610367602422968409197, "file_name": "tf_cpurt_symbolic_shape_optimization.cc", "file_hash": 6.112767029e+37, "cwe": ["CWE-754"], "cve": "CVE-2022-23593", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The `simplifyBroadcast` function in the MLIR-TFRT infrastructure in TensorFlow is vulnerable to a segfault (hence, denial of service), if called with scalar shapes. If all shapes are scalar, then `maxRank` is 0, so we build an empty `SmallVector`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23593", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 221634, "project": "tensorflow", "commit_id": "35f0fabb4c178253a964d7aabdbb15c6a398b69a", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/35f0fabb4c178253a964d7aabdbb15c6a398b69a", "commit_message": "Avoid Segfault for scalar shapes.\n\nCalling tensor::FromElementsOp with an empty vector of elements and no type\ncauses a segfault. We need to let the FromElementsOp know which scalar type it\nshould have.\nAlso add back the DynamicBroadcastInDimOp canonicalization patterns, which\npreviously prevented this bug from happening.\nAdd a regression test that demonstrates the bug.\n\nPiperOrigin-RevId: 417561444\nChange-Id: I6d1d6cfb71aabbad6102422625a00bbe253ac95a", "target": 0, "func": "bool isKnownBroadcastable(ShapeComponentAnalysis& analysis,\n ValueRange bcasted_shapes, Value output_shape) {\n auto output_shape_dims = analysis.GetValueInfo(output_shape);\n if (!output_shape_dims) return false;\n for (Value shape : bcasted_shapes) {\n auto shape_dims = analysis.GetValueInfo(shape);\n if (!shape_dims) return false;\n // Iterate backwards over the smallest input shape.\n for (auto zip : llvm::zip(llvm::reverse(*output_shape_dims),\n llvm::reverse(*shape_dims))) {\n const auto& first = std::get<0>(zip);\n const auto& second = std::get<1>(zip);\n // TODO(ezhulenev): What to do with dimensions statically known to be\n // zero?\n // Numpy can only broadcast [0] with [1], however Tensorflow can broadcast\n // [0] with any dimension size, and produces dimension of size [0].\n // Currently we'll conservatively return failure and will not proceed with\n // a rewrite.\n if (first.isConstant(0) || second.isConstant(0)) return false;\n // If either shape has a static one dimension the broadcast will always\n // succeed.\n if (first.isConstant(1) || second.isConstant(1)) continue;\n // Otherwise dims have to be equal.\n if (first != second) return false;\n }\n }\n return true;\n}", "func_hash": 56511330281754110246714027754224181291, "file_name": "tf_cpurt_symbolic_shape_optimization.cc", "file_hash": 6.112767029e+37, "cwe": ["CWE-754"], "cve": "CVE-2022-23593", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The `simplifyBroadcast` function in the MLIR-TFRT infrastructure in TensorFlow is vulnerable to a segfault (hence, denial of service), if called with scalar shapes. If all shapes are scalar, then `maxRank` is 0, so we build an empty `SmallVector`. The fix will be included in TensorFlow 2.8.0. This is the only affected version.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23593", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221641, "project": "hermes", "commit_id": "55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "project_url": "https://github.com/facebook/hermes", "commit_url": "https://github.com/facebook/hermes/commit/55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "commit_message": "Handle typeof applied to empty in InstSimplify\n\nSummary:\nDo not simplify `typeof` if it is applied to an invalid type. This\nhandles a case like the one in the added test, where `typeof` is called\non a literal empty in unreachable code.\n\nReviewed By: kodafb\n\nDifferential Revision: D31000173\n\nfbshipit-source-id: 2d7f69cbcc9c1bb0a916585c07171089444c85dc", "target": 0, "func": "LiteralString *hermes::evalToString(IRBuilder &builder, Literal *operand) {\n if (auto *str = llvh::dyn_cast<LiteralString>(operand))\n return str;\n if (auto *num = llvh::dyn_cast<LiteralNumber>(operand)) {\n char buf[NUMBER_TO_STRING_BUF_SIZE];\n auto len = numberToString(num->getValue(), buf, sizeof(buf));\n return builder.getLiteralString(StringRef(buf, len));\n }\n return nullptr;\n}", "func_hash": 188224018058007257565910057877346688433, "file_name": "IREval.cpp", "file_hash": 4.296191478e+37, "cwe": ["CWE-843"], "cve": "CVE-2021-24045", "cve_desc": "A type confusion vulnerability could be triggered when resolving the \"typeof\" unary operator in Facebook Hermes prior to v0.10.0. Note that this is only exploitable if the application using Hermes permits evaluation of untrusted JavaScript. Hence, most React Native applications are not affected.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-24045", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221648, "project": "hermes", "commit_id": "55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "project_url": "https://github.com/facebook/hermes", "commit_url": "https://github.com/facebook/hermes/commit/55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "commit_message": "Handle typeof applied to empty in InstSimplify\n\nSummary:\nDo not simplify `typeof` if it is applied to an invalid type. This\nhandles a case like the one in the added test, where `typeof` is called\non a literal empty in unreachable code.\n\nReviewed By: kodafb\n\nDifferential Revision: D31000173\n\nfbshipit-source-id: 2d7f69cbcc9c1bb0a916585c07171089444c85dc", "target": 0, "func": "LiteralNumber *hermes::evalToInt32(IRBuilder &builder, Literal *operand) {\n // Eval to a number first, then truncate to a 32-bit int.\n LiteralNumber *lit = evalToNumber(builder, operand);\n if (!lit) {\n return nullptr;\n }\n double val = lit->getValue();\n return builder.getLiteralNumber(truncateToInt32(val));\n}", "func_hash": 259221629719785563451092758598939754372, "file_name": "IREval.cpp", "file_hash": 4.296191478e+37, "cwe": ["CWE-843"], "cve": "CVE-2021-24045", "cve_desc": "A type confusion vulnerability could be triggered when resolving the \"typeof\" unary operator in Facebook Hermes prior to v0.10.0. Note that this is only exploitable if the application using Hermes permits evaluation of untrusted JavaScript. Hence, most React Native applications are not affected.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-24045", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221649, "project": "hermes", "commit_id": "55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "project_url": "https://github.com/facebook/hermes", "commit_url": "https://github.com/facebook/hermes/commit/55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "commit_message": "Handle typeof applied to empty in InstSimplify\n\nSummary:\nDo not simplify `typeof` if it is applied to an invalid type. This\nhandles a case like the one in the added test, where `typeof` is called\non a literal empty in unreachable code.\n\nReviewed By: kodafb\n\nDifferential Revision: D31000173\n\nfbshipit-source-id: 2d7f69cbcc9c1bb0a916585c07171089444c85dc", "target": 0, "func": "LiteralNumber *hermes::evalToNumber(IRBuilder &builder, Literal *operand) {\n if (auto *numLiteral = llvh::dyn_cast<LiteralNumber>(operand)) {\n return numLiteral;\n }\n if (auto *boolLiteral = llvh::dyn_cast<LiteralBool>(operand)) {\n return builder.getLiteralNumber(boolLiteral->getValue());\n }\n if (operand->getType().isUndefinedType()) {\n return builder.getLiteralNaN();\n }\n if (operand->getType().isNullType()) {\n return builder.getLiteralPositiveZero();\n }\n return nullptr;\n}", "func_hash": 9325140578910978613803377013875964493, "file_name": "IREval.cpp", "file_hash": 4.296191478e+37, "cwe": ["CWE-843"], "cve": "CVE-2021-24045", "cve_desc": "A type confusion vulnerability could be triggered when resolving the \"typeof\" unary operator in Facebook Hermes prior to v0.10.0. Note that this is only exploitable if the application using Hermes permits evaluation of untrusted JavaScript. Hence, most React Native applications are not affected.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-24045", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 221650, "project": "hermes", "commit_id": "55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "project_url": "https://github.com/facebook/hermes", "commit_url": "https://github.com/facebook/hermes/commit/55e1b2343f4deb1a1b5726cfe1e23b2068217ff2", "commit_message": "Handle typeof applied to empty in InstSimplify\n\nSummary:\nDo not simplify `typeof` if it is applied to an invalid type. This\nhandles a case like the one in the added test, where `typeof` is called\non a literal empty in unreachable code.\n\nReviewed By: kodafb\n\nDifferential Revision: D31000173\n\nfbshipit-source-id: 2d7f69cbcc9c1bb0a916585c07171089444c85dc", "target": 0, "func": "LiteralBool *hermes::evalToBoolean(IRBuilder &builder, Value *operand) {\n if (auto *L = llvh::dyn_cast<Literal>(operand)) {\n return evalToBoolean(builder, L);\n }\n\n Type OpTY = operand->getType();\n if (OpTY.isObjectType()) {\n return builder.getLiteralBool(true);\n }\n if (OpTY.isNullType() || OpTY.isUndefinedType()) {\n return builder.getLiteralBool(false);\n }\n return nullptr;\n}", "func_hash": 53660105334212722971261735937325816463, "file_name": "IREval.cpp", "file_hash": 4.296191478e+37, "cwe": ["CWE-843"], "cve": "CVE-2021-24045", "cve_desc": "A type confusion vulnerability could be triggered when resolving the \"typeof\" unary operator in Facebook Hermes prior to v0.10.0. Note that this is only exploitable if the application using Hermes permits evaluation of untrusted JavaScript. Hence, most React Native applications are not affected.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-24045", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222497, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "Status FunctionLibraryDefinition::RemoveGradient(const string& func) {\n const auto& i = func_grad_.find(func);\n if (i == func_grad_.end()) {\n return errors::InvalidArgument(\"Tried to remove non-existent gradient '\",\n func, \"'.\");\n }\n func_grad_.erase(i);\n return Status::OK();\n}", "func_hash": 113748600215228602681268250403480176206, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222510, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "Status FunctionCallFrame::GetArg(int index, const Tensor** val) {\n if (index < 0 || static_cast<size_t>(index) >= args_.size()) {\n return errors::InvalidArgument(\"GetArg \", index, \" is not within [0, \",\n args_.size(), \")\");\n }\n *val = &args_[index];\n return Status::OK();\n}", "func_hash": 267502352746356443197188783772791040786, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222514, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "std::vector<string> FunctionLibraryDefinition::ListFunctionNames() const {\n std::vector<string> function_names;\n tf_shared_lock l(mu_);\n function_names.reserve(function_defs_.size());\n for (const auto& it : function_defs_) {\n function_names.emplace_back(it.first);\n }\n return function_names;\n}", "func_hash": 230799103127820451533662964708428765103, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222516, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "Status FunctionLibraryDefinition::GetAttr(const Node& node, const string& attr,\n T* value) const {\n return GetAttr(node.def(), attr, value);\n}", "func_hash": 55126930919959728244881478635166965249, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\nStatus FunctionLibraryDefinition::"} | |
| {"idx": 222526, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "Status FunctionLibraryDefinition::GetAttr(const NodeDef& ndef,\n const string& attr, T* value) const {\n const FunctionDef* fdef = GetAttrImpl(ndef);\n if (fdef && TryGetNodeAttr(AttrSlice(&fdef->attr()), attr, value)) {\n return Status::OK();\n }\n return errors::InvalidArgument(\"Attr \", attr, \" is not defined.\");\n}", "func_hash": 252656468492423241270710654563116203641, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222528, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "string FunctionLibraryRuntime::ExecutorType(const InstantiateOptions& options,\n AttrSlice attrs) {\n if (!options.executor_type.empty()) {\n return options.executor_type;\n } else if (const AttrValue* executor_attr = attrs.Find(kExecutorAttr)) {\n return executor_attr->s();\n } else {\n return string();\n }\n}", "func_hash": 323747121985692991922349490489819137345, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222529, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "string FunctionLibraryDefinition::UniqueFunctionName(StringPiece prefix) const {\n tf_shared_lock l(mu_);\n int index = 0;\n string name = strings::StrCat(prefix, index);\n while (function_defs_.find(name) != function_defs_.end()) {\n ++index;\n name = strings::StrCat(prefix, index);\n }\n return name;\n}", "func_hash": 170213557678497357831120125400614688828, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222534, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "string FunctionLibraryRuntime::Options::DebugString() const {\n return absl::StrCat(\n \"FLR::Options(step_id=\", step_id, \" rendezvous=\", IsSet(rendezvous),\n \" cancellation_manager=\", IsSet(cancellation_manager),\n \" collective_executor=\", IsSet(collective_executor),\n \" step_container=\", IsSet(step_container),\n \" stats_collector=\", IsSet(stats_collector), \" runner=\", IsSet(runner),\n \" remote_execution=\", remote_execution, \" source_device=\", source_device,\n \" create_rendezvous=\", create_rendezvous,\n \" allow_dead_tensors=\", allow_dead_tensors,\n \" args_alloc_attrs=\", AllocatorAttributesToString(args_alloc_attrs),\n \" rets_alloc_attrs=\", AllocatorAttributesToString(rets_alloc_attrs), \")\");\n}", "func_hash": 149888577691049785577412719019837386303, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 222541, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "FunctionDef FunctionDefHelper::Define(gtl::ArraySlice<string> arg_def,\n gtl::ArraySlice<string> ret_def,\n gtl::ArraySlice<string> attr_def,\n gtl::ArraySlice<Node> node_def) {\n return Define(\"_\", arg_def, ret_def, attr_def, node_def);\n}", "func_hash": 215873688441555826084602743320473585881, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222542, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "FunctionDef FunctionDefHelper::Create(\n const string& function_name, gtl::ArraySlice<string> in_def,\n gtl::ArraySlice<string> out_def, gtl::ArraySlice<string> attr_def,\n gtl::ArraySlice<Node> node_def,\n gtl::ArraySlice<std::pair<string, string>> ret_def) {\n return Create(function_name, in_def, out_def, attr_def, node_def, ret_def,\n /*control_ret_def=*/{});\n}", "func_hash": 334749999452371949057649610132991557939, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222551, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "string Print(const OpDef::ArgDef& arg) {\n string out;\n strings::StrAppend(&out, arg.name(), \":\");\n if (arg.is_ref()) strings::StrAppend(&out, \"Ref(\");\n if (!arg.number_attr().empty()) {\n strings::StrAppend(&out, arg.number_attr(), \"*\");\n }\n if (arg.type() != DT_INVALID) {\n strings::StrAppend(&out, DataTypeString(arg.type()));\n } else {\n strings::StrAppend(&out, arg.type_attr());\n }\n if (arg.is_ref()) strings::StrAppend(&out, \")\");\n return out;\n}", "func_hash": 318522956896948732455337942944296714135, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222560, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "FunctionLibraryDefinition FunctionLibraryDefinition::ReachableDefinitions(\n const FunctionDef& func) const {\n return ReachableFunctionLibraryDefinition(*this, func.node_def());\n}", "func_hash": 33596540849660682165852844623918832437, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\nExplanation: The function library"} | |
| {"idx": 222562, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "bool RegisterOp(const string& op, Creator func) {\n CHECK(GetOpGradFactory()->insert({op, func}).second)\n << \"Duplicated gradient for \" << op;\n return true;\n}", "func_hash": 271341566786267686326944605596421992917, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222566, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "Status FunctionLibraryDefinition::ReplaceGradient(const GradientDef& grad) {\n mutex_lock l(mu_);\n bool added;\n TF_RETURN_IF_ERROR(RemoveGradient(grad.function_name()));\n TF_RETURN_IF_ERROR(AddGradientDefHelper(grad, &added));\n return Status::OK();\n}", "func_hash": 172631770792776340979698649907264716730, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\nStatus FunctionLibraryDefinition::"} | |
| {"idx": 222576, "project": "tensorflow", "commit_id": "3d89911481ba6ebe8c88c1c0b595412121e6c645", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/3d89911481ba6ebe8c88c1c0b595412121e6c645", "commit_message": "Eliminate `CHECK`-fail from `function.cc`.\n\nPiperOrigin-RevId: 409414744\nChange-Id: Ic854e12ab2edb88b165d32e2d632c4ee654d71ad", "target": 0, "func": "Status FunctionLibraryDefinition::RemoveFunction(const string& func) {\n mutex_lock l(mu_);\n TF_RETURN_IF_ERROR(RemoveFunctionHelper(func));\n return Status::OK();\n}", "func_hash": 66940326914843688154238065331369770073, "file_name": "function.cc", "file_hash": 2.757554554e+38, "cwe": ["CWE-617"], "cve": "CVE-2022-23586", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. A malicious user can cause a denial of service by altering a `SavedModel` such that assertions in `function.cc` would be falsified and crash the Python interpreter. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23586", "prediction_type": "TN", "model_output": " It is safe.\nStatus FunctionLibraryDefinition::"} | |
| {"idx": 222596, "project": "mruby", "commit_id": "0849a2885f81cfd82134992c06df3ccd59052ac7", "project_url": "https://github.com/mruby/mruby", "commit_url": "https://github.com/mruby/mruby/commit/0849a2885f81cfd82134992c06df3ccd59052ac7", "commit_message": "codegen.c: stack position may be wrong on assignments.\n\nWhen `[]=` access includes keyword arguments.", "target": 0, "func": "gen_values(codegen_scope *s, node *t, int val, int limit)\n{\n int n = 0;\n int first = 1;\n int slimit = GEN_VAL_STACK_MAX;\n\n if (limit == 0) limit = GEN_LIT_ARY_MAX;\n if (cursp() >= slimit) slimit = INT16_MAX;\n\n if (!val) {\n while (t) {\n codegen(s, t->car, NOVAL);\n n++;\n t = t->cdr;\n }\n return n;\n }\n\n while (t) {\n int is_splat = nint(t->car->car) == NODE_SPLAT;\n\n if (is_splat || n >= limit-1 || cursp() >= slimit) { /* flush stack */\n pop_n(n);\n if (first) {\n if (n == 0) {\n genop_1(s, OP_LOADNIL, cursp());\n }\n else {\n genop_2(s, OP_ARRAY, cursp(), n);\n }\n push();\n first = 0;\n limit = GEN_LIT_ARY_MAX;\n }\n else if (n > 0) {\n pop();\n genop_2(s, OP_ARYPUSH, cursp(), n);\n push();\n }\n n = 0;\n }\n codegen(s, t->car, val);\n if (is_splat) {\n pop(); pop();\n genop_1(s, OP_ARYCAT, cursp());\n push();\n }\n else {\n n++;\n }\n t = t->cdr;\n }\n if (!first) {\n pop();\n if (n > 0) {\n pop_n(n);\n genop_2(s, OP_ARYPUSH, cursp(), n);\n }\n return -1; /* variable length */\n }\n return n;\n}", "func_hash": 33768448724805036502672786649042077587, "file_name": "codegen.c", "file_hash": 6.965669465e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-0525", "cve_desc": "Out-of-bounds Read in Homebrew mruby prior to 3.2.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-0525", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222672, "project": "tmate-ssh-server", "commit_id": "1c020d1f5ca462f5b150b46a027aaa1bbe3c9596", "project_url": "https://github.com/tmate-io/tmate-ssh-server", "commit_url": "https://github.com/tmate-io/tmate-ssh-server/commit/1c020d1f5ca462f5b150b46a027aaa1bbe3c9596", "commit_message": "Harden /tmp/tmate directory\n\nSuggested by Matthias Gerstner", "target": 0, "func": "static char* get_full_hostname(void)\n{\n\tstruct addrinfo hints, *info;\n\tchar hostname[1024];\n\tint gai_result;\n\tchar *ret;\n\n\tif (gethostname(hostname, sizeof(hostname)) < 0)\n\t\ttmate_fatal(\"cannot get hostname\");\n\thostname[1023] = '\\0';\n\n\tmemset(&hints, 0, sizeof hints);\n\thints.ai_family = AF_UNSPEC; /*either IPV4 or IPV6*/\n\thints.ai_socktype = SOCK_STREAM;\n\thints.ai_flags = AI_CANONNAME;\n\n\tif ((gai_result = getaddrinfo(hostname, NULL, &hints, &info)) != 0) {\n\t\ttmate_info(\"cannot lookup hostname: %s\", gai_strerror(gai_result));\n\t\treturn xstrdup(hostname);\n\t}\n\n\tret = xstrdup(info->ai_canonname);\n\n\tfreeaddrinfo(info);\n\treturn ret;\n}", "func_hash": 268626608373770868823484149382443865495, "file_name": "tmate-main.c", "file_hash": 9.081000659e+37, "cwe": ["CWE-362"], "cve": "CVE-2021-44512", "cve_desc": "World-writable permissions on the /tmp/tmate/sessions directory in tmate-ssh-server 2.3.0 allow a local attacker to compromise the integrity of session handling, or obtain the read-write session ID from a read-only session symlink in this directory.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-44512", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222734, "project": "pjproject", "commit_id": "f74c1fc22b760d2a24369aa72c74c4a9ab985859", "project_url": "https://github.com/pjsip/pjproject", "commit_url": "https://github.com/pjsip/pjproject/commit/f74c1fc22b760d2a24369aa72c74c4a9ab985859", "commit_message": "Merge pull request from GHSA-r374-qrwv-86hh", "target": 0, "func": "void pjmedia_rtcp_xr_tx_rtp( pjmedia_rtcp_xr_session *session, \n\t\t\t unsigned ptsize )\n{\n PJ_UNUSED_ARG(session);\n PJ_UNUSED_ARG(ptsize);\n}", "func_hash": 246529347859917224119873391927194082460, "file_name": "rtcp_xr.c", "file_hash": 2.3863221e+38, "cwe": ["CWE-125"], "cve": "CVE-2021-43845", "cve_desc": "PJSIP is a free and open source multimedia communication library. In version 2.11.1 and prior, if incoming RTCP XR message contain block, the data field is not checked against the received packet size, potentially resulting in an out-of-bound read access. This affects all users that use PJMEDIA and RTCP XR. A malicious actor can send a RTCP XR message with an invalid packet size.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-43845", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222736, "project": "pjproject", "commit_id": "f74c1fc22b760d2a24369aa72c74c4a9ab985859", "project_url": "https://github.com/pjsip/pjproject", "commit_url": "https://github.com/pjsip/pjproject/commit/f74c1fc22b760d2a24369aa72c74c4a9ab985859", "commit_message": "Merge pull request from GHSA-r374-qrwv-86hh", "target": 0, "func": "void pjmedia_rtcp_xr_fini(pjmedia_rtcp_xr_session *session)\n{\n PJ_UNUSED_ARG(session);\n}", "func_hash": 303015128955368360148251261163331019387, "file_name": "rtcp_xr.c", "file_hash": 2.3863221e+38, "cwe": ["CWE-125"], "cve": "CVE-2021-43845", "cve_desc": "PJSIP is a free and open source multimedia communication library. In version 2.11.1 and prior, if incoming RTCP XR message contain block, the data field is not checked against the received packet size, potentially resulting in an out-of-bound read access. This affects all users that use PJMEDIA and RTCP XR. A malicious actor can send a RTCP XR message with an invalid packet size.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2021-43845", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 222836, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "void ExtractValue(DimensionHandle d, int64_t* result) {\n if (!InferenceContext::ValueKnown(d)) {\n *result = -counter;\n counter++;\n } else {\n int64_t val = InferenceContext::Value(d);\n if (val >= 0) {\n *result = val;\n } else {\n // A shape inference function generated an invalid dimension handle.\n // Use a symbolic dimension to encode this.\n *result = -counter;\n counter++;\n }\n }\n }", "func_hash": 207353329651055425870028433668300743231, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222839, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "bool operator==(const ShapeId& other) const {\n return node == other.node && port_id == other.port_id;\n }", "func_hash": 165183271706430262843186415982673962401, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 222842, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "Status GraphProperties::UpdateShapes(\n SymbolicShapeRefiner* shape_refiner,\n const absl::flat_hash_map<const NodeDef*, const NodeDef*>& resource_handles,\n const NodeDef* n, bool* new_shapes) const {\n if (IsEnter(*n)) {\n // The Enter shape function always forwards an UnknownShape, so do the right\n // thing here.\n TF_RETURN_IF_ERROR(UpdateEnter(shape_refiner, n, new_shapes));\n } else if (IsMerge(*n)) {\n // Properly handle merge nodes.\n TF_RETURN_IF_ERROR(UpdateMerge(shape_refiner, n, new_shapes));\n } else if (IsEnqueue(*n)) {\n // Make sure the shapes of enqueued tensors are propagated to the queue\n // itself.\n TF_RETURN_IF_ERROR(\n UpdateEnqueue(n, resource_handles, shape_refiner, new_shapes));\n } else if (IsQueue(*n)) {\n // Set shapes and types of Queue ops, if needed.\n TF_RETURN_IF_ERROR(UpdateQueue(n, shape_refiner, new_shapes));\n } else {\n // Rely on regular TF shape refinement for all the other nodes.\n // UpdateNode calls UpdateFunction if a function node is detected.\n TF_RETURN_IF_ERROR(shape_refiner->UpdateNode(n, new_shapes));\n }\n\n return Status::OK();\n}", "func_hash": 41753264384860837780428879764450220898, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222851, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "ShapeHandle GetMergedShape(InferenceContext* ic, ShapeHandle s) {\n const auto& actual_shape = shapes_.GetMergedValue(s);\n if (!InferenceContext::RankKnown(actual_shape)) {\n return ic->UnknownShape();\n } else {\n std::vector<DimensionHandle> dims;\n for (int j = 0; j < InferenceContext::Rank(actual_shape); ++j) {\n shape_inference::DimensionHandle dim =\n InferenceContext::DimKnownRank(actual_shape, j);\n int64_t d = dims_.GetMergedValue(dim);\n // Symbolic shape manager may made some dims < -1, which causes errors\n // in creating Dimension.\n if (d < -1) {\n d = -1;\n }\n dims.push_back(ic->MakeDim(d));\n }\n return ic->MakeShape(dims);\n }\n }", "func_hash": 79745112361667473054006984412942523861, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": "\n The code is safe.\n The"} | |
| {"idx": 222895, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "TensorProto MakeTensorProtoFromShape(InferenceContext* ic,\n const ShapeHandle& shape,\n const ShapeHandle& tensor_as_shape,\n const DataType& dtype) {\n TensorProto tensor_proto;\n tensor_proto.set_dtype(dtype);\n auto* shape_proto = tensor_proto.mutable_tensor_shape();\n if (ic->Rank(shape) == 1) {\n shape_proto->add_dim()->set_size(ic->Rank(tensor_as_shape));\n }\n // For a scalar tensor, tensor_shape field will be left empty; no dim.\n for (int i = 0; i < ic->Rank(tensor_as_shape); i++) {\n int64_t value = ic->Value(ic->Dim(tensor_as_shape, i));\n if (dtype == DT_INT32) {\n tensor_proto.add_int_val(value);\n } else {\n tensor_proto.add_int64_val(value);\n }\n }\n return tensor_proto;\n}", "func_hash": 337239825292773226947815635617831727612, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": "\n 1. The code is safe.\n"} | |
| {"idx": 222896, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "Status GraphProperties::InferFromCostGraph(const CostGraphDef& cost_graph) {\n if (cost_graph.node_size() == 0) {\n LOG(WARNING) << \"cost_graph is empty: nothing can be inferred!\";\n }\n std::unordered_map<string, const CostGraphDef::Node*> name_to_cost;\n std::unordered_map<string, const NodeDef*> name_to_node; // Empty\n for (auto& node : cost_graph.node()) {\n name_to_cost[node.name()] = &node;\n\n std::vector<OpInfo::TensorProperties> output_properties;\n for (const auto& out : node.output_info()) {\n OpInfo::TensorProperties properties;\n properties.set_dtype(out.dtype());\n *properties.mutable_shape() = out.shape();\n output_properties.push_back(properties);\n }\n output_properties_[node.name()] = output_properties;\n }\n\n for (const auto& node : item_.graph.node()) {\n // Skip the nodes that are not in the cost graph: these are nodes that\n // aren't run, because they aren't in the intersection of transitive fan-in\n // of a fetch node and the transitive fan-out of an input, or nodes that\n // were optimized away by the optimizer.\n auto it = name_to_cost.find(node.name());\n if (it == name_to_cost.end()) {\n continue;\n }\n std::vector<OpInfo::TensorProperties> inputs =\n FindInputFeatures(node, name_to_cost, name_to_node);\n\n input_properties_[node.name()] = inputs;\n }\n return Status::OK();\n}", "func_hash": 51723334310908085441426065717184457413, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 222901, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "bool IsIntegerVector(const Tensor& tensor) {\n if (tensor.dims() == 1 &&\n (tensor.dtype() == DT_INT32 || tensor.dtype() == DT_INT64)) {\n return true;\n }\n return false;\n }", "func_hash": 297340806684137612776456555915359420187, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": "\n This code is safe.\n The"} | |
| {"idx": 222902, "project": "tensorflow", "commit_id": "97282c6d0d34476b6ba033f961590b783fa184cd", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/97282c6d0d34476b6ba033f961590b783fa184cd", "commit_message": "Prevent a crash due to heap OOB write in grappler.\n\nPiperOrigin-RevId: 408318417\nChange-Id: If095feb8c001e3a8ac4a85b7387b81e8309df47d", "target": 0, "func": "bool HasAnyUnknownDimensions(const TensorShapeProto& proto) {\n if (proto.unknown_rank()) {\n return true;\n }\n for (const auto& dim : proto.dim()) {\n if (dim.size() < 0) {\n return true;\n }\n }\n return false;\n}", "func_hash": 324001505080972386822741902054487970644, "file_name": "graph_properties.cc", "file_hash": 3.316429308e+38, "cwe": ["CWE-787"], "cve": "CVE-2022-23566", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. TensorFlow is vulnerable to a heap OOB write in `Grappler`. The `set_output` function writes to an array at the specified index. Hence, this gives a malicious user a write primitive. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-23566", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 223093, "project": "ImageMagick", "commit_id": "f221ea0fa3171f0f4fdf74ac9d81b203b9534c23", "project_url": "https://github.com/ImageMagick/ImageMagick", "commit_url": "https://github.com/ImageMagick/ImageMagick/commit/f221ea0fa3171f0f4fdf74ac9d81b203b9534c23", "commit_message": "Fixes #4985: 4e+26 is outside the range of representable values of type 'unsigned long' at coders/pcl.c:299 (#4986)\n\n* fix Division by zero in XMenuWidget() of MagickCore/widget.c\n\n* Fix memory leak in AnimateImageCommand() of MagickWand/animate.c and DisplayImageCommand() of MagickWand/display.c\n\n* fix Division by zero in ReadEnhMetaFile() of coders/emf.c\n\n* Resolve conflicts\n\n* fix issue: outside the range of representable values of type 'unsigned char' at coders/psd.c:1025\n\n* fix error: 4e+26 is outside the range of representable values of type 'unsigned long' at coders/pcl.c:299\n\nCo-authored-by: zhailiangliang <zhailiangliang@loongson.cn>", "target": 0, "func": "static size_t PCLDeltaCompressImage(const size_t length,\n const unsigned char *previous_pixels,const unsigned char *pixels,\n unsigned char *compress_pixels)\n{\n int\n delta,\n j,\n replacement;\n\n ssize_t\n i,\n x;\n\n unsigned char\n *q;\n\n q=compress_pixels;\n for (x=0; x < (ssize_t) length; )\n {\n j=0;\n for (i=0; x < (ssize_t) length; x++)\n {\n if (*pixels++ != *previous_pixels++)\n {\n i=1;\n break;\n }\n j++;\n }\n while (x < (ssize_t) length)\n {\n x++;\n if (*pixels == *previous_pixels)\n break;\n i++;\n previous_pixels++;\n pixels++;\n }\n if (i == 0)\n break;\n replacement=j >= 31 ? 31 : j;\n j-=replacement;\n delta=i >= 8 ? 8 : i;\n *q++=(unsigned char) (((delta-1) << 5) | replacement);\n if (replacement == 31)\n {\n for (replacement=255; j != 0; )\n {\n if (replacement > j)\n replacement=j;\n *q++=(unsigned char) replacement;\n j-=replacement;\n }\n if (replacement == 255)\n *q++='\\0';\n }\n for (pixels-=i; i != 0; )\n {\n for (i-=delta; delta != 0; delta--)\n *q++=(*pixels++);\n if (i == 0)\n break;\n delta=i;\n if (i >= 8)\n delta=8;\n *q++=(unsigned char) ((delta-1) << 5);\n }\n }\n return((size_t) (q-compress_pixels));\n}", "func_hash": 25519071089837920682470650995925922413, "file_name": "pcl.c", "file_hash": 1.070506946e+38, "cwe": ["CWE-190"], "cve": "CVE-2022-32546", "cve_desc": "A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned long' at coders/pcl.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32546", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 223094, "project": "ImageMagick", "commit_id": "f221ea0fa3171f0f4fdf74ac9d81b203b9534c23", "project_url": "https://github.com/ImageMagick/ImageMagick", "commit_url": "https://github.com/ImageMagick/ImageMagick/commit/f221ea0fa3171f0f4fdf74ac9d81b203b9534c23", "commit_message": "Fixes #4985: 4e+26 is outside the range of representable values of type 'unsigned long' at coders/pcl.c:299 (#4986)\n\n* fix Division by zero in XMenuWidget() of MagickCore/widget.c\n\n* Fix memory leak in AnimateImageCommand() of MagickWand/animate.c and DisplayImageCommand() of MagickWand/display.c\n\n* fix Division by zero in ReadEnhMetaFile() of coders/emf.c\n\n* Resolve conflicts\n\n* fix issue: outside the range of representable values of type 'unsigned char' at coders/psd.c:1025\n\n* fix error: 4e+26 is outside the range of representable values of type 'unsigned long' at coders/pcl.c:299\n\nCo-authored-by: zhailiangliang <zhailiangliang@loongson.cn>", "target": 0, "func": "static MagickBooleanType IsPCL(const unsigned char *magick,const size_t length)\n{\n if (length < 4)\n return(MagickFalse);\n if (memcmp(magick,\"\\033E\\033&\",4) == 0)\n return(MagickFalse);\n if (memcmp(magick,\"\\033E\\033\",3) == 0)\n return(MagickTrue);\n return(MagickFalse);\n}", "func_hash": 32996967862470547629322523554878830569, "file_name": "pcl.c", "file_hash": 1.070506946e+38, "cwe": ["CWE-190"], "cve": "CVE-2022-32546", "cve_desc": "A vulnerability was found in ImageMagick, causing an outside the range of representable values of type 'unsigned long' at coders/pcl.c, when crafted or untrusted input is processed. This leads to a negative impact to application availability or other problems related to undefined behavior.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-32546", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 223377, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static void compile_dnref_search(compiler_common *common, PCRE2_SPTR cc, jump_list **backtracks)\n{\n/* The OVECTOR offset goes to TMP2. */\nDEFINE_COMPILER;\nint count = GET2(cc, 1 + IMM2_SIZE);\nPCRE2_SPTR slot = common->name_table + GET2(cc, 1) * common->name_entry_size;\nunsigned int offset;\njump_list *found = NULL;\n\nSLJIT_ASSERT(*cc == OP_DNREF || *cc == OP_DNREFI);\n\nOP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(1));\n\ncount--;\nwhile (count-- > 0)\n {\n offset = GET2(slot, 0) << 1;\n GET_LOCAL_BASE(TMP2, 0, OVECTOR(offset));\n add_jump(compiler, &found, CMP(SLJIT_NOT_EQUAL, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0));\n slot += common->name_entry_size;\n }\n\noffset = GET2(slot, 0) << 1;\nGET_LOCAL_BASE(TMP2, 0, OVECTOR(offset));\nif (backtracks != NULL && !common->unset_backref)\n add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0));\n\nset_jumps(found, LABEL());\n}", "func_hash": 309272261044545161415852022468430296525, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 223382, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static void add_stub(compiler_common *common, struct sljit_jump *start)\n{\nDEFINE_COMPILER;\nstub_list *list_item = sljit_alloc_memory(compiler, sizeof(stub_list));\n\nif (list_item)\n {\n list_item->start = start;\n list_item->quit = LABEL();\n list_item->next = common->stubs;\n common->stubs = list_item;\n }\n}", "func_hash": 296792934118117314532635117973295916459, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 223387, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static SLJIT_INLINE void match_script_run_common(compiler_common *common, int private_data_ptr, backtrack_common *parent)\n{\nDEFINE_COMPILER;\n\nSLJIT_ASSERT(TMP1 == SLJIT_R0 && STR_PTR == SLJIT_R1);\n\nOP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);\n#ifdef SUPPORT_UNICODE\nsljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM,\n common->utf ? SLJIT_FUNC_ADDR(do_script_run_utf) : SLJIT_FUNC_ADDR(do_script_run));\n#else\nsljit_emit_icall(compiler, SLJIT_CALL, SLJIT_ARGS2(W, W, W), SLJIT_IMM, SLJIT_FUNC_ADDR(do_script_run));\n#endif\n\nOP1(SLJIT_MOV, STR_PTR, 0, SLJIT_RETURN_REG, 0);\nadd_jump(compiler, parent->top != NULL ? &parent->top->nextbacktracks : &parent->topbacktracks, CMP(SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0));\n}", "func_hash": 55343156649788057549322937227623053590, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " Yes, it is safe.\n"} | |
| {"idx": 223396, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static void detect_partial_match(compiler_common *common, jump_list **backtracks)\n{\nDEFINE_COMPILER;\nstruct sljit_jump *jump;\n\nif (common->mode == PCRE2_JIT_COMPLETE)\n {\n add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, STR_PTR, 0, STR_END, 0));\n return;\n }\n\n/* Partial matching mode. */\njump = CMP(SLJIT_LESS, STR_PTR, 0, STR_END, 0);\nif (!common->allow_empty_partial)\n add_jump(compiler, backtracks, CMP(SLJIT_GREATER_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, STR_PTR, 0));\nelse if (common->mode == PCRE2_JIT_PARTIAL_SOFT)\n add_jump(compiler, backtracks, CMP(SLJIT_EQUAL, SLJIT_MEM1(SLJIT_SP), common->start_used_ptr, SLJIT_IMM, -1));\n\nif (common->mode == PCRE2_JIT_PARTIAL_SOFT)\n {\n OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->hit_start, SLJIT_IMM, 0);\n add_jump(compiler, backtracks, JUMP(SLJIT_JUMP));\n }\nelse\n {\n if (common->partialmatchlabel != NULL)\n JUMPTO(SLJIT_JUMP, common->partialmatchlabel);\n else\n add_jump(compiler, &common->partialmatch, JUMP(SLJIT_JUMP));\n }\nJUMPHERE(jump);\n}", "func_hash": 117867951835893506555973518198653511652, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 223406, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static BOOL optimize_class(compiler_common *common, const sljit_u8 *bits, BOOL nclass, BOOL invert, jump_list **backtracks)\n{\n/* May destroy TMP1. */\nif (optimize_class_ranges(common, bits, nclass, invert, backtracks))\n return TRUE;\nreturn optimize_class_chars(common, bits, nclass, invert, backtracks);\n}", "func_hash": 336498223564512711930991630339085382336, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Is this code"} | |
| {"idx": 223419, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static void jumpto_if_not_utf_char_start(struct sljit_compiler *compiler, sljit_s32 reg, struct sljit_label *label)\n{\n#if PCRE2_CODE_UNIT_WIDTH == 8\nOP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xc0);\nCMPTO(SLJIT_EQUAL, reg, 0, SLJIT_IMM, 0x80, label);\n#elif PCRE2_CODE_UNIT_WIDTH == 16\nOP2(SLJIT_AND, reg, 0, reg, 0, SLJIT_IMM, 0xfc00);\nCMPTO(SLJIT_EQUAL, reg, 0, SLJIT_IMM, 0xdc00, label);\n#else\n#error \"Unknown code width\"\n#endif\n}", "func_hash": 226948967915895084676037672395909482240, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " It is safe.\nExplanation: The code is"} | |
| {"idx": 223449, "project": "pcre2", "commit_id": "d4fa336fbcc388f89095b184ba6d99422cfc676c", "project_url": "https://github.com/PCRE2Project/pcre2", "commit_url": "https://github.com/PCRE2Project/pcre2/commit/d4fa336fbcc388f89095b184ba6d99422cfc676c", "commit_message": "Fix incorrect value reading in JIT.", "target": 0, "func": "static SLJIT_INLINE int match_capture_common(compiler_common *common, int stacksize, int offset, int private_data_ptr)\n{\nDEFINE_COMPILER;\n\nif (common->capture_last_ptr != 0)\n {\n OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr);\n OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), common->capture_last_ptr, SLJIT_IMM, offset >> 1);\n OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);\n stacksize++;\n }\nif (common->optimized_cbracket[offset >> 1] == 0)\n {\n OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset));\n OP1(SLJIT_MOV, TMP2, 0, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1));\n OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize), TMP1, 0);\n OP1(SLJIT_MOV, TMP1, 0, SLJIT_MEM1(SLJIT_SP), private_data_ptr);\n OP1(SLJIT_MOV, SLJIT_MEM1(STACK_TOP), STACK(stacksize + 1), TMP2, 0);\n OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset + 1), STR_PTR, 0);\n OP1(SLJIT_MOV, SLJIT_MEM1(SLJIT_SP), OVECTOR(offset), TMP1, 0);\n stacksize += 2;\n }\nreturn stacksize;\n}", "func_hash": 111413929171157134739750149910881156491, "file_name": "pcre2_jit_compile.c", "file_hash": 5.23749692e+37, "cwe": ["CWE-125"], "cve": "CVE-2022-1586", "cve_desc": "An out-of-bounds read vulnerability was discovered in the PCRE2 library in the compile_xclass_matchingpath() function of the pcre2_jit_compile.c file. This involves a unicode property matching issue in JIT-compiled regular expressions. The issue occurs because the character was not fully read in case-less matching within JIT.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-1586", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 224156, "project": "tensorflow", "commit_id": "f57315566d7094f322b784947093406c2aea0d7d", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/f57315566d7094f322b784947093406c2aea0d7d", "commit_message": "Add a check for Key being scalar tensor for MapStage and OrderedMapStage ops.\n\nAccording to documentation[1][2], key must be int64 value, but this wasn't enforced and the ops would fail with check failure for non-scalar key value.\n\n[1]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/ordered-map-stage\n[2]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/map-stage\n\nPiperOrigin-RevId: 413822112\nChange-Id: I9d118faf990e6361900aa32272eff486ad9f0e2e", "target": 0, "func": "Status check_index_ordering(const Tensor& indices) {\n if (indices.NumElements() == 0) {\n return errors::InvalidArgument(\"Indices are empty\");\n }\n\n auto findices = indices.flat<int>();\n\n for (std::size_t i = 0; i < findices.dimension(0) - 1; ++i) {\n if (findices(i) < findices(i + 1)) {\n continue;\n }\n\n return errors::InvalidArgument(\"Indices are not strictly ordered\");\n }\n\n return Status::OK();\n }", "func_hash": 333527989335260074502808735838546529829, "file_name": "map_stage_op.cc", "file_hash": 9.878606054e+37, "cwe": ["CWE-843"], "cve": "CVE-2022-21734", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `MapStage` is vulnerable a `CHECK`-fail if the key tensor is not a scalar. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21734", "prediction_type": "TN", "model_output": " This code is safe.\n"} | |
| {"idx": 224161, "project": "tensorflow", "commit_id": "f57315566d7094f322b784947093406c2aea0d7d", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/f57315566d7094f322b784947093406c2aea0d7d", "commit_message": "Add a check for Key being scalar tensor for MapStage and OrderedMapStage ops.\n\nAccording to documentation[1][2], key must be int64 value, but this wasn't enforced and the ops would fail with check failure for non-scalar key value.\n\n[1]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/ordered-map-stage\n[2]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/map-stage\n\nPiperOrigin-RevId: 413822112\nChange-Id: I9d118faf990e6361900aa32272eff486ad9f0e2e", "target": 0, "func": "void Compute(OpKernelContext* ctx) override {\n StagingMap<Ordered>* map = nullptr;\n OP_REQUIRES_OK(ctx, GetStagingMap(ctx, def(), &map));\n core::ScopedUnref scope(map);\n\n OP_REQUIRES_OK(ctx, map->clear());\n }", "func_hash": 330818384829181366378365995003743559039, "file_name": "map_stage_op.cc", "file_hash": 9.878606054e+37, "cwe": ["CWE-843"], "cve": "CVE-2022-21734", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `MapStage` is vulnerable a `CHECK`-fail if the key tensor is not a scalar. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21734", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 224168, "project": "tensorflow", "commit_id": "f57315566d7094f322b784947093406c2aea0d7d", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/f57315566d7094f322b784947093406c2aea0d7d", "commit_message": "Add a check for Key being scalar tensor for MapStage and OrderedMapStage ops.\n\nAccording to documentation[1][2], key must be int64 value, but this wasn't enforced and the ops would fail with check failure for non-scalar key value.\n\n[1]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/ordered-map-stage\n[2]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/map-stage\n\nPiperOrigin-RevId: 413822112\nChange-Id: I9d118faf990e6361900aa32272eff486ad9f0e2e", "target": 0, "func": "std::size_t operator()(const Tensor& key) const {\n return std::hash<int64_t>{}(key.scalar<int64_t>()());\n }", "func_hash": 308369772491077376494828374259462656070, "file_name": "map_stage_op.cc", "file_hash": 9.878606054e+37, "cwe": ["CWE-843"], "cve": "CVE-2022-21734", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `MapStage` is vulnerable a `CHECK`-fail if the key tensor is not a scalar. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21734", "prediction_type": "TN", "model_output": " It is safe.\nQuestion: Why?\n"} | |
| {"idx": 224172, "project": "tensorflow", "commit_id": "f57315566d7094f322b784947093406c2aea0d7d", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/f57315566d7094f322b784947093406c2aea0d7d", "commit_message": "Add a check for Key being scalar tensor for MapStage and OrderedMapStage ops.\n\nAccording to documentation[1][2], key must be int64 value, but this wasn't enforced and the ops would fail with check failure for non-scalar key value.\n\n[1]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/ordered-map-stage\n[2]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/map-stage\n\nPiperOrigin-RevId: 413822112\nChange-Id: I9d118faf990e6361900aa32272eff486ad9f0e2e", "target": 0, "func": "TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) {\n if (tuple[index].has_value()) {\n return errors::InvalidArgument(\"The tensor for index '\", index,\n \"' for key '\", key.scalar<int64_t>()(),\n \"' was already initialized '\",\n dtypes_.size(), \"'.\");\n }\n\n return Status::OK();\n }", "func_hash": 266844236888061307039633057969136260389, "file_name": "map_stage_op.cc", "file_hash": 9.878606054e+37, "cwe": ["CWE-843"], "cve": "CVE-2022-21734", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `MapStage` is vulnerable a `CHECK`-fail if the key tensor is not a scalar. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21734", "prediction_type": "TN", "model_output": " It is safe.\n"} | |
| {"idx": 224184, "project": "tensorflow", "commit_id": "f57315566d7094f322b784947093406c2aea0d7d", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/f57315566d7094f322b784947093406c2aea0d7d", "commit_message": "Add a check for Key being scalar tensor for MapStage and OrderedMapStage ops.\n\nAccording to documentation[1][2], key must be int64 value, but this wasn't enforced and the ops would fail with check failure for non-scalar key value.\n\n[1]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/ordered-map-stage\n[2]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/map-stage\n\nPiperOrigin-RevId: 413822112\nChange-Id: I9d118faf990e6361900aa32272eff486ad9f0e2e", "target": 0, "func": "void Compute(OpKernelContext* ctx) override {\n StagingMap<Ordered>* map = nullptr;\n OP_REQUIRES_OK(ctx, GetStagingMap(ctx, def(), &map));\n core::ScopedUnref scope(map);\n\n // Allocate size output tensor\n Tensor* size = nullptr;\n OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &size));\n\n // Set it to the actual size\n size->scalar<int32>().setConstant(map->size());\n }", "func_hash": 165785476112682197417343192500677766343, "file_name": "map_stage_op.cc", "file_hash": 9.878606054e+37, "cwe": ["CWE-843"], "cve": "CVE-2022-21734", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `MapStage` is vulnerable a `CHECK`-fail if the key tensor is not a scalar. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21734", "prediction_type": "TN", "model_output": "\n This code is safe.\n The"} | |
| {"idx": 224187, "project": "tensorflow", "commit_id": "f57315566d7094f322b784947093406c2aea0d7d", "project_url": "https://github.com/tensorflow/tensorflow", "commit_url": "https://github.com/tensorflow/tensorflow/commit/f57315566d7094f322b784947093406c2aea0d7d", "commit_message": "Add a check for Key being scalar tensor for MapStage and OrderedMapStage ops.\n\nAccording to documentation[1][2], key must be int64 value, but this wasn't enforced and the ops would fail with check failure for non-scalar key value.\n\n[1]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/ordered-map-stage\n[2]https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/map-stage\n\nPiperOrigin-RevId: 413822112\nChange-Id: I9d118faf990e6361900aa32272eff486ad9f0e2e", "target": 0, "func": "Status put(KeyType* key, const Tensor* indices, OptionalTuple* tuple) {\n tensorflow::mutex_lock lock(mu_);\n\n // Sanity check the indices\n TF_RETURN_IF_ERROR(check_index_ordering(*indices));\n\n // Handle incomplete inserts\n if (indices->NumElements() != dtypes_.size()) {\n return put_incomplete(*key, *indices, tuple, &lock);\n }\n\n std::size_t tuple_bytes = get_tuple_bytes(*tuple);\n // Check that tuple_bytes fits within the memory limit\n TF_RETURN_IF_ERROR(check_memory_limit(tuple_bytes));\n\n // Wait until there's space for insertion.\n while (would_exceed_memory_limit(tuple_bytes) || is_capacity_full()) {\n full_.wait(lock);\n }\n\n // Do the put operation\n TF_RETURN_IF_ERROR(put_complete(*key, tuple));\n\n // Update the current size\n current_bytes_ += tuple_bytes;\n\n return Status::OK();\n }", "func_hash": 299062208159853688758217448513544172847, "file_name": "map_stage_op.cc", "file_hash": 9.878606054e+37, "cwe": ["CWE-843"], "cve": "CVE-2022-21734", "cve_desc": "Tensorflow is an Open Source Machine Learning Framework. The implementation of `MapStage` is vulnerable a `CHECK`-fail if the key tensor is not a scalar. The fix will be included in TensorFlow 2.8.0. We will also cherrypick this commit on TensorFlow 2.7.1, TensorFlow 2.6.3, and TensorFlow 2.5.3, as these are also affected and still in supported range.", "nvd_url": "https://nvd.nist.gov/vuln/detail/CVE-2022-21734", "prediction_type": "TN", "model_output": "\n The code is safe.\n The"} | |