func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
GF_Err smhd_box_read(GF_Box *s, GF_BitStream *bs) { GF_SoundMediaHeaderBox *ptr = (GF_SoundMediaHeaderBox *)s; ISOM_DECREASE_SIZE(ptr, 4); ptr->balance = gf_bs_read_u16(bs); ptr->reserved = gf_bs_read_u16(bs); return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
180,551,667,150,491,780,000,000,000,000,000,000,000
8
fixed #1587
static int cma_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *ib_event) { struct rdma_id_private *listen_id, *conn_id; struct rdma_cm_event event; int offset, ret; u8 smac[ETH_ALEN]; u8 alt_smac[ETH_ALEN]; u8 *psmac = smac; u8 *palt_smac = alt_smac; int is_iboe = ((rdma_node_get_transport(cm_id->device...
1
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
99,678,922,005,342,340,000,000,000,000,000,000,000
101
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...
static errno_t sdap_add_incomplete_groups(struct sysdb_ctx *sysdb, struct sss_domain_info *domain, struct sdap_options *opts, char **groupnames, struct ...
0
[ "CWE-264" ]
sssd
0b6b4b7669b46d3d0b0ebefbc0e1621965444717
107,084,813,129,582,110,000,000,000,000,000,000,000
204
IPA: process non-posix nested groups Do not expect objectClass to be posixGroup but rather more general groupofnames. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit bc8c93ffe881271043492c938c626a9be948000e)
static int write_segment_descriptor(struct x86_emulate_ctxt *ctxt, u16 selector, struct desc_struct *desc) { int rc; ulong addr; rc = get_descriptor_ptr(ctxt, selector, &addr); if (rc != X86EMUL_CONTINUE) return rc; return ctxt->ops->write_std(ctxt, addr, desc, sizeof *desc, &ctxt->exception); ...
0
[ "CWE-284" ]
linux
33ab91103b3415e12457e3104f0e4517ce12d0f3
264,425,716,503,036,650,000,000,000,000,000,000,000
13
KVM: x86: fix emulation of "MOV SS, null selector" This is CVE-2017-2583. On Intel this causes a failed vmentry because SS's type is neither 3 nor 7 (even though the manual says this check is only done for usable SS, and the dmesg splat says that SS is unusable!). On AMD it's worse: svm.c is confused and sets CPL to ...
vmxnet3_msix_save(QEMUFile *f, void *opaque) { PCIDevice *d = PCI_DEVICE(opaque); msix_save(d, f); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
154,520,330,720,157,740,000,000,000,000,000,000,000
5
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static void __hrtimer_init(struct hrtimer *timer, clockid_t clock_id, enum hrtimer_mode mode) { struct hrtimer_cpu_base *cpu_base; int base; memset(timer, 0, sizeof(struct hrtimer)); cpu_base = raw_cpu_ptr(&hrtimer_bases); if (clock_id == CLOCK_REALTIME && mode != HRTIMER_MODE_ABS) clock_id = CLOCK_MONO...
1
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
19,936,793,260,419,643,000,000,000,000,000,000,000
23
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static SOCKET mg_open_listener(const char *url, struct mg_addr *addr) { SOCKET fd = INVALID_SOCKET; int s_err = 0; // Memoized socket error, in case closesocket() overrides it memset(addr, 0, sizeof(*addr)); addr->port = mg_htons(mg_url_port(url)); if (!mg_aton(mg_url_host(url), addr)) { LOG(LL_ERROR, ("...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
200,422,151,944,373,330,000,000,000,000,000,000,000
62
Protect against the directory traversal in mg_upload()
size_t getStringObjectSdsUsedMemory(robj *o) { serverAssertWithInfo(NULL,o,o->type == OBJ_STRING); switch(o->encoding) { case OBJ_ENCODING_RAW: return sdsZmallocSize(o->ptr); case OBJ_ENCODING_EMBSTR: return zmalloc_size(o)-sizeof(robj); default: return 0; /* Just integer encoding for now. */ } ...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
172,220,133,631,679,280,000,000,000,000,000,000,000
8
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
int sqlite3ExprIsConstantOrFunction(Expr *p, u8 isInit){ assert( isInit==0 || isInit==1 ); return exprIsConst(p, 4+isInit, 0); }
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
7,848,838,947,359,911,000,000,000,000,000,000,000
4
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static void event_nick_invalid(IRC_SERVER_REC *server, const char *data) { if (!server->connected) server_disconnect((SERVER_REC *) server); }
1
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
167,990,622,665,683,800,000,000,000,000,000,000,000
5
Merge branch 'security' into 'master' See merge request !7
xmlParserGetDirectory(const char *filename) { char *ret = NULL; char dir[1024]; char *cur; #ifdef _WIN32_WCE /* easy way by now ... wince does not have dirs! */ return NULL; #endif if (xmlInputCallbackInitialized == 0) xmlRegisterDefaultInputCallbacks(); if (filename == NULL) return(NULL); ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
96,138,164,743,712,100,000,000,000,000,000,000,000
40
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
set_icr(E1000State *s, int index, uint32_t val) { DBGOUT(INTERRUPT, "set_icr %x\n", val); set_interrupt_cause(s, 0, s->mac_reg[ICR] & ~val); }
0
[ "CWE-120" ]
qemu
b0d9ffcd0251161c7c92f94804dcf599dfa3edeb
114,218,132,018,418,970,000,000,000,000,000,000,000
5
e1000: Discard packets that are too long if !SBP and !LPE The e1000_receive function for the e1000 needs to discard packets longer than 1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes this behavior and allocates memory based on this assumption. Signed-off-by: Michael Contreras <michael@inet...
explicit MarkdownDispatcher(bool s): Dispatcher(g_ceph_context), lock("MarkdownDispatcher::lock"), last_mark(false) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
153,693,826,807,185,570,000,000,000,000,000,000,000
2
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 ...
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan) { int err = -EBUSY; /* lock against __dma_request_channel */ mutex_lock(&dma_list_mutex); if (chan->client_count == 0) { err = dma_chan_get(chan); if (err) pr_debug("%s: failed to get %s: (%d)\n", __func__, dma_chan_name(chan), err); } else...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
22,139,157,092,904,600,000,000,000,000,000,000,000
20
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static struct ucma_context *ucma_alloc_ctx(struct ucma_file *file) { struct ucma_context *ctx; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) return NULL; INIT_WORK(&ctx->close_work, ucma_close_id); refcount_set(&ctx->ref, 1); init_completion(&ctx->comp); /* So list_del() will work if we don't do ucma_fi...
0
[ "CWE-416" ]
linux
f5449e74802c1112dea984aec8af7a33c4516af1
217,403,585,487,642,860,000,000,000,000,000,000,000
22
RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concu...
static int tcos_set_security_env(sc_card_t *card, const sc_security_env_t *env, int se_num) { sc_context_t *ctx; sc_apdu_t apdu; u8 sbuf[SC_MAX_APDU_BUFFER_SIZE], *p; int r, default_key, tcos3; tcos_data *data; assert(card != NULL && env != NULL); ctx = card->ctx; tcos3=(card->type==SC_CARD_TYPE_TCOS_V3); dat...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
206,658,931,004,825,460,000,000,000,000,000,000,000
57
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
static long kvm_vm_compat_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm *kvm = filp->private_data; int r; if (kvm->mm != current->mm) return -EIO; switch (ioctl) { case KVM_GET_DIRTY_LOG: { struct compat_kvm_dirty_log compat_log; struct kvm_dirty_log log; r = -EFAULT;...
0
[ "CWE-399" ]
linux
e40f193f5bb022e927a57a4f5d5194e4f12ddb74
104,613,015,814,665,350,000,000,000,000,000,000,000
32
KVM: Fix iommu map/unmap to handle memory slot moves The iommu integration into memory slots expects memory slots to be added or removed and doesn't handle the move case. We can unmap slots from the iommu after we mark them invalid and map them before installing the final memslot array. Also re-order the kmemdup vs ...
__u32 ext4_free_group_clusters(struct super_block *sb, struct ext4_group_desc *bg) { return le16_to_cpu(bg->bg_free_blocks_count_lo) | (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ? (__u32)le16_to_cpu(bg->bg_free_blocks_count_hi) << 16 : 0); }
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
228,076,339,132,247,950,000,000,000,000,000,000,000
7
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
void rt_add_uncached_list(struct rtable *rt) { struct uncached_list *ul = raw_cpu_ptr(&rt_uncached_list); rt->rt_uncached_list = ul; spin_lock_bh(&ul->lock); list_add_tail(&rt->rt_uncached, &ul->head); spin_unlock_bh(&ul->lock); }
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
337,954,286,314,561,240,000,000,000,000,000,000,000
10
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
static int get_mtu(char *name) { int idx; idx = if_nametoindex(name); if (idx < 0) return -1; return netdev_get_mtu(idx); }
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
108,864,817,462,767,160,000,000,000,000,000,000,000
9
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
xfrm_policy_inexact_lookup(struct net *net, u8 type, u16 family, u8 dir, u32 if_id) { struct xfrm_pol_inexact_bin *bin; lockdep_assert_held(&net->xfrm.xfrm_policy_lock); rcu_read_lock(); bin = xfrm_policy_inexact_lookup_rcu(net, type, family, dir, if_id); rcu_read_unlock(); return bin; }
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
272,695,731,152,687,030,000,000,000,000,000,000,000
13
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
void close() { if (m_file) { if (m_file != stdout) fclose(m_file); else fflush(m_file); } m_file= NULL; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
72,253,136,091,559,760,000,000,000,000,000,000,000
10
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static inline struct cfs_rq *cpu_cfs_rq(struct cfs_rq *cfs_rq, int this_cpu) { return cfs_rq->tg->cfs_rq[this_cpu]; }
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
287,617,179,834,259,200,000,000,000,000,000,000,000
4
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
v8::Local<v8::Value> WebContents::GetNativeView() const { gfx::NativeView ptr = web_contents()->GetNativeView(); auto buffer = node::Buffer::Copy(isolate(), reinterpret_cast<char*>(&ptr), sizeof(gfx::NativeView)); if (buffer.IsEmpty()) return v8::Null(isolate()); else ...
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
170,029,664,205,713,220,000,000,000,000,000,000,000
9
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
static void virtio_device_class_init(ObjectClass *klass, void *data) { /* Set the default value here. */ DeviceClass *dc = DEVICE_CLASS(klass); dc->realize = virtio_device_realize; dc->unrealize = virtio_device_unrealize; dc->bus_type = TYPE_VIRTIO_BUS; }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
334,869,602,626,652,700,000,000,000,000,000,000,000
9
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
static int sctp_send_asconf_add_ip(struct sock *sk, struct sockaddr *addrs, int addrcnt) { struct sctp_sock *sp; struct sctp_endpoint *ep; struct sctp_association *asoc; struct sctp_bind_addr *bp; struct sctp_chunk *chunk; struct sctp_sockaddr_entry *laddr; union sctp_addr *addr; union ...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
6,400,104,083,416,763,000,000,000,000,000,000,000
107
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
Item *LEX::create_item_limit(THD *thd, const Lex_ident_cli_st *ca, const Lex_ident_cli_st *cb) { DBUG_ASSERT(thd->m_parser_state->m_lip.get_buf() <= ca->pos()); DBUG_ASSERT(ca->pos() <= cb->end()); DBUG_ASSERT(cb->end() <= thd->m_parser_state->m_lip.get_en...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
236,315,544,264,391,250,000,000,000,000,000,000,000
29
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
exif_mnote_data_pentax_clear (ExifMnoteDataPentax *n) { ExifMnoteData *d = (ExifMnoteData *) n; unsigned int i; if (!n) return; if (n->entries) { for (i = 0; i < n->count; i++) if (n->entries[i].data) { exif_mem_free (d->mem, n->entries[i].data); n->entries[i].data = NULL; } exif_mem_free (d->me...
0
[ "CWE-125" ]
libexif
435e21f05001fb03f9f186fa7cbc69454afd00d1
303,306,455,225,778,000,000,000,000,000,000,000,000
18
Fix MakerNote tag size overflow issues at read time. Check for a size overflow while reading tags, which ensures that the size is always consistent for the given components and type of the entry, making checking further down superfluous. This provides an alternate fix for https://sourceforge.net/p/libexif/bugs/125/ C...
u32 gf_isom_get_max_sample_delta(GF_ISOFile *the_file, u32 trackNumber) { GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Media || !trak->Media->information || !trak->Media->information->sampleTable || !trak->Media->information->sampleTable->TimeToSample) return 0; return...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
298,908,651,428,555,270,000,000,000,000,000,000,000
7
fixed #1706
static void percent_rankStepFunc( sqlite3_context *pCtx, int nArg, sqlite3_value **apArg ){ struct CallCount *p; UNUSED_PARAMETER(nArg); assert( nArg==0 ); UNUSED_PARAMETER(apArg); p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p)); if( p ){ p->nTotal++; } }
0
[ "CWE-476" ]
sqlite
75e95e1fcd52d3ec8282edb75ac8cd0814095d54
67,462,948,675,575,740,000,000,000,000,000,000,000
13
When processing constant integer values in ORDER BY clauses of window definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable the constant value to avoid an invalid pointer dereference if the expression is ever duplicated. This fixes a crash report from Yongheng and Rui. FossilOrigin-Name: 1ca0bd982ab11...
static int http_stream_write_single( git_smart_subtransport_stream *stream, const char *buffer, size_t len) { http_stream *s = (http_stream *)stream; http_subtransport *t = OWNING_SUBTRANSPORT(s); git_buf request = GIT_BUF_INIT; assert(t->connected); if (s->sent_request) { giterr_set(GITERR_NET, "Subtranspo...
0
[ "CWE-284" ]
libgit2
b5c6a1b407b7f8b952bded2789593b68b1876211
37,450,905,758,029,625,000,000,000,000,000,000,000
36
http: check certificate validity before clobbering the error variable
sync_cookie_parse(char *cookie) { char *p, *q; Sync_Cookie *sc = NULL; if (cookie == NULL || *cookie == '\0') { return NULL; } /* * Format of cookie: server_signature#client_signature#change_info_number * If the cookie is malformed, NULL is returned. */ p = q = cookie; ...
0
[ "CWE-476" ]
389-ds-base
2e5b526012612d1d6ccace46398bee679a730271
98,043,001,461,530,580,000,000,000,000,000,000,000
39
Issue 4711 - SIGSEV with sync_repl (#4738) Bug description: sync_repl sends back entries identified with a unique identifier that is 'nsuniqueid'. If 'nsuniqueid' is missing, then it may crash Fix description: Check a nsuniqueid is available else returns OP_ERR relates: https://github.com/389ds/389-ds-base/issue...
e_ews_backend_sync_folders_finish (EEwsBackend *backend, GAsyncResult *result, GError **error) { GSimpleAsyncResult *simple; g_return_val_if_fail ( g_simple_async_result_is_valid ( result, G_OBJECT (backend), e_ews_backend_sync_folders), FAL...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
243,993,976,536,585,450,000,000,000,000,000,000,000
16
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
GF_Err gf_media_prores_parse_bs(GF_BitStream *bs, GF_ProResFrameInfo *prores_frame) { u32 i, j; u64 start, pos; memset(prores_frame, 0, sizeof(GF_ProResFrameInfo)); start = gf_bs_get_position(bs); if (gf_bs_available(bs) < 10) return GF_BUFFER_TOO_SMALL; prores_frame->frame_size = gf_bs_read_u32(bs); prores_...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
228,294,770,980,540,400,000,000,000,000,000,000,000
68
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static int __init acpi_parse_madt_lapic_entries(void) { int count; if (!cpu_has_apic) return -ENODEV; /* * Note that the LAPIC address is obtained from the MADT (32-bit value) * and (optionally) overriden by a LAPIC_ADDR_OVR entry (64-bit value). */ count = acpi_table_parse_madt(ACPI_MADT_LAPIC_ADD...
0
[]
linux-2.6
f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff
213,721,789,998,004,120,000,000,000,000,000,000,000
44
[PATCH] i386: add HPET(s) into resource map Add HPET(s) into resource map. This will allow for the HPET(s) to be visibile within /proc/iomem. Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Andi Kleen <ak@suse.de>
_cairo_image_unbounded_spans (void *abstract_renderer, int y, int height, const cairo_half_open_span_t *spans, unsigned num_spans) { cairo_image_span_renderer_t *r = abstract_renderer; assert (y + height <= r->extents.height); if (y > r->extents.y) { pixman_image_compositor_blt ...
0
[ "CWE-787" ]
cairo
c986a7310bb06582b7d8a566d5f007ba4e5e75bf
256,815,470,699,713,900,000,000,000,000,000,000,000
50
image: Enable inplace compositing with opacities for general routines On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ===...
MagickExport Image *AcquireImage(const ImageInfo *image_info, ExceptionInfo *exception) { const char *option; Image *image; MagickStatusType flags; /* Allocate image structure. */ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); image=(Image *) AcquireCriticalMemory(sizeof(*...
0
[ "CWE-665" ]
ImageMagick
ee3dae8624e69261760754442827aea4d0254a6f
306,483,584,382,352,000,000,000,000,000,000,000,000
170
https://github.com/ImageMagick/ImageMagick/issues/1522
static inline int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) { int i, copied; unsigned char opcode[15]; unsigned long addr = convert_eip_to_linear(child, regs); copied = access_process_vm(child, addr, opcode, sizeof(opcode), 0); for (i = 0; i < copied; i++) { switch (opcode[i]) { /*...
0
[ "CWE-20" ]
linux-2.6
29eb51101c02df517ca64ec472d7501127ad1da8
315,990,091,039,254,800,000,000,000,000,000,000,000
36
Handle bogus %cs selector in single-step instruction decoding The code for LDT segment selectors was not robust in the face of a bogus selector set in %cs via ptrace before the single-step was done. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
constexpr unsigned long long operator"" _day (unsigned long long day) { return day * 60 * 60 * 24; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
195,582,130,947,909,500,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
QPDFWriter::Members::Members(QPDF& pdf) : pdf(pdf), filename(0), file(0), close_file(false), buffer_pipeline(0), output_buffer(0), normalize_content_set(false), normalize_content(false), compress_streams(true), compress_streams_set(false), stream_decode_level(qpdf_dl_none), ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
91,288,889,012,351,810,000,000,000,000,000,000,000
46
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
STATIC int GC_make_array_descriptor(size_t nelements, size_t size, GC_descr descriptor, GC_descr *simple_d, complex_descriptor **complex_d, struct LeafDescriptor * leaf) { # define OPT_THRESHOLD 50 /* F...
0
[ "CWE-119" ]
bdwgc
4e1a6f9d8f2a49403bbd00b8c8e5324048fb84d4
46,177,501,544,734,550,000,000,000,000,000,000,000
94
Fix calloc_explicitly_typed in case of lb*n overflow * typd_mlc.c: Include limits.h (for SIZE_MAX). * typd_mlc.c (GC_SIZE_MAX, GC_SQRT_SIZE_MAX): New macro (same as in malloc.c). * typd_mlc.c (GC_calloc_explicitly_typed): Return NULL if lb * n overflows (same algorithm as in calloc defined in malloc.c); eliminate lb *...
void MainWindow::onProfileTriggered(QAction *action) { Settings.setPlayerProfile(action->data().toString()); if (MLT.producer() && MLT.producer()->is_valid()) { // Save the XML to get correct in/out points before profile is changed. QString xml = MLT.XML(); setProfile(action->data().toSt...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
285,764,907,675,606,740,000,000,000,000,000,000,000
13
fix upgrade check is not using TLS correctly
static u32 vmx_secondary_exec_control(struct vcpu_vmx *vmx) { u32 exec_control = vmcs_config.cpu_based_2nd_exec_ctrl; if (!cpu_need_virtualize_apic_accesses(&vmx->vcpu)) exec_control &= ~SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES; if (vmx->vpid == 0) exec_control &= ~SECONDARY_EXEC_ENABLE_VPID; if (!enable_ept) { ...
0
[ "CWE-388" ]
linux
ef85b67385436ddc1998f45f1d6a210f935b3388
92,136,304,702,710,170,000,000,000,000,000,000,000
33
kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF) When L2 exits to L0 due to "exception or NMI", software exceptions (#BP and #OF) for which L1 has requested an intercept should be handled by L1 rather than L0. Previously, only hardware exceptions were forwarded to L1. Signed-off-by: Jim Mattson <jma...
TEST_P(Http2FloodMitigationTest, EmptyHeaders) { config_helper_.addConfigModifier( [&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) -> void { hcm.mutable_http2_protocol_options() ->mutable_max_consecutive_inbound_frames_with_empt...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
281,235,532,050,908,860,000,000,000,000,000,000,000
20
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
const T& max() const { if (is_empty()) throw CImgInstanceException(_cimg_instance "max(): Empty instance.", cimg_instance); const T *ptr_max = _data; T max_value = *ptr_max; cimg_for(*this,ptrs,T) if (*ptrs>max_v...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
35,763,205,780,956,495,000,000,000,000,000,000,000
10
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int main(void) { test_syslog_parse_identifier("pidu[111]: xxx", "pidu", "111", 11); test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 6); test_syslog_parse_identifier("pidu: xxx", "pidu", NULL, 7); test_syslog_parse_identifier("pidu xxx", NULL, NULL, 0); test_syslog_parse_...
0
[ "CWE-125" ]
systemd
a6aadf4ae0bae185dc4c414d492a4a781c80ffe5
286,648,938,385,993,840,000,000,000,000,000,000,000
13
journal: fix syslog_parse_identifier() Fixes #9829.
bool AnimationSampler::operator==(const AnimationSampler &other) const { return this->extras == other.extras && this->extensions == other.extensions && this->input == other.input && this->interpolation == other.interpolation && this->output == other.output; }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
161,190,799,852,044,830,000,000,000,000,000,000,000
6
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
static void free_req(struct xen_blkif *blkif, struct pending_req *req) { unsigned long flags; int was_empty; spin_lock_irqsave(&blkif->pending_free_lock, flags); was_empty = list_empty(&blkif->pending_free); list_add(&req->free_list, &blkif->pending_free); spin_unlock_irqrestore(&blkif->pending_free_lock, flags)...
0
[ "CWE-20" ]
linux-2.6
604c499cbbcc3d5fe5fb8d53306aa0fae1990109
76,204,805,502,329,010,000,000,000,000,000,000,000
12
xen/blkback: Check device permissions before allowing OP_DISCARD We need to make sure that the device is not RO or that the request is not past the number of sectors we want to issue the DISCARD operation for. This fixes CVE-2013-2140. Cc: stable@vger.kernel.org Acked-by: Jan Beulich <JBeulich@suse.com> Acked-by: Ia...
static void __perf_event_header__init_id(struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event) { u64 sample_type = event->attr.sample_type; data->type = sample_type; header->size += event->id_header_size; if (sample_type & PERF_SAMPLE_TID) { /* namespace issues *...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
122,069,657,976,252,600,000,000,000,000,000,000,000
29
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
parse_rr_copy(sldns_buffer* pkt, struct rrset_parse* pset, struct packed_rrset_data* data) { size_t i; struct rr_parse* rr = pset->rr_first; uint8_t* nextrdata; size_t total = pset->rr_count + pset->rrsig_count; data->ttl = MAX_TTL; data->count = pset->rr_count; data->rrsig_count = pset->rrsig_count; data->tr...
0
[ "CWE-787" ]
unbound
6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640
126,468,814,480,980,960,000,000,000,000,000,000,000
40
- Fix Out of Bound Write Compressed Names in rdata_copy(), reported by X41 D-Sec.
static void ms_remove(struct hid_device *hdev) { hid_hw_stop(hdev); ms_remove_ff(hdev); }
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
68,907,222,179,082,810,000,000,000,000,000,000,000
5
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
int nft_data_init(const struct nft_ctx *ctx, struct nft_data *data, struct nft_data_desc *desc, const struct nlattr *nla) { struct nlattr *tb[NFTA_DATA_MAX + 1]; int err; if (WARN_ON_ONCE(!desc->size)) return -EINVAL; err = nla_parse_nested_deprecated(tb, NFTA_DATA_MAX, nla, nft_data_policy, NULL); ...
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
120,722,330,721,746,000,000,000,000,000,000,000,000
30
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static int try_to_reconnect(THD *thd, MYSQL *mysql, Master_info *mi, uint *retry_count, bool suppress_warnings, const char *messages[SLAVE_RECON_MSG_MAX]) { mi->slave_running= MYSQL_SLAVE_RUN_NOT_CONNECT; thd->proc_info= messages[SLAVE_RECON_MSG_WAIT]; thd->...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
257,468,006,491,117,200,000,000,000,000,000,000,000
45
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static errno_t sdap_ad_tokengroups_initgr_posix_recv(struct tevent_req *req) { TEVENT_REQ_RETURN_ON_ERROR(req); return EOK; }
0
[ "CWE-264" ]
sssd
191d7f7ce3de10d9e19eaa0a6ab3319bcd4ca95d
191,834,177,590,660,420,000,000,000,000,000,000,000
6
AD: process non-posix nested groups using tokenGroups When initgr is performed for AD supporting tokenGroups, do not skip non-posix groups. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit 4932db6258ccfb612a3a28eb6a618c2f042b9d58)
static void sblock(int d, js_Ast *list) { ps("[\n"); in(d+1); while (list) { assert(list->type == AST_LIST); snode(d+1, list->a); list = list->b; if (list) { nl(); in(d+1); } } nl(); in(d); pc(']'); }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
263,912,926,651,388,170,000,000,000,000,000,000,000
15
Issue #161: Cope with empty programs in mujs-pp.
bool CModules::OnChanBufferPlayLine(CChan& Chan, CClient& Client, CString& sLine) { MODHALTCHK(OnChanBufferPlayLine(Chan, Client, sLine)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
140,934,612,716,844,220,000,000,000,000,000,000,000
4
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static struct ssh_iterator *ssh_iterator_new(const void *data){ struct ssh_iterator *iterator=malloc(sizeof(struct ssh_iterator)); if(!iterator) return NULL; iterator->next=NULL; iterator->data=data; return iterator; }
0
[]
libssh
2ba1dea5493fb2f5a5be2dd263ce46ccb5f8ec76
256,495,100,792,430,740,000,000,000,000,000,000,000
8
CVE-2019-14889: misc: Add function to quote file names The added function quote file names strings to be used in a shell. Special cases are treated for the charactes '\'' and '!'. Fixes T181 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry pic...
ExecutionStatus JSObject::getComputedPrimitiveDescriptor( Handle<JSObject> selfHandle, Runtime *runtime, Handle<> nameValHandle, MutableHandle<JSObject> &propObj, ComputedPropertyDescriptor &desc) { assert( !nameValHandle->isObject() && "nameValHandle passed to " "getComputedPrim...
0
[ "CWE-843", "CWE-125" ]
hermes
fe52854cdf6725c2eaa9e125995da76e6ceb27da
125,950,904,587,244,550,000,000,000,000,000,000,000
50
[CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain. Summary: The change in the hermes repository fixes the security vulnerability CVE-2020-1911. This vulnerability only affects applications which allow evaluation of uncontrolled, untrusted JavaScript code not shipped wit...
void ProtocolV1::send_message(Message *m) { bufferlist bl; uint64_t f = connection->get_features(); // TODO: Currently not all messages supports reencode like MOSDMap, so here // only let fast dispatch support messages prepare message bool can_fast_prepare = messenger->ms_can_fast_dispatch(m); if (can_fast...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
196,093,646,404,901,300,000,000,000,000,000,000,000
37
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...
STATIC void S_output_posix_warnings(pTHX_ RExC_state_t *pRExC_state, AV* posix_warnings) { /* Output the elements of the array given by '*posix_warnings' as REGEXP * warnings. */ SV * msg; const bool first_is_fatal = ckDEAD(packWARN(WARN_REGEXP)); PERL_ARGS_ASSERT_OUTPUT_POSIX_WARNINGS; if (...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
62,974,526,012,269,180,000,000,000,000,000,000,000
28
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
file_list_ready_data_free (FileListReadyData *data) { GList *l; l = g_list_find (ready_data_list, data); if (l != NULL) { ready_data_list = g_list_delete_link (ready_data_list, l); nautilus_file_list_free (data->file_list); g_list_free (data->remaining_files); g_free (data); } }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
205,589,442,292,327,500,000,000,000,000,000,000,000
13
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
free_pattern_buffer (struct re_pattern_buffer *buf, struct re_registers *regs) { regfree (buf); free (regs->start); free (regs->end); }
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
304,970,258,968,278,470,000,000,000,000,000,000,000
6
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
GF_Err nump_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_NUMPBox *ptr = (GF_NUMPBox *)s; if (ptr == NULL) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u64(bs, ptr->nbPackets); return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
195,300,875,130,901,870,000,000,000,000,000,000,000
10
fixed #1587
PHP_METHOD(Phar, offsetUnset) { char *fname, *error; size_t fname_len; phar_entry_info *entry; PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->archive->is_data) { zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Write operations disabled by the php.ini setting phar.readonly"); return; } ...
1
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
215,164,869,076,219,960,000,000,000,000,000,000,000
47
Fix bug #71860: Require valid paths for phar filenames
static void encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args, struct compound_hdr *hdr) { __be32 *p; p = reserve_space(xdr, 4); *p = cpu_to_be32(OP_READ); encode_stateid(xdr, args->context, args->lock_context, hdr->minorversion); p = reserve_space(xdr, 12); p = xdr_encode_hyper(p, a...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
301,487,310,086,672,300,000,000,000,000,000,000,000
16
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
void CLASS android_tight_load_raw() { uchar *data, *dp; int bwide, row, col, c; bwide = -(-5 * raw_width >> 5) << 3; data = (uchar *)malloc(bwide); merror(data, "android_tight_load_raw()"); for (row = 0; row < raw_height; row++) { if (fread(data, 1, bwide, ifp) < bwide) derror(); for (dp = ...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
284,606,813,885,256,200,000,000,000,000,000,000,000
17
Secunia SA75000 advisory: several buffer overruns
find_line_end(char_u *ptr) { char_u *s; s = ptr + STRLEN(ptr); while (s > ptr && (s[-1] == CAR || s[-1] == NL)) --s; return s; }
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
250,005,364,973,107,900,000,000,000,000,000,000,000
9
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
int deny_write_access(struct file * file) { struct inode *inode = file->f_path.dentry->d_inode; spin_lock(&inode->i_lock); if (atomic_read(&inode->i_writecount) > 0) { spin_unlock(&inode->i_lock); return -ETXTBSY; } atomic_dec(&inode->i_writecount); spin_unlock(&inode->i_lock); return 0; }
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
145,963,431,441,538,170,000,000,000,000,000,000,000
14
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
template<typename t> CImg<T>& draw_spline(const int x0, const int y0, const float u0, const float v0, const int x1, const int y1, const float u1, const float v1, const CImg<t>& texture, const int tx0, const int ty0, const int tx1, const ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
58,367,651,469,621,540,000,000,000,000,000,000,000
40
.
static enum test_return test_binary_decr(void) { return test_binary_decr_impl("test_binary_decr", PROTOCOL_BINARY_CMD_DECREMENT); }
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
95,342,730,431,568,550,000,000,000,000,000,000,000
4
Issue 102: Piping null to the server will crash it
static void TIFFWarnings(const char *module,const char *format,va_list warning) { char message[MagickPathExtent]; ExceptionInfo *exception; #if defined(MAGICKCORE_HAVE_VSNPRINTF) (void) vsnprintf(message,MagickPathExtent-2,format,warning); #else (void) vsprintf(message,format,warning); #endif messag...
0
[ "CWE-125" ]
ImageMagick
b0fe1aa7c2ed7becb892f121abdd68a6e6e0ce0b
185,261,691,209,677,620,000,000,000,000,000,000,000
20
https://github.com/ImageMagick/ImageMagick/issues/1532
QPDFWriter::generateObjectStreams() { // Basic strategy: make a list of objects that can go into an // object stream. Then figure out how many object streams are // needed so that we can distribute objects approximately evenly // without having any object stream exceed 100 members. We don't // hav...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
314,555,444,536,981,400,000,000,000,000,000,000,000
49
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int snd_timer_start_slave(struct snd_timer_instance *timeri) { unsigned long flags; spin_lock_irqsave(&slave_active_lock, flags); timeri->flags |= SNDRV_TIMER_IFLG_RUNNING; if (timeri->master) list_add_tail(&timeri->active_list, &timeri->master->slave_active_head); spin_unlock_irqrestore(&slave_...
1
[ "CWE-20", "CWE-200", "CWE-362" ]
linux
b5a663aa426f4884c71cd8580adae73f33570f0d
238,690,182,225,188,530,000,000,000,000,000,000,000
12
ALSA: timer: Harden slave timer list handling A slave timer instance might be still accessible in a racy way while operating the master instance as it lacks of locking. Since the master operation is mostly protected with timer->lock, we should cope with it while changing the slave instance, too. Also, some linked li...
static int calculate_password(String *str, char *buffer) { DBUG_ASSERT(str); if (str->length() == 0) // PASSWORD('') returns '' return 0; int buffer_len= 0; THD *thd= current_thd; int old_passwords= 0; if (thd) old_passwords= thd->variables.old_passwords; #if defined(HAVE_OPENSSL) if (old_pa...
1
[]
mysql-server
475dcde2c7856dd0050b967099a86c087d94f32f
290,213,280,851,447,330,000,000,000,000,000,000,000
36
Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD Description: my_crypt_genhash depends on the length of plaintext password. Longer the password, more is the time required to produce the transformation. An unusually large password may consume considerable amount of time...
void opj_j2k_cp_destroy (opj_cp_t *p_cp) { OPJ_UINT32 l_nb_tiles; opj_tcp_t * l_current_tile = 00; OPJ_UINT32 i; if (p_cp == 00) { return; } if (p_cp->tcps != 00) { l_current_tile = p_cp->tcps; l_nb_tiles = ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
2,291,169,947,437,681,800,000,000,000,000,000,000
34
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
bool unhandled_signal(struct task_struct *tsk, int sig) { void __user *handler = tsk->sighand->action[sig-1].sa.sa_handler; if (is_global_init(tsk)) return true; if (handler != SIG_IGN && handler != SIG_DFL) return false; /* if ptraced, let the tracer determine */ return !tsk->ptrace; }
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
148,747,391,339,929,700,000,000,000,000,000,000,000
12
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
cudnnDirectionMode_t direction_mode() const { return direction_mode_; }
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
175,789,152,277,652,920,000,000,000,000,000,000,000
1
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
TEST_F(ZstdDecompressorStatsTest, ChargeErrorStats) { EXPECT_FALSE(isError(0)); // no error EXPECT_TRUE(isError(ZSTD_ERROR(memory_allocation))); ASSERT_EQ(stats_store_.counterFromString("test.zstd_memory_error").value(), 1); EXPECT_TRUE(isError(ZSTD_ERROR(dictionary_corrupted))); ASSERT_EQ(stats_store_.coun...
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
60,069,290,432,349,880,000,000,000,000,000,000,000
17
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
topline_back(lineoff_T *lp) { #ifdef FEAT_DIFF if (lp->fill < diff_check_fill(curwin, lp->lnum)) { // Add a filler line. ++lp->fill; lp->height = 1; } else #endif { --lp->lnum; #ifdef FEAT_DIFF lp->fill = 0; #endif if (lp->lnum < 1) lp->height = MAXCOL; else #ifdef FEAT_FOLDING if (...
0
[ "CWE-122" ]
vim
777e7c21b7627be80961848ac560cb0a9978ff43
257,273,174,715,445,530,000,000,000,000,000,000,000
28
patch 8.2.3564: invalid memory access when scrolling without valid screen Problem: Invalid memory access when scrolling without a valid screen. Solution: Do not set VALID_BOTLINE in w_valid.
static int cx24116_read_ber(struct dvb_frontend *fe, u32 *ber) { struct cx24116_state *state = fe->demodulator_priv; dprintk("%s()\n", __func__); *ber = (cx24116_readreg(state, CX24116_REG_BER24) << 24) | (cx24116_readreg(state, CX24116_REG_BER16) << 16) | (cx24116_readreg(state, CX24116_REG_BER8) << 8) | ...
0
[ "CWE-476", "CWE-119", "CWE-125" ]
linux
1fa2337a315a2448c5434f41e00d56b01a22283c
156,477,486,658,323,960,000,000,000,000,000,000,000
13
[media] cx24116: fix a buffer overflow when checking userspace params The maximum size for a DiSEqC command is 6, according to the userspace API. However, the code allows to write up much more values: drivers/media/dvb-frontends/cx24116.c:983 cx24116_send_diseqc_msg() error: buffer overflow 'd->msg' 6 <= 23 Cc: stab...
TfLiteStatus GenericPrepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input)); TfLiteTensor* output; TF_LITE_ENSURE_OK(cont...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
182,320,825,879,763,600,000,000,000,000,000,000,000
14
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
hb_ot_layout_language_get_feature_tags (hb_face_t *face, hb_tag_t table_tag, unsigned int script_index, unsigned int language_index, unsigned int *feature_count /* IN/OUT */, hb_tag_t *feature_tags /* OUT */) { const GSUBGPOS &g = get_gsubgpos_table (face, table_tag); const La...
0
[ "CWE-119" ]
pango
797d46714d27f147277fdd5346648d838c68fb8c
115,624,802,560,082,930,000,000,000,000,000,000,000
21
[HB/GDEF] Fix bug in building synthetic GDEF table
isofile_add_data_file(struct iso9660 *iso9660, struct isofile *file) { file->datanext = NULL; *iso9660->data_file_list.last = file; iso9660->data_file_list.last = &(file->datanext); }
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
59,366,587,083,044,620,000,000,000,000,000,000,000
6
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static int init_srp(SSL *s, unsigned int context) { OPENSSL_free(s->srp_ctx.login); s->srp_ctx.login = NULL; return 1; }
0
[ "CWE-476" ]
openssl
fb9fa6b51defd48157eeb207f52181f735d96148
121,339,076,306,318,200,000,000,000,000,000,000,000
7
ssl sigalg extension: fix NULL pointer dereference As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's possible to crash an openssl tls secured server remotely by sending a manipulated hello message in a rehandshake. On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls tls12_shared_s...
static int unit_deserialize_job(Unit *u, FILE *f) { _cleanup_(job_freep) Job *j = NULL; int r; assert(u); assert(f); j = job_new_raw(u); if (!j) return log_oom(); r = job_deserialize(j, f); if (r < 0) return r; r...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
252,767,860,663,289,500,000,000,000,000,000,000,000
22
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static int pfkey_flush(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) { struct net *net = sock_net(sk); unsigned int proto; struct km_event c; int err, err2; proto = pfkey_satype2proto(hdr->sadb_msg_satype); if (proto == 0) return -EINVAL; err = xfrm_state_flush(net...
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
250,212,088,441,320,070,000,000,000,000,000,000,000
28
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static int vmx_leave_smm(struct kvm_vcpu *vcpu, const char *smstate) { struct vcpu_vmx *vmx = to_vmx(vcpu); int ret; if (vmx->nested.smm.vmxon) { vmx->nested.vmxon = true; vmx->nested.smm.vmxon = false; } if (vmx->nested.smm.guest_mode) { ret = nested_vmx_enter_non_root_mode(vcpu, false); if (ret) ret...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
303,435,346,485,529,180,000,000,000,000,000,000,000
20
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
report_multipart_type (compose_env_t *env) { mu_printf ("multipart/%s\n", env->alt ? "alternative" : "mixed"); }
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
9,476,129,705,379,946,000,000,000,000,000,000,000
4
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
struct razer_report razer_chroma_standard_set_led_effect(unsigned char variable_storage, unsigned char led_id, unsigned char led_effect) { struct razer_report report = get_razer_report(0x03, 0x02, 0x03); report.arguments[0] = variable_storage; report.arguments[1] = led_id; report.arguments[2] = clamp_u8...
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
216,981,465,251,632,100,000,000,000,000,000,000,000
9
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
gdImageScaleNearestNeighbour(gdImagePtr im, const unsigned int width, const unsigned int height) { const unsigned long new_width = MAX(1, width); const unsigned long new_height = MAX(1, height); const float dx = (float)im->sx / (float)new_width; const float dy = (float)im->sy / (float)new_height; const gdFixed f_d...
0
[ "CWE-399" ]
libgd
4751b606fa38edc456d627140898a7ec679fcc24
293,271,332,788,839,360,000,000,000,000,000,000,000
50
gdImageScaleTwoPass memory leak fix Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and confirmed by @vapier. This bug actually bit me in production and I'm very thankful that it was reported with an easy fix. Fixes #173.
static int icmpv6_filter(const struct sock *sk, const struct sk_buff *skb) { struct icmp6hdr _hdr; const struct icmp6hdr *hdr; /* We require only the four bytes of the ICMPv6 header, not any * additional bytes of message body in "struct icmp6hdr". */ hdr = skb_header_pointer(skb, skb_transport_offset(skb), ...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
20,200,158,412,537,113,000,000,000,000,000,000,000
18
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
init_normalization(struct compiling *c) { PyObject *m = PyImport_ImportModuleNoBlock("unicodedata"); if (!m) return 0; c->c_normalize = PyObject_GetAttrString(m, "normalize"); Py_DECREF(m); if (!c->c_normalize) return 0; return 1; }
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
111,829,631,962,606,210,000,000,000,000,000,000,000
11
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
static char* winbind_upn_to_username(struct pwb_context *ctx, const char *upn) { char sep; wbcErr wbc_status = WBC_ERR_UNKNOWN_FAILURE; struct wbcDomainSid sid; enum wbcSidType type; char *domain = NULL; char *name; char *p; /* This cannot work when the winbind separator = @ */ sep = winbind_get_sep...
0
[ "CWE-20" ]
samba
f62683956a3b182f6a61cc7a2b4ada2e74cde243
120,783,262,119,827,080,000,000,000,000,000,000,000
43
fail authentication for single group name which cannot be converted to sid furthermore if more than one name is supplied and no sid is converted then also fail. Bug: https://bugzilla.samba.org/show_bug.cgi?id=8598 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed...
bool CLua::callfn(const char *fn, int nargs, int nret) { error.clear(); lua_State *ls = state(); if (!ls) return false; // If a function is not provided on the stack, get the named function. if (fn) { pushglobal(fn); if (!lua_isfunction(ls, -1)) { lua...
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
158,141,806,482,956,150,000,000,000,000,000,000,000
27
Disable lua load(), loadstring() bytcode loading
static void conn_release_items(conn *c) { assert(c != NULL); if (c->item) { item_remove(c->item); c->item = 0; } while (c->ileft > 0) { item *it = *(c->icurr); assert((it->it_flags & ITEM_SLABBED) == 0); item_remove(it); c->icurr++; c->ileft--; ...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
memcached
dbb7a8af90054bf4ef51f5814ef7ceb17d83d974
241,799,200,290,359,700,000,000,000,000,000,000,000
36
disable UDP port by default As reported, UDP amplification attacks have started to use insecure internet-exposed memcached instances. UDP used to be a lot more popular as a transport for memcached many years ago, but I'm not aware of many recent users. Ten years ago, the TCP connection overhead from many clients was ...
_binder_node_inner_lock(struct binder_node *node, int line) { binder_debug(BINDER_DEBUG_SPINLOCKS, "%s: line=%d\n", __func__, line); spin_lock(&node->lock); if (node->proc) binder_inner_proc_lock(node->proc); }
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
101,836,205,210,783,270,000,000,000,000,000,000,000
8
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
static void nfs4_setup_readdir(u64 cookie, __be32 *verifier, struct dentry *dentry, struct nfs4_readdir_arg *readdir) { __be32 *start, *p; BUG_ON(readdir->count < 80); if (cookie > 2) { readdir->cookie = cookie; memcpy(&readdir->verifier, verifier, sizeof(readdir->verifier)); return; } readdir->cookie = ...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
234,288,835,415,870,360,000,000,000,000,000,000,000
54
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void InsertComplexDoubleRow(double *p, int y, Image * image, double MinVal, double MaxVal) { ExceptionInfo *exception; double f; int x; register PixelPacket *q; if (MinVal == 0) MinVal = -1; if (MaxVal == 0) MaxVal = 1; exception=(&image->exception);...
0
[ "CWE-787" ]
ImageMagick6
e806bc5559474b19114faf235266dbb8f6b206ee
145,572,597,908,260,300,000,000,000,000,000,000,000
64
...
PostorderProcessor* SetupLoopMembers(Zone* zone, HBasicBlock* block, HLoopInformation* loop, HBasicBlock* loop_header) { kind_ = LOOP_MEMBERS; block_ = block; loop_ = loop; loop_header_...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
130,100,251,101,172,140,000,000,000,000,000,000,000
11
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
void adkm_box_del(GF_Box *s) { GF_AdobeDRMKeyManagementSystemBox *ptr = (GF_AdobeDRMKeyManagementSystemBox *)s; if (!ptr) return; gf_free(s); }
0
[ "CWE-703" ]
gpac
f19668964bf422cf5a63e4dbe1d3c6c75edadcbb
63,461,921,049,317,670,000,000,000,000,000,000,000
6
fixed #1879