func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
unsigned lodepng_color_mode_copy(LodePNGColorMode* dest, const LodePNGColorMode* source) { size_t i; lodepng_color_mode_cleanup(dest); *dest = *source; if(source->palette) { dest->palette = (unsigned char*)malloc(1024); if(!dest->palette && source->palettesize) return 83; /*alloc fail*/ for(i = 0;...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
166,453,833,333,653,460,000,000,000,000,000,000,000
13
Fixed #5645: realloc return handling
void Server::AddSignals() { signals_.add(SIGINT); // Ctrl+C signals_.add(SIGTERM); #if defined(SIGQUIT) signals_.add(SIGQUIT); #endif }
0
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
145,701,158,270,962,870,000,000,000,000,000,000,000
8
fix static file serving security issue; fix url path encoding issue
signed_desc_append_to_journal(signed_descriptor_t *desc, desc_store_t *store) { char *fname = get_datadir_fname_suffix(store->fname_base, ".new"); const char *body = signed_descriptor_get_body_impl(desc,1); size_t len = desc->signed_descriptor_len + desc->annotations_len; if (appe...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
155,849,419,103,013,320,000,000,000,000,000,000,000
20
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
static ZIPARCHIVE_METHOD(addFile) { struct zip *intern; zval *this = getThis(); char *filename; int filename_len; char *entry_name = NULL; int entry_name_len = 0; long offset_start = 0, offset_len = 0; if (!this) { RETURN_FALSE; } ZIP_FROM_OBJECT(intern, this); if (zend_parse_parameters(ZEND_NUM_ARGS() ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
50,065,874,400,646,730,000,000,000,000,000,000,000
38
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static void free_one_config(struct submodule_entry *entry) { free((void *) entry->config->path); free((void *) entry->config->name); free((void *) entry->config->branch); free((void *) entry->config->update_strategy.command); free(entry->config); }
0
[ "CWE-88" ]
git
f6adec4e329ef0e25e14c63b735a5956dc67b8bc
218,777,413,838,555,370,000,000,000,000,000,000,000
8
submodule-config: ban submodule urls that start with dash The previous commit taught the submodule code to invoke our "git clone $url $path" with a "--" separator so that we aren't confused by urls or paths that start with dashes. However, that's just one code path. It's not clear if there are others, and it would be...
static entity_table_opt determine_entity_table(int all, int doctype) { entity_table_opt retval = {NULL}; assert(!(doctype == ENT_HTML_DOC_XML1 && all)); if (all) { retval.ms_table = (doctype == ENT_HTML_DOC_HTML5) ? entity_ms_table_html5 : entity_ms_table_html4; } else { retval.table = (doctype == ENT_HTML...
0
[ "CWE-190" ]
php-src
0da8b8b801f9276359262f1ef8274c7812d3dfda
304,976,595,768,998,870,000,000,000,000,000,000,000
15
Fix bug #72135 - don't create strings with lengths outside int range
void __kvm_migrate_apic_timer(struct kvm_vcpu *vcpu) { struct hrtimer *timer; if (!lapic_in_kernel(vcpu) || kvm_can_post_timer_interrupt(vcpu)) return; timer = &vcpu->arch.apic->lapic_timer.timer; if (hrtimer_cancel(timer)) hrtimer_start_expires(timer, HRTIMER_MODE_ABS_HARD); }
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
295,186,563,454,722,160,000,000,000,000,000,000,000
12
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
const unsigned char * r_jwe_get_aad(jwe_t * jwe, size_t * aad_len) { if (jwe != NULL) { if (aad_len != NULL) { *aad_len = jwe->aad_len; } return jwe->aad; } return NULL; }
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
218,031,319,746,807,370,000,000,000,000,000,000,000
9
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
set_control_keyid( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { keyid_t *pkeyid; /* * Restrict ourselves to one item only. */ if (INFO_NITEMS(inpkt->err_nitems) > 1) { msyslog(LOG_ERR, "set_control_keyid: err_nitems > 1"); req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); return; } pkeyid...
0
[ "CWE-190" ]
ntp
c04c3d3d940dfe1a53132925c4f51aef017d2e0f
277,148,997,077,526,850,000,000,000,000,000,000,000
21
[TALOS-CAN-0052] crash by loop counter underrun.
std::string get_dir(const std::string& dir_path) { DIR* dir = opendir(dir_path.c_str()); if(dir == NULL) { const int res = mkdir(dir_path.c_str(),AccessMode); if(res == 0) { dir = opendir(dir_path.c_str()); } else { ERR_FS << "could not open or create directory: " << dir_path << '\n'; } } if(dir == N...
0
[ "CWE-200" ]
wesnoth
af61f9fdd15cd439da9e2fe5fa39d174c923eaae
56,710,482,772,019,000,000,000,000,000,000,000,000
19
fs: Use game data path to resolve ./ in the absence of a current_dir Fixes a file content disclosure bug (#22042) affecting functionality relying on the get_wml_location() function and not passing a non-empty value for the current_dir parameter. See <https://gna.org/bugs/?22042> for details. This is a candidate for ...
PJ_DEF(pj_bool_t) pjsip_dlg_has_usage( pjsip_dialog *dlg, pjsip_module *mod) { unsigned index; pj_bool_t found = PJ_FALSE; pjsip_dlg_inc_lock(dlg); for (index=0; index<dlg->usage_cnt; ++index) { if (dlg->usage[index] == mod) { found = PJ_TRUE; break; } } pjsip...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
22,708,040,493,274,713,000,000,000,000,000,000,000
17
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
PHP_FUNCTION(ldap_get_values_len) { zval *link, *result_entry; ldap_linkdata *ld; ldap_resultentry *resultentry; char *attr; struct berval **ldap_value_len; int i, num_values, attr_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrs", &link, &result_entry, &attr, &attr_len) != SUCCESS) { return; }...
0
[ "CWE-476" ]
php-src
49782c54994ecca2ef2a061063bd5a7079c43527
256,201,743,438,602,680,000,000,000,000,000,000,000
32
Fix bug #76248 - Malicious LDAP-Server Response causes Crash
static void to_rdma_ah_attr(struct mlx5_ib_dev *ibdev, struct rdma_ah_attr *ah_attr, struct mlx5_qp_path *path) { memset(ah_attr, 0, sizeof(*ah_attr)); if (!path->port || path->port > ibdev->num_ports) return; ah_attr->type = rdma_ah_find_type(&ibdev->ib_dev, path->port); rdma_ah_set_port_num(ah...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
193,355,744,576,437,200,000,000,000,000,000,000,000
30
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
int tcp_v4_md5_do_add(struct sock *sk, __be32 addr, u8 *newkey, u8 newkeylen) { /* Add Key to the list */ struct tcp_md5sig_key *key; struct tcp_sock *tp = tcp_sk(sk); struct tcp4_md5sig_key *keys; key = tcp_v4_md5_do_lookup(sk, addr); if (key) { /* Pre-existing entry - just update that one. */ kfree...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
330,776,813,048,940,260,000,000,000,000,000,000,000
57
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static int btrfs_search_path_in_tree_user(struct inode *inode, struct btrfs_ioctl_ino_lookup_user_args *args) { struct btrfs_fs_info *fs_info = BTRFS_I(inode)->root->fs_info; struct super_block *sb = inode->i_sb; struct btrfs_key upper_limit = BTRFS_I(inode)->location; u64 treeid = BTRFS_I(inode)->root->root_ke...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
75,949,260,964,085,580,000,000,000,000,000,000,000
162
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
void delete_thd(THD *thd) { mysql_mutex_assert_owner(&LOCK_thread_count); mysql_mutex_assert_owner(&LOCK_thd_remove); thread_count--; delete thd; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
162,195,494,789,135,090,000,000,000,000,000,000,000
7
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...
int dtls1_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al,i,j,ret; unsigned int n; SSL3_RECORD *rr; void (*cb)(const SSL *ssl,int type2,int val)=NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_buffers(s)) return(-1); if ((type && (type != SSL3_RT_A...
0
[ "CWE-119", "CWE-787" ]
openssl
103b171d8fc282ef435f8de9afbf7782e312961f
318,185,979,257,810,740,000,000,000,000,000,000,000
643
A memory leak can occur in dtls1_buffer_record if either of the calls to ssl3_setup_buffers or pqueue_insert fail. The former will fail if there is a malloc failure, whilst the latter will fail if attempting to add a duplicate record to the queue. This should never happen because duplicate records should be detected an...
Status _initializeUserRolesFromV1RolesArray(User* user, const BSONElement& rolesElement, StringData dbname) { static const char privilegesTypeMismatchMessage[] = "Roles in V1 user documents must be enumerated in an array...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
310,171,997,709,754,360,000,000,000,000,000,000,000
18
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
void CLASS border_interpolate (int border) { unsigned row, col, y, x, f, c, sum[8]; for (row=0; row < height; row++) for (col=0; col < width; col++) { if (col==border && row >= border && row < height-border) col = width-border; memset (sum, 0, sizeof sum); for (y=row-1; y != row+2; y++) for...
0
[]
LibRaw
c4e374ea6c979a7d1d968f5082b7d0ea8cd27202
73,414,500,150,436,090,000,000,000,000,000,000,000
21
additional data checks backported from 0.15.4
zsetSMask(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_op(1); istate->SMask = *op; pop(1); return 0; }
0
[ "CWE-704" ]
ghostpdl
548bb434e81dadcc9f71adf891a3ef5bea8e2b4e
123,356,954,755,347,370,000,000,000,000,000,000,000
10
PS interpreter - add some type checking These were 'probably' safe anyway, since they mostly treat the objects as integers without checking, which at least can't result in a crash. Nevertheless, we ought to check. The return from comparedictkeys could be wrong if one of the keys had a value which was not an array, i...
PHP_FUNCTION(openssl_x509_parse) { zval ** zcert; X509 * cert = NULL; long certresource = -1; int i; zend_bool useshortnames = 1; char * tmpstr; zval * subitem; X509_EXTENSION *extension; char *extname; BIO *bio_out; BUF_MEM *bio_buf; char buf[256]; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Z...
0
[ "CWE-20" ]
php-src
c1c49d6e3983c9ce0b43ffe7bf6e03b809ed048b
295,218,709,012,185,750,000,000,000,000,000,000,000
131
fix using wrong buffer pointer
parser_emit_cbc_literal (parser_context_t *context_p, /**< context */ uint16_t opcode, /**< opcode */ uint16_t literal_index) /**< literal index */ { JERRY_ASSERT (PARSER_ARGS_EQ (opcode, CBC_HAS_LITERAL_ARG)); if (context_p->last_cbc_opcode != PARSER_CBC_UNAVAILAB...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
287,906,039,035,718,770,000,000,000,000,000,000,000
16
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
resolve_fstab_device (guestfs_h *g, const char *spec, Hash_table *md_map) { char *device = NULL; char *type, *slice, *disk, *part; int r; if (STRPREFIX (spec, "/dev/mapper/") && guestfs_exists (g, spec) > 0) { /* LVM2 does some strange munging on /dev/mapper paths for VGs and * LVs which contain '-' c...
0
[]
libguestfs
ae8bb84ecd46d7b6ef557a87725923ac8d09dce0
89,162,130,226,940,560,000,000,000,000,000,000,000
76
inspection: Don't segfault if /etc/SuSE-release is an empty file. Related to CVE-2013-2124. Thanks: Olaf Hering.
void remove_node_id(GF_SceneGraph *sg, GF_Node *node) { NodeIDedItem *reg_node = sg->id_node; if (!reg_node) return; if (reg_node->node==node) { sg->id_node = reg_node->next; if (sg->id_node_last==reg_node) sg->id_node_last = reg_node->next; if (reg_node->NodeName) gf_free(reg_node->NodeName); gf_free(r...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
338,760,056,814,352,170,000,000,000,000,000,000,000
30
fixed #2109
int path_has_submounts(const struct path *parent) { struct check_mount data = { .mnt = parent->mnt, .mounted = 0 }; read_seqlock_excl(&mount_lock); d_walk(parent->dentry, &data, path_check_mount, NULL); read_sequnlock_excl(&mount_lock); return data.mounted; }
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
226,639,602,309,419,630,000,000,000,000,000,000,000
10
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, OPJ_UINT32 res_factor, opj_event_mgr_t * p_manager) { return opj_j2k_set_decoded_resolution_factor(p_jp2->j2k, res_factor, p_manager); }
0
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
27,101,498,118,376,035,000,000,000,000,000,000,000
6
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
void Item_sum_avg::remove() { Item_sum_sum::remove(); if (!aggr->arg_is_null(true)) { if (count > 0) count--; } }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
107,475,481,681,230,490,000,000,000,000,000,000,000
9
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
set_client_ciphersuite(gnutls_session_t session, uint8_t suite[2]) { uint8_t z; uint8_t cipher_suites[MAX_CIPHERSUITE_SIZE]; int cipher_suite_size; int i; z = 1; cipher_suite_size = _gnutls_supported_ciphersuites(session, cipher_suites, sizeof(cipher_suites)); if (cipher_suite_size < 0) { gnutls_...
0
[ "CWE-310" ]
gnutls
db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa
928,959,076,605,150,500,000,000,000,000,000,000
77
handshake: check for TLS_FALLBACK_SCSV If TLS_FALLBACK_SCSV was sent by the client during the handshake, and the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX, send the "Inappropriate fallback" fatal alert and abort the handshake. This mechanism was defined in RFC7507.
CImg<T>& blur(const float sigma, const unsigned int boundary_conditions=1, const bool is_gaussian=true) { const float nsigma = sigma>=0?sigma:-sigma*cimg::max(_width,_height,_depth)/100; return blur(nsigma,nsigma,nsigma,boundary_conditions,is_gaussian); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
318,832,314,470,815,730,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void moved_group_fair(struct task_struct *p) { struct cfs_rq *cfs_rq = task_cfs_rq(p); update_curr(cfs_rq); place_entity(cfs_rq, &p->se, 1); }
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
98,811,293,687,185,700,000,000,000,000,000,000,000
7
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
void CLASS lossless_jpeg_load_raw() { int jwide, jrow, jcol, val, i, row=0, col=0; #ifndef LIBRAW_LIBRARY_BUILD int jidx,j; #endif struct jhead jh; ushort *rp; #ifdef LIBRAW_LIBRARY_BUILD int save_min = 0; unsigned slicesW[16],slicesWcnt=0,slices; unsigned *offset; unsigned t_y=0,t_x=0,t_s=0,slice=0,pi...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
85,811,174,218,551,080,000,000,000,000,000,000,000
156
cumulated data checks patch
dissect_job_status(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) { guint32 status; static const int * hf_status[] = { &hf_job_status_user_intervention, &hf_job_status_blocked, &hf_job_status_deleted, &hf_job_status_printed, &hf_job_status_paperout, &h...
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
251,291,471,672,866,630,000,000,000,000,000,000,000
26
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
void blk_finish_request(struct request *req, blk_status_t error) { struct request_queue *q = req->q; u64 now = ktime_get_ns(); lockdep_assert_held(req->q->queue_lock); WARN_ON_ONCE(q->mq_ops); if (req->rq_flags & RQF_STATS) blk_stat_add(req, now); if (req->rq_flags & RQF_QUEUED) blk_queue_end_tag(q, req); ...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
48,329,205,030,662,210,000,000,000,000,000,000,000
36
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
T2P* t2p_init() { T2P* t2p = (T2P*) _TIFFmalloc(sizeof(T2P)); if(t2p==NULL){ TIFFError( TIFF2PDF_MODULE, "Can't allocate %lu bytes of memory for t2p_init", (unsigned long) sizeof(T2P)); return( (T2P*) NULL ); } _TIFFmemset(t2p, 0x00, sizeof(T2P)); t2p->pdf_majorversion=1; t2p->pdf_minorversion=1; ...
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
286,908,295,179,011,800,000,000,000,000,000,000,000
22
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
static int ssb_prctl_set(struct task_struct *task, unsigned long ctrl) { bool update; if (ssb_mode != SPEC_STORE_BYPASS_PRCTL && ssb_mode != SPEC_STORE_BYPASS_SECCOMP) return -ENXIO; switch (ctrl) { case PR_SPEC_ENABLE: /* If speculation is force disabled, enable is not allowed */ if (task_spec_ssb_for...
0
[ "CWE-362" ]
linux
fdf82a7856b32d905c39afc85e34364491e46346
38,373,375,518,620,465,000,000,000,000,000,000,000
38
x86/speculation: Protect against userspace-userspace spectreRSB The article "Spectre Returns! Speculation Attacks using the Return Stack Buffer" [1] describes two new (sub-)variants of spectrev2-like attacks, making use solely of the RSB contents even on CPUs that don't fallback to BTB on RSB underflow (Skylake+). ...
static int unshare_sighand(struct task_struct *me) { struct sighand_struct *oldsighand = me->sighand; if (refcount_read(&oldsighand->count) != 1) { struct sighand_struct *newsighand; /* * This ->sighand is shared with the CLONE_SIGHAND * but not CLONE_THREAD task, switch to the new one. */ newsighand ...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
261,029,361,626,572,740,000,000,000,000,000,000,000
28
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
void kvm_dec_notifier_count(struct kvm *kvm, unsigned long start, unsigned long end) { /* * This sequence increase will notify the kvm page fault that * the page that is going to be mapped in the spte could have * been freed. */ kvm->mmu_notifier_seq++; smp_wmb(); /* * The above sequence increase ...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
116,199,262,335,438,760,000,000,000,000,000,000,000
17
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...
void __init ping_init(void) { int i; for (i = 0; i < PING_HTABLE_SIZE; i++) INIT_HLIST_NULLS_HEAD(&ping_table.hash[i], i); rwlock_init(&ping_table.lock); }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
201,484,851,784,408,820,000,000,000,000,000,000,000
8
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
static int update_window(PluginInstance *plugin, NPWindow *window) { if (plugin->is_windowless) { npw_printf("ERROR: update_window() called for windowless plugin\n"); return -1; } if (window->ws_info == NULL) { npw_printf("ERROR: no window attributes for window %p\n", window->window); return -1; } // al...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
219,819,503,389,695,500,000,000,000,000,000,000,000
45
Support all the new variables added
isdn_ppp_open(int min, struct file *file) { int slot; struct ippp_struct *is; if (min < 0 || min >= ISDN_MAX_CHANNELS) return -ENODEV; slot = isdn_ppp_get_slot(); if (slot < 0) { return -EBUSY; } is = file->private_data = ippp_table[slot]; printk(KERN_DEBUG "ippp, open, slot: %d, minor: %d, state: %04x\n...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
117,112,481,576,635,740,000,000,000,000,000,000,000
59
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
lha_skip_sfx(struct archive_read *a) { const void *h; const char *p, *q; size_t next, skip; ssize_t bytes, window; window = 4096; for (;;) { h = __archive_read_ahead(a, window, &bytes); if (h == NULL) { /* Remaining bytes are less than window. */ window >>= 1; if (window < (H_SIZE + 3)) goto fat...
0
[ "CWE-125" ]
libarchive
98dcbbf0bf4854bf987557e55e55fff7abbf3ea9
154,617,964,273,912,310,000,000,000,000,000,000,000
42
Fail with negative lha->compsize in lha_read_file_header_1() Fixes a heap buffer overflow reported in Secunia SA74169
vim_regsub( regmatch_T *rmp, char_u *source, typval_T *expr, char_u *dest, int destlen, int flags) { int result; regexec_T rex_save; int rex_in_use_save = rex_in_use; if (rex_in_use) // Being called recursively, save the state. rex_save = rex; rex_in_use = TRUE; r...
0
[ "CWE-416" ]
vim
32acf1f1a72ebb9d8942b9c9d80023bf1bb668ea
314,048,728,100,438,700,000,000,000,000,000,000,000
30
patch 9.0.0047: using freed memory with recursive substitute Problem: Using freed memory with recursive substitute. Solution: Always make a copy for reg_prev_sub.
static int _c2s_sx_sasl_callback(int cb, void *arg, void **res, sx_t s, void *cbarg) { c2s_t c2s = (c2s_t) cbarg; const char *my_realm, *mech; sx_sasl_creds_t creds; static char buf[3072]; char mechbuf[256]; struct jid_st jid; jid_static_buf jid_buf; int i, r; sess_t sess; char s...
1
[ "CWE-287", "CWE-703" ]
jabberd2
8416ae54ecefa670534f27a31db71d048b9c7f16
207,235,842,266,371,330,000,000,000,000,000,000,000
191
Fixed offered SASL mechanism check
dma_addr_t swiotlb_map(struct device *dev, phys_addr_t paddr, size_t size, enum dma_data_direction dir, unsigned long attrs) { phys_addr_t swiotlb_addr; dma_addr_t dma_addr; trace_swiotlb_bounced(dev, phys_to_dma(dev, paddr), size, swiotlb_force); swiotlb_addr = swiotlb_tbl_map_single(dev, paddr, size,...
0
[ "CWE-200", "CWE-401" ]
linux
aa6f8dcbab473f3a3c7454b74caa46d36cdc5d13
86,328,223,252,267,610,000,000,000,000,000,000,000
29
swiotlb: rework "fix info leak with DMA_FROM_DEVICE" Unfortunately, we ended up merging an old version of the patch "fix info leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph (the swiotlb maintainer), he asked me to create an incremental fix (after I have pointed this out the mix up, and asked h...
dt2local(timestamp dt, int tz) { #ifdef HAVE_INT64_TIMESTAMP dt -= (tz * USECS_PER_SEC); #else dt -= tz; #endif return dt; } /* dt2local() */
0
[ "CWE-416", "CWE-119" ]
postgres
4318daecc959886d001a6e79c6ea853e8b1dfb4b
336,424,858,327,931,900,000,000,000,000,000,000,000
9
Fix handling of wide datetime input/output. Many server functions use the MAXDATELEN constant to size a buffer for parsing or displaying a datetime value. It was much too small for the longest possible interval output and slightly too small for certain valid timestamp input, particularly input with a long timezone na...
int l2cap_disconn_ind(struct hci_conn *hcon) { struct l2cap_conn *conn = hcon->l2cap_data; BT_DBG("hcon %p", hcon); if (!conn) return HCI_ERROR_REMOTE_USER_TERM; return conn->disc_reason; }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
57,608,660,604,624,230,000,000,000,000,000,000,000
10
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static void nfs4_xdr_enc_setacl(struct rpc_rqst *req, struct xdr_stream *xdr, const void *data) { const struct nfs_setaclargs *args = data; struct compound_hdr hdr = { .minorversion = nfs4_xdr_minorversion(&args->seq_args), }; encode_compound_hdr(xdr, req, &hdr); encode_sequence(xdr, &args->seq_args, &hdr);...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
4,248,863,190,372,270,300,000,000,000,000,000,000
14
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static u32 qdisc_alloc_handle(struct net_device *dev) { int i = 0x10000; static u32 autohandle = TC_H_MAKE(0x80000000U, 0); do { autohandle += TC_H_MAKE(0x10000U, 0); if (autohandle == TC_H_MAKE(TC_H_ROOT, 0)) autohandle = TC_H_MAKE(0x80000000U, 0); } while (qdisc_lookup(dev, autohandle) && --i > 0); retu...
0
[ "CWE-909" ]
linux-2.6
16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b
270,551,627,644,823,530,000,000,000,000,000,000,000
13
tc: Fix unitialized kernel memory leak Three bytes of uninitialized kernel memory are currently leaked to user Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Reviewed-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
cifs_move_llist(struct list_head *source, struct list_head *dest) { struct list_head *li, *tmp; list_for_each_safe(li, tmp, source) list_move(li, dest); }
0
[ "CWE-119", "CWE-787" ]
linux
5d81de8e8667da7135d3a32a964087c0faf5483f
178,370,289,853,719,450,000,000,000,000,000,000,000
6
cifs: ensure that uncached writes handle unmapped areas correctly It's possible for userland to pass down an iovec via writev() that has a bogus user pointer in it. If that happens and we're doing an uncached write, then we can end up getting less bytes than we expect from the call to iov_iter_copy_from_user. This is ...
void InstanceKlass::initialize_super_interfaces(TRAPS) { assert (has_nonstatic_concrete_methods(), "caller should have checked this"); for (int i = 0; i < local_interfaces()->length(); ++i) { InstanceKlass* ik = local_interfaces()->at(i); // Initialization is depth first search ie. we start with top of the...
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
120,869,699,650,467,540,000,000,000,000,000,000,000
18
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
void set_command(enum_sql_command command, DDL_options_st options) { sql_command= command; create_info.set(options); }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
230,655,168,351,482,900,000,000,000,000,000,000,000
6
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
Status EagerRemoteExecute(EagerOperation* op, TensorHandle** retvals, int* num_retvals) { EagerContext& ctx = op->EagerContext(); // TODO(fishx): Remove following code when lazy tensor copy is ready. if (op->Device() == kVariantDeviceNull) { tensorflow::Device* device = nullptr; ...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
145,322,896,208,027,080,000,000,000,000,000,000,000
167
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
struct hostent *gethostent(void) { static struct hostent hoste; static char *buf = NULL; struct hostent *host = NULL; #ifndef __UCLIBC_HAS_IPV6__ #define HOSTENT_BUFSZ (sizeof(struct in_addr) + sizeof(struct in_addr *) * 2 + \ sizeof(char *)*ALIAS_DIM + BUFSZ /*namebuffer*/ + 2 /* margin */) #else #define HOSTE...
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
5,537,190,909,456,774,000,000,000,000,000,000,000
17
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
size_t ksize(const void *objp) { size_t size; BUG_ON(!objp); if (unlikely(objp == ZERO_SIZE_PTR)) return 0; size = virt_to_cache(objp)->object_size; /* We assume that ksize callers could use the whole allocated area, * so we need to unpoison this area. */ kasan_unpoison_shadow(objp, size); return size; ...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
164,600,220,785,948,110,000,000,000,000,000,000,000
16
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 jpc_qcc_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_qcc_t *qcc = &ms->parms.qcc; if (cstate->numcomps <= 256) { if (jpc_putuint8(out, qcc->compno)) { return -1; } } else { if (jpc_putuint16(out, qcc->compno)) { return -1; } } if (jpc_qcx_putcompparms(&qcc->comppar...
0
[]
jasper
4031ca321d8cb5798c316ab39c7a5dc88a61fdd7
93,251,889,604,789,030,000,000,000,000,000,000,000
17
Incorporated changes from patch jasper-1.900.3-libjasper-stepsizes-overflow.patch
//! Fill sequentially all pixel values with specified values \newinstance. CImg<T> get_fill(const T& val0, const T& val1) const { return CImg<T>(_width,_height,_depth,_spectrum).fill(val0,val1);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
249,957,269,798,908,600,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception) { char filename[MaxTextExtent]; FILE *file; Image *image, *next_image, *pwp_image; ImageInfo *read_info; int c, unique_file; MagickBooleanType status; register Image *p; regist...
0
[ "CWE-252" ]
ImageMagick6
11d9dac3d991c62289d1ef7a097670166480e76c
262,577,424,075,574,600,000,000,000,000,000,000,000
170
https://github.com/ImageMagick/ImageMagick/issues/1199
static void binder_free_buf_locked(struct binder_alloc *alloc, struct binder_buffer *buffer) { size_t size, buffer_size; buffer_size = binder_alloc_buffer_size(alloc, buffer); size = ALIGN(buffer->data_size, sizeof(void *)) + ALIGN(buffer->offsets_size, sizeof(void *)) + ALIGN(buffer->extra_buffers_size...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
65,199,278,893,394,570,000,000,000,000,000,000,000
54
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
GF_Err stbl_dump(GF_Box *a, FILE * trace) { GF_SampleTableBox *p; p = (GF_SampleTableBox *)a; gf_isom_box_dump_start(a, "SampleTableBox", trace); fprintf(trace, ">\n"); if (p->size) gf_isom_box_dump_ex(p->SampleDescription, trace, GF_ISOM_BOX_TYPE_STSD); if (p->size) gf_isom_box_dump_ex(p->TimeToSample, trac...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
148,166,493,951,069,650,000,000,000,000,000,000,000
50
fixed 2 possible heap overflows (inc. #1088)
Http::Stream::~Stream() { if (auto node = getTail()) { if (auto ctx = dynamic_cast<Http::Stream *>(node->data.getRaw())) { /* We are *always* the tail - prevent recursive free */ assert(this == ctx); node->data = nullptr; } } httpRequestFree(http); }
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
190,655,706,900,571,100,000,000,000,000,000,000,000
11
Handle more partial responses (#791)
datamatcher_checkbasename(Datamatcher *ma, const char *basename) { int l; const char *match = ma->matchdata; if (!match) return 1; switch (ma->flags & SEARCH_STRINGMASK) { case SEARCH_STRING: break; case SEARCH_STRINGEND: if (match != ma->match) break; /* had slash, do exact match ...
0
[ "CWE-125" ]
libsolv
fdb9c9c03508990e4583046b590c30d958f272da
39,893,542,155,738,103,000,000,000,000,000,000,000
29
repodata_schema2id: fix heap-buffer-overflow in memcmp When the length of last schema in data->schemadata is less than length of input schema, we got a read overflow in asan test. Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com>
long tg_get_cfs_period(struct task_group *tg) { u64 cfs_period_us; cfs_period_us = ktime_to_ns(tg->cfs_bandwidth.period); do_div(cfs_period_us, NSEC_PER_USEC); return cfs_period_us; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
115,510,972,578,662,560,000,000,000,000,000,000,000
9
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static void OneLine24(struct ico_progressive_state *context) { gint X; guchar *Pixels; X = 0; if (context->Header.Negative == 0) Pixels = (context->pixbuf->pixels + (gsize) context->pixbuf->rowstride * (context->Header.height - context->Lines - 1)); else Pixels = (context->pixbuf->pixels + (gsi...
0
[ "CWE-787" ]
gdk-pixbuf
88af50a864195da1a4f7bda5f02539704fbda599
118,948,376,537,021,340,000,000,000,000,000,000,000
22
ico: Be more careful when parsing headers There is some redundancy between the ico directory and the bitmap image header. If the two disagree on the icon dimensions, just toss the image, instead of risking crashes or OOM later. Also add some more debug spew that helped in tracking this down, and make error messages mo...
p_b_cclass(p, cs) register struct parse *p; register cset *cs; { register unsigned char *sp = p->next; register const struct cclass *cp; register size_t len; register const unsigned char *u; register unsigned char c; while (MORE() && isalpha(PEEK())) NEXT(); len = p->next - sp; for (cp = cclasses; cp->name !...
0
[]
php-src
124fb22a13fafa3648e4e15b4f207c7096d8155e
85,284,829,189,972,340,000,000,000,000,000,000,000
28
Fixed bug #68739 #68740 #68741
int phar_verify_signature(php_stream *fp, size_t end_of_phar, php_uint32 sig_type, char *sig, int sig_len, char *fname, char **signature, int *signature_len, char **error) /* {{{ */ { int read_size, len; zend_off_t read_len; unsigned char buf[1024]; php_stream_rewind(fp); switch (sig_type) { case PHAR_SIG_OPEN...
0
[ "CWE-119", "CWE-787" ]
php-src
0bfb970f43acd1e81d11be1154805f86655f15d5
7,934,323,855,234,515,000,000,000,000,000,000,000
301
Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile (cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2)
vhost_user_set_vring_num(struct virtio_net **pdev, struct vhu_msg_context *ctx, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; struct vhost_virtqueue *vq = dev->virtqueue[ctx->msg.payload.state.index]; if (validate_msg_fds(dev, ctx, 0) != 0) return RTE_VHOST_MSG_RESULT_ERR; if (ctx->msg.paylo...
0
[ "CWE-125", "CWE-787" ]
dpdk
6442c329b9d2ded0f44b27d2016aaba8ba5844c5
44,690,064,554,962,030,000,000,000,000,000,000,000
75
vhost: fix queue number check when setting inflight FD In function vhost_user_set_inflight_fd, queue number in inflight message is used to access virtqueue. However, queue number could be larger than VHOST_MAX_VRING and cause write OOB as this number will be used to write inflight info in virtqueue structure. This pat...
ex_mkspell(exarg_T *eap) { int fcount; char_u **fnames; char_u *arg = eap->arg; int ascii = FALSE; if (STRNCMP(arg, "-ascii", 6) == 0) { ascii = TRUE; arg = skipwhite(arg + 6); } /* Expand all the remaining arguments (e.g., $VIMRUNTIME). */ if (get_arglist_exp(arg, &fcount, &fn...
0
[ "CWE-190" ]
vim
399c297aa93afe2c0a39e2a1b3f972aebba44c9d
303,986,860,924,734,400,000,000,000,000,000,000,000
20
patch 8.0.0322: possible overflow with corrupted spell file Problem: Possible overflow with spell file where the tree length is corrupted. Solution: Check for an invalid length (suggested by shqking)
uint ha_partition::lock_count() const { DBUG_ENTER("ha_partition::lock_count"); DBUG_PRINT("info", ("m_num_locks %d", m_num_locks)); DBUG_RETURN(m_num_locks); }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
17,618,019,076,693,650,000,000,000,000,000,000,000
6
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 ...
ZEND_VM_HANDLER(147, ZEND_ADD_ARRAY_UNPACK, ANY, ANY) { USE_OPLINE zend_free_op free_op1; zval *op1; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR(BP_VAR_R); ZEND_VM_C_LABEL(add_unpack_again): if (EXPECTED(Z_TYPE_P(op1) == IS_ARRAY)) { HashTable *ht = Z_ARRVAL_P(op1); zval *val; zend_string *key; ZEND_HASH_FOR...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
208,384,581,790,763,160,000,000,000,000,000,000,000
106
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static int hex(char c) { char lc = tolower(c); if (isdigit(lc)) return lc - '0'; if (isxdigit(lc)) return lc - 'a' + 10; return -1; }
0
[ "CWE-703", "CWE-189" ]
optee_os
7e768f8a473409215fe3fff8f6e31f8a3a0103c6
205,517,279,514,692,470,000,000,000,000,000,000,000
10
core: clear the entire TA area Previously we cleared (memset to zero) the size corresponding to code and data segments, however the allocation for the TA is made on the granularity of the memory pool, meaning that we did not clear all memory and because of that we could potentially leak code and data of a previous loa...
void MirrorJob::MirrorStarted() { if(!parent_mirror) return; transfer_count+=root_transfer_count; }
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
250,728,976,747,363,870,000,000,000,000,000,000,000
6
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
* stop work. But, in that case, it is guaranteed not to race with * iscsi_destroy by conn_mutex. */ static void iscsi_if_stop_conn(struct iscsi_cls_conn *conn, int flag) { /* * It is important that this path doesn't rely on * rx_queue_mutex, otherwise, a thread doing allocation on a * start_session/start_conn...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
144,681,758,853,231,220,000,000,000,000,000,000,000
20
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
void st_select_lex::print_order(String *str, ORDER *order, enum_query_type query_type) { for (; order; order= order->next) { if (order->counter_used) { char buffer[20]; size_t length= my_snprintf(buffer, 20, "%d", order->counter); ...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
293,950,813,179,354,100,000,000,000,000,000,000,000
30
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
QString Utility::Substring(int start_index, int end_index, const QString &string) { return string.mid(start_index, end_index - start_index); }
0
[ "CWE-22" ]
Sigil
0979ba8d10c96ebca330715bfd4494ea0e019a8f
179,922,957,747,683,980,000,000,000,000,000,000,000
4
harden plugin unzipping to zip-slip attacks
agent_keywrap_key (ctrl_t ctrl, int forexport, void **r_kek, size_t *r_keklen) { gpg_error_t err; membuf_t data; size_t len; unsigned char *buf; char line[ASSUAN_LINELENGTH]; struct default_inq_parm_s dfltparm; memset (&dfltparm, 0, sizeof dfltparm); dfltparm.ctrl = ctrl; *r_kek = NULL; err = star...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
35,953,660,424,395,520,000,000,000,000,000,000,000
38
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
void MACH0_(mach_headerfields)(RBinFile *bf) { PrintfCallback cb_printf = bf->rbin->cb_printf; if (!cb_printf) { cb_printf = printf; } RBuffer *buf = bf->buf; ut64 length = r_buf_size (buf); int n = 0; struct MACH0_(mach_header) *mh = MACH0_(get_hdr)(buf); if (!mh) { return; } ut64 pvaddr = pa2va (bf, 0);...
0
[ "CWE-476", "CWE-787" ]
radare2
a5aafb99c3965259c84ddcf45a91144bf7eb4cf1
284,183,945,062,274,000,000,000,000,000,000,000,000
227
Fix null deref in macho parser ##crash * Reported by Han0nly via huntrdev * BountyID: c07e4918-cf86-4d2e-8969-5fb63575b449 * Reproducer: machonull
int jp2_validate(jas_stream_t *in) { char buf[JP2_VALIDATELEN]; int i; int n; #if 0 jas_stream_t *tmpstream; jp2_box_t *box; #endif assert(JAS_STREAM_MAXPUTBACK >= JP2_VALIDATELEN); /* Read the validation data (i.e., the data used for detecting the format). */ if ((n = jas_stream_read(in, buf, JP2_VALIDATE...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
223,215,952,828,223,360,000,000,000,000,000,000,000
40
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
int main(void) { uschar buffer[256]; printf("Testing is_ip_address\n"); while (fgets(CS buffer, sizeof(buffer), stdin) != NULL) { int offset; buffer[Ustrlen(buffer) - 1] = 0; printf("%d\n", string_is_ip_address(buffer, NULL)); printf("%d %d %s\n", string_is_ip_address(buffer, &offset), offset, buffer); } ...
0
[]
exim
24c929a27415c7cfc7126c47e4cad39acf3efa6b
12,004,623,687,539,340,000,000,000,000,000,000,000
133
Buffer overrun fix. fixes: bug #787
bool is_swiotlb_active(struct device *dev) { struct io_tlb_mem *mem = dev->dma_io_tlb_mem; return mem && mem->nslabs; }
0
[ "CWE-200", "CWE-401" ]
linux
aa6f8dcbab473f3a3c7454b74caa46d36cdc5d13
240,877,025,253,518,900,000,000,000,000,000,000,000
6
swiotlb: rework "fix info leak with DMA_FROM_DEVICE" Unfortunately, we ended up merging an old version of the patch "fix info leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph (the swiotlb maintainer), he asked me to create an incremental fix (after I have pointed this out the mix up, and asked h...
int iwl_remove_station(struct iwl_priv *priv, const u8 sta_id, const u8 *addr) { unsigned long flags; u8 tid; if (!iwl_is_ready(priv->shrd)) { IWL_DEBUG_INFO(priv, "Unable to remove station %pM, device not ready.\n", addr); /* * It is typical for stations to be removed when we are * going d...
0
[ "CWE-119", "CWE-787" ]
linux
2da424b0773cea3db47e1e81db71eeebde8269d4
295,030,916,843,562,320,000,000,000,000,000,000,000
61
iwlwifi: Sanity check for sta_id On my testing, I saw some strange behavior [ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00 [ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode not sure how it happen, but ...
static int em_btc(struct x86_emulate_ctxt *ctxt) { emulate_2op_SrcV_nobyte(ctxt, "btc"); return X86EMUL_CONTINUE; }
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
63,362,948,578,892,120,000,000,000,000,000,000,000
5
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
void set_binlog_cache_info(my_off_t param_max_binlog_cache_size, ulong *param_ptr_binlog_cache_use, ulong *param_ptr_binlog_cache_disk_use) { /* The assertions guarantee that the set_binlog_cache_info is called just once and information passe...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
212,954,378,216,628,850,000,000,000,000,000,000,000
29
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
void __dev_notify_flags(struct net_device *dev, unsigned int old_flags) { unsigned int changes = dev->flags ^ old_flags; if (changes & IFF_UP) { if (dev->flags & IFF_UP) call_netdevice_notifiers(NETDEV_UP, dev); else call_netdevice_notifiers(NETDEV_DOWN, dev); } if (dev->flags & IFF_UP && (changes ...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
257,229,816,220,930,600,000,000,000,000,000,000,000
15
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...
size_t ZSTD_initCStream_internal(ZSTD_CStream* zcs, const void* dict, size_t dictSize, const ZSTD_CDict* cdict, ZSTD_CCtx_params params, unsigned long long pledgedSrcSize) { DEBUGLOG(4, "ZSTD_initCStream_internal"); params.cParams = ZSTD_getCParamsFromCCtxParams(&params, ...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
289,226,756,698,994,850,000,000,000,000,000,000,000
32
fixed T36302429
CAMLexport uint64_t caml_deserialize_uint_8(void) { uint64_t i; caml_deserialize_block_8(&i, 1); return i; }
0
[ "CWE-200" ]
ocaml
659615c7b100a89eafe6253e7a5b9d84d0e8df74
254,109,508,707,221,800,000,000,000,000,000,000,000
6
fix PR#7003 and a few other bugs caused by misuse of Int_val git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@16525 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
int llhttp__after_message_complete(llhttp_t* parser, const char* p, const char* endp) { int should_keep_alive; should_keep_alive = llhttp_should_keep_alive(parser); parser->finish = HTTP_FINISH_SAFE; parser->flags = 0; /* NOTE: this is ignored in loose parsing mode */ re...
0
[ "CWE-444" ]
node
1da22eb48254f8c2d5f3c5865bb9f46e8b09ec60
129,045,235,496,015,820,000,000,000,000,000,000,000
11
http: stricter Transfer-Encoding and header separator parsing Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> PR-URL: https://github.com/nodejs-private/node-private/p...
processPrimeResponse(struct module_qstate* qstate, int id) { struct iter_qstate* iq = (struct iter_qstate*)qstate->minfo[id]; enum response_type type; iq->response->rep->flags &= ~(BIT_RD|BIT_RA); /* ignore rec-lame */ type = response_type_from_server( (int)((iq->chase_flags&BIT_RD) || iq->chase_to_rd), iq->re...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
1,050,339,267,107,617,900,000,000,000,000,000,000
40
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
R_API ut16 calculate_access_value(const char *access_flags_str, RBinJavaAccessFlags *access_flags) { ut16 result = 0; ut16 size = strlen (access_flags_str) + 1; char *p_flags, *my_flags = malloc (size); RBinJavaAccessFlags *iter = NULL; if (size < 5 || !my_flags) { free (my_flags); return result; } memcpy (m...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
118,905,696,312,970,000,000,000,000,000,000,000,000
30
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
int parse_args(int argc, char **argv) { if (load_defaults("my",load_default_groups,&argc,&argv)) exit(1); default_argv= argv; if ((handle_options(&argc, &argv, my_long_options, get_one_option))) exit(1); if (argc > 1) { usage(); exit(1); } if (argc == 1) opt_db= *argv; if (tty_pas...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
33,680,314,332,926,477,000,000,000,000,000,000,000
34
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval) { u64 overrun = 1; ktime_t delta; delta = ktime_sub(now, alarm->node.expires); if (delta < 0) return 0; if (unlikely(delta >= interval)) { s64 incr = ktime_to_ns(interval); overrun = ktime_divns(delta, incr); alarm->node.expires = k...
0
[ "CWE-190" ]
linux
5f936e19cc0ef97dbe3a56e9498922ad5ba1edef
210,075,693,211,894,650,000,000,000,000,000,000,000
30
alarmtimer: Prevent overflow for relative nanosleep Air Icy reported: UBSAN: Undefined behaviour in kernel/time/alarmtimer.c:811:7 signed integer overflow: 1529859276030040771 + 9223372036854775807 cannot be represented in type 'long long int' Call Trace: alarm_timer_nsleep+0x44c/0x510 kernel/time/alarmtim...
Item *get_copy(THD *thd) { return get_item_copy<Item_timestamp_literal>(thd, this); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
250,705,340,834,085,000,000,000,000,000,000,000,000
2
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
Status GetDeviceForInput(const EagerOperation& op, const EagerContext& ctx, TensorHandle* tensor_handle, Device** result) { Device* cpu_device = ctx.HostCPU(); string device_name; if (tensor_handle->Type() != TensorHandle::LOCAL) { Device* device = tensor_handle->device(); device_...
1
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
313,132,395,886,519,550,000,000,000,000,000,000,000
42
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
exif_mnote_data_canon_get_tags (ExifMnoteDataCanon *dc, unsigned int n, unsigned int *m, unsigned int *s) { unsigned int from = 0, to; if (!dc || !m) return; for (*m = 0; *m < dc->count; (*m)++) { to = from + mnote_canon_entry_count_values (&dc->entries[*m]); if (to > n) { if (s) *s = n - from; break; ...
0
[ "CWE-125" ]
libexif
435e21f05001fb03f9f186fa7cbc69454afd00d1
83,025,063,768,196,190,000,000,000,000,000,000,000
15
Fix MakerNote tag size overflow issues at read time. Check for a size overflow while reading tags, which ensures that the size is always consistent for the given components and type of the entry, making checking further down superfluous. This provides an alternate fix for https://sourceforge.net/p/libexif/bugs/125/ C...
void SetApplicationLocaleOnIOThread(const std::string& locale) { DCHECK_CURRENTLY_ON(BrowserThread::IO); g_io_thread_application_locale.Get() = locale; }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
129,262,120,472,955,520,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
userauth_hostbased_fromfile(LIBSSH2_SESSION *session, const char *username, size_t username_len, const char *publickey, const char *privatekey, const char *passphrase, const char *hostname, size_t hostname_le...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
180,658,620,684,818,900,000,000,000,000,000,000,000
228
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
SCTP_STATIC int sctp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { int retval = 0; int len; SCTP_DEBUG_PRINTK("sctp_getsockopt(sk: %p... optname: %d)\n", sk, optname); /* I can hardly begin to describe how wrong this is. This is * so broken as to be wor...
0
[ "CWE-476" ]
linux
ea2bc483ff5caada7c4aa0d5fbf87d3a6590273d
3,590,460,754,122,656,000,000,000,000,000,000,000
120
[SCTP]: Fix assertion (!atomic_read(&sk->sk_rmem_alloc)) failed message In current implementation, LKSCTP does receive buffer accounting for data in sctp_receive_queue and pd_lobby. However, LKSCTP don't do accounting for data in frag_list when data is fragmented. In addition, LKSCTP doesn't do accounting for data in ...
static void map_subject_alt_name(X509* x509, int general_name_type, general_name_mapper_pr mapper, void* data) { int i; int num; STACK_OF(GENERAL_NAME) * gens; gens = X509_get_ext_d2i(x509, NID_subject_alt_name, NULL, NULL); if (!gens) { return; } num = sk_GENERAL_NAME_num(g...
0
[ "CWE-787" ]
FreeRDP
8305349a943c68b1bc8c158f431dc607655aadea
271,668,920,065,952,340,000,000,000,000,000,000,000
33
Fixed GHSL-2020-102 heap overflow (cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581)
xsltValueOf(xsltTransformContextPtr ctxt, xmlNodePtr node, xmlNodePtr inst, xsltElemPreCompPtr castedComp) { #ifdef XSLT_REFACTORED xsltStyleItemValueOfPtr comp = (xsltStyleItemValueOfPtr) castedComp; #else xsltStylePreCompPtr comp = (xsltStylePreCompPtr) castedComp; #endif xmlXPathObjectPtr res...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
296,718,037,234,351,220,000,000,000,000,000,000,000
63
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
static int ZEND_FASTCALL ZEND_IS_IDENTICAL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; is_identical_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
25,945,771,380,350,193,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int udf_rmdir(struct inode *dir, struct dentry *dentry) { int retval; struct inode *inode = dentry->d_inode; struct udf_fileident_bh fibh; struct fileIdentDesc *fi, cfi; struct kernel_lb_addr tloc; retval = -ENOENT; fi = udf_find_entry(dir, &dentry->d_name, &fibh, &cfi); if (!fi) goto out; retval = ...
0
[ "CWE-200" ]
linux
0143fc5e9f6f5aad4764801015bc8d4b4a278200
296,017,599,906,578,600,000,000,000,000,000,000,000
41
udf: avoid info leak on export For type 0x51 the udf.parent_partref member in struct fid gets copied uninitialized to userland. Fix this by initializing it to 0. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Jan Kara <jack@suse.cz>