func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
check_dir_perms(pam_handle_t *pamh, const char *tdir) { char scratch[BUFLEN]; struct stat st; int i; /* Check that the directory is "safe". */ if ((tdir == NULL) || (strlen(tdir) == 0)) { return PAM_AUTH_ERR; } /* Iterate over the path, checking intermediate directories. */ memset(scratch, 0, sizeof(scratch))...
0
[ "CWE-22" ]
linux-pam
9dcead87e6d7f66d34e7a56d11a30daca367dffb
143,947,856,683,691,820,000,000,000,000,000,000,000
56
pam_timestamp: fix potential directory traversal issue (ticket #27) pam_timestamp uses values of PAM_RUSER and PAM_TTY as components of the timestamp pathname it creates, so extra care should be taken to avoid potential directory traversal issues. * modules/pam_timestamp/pam_timestamp.c (check_tty): Treat "." and ".....
pdf14_update_device_color_procs_push_c(gx_device *dev, gs_transparency_color_t group_color, int64_t icc_hashcode, gs_gstate *pgs, cmm_profile_t *icc_profile, bool is_mask) { pdf14_device *pdevproto; pdf14_device *pdev = (pdf14_device *)dev; gx_devi...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
258,609,560,917,699,370,000,000,000,000,000,000,000
222
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
static int nft_delset(struct nft_ctx *ctx, struct nft_set *set) { int err; err = nft_trans_set_add(ctx, NFT_MSG_DELSET, set); if (err < 0) return err; list_del_rcu(&set->list); ctx->table->use--; return err; }
0
[ "CWE-19" ]
nf
a2f18db0c68fec96631c10cad9384c196e9008ac
35,834,564,372,359,884,000,000,000,000,000,000,000
13
netfilter: nf_tables: fix flush ruleset chain dependencies Jumping between chains doesn't mix well with flush ruleset. Rules from a different chain and set elements may still refer to us. [ 353.373791] ------------[ cut here ]------------ [ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159! [ 353.373896...
static int dmar_init_reserved_ranges(void) { struct pci_dev *pdev = NULL; struct iova *iova; int i; init_iova_domain(&reserved_iova_list, VTD_PAGE_SIZE, IOVA_START_PFN); lockdep_set_class(&reserved_iova_list.iova_rbtree_lock, &reserved_rbtree_key); /* IOAPIC ranges shouldn't be accessed by DMA */ iova = res...
0
[]
linux
fb58fdcd295b914ece1d829b24df00a17a9624bc
140,389,776,614,930,720,000,000,000,000,000,000,000
38
iommu/vt-d: Do not enable ATS for untrusted devices Currently Linux automatically enables ATS (Address Translation Service) for any device that supports it (and IOMMU is turned on). ATS is used to accelerate DMA access as the device can cache translations locally so there is no need to do full translation on IOMMU sid...
static void tcp_dsack_extend(struct sock *sk, u32 seq, u32 end_seq) { struct tcp_sock *tp = tcp_sk(sk); if (!tp->rx_opt.dsack) tcp_dsack_set(sk, seq, end_seq); else tcp_sack_extend(tp->duplicate_sack, seq, end_seq); }
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
187,187,923,876,896,070,000,000,000,000,000,000,000
9
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
void CalendarRegressionTest::test4040996() { int32_t count = 0; StringEnumeration* ids = TimeZone::createEnumeration(-8 * 60 * 60 * 1000); if (ids == NULL) { dataerrln("Unable to create TimeZone enumeration."); return; } UErrorCode status = U_ZERO_ERROR; count = ids->count(status...
0
[ "CWE-190" ]
icu
71dd84d4ffd6600a70e5bca56a22b957e6642bd4
290,128,208,610,210,020,000,000,000,000,000,000,000
47
ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J X-SVN-Rev: 40654
rsvg_SAX_handler_struct_init (void) { if (!rsvgSAXHandlerStructInited) { rsvgSAXHandlerStructInited = TRUE; memset (&rsvgSAXHandlerStruct, 0, sizeof (rsvgSAXHandlerStruct)); rsvgSAXHandlerStruct.getEntity = rsvg_get_entity; rsvgSAXHandlerStruct.entityDecl = rsvg_entity_decl; ...
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
9,973,273,292,600,843,000,000,000,000,000,000,000
19
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
int proc_readdir(struct file * filp, void * dirent, filldir_t filldir) { struct proc_dir_entry * de; unsigned int ino; int i; struct inode *inode = filp->f_dentry->d_inode; int ret = 0; lock_kernel(); ino = inode->i_ino; de = PDE(inode); if (!de) { ret = -EINVAL; goto out; } i = filp->f_pos; switch (...
0
[]
linux-2.6
8b90db0df7187a01fb7177f1f812123138f562cf
223,035,494,101,148,100,000,000,000,000,000,000,000
59
Insanity avoidance in /proc The old /proc interfaces were never updated to use loff_t, and are just generally broken. Now, we should be using the seq_file interface for all of the proc files, but converting the legacy functions is more work than most people care for and has little upside.. But at least we can make t...
static int oidc_handle_post_authorization_response(request_rec *r, oidc_cfg *c, oidc_session_t *session) { oidc_debug(r, "enter"); /* initialize local variables */ char *response_mode = NULL; /* read the parameters that are POST-ed to us */ apr_table_t *params = apr_table_make(r->pool, 8); if (oidc_util_read...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
330,090,045,397,316,340,000,000,000,000,000,000,000
35
Add a function to escape Javascript characters
static int ZEND_FASTCALL ZEND_ADD_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); zval_dtor(free_op1.var);...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
257,138,640,867,126,870,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void testUriHostEmpty() { UriParserStateA stateA; UriUriA uriA; stateA.uri = &uriA; // 0 4 0 3 01 0 3 const char * const input = "http" "://" ":" "123"; const int res = uriParseUriA(&stateA, input); TEST_ASSERT(URI_SUCCESS == res); TEST_ASSERT(uriA.userInfo.first == NULL...
0
[ "CWE-787" ]
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
308,086,349,753,840,000,000,000,000,000,000,000,000
17
UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex Reported by Google Autofuzz team
uint32_t lpCurrentEncodedSize(unsigned char *p) { if (LP_ENCODING_IS_7BIT_UINT(p[0])) return 1; if (LP_ENCODING_IS_6BIT_STR(p[0])) return 1+LP_ENCODING_6BIT_STR_LEN(p); if (LP_ENCODING_IS_13BIT_INT(p[0])) return 2; if (LP_ENCODING_IS_16BIT_INT(p[0])) return 3; if (LP_ENCODING_IS_24BIT_INT(p[0])) ret...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
202,997,412,192,270,070,000,000,000,000,000,000,000
13
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static int su3000_frontend_attach(struct dvb_usb_adapter *adap) { struct dvb_usb_device *d = adap->dev; struct dw2102_state *state = d->priv; mutex_lock(&d->data_mutex); state->data[0] = 0xe; state->data[1] = 0x80; state->data[2] = 0; if (dvb_usb_generic_rw(d, state->data, 3, state->data, 1, 0) < 0) err("co...
0
[ "CWE-476", "CWE-119" ]
linux
606142af57dad981b78707234cfbd15f9f7b7125
107,572,895,221,254,400,000,000,000,000,000,000,000
58
[media] dw2102: don't do DMA on stack On Kernel 4.9, WARNINGs about doing DMA on stack are hit at the dw2102 driver: one in su3000_power_ctrl() and the other in tt_s2_4600_frontend_attach(). Both were due to the use of buffers on the stack as parameters to dvb_usb_generic_rw() and the resulting attempt to do DMA with...
static inline void unregister_rt_sched_group(struct task_group *tg, int cpu) { list_del_rcu(&tg->rt_rq[cpu]->leaf_rt_rq_list); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
76,171,292,866,443,350,000,000,000,000,000,000,000
4
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 struct page *last_fsync_dnode(struct f2fs_sb_info *sbi, nid_t ino) { pgoff_t index, end; struct pagevec pvec; struct page *last_page = NULL; pagevec_init(&pvec, 0); index = 0; end = ULONG_MAX; while (index <= end) { int i, nr_pages; nr_pages = pagevec_lookup_tag(&pvec, NODE_MAPPING(sbi), &index, ...
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
303,905,934,087,620,940,000,000,000,000,000,000,000
59
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
authorize(struct mg_connection* conn, FILE* filep) { if (!conn || !filep) { return 0; } struct auth_s auth = { .workbuf_len=0, .pworkbuf=NULL, .pszUser=NULL, .pszPasswd=NULL}; if (!parse_auth_header(conn, &auth)) { return 0; } /* validate against htpasswd file */ return read_auth_file(filep, &auth); }
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
50,530,367,070,754,260,000,000,000,000,000,000,000
14
net bugfix: potential buffer overrun
rtdatetolfp( char *str, l_fp *lfp ) { register char *cp; register int i; struct calendar cal; char buf[4]; cal.yearday = 0; /* * An RT-11 date looks like: * * d[d]-Mth-y[y] hh:mm:ss * * (No docs, but assume 4-digit years are also legal...) * * d[d]-Mth-y[y[y[y]]] hh:mm:ss */ cp = str; if (!...
0
[ "CWE-20" ]
ntp
07a5b8141e354a998a52994c3c9cd547927e56ce
158,494,219,837,198,770,000,000,000,000,000,000,000
116
[TALOS-CAN-0063] avoid buffer overrun in ntpq
dns_zone_setnotifydelay(dns_zone_t *zone, uint32_t delay) { REQUIRE(DNS_ZONE_VALID(zone)); LOCK_ZONE(zone); zone->notifydelay = delay; UNLOCK_ZONE(zone); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
142,420,513,523,080,600,000,000,000,000,000,000,000
7
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.
bool AbstractWebApplication::sessionEnd() { if ((session_ != 0) && (sessions_.contains(session_->id))) { QNetworkCookie cookie(C_SID, session_->id.toUtf8()); cookie.setPath(QLatin1String("/")); cookie.setExpirationDate(QDateTime::currentDateTime()); sessions_.remove(session_->id); ...
0
[ "CWE-20" ]
qBittorrent
f5ad04766f4abaa78374ff03704316f8ce04627d
106,830,503,842,232,600,000,000,000,000,000,000,000
17
[WebUI] Avoid clickjacking attacks
static BOOL autodetect_recv_bandwidth_measure_results(rdpRdp* rdp, wStream* s, AUTODETECT_RSP_PDU* autodetectRspPdu) { BOOL success = TRUE; if (autodetectRspPdu->headerLength != 0x0E) return FALSE; WLog_VRB(AUTODETECT_TAG, "received Bandwidth Measure Results ...
0
[ "CWE-125" ]
FreeRDP
f5e73cc7c9cd973b516a618da877c87b80950b65
251,258,706,899,851,170,000,000,000,000,000,000,000
24
Fixed #6009: Bounds checks in autodetect_recv_bandwidth_measure_results
static void string_addr_inc(struct x86_emulate_ctxt *ctxt, int reg, struct operand *op) { int df = (ctxt->eflags & X86_EFLAGS_DF) ? -op->count : op->count; register_address_increment(ctxt, reg, df * op->bytes); op->addr.mem.ea = register_address(ctxt, reg); }
0
[ "CWE-284" ]
linux
33ab91103b3415e12457e3104f0e4517ce12d0f3
206,227,419,079,175,900,000,000,000,000,000,000,000
8
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 ...
static int unmount_fuse_locked(const char *mnt, int quiet, int lazy) { int res; char *copy; const char *last; int umount_flags = lazy ? UMOUNT_DETACH : 0; if (getuid() != 0) { res = may_unmount(mnt, quiet); if (res == -1) return -1; } copy = strdup(mnt); if (copy == NULL) { fprintf(stderr, "%s: faile...
0
[ "CWE-269" ]
libfuse
28bdae3d113ef479c1660a581ef720cdc33bf466
195,934,905,307,732,930,000,000,000,000,000,000,000
49
fusermount: don't feed "escaped commas" into mount options The old code permits the following behavior: $ _FUSE_COMMFD=10000 priv_strace -etrace=mount -s200 fusermount -o 'foobar=\,allow_other' mount mount("/dev/fuse", ".", "fuse", MS_NOSUID|MS_NODEV, "foobar=\\,allow_other,fd=3,rootmode=40000,user_id=1000,group_id=1...
static void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) { if (to_vmx(vcpu)->rmode.vm86_active) { to_vmx(vcpu)->rmode.save_rflags = rflags; rflags |= X86_EFLAGS_IOPL | X86_EFLAGS_VM; } vmcs_writel(GUEST_RFLAGS, rflags); }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
165,801,309,122,895,910,000,000,000,000,000,000,000
8
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
char *sftp_readlink(sftp_session sftp, const char *path) { sftp_status_message status = NULL; sftp_message msg = NULL; ssh_string path_s = NULL; ssh_string link_s = NULL; ssh_buffer buffer; char *lnk; uint32_t ignored; uint32_t id; if (sftp == NULL) return NULL; if (path == NULL) { ssh_set_...
0
[]
libssh
4d8420f3282ed07fc99fc5e930c17df27ef1e9b2
30,818,739,146,719,770,000,000,000,000,000,000,000
87
sftp: Fix bug in sftp_mkdir not returning on error. resolves: #84 (cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44)
t_drop (int j) { if (debug_level > 2) log_querydrop (&t[j].active); errno = error_pipe; t_close (j); }
0
[ "CWE-362" ]
ndjbdns
177b5522e9b3d25778001c8cebfddd4d2973fcfd
329,282,768,508,295,000,000,000,000,000,000,000,000
8
Merge identical outgoing requests - patch 2. This patch fixes dnscache to combine *same* client queries into one single outgoing request, thus securing the server from possible cache poisoning attacks. The merges operation takes place in the dns_transmit layer, rather than between query and dns_transmit layers, as don...
static void php_imagefontsize(INTERNAL_FUNCTION_PARAMETERS, int arg) { long SIZE; gdFontPtr font; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &SIZE) == FAILURE) { return; } font = php_find_gd_font(SIZE TSRMLS_CC); RETURN_LONG(arg ? font->h : font->w); }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
23,448,360,432,988,180,000,000,000,000,000,000,000
12
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
bool Item_cache_wrapper::send(Protocol *protocol, st_value *buffer) { if (result_field) return protocol->store(result_field); return Item::send(protocol, buffer); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
155,261,799,299,775,490,000,000,000,000,000,000,000
6
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
bool __fastcall TCommandSet::GetChangesDirectory(TFSCommand Cmd) { CHECK_CMD; return CommandSet[Cmd].ChangesDirectory; }
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
310,999,406,017,200,000,000,000,000,000,000,000,000
5
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
ADDRESS *rfc822_append (ADDRESS **a, ADDRESS *b, int prune) { ADDRESS *tmp = *a; while (tmp && tmp->next) tmp = tmp->next; if (!b) return tmp; if (tmp) tmp->next = rfc822_cpy_adr (b, prune); else tmp = *a = rfc822_cpy_adr (b, prune); while (tmp && tmp->next) tmp = tmp->next; return tm...
0
[ "CWE-401" ]
mutt
4a2becbdb4422aaffe3ce314991b9d670b7adf17
186,660,031,585,150,800,000,000,000,000,000,000,000
16
Fix memory leak parsing group addresses without a display name. When there was a group address terminator with no previous addresses (including the group display-name), an address would be allocated but not attached to the address list. Change this to only allocate when last exists. It would be more correct to not a...
int bns_cnt_ambi(const bntseq_t *bns, int64_t pos_f, int len, int *ref_id) { int left, mid, right, nn; if (ref_id) *ref_id = bns_pos2rid(bns, pos_f); left = 0; right = bns->n_holes; nn = 0; while (left < right) { mid = (left + right) >> 1; if (pos_f >= bns->ambs[mid].offset + bns->ambs[mid].len) left = mid + 1;...
0
[ "CWE-787" ]
bwa
20d0a13092aa4cb73230492b05f9697d5ef0b88e
162,892,148,521,601,920,000,000,000,000,000,000,000
22
r1198: exit if .alt is malformatted Resolves #232
TfLiteStatus PopulateLedgerData(const TfLiteSparsity* sparsity, TfLiteContext* context, uint8_t* ledger_data) { TF_LITE_ENSURE(context, sparsity != nullptr); const auto* array_segments = sparsity->dim_metadata[1].array_segments; const auto* array_indices = sparsity->dim_metadata[1]...
0
[ "CWE-369" ]
tensorflow
718721986aa137691ee23f03638867151f74935f
230,490,962,394,482,770,000,000,000,000,000,000,000
29
Prevent division by 0 in `fully_connected.cc` PiperOrigin-RevId: 385137282 Change-Id: If201e69b6e0048f0be001330b4b977e2b46db2cb
proto_tree_add_item_ret_ipv4(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, ws_in4_addr *retval) { header_field_info *hfinfo = proto_registrar_get_nth(hfindex); field_info *new_fi; ws_in4_addr value; ...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
127,981,944,386,419,670,000,000,000,000,000,000,000
51
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
ns_client_checkaclsilent(ns_client_t *client, isc_netaddr_t *netaddr, dns_acl_t *acl, bool default_allow) { isc_result_t result; dns_aclenv_t *env = ns_interfacemgr_getaclenv(client->manager->interface->mgr); isc_netaddr_t tmpnetaddr; int match; if (acl == NULL) { if (default_allow) { goto allow; } e...
0
[ "CWE-617" ]
bind9
15996f0cb15631b95a801e3e88928494a69ad6ee
337,896,022,093,046,260,000,000,000,000,000,000,000
37
ns_client_error() could assert if rcode was overridden to NOERROR The client->rcode_override was originally created to force the server to send SERVFAIL in some cases when it would normally have sent FORMERR. More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2 commit (part of GL #2790) to force the...
void QPaintEngineEx::drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) { Q_ASSUME(pointCount >= 2); QVectorPath path((const qreal *) points, pointCount, nullptr, QVectorPath::polygonFlags(mode)); if (mode == PolylineMode) stroke(path, state()->pen); else draw(path...
0
[ "CWE-787" ]
qtbase
6b400e3147dcfd8cc3a393ace1bd118c93762e0c
8,985,725,981,570,674,000,000,000,000,000,000,000
10
Improve fix for avoiding huge number of tiny dashes Some pathological cases were not caught by the previous fix. Fixes: QTBUG-95239 Pick-to: 6.2 6.1 5.15 Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5 Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Status CreateOptimizedNodesGroup(NodeDef* root_node, OptimizedNodesGroup* group) const { const OpInfo::TensorProperties* root_node_output_properties; TF_RETURN_IF_ERROR( GetTensorProperties(root_node->name(), &root_node_output_properties)); group->root_node = ro...
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
124,497,054,214,260,900,000,000,000,000,000,000,000
19
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
static void parse_version(std::string const& full_version_string, std::string& version, int& extension_level) { PointerHolder<char> vp(true, QUtil::copy_string(full_version_string)); char* v = vp.getPointer(); char* p1 = strchr(v, '.'); char* p2 = (p1 ? strchr(1 + p1, '.') : 0)...
1
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
319,975,480,897,948,550,000,000,000,000,000,000,000
14
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
__kmem_cache_create (struct kmem_cache *cachep, unsigned long flags) { size_t ralign = BYTES_PER_WORD; gfp_t gfp; int err; size_t size = cachep->size; #if DEBUG #if FORCED_DEBUG /* * Enable redzoning and last user accounting, except for caches with * large objects, if the increased size would increase the obj...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
100,665,121,788,178,560,000,000,000,000,000,000,000
167
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
e_ews_connection_query_auth_methods_finish (EEwsConnection *cnc, GAsyncResult *result, GSList **auth_methods, GError **error) { GSimpleAsyncResult *simple; EwsAsyncData *async_data; g_return_val_if_fail (cnc != NULL, FALSE); g_return_val_if_fail (auth_methods != NULL, FALSE); g_return_v...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
95,983,934,223,101,170,000,000,000,000,000,000,000
26
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
int kvm_hv_set_enforce_cpuid(struct kvm_vcpu *vcpu, bool enforce) { struct kvm_vcpu_hv *hv_vcpu; int ret = 0; if (!to_hv_vcpu(vcpu)) { if (enforce) { ret = kvm_hv_vcpu_init(vcpu); if (ret) return ret; } else { return 0; } } hv_vcpu = to_hv_vcpu(vcpu); hv_vcpu->enforce_cpuid = enforce; retur...
0
[ "CWE-476" ]
linux
7ec37d1cbe17d8189d9562178d8b29167fe1c31a
302,100,613,734,854,630,000,000,000,000,000,000,000
20
KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq When KVM_CAP_HYPERV_SYNIC{,2} is activated, KVM already checks for irqchip_in_kernel() so normally SynIC irqs should never be set. It is, however, possible for a misbehaving VMM to write to SYNIC/STIMER MSRs causing erroneous behavior. The immedi...
void rtp_hnti_del(GF_Box *s) { GF_RTPBox *ptr = (GF_RTPBox *)s; if (ptr->sdpText) gf_free(ptr->sdpText); gf_free(ptr); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
66,852,880,852,695,860,000,000,000,000,000,000,000
7
prevent dref memleak on invalid input (#1183)
GF_Err gf_isom_lhvc_force_inband_config(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex) { return gf_isom_hevc_config_update_ex(the_file, trackNumber, DescriptionIndex, NULL, GF_ISOM_LHCC_SET_INBAND, GF_FALSE); }
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
257,226,105,490,293,150,000,000,000,000,000,000,000
4
fixed #1785 (fuzz)
TEST_P(Http2CodecImplTest, RefusedStreamReset) { initialize(); TestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, false)); request_encoder_->encodeHeaders(request_headers, false); MockStreamCallbacks callbacks; request_...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
111,421,990,087,521,150,000,000,000,000,000,000,000
15
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
check_parent_exists(void) { /* * If our parent has exited then getppid() will return (pid_t)1, * so testing for that should be safe. */ if (parent_pid != -1 && getppid() != parent_pid) { /* printf("Parent has died - Authentication agent exiting.\n"); */ cleanup_socket(); _exit(2); } }
0
[ "CWE-399", "CWE-415" ]
openssh-portable
e04fd6dde16de1cdc5a4d9946397ff60d96568db
192,782,203,818,624,080,000,000,000,000,000,000,000
12
upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own function and remove an unused variable; ok dtucker@ OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559
static GF_Node *lsr_read_mpath(GF_LASeRCodec *lsr) { GF_Node *elt = gf_node_new(lsr->sg, TAG_SVG_mpath); lsr_read_id(lsr, elt); lsr_read_rare(lsr, elt); lsr_read_href(lsr, elt); lsr_read_any_attribute(lsr, elt, 1); lsr_read_group_content(lsr, elt, 0); return elt; }
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
178,271,783,641,417,180,000,000,000,000,000,000,000
10
fixed #2213
static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) { KerndeintContext *kerndeint = inlink->dst->priv; AVFilterLink *outlink = inlink->dst->outputs[0]; AVFrame *outpic; const uint8_t *prvp; ///< Previous field's pixel line number n const uint8_t *prvpp; ///< Previous field's pixel line ...
1
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
27,426,967,581,184,165,000,000,000,000,000,000,000
182
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
void sysctl_head_put(struct ctl_table_header *head) { spin_lock(&sysctl_lock); if (!--head->count) kfree_rcu(head, rcu); spin_unlock(&sysctl_lock); }
0
[ "CWE-20", "CWE-399" ]
linux
93362fa47fe98b62e4a34ab408c4a418432e7939
132,441,927,405,265,860,000,000,000,000,000,000,000
7
sysctl: Drop reference added by grab_header in proc_sys_readdir Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference added by grab_header when return from !dir_emit_dots path. It can cause any path called unregister_sysctl_table will wait forever. The calltrace of CVE-2016-9191: [ 5535.960522] Call Trace: [ ...
TEST(IndexBoundsBuilderTest, TranslateLTEToStringWithMockCollator) { CollatorInterfaceMock collator(CollatorInterfaceMock::MockType::kReverseString); auto testIndex = buildSimpleIndexEntry(); testIndex.collator = &collator; BSONObj obj = fromjson("{a: {$lte: 'foo'}}"); auto expr = parseMatchExpress...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
149,806,887,437,925,340,000,000,000,000,000,000,000
19
SERVER-44377 generate correct plan for indexed inequalities to null
static int pdo_stmt_iter_valid(zend_object_iterator *iter TSRMLS_DC) { struct php_pdo_iterator *I = (struct php_pdo_iterator*)iter->data; return I->fetch_ahead ? SUCCESS : FAILURE;
0
[ "CWE-476" ]
php-src
6045de69c7dedcba3eadf7c4bba424b19c81d00d
291,935,562,360,739,750,000,000,000,000,000,000,000
6
Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle Proper soltion would be to call serialize/unserialize and deal with the result, but this requires more work that should be done by wddx maintainer (not me).
static int binder_put_node_cmd(struct binder_proc *proc, struct binder_thread *thread, void __user **ptrp, binder_uintptr_t node_ptr, binder_uintptr_t node_cookie, int node_debug_id, uint32_t cmd, const char *cmd_name) { void __user *ptr = *ptrp; if (put_us...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
325,983,716,068,641,500,000,000,000,000,000,000,000
30
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...
gdk_pixbuf__tiff_image_save_to_callback (GdkPixbufSaveFunc save_func, gpointer user_data, GdkPixbuf *pixbuf, gchar **keys, ...
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
331,480,195,715,949,370,000,000,000,000,000,000,000
273
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
int main(int argc, char** argv) { /* Kernel starts us with all fd's closed. * But it's dangerous: * fprintf(stderr) can dump messages into random fds, etc. * Ensure that if any of fd 0,1,2 is closed, we open it to /dev/null. */ int fd = xopen("/dev/null", O_RDWR); while (fd < 2) fd = xd...
1
[ "CWE-59" ]
abrt
17cb66b13997b0159b4253b3f5722db79f476d68
151,330,376,248,167,800,000,000,000,000,000,000,000
419
ccpp: stop reading hs_error.log from /tmp The file might contain anything and there is no way to verify its contents. Related: #1211835 Signed-off-by: Jakub Filak <jfilak@redhat.com>
ofputil_append_flow_monitor_request( const struct ofputil_flow_monitor_request *rq, struct ofpbuf *msg) { struct nx_flow_monitor_request *nfmr; size_t start_ofs; int match_len; if (!msg->size) { ofpraw_put(OFPRAW_NXST_FLOW_MONITOR_REQUEST, OFP10_VERSION, msg); } start_ofs = msg->si...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
114,252,835,165,352,470,000,000,000,000,000,000,000
22
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
int ServerKeyBase::get_length() const { return 0; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
233,191,853,186,134,730,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static int acm_tty_install(struct tty_driver *driver, struct tty_struct *tty) { struct acm *acm; int retval; acm = acm_get_by_minor(tty->index); if (!acm) return -ENODEV; retval = tty_standard_install(driver, tty); if (retval) goto error_init_termios; /* * Suppress initial echoing for some devices which...
0
[ "CWE-416" ]
linux
c52873e5a1ef72f845526d9f6a50704433f9c625
188,243,247,501,624,200,000,000,000,000,000,000,000
28
usb: cdc-acm: make sure a refcount is taken early enough destroy() will decrement the refcount on the interface, so that it needs to be taken so early that it never undercounts. Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)") Cc: stable <stable@vger.kernel.org> Reported-and-tested-by: ...
mrb_method_search(mrb_state *mrb, struct RClass* c, mrb_sym mid) { mrb_method_t m; m = mrb_method_search_vm(mrb, &c, mid); if (MRB_METHOD_UNDEF_P(m)) { mrb_name_error(mrb, mid, "undefined method '%n' for class %C", mid, c); } return m; }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
336,229,688,771,742,500,000,000,000,000,000,000,000
10
class.c: clear method cache after `remove_method`.
GF_ISOMHEVCType gf_isom_get_hevc_lhvc_type(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex) { u32 type; GF_TrackBox *trak; GF_MPEGVisualSampleEntryBox *entry; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Media || !DescriptionIndex) return GF_ISOM_HEVCTYPE_NONE; if (!g...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
69,383,058,492,553,350,000,000,000,000,000,000,000
41
fixed #2165
static void _get_random_bytes(void *buf, int nbytes) { __u8 tmp[CHACHA_BLOCK_SIZE] __aligned(4); trace_get_random_bytes(nbytes, _RET_IP_); while (nbytes >= CHACHA_BLOCK_SIZE) { extract_crng(buf); buf += CHACHA_BLOCK_SIZE; nbytes -= CHACHA_BLOCK_SIZE; } if (nbytes > 0) { extract_crng(tmp); memcpy(buf, ...
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
136,058,154,245,993,450,000,000,000,000,000,000,000
20
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
void show_numa_stats(struct task_struct *p, struct seq_file *m) { int node; unsigned long tsf = 0, tpf = 0, gsf = 0, gpf = 0; for_each_online_node(node) { if (p->numa_faults) { tsf = p->numa_faults[task_faults_idx(NUMA_MEM, node, 0)]; tpf = p->numa_faults[task_faults_idx(NUMA_MEM, node, 1)]; } if (p->nu...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
53,885,389,540,839,370,000,000,000,000,000,000,000
17
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
list_restrict( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { struct info_restrict *ir; DPRINTF(3, ("wants restrict list summary\n")); ir = (struct info_restrict *)prepare_pkt(srcadr, inter, inpkt, v6sizeof(struct info_restrict)); /* * The restriction lists are kept sorted in the reverse...
1
[ "CWE-476" ]
ntp
8a0c765f3c47633fa262356b0818788d1cf249b1
333,542,719,179,795,250,000,000,000,000,000,000,000
24
[Bug 2939] reslist NULL pointer dereference [Bug 2940] Stack exhaustion in recursive traversal of restriction list -- these two where fixed together --
int ixgbe_pci_sriov_configure(struct pci_dev *dev, int num_vfs) { if (num_vfs == 0) return ixgbe_pci_sriov_disable(dev); else return ixgbe_pci_sriov_enable(dev, num_vfs); }
0
[ "CWE-20" ]
linux
63e39d29b3da02e901349f6cd71159818a4737a6
68,268,859,034,520,330,000,000,000,000,000,000,000
7
ixgbe: fix large MTU request from VF Check that the MTU value requested by the VF is in the supported range of MTUs before attempting to set the VF large packet enable, otherwise reject the request. This also avoids unnecessary register updates in the case of the 82599 controller. Fixes: 872844ddb9e4 ("ixgbe: Enable ...
fetch_range_quantifier(UChar** src, UChar* end, OnigToken* tok, ScanEnv* env) { int low, up, syn_allow, non_low = 0; int r = 0; OnigCodePoint c; OnigEncoding enc = env->enc; UChar* p = *src; PFETCH_READY; syn_allow = IS_SYNTAX_BV(env->syntax, ONIG_SYN_ALLOW_INVALID_INTERVAL); if (PEND) { if (syn_a...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
223,078,706,544,798,280,000,000,000,000,000,000,000
88
onig-5.9.2
xmlXPathCastNumberToBoolean (double val) { if (xmlXPathIsNaN(val) || (val == 0.0)) return(0); return(1); }
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
152,837,955,364,088,050,000,000,000,000,000,000,000
5
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
static CURLcode resolve_server(struct SessionHandle *data, struct connectdata *conn, bool *async) { CURLcode result=CURLE_OK; long timeout_ms = Curl_timeleft(data, NULL, TRUE); /************************************************************* * Resolv...
0
[ "CWE-200" ]
curl
b3875606925536f82fc61f3114ac42f29eaf6945
319,139,435,422,247,980,000,000,000,000,000,000,000
72
curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds When duplicating a handle, the data to post was duplicated using strdup() when it could be binary and contain zeroes and it was not even zero terminated! This caused read out of bounds crashes/segfaults. Since the lib/strdup.c file no longer is easily sha...
static int do_inotify_init(int flags) { struct fsnotify_group *group; int ret; /* Check the IN_* constants for consistency. */ BUILD_BUG_ON(IN_CLOEXEC != O_CLOEXEC); BUILD_BUG_ON(IN_NONBLOCK != O_NONBLOCK); if (flags & ~(IN_CLOEXEC | IN_NONBLOCK)) return -EINVAL; /* fsnotify_obtain_group took a reference t...
0
[ "CWE-401" ]
linux-fs
62c9d2674b31d4c8a674bee86b7edc6da2803aea
213,634,069,672,249,200,000,000,000,000,000,000,000
24
inotify: Fix fsnotify_mark refcount leak in inotify_update_existing_watch() Commit 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inotify_add_watch()") forgot to call fsnotify_put_mark() with IN_MASK_CREATE after fsnotify_find_mark() Fixes: 4d97f7d53da7dc83 ("inotify: Add flag IN_MASK_CREATE for inotify_add_...
MagickPrivate SignatureInfo *AcquireSignatureInfo(void) { SignatureInfo *signature_info; unsigned long lsb_first; signature_info=(SignatureInfo *) AcquireCriticalMemory( sizeof(*signature_info)); (void) memset(signature_info,0,sizeof(*signature_info)); signature_info->digestsize=SignatureDigests...
0
[ "CWE-369" ]
ImageMagick
70aa86f5d5d8aa605a918ed51f7574f433a18482
143,896,620,101,050,520,000,000,000,000,000,000,000
29
possible divide by zero + clear buffers
void Curl_ssl_kill_session(struct Curl_ssl_session *session) { if(session->sessionid) { /* defensive check */ /* free the ID the SSL-layer specific way */ Curl_ssl->session_free(session->sessionid); session->sessionid = NULL; session->age = 0; /* fresh */ Curl_free_primary_ssl_config(&sessi...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
259,265,807,026,236,560,000,000,000,000,000,000
17
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
const char *worktree_git_path(const struct worktree *wt, const char *fmt, ...) { struct strbuf *pathname = get_pathname(); va_list args; va_start(args, fmt); do_git_path(wt, pathname, fmt, args); va_end(args); return pathname->buf; }
0
[ "CWE-125" ]
git
11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d
102,462,171,375,293,700,000,000,000,000,000,000,000
9
is_ntfs_dotgit: use a size_t for traversing string We walk through the "name" string using an int, which can wrap to a negative value and cause us to read random memory before our array (e.g., by creating a tree with a name >2GB, since "int" is still 32 bits even on most 64-bit platforms). Worse, this is easy to trigg...
set_info_data_free (SetInfoAsyncData *data) { if (data->info) g_object_unref (data->info); if (data->error) g_error_free (data->error); g_free (data); }
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
84,262,984,748,369,500,000,000,000,000,000,000,000
8
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
static int ZEND_FASTCALL ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); mod_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC); ZEND_VM_NEXT_OPC...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
275,542,037,231,870,060,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static void mntput_no_expire(struct mount *mnt) { rcu_read_lock(); mnt_add_count(mnt, -1); if (likely(mnt->mnt_ns)) { /* shouldn't be the last one */ rcu_read_unlock(); return; } lock_mount_hash(); if (mnt_get_count(mnt)) { rcu_read_unlock(); unlock_mount_hash(); return; } if (unlikely(mnt->mnt.mnt_fl...
1
[ "CWE-284" ]
linux
ce07d891a0891d3c0d0c2d73d577490486b809e1
244,743,141,493,419,340,000,000,000,000,000,000,000
38
mnt: Honor MNT_LOCKED when detaching mounts Modify umount(MNT_DETACH) to keep mounts in the hash table that are locked to their parent mounts, when the parent is lazily unmounted. In mntput_no_expire detach the children from the hash table, depending on mnt_pin_kill in cleanup_mnt to decrement the mnt_count of the ch...
rfbMpiToBytes(const gcry_mpi_t value, uint8_t *result, size_t size) { gcry_error_t error; size_t len; int i; error = gcry_mpi_print(GCRYMPI_FMT_USG, result, size, &len, value); if (gcry_err_code(error) != GPG_ERR_NO_ERROR) { rfbClientLog("gcry_mpi_print error: %s\n", gcry_strerror(error)); return F...
0
[ "CWE-20" ]
libvncserver
85a778c0e45e87e35ee7199f1f25020648e8b812
120,673,454,069,606,440,000,000,000,000,000,000,000
18
Check for MallocFrameBuffer() return value If MallocFrameBuffer() returns FALSE, frame buffer pointer is left to NULL. Subsequent writes into that buffer could lead to memory corruption, or even arbitrary code execution.
UTI_CompareIPs(IPAddr *a, IPAddr *b, IPAddr *mask) { int i, d; if (a->family != b->family) return a->family - b->family; if (mask && mask->family != b->family) mask = NULL; switch (a->family) { case IPADDR_UNSPEC: return 0; case IPADDR_INET4: if (mask) return (a->addr.in4 ...
0
[ "CWE-59" ]
chrony
7a4c396bba8f92a3ee8018620983529152050c74
123,406,459,817,002,550,000,000,000,000,000,000,000
30
util: add functions for common file operations Add a function to open a file for reading, writing, or appending. In uppercase modes errors are handled as fatal, i.e. the caller doesn't need to check for NULL. To avoid string manipulations in the callers, the function accepts an optional directory and suffix. New files...
void Magick::Image::quantize(const bool measureError_) { modifyImage(); if (measureError_) options()->quantizeInfo()->measure_error=MagickTrue; else options()->quantizeInfo()->measure_error=MagickFalse; GetPPException; QuantizeImage(options()->quantizeInfo(),image(),exceptionInfo); ThrowImageExce...
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
50,679,355,114,231,110,000,000,000,000,000,000,000
13
Added missing return to avoid use after free.
attr_rect(cattrflags add, cattrflags sub, cattrflags xor, short y0, short x0, short y1, short x1) { //printf("attr_rect %d,%d..%d,%d +%llX -%llX ^%llX\n", y0, x0, y1, x1, add, sub, xor); y0--; x0--; y1--; x1--; if (term.curs.origin) { y0 += term.marg_top; x0 += term.marg_left; y1 += term.marg_top; ...
0
[ "CWE-703", "CWE-770" ]
mintty
bd52109993440b6996760aaccb66e68e782762b9
234,272,851,064,328,760,000,000,000,000,000,000,000
47
tame some window operations, just in case
bool is_null() { return null_value; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
260,674,740,866,073,770,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
create_node(authz_rule_segment_t *segment, apr_pool_t *result_pool) { node_t *result = apr_pcalloc(result_pool, sizeof(*result)); if (segment) result->segment = segment->pattern; else { result->segment.data = ""; result->segment.len = 0; } result->rights.access.sequence_numbe...
0
[ "CWE-703" ]
subversion
e1b615840932fb46aefe1cd90d2115720af4600e
198,232,478,706,007,200,000,000,000,000,000,000,000
14
Fix issue #4880 "Use-after-free of object-pools when used as httpd module" Ensure that we initialize authz again if the pool which our authz caches depend on is cleared. Apache HTTPD may run pre/post config hooks multiple times and clear its global configuration pool which our authz caching pools depend on. Reported-...
pq_init(void) { PqSendBufferSize = PQ_SEND_BUFFER_SIZE; PqSendBuffer = MemoryContextAlloc(TopMemoryContext, PqSendBufferSize); PqSendPointer = PqSendStart = PqRecvPointer = PqRecvLength = 0; PqCommBusy = false; PqCommReadingMsg = false; DoingCopyOut = false; on_proc_exit(socket_close, 0); }
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
272,910,043,380,160,740,000,000,000,000,000,000,000
10
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
void set_myinst(entity_inst_t i) { my_inst = i; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
303,537,379,956,370,840,000,000,000,000,000,000,000
1
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 ...
my_ulonglong mysql_st_internal_execute41( SV *sth, int num_params, MYSQL_RES **result, MYSQL_STMT *stmt, MYSQL_BIND...
0
[ "CWE-119" ]
DBD-mysql
7c164a0c86cec6ee95df1d141e67b0e85dfdefd2
176,190,986,074,526,970,000,000,000,000,000,000,000
115
Do not use unsafe sprintf w/variable length input This can cause a buffer overflow to occur when reporting error message about validation of (untrusted) user input parameters.
int tracing_set_time_stamp_abs(struct trace_array *tr, bool abs) { int ret = 0; mutex_lock(&trace_types_lock); if (abs && tr->time_stamp_abs_ref++) goto out; if (!abs) { if (WARN_ON_ONCE(!tr->time_stamp_abs_ref)) { ret = -EINVAL; goto out; } if (--tr->time_stamp_abs_ref) goto out; } ring_buf...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
2,197,067,303,620,406,000,000,000,000,000,000,000
30
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
TEST_P(ProtocolIntegrationTest, TestDownstreamResetIdleTimeout) { config_helper_.setDownstreamHttpIdleTimeout(std::chrono::milliseconds(100)); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto encoder_decoder = codec_client_->startRequest(default_request_headers_); EXPECT_TRUE(fake...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
79,513,657,146,612,890,000,000,000,000,000,000,000
30
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int __io_sqe_files_update(struct io_ring_ctx *ctx, struct io_uring_rsrc_update2 *up, unsigned nr_args) { u64 __user *tags = u64_to_user_ptr(up->tags); __s32 __user *fds = u64_to_user_ptr(up->data); struct io_rsrc_data *data = ctx->file_data; struct io_fixed_file *file_slot; struct file *file; in...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
318,768,041,517,267,500,000,000,000,000,000,000,000
78
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
int crypt_get_integrity_tag_size(struct crypt_device *cd) { if (isINTEGRITY(cd->type)) return cd->u.integrity.params.tag_size; if (isLUKS2(cd->type)) return INTEGRITY_tag_size(cd, crypt_get_integrity(cd), crypt_get_cipher(cd), crypt_get_cipher_mode(cd)); return 0; }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
196,256,145,519,855,930,000,000,000,000,000,000,000
11
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static void rtreedepth(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){ UNUSED_PARAMETER(nArg); if( sqlite3_value_type(apArg[0])!=SQLITE_BLOB || sqlite3_value_bytes(apArg[0])<2 ){ sqlite3_result_error(ctx, "Invalid argument to rtreedepth()", -1); }else{ u8 *zBlob = (u8 *)sqlite3_value_blob(a...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
74,184,135,846,311,290,000,000,000,000,000,000,000
11
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
static void ems_usb_read_interrupt_callback(struct urb *urb) { struct ems_usb *dev = urb->context; struct net_device *netdev = dev->netdev; int err; if (!netif_device_present(netdev)) return; switch (urb->status) { case 0: dev->free_slots = dev->intr_in_buffer[1]; if (dev->free_slots > CPC_TX_QUEUE_TRIGGE...
0
[ "CWE-415" ]
linux
c70222752228a62135cee3409dccefd494a24646
96,517,915,341,440,680,000,000,000,000,000,000,000
36
can: ems_usb: ems_usb_start_xmit(): fix double dev_kfree_skb() in error path There is no need to call dev_kfree_skb() when usb_submit_urb() fails beacause can_put_echo_skb() deletes the original skb and can_free_echo_skb() deletes the cloned skb. Link: https://lore.kernel.org/all/20220228083639.38183-1-hbh25y@gmail.c...
encode_CLEAR_ACTIONS(const struct ofpact_null *null OVS_UNUSED, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out OVS_UNUSED) { if (ofp_version > OFP10_VERSION) { instruction_put_OFPIT11_CLEAR_ACTIONS(out); } }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
72,720,272,769,885,590,000,000,000,000,000,000,000
8
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void t1_subset_ascii_part(void) { int j, *p; char *glyph, **gg, **glyph_names; struct avl_table *gl_tree; struct avl_traverser t; void **aa; assert(fd_cur != NULL); assert(fd_cur->gl_tree != NULL); t1_getline(); while (!t1_prefix("/Encoding")) { t1_scan_param(); ...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
15,914,582,276,178,384,000,000,000,000,000,000,000
68
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
int git_tree__parse(void *_tree, git_odb_object *odb_obj) { git_tree *tree = _tree; const char *buffer = git_odb_object_data(odb_obj); const char *buffer_end = buffer + git_odb_object_size(odb_obj); if (git_vector_init(&tree->entries, DEFAULT_TREE_SIZE, entry_sort_cmp) < 0) return -1; while (buffer < buffer_en...
0
[ "CWE-20" ]
libgit2
928429c5c96a701bcbcafacb2421a82602b36915
215,117,063,557,336,640,000,000,000,000,000,000,000
48
tree: Check for `.git` with case insensitivy
me_sasl(struct Client *client_p, struct Client *source_p, int parc, const char *parv[]) { struct Client *target_p, *agent_p; /* Let propagate if not addressed to us, or if broadcast. * Only SASL agents can answer global requests. */ if(strncmp(parv[2], me.id, 3)) return 0; if((target_p = find_id(parv[2])) ...
0
[ "CWE-703", "CWE-285" ]
charybdis
818a3fda944b26d4814132cee14cfda4ea4aa824
6,028,578,843,606,817,000,000,000,000,000,000,000
50
SASL: Disallow beginning : and space anywhere in AUTHENTICATE parameter This is a FIX FOR A SECURITY VULNERABILITY. All Charybdis users must apply this fix if you support SASL on your servers, or unload m_sasl.so in the meantime.
bool Field_longlong::send_binary(Protocol *protocol) { ASSERT_COLUMN_MARKED_FOR_READ; return protocol->store_longlong(Field_longlong::val_int(), unsigned_flag); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
225,233,066,227,261,870,000,000,000,000,000,000,000
5
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...
static void rbd_notify_released_lock(struct work_struct *work) { struct rbd_device *rbd_dev = container_of(work, struct rbd_device, released_lock_work); rbd_notify_op_lock(rbd_dev, RBD_NOTIFY_OP_RELEASED_LOCK); }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
228,114,510,300,052,500,000,000,000,000,000,000,000
7
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static void free_resources() { if (md_result_file && md_result_file != stdout) my_fclose(md_result_file, MYF(0)); my_free(opt_password); if (my_hash_inited(&ignore_table)) my_hash_free(&ignore_table); if (extended_insert) dynstr_free(&extended_row); if (insert_pat_inited) dynstr_free(&insert_p...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
175,049,742,997,029,170,000,000,000,000,000,000,000
18
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...
tor_tls_context_init_one(tor_tls_context_t **ppcontext, crypto_pk_env_t *identity, unsigned int key_lifetime) { tor_tls_context_t *new_ctx = tor_tls_context_new(identity, key_lifetime); tor_tls_context_t *old_ctx = ...
1
[ "CWE-264" ]
tor
638fdedcf16cf7d6f7c586d36f7ef335c1c9714f
265,655,789,315,357,560,000,000,000,000,000,000,000
21
Don't send a certificate chain on outgoing TLS connections from non-relays
lookup_gname_helper(struct cpio *cpio, const char **name, id_t id) { struct group *grent; (void)cpio; /* UNUSED */ errno = 0; grent = getgrgid((gid_t)id); if (grent == NULL) { *name = NULL; if (errno != 0) lafe_warnc(errno, "getgrgid(%s) failed", cpio_i64toa((int64_t)id)); return (errno); } *n...
0
[ "CWE-703", "CWE-22" ]
libarchive
59357157706d47c365b2227739e17daba3607526
246,271,905,448,141,950,000,000,000,000,000,000,000
19
Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option This fixes a directory traversal in the cpio tool.
void Item_in_optimizer::print(String *str, enum_query_type query_type) { if (query_type & QT_PARSABLE) args[1]->print(str, query_type); else { restore_first_argument(); Item_func::print(str, query_type); } }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
10,562,060,177,144,515,000,000,000,000,000,000,000
10
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
// Constructors / Destructors. ~_cimg_math_parser() { cimg::srand(rng);
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
328,434,554,646,183,720,000,000,000,000,000,000,000
3
.
string GetWarnings(string strFor) { int nPriority = 0; string strStatusBar; string strRPC; if (GetBoolArg("-testsafemode")) strRPC = "test"; // Misc warnings like out of disk space and clock is wrong if (strMiscWarning != "") { nPriority = 1000; strStatusBar = strMis...
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
134,098,266,462,231,620,000,000,000,000,000,000,000
43
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
int resultFlags() { return dataAsInt(); }
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
68,105,640,164,666,240,000,000,000,000,000,000,000
3
SERVER-7769 - turn objcheck on by default and use new fast bson validate
static void kvm_flush_tlb_all(void) { unsigned long i, j, count0, count1, stride0, stride1, addr; long flags; addr = local_cpu_data->ptce_base; count0 = local_cpu_data->ptce_count[0]; count1 = local_cpu_data->ptce_count[1]; stride0 = local_cpu_data->ptce_stride[0]; stride1 = local_cpu_data->ptce_stride[1];...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
136,845,603,607,386,130,000,000,000,000,000,000,000
22
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
lys_set_implemented(const struct lys_module *module) { struct unres_schema *unres; int disabled = 0; if (!module) { LOGARG; return EXIT_FAILURE; } module = lys_main_module(module); if (module->disabled) { disabled = 1; lys_set_enabled(module); } if (mo...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
224,901,953,564,004,600,000,000,000,000,000,000,000
59
schema tree BUGFIX do not check features while still resolving schema Fixes #723