func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static struct i40e_mac_filter *i40e_find_filter(struct i40e_vsi *vsi, const u8 *macaddr, s16 vlan) { struct i40e_mac_filter *f; u64 key; if (!vsi || !macaddr) return NULL; key = i40e_addr_to_hkey(macaddr); hash_for_each_possible(vsi->mac_filter_hash, f, hlist, key) { if ((ether_addr_equal(macaddr, f->m...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
40,646,955,396,077,510,000,000,000,000,000,000,000
17
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static const char *selectOpName(int id){ char *z; switch( id ){ case TK_ALL: z = "UNION ALL"; break; case TK_INTERSECT: z = "INTERSECT"; break; case TK_EXCEPT: z = "EXCEPT"; break; default: z = "UNION"; break; } return z; }
0
[ "CWE-20" ]
sqlite
e59c562b3f6894f84c715772c4b116d7b5c01348
35,223,973,233,851,565,000,000,000,000,000,000,000
10
Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list. FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba
void AuthorizationSession::_acquirePrivilegesForPrincipalFromDatabase( const std::string& dbname, const UserName& user) { BSONObj privilegeDocument; Status status = _externalState->getAuthorizationManager().getPrivilegeDocument( dbname, user, &privilegeDocument); ...
0
[ "CWE-264" ]
mongo
c5ad04549e40b1069029026081d9324e9e06156c
331,528,300,473,128,660,000,000,000,000,000,000,000
14
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
Field *Field::clone(MEM_ROOT *root, TABLE *new_table, my_ptrdiff_t diff) { Field *tmp; if ((tmp= (Field*) memdup_root(root,(char*) this,size_of()))) { if (new_table) tmp->init(new_table); tmp->move_field_offset(diff); } return tmp; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
9,036,332,266,547,355,000,000,000,000,000,000,000
11
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...
ClusterMemoryTestHelper() : BaseIntegrationTest(testing::TestWithParam<Network::Address::IpVersion>::GetParam()) { use_real_stats_ = true; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
210,312,686,259,315,800,000,000,000,000,000,000,000
4
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
bool CLua::is_path_safe(string s, bool trusted) { lowercase(s); return s.find("..") == string::npos && shell_safe(s.c_str()) // loading dlua stuff would spew tons of error messages && (trusted || s.find("dlua") != 0); }
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
111,866,377,503,534,730,000,000,000,000,000,000,000
7
Disable lua load(), loadstring() bytcode loading
xmlSkipBlankChars(xmlParserCtxtPtr ctxt) { int res = 0; /* * It's Okay to use CUR/NEXT here since all the blanks are on * the ASCII range. */ if ((ctxt->inputNr == 1) && (ctxt->instate != XML_PARSER_DTD)) { const xmlChar *cur; /* * if we are in the document content, go really fast */ ...
0
[]
libxml2
be2a7edaf289c5da74a4f9ed3a0b6c733e775230
80,850,840,714,127,100,000,000,000,000,000,000,000
50
Fix for CVE-2014-3660 Issues related to the billion laugh entity expansion which happened to escape the initial set of fixes
_dbus_listen_unix_socket (const char *path, dbus_bool_t abstract, DBusError *error) { int listen_fd; struct sockaddr_un addr; size_t path_len; _DBUS_STATIC_ASSERT (sizeof (addr.sun_path) > _DBUS_MAX_SUN_PATH_LENGTH); _DBUS_ASSERT_ERROR_IS_CLEAR...
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
45,018,448,748,888,640,000,000,000,000,000,000,000
115
sysdeps-unix: On MSG_CTRUNC, close the fds we did receive MSG_CTRUNC indicates that we have received fewer fds that we should have done because the buffer was too small, but we were treating it as though it indicated that we received *no* fds. If we received any, we still have to make sure we close them, otherwise the...
void VectorTensorAddition(const quint8* vector_data, float min_vector, float max_vector, int64 vector_num_elements, const quint8* tensor_data, float min_tensor, float max_tensor, int64 tensor_num_elements, float outp...
0
[ "CWE-369" ]
tensorflow
744009c9e5cc5d0447f0dc39d055f917e1fd9e16
96,539,556,368,438,080,000,000,000,000,000,000,000
81
Validate work in `QuantizedAdd`, ensure at least one element. PiperOrigin-RevId: 370127996 Change-Id: I57c6f3e01afdeada84737820a131590137463855
xsltParseStylesheetDecimalFormat(xsltStylesheetPtr style, xmlNodePtr cur) { xmlChar *prop; xsltDecimalFormatPtr format; xsltDecimalFormatPtr iter; if ((cur == NULL) || (style == NULL) || (cur->type != XML_ELEMENT_NODE)) return; format = style->decimalFormat; prop = xmlGetNsProp(cur, BAD_CAST...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
43,844,809,212,120,270,000,000,000,000,000,000,000
116
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
static int get_ds_port_node_info(struct mdesc_handle *md, u64 node, union md_node_info *node_info) { const u64 *idp; /* DS port nodes use the "id" property to distinguish them */ idp = mdesc_get_property(md, node, "id", NULL); if (!idp) return -1; node_info->ds_port.id = *idp; return 0; }
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
129,459,509,862,945,460,000,000,000,000,000,000,000
14
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
void hlit_box_del(GF_Box *s) { gf_free(s); }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
316,252,102,078,355,550,000,000,000,000,000,000,000
4
fixed #1768
static inline void stop_timer_and_thread(struct smi_info *smi_info) { if (smi_info->thread != NULL) { kthread_stop(smi_info->thread); smi_info->thread = NULL; } smi_info->timer_can_start = false; if (smi_info->timer_running) del_timer_sync(&smi_info->si_timer); }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
284,726,066,046,528,000,000,000,000,000,000,000,000
11
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
static int session_predicate_response_headers_send(nghttp2_session *session, nghttp2_stream *stream) { int rv; rv = session_predicate_for_stream_send(session, stream); if (rv != 0) { return rv; } assert(stream); if (!session->server) { return NGHTTP...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
192,848,532,360,872,660,000,000,000,000,000,000,000
23
Add nghttp2_option_set_max_outbound_ack
static int setkey_unaligned(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) { struct blkcipher_alg *cipher = &tfm->__crt_alg->cra_blkcipher; unsigned long alignmask = crypto_tfm_alg_alignmask(tfm); int ret; u8 *buffer, *alignbuffer; unsigned long absize; absize = keylen + alignmask; buffer = ...
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
59,863,618,203,725,950,000,000,000,000,000,000,000
21
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
static void bswap_buf(uint32_t *dst, const uint32_t *src, int w){ int i; for(i=0; i+8<=w; i+=8){ dst[i+0]= av_bswap32(src[i+0]); dst[i+1]= av_bswap32(src[i+1]); dst[i+2]= av_bswap32(src[i+2]); dst[i+3]= av_bswap32(src[i+3]); dst[i+4]= av_bswap32(src[i+4]); dst[i+...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
186,173,492,267,901,500,000,000,000,000,000,000,000
17
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
CFGREAD(struct pci_vdev *dev, int coff, int bytes) { if (bytes == 1) return pci_get_cfgdata8(dev, coff); else if (bytes == 2) return pci_get_cfgdata16(dev, coff); else return pci_get_cfgdata32(dev, coff); }
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
291,180,534,913,694,370,000,000,000,000,000,000,000
9
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
static SSL_METHOD *ssl23_get_server_method(int ver) { #ifndef OPENSSL_NO_SSL2 if (ver == SSL2_VERSION) return(SSLv2_server_method()); #endif if (ver == SSL3_VERSION) return(SSLv3_server_method()); else if (ver == TLS1_VERSION) return(TLSv1_server_method()); else return(NULL); }
1
[ "CWE-310" ]
openssl
cd332a07503bd9771595de87e768179f81715704
153,069,603,170,099,080,000,000,000,000,000,000,000
13
Fix no-ssl3 configuration option CVE-2014-3568 Reviewed-by: Emilia Kasper <emilia@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org>
static int xfrm_get_tos(const struct flowi *fl, int family) { const struct xfrm_policy_afinfo *afinfo; int tos = 0; afinfo = xfrm_policy_get_afinfo(family); tos = afinfo ? afinfo->get_tos(fl) : 0; rcu_read_unlock(); return tos; }
0
[ "CWE-125" ]
ipsec
7bab09631c2a303f87a7eb7e3d69e888673b9b7e
113,343,849,520,602,670,000,000,000,000,000,000,000
12
xfrm: policy: check policy direction value The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used as an array index. This can lead to an out-of-bound access, kernel lockup and DoS. Add a check for the 'dir' value. This fixes CVE-2017-11600. References: https://bugzilla.redhat.com/show_bug.cgi?...
static void ipmr_vif_seq_stop(struct seq_file *seq, void *v) { read_unlock(&mrt_lock); }
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
148,407,697,799,894,950,000,000,000,000,000,000,000
4
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
libcall_common(typval_T *argvars UNUSED, typval_T *rettv, int type) { #ifdef FEAT_LIBCALL char_u *string_in; char_u **string_result; int nr_result; #endif rettv->v_type = type; if (type != VAR_NUMBER) rettv->vval.v_string = NULL; if (check_restricted() || check_secure()) return; #ifdef ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
150,210,333,987,818,800,000,000,000,000,000,000,000
37
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev, struct file *file, int atomic, int hop) { return kernel_client_enqueue(client, ev, file, 1, atomic, hop); }
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
59,040,986,055,294,630,000,000,000,000,000,000,000
6
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
void Context::onDestroy() { if (destroyed_) { return; } destroyed_ = true; onDone(); }
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
147,502,222,814,277,630,000,000,000,000,000,000,000
7
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
static int do_timer_settime(timer_t timer_id, int flags, struct itimerspec64 *new_spec64, struct itimerspec64 *old_spec64) { const struct k_clock *kc; struct k_itimer *timr; unsigned long flag; int error = 0; if (!timespec64_valid(&new_spec64->it_interval) || !timespec64_valid(&new_spec64->it_v...
0
[ "CWE-190" ]
linux
78c9c4dfbf8c04883941445a195276bb4bb92c76
122,628,878,369,813,770,000,000,000,000,000,000,000
34
posix-timers: Sanitize overrun handling The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does not fit in an int. As a consequence timer_getoverrun(2) and siginfo::si_overrun can turn into random number generators. The k_clock::timer_forward() callb...
PredictorEncodeTile(TIFF* tif, uint8* bp0, tmsize_t cc0, uint16 s) { static const char module[] = "PredictorEncodeTile"; TIFFPredictorState *sp = PredictorState(tif); uint8 *working_copy; tmsize_t cc = cc0, rowsize; unsigned char* bp; int result_code; assert(sp != NULL); assert(sp->encodepfunc !=...
1
[ "CWE-119", "CWE-787" ]
libtiff
6a984bf7905c6621281588431f384e79d11a2e33
115,766,569,851,468,740,000,000,000,000,000,000,000
47
* libtiff/tif_predic.c: fix memory leaks in error code paths added in previous commit (fix for MSVR 35105)
bgp_attr_munge_as4_attrs(struct peer *const peer, struct attr *const attr, struct aspath *as4_path, as_t as4_aggregator, struct in_addr *as4_aggregator_addr) { int ignore_as4_path = 0; struct aspath *newpath; if (!attr->aspath) { /* NULL aspath shouldn't be possible as bgp_attr_parse should * have *...
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
146,320,791,495,836,670,000,000,000,000,000,000,000
104
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) { struct task_struct *curr = rq->curr; struct cfs_rq *cfs_rq = task_cfs_rq(curr); struct sched_entity *se = &curr->se, *pse = &p->se; int se_depth, pse_depth; if (unlikely(rt_prio(p->prio))) { update_rq_clock(rq); update_curr(cfs_rq); re...
0
[]
linux-2.6
ac884dec6d4a7df252150af875cffddf8f1d9c15
294,902,417,409,280,200,000,000,000,000,000,000,000
59
sched: fair-group scheduling vs latency Currently FAIR_GROUP sched grows the scheduler latency outside of sysctl_sched_latency, invert this so it stays within. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
dns_zone_asyncload(dns_zone_t *zone, bool newonly, dns_zt_zoneloaded_t done, void *arg) { isc_event_t *e; dns_asyncload_t *asl = NULL; isc_result_t result = ISC_R_SUCCESS; REQUIRE(DNS_ZONE_VALID(zone)); if (zone->zmgr == NULL) return (ISC_R_FAILURE); /* If we already have a load pending, stop now */ LO...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
309,787,194,904,662,900,000,000,000,000,000,000,000
48
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
vhost_user_iotlb_msg(struct virtio_net **pdev, struct vhu_msg_context *ctx, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; struct vhost_iotlb_msg *imsg = &ctx->msg.payload.iotlb; uint16_t i; uint64_t vva, len; if (validate_msg_fds(dev, ctx, 0) != 0) return RTE_VHOST_MSG_RESULT_ERR; switch (...
0
[ "CWE-125", "CWE-787" ]
dpdk
6442c329b9d2ded0f44b27d2016aaba8ba5844c5
8,977,047,009,000,885,000,000,000,000,000,000,000
60
vhost: fix queue number check when setting inflight FD In function vhost_user_set_inflight_fd, queue number in inflight message is used to access virtqueue. However, queue number could be larger than VHOST_MAX_VRING and cause write OOB as this number will be used to write inflight info in virtqueue structure. This pat...
rrset_has_sigover(sldns_buffer* pkt, struct rrset_parse* rrset, uint16_t type, int* hasother) { int res = 0; struct rr_parse* rr = rrset->rr_first; log_assert( rrset->type == LDNS_RR_TYPE_RRSIG ); while(rr) { if(pkt_rrsig_covered_equals(pkt, rr->ttl_data, type)) res = 1; else *hasother = 1; rr = rr->next;...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
101,393,477,237,504,160,000,000,000,000,000,000,000
14
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
void addReplyDouble(client *c, double d) { char dbuf[128], sbuf[128]; int dlen, slen; if (isinf(d)) { /* Libc in odd systems (Hi Solaris!) will format infinite in a * different way, so better to handle it in an explicit way. */ addReplyBulkCString(c, d > 0 ? "inf" : "-inf"); } e...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
242,043,120,022,222,150,000,000,000,000,000,000,000
13
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, ...
BODY *mutt_new_body (void) { BODY *p = (BODY *) safe_calloc (1, sizeof (BODY)); p->disposition = DISPATTACH; p->use_disp = 1; return (p); }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
247,957,278,268,418,900,000,000,000,000,000,000,000
8
use a 64-bit random value in temporary filenames. closes #3158
static void *rmm_malloc(apr_rmm_t *rmm, apr_size_t size) { apr_rmm_off_t offset = apr_rmm_malloc(rmm, size); if (!offset) { return NULL; } return apr_rmm_addr_get(rmm, offset); }
0
[ "CWE-787" ]
httpd
3b6431eb9c9dba603385f70a2131ab4a01bf0d3b
81,073,714,976,133,300,000,000,000,000,000,000,000
10
Merge r1885659 from trunk: mod_auth_digest: Fast validation of the nonce's base64 to fail early if the format can't match anyway. Submitted by: ylavic Reviewed by: ylavic, covener, jailletc36 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885666 13f79535-47bb-0310-9956-ffa...
dlz_findzonedb(void *dbdata, const char *name, dns_clientinfomethods_t *methods, dns_clientinfo_t *clientinfo) { struct dlz_example_data *state = (struct dlz_example_data *)dbdata; isc_sockaddr_t *src; char addrbuf[100]; char absolute[1024]; strcpy(addrbuf, "unknown"); if (methods != NULL && methods...
0
[ "CWE-732" ]
bind9
34348d9ee4db15307c6c42db294419b4df569f76
183,802,244,012,805,060,000,000,000,000,000,000,000
63
denied axfr requests were not effective for writable DLZ zones (cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283)
bgp_rx_route_refresh(struct bgp_conn *conn, byte *pkt, uint len) { struct bgp_proto *p = conn->bgp; if (conn->state != BS_ESTABLISHED) { bgp_error(conn, 5, fsm_err_subcode[conn->state], NULL, 0); return; } if (!conn->local_caps->route_refresh) { bgp_error(conn, 1, 3, pkt+18, 1); return; } if (len < (BGP_...
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
117,538,481,201,867,700,000,000,000,000,000,000,000
50
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
QPDFWriter::writeXRefTable(trailer_e which, int first, int last, int size, qpdf_offset_t prev, bool suppress_offsets, int hint_id, qpdf_offset_t hint_offset, qpdf_offset_t hint_length, int linearization_pass) { writeString("xref\n"); writeString(QUtil::int_to_string(first)...
0
[ "CWE-399", "CWE-835" ]
qpdf
8249a26d69f72b9cda584c14cc3f12769985e481
78,660,699,944,021,460,000,000,000,000,000,000,000
38
Fix infinite loop in QPDFWriter (fixes #143)
long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgflg, long (*msg_handler)(void __user *, struct msg_msg *, size_t)) { struct msg_queue *msq; struct msg_msg *msg; int mode; struct ipc_namespace *ns; struct msg_msg *copy = NULL; ns = current->nsproxy->ipc_ns; if (msqi...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
10,515,963,616,442,132,000,000,000,000,000,000,000
146
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
find_ucmd( exarg_T *eap, char_u *p, /* end of the command (possibly including count) */ int *full, /* set to TRUE for a full match */ expand_T *xp, /* used for completion, NULL otherwise */ int *compl) /* completion flags or NULL */ { int len = (int)(p - eap->cmd); int j, k, matchlen = 0...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
12,379,076,151,871,442,000,000,000,000,000,000,000
108
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
update_stat(char *port, uint64_t traffic) { if (verbose) { LOGI("update traffic %" PRIu64 " for port %s", traffic, port); } void *ret = cork_hash_table_get(server_table, (void *)port); if (ret != NULL) { struct server *server = (struct server *)ret; server->traffic = traffic; ...
0
[ "CWE-78", "CWE-787" ]
shadowsocks-libev
c67d275803dc6ea22c558d06b1f7ba9f94cd8de3
215,684,283,657,864,170,000,000,000,000,000,000,000
11
Fix #1734
void usbip_pad_iso(struct usbip_device *ud, struct urb *urb) { int np = urb->number_of_packets; int i; int actualoffset = urb->actual_length; if (!usb_pipeisoc(urb->pipe)) return; /* if no packets or length of data is 0, then nothing to unpack */ if (np == 0 || urb->actual_length == 0) return; /* * if a...
0
[ "CWE-200", "CWE-119" ]
linux
b348d7dddb6c4fbfc810b7a0626e8ec9e29f7cbb
224,986,120,560,324,960,000,000,000,000,000,000,000
31
USB: usbip: fix potential out-of-bounds write Fix potential out-of-bounds write to urb->transfer_buffer usbip handles network communication directly in the kernel. When receiving a packet from its peer, usbip code parses headers according to protocol. As part of this parsing urb->actual_length is filled. Since the inp...
static OPJ_BOOL opj_j2k_create_tcd(opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ) { /* preconditions */ assert(p_j2k != 00); assert(p_manager != 00); assert(p_stream !...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
134,847,270,250,177,460,000,000,000,000,000,000,000
28
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static int set_reg_profile(RAnal *anal) { const char *p = "=PC pcl\n" "=SP sp\n" // explained in http://www.nongnu.org/avr-libc/user-manual/FAQ.html // and http://www.avrfreaks.net/forum/function-calling-convention-gcc-generated-assembly-file "=A0 r25\n" "=A1 r24\n" "=A2 r23\n" "=A3 r22\n" "=R0 r24\n" #i...
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
184,316,208,713,092,780,000,000,000,000,000,000,000
123
Fix crash in anal.avr
static int imap_path_is_empty(const char *path) { int rc = imap_path_status(path, false); if (rc < 0) return -1; if (rc == 0) return 1; return 0; }
0
[ "CWE-522", "CWE-287", "CWE-755" ]
neomutt
9c36717a3e2af1f2c1b7242035455ec8112b4b06
209,024,820,753,745,140,000,000,000,000,000,000,000
9
imap: close connection on all failures Thanks to Gabriel Salles-Loustau for spotting the problem. Co-authored-by: Kevin McCarthy <kevin@8t8.us>
PamData::PamData() { }
0
[ "CWE-613", "CWE-287", "CWE-284" ]
sddm
147cec383892d143b5e02daa70f1e7def50f5d98
319,547,851,663,103,100,000,000,000,000,000,000,000
1
Fix authentication when reusing an existing session - Check the success value before unlocking the session - Don't attempt to use the nonexistant "sddm-check" PAM service
archive_read_support_format_xar(struct archive *_a) { struct xar *xar; struct archive_read *a = (struct archive_read *)_a; int r; archive_check_magic(_a, ARCHIVE_READ_MAGIC, ARCHIVE_STATE_NEW, "archive_read_support_format_xar"); xar = (struct xar *)calloc(1, sizeof(*xar)); if (xar == NULL) { archive_set_...
0
[ "CWE-125" ]
libarchive
fa7438a0ff4033e4741c807394a9af6207940d71
289,219,000,768,707,000,000,000,000,000,000,000,000
32
Do something sensible for empty strings to make fuzzers happy.
handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks) { journal_t *journal; if (sb->s_flags & MS_RDONLY) return ERR_PTR(-EROFS); /* Special case here: if the journal has aborted behind our * backs (eg. EIO in the commit thread), then we still need to * take the FS itself readonly cleanly. */ ...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
56,987,889,952,496,050,000,000,000,000,000,000,000
20
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
FakeListenSocketFactory(Network::SocketSharedPtr socket) : socket_(socket) {}
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
133,338,685,475,752,530,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
hup_exit_nhwindows(lastgasp) const char *lastgasp; { /* core has called exit_nhwindows(); call the previous interface's shutdown routine now; xxx_exit_nhwindows() needs to call other xxx_ routines directly rather than through windowprocs pointers */ if (previnterface_exit_nhwindows) { last...
0
[ "CWE-120", "CWE-269" ]
NetHack
f3def5c0b999478da2d0a8f0b6a7c370a2065f77
35,612,036,144,087,707,000,000,000,000,000,000,000
13
command line triggered buffer overruns Prevent extremely long command line arguments from overflowing local buffers in raw_printf or config_error_add. The increased buffer sizes they recently got to deal with long configuration file values aren't sufficient to handle command line induced overflows. choose_windows(co...
void account_user_time(struct task_struct *p, cputime_t cputime) { struct cpu_usage_stat *cpustat = &kstat_this_cpu.cpustat; cputime64_t tmp; p->utime = cputime_add(p->utime, cputime); /* Add user time to cpustat. */ tmp = cputime_to_cputime64(cputime); if (TASK_NICE(p) > 0) cpustat->nice = cputime64_add(cpus...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
32,308,331,025,241,346,000,000,000,000,000,000,000
14
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
static MagickBooleanType IsSVG(const unsigned char *magick,const size_t length) { if (length < 4) return(MagickFalse); if (LocaleNCompare((const char *) magick+1,"svg",3) == 0) return(MagickTrue); if (length < 5) return(MagickFalse); if (LocaleNCompare((const char *) magick+1,"?xml",4) == 0) ret...
0
[ "CWE-125" ]
ImageMagick6
a5db4873626f702d2ddd8bc293573493e0a412c0
158,883,141,572,743,470,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1336
TEST(ExpressionObjectEvaluate, ShouldEvaluateFieldsWithinNestedObject) { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); auto object = ExpressionObject::create( expCtx, {{"a", ExpressionObject::create( expCtx, {{"b", makeConst...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
119,084,923,748,694,620,000,000,000,000,000,000,000
12
SERVER-38070 fix infinite loop in agg expression
decode_dh_params(const uint8_t *p, unsigned int len) { int_dhx942_dh *params; DH *dh; dh = DH_new(); if (dh == NULL) return NULL; params = (int_dhx942_dh *)ASN1_item_d2i(NULL, &p, len, ASN1_ITEM_rptr(DHxparams)); if (params == NULL) { ...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
36,235,865,908,465,715,000,000,000,000,000,000,000
23
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
pixaWriteMemMultipageTiff(l_uint8 **pdata, size_t *psize, PIXA *pixa) { const char *modestr; l_int32 i, n; FILE *fp; PIX *pix1; PROCNAME("pixaWriteMemMultipageTiff"); if (pdata) *pdata = NULL; if (!pdata) return ERRO...
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
130,971,684,793,802,180,000,000,000,000,000,000,000
41
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
static void InitPSDInfo(Image *image,Image *layer,PSDInfo *info) { info->version=1; info->columns=layer->columns; info->rows=layer->rows; info->mode=10; /* Set mode to a value that won't change the colorspace */ /* Assume that image has matte */ if (IsGrayImage(image,&image->exception) != MagickFalse) i...
0
[ "CWE-125" ]
ImageMagick6
d8d844c6f23f4d90d8fe893fe9225dd78fc1e6ef
25,370,056,962,371,580,000,000,000,000,000,000,000
28
https://github.com/ImageMagick/ImageMagick/issues/1532
_gcry_mpi_ec_set_point (const char *name, gcry_mpi_point_t newvalue, gcry_ctx_t ctx) { mpi_ec_t ec = _gcry_ctx_get_pointer (ctx, CONTEXT_TYPE_EC); return _gcry_ecc_set_point (name, newvalue, ec); }
0
[ "CWE-200" ]
libgcrypt
88e1358962e902ff1cbec8d53ba3eee46407851a
30,868,175,026,949,630,000,000,000,000,000,000,000
7
ecc: Constant-time multiplication for Weierstrass curve. * mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary method for Weierstrass curve when SCALAR is secure.
ex_redraw(exarg_T *eap) { int r = RedrawingDisabled; int p = p_lz; RedrawingDisabled = 0; p_lz = FALSE; validate_cursor(); update_topline(); update_screen(eap->forceit ? CLEAR : VIsual_active ? INVERTED : 0); #ifdef FEAT_TITLE if (need_maketitle) maketitle(); #endif #if defined(MSWIN...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
69,079,283,396,611,440,000,000,000,000,000,000,000
32
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
static void add_workflow_buttons(GtkBox *box, GHashTable *workflows, GCallback func) { gtk_container_foreach(GTK_CONTAINER(box), &remove_child_widget, NULL); GList *possible_workflows = list_possible_events_glist(g_dump_dir_name, "workflow"); GHashTable *workflow_table = load_workflow_config_data_from_list...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
206,698,303,862,455,830,000,000,000,000,000,000,000
38
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
arch_get_unmapped_area_topdown(struct file *filp, const unsigned long addr0, const unsigned long len, const unsigned long pgoff, const unsigned long flags) { struct vm_area_struct *vma; struct mm_struct *mm = current->mm; unsigned long addr = addr0; struct vm_unmapped_area_info info; int rc; /* request...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
148,306,281,483,237,120,000,000,000,000,000,000,000
62
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void connection_handle_shutdown(connection *con) { plugins_call_handle_connection_shut_wr(con); connection_reset(con); ++con->srv->con_closed; /* close the connection */ if (con->fd >= 0 && (con->is_ssl_sock || 0 == shutdown(con->fd, SHUT_WR))) { con->close_timeout_ts = log_epoch_secs; request_s...
0
[ "CWE-703" ]
lighttpd1.4
b03b86f47b0d5a553137f081fadc482b4af1372d
122,939,348,764,667,860,000,000,000,000,000,000,000
21
[core] fix merging large headers across mult reads (fixes #3059) (thx mitd) x-ref: "Connections stuck in Close_Wait causing 100% cpu usage" https://redmine.lighttpd.net/issues/3059
Status InMatchExpression::init(StringData path) { return setPath(path); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
208,020,215,212,623,250,000,000,000,000,000,000,000
3
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static double mp_image_display(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listout.width()); cimg::mutex(6); CImg<T> &img = mp.listout[ind]; CImg<charT> title(256); std::fputc('\n',cimg::output()); cimg_snprintf(titl...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
6,731,577,876,384,467,000,000,000,000,000,000,000
11
Fix other issues in 'CImg<T>::load_bmp()'.
static void __mark_ptr_or_null_regs(struct bpf_func_state *state, u32 id, bool is_null) { struct bpf_reg_state *reg; int i; for (i = 0; i < MAX_BPF_REG; i++) mark_ptr_or_null_reg(state, &state->regs[i], id, is_null); bpf_for_each_spilled_reg(i, state, reg) { if (!reg) continue; mark_ptr_or_null_r...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
291,463,142,034,405,100,000,000,000,000,000,000,000
15
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...
_get_xauth_for_pam (const char *x11_authority_file) { FILE *fh; Xauth *auth = NULL; struct pam_xauth_data *retval = NULL; gsize len = sizeof (*retval) + 1; fh = fopen (x11_authority_file, "r"); if (fh) { a...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
322,270,723,690,951,640,000,000,000,000,000,000,000
27
Store the face and dmrc files in a cache. Refer to bug #565151.
size_t length() const { return length_; }
0
[ "CWE-416", "CWE-703" ]
hermes
d86e185e485b6330216dee8e854455c694e3a36e
135,982,218,116,386,990,000,000,000,000,000,000,000
3
Fix a bug in transient object property assignment and getUTF16Ref Summary: The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by appending more contents to the same allocator. This case was encountered in `transientObjectPutErrorMessage`, resulting in using free'd memory. Reviewed By: tmikov D...
static void gain_control_data(bitfile *ld, ic_stream *ics) { uint8_t bd, wd, ad; ssr_info *ssr = &(ics->ssr); ssr->max_band = (uint8_t)faad_getbits(ld, 2 DEBUGVAR(1,1000,"gain_control_data(): max_band")); if (ics->window_sequence == ONLY_LONG_SEQUENCE) { for (bd = 1; bd <= ssr->max...
0
[ "CWE-119", "CWE-787" ]
faad2
942c3e0aee748ea6fe97cb2c1aa5893225316174
35,155,270,186,019,360,000,000,000,000,000,000,000
92
Fix a couple buffer overflows https://hackerone.com/reports/502816 https://hackerone.com/reports/507858 https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch
iasecc_sdo_create(struct sc_card *card, struct iasecc_sdo *sdo) { struct sc_context *ctx = card->ctx; struct sc_apdu apdu; unsigned char *data = NULL, sdo_class = sdo->sdo_class; struct iasecc_sdo_update update; struct iasecc_extended_tlv *field = NULL; int rv = SC_ERROR_NOT_SUPPORTED, data_len; LOG_FUNC_CALLED...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
56,171,413,826,971,630,000,000,000,000,000,000,000
63
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
circuit_discard_optional_exit_enclaves(extend_info_t *info) { entry_connection_t *entry_conn; const node_t *r1, *r2; smartlist_t *conns = get_connection_array(); SMARTLIST_FOREACH_BEGIN(conns, connection_t *, conn) { if (conn->marked_for_close || conn->type != CONN_TYPE_AP || conn->state !=...
0
[ "CWE-20", "CWE-617" ]
tor
79b59a2dfcb68897ee89d98587d09e55f07e68d7
254,847,331,509,528,560,000,000,000,000,000,000,000
41
TROVE-2017-004: Fix assertion failure in relay_send_end_cell_from_edge_ This fixes an assertion failure in relay_send_end_cell_from_edge_() when an origin circuit and a cpath_layer = NULL were passed. A service rendezvous circuit could do such a thing when a malformed BEGIN cell is received but shouldn't in the first...
static inline void tcp_in_ack_event(struct sock *sk, u32 flags) { const struct inet_connection_sock *icsk = inet_csk(sk); if (icsk->icsk_ca_ops->in_ack_event) icsk->icsk_ca_ops->in_ack_event(sk, flags); }
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
95,126,613,757,187,650,000,000,000,000,000,000,000
7
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
static uint32_t stat_to_v9mode(const struct stat *stbuf) { uint32_t mode; mode = stbuf->st_mode & 0777; if (S_ISDIR(stbuf->st_mode)) { mode |= P9_STAT_MODE_DIR; } if (S_ISLNK(stbuf->st_mode)) { mode |= P9_STAT_MODE_SYMLINK; } if (S_ISSOCK(stbuf->st_mode)) { mode |=...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
279,855,465,374,984,620,000,000,000,000,000,000,000
39
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
void hns_ppe_get_stats(struct hns_ppe_cb *ppe_cb, u64 *data) { u64 *regs_buff = data; struct hns_ppe_hw_stats *hw_stats = &ppe_cb->hw_stats; regs_buff[0] = hw_stats->rx_pkts_from_sw; regs_buff[1] = hw_stats->rx_pkts; regs_buff[2] = hw_stats->rx_drop_no_bd; regs_buff[3] = hw_stats->rx_alloc_buf_fail; regs_buff[4...
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
81,683,182,813,529,060,000,000,000,000,000,000,000
19
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
static void stroke_outline(ASS_Renderer *render_priv, ASS_Outline *outline, int sx, int sy) { if (sx <= 0 && sy <= 0) return; fix_freetype_stroker(outline, sx, sy); size_t n_points = outline->n_points; if (n_points > SHRT_MAX) { ass_msg(render_priv->library, ...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
36,328,782,679,188,550,000,000,000,000,000,000,000
109
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
static size_t shmem_xattr_security_list(struct inode *inode, char *list, size_t list_len, const char *name, size_t name_len) { return security_inode_listsecurity(inode, list, list_len); }
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
51,021,725,159,487,750,000,000,000,000,000,000,000
6
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
void Transform::binary( RawTile &in, unsigned char threshold ){ // Only apply to 8 bit images if( in.bpc != 8 ) return; // First make sure our image is greyscale this->greyscale( in ); unsigned int np = in.width * in.height; #if defined(__ICC) || defined(__INTEL_COMPILER) #pragma ivdep #elif defined(_OPEN...
0
[ "CWE-190" ]
iipsrv
882925b295a80ec992063deffc2a3b0d803c3195
253,939,342,283,605,400,000,000,000,000,000,000,000
19
- Modified TileManager.cc to verify that malloc() has correctly allocated memory. - Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve...
static int crypto_rsa_common(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus, const BYTE* exponent, int exponent_size, BYTE* output) { BN_CTX* ctx = NULL; int output_length = -1; BYTE* input_reverse = NULL; BYTE* modulus_reverse = NULL; BYTE* exponent_reverse = NU...
0
[ "CWE-787" ]
FreeRDP
8305349a943c68b1bc8c158f431dc607655aadea
241,821,229,484,338,020,000,000,000,000,000,000,000
80
Fixed GHSL-2020-102 heap overflow (cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581)
spa_bits_to_base64 (uschar *out, const uschar *in, int inlen) /* raw bytes in quasi-big-endian order to base 64 string (NUL-terminated) */ { for (; inlen >= 3; inlen -= 3) { *out++ = base64digits[in[0] >> 2]; *out++ = base64digits[((in[0] << 4) & 0x30) | (in[1] >> 4)]; *out++ = base64digits[((in...
1
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
142,463,541,573,949,890,000,000,000,000,000,000,000
25
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
static int validate_and_copy_set_tun(const struct nlattr *attr, struct sw_flow_actions **sfa, bool log) { struct sw_flow_match match; struct sw_flow_key key; struct metadata_dst *tun_dst; struct ip_tunnel_info *tun_info; struct ovs_tunnel_info *ovs_tun; struct nlattr *a; int err = 0, start, opts_type; ...
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
180,837,290,677,002,760,000,000,000,000,000,000,000
80
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
static void *_umm_realloc( void *ptr, size_t size ) { unsigned short int blocks; unsigned short int blockSize; unsigned short int c; size_t curSize; if (umm_heap == NULL) { umm_init(); } /* * This code looks after the case of a NULL value for ptr. The ANSI C * standard says that if ptr is N...
0
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
174,775,160,954,516,000,000,000,000,000,000,000,000
186
Fix umm_malloc()
int RGWListBucket_ObjStore_S3::get_params() { int ret = get_common_params(); if (ret < 0) { return ret; } if (!list_versions) { marker = s->info.args.get("marker"); } else { marker.name = s->info.args.get("key-marker"); marker.instance = s->info.args.get("version-id-marker"); } return 0; }
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
248,754,205,779,633,260,000,000,000,000,000,000,000
14
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static inline int serialize_float_array(kstring_t *s, size_t n, const float *a) { uint8_t *p; size_t i; size_t bytes = n * sizeof(float); if (bytes / sizeof(float) != n) return -1; if (ks_resize(s, s->l + bytes) < 0) return -1; p = (uint8_t *) s->s + s->l; for (i = 0; i < n; i++) { ...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
277,308,658,575,035,280,000,000,000,000,000,000,000
17
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
re_mbcinit(int mb_code) { OnigEncoding enc; switch (mb_code) { case RE_MBCTYPE_ASCII: enc = ONIG_ENCODING_ASCII; break; case RE_MBCTYPE_EUC: enc = ONIG_ENCODING_EUC_JP; break; case RE_MBCTYPE_SJIS: enc = ONIG_ENCODING_SJIS; break; case RE_MBCTYPE_UTF8: enc = ONIG_ENCODING_UTF8; ...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
199,314,756,755,217,500,000,000,000,000,000,000,000
24
onig-5.9.2
GF_Err prft_box_read(GF_Box *s,GF_BitStream *bs) { GF_ProducerReferenceTimeBox *ptr = (GF_ProducerReferenceTimeBox *) s; ISOM_DECREASE_SIZE(ptr, 12); ptr->refTrackID = gf_bs_read_u32(bs); ptr->ntp = gf_bs_read_u64(bs); if (ptr->version==0) { ISOM_DECREASE_SIZE(ptr, 4); ptr->timestamp = gf_bs_read_u32(bs); } ...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
194,602,470,829,280,270,000,000,000,000,000,000,000
16
fixed #2255
static int bond_vlan_rx_add_vid(struct net_device *bond_dev, __be16 proto, u16 vid) { struct bonding *bond = netdev_priv(bond_dev); struct slave *slave, *rollback_slave; struct list_head *iter; int res; bond_for_each_slave(bond, slave, iter) { res = vlan_vid_add(slave->dev, proto, vid); if (res) goto u...
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
235,152,047,557,192,240,000,000,000,000,000,000,000
27
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
XML_ParseBuffer(XML_Parser parser, int len, int isFinal) { const char *start; enum XML_Status result = XML_STATUS_OK; if (parser == NULL) return XML_STATUS_ERROR; switch (parser->m_parsingStatus.parsing) { case XML_SUSPENDED: parser->m_errorCode = XML_ERROR_SUSPENDED; return XML_STATUS_ERROR; c...
0
[ "CWE-400", "CWE-703" ]
libexpat
9b4ce651b26557f16103c3a366c91934ecd439ab
183,866,685,556,891,400,000,000,000,000,000,000,000
63
Prevent stack exhaustion in build_model It is possible to trigger stack exhaustion in build_model function if depth of nested children in DTD element is large enough. This happens because build_node is a recursively called function within build_model. The code has been adjusted to run iteratively. It uses the already...
void ipv4_redirect(struct sk_buff *skb, struct net *net, int oif, u32 mark, u8 protocol, int flow_flags) { const struct iphdr *iph = (const struct iphdr *) skb->data; struct flowi4 fl4; struct rtable *rt; __build_flow_key(&fl4, NULL, iph, oif, RT_TOS(iph->tos), protocol, mark, flow_flags); rt = __ip_rout...
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
82,965,521,836,619,580,000,000,000,000,000,000,000
15
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
generate_tx_packet_auth(CMD_Reply *packet) { int pkt_len; pkt_len = PKL_ReplyLength(packet); return KEY_GenerateAuth(KEY_GetCommandKey(), (unsigned char *)packet, pkt_len, ((unsigned char *)packet) + pkt_len, sizeof (packet->auth)); }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
173,413,239,722,774,330,000,000,000,000,000,000,000
9
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static void __exit dccp_fini(void) { dccp_mib_exit(); free_pages((unsigned long)dccp_hashinfo.bhash, get_order(dccp_hashinfo.bhash_size * sizeof(struct inet_bind_hashbucket))); free_pages((unsigned long)dccp_hashinfo.ehash, get_order(dccp_hashinfo.ehash_size * sizeof(struct inet_ehash_bucke...
0
[ "CWE-189" ]
linux-2.6
3e8a0a559c66ee9e7468195691a56fefc3589740
190,055,893,379,003,460,000,000,000,000,000,000,000
14
dccp: change L/R must have at least one byte in the dccpsf_val field Thanks to Eugene Teo for reporting this problem. Signed-off-by: Eugene Teo <eugenete@kernel.sg> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk> Signed-off-by: David S. Miller <da...
static inline long inquiry_cache_age(struct hci_dev *hdev) { struct discovery_state *c = &hdev->discovery; return jiffies - c->timestamp; }
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
104,592,062,774,616,690,000,000,000,000,000,000,000
5
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
static void tcp_grow_window(struct sock *sk, const struct sk_buff *skb) { struct tcp_sock *tp = tcp_sk(sk); /* Check #1 */ if (tp->rcv_ssthresh < tp->window_clamp && (int)tp->rcv_ssthresh < tcp_space(sk) && !sk_under_memory_pressure(sk)) { int incr; /* Check #2. Increase window, if skb with such over...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
189,483,631,405,456,000,000,000,000,000,000,000,000
26
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...
int vrend_renderer_resource_get_info(int res_handle, struct vrend_renderer_resource_info *info) { struct vrend_resource *res; int elsize; if (!info) return EINVAL; res = vrend_resource_lookup(res_handle, 0); if (!res) return EINVAL; elsize = util_form...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
28,619,250,298,047,817,000,000,000,000,000,000,000
25
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
RGWPutMetadataBucket() : has_policy(false), has_cors(false), policy_rw_mask(0) {}
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
286,744,867,002,095,770,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 <...
NTSTATUS asn1_full_tag(DATA_BLOB blob, uint8_t tag, size_t *packet_size) { struct asn1_data *asn1 = asn1_init(NULL); int size; NT_STATUS_HAVE_NO_MEMORY(asn1); asn1->data = blob.data; asn1->length = blob.length; if (!asn1_start_tag(asn1, tag)) { talloc_free(asn1); return STATUS_MORE_ENTRIES; } size = asn1_...
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
180,819,551,804,370,030,000,000,000,000,000,000,000
24
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
static int rtreeInsertCell( Rtree *pRtree, RtreeNode *pNode, RtreeCell *pCell, int iHeight ){ int rc = SQLITE_OK; if( iHeight>0 ){ RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid); if( pChild ){ nodeRelease(pRtree, pChild->pParent); nodeReference(pNode); pChild->pParent = ...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
107,360,663,836,928,670,000,000,000,000,000,000,000
34
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
void validateConnectUrl(absl::string_view raw_url, absl::string_view expected_host_port, uint16_t expected_port) { Utility::Url url; ASSERT_TRUE(url.initialize(raw_url, /*is_connect=*/true)) << "Failed to initialize " << raw_url; EXPECT_TRUE(url.scheme().empty()); EXPECT_TRUE(url.pathAnd...
1
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
112,331,531,064,394,420,000,000,000,000,000,000,000
9
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
bool ByteVector::operator!=(const ByteVector &v) const { return !operator==(v); }
0
[ "CWE-189" ]
taglib
dcdf4fd954e3213c355746fa15b7480461972308
46,259,736,854,807,870,000,000,000,000,000,000,000
4
Avoid uint overflow in case the length + index is over UINT_MAX
static int nfs4_intent_set_file(struct nameidata *nd, struct path *path, struct nfs4_state *state, fmode_t fmode) { struct file *filp; int ret; /* If the open_intent is for execute, we have an extra check to make */ if (fmode & FMODE_EXEC) { ret = nfs_may_open(state->inode, state->owner->so_cred, nd->int...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
248,039,571,870,339,080,000,000,000,000,000,000,000
25
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
rb_str_rpartition(str, sep) VALUE str; VALUE sep; { long pos = RSTRING(str)->len; if (TYPE(sep) != T_REGEXP) { VALUE tmp; tmp = rb_check_string_type(sep); if (NIL_P(tmp)) { rb_raise(rb_eTypeError, "type mismatch: %s given", rb_obj_classname(sep)); } sep = get_arg_pat(tmp); ...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
200,095,309,229,496,000,000,000,000,000,000,000,000
26
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
archive_mstring_copy_wcs_len(struct archive_mstring *aes, const wchar_t *wcs, size_t len) { if (wcs == NULL) { aes->aes_set = 0; } aes->aes_set = AES_SET_WCS; /* Only WCS form set. */ archive_string_empty(&(aes->aes_mbs)); archive_string_empty(&(aes->aes_utf8)); archive_wstrncpy(&(aes->aes_wcs), wcs, len); ...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
307,505,179,931,089,370,000,000,000,000,000,000,000
12
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
void tcp_rcv_established(struct sock *sk, struct sk_buff *skb, const struct tcphdr *th, unsigned int len) { struct tcp_sock *tp = tcp_sk(sk); if (unlikely(!sk->sk_rx_dst)) inet_csk(sk)->icsk_af_ops->sk_rx_dst_set(sk, skb); /* * Header prediction. * The code loosely follows the one in the famous * "30 in...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
47,414,873,503,800,580,000,000,000,000,000,000,000
193
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
static void klist_children_put(struct klist_node *n) { struct device_private *p = to_device_private_parent(n); struct device *dev = p->device; put_device(dev); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
60,895,130,669,283,700,000,000,000,000,000,000,000
7
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
void mbedtls_ssl_flight_free( mbedtls_ssl_flight_item *flight ) { mbedtls_ssl_flight_item *cur = flight; mbedtls_ssl_flight_item *next; while( cur != NULL ) { next = cur->next; mbedtls_free( cur->p ); mbedtls_free( cur ); cur = next; } }
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
296,281,238,838,809,900,000,000,000,000,000,000,000
15
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>