func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
is_vulnerable
string
cwe_id_extracted
string
cwe_details
string
static int mwifiex_pcie_alloc_cmdrsp_buf(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; struct sk_buff *skb; /* Allocate memory for receiving command response data */ skb = dev_alloc_skb(MWIFIEX_UPLD_SIZE); if (!skb) { mwifiex_dbg(adapter, ERROR, "Unable to allocate sk...
1
[ "CWE-400", "CWE-401" ]
linux
db8fd2cde93227e566a412cf53173ffa227998bc
68,157,718,467,577,500,000,000,000,000,000,000,000
21
mwifiex: pcie: Fix memory leak in mwifiex_pcie_alloc_cmdrsp_buf In mwifiex_pcie_alloc_cmdrsp_buf, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release is added. Fixes: fc3314609047 ("mwifiex: use pci_alloc/free_consistent APIs for PCIe") Signed-off-by: Navid Emamdoost <navid....
Vulnerable
400
{"cwe_id": "CWE-400", "vulnerability_type": "Uncontrolled Resource Consumption", "description": "The product does not properly control the allocation and maintenance of a limited resource.", "severity": "High", "category": "Resource Exhaustion", "impact": ["DoS: Crash, Exit, or Restart", "DoS: Resource Consumption (CPU...
static void _sqlite_close(void *db) { sqlite_close((sqlite*)db); }
0
[ "CWE-89" ]
cyrus-sasl
9eff746c9daecbcc0041b09a5a51ba30738cdcbc
3,600,567,724,481,961,000,000,000,000,000,000,000
4
CVE-2022-24407 Escape password for SQL insert/update commands. Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com>
Safe
89
{"cwe_id": "CWE-89", "vulnerability_type": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')", "description": "The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes spec...
normalize_line (guint8 * buffer) { while (*buffer) { if (g_ascii_isspace (*buffer)) { guint8 *tmp; *buffer++ = ' '; for (tmp = buffer; g_ascii_isspace (*tmp); tmp++) { } if (buffer != tmp) memmove (buffer, tmp, strlen ((gchar *) tmp) + 1); } else { buffer++; } ...
0
[]
gst-plugins-base
f672277509705c4034bc92a141eefee4524d15aa
318,766,667,711,914,740,000,000,000,000,000,000,000
16
gstrtspconnection: Security loophole making heap overflow The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
Safe
null
null
static u32 vmx_secondary_exec_control(struct vcpu_vmx *vmx) { struct kvm_vcpu *vcpu = &vmx->vcpu; u32 exec_control = vmcs_config.cpu_based_2nd_exec_ctrl; if (vmx_pt_mode_is_system()) exec_control &= ~(SECONDARY_EXEC_PT_USE_GPA | SECONDARY_EXEC_PT_CONCEAL_VMX); if (!cpu_need_virtualize_apic_accesses(vcpu)) exe...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
136,057,061,780,534,930,000,000,000,000,000,000,000
88
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
GF_Err vvnc_box_read(GF_Box *s, GF_BitStream *bs) { GF_VVCNaluConfigurationBox *ptr = (GF_VVCNaluConfigurationBox *)s; ISOM_DECREASE_SIZE(ptr, 1) gf_bs_read_int(bs, 6); ptr->nal_unit_size = 1 + gf_bs_read_int(bs, 2); return GF_OK; }
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
156,165,910,699,558,250,000,000,000,000,000,000,000
9
fixed #2165
Safe
617
{"cwe_id": "CWE-617", "vulnerability_type": "Reachable Assertion", "description": "The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.", "severity": null, "category": "assertion failure", "im...
parser_parse_initializer_by_next_char (parser_context_t *context_p, /**< context */ parser_pattern_flags_t flags) /**< flags */ { JERRY_ASSERT (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE)); if (lexer_consume_next_character (context_p) ==...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
221,850,337,884,300,870,000,000,000,000,000,000,000
30
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
Safe
416
{"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An...
void *GENERAL_NAME_get0_value(const GENERAL_NAME *a, int *ptype) { if (ptype) *ptype = a->type; switch (a->type) { case GEN_X400: case GEN_EDIPARTY: return a->d.other; case GEN_OTHERNAME: return a->d.otherName; case GEN_EMAIL: case GEN_DNS: case GEN_URI: ...
1
[ "CWE-476" ]
openssl
b33c48b75aaf33c93aeda42d7138616b9e6a64cb
238,667,244,047,798,100,000,000,000,000,000,000,000
30
Correctly compare EdiPartyName in GENERAL_NAME_cmp() If a GENERAL_NAME field contained EdiPartyName data then it was incorrectly being handled as type "other". This could lead to a segmentation fault. Many thanks to David Benjamin from Google for reporting this issue. CVE-2020-1971 Reviewed-by: Tomas Mraz <tmraz@fe...
Vulnerable
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
inline bool AveragePool(const PoolParams& params, const RuntimeShape& input_shape, const int8_t* input_data, const RuntimeShape& output_shape, int8_t* output_data) { TFLITE_DCHECK_LE(params.quantized_activation_min, params.quan...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
256,571,371,447,273,050,000,000,000,000,000,000,000
59
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
static DIR* xopendirat_nomod(int dirfd, const char *path) { DIR *dir; dir = xopendirat(dirfd, path, O_NOFOLLOW|O_NOATIME); if (dir) return dir; log_debug_errno(errno, "Cannot open %sdirectory \"%s\": %m", dirfd == AT_FDCWD ? "" : "sub", path); if (errno != EPERM...
0
[ "CWE-59" ]
systemd
5579f85663d10269e7ac7464be6548c99cea4ada
236,843,420,699,162,750,000,000,000,000,000,000,000
17
tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on Let's add some extra safety. Fixes: #7736
Safe
59
{"cwe_id": "CWE-59", "vulnerability_type": "Improper Link Resolution Before File Access ('Link Following')", "description": "The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.", "severit...
static void _isdn_setup(struct net_device *dev) { isdn_net_local *lp = netdev_priv(dev); ether_setup(dev); /* Setup the generic properties */ dev->flags = IFF_NOARP|IFF_POINTOPOINT; dev->header_ops = NULL; dev->netdev_ops = &isdn_netdev_ops; /* for clients with MPPP maybe higher values better */ dev->tx_queu...
1
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
215,949,275,812,056,470,000,000,000,000,000,000,000
41
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
Vulnerable
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, struct dentry *dentry, int acc) { struct inode *inode = d_inode(dentry); int err; if ((acc & NFSD_MAY_MASK) == NFSD_MAY_NOP) return 0; #if 0 dprintk("nfsd: permission 0x%x%s%s%s%s%s%s%s mode 0%o%s%s%s\n", acc, (acc & NFSD_MAY_READ)? " read...
0
[ "CWE-732" ]
linux
22cf8419f1319ff87ec759d0ebdff4cbafaee832
154,100,889,904,377,330,000,000,000,000,000,000,000
80
nfsd: apply umask on fs without ACL support The server is failing to apply the umask when creating new objects on filesystems without ACL support. To reproduce this, you need to use NFSv4.2 and a client and server recent enough to support umask, and you need to export a filesystem that lacks ACL support (for example,...
Safe
732
{"cwe_id": "CWE-732", "vulnerability_type": "Incorrect Permission Assignment for Critical Resource", "description": "The product specifies permissions for a security-critical resource in a way that allows that resource to be read or modified by unintended actors.", "severity": "High", "category": null, "impact": ["Read...
sds sdsnewlen(const void *init, size_t initlen) { void *sh; sds s; char type = sdsReqType(initlen); /* Empty strings are usually created in order to append. Use type 8 * since type 5 is not good at this. */ if (type == SDS_TYPE_5 && initlen == 0) type = SDS_TYPE_8; int hdrlen = sdsHdrSize(t...
1
[ "CWE-190" ]
redis
c992857618db99776917f10bf4f2345a5fdc78b0
93,718,831,548,762,800,000,000,000,000,000,000,000
57
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. Add ad...
Vulnerable
190
{"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe...
ZEND_API zend_bool ZEND_FASTCALL zend_hash_index_exists(const HashTable *ht, zend_ulong h) { Bucket *p; IS_CONSISTENT(ht); if (ht->u.flags & HASH_FLAG_PACKED) { if (h < ht->nNumUsed) { if (Z_TYPE(ht->arData[h].val) != IS_UNDEF) { return 1; } } return 0; } p = zend_hash_index_find_bucket(ht, h); ...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
67,799,524,402,223,355,000,000,000,000,000,000,000
18
Fix #73832 - leave the table in a safe state if the size is too big.
Safe
190
{"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe...
init_stack_with_value_at_exception_boundary (VerifyContext *ctx, ILCodeDesc *code, MonoClass *klass) { MonoError error; MonoType *type = mono_class_inflate_generic_type_checked (&klass->byval_arg, ctx->generic_context, &error); if (!mono_error_ok (&error)) { char *name = mono_type_get_full_name (klass); ADD_VER...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
104,598,775,573,541,940,000,000,000,000,000,000,000
26
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
static VALUE mArray_to_json(int argc, VALUE *argv, VALUE self) { GENERATE_JSON(array); }
0
[ "CWE-119", "CWE-787" ]
json
8f782fd8e181d9cfe9387ded43a5ca9692266b85
15,139,599,496,263,543,000,000,000,000,000,000,000
3
Fix arbitrary heap exposure problem
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
void CLASS nikon_load_raw() { static const uchar nikon_tree[][32] = { {0, 1, 5, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, /* 12-bit lossy */ 5, 4, 3, 6, 2, 7, 1, 0, 8, 9, 11, 10, 12}, {0, 1, 5, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, /* 12-bit lossy after split */ 0x39, 0x5a, ...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
180,114,616,505,133,770,000,000,000,000,000,000,000
89
Secunia SA75000 advisory: several buffer overruns
Safe
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
WandExport void DrawAffine(DrawingWand *wand,const AffineMatrix *affine) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); assert(affine != (const AffineMatrix *) NULL); ...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
6,597,892,305,458,670,000,000,000,000,000,000,000
11
https://github.com/ImageMagick/ImageMagick/issues/716
Safe
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
static void __perf_addr_filters_adjust(struct perf_event *event, void *data) { struct perf_addr_filters_head *ifh = perf_event_addr_filters(event); struct vm_area_struct *vma = data; unsigned long off = vma->vm_pgoff << PAGE_SHIFT, flags; struct file *file = vma->vm_file; struct perf_addr_filter *filter; unsigned...
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
229,528,506,384,404,970,000,000,000,000,000,000,000
33
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
Safe
362
{"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour...
static char *dex_resolve_library(const char *library) { if (!library || library[0] != 'L') { return NULL; } char *demangled = strdup(library + 1); rz_str_replace_ch(demangled, '/', '.', 1); demangled[strlen(demangled) - 1] = 0; return demangled; }
1
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
299,794,966,628,692,640,000,000,000,000,000,000,000
9
fix #2969 - oob write (1 byte) in dex.c
Vulnerable
787
{"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest...
void EC_EX_DATA_free_all_data(EC_EXTRA_DATA **ex_data) { EC_EXTRA_DATA *d; if (ex_data == NULL) return; d = *ex_data; while (d) { EC_EXTRA_DATA *next = d->next; d->free_func(d->data); OPENSSL_free(d); d = next; } *ex_data = NULL; }
0
[ "CWE-320" ]
openssl
8aed2a7548362e88e84a7feb795a3a97e8395008
232,072,495,406,269,060,000,000,000,000,000,000,000
19
Reserve option to use BN_mod_exp_mont_consttime in ECDSA. Submitted by Shay Gueron, Intel Corp. RT: 3149 Reviewed-by: Rich Salz <rsalz@openssl.org> (cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12)
Safe
320
null
static int virtcons_probe(struct virtio_device *vdev) { struct ports_device *portdev; int err; bool multiport; bool early = early_put_chars != NULL; /* We only need a config space if features are offered */ if (!vdev->config->get && (virtio_has_feature(vdev, VIRTIO_CONSOLE_F_SIZE) || virtio_has_featur...
0
[ "CWE-119", "CWE-787" ]
linux
c4baad50297d84bde1a7ad45e50c73adae4a2192
55,773,270,129,917,250,000,000,000,000,000,000,000
119
virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Michael S. Tsirkin <mst@redhat...
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
TEST_F(HeaderToMetadataTest, RejectInvalidRule) { const std::string config = R"EOF( request_rules: - header: x-something )EOF"; auto expected = "header to metadata filter: rule for header 'x-something' has neither " "`on_header_present` nor `on_header_missing` set"; EXPECT_THROW_WITH_MESSAGE(i...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
29,147,386,717,220,776,000,000,000,000,000,000,000
9
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
Safe
null
null
static const char *cmd_server_signature(cmd_parms *cmd, void *_dcfg, const char *p1) { if (cmd->server->is_virtual) { return "ModSecurity: SecServerSignature not allowed in VirtualHost"; } new_server_signature = (char *)p1; return NULL; }
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
127,767,216,095,311,200,000,000,000,000,000,000,000
9
Added SecXmlExternalEntity
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
MagickExport MagickBooleanType GetImageExtrema(const Image *image, size_t *minima,size_t *maxima,ExceptionInfo *exception) { double max, min; MagickBooleanType status; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
025e77fcb2f45b21689931ba3bf74eac153afa48
75,675,949,157,409,650,000,000,000,000,000,000,000
19
https://github.com/ImageMagick/ImageMagick/issues/1615
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
dnsc_delete(struct dnsc_env *env) { if(!env) { return; } verbose(VERB_OPS, "DNSCrypt: Freeing environment."); sodium_free(env->signed_certs); sodium_free(env->rotated_certs); sodium_free(env->certs); sodium_free(env->keypairs); lock_basic_destroy(&env->shared_secrets_cache_lock); lock_basic_destroy(&env->non...
0
[ "CWE-190" ]
unbound
02080f6b180232f43b77f403d0c038e9360a460f
330,465,562,143,881,230,000,000,000,000,000,000,000
16
- Fix Integer Overflows in Size Calculations, reported by X41 D-Sec.
Safe
190
{"cwe_id": "CWE-190", "vulnerability_type": "Integer Overflow or Wraparound", "description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n assumes that the resulting value will always be larger than\n the original value. This occurs whe...
static void xmlGROW (xmlParserCtxtPtr ctxt) { if ((((ctxt->input->end - ctxt->input->cur) > XML_MAX_LOOKUP_LIMIT) || ((ctxt->input->cur - ctxt->input->base) > XML_MAX_LOOKUP_LIMIT)) && ((ctxt->input->buf) && (ctxt->input->buf->readcallback != xmlNop)) && ((ctxt->options & XML_PARSE_HUGE) =...
0
[ "CWE-119" ]
libxml2
6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d
54,598,899,241,865,490,000,000,000,000,000,000,000
13
Fix potential out of bound access
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
void sqlite3CreateView( Parse *pParse, /* The parsing context */ Token *pBegin, /* The CREATE token that begins the statement */ Token *pName1, /* The token that holds the name of the view */ Token *pName2, /* The token that holds the name of the view */ ExprList *pCNames, /* Optional list of ...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
264,659,271,570,941,700,000,000,000,000,000,000,000
73
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
Safe
674
{"cwe_id": "CWE-674", "vulnerability_type": "Uncontrolled Recursion", "description": "The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.", "severity": null, "category": "Stack Exhaustion", "impact": ["DoS: Resour...
static int zend_parse_va_args(int num_args, const char *type_spec, va_list *va, int flags TSRMLS_DC) /* {{{ */ { const char *spec_walk; int c, i; int min_num_args = -1; int max_num_args = 0; int post_varargs = 0; zval **arg; int arg_count; int quiet = flags & ZEND_PARSE_PARAMS_QUIET; zend_bool have_varargs = ...
0
[ "CWE-416" ]
php-src
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
119,877,465,837,213,100,000,000,000,000,000,000,000
157
Fix bug #73147: Use After Free in PHP7 unserialize()
Safe
416
{"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An...
static bool HHVM_METHOD(ZipArchive, renameIndex, int64_t index, const String& newname) { auto zipDir = getResource<ZipDirectory>(this_, "zipDir"); FAIL_IF_INVALID_ZIPARCHIVE(renameIndex, zipDir); FAIL_IF_INVALID_INDEX(index); FAIL_IF_EMPTY_STRING_ZIPARCHIVE(renameIndex, newname); if ...
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
73,280,877,438,717,960,000,000,000,000,000,000,000
15
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
Safe
22
{"cwe_id": "CWE-22", "vulnerability_type": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product ...
static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info) { SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl); info->memslot_gen_bits = MEMSLOT_GENERATION_BITS; info->memslot_id_bits = MEMSLOT_SLOT_BITS; info->num_memslots = NUM_MEMSLOTS; info->num_memslots_gro...
1
[ "CWE-200" ]
qemu
ab9509cceabef28071e41bdfa073083859c949a7
201,459,752,915,277,460,000,000,000,000,000,000,000
12
spice: make sure we don't overflow ssd->buf Related spice-only bug. We have a fixed 16 MB buffer here, being presented to the spice-server as qxl video memory in case spice is used with a non-qxl card. It's also used with qxl in vga mode. When using display resolutions requiring more than 16 MB of memory we are goi...
Vulnerable
200
{"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re...
nautilus_file_set_permissions_recursive (const char *directory, guint32 file_permissions, guint32 file_mask, guint32 dir_permissions, guint32 dir_mask, NautilusOpCallback callback, gpointer callback_data) { SetPermissionsJob *job; job = op_job_ne...
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
298,371,096,332,690,330,000,000,000,000,000,000,000
25
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
Safe
null
null
urandom_read_nowarn(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos) { int ret; nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3)); ret = extract_crng_user(buf, nbytes); trace_urandom_read(8 * nbytes, 0, ENTROPY_BITS(&input_pool)); return ret; }
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
290,192,883,875,200,700,000,000,000,000,000,000,000
10
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
Safe
200
{"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re...
void slice_unit::allocate_thread_contexts(int n) { assert(thread_contexts==NULL); thread_contexts = new thread_context[n]; nThreadContexts = n; }
0
[ "CWE-416" ]
libde265
f538254e4658ef5ea4e233c2185dcbfd165e8911
64,008,614,865,450,460,000,000,000,000,000,000,000
7
fix streams where SPS image size changes without refreshing PPS (#299)
Safe
416
{"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An...
static void encode_test_stateid(struct xdr_stream *xdr, struct nfs41_test_stateid_args *args, struct compound_hdr *hdr) { __be32 *p; p = reserve_space(xdr, 8 + NFS4_STATEID_SIZE); *p++ = cpu_to_be32(OP_TEST_STATEID); *p++ = cpu_to_be32(1); xdr_encode_opaque_fixed(p, args->stateid->data, NFS4_STATEID_SIZE)...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
39,611,970,683,450,430,000,000,000,000,000,000,000
13
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
static int get_issuer_sk(X509 **issuer, X509_STORE_CTX *ctx, X509 *x) { *issuer = find_issuer(ctx, ctx->other_ctx, x); if (*issuer == NULL || !X509_up_ref(*issuer)) goto err; return 1; err: *issuer = NULL; return 0; }
0
[ "CWE-295" ]
openssl
2a40b7bc7b94dd7de897a74571e7024f0cf0d63b
329,645,760,778,656,100,000,000,000,000,000,000,000
13
check_chain_extensions: Do not override error return value by check_curve The X509_V_FLAG_X509_STRICT flag enables additional security checks of the certificates present in a certificate chain. It is not set by default. Starting from OpenSSL version 1.1.1h a check to disallow certificates with explicitly encoded elli...
Safe
295
{"cwe_id": "CWE-295", "vulnerability_type": "Improper Certificate Validation", "description": "The product does not validate, or incorrectly validates, a certificate.", "severity": null, "category": null, "impact": ["Bypass Protection Mechanism", "Gain Privileges or Assume Identity"], "languages": [null], "example": "E...
Header::operator [] (const string &name) { return this->operator[] (name.c_str()); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
196,214,594,722,010,400,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
Safe
125
{"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"...
static int check_k_link(MI_CHECK *param, register MI_INFO *info, uint nr) { my_off_t next_link; uint block_size=(nr+1)*MI_MIN_KEY_BLOCK_LENGTH; ha_rows records; char llbuff[21], llbuff2[21]; uchar *buff; DBUG_ENTER("check_k_link"); DBUG_PRINT("enter", ("block_size: %u", block_size)); if (param->testfla...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
201,580,629,841,249,670,000,000,000,000,000,000,000
74
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
Safe
362
{"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour...
GC_INNER void GC_read_dirty(void) { # if defined(GWW_VDB) if (GC_GWW_AVAILABLE()) { GC_gww_read_dirty(); return; } # endif BCOPY((word *)GC_dirty_pages, GC_grungy_pages, (sizeof GC_dirty_pages)); BZERO((word *)GC_dirty_pages, (sizeof GC_dirty_pages)); GC_protect_hea...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
89,466,238,549,298,840,000,000,000,000,000,000,000
13
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
fixup_uidnode (KBNODE uidnode, KBNODE signode, u32 keycreated) { PKT_user_id *uid = uidnode->pkt->pkt.user_id; PKT_signature *sig = signode->pkt->pkt.signature; const byte *p, *sym, *hash, *zip; size_t n, nsym, nhash, nzip; sig->flags.chosen_selfsig = 1;/* We chose this one. */ uid->created = 0; /* Not cr...
1
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
60,417,132,854,771,665,000,000,000,000,000,000,000
106
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
Vulnerable
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
zzip_dir_alloc_ext_io(zzip_strings_t * ext, const zzip_plugin_io_t io) { ZZIP_DIR *dir; if ((dir = (ZZIP_DIR *) calloc(1, sizeof(*dir))) == NULL) return 0; /* dir->fileext is currently unused - so what, still initialize it */ dir->fileext = ext ? ext : zzip_get_default_ext(); dir->io = io ?...
0
[ "CWE-770" ]
zziplib
0c0c9256b0903f664bca25dd8d924211f81e01d3
273,366,404,606,608,600,000,000,000,000,000,000,000
11
Reject the ZIP file and report it as corrupt if the size of the central directory and/or the offset of start of central directory point beyond the end of the ZIP file. [CVE-2018-6484]
Safe
770
{"cwe_id": "CWE-770", "vulnerability_type": "Allocation of Resources Without Limits or Throttling", "description": "The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.", "severity": "Hi...
int fuse_set_acl(struct inode *inode, struct posix_acl *acl, int type) { struct fuse_conn *fc = get_fuse_conn(inode); const char *name; int ret; if (!fc->posix_acl || fc->no_setxattr) return -EOPNOTSUPP; if (type == ACL_TYPE_ACCESS) name = XATTR_NAME_POSIX_ACL_ACCESS; else if (type == ACL_TYPE_DEFAULT) na...
1
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
274,150,596,516,392,330,000,000,000,000,000,000,000
50
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
Vulnerable
459
{"cwe_id": "CWE-459", "vulnerability_type": "Incomplete Cleanup", "description": "The product does not properly \"clean up\" and remove temporary or supporting resources after they have been used.", "severity": null, "category": "Insufficient Cleanup", "impact": ["Other", "Read Application Data", "Modify Application Da...
static void add_interrupt_bench(cycles_t start) { long delta = random_get_entropy() - start; /* Use a weighted moving average */ delta = delta - ((avg_cycles + FIXED_1_2) >> AVG_SHIFT); avg_cycles += delta; /* And average deviation */ delta = abs(delta) - ((avg_deviation...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
92,783,528,349,614,610,000,000,000,000,000,000,000
11
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
Safe
200
{"cwe_id": "CWE-200", "vulnerability_type": "Exposure of Sensitive Information to an Unauthorized Actor", "description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "severity": "High", "category": "Information Disclosure", "impact": ["Re...
static int vfswrap_stat(vfs_handle_struct *handle, struct smb_filename *smb_fname) { int result = -1; START_PROFILE(syscall_stat); if (smb_fname->stream_name) { errno = ENOENT; goto out; } result = sys_stat(smb_fname->base_name, &smb_fname->st, lp_fake_dir_create_times(SNUM(handle->conn))); out: E...
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
222,766,790,911,289,840,000,000,000,000,000,000,000
18
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
Safe
665
{"cwe_id": "CWE-665", "vulnerability_type": "Improper Initialization", "description": "The product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used.", "severity": "Medium", "category": null, "impact": ["Read Memory", "Read Appli...
static void gen_boot_verifier(nfs4_verifier *verifier, struct net *net) { __be32 verf[2]; struct nfsd_net *nn = net_generic(net, nfsd_net_id); /* * This is opaque to client, so no need to byte-swap. Use * __force to keep sparse happy. y2038 time_t overflow is * irrelevant in this usage. */ verf[0] = (__for...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
107,708,576,065,508,640,000,000,000,000,000,000,000
14
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
Safe
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
static int get_freq0(RangeCoder *rc, unsigned total_freq, unsigned *freq) { if (rc->range == 0) return AVERROR_INVALIDDATA; *freq = total_freq * (uint64_t)(rc->code - rc->code1) / rc->range; return 0; }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
2171dfae8c065878a2e130390eb78cf2947a5b69
261,529,320,454,398,520,000,000,000,000,000,000,000
9
avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned int [256]' Fixes: 1519/clusterfuzz-testcase-minimized-5286680976162816 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
static int is_f00f_bug(struct pt_regs *regs, unsigned long address) { #ifdef CONFIG_X86_F00F_BUG unsigned long nr; /* * Pentium F0 0F C7 C8 bug workaround: */ if (boot_cpu_has_bug(X86_BUG_F00F)) { nr = (address - idt_descr.address) >> 3; if (nr == 6) { do_invalid_op(regs, 0); return 1; } } #endif ...
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
280,697,448,343,568,700,000,000,000,000,000,000,000
19
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
Safe
264
null
new_archive_dialog_response_cb (GtkDialog *dialog, int response, gpointer user_data) { FrWindow *window = user_data; GFile *file; const char *mime_type; GtkWidget *archive_window; gboolean new_window; const char *password; gboolean encrypt_header; int volume_size; if ((r...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
265,110,985,395,044,900,000,000,000,000,000,000,000
49
libarchive: sanitize filenames before extracting
Safe
22
{"cwe_id": "CWE-22", "vulnerability_type": "Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')", "description": "The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product ...
static inline void hwsim_clear_chanctx_magic(struct ieee80211_chanctx_conf *c) { struct hwsim_chanctx_priv *cp = (void *)c->drv_priv; cp->magic = 0; }
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
162,002,237,676,284,250,000,000,000,000,000,000,000
5
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
static ssize_t enabled_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { if (test_bit(TRANSPARENT_HUGEPAGE_FLAG, &transparent_hugepage_flags)) return sprintf(buf, "[always] madvise never\n"); else if (test_bit(TRANSPARENT_HUGEPAGE_REQ_MADV_FLAG, &transparent_hugepage_flags)) return sprin...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
227,810,192,627,529,860,000,000,000,000,000,000,000
10
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
Safe
362
{"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour...
cdp_decode(struct lldpd *cfg, char *frame, int s, struct lldpd_hardware *hardware, struct lldpd_chassis **newchassis, struct lldpd_port **newport) { struct lldpd_chassis *chassis; struct lldpd_port *port; struct lldpd_mgmt *mgmt; struct in_addr addr; #if 0 u_int16_t cksum; #endif u_int8_t *software = NULL...
1
[ "CWE-617", "CWE-703" ]
lldpd
793526f8884455f43daecd0a2c46772388417a00
87,240,197,796,316,420,000,000,000,000,000,000,000
325
protocols: don't use assert on paths that can be reached Malformed packets should not make lldpd crash. Ensure we can handle them by not using assert() in this part.
Vulnerable
617
{"cwe_id": "CWE-617", "vulnerability_type": "Reachable Assertion", "description": "The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.", "severity": null, "category": "assertion failure", "im...
AddPostgresIntPart(char *cp, int value, const char *units, bool *is_zero, bool *is_before) { if (value == 0) return cp; sprintf(cp, "%s%s%d %s%s", (!*is_zero) ? " " : "", (*is_before && value > 0) ? "+" : "", value, units, (value != 1) ? "s" : ""); /* * Each nonzero field sets is_before fo...
0
[ "CWE-416", "CWE-119" ]
postgres
4318daecc959886d001a6e79c6ea853e8b1dfb4b
327,548,065,381,155,630,000,000,000,000,000,000,000
20
Fix handling of wide datetime input/output. Many server functions use the MAXDATELEN constant to size a buffer for parsing or displaying a datetime value. It was much too small for the longest possible interval output and slightly too small for certain valid timestamp input, particularly input with a long timezone na...
Safe
416
{"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An...
find_last_proc (job, block) int job; int block; { register PROCESS *p; sigset_t set, oset; if (block) BLOCK_CHILD (set, oset); p = jobs[job]->pipe; while (p && p->next != jobs[job]->pipe) p = p->next; if (block) UNBLOCK_CHILD (oset); return (p); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
7,562,694,615,706,731,000,000,000,000,000,000,000
19
bash-4.4-rc2 release
Safe
null
null
ssize_t __btrfs_getxattr(struct inode *inode, const char *name, void *buffer, size_t size) { struct btrfs_dir_item *di; struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_path *path; struct extent_buffer *leaf; int ret = 0; unsigned long data_ptr; path = btrfs_alloc_path(); if (!path) return -E...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
333,927,096,482,128,900,000,000,000,000,000,000,000
55
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
Safe
416
{"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An...
static int comparewithmap(gdImagePtr im1, gdImagePtr im2, int c1, int c2, int *colorMap) { if(!colorMap) { return c1 == c2; } if(-2 != colorMap[c1]) { return colorMap[c1] == c2; } return (colorMap[c1] = gdImageColorExactAlpha(im2, im1->red[c1], im1->green[c1], im1->blue[c1], im1->alpha[c1])) == c2; }
0
[ "CWE-415" ]
libgd
553702980ae89c83f2d6e254d62cf82e204956d0
120,622,599,191,473,520,000,000,000,000,000,000,000
12
Fix #492: Potential double-free in gdImage*Ptr() Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we must not call `gdDPExtractData()`; otherwise a double-free would happen. Since `gdImage*Ctx()` are void functions, and we can't change that for BC reasons, we're introducing static helpers which ar...
Safe
415
{"cwe_id": "CWE-415", "vulnerability_type": "Double Free", "description": "The product calls free() twice on the same memory address.", "severity": "High", "category": "Double-free", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands"], "languages": [null, "C", "C++"], "example": "Example not extracted"...
int mg_mqtt_match_topic_expression(struct mg_str exp, struct mg_str topic) { struct mg_str ec, tc; if (exp.len == 0) return 0; while (1) { ec = mg_mqtt_next_topic_component(&exp); tc = mg_mqtt_next_topic_component(&topic); if (ec.len == 0) { if (tc.len != 0) return 0; if (exp.len == 0) bre...
0
[ "CWE-119", "CWE-284", "CWE-787" ]
mongoose
b3e0f780c34cea88f057a62213c012aa88fe2deb
41,416,241,352,059,487,000,000,000,000,000,000,000
25
Fix heap-based overflow in parse_mqtt PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
bool pmd_trans_migrating(pmd_t pmd) { struct page *page = pmd_page(pmd); return PageLocked(page); }
0
[ "CWE-476" ]
linux
42cb14b110a5698ccf26ce59c4441722605a3743
9,054,585,427,297,551,000,000,000,000,000,000,000
5
mm: migrate dirty page without clear_page_dirty_for_io etc clear_page_dirty_for_io() has accumulated writeback and memcg subtleties since v2.6.16 first introduced page migration; and the set_page_dirty() which completed its migration of PageDirty, later had to be moderated to __set_page_dirty_nobuffers(); then PageSwa...
Safe
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
void xen_hvm_init_shared_info(void) { struct xen_add_to_physmap xatp; xatp.domid = DOMID_SELF; xatp.idx = 0; xatp.space = XENMAPSPACE_shared_info; xatp.gpfn = shared_info_pfn; if (HYPERVISOR_memory_op(XENMEM_add_to_physmap, &xatp)) BUG(); }
0
[]
linux
fa1f57421e0b1c57843902c89728f823abc32f02
110,911,434,524,817,200,000,000,000,000,000,000,000
11
xen/virtio: Enable restricted memory access using Xen grant mappings In order to support virtio in Xen guests add a config option XEN_VIRTIO enabling the user to specify whether in all Xen guests virtio should be able to access memory via Xen grant mappings only on the host side. Also set PLATFORM_VIRTIO_RESTRICTED_M...
Safe
null
null
DLLIMPORT int cfg_setstr(cfg_t *cfg, const char *name, const char *value) { return cfg_setnstr(cfg, name, value, 0); }
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
134,063,685,412,295,300,000,000,000,000,000,000,000
4
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
Safe
null
null
static void free_kmem_cache_nodes(struct kmem_cache *s) { }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
159,907,359,326,116,500,000,000,000,000,000,000,000
3
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
Safe
189
null
int bus_socket_process_watch_bind(sd_bus *b) { int r, q; assert(b); assert(b->state == BUS_WATCH_BIND); assert(b->inotify_fd >= 0); r = flush_fd(b->inotify_fd); if (r <= 0) return r; log_debug("Got inotify event on bus %s.", strna(b->description...
0
[ "CWE-787" ]
systemd
6d586a13717ae057aa1b4127400c3de61cd5b9e7
2,791,620,093,193,520,000,000,000,000,000,000,000
30
sd-bus: if we receive an invalid dbus message, ignore and proceeed dbus-daemon might have a slightly different idea of what a valid msg is than us (for example regarding valid msg and field sizes). Let's hence try to proceed if we can and thus drop messages rather than fail the connection if we fail to validate a mess...
Safe
787
{"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest...
void WebContents::SetDevToolsWebContents(const WebContents* devtools) { if (managed_web_contents()) managed_web_contents()->SetDevToolsWebContents(devtools->web_contents()); }
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
291,222,823,829,629,360,000,000,000,000,000,000,000
4
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
Safe
284
{"cwe_id": "CWE-284", "vulnerability_type": "Improper Access Control", "description": "The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.", "severity": null, "category": "Authorization", "impact": ["Varies by Context"], "languages": [null], "example": "Example not ex...
R_API RBinField *r_bin_java_allocate_rbinfield(void) { RBinField *t = (RBinField *) malloc (sizeof (RBinField)); if (t) { memset (t, 0, sizeof (RBinField)); } return t; }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
112,408,206,096,885,720,000,000,000,000,000,000,000
7
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
fascist_firewall_choose_address_rs(const routerstatus_t *rs, firewall_connection_t fw_connection, int pref_only, tor_addr_port_t* ap) { if (!rs) { return 0; } tor_assert(ap); const node_t *node = node_get_by_id(rs->identity_digest); ...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
242,326,771,544,565,340,000,000,000,000,000,000,000
37
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
Safe
null
null
unsigned long account_pipe_buffers(struct user_struct *user, unsigned long old, unsigned long new) { return atomic_long_add_return(new - old, &user->pipe_bufs); }
0
[ "CWE-362" ]
linux
189b0ddc245139af81198d1a3637cac74f96e13a
332,608,439,945,516,040,000,000,000,000,000,000,000
5
pipe: Fix missing lock in pipe_resize_ring() pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to prevent post_one_notification() from trying to insert into the ring whilst the ring is being replaced. The occupancy check must be done after the lock is taken, and the lock must be taken after the new rin...
Safe
362
{"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour...
void HGraph::PropagateMinusZeroChecks(HValue* value, BitVector* visited) { HValue* current = value; while (current != NULL) { if (visited->Contains(current->id())) return; // For phis, we must propagate the check to all of its inputs. if (current->IsPhi()) { visited->Add(current->id()); HPh...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
206,210,042,156,176,200,000,000,000,000,000,000,000
37
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
Safe
null
null
static int bnx2x_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) { struct bnx2x *bp = container_of(ptp, struct bnx2x, ptp_clock_info); u64 ns; if (!netif_running(bp->dev)) { DP(BNX2X_MSG_PTP, "PTP gettime called while the interface is down\n"); return -ENETDOWN; } ns = timecounter_read(&b...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
37,382,030,152,805,814,000,000,000,000,000,000,000
19
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
static int aa_read_header(AVFormatContext *s) { int i, j, idx, largest_idx = -1; uint32_t nkey, nval, toc_size, npairs, header_seed = 0, start; char key[128], val[128], codec_name[64] = {0}; uint8_t output[24], dst[8], src[8]; int64_t largest_size = -1, current_size = -1, chapter_pos; struct toc...
0
[ "CWE-665", "CWE-908" ]
FFmpeg
ed188f6dcdf0935c939ed813cf8745d50742014b
181,134,509,859,838,250,000,000,000,000,000,000,000
171
avformat/aadec: Check for scanf() failure Fixes: use of uninitialized variables Fixes: blank.aa Found-by: Chamal De Silva <chamal.desilva@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Safe
665
{"cwe_id": "CWE-665", "vulnerability_type": "Improper Initialization", "description": "The product does not initialize or incorrectly initializes a resource, which might leave the resource in an unexpected state when it is accessed or used.", "severity": "Medium", "category": null, "impact": ["Read Memory", "Read Appli...
void user_describe(const struct key *key, struct seq_file *m) { seq_puts(m, key->description); if (key_is_positive(key)) seq_printf(m, ": %u", key->datalen); }
0
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
145,756,562,762,381,740,000,000,000,000,000,000,000
6
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
const char *ext4_decode_error(struct super_block *sb, int errno, char nbuf[16]) { char *errstr = NULL; switch (errno) { case -EFSCORRUPTED: errstr = "Corrupt filesystem"; break; case -EFSBADCRC: errstr = "Filesystem failed CRC"; break; case -EIO: errstr = "IO failure"; break; case -ENOMEM: ...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
212,365,705,297,059,470,000,000,000,000,000,000,000
39
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
Safe
362
{"cwe_id": "CWE-362", "vulnerability_type": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "description": "The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resour...
Expression_Obj Parser::parse_map() { NESTING_GUARD(nestings); Expression_Obj key = parse_list(); List_Obj map = SASS_MEMORY_NEW(List, pstate, 0, SASS_HASH); // it's not a map so return the lexed value as a list value if (!lex_css< exactly<':'> >()) { return key; } List_Obj l = Cast<Lis...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
23,972,334,556,607,360,000,000,000,000,000,000,000
43
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
Safe
125
{"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"...
static int send_release(uint32_t server, uint32_t ciaddr) { struct dhcp_packet packet; /* Fill in: op, htype, hlen, cookie, chaddr, random xid fields, * client-id option (unless -C), message type option: */ init_packet(&packet, DHCPRELEASE); /* DHCPRELEASE uses ciaddr, not "requested ip", to store IP being re...
0
[ "CWE-20" ]
busybox
7280d2017d8075267a12e469983e38277dcf0374
191,979,809,837,383,470,000,000,000,000,000,000,000
17
udhcpc: sanitize hostnames in incoming packets. Closes 3979. The following options are replaced with string "bad" if they contain malformed hostname: HOST_NAME, DOMAIN_NAME, NIS_DOMAIN, TFTP_SERVER_NAME function old new delta xmalloc_optname_optval ...
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
static int nfs_post_op_update_inode_locked(struct inode *inode, struct nfs_fattr *fattr) { struct nfs_inode *nfsi = NFS_I(inode); nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE; if (S_ISDIR(inode->i_mode)) nfsi->cache_validity |= NFS_INO_INVALID_DATA; if ((fattr->valid & NFS_ATTR_FATTR) == ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
148,326,544,812,727,980,000,000,000,000,000,000,000
11
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
static int ras_puthdr(jas_stream_t *out, ras_hdr_t *hdr) { if (ras_putint(out, RAS_MAGIC) || ras_putint(out, hdr->width) || ras_putint(out, hdr->height) || ras_putint(out, hdr->depth) || ras_putint(out, hdr->length) || ras_putint(out, hdr->type) || ras_putint(out, hdr->maptype) || ras_putint(out, hdr->mapleng...
0
[]
jasper
411a4068f8c464e883358bf403a3e25158863823
93,380,779,707,687,140,000,000,000,000,000,000,000
11
Fixed a few bugs in the RAS encoder and decoder where errors were tested with assertions instead of being gracefully handled.
Safe
null
null
void rfbVncAuthProcessResponse(rfbClientPtr cl) { char passwdFullControl[MAXPWLEN + 1] = "\0"; char passwdViewOnly[MAXPWLEN + 1] = "\0"; int numPasswords; Bool ok; int n; CARD8 response[CHALLENGESIZE]; n = ReadExact(cl, (char *)response, CHALLENGESIZE); if (n <= 0) { if (n != 0) rfbLogPerror(...
0
[ "CWE-787" ]
turbovnc
cea98166008301e614e0d36776bf9435a536136e
227,482,994,930,586,400,000,000,000,000,000,000,000
79
Server: Fix two issues identified by ASan 1. If the TLSPlain and X509Plain security types were both disabled, then rfbOptPamAuth() would overflow the name field in the secTypes structure when testing the "none" security type, since the name of that security type has less than five characters. This issue was ...
Safe
787
{"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest...
UpdateStatisticsForTypeChange(Oid statsOid, Oid relationOid, int attnum, Oid oldColumnType, Oid newColumnType) { /* * Currently, we don't actually need to do anything here. For both * ndistinct and functional-dependencies stats, the on-disk representation * is independent of the source column data type...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
73,768,189,572,600,620,000,000,000,000,000,000,000
16
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
Safe
94
{"cwe_id": "CWE-94", "vulnerability_type": "Improper Control of Generation of Code ('Code Injection')", "description": "The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could mod...
void SparseFillEmptyRowsOpImpl(OpKernelContext* context, AsyncOpKernel::DoneCallback done = nullptr) { // Note that setting this empty lambda as the default parameter value directly // can cause strange compiler/linker errors, so we do it like this instead. if (!done) { done = [...
1
[ "CWE-476", "CWE-703" ]
tensorflow
faa76f39014ed3b5e2c158593b1335522e573c7f
25,957,290,097,876,196,000,000,000,000,000,000,000
45
Fix heap-buffer-overflow issue with `tf.raw_ops.SparseFillEmptyRows`. PiperOrigin-RevId: 372009178 Change-Id: Ia1a9e9691ecaa072f32fb39a0887b2aabd399210
Vulnerable
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
static void kvm_erase_gfn_node(struct kvm_memslots *slots, struct kvm_memory_slot *slot) { rb_erase(&slot->gfn_node[slots->node_idx], &slots->gfn_tree);
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
77,689,690,819,001,870,000,000,000,000,000,000,000
5
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
Safe
459
{"cwe_id": "CWE-459", "vulnerability_type": "Incomplete Cleanup", "description": "The product does not properly \"clean up\" and remove temporary or supporting resources after they have been used.", "severity": null, "category": "Insufficient Cleanup", "impact": ["Other", "Read Application Data", "Modify Application Da...
void TestContext::ReturnInstruction(HInstruction* instr, BailoutId ast_id) { ASSERT(!instr->IsControlInstruction()); HGraphBuilder* builder = owner(); builder->AddInstruction(instr); // We expect a simulate after every expression with side effects, though // this one isn't actually needed (and wouldn't work i...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
234,852,193,813,067,780,000,000,000,000,000,000,000
13
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
Safe
null
null
S_regbranch(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, I32 first, U32 depth) { regnode *ret; regnode *chain = NULL; regnode *latest; I32 flags = 0, c = 0; GET_RE_DEBUG_FLAGS_DECL; PERL_ARGS_ASSERT_REGBRANCH; DEBUG_PARSE("brnc"); if (first) ret = NULL; else { if (!SIZE_ONLY && ...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
87,644,214,466,233,840,000,000,000,000,000,000,000
67
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
Safe
125
{"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"...
cr_input_read_byte (CRInput * a_this, guchar * a_byte) { gulong nb_bytes_left = 0; g_return_val_if_fail (a_this && PRIVATE (a_this) && a_byte, CR_BAD_PARAM_ERROR); g_return_val_if_fail (PRIVATE (a_this)->next_byte_index <= PRIVATE (a_...
0
[ "CWE-125" ]
libcroco
898e3a8c8c0314d2e6b106809a8e3e93cf9d4394
276,432,068,299,589,630,000,000,000,000,000,000,000
30
input: check end of input before reading a byte When reading bytes we weren't check that the index wasn't out of bound and this could produce an invalid read which could deal to a security bug.
Safe
125
{"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"...
HeifContext::HeifContext() { reset_to_empty_heif(); }
0
[ "CWE-125" ]
libheif
f7399b62d7fbc596f1b2871578c1d2053bedf1dd
15,326,264,281,254,504,000,000,000,000,000,000,000
4
Handle case where referenced "iref" box doesn't exist (fixes #138).
Safe
125
{"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"...
TEST_F(QueryPlannerTest, ElemMatchCompoundTwoFields) { addIndex(BSON("a.b" << 1 << "a.c" << 1)); runQuery(fromjson("{a : {$elemMatch: {b:1, c:1}}}")); ASSERT_EQUALS(getNumSolutions(), 2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists("{fetch: {node: {ixscan: {pattern: {'a.b': 1, ...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
121,676,488,038,150,530,000,000,000,000,000,000,000
8
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
Safe
834
{"cwe_id": "CWE-834", "vulnerability_type": "Excessive Iteration", "description": "The product performs an iteration or loop without sufficiently limiting the number of times that the loop is executed.", "severity": null, "category": null, "impact": ["DoS: Resource Consumption (CPU)", "DoS: Resource Consumption (Memory...
uint16_t smb2cli_session_reset_channel_sequence(struct smbXcli_session *session, uint16_t channel_sequence) { uint16_t prev_cs; prev_cs = session->smb2->channel_sequence; session->smb2->channel_sequence = channel_sequence; return prev_cs; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
321,924,457,928,612,330,000,000,000,000,000,000,000
10
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
struct vrend_context *vrend_create_context(int id, uint32_t nlen, const char *debug_name) { struct vrend_context *grctx = CALLOC_STRUCT(vrend_context); if (!grctx) return NULL; if (nlen && debug_name) { strncpy(grctx->debug_name, debug_name, nlen < sizeof(grctx->debug_name) - 1 ? nl...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
170,998,144,634,703,820,000,000,000,000,000,000,000
47
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Safe
787
{"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest...
rsvg_filter_blend (RsvgFilterPrimitiveBlendMode mode, GdkPixbuf * in, GdkPixbuf * in2, GdkPixbuf * output, RsvgIRect boundarys, int *channelmap) { guchar i; gint x, y; gint rowstride, rowstride2, rowstrideo, height, width; guchar *in_pixels; guchar *in2_pixels; guchar *output_...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
137,285,251,654,931,520,000,000,000,000,000,000,000
108
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
Safe
null
null
validateWithCheckOption(const char *value) { if (value == NULL || (strcmp(value, "local") != 0 && strcmp(value, "cascaded") != 0)) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("invalid value for \"check_option\" option"), errdetail("Valid values are \"local\" and \"cascaded\...
0
[ "CWE-94" ]
postgres
5579726bd60a6e7afb04a3548bced348cd5ffd89
192,574,746,634,884,020,000,000,000,000,000,000,000
12
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
Safe
94
{"cwe_id": "CWE-94", "vulnerability_type": "Improper Control of Generation of Code ('Code Injection')", "description": "The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could mod...
static int nested_vmx_check_vmentry_prereqs(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { if (nested_check_vm_execution_controls(vcpu, vmcs12) || nested_check_vm_exit_controls(vcpu, vmcs12) || nested_check_vm_entry_controls(vcpu, vmcs12)) return VMXERR_ENTRY_INVALID_CONTROL_FIELD; if (nested_c...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
55,733,654,500,026,690,000,000,000,000,000,000,000
16
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
Safe
863
{"cwe_id": "CWE-863", "vulnerability_type": "Incorrect Authorization", "description": "The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.", "severity": "High", "category": "AuthZ", "impact": ["Read Application Data",...
static void pci_cirrus_vga_realize(PCIDevice *dev, Error **errp) { PCICirrusVGAState *d = PCI_CIRRUS_VGA(dev); CirrusVGAState *s = &d->cirrus_vga; PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev); int16_t device_id = pc->device_id; /* follow real hardware, cirrus card emulated has 4 MB video mem...
0
[ "CWE-119" ]
qemu
026aeffcb4752054830ba203020ed6eb05bcaba8
26,956,479,502,399,700,000,000,000,000,000,000,000
39
cirrus: stop passing around dst pointers in the blitter Instead pass around the address (aka offset into vga memory). Calculate the pointer in the rop_* functions, after applying the mask to the address, to make sure the address stays within the valid range. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-i...
Safe
119
{"cwe_id": "CWE-119", "vulnerability_type": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "description": "The product performs operations on a memory buffer, but it reads from or writes to a memory location outside the buffer's intended boundary. This may result in read or write operations ...
Bool print_version(char *arg_val, u32 param) { fprintf(stderr, "MP4Box - GPAC version %s\n" "%s\n" "GPAC Configuration: " GPAC_CONFIGURATION "\n" "Features: %s %s\n", gf_gpac_version(), gf_gpac_copyright_cite(), gf_sys_features(GF_FALSE), gf_sys_features(GF_TRUE)); return GF_TRUE; }
0
[ "CWE-476" ]
gpac
87afe070cd6866df7fe80f11b26ef75161de85e0
95,326,020,447,488,050,000,000,000,000,000,000,000
8
fixed #1734
Safe
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
static void igmp6_group_dropped(struct ifmcaddr6 *mc) { struct net_device *dev = mc->idev->dev; char buf[MAX_ADDR_LEN]; if (IPV6_ADDR_MC_SCOPE(&mc->mca_addr) < IPV6_ADDR_SCOPE_LINKLOCAL) return; if (mc->mca_flags&MAF_LOADED) { mc->mca_flags &= ~MAF_LOADED; if (ndisc_mc_map(&mc->mca_addr, buf, dev, 0) =...
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
174,160,365,636,230,000,000,000,000,000,000,000,000
24
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...
void in_longlong::set(uint pos,Item *item) { struct packed_longlong *buff= &((packed_longlong*) base)[pos]; buff->val= item->val_int(); buff->unsigned_flag= item->unsigned_flag; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
75,130,403,733,350,220,000,000,000,000,000,000,000
7
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
Safe
617
{"cwe_id": "CWE-617", "vulnerability_type": "Reachable Assertion", "description": "The product contains an assert() or similar statement that can be triggered by an attacker, which leads to an application exit or other behavior that is more severe than necessary.", "severity": null, "category": "assertion failure", "im...
__tree_mod_log_rewind(struct btrfs_fs_info *fs_info, struct extent_buffer *eb, u64 time_seq, struct tree_mod_elem *first_tm) { u32 n; struct rb_node *next; struct tree_mod_elem *tm = first_tm; unsigned long o_dst; unsigned long o_src; unsigned long p_size = sizeof(struct btrfs_key_ptr); n = btrfs_header...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
26,127,543,636,535,244,000,000,000,000,000,000,000
69
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
Safe
416
{"cwe_id": "CWE-416", "vulnerability_type": "Use After Free", "description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and saved in another pointer, while the original pointer references a location somewhere within the new allocation. An...
void Monitor::try_send_message(Message *m, const entity_inst_t& to) { dout(10) << "try_send_message " << *m << " to " << to << dendl; bufferlist bl; encode_message(m, quorum_con_features, bl); messenger->send_message(m, to); for (int i=0; i<(int)monmap->size(); i++) { if (i != rank) messenger->se...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
250,285,222,072,126,870,000,000,000,000,000,000,000
14
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
Safe
287
{"cwe_id": "CWE-287", "vulnerability_type": "Improper Authentication", "description": "When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.", "severity": "High", "category": "authentification", "impact": ["Read Application Data", "Gain Privileges ...
int sisusb_setidxreg(struct sisusb_usb_data *sisusb, int port, u8 index, u8 data) { int ret; ret = sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port, index); ret |= sisusb_write_memio_byte(sisusb, SISUSB_TYPE_IO, port + 1, data); return ret; }
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
164,500,028,888,600,980,000,000,000,000,000,000,000
9
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
Safe
476
{"cwe_id": "CWE-476", "vulnerability_type": "NULL Pointer Dereference", "description": "The product dereferences a pointer that it expects to be valid but is NULL.", "severity": "Medium", "category": "NPD", "impact": ["DoS: Crash, Exit, or Restart", "Execute Unauthorized Code or Commands", "Read Memory", "Modify Memory...
void Phase2() final { // Setup auto* isolate = Isolate::GetCurrent(); auto context = Deref(this->context); Context::Scope context_scope{context}; auto name = GetKey(context); auto object = GetTargetAndAlsoCheckForProxy(); // Get property ret = TransferOut([&]() { if (inherit) { // To...
0
[ "CWE-913" ]
isolated-vm
2646e6c1558bac66285daeab54c7d490ed332b15
20,867,982,066,920,964,000,000,000,000,000,000,000
35
Don't invoke accessors or proxies via Reference functions
Safe
913
{"cwe_id": "CWE-913", "vulnerability_type": "Improper Control of Dynamically-Managed Code Resources", "description": "The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements....
static void destroy_inodecache(void) { kmem_cache_destroy(ext4_inode_cachep); }
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
27,390,136,648,500,120,000,000,000,000,000,000,000
4
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
Safe
20
{"cwe_id": "CWE-20", "vulnerability_type": "Improper Input Validation", "description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n properties that are required to process the data safely and\n correctly.", "severity": "High", "ca...
RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr, uint32_t ram_flags, int fd, Error **errp) { RAMBlock *new_block; Error *local_err = NULL; int64_t file_size, file_align; /* Just support these ram flags by now. */ a...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
319,860,435,295,832,320,000,000,000,000,000,000,000
70
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
Safe
787
{"cwe_id": "CWE-787", "vulnerability_type": "Out-of-bounds Write", "description": "The product writes data past the end, or before the beginning, of the intended buffer.", "severity": "High", "category": "Memory Corruption", "impact": ["Modify Memory", "Execute Unauthorized Code or Commands", "DoS: Crash, Exit, or Rest...
rfbHandleSecTypeTight(rfbClientPtr cl) { rfbTightClientPtr rtcp = (rfbTightClientPtr) malloc(sizeof(rfbTightClientRec)); rfbLog("tightvnc-filetransfer/rfbHandleSecTypeTight\n"); if(rtcp == NULL) { /* Error condition close socket */ rfbLog("Memory error has occured while handling " "Tigh...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
177,221,943,630,020,580,000,000,000,000,000,000,000
22
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
Safe
null
null
test_bson_append_iter (void) { bson_iter_t iter; bool r; bson_t b; bson_t c; bson_init (&b); bson_append_int32 (&b, "a", 1, 1); bson_append_int32 (&b, "b", 1, 2); bson_append_int32 (&b, "c", 1, 3); bson_append_utf8 (&b, "d", 1, "hello", 5); bson_init (&c); r = bson_iter_init_find (&i...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
35,671,688,964,290,214,000,000,000,000,000,000,000
50
CDRIVER-2269 Check for zero string length in codewscope
Safe
125
{"cwe_id": "CWE-125", "vulnerability_type": "Out-of-bounds Read", "description": "The product reads data past the end, or before the beginning, of the intended buffer.", "severity": null, "category": "OOB read", "impact": ["Read Memory", "Bypass Protection Mechanism", "DoS: Crash, Exit, or Restart", "Varies by Context"...
static ut64 __opaddr(RzAnalysisBlock *b, ut64 addr) { int i; if (addr >= b->addr && addr < (b->addr + b->size)) { for (i = 0; i < b->ninstr; i++) { ut64 aa = rz_analysis_block_get_op_addr(b, i); ut64 ab = rz_analysis_block_get_op_addr(b, i + 1); if (addr >= aa && addr < ab) { return aa; } } } re...
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
193,127,433,486,072,430,000,000,000,000,000,000,000
13
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
Safe
703
{"cwe_id": "CWE-703", "vulnerability_type": "Improper Check or Handling of Exceptional Conditions", "description": "The product does not properly anticipate or handle exceptional conditions that rarely occur during normal operation of the product.", "severity": null, "category": null, "impact": ["Read Application Data"...