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": "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 | 2400 | true | void WebPImage::decodeChunks(uint64_t filesize)
{
DataBuf chunkId(5);
byte size_buff[WEBP_TAG_SIZE];
bool has_canvas_data = false;
#ifdef DEBUG
std::cout << "Reading metadata" << std::endl;
#endif
chunkId.pData_[4] = '\0' ;
while ( !io_->eof() && (ui... | |
{"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 | 2401 | true | p11_rpc_buffer_get_byte_array (p11_buffer *buf,
size_t *offset,
const unsigned char **data,
size_t *length)
{
size_t off = *offset;
uint32_t len;
if (!p11_rpc_buffer_get_uint32 (buf, &off, &len))
return false;
if (len == ... | |
{"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 | 2402 | true | static int logi_dj_ll_raw_request(struct hid_device *hid,
unsigned char reportnum, __u8 *buf,
size_t count, unsigned char report_type,
int reqtype)
{
struct dj_device *djdev = hid->driver_data;
struct dj_receiver_dev *djrcv_dev = djdev->dj_receiver_dev;
u8 *out_buf;
int ret;
if (buf[0] != REPORT... | |
{"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 | 2403 | true | build_model(XML_Parser parser) {
DTD *const dtd = parser->m_dtd; /* save one level of indirection */
XML_Content *ret;
XML_Content *cpos;
XML_Char *str;
/* Detect and prevent integer overflow.
* The preprocessor guard addresses the "always false" warning
* from -Wtype-limits on platforms where
* siz... | |
{"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 | 2404 | true | static int b_unpack (lua_State *L) {
Header h;
const char *fmt = luaL_checkstring(L, 1);
size_t ld;
const char *data = luaL_checklstring(L, 2, &ld);
size_t pos = luaL_optinteger(L, 3, 1) - 1;
int n = 0; /* number of results */
defaultoptions(&h);
while (*fmt) {
int opt = *fmt++;
size_t ... | |
{"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 | 2405 | true | ikev1_id_print(netdissect_options *ndo, u_char tpay _U_,
const struct isakmp_gen *ext, u_int item_len,
const u_char *ep _U_, uint32_t phase, uint32_t doi _U_,
uint32_t proto _U_, int depth _U_)
{
#define USE_IPSECDOI_IN_PHASE1 1
const struct ikev1_pl_id *p;
struct ikev1_pl_id id;
static const... | |
{"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 | 2406 | true | mrb_vm_exec(mrb_state *mrb, struct RProc *proc, mrb_code *pc)
{
/* mrb_assert(mrb_proc_cfunc_p(proc)) */
mrb_irep *irep = proc->body.irep;
mrb_value *pool = irep->pool;
mrb_sym *syms = irep->syms;
mrb_code i;
int ai = mrb_gc_arena_save(mrb);
struct mrb_jmpbuf *prev_jmp = mrb->jmp;
struct mrb_jmpbuf c_jm... | |
{"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 | 2407 | true | size_t compile_tree(struct filter_op **fop)
{
int i = 1;
struct filter_op *array = NULL;
struct unfold_elm *ue;
BUG_IF(tree_root == NULL);
fprintf(stdout, " Unfolding the meta-tree ");
fflush(stdout);
/* start the recursion on the tree */
unfold_blk(&tree_root);
fprintf(stdou... | |
{"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 | 2408 | true | static inline void native_set_ldt(const void *addr, unsigned int entries)
{
if (likely(entries == 0))
asm volatile("lldt %w0"::"q" (0));
else {
unsigned cpu = smp_processor_id();
ldt_desc ldt;
set_tssldt_descriptor(&ldt, (unsigned long)addr,
DESC_LDT, entries * sizeof(ldt) - 1);
write_gdt_entry(g... | |
{"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 | 2409 | true | struct se_portal_group *tcm_loop_make_naa_tpg(
struct se_wwn *wwn,
struct config_group *group,
const char *name)
{
struct tcm_loop_hba *tl_hba = container_of(wwn,
struct tcm_loop_hba, tl_hba_wwn);
struct tcm_loop_tpg *tl_tpg;
char *tpgt_str, *end_ptr;
int ret;
unsigned short int tpgt;
tpgt_str = strstr(nam... | |
{"cwe_details": {"ID": "401", "Name": "Missing Release of Memory after Effective Lifetime", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-401-Diagram.png", "Description": "The product does not sufficiently track and release allocated memory after it has been used, maki... | CWE-401 | 2410 | true | con_insert_unipair(struct uni_pagedir *p, u_short unicode, u_short fontpos)
{
int i, n;
u16 **p1, *p2;
p1 = p->uni_pgdir[n = unicode >> 11];
if (!p1) {
p1 = p->uni_pgdir[n] = kmalloc_array(32, sizeof(u16 *),
GFP_KERNEL);
if (!p1) return -ENOMEM;
for (i = 0; i < 32; i++)
p1[i] = NULL;
}
p2 = ... | |
{"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 | 2411 | true | evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *outlen)
{
int port;
char buf[128];
const char *cp, *addr_part, *port_part;
int is_ipv6;
/* recognized formats are:
* [ipv6]:port
* ipv6
* [ipv6]
* ipv4:port
* ipv4
*/
cp = strchr(ip_as_string, ':');
if (*ip_as_string ... | |
{"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 | 2412 | true | static int hmac_create(struct crypto_template *tmpl, struct rtattr **tb)
{
struct shash_instance *inst;
struct crypto_alg *alg;
struct shash_alg *salg;
int err;
int ds;
int ss;
err = crypto_check_attr_type(tb, CRYPTO_ALG_TYPE_SHASH);
if (err)
return err;
salg = shash_attr_alg(tb[1], 0, 0);
if (IS_ERR(sa... | |
{"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 | 2413 | true | void CLASS parse_minolta(int base)
{
int save, tag, len, offset, high = 0, wide = 0, i, c;
short sorder = order;
fseek(ifp, base, SEEK_SET);
if (fgetc(ifp) || fgetc(ifp) - 'M' || fgetc(ifp) - 'R')
return;
order = fgetc(ifp) * 0x101;
offset = base + get4() + 8;
while ((save = ftell(ifp)) < offset)
{... | |
{"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 | 2414 | true | static int dmg_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVDMGState *s = bs->opaque;
uint64_t info_begin, info_end, last_in_offset, last_out_offset;
uint32_t count, tmp;
uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;
int64_t offset;
... | |
{"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 | 2415 | true | inline Status SparseTensor::Split(const SparseTensor& input_tensor,
const int split_dim, const int num_split,
std::vector<SparseTensor>* result) {
std::vector<Tensor> output_indices;
std::vector<Tensor> output_values;
std::vector<TensorShape> out... | |
{"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 | 2416 | true | int git_delta_apply(
void **out,
size_t *out_len,
const unsigned char *base,
size_t base_len,
const unsigned char *delta,
size_t delta_len)
{
const unsigned char *delta_end = delta + delta_len;
size_t base_sz, res_sz, alloc_sz;
unsigned char *res_dp;
*out = NULL;
*out_len = 0;
/* Check that the base si... | |
{"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": "imageworsener", "commit_message": "Fixed a GIF decoding bug (divide by zero)\n\nFixes issue #15", "cve": "CVE-2017-... | CWE-369 | 2417 | true | static int iwgif_read_image(struct iwgifrcontext *rctx)
{
int retval=0;
struct lzwdeccontext d;
size_t subblocksize;
int has_local_ct;
int local_ct_size;
unsigned int root_codesize;
if(!iwgif_read(rctx,rctx->rbuf,9)) goto done;
rctx->image_left = (int)iw_get_ui16le(&rctx->rbuf[0]);
rctx->image_top = (int)iw... | |
{"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 | 2418 | true | tiff12_print_page(gx_device_printer * pdev, gp_file * file)
{
gx_device_tiff *const tfdev = (gx_device_tiff *)pdev;
int code;
/* open the TIFF device */
if (gdev_prn_file_is_new(pdev)) {
tfdev->tif = tiff_from_filep(pdev, pdev->dname, file, tfdev->BigEndian, tfdev->UseBigTIFF);
if (!tfd... | |
{"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 | 2419 | true | xps_load_sfnt_name(xps_font_t *font, char *namep)
{
byte *namedata;
int offset, length;
/*int format;*/
int count, stringoffset;
int found;
int i, k;
found = 0;
strcpy(namep, "Unknown");
offset = xps_find_sfnt_table(font, "name", &length);
if (offset < 0 || length < 6)
{
... | |
{"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 | 2420 | true | void ndpi_search_h323(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow)
{
struct ndpi_packet_struct *packet = &flow->packet;
u_int16_t dport = 0, sport = 0;
NDPI_LOG_DBG(ndpi_struct, "search H323\n");
/*
The TPKT protocol is used by ISO 8072 (on port 102)
and H.323. So t... | |
{"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 | 2421 | true | xps_load_sfnt_name(xps_font_t *font, char *namep)
{
byte *namedata;
int offset, length;
/*int format;*/
int count, stringoffset;
int found;
int i, k;
found = 0;
strcpy(namep, "Unknown");
offset = xps_find_sfnt_table(font, "name", &length);
if (offset < 0 || length < 6)
{
... | |
{"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 | 2422 | true | MagickExport Image *ComplexImages(const Image *images,const ComplexOperator op,
ExceptionInfo *exception)
{
#define ComplexImageTag "Complex/Image"
CacheView
*Ai_view,
*Ar_view,
*Bi_view,
*Br_view,
*Ci_view,
*Cr_view;
const char
*artifact;
const Image
*Ai_image,
*Ar_image... | |
{"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 | 2423 | true | main(int argc, char* argv[])
{
uint32 rowsperstrip = (uint32) -1;
TIFF *in, *out;
uint32 w, h;
uint16 samplesperpixel;
uint16 bitspersample;
uint16 config;
uint16 photometric;
uint16* red;
uint16* green;
uint16* blue;
tsize_t rowsize;
register uint32 row;
register tsample_t s;
unsigned char *inbuf, *outbu... | |
{"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 | 2424 | true | SECURITY_STATUS ntlm_read_ChallengeMessage(NTLM_CONTEXT* context, PSecBuffer buffer)
{
wStream* s;
int length;
PBYTE StartOffset;
PBYTE PayloadOffset;
NTLM_AV_PAIR* AvTimestamp;
NTLM_CHALLENGE_MESSAGE* message;
ntlm_generate_client_challenge(context);
message = &context->CHALLENGE_MESSAGE;
ZeroMemory(message, ... | |
{"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": "ImageMagick6", "commit_message": "https://github.com/ImageMagick/ImageMagick/issues/1629", "cve": "CVE-2019-13454",... | CWE-369 | 2425 | true | MagickExport void RemoveDuplicateLayers(Image **images,
ExceptionInfo *exception)
{
register Image
*curr,
*next;
RectangleInfo
bounds;
assert((*images) != (const Image *) NULL);
assert((*images)->signature == MagickCoreSignature);
if ((*images)->debug != MagickFalse)
(void) LogMag... | |
{"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 | 2426 | true | static RList *symbols(RBinFile *bf) {
RList *res = r_list_newf ((RListFree)r_bin_symbol_free);
r_return_val_if_fail (res && bf->o && bf->o->bin_obj, res);
RCoreSymCacheElement *element = bf->o->bin_obj;
size_t i;
HtUU *hash = ht_uu_new0 ();
if (!hash) {
return res;
}
bool found = false;
for (i = 0; i < eleme... | |
{"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 | 2427 | true | static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
colorspace[MaxTextExtent],
text[MaxTextExtent];
Image
*image;
IndexPacket
*indexes;
long
x_offset,
y_offset;
MagickBooleanType
status;
MagickPixelPacket
pixel;
QuantumAny
range... | |
{"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 | 2428 | true | static int cac_get_serial_nr_from_CUID(sc_card_t* card, sc_serial_number_t* serial)
{
cac_private_data_t * priv = CAC_DATA(card);
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_NORMAL);
if (card->serialnr.len) {
*serial = card->serialnr;
SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL... | |
{"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 | 2429 | true | static int acpi_smbus_hc_add(struct acpi_device *device)
{
int status;
unsigned long long val;
struct acpi_smb_hc *hc;
if (!device)
return -EINVAL;
status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val);
if (ACPI_FAILURE(status)) {
printk(KERN_ERR PREFIX "error obtaining _EC.\n");
return -EIO;
... | |
{"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 | 2430 | true | static int sc_pkcs15emu_gemsafeGPK_init(sc_pkcs15_card_t *p15card)
{
const cdata certs[] = {
{"User certificate",0, "","1", 0},
{NULL, 0, NULL, NULL, 0}
};
const pindata pins[] = {
{ "01", "pin", "3F000200", 0x00,
SC_PKCS15_PIN_TYPE_ASCII_NUMERIC,
8, 4, 8, SC_PKCS15_PIN_FLAG_NEEDS_PADDING |
SC_PKC... | |
{"cwe_details": {"ID": "401", "Name": "Missing Release of Memory after Effective Lifetime", "Abstraction": "Variant", "Structure": "Simple", "Status": "Draft", "Diagram": "/data/images/CWE-401-Diagram.png", "Description": "The product does not sufficiently track and release allocated memory after it has been used, maki... | CWE-401 | 2431 | true | int MirrorJob::Do()
{
int res;
int m=STALL;
FileInfo *file;
Job *j;
switch(state)
{
case(INITIAL_STATE):
remove_this_source_dir=(remove_source_dirs && source_dir.last_char()!='/');
if(!strcmp(target_dir,".") || !strcmp(target_dir,"..") || (FlagSet(SCAN_ALL_FIRST) && parent_mirror)... | |
{"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 | 2432 | true | static int MqttClient_WaitType(MqttClient *client, void *packet_obj,
byte wait_type, word16 wait_packet_id, int timeout_ms)
{
int rc;
word16 packet_id;
MqttPacketType packet_type;
#ifdef WOLFMQTT_MULTITHREAD
MqttPendResp *pendResp;
int readLocked;
#endif
MqttMsgStat* mms_stat;
int waitMa... | |
{"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 | 2433 | true | int read_escaped_char(
yyscan_t yyscanner,
uint8_t* escaped_char)
{
char text[4] = {0, 0, 0, 0};
text[0] = '\\';
text[1] = RE_YY_INPUT(yyscanner);
if (text[1] == EOF)
return 0;
if (text[1] == 'x')
{
text[2] = RE_YY_INPUT(yyscanner);
if (text[2] == EOF)
return 0;
... | |
{"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 | 2434 | true | sixel_dither_new(
sixel_dither_t /* out */ **ppdither, /* dither object to be created */
int /* in */ ncolors, /* required colors */
sixel_allocator_t /* in */ *allocator) /* allocator, null if you use
default allocator */
{
SIXELSTATU... | |
{"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 | 2435 | true | int rsa_verify_hash_ex(const unsigned char *sig, unsigned long siglen,
const unsigned char *hash, unsigned long hashlen,
int padding,
int hash_idx, unsigned long saltlen,
int ... | |
{"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 | 2436 | true | static void esp_do_dma(ESPState *s)
{
uint32_t len, cmdlen;
int to_device = ((s->rregs[ESP_RSTAT] & 7) == STAT_DO);
uint8_t buf[ESP_CMDFIFO_SZ];
len = esp_get_tc(s);
if (s->do_cmd) {
/*
* handle_ti_cmd() case: esp_do_dma() is called only from
* handle_ti_cmd() with do_cmd ... | |
{"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 | 2437 | true | void jsP_dumpsyntax(js_State *J, js_Ast *prog, int dominify)
{
minify = dominify;
if (prog->type == AST_LIST)
pstmlist(-1, prog);
else {
pstm(0, prog);
nl();
}
if (minify > 1)
putchar('\n');
} | |
{"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 | 2438 | true | bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src,
struct kvm_lapic_irq *irq, int *r, struct dest_map *dest_map)
{
struct kvm_apic_map *map;
unsigned long bitmap;
struct kvm_lapic **dst = NULL;
int i;
bool ret;
*r = -1;
if (irq->shorthand == APIC_DEST_SELF) {
*r = kvm_apic_set_irq(s... | |
{"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 | 2439 | true | int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len)
{
struct qrtr_node *node = ep->node;
const struct qrtr_hdr_v1 *v1;
const struct qrtr_hdr_v2 *v2;
struct qrtr_sock *ipc;
struct sk_buff *skb;
struct qrtr_cb *cb;
size_t size;
unsigned int ver;
size_t hdrlen;
if (len == 0 || len & 3... | |
{"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 | 2440 | true | static void http_manage_server_side_cookies(struct stream *s, struct channel *res)
{
struct session *sess = s->sess;
struct http_txn *txn = s->txn;
struct htx *htx;
struct http_hdr_ctx ctx;
struct server *srv;
char *hdr_beg, *hdr_end;
char *prev, *att_beg, *att_end, *equal, *val_beg, *val_end, *next;
int is_coo... | |
{"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": "Fix overflow CHECK issue with `tf.raw_ops.AddManySparseToTensorsMap`.\n\nPiperOrigi... | CWE-369 | 2441 | true | void Compute(OpKernelContext* context) override {
const Tensor* input_indices;
const Tensor* input_values;
const Tensor* input_shape;
SparseTensorsMap* map;
OP_REQUIRES_OK(context, context->input("sparse_indices", &input_indices));
OP_REQUIRES_OK(context, context->input("sparse_values", &inpu... | |
{"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 | 2442 | true | grub_ext2_read_block (grub_fshelp_node_t node, grub_disk_addr_t fileblock)
{
struct grub_ext2_data *data = node->data;
struct grub_ext2_inode *inode = &node->inode;
grub_disk_addr_t blknr = -1;
unsigned int blksz = EXT2_BLOCK_SIZE (data);
int log2_blksz = LOG2_EXT2_BLOCK_SIZE (data);
if (inode->flags & gru... | |
{"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 | 2443 | true | static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
{
#define WriteRunlengthPacket(image,pixel,length,p) \
{ \
if ((image->matte != MagickFalse) && (length != 0) &&\
(GetPixelOpacity(p) == (Quantum) TransparentOpacity)) \
{ \
q=PopHexPixel(hex_digits,0xff,q); \
q=PopH... | |
{"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": "ImageMagick", "commit_message": "possible divide by zero + clear buffers", "cve": "CVE-2021-20311", "cve_desc": "A ... | CWE-369 | 2444 | true | static MagickBooleanType sRGBTransformImage(Image *image,
const ColorspaceType colorspace,ExceptionInfo *exception)
{
#define sRGBTransformImageTag "RGBTransform/Image"
CacheView
*image_view;
MagickBooleanType
status;
MagickOffsetType
progress;
PrimaryInfo
primary_info;
ssize_t
i;
... | |
{"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 | 2445 | true | lprn_is_black(gx_device_printer * pdev, int r, int h, int bx)
{
gx_device_lprn *const lprn = (gx_device_lprn *) pdev;
int bh = lprn->nBh;
int bpl = gdev_mem_bytes_per_scan_line(pdev);
int x, y, y0;
byte *p;
int maxY = lprn->BlockLine / lprn->nBh * lprn->nBh;
y0 = (r + h - bh) % maxY;
f... | |
{"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 | 2446 | true | bool TextAutosizer::processSubtree(RenderObject* layoutRoot)
{
if (!m_document->settings() || !m_document->settings()->textAutosizingEnabled() || layoutRoot->view()->printing() || !m_document->page())
return false;
Frame* mainFrame = m_document->page()->mainFrame();
TextAutosizingWindowInfo window... | |
{"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 | 2447 | true | static size_t WritePSDChannel(const PSDInfo *psd_info,
const ImageInfo *image_info,Image *image,Image *next_image,
const QuantumType quantum_type, unsigned char *compact_pixels,
MagickOffsetType size_offset,const MagickBooleanType separate,
ExceptionInfo *exception)
{
int
y;
MagickBooleanType
monoc... | |
{"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 | 2448 | true | static int l2tp_ip_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
size_t len, int noblock, int flags, int *addr_len)
{
struct inet_sock *inet = inet_sk(sk);
size_t copied = 0;
int err = -EOPNOTSUPP;
struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;
struct sk_buff *skb;
if (f... | |
{"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 | 2449 | true | OGRKMLLayer::OGRKMLLayer( const char * pszName,
OGRSpatialReference *poSRSIn, bool bWriterIn,
OGRwkbGeometryType eReqType,
OGRKMLDataSource *poDSIn ) :
poDS_(poDSIn),
poSRS_(poSRSIn ? new OGRSpatialReference(nullptr) : nullptr),
p... | |
{"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 | 2450 | 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_getuint32... | |
{"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 | 2451 | true | SPL_METHOD(SplDoublyLinkedList, unserialize)
{
spl_dllist_object *intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
zval *flags, *elem;
char *buf;
int buf_len;
const unsigned char *p, *s;
php_unserialize_data_t var_hash;
if (zend_parse_parameters(ZEND_NUM_AR... | |
{"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 | 2452 | true | ConnectClientToUnixSock(const char *sockFile)
{
#ifdef WIN32
rfbClientErr("Windows doesn't support UNIX sockets\n");
return -1;
#else
int sock;
struct sockaddr_un addr;
addr.sun_family = AF_UNIX;
strcpy(addr.sun_path, sockFile);
sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
rfbClientErr("... | |
{"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 | 2453 | true | isakmp_rfc3948_print(netdissect_options *ndo,
const u_char *bp, u_int length,
const u_char *bp2)
{
if(length == 1 && bp[0]==0xff) {
ND_PRINT((ndo, "isakmp-nat-keep-alive"));
return;
}
if(length < 4) {
goto trunc;
}
/*
* see if this is an IKE packet
*/
if(bp[0]==0 && bp[1]==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 | 2454 | true | inline bool SegmentReader::containsInterval(const void* from, const void* to) {
return from >= this->ptr.begin() && to <= this->ptr.end() && from <= to &&
readLimiter->canRead(
intervalLength(reinterpret_cast<const byte*>(from),
reinterpret_cast<const byte*>(to),
... | |
{"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 | 2455 | true | create_worker_threads(uint n)
{
comp_thread_ctxt_t *threads;
uint i;
threads = (comp_thread_ctxt_t *)
my_malloc(sizeof(comp_thread_ctxt_t) * n, MYF(MY_FAE));
for (i = 0; i < n; i++) {
comp_thread_ctxt_t *thd = threads + i;
thd->num = i + 1;
thd->started = FALSE;
thd->cancelled = FALSE;
thd->data_a... | |
{"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 | 2456 | true | static MagickBooleanType IsWEBPImageLossless(const unsigned char *stream,
const size_t length)
{
#define VP8_CHUNK_INDEX 15
#define LOSSLESS_FLAG 'L'
#define EXTENDED_HEADER 'X'
#define VP8_CHUNK_HEADER "VP8"
#define VP8_CHUNK_HEADER_SIZE 3
#define RIFF_HEADER_SIZE 12
#define VP8X_CHUNK_SIZE 10
#define TAG_SIZ... | |
{"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 a division by 0 in division ops.\n\nPiperOrigin-RevId: 385223169\nChange-Id... | CWE-369 | 2457 | true | TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLiteDivParams*>(node->builtin_data);
OpData* data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* input1;
TF_LITE_ENSURE_OK(context,
GetInputSafe(context, node, kInputTensor1, &... | |
{"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 | 2458 | true | print_attr_string(netdissect_options *ndo,
register const u_char *data, u_int length, u_short attr_code)
{
register u_int i;
ND_TCHECK2(data[0],length);
switch(attr_code)
{
case TUNNEL_PASS:
if (length < 3)
{
ND_PRINT((ndo, "%s", tstr));
... | |
{"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 | 2459 | true | void PSIR_FileWriter::ParseFileResources ( XMP_IO* fileRef, XMP_Uns32 length )
{
static const size_t kMinPSIRSize = 12; // 4+2+1+1+4
this->DeleteExistingInfo();
this->fileParsed = true;
if ( length == 0 ) return;
XMP_Int64 psirOrigin = fileRef->Offset(); // Need this to determine the resource data offsets.... | |
{"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 | 2460 | true | fmtfloat(double value, char type, int forcesign, int leftjust,
int minlen, int zpad, int precision, int pointflag,
PrintfTarget *target)
{
int signvalue = 0;
int vallen;
char fmt[32];
char convert[512];
int padlen = 0; /* amount to pad */
/* we rely on regular C library's sprintf to do the basic c... | |
{"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 | 2461 | true | lldp_private_8023_print(netdissect_options *ndo,
const u_char *tptr, u_int tlv_len)
{
int subtype, hexdump = FALSE;
if (tlv_len < 4) {
return hexdump;
}
subtype = *(tptr+3);
ND_PRINT((ndo, "\n\t %s Subtype (%u)",
tok2str(lldp_8023_subtype_values, "unknow... | |
{"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 | 2462 | true | cff_parser_run( CFF_Parser parser,
FT_Byte* start,
FT_Byte* limit )
{
FT_Byte* p = start;
FT_Error error = FT_Err_Ok;
FT_Library library = parser->library;
FT_UNUSED( library );
parser->top = parser->stack;
parser->start = start... | |
{"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 | 2463 | true | INST_HANDLER (lds) { // LDS Rd, k
int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 0x1) << 4);
int k = (buf[3] << 8) | buf[2];
op->ptr = k;
__generic_ld_st (op, "ram", 0, 1, 0, k, 0);
ESIL_A ("r%d,=,", d);
}
| |
{"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 | 2464 | true | static void gf_m2ts_process_pmt(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *pmt, GF_List *sections, u8 table_id, u16 ex_table_id, u8 version_number, u8 last_section_number, u32 status)
{
u32 info_length, pos, desc_len, evt_type, nb_es,i;
u32 nb_sections;
u32 data_size;
u32 nb_hevc, nb_hevc_temp, nb_shvc, nb_shvc_temp,... | |
{"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 | 2465 | true | static int _expand_arg(pam_handle_t *pamh, char **value)
{
const char *orig=*value, *tmpptr=NULL;
char *ptr; /*
* Sure would be nice to use tmpptr but it needs to be
* a constant so that the compiler will shut up when I
* call pam_getenv and _pam_get_item_byname -- sigh
*/
/* No une... | |
{"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 | 2466 | true | static int ssl_parse_client_psk_identity( mbedtls_ssl_context *ssl, unsigned char **p,
const unsigned char *end )
{
int ret = 0;
size_t n;
if( ssl->conf->f_psk == NULL &&
( ssl->conf->psk == NULL || ssl->conf->psk_identity == NULL ||
ssl->conf->ps... | |
{"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 | 2467 | true | static inline int fpregs_state_valid(struct fpu *fpu, unsigned int cpu)
{
return fpu == this_cpu_read_stable(fpu_fpregs_owner_ctx) && cpu == fpu->last_cpu;
} | |
{"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 | 2468 | true | static int mp_get_count(struct sb_uart_state *state, struct serial_icounter_struct *icnt)
{
struct serial_icounter_struct icount;
struct sb_uart_icount cnow;
struct sb_uart_port *port = state->port;
spin_lock_irq(&port->lock);
memcpy(&cnow, &port->icount, sizeof(struct sb_uart_icount));
spin_unlock_irq(&por... | |
{"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 | 2469 | true | void Compute(OpKernelContext* context) override {
const Tensor& x = context->input(0);
const Tensor& y = context->input(1);
const float min_x = context->input(2).flat<float>()(0);
const float max_x = context->input(3).flat<float>()(0);
const float min_y = context->input(4).flat<float>()(0);
co... | |
{"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 | 2470 | true | esis_print(netdissect_options *ndo,
const uint8_t *pptr, u_int length)
{
const uint8_t *optr;
u_int li,esis_pdu_type,source_address_length, source_address_number;
const struct esis_header_t *esis_header;
if (!ndo->ndo_eflag)
ND_PRINT((ndo, "ES-IS"));
if (length <= 2) {
ND_PRINT((ndo, ndo->ndo_qfla... | |
{"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 | 2471 | true | bool handleBackslash(signed char& out) {
char ch = *p++;
switch (ch) {
case 0: return false;
case '"': out = ch; return true;
case '\\': out = ch; return true;
case '/': out = ch; return true;
case 'b': out = '\b'; return true;
case 'f': out = '\f'; return true;
case ... | |
{"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": "libass", "commit_message": "decode_font: fix subtraction broken by change to unsigned type\n\nThis caused a one-byt... | CWE-369 | 2472 | true | static int decode_font(ASS_Track *track)
{
unsigned char *p;
unsigned char *q;
size_t i;
size_t size; // original size
size_t dsize; // decoded size
unsigned char *buf = 0;
ass_msg(track->library, MSGL_V, "Font: %d bytes encoded data",
track->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 | 2473 | true | rdpdr_process(STREAM s)
{
uint32 handle;
uint16 vmin;
uint16 component;
uint16 pakid;
logger(Protocol, Debug, "rdpdr_process()");
/* hexdump(s->p, s->end - s->p); */
in_uint16(s, component);
in_uint16(s, pakid);
if (component == RDPDR_CTYP_CORE)
{
switch (pakid)
{
case PAKID_CORE_DEVICE_IOREQU... | |
{"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 | 2474 | true | bool do_notify_parent(struct task_struct *tsk, int sig)
{
struct kernel_siginfo info;
unsigned long flags;
struct sighand_struct *psig;
bool autoreap = false;
u64 utime, stime;
BUG_ON(sig == -1);
/* do_notify_parent_cldstop should have been called instead. */
BUG_ON(task_is_stopped_or_traced(tsk));
BUG_O... | |
{"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 | 2475 | true | Mac_Read_POST_Resource( FT_Library library,
FT_Stream stream,
FT_Long *offsets,
FT_Long resource_cnt,
FT_Long face_index,
FT_Face *aface )
{
FT_Error error = FT_E... | |
{"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 | 2476 | true | GF_Err adts_dmx_process(GF_Filter *filter)
{
GF_ADTSDmxCtx *ctx = gf_filter_get_udta(filter);
GF_FilterPacket *pck, *dst_pck;
u8 *data, *output;
u8 *start;
u32 pck_size, remain, prev_pck_size;
u64 cts = GF_FILTER_NO_TS;
//always reparse duration
if (!ctx->duration.num)
adts_dmx_check_dur(filter, ctx);
if (... | |
{"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 | 2477 | true | static unsigned int ipv6_defrag(void *priv,
struct sk_buff *skb,
const struct nf_hook_state *state)
{
int err;
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
/* Previously seen (loopback)? */
if (skb->nfct && !nf_ct_is_template((struct nf_conn *)skb->nfct))
return NF_ACCEPT;
#endif
err = nf_ct_frag6_gather(state->... | |
{"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 | 2478 | true | load(ImlibImage * im, ImlibProgressFunction progress, char progress_granularity,
char immediate_load)
{
static const int intoffset[] = { 0, 4, 2, 1 };
static const int intjump[] = { 8, 8, 4, 2 };
int rc;
DATA32 *ptr;
GifFileType *gif;
GifRowType *r... | |
{"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 | 2479 | true | static Image *ReadDDSImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status,
cubemap = MagickFalse,
volume = MagickFalse,
matte;
CompressionType
compression;
DDSInfo
dds_info;
DDSDecoder
*decoder;
size_t
n,
num_images... | |
{"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 | 2480 | true | static const char *parse_string(cJSON *item,const char *str,const char **ep)
{
const char *ptr=str+1,*end_ptr=str+1;char *ptr2;char *out;int len=0;unsigned uc,uc2;
if (*str!='\"') {*ep=str;return 0;} /* not a string! */
while (*end_ptr!='\"' && *end_ptr && ++len) if (*end_ptr++ == '\\') end_ptr++; /* Skip escaped... | |
{"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 | 2481 | true | static int uio_mmap_physical(struct vm_area_struct *vma)
{
struct uio_device *idev = vma->vm_private_data;
int mi = uio_find_mem_index(vma);
if (mi < 0)
return -EINVAL;
vma->vm_ops = &uio_physical_vm_ops;
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
return remap_pfn_range(vma,
... | |
{"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 | 2482 | true | status_t BnSoundTriggerHwService::onTransact(
uint32_t code, const Parcel& data, Parcel* reply, uint32_t flags)
{
switch(code) {
case LIST_MODULES: {
CHECK_INTERFACE(ISoundTriggerHwService, data, reply);
unsigned int numModulesReq = data.readInt32();
unsigned int numMo... | |
{"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 | 2483 | true | void MediaStreamDispatcherHost::DoOpenDevice(
int32_t page_request_id,
const std::string& device_id,
blink::MediaStreamType type,
OpenDeviceCallback callback,
MediaDeviceSaltAndOrigin salt_and_origin) {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!MediaStreamManager::IsOriginAllowed(render_proce... | |
{"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 | 2484 | true | GuestFileRead *qmp_guest_file_read(int64_t handle, bool has_count,
int64_t count, Error **errp)
{
GuestFileRead *read_data = NULL;
guchar *buf;
HANDLE fh;
bool is_ok;
DWORD read_count;
GuestFileHandle *gfh = guest_file_handle_find(handle, errp);
if (!gfh) ... | |
{"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 | 2485 | true | static gint conv_jistoeuc(gchar *outbuf, gint outlen, const gchar *inbuf)
{
const guchar *in = inbuf;
gchar *out = outbuf;
JISState state = JIS_ASCII;
while (*in != '\0' && (out - outbuf) > outlen - 3) {
if (*in == ESC) {
in++;
if (*in == '$') {
if (*(in + 1) == '@' || *(in + 1) == 'B') {
state = ... | |
{"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 | 2486 | true | isis_print_is_reach_subtlv(netdissect_options *ndo,
const uint8_t *tptr, u_int subt, u_int subl,
const char *ident)
{
u_int te_class,priority_level,gmpls_switch_cap;
union { /* int to float conversion buffer for several subTLVs */
float f... | |
{"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 | 2487 | true | static RList *create_cache_bins(RBinFile *bf, RDyldCache *cache) {
RList *bins = r_list_newf ((RListFree)free_bin);
ut16 *depArray = NULL;
cache_imgxtr_t *extras = NULL;
if (!bins) {
return NULL;
}
char *target_libs = NULL;
RList *target_lib_names = NULL;
int *deps = NULL;
target_libs = r_sys_getenv ("R_DYL... | |
{"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 | 2488 | true | int mwifiex_ret_wmm_get_status(struct mwifiex_private *priv,
const struct host_cmd_ds_command *resp)
{
u8 *curr = (u8 *) &resp->params.get_wmm_status;
uint16_t resp_len = le16_to_cpu(resp->size), tlv_len;
int mask = IEEE80211_WMM_IE_AP_QOSINFO_PARAM_SET_CNT_MASK;
bool valid = true;
struct mwifiex_ie_typ... | |
{"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 | 2489 | true | create_watching_parent (void)
{
pid_t child;
sigset_t ourset;
struct sigaction oldact[3];
int status = 0;
int retval;
retval = pam_open_session (pamh, 0);
if (is_pam_failure(retval))
{
cleanup_pam (retval);
errx (EXIT_FAILURE, _("cannot open session: %s"),
pam_strerror (pamh, retval... | |
{"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 | 2490 | true | exsltDynMapFunction(xmlXPathParserContextPtr ctxt, int nargs)
{
xmlChar *str = NULL;
xmlNodeSetPtr nodeset = NULL;
xsltTransformContextPtr tctxt;
xmlXPathCompExprPtr comp = NULL;
xmlXPathObjectPtr ret = NULL;
xmlDocPtr oldDoc, container = NULL;
xmlNodePtr oldNode;
int oldContextSize;
... | |
{"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 | 2491 | true | void DoRealForwardFFT(OpKernelContext* ctx, uint64* fft_shape,
const Tensor& in, Tensor* out) {
// Create the axes (which are always trailing).
const auto axes = Eigen::ArrayXi::LinSpaced(FFTRank, 1, FFTRank);
auto device = ctx->eigen_device<CPUDevice>();
auto input = Tensor(in... | |
{"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 | 2492 | 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": "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 | 2493 | true | multi_process_incoming_link(struct multi_context *m, struct multi_instance *instance, const unsigned int mpp_flags)
{
struct gc_arena gc = gc_new();
struct context *c;
struct mroute_addr src, dest;
unsigned int mroute_flags;
struct multi_instance *mi;
bool ret = true;
bool floated = false;
... | |
{"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 | 2494 | true | RCoreSymCacheElement *r_coresym_cache_element_new(RBinFile *bf, RBuffer *buf, ut64 off, int bits, char * file_name) {
RCoreSymCacheElement *result = NULL;
ut8 *b = NULL;
RCoreSymCacheElementHdr *hdr = r_coresym_cache_element_header_new (buf, off, bits);
if (!hdr) {
return NULL;
}
if (hdr->version != 1) {
epri... | |
{"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 | 2495 | true | static int axff_init(struct hid_device *hid)
{
struct axff_device *axff;
struct hid_report *report;
struct hid_input *hidinput = list_first_entry(&hid->inputs, struct hid_input, list);
struct list_head *report_list =&hid->report_enum[HID_OUTPUT_REPORT].report_list;
struct input_dev *dev = hidinput->input;
int fie... | |
{"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 | 2496 | true | handle_keywordonly_args(struct compiling *c, const node *n, int start,
asdl_seq *kwonlyargs, asdl_seq *kwdefaults)
{
PyObject *argname;
node *ch;
expr_ty expression, annotation;
arg_ty arg;
int i = start;
int j = 0; /* index for kwdefaults and kwonlyargs */
if (kwonl... | |
{"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 | 2497 | true | bool_t auth_gssapi_unwrap_data(
OM_uint32 *major,
OM_uint32 *minor,
gss_ctx_id_t context,
uint32_t seq_num,
XDR *in_xdrs,
bool_t (*xdr_func)(),
caddr_t xdr_ptr)
{
gss_buffer_desc in_buf, out_buf;
XDR temp_xdrs;
uint32_t verf_seq_num;
int conf, qop;
unsigned in... | |
{"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 | 2498 | true | size_t jsuGetFreeStack() {
#ifdef ARM
void *frame = __builtin_frame_address(0);
size_t stackPos = (size_t)((char*)frame);
size_t stackEnd = (size_t)((char*)&LINKER_END_VAR);
if (stackPos < stackEnd) return 0; // should never happen, but just in case of overflow!
return stackPos - stackEnd;
#elif defined(LINU... | |
{"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 | 2499 | true | ospf6_decode_v3(netdissect_options *ndo,
register const struct ospf6hdr *op,
register const u_char *dataend)
{
register const rtrid_t *ap;
register const struct lsr6 *lsrp;
register const struct lsa6_hdr *lshp;
register const struct lsa6 *lsap;
register int i;
switch (op->ospf6_ty... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.