func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
win_split_ins( int size, int flags, win_T *new_wp, int dir) { win_T *wp = new_wp; win_T *oldwin; int new_size = size; int i; int need_status = 0; int do_equal = FALSE; int needed; int available; int oldwin_height = 0; int layout; frame_T *frp, *curf...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
119,040,075,198,101,090,000,000,000,000,000,000,000
509
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
Statement_Ptr Expand::operator()(Comment_Ptr c) { if (ctx.output_style() == COMPRESSED) { // comments should not be evaluated in compact // https://github.com/sass/libsass/issues/2359 if (!c->is_important()) return NULL; } eval.is_in_comment = true; Comment_Ptr rv = SASS_MEMORY_NEW...
0
[ "CWE-476" ]
libsass
0bc35e3d26922229d5a3e3308860cf0fcee5d1cf
328,356,848,208,877,530,000,000,000,000,000,000,000
13
Fix segfault on empty custom properties Originally reported in sass/sassc#225 Fixes sass/sassc#225 Spec sass/sass-spec#1249
static int bpf_prog_attach(const union bpf_attr *attr) { enum bpf_prog_type ptype; struct bpf_prog *prog; int ret; if (CHECK_ATTR(BPF_PROG_ATTACH)) return -EINVAL; if (attr->attach_flags & ~BPF_F_ATTACH_MASK) return -EINVAL; ptype = attach_type_to_prog_type(attr->attach_type); if (ptype == BPF_PROG_TYPE_U...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
89,624,098,934,341,320,000,000,000,000,000,000,000
53
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
static inline uint32_t htx_get_max_blksz(const struct htx *htx, int32_t max) { uint32_t free = htx_free_space(htx); if (max != -1 && free > max) free = max; if (free < sizeof(struct htx_blk)) return 0; return (free - sizeof(struct htx_blk)); }
0
[ "CWE-190" ]
haproxy
3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
147,447,805,883,994,250,000,000,000,000,000,000,000
10
BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer Ori Hollander of JFrog Security reported that htx_add_header() and htx_add_trailer() were missing a length check on the header name. While this does not allow to overwrite any memory area, it results in bits of the header name length to sli...
void RunJob() override { list<CIRCNetwork*> ConnectionQueue; list<CIRCNetwork*>& RealConnectionQueue = CZNC::Get().GetConnectionQueue(); // Problem: If a network can't connect right now because e.g. it // is throttled, it will re-insert itself into the connection ...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
181,502,643,616,342,570,000,000,000,000,000,000,000
34
Don't crash if user specified invalid encoding. This is CVE-2019-9917
int ssl_get_server_cert_serverinfo(SSL *s, const unsigned char **serverinfo, size_t *serverinfo_length) { CERT *c = NULL; int i = 0; *serverinfo_length = 0; c = s->cert; i = ssl_get_server_cert_index(s); if (i == -1) return 0; if (c->pkeys[i].serverinfo == NULL) return 0; *serverinfo = c->pkeys[i...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
177,196,017,409,330,320,000,000,000,000,000,000,000
19
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static int uvesafb_blank(int blank, struct fb_info *info) { struct uvesafb_ktask *task; int err = 1; #ifdef CONFIG_X86 struct uvesafb_par *par = info->par; if (par->vbe_ib.capabilities & VBE_CAP_VGACOMPAT) { int loop = 10000; u8 seq = 0, crtc17 = 0; if (blank == FB_BLANK_POWERDOWN) { seq = 0x20; crtc1...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
305,907,986,165,723,540,000,000,000,000,000,000,000
58
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
njs_string_object_validate(njs_vm_t *vm, njs_value_t *object) { njs_int_t ret; if (njs_slow_path(njs_is_null_or_undefined(object))) { njs_type_error(vm, "cannot convert undefined to object"); return NJS_ERROR; } if (njs_slow_path(!njs_is_string(object))) { ret = njs_value_to_s...
0
[]
njs
36f04a3178fcb6da8513cc3dbf35215c2a581b3f
143,391,905,493,760,450,000,000,000,000,000,000,000
18
Fixed String.prototype.replace() with byte strings. This closes #522 issue on Github.
static void intel_hda_set_rirb_wp(IntelHDAState *d, const IntelHDAReg *reg, uint32_t old) { if (d->rirb_wp & ICH6_RIRBWP_RST) { d->rirb_wp = 0; } }
0
[ "CWE-787" ]
qemu
79fa99831debc9782087e834382c577215f2f511
272,067,441,614,040,500,000,000,000,000,000,000,000
6
hw/audio/intel-hda: Restrict DMA engine to memories (not MMIO devices) Issue #542 reports a reentrancy problem when the DMA engine accesses the HDA controller I/O registers. Fix by restricting the DMA engine to memories regions (forbidding MMIO devices such the HDA controller). Reported-by: OSS-Fuzz (Issue 28435) Rep...
int wolfSSH_SFTP_RecvRMDIR(WOLFSSH* ssh, int reqId, byte* data, word32 maxSz) { word32 sz; int ret = 0; char* dir; word32 idx = 0; byte* out; word32 outSz = 0; byte type; char err[] = "Remove Directory Error"; char suc[] = "Removed Directory"; char* res = NULL; if (...
0
[ "CWE-190" ]
wolfssh
edb272e35ee57e7b89f3e127222c6981b6a1e730
127,974,360,598,586,500,000,000,000,000,000,000,000
78
ASAN SFTP Fixes When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766)
void __kmem_cache_release(struct kmem_cache *cachep) { int i; struct kmem_cache_node *n; cache_random_seq_destroy(cachep); free_percpu(cachep->cpu_cache); /* NUMA: free the node structures */ for_each_kmem_cache_node(cachep, i, n) { kfree(n->shared); free_alien_cache(n->alien); kfree(n); cachep->node[i...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
210,402,016,734,789,840,000,000,000,000,000,000,000
17
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...
static int submit_coredump( const char *context[_CONTEXT_MAX], struct iovec *iovec, size_t n_iovec_allocated, size_t n_iovec, int input_fd) { _cleanup_close_ int coredump_fd = -1, coredump_node_fd = -1; _cleanup_free_ char ...
0
[ "CWE-770" ]
systemd
084eeb865ca63887098e0945fb4e93c852b91b0f
301,539,415,663,233,940,000,000,000,000,000,000,000
125
journald: do not store the iovec entry for process commandline on stack This fixes a crash where we would read the commandline, whose length is under control of the sending program, and then crash when trying to create a stack allocation for it. CVE-2018-16864 https://bugzilla.redhat.com/show_bug.cgi?id=1653855 The ...
ast_for_expr_stmt(struct compiling *c, const node *n) { REQ(n, expr_stmt); /* expr_stmt: testlist_star_expr (annassign | augassign (yield_expr|testlist) | [('=' (yield_expr|testlist_star_expr))+ [TYPE_COMMENT]] ) annassign: ':' test ['=' (yield_expr|testlist)] testlist_star_ex...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
209,923,583,206,573,530,000,000,000,000,000,000,000
188
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static void calipso_cache_invalidate(void) { struct calipso_map_cache_entry *entry, *tmp_entry; u32 iter; for (iter = 0; iter < CALIPSO_CACHE_BUCKETS; iter++) { spin_lock_bh(&calipso_cache[iter].lock); list_for_each_entry_safe(entry, tmp_entry, &calipso_cache[iter].list, list) { list_del(&entry->...
0
[ "CWE-416" ]
linux
ad5d07f4a9cd671233ae20983848874731102c08
24,954,841,028,530,850,000,000,000,000,000,000,000
17
cipso,calipso: resolve a number of problems with the DOI refcounts The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only re...
DEFUN (clear_bgp_peer_group_soft_in, clear_bgp_peer_group_soft_in_cmd, "clear bgp peer-group WORD soft in", CLEAR_STR BGP_STR "Clear all members of peer-group\n" "BGP peer-group name\n" "Soft reconfig\n" "Soft reconfig inbound update\n") { return bgp_clear_vty (...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
30,398,076,031,306,330,000,000,000,000,000,000,000
13
[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...
long ssl3_callback_ctrl(SSL *s, int cmd, void (*fp)(void)) { int ret=0; #if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_RSA) if ( #ifndef OPENSSL_NO_RSA cmd == SSL_CTRL_SET_TMP_RSA_CB || #endif #ifndef OPENSSL_NO_DSA cmd == SSL_CTRL_SET_TMP_DH_CB || #endif 0) { if (!ssl_cert_inst(&s->cert)) {...
0
[ "CWE-310" ]
openssl
ca989269a2876bae79393bd54c3e72d49975fc75
331,473,606,809,514,920,000,000,000,000,000,000,000
56
Use version in SSL_METHOD not SSL structure. When deciding whether to use TLS 1.2 PRF and record hash algorithms use the version number in the corresponding SSL_METHOD structure instead of the SSL structure. The SSL structure version is sometimes inaccurate. Note: OpenSSL 1.0.2 and later effectively do this already. (...
static int asn1_template_ex_d2i(ASN1_VALUE **val, const unsigned char **in, long inlen, const ASN1_TEMPLATE *tt, char opt, ASN1_TLC *ctx, int depth) { int flags, aclass; int ret; long len; const unsigned char...
0
[ "CWE-400", "CWE-674", "CWE-787" ]
openssl
2ac4c6f7b2b2af20c0e2b0ba05367e454cd11b33
87,868,800,602,324,970,000,000,000,000,000,000,000
70
Limit ASN.1 constructed types recursive definition depth Constructed types with a recursive definition (such as can be found in PKCS7) could eventually exceed the stack given malicious input with excessive recursion. Therefore we limit the stack depth. CVE-2018-0739 Credit to OSSFuzz for finding this issue. Reviewe...
static inline void pi_clear_on(struct pi_desc *pi_desc) { clear_bit(POSTED_INTR_ON, (unsigned long *)&pi_desc->control); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
200,727,799,530,367,100,000,000,000,000,000,000,000
5
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
bool blk_mq_can_queue(struct blk_mq_hw_ctx *hctx) { return blk_mq_has_free_tags(hctx->tags); }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
121,186,670,542,358,150,000,000,000,000,000,000,000
4
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
static void nf_conntrack_standalone_init_dccp_sysctl(struct net *net, struct ctl_table *table) { #ifdef CONFIG_NF_CT_PROTO_DCCP struct nf_dccp_net *dn = nf_dccp_pernet(net); #define XASSIGN(XNAME, dn) \ table[NF_SYSCTL_CT_PROTO_TIMEOUT_DCCP_ ## XNAME].data = \ &(dn)->dccp_timeout[CT_DCCP_ ## XNAME] X...
0
[ "CWE-203" ]
linux
2671fa4dc0109d3fb581bc3078fdf17b5d9080f6
24,174,290,865,944,653,000,000,000,000,000,000,000
22
netfilter: conntrack: Make global sysctls readonly in non-init netns These sysctls point to global variables: - NF_SYSCTL_CT_MAX (&nf_conntrack_max) - NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max) - NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user) Because their data pointers are not updated to point to per-netns s...
void stop_discard_thread(struct f2fs_sb_info *sbi) { struct discard_cmd_control *dcc = SM_I(sbi)->dcc_info; if (dcc && dcc->f2fs_issue_discard) { struct task_struct *discard_thread = dcc->f2fs_issue_discard; dcc->f2fs_issue_discard = NULL; kthread_stop(discard_thread); } }
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
144,428,014,907,603,320,000,000,000,000,000,000,000
11
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
config_sim( config_tree *ptree ) { int i; server_info *serv_info; attr_val *init_stmt; sim_node *sim_n; /* Check if a simulate block was found in the configuration code. * If not, return an error and exit */ sim_n = HEAD_PFIFO(ptree->sim_details); if (NULL == sim_n) { fprintf(stderr, "ERROR!! I couldn't...
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
160,886,496,098,170,870,000,000,000,000,000,000,000
69
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
static void cmd_window_rshow(const char *data) { _cmd_window_show_opt(data, TRUE); }
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
111,506,873,247,170,830,000,000,000,000,000,000,000
4
check the error condition of mainwindow_create
static sourceinfo_t *sasl_sourceinfo_create(sasl_session_t *p) { sasl_sourceinfo_t *ssi; ssi = smalloc(sizeof(sasl_sourceinfo_t)); object_init(object(ssi), "<sasl sourceinfo>", (destructor_t) sasl_sourceinfo_delete); ssi->parent.s = p->server; ssi->parent.connection = curr_uplink->conn; if (p->host) ssi->pare...
0
[ "CWE-288" ]
atheme
de2ba3ca8f6c39b41431d989f3ac66002a487839
162,132,562,177,809,830,000,000,000,000,000,000,000
18
modules/saslserv/main: backport 7.3 commits for pending EID login This backports commits 4e664c75d0b280a052eb & ceb0235695e6736ce2ab from the master branch. The IRCv3.1 SASL specification contains the following wording: If the client completes registration (with CAP END, NICK, USER and any other necessary me...
static unsigned long count_partial(struct kmem_cache_node *n, int (*get_count)(struct page *)) { unsigned long flags; unsigned long x = 0; struct page *page; spin_lock_irqsave(&n->list_lock, flags); list_for_each_entry(page, &n->partial, lru) x += get_count(page); spin_unlock_irqrestore(&n->list_lock, fla...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
67,171,764,175,378,610,000,000,000,000,000,000,000
13
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
int RGWStatBucket::verify_permission() { // This (a HEAD request on a bucket) is governed by the s3:ListBucket permission. if (!verify_bucket_permission(s, rgw::IAM::s3ListBucket)) { return -EACCES; } return 0; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
16,071,618,103,317,667,000,000,000,000,000,000,000
9
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
pgm_print(netdissect_options *ndo, register const u_char *bp, register u_int length, register const u_char *bp2) { register const struct pgm_header *pgm; register const struct ip *ip; register char ch; uint16_t sport, dport; u_int nla_afnum; char nla_buf[INET6_ADDRSTRLEN]; register const stru...
1
[ "CWE-125" ]
tcpdump
4601c685e7fd19c3724d5e499c69b8d3ec49933e
131,338,422,141,878,900,000,000,000,000,000,000,000
643
CVE-2017-13019: Clean up PGM option processing. Add #defines for option lengths or the lengths of the fixed-length part of the option. Sometimes those #defines differ from what was there before; what was there before was wrong, probably because the option lengths given in RFC 3208 were sometimes wrong - some lengths ...
bool Material::operator==(const Material &other) const { return (this->pbrMetallicRoughness == other.pbrMetallicRoughness) && (this->normalTexture == other.normalTexture) && (this->occlusionTexture == other.occlusionTexture) && (this->emissiveTexture == other.emissiveTexture) && Eq...
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
153,559,294,129,581,740,000,000,000,000,000,000,000
14
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
logger_flush () { struct t_logger_buffer *ptr_logger_buffer; for (ptr_logger_buffer = logger_buffers; ptr_logger_buffer; ptr_logger_buffer = ptr_logger_buffer->next_buffer) { if (ptr_logger_buffer->log_file && ptr_logger_buffer->flush_needed) { if (weechat_logger_plugin...
0
[ "CWE-119", "CWE-787" ]
weechat
f105c6f0b56fb5687b2d2aedf37cb1d1b434d556
56,042,467,736,742,000,000,000,000,000,000,000,000
21
logger: call strftime before replacing buffer local variables
int ha_partition::prepare_for_rename() { int result= 0, tmp; handler **file; DBUG_ENTER("ha_partition::prepare_for_rename()"); if (m_new_file != NULL) { for (file= m_new_file; *file; file++) if ((tmp= (*file)->extra(HA_EXTRA_PREPARE_FOR_RENAME))) result= tmp; for (file= m_reorge...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
154,765,445,160,243,280,000,000,000,000,000,000,000
19
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
shmem_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) { struct inode *inode = shmem_get_inode(dir->i_sb, mode, dev); int error = -ENOSPC; if (inode) { error = security_inode_init_security(inode, dir, NULL, NULL, NULL); if (error) { if (error != -EOPNOTSUPP) { iput(inode); ...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
268,788,540,006,241,700,000,000,000,000,000,000,000
31
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
tr_variant* tr_variantListAddReal(tr_variant* list, double val) { tr_variant* child = tr_variantListAdd(list); tr_variantInitReal(child, val); return child; }
0
[ "CWE-416", "CWE-284" ]
transmission
2123adf8e5e1c2b48791f9d22fc8c747e974180e
319,563,284,515,885,830,000,000,000,000,000,000,000
6
CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk In libtransmission/variant.c, function tr_variantWalk, when the variant stack is reallocated, a pointer to the previously allocated memory region is kept. This address is later accessed (heap use-after-free) while walking back down the stack, causing the applic...
circle_overabove(PG_FUNCTION_ARGS) { CIRCLE *circle1 = PG_GETARG_CIRCLE_P(0); CIRCLE *circle2 = PG_GETARG_CIRCLE_P(1); PG_RETURN_BOOL(FPge((circle1->center.y - circle1->radius), (circle2->center.y - circle2->radius))); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
74,151,287,262,105,920,000,000,000,000,000,000,000
8
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *), void *cb_arg) { BN_GENCB *tmp_gencb = gencb; tmp_gencb->ver = 2; tmp_gencb->arg = cb_arg; tmp_gencb->cb.cb_2 = callback; }
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
308,521,194,842,360,700,000,000,000,000,000,000,000
8
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
static int ovl_set_opaque(struct dentry *upperdentry) { return ovl_do_setxattr(upperdentry, OVL_XATTR_OPAQUE, "y", 1, 0); }
0
[ "CWE-20" ]
linux
11f3710417d026ea2f4fcf362d866342c5274185
110,332,237,860,922,620,000,000,000,000,000,000,000
4
ovl: verify upper dentry before unlink and rename Unlink and rename in overlayfs checked the upper dentry for staleness by verifying upper->d_parent against upperdir. However the dentry can go stale also by being unhashed, for example. Expand the verification to actually look up the name again (under parent lock) an...
CModule* CModules::FindModule(const CString& sModule) const { for (CModule* pMod : *this) { if (sModule.Equals(pMod->GetModName())) { return pMod; } } return nullptr; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
128,795,352,702,829,340,000,000,000,000,000,000,000
9
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 const char *set_protocols_honor_order(cmd_parms *cmd, void *dummy, const char *arg) { core_server_config *conf = ap_get_core_module_config(cmd->server->module_config); const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); if (err) { ...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
130,132,766,214,685,900,000,000,000,000,000,000,000
23
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
escape_xml(const char *text) { static char *escaped; static size_t escaped_size; char *out; size_t len; if (!strlen(text)) return "empty string"; for (out=escaped, len=0; *text; ++len, ++out, ++text) { /* Make sure there's plenty of room for a quoted character */ if ((len + 8) > escaped_size) { char *big...
1
[ "CWE-476" ]
exif
eb84b0e3c5f2a86013b6fcfb800d187896a648fa
130,225,628,845,924,520,000,000,000,000,000,000,000
49
actually return empty stringand not 'em,pty string' as expected
GF_Err vmhd_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_VideoMediaHeaderBox *ptr = (GF_VideoMediaHeaderBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u64(bs, ptr->reserved); return GF_OK; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
183,664,158,247,961,700,000,000,000,000,000,000,000
10
fixed #2255
static int sco_debugfs_open(struct inode *inode, struct file *file) { return single_open(file, sco_debugfs_show, inode->i_private); }
0
[ "CWE-200" ]
net
5233252fce714053f0151680933571a2da9cbfb4
324,135,175,248,508,560,000,000,000,000,000,000,000
4
bluetooth: Validate socket address length in sco_sock_bind(). Signed-off-by: David S. Miller <davem@davemloft.net>
tty_is_visible(struct tty *tty, const struct tty_ctx *ctx, u_int px, u_int py, u_int nx, u_int ny) { u_int xoff = ctx->xoff + px, yoff = ctx->yoff + py, lines; if (!ctx->bigger) return (1); if (status_at_line(tty->client) == 0) lines = status_line_size(tty->client); else lines = 0; if (xoff + nx <= ct...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
124,988,438,513,782,770,000,000,000,000,000,000,000
19
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
static int64_t TotalBytes(TensorBuffer* in, int n) { return n * sizeof(ResourceHandle); }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
326,552,211,574,610,500,000,000,000,000,000,000,000
3
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
_gnutls_recv_handshake_final (gnutls_session_t session, int init) { int ret = 0; uint8_t ch; switch (STATE) { case STATE0: case STATE30: ret = _gnutls_recv_int (session, GNUTLS_CHANGE_CIPHER_SPEC, -1, &ch, 1); STATE = STATE30; if (ret <= 0) { ERR ("recv ChangeCipherSpec", ret); ...
0
[ "CWE-189" ]
gnutls
bc8102405fda11ea00ca3b42acc4f4bce9d6e97b
125,435,987,633,413,000,000,000,000,000,000,000,000
53
Fix GNUTLS-SA-2008-1 security vulnerabilities. See http://www.gnu.org/software/gnutls/security.html for updates.
static int __init vmci_transport_init(void) { int err; /* Create the datagram handle that we will use to send and receive all * VSocket control messages for this context. */ err = vmci_transport_datagram_create_hnd(VMCI_TRANSPORT_PACKET_RID, VMCI_FLAG_ANYCID_DG_HND, vmci_transport_recv_stream_cb, ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
214,864,427,643,880,140,000,000,000,000,000,000,000
39
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static long kvm_vm_ioctl_check_extension_generic(struct kvm *kvm, long arg) { switch (arg) { case KVM_CAP_USER_MEMORY: case KVM_CAP_DESTROY_MEMORY_REGION_WORKS: case KVM_CAP_JOIN_MEMORY_REGIONS_WORKS: case KVM_CAP_INTERNAL_ERROR_DATA: #ifdef CONFIG_HAVE_KVM_MSI case KVM_CAP_SIGNAL_MSI: #endif #ifdef CONFIG_HAVE_K...
0
[ "CWE-416", "CWE-284" ]
linux
a0f1d21c1ccb1da66629627a74059dd7f5ac9c61
311,730,828,740,879,500,000,000,000,000,000,000,000
32
KVM: use after free in kvm_ioctl_create_device() We should move the ops->destroy(dev) after the list_del(&dev->vm_node) so that we don't use "dev" after freeing it. Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: ...
static bool io_bdev_nowait(struct block_device *bdev) { return !bdev || blk_queue_nowait(bdev_get_queue(bdev)); }
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
91,000,046,280,144,670,000,000,000,000,000,000,000
4
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
CURLcode Curl_ntlm_core_mk_lm_hash(struct Curl_easy *data, const char *password, unsigned char *lmbuffer /* 21 bytes */) { CURLcode result; unsigned char pw[14]; static const unsigned char magic[] = { 0x4B, 0x47, 0x53, 0x21, 0x40, 0x23, 0x2...
0
[ "CWE-190" ]
curl
7f2a1df6f5fc598750b2c6f34465c8d924db28cc
86,986,343,917,408,440,000,000,000,000,000,000,000
64
ntlm: avoid integer overflow for malloc size Reported-by: Alex Nichols Assisted-by: Kamil Dudka and Max Dymond CVE-2017-8816 Bug: https://curl.haxx.se/docs/adv_2017-11e7.html
list_add_event(struct perf_event *event, struct perf_event_context *ctx) { WARN_ON_ONCE(event->attach_state & PERF_ATTACH_CONTEXT); event->attach_state |= PERF_ATTACH_CONTEXT; /* * If we're a stand alone event or group leader, we go to the context * list, group events are kept attached to the group so that * ...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
38,237,111,099,818,240,000,000,000,000,000,000,000
33
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
*/ int netif_set_real_num_tx_queues(struct net_device *dev, unsigned int txq) { int rc; if (txq < 1 || txq > dev->num_tx_queues) return -EINVAL; if (dev->reg_state == NETREG_REGISTERED || dev->reg_state == NETREG_UNREGISTERING) { ASSERT_RTNL(); rc = netdev_queue_update_kobjects(dev, dev->real_num_tx_q...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
325,716,228,459,017,420,000,000,000,000,000,000,000
30
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
static size_t h2s_htx_frt_make_resp_data(struct h2s *h2s, struct buffer *buf, size_t count) { struct h2c *h2c = h2s->h2c; struct htx *htx; struct buffer outbuf; size_t total = 0; int es_now = 0; int bsize; /* htx block size */ int fsize; /* h2 frame size */ struct htx_blk *blk; enum htx_blk_type type; int id...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
320,705,131,685,909,100,000,000,000,000,000,000,000
258
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...
virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr node, xmlXPathContextPtr ctxt, unsigned int flags) { virDomainTPMDefPtr def; VIR_XPATH_NODE_AUTORESTORE(ctxt); int nbackends; g_autofree char *path = NULL; g_autof...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
262,494,287,851,295,830,000,000,000,000,000,000,000
100
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
ebews_set_item_id (ESoapMessage *message, EContact *contact) { }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
120,281,694,582,708,300,000,000,000,000,000,000,000
5
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
static void cmd_dcc_close(char *data, SERVER_REC *server) { GSList *tmp, *next; char *nick; void *free_arg; int found; g_return_if_fail(data != NULL); if (g_ascii_strncasecmp(data, "CHAT ", 5) != 0 || !cmd_get_params(data, &free_arg, 2, NULL, &nick)) return; if (*nick == '\0') cmd_param_error(CMDERR_NO...
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
145,311,492,199,984,530,000,000,000,000,000,000,000
37
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
static void scalar32_min_max_and(struct bpf_reg_state *dst_reg, struct bpf_reg_state *src_reg) { bool src_known = tnum_subreg_is_const(src_reg->var_off); bool dst_known = tnum_subreg_is_const(dst_reg->var_off); struct tnum var32_off = tnum_subreg(dst_reg->var_off); s32 smin_val = src_reg->s32_min_value; u32 u...
1
[ "CWE-125" ]
bpf
049c4e13714ecbca567b4d5f6d563f05d431c80e
165,907,805,052,318,830,000,000,000,000,000,000,000
35
bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will...
compile_get_env(char_u **arg, cctx_T *cctx) { char_u *start = *arg; int len; int ret; char_u *name; ++*arg; len = get_env_len(arg); if (len == 0) { semsg(_(e_syntax_error_at_str), start - 1); return FAIL; } // include the '$' in the name, eval_env_var() expects it. name...
1
[ "CWE-200", "CWE-122" ]
vim
5f25c3855071bd7e26255c68bf458b1b5cf92f39
86,707,140,122,236,430,000,000,000,000,000,000,000
21
patch 8.2.4049: Vim9: reading before the start of the line with "$" Problem: Vim9: reading before the start of the line with "$" by itself. Solution: Do not subtract one when reporting the error.
static int recvline(struct helper_data *helper, struct strbuf *buffer) { return recvline_fh(helper->out, buffer, helper->name); }
0
[]
git
68061e3470210703cb15594194718d35094afdc0
18,071,500,000,856,127,000,000,000,000,000,000,000
4
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
static inline void ep_wake_up_nested(wait_queue_head_t *wqueue, unsigned long events, int subclass) { unsigned long flags; spin_lock_irqsave_nested(&wqueue->lock, flags, subclass); wake_up_locked_poll(wqueue, events); spin_unlock_irqrestore(&wqueue->lock, flags); }
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
27,055,100,496,235,120,000,000,000,000,000,000,000
9
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
static int rbd_add_parse_args(const char *buf, struct ceph_options **ceph_opts, struct rbd_options **opts, struct rbd_spec **rbd_spec) { size_t len; char *options; const char *mon_addrs; char *snap_name; size_t mon_addrs_size; struct rbd_parse_opts_ctx pctx = { 0 }; int ret; /* The first four token...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
297,391,958,605,056,040,000,000,000,000,000,000,000
112
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...
TEST(RegexMatchExpression, MatchesElementDotAllOff) { BSONObj match = BSON("x" << "a b"); BSONObj notMatch = BSON("x" << "a\nb"); RegexMatchExpression regex; ASSERT(regex.init("", "a.b", "").isOK()); ASSERT(regex.matchesSingleElement(match.firstEl...
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
167,226,999,930,483,850,000,000,000,000,000,000,000
10
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static struct task_struct * futex_find_get_task(pid_t pid) { struct task_struct *p; rcu_read_lock(); p = find_task_by_vpid(pid); if (p) get_task_struct(p); rcu_read_unlock(); return p; }
0
[ "CWE-119", "CWE-787" ]
linux
7ada876a8703f23befbb20a7465a702ee39b1704
110,144,191,764,827,690,000,000,000,000,000,000,000
13
futex: Fix errors in nested key ref-counting futex_wait() is leaking key references due to futex_wait_setup() acquiring an additional reference via the queue_lock() routine. The nested key ref-counting has been masking bugs and complicating code analysis. queue_lock() is only called with a previously ref-counted key, ...
void CLASS sony_arw_load_raw() { ushort huff[32768]; static const ushort tab[18] = { 0xf11,0xf10,0xe0f,0xd0e,0xc0d,0xb0c,0xa0b,0x90a,0x809, 0x708,0x607,0x506,0x405,0x304,0x303,0x300,0x202,0x201 }; int i, c, n, col, row, len, diff, sum=0; for (n=i=0; i < 18; i++) FORC(32768 >> (tab[i] >> 8)) huff[n++]...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
261,005,223,629,427,420,000,000,000,000,000,000,000
27
backported 0.15.4 datachecks
static int geneve_changelink(struct net_device *dev, struct nlattr *tb[], struct nlattr *data[], struct netlink_ext_ack *extack) { struct geneve_dev *geneve = netdev_priv(dev); struct geneve_sock *gs4, *gs6; struct ip_tunnel_info info; bool metadata; bool use_udp6_rx_checksums; enum ifla_geneve_df...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
329,573,253,771,643,750,000,000,000,000,000,000,000
43
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
e_mail_config_ews_autodiscover_get_backend (EMailConfigEwsAutodiscover *autodiscover) { g_return_val_if_fail ( E_IS_MAIL_CONFIG_EWS_AUTODISCOVER (autodiscover), NULL); return autodiscover->priv->backend; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
270,340,240,423,201,130,000,000,000,000,000,000,000
7
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 mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index) { struct mlx4_mac_table *table = &mlx4_priv(dev)->port[port].mac_table; int i, err = 0; int free = -1; mlx4_dbg(dev, "Registering MAC: 0x%llx\n", (unsigned long long) mac); mutex_lock(&table->mutex); for (i = 0; i < MLX4_MAX_MAC_NUM - 1; i...
0
[ "CWE-119", "CWE-787" ]
linux
0926f91083f34d047abc74f1ca4fa6a9c161f7db
124,111,184,478,118,740,000,000,000,000,000,000,000
53
mlx4_en: Fix out of bounds array access When searching for a free entry in either mlx4_register_vlan() or mlx4_register_mac(), and there is no free entry, the loop terminates without updating the local variable free thus causing out of array bounds access. Fix this by adding a proper check outside the loop. Signed-of...
MagickExport MagickBooleanType CLAHEImage(Image *image,const size_t width, const size_t height,const size_t number_bins,const double clip_limit, ExceptionInfo *exception) { #define CLAHEImageTag "CLAHE/Image" CacheView *image_view; ColorspaceType colorspace; MagickBooleanType status; Magick...
0
[ "CWE-399", "CWE-119", "CWE-787" ]
ImageMagick
d4fc44b58a14f76b1ac997517d742ee12c9dc5d3
88,402,455,598,902,120,000,000,000,000,000,000,000
175
https://github.com/ImageMagick/ImageMagick/issues/1611
int Init_IPFIX(void) { int i; cache.lookup_info = (struct element_param_s *)calloc(65536, sizeof(struct element_param_s)); cache.common_extensions = (uint32_t *)malloc((Max_num_extensions+1)*sizeof(uint32_t)); if ( !cache.common_extensions || !cache.lookup_info ) { LogError("Process_ipfix: Panic! malloc(): %s...
0
[ "CWE-190" ]
nfdump
3b006ededaf351f1723aea6c727c9edd1b1fff9b
181,712,070,872,599,100,000,000,000,000,000,000,000
26
Fix potential unsigned integer underflow
static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw_desc, struct procunit_info *list, char *name) { struct uac_processing_unit_descriptor *desc = raw_desc; int num_ins; struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; int i, err, nameid, type, len; struct procunit_...
0
[ "CWE-125" ]
linux
f4351a199cc120ff9d59e06d02e8657d08e6cc46
58,609,571,435,786,050,000,000,000,000,000,000,000
156
ALSA: usb-audio: Avoid access before bLength check in build_audio_procunit() The parser for the processing unit reads bNrInPins field before the bLength sanity check, which may lead to an out-of-bound access when a malformed descriptor is given. Fix it by assignment after the bLength check. Cc: <stable@vger.kernel.o...
flushline(struct html_feed_environ *h_env, struct readbuffer *obuf, int indent, int force, int width) { TextLineList *buf = h_env->buf; FILE *f = h_env->f; Str line = obuf->line, pass = NULL; char *hidden_anchor = NULL, *hidden_img = NULL, *hidden_bold = NULL, *hidden_under = NULL, *hidden_italic = ...
1
[ "CWE-476" ]
w3m
010b68580dc50ce183df11cc79721936ab5c4f25
194,841,040,878,425,500,000,000,000,000,000,000,000
332
Prevent segfault with malformed input_alt Bug-Debian: https://github.com/tats/w3m/issues/18
pk_transaction_role_to_action_allow_untrusted (PkRoleEnum role) { const gchar *policy = NULL; switch (role) { case PK_ROLE_ENUM_INSTALL_PACKAGES: case PK_ROLE_ENUM_INSTALL_FILES: case PK_ROLE_ENUM_UPDATE_PACKAGES: policy = "org.freedesktop.packagekit.package-install-untrusted"; break; default: policy = pk_...
1
[ "CWE-287" ]
PackageKit
f176976e24e8c17b80eff222572275517c16bdad
202,178,131,567,991,440,000,000,000,000,000,000,000
15
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...
fmtstr(char **sbuffer, char **buffer, size_t *currlen, size_t *maxlen, const char *value, int flags, int min, int max) { int padlen, strln; int cnt = 0; if (value == 0) value = "<NULL>"; for (strln = 0; value[strln]; ++strln) ; padlen = min - strln; if (padlen < 0) ...
1
[ "CWE-119" ]
openssl
9cb177301fdab492e4cfef376b28339afe3ef663
35,878,190,612,287,360,000,000,000,000,000,000,000
32
Fix memory issues in BIO_*printf functions The internal |fmtstr| function used in processing a "%s" format string in the BIO_*printf functions could overflow while calculating the length of a string and cause an OOB read when printing very long strings. Additionally the internal |doapr_outch| function can attempt to ...
nautilus_file_set_time_metadata (NautilusFile *file, const char *key, time_t time) { char time_str[21]; char *metadata; if (time != UNDEFINED_TIME) { /* 2^64 turns out to be 20 characters */ snprintf (time_str, 20, "%ld", time); time_str[20] = '\0'; metadata = time_str; } else { metada...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
210,015,059,352,660,600,000,000,000,000,000,000,000
18
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
bool CombiningMark::Is(uchar c) { int chunk_index = c >> 13; switch (chunk_index) { case 0: return LookupPredicate(kCombiningMarkTable0, kCombiningMarkTable0Size, c); case 1: return LookupPredicate(kCombiningMarkTable1, ...
0
[ "CWE-119" ]
node
78b0e30954111cfaba0edbeee85450d8cbc6fdf6
328,032,147,315,409,570,000,000,000,000,000,000,000
18
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>
static void do_readpixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) { if (has_feature(feat_arb_robustness)) glReadnPixelsARB(x, y, width, height, format, type, bufSize, ...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
87,220,320,432,944,640,000,000,000,000,000,000,000
12
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
static int module_list_compute(int argc, const char **argv, const char *prefix, struct pathspec *pathspec, struct module_list *list) { int i, result = 0; char *ps_matched = NULL; parse_pathspec(pathspec, 0, PATHSPEC_PREFER_FULL, prefix, argv); if (pathspec->nr) ps_...
0
[ "CWE-88" ]
git
98afac7a7cefdca0d2c4917dd8066a59f7088265
227,171,414,603,467,100,000,000,000,000,000,000,000
43
submodule--helper: use "--" to signal end of clone options When we clone a submodule, we call "git clone $url $path". But there's nothing to say that those components can't begin with a dash themselves, confusing git-clone into thinking they're options. Let's pass "--" to make it clear what we expect. There's no test...
int XMLRPC_VectorRemoveValue(XMLRPC_VALUE vector, XMLRPC_VALUE value) { if(vector && vector->v && vector->v->q && value) { q_iter qi = Q_Iter_Head_F(vector->v->q); while(qi) { XMLRPC_VALUE xIter = Q_Iter_Get_F(qi); if(xIter == value) { XMLRPC_CleanupValue(xIter); ...
0
[ "CWE-119" ]
php-src
88412772d295ebf7dd34409534507dc9bcac726e
113,058,855,538,621,340,000,000,000,000,000,000,000
16
Fix bug #68027 - fix date parsing in XMLRPC lib
m4_defn (struct obstack *obs, int argc, token_data **argv) { symbol *s; builtin_func *b; int i; if (bad_argc (argv[0], argc, 2, -1)) return; for (i = 1; i < argc; i++) { s = lookup_symbol (ARG (i), SYMBOL_LOOKUP); if (s == NULL) continue; switch (SYMBOL_TYPE (s)) { case TOKEN_T...
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
112,590,144,727,509,550,000,000,000,000,000,000,000
43
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
open_temp_exec_file_name (char *name, int flags) { int fd; #ifdef HAVE_MKOSTEMP fd = mkostemp (name, flags); #else fd = mkstemp (name); #endif if (fd != -1) unlink (name); return fd; }
0
[ "CWE-787" ]
libffi
44a6c28545186d78642487927952844156fc7ab5
99,640,339,041,720,990,000,000,000,000,000,000,000
15
aarch64: Flush code mapping in addition to data mapping (#471) This needs a new function, ffi_data_to_code_pointer, to translate from data pointers to code pointers. Fixes issue #470.
BGD_DECLARE(void) gdImageTiff(gdImagePtr im, FILE *outFile) { gdIOCtx *out = gdNewFileCtx(outFile); if (out == NULL) return; gdImageTiffCtx(im, out); /* what's an fg again? */ out->gd_free(out); }
0
[ "CWE-125" ]
libgd
4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
337,365,262,765,347,840,000,000,000,000,000,000,000
7
Fix invalid read in gdImageCreateFromTiffPtr() tiff_invalid_read.tiff is corrupt, and causes an invalid read in gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case, dynamicGetbuf() is called with a negative dp->pos, bu...
virtual bool OnWebRequest(CWebSock& WebSock, const CString& sPageName, CTemplate& Tmpl) { CSmartPtr<CWebSession> spSession = WebSock.GetSession(); if (sPageName == "settings") { // Admin Check if (!spSession->IsAdmin()) { return false; } return SettingsPage(WebSock, Tmpl); } else if (sPageName ...
0
[]
znc
5e6e3be32acfeadeaf1fb3bb17bada08aec6432f
181,690,652,705,089,500,000,000,000,000,000,000,000
194
webadmin/add channel: Correctly handle channel names The CChan constructor makes sure that the channel name begins with a valid channel prefix. Thus, this could change the name of the resulting channel. When you edited an irc network which already had a channel "#foo", were connected to IRC (so ZNC knows which prefix...
ves_icall_System_Reflection_Assembly_GetManifestResourceInternal (MonoReflectionAssembly *assembly, MonoString *name, gint32 *size, MonoReflectionModule **ref_module) { char *n = mono_string_to_utf8 (name); MonoTableInfo *table = &assembly->assembly->image->tables [MONO_TABLE_MANIFESTRESOURCE]; guint32 i; guint32 ...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
218,530,293,083,153,360,000,000,000,000,000,000
42
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
constructor (GType type, guint n_construct_params, GObjectConstructParam *construct_params) { GObject *object; NMAGConfConnectionPrivate *priv; NMConnection *connection; GError *error = NULL; object = G_OBJECT_CLASS (nma_gconf_connection_parent_class)->constructor (type, n_construct_params, construct_pa...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
168,851,007,067,641,230,000,000,000,000,000,000,000
56
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
static int sctp_cmd_send_msg(struct sctp_association *asoc, struct sctp_datamsg *msg) { struct sctp_chunk *chunk; int error = 0; list_for_each_entry(chunk, &msg->chunks, frag_list) { error = sctp_outq_tail(&asoc->outqueue, chunk); if (error) break; } return error; }
0
[]
linux
196d67593439b03088913227093e374235596e33
317,556,583,412,124,250,000,000,000,000,000,000,000
14
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
void diff_change(struct diff_options *options, unsigned old_mode, unsigned new_mode, const unsigned char *old_sha1, const unsigned char *new_sha1, const char *base, const char *path) { char concatpath[PATH_MAX]; struct diff_filespec *one, *two; if (DIFF_OPT_TST(options, IGNORE_SUBMODULES) && S_ISGITLINK...
1
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
294,087,867,753,526,720,000,000,000,000,000,000,000
34
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Napi::Value Statement::Each(const Napi::CallbackInfo& info) { Napi::Env env = info.Env(); Statement* stmt = this; int last = info.Length(); Napi::Function completed; if (last >= 2 && info[last - 1].IsFunction() && info[last - 2].IsFunction()) { completed = info[--last].As<Napi::Function>()...
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
48,895,343,776,020,170,000,000,000,000,000,000,000
22
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
static int macvlan_addr_busy(const struct macvlan_port *port, const unsigned char *addr) { /* Test to see if the specified multicast address is * currently in use by the underlying device or * another macvlan. */ if (!compare_ether_addr_64bits(port->dev->dev_addr, addr)) return 1; if (macvlan_hash_looku...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
265,247,514,181,499,920,000,000,000,000,000,000,000
15
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...
mariadb_field_attr(MARIADB_CONST_STRING *attr, const MYSQL_FIELD *field, enum mariadb_field_attr_t type) { MA_FIELD_EXTENSION *ext= (MA_FIELD_EXTENSION*) field->extension; if (!ext || type > MARIADB_FIELD_ATTR_LAST) { *attr= null_const_string; return 1; } *attr= e...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
153,781,809,777,590,170,000,000,000,000,000,000,000
13
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
struct xt_target *xt_find_target(u8 af, const char *name, u8 revision) { struct xt_target *t; int err = -ENOENT; mutex_lock(&xt[af].mutex); list_for_each_entry(t, &xt[af].target, list) { if (strcmp(t->name, name) == 0) { if (t->revision == revision) { if (try_module_get(t->me)) { mutex_unlock(&xt[af]...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
168,425,886,273,952,130,000,000,000,000,000,000,000
25
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
int drm_mode_detachmode_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { struct drm_mode_object *obj; struct drm_mode_mode_cmd *mode_cmd = data; struct drm_connector *connector; struct drm_display_mode mode; struct drm_mode_modeinfo *umode = &mode_cmd->mode; int ret = 0; if (!drm...
0
[ "CWE-190", "CWE-189" ]
linux
a5cd335165e31db9dbab636fd29895d41da55dd2
254,330,969,790,826,200,000,000,000,000,000,000,000
28
drm: integer overflow in drm_mode_dirtyfb_ioctl() There is a potential integer overflow in drm_mode_dirtyfb_ioctl() if userspace passes in a large num_clips. The call to kmalloc would allocate a small buffer, and the call to fb->funcs->dirty may result in a memory corruption. Reported-by: Haogang Chen <haogangchen@g...
static int rtrs_clt_rdma_cm_handler(struct rdma_cm_id *cm_id, struct rdma_cm_event *ev) { struct rtrs_clt_con *con = cm_id->context; struct rtrs_path *s = con->c.path; struct rtrs_clt_path *clt_path = to_clt_path(s); int cm_err = 0; switch (ev->event) { case RDMA_CM_EVENT_ADDR_RESOLVED: cm_err = rtrs_...
0
[ "CWE-415" ]
linux
8700af2cc18c919b2a83e74e0479038fd113c15d
305,191,021,243,591,950,000,000,000,000,000,000,000
72
RDMA/rtrs-clt: Fix possible double free in error case Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt) to free memory. We shouldn't call kfree(clt) again, and we can't use the clt after kfree too. Replace device_register() with device_initialize() and device_add() so that dev_set_name can() ...
void __ext4_warning(struct super_block *sb, const char *function, unsigned int line, const char *fmt, ...) { struct va_format vaf; va_list args; if (!ext4_warning_ratelimit(sb)) return; va_start(args, fmt); vaf.fmt = fmt; vaf.va = &args; printk(KERN_WARNING "EXT4-fs warning (device %s): %s:%d: %pV\n", ...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
34,130,868,967,432,027,000,000,000,000,000,000,000
16
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
TEST_F(QueryPlannerTest, HintedNotCoveredProjectionIndexFilteredOut) { params.options = QueryPlannerParams::NO_UNCOVERED_PROJECTIONS; addIndex(BSON("a" << 1)); addIndex(BSON("a" << 1 << "b" << 1)); runQueryAsCommand(fromjson( "{find: 'testns', filter: {a: 1}, projection: {a: 1, b: 1, _id: 0}, hi...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
110,178,675,444,283,860,000,000,000,000,000,000,000
8
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
void dev_kfree_skb_irq(struct sk_buff *skb) { if (atomic_dec_and_test(&skb->users)) { struct softnet_data *sd; unsigned long flags; local_irq_save(flags); sd = &__get_cpu_var(softnet_data); skb->next = sd->completion_queue; sd->completion_queue = skb; raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_re...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
53,965,627,117,007,520,000,000,000,000,000,000,000
14
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static int link_configure(Link *link) { int r; assert(link); assert(link->network); assert(link->state == LINK_STATE_PENDING); r = link_set_bridge_fdb(link); if (r < 0) return r; r = link_set_ipv4_forward(link); if (r < 0) ...
1
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
22,614,470,380,853,703,000,000,000,000,000,000,000
86
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
pickCopyFunc(TIFF* in, TIFF* out, uint16 bitspersample, uint16 samplesperpixel) { uint16 shortv; uint32 w, l, tw, tl; int bychunk; (void) TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &shortv); if (shortv != config && bitspersample != 8 && samplesperpixel > 1) { fprintf(stderr, "%s: Cannot handle differ...
0
[ "CWE-119", "CWE-787" ]
libtiff
5c080298d59efa53264d7248bbe3a04660db6ef7
142,787,577,470,467,620,000,000,000,000,000,000,000
104
* tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and http://bugzilla.maptools.org/show_bug.cgi?id=2657
isolat1ToUTF8(unsigned char* out, int *outlen, const unsigned char* in, int *inlen) { unsigned char* outstart = out; const unsigned char* base = in; unsigned char* outend; const unsigned char* inend; const unsigned char* instop; if ((out == NULL) || (in == NULL) || (outlen == NULL...
0
[ "CWE-189" ]
libxml2
69f04562f75212bfcabecd190ea8b06ace28ece2
62,311,944,423,497,170,000,000,000,000,000,000,000
33
Fix an off by one error in encoding this off by one error doesn't seems to reproduce on linux but the error is real.
virSecuritySELinuxDomainSetPathLabelRO(virSecurityManager *mgr, virDomainDef *def, const char *path) { virSecuritySELinuxData *data = virSecurityManagerGetPrivateData(mgr); virSecurityLabelDef *secdef; secdef = virDomainDefGetSec...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
118,156,253,087,085,750,000,000,000,000,000,000,000
14
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
static int add_to_spam_list (SPAM_LIST **list, const char *pat, const char *templ, BUFFER *err) { SPAM_LIST *t = NULL, *last = NULL; REGEXP *rx; int n; const char *p; if (!pat || !*pat || !templ) return 0; if (!(rx = mutt_compile_regexp (pat, REG_ICASE))) { snprintf (err->data, err->dsize, _("Ba...
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
237,464,130,104,126,000,000,000,000,000,000,000,000
79
use a 64-bit random value in temporary filenames. closes #3158
void Magick::Image::meanShift(const size_t width_,const size_t height_, const double color_distance_) { MagickCore::Image *newImage; GetPPException; newImage=MeanShiftImage(constImage(),width_,height_,color_distance_, exceptionInfo); replaceImage(newImage); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
210,408,564,429,708,580,000,000,000,000,000,000,000
12
Added missing return to avoid use after free.
static port record_port(node_t * n, char *portname, char *compass) { field_t *f; field_t *subf; port rv; int sides; /* bitmap of which sides the port lies along */ if (portname[0] == '\0') return Center; sides = BOTTOM | RIGHT | TOP | LEFT; if (compass == NULL) compass = "_"; f = (f...
0
[ "CWE-120" ]
graphviz
784411ca3655c80da0f6025ab20634b2a6ff696b
217,708,681,102,383,580,000,000,000,000,000,000,000
25
fix: out-of-bounds write on invalid label When the label for a node cannot be parsed (due to it being malformed), it falls back on the symbol name of the node itself. I.e. the default label the node would have had if it had no label attribute at all. However, this is applied by dynamically altering the node's label to...
setup_async_signals () { #if defined (__BEOS__) set_signal_handler (SIGHUP, SIG_IGN); /* they want csh-like behavior */ #endif #if defined (JOB_CONTROL) if (job_control == 0) #endif { /* Make sure we get the original signal dispositions now so we don't confuse the trap builtin later if the subshell tri...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
249,114,609,185,980,380,000,000,000,000,000,000,000
21
bash-4.4-rc2 release