func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
is_set_opt_anc_info(OptAncInfo* to, int anc) { if ((to->left_anchor & anc) != 0) return 1; return ((to->right_anchor & anc) != 0 ? 1 : 0); }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
326,072,842,836,000,900,000,000,000,000,000,000,000
6
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
link_nfa_nodes (void *extra, bin_tree_t *node) { re_dfa_t *dfa = (re_dfa_t *) extra; Idx idx = node->node_idx; reg_errcode_t err = REG_NOERROR; switch (node->token.type) { case CONCAT: break; case END_OF_RE: assert (node->next == NULL); break; case OP_DUP_ASTERISK: case ...
0
[ "CWE-19" ]
gnulib
5513b40999149090987a0341c018d05d3eea1272
242,083,062,443,900,500,000,000,000,000,000,000,000
54
Diagnose ERE '()|\1' Problem reported by Hanno Böck in: http://bugs.gnu.org/21513 * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep track of the set of previously-completed subexpressions available before the first alternative, and restore this set just before parsing each subsequent alternative. This...
napi_status napi_create_bigint_int64(napi_env env, int64_t value, napi_value* result) { CHECK_ENV(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue( v8::BigInt::New(env->isolate, value)); return napi_clear_la...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
201,067,917,810,507,700,000,000,000,000,000,000,000
11
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
static void tls1_lookup_sigalg(int *phash_nid, int *psign_nid, int *psignhash_nid, const unsigned char *data) { int sign_nid = NID_undef, hash_nid = NID_undef; if (!phash_nid && !psign_nid && !psignhash_nid) return; if (phash_nid || psignhash_nid) { hash_nid = ...
0
[ "CWE-190" ]
openssl
a004e72b95835136d3f1ea90517f706c24c03da7
31,479,052,094,429,710,000,000,000,000,000,000,000
25
Avoid some undefined pointer arithmetic A common idiom in the codebase is: if (p + len > limit) { return; /* Too long */ } Where "p" points to some malloc'd data of SIZE bytes and limit == p + SIZE "len" here could be from some externally supplied data (e.g. from a TLS message). The rules of C pointer arithmet...
int wc_RsaPrivateDecryptInline_ex(byte* in, word32 inLen, byte** out, RsaKey* key, int type, enum wc_HashType hash, int mgf, byte* label, word32 labelSz) { WC_RNG* rng; #ifdef WC_RSA_BLINDING rng = key->rng; #else rng = NULL; #endif ret...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
109,524,390,619,105,350,000,000,000,000,000,000,000
14
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
static void start_signal_handler(void) { int error; pthread_attr_t thr_attr; DBUG_ENTER("start_signal_handler"); (void) pthread_attr_init(&thr_attr); #if !defined(HAVE_DEC_3_2_THREADS) pthread_attr_setscope(&thr_attr,PTHREAD_SCOPE_SYSTEM); (void) pthread_attr_setdetachstate(&thr_attr,PTHREAD_CREATE_DETACHE...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
281,423,304,799,622,470,000,000,000,000,000,000,000
35
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...
static unsigned long ext4_bg_num_gdb_nometa(struct super_block *sb, ext4_group_t group) { if (!ext4_bg_has_super(sb, group)) return 0; if (ext4_has_feature_meta_bg(sb)) return le32_to_cpu(EXT4_SB(sb)->s_es->s_first_meta_bg); else return EXT4_SB(sb)->s_gdb_count; }
0
[]
linux
7dac4a1726a9c64a517d595c40e95e2d0d135f6f
181,731,349,205,661,700,000,000,000,000,000,000,000
11
ext4: add validity checks for bitmap block numbers An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi...
SMBC_remove_unused_server(SMBCCTX * context, SMBCSRV * srv) { SMBCFILE * file; /* are we being fooled ? */ if (!context || !context->internal->initialized || !srv) { return 1; } /* Check all open files/directories for a relation with this server */ for (file = co...
0
[ "CWE-20" ]
samba
1ba49b8f389eda3414b14410c7fbcb4041ca06b1
257,569,783,037,276,950,000,000,000,000,000,000,000
33
CVE-2015-5296: s3:libsmb: force signing when requiring encryption in SMBC_server_internal() BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static void i40e_setup_pf_switch_element(struct i40e_pf *pf, struct i40e_aqc_switch_config_element_resp *ele, u16 num_reported, bool printconfig) { u16 downlink_seid = le16_to_cpu(ele->downlink_seid); u16 uplink_seid = le16_to_cpu(ele->uplink_seid); u8 element_type = ele->element_type; u16 seid = le16_to_cp...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
241,412,215,278,995,380,000,000,000,000,000,000,000
75
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
int mnt_fs_match_target(struct libmnt_fs *fs, const char *target, struct libmnt_cache *cache) { int rc = 0; if (!fs || !target || !fs->target) return 0; /* 1) native paths */ rc = mnt_fs_streq_target(fs, target); if (!rc && cache) { /* 2) - canonicalized and non-canonicalized */ char *cn = mnt_resolve_...
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
219,671,452,170,457,730,000,000,000,000,000,000,000
25
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
static void nf_tables_obj_notify(const struct nft_ctx *ctx, struct nft_object *obj, int event) { nft_obj_notify(ctx->net, ctx->table, obj, ctx->portid, ctx->seq, event, ctx->flags, ctx->family, ctx->report, GFP_KERNEL); }
0
[]
net
520778042ccca019f3ffa136dd0ca565c486cedd
9,213,402,986,897,404,000,000,000,000,000,000,000
6
netfilter: nf_tables: disallow non-stateful expression in sets earlier Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression instantiation"), it is possible to attach stateful expressions to set elements. cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") in...
auth_getpwent ( /* PARAMETERS */ const char *login, /* I: plaintext authenticator */ const char *password, /* I: plaintext password */ const char *service __attribute__((unused)), const char *realm __attribute__((unused)) /* END PARAMETERS */ ) { /* VARIABLES */ struct passwd *pw; /* pointer...
1
[ "CWE-189" ]
cyrus-sasl
dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d
313,664,856,980,651,720,000,000,000,000,000,000,000
51
Handle NULL returns from glibc 2.17+ crypt() Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL (w/ NULL return) if the salt violates specifications. Additionally, on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords passed to crypt() fail with EPERM (w/ NULL return). When using glibc's crypt...
_gids_hashtbl_idx(const char *user) { uint64_t x = siphash_str(user); return x % GIDS_HASH_LEN; }
0
[ "CWE-284" ]
slurm
92362a92fffe60187df61f99ab11c249d44120ee
138,034,675,596,545,920,000,000,000,000,000,000,000
5
Fix security issue in _prolog_error(). Fix security issue caused by insecure file path handling triggered by the failure of a Prolog script. To exploit this a user needs to anticipate or cause the Prolog to fail for their job. (This commit is slightly different from the fix to the 15.08 branch.) CVE-2016-10030.
AllowedOnSecondary secondaryAllowed(ServiceContext*) const override { return AllowedOnSecondary::kAlways; }
0
[ "CWE-613" ]
mongo
e55d6e2292e5dbe2f97153251d8193d1cc89f5d7
88,935,717,375,244,020,000,000,000,000,000,000,000
3
SERVER-38984 Validate unique User ID on UserCache hit
int imap_cache_clean(struct ImapData *idata) { idata->bcache = msg_cache_open(idata); mutt_bcache_list(idata->bcache, msg_cache_clean_cb, idata); return 0; }
0
[ "CWE-119", "CWE-787" ]
neomutt
1b0f0d0988e6df4e32e9f4bf8780846ea95d4485
132,679,344,411,756,430,000,000,000,000,000,000,000
7
Don't overflow stack buffer in msg_parse_fetch
int get_partition_id_hash_sub(partition_info *part_info, uint32 *part_id) { longlong func_value; return get_part_id_hash(part_info->num_subparts, part_info->subpart_expr, part_id, &func_value); }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
271,465,185,121,253,600,000,000,000,000,000,000,000
7
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 ...
static void CTXLoad_ExecuteConditional(M_Conditional *c, GF_Scene *scene) { GF_List *clist = c->buffer.commandList; c->buffer.commandList = NULL; gf_sg_command_apply_list(gf_node_get_graph((GF_Node*)c), clist, gf_scene_get_time(scene)); if (c->buffer.commandList != NULL) { while (gf_list_count(clist)) { GF_C...
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
180,509,428,504,654,540,000,000,000,000,000,000,000
18
fixed #2061
static struct file *io_file_get(struct io_submit_state *state, struct io_kiocb *req, int fd, bool fixed) { struct io_ring_ctx *ctx = req->ctx; struct file *file; if (fixed) { unsigned long file_ptr; if (unlikely((unsigned int)fd >= ctx->nr_user_files)) return NULL; fd = array_index_nospec(fd, ctx->nr...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
13,470,901,914,835,937,000,000,000,000,000,000,000
29
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 int v4l_query_ext_ctrl(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct video_device *vfd = video_devdata(file); struct v4l2_query_ext_ctrl *p = arg; struct v4l2_fh *vfh = test_bit(V4L2_FL_USES_V4L2_FH, &vfd->flags) ? fh : NULL; if (vfh && vfh->ctrl_handler) return ...
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
158,093,838,374,327,320,000,000,000,000,000,000,000
16
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
void setImageDrawDecideCbk(GBool (*cbk)(int img_id, void *data), void *data) { imgDrawCbk = cbk; imgDrawCbkData = data; }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
96,205,107,959,017,510,000,000,000,000,000,000,000
2
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
proxy_C_GetTokenInfo (CK_X_FUNCTION_LIST *self, CK_SLOT_ID id, CK_TOKEN_INFO_PTR info) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_slot_to_real (state->px, &id, &map); if (rv != CKR_OK) return rv; return (map.funcs->C_GetTokenInfo) (id, info); }
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
251,983,852,109,832,120,000,000,000,000,000,000,000
13
Check for arithmetic overflows before allocating
static inline void put_link(struct nameidata *nd) { struct saved *last = nd->stack + --nd->depth; struct inode *inode = last->inode; if (last->cookie && inode->i_op->put_link) inode->i_op->put_link(inode, last->cookie); if (!(nd->flags & LOOKUP_RCU)) path_put(&last->link); }
0
[ "CWE-254" ]
linux
397d425dc26da728396e66d392d5dcb8dac30c37
96,804,214,912,158,610,000,000,000,000,000,000,000
9
vfs: Test for and handle paths that are unreachable from their mnt_root In rare cases a directory can be renamed out from under a bind mount. In those cases without special handling it becomes possible to walk up the directory tree to the root dentry of the filesystem and down from the root dentry to every other file ...
ip_set_eventloop_tick(self, tick) VALUE self; VALUE tick; { struct tcltkip *ptr = get_ip(self); /* ip is deleted? */ if (deleted_ip(ptr)) { return get_eventloop_tick(self); } if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) { /* slave IP */ return get_eventloop_tick...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
251,397,904,812,210,770,000,000,000,000,000,000,000
17
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static bool isShiftedMask (ut32 value) { return value && isMask ((value - 1) | value); }
0
[ "CWE-119", "CWE-787" ]
radare2
df167c7db545953bb7f71c72e98e7a3ca0c793bf
164,301,310,827,843,760,000,000,000,000,000,000,000
3
Fix #12376 - crash in: rasm2 -a arm -b 64 '0 ,0,0,0,0,0,0,'
int64_t qmp_guest_file_open(const char *path, bool has_mode, const char *mode, Error **errp) { int64_t fd; HANDLE fh; HANDLE templ_file = NULL; DWORD share_mode = FILE_SHARE_READ; DWORD flags_and_attr = FILE_ATTRIBUTE_NORMAL; LPSECURITY_ATTRIBUTES sa_attr = NULL; ...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
72,172,917,429,282,430,000,000,000,000,000,000,000
45
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
GF_Box *pasp_box_new() { ISOM_DECL_BOX_ALLOC(GF_PixelAspectRatioBox, GF_ISOM_BOX_TYPE_PASP); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
289,342,113,964,835,750,000,000,000,000,000,000,000
5
fixed #2255
static int snd_timer_check_master(struct snd_timer_instance *master) { struct snd_timer_instance *slave, *tmp; /* check all pending slaves */ list_for_each_entry_safe(slave, tmp, &snd_timer_slave_list, open_list) { if (slave->slave_class == master->slave_class && slave->slave_id == master->slave_id) { if...
0
[ "CWE-416", "CWE-703" ]
linux
e7af6307a8a54f0b873960b32b6a644f2d0fbd97
280,204,219,871,169,970,000,000,000,000,000,000,000
26
ALSA: timer: Fix incorrectly assigned timer instance The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()") unified the error handling code paths with the standard goto, but it introduced a subtle bug: the timer instance is stored in snd_timer_open() incorrectly even if it returns an...
static int rose_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; struct rose_sock *rose = rose_sk(sk); struct sockaddr_rose *srose = (struct sockaddr_rose *)msg->msg_name; size_t copied; unsigned char *asmptr; struct sk_buff *skb; int n...
1
[ "CWE-200" ]
linux
4a184233f21645cf0b719366210ed445d1024d72
304,367,484,220,302,700,000,000,000,000,000,000,000
64
rose: fix info leak via msg_name in rose_recvmsg() The code in rose_recvmsg() does not initialize all of the members of struct sockaddr_rose/full_sockaddr_rose when filling the sockaddr info. Nor does it initialize the padding bytes of the structure inserted by the compiler for alignment. This will lead to leaking uni...
static void ims_pcu_process_data(struct ims_pcu *pcu, struct urb *urb) { int i; for (i = 0; i < urb->actual_length; i++) { u8 data = pcu->urb_in_buf[i]; /* Skip everything until we get Start Xmit */ if (!pcu->have_stx && data != IMS_PCU_PROTOCOL_STX) continue; if (pcu->have_dle) { pcu->have_dle = fal...
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
190,200,668,406,799,100,000,000,000,000,000,000,000
59
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
static int php_object_element_export(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; smart_str *buf; level = va_arg(args, int); buf = va_arg(args, smart_str *); buffer_append_spaces(buf, level + 2); if (hash_key->nKeyLength != 0) { const char *class_name; /* ig...
1
[]
php-src
e8429400d40e3c3aa4b22ba701991d698a2f3b2f
54,915,160,081,400,810,000,000,000,000,000,000,000
33
Fix bug #70172 - Use After Free Vulnerability in unserialize()
static char *exif_get_tagname_key(int tag_num, char *buf, size_t buf_size, tag_table_type tag_table) { char *desc = zend_hash_index_find_ptr(exif_get_tag_ht(tag_table), tag_num); if (desc) { return desc; } snprintf(buf, buf_size, "UndefinedTag:0x%04X", tag_num); return buf; }
0
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
177,695,353,097,184,170,000,000,000,000,000,000,000
9
Fixed bug #79282
process_idb_options(pcap_t *p, struct block_cursor *cursor, uint64_t *tsresol, uint64_t *tsoffset, int *is_binary, char *errbuf) { struct option_header *opthdr; void *optvalue; int saw_tsresol, saw_tsoffset; uint8_t tsresol_opt; u_int i; saw_tsresol = 0; saw_tsoffset = 0; while (cursor->data_remaining != 0...
0
[ "CWE-20", "CWE-703", "CWE-770" ]
libpcap
87d6bef033062f969e70fa40c43dfd945d5a20ab
206,647,753,085,164,800,000,000,000,000,000,000,000
129
do sanity checks on PHB header length before allocating memory. There was no fault; but doing the check results in a more consistent error
static void calcstepsizes(uint_fast16_t refstepsize, int numrlvls, uint_fast16_t *stepsizes) { int bandno; int numbands; uint_fast16_t expn; uint_fast16_t mant; expn = JPC_QCX_GETEXPN(refstepsize); mant = JPC_QCX_GETMANT(refstepsize); numbands = 3 * numrlvls - 2; for (bandno = 0; bandno < numbands; ++bandno) ...
0
[ "CWE-190" ]
jasper
a712a2041085e7cd5f2b153e1532ac2a2954ffaa
333,504,713,222,950,960,000,000,000,000,000,000,000
16
Added some additional checking to prevent a potential integer overflow due to conversion in the JPC decoder.
void spl_array_iterator_append(zval *object, zval *append_value TSRMLS_DC) /* {{{ */ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); if (!aht) { php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Array was mod...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
273,865,942,564,523,200,000,000,000,000,000,000,000
20
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
static OPJ_FLOAT32 opj_j2k_get_tp_stride (opj_tcp_t * p_tcp) { return (OPJ_FLOAT32) ((p_tcp->m_nb_tile_parts - 1) * 14); }
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
229,886,359,453,268,800,000,000,000,000,000,000,000
4
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
TEST_F(QuotedString_ExtractFrom_Tests, EscapedNewline) { whenInputIs("\"hello \\nworld\\n\""); resultMustBe("hello \nworld\n"); }
0
[ "CWE-415", "CWE-119" ]
ArduinoJson
5e7b9ec688d79e7b16ec7064e1d37e8481a31e72
217,667,908,626,020,000,000,000,000,000,000,000,000
4
Fix buffer overflow (pull request #81)
gdm_session_authenticate (GdmSession *self, const char *service_name) { GdmSessionConversation *conversation; g_return_if_fail (GDM_IS_SESSION (self)); conversation = find_conversation_by_name (self, service_name); if (conversation != NULL) { g...
1
[]
gdm
05e5fc24b0f803098c1d05dae86f5eb05bd0c2a4
212,406,829,405,736,100,000,000,000,000,000,000,000
15
session: Cancel worker proxy async ops when freeing conversations We need to cancel ongoing async ops for worker proxies when freeing conversations or we'll crash when the completion handler runs and we access free'd memory. https://bugzilla.gnome.org/show_bug.cgi?id=758032
static void FS_ReorderPurePaks( void ) { searchpath_t *s; int i; searchpath_t **p_insert_index, // for linked list reordering **p_previous; // when doing the scan fs_reordered = qfalse; // only relevant when connected to pure server if ( !fs_numServerPaks ) return; p_insert_index = &fs_searchpaths; // we ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
169,783,198,506,974,900,000,000,000,000,000,000,000
32
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
void Server::removeLink(Channel *c, Channel *l) { c->unlink(l); if (c->bTemporary || l->bTemporary) return; TransactionHolder th; QSqlQuery &query = *th.qsqQuery; if (l) { SQLPREP("DELETE FROM `%1channel_links` WHERE `server_id` = ? AND `channel_id` = ? AND `link_id` = ?"); query.addBindValue(iServerNum);...
0
[ "CWE-20" ]
mumble
6b33dda344f89e5a039b7d79eb43925040654242
295,019,771,983,566,600,000,000,000,000,000,000,000
28
Don't crash on long usernames
static inline unsigned long bad_hva(void) { return PAGE_OFFSET; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
258,304,183,900,209,070,000,000,000,000,000,000,000
4
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
QPDFPageDocumentHelper::pushInheritedAttributesToPage() { this->qpdf.pushInheritedAttributesToPage(); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
13,932,865,979,129,775,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int ipip_rcv(struct sk_buff *skb) { struct ip_tunnel *tunnel; const struct iphdr *iph = ip_hdr(skb); rcu_read_lock(); if ((tunnel = ipip_tunnel_lookup(dev_net(skb->dev), iph->saddr, iph->daddr)) != NULL) { if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) { rcu_read_unlock(); kfree_skb(skb); ...
0
[]
linux-2.6
d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978
192,465,313,742,803,940,000,000,000,000,000,000,000
35
tunnels: fix netns vs proto registration ordering Same stuff as in ip_gre patch: receive hook can be called before netns setup is done, oopsing in net_generic(). Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static bool check(Ope &ope) { IsPrioritizedChoice vis; ope.accept(vis); return vis.result_; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
76,664,927,996,630,260,000,000,000,000,000,000,000
5
Fix #122
static int get_send_buffer_size(int sk) { int size; socklen_t optlen = sizeof(size); if (getsockopt(sk, SOL_SOCKET, SO_SNDBUF, &size, &optlen) < 0) { int err = -errno; error("getsockopt(SO_SNDBUF) failed: %s (%d)", strerror(-err), -err); return err; } /* * Doubled value is returned by getsockopt...
0
[ "CWE-703" ]
bluez
7a80d2096f1b7125085e21448112aa02f49f5e9a
182,844,845,211,310,400,000,000,000,000,000,000,000
19
avdtp: Fix accepting invalid/malformed capabilities Check if capabilities are valid before attempting to copy them.
wait_for_refresh(int offset, const char *prefix, int msec) { int lpc = msec / 1000; struct timespec sleept = { 1, 0 }; if (as_console == FALSE) { timer_id = g_timeout_add(msec, mon_timer_popped, NULL); return; } crm_notice("%sRefresh in %ds...", prefix ? prefix : "", lpc); whil...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
26,543,938,948,873,977,000,000,000,000,000,000,000
29
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
static int __init opt_kgdb_wait(char *str) { kgdb_break_asap = 1; kdb_init(KDB_INIT_EARLY); if (kgdb_io_module_registered && IS_ENABLED(CONFIG_ARCH_HAS_EARLY_DEBUG)) kgdb_initial_breakpoint(); return 0; }
0
[ "CWE-787" ]
linux
eadb2f47a3ced5c64b23b90fd2a3463f63726066
29,461,729,671,366,660,000,000,000,000,000,000,000
11
lockdown: also lock down previous kgdb use KGDB and KDB allow read and write access to kernel memory, and thus should be restricted during lockdown. An attacker with access to a serial port (for example, via a hypervisor console, which some cloud vendors provide over the network) could trigger the debugger so it is i...
static void cmd_address_info(RCore *core, const char *addrstr, int fmt) { ut64 addr, type; if (!addrstr || !*addrstr) { addr = core->offset; } else { addr = r_num_math (core->num, addrstr); } type = r_core_anal_address (core, addr); int isp = 0; switch (fmt) { case 'j': #define COMMA isp++? ",": "" r_cons...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
69,738,986,284,795,760,000,000,000,000,000,000,000
66
Fix #12375 - Crash in bd+ao (#12382)
__setscheduler(struct rq *rq, struct task_struct *p, int policy, int prio) { BUG_ON(p->se.on_rq); p->policy = policy; p->rt_priority = prio; p->normal_prio = normal_prio(p); /* we are holding p->pi_lock already */ p->prio = rt_mutex_getprio(p); if (rt_prio(p->prio)) p->sched_class = &rt_sched_class; else p...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
97,405,225,298,052,050,000,000,000,000,000,000,000
15
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
rb_dir_exists_p(VALUE obj, VALUE fname) { rb_warning("Dir.exists? is a deprecated name, use Dir.exist? instead"); return rb_file_directory_p(obj, fname); }
0
[ "CWE-22" ]
ruby
bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8
150,464,016,822,207,100,000,000,000,000,000,000,000
5
dir.c: check NUL bytes * dir.c (GlobPathValue): should be used in rb_push_glob only. other methods should use FilePathValue. https://hackerone.com/reports/302338 * dir.c (rb_push_glob): expand GlobPathValue git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int has_stopped_jobs(struct pid *pgrp) { int retval = 0; struct task_struct *p; do_each_pid_task(pgrp, PIDTYPE_PGID, p) { if (!task_is_stopped(p)) continue; retval = 1; break; } while_each_pid_task(pgrp, PIDTYPE_PGID, p); return retval; }
0
[ "CWE-284", "CWE-264" ]
linux
8141c7f3e7aee618312fa1c15109e1219de784a7
9,184,585,940,673,150,000,000,000,000,000,000,000
13
Move "exit_robust_list" into mm_release() We don't want to get rid of the futexes just at exit() time, we want to drop them when doing an execve() too, since that gets rid of the previous VM image too. Doing it at mm_release() time means that we automatically always do it when we disassociate a VM map from the task. ...
int PE_(r_bin_pe_is_stripped_debug)(struct PE_(r_bin_pe_obj_t)* bin) { if (!bin || !bin->nt_headers) { return false; } return HASCHR (PE_IMAGE_FILE_DEBUG_STRIPPED); }
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
14,230,569,504,840,908,000,000,000,000,000,000,000
6
Fix crash in pe
static int vidioc_g_fmt_overlay(struct file *file, void *priv, struct v4l2_format *fmt) { return 0; }
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
75,204,318,266,672,190,000,000,000,000,000,000,000
4
add explicit format specifier to printf() invocations CWE-134
static int __net_init pfkey_init_proc(struct net *net) { struct proc_dir_entry *e; e = proc_create_net("pfkey", 0, net->proc_net, &pfkey_seq_ops, sizeof(struct seq_net_private)); if (e == NULL) return -ENOMEM; return 0; }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
177,463,631,197,011,900,000,000,000,000,000,000,000
11
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static void kvm_mmu_notifier_invalidate_range_end(struct mmu_notifier *mn, const struct mmu_notifier_range *range) { struct kvm *kvm = mmu_notifier_to_kvm(mn); const struct kvm_hva_range hva_range = { .start = range->start, .end = range->end, .pte = __pte(0), .handler = (void *)kvm_null_fn, .on_loc...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
310,398,394,299,277,200,000,000,000,000,000,000,000
32
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static int path_count_inc(int nests) { if (++path_count[nests] > path_limits[nests]) return -1; return 0; }
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
34,283,295,420,487,780,000,000,000,000,000,000,000
6
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...
ProcKill(int code, Datum arg) { /* use volatile pointer to prevent code rearrangement */ volatile PROC_HDR *procglobal = ProcGlobal; PGPROC *proc; Assert(MyProc != NULL); /* Make sure we're out of the sync rep lists */ SyncRepCleanupAtProcExit(); #ifdef USE_ASSERT_CHECKING { int i; /* Last process s...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
133,207,790,067,334,920,000,000,000,000,000,000,000
79
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
void CompressElementOp::Compute(OpKernelContext* ctx) { std::vector<Tensor> components; for (size_t i = 0; i < ctx->num_inputs(); ++i) { components.push_back(ctx->input(i)); } CompressedElement compressed; OP_REQUIRES_OK(ctx, CompressElement(components, &compressed)); Tensor* output; OP_REQUIRES_OK(c...
0
[ "CWE-476" ]
tensorflow
7bdf50bb4f5c54a4997c379092888546c97c3ebd
266,998,914,184,654,050,000,000,000,000,000,000,000
12
Ensure non-empty compressed input in tf.raw_ops.UncompressElement PiperOrigin-RevId: 383955815 Change-Id: I072a84fd02738dd2f51b3f42836ed80067dba4a8
void sasl_deinit(void) { signal_remove("server cap ack sasl", (SIGNAL_FUNC) sasl_start); signal_remove("event authenticate", (SIGNAL_FUNC) sasl_step); signal_remove("event 903", (SIGNAL_FUNC) sasl_success); signal_remove("event 902", (SIGNAL_FUNC) sasl_fail); signal_remove("event 904", (SIGNAL_FUNC) sasl_fail); s...
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
319,789,280,572,824,460,000,000,000,000,000,000,000
12
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
void decode(const char * in, int size, FilterCharVector & out) const { const char * stop = in + size; // this is OK even if size == -1 while (in != stop && *in) { out.append(from_utf8(in, stop)); } }
0
[ "CWE-125" ]
aspell
de29341638833ba7717bd6b5e6850998454b044b
315,337,684,497,771,640,000,000,000,000,000,000,000
6
Don't allow null-terminated UCS-2/4 strings using the original API. Detect if the encoding is UCS-2/4 and the length is -1 in affected API functions and refuse to convert the string. If the string ends up being converted somehow, abort with an error message in DecodeDirect and ConvDirect. To convert a null terminate...
static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_pi_state *pi_state) { u32 uninitialized_var(curval), newval; struct task_struct *new_owner; bool postunlock = false; DEFINE_WAKE_Q(wake_q); int ret = 0; new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); if (WARN_ON_ONCE(!new_owner)) { /* ...
0
[ "CWE-416" ]
tip
8019ad13ef7f64be44d4f892af9c840179009254
209,381,121,826,721,500,000,000,000,000,000,000,000
75
futex: Fix inode life-time issue As reported by Jann, ihold() does not in fact guarantee inode persistence. And instead of making it so, replace the usage of inode pointers with a per boot, machine wide, unique inode identifier. This sequence number is global, but shared (file backed) futexes are rare enough that thi...
size_t base64encode(char *outbuf, const unsigned char *buf, size_t size) { if (!outbuf || !buf || (size <= 0)) { return 0; } size_t n = 0; size_t m = 0; unsigned char input[3]; unsigned int output[4]; while (n < size) { input[0] = buf[n]; input[1] = (n+1 < size) ? buf[n+1] : 0; input[2] = (n+2 < size) ?...
0
[ "CWE-125", "CWE-787" ]
libplist
3a55ddd3c4c11ce75a86afbefd085d8d397ff957
318,486,123,649,018,840,000,000,000,000,000,000,000
27
base64: Rework base64decode to handle split encoded data correctly
onig_node_str_clear(Node* node) { if (STR_(node)->capa != 0 && IS_NOT_NULL(STR_(node)->s) && STR_(node)->s != STR_(node)->buf) { xfree(STR_(node)->s); } STR_(node)->capa = 0; STR_(node)->flag = 0; STR_(node)->s = STR_(node)->buf; STR_(node)->end = STR_(node)->buf; }
0
[ "CWE-787" ]
oniguruma
ddbf55698b5f7ffdfa737b0b8e0079af1fdd7cb1
241,057,619,576,145,240,000,000,000,000,000,000,000
12
re-fix #60 by check val_type
SetForeWindow(wi) struct win *wi; { struct win *p; if (display == 0) { fore = wi; return; } p = Layer2Window(D_forecv->c_layer); SetCanvasWindow(D_forecv, wi); if (p) WindowChanged(p, 'u'); if (wi) WindowChanged(wi, 'u'); flayer = D_forecv->c_layer; /* Activate called afterwa...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
88,611,478,831,428,140,000,000,000,000,000,000,000
18
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
int x509_get_ext( unsigned char **p, const unsigned char *end, x509_buf *ext, int tag ) { int ret; size_t len; if( *p == end ) return( 0 ); ext->tag = **p; if( ( ret = asn1_get_tag( p, end, &ext->len, ASN1_CONTEXT_SPECIFIC | ASN1_CONSTRUCTED | tag ) ) != 0 ) ...
0
[ "CWE-310" ]
polarssl
5d8618539f8e186c1b2c1b5a548d6f85936fe41f
87,959,166,539,392,360,000,000,000,000,000,000,000
36
Fix memory leak while parsing some X.509 certs
static int equal_nocase(const unsigned char *pattern, size_t pattern_len, const unsigned char *subject, size_t subject_len, unsigned int flags) { skip_prefix(&pattern, &pattern_len, subject_len, flags); if (pattern_len != subject_len) return 0; while (...
0
[ "CWE-125" ]
openssl
bb4d2ed4091408404e18b3326e3df67848ef63d0
332,780,088,034,541,300,000,000,000,000,000,000,000
27
Fix append_ia5 function to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
addXtermChar(Char **buffer, Cardinal *used, Cardinal offset, unsigned value) { if (offset + 1 >= *used) { *used = 1 + (2 * (offset + 1)); allocXtermChars(buffer, *used); } (*buffer)[offset++] = (Char) value; return offset; }
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
128,892,371,984,918,530,000,000,000,000,000,000,000
9
snapshot of project "xterm", label xterm-365d
compute_O_value(std::string const& user_password, std::string const& owner_password, QPDF::EncryptionData const& data) { // Algorithm 3.3 from the PDF 1.7 Reference Manual unsigned char O_key[OU_key_bytes_V4]; compute_O_rc4_key(user_password, owner_password, data, O_key); char upass[key_bytes]; ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
303,884,811,670,885,320,000,000,000,000,000,000,000
18
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
xmlGetDtdElementDesc2(xmlDtdPtr dtd, const xmlChar *name, int create) { xmlElementTablePtr table; xmlElementPtr cur; xmlChar *uqname = NULL, *prefix = NULL; if (dtd == NULL) return(NULL); if (dtd->elements == NULL) { xmlDictPtr dict = NULL; if (dtd->doc != NULL) dict = dtd->doc->dict; if ...
0
[]
libxml2
932cc9896ab41475d4aa429c27d9afd175959d74
175,463,515,864,023,400,000,000,000,000,000,000,000
55
Fix buffer size checks in xmlSnprintfElementContent xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
int sftp_server_init(sftp_session sftp){ ssh_session session = sftp->session; sftp_packet packet = NULL; ssh_buffer reply = NULL; uint32_t version; sftp_enter_function(); packet = sftp_packet_read(sftp); if (packet == NULL) { sftp_leave_function(); return -1; } if (packet->type != SSH_FXP_I...
0
[]
libssh
4d8420f3282ed07fc99fc5e930c17df27ef1e9b2
205,647,994,014,323,300,000,000,000,000,000,000,000
65
sftp: Fix bug in sftp_mkdir not returning on error. resolves: #84 (cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44)
PHP_FUNCTION(imageaffinematrixconcat) { double m1[6]; double m2[6]; double mr[6]; zval **tmp; zval *z_m1; zval *z_m2; int i, nelems; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "aa", &z_m1, &z_m2) == FAILURE) { return; } if (((nelems = zend_hash_num_elements(Z_ARRVAL_P(z_m1))) != 6) || (nelems ...
1
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
2,372,615,070,661,608,400,000,000,000,000,000,000
66
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
bool checkreturn pb_decode_noinit(pb_istream_t *stream, const pb_field_t fields[], void *dest_struct) { uint8_t fields_seen[(PB_MAX_REQUIRED_FIELDS + 7) / 8] = {0, 0, 0, 0, 0, 0, 0, 0}; uint32_t extension_range_start = 0; pb_field_iterator_t iter; pb_field_init(&iter, fields, dest_struct); ...
0
[ "CWE-125" ]
nanopb
7b396821ddd06df8e39143f16e1dc0a4645b89a3
148,903,095,891,672,080,000,000,000,000,000,000,000
95
Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p)
nvmet_fc_find_target_queue(struct nvmet_fc_tgtport *tgtport, u64 connection_id) { struct nvmet_fc_tgt_assoc *assoc; struct nvmet_fc_tgt_queue *queue; u64 association_id = nvmet_fc_getassociationid(connection_id); u16 qid = nvmet_fc_getqueueid(connection_id); unsigned long flags; if (qid > NVMET_NR_QUEUES) ...
0
[ "CWE-119", "CWE-787" ]
linux
0c319d3a144d4b8f1ea2047fd614d2149b68f889
161,111,956,227,235,150,000,000,000,000,000,000,000
27
nvmet-fc: ensure target queue id within range. When searching for queue id's ensure they are within the expected range. Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
uchar *pack_int64(uchar* to, const uchar *from) { return pack_int(to, from, 8); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
223,490,443,080,116,330,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
int mbedtls_ssl_handshake_client_step( mbedtls_ssl_context *ssl ) { int ret = 0; if( ssl->state == MBEDTLS_SSL_HANDSHAKE_OVER || ssl->handshake == NULL ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); MBEDTLS_SSL_DEBUG_MSG( 2, ( "client state: %d", ssl->state ) ); if( ( ret = mbedtls_ssl_flush_out...
0
[ "CWE-119", "CWE-125", "CWE-295" ]
mbedtls
a1098f81c252b317ad34ea978aea2bc47760b215
282,500,589,914,378,730,000,000,000,000,000,000,000
133
Add bounds check before signature length read
void qxl_spice_reset_cursor(PCIQXLDevice *qxl) { qxl->ssd.worker->reset_cursor(qxl->ssd.worker); }
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
252,504,393,241,274,250,000,000,000,000,000,000,000
4
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
if (pData->curlHandle) { curl_easy_cleanup(pData->curlHandle); pData->curlHandle = NULL; }
0
[ "CWE-399" ]
rsyslog
80f88242982c9c6ad6ce8628fc5b94ea74051cf4
74,276,278,101,426,890,000,000,000,000,000,000,000
4
bugfix: double-free in omelasticsearch closes: http://bugzilla.adiscon.com/show_bug.cgi?id=461 Thanks to Marius Ionescu for providing a detailled bug report
ha_rows get_examined_row_count() const { return m_examined_row_count; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
34,026,034,326,178,384,000,000,000,000,000,000,000
2
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
static void redirect_to_ssl(struct mg_connection *conn, const struct mg_request_info *request_info) { const char *host = mg_get_header(conn, "Host"); // u_int16_t port = ntop->get_HTTPserver()->get_port(); if(host != NULL) { const char *p = strchr(host, ':'); if(p) mg_...
0
[ "CWE-284", "CWE-335" ]
ntopng
30610bda60cbfc058f90a1c0a17d0e8f4516221a
155,591,679,550,538,920,000,000,000,000,000,000,000
20
Added code to randomize values returned by rand()
struct instruction * compiler_create_instruction(struct filter_op *fop) { struct instruction *ins; SAFE_CALLOC(ins, 1, sizeof(struct instruction)); /* copy the instruction */ memcpy(&ins->fop, fop, sizeof(struct filter_op)); return ins; }
0
[ "CWE-703", "CWE-125" ]
ettercap
626dc56686f15f2dda13c48f78c2a666cb6d8506
319,344,387,347,341,460,000,000,000,000,000,000,000
11
Exit gracefully in case of corrupted filters (Closes issue #782)
PHP_METHOD(PharFileInfo, __destruct) { zval *zobj = getThis(); phar_entry_object *entry_obj = (phar_entry_object*)((char*)Z_OBJ_P(zobj) - Z_OBJ_P(zobj)->handlers->offset); if (entry_obj->entry && entry_obj->entry->is_temp_dir) { if (entry_obj->entry->filename) { efree(entry_obj->entry->filename); entry_obj-...
0
[ "CWE-20" ]
php-src
1e9b175204e3286d64dfd6c9f09151c31b5e099a
231,807,443,052,671,400,000,000,000,000,000,000,000
15
Fix bug #71860: Require valid paths for phar filenames
bool valid_gecos(const char *d) { if (!d) return false; if (!utf8_is_valid(d)) return false; if (string_has_cc(d, NULL)) return false; /* Colons are used as field separators, and hence not OK */ if (strchr(d, ':')) ...
0
[ "CWE-269" ]
systemd
156a5fd297b61bce31630d7a52c15614bf784843
29,028,748,383,582,656,000,000,000,000,000,000,000
17
basic/user-util: always use base 10 for user/group numbers We would parse numbers with base prefixes as user identifiers. For example, "0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be interpreted as UID==1000. This parsing was used also in cases where either a user/group name or number may be spe...
njs_function_call2(njs_vm_t *vm, njs_function_t *function, const njs_value_t *this, const njs_value_t *args, njs_uint_t nargs, njs_value_t *retval, njs_bool_t ctor) { njs_int_t ret; njs_value_t dst njs_aligned(16); ret = njs_function_frame(vm, function, this, args, nargs, ctor); if (njs_slo...
0
[ "CWE-416" ]
njs
6a07c2156a07ef307b6dcf3c2ca8571a5f1af7a6
12,647,286,233,066,007,000,000,000,000,000,000,000
20
Fixed recursive async function calls. Previously, PromiseCapability record was stored (function->context) directly in function object during a function invocation. This is not correct, because PromiseCapability record should be linked to current execution context. As a result, function->context is overwritten with c...
static bool r_bin_mdmp_patch_pe_headers(RBuffer *pe_buf) { int i; Pe64_image_dos_header dos_hdr; Pe64_image_nt_headers nt_hdr; Pe64_image_section_header *section_hdrs; r_buf_read_at (pe_buf, 0, (ut8 *)&dos_hdr, sizeof (Pe64_image_dos_header)); r_buf_read_at (pe_buf, dos_hdr.e_lfanew, (ut8 *)&nt_hdr, sizeof (Pe64...
0
[ "CWE-125" ]
radare2
eb7deb281df54771fb8ecf5890dc325a7d22d3e2
238,299,801,666,399,540,000,000,000,000,000,000,000
17
Fix #10464 - oobread crash in mdmp (#10683)
cmsHPROFILE CMSEXPORT cmsCreateLab4ProfileTHR(cmsContext ContextID, const cmsCIExyY* WhitePoint) { cmsHPROFILE hProfile; cmsPipeline* LUT = NULL; hProfile = cmsCreateRGBProfileTHR(ContextID, WhitePoint == NULL ? cmsD50_xyY() : WhitePoint, NULL, NULL); if (hProfile == NULL) return NULL; cmsSetProfi...
1
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
138,354,092,232,476,400,000,000,000,000,000,000,000
37
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
parse_wbxml_attribute_list (proto_tree *tree, tvbuff_t *tvb, guint32 offset, guint32 str_tbl, guint8 level, guint8 *codepage_attr) { guint32 tvb_len = tvb_reported_length (tvb); guint32 off = offset, last_off; guint32 len; guint str_len; guint32 ent; guint32 idx; guint8 peek; DebugLog(("parse_wbx...
0
[ "CWE-399", "CWE-119", "CWE-787" ]
wireshark
b8e0d416898bb975a02c1b55883342edc5b4c9c0
298,570,371,356,199,250,000,000,000,000,000,000,000
180
WBXML: add a basic sanity check for offset overflow This is a naive approach allowing to detact that something went wrong, without the need to replace all proto_tree_add_text() calls as what was done in master-2.0 branch. Bug: 12408 Change-Id: Ia14905005e17ae322c2fc639ad5e491fa08b0108 Reviewed-on: https://code.wiresh...
int RGWListBucketMultiparts_ObjStore::get_params() { delimiter = s->info.args.get("delimiter"); prefix = s->info.args.get("prefix"); string str = s->info.args.get("max-uploads"); op_ret = parse_value_and_bound(str, max_uploads, 0, g_conf->get_val<uint64_t>("rgw_max_listing_results"), default_max); if (o...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
326,595,796,097,688,860,000,000,000,000,000,000,000
19
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 <...
SYSCALL_DEFINE1(setfsuid, uid_t, uid) { const struct cred *old; struct cred *new; uid_t old_fsuid; new = prepare_creds(); if (!new) return current_fsuid(); old = current_cred(); old_fsuid = old->fsuid; if (uid == old->uid || uid == old->euid || uid == old->suid || uid == old->fsuid || nsown_capa...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
64,147,224,156,175,850,000,000,000,000,000,000,000
29
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
int pmixp_coll_ring_unpack(Buf buf, pmixp_coll_type_t *type, pmixp_coll_ring_msg_hdr_t *ring_hdr, pmixp_proc_t **r, size_t *nr) { pmixp_proc_t *procs = NULL; uint32_t nprocs = 0; uint32_t tmp; int rc, i; char *temp_ptr; /* 1. extract the type of collective */ if (SLURM_SUCCESS != (rc = unpack32(&tmp...
0
[ "CWE-120" ]
slurm
c3142dd87e06621ff148791c3d2f298b5c0b3a81
301,798,917,750,690,030,000,000,000,000,000,000,000
57
PMIx - fix potential buffer overflows from use of unpackmem(). CVE-2020-27745.
static int fwnet_add_peer(struct fwnet_device *dev, struct fw_unit *unit, struct fw_device *device) { struct fwnet_peer *peer; peer = kmalloc(sizeof(*peer), GFP_KERNEL); if (!peer) return -ENOMEM; dev_set_drvdata(&unit->device, peer); peer->dev = dev; peer->guid = (u64)device->config_rom[3] << 32 | devi...
0
[ "CWE-119", "CWE-284", "CWE-787" ]
linux
667121ace9dbafb368618dbabcf07901c962ddac
170,183,076,482,334,960,000,000,000,000,000,000,000
31
firewire: net: guard against rx buffer overflows The IP-over-1394 driver firewire-net lacked input validation when handling incoming fragmented datagrams. A maliciously formed fragment with a respectively large datagram_offset would cause a memcpy past the datagram buffer. So, drop any packets carrying a fragment wi...
kdc_process_tgs_req(kdc_realm_t *kdc_active_realm, krb5_kdc_req *request, const krb5_fulladdr *from, krb5_data *pkt, krb5_ticket **ticket_out, krb5_db_entry **krbtgt_ptr, krb5_keyblock **tgskey, krb5_keyblock **subkey, ...
0
[ "CWE-476" ]
krb5
93b4a6306a0026cf1cc31ac4bd8a49ba5d034ba7
329,430,121,025,208,300,000,000,000,000,000,000,000
165
Fix S4U2Self KDC crash when anon is restricted In validate_as_request(), when enforcing restrict_anonymous_to_tgt, use client.princ instead of request->client; the latter is NULL when validating S4U2Self requests. CVE-2016-3120: In MIT krb5 1.9 and later, an authenticated attacker can cause krb5kdc to dereference a ...
void DecimalQuantity::copyBcdFrom(const DecimalQuantity &other) { setBcdToZero(); if (other.usingBytes) { ensureCapacity(other.precision); uprv_memcpy(fBCD.bcdBytes.ptr, other.fBCD.bcdBytes.ptr, other.precision * sizeof(int8_t)); } else { fBCD.bcdLong = other.fBCD.bcdLong; } }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
232,574,503,223,602,570,000,000,000,000,000,000,000
9
ICU-20246 Fixing another integer overflow in number parsing.
int jbd2_journal_forget (handle_t *handle, struct buffer_head *bh) { transaction_t *transaction = handle->h_transaction; journal_t *journal; struct journal_head *jh; int drop_reserve = 0; int err = 0; int was_modified = 0; if (is_handle_aborted(handle)) return -EROFS; journal = transaction->t_journal; BUFF...
0
[ "CWE-787" ]
linux
e09463f220ca9a1a1ecfda84fcda658f99a1f12a
294,130,936,205,921,050,000,000,000,000,000,000,000
116
jbd2: don't mark block as modified if the handle is out of credits Do not set the b_modified flag in block's journal head should not until after we're sure that jbd2_journal_dirty_metadat() will not abort with an error due to there not being enough space reserved in the jbd2 handle. Otherwise, future attempts to modi...
int STDCALL mysql_session_track_get_first(MYSQL *mysql, enum enum_session_state_type type, const char **data, size_t *length) { mysql->extension->session_state[type].current= mysql->extension->session_state[type].list; return mysql_session_track_get_next(mysql, type, data, ...
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
253,058,747,460,144,800,000,000,000,000,000,000,000
6
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
fill_label_bitfield64(field_info *fi, gchar *label_str, gboolean is_signed) { char *p; int bitfield_byte_length, bitwidth; guint64 unshifted_value; guint64 value; char buf[48]; const char *out; header_field_info *hfinfo = fi->hfinfo; /* Figure out the bit width */ bitwidth = hfi...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
323,706,714,417,867,940,000,000,000,000,000,000,000
54
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
dotcmd(int argc, char **argv) { int status = 0; nextopt(nullstr); argv = argptr; if (*argv) { char *fullname; fullname = find_dot_file(*argv); setinputfile(fullname, INPUT_PUSH_FILE); commandname = fullname; status = cmdloop(0); popfile(); } return status; }
0
[]
dash
29d6f2148f10213de4e904d515e792d2cf8c968e
9,733,574,718,314,948,000,000,000,000,000,000,000
19
eval: Check nflag in evaltree instead of cmdloop This patch moves the nflag check from cmdloop into evaltree. This is so that nflag will be in force even if we enter the shell via a path other than cmdloop, e.g., through sh -c. Reported-by: Joey Hess <id@joeyh.name> Signed-off-by: Herbert Xu <herbert@gondor.apana.or...
void StreamEncoderImpl::readDisable(bool disable) { if (disable) { ++read_disable_calls_; } else { ASSERT(read_disable_calls_ != 0); if (read_disable_calls_ != 0) { --read_disable_calls_; } } connection_.readDisable(disable); }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
331,763,179,365,978,100,000,000,000,000,000,000,000
11
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
GetDataBlock(gif_source_ptr sinfo, U_CHAR *buf) /* Read a GIF data block, which has a leading count byte */ /* A zero-length block marks the end of a data block sequence */ { int count; count = ReadByte(sinfo); if (count > 0) { if (!ReadOK(sinfo->pub.input_file, buf, count)) ERREXIT(sinfo->cinfo, JERR_...
0
[ "CWE-369" ]
libjpeg-turbo
1719d12e51641cce5c77e259516649ba5ef6303c
335,138,800,645,646,900,000,000,000,000,000,000,000
13
cjpeg: Fix FPE when compressing 0-width GIF Fixes #493
int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs) { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); unsigned int cur_mss; int diff, len, err; /* Inconclusive MTU probe */ if (icsk->icsk_mtup.probe_size) icsk->icsk_mtup.probe_size = 0; /* Do not sent...
0
[ "CWE-416" ]
linux
7f582b248d0a86bae5788c548d7bb5bca6f7691a
159,334,433,293,961,950,000,000,000,000,000,000,000
109
tcp: purge write queue in tcp_connect_init() syzkaller found a reliable way to crash the host, hitting a BUG() in __tcp_retransmit_skb() Malicous MSG_FASTOPEN is the root cause. We need to purge write queue in tcp_connect_init() at the point we init snd_una/write_seq. This patch also replaces the BUG() by a less int...
static int io_async_cancel_one(struct io_uring_task *tctx, u64 user_data, struct io_ring_ctx *ctx) { struct io_cancel_data data = { .ctx = ctx, .user_data = user_data, }; enum io_wq_cancel cancel_ret; int ret = 0; if (!tctx || !tctx->io_wq) return -ENOENT; cancel_ret = io_wq_cancel_cb(tctx->io_wq, i...
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
272,307,451,335,544,900,000,000,000,000,000,000,000
25
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...
void MD5::update(unsigned char *input, size_t inputLen) { unsigned int i, index, partLen; // Compute number of bytes mod 64 index = static_cast<unsigned int>((count[0] >> 3) & 0x3f); // Update number of bits if ((count[0] += (static_cast<UINT4>(inputLen) << 3)) < (static_cast<UINT4>(inp...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
118,099,911,091,133,810,000,000,000,000,000,000,000
33
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...