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": "369", "Name": "Divide By Zero", "Abstraction": "Base", "Structure": "Simple", "Status": "Draft", "Description": "The product divides a value by zero."}, "cve_details": {"project": "libtiff", "commit_message": "* libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not\nrequire malloc() to r... | CWE-369 | 2900 | true | _TIFFmalloc(tsize_t s)
{
return (malloc((size_t) 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 | 2901 | true | main (int argc, char *argv[])
{
struct gengetopt_args_info args_info;
char *line = NULL;
size_t linelen = 0;
char *p, *r;
uint32_t *q;
unsigned cmdn = 0;
int rc;
setlocale (LC_ALL, "");
set_program_name (argv[0]);
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
if (cmdline_parser (a... | |
{"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 | 2902 | true | static int mwifiex_pcie_alloc_cmdrsp_buf(struct mwifiex_adapter *adapter)
{
struct pcie_service_card *card = adapter->card;
struct sk_buff *skb;
/* Allocate memory for receiving command response data */
skb = dev_alloc_skb(MWIFIEX_UPLD_SIZE);
if (!skb) {
mwifiex_dbg(adapter, ERROR,
"Unable to allocate sk... | |
{"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 | 2903 | true | void CLASS parse_qt (int end)
{
unsigned save, size;
char tag[4];
order = 0x4d4d;
while (ftell(ifp)+7 < end) {
save = ftell(ifp);
if ((size = get4()) < 8) return;
fread (tag, 4, 1, ifp);
if (!memcmp(tag,"moov",4) ||
!memcmp(tag,"udta",4) ||
!memcmp(tag,"CNTH",4))
parse_qt (save+size);
... | |
{"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 | 2904 | true | /* ------ Driver procedures ------ */
/* Send the page to the printer. */
static int
lxm5700m_print_page(gx_device_printer *pdev, gp_file *prn_stream)
{
int lnum,minX, maxX, i, l, highestX, leastX, extent;
int direction = RIGHTWARD;
int lastY = 0;
int line_size = gdev_mem_bytes_per_scan_line((gx_devic... | |
{"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 | 2905 | true | pixFewColorsOctcubeQuantMixed(PIX *pixs,
l_int32 level,
l_int32 darkthresh,
l_int32 lightthresh,
l_int32 diffthresh,
l_float32 minfract,
... | |
{"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 | 2906 | true | static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{
struct f_midi *midi = func_to_midi(f);
unsigned i;
int err;
/* we only set alt for MIDIStreaming interface */
if (intf != midi->ms_id)
return 0;
err = f_midi_start_ep(midi, f, midi->in_ep);
if (err)
return err;
err = f_midi_... | |
{"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 | 2907 | true | static int sisusb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct usb_device *dev = interface_to_usbdev(intf);
struct sisusb_usb_data *sisusb;
int retval = 0, i;
dev_info(&dev->dev, "USB2VGA dongle found at address %d\n",
dev->devnum);
/* Allocate memory for our private */
sisusb... | |
{"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 | 2908 | true | static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend,
BOOL *needs_control_head, BOOL *has_quit, BOOL *has_accept)
{
int length = 1;
int size;
PCRE2_SPTR alternative;
BOOL quit_found = FALSE;
BOOL accept_found = FALSE;
BOOL setsom_found = FALSE;
BOOL setmark_found = FALSE;
BOOL c... | |
{"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 | 2909 | true | int snd_usbmidi_create(struct snd_card *card,
struct usb_interface *iface,
struct list_head *midi_list,
const struct snd_usb_audio_quirk *quirk)
{
struct snd_usb_midi *umidi;
struct snd_usb_midi_endpoint_info endpoints[MIDI_MAX_ENDPOINTS];
int out_ports, in_ports;
int i, err;
umidi = kz... | |
{"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 | 2910 | true | void Compute(OpKernelContext* context) override {
const Tensor& tensor_in = context->input(0);
const Tensor& tensor_out = context->input(1);
const Tensor& out_grad_backprop = context->input(2);
// For maxpooling3d, tensor_in should have 5 dimensions.
OP_REQUIRES(context, tensor_in.dims() == 5,
... | |
{"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 | 2911 | true | on_unregister_handler(TCMUService1HandlerManager1 *interface,
GDBusMethodInvocation *invocation,
gchar *subtype,
gpointer user_data)
{
struct tcmur_handler *handler = find_handler_by_subtype(subtype);
struct dbus_info *info = handler->opaque;
if (!handler) {
g_dbus_method_invocation_... | |
{"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 | 2912 | true | char *path_name(const struct name_path *path, const char *name)
{
const struct name_path *p;
char *n, *m;
int nlen = strlen(name);
int len = nlen + 1;
for (p = path; p; p = p->up) {
if (p->elem_len)
len += p->elem_len + 1;
}
n = xmalloc(len);
m = n + len - (nlen + 1);
strcpy(m, name);
for (p = path;... | |
{"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 | 2913 | true | ImagingFliDecode(Imaging im, ImagingCodecState state, UINT8* buf, Py_ssize_t bytes)
{
UINT8* ptr;
int framesize;
int c, chunks, advance;
int l, lines;
int i, j, x = 0, y, ymax;
/* If not even the chunk size is present, we'd better leave */
if (bytes < 4)
return 0;
/* We don't decode ... | |
{"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 | 2914 | true | __nlmsg_put(struct sk_buff *skb, u32 pid, u32 seq, int type, int len, int flags)
{
struct nlmsghdr *nlh;
int size = NLMSG_LENGTH(len);
nlh = (struct nlmsghdr*)skb_put(skb, NLMSG_ALIGN(size));
nlh->nlmsg_type = type;
nlh->nlmsg_len = size;
nlh->nlmsg_flags = flags;
nlh->nlmsg_pid = pid;
nlh->nlmsg_seq = seq;
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 | 2915 | true | wf_cliprdr_server_file_contents_request(CliprdrClientContext* context,
const CLIPRDR_FILE_CONTENTS_REQUEST* fileContentsRequest)
{
DWORD uSize = 0;
BYTE* pData = NULL;
HRESULT hRet = S_OK;
FORMATETC vFormatEtc;
LPDATAOBJECT pDataObj = NULL;
STGMEDIUM vStgMedium;
BOOL bIsSt... | |
{"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 | 2916 | true | xmlDocPtr soap_xmlParseFile(const char *filename TSRMLS_DC)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
zend_bool old_allow_url_fopen;
/*
xmlInitParser();
*/
old_allow_url_fopen = PG(allow_url_fopen);
PG(allow_url_fopen) = 1;
ctxt = xmlCreateFileParserCtxt(filename);
PG(allow_url_fopen) = old_allow_... | |
{"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 | 2917 | true | main(int argc, char **argv)
{
const char *safepath = "/bin:/sbin:/usr/bin:/usr/sbin:"
"/usr/local/bin:/usr/local/sbin";
const char *confpath = NULL;
char *shargv[] = { NULL, NULL };
char *sh;
const char *p;
const char *cmd;
char cmdline[LINE_MAX];
struct passwd mypwstore, targpwstore;
struct passwd *mypw,... | |
{"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 | 2918 | true | static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
Manager *m = userdata;
ssize_t n;
assert(m);
assert(m->notify_fd == fd);
if (revents != EPOLLIN) {
log_warning("Got unexpected poll event for notify fd.");... | |
{"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 | 2919 | true | static void snd_timer_user_ccallback(struct snd_timer_instance *timeri,
int event,
struct timespec *tstamp,
unsigned long resolution)
{
struct snd_timer_user *tu = timeri->callback_data;
struct snd_timer_tread r1;
unsigned long flags;
if (event >= SNDRV_TIMER_EVENT_START &&
event <=... | |
{"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 | 2920 | true | formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
{
Buffer save;
char *p;
int spos, epos, rows, c_rows, pos, col = 0;
Line *l;
copyBuffer(&save, buf);
gotoLine(buf, a->start.line);
switch (form->type) {
case FORM_TEXTAREA:
case FORM_INPUT_TEXT:
case FORM_INPUT_FILE:
... | |
{"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 | 2921 | true | scoped_refptr<Image> CSSPaintValue::GetImage(
const ImageResourceObserver& client,
const Document& document,
const ComputedStyle&,
const FloatSize& target_size) {
if (!generator_) {
generator_ = CSSPaintImageGenerator::Create(
GetName(), document, paint_image_generator_observer_);
... | |
{"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 | 2922 | true | __zzip_parse_root_directory(int fd,
struct _disk_trailer *trailer,
struct zzip_dir_hdr **hdr_return,
zzip_plugin_io_t io)
{
auto struct zzip_disk_entry dirent;
struct zzip_dir_hdr *hdr;
struct zzip_dir_hdr *hdr0;
uint16_... | |
{"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 | 2923 | true | bool ParamTraits<LOGFONT>::Read(const Message* m, PickleIterator* iter,
param_type* r) {
const char *data;
int data_size = 0;
bool result = m->ReadData(iter, &data, &data_size);
if (result && data_size == sizeof(LOGFONT)) {
memcpy(r, data, sizeof(LOGFONT));
} else {
... | |
{"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 | 2924 | true | __init int intel_pmu_init(void)
{
union cpuid10_edx edx;
union cpuid10_eax eax;
union cpuid10_ebx ebx;
struct event_constraint *c;
unsigned int unused;
int version;
if (!cpu_has(&boot_cpu_data, X86_FEATURE_ARCH_PERFMON)) {
switch (boot_cpu_data.x86) {
case 0x6:
return p6_pmu_init();
case 0xb:
return... | |
{"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 | 2925 | true | parse_file (FILE* input_file, char* directory,
char *body_filename, char *body_pref,
int flags)
{
uint32 d;
uint16 key;
Attr *attr = NULL;
File *file = NULL;
int rtf_size = 0, html_size = 0;
MessageBody body;
memset (&body, '\0', sizeof (MessageBody));
/* store the program op... | |
{"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 | 2926 | true | xmlParseStartTag2(xmlParserCtxtPtr ctxt, const xmlChar **pref,
const xmlChar **URI, int *tlen) {
const xmlChar *localname;
const xmlChar *prefix;
const xmlChar *attname;
const xmlChar *aprefix;
const xmlChar *nsname;
xmlChar *attvalue;
const xmlChar **atts = ctxt->atts;
... | |
{"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 | 2927 | true | formUpdateBuffer(Anchor *a, Buffer *buf, FormItemList *form)
{
Buffer save;
char *p;
int spos, epos, rows, c_rows, pos, col = 0;
Line *l;
copyBuffer(&save, buf);
gotoLine(buf, a->start.line);
switch (form->type) {
case FORM_TEXTAREA:
case FORM_INPUT_TEXT:
case FORM_INPUT_FILE:
... | |
{"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 | 2928 | true | CopyKeyAliasesToKeymap(struct xkb_keymap *keymap, KeyNamesInfo *info)
{
AliasInfo *alias;
unsigned i, num_key_aliases;
struct xkb_key_alias *key_aliases;
/*
* Do some sanity checking on the aliases. We can't do it before
* because keys and their aliases may be added out-of-order.
*/
... | |
{"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 | 2929 | true | static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
page_geometry[MaxTextExtent];
Image
*image;
MagickBooleanType
logging;
volatile int
first_mng_object,
object_id,
term_chunk_found,
skip_to_iend;
volatile ssize_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 | 2930 | true | PHP_FUNCTION(locale_accept_from_http)
{
UEnumeration *available;
char *http_accept = NULL;
int http_accept_len;
UErrorCode status = 0;
int len;
char resultLocale[INTL_MAX_LOCALE_LEN+1];
UAcceptResult outResult;
if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", &http_accept, &http_accept_len) == FAILURE... | |
{"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 | 2931 | true | static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
char
magick[14];
Image
*image;
int
foundPropEnd = 0;
MagickBooleanType
status;
MagickOffsetType
offset;
register ssize_t
i;
size_t
image_type,
length;
ssize_t
count;
XCFDocInf... | |
{"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 | 2932 | true | b64decode(const uschar *code, uschar **ptr)
{
int x, y;
uschar *result = store_get(3*(Ustrlen(code)/4) + 1);
*ptr = result;
/* Each cycle of the loop handles a quantum of 4 input bytes. For the last
quantum this may decode to 1, 2, or 3 output bytes. */
while ((x = *code++) != 0)
{
if (isspace(x)) continue;
/*... | |
{"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 | 2933 | true | i915_gem_execbuffer2_ioctl(struct drm_device *dev, void *data,
struct drm_file *file)
{
struct drm_i915_gem_execbuffer2 *args = data;
struct drm_i915_gem_exec_object2 *exec2_list;
struct drm_syncobj **fences = NULL;
const size_t count = args->buffer_count;
int err;
if (!check_buffer_count(count)) {
DRM_D... | |
{"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 | 2934 | true | static unsigned long get_ctl_id_hash(const struct snd_ctl_elem_id *id)
{
unsigned long h;
const unsigned char *p;
h = id->iface;
h = MULTIPLIER * h + id->device;
h = MULTIPLIER * h + id->subdevice;
for (p = id->name; *p; p++)
h = MULTIPLIER * h + *p;
h = MULTIPLIER * h + id->index;
h &= LONG_MAX;
return h;
... | |
{"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 | 2935 | true | HandleRFBServerMessage(rfbClient* client)
{
rfbServerToClientMsg msg;
if (client->serverPort==-1)
client->vncRec->readTimestamp = TRUE;
if (!ReadFromRFBServer(client, (char *)&msg, 1))
return FALSE;
switch (msg.type) {
case rfbSetColourMapEntries:
{
/* TODO:
int i;
uint16_t rgb[3];
... | |
{"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 | 2936 | true | static void copy_to_user_policy(struct xfrm_policy *xp, struct xfrm_userpolicy_info *p, int dir)
{
memcpy(&p->sel, &xp->selector, sizeof(p->sel));
memcpy(&p->lft, &xp->lft, sizeof(p->lft));
memcpy(&p->curlft, &xp->curlft, sizeof(p->curlft));
p->priority = xp->priority;
p->index = xp->index;
p->sel.family = x... | |
{"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 | 2937 | true | void Compute(OpKernelContext* context) override {
const Tensor& diagonal = context->input(0);
// MatrixDiag and MatrixDiagV2 both use this OpKernel. MatrixDiag only has
// one input, so we have to check the number of inputs before reading
// additional parameters in MatrixDiagV2.
int32 lower_diag... | |
{"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 | 2938 | true | static long vfio_pci_ioctl(void *device_data,
unsigned int cmd, unsigned long arg)
{
struct vfio_pci_device *vdev = device_data;
unsigned long minsz;
if (cmd == VFIO_DEVICE_GET_INFO) {
struct vfio_device_info info;
minsz = offsetofend(struct vfio_device_info, num_irqs);
if (copy_from_user(&info, (void... | |
{"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 | 2939 | true | add_job(cupsd_client_t *con, /* I - Client connection */
cupsd_printer_t *printer, /* I - Destination printer */
mime_type_t *filetype) /* I - First print file type, if any */
{
http_status_t status; /* Policy status */
ipp_attribute_t *attr, /* Current attribute */
*auth_info; /* auth-info attribute ... | |
{"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 | 2940 | true | std::string get_wml_location(const std::string &filename, const std::string ¤t_dir)
{
DBG_FS << "Looking for '" << filename << "'." << std::endl;
assert(game_config::path.empty() == false);
std::string result;
if (filename.empty()) {
LOG_FS << " invalid filename" << std::endl;
return result;
}
if (... | |
{"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 | 2941 | true | int qcow2_grow_l1_table(BlockDriverState *bs, uint64_t min_size,
bool exact_size)
{
BDRVQcowState *s = bs->opaque;
int new_l1_size2, ret, i;
uint64_t *new_l1_table;
int64_t old_l1_table_offset, old_l1_size;
int64_t new_l1_table_offset, new_l1_size;
uint8_t data[12];
... | |
{"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 | 2942 | true | ms_escher_get_data (MSEscherState *state,
gint offset, /* bytes from logical start of the stream */
gint num_bytes, /*how many bytes we want, NOT incl prefix */
gboolean * needs_free)
{
BiffQuery *q = state->q;
guint8 *res;
g_return_val_if_fail (offset >= state->start_offset, NULL);
/* find t... | |
{"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 | 2943 | true | void rfbScaledScreenUpdateRect(rfbScreenInfoPtr screen, rfbScreenInfoPtr ptr, int x0, int y0, int w0, int h0)
{
int x,y,w,v,z;
int x1, y1, w1, h1;
int bitsPerPixel, bytesPerPixel, bytesPerLine, areaX, areaY, area2;
unsigned char *srcptr, *dstptr;
/* Nothing to do!!! */
if (screen==ptr) return;
... | |
{"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 | 2944 | true | void receive_tcppacket(connection_t *c, const char *buffer, int len) {
vpn_packet_t outpkt;
outpkt.len = len;
if(c->options & OPTION_TCPONLY)
outpkt.priority = 0;
else
outpkt.priority = -1;
memcpy(outpkt.data, buffer, len);
receive_packet(c->node, &outpkt);
}
| |
{"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 | 2945 | true | GF_Err mpgviddmx_process(GF_Filter *filter)
{
GF_MPGVidDmxCtx *ctx = gf_filter_get_udta(filter);
GF_FilterPacket *pck, *dst_pck;
u64 byte_offset;
s64 vosh_start = -1;
s64 vosh_end = -1;
GF_Err e;
char *data;
u8 *start;
u32 pck_size;
s32 remain;
//always reparse duration
if (!ctx->duration.num)
mpgviddmx_... | |
{"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 | 2946 | true | ares_parse_naptr_reply (const unsigned char *abuf, int alen,
struct ares_naptr_reply **naptr_out)
{
unsigned int qdcount, ancount, i;
const unsigned char *aptr, *vptr;
int status, rr_type, rr_class, rr_len;
long len;
char *hostname = NULL, *rr_name = NULL;
struct ares_naptr_reply *na... | |
{"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 | 2947 | true | static void naludmx_queue_param_set(GF_NALUDmxCtx *ctx, char *data, u32 size, u32 ps_type, s32 ps_id)
{
GF_List *list = NULL, *alt_list = NULL;
GF_NALUFFParam *sl;
u32 i, count;
u32 crc = gf_crc_32(data, size);
if (ctx->codecid==GF_CODECID_HEVC) {
switch (ps_type) {
case GF_HEVC_NALU_VID_PARAM:
if (!ctx->v... | |
{"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 | 2948 | true | validate_as_request(kdc_realm_t *kdc_active_realm,
register krb5_kdc_req *request, krb5_db_entry client,
krb5_db_entry server, krb5_timestamp kdc_time,
const char **status, krb5_pa_data ***e_data)
{
int errcode;
krb5_error_code ret;
/*
* If a... | |
{"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 | 2949 | true | static pngquant_error rwpng_read_image24_libpng(FILE *infile, png24_image *mainprog_ptr, int verbose)
{
png_structp png_ptr = NULL;
png_infop info_ptr = NULL;
png_size_t rowbytes;
int color_type, bit_depth;
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, mainprog_ptr,
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 | 2950 | true | ipt_do_table(struct sk_buff *skb,
const struct nf_hook_state *state,
struct xt_table *table)
{
unsigned int hook = state->hook;
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
const struct iphdr *ip;
/* Initializing verdict to NF_DROP keeps gcc happy. */
unsigned int ver... | |
{"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 | 2951 | true | int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, char **error TSRMLS_DC) /* {{{ */
{
phar_zip_dir_end locator;
char buf[sizeof(locator) + 65536];
long size;
php_uint16 i;
phar_archive_data *mydata = NULL;
phar_entry_info entry = {0};
char *... | |
{"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 | 2952 | true | chdlc_print(netdissect_options *ndo, register const u_char *p, u_int length)
{
u_int proto;
proto = EXTRACT_16BITS(&p[2]);
if (ndo->ndo_eflag) {
ND_PRINT((ndo, "%s, ethertype %s (0x%04x), length %u: ",
tok2str(chdlc_cast_values, "0x%02x", p[0]),
t... | |
{"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 | 2953 | true | at_bitmap input_bmp_reader(gchar * filename, at_input_opts_type * opts, at_msg_func msg_func, gpointer msg_data, gpointer user_data)
{
FILE *fd;
unsigned char buffer[64];
int ColormapSize, rowbytes, Maps;
gboolean Grey = FALSE;
unsigned char ColorMap[256][3];
at_bitmap image = at_bitmap_init(0, 0, 0, 1);
... | |
{"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 | 2954 | true | int FFmpegVideoDecoder::GetVideoBuffer(AVCodecContext* codec_context,
AVFrame* frame) {
VideoFrame::Format format = PixelFormatToVideoFormat(codec_context->pix_fmt);
if (format == VideoFrame::UNKNOWN)
return AVERROR(EINVAL);
DCHECK(format == VideoFrame::YV12 || format ==... | |
{"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 | 2955 | true | AP4_DataAtom::AP4_DataAtom(AP4_UI32 size, AP4_ByteStream& stream) :
AP4_Atom(AP4_ATOM_TYPE_DATA, size)
{
if (size < AP4_ATOM_HEADER_SIZE+8) return;
AP4_UI32 i;
stream.ReadUI32(i); m_DataType = (DataType)i;
stream.ReadUI32(i); m_DataLang = (DataLang)i;
// the stream for the data is a substream ... | |
{"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 | 2956 | true | TiledInputFile::rawTileData (int &dx, int &dy,
int &lx, int &ly,
const char *&pixelData,
int &pixelDataSize)
{
try
{
Lock lock (*_data->_streamData);
if (!isValidTile (dx, dy, lx, ly))
throw IEX_NAMESPACE::ArgExc ("Tried to read a tile ou... | |
{"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 | 2957 | 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 == 16 || descsz == 20)) ... | |
{"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 | 2958 | 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": "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 | 2959 | true | parse_toshiba_packet(FILE_T fh, struct wtap_pkthdr *phdr, Buffer *buf,
int *err, gchar **err_info)
{
union wtap_pseudo_header *pseudo_header = &phdr->pseudo_header;
char line[TOSHIBA_LINE_LENGTH];
int num_items_scanned;
int pkt_len, pktnum, hr, min, sec, csec;
char channel[10], direction[10];
int i, hex_... | |
{"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 overflow due to integer conversion to unsigned.\n\nPiperOrigin-RevId: 38773... | CWE-369 | 2960 | true | void Compute(OpKernelContext* context) override {
// boxes: [batch_size, num_anchors, q, 4]
const Tensor& boxes = context->input(0);
// scores: [batch_size, num_anchors, num_classes]
const Tensor& scores = context->input(1);
OP_REQUIRES(
context, (boxes.dim_size(0) == scores.dim_size(0)),
... | |
{"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 | 2961 | true | static const ut8 *r_bin_dwarf_parse_comp_unit(Sdb *s, const ut8 *obuf,
RBinDwarfCompUnit *cu, const RBinDwarfDebugAbbrev *da,
size_t offset, const ut8 *debug_str, size_t debug_str_len) {
const ut8 *buf = obuf, *buf_end = obuf + (cu->hdr.length - 7);
ut64 abbr_code;
size_t i;
if (cu->hdr.length > debug_str_len... | |
{"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 | 2962 | true | int get_netnsid_from_name(const char *name)
{
struct {
struct nlmsghdr n;
struct rtgenmsg g;
char buf[1024];
} req = {
.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
.n.nlmsg_flags = NLM_F_REQUEST,
.n.nlmsg_type = RTM_GETNSID,
.g.rtgen_family = AF_UNSPEC,
};
struct nlmsghdr *answer;
... | |
{"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": "Adding more validation checks to _ParallelConcatUpdate to avoid NPE.\n\nPiperOrigin... | CWE-369 | 2963 | true | void Compute(OpKernelContext* ctx) override {
auto value = ctx->input(0);
auto update = ctx->input(1);
OP_REQUIRES(
ctx, value.dims() == update.dims(),
errors::InvalidArgument("value and update shape doesn't match: ",
value.shape().DebugString(), " vs. ",
... | |
{"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 | 2964 | true | append_utf8_value (const unsigned char *value, size_t length,
struct stringbuf *sb)
{
unsigned char tmp[6];
const unsigned char *s;
size_t n;
int i, nmore;
if (length && (*value == ' ' || *value == '#'))
{
tmp[0] = '\\';
tmp[1] = *value;
put_stringbuf_mem (sb, tmp, 2)... | |
{"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 | 2965 | true | static Image *ReadTIFFImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
#define ThrowTIFFException(severity,message) \
{ \
if (tiff_pixels != (unsigned char *) NULL) \
tiff_pixels=(unsigned char *) RelinquishMagickMemory(tiff_pixels); \
if (quantum_info != (QuantumInfo *) NULL) \
quantum_info... | |
{"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 | 2966 | true | static void handle_PORT(ctrl_t *ctrl, char *str)
{
int a, b, c, d, e, f;
char addr[INET_ADDRSTRLEN];
struct sockaddr_in sin;
if (ctrl->data_sd > 0) {
uev_io_stop(&ctrl->data_watcher);
close(ctrl->data_sd);
ctrl->data_sd = -1;
}
/* Convert PORT command's argument to IP address + port */
sscanf(str, "%d,%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 | 2967 | true | xmlParserEntityCheck(xmlParserCtxtPtr ctxt, size_t size,
xmlEntityPtr ent, size_t replacement)
{
size_t consumed = 0;
if ((ctxt == NULL) || (ctxt->options & XML_PARSE_HUGE))
return (0);
if (ctxt->lastError.code == XML_ERR_ENTITY_LOOP)
return (1);
/*
* This may... | |
{"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 | 2968 | true | static BROTLI_INLINE BrotliResult ProcessCommandsInternal(int safe,
BrotliState* s) {
int pos = s->pos;
int i = s->loop_counter;
BrotliResult result = BROTLI_RESULT_SUCCESS;
BrotliBitReader* br = &s->br;
if (!CheckInputAmount(safe, br, 28) || !WarmupBitReader(safe, br)) {
result = BROTLI_RESULT_NEEDS... | |
{"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 | 2969 | true | unsigned long perf_instruction_pointer(struct pt_regs *regs)
{
bool use_siar = regs_use_siar(regs);
unsigned long siar = mfspr(SPRN_SIAR);
if (ppmu->flags & PPMU_P10_DD1) {
if (siar)
return siar;
else
return regs->nip;
} else if (use_siar && siar_valid(regs))
return mfspr(SPRN_SIAR) + perf_ip_adjust(re... | |
{"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 | 2970 | true | bson_iter_codewscope (const bson_iter_t *iter, /* IN */
uint32_t *length, /* OUT */
uint32_t *scope_len, /* OUT */
const uint8_t **scope) /* OUT */
{
uint32_t len;
BSON_ASSERT (iter);
if (ITER_TYPE (iter) == BSON_TYPE_CODEWSCOPE) ... | |
{"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 | 2971 | true | static void put_ucounts(struct ucounts *ucounts)
{
unsigned long flags;
if (atomic_dec_and_test(&ucounts->count)) {
spin_lock_irqsave(&ucounts_lock, flags);
hlist_del_init(&ucounts->node);
spin_unlock_irqrestore(&ucounts_lock, flags);
kfree(ucounts);
}
}
| |
{"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 | 2972 | true | NAN_METHOD(DetectCharacterEncoding) {
Nan::HandleScope scope;
v8::Local<v8::Object> inputBuffer = info[0]->ToObject();
UCharsetDetector *charsetDetector;
const UCharsetMatch *charsetMatch;
UErrorCode errorCode = U_ZERO_ERROR;
charsetDetector = ucsdet_open(&errorCode);
if(U_FAILURE(errorCode)) {
Nan::ThrowE... | |
{"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 | 2973 | true | _asn1_ltostr (long v, char *str)
{
long d, r;
char temp[LTOSTR_MAX_SIZE];
int count, k, start;
if (v < 0)
{
str[0] = '-';
start = 1;
v = -v;
}
else
start = 0;
count = 0;
do
{
d = v / 10;
r = v - d * 10;
temp[start + count] = '0' + (char) r;
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 | 2974 | true | ieee802_15_4_if_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, const u_char *p)
{
u_int caplen = h->caplen;
u_int hdrlen;
uint16_t fc;
uint8_t seq;
uint16_t panid = 0;
if (caplen < 3) {
ND_PRINT((ndo, "[|802.15.4]"));
return caplen;
}
hdrlen = 3;
fc = EXTRACT_LE_16BITS(... | |
{"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 | 2975 | true | init_om(
XOM om)
{
XLCd lcd = om->core.lcd;
XOMGenericPart *gen = XOM_GENERIC(om);
OMData data;
XlcCharSet *charset_list;
FontData font_data;
char **required_list;
XOrientation *orientation;
char **value, buf[BUFSIZ], *bufptr;
int count = 0, num = 0, length = 0;
_XlcGetResou... | |
{"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 | 2976 | true | read_channel_data (PSDchannel *channel,
const guint16 bps,
const guint16 compression,
const guint16 *rle_pack_len,
FILE *f,
GError **error)
{
gchar *raw_data;
gchar *src;
gchar *dst;
... | |
{"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 | 2977 | true | static int cxusb_ctrl_msg(struct dvb_usb_device *d,
u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen)
{
struct cxusb_state *st = d->priv;
int ret, wo;
if (1 + wlen > MAX_XFER_SIZE) {
warn("i2c wr: len=%d is too big!\n", wlen);
return -EOPNOTSUPP;
}
wo = (rbuf == NULL || rlen == 0); /* write-only ... | |
{"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 | 2978 | true | mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
struct host_cmd_ds_command *cmd,
struct cfg80211_ssid *req_ssid)
{
int rsn_ie_len = 0;
struct mwifiex_adapter *adapter = priv->adapter;
struct host_cmd_ds_802_11_ad_hoc_start *adhoc_start =
&cmd->params.adhoc_start;
struct mwifiex_bssdescriptor... | |
{"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 | 2979 | true | static bool is_legal_file(const std::string &filename)
{
DBG_FS << "Looking for '" << filename << "'.\n";
if (filename.empty()) {
LOG_FS << " invalid filename\n";
return false;
}
if (filename.find("..") != std::string::npos) {
ERR_FS << "Illegal path '" << filename << "' (\"..\" not allowed).\n";
return ... | |
{"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 | 2980 | true | file_check_mem(struct magic_set *ms, unsigned int level)
{
size_t len;
if (level >= ms->c.len) {
len = (ms->c.len += 20) * sizeof(*ms->c.li);
ms->c.li = CAST(struct level_info *, (ms->c.li == NULL) ?
malloc(len) :
realloc(ms->c.li, len));
if (ms->c.li == NULL) {
file_oomem(ms, len);
ret... | |
{"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 | 2981 | true | void generic_pipe_buf_get(struct pipe_inode_info *pipe, struct pipe_buffer *buf)
{
get_page(buf->page);
}
| |
{"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 | 2982 | true | void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color)
{
int lastBorder;
/* Seek left */
int leftLimit = -1, rightLimit;
int i, restoreAlphaBlending = 0;
if (border < 0) {
/* Refuse to fill to a non-solid border */
return;
}
if (!im->trueColor) {
if ((color > (im->colorsTotal... | |
{"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 | 2983 | true | imapx_connect_to_server (CamelIMAPXServer *is,
GCancellable *cancellable,
GError **error)
{
CamelNetworkSettings *network_settings;
CamelNetworkSecurityMethod method;
CamelIMAPXStore *store;
CamelSettings *settings;
GIOStream *connection = NULL;
GIOStream *tls_str... | |
{"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 | 2984 | true | static BOOL clear_decompress_subcode_rlex(wStream* s, UINT32 bitmapDataByteCount, UINT32 width,
UINT32 height, BYTE* pDstData, UINT32 DstFormat,
UINT32 nDstStep, UINT32 nXDstRel, UINT32 nYDstRel,
... | |
{"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 | 2985 | true | static int track_header(VividasDemuxContext *viv, AVFormatContext *s, uint8_t *buf, int size)
{
int i, j, ret;
int64_t off;
int val_1;
int num_video;
AVIOContext pb0, *pb = &pb0;
ffio_init_context(pb, buf, size, 0, NULL, NULL, NULL, NULL);
ffio_read_varlen(pb); // track_header_len
avi... | |
{"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": "https://github.com/ImageMagick/ImageMagick/issues/1711", "cve": "CVE-2020-27750", ... | CWE-369 | 2986 | true | static inline void ConvertRGBToCMYK(PixelInfo *pixel)
{
MagickRealType
black,
blue,
cyan,
green,
magenta,
red,
yellow;
if (pixel->colorspace != sRGBColorspace)
{
red=QuantumScale*pixel->red;
green=QuantumScale*pixel->green;
blue=QuantumScale*pixel->blue;
}
el... | |
{"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 | 2987 | true | static void __munlock_pagevec(struct pagevec *pvec, struct zone *zone)
{
int i;
int nr = pagevec_count(pvec);
int delta_munlocked;
struct pagevec pvec_putback;
int pgrescued = 0;
pagevec_init(&pvec_putback, 0);
/* Phase 1: page isolation */
spin_lock_irq(zone_lru_lock(zone));
for (i = 0; i < nr; 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 | 2988 | true | static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
DIBInfo
dib_info;
Image
*image;
IndexPacket
index;
ssize_t
bit,
y;
MagickBooleanType
status;
MemoryInfo
*pixel_info;
register IndexPacket
*indexes;
register ssize_t
x;
registe... | |
{"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 | 2989 | true | predicate_parse(const char *str, int nr_parens, int nr_preds,
parse_pred_fn parse_pred, void *data,
struct filter_parse_error *pe)
{
struct prog_entry *prog_stack;
struct prog_entry *prog;
const char *ptr = str;
char *inverts = NULL;
int *op_stack;
int *top;
int invert = 0;
int ret = -ENOMEM;
int len;
int... | |
{"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 | 2990 | true | static void ndpi_reset_packet_line_info(struct ndpi_packet_struct *packet) {
packet->parsed_lines = 0, packet->empty_line_position_set = 0, packet->host_line.ptr = NULL,
packet->host_line.len = 0, packet->referer_line.ptr = NULL, packet->referer_line.len = 0,
packet->content_line.ptr = NULL, packet->content_l... | |
{"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 | 2991 | true | search_in_range(regex_t* reg, const UChar* str, const UChar* end,
const UChar* start, const UChar* range, /* match start range */
const UChar* data_range, /* subject string range */
OnigRegion* region,
OnigOptionType option, OnigMatchParam* mp)
{
int r;
... | |
{"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 | 2992 | true | void Compute(OpKernelContext* ctx) override {
const Tensor& indices = ctx->input(0);
const auto values = ctx->input(1).flat<Tidx>();
const Tensor& dense_shape = ctx->input(2);
const Tensor& size_t = ctx->input(3);
const auto weights = ctx->input(4).flat<T>();
const int64_t weights_size = weigh... | |
{"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 | 2993 | true | GetOutboundPinholeTimeout(struct upnphttp * h, const char * action, const char * ns)
{
int r;
static const char resp[] =
"<u:%sResponse "
"xmlns:u=\"%s\">"
"<OutboundPinholeTimeout>%d</OutboundPinholeTimeout>"
"</u:%sResponse>";
char body[512];
int bodylen;
struct NameValueParserData data;
char * int_ip... | |
{"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 | 2994 | true | static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid)
{
struct hlist_head *hashent = ucounts_hashentry(ns, uid);
struct ucounts *ucounts, *new;
spin_lock_irq(&ucounts_lock);
ucounts = find_ucounts(ns, uid, hashent);
if (!ucounts) {
spin_unlock_irq(&ucounts_lock);
new = kzalloc(sizeof(*new... | |
{"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 | 2995 | true | V4L2JpegEncodeAccelerator::JobRecord::JobRecord(
scoped_refptr<VideoFrame> input_frame,
scoped_refptr<VideoFrame> output_frame,
int quality,
int32_t task_id,
BitstreamBuffer* exif_buffer)
: input_frame(input_frame),
output_frame(output_frame),
quality(quality),
task_id(task_... | |
{"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 | 2996 | true | static inline int cipso_v4_validate(const struct sk_buff *skb,
unsigned char **option)
{
unsigned char *opt = *option;
unsigned char err_offset = 0;
u8 opt_len = opt[1];
u8 opt_iter;
if (opt_len < 8) {
err_offset = 1;
goto out;
}
if (get_unaligned_be32(&opt[2]) == 0) {
err_offset = 2;
goto out;... | |
{"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 | 2997 | true | vhost_user_get_inflight_fd(struct virtio_net **pdev,
VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct rte_vhost_inflight_info_packed *inflight_packed;
uint64_t pervq_inflight_size, mmap_size;
uint16_t num_queues, queue_size;
struct virtio_net *dev = *pdev;
int fd, i, j;
void *addr;
if (msg->siz... | |
{"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 | 2998 | true | static ssize_t __nfs4_get_acl_uncached(struct inode *inode, void *buf, size_t buflen)
{
struct page *pages[NFS4ACL_MAXPAGES] = {NULL, };
struct nfs_getaclargs args = {
.fh = NFS_FH(inode),
.acl_pages = pages,
.acl_len = buflen,
};
struct nfs_getaclres res = {
.acl_len = buflen,
};
struct rpc_message msg =... | |
{"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 | 2999 | true | GF_Err gf_isom_box_parse_ex(GF_Box **outBox, GF_BitStream *bs, u32 parent_type, Bool is_root_box)
{
u32 type, uuid_type, hdr_size;
u64 size, start, payload_start, end;
char uuid[16];
GF_Err e;
GF_Box *newBox;
Bool skip_logs = gf_bs_get_cookie(bs) ? GF_TRUE : GF_FALSE;
Bool is_special = GF_TRUE;
if ((bs == NULL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.