context
large_stringlengths
383
16.5k
cve
large_stringclasses
1 value
cwe
large_stringclasses
13 values
id
large_stringlengths
1
4
label
large_stringclasses
1 value
source
large_stringlengths
48
234k
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2700
true
static void avrc_msg_cback(uint8_t handle, uint8_t label, uint8_t cr, BT_HDR* p_pkt) { uint8_t opcode; tAVRC_MSG msg; uint8_t* p_data; uint8_t* p_begin; bool drop = false; bool do_free = true; BT_HDR* p_rsp = NULL; uint8_t* p_rsp_data; int xx; bool reject = false; const char* p_d...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2701
true
static int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); bool src_known, dst_known; s64 smin_val, smax_val; u64 ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2702
true
static PCRE2_SPTR SLJIT_FUNC do_extuni_no_utf(jit_arguments *args, PCRE2_SPTR cc) { PCRE2_SPTR start_subject = args->begin; PCRE2_SPTR end_subject = args->end; int lgb, rgb, ricount; PCRE2_SPTR bptr; uint32_t c; GETCHARINC(c, cc); lgb = UCD_GRAPHBREAK(c); while (cc < end_subject) { c = *cc; rgb = UCD_GRAPHBREAK...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2703
true
MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, ExceptionInfo *exception) { #define RenderImageTag "Render/Image" AffineMatrix affine, current; char keyword[MagickPathExtent], geometry[MagickPathExtent], pattern[MagickPathExtent], *primitive, *token;...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2704
true
sctp_disposition_t sctp_sf_ootb(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *chunk = arg; struct sk_buff *skb = chunk->skb; sctp_chunkhdr_t *ch; sctp_errhdr_t *err; __u8...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2705
true
gst_date_time_new_from_iso8601_string (const gchar * string) { gint year = -1, month = -1, day = -1, hour = -1, minute = -1; gint gmt_offset_hour = -99, gmt_offset_min = -99; gdouble second = -1.0; gfloat tzoffset = 0.0; guint64 usecs; gint len, ret; g_return_val_if_fail (string != NULL, NULL); GST_DE...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2706
true
static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { char buffer[MagickPathExtent], format, magick[MagickPathExtent]; const char *value; MagickBooleanType status; MagickOffsetType scene; Quantum index; QuantumAny ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2707
true
rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport, int32_t *opcode) { int i; struct rx_cache_entry *rxent; uint32_t clip; uint32_t sip; UNALIGNED_MEMCPY(&clip, &ip->ip_dst, sizeof(uint32_t)); UNALIGNED_MEMCPY(&sip, &ip->ip_src, sizeof(uint32_t)); /* Start the search where we last...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2708
true
static int fsck_gitmodules_fn(const char *var, const char *value, void *vdata) { struct fsck_gitmodules_data *data = vdata; const char *subsection, *key; int subsection_len; char *name; if (parse_config_key(var, "submodule", &subsection, &subsection_len, &key) < 0 || !subsection) return 0; name = xmemdup...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2709
true
std::string& attrf(int ncid, int varId, const char * attrName, std::string& alloc) { alloc = ""; size_t len = 0; nc_inq_attlen(ncid, varId, attrName, &len); if(len < 1) { return alloc; } char attr_vals[NC_MAX_NAME + 1]; memse...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2710
true
void Compute(OpKernelContext* ctx) override { try { const Tensor& input = ctx->input(kInputTensorIndex); const Tensor& input_min_vec = ctx->input(kInputMinVecIndex); float* input_min_vec_data = (float*)const_cast<void*>( static_cast<const void*>(input_min_vec.flat<float>().data())); ...
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur...
CWE-703
2711
true
static int nfs_lookup_reply(uchar *pkt, unsigned len) { struct rpc_t rpc_pkt; debug("%s\n", __func__); memcpy(&rpc_pkt.u.data[0], pkt, len); if (ntohl(rpc_pkt.u.reply.id) > rpc_id) return -NFS_RPC_ERR; else if (ntohl(rpc_pkt.u.reply.id) < rpc_id) return -NFS_RPC_DROP; if (rpc_pkt.u.reply.rstatus || ...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2712
true
int ZEXPORT inflate(strm, flush) z_streamp strm; int flush; { struct inflate_state FAR *state; z_const unsigned char FAR *next; /* next input */ unsigned char FAR *put; /* next output */ unsigned have, left; /* available input and output */ unsigned long hold; /* bit buffer */ ...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2713
true
GF_Err gf_isom_set_extraction_slc(GF_ISOFile *the_file, u32 trackNumber, u32 StreamDescriptionIndex, const GF_SLConfig *slConfig) { GF_TrackBox *trak; GF_SampleEntryBox *entry; GF_Err e; GF_SLConfig **slc; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak) return GF_BAD_PARAM; e = Media_GetS...
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi...
CWE-200
2714
true
static int __fpu__restore_sig(void __user *buf, void __user *buf_fx, int size) { int ia32_fxstate = (buf != buf_fx); struct task_struct *tsk = current; struct fpu *fpu = &tsk->thread.fpu; int state_size = fpu_kernel_xstate_size; u64 xfeatures = 0; int fx_only = 0; ia32_fxstate &= (IS_ENABLED(CONFIG_X86_32) || ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2715
true
int mutt_seqset_iterator_next (SEQSET_ITERATOR *iter, unsigned int *next) { char *range_sep; if (!iter || !next) return -1; if (iter->in_range) { if ((iter->down && iter->range_cur == (iter->range_end - 1)) || (!iter->down && iter->range_cur == (iter->range_end + 1))) iter->in_range = 0;...
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "tensorflow", "commit_message": "Validate that a and b are proper sparse tensors\n\nPiperOrigin-RevId: 373274848\nCh...
CWE-369
2716
true
void Compute(OpKernelContext *ctx) override { const Tensor *a_indices_t, *a_values_t, *a_shape_t, *b_indices_t, *b_values_t, *b_shape_t; OP_REQUIRES_OK(ctx, ctx->input("a_indices", &a_indices_t)); OP_REQUIRES_OK(ctx, ctx->input("a_values", &a_values_t)); OP_REQUIRES_OK(ctx, ctx->input("a_shape...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2717
true
static int blosc_c(struct thread_context* thread_context, int32_t bsize, int32_t leftoverblock, int32_t ntbytes, int32_t maxbytes, const uint8_t* src, const int32_t offset, uint8_t* dest, uint8_t* tmp, uint8_t* tmp2) { blosc2_context* context = thread_context->...
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ...
CWE-190
2718
true
PyImaging_MapBuffer(PyObject* self, PyObject* args) { Py_ssize_t y, size; Imaging im; PyObject* target; Py_buffer view; char* mode; char* codec; PyObject* bbox; Py_ssize_t offset; int xsize, ysize; int stride; int ystep; if (!PyArg_ParseTuple(args, "O(ii)sOn(sii)", &tar...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2719
true
readSampleCountForLineBlock(InputStreamMutex* streamData, DeepScanLineInputFile::Data* data, int lineBlockId) { streamData->is->seekg(data->lineOffsets[lineBlockId]); if (isMultiPart(data->version)) { int partNumber; OPENEXR_IMF_INTERN...
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save...
CWE-416
2720
true
exec_instructions(ectx_T *ectx) { int ret = FAIL; int save_trylevel_at_start = ectx->ec_trylevel_at_start; int dict_stack_len_at_start = dict_stack.ga_len; // Start execution at the first instruction. ectx->ec_iidx = 0; // Only catch exceptions in this instruction list. ectx->ec_tryleve...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2721
true
parse_rock_ridge_inode_internal(struct iso_directory_record *de, struct inode *inode, int flags) { int symlink_len = 0; int cnt, sig; unsigned int reloc_block; struct inode *reloc; struct rock_ridge *rr; int rootflag; struct rock_state rs; int ret = 0; if (!ISOFS_SB(inode->i_sb)->s_rock) return 0; ini...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2722
true
static int tls_decrypt_ticket(SSL *s, const unsigned char *etick, int eticklen, const unsigned char *sess_id, int sesslen, SSL_SESSION **psess) { SSL_SESSION *sess; unsigned char *sdec; const unsigned char *p; int slen, mlen, renew_ticket = 0; unsigned char tick_hmac[EVP_MAX_MD_SIZE]; HMAC_CTX hctx; EVP...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2723
true
static ssize_t WritePSDChannels(const PSDInfo *psd_info, const ImageInfo *image_info,Image *image,Image *next_image, MagickOffsetType size_offset,const MagickBooleanType separate) { Image *mask; MagickOffsetType rows_offset; size_t channels, count, length, offset_length; unsigned ...
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save...
CWE-416
2724
true
static void *__ns_get_path(struct path *path, struct ns_common *ns) { struct vfsmount *mnt = nsfs_mnt; struct qstr qname = { .name = "", }; struct dentry *dentry; struct inode *inode; unsigned long d; rcu_read_lock(); d = atomic_long_read(&ns->stashed); if (!d) goto slow; dentry = (struct dentry *)d; if (!...
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur...
CWE-703
2725
true
cmdopts_t *cmdopts_parse(int argc, char **argv) { enum { CMDOPT_HELP = 0, CMDOPT_VERBOSE, CMDOPT_QUIET, CMDOPT_INFILE, CMDOPT_INFMT, CMDOPT_INOPT, CMDOPT_OUTFILE, CMDOPT_OUTFMT, CMDOPT_OUTOPT, CMDOPT_VERSION, CMDOPT_DEBUG, CMDOPT_CMPTNO, CMDOPT_SRGB, CMDOPT_MAXMEM, CMDOPT_LIST_ENABLED_COD...
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "qemu", "commit_message": "bochs: Check extent_size header field (CVE-2014-0142)\n\nThis fixes two possible division...
CWE-369
2726
true
static int bochs_open(BlockDriverState *bs, QDict *options, int flags, Error **errp) { BDRVBochsState *s = bs->opaque; uint32_t i; struct bochs_header bochs; int ret; bs->read_only = 1; // no write support yet ret = bdrv_pread(bs->file, 0, &bochs, sizeof(bochs)); if (...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2727
true
void JBIG2Stream::readSegments() { Guint segNum, segFlags, segType, page, segLength; Guint refFlags, nRefSegs; Guint *refSegs; Goffset segDataPos; int c1, c2, c3; Guint i; while (readULong(&segNum)) { // segment header flags if (!readUByte(&segFlags)) { goto eofError1; } segType = ...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2728
true
int Exiv2::http(Exiv2::Dictionary& request, Exiv2::Dictionary& response, std::string& errors) { if (!request.count("verb")) request["verb"] = "GET"; if (!request.count("header")) request["header"] = ""; if (!request.count("version")) request["version"] = "1.0"; if (!request.count...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2729
true
static int fts3IncrmergePush( Fts3Table *p, /* Fts3 table handle */ IncrmergeWriter *pWriter, /* Writer object */ const char *zTerm, /* Term to write to internal node */ int nTerm /* Bytes at zTerm */ ){ sqlite3_int64 iPtr = pWriter->aNodeWriter[0].iB...
{"cwe_details": {"ID": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "tensorflow", "commit_message": "Prevent division by 0 in `fully_connected.cc`\n\nPiperOrigin-RevId: 385137282\nChan...
CWE-369
2730
true
TfLiteStatus PrepareImpl(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteFullyConnectedParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); // Check we have all the inputs and outputs we need. TF_LITE_ENSURE(context, node->inputs->size ...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2731
true
PHP_FUNCTION( msgfmt_format_message ) { zval *args; UChar *spattern = NULL; int spattern_len = 0; char *pattern = NULL; int pattern_len = 0; const char *slocale = NULL; int slocale_len = 0; MessageFormatter_object mf = {0}; MessageFormatter_object *mfo = &mf; /* Parse...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2732
true
static bool GetUpdateFile( update_t *p_update ) { stream_t *p_stream = NULL; char *psz_version_line = NULL; char *psz_update_data = NULL; p_stream = stream_UrlNew( p_update->p_libvlc, UPDATE_VLC_STATUS_URL ); if( !p_stream ) { msg_Err( p_update->p_libvlc, "Failed to open %s for reading"...
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ...
CWE-190
2733
true
INLINE void gdi_RectToCRgn(const HGDI_RECT rect, INT32* x, INT32* y, INT32* w, INT32* h) { *x = rect->left; *y = rect->top; *w = rect->right - rect->left + 1; *h = rect->bottom - rect->top + 1; }
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2734
true
drill_parse_T_code(gerb_file_t *fd, drill_state_t *state, gerbv_image_t *image, ssize_t file_line) { int tool_num; gboolean done = FALSE; int temp; double size; gerbv_drill_stats_t *stats = image->drill_stats; gerbv_aperture_t *apert; gchar *tmps; gchar *string; dprintf("---> ent...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2735
true
static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index) { struct hid_device *hid = hidpp->hid_dev; struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); struct input_dev *dev = hidinput->input; const struct usb_device_descriptor *udesc = &(hid_to_usb_dev(hid)->descriptor)...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2736
true
static void imap_parser_save_arg(struct imap_parser *parser, const unsigned char *data, size_t size) { struct imap_arg *arg; char *str; arg = imap_arg_create(parser); switch (parser->cur_type) { case ARG_PARSE_ATOM: case ARG_PARSE_TEXT: if (size == 3 && i_memcasecmp(data, "NIL", 3) == 0) { /* NIL argu...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2737
true
bool GetNetworkList(NetworkInterfaceList* networks, int policy) { int s = socket(AF_INET, SOCK_DGRAM, 0); if (s <= 0) { PLOG(ERROR) << "socket"; return false; } uint32_t num_ifs = 0; if (ioctl_netc_get_num_ifs(s, &num_ifs) < 0) { PLOG(ERROR) << "ioctl_netc_get_num_ifs"; PCHECK(close(s) == 0);...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2738
true
process_chpw_request(krb5_context context, void *server_handle, char *realm, krb5_keytab keytab, const krb5_fulladdr *local_faddr, const krb5_fulladdr *remote_faddr, krb5_data *req, krb5_data *rep) { krb5_error_code ret; char *ptr; unsigned int ...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2739
true
resp_new (const char *head) { const char *hdr; int count, size; struct response *resp = xnew0 (struct response); resp->data = head; if (*head == '\0') { /* Empty head means that we're dealing with a headerless (HTTP/0.9) response. In that case, don't set HEADERS at all. */ ...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2740
true
static void jsR_calllwfunction(js_State *J, int n, js_Function *F, js_Environment *scope) { js_Value v; int i; jsR_savescope(J, scope); if (n > F->numparams) { js_pop(J, F->numparams - n); n = F->numparams; } for (i = n; i < F->varlen; ++i) js_pushun...
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save...
CWE-416
2741
true
gst_matroska_demux_add_wvpk_header (GstElement * element, GstMatroskaTrackContext * stream, GstBuffer ** buf) { GstMatroskaTrackAudioContext *audiocontext = (GstMatroskaTrackAudioContext *) stream; GstBuffer *newbuf = NULL; GstMapInfo map, outmap; guint8 *buf_data, *data; Wavpack4Header wvh; wvh....
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2742
true
} void print_udta(GF_ISOFile *file, u32 track_number, Bool has_itags) { u32 i, count; count = gf_isom_get_udta_count(file, track_number); if (!count) return; if (has_itags) { for (i=0; i<count; i++) { u32 type; bin128 uuid; gf_isom_get_udta_type(file, track_number, i+1, &type, &uuid); if (type == ...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2743
true
_cairo_image_surface_create_from_jpeg (GInputStream *istream, GthFileData *file_data, int requested_size, int *original_width_p, int *original_height_p, gboolean *loaded_original_p, gpointer user_data, ...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2744
true
int ParseRiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config) { int is_rf64 = !strncmp (fourcc, "RF64", 4), got_ds64 = 0; int64_t total_samples = 0, infilesize; RiffChunkHeader riff_chunk_header; ChunkHeader chunk_header; WaveHeader WaveHeader; ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2745
true
stringprep_utf8_nfkc_normalize (const char *str, ssize_t len) { return g_utf8_normalize (str, len, G_NORMALIZE_NFKC); }
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2746
true
static int nfs_readlink_req(struct nfs_priv *npriv, struct nfs_fh *fh, char **target) { uint32_t data[1024]; uint32_t *p; uint32_t len; struct packet *nfs_packet; /* * struct READLINK3args { * nfs_fh3 symlink; * }; * * struct READLINK3resok { * post_op_attr symlink_attributes; * nfspath3 d...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2747
true
static const char *quote_arg(const char *arg) { /* count chars to quote */ int len = 0, n = 0; int force_quotes = 0; char *q, *d; const char *p = arg; if (!*p) force_quotes = 1; while (*p) { if (isspace(*p) || *p == '*' || *p == '?' || *p == '{' || *p == '\'') force_quotes = 1; else if (*p == '"') n++;...
{"cwe_details": {"ID": "703", "Name": "Improper Check or Handling of Exceptional Conditions", "Abstraction": "Pillar", "Structure": "Simple", "Status": "Incomplete", "Diagram": "/data/images/CWE-703-Diagram.png", "Description": "The product does not properly anticipate or handle exceptional conditions that rarely occur...
CWE-703
2748
true
njs_object_iterate_reverse(njs_vm_t *vm, njs_iterator_args_t *args, njs_iterator_handler_t handler) { double idx; int64_t i, from, to, length; njs_int_t ret; njs_array_t *array, *keys; njs_value_t *entry, *value, prop, character, string_obj; ...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2749
true
static int packet_set_ring(struct sock *sk, union tpacket_req_u *req_u, int closing, int tx_ring) { struct pgv *pg_vec = NULL; struct packet_sock *po = pkt_sk(sk); int was_running, order = 0; struct packet_ring_buffer *rb; struct sk_buff_head *rb_queue; __be16 num; int err = -EINVAL; /* Added to avoid minimal...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2750
true
static void coroutine_fn v9fs_xattrcreate(void *opaque) { int flags; int32_t fid; int64_t size; ssize_t err = 0; V9fsString name; size_t offset = 7; V9fsFidState *file_fidp; V9fsFidState *xattr_fidp; V9fsPDU *pdu = opaque; v9fs_string_init(&name); err = pdu_unmarshal(pdu, of...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2751
true
lspci_process(STREAM s) { unsigned int pkglen; static char *rest = NULL; char *buf; pkglen = s->end - s->p; /* str_handle_lines requires null terminated strings */ buf = xmalloc(pkglen + 1); STRNCPY(buf, (char *) s->p, pkglen + 1); str_handle_lines(buf, &rest, lspci_process_line, NULL); xfree(buf); }
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2752
true
static void launch(OpKernelContext* context, const TensorShape& tensor_in_shape, const Tensor& out_backprop, const std::array<int64, 3>& window, const std::array<int64, 3>& stride, const std::array<int64, 3>& outp...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2753
true
WM_SYMBOL midi *WildMidi_Open(const char *midifile) { uint8_t *mididata = NULL; uint32_t midisize = 0; uint8_t mus_hdr[] = { 'M', 'U', 'S', 0x1A }; uint8_t xmi_hdr[] = { 'F', 'O', 'R', 'M' }; midi * ret = NULL; if (!WM_Initialized) { _WM_GLOBAL_ERROR(__FUNCTION__, __LINE__, WM_ERR_NOT_I...
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi...
CWE-200
2754
true
static void slc_bump(struct slcan *sl) { struct sk_buff *skb; struct can_frame cf; int i, tmp; u32 tmpid; char *cmd = sl->rbuff; cf.can_id = 0; switch (*cmd) { case 'r': cf.can_id = CAN_RTR_FLAG; /* fallthrough */ case 't': /* store dlc ASCII value and terminate SFF CAN ID string */ cf.can_dlc = sl->...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2755
true
native_handle* Parcel::readNativeHandle() const { int numFds, numInts; status_t err; err = readInt32(&numFds); if (err != NO_ERROR) return 0; err = readInt32(&numInts); if (err != NO_ERROR) return 0; native_handle* h = native_handle_create(numFds, numInts); if (!h) { return 0; } for (int i=0...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2756
true
char *BN_bn2dec(const BIGNUM *a) { int i = 0, num, ok = 0; char *buf = NULL; char *p; BIGNUM *t = NULL; BN_ULONG *bn_data = NULL, *lp; int bn_data_num; /*- * get an upper bound for the length of the decimal integer * num <= (BN_num_bits(a) + 1) * log(2) * <= 3 * BN_num_bi...
{"cwe_details": {"ID": "415", "Name": "Double Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-415-Diagram.png", "Description": "The product calls free() twice on the same memory address.", "PotentialMitigations": [{"Phase": ["Architecture and Design"], "Descriptio...
CWE-415
2757
true
int blkcg_init_queue(struct request_queue *q) { struct blkcg_gq *new_blkg, *blkg; bool preloaded; int ret; new_blkg = blkg_alloc(&blkcg_root, q, GFP_KERNEL); if (!new_blkg) return -ENOMEM; preloaded = !radix_tree_preload(GFP_KERNEL); /* * Make sure the root blkg exists and count the existing blkgs. As ...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2758
true
do_bid_note(struct magic_set *ms, unsigned char *nbuf, uint32_t type, int swap __attribute__((__unused__)), uint32_t namesz, uint32_t descsz, size_t noff, size_t doff, int *flags) { if (namesz == 4 && strcmp((char *)&nbuf[noff], "GNU") == 0 && type == NT_GNU_BUILD_ID && (descsz >= 4 || descsz <= 20)) {...
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ...
CWE-190
2759
true
static MagickBooleanType WritePALMImage(const ImageInfo *image_info, Image *image,ExceptionInfo *exception) { MagickBooleanType status; MagickOffsetType currentOffset, offset, scene; MagickSizeType cc; PixelInfo transpix; QuantizeInfo *quantize_info; register ssize_t x...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2760
true
int main(int argc, char *argv[]) { GooString *fileName; UnicodeMap *uMap; GooString *ownerPW, *userPW; PDFDoc *doc; char uBuf[8]; char path[1024]; char *p; bool ok; int exitCode; GooList *embeddedFiles = nullptr; int nFiles, nPages, n, i, j; FileSpec *fileSpec; Page *page; Annots *annots; ...
{"cwe_details": {"ID": "415", "Name": "Double Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-415-Diagram.png", "Description": "The product calls free() twice on the same memory address.", "PotentialMitigations": [{"Phase": ["Architecture and Design"], "Descriptio...
CWE-415
2761
true
parse_codes(struct archive_read *a) { int i, j, val, n, r; unsigned char bitlengths[MAX_SYMBOLS], zerocount, ppmd_flags; unsigned int maxorder; struct huffman_code precode; struct rar *rar = (struct rar *)(a->format->data); struct rar_br *br = &(rar->br); free_codes(a); /* Skip to the next byte */ r...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2762
true
static int dev_get_valid_name(struct net *net, struct net_device *dev, const char *name) { BUG_ON(!net); if (!dev_valid_name(name)) return -EINVAL; if (strchr(name, '%')) return dev_alloc_name_ns(net, dev, name); else if (__dev_get_by_name(net, name)) return -EEXIST; else if (dev->name...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2763
true
static bool assoc_array_insert_into_terminal_node(struct assoc_array_edit *edit, const struct assoc_array_ops *ops, const void *index_key, struct assoc_array_walk_result *result) { struct assoc_array_shortcut *shortcut, *new_s0; struct assoc_array_node *node, *new_n0, *new_n1, *side; struct a...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2764
true
PHP_FUNCTION( msgfmt_parse_message ) { UChar *spattern = NULL; int spattern_len = 0; char *pattern = NULL; size_t pattern_len = 0; const char *slocale = NULL; size_t slocale_len = 0; char *source = NULL; size_t src_len = 0; MessageFormatter_object mf; MessageFormatter_o...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2765
true
void Compute(OpKernelContext* context) override { // Get inputs const Tensor& input_tensor = context->input(0); const auto input_tensor_flat = input_tensor.flat<int32>(); const Tensor& input_splits = context->input(1); const auto input_splits_flat = input_splits.flat<SPLITS_TYPE>(); // Since ...
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi...
CWE-200
2766
true
static __net_init int setup_net(struct net *net, struct user_namespace *user_ns) { /* Must be called with pernet_ops_rwsem held */ const struct pernet_operations *ops, *saved_ops; int error = 0; LIST_HEAD(net_exit_list); refcount_set(&net->count, 1); refcount_set(&net->passive, 1); net->dev_base_seq = 1; ...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2767
true
int megasas_alloc_cmds(struct megasas_instance *instance) { int i; int j; u16 max_cmd; struct megasas_cmd *cmd; max_cmd = instance->max_mfi_cmds; /* * instance->cmd_list is an array of struct megasas_cmd pointers. * Allocate the dynamic array first and then allocate individual * commands. */ instance->...
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi...
CWE-200
2768
true
static int diffie_hellman_sha256(LIBSSH2_SESSION *session, _libssh2_bn *g, _libssh2_bn *p, int group_order, unsigned char packet_type_init, unsigned char p...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2769
true
int zgfx_decompress(ZGFX_CONTEXT* zgfx, const BYTE* pSrcData, UINT32 SrcSize, BYTE** ppDstData, UINT32* pDstSize, UINT32 flags) { int status = -1; BYTE descriptor; wStream* stream = Stream_New((BYTE*)pSrcData, SrcSize); if (!stream) return -1; if (Stream_GetRemainingLength(stream) < 1...
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save...
CWE-416
2770
true
static int rm_read_multi(AVFormatContext *s, AVIOContext *pb, AVStream *st, char *mime) { int number_of_streams = avio_rb16(pb); int number_of_mdpr; int i, ret; unsigned size2; for (i = 0; i<number_of_streams; i++) avio_rb16(pb); number_of_mdpr = avio_rb16(pb); ...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2771
true
xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, int what, xmlChar end, xmlChar end2, xmlChar end3) { xmlChar *buffer = NULL; int buffer_size = 0; xmlChar *current = NULL; xmlChar *rep = NULL; const xmlChar *last; xmlEntityPtr ent; int c,l; int nbc...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2772
true
int udf_expand_file_adinicb(struct inode *inode) { struct page *page; char *kaddr; struct udf_inode_info *iinfo = UDF_I(inode); int err; WARN_ON_ONCE(!inode_is_locked(inode)); if (!iinfo->i_lenAlloc) { if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) iinfo->i_alloc_type = ICBTAG_FLAG_AD_SHORT; else...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2773
true
static gboolean prplcb_xfer_new_send_cb(gpointer data, gint fd, b_input_condition cond) { PurpleXfer *xfer = data; struct im_connection *ic = purple_ic_by_pa(xfer->account); struct prpl_xfer_data *px = xfer->ui_data; PurpleBuddy *buddy; const char *who; buddy = purple_find_buddy(xfer->account, xfer->who); who =...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2774
true
static int jpc_siz_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_siz_t *siz = &ms->parms.siz; unsigned int i; uint_fast8_t tmp; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (jpc_getuint16(in, &siz->caps) || jpc_getuint32(in, &siz->width) || jpc_get...
{"cwe_details": {"ID": "362", "Name": "Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-362-Diagram.png", "Description": "The product contains a concurrent code sequence that requi...
CWE-362
2775
true
static ssize_t n_tty_write(struct tty_struct *tty, struct file *file, const unsigned char *buf, size_t nr) { const unsigned char *b = buf; DECLARE_WAITQUEUE(wait, current); int c; ssize_t retval = 0; /* Job control check -- must be done at start (POSIX.1 7.1.1.4). */ if (L_TOSTOP(tty) && file->f_op->write ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2776
true
bgp_attr_print(netdissect_options *ndo, u_int atype, const u_char *pptr, u_int len) { int i; uint16_t af; uint8_t safi, snpa, nhlen; union { /* copy buffer for bandwidth values */ float f; uint32_t i; } bw; int advance; u_int tlen; const u_char *tptr; char b...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2777
true
GF_Err cat_multiple_files(GF_ISOFile *dest, char *fileName, u32 import_flags, Double force_fps, u32 frames_per_sample, char *tmp_dir, Bool force_cat, Bool align_timelines, Bool allow_add_in_command) { CATEnum cat_enum; char *sep; cat_enum.dest = dest; cat_enum.import_flags = import_flags; cat_enum.force_fps = for...
{"cwe_details": {"ID": "416", "Name": "Use After Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-416-Diagram.png", "Description": "The product reuses or references memory after it has been freed. At some point afterward, the memory may be allocated again and save...
CWE-416
2778
true
updateDevice(const struct header * headers, time_t t) { struct device ** pp = &devlist; struct device * p = *pp; /* = devlist; */ while(p) { if( p->headers[HEADER_NT].l == headers[HEADER_NT].l && (0==memcmp(p->headers[HEADER_NT].p, headers[HEADER_NT].p, headers[HEADER_NT].l)) && p->headers[HEADER_USN].l ...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2779
true
_eddsa_hash (const struct ecc_modulo *m, mp_limb_t *rp, size_t digest_size, const uint8_t *digest) { mp_size_t nlimbs = (8*digest_size + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS; mpn_set_base256_le (rp, nlimbs, digest, digest_size); if (nlimbs > 2*m->size) { /* Special case for Ed448: reduce rp to 2*m...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2780
true
int read_image_tga( gdIOCtx *ctx, oTga *tga ) { int pixel_block_size = (tga->bits / 8); int image_block_size = (tga->width * tga->height) * pixel_block_size; int* decompression_buffer = NULL; unsigned char* conversion_buffer = NULL; int buffer_caret = 0; int bitmap_caret = 0; int i = 0; int encoded_pixels; int...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2781
true
WORD32 ih264d_decode_gaps_in_frame_num(dec_struct_t *ps_dec, UWORD16 u2_frame_num) { UWORD32 u4_next_frm_num, u4_start_frm_num; UWORD32 u4_max_frm_num; pocstruct_t s_tmp_poc; WORD32 i4_poc; dec_slice_params_t *ps_cur_slice; dec_pic_params_t *ps_pic_params; WORD...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2782
true
int udf_expand_file_adinicb(struct inode *inode) { struct page *page; char *kaddr; struct udf_inode_info *iinfo = UDF_I(inode); int err; struct writeback_control udf_wbc = { .sync_mode = WB_SYNC_NONE, .nr_to_write = 1, }; WARN_ON_ONCE(!inode_is_locked(inode)); if (!iinfo->i_lenAlloc) { if (UDF_QUERY_FLAG...
{"cwe_details": {"ID": "476", "Name": "NULL Pointer Dereference", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-476-Diagram.png", "Description": "The product dereferences a pointer that it expects to be valid but is NULL.", "PotentialMitigations": [{"Phase": ["Implementa...
CWE-476
2783
true
static void drop_sysctl_table(struct ctl_table_header *header) { struct ctl_dir *parent = header->parent; if (--header->nreg) return; if (parent) put_links(header); start_unregistering(header); if (!--header->count) kfree_rcu(header, rcu); if (parent) drop_sysctl_table(&parent->header); }
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2784
true
char *VDir::MapPathA(const char *pInName) { /* * possiblities -- relative path or absolute path with or without drive letter * OR UNC name */ char szBuffer[(MAX_PATH+1)*2]; char szlBuf[MAX_PATH+1]; int length = strlen(pInName); if (!length) return (char*)pInName; if (length > MAX...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2785
true
snmp_ber_decode_string_len_buffer(unsigned char *buf, uint32_t *buff_len, const char **str, uint32_t *length) { uint8_t type, i, length_bytes; buf = snmp_ber_decode_type(buf, buff_len, &type); if(buf == NULL || type != BER_DATA_TYPE_OCTET_STRING) { /* * Sanity check * Invalid type in buffer *...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2786
true
static void iriap_getvaluebyclass_indication(struct iriap_cb *self, struct sk_buff *skb) { struct ias_object *obj; struct ias_attrib *attrib; int name_len; int attr_len; char name[IAS_MAX_CLASSNAME + 1]; /* 60 bytes */ char attr[IAS_MAX_ATTRIBNAME + 1]; /* 60 bytes */ __u8 *fp; int n; IRDA_DEBUG(4, ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2787
true
static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { const char *option; float *chromaticity, x_position, y_position, x_resolution, y_resolution; Image *image; int tiff_status; MagickBooleanType status; MagickSizeType number_pixe...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2788
true
int lgff_init(struct hid_device* hid) { struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); struct input_dev *dev = hidinput->input; const signed short *ff_bits = ff_joystick; int error; int i; /* Check that the report looks ok */ if (!hid_validate_values(hid, HID_OUTPUT_REPORT, 0...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2789
true
static int kwajd_read_headers(struct mspack_system *sys, struct mspack_file *fh, struct mskwajd_header *hdr) { unsigned char buf[16]; int i; /* read in the header */ if (sys->read(fh, &buf[0], kwajh_SIZEOF) != kwajh_SIZEOF) { return MSPACK_ERR_READ; } /* check for "KWAJ" sig...
{"cwe_details": {"ID": "787", "Name": "Out-of-bounds Write", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-787-Diagram.png", "Description": "The product writes data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Requi...
CWE-787
2790
true
static int check_nonce(request_rec *r, digest_header_rec *resp, const digest_config_rec *conf) { apr_time_t dt; time_rec nonce_time; char tmp, hash[NONCE_HASH_LEN+1]; if (strlen(resp->nonce) != NONCE_LEN) { ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01775) ...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2791
true
static int set_geometry(unsigned int cmd, struct floppy_struct *g, int drive, int type, struct block_device *bdev) { int cnt; /* sanity checking for parameters. */ if (g->sect <= 0 || g->head <= 0 || /* check for zero in F_SECT_PER_TRACK */ (unsigned char)((g->sect << 2) >> FD_SIZECODE...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2792
true
static Image *ReadTIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { const char *option; float *chromaticity, x_position, y_position, x_resolution, y_resolution; Image *image; int tiff_status; MagickBooleanType status; MagickSizeType number_pixe...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2793
true
static BlockAIOCB *iscsi_aio_ioctl(BlockDriverState *bs, unsigned long int req, void *buf, BlockCompletionFunc *cb, void *opaque) { IscsiLun *iscsilun = bs->opaque; struct iscsi_context *iscsi = iscsilun->iscsi; struct iscsi_data data; IscsiAIOCB *acb; acb = qemu_aio_get(&iscsi_aioc...
{"cwe_details": {"ID": "125", "Name": "Out-of-bounds Read", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-125-Diagram.png", "Description": "The product reads data past the end, or before the beginning, of the intended buffer.", "PotentialMitigations": [{"Phase": ["Impleme...
CWE-125
2794
true
static void gx_ttfReader__Read(ttfReader *self, void *p, int n) { gx_ttfReader *r = (gx_ttfReader *)self; const byte *q; if (!r->error) { if (r->extra_glyph_index != -1) { q = r->glyph_data.bits.data + r->pos; r->error = (r->glyph_data.bits.size - r->pos < n ? ...
{"cwe_details": {"ID": "20", "Name": "Improper Input Validation", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-20-Diagram.png", "Description": "The product receives input or data, but it does\n not validate or incorrectly validates that the input has the\n ...
CWE-20
2795
true
static void WriteTo8BimProfile(Image *image,const char *name, const StringInfo *profile) { const unsigned char *datum, *q; register const unsigned char *p; size_t length; StringInfo *profile_8bim; ssize_t count; unsigned char length_byte; unsigned int value; unsi...
{"cwe_details": {"ID": "190", "Name": "Integer Overflow or Wraparound", "Abstraction": "Base", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-190-Diagram.png", "Description": "The product performs a calculation that can\n produce an integer overflow or wraparound when the logic\n ...
CWE-190
2796
true
jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend) { jas_matrix_t *matrix; assert(xstart <= xend && ystart <= yend); if (!(matrix = jas_matrix_create(yend - ystart, xend - xstart))) { return 0; } matrix->xstart_ = xstart; matrix->ystart_ = ystart; matrix->xend_ = xend; matrix->yend_...
{"cwe_details": {"ID": "415", "Name": "Double Free", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-415-Diagram.png", "Description": "The product calls free() twice on the same memory address.", "PotentialMitigations": [{"Phase": ["Architecture and Design"], "Descriptio...
CWE-415
2797
true
const char * util_acl_to_str(const sc_acl_entry_t *e) { static char line[80], buf[20]; unsigned int acl; if (e == NULL) return "N/A"; line[0] = 0; while (e != NULL) { acl = e->method; switch (acl) { case SC_AC_UNKNOWN: return "N/A"; case SC_AC_NEVER: return "NEVR"; case SC_AC_NONE: return "N...
{"cwe_details": {"ID": "200", "Name": "Exposure of Sensitive Information to an Unauthorized Actor", "Abstraction": "Class", "Structure": "Simple", "Status": "Draft", "Description": "The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.", "PotentialMi...
CWE-200
2798
true
ecc_decrypt_raw (gcry_sexp_t *r_plain, gcry_sexp_t s_data, gcry_sexp_t keyparms) { unsigned int nbits; gpg_err_code_t rc; struct pk_encoding_ctx ctx; gcry_sexp_t l1 = NULL; gcry_mpi_t data_e = NULL; ECC_secret_key sk; gcry_mpi_t mpi_g = NULL; char *curvename = NULL; mpi_ec_t ec = NULL; mpi_point_str...
{"cwe_details": {"ID": "119", "Name": "Improper Restriction of Operations within the Bounds of a Memory Buffer", "Abstraction": "Class", "Structure": "Simple", "Status": "Stable", "Diagram": "/data/images/CWE-119-Diagram.png", "Description": "The product performs operations on a memory buffer, but it reads from or writ...
CWE-119
2799
true
static void calc_coeff(double mu[4], const int index[4], int prefilter, double r2, double mul) { double mul2 = mul * mul, mul3 = mul2 * mul; double kernel[] = { (5204 + 2520 * mul + 1092 * mul2 + 3280 * mul3) / 12096, (2943 - 210 * mul - 273 * mul2 - 2460 * mul3) / 12096, ( 486 - 924 ...