func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
SProcXkbSelectEvents(ClientPtr client) { REQUEST(xkbSelectEventsReq); swaps(&stuff->length); REQUEST_AT_LEAST_SIZE(xkbSelectEventsReq); swaps(&stuff->deviceSpec); swaps(&stuff->affectWhich); swaps(&stuff->clear); swaps(&stuff->selectAll); swaps(&stuff->affectMap); swaps(&stuff->map)...
1
[ "CWE-191" ]
xserver
144849ea27230962227e62a943b399e2ab304787
194,230,322,423,455,900,000,000,000,000,000,000,000
76
Fix XkbSelectEvents() integer underflow CVE-2020-14361 ZDI-CAN 11573 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
int security_inode_mkdir(struct inode *dir, struct dentry *dentry, int mode) { if (unlikely(IS_PRIVATE(dir))) return 0; return security_ops->inode_mkdir(dir, dentry, mode); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
224,658,640,168,377,150,000,000,000,000,000,000,000
6
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
uint32_t nghttp2_session_get_next_stream_id(nghttp2_session *session) { return session->next_stream_id; }
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
168,110,001,827,625,200,000,000,000,000,000,000,000
3
Add nghttp2_option_set_max_outbound_ack
static int rdg_bio_puts(BIO* bio, const char* str) { WINPR_UNUSED(bio); WINPR_UNUSED(str); return -2; }
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
75,892,936,242,225,875,000,000,000,000,000,000,000
6
Fixed oob read in irp_write and similar
static TS_RESP *create_response(CONF *conf, const char *section, char *engine, char *queryfile, char *passin, char *inkey, char *signer, char *chain, const char *policy) { int ret = 0; TS_RESP *response = NULL; BIO *query_bio = NULL; TS_RESP_CTX *resp_ctx = NULL; if (!(query_bio = BIO_new_file(queryfile...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
82,067,620,998,181,350,000,000,000,000,000,000,000
76
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
static int usb_get_string(struct usb_device *dev, unsigned short langid, unsigned char index, void *buf, int size) { int i; int result; for (i = 0; i < 3; ++i) { /* retry on length 0 or stall; some devices are flakey */ result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), USB_REQ_GET_DESCRIPTOR, USB_D...
0
[ "CWE-119", "CWE-787" ]
linux
2e1c42391ff2556387b3cb6308b24f6f65619feb
13,099,066,497,121,882,000,000,000,000,000,000,000
22
USB: core: harden cdc_parse_cdc_header Andrey Konovalov reported a possible out-of-bounds problem for the cdc_parse_cdc_header function. He writes: It looks like cdc_parse_cdc_header() doesn't validate buflen before accessing buffer[1], buffer[2] and so on. The only check present is while (buflen > 0). So fix thi...
int security_sb_statfs(struct dentry *dentry) { return security_ops->sb_statfs(dentry); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
102,988,588,281,472,470,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
LoseSelection(Widget w, Atom *selection) { TScreen *screen; Atom *atomP; Cardinal i; XtermWidget xw; if ((xw = getXtermWidget(w)) == 0) return; screen = TScreenOf(xw); TRACE(("LoseSelection %s\n", TraceAtomName(screen->display, *selection))); for (i = 0, atomP = screen->selection_at...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
95,575,398,244,225,920,000,000,000,000,000,000,000
39
snapshot of project "xterm", label xterm-365d
pk_transaction_cancel (PkTransaction *transaction, GVariant *params, GDBusMethodInvocation *context) { gboolean ret; const gchar *sender; guint uid; _cleanup_error_free_ GError *error = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction->priv->tid != NULL); ...
0
[ "CWE-287" ]
PackageKit
f176976e24e8c17b80eff222572275517c16bdad
125,657,543,666,113,430,000,000,000,000,000,000,000
115
Reinstallation and downgrade require authorization Added new policy actions: * org.freedesktop.packagekit.package-reinstall * org.freedesktop.packagekit.package-downgrade The first does not depend or require any other actions to be authorized except for org.freedesktop.packagekit.package-install-untrusted in case o...
do_cast (VerifyContext *ctx, int token, const char *opcode) { ILStackDesc *value; MonoType *type; gboolean is_boxed; gboolean do_box; if (!check_underflow (ctx, 1)) return; if (!(type = verifier_load_type (ctx, token, opcode))) return; if (type->byref) { ADD_VERIFY_ERROR (ctx, g_strdup_printf ("Invalid ...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
70,633,155,606,688,930,000,000,000,000,000,000,000
38
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
circ_array_free(CircArray ca) { if (ca->objs != ca->obj_array) { xfree(ca->objs); } xfree(ca); }
0
[ "CWE-20" ]
ox
e4565dbc167f0d38c3f93243d7a4fcfc391cbfc8
279,001,474,225,206,980,000,000,000,000,000,000,000
6
Avoid crash with invalid XML passed to Oj.parse_obj()
static double mp_Jxyz(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const unsigned int interpolation = (unsigned int)_mp_arg(5), boundary_conditions = (unsigned int)_mp_arg(6), vsiz = (unsigned int)mp.opcode[7]; const CImg<T> &img = mp.imgin; ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
271,818,396,270,630,460,000,000,000,000,000,000,000
86
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int qemu_find_nic_model(NICInfo *nd, const char * const *models, const char *default_model) { int i; if (!nd->model) nd->model = g_strdup(default_model); for (i = 0 ; models[i]; i++) { if (strcmp(nd->model, models[i]) == 0) return i; } error_rep...
0
[ "CWE-190" ]
qemu
25c01bd19d0e4b66f357618aeefda1ef7a41e21a
142,984,890,116,262,920,000,000,000,000,000,000,000
16
net: drop too large packet early We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_...
static apr_byte_t oidc_check_cookie_domain(request_rec *r, oidc_cfg *cfg, oidc_session_t *session) { const char *c_cookie_domain = cfg->cookie_domain ? cfg->cookie_domain : oidc_get_current_url_host(r); const char *s_cookie_domain = NULL; oidc_session_get(r, session, OIDC_COOKIE_DOMAIN_SESSION_KEY, &s_c...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
52,801,487,258,274,540,000,000,000,000,000,000,000
18
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
xmlSchemaSAXHandleReference(void *ctx ATTRIBUTE_UNUSED, const xmlChar * name ATTRIBUTE_UNUSED) { xmlSchemaValidCtxtPtr vctxt = (xmlSchemaValidCtxtPtr) ctx; if (vctxt->depth < 0) return; if ((vctxt->skipDepth != -1) && (vctxt->depth >= vctxt->skipDepth)) return; /* SAX VAL TODO: What to do here...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
240,129,906,065,800,340,000,000,000,000,000,000,000
12
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static int __dwc3_gadget_ep_disable(struct dwc3_ep *dep) { struct dwc3 *dwc = dep->dwc; u32 reg; trace_dwc3_gadget_ep_disable(dep); dwc3_remove_requests(dwc, dep); /* make sure HW endpoint isn't stalled */ if (dep->flags & DWC3_EP_STALL) __dwc3_gadget_ep_set_halt(dep, 0, false); reg = dwc3_readl(dwc->re...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
15,159,199,548,206,096,000,000,000,000,000,000,000
29
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
static int ZEND_FASTCALL ZEND_BW_AND_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; bitwise_and_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRML...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
143,879,658,637,821,400,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 int adjust_scalar_min_max_vals(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 opcode = BPF_OP(insn->code); bool src_known; s64 smin_val, smax_val; u64 umin_val, u...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
195,155,261,191,334,600,000,000,000,000,000,000,000
160
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static bool check_charset(sys_var *self, THD *thd, set_var *var) { if (!var->value) return false; char buff[STRING_BUFFER_USUAL_SIZE]; if (var->value->result_type() == STRING_RESULT) { String str(buff, sizeof(buff), system_charset_info), *res; if (!(res=var->value->val_str(&str))) var->save_r...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
62,527,049,236,356,760,000,000,000,000,000,000,000
32
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
void ReshapeSparseTensor(OpKernelContext *context, const Tensor &input_indices_in, const Tensor &input_shape_in, const Tensor &target_shape_in, int output_indices_idx, int output_shape_idx) { OP_REQUIRES(context, Tenso...
1
[ "CWE-369" ]
tensorflow
4923de56ec94fff7770df259ab7f2288a74feb41
190,782,557,585,607,280,000,000,000,000,000,000,000
100
Don't do any work when reshaping 0 elements sparse tensor. If reshaping to 0 elements tensor, check that input has no elements. If reshaping no elements input, check that output has no elements. PiperOrigin-RevId: 388296986 Change-Id: Iadc9fe7252e14313ca987e69bf0d7042fd10232a
static void virtio_scsi_fail_cmd_req(VirtIOSCSIReq *req) { req->resp.cmd->response = VIRTIO_SCSI_S_FAILURE; virtio_scsi_complete_req(req); }
0
[ "CWE-119" ]
qemu
3c3ce981423e0d6c18af82ee62f1850c2cda5976
159,926,817,564,506,130,000,000,000,000,000,000,000
5
virtio-scsi: fix buffer overrun on invalid state load CVE-2013-4542 hw/scsi/scsi-bus.c invokes load_request. virtio_scsi_load_request does: qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem)); this probably can make elem invalid, for example, make in_num or out_num huge, then: virtio_scsi_p...
static void record_close(record_t *rec) { rec->used = 0; }
0
[ "CWE-295" ]
freeradius-server
874b39451702338389260edbfc52b381b20352ec
103,938,368,553,938,830,000,000,000,000,000,000,000
4
Set X509_V_FLAG_CRL_CHECK_ALL
static void cluster_free(struct cluster_list *cluster) { if (cluster->list) XFREE(MTYPE_CLUSTER_VAL, cluster->list); XFREE(MTYPE_CLUSTER, cluster); }
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
37,345,159,290,511,540,000,000,000,000,000,000,000
6
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
timer_settime(timer_t timer_id, int flags, const struct itimerspec *tp, struct itimerspec *old) { struct itimerval tv; if (timer_id != 0 || ! tp || old) return -1; TIMESPEC_TO_TIMEVAL(&(tv.it_value), &(tp->it_value)); TIMESPEC_TO_TIMEVAL(&(tv.it_interval), &(tp->it_interval)); return setitimer(ITIMER_R...
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
338,663,734,296,148,200,000,000,000,000,000,000,000
12
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
void free_replace() { DBUG_ENTER("free_replace"); my_free(glob_replace); glob_replace= NULL; DBUG_VOID_RETURN; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
273,408,345,307,062,260,000,000,000,000,000,000,000
7
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int fanout_set_data_ebpf(struct packet_sock *po, sockptr_t data, unsigned int len) { struct bpf_prog *new; u32 fd; if (sock_flag(&po->sk, SOCK_FILTER_LOCKED)) return -EPERM; if (len != sizeof(fd)) return -EINVAL; if (copy_from_sockptr(&fd, data, len)) return -EFAULT; new = bpf_prog_get_type(fd,...
0
[ "CWE-787" ]
linux
acf69c946233259ab4d64f8869d4037a198c7f06
180,074,661,497,391,650,000,000,000,000,000,000,000
20
net/packet: fix overflow in tpacket_rcv Using tp_reserve to calculate netoff can overflow as tp_reserve is unsigned int and netoff is unsigned short. This may lead to macoff receving a smaller value then sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr is set, an out-of-bounds write will occur when calling virt...
int main(int argc, char *argv[]) { const char *page; poptContext pc; struct poptOption long_options[] = { POPT_AUTOHELP { "disable-authentication", 'a', POPT_ARG_VAL, &demo_mode, True, "Disable authentication (demo mode)" }, { "password-menu-only", 'P', POPT_ARG_VAL, &passwd_only, True, "Show only chan...
0
[]
samba
71225948a249f079120282740fcc39fd6faa880e
4,616,294,131,406,046,500,000,000,000,000,000,000
106
swat: Use X-Frame-Options header to avoid clickjacking Jann Horn reported a potential clickjacking vulnerability in SWAT where the SWAT page could be embedded into an attacker's page using a frame or iframe and then used to trick the user to change Samba settings. Avoid this by telling the browser to refuse the frame...
expose_parent_dirs(struct zip *zip, const char *name, size_t name_length) { struct archive_string str; struct zip_entry *dir; char *s; archive_string_init(&str); archive_strncpy(&str, name, name_length); for (;;) { s = strrchr(str.s, '/'); if (s == NULL) break; *s = '\0'; /* Transfer the parent direct...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
234,256,344,136,423,300,000,000,000,000,000,000,000
25
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
CModule::EModRet CModule::OnUserTopicMessage(CTopicMessage& Message) { CString sChan = Message.GetTarget(); CString sTopic = Message.GetTopic(); EModRet ret = OnUserTopic(sChan, sTopic); Message.SetTarget(sChan); Message.SetTopic(sTopic); return ret; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
158,511,071,497,329,120,000,000,000,000,000,000,000
8
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static int __init ip_tables_init(void) { int ret; ret = register_pernet_subsys(&ip_tables_net_ops); if (ret < 0) goto err1; /* No one else will be downing sem now, so we won't sleep */ ret = xt_register_targets(ipt_builtin_tg, ARRAY_SIZE(ipt_builtin_tg)); if (ret < 0) goto err2; ret = xt_register_matches(i...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
114,406,426,129,089,750,000,000,000,000,000,000,000
32
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
void kvm_arch_flush_shadow_memslot(struct kvm *kvm, struct kvm_memory_slot *slot) { }
0
[ "CWE-399", "CWE-284" ]
linux
e8180dcaa8470ceca21109f143876fdcd9fe050a
145,354,858,656,824,500,000,000,000,000,000,000,000
4
ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl Some ARM KVM VCPU ioctls require the vCPU to be properly initialized with the KVM_ARM_VCPU_INIT ioctl before being used with further requests. KVM_RUN checks whether this initialization has been done, but other ioctls do not. Namely KVM_GET_REG_LIST will ...
*/ static bool headpage_already_acct(struct io_ring_ctx *ctx, struct page **pages, int nr_pages, struct page *hpage) { int i, j; /* check current page array */ for (i = 0; i < nr_pages; i++) { if (!PageCompound(pages[i])) continue; if (compound_head(pages[i]) == hpage) return true; } /* check pr...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
262,507,463,208,555,200,000,000,000,000,000,000,000
27
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static void decode_refpass(Jpeg2000T1Context *t1, int width, int height, int bpno) { int phalf, nhalf; int y0, x, y; phalf = 1 << (bpno - 1); nhalf = -phalf; for (y0 = 0; y0 < height; y0 += 4) for (x = 0; x < width; x++) for (y = y0; y < height && y <...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
9a271a9368eaabf99e6c2046103acb33957e63b7
239,753,519,946,234,750,000,000,000,000,000,000,000
21
jpeg2000: check log2_cblk dimensions Fixes out of array access Fixes Ticket2895 Found-by: Piotr Bandurski <ami_stuff@o2.pl> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
GF_Err dims_box_write(GF_Box *s, GF_BitStream *bs) { GF_DIMSSampleEntryBox *p = (GF_DIMSSampleEntryBox *)s; GF_Err e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_data(bs, p->reserved, 6); gf_bs_write_u16(bs, p->dataReferenceIndex); return GF_OK; }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
94,315,395,239,446,120,000,000,000,000,000,000,000
9
fixed #1768
openssl_callback(int ok, X509_STORE_CTX * ctx) { #ifdef DEBUG if (!ok) { X509 *cert = X509_STORE_CTX_get_current_cert(ctx); int err = X509_STORE_CTX_get_error(ctx); const char *errmsg = X509_verify_cert_error_string(err); char buf[DN_BUF_LEN]; X509_NAME_oneline(X509_get_subj...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
120,665,878,626,683,000,000,000,000,000,000,000,000
16
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
static int get_user_data( pam_handle_t *handle, const char **ret_username, struct passwd **ret_pw) { const char *username = NULL; struct passwd *pw = NULL; int r; assert(handle); assert(ret_username); assert(ret_pw); ...
0
[ "CWE-863" ]
systemd
83d4ab55336ff8a0643c6aa627b31e351a24040a
150,300,998,761,918,830,000,000,000,000,000,000,000
35
pam-systemd: use secure_getenv() rather than getenv() And explain why in a comment.
op_insert(oparg_T *oap, long count1) { long ins_len, pre_textlen = 0; char_u *firstline, *ins_text; colnr_T ind_pre_col = 0, ind_post_col; int ind_pre_vcol = 0, ind_post_vcol = 0; struct block_def bd; int i; pos_T t1; pos_T start_insert; // offset when cursor was moved in ins...
1
[ "CWE-416", "CWE-787" ]
vim
9f8c304c8a390ade133bac29963dc8e56ab14cbc
38,570,095,049,821,924,000,000,000,000,000,000,000
244
patch 8.2.4120: block insert goes over the end of the line Problem: Block insert goes over the end of the line. Solution: Handle invalid byte better. Fix inserting the wrong text.
parse_maxchange(char *line) { check_number_of_args(line, 3); if (sscanf(line, "%lf %d %d", &max_offset, &max_offset_delay, &max_offset_ignore) != 3) { max_offset_delay = -1; command_parse_error(); } }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
274,478,725,461,410,260,000,000,000,000,000,000,000
8
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
COMPAT_SYSCALL_DEFINE2(rt_sigpending, compat_sigset_t __user *, uset, compat_size_t, sigsetsize) { sigset_t set; if (sigsetsize > sizeof(*uset)) return -EINVAL; do_sigpending(&set); return put_compat_sigset(uset, &set, sigsetsize); }
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
163,827,454,748,403,480,000,000,000,000,000,000,000
12
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
~MessengerServer() { msgr->shutdown(); msgr->wait(); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
89,266,212,235,807,620,000,000,000,000,000,000,000
4
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
node_new_general_newline(Node** node, ScanEnv* env) { int r; int dlen, alen; UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN * 2]; Node* crnl; Node* ncc; Node* x; CClassNode* cc; dlen = ONIGENC_CODE_TO_MBC(env->enc, 0x0d, buf); if (dlen < 0) return dlen; alen = ONIGENC_CODE_TO_MBC(env->enc, 0x0a, buf + dlen);...
0
[ "CWE-125" ]
oniguruma
aa0188eaedc056dca8374ac03d0177429b495515
249,851,867,321,223,560,000,000,000,000,000,000,000
49
fix #163: heap-buffer-overflow in gb18030_mbc_enc_len
_rsvg_node_poly_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts) { RsvgNodePoly *poly = (RsvgNodePoly *) self; const char *klazz = NULL, *id = NULL, *value; if (rsvg_property_bag_size (atts)) { /* support for svg < 1.0 which used verts */ if ((value = rsvg_property_bag_l...
1
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
52,590,436,962,132,760,000,000,000,000,000,000,000
23
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
ZEND_API int ZEND_FASTCALL compare_function(zval *result, zval *op1, zval *op2) /* {{{ */ { int ret; int converted = 0; zval op1_copy, op2_copy; zval *op_free, tmp_free; while (1) { switch (TYPE_PAIR(Z_TYPE_P(op1), Z_TYPE_P(op2))) { case TYPE_PAIR(IS_LONG, IS_LONG): ZVAL_LONG(result, Z_LVAL_P(op1)>Z_LVAL...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
163,798,721,809,503,500,000,000,000,000,000,000,000
192
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
int main(int argc, char *argv[]) { struct fuse_args args = FUSE_ARGS_INIT(argc, argv); struct fuse_session *se; struct fuse_cmdline_opts opts; struct lo_data lo = { .sandbox = SANDBOX_NAMESPACE, .debug = 0, .writeback = 0, .posix_lock = 0, .allow_direct_io = 0, ...
1
[ "CWE-273" ]
qemu
449e8171f96a6a944d1f3b7d3627ae059eae21ca
242,304,224,229,324,770,000,000,000,000,000,000,000
189
virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358) At the start, drop membership of all supplementary groups. This is not required. If we have membership of "root" supplementary group and when we switch uid/gid using setresuid/setsgid, we still retain membership of existing supplemntary groups. An...
void Downstream::set_request_state(DownstreamState state) { request_state_ = state; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
196,441,279,907,124,150,000,000,000,000,000,000,000
3
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
static void jas_icclut8_dump(jas_iccattrval_t *attrval, FILE *out) { jas_icclut8_t *lut8 = &attrval->data.lut8; int i; int j; fprintf(out, "numinchans=%d, numoutchans=%d, clutlen=%d\n", lut8->numinchans, lut8->numoutchans, lut8->clutlen); for (i = 0; i < 3; ++i) { for (j = 0; j < 3; ++j) { fprintf(out, "e[...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
145,882,475,619,727,100,000,000,000,000,000,000,000
16
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) { struct nlattr *tb[TCA_STAB_MAX + 1]; struct qdisc_size_table *stab; struct tc_sizespec *s; unsigned int tsize = 0; u16 *tab = NULL; int err; err = nla_parse_nested(tb, TCA_STAB_MAX, opt, stab_policy); if (err < 0) return ERR_PTR(err); if (...
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
52,347,794,211,771,520,000,000,000,000,000,000,000
56
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
uint pos() const { return m_pos; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
137,835,130,923,777,380,000,000,000,000,000,000,000
1
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 ...
after_updating_screen(int may_resize_shell UNUSED) { updating_screen = FALSE; #ifdef FEAT_GUI if (may_resize_shell) gui_may_resize_shell(); #endif #ifdef FEAT_TERMINAL term_check_channel_closed_recently(); #endif #ifdef HAVE_DROP_FILE // If handle_drop() was called while updating_screen was TRUE need ...
0
[ "CWE-122" ]
vim
826bfe4bbd7594188e3d74d2539d9707b1c6a14b
118,330,470,805,036,800,000,000,000,000,000,000,000
17
patch 8.2.3487: illegal memory access if buffer name is very long Problem: Illegal memory access if buffer name is very long. Solution: Make sure not to go over the end of the buffer.
void fmtutil_riscos_read_attribs_field(deark *c, dbuf *f, struct de_riscos_file_attrs *rfa, i64 pos, unsigned int flags) { rfa->attribs = (u32)dbuf_getu32le(f, pos); de_dbg(c, "attribs: 0x%08x", (unsigned int)rfa->attribs); de_dbg_indent(c, 1); rfa->crc_from_attribs = rfa->attribs>>16; if(flags & DE_RISCOS_FLAG_H...
0
[ "CWE-369" ]
deark
62acb7753b0e3c0d3ab3c15057b0a65222313334
91,993,740,631,804,300,000,000,000,000,000,000,000
16
pict,macrsrc: Fixed a bug that could cause division by 0 Found by F. Çelik.
static int h2c_send_conn_wu(struct h2c *h2c) { int ret = 1; if (h2c->rcvd_c <= 0) return 1; if (!(h2c->flags & H2_CF_WINDOW_OPENED)) { /* increase the advertised connection window to 2G on * first update. */ h2c->flags |= H2_CF_WINDOW_OPENED; h2c->rcvd_c += H2_INITIAL_WINDOW_INCREMENT; } /* send W...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
47,187,006,174,041,540,000,000,000,000,000,000,000
22
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
static void * __init find_section64(Elf64_Ehdr *ehdr, const char *secname, unsigned long *size) { Elf64_Shdr *sechdrs; unsigned int i; char *secnames; /* Grab section headers and strings so we can tell who is who */ sechdrs = (void *)ehdr + ehdr->e_shoff; secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx]...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
94,318,801,090,234,850,000,000,000,000,000,000,000
23
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
submitMsg(msg_t *pMsg) { DEFiRet; ISOBJ_TYPE_assert(pMsg, msg); MsgPrepareEnqueue(pMsg); qqueueEnqObj(pMsgQueue, pMsg->flowCtlType, (void*) pMsg); RETiRet; }
0
[ "CWE-119" ]
rsyslog
1ca6cc236d1dabf1633238b873fb1c057e52f95e
119,613,745,825,603,540,000,000,000,000,000,000,000
11
bugfix: off-by-one(two) bug in legacy syslog parser
ast_for_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_seq) { /* funcdef: 'def' NAME parameters ['->' test] ':' suite */ return ast_for_funcdef_impl(c, n, decorator_seq, false /* is_async */); }
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
150,489,711,602,659,540,000,000,000,000,000,000,000
6
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
CString CZNC::FormatBindError() { CString sError = (errno == 0 ? t_s(("unknown error, check the host name")) : CString(strerror(errno))); return t_f("Unable to bind: {1}")(sError); }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
199,684,473,770,681,100,000,000,000,000,000,000,000
5
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static void DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) { *p = d->p; *q = d->q; *g = d->g; }
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
326,935,654,719,382,760,000,000,000,000,000,000,000
6
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
coproc_unsetvars (cp) struct coproc *cp; { int l; char *namevar; if (cp->c_name == 0) return; l = strlen (cp->c_name); namevar = xmalloc (l + 16); sprintf (namevar, "%s_PID", cp->c_name); unbind_variable (namevar); #if defined (ARRAY_VARS) unbind_variable (cp->c_name); #else sprintf (na...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
132,716,320,969,217,560,000,000,000,000,000,000,000
26
commit bash-20120224 snapshot
static int ceph_x_verify_authorizer_reply(struct ceph_auth_client *ac, struct ceph_authorizer *a, size_t len) { struct ceph_x_authorizer *au = (void *)a; struct ceph_x_ticket_handler *th; int ret = 0; struct ceph_x_authorize_reply reply; void *preply = &reply; void *p = au->reply_buf; void *end = p + size...
0
[ "CWE-399", "CWE-119" ]
linux
c27a3e4d667fdcad3db7b104f75659478e0c68d8
151,467,122,043,145,260,000,000,000,000,000,000,000
28
libceph: do not hard code max auth ticket len We hard code cephx auth ticket buffer size to 256 bytes. This isn't enough for any moderate setups and, in case tickets themselves are not encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S...
std::string nextFileName() { static AtomicWord<unsigned> documentSourceGroupFileCounter; return "extsort-doc-group." + std::to_string(documentSourceGroupFileCounter.fetchAndAdd(1)); }
0
[]
mongo
14784757ff5e983ea40b21c14e661aba81dfc083
141,884,125,459,196,490,000,000,000,000,000,000,000
4
SERVER-60218 add initialize helper function for document_source_group (cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2)
bool Scanner::lex_block_end(Output &out, bool allow_garbage) { bool multiline = false; loop: #line 1419 "src/parse/lex.cc" { unsigned char yych; static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
0
[ "CWE-787" ]
re2c
039c18949190c5de5397eba504d2c75dad2ea9ca
67,335,254,376,967,950,000,000,000,000,000,000,000
98
Emit an error when repetition lower bound exceeds upper bound. Historically this was allowed and re2c swapped the bounds. However, it most likely indicates an error in user code and there is only a single occurrence in the tests (and the test in an artificial one), so although the change is backwards incompatible ther...
indexToCol(int *indexed, int len, int off) { int col = 0; while (indexed[col] < len) { if (indexed[col] >= off) break; ++col; } return col; }
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
284,042,605,526,590,700,000,000,000,000,000,000,000
10
snapshot of project "xterm", label xterm-365d
static uint32_t player_get_position(struct avrcp_player *player) { if (player == NULL) return 0; return player->cb->get_position(player->user_data); }
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
245,087,439,461,857,580,000,000,000,000,000,000,000
7
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
execute_case_command (case_command) CASE_COM *case_command; { register WORD_LIST *list; WORD_LIST *wlist, *es; PATTERN_LIST *clauses; char *word, *pattern; int retval, match, ignore_return, save_line_number; save_line_number = line_number; line_number = case_command->line; command_string_index = ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
41,544,758,526,689,014,000,000,000,000,000,000,000
99
bash-4.4-rc2 release
void fill_effective_table_privileges(THD *thd, GRANT_INFO *grant, const char *db, const char *table) { Security_context *sctx= thd->security_ctx; DBUG_ENTER("fill_effective_table_privileges"); DBUG_PRINT("enter", ("Host: '%s', Ip: '%s', User: '%s', table: `%s`.`%s`", ...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
121,257,779,106,725,900,000,000,000,000,000,000,000
45
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
hb_ot_layout_has_font_glyph_classes (hb_ot_layout_t *layout) { return layout->gdef->has_glyph_classes (); }
0
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
53,281,035,233,402,710,000,000,000,000,000,000,000
4
[HB] Remove all references to the old code!
static zend_class_entry *sqlite_get_ce_query(const zval *object TSRMLS_DC) { return sqlite_ce_query; }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
144,979,420,880,769,700,000,000,000,000,000,000,000
4
- 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 long vsock_dev_do_ioctl(struct file *filp, unsigned int cmd, void __user *ptr) { u32 __user *p = ptr; u32 cid = VMADDR_CID_ANY; int retval = 0; switch (cmd) { case IOCTL_VM_SOCKETS_GET_LOCAL_CID: /* To be compatible with the VMCI behavior, we prioritize the * guest CID instead of well-know h...
0
[ "CWE-667" ]
linux
c518adafa39f37858697ac9309c6cf1805581446
249,726,309,095,715,180,000,000,000,000,000,000,000
27
vsock: fix the race conditions in multi-transport support There are multiple similar bugs implicitly introduced by the commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading"). The bug pattern: [1] vsock_sock.transport pointer is copie...
void Compute(OpKernelContext* const context) override { // node_id_range const Tensor* node_id_range_t; OP_REQUIRES_OK(context, context->input("node_id_range", &node_id_range_t)); const auto node_id_range = node_id_range_t->vec<int32>(); const int32_t node_id_first = node_id_range(0); // inclusiv...
1
[ "CWE-824" ]
tensorflow
429f009d2b2c09028647dd4bb7b3f6f414bbaad7
27,348,192,869,449,000,000,000,000,000,000,000,000
172
Add remaining missing validation to `BoostedTreesCalculateBestFeatureSplit` PiperOrigin-RevId: 387423006 Change-Id: I8eaf30efb223011519e60707bfa751b275d3a443
virtual bool register_field_in_bitmap(void *arg) { return 0; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
259,990,689,839,410,700,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static void tun_net_uninit(struct net_device *dev) { struct tun_struct *tun = netdev_priv(dev); struct tun_file *tfile = tun->tfile; /* Inform the methods they need to stop using the dev. */ if (tfile) { wake_up_all(&tun->socket.wait); if (atomic_dec_and_test(&tfile->count)) __tun_detach(tun); } }
0
[ "CWE-119" ]
linux-2.6
3c8a9c63d5fd738c261bd0ceece04d9c8357ca13
276,007,548,783,926,550,000,000,000,000,000,000,000
13
tun/tap: Fix crashes if open() /dev/net/tun and then poll() it. Fix NULL pointer dereference in tun_chr_pool() introduced by commit 33dccbb050bbe35b88ca8cf1228dcf3e4d4b3554 ("tun: Limit amount of queued packets per device") and triggered by this code: int fd; struct pollfd pfd; fd = open("/dev/net/tun", O_RDWR); ...
vte_sequence_handler_mp (VteTerminal *terminal, GValueArray *params) { /* unused; bug 499893 terminal->pvt->screen->defaults.attr.protect = 1; */ }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
221,341,641,482,980,670,000,000,000,000,000,000,000
6
fix bug #548272 svn path=/trunk/; revision=2365
void AuthorizationSession::setImpersonatedUserData(std::vector<UserName> usernames, std::vector<RoleName> roles) { _impersonatedUserNames = usernames; _impersonatedRoleNames = roles; _impersonationFlag = true; }
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
194,112,504,949,272,950,000,000,000,000,000,000,000
6
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static void nested_vmx_failValid(struct kvm_vcpu *vcpu, u32 vm_instruction_error) { if (to_vmx(vcpu)->nested.current_vmptr == -1ull) { /* * failValid writes the error number to the current VMCS, which * can't be done there isn't a current VMCS. */ nested_vmx_failInvalid(vcpu); return; } vmx_set_r...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
53,792,129,734,122,190,000,000,000,000,000,000,000
21
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
Decode BASE64 encoded text */ PHP_FUNCTION(imap_base64) { zend_string *text; char *decode; unsigned long newlength; if (zend_parse_parameters(ZEND_NUM_ARGS(), "S", &text) == FAILURE) { return; } decode = (char *) rfc822_base64((unsigned char *) ZSTR_VAL(text), ZSTR_LEN(text), &newlength); if (decode == N...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
190,591,123,142,434,880,000,000,000,000,000,000,000
19
Disable rsh/ssh functionality in imap by default (bug #77153)
static inline int get_v4l2_input32(struct v4l2_input *kp, struct v4l2_input32 __user *up) { if (copy_from_user(kp, up, sizeof(*up))) return -EFAULT; return 0; }
1
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
190,121,595,591,668,330,000,000,000,000,000,000,000
6
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...
static ssize_t xps_cpus_store(struct netdev_queue *queue, const char *buf, size_t len) { struct net_device *dev = queue->dev; unsigned long index; cpumask_var_t mask; int err; if (!netif_is_multiqueue(dev)) return -ENOENT; if (!capable(CAP_NET_ADMIN)) return -EPERM; if (!alloc_cpumask_var(&mask,...
0
[ "CWE-401" ]
linux
895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab
176,417,492,014,103,540,000,000,000,000,000,000,000
31
net-sysfs: Fix mem leak in netdev_register_kobject syzkaller report this: BUG: memory leak unreferenced object 0xffff88837a71a500 (size 256): comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ...
static void *nft_setelem_catchall_get(const struct net *net, const struct nft_set *set) { struct nft_set_elem_catchall *catchall; u8 genmask = nft_genmask_cur(net); struct nft_set_ext *ext; void *priv = NULL; list_for_each_entry_rcu(catchall, &set->catchall_list, list) { ext = nft_set_elem_ext(set, ca...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
115,259,932,407,331,740,000,000,000,000,000,000,000
20
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
const char *dbug_print_unit(SELECT_LEX_UNIT *un) { char *buf= dbug_item_print_buf; String str(buf, sizeof(dbug_item_print_buf), &my_charset_bin); str.length(0); if (!un) return "(SELECT_LEX_UNIT*)NULL"; THD *thd= current_thd; ulonglong save_option_bits= thd->variables.option_bits; thd->variables.opti...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
116,616,356,372,389,000,000,000,000,000,000,000,000
21
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.
GetNicsToEnable(const char* dir) { /* * The file nics.txt will list ordinal number of all nics to enable separated by * a ",". In current architecture we can have max 4 nics. So we just have to read * maximum of 7 characters. This code uses 1024 chars to make sure any future * needs are accomodated. ...
0
[ "CWE-362" ]
open-vm-tools
c1304ce8bfd9c0c33999e496bf7049d5c3d45821
298,377,604,982,785,780,000,000,000,000,000,000,000
44
randomly generate tmp directory name, and add StrUtil_ReplaceAll() function.
void ext4_set_aops(struct inode *inode) { switch (ext4_inode_journal_mode(inode)) { case EXT4_INODE_ORDERED_DATA_MODE: case EXT4_INODE_WRITEBACK_DATA_MODE: break; case EXT4_INODE_JOURNAL_DATA_MODE: inode->i_mapping->a_ops = &ext4_journalled_aops; return; default: BUG(); } if (test_opt(inode->i_sb, DELALL...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
80,756,095,719,714,370,000,000,000,000,000,000,000
17
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...
PHPAPI zval *var_tmp_var(php_unserialize_data_t *var_hashx) { var_dtor_entries *var_hash; if (!var_hashx || !*var_hashx) { return NULL; } var_hash = (*var_hashx)->last_dtor; if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) { var_hash = emalloc(sizeof(var_dtor_entries)); ...
0
[ "CWE-416" ]
php-src
1a23ebc1fff59bf480ca92963b36eba5c1b904c4
17,615,558,419,144,465,000,000,000,000,000,000,000
26
Fixed bug #74103 and bug #75054 Directly fail unserialization when trying to acquire an r/R reference to an UNDEF HT slot. Previously this left an UNDEF and later deleted the index/key from the HT. What actually caused the issue here is a combination of two factors: First, the key deletion was performed using the has...
int vhost_get_vq_desc(struct vhost_virtqueue *vq, struct iovec iov[], unsigned int iov_size, unsigned int *out_num, unsigned int *in_num, struct vhost_log *log, unsigned int *log_num) { struct vring_desc desc; unsigned int i, head, found = 0; u16 last_avail_idx; __virtio16 avail_idx; __virt...
1
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
68,969,133,136,396,420,000,000,000,000,000,000,000
139
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
_dbus_atomic_get (DBusAtomic *atomic) { #if DBUS_USE_SYNC __sync_synchronize (); return atomic->value; #else dbus_int32_t res; pthread_mutex_lock (&atomic_mutex); res = atomic->value; pthread_mutex_unlock (&atomic_mutex); return res; #endif }
0
[ "CWE-404" ]
dbus
872b085f12f56da25a2dbd9bd0b2dff31d5aea63
56,961,911,240,723,700,000,000,000,000,000,000,000
15
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...
static int fr_add_pvc(struct net_device *frad, unsigned int dlci, int type) { hdlc_device *hdlc = dev_to_hdlc(frad); pvc_device *pvc; struct net_device *dev; int used; if ((pvc = add_pvc(frad, dlci)) == NULL) { netdev_warn(frad, "Memory squeeze on fr_add_pvc()\n"); return -ENOBUFS; } if (*get_dev_p(pvc, ty...
1
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
4,916,449,915,728,322,500,000,000,000,000,000,000
53
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static int cdrom_ioctl_disc_status(struct cdrom_device_info *cdi) { tracktype tracks; cd_dbg(CD_DO_IOCTL, "entering CDROM_DISC_STATUS\n"); cdrom_count_tracks(cdi, &tracks); if (tracks.error) return tracks.error; /* Policy mode on */ if (tracks.audio > 0) { if (!tracks.data && !tracks.cdi && !tracks.xa) ...
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
231,601,083,941,408,660,000,000,000,000,000,000,000
29
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
static int init_types(void) { static int initialized; if (initialized) return 1; if (add_ast_fields() < 0) return 0; mod_type = make_type("mod", &AST_type, NULL, 0); if (!mod_type) return 0; if (!add_attributes(mod_type, NULL, 0)) return 0; Module_type = make_type("Module", mod_type, Module_...
1
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
177,160,693,989,718,700,000,000,000,000,000,000,000
326
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static void bnx2x_sp_prod_update(struct bnx2x *bp) { int func = BP_FUNC(bp); /* * Make sure that BD data is updated before writing the producer: * BD data is written to the memory, the producer is read from the * memory, thus we need a full memory barrier to ensure the ordering. */ mb(); REG_WR16(bp, BAR_...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
68,008,638,545,362,170,000,000,000,000,000,000,000
15
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
callbacks_generic_save_activate (GtkMenuItem *menuitem, gpointer user_data) { gchar *new_file_name = NULL; gchar *file_name = NULL; gchar *dir_name = NULL; gboolean error_visible_layers = FALSE; gchar *windowTitle = NULL; gerbv_fileinfo_t *act_file; gint file_index; gint processType = GPOINTER_...
0
[ "CWE-200" ]
gerbv
319a8af890e4d0a5c38e6d08f510da8eefc42537
96,820,928,208,047,730,000,000,000,000,000,000,000
396
Remove local alias to parameter array Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402
TEST_F(HttpConnectionManagerImplTest, RouteShouldUseNormalizedHost) { setup(false, ""); // Enable port removal strip_matching_port_ = true; const std::string original_host = "host:443"; const std::string normalized_host = "host"; EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> H...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
209,786,626,190,397,300,000,000,000,000,000,000,000
35
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
int CanonicalizationRange::Convert(uchar c, uchar n, uchar* result, bool* allow_caching_ptr) { int chunk_index = c >> 13; switch (chunk_index) { case 0: return LookupMapping<false>(kCanonicalizationRangeTable0, ...
0
[ "CWE-119" ]
node
78b0e30954111cfaba0edbeee85450d8cbc6fdf6
132,812,430,758,228,660,000,000,000,000,000,000,000
30
deps: fix out-of-band write in utf8 decoder Originally reported by: Kris Reeves <kris.re@bbhmedia.com> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
long SSL_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) { switch(cmd) { case SSL_CTRL_SET_MSG_CALLBACK: s->msg_callback = (void (*)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg))(fp); return 1; default: return(s->method->ssl_callback_ctrl(s,cmd,fp)); } ...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
234,722,662,432,493,900,000,000,000,000,000,000,000
12
Add Next Protocol Negotiation.
int ssh_scp_init(ssh_scp scp) { int rc; char execbuffer[1024] = {0}; char *quoted_location = NULL; size_t quoted_location_len = 0; size_t scp_location_len; if (scp == NULL) { return SSH_ERROR; } if (scp->state != SSH_SCP_NEW) { ssh_set_error(scp->session, SSH_FATAL, ...
0
[]
libssh
b0edec4e8d01ad73b0d26ad4070d7e1a1e86dfc8
320,575,628,022,828,220,000,000,000,000,000,000,000
112
CVE-2019-14889: scp: Quote location to be used on shell Single quote file paths to be used on commands to be executed on remote shell. Fixes T181 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 3830c7ae6eec751b7618d3fc159cb...
GF_Err vpcc_box_size(GF_Box *s) { GF_VPConfigurationBox *ptr = (GF_VPConfigurationBox *)s; if (!ptr->config) { ptr->size = 0; return GF_OK; } if (ptr->version == 0) { ptr->size += 6; } else { if (ptr->config->codec_initdata_size) { GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[ISOBMFF] VPConfigurationBox:...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
159,783,023,058,238,820,000,000,000,000,000,000,000
22
fixed #1785 (fuzz)
njs_generate_for_in_statement(njs_vm_t *vm, njs_generator_t *generator, njs_parser_node_t *node) { njs_int_t ret; njs_parser_node_t *foreach, *name; njs_generator_loop_ctx_t ctx; ret = njs_generate_start_block(vm, generator, NJS_GENERATOR_LOOP, ...
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
85,966,436,581,858,250,000,000,000,000,000,000,000
51
Fixed break instruction in a try-catch block. Previously, JUMP offset for a break instruction inside a try-catch block was not set to a correct offset during code generation when a return instruction was present in inner try-catch block. The fix is to update the JUMP offset appropriately. This closes #553 issue on G...
syslog_connect(void) { #ifdef SUNOS_5 return -1; #else int fd; char *s; struct sockaddr_un addr; if ((fd = socket(AF_UNIX,SOCK_DGRAM,0)) < 0) return -1; addr.sun_family = AF_UNIX; #ifdef _PATH_LOG #define SYSLOG_SOCKET_PATH _PATH_LOG #else #define SYSLOG_SOCKET_PATH "/dev/log" #endif s = str_append(a...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
10,974,148,299,669,243,000,000,000,000,000,000,000
28
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static int rtl8139_cp_receiver_enabled(RTL8139State *s) { return s->CpCmd & CPlusRxEnb; }
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
52,583,453,597,877,140,000,000,000,000,000,000,000
4
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
static CImg<T> get_load_inr(std::FILE *const file, float *voxel_size=0) { return CImg<T>().load_inr(file,voxel_size); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
259,199,605,684,703,280,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
download_action(struct parsed_tagarg *arg) { DownloadList *d; pid_t pid; for (; arg; arg = arg->next) { if (!strncmp(arg->arg, "stop", 4)) { pid = (pid_t) atoi(&arg->arg[4]); #ifndef __MINGW32_VERSION kill(pid, SIGKILL); #endif } else if (!strncmp(arg->arg, "ok", 2)) pid = (pid_t) atoi(&a...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
171,818,747,911,631,170,000,000,000,000,000,000,000
33
Make temporary directory safely when ~/.w3m is unwritable
static inline bool xfs_ioend_is_append(struct xfs_ioend *ioend) { return ioend->io_offset + ioend->io_size > XFS_I(ioend->io_inode)->i_d.di_size; }
0
[ "CWE-362" ]
linux
04197b341f23b908193308b8d63d17ff23232598
294,113,475,913,036,620,000,000,000,000,000,000,000
5
xfs: don't BUG() on mixed direct and mapped I/O We've had reports of generic/095 causing XFS to BUG() in __xfs_get_blocks() due to the existence of delalloc blocks on a direct I/O read. generic/095 issues a mix of various types of I/O, including direct and memory mapped I/O to a single file. This is clearly not suppor...
static int ext4_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode) { handle_t *handle; struct inode *inode; int err, retries = 0; err = dquot_initialize(dir); if (err) return err; retry: inode = ext4_new_inode_start_handle(dir, mode, NULL, 0, NULL, EXT4_HT_DIR, EXT4_MAXQUOTAS...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
178,776,364,408,730,550,000,000,000,000,000,000,000
39
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...