func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int fts3PoslistNearMerge(
char **pp, /* Output buffer */
char *aTmp, /* Temporary buffer space */
int nRight, /* Maximum difference in token positions */
int nLeft, /* Maximum difference in token positions */
char **pp1, ... | 0 | [
"CWE-787"
] | sqlite | c72f2fb7feff582444b8ffdc6c900c69847ce8a9 | 293,735,948,000,029,580,000,000,000,000,000,000,000 | 33 | More improvements to shadow table corruption detection in FTS3.
FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d |
static int vmx_set_tss_addr(struct kvm *kvm, unsigned int addr)
{
int ret;
if (enable_unrestricted_guest)
return 0;
ret = x86_set_memory_region(kvm, TSS_PRIVATE_MEMSLOT, addr,
PAGE_SIZE * 3);
if (ret)
return ret;
to_kvm_vmx(kvm)->tss_addr = addr;
return init_rmode_tss(kvm);
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 99,703,299,601,418,060,000,000,000,000,000,000,000 | 14 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
int bdrv_make_zero(BlockDriverState *bs, BdrvRequestFlags flags)
{
int64_t target_size = bdrv_getlength(bs) / BDRV_SECTOR_SIZE;
int64_t ret, nb_sectors, sector_num = 0;
int n;
for (;;) {
nb_sectors = target_size - sector_num;
if (nb_sectors <= 0) {
return 0;
}
... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 255,461,447,774,266,740,000,000,000,000,000,000,000 | 33 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
MSG_PROCESS_RETURN tls_process_key_exchange(SSL *s, PACKET *pkt)
{
int al = -1;
long alg_k;
EVP_PKEY *pkey = NULL;
PACKET save_param_start, signature;
alg_k = s->s3->tmp.new_cipher->algorithm_mkey;
save_param_start = *pkt;
#if !defined(OPENSSL_NO_EC) || !defined(OPENSSL_NO_DH)
EVP_PKEY_fr... | 0 | [
"CWE-476"
] | openssl | efbe126e3ebb9123ac9d058aa2bb044261342aaa | 268,495,958,352,747,300,000,000,000,000,000,000,000 | 163 | Fix missing NULL checks in CKE processing
Reviewed-by: Rich Salz <rsalz@openssl.org> |
static int sev_lock_two_vms(struct kvm *dst_kvm, struct kvm *src_kvm)
{
struct kvm_sev_info *dst_sev = &to_kvm_svm(dst_kvm)->sev_info;
struct kvm_sev_info *src_sev = &to_kvm_svm(src_kvm)->sev_info;
int r = -EBUSY;
if (dst_kvm == src_kvm)
return -EINVAL;
/*
* Bail if these VMs are already involved in a migrat... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 264,020,091,436,341,170,000,000,000,000,000,000,000 | 34 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
should_generate_v2_networkstatus(void)
{
return authdir_mode_v2(get_options()) &&
the_v2_networkstatus_is_dirty &&
the_v2_networkstatus_is_dirty + DIR_REGEN_SLACK_TIME < time(NULL);
} | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 268,520,867,089,384,450,000,000,000,000,000,000,000 | 6 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
~TensorInfoCache() {
tensorflow::mutex_lock ml(lock);
for (auto& p : entries) {
libxsmm_spmdm_destroy(&p.second->handle);
}
entries.clear();
} | 0 | [
"CWE-125"
] | tensorflow | e6cf28c72ba2eb949ca950d834dd6d66bb01cfae | 198,943,040,737,782,320,000,000,000,000,000,000,000 | 7 | Validate that matrix dimension sizes in SparseMatMul are positive.
PiperOrigin-RevId: 401149683
Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d |
CString CIRCNetwork::ExpandString(const CString& sStr) const {
CString sRet;
return ExpandString(sStr, sRet);
} | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 264,043,249,097,425,720,000,000,000,000,000,000,000 | 4 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
static int getTempStore(const char *z){
if( z[0]>='0' && z[0]<='2' ){
return z[0] - '0';
}else if( sqlite3StrICmp(z, "file")==0 ){
return 1;
}else if( sqlite3StrICmp(z, "memory")==0 ){
return 2;
}else{
return 0;
}
} | 0 | [
"CWE-754"
] | sqlite | ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd | 168,479,086,271,050,680,000,000,000,000,000,000,000 | 11 | Fix the NOT NULL verification logic in PRAGMA integrity_check so that it
works for generated columns whose value is the result of a comparison operator.
Ticket [bd8c280671ba44a7]
FossilOrigin-Name: f3b39c71b88cb6721f443de56cdce4c08252453a5e340b00a2bd88dc10c42400 |
static int read_image_export_directory(RBuffer *b, ut64 addr, PE_(image_export_directory) *export_dir) {
st64 o_addr = r_buf_seek (b, 0, R_BUF_CUR);
if (r_buf_seek (b, addr, R_BUF_SET) < 0) {
return -1;
}
ut8 buf[sizeof (PE_(image_export_directory))];
r_buf_read (b, buf, sizeof (buf));
PE_READ_STRUCT_FIELD (exp... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 182,778,081,778,535,720,000,000,000,000,000,000,000 | 21 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
BSONObj spec() {
return BSON("$or" << BSON_ARRAY(0 << BSON("$or" << BSON_ARRAY(BSON("$or" << BSON_ARRAY(1))))
<< "$a"
<< "$b"));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 232,146,879,427,403,560,000,000,000,000,000,000,000 | 5 | SERVER-38070 fix infinite loop in agg expression |
_rsvg_node_init (RsvgNode * self,
RsvgNodeType type)
{
self->type = type;
self->parent = NULL;
self->children = g_ptr_array_new ();
self->state = g_new (RsvgState, 1);
rsvg_state_init (self->state);
self->free = _rsvg_node_free;
self->draw = _rsvg_node_draw_nothing;
self... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 92,303,093,882,492,550,000,000,000,000,000,000,000 | 12 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void pause_recovery() {
Mutex::Locker l(recovery_lock);
recovery_paused = true;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 288,122,578,972,459,820,000,000,000,000,000,000,000 | 4 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
png_set_compression_mem_level(png_structrp png_ptr, int mem_level)
{
png_debug(1, "in png_set_compression_mem_level");
if (png_ptr == NULL)
return;
png_ptr->zlib_mem_level = mem_level;
} | 0 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 201,565,904,247,605,000,000,000,000,000,000,000,000 | 9 | [libpng16] Reject attempt to write over-length PLTE chunk |
static unsigned long nested_svm_get_tdp_cr3(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
return svm->nested.nested_cr3;
} | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 85,685,546,664,129,400,000,000,000,000,000,000,000 | 6 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
inline void TDStretch::overlap(SAMPLETYPE *pOutput, const SAMPLETYPE *pInput, uint ovlPos) const
{
#ifndef USE_MULTICH_ALWAYS
if (channels == 1)
{
// mono sound.
overlapMono(pOutput, pInput + ovlPos);
}
else if (channels == 2)
{
// stereo sound
overlapStere... | 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 230,464,672,320,538,540,000,000,000,000,000,000,000 | 20 | Replaced illegal-number-of-channel assertions with run-time exception |
static bool cmd_data_set_management(IDEState *s, uint8_t cmd)
{
switch (s->feature) {
case DSM_TRIM:
if (s->bs) {
ide_sector_start_dma(s, IDE_DMA_TRIM);
return false;
}
break;
}
ide_abort_command(s);
return true;
} | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 291,970,543,824,048,440,000,000,000,000,000,000,000 | 14 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
xmlXPathIntersection (xmlNodeSetPtr nodes1, xmlNodeSetPtr nodes2) {
xmlNodeSetPtr ret = xmlXPathNodeSetCreate(NULL);
int i, l1;
xmlNodePtr cur;
if (ret == NULL)
return(ret);
if (xmlXPathNodeSetIsEmpty(nodes1))
return(ret);
if (xmlXPathNodeSetIsEmpty(nodes2))
return(ret);
l1 = xml... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 79,441,984,716,653,820,000,000,000,000,000,000,000 | 21 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
BOOL rdp_set_error_info(rdpRdp* rdp, UINT32 errorInfo)
{
rdp->errorInfo = errorInfo;
if (rdp->errorInfo != ERRINFO_SUCCESS)
{
rdpContext* context = rdp->context;
rdp_print_errinfo(rdp->errorInfo);
if (context)
{
freerdp_set_last_error_log(context, MAKE_FREERDP_ERROR(ERRINFO, errorInfo));
if (context... | 0 | [
"CWE-125"
] | FreeRDP | 9301bfe730c66180263248b74353daa99f5a969b | 12,089,162,830,875,085,000,000,000,000,000,000,000 | 31 | Fixed #6007: Boundary checks in rdp_read_flow_control_pdu |
int kvm_vcpu_yield_to(struct kvm_vcpu *target)
{
struct pid *pid;
struct task_struct *task = NULL;
int ret = 0;
rcu_read_lock();
pid = rcu_dereference(target->pid);
if (pid)
task = get_pid_task(pid, PIDTYPE_PID);
rcu_read_unlock();
if (!task)
return ret;
ret = yield_to(task, 1);
put_task_struct(task);
... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 270,549,016,327,109,800,000,000,000,000,000,000,000 | 18 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
isdn_ppp_free(isdn_net_local *lp)
{
struct ippp_struct *is;
if (lp->ppp_slot < 0 || lp->ppp_slot >= ISDN_MAX_CHANNELS) {
printk(KERN_ERR "%s: ppp_slot(%d) out of range\n",
__func__, lp->ppp_slot);
return 0;
}
#ifdef CONFIG_ISDN_MPP
spin_lock(&lp->netdev->pb->lock);
#endif
isdn_net_rm_from_bundle(lp)... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 212,325,776,886,574,900,000,000,000,000,000,000,000 | 40 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
static int sys_bsd_setgroups(gid_t primary_gid, int setlen, const gid_t *gidset)
{
gid_t *new_gidset = NULL;
int max;
int ret;
/* setgroups(2) will fail with EINVAL if we pass too many groups. */
max = groups_max();
/* No group list, just make sure we are setting the efective GID. */
if (setlen == 0) {
retur... | 0 | [
"CWE-20"
] | samba | d77a74237e660dd2ce9f1e14b02635f8a2569653 | 223,937,633,724,546,800,000,000,000,000,000,000,000 | 48 | s3: nmbd: Fix bug 10633 - nmbd denial of service
The Linux kernel has a bug in that it can give spurious
wakeups on a non-blocking UDP socket for a non-deliverable packet.
When nmbd was changed to use non-blocking sockets it
became vulnerable to a spurious wakeup from poll/epoll.
Fix sys_recvfile() to return on EWOU... |
static int read_into_chunked_item(conn *c) {
int total = 0;
int res;
assert(c->rcurr != c->ritem);
while (c->rlbytes > 0) {
item_chunk *ch = (item_chunk *)c->ritem;
int unused = ch->size - ch->used;
/* first check if we have leftovers in the conn_read buffer */
if (c->rb... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 202,280,152,358,877,800,000,000,000,000,000,000,000 | 55 | CVE reported by cisco talos |
Guint FoFiTrueType::doMapToVertGID(Guint orgGID)
{
Guint lookupCount;
Guint lookupListIndex;
Guint i;
Guint gid = 0;
Guint pos;
pos = gsubFeatureTable+2;
lookupCount = getU16BE(pos,&parsedOk);
pos += 2;
for (i = 0;i < lookupCount;i++) {
lookupListIndex = getU16BE(pos,&parsedOk);
pos += 2;
... | 0 | [
"CWE-125"
] | poppler | cdb7ad95f7c8fbf63ade040d8a07ec96467042fc | 155,152,549,368,704,470,000,000,000,000,000,000,000 | 20 | Fix malformed file crash in bug #85243 |
static void StartAttribute(GF_SceneDumper *sdump, const char *name)
{
if (!sdump->trace) return;
if (!sdump->XMLDump) {
DUMP_IND(sdump);
gf_fprintf(sdump->trace, "%s ", name);
} else {
gf_fprintf(sdump->trace, " %s=\"", name);
}
} | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 120,508,540,960,702,590,000,000,000,000,000,000,000 | 10 | fixed #2232 |
static pyc_object *copy_object(pyc_object *object) {
pyc_object *copy = R_NEW0 (pyc_object);
if (!copy || !object) {
free (copy);
return NULL;
}
copy->type = object->type;
if ((int)object->type == 0) {
// do nothing
} else
switch (object->type) {
case TYPE_NULL:
break;
case TYPE_TUPLE:
case TYPE_SMALL... | 0 | [
"CWE-416"
] | radare2 | 8525ad0b9fd596f4b251bb3d7b114e6dc7ce1ee8 | 243,379,904,924,008,400,000,000,000,000,000,000,000 | 78 | Fix bins/*/rep8 - UAF crash in pyc parser ##crash
* Reported by Cen Zhang via huntr.dev |
concat (char *out, char *in1, char *in2, int l1, int l2)
{
while (l1--)
*out++ = *in1++;
while (l2--)
*out++ = *in2++;
} | 0 | [
"CWE-125"
] | exim | 57aa14b216432be381b6295c312065b2fd034f86 | 317,429,078,069,256,200,000,000,000,000,000,000,000 | 7 | Fix SPA authenticator, checking client-supplied data before using it. Bug 2571 |
static int scsi_disk_emulate_mode_sense(SCSIDiskReq *r, uint8_t *outbuf)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
uint64_t nb_sectors;
int page, dbd, buflen, ret, page_control;
uint8_t *p;
uint8_t dev_specific_param;
dbd = r->req.cmd.buf[1] & 0x8;
page = r->req.cmd.... | 0 | [
"CWE-119",
"CWE-787"
] | qemu | 103b40f51e4012b3b0ad20f615562a1806d7f49a | 257,938,227,221,607,180,000,000,000,000,000,000,000 | 88 | scsi-disk: commonize iovec creation between reads and writes
Also, consistently use qiov.size instead of iov.iov_len.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
static NTSTATUS smb2cli_inbuf_parse_compound(struct smbXcli_conn *conn,
uint8_t *buf,
size_t buflen,
TALLOC_CTX *mem_ctx,
struct iovec **piov, int *pnum_iov)
{
struct iovec *iov;
int num_iov = 0;
size_t taken = 0;
uint8_t *first_hdr = buf;
size_t verified_buflen = 0;
uint8_... | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 37,818,249,963,966,856,000,000,000,000,000,000,000 | 170 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
bool print_addr_hint_cb(ut64 addr, const RzVector /*<const RzAnalysisAddrHintRecord>*/ *records, void *user) {
HintNode *node = RZ_NEW0(HintNode);
if (!node) {
return false;
}
node->addr = addr;
node->type = HINT_NODE_ADDR;
node->addr_hints = records;
rz_rbtree_insert(user, &addr, &node->rb, hint_node_cmp, NUL... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 119,462,049,925,170,840,000,000,000,000,000,000,000 | 11 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
bool Column_definition::create_interval_from_interval_list(MEM_ROOT *mem_root,
bool reuse_interval_list_values)
{
DBUG_ENTER("Column_definition::create_interval_from_interval_list");
DBUG_ASSERT(!interval);
if (!(interval= (TYPELIB*) alloc_root(mem_root, sizeof(TYPEL... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 309,252,867,228,154,380,000,000,000,000,000,000,000 | 78 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
R_API int r_bin_add(RBin *bin, RBinPlugin *foo) {
RListIter *it;
RBinPlugin *plugin;
if (foo->init) {
foo->init (bin->user);
}
r_list_foreach (bin->plugins, it, plugin) {
if (!strcmp (plugin->name, foo->name)) {
return false;
}
}
plugin = R_NEW0 (RBinPlugin);
memcpy (plugin, foo, sizeof (RBinPlugin));
... | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 242,290,224,286,127,880,000,000,000,000,000,000,000 | 16 | Fix #8748 - Fix oobread on string search |
static std::string WC2MB(const std::wstring& input, unsigned int code_page) {
if (input.empty()) {
return "";
}
// There do have other code pages which require the flags to be 0, e.g.,
// 50220, 50211, and so on. But they are not included in our charset
// dictionary. So, only consider 65001 (UTF-8) and ... | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 96,333,175,049,079,330,000,000,000,000,000,000,000 | 25 | fix static file serving security issue; fix url path encoding issue |
int mingw_mkdir(const char *path, int mode)
{
int ret;
wchar_t wpath[MAX_PATH];
if (xutftowcs_path(wpath, path) < 0)
return -1;
ret = _wmkdir(wpath);
if (!ret && needs_hiding(path))
return set_hidden_flag(wpath, 1);
return ret;
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 277,939,125,326,652,860,000,000,000,000,000,000,000 | 11 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
netanalyzer_if_print(netdissect_options *ndo, const struct pcap_pkthdr *h,
const u_char *p)
{
/*
* Fail if we don't have enough data for the Hilscher pseudo-header.
*/
if (h->len < 4 || h->caplen < 4) {
ND_PRINT((ndo, "[|netanalyzer]"));
return (h->caplen);
}
/* Skip the pseudo-header.... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 301,072,299,901,570,500,000,000,000,000,000,000,000 | 14 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
static void gf_m2ts_process_pat(GF_M2TS_Demuxer *ts, GF_M2TS_SECTION_ES *ses, GF_List *sections, u8 table_id, u16 ex_table_id, u8 version_number, u8 last_section_number, u32 status)
{
GF_M2TS_Program *prog;
GF_M2TS_SECTION_ES *pmt;
u32 i, nb_progs, evt_type;
u32 nb_sections;
u32 data_size;
unsigned char *data;
G... | 1 | [
"CWE-416"
] | gpac | 98b727637e32d1d4824101d8947e2dbd573d4fc8 | 256,705,383,909,547,300,000,000,000,000,000,000,000 | 75 | be stricter in PAT processing - cf #1269 |
static void cm_format_req(struct cm_req_msg *req_msg,
struct cm_id_private *cm_id_priv,
struct ib_cm_req_param *param)
{
struct ib_sa_path_rec *pri_path = param->primary_path;
struct ib_sa_path_rec *alt_path = param->alternate_path;
cm_format_mad_hdr(&req_msg->hdr, CM_REQ_ATTR_ID,
cm_form_tid(cm_id_p... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 316,362,408,998,586,800,000,000,000,000,000,000,000 | 79 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
int kvm_arch_init(void *opaque)
{
return 0;
} | 0 | [
"CWE-476"
] | linux | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 | 51,618,142,899,456,100,000,000,000,000,000,000,000 | 4 | KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
The following program causes a kernel oops:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kvm.h>
main()
{
int fd = open("/dev/kvm", O_RDWR);
ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
}
This happe... |
static int sctp_verify_ext_param(struct net *net, union sctp_params param)
{
__u16 num_ext = ntohs(param.p->length) - sizeof(sctp_paramhdr_t);
int have_auth = 0;
int have_asconf = 0;
int i;
for (i = 0; i < num_ext; i++) {
switch (param.ext->chunks[i]) {
case SCTP_CID_AUTH:
have_auth = 1;
break;
case S... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 9de7922bc709eee2f609cd01d98aaedc4cf5ea74 | 38,316,703,079,721,880,000,000,000,000,000,000,000 | 32 | net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks
Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for
ASCONF chunk") added basic verification of ASCONF chunks, however,
it is still possible to remotely crash a server by sending a
special crafted ASCONF chunk, even up to pre 2.6.12 kernels:
... |
static inline void copy_xregs_to_kernel_booting(struct xregs_state *xstate)
{
u64 mask = -1;
u32 lmask = mask;
u32 hmask = mask >> 32;
int err;
WARN_ON(system_state != SYSTEM_BOOTING);
if (boot_cpu_has(X86_FEATURE_XSAVES))
XSTATE_OP(XSAVES, xstate, lmask, hmask, err);
else
XSTATE_OP(XSAVE, xstate, lmask, h... | 0 | [
"CWE-119",
"CWE-732",
"CWE-787"
] | linux | 59c4bd853abcea95eccc167a7d7fd5f1a5f47b98 | 252,098,199,920,099,400,000,000,000,000,000,000,000 | 17 | x86/fpu: Don't cache access to fpu_fpregs_owner_ctx
The state/owner of the FPU is saved to fpu_fpregs_owner_ctx by pointing
to the context that is currently loaded. It never changed during the
lifetime of a task - it remained stable/constant.
After deferred FPU registers loading until return to userland was
implement... |
u32 parse_mpegu(char *arg_val, u32 opt)
{
pack_file = arg_val;
pack_wgt = GF_TRUE;
return 0; | 0 | [
"CWE-787"
] | gpac | 4e56ad72ac1afb4e049a10f2d99e7512d7141f9d | 162,265,608,406,098,040,000,000,000,000,000,000,000 | 6 | fixed #2216 |
R_API int r_core_search_value_in_range(RCore *core, RInterval search_itv, ut64 vmin,
ut64 vmax, int vsize, inRangeCb cb, void *cb_user) {
int i, align = core->search->align, hitctr = 0;
bool vinfun = r_config_get_i (core->config, "anal.vinfun");
bool vinfunr = r_config_get_i (core->config, "anal.vinfunrange");... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 101,542,055,282,549,000,000,000,000,000,000,000,000 | 113 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
static void cm_format_sidr_rep_event(struct cm_work *work)
{
struct cm_sidr_rep_msg *sidr_rep_msg;
struct ib_cm_sidr_rep_event_param *param;
sidr_rep_msg = (struct cm_sidr_rep_msg *)
work->mad_recv_wc->recv_buf.mad;
param = &work->cm_event.param.sidr_rep_rcvd;
param->status = sidr_rep_msg->status;
param->qke... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 318,326,687,554,422,370,000,000,000,000,000,000,000 | 15 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
cmsBool Write16bitTables(cmsContext ContextID, cmsIOHANDLER* io, _cmsStageToneCurvesData* Tables)
{
int j;
cmsUInt32Number i;
cmsUInt16Number val;
int nEntries = 256;
_cmsAssert(Tables != NULL);
nEntries = Tables->TheCurves[0]->nEntries;
for (i=0; i < Tables ->nCurves; i++) {
for... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 201,099,817,218,170,630,000,000,000,000,000,000,000 | 23 | Fixes from coverity check |
OVS_REQUIRES(ct->ct_lock)
{
ovs_assert(conn->conn_type == CT_CONN_TYPE_DEFAULT);
conn_clean_cmn(ct, conn);
if (conn->nat_conn) {
uint32_t hash = conn_key_hash(&conn->nat_conn->key, ct->hash_basis);
cmap_remove(&ct->conns, &conn->nat_conn->cm_node, hash);
}
ovs_list_remove(&conn-... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 107,874,470,479,868,290,000,000,000,000,000,000,000 | 14 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
size_t parse_core(const char *s, size_t n, SemanticValues &sv, Context &c,
any &dt) const override {
return parse_expression(s, n, sv, c, dt, 0);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 34,334,709,192,056,847,000,000,000,000,000,000,000 | 4 | Fix #122 |
int sta_info_insert_rcu(struct sta_info *sta) __acquires(RCU)
{
struct ieee80211_local *local = sta->local;
int err;
might_sleep();
mutex_lock(&local->sta_mtx);
err = sta_info_insert_check(sta);
if (err) {
mutex_unlock(&local->sta_mtx);
rcu_read_lock();
goto out_free;
}
err = sta_info_insert_finish(st... | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 178,728,736,859,598,850,000,000,000,000,000,000,000 | 25 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
static int cieavalidate(i_ctx_t *i_ctx_p, ref *space, float *values, int num_comps)
{
os_ptr op = osp;
if (num_comps < 1)
return_error(gs_error_stackunderflow);
if (!r_has_type(op, t_integer) && !r_has_type(op, t_real))
return_error(gs_error_typecheck);
return 0;
} | 0 | [] | ghostpdl | b326a71659b7837d3acde954b18bda1a6f5e9498 | 257,332,610,768,514,330,000,000,000,000,000,000,000 | 12 | Bug 699655: Properly check the return value....
...when getting a value from a dictionary |
static void enum_aux_records(AvahiServer *s, AvahiInterface *i, const char *name, uint16_t type, void (*callback)(AvahiServer *s, AvahiRecord *r, int flush_cache, void* userdata), void* userdata) {
assert(s);
assert(i);
assert(name);
assert(callback);
if (type == AVAHI_DNS_TYPE_ANY) {
Avahi... | 0 | [
"CWE-399"
] | avahi | 3093047f1aa36bed8a37fa79004bf0ee287929f4 | 146,753,198,746,965,180,000,000,000,000,000,000,000 | 30 | Don't get confused by UDP packets with a source port that is zero
This is a fix for rhbz 475394.
Problem identified by Hugo Dias. |
static CImg<T> get_load_cimg(const char *const filename,
const unsigned int n0, const unsigned int n1,
const unsigned int x0, const unsigned int y0,
const unsigned int z0, const unsigned int c0,
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 183,625,315,193,085,320,000,000,000,000,000,000,000 | 9 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void io_eventfd_put(struct rcu_head *rcu)
{
struct io_ev_fd *ev_fd = container_of(rcu, struct io_ev_fd, rcu);
eventfd_ctx_put(ev_fd->cq_ev_fd);
kfree(ev_fd); | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 38,118,697,624,216,214,000,000,000,000,000,000,000 | 7 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
void gf_sm_dumper_del(GF_SceneDumper *sdump)
{
gf_list_del(sdump->dump_nodes);
while (gf_list_count(sdump->mem_def_nodes)) {
GF_Node *tmp = (GF_Node *)gf_list_get(sdump->mem_def_nodes, 0);
gf_list_rem(sdump->mem_def_nodes, 0);
gf_node_unregister(tmp, NULL);
}
gf_list_del(sdump->mem_def_nodes);
gf_list_del(sd... | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 191,262,423,177,686,430,000,000,000,000,000,000,000 | 17 | fixed #2232 |
int platform_get_irq_byname(struct platform_device *dev, const char *name)
{
struct resource *r;
if (IS_ENABLED(CONFIG_OF_IRQ) && dev->dev.of_node) {
int ret;
ret = of_irq_get_byname(dev->dev.of_node, name);
if (ret > 0 || ret == -EPROBE_DEFER)
return ret;
}
r = platform_get_resource_byname(dev, IORESOU... | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 113,404,236,739,455,020,000,000,000,000,000,000,000 | 15 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
MagickExport Image *DisposeImages(const Image *images,ExceptionInfo *exception)
{
Image
*dispose_image,
*dispose_images;
RectangleInfo
bounds;
register Image
*image,
*next;
/*
Run the image through the animation sequence
*/
assert(images != (Image *) NULL);
assert(images->signat... | 0 | [
"CWE-369"
] | ImageMagick6 | 4f31d78716ac94c85c244efcea368fea202e2ed4 | 279,783,746,081,113,300,000,000,000,000,000,000,000 | 112 | https://github.com/ImageMagick/ImageMagick/issues/1629 |
Value ExpressionType::evaluate(const Document& root) const {
Value val(vpOperand[0]->evaluate(root));
return Value(StringData(typeName(val.getType())));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 54,673,674,860,028,650,000,000,000,000,000,000,000 | 4 | SERVER-38070 fix infinite loop in agg expression |
template<typename t>
CImg<T>& operator+=(const t value) {
if (is_empty()) return *this;
cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=524288))
cimg_rof(*this,ptrd,T) *ptrd = (T)(*ptrd + value);
return *this; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 970,615,797,215,316,400,000,000,000,000,000,000 | 6 | Fix other issues in 'CImg<T>::load_bmp()'. |
int pt_setxattr(FsContext *ctx, const char *path, const char *name, void *value,
size_t size, int flags)
{
return local_setxattr_nofollow(ctx, path, name, value, size, flags);
} | 0 | [
"CWE-772"
] | qemu | 4ffcdef4277a91af15a3c09f7d16af072c29f3f2 | 15,942,573,898,607,360,000,000,000,000,000,000,000 | 5 | 9pfs: xattr: fix memory leak in v9fs_list_xattr
Free 'orig_value' in error path.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
*/
int _php_imap_mail(char *to, char *subject, char *message, char *headers, char *cc, char *bcc, char* rpath)
{
#ifdef PHP_WIN32
int tsm_err;
#else
FILE *sendmail;
int ret;
#endif
#ifdef PHP_WIN32
char *tempMailTo;
char *tsm_errmsg = NULL;
ADDRESS *addr;
char *bufferTo = NULL, *bufferCc = NULL, *bufferBcc = N... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 272,587,444,336,482,660,000,000,000,000,000,000,000 | 159 | Disable rsh/ssh functionality in imap by default (bug #77153) |
vhost_user_set_protocol_features(struct virtio_net **pdev,
struct VhostUserMsg *msg,
int main_fd __rte_unused)
{
struct virtio_net *dev = *pdev;
uint64_t protocol_features = msg->payload.u64;
uint64_t slave_protocol_features = 0;
if (validate_msg_fds(msg, 0) != 0)
return RTE_VHOST_MSG_RESULT_ERR;
rte_vho... | 0 | [] | dpdk | bf472259dde6d9c4dd3ebad2c2b477a168c6e021 | 277,102,550,561,710,700,000,000,000,000,000,000,000 | 27 | vhost: fix possible denial of service by leaking FDs
A malicious Vhost-user master could send in loop hand-crafted
vhost-user messages containing more file descriptors the
vhost-user slave expects. Doing so causes the application using
the vhost-user library to run out of FDs.
This issue has been assigned CVE-2019-14... |
void TcpHealthCheckerImpl::TcpActiveHealthCheckSession::onData(Buffer::Instance& data) {
ENVOY_CONN_LOG(trace, "total pending buffer={}", *client_, data.length());
// TODO(lilika): The TCP health checker does generic pattern matching so we can't differentiate
// between wrong data and not enough data. We could li... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 52,056,369,487,964,060,000,000,000,000,000,000,000 | 15 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static inline unsigned long pages_to_mb(unsigned long npg)
{
return npg >> (20 - PAGE_SHIFT);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 027ef6c87853b0a9df53175063028edb4950d476 | 43,710,989,938,352,840,000,000,000,000,000,000,000 | 4 | mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP
In many places !pmd_present has been converted to pmd_none. For pmds
that's equivalent and pmd_none is quicker so using pmd_none is better.
However (unless we delete pmd_present) we should provide an accurate
pmd_present too. This will avoid the ri... |
void tag_database_dirty(PgDatabase *db)
{
struct List *item;
PgPool *pool;
statlist_for_each(item, &pool_list) {
pool = container_of(item, PgPool, head);
if (pool->db == db)
tag_pool_dirty(pool);
}
} | 0 | [] | pgbouncer | 4b92112b820830b30cd7bc91bef3dd8f35305525 | 243,499,534,750,243,940,000,000,000,000,000,000,000 | 11 | add_database: fail gracefully if too long db name
Truncating & adding can lead to fatal() later.
It was not an issue before, but with audodb (* in [databases] section)
the database name can some from network, thus allowing remote shutdown.. |
void del_random_ready_callback(struct random_ready_callback *rdy)
{
unsigned long flags;
struct module *owner = NULL;
spin_lock_irqsave(&random_ready_list_lock, flags);
if (!list_empty(&rdy->list)) {
list_del_init(&rdy->list);
owner = rdy->owner;
}
spin_unlock_irqrestore(&random_ready_list_lock, flags);
mo... | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 3,948,263,076,743,021,000,000,000,000,000,000,000 | 14 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
read_tube_block (FILE *f,
gint image_ID,
guint total_len,
PSPimage *ia)
{
guint16 version;
guchar name[514];
guint32 step_size, column_count, row_count, cell_count;
guint32 placement_mode, selection_mode... | 0 | [
"CWE-787"
] | gimp | 48ec15890e1751dede061f6d1f469b6508c13439 | 224,309,386,365,681,360,000,000,000,000,000,000,000 | 73 | file-psp: fix for bogus input data. Fixes bug #639203 |
static int get_max_inline_xattr_value_size(struct inode *inode,
struct ext4_iloc *iloc)
{
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_entry *entry;
struct ext4_inode *raw_inode;
int free, min_offs;
min_offs = EXT4_SB(inode->i_sb)->s_inode_size -
EXT4_GOOD_OLD_INODE_SIZE -
EXT4_I(inode)... | 0 | [
"CWE-416"
] | linux | 117166efb1ee8f13c38f9e96b258f16d4923f888 | 23,006,197,447,531,240,000,000,000,000,000,000,000 | 56 | ext4: do not allow external inodes for inline data
The inline data feature was implemented before we added support for
external inodes for xattrs. It makes no sense to support that
combination, but the problem is that there are a number of extended
attribute checks that are skipped if e_value_inum is non-zero.
Unfor... |
static int __hidp_send_ctrl_message(struct hidp_session *session,
unsigned char hdr, unsigned char *data,
int size)
{
struct sk_buff *skb;
BT_DBG("session %p data %p size %d", session, data, size);
if (atomic_read(&session->terminate))
return -EIO;
skb = alloc_skb(size + 1, GFP_ATOMIC);
if (!s... | 0 | [
"CWE-200"
] | linux | 0a9ab9bdb3e891762553f667066190c1d22ad62b | 194,436,830,689,364,260,000,000,000,000,000,000,000 | 25 | Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()
The length parameter should be sizeof(req->name) - 1 because there is no
guarantee that string provided by userspace will contain the trailing
'\0'.
Can be easily reproduced by manually setting req->name to 128 non-zero
bytes prior to ioctl(HIDPCONNADD) and check... |
static void AppLayerProtoDetectFreeProbingParsers(AppLayerProtoDetectProbingParser *pp)
{
SCEnter();
AppLayerProtoDetectProbingParser *tmp_pp = NULL;
if (pp == NULL)
goto end;
while (pp != NULL) {
tmp_pp = pp->next;
AppLayerProtoDetectProbingParserFree(pp);
pp = tmp_pp... | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 318,483,309,752,697,540,000,000,000,000,000,000,000 | 18 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
int32_t cli_bcapi_hashset_remove(struct cli_bc_ctx *ctx , int32_t id, uint32_t key)
{
struct cli_hashset *s = get_hashset(ctx, id);
if (!s)
return -1;
return cli_hashset_removekey(s, key);
} | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 24,033,274,528,873,460,000,000,000,000,000,000,000 | 7 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
void gdImagePaletteCopy (gdImagePtr to, gdImagePtr from)
{
int i;
int x, y, p;
int xlate[256];
if (to->trueColor || from->trueColor) {
return;
}
for (i = 0; i < 256; i++) {
xlate[i] = -1;
}
for (y = 0; y < to->sy; y++) {
for (x = 0; x < to->sx; x++) {
p = gdImageGetPixel(to, x, y);
if (xlate[p] ==... | 0 | [
"CWE-119"
] | php-src | e7f2356665c2569191a946b6fc35b437f0ae1384 | 244,273,979,421,462,600,000,000,000,000,000,000,000 | 38 | Fix #66387: Stack overflow with imagefilltoborder
The stack overflow is caused by the recursive algorithm in combination with a
very large negative coordinate passed to gdImageFillToBorder(). As there is
already a clipping for large positive coordinates to the width and height of
the image, it seems to be consequent t... |
gdev_x_put_params(gx_device * dev, gs_param_list * plist)
{
gx_device_X *xdev = (gx_device_X *) dev;
/*
* Provide copies of values of parameters being set:
* is_open, width, height, HWResolution, IsPageDevice, Max*.
*/
gx_device_X values;
int orig_MaxBitmap = xdev->space_params.MaxBitmap;... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 276,794,799,669,222,400,000,000,000,000,000,000,000 | 126 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
int snd_ctl_create(struct snd_card *card)
{
static const struct snd_device_ops ops = {
.dev_free = snd_ctl_dev_free,
.dev_register = snd_ctl_dev_register,
.dev_disconnect = snd_ctl_dev_disconnect,
};
int err;
if (snd_BUG_ON(!card))
return -ENXIO;
if (snd_BUG_ON(card->number < 0 || card->number >= SNDRV_CA... | 0 | [
"CWE-416",
"CWE-125"
] | linux | 6ab55ec0a938c7f943a4edba3d6514f775983887 | 51,154,577,933,994,680,000,000,000,000,000,000,000 | 22 | ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
Since the user can control the arguments provided to the kernel by the
ioctl() system call, an out-of-bounds bug occurs when the 'id->name'
provided by the user does not end with '\0'.
The following log can reveal it:
[ 10.002313] BUG: KASAN: stack-out-... |
Item *get_copy(THD *thd)
{ return get_item_copy<Item_hex_hybrid>(thd, this); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 271,403,700,548,027,640,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static MOBI_RET mobi_parse_index_entry(MOBIIndx *indx, const MOBIIdxt idxt, const MOBITagx *tagx, const MOBIOrdt *ordt, MOBIBuffer *buf, const size_t curr_number) {
if (indx == NULL) {
debug_print("%s", "INDX structure not initialized\n");
return MOBI_INIT_FAILED;
}
const size_t entry_offset... | 0 | [
"CWE-476"
] | libmobi | ce0ab6586069791b1e8e2a42f44318e581c39939 | 99,473,420,116,885,710,000,000,000,000,000,000,000 | 147 | Fix issue with corrupt files with tagvalues_count = 0 that caused null pointer dereference |
string_isupper(PyStringObject *self)
{
register const unsigned char *p
= (unsigned char *) PyString_AS_STRING(self);
register const unsigned char *e;
int cased;
/* Shortcut for single character strings */
if (PyString_GET_SIZE(self) == 1)
return PyBool_FromLong(isupper(*p) != 0);
... | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 168,275,164,279,571,550,000,000,000,000,000,000,000 | 25 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
SPL_METHOD(SplObjectStorage, getHash)
{
zval *obj;
char *hash;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o", &obj) == FAILURE) {
return;
}
hash = emalloc(33);
php_spl_object_hash(obj, hash TSRMLS_CC);
RETVAL_STRING(hash, 0);
} /* }}} */ | 1 | [
"CWE-416"
] | php-src | c2e197e4efc663ca55f393bf0e799848842286f3 | 156,620,799,453,102,560,000,000,000,000,000,000,000 | 15 | Fix bug #70168 - Use After Free Vulnerability in unserialize() with SplObjectStorage |
static void scalar_min_max_arsh(struct bpf_reg_state *dst_reg,
struct bpf_reg_state *src_reg)
{
u64 umin_val = src_reg->umin_value;
/* Upon reaching here, src_known is true and umax_val is equal
* to umin_val.
*/
dst_reg->smin_value >>= umin_val;
dst_reg->smax_value >>= umin_val;
dst_reg->var_off = tnum_... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 157,473,989,494,475,100,000,000,000,000,000,000,000 | 26 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
static MaybeLocal<Value> GetX509NameObject(Environment* env, X509* cert) {
X509_NAME* name = get_name(cert);
CHECK_NOT_NULL(name);
int cnt = X509_NAME_entry_count(name);
CHECK_GE(cnt, 0);
Local<Object> result =
Object::New(env->isolate(), Null(env->isolate()), nullptr, nullptr, 0);
if (result.IsEmpt... | 0 | [
"CWE-295"
] | node | a336444c7fb9fd1d0055481d84cdd57d7d569879 | 153,268,819,361,709,940,000,000,000,000,000,000,000 | 85 | tls: fix handling of x509 subject and issuer
When subject and verifier are represented as strings, escape special
characters (such as '+') to guarantee unambiguity. Previously, different
distinguished names could result in the same string when encoded. In
particular, inserting a '+' in a single-value Relative Distingu... |
CImg<_cimg_Ttfloat> get_solve(const CImg<t>& A, const bool use_LU=false) const {
typedef _cimg_Ttfloat Ttfloat;
return CImg<Ttfloat>(*this,false).solve(A,use_LU);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 101,612,431,420,972,860,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
struct btrfs_path *btrfs_alloc_path(void)
{
struct btrfs_path *path;
path = kmem_cache_zalloc(btrfs_path_cachep, GFP_NOFS);
return path;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339 | 164,282,362,144,643,340,000,000,000,000,000,000,000 | 6 | Btrfs: make xattr replace operations atomic
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the x... |
static int prec(enum js_AstType type)
{
switch (type) {
case AST_IDENTIFIER:
case EXP_IDENTIFIER:
case EXP_NUMBER:
case EXP_STRING:
case EXP_REGEXP:
case EXP_UNDEF:
case EXP_NULL:
case EXP_TRUE:
case EXP_FALSE:
case EXP_THIS:
case EXP_ARRAY:
case EXP_OBJECT:
return 170;
case EXP_FUN:
case EXP_INDEX:
... | 0 | [
"CWE-476"
] | mujs | f5b3c703e18725e380b83427004632e744f85a6f | 306,559,970,460,768,770,000,000,000,000,000,000,000 | 99 | Issue #161: Cope with empty programs in mujs-pp. |
static int qcow2_load_vmstate(BlockDriverState *bs, uint8_t *buf,
int64_t pos, int size)
{
BDRVQcowState *s = bs->opaque;
int growable = bs->growable;
bool zero_beyond_eof = bs->zero_beyond_eof;
int ret;
BLKDBG_EVENT(bs->file, BLKDBG_VMSTATE_LOAD);
bs->growable = 1... | 0 | [
"CWE-476"
] | qemu | 11b128f4062dd7f89b14abc8877ff20d41b28be9 | 331,692,766,298,454,040,000,000,000,000,000,000,000 | 17 | qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshot... |
void rtl8xxxu_fill_iqk_matrix_a(struct rtl8xxxu_priv *priv, bool iqk_ok,
int result[][8], int candidate, bool tx_only)
{
u32 oldval, x, tx0_a, reg;
int y, tx0_c;
u32 val32;
if (!iqk_ok)
return;
val32 = rtl8xxxu_read32(priv, REG_OFDM0_XA_TX_IQ_IMBALANCE);
oldval = val32 >> 22;
x = result[candidate][0];
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 177,551,788,972,231,600,000,000,000,000,000,000,000 | 76 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
static void sungem_update_status(SunGEMState *s, uint32_t bits, bool val)
{
uint32_t stat;
stat = s->gregs[GREG_STAT >> 2];
if (val) {
stat |= bits;
} else {
stat &= ~bits;
}
s->gregs[GREG_STAT >> 2] = stat;
sungem_eval_irq(s);
} | 0 | [
"CWE-835"
] | qemu | 8c92060d3c0248bd4d515719a35922cd2391b9b4 | 214,406,158,339,271,260,000,000,000,000,000,000,000 | 13 | sungem: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande... |
TEST_P(ProtocolIntegrationTest, MultipleSetCookies) {
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
Http::TestResponseHeaderMapImpl response_headers{
{":status", "200"}, {"set-cookie", "foo"}, {"set-cookie", "bar"}};
auto response = sendRequestAndWaitForResponse(default_request_... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 219,500,115,598,498,700,000,000,000,000,000,000,000 | 19 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
nfsd4_encode_rename(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_rename *rename)
{
struct xdr_stream *xdr = &resp->xdr;
__be32 *p;
if (!nfserr) {
p = xdr_reserve_space(xdr, 40);
if (!p)
return nfserr_resource;
p = encode_cinfo(p, &rename->rn_sinfo);
p = encode_cinfo(p, &rename->rn_tinfo);
... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 52,067,851,523,365,120,000,000,000,000,000,000,000 | 14 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
static int ssl_security_cert_sig(SSL *s, SSL_CTX *ctx, X509 *x, int op)
{
/* Lookup signature algorithm digest */
int secbits = -1, md_nid = NID_undef, sig_nid;
sig_nid = X509_get_signature_nid(x);
if (sig_nid && OBJ_find_sigid_algs(sig_nid, &md_nid, NULL))
{
const EVP_MD *md;
if (md_nid && (md = EVP_get_dig... | 0 | [] | openssl | 80bd7b41b30af6ee96f519e629463583318de3b0 | 101,156,393,288,636,800,000,000,000,000,000,000,000 | 16 | Fix SRP ciphersuite DoS vulnerability.
If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.
Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.
CVE-201... |
bgp_packet_set_marker (struct stream *s, u_char type)
{
int i;
/* Fill in marker. */
for (i = 0; i < BGP_MARKER_SIZE; i++)
stream_putc (s, 0xff);
/* Dummy total length. This field is should be filled in later on. */
stream_putw (s, 0);
/* BGP packet type. */
stream_putc (s, type);
/* Return curr... | 0 | [
"CWE-119"
] | quagga | 5861739f8c38bc36ea9955e5cb2be2bf2f482d70 | 95,562,112,133,381,900,000,000,000,000,000,000,000 | 17 | bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS
* bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are
detected, and the code will stop processing the OPEN and return. However
it does so without calling bgp_notify_send to send a NOTIFY - which means
the peer FSM doesn't g... |
png_read_filter_row(png_structrp pp, png_row_infop row_info, png_bytep row,
png_const_bytep prev_row, int filter)
{
/* OPTIMIZATION: DO NOT MODIFY THIS FUNCTION, instead #define
* PNG_FILTER_OPTIMIZATIONS to a function that overrides the generic
* implementations. See png_init_filter_functions above.
... | 0 | [
"CWE-190",
"CWE-369"
] | libpng | 8a05766cb74af05c04c53e6c9d60c13fc4d59bf2 | 36,131,553,456,958,800,000,000,000,000,000,000,000 | 15 | [libpng16] Fix the calculation of row_factor in png_check_chunk_length
(Bug report by Thuan Pham, SourceForge issue #278) |
void afra_box_del(GF_Box *s)
{
GF_AdobeFragRandomAccessBox *ptr = (GF_AdobeFragRandomAccessBox *)s;
if (ptr == NULL) return;
while (gf_list_count(ptr->local_access_entries)) {
gf_free(gf_list_get(ptr->local_access_entries, 0));
gf_list_rem(ptr->local_access_entries, 0);
}
gf_list_del(ptr->local_access_entries... | 0 | [
"CWE-125"
] | gpac | 093283e727f396130651280609e687cd4778e0d1 | 154,441,408,509,164,640,000,000,000,000,000,000,000 | 19 | fixed #1564 |
dissect_tcpopt_rvbd_probe(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
guint8 ver, type;
proto_tree *field_tree;
proto_item *pitem;
proto_item *length_item;
int offset = 0,
optlen = tvb_reported_length(tvb);
struct tcpheader *tcph = (struct tcpheader*)data;
pit... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 53,817,146,921,350,480,000,000,000,000,000,000,000 | 206 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
static char *get_local_name(struct file_list *flist, char *dest_path)
{
STRUCT_STAT st;
int statret, trailing_slash;
char *cp;
if (DEBUG_GTE(RECV, 1)) {
rprintf(FINFO, "get_local_name count=%d %s\n",
file_total, NS(dest_path));
}
if (!dest_path || list_only)
return NULL;
/* Treat an empty string as a c... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 323,614,097,103,203,640,000,000,000,000,000,000,000 | 148 | Some extra file-list safety checks. |
static noinline void btrfs_del_leaf(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path,
struct extent_buffer *leaf)
{
WARN_ON(btrfs_header_generation(leaf) != trans->transid);
del_ptr(root, path, 1, path->slots[1]);
/*
* btrfs_free_extent is expensive, we wa... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339 | 216,523,924,729,097,730,000,000,000,000,000,000,000 | 20 | Btrfs: make xattr replace operations atomic
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the x... |
void testUriUserInfoHostPort3() {
// User info without ":", no port
UriParserStateA stateA;
UriUriA uriA;
stateA.uri = &uriA;
// 0 4 0 3 0 7 01 0 9
const char * const input = "http" "://" "abcdefg" "@" "localhost";
TEST_ASSERT(0 == uriParseUriA(&stateA, input))... | 0 | [
"CWE-787"
] | uriparser | 864f5d4c127def386dd5cc926ad96934b297f04e | 326,302,897,812,754,330,000,000,000,000,000,000,000 | 17 | UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex
Reported by Google Autofuzz team |
GF_Box *csgp_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_CompactSampleGroupBox, GF_ISOM_BOX_TYPE_CSGP);
return (GF_Box *)tmp; | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 122,412,408,677,261,770,000,000,000,000,000,000,000 | 5 | fixed #1757 |
void manager_enumerate(Manager *m) {
UnitType c;
assert(m);
/* Let's ask every type to load all units from disk/kernel
* that it might know */
for (c = 0; c < _UNIT_TYPE_MAX; c++) {
if (!unit_type_supported(c)) {
log_debug("Unit type .%s... | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 240,364,942,364,572,500,000,000,000,000,000,000,000 | 21 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
ClientRequestContext::ClientRequestContext(ClientHttpRequest *anHttp) :
http(cbdataReference(anHttp)),
acl_checklist(NULL),
redirect_state(REDIRECT_NONE),
store_id_state(REDIRECT_NONE),
host_header_verify_done(false),
http_access_done(false),
adapted_http_access_done(false),
#if USE_ADAPTATI... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 193,101,068,739,356,800,000,000,000,000,000,000,000 | 24 | Handle more Range requests (#790)
Also removed some effectively unused code. |
int DaemonServer::init(uint64_t gid, entity_addr_t client_addr)
{
// Initialize Messenger
std::string public_msgr_type = g_conf->ms_public_type.empty() ?
g_conf->get_val<std::string>("ms_type") : g_conf->ms_public_type;
msgr = Messenger::create(g_ceph_context, public_msgr_type,
entity_name_t::MGR(gid),
... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 235,367,306,239,380,230,000,000,000,000,000,000,000 | 43 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
void upstream_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
auto downstream = static_cast<Downstream *>(w->data);
auto upstream = downstream->get_upstream();
auto which = revents == EV_READ ? "read" : "write";
if (LOG_ENABLED(INFO)) {
DLOG(INFO, downstream) << "upstream timeout stream_id="
... | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 202,220,446,119,303,280,000,000,000,000,000,000,000 | 16 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
template<typename t>
CImg<_cimg_Tt> operator+(const CImg<t>& img) const {
return CImg<_cimg_Tt>(*this,false)+=img; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 164,364,661,907,671,950,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
void hvcc_del(GF_Box *s)
{
GF_HEVCConfigurationBox *ptr = (GF_HEVCConfigurationBox*)s;
if (ptr->config) gf_odf_hevc_cfg_del(ptr->config);
gf_free(ptr);
} | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 339,227,990,912,655,120,000,000,000,000,000,000,000 | 6 | fix some exploitable overflows (#994, #997) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.