func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int kvm_arch_vcpu_create(struct kvm_vcpu *vcpu) { struct sie_page *sie_page; int rc; BUILD_BUG_ON(sizeof(struct sie_page) != 4096); sie_page = (struct sie_page *) get_zeroed_page(GFP_KERNEL); if (!sie_page) return -ENOMEM; vcpu->arch.sie_block = &sie_page->sie_block; vcpu->arch.sie_block->itdba = (unsigned l...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
53,867,637,224,623,240,000,000,000,000,000,000,000
71
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
static void psi_poll_work(struct psi_group *group) { u32 changed_states; u64 now; mutex_lock(&group->trigger_lock); now = sched_clock(); collect_percpu_times(group, PSI_POLL, &changed_states); if (changed_states & group->poll_states) { /* Initialize trigger windows when entering polling mode */ if (now > ...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
100,987,643,457,005,660,000,000,000,000,000,000,000
39
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
sph_dec32le(const void *src) { #if defined SPH_UPTR #if SPH_UNALIGNED #if SPH_BIG_ENDIAN return sph_bswap32(*(const sph_u32 *)src); #else return *(const sph_u32 *)src; #endif #else if (((SPH_UPTR)src & 3) == 0) { #if SPH_BIG_ENDIAN #if SPH_SPARCV9_GCC && !SPH_NO_ASM sph_u32 tmp; /* * "__volatile__" is needed...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
141,124,332,240,037,980,000,000,000,000,000,000,000
63
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 single_kat(DRBG_SELFTEST_DATA *td) { RAND_DRBG *drbg = NULL; TEST_CTX t; int failures = 0; unsigned char buff[1024]; /* * Test without PR: Instantiate DRBG with test entropy, nonce and * personalisation string. */ if (!TEST_ptr(drbg = RAND_DRBG_new(td->nid, td->flags, ...
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
98,658,236,994,525,830,000,000,000,000,000,000,000
87
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
static int buffer_is_empty(h2_bucket_beam *beam) { return ((!beam->recv_buffer || APR_BRIGADE_EMPTY(beam->recv_buffer)) && H2_BLIST_EMPTY(&beam->send_list)); }
0
[ "CWE-400" ]
mod_h2
83a2e3866918ce6567a683eb4c660688d047ee81
141,763,001,712,868,640,000,000,000,000,000,000,000
5
* fixes a race condition where aborting streams triggers an unnecessary timeout.
int options_parse(CONF_TYPE type) { SERVICE_OPTIONS *section; options_defaults(); section=&new_service_options; if(options_file(configuration_file, type, &section)) return 1; if(init_section(1, &section)) return 1; s_log(LOG_NOTICE, "Configuration successful"); return 0; }
1
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
33,000,386,844,529,250,000,000,000,000,000,000,000
13
stunnel-5.57
static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode) { if (dentry->d_flags & DCACHE_NFSFS_RENAMED) { nfs_complete_unlink(dentry, inode); nfs_drop_nlink(inode); } iput(inode); }
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
42,630,343,432,158,460,000,000,000,000,000,000,000
8
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
slhc_init(int rslots, int tslots) { register short i; register struct cstate *ts; struct slcompress *comp; comp = kzalloc(sizeof(struct slcompress), GFP_KERNEL); if (! comp) goto out_fail; if ( rslots > 0 && rslots < 256 ) { size_t rsize = rslots * sizeof(struct cstate); comp->rstate = kzalloc(rsize, GF...
1
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
220,661,401,782,685,030,000,000,000,000,000,000,000
55
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...
static void ql_init_scan_mode(struct ql3_adapter *qdev) { ql_mii_enable_scan_mode(qdev); if (test_bit(QL_LINK_OPTICAL, &qdev->flags)) { if (ql_this_adapter_controls_port(qdev)) ql_petbi_init_ex(qdev); } else { if (ql_this_adapter_controls_port(qdev)) ql_phy_init_ex(qdev); } }
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
290,200,892,434,967,550,000,000,000,000,000,000,000
12
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static inline int restore_sigcontext_fpu(struct sigcontext __user *sc) { struct task_struct *tsk = current; if (!(current_cpu_data.flags & CPU_HAS_FPU)) return 0; set_used_math(); return __copy_from_user(&tsk->thread.fpu.hard, &sc->sc_fpregs[0], sizeof(long)*(16*2+2)); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
224,581,606,309,090,600,000,000,000,000,000,000,000
11
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
dirvote_compute_consensuses(void) { /* Have we got enough votes to try? */ int n_votes, n_voters, n_vote_running = 0; smartlist_t *votes = NULL; char *consensus_body = NULL, *signatures = NULL; networkstatus_t *consensus = NULL; authority_cert_t *my_cert; pending_consensus_t pending[N_CONSENSUS_FLAVORS]; ...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
184,704,824,003,412,260,000,000,000,000,000,000,000
163
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
static u64 sched_vslice(struct cfs_rq *cfs_rq, struct sched_entity *se) { return calc_delta_fair(sched_slice(cfs_rq, se), se); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
27,050,689,214,088,570,000,000,000,000,000,000,000
4
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
int imap_continue (const char* msg, const char* resp) { imap_error (msg, resp); return mutt_yesorno (_("Continue?"), 0); }
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
1,449,992,233,888,692,500,000,000,000,000,000,000
5
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
amgtar_backup( application_argument_t *argument) { int dumpin; char *qdisk; char *incrname; char line[32768]; amregex_t *rp; off_t dump_size = -1; char *type; char startchr; int dataf = 1; int mesgf = 3; int ind...
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
3,823,477,590,329,977,000,000,000,000,000,000,000
199
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
static int rdmsr_interception(struct vcpu_svm *svm) { u32 ecx = kvm_register_read(&svm->vcpu, VCPU_REGS_RCX); struct msr_data msr_info; msr_info.index = ecx; msr_info.host_initiated = false; if (svm_get_msr(&svm->vcpu, &msr_info)) { trace_kvm_msr_read_ex(ecx); kvm_inject_gp(&svm->vcpu, 0); } else { trace_k...
0
[ "CWE-200", "CWE-399" ]
linux
cbdb967af3d54993f5814f1cee0ed311a055377d
83,121,842,807,741,250,000,000,000,000,000,000,000
22
KVM: svm: unconditionally intercept #DB This is needed to avoid the possibility that the guest triggers an infinite stream of #DB exceptions (CVE-2015-8104). VMX is not affected: because it does not save DR6 in the VMCS, it already intercepts #DB unconditionally. Reported-by: Jan Beulich <jbeulich@suse.com> Cc: stab...
static inline bool ipv4_datagram_support_addr(struct sock_exterr_skb *serr) { return serr->ee.ee_origin == SO_EE_ORIGIN_ICMP || serr->ee.ee_origin == SO_EE_ORIGIN_LOCAL || serr->port; }
0
[ "CWE-476", "CWE-284" ]
linux
34b2cef20f19c87999fff3da4071e66937db9644
310,559,473,028,588,760,000,000,000,000,000,000,000
5
ipv4: keep skb->dst around in presence of IP options Andrey Konovalov got crashes in __ip_options_echo() when a NULL skb->dst is accessed. ipv4_pktinfo_prepare() should not drop the dst if (evil) IP options are present. We could refine the test to the presence of ts_needtime or srr, but IP options are not often used...
TPMU_SCHEME_KEYEDHASH_Marshal(TPMU_SCHEME_KEYEDHASH *source, BYTE **buffer, INT32 *size, UINT32 selector) { UINT16 written = 0; switch (selector) { #if ALG_HMAC case TPM_ALG_HMAC: written += TPMS_SCHEME_HMAC_Marshal(&source->hmac, buffer, size); break; #endif #if ALG_XOR case TPM_ALG_XOR: writte...
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
76,159,901,583,753,630,000,000,000,000,000,000,000
22
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior) { char *word; char *begin = *ptr, *end; timelib_sll value = 0; const timelib_lookup_table *tp; while ((**ptr >= 'A' && **ptr <= 'Z') || (**ptr >= 'a' && **ptr <= 'z')) { ++*ptr; } end = *ptr; word = timelib_calloc(1, end - begin + 1)...
0
[ "CWE-125" ]
php-src
5c0455bf2c8cd3c25401407f158e820aa3b239e1
143,144,770,598,674,130,000,000,000,000,000,000,000
24
Merge branch 'PHP-7.0' into PHP-7.1 * PHP-7.0: Fixed bug #75055 Out-Of-Bounds Read in timelib_meridian() Apply upstream patch for CVE-2016-1283
smtp_server_connection_update_stats(struct smtp_server_connection *conn) { if (conn->conn.input != NULL) conn->stats.input = conn->conn.input->v_offset; if (conn->conn.output != NULL) conn->stats.output = conn->conn.output->offset; }
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
154,233,906,621,496,100,000,000,000,000,000,000,000
7
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
extractContigSamples32bits (uint8 *in, uint8 *out, uint32 cols, tsample_t sample, uint16 spp, uint16 bps, tsample_t count, uint32 start, uint32 end) { int ready_bits = 0, sindex = 0 /*, shift_width = 0 */; uint32 col, src_byte, src_bit, bit_offset; uint32 longbuff1 = 0, l...
0
[ "CWE-125" ]
libtiff
21d39de1002a5e69caa0574b2cc05d795d6fbfad
240,995,624,516,210,800,000,000,000,000,000,000,000
103
* tools/tiffcrop.c: fix multiple uint32 overflows in writeBufferToSeparateStrips(), writeBufferToContigTiles() and writeBufferToSeparateTiles() that could cause heap buffer overflows. Reported by Henri Salo from Nixu Corporation. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592
snmp_mib_toggle_options_usage(const char *lead, FILE * outf) { fprintf(outf, "%su: %sallow the use of underlines in MIB symbols\n", lead, ((netsnmp_ds_get_boolean(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_MIB_PARSE_LABEL)) ? "dis" : "")); fprintf(outf, "%sc: %sallow the use of \"--\" to t...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
71,125,175,980,074,360,000,000,000,000,000,000,000
25
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
TEE_Result syscall_asymm_operate(unsigned long state, const struct utee_attribute *usr_params, size_t num_params, const void *src_data, size_t src_len, void *dst_data, uint64_t *dst_len) { TEE_Result res; struct tee_cryp_state *cs; struct tee_ta_session *sess; size_t dlen; struct tee_obj *o; void *label ...
0
[ "CWE-327" ]
optee_os
34a08bec755670ea0490cb53bbc68058cafc69b6
16,485,173,157,547,418,000,000,000,000,000,000,000
168
cryp: prevent direct calls to update and final functions With inconsistent or malformed data it has been possible to call "update" and "final" crypto functions directly. Using a fuzzer tool [1] we have seen that this results in asserts, i.e., a crash that potentially could leak sensitive information. By setting the s...
ossl_cipher_new(const EVP_CIPHER *cipher) { VALUE ret; EVP_CIPHER_CTX *ctx; ret = ossl_cipher_alloc(cCipher); AllocCipher(ret, ctx); if (EVP_CipherInit_ex(ctx, cipher, NULL, NULL, NULL, -1) != 1) ossl_raise(eCipherError, NULL); return ret; }
0
[ "CWE-326", "CWE-310", "CWE-703" ]
openssl
8108e0a6db133f3375608303fdd2083eb5115062
24,802,088,131,150,927,000,000,000,000,000,000,000
12
cipher: don't set dummy encryption key in Cipher#initialize Remove the encryption key initialization from Cipher#initialize. This is effectively a revert of r32723 ("Avoid possible SEGV from AES encryption/decryption", 2011-07-28). r32723, which added the key initialization, was a workaround for Ruby Bug #2768. For s...
static int nf_tables_fill_set(struct sk_buff *skb, const struct nft_ctx *ctx, const struct nft_set *set, u16 event, u16 flags) { struct nlmsghdr *nlh; u32 portid = ctx->portid; struct nlattr *nest; u32 seq = ctx->seq; int i; event = nfnl_msg_type(NFNL_SUBSYS_NFTABLES, event); nlh = nfnl_msg_put(skb, po...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
174,518,840,565,062,150,000,000,000,000,000,000,000
97
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static void tipc_node_link_up(struct tipc_node *n, int bearer_id, struct sk_buff_head *xmitq) { struct tipc_media_addr *maddr; tipc_node_write_lock(n); __tipc_node_link_up(n, bearer_id, xmitq); maddr = &n->links[bearer_id].maddr; tipc_bearer_xmit(n->net, bearer_id, xmitq, maddr, n); tipc_node_write_unlo...
0
[]
linux
0217ed2848e8538bcf9172d97ed2eeb4a26041bb
169,487,623,186,715,100,000,000,000,000,000,000,000
11
tipc: better validate user input in tipc_nl_retrieve_key() Before calling tipc_aead_key_size(ptr), we need to ensure we have enough data to dereference ptr->keylen. We probably also want to make sure tipc_aead_key_size() wont overflow with malicious ptr->keylen values. Syzbot reported: BUG: KMSAN: uninit-value in _...
give_warning(char_u *message, int hl) { give_warning_with_source(message, hl, FALSE); }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
312,868,246,974,370,850,000,000,000,000,000,000,000
4
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
size_t rand_acquire_entropy_from_cpu(RAND_POOL *pool) { size_t bytes_needed; unsigned char *buffer; bytes_needed = rand_pool_bytes_needed(pool, 1 /*entropy_factor*/); if (bytes_needed > 0) { buffer = rand_pool_add_begin(pool, bytes_needed); if (buffer != NULL) { /* Whicheve...
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
101,667,150,784,577,300,000,000,000,000,000,000,000
29
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
virSecuritySELinuxTransactionRun(pid_t pid G_GNUC_UNUSED, void *opaque) { virSecuritySELinuxContextList *list = opaque; virSecurityManagerMetadataLockState *state; const char **paths = NULL; size_t npaths = 0; size_t i; int rv; int ret = -1; if (list->lo...
0
[ "CWE-732" ]
libvirt
15073504dbb624d3f6c911e85557019d3620fdb2
266,901,812,410,940,630,000,000,000,000,000,000,000
84
security: fix SELinux label generation logic A process can access a file if the set of MCS categories for the file is equal-to *or* a subset-of, the set of MCS categories for the process. If there are two VMs: a) svirt_t:s0:c117 b) svirt_t:s0:c117,c720 Then VM (b) is able to access files labelled for VM (a). I...
ecma_new_ecma_string_from_number (ecma_number_t num) /**< ecma-number */ { uint32_t uint32_num = ecma_number_to_uint32 (num); if (num == ((ecma_number_t) uint32_num)) { return ecma_new_ecma_string_from_uint32 (uint32_num); } if (ecma_number_is_nan (num)) { return ecma_get_magic_string (LIT_MAGIC_ST...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
263,256,906,076,283,500,000,000,000,000,000,000,000
39
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
static void cmd_window_balance(void) { GSList *sorted, *stmp, *line, *ltmp; int avail_size, unit_size, bigger_units; int windows, last_line, old_size; MAIN_WINDOW_REC *win; windows = g_slist_length(mainwindows); if (windows == 1) return; sorted = NULL; windows = 0; for (win = mainwindows_find_lower(NULL); ...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
49,292,480,111,028,910,000,000,000,000,000,000,000
53
check the error condition of mainwindow_create
static void ssl_write_renegotiation_ext( mbedtls_ssl_context *ssl, unsigned char *buf, size_t *olen ) { unsigned char *p = buf; if( ssl->secure_renegotiation != MBEDTLS_SSL_SECURE_RENEGOTIATION ) { *olen = 0; ...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
173,272,973,176,242,860,000,000,000,000,000,000,000
39
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
void opendata(void) { struct sockaddr_storage dataconn; /* his data connection endpoint */ int fd; socklen_t socksize; if (xferfd != -1) { closedata(); } if (datafd == -1) { addreply_noformat(425, MSG_NO_DATA_CONN); return; } if (passive != 0) { struct...
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
207,615,657,775,896,630,000,000,000,000,000,000,000
115
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
template<typename tc> CImg<T>& draw_text(const int x0, const int y0, const char *const text, const tc *const foreground_color, const int background_color=0, const float opacity=1, const unsigned int font_height=13, ...) { if (!font_heigh...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
276,765,442,082,701,650,000,000,000,000,000,000,000
11
Fix other issues in 'CImg<T>::load_bmp()'.
static void merge_param(HashTable *params, zval *zdata, zval ***current_param, zval ***current_args TSRMLS_DC) { zval **ptr, **zdata_ptr; php_http_array_hashkey_t hkey = php_http_array_hashkey_init(0); #if 0 { zval tmp; INIT_PZVAL_ARRAY(&tmp, params); fprintf(stderr, "params = "); zend_print_zval_r(&tmp, 1 ...
1
[ "CWE-399", "CWE-704" ]
ext-http
17137d4ab1ce81a2cee0fae842340a344ef3da83
158,428,944,693,412,230,000,000,000,000,000,000,000
113
fix bug #73055
memParseTest(const char *filename, const char *result, const char *err ATTRIBUTE_UNUSED, int options ATTRIBUTE_UNUSED) { xmlDocPtr doc; const char *base; int size, res; nb_tests++; /* * load and parse the memory */ if (loadMem(filename, &base, &size) != 0) { ...
0
[ "CWE-125" ]
libxml2
a820dbeac29d330bae4be05d9ecd939ad6b4aa33
138,757,547,295,789,060,000,000,000,000,000,000,000
33
Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.s...
on_session_conversation_started (GdmSession *session, const char *service_name, GdmManager *manager) { GdmDisplay *display; gboolean enabled; char *username; g_debug ("GdmManager: session conversation started for...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
172,613,740,901,247,500,000,000,000,000,000,000,000
39
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
MagickPrivate XFontStruct *XBestFont(Display *display, const XResourceInfo *resource_info,const MagickBooleanType text_font) { static const char *Fonts[]= { "-*-helvetica-medium-r-normal--12-*-*-*-*-*-iso8859-1", "-*-arial-medium-r-normal--12-*-*-*-*-*-iso8859-1", "-*-helvetica-medium-r-no...
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
285,938,814,465,001,500,000,000,000,000,000,000,000
80
https://github.com/ImageMagick/ImageMagick/issues/1531
list_update_cgroup_event(struct perf_event *event, struct perf_event_context *ctx, bool add) { }
0
[ "CWE-362", "CWE-125" ]
linux
321027c1fe77f892f4ea07846aeae08cefbbb290
332,816,634,482,542,660,000,000,000,000,000,000,000
4
perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race Di Shen reported a race between two concurrent sys_perf_event_open() calls where both try and move the same pre-existing software group into a hardware context. The problem is exactly that described in commit: f63a8daa5812 ("perf: Fix event->ctx...
qemuProcessHandleBlockThreshold(qemuMonitorPtr mon G_GNUC_UNUSED, virDomainObjPtr vm, const char *nodename, unsigned long long threshold, unsigned long long excess, ...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
213,443,151,971,118,800,000,000,000,000,000,000,000
48
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
static int xmlXPathNodeCollectAndTest(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, xmlNodePtr * first, xmlNodePtr * last, int toBool) { #define XP_TEST_HIT \ if (hasAxisRange != 0) { \ if (++pos == maxPos) { \ if (addNode(seq, cur) < 0) \ ctxt->error =...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
119,078,397,589,338,640,000,000,000,000,000,000,000
640
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void run() { validate(); #ifdef CROW_ENABLE_SSL if (ssl_used_) { ssl_server_ = std::move(std::unique_ptr<ssl_server_t>(new ssl_server_t(this, bindaddr_, port_, server_name_, &middlewares_, concurrency_, timeout_, &ssl_context_))); ssl...
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
48,960,376,798,120,980,000,000,000,000,000,000,000
31
Prevent HTTP pipelining which Crow doesn't support.
png_write_chunk(png_structrp png_ptr, png_const_bytep chunk_string, png_const_bytep data, png_size_t length) { png_write_complete_chunk(png_ptr, PNG_CHUNK_FROM_STRING(chunk_string), data, length); }
0
[ "CWE-120" ]
libpng
81f44665cce4cb1373f049a76f3904e981b7a766
55,949,824,215,475,525,000,000,000,000,000,000,000
6
[libpng16] Reject attempt to write over-length PLTE chunk
static char *quote_for_like(const char *name, char *buff) { char *to= buff; *to++= '\''; while (*name) { if (*name == '\\') { *to++='\\'; *to++='\\'; *to++='\\'; } else if (*name == '\'' || *name == '_' || *name == '%') *to++= '\\'; *to++= *name++; } to[0]= '\'';...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
71,996,453,151,094,080,000,000,000,000,000,000,000
20
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...
replace_substring_in_place(PyStringObject *self, const char *from_s, Py_ssize_t from_len, const char *to_s, Py_ssize_t to_len, Py_ssize_t maxcount) { char *result_s, *start, *end; char *self_s; Py_ssize_t self_len, offset; ...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
154,410,458,536,966,230,000,000,000,000,000,000,000
48
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
xmlHashScan3(xmlHashTablePtr table, const xmlChar *name, const xmlChar *name2, const xmlChar *name3, xmlHashScanner f, void *data) { xmlHashScanFull3 (table, name, name2, name3, (xmlHashScannerFull) f, data); }
0
[ "CWE-399" ]
libxml2
8973d58b7498fa5100a876815476b81fd1a2412a
212,288,428,734,919,830,000,000,000,000,000,000,000
6
Add hash randomization to hash and dict structures Following http://www.ocert.org/advisories/ocert-2011-003.html it seems that having hash randomization might be a good idea when using XML with untrusted data * configure.in: lookup for rand, srand and time * dict.c: add randomization to dictionaries hash tables * hash...
epo_handle_erase_page(gx_device *dev) { erasepage_subclass_data *data = (erasepage_subclass_data *)dev->subclass_data; int code = 0; if (gs_debug_c(gs_debug_flag_epo_install_only)) { gx_device_unsubclass(dev); DPRINTF1(dev->memory, "Uninstall erasepage, device=%s\n", dev->dname); ...
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
40,114,177,676,340,770,000,000,000,000,000,000,000
26
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
int ldb_comparison_fold(struct ldb_context *ldb, void *mem_ctx, const struct ldb_val *v1, const struct ldb_val *v2) { const char *s1=(const char *)v1->data, *s2=(const char *)v2->data; size_t n1 = v1->length, n2 = v2->length; char *b1, *b2; const char *u1, *u2; int ret; while (n1 && *s1 == ' ') { s1++; ...
0
[ "CWE-787" ]
samba
fab6b79b7724f0b636963be528483e3e946884aa
136,942,905,862,098,320,000,000,000,000,000,000,000
93
CVE-2021-20277 ldb/attrib_handlers casefold: stay in bounds For a string that had N spaces at the beginning, we would try to move N bytes beyond the end of the string. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14655 Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <...
testMalformedImages (const std::string&) { try { // id:000012,sig:11,src:000328+001154,op:splice,rep:16 readImage (ILM_IMF_TEST_IMAGEDIR "comp_short_decode_piz.exr"); cerr << "Malformed Images : InputFile : incorrect input file passed\n"; assert (false); } catch (const IEX_NAMESPACE::BaseExc &e) { // exp...
0
[ "CWE-284" ]
openexr
49db4a4192482eec9c27669f75db144cf5434804
80,488,442,511,938,430,000,000,000,000,000,000,000
57
Add additional input validation in an attempt to resolve issue #232
static void TIFFGetProfiles(TIFF *tiff,Image *image,ExceptionInfo *exception) { uint32 length; unsigned char *profile; length=0; #if defined(TIFFTAG_ICCPROFILE) if ((TIFFGetField(tiff,TIFFTAG_ICCPROFILE,&length,&profile) == 1) && (profile != (unsigned char *) NULL)) (void) ReadProfile(image,...
0
[ "CWE-125" ]
ImageMagick
986b5dff173413fa712db27eb677cdef15f0bab6
312,204,182,050,437,970,000,000,000,000,000,000,000
56
https://github.com/ImageMagick/ImageMagick/issues/1748
PackLinuxElf64::PackLinuxElf64help1(InputFile *f) { e_type = get_te16(&ehdri.e_type); e_phnum = get_te16(&ehdri.e_phnum); e_shnum = get_te16(&ehdri.e_shnum); unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); if (ehdri.e_ident[Elf64_Ehdr::EI_CLASS]!=Elf64_Ehdr::ELFCLASS64 || sizeof(Elf6...
0
[]
upx
77c914bce58aab9459029bed699f2bfb7ff2f90f
269,356,189,626,391,760,000,000,000,000,000,000,000
85
Check de-compressed SHT_SYMTAB https://github.com/upx/upx/issues/396 modified: p_lx_elf.cpp
TEST(MatchHeadersTest, MayMatchOneOrMoreRequestHeader) { TestRequestHeaderMapImpl headers{{"some-header", "a"}, {"other-header", "b"}}; const std::string yaml = R"EOF( name: match-header regex_match: (a|b) )EOF"; std::vector<HeaderUtility::HeaderDataPtr> header_data; header_data.push_back( std::make_u...
1
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
267,754,958,994,510,840,000,000,000,000,000,000,000
18
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
void CLASS Canon_WBCTpresets(short WBCTversion) { int i; float norm; if (WBCTversion == 0) { // tint, as shot R, as shot B, CСT for (i = 0; i < 15; i++) { imgdata.color.WBCT_Coeffs[i][2] = imgdata.color.WBCT_Coeffs[i][4] = 1.0f; fseek(ifp, 2, SEEK_CUR); imgdata.color.WBCT_Coeffs[i]...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
188,586,124,044,978,520,000,000,000,000,000,000,000
48
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
bool is_some_bigint() const { return type_handler() == &type_handler_longlong || type_handler() == &type_handler_vers_trx_id; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
108,857,941,850,891,300,000,000,000,000,000,000,000
5
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
UTFstring::UTFstring(const UTFstring & _aBuf) :_Length(0) ,_Data(NULL) { *this = _aBuf.c_str(); }
0
[ "CWE-200", "CWE-703" ]
libebml
ababb64e0c792ad2a314245233db0833ba12036b
6,320,057,229,261,896,000,000,000,000,000,000,000
6
EbmlUnicodeString: don't read beyond end of string The conversion from an UTF-8 encoded string into a wchar_t one was reading from beyond the end of the source buffer if the length indicated by a UTF-8 character's first byte exceeds the number of bytes actually present afterwards. Fixes the issue reported as Cisco TA...
bool append_body(JSContext *cx, HandleObject self, HandleObject source) { MOZ_ASSERT(!body_used(source)); BodyHandle source_body = body_handle(source); BodyHandle dest_body = body_handle(self); return HANDLE_RESULT(cx, xqd_body_append(dest_body, source_body)); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
242,559,040,454,150,600,000,000,000,000,000,000,000
6
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
self_t& tick(Duration d, Func f) { tick_interval_ = std::chrono::duration_cast<std::chrono::milliseconds>(d); tick_function_ = f; return *this; }
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
228,856,366,040,217,420,000,000,000,000,000,000,000
6
Prevent HTTP pipelining which Crow doesn't support.
TEST_F(RouterTest, DirectResponseWithBody) { NiceMock<MockDirectResponseEntry> direct_response; std::string route_name("route-test-name"); EXPECT_CALL(direct_response, routeName()).WillOnce(ReturnRef(route_name)); EXPECT_CALL(direct_response, responseCode()).WillRepeatedly(Return(Http::Code::OK)); const std::...
0
[ "CWE-703" ]
envoy
f0bb2219112d8cdb4c4e8b346834f962925362ca
133,472,948,290,383,770,000,000,000,000,000,000,000
24
[1.20] CVE-2022-21655 Crash with direct_response Signed-off-by: Otto van der Schaaf <ovanders@redhat.com>
SPL_METHOD(Array, offsetUnset) { zval *index; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &index) == FAILURE) { return; } spl_array_unset_dimension_ex(0, getThis(), index TSRMLS_CC); } /* }}} */
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
233,305,229,262,189,430,000,000,000,000,000,000,000
8
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
QPDFObjectHandle::newFromRectangle(Rectangle const& rect) { return newArray(rect); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
139,055,899,797,925,140,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 ...
void Item_trigger_field::print(String *str, enum_query_type query_type) { str->append((row_version == NEW_ROW) ? "NEW" : "OLD", 3); str->append('.'); str->append(field_name); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
174,208,047,748,414,870,000,000,000,000,000,000,000
6
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
const cmsDICTentry* CMSEXPORT cmsDictNextEntry(const cmsDICTentry* e) { if (e == NULL) return NULL; return e ->Next; }
0
[]
Little-CMS
886e2f524268efe8a1c3aa838c28e446fda24486
280,166,192,618,055,600,000,000,000,000,000,000,000
5
Fixes from coverity check
njs_value_function(const njs_value_t *value) { return njs_function(value); }
0
[]
njs
6549d49630ce5f5ac823fd3ae0c6c8558b8716ae
14,745,694,027,933,536,000,000,000,000,000,000,000
4
Fixed redefinition of special props in Object.defineProperty(). Previously, when NJS_PROPERTY_HANDLER property was updated it might be left in inconsistent state. Namely, prop->type was left unchanged, but prop->value did not have an expected property handler. As a result consecutive reference to the property may re...
Status UnsortedSegmentReductionShapeFn(InferenceContext* c) { ShapeHandle s_data = c->input(0); ShapeHandle s_segment_ids = c->input(1); ShapeHandle s_num_segments = c->input(2); TF_RETURN_IF_ERROR(c->WithRank(s_num_segments, 0, &s_num_segments)); ShapeHandle out; // Leading dimensions of data must be com...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
285,873,616,750,546,500,000,000,000,000,000,000,000
30
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
int lh_ptr_equal(const void *k1, const void *k2) { return (k1 == k2); }
0
[ "CWE-119", "CWE-310" ]
json-c
64e36901a0614bf64a19bc3396469c66dcd0b015
137,232,553,442,854,720,000,000,000,000,000,000,000
4
Patch to address the following issues: * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
Status SQLiteSQLPlugin::getQueryTables(const std::string& query, std::vector<std::string>& tables) const { auto dbc = SQLiteDBManager::get(); QueryPlanner planner(query, dbc); tables = planner.tables(); return Status(0); }
0
[ "CWE-77", "CWE-295" ]
osquery
c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c
266,570,447,034,043,930,000,000,000,000,000,000,000
7
Merge pull request from GHSA-4g56-2482-x7q8 * Proposed fix for attach tables vulnerability * Add authorizer to ATC tables and cleanups - Add unit test for authorizer function
load_image (const gchar *filename, GError **error) { FILE *f; struct stat st; char buf[32]; PSPimage ia; guint32 block_init_len, block_total_len; long block_start; PSPBlockID id = -1; gint block_number; gint32 image_ID = -1; if (g_stat (filename, &st) == -1) return -1; f =...
0
[ "CWE-125" ]
gimp
eb2980683e6472aff35a3117587c4f814515c74d
296,468,771,333,198,950,000,000,000,000,000,000,000
201
Bug 790853 - (CVE-2017-17787) heap overread in psp importer. As any external data, we have to check that strings being read at fixed length are properly nul-terminated.
int nghttp2_check_header_value(const uint8_t *value, size_t len) { const uint8_t *last; for (last = value + len; value != last; ++value) { if (!VALID_HD_VALUE_CHARS[*value]) { return 0; } } return 1; }
0
[ "CWE-707" ]
nghttp2
336a98feb0d56b9ac54e12736b18785c27f75090
164,892,686,299,354,280,000,000,000,000,000,000,000
9
Implement max settings option
DnsImplTest() : api_(Api::createApiForTest()), dispatcher_(api_->allocateDispatcher("test_thread")) {}
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
226,416,389,417,745,370,000,000,000,000,000,000,000
2
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
static cJSON_bool print_string(const cJSON * const item, printbuffer * const p) { return print_string_ptr((unsigned char*)item->valuestring, p); }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
31,576,634,042,657,572,000,000,000,000,000,000,000
4
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
static int show_numa_map(struct seq_file *m, void *v, int is_pid) { struct numa_maps_private *numa_priv = m->private; struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; struct file *file = vma->vm_file; struct mm_struct *mm = vma->vm...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
338,735,282,049,387,300,000,000,000,000,000,000,000
83
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static uint32_t rtl8139_io_readb(void *opaque, uint8_t addr) { RTL8139State *s = opaque; int ret; switch (addr) { case MAC0 ... MAC0+5: ret = s->phys[addr - MAC0]; break; case MAC0+6 ... MAC0+7: ret = 0; break; case MAR0 ... MAR0+7...
0
[ "CWE-835" ]
qemu
5311fb805a4403bba024e83886fa0e7572265de4
32,038,598,631,736,480,000,000,000,000,000,000,000
76
rtl8139: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Buglink: https://bugs.launchpad.net/qemu/+bug/1910826...
fill_reduces_to_source (cairo_operator_t op, const cairo_color_t *color, const cairo_image_surface_t *dst, uint32_t *pixel) { if (__fill_reduces_to_source (op, color, dst)) { return color_to_pixel (color, dst->pixman_format, pixel); } return FALSE; }
0
[]
cairo
03a820b173ed1fdef6ff14b4468f5dbc02ff59be
220,753,892,623,488,100,000,000,000,000,000,000,000
11
Fix mask usage in image-compositor
int propfind_getlength(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr prop __attribute__((unused)), xmlNodePtr resp __attribute__((unused)), struct propstat propstat[], void *rock ...
0
[]
cyrus-imapd
6703ff881b6056e0c045a7b795ce8ba1bbb87027
90,085,209,195,467,850,000,000,000,000,000,000,000
19
http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication
void set_current_connection(struct st_connection *con) { cur_con= con; /* Update $mysql_get_server_version to that of current connection */ var_set_int("$mysql_get_server_version", mysql_get_server_version(con->mysql)); /* Update $CURRENT_CONNECTION to the name of the current connection */ var_s...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
184,264,528,361,991,300,000,000,000,000,000,000,000
9
mysqltest: don't eat new lines in --exec pass them through as is
void *image_get_host_blob(void) { return host_blob; }
0
[]
u-boot
6f3c2d8aa5e6cbd80b5e869bbbddecb66c329d01
198,483,209,998,774,930,000,000,000,000,000,000,000
4
image: Add an option to do a full check of the FIT Some strange modifications of the FIT can introduce security risks. Add an option to check it thoroughly, using libfdt's fdt_check_full() function. Enable this by default if signature verification is enabled. CVE-2021-27097 Signed-off-by: Simon Glass <sjg@chromium....
void user_shm_unlock(size_t size, struct user_struct *user) { spin_lock(&shmlock_user_lock); user->locked_shm -= (size + PAGE_SIZE - 1) >> PAGE_SHIFT; spin_unlock(&shmlock_user_lock); free_uid(user); }
0
[ "CWE-20" ]
linux
70feee0e1ef331b22cc51f383d532a0d043fbdcc
88,992,982,321,885,730,000,000,000,000,000,000,000
7
mlock: fix mlock count can not decrease in race condition Kefeng reported that when running the follow test, the mlock count in meminfo will increase permanently: [1] testcase linux:~ # cat test_mlockal grep Mlocked /proc/meminfo for j in `seq 0 10` do for i in `seq 4 15` do ./p_mlockall >> log & done...
cmsToneCurve* CMSEXPORT cmsBuildTabulatedToneCurveFloat(cmsContext ContextID, cmsUInt32Number nEntries, const cmsFloat32Number values[]) { cmsCurveSegment Seg[3]; // A segmented tone curve should have function segments in the first and last positions // Initialize segmented curve part up to 0 to constant v...
0
[]
Little-CMS
9cf2d61867375f867e6e80906a571d222bc2cbf3
13,350,103,981,460,827,000,000,000,000,000,000,000
38
Memory squeezing fix: LCMS2: AllocateToneCurveStruct Simply add an extra check on the last allocation to avoid returning a partially built struct.
static void openssl_thread_setup(void) { int i; /* Somebody else already setup threading for OpenSSL, * don't do it twice to avoid possible races. */ if (CRYPTO_get_locking_callback() != NULL) { red_dump_openssl_errors(); return; } lock_cs = (pthread_mutex_t*) OPENSSL_mal...
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
155,385,456,610,616,160,000,000,000,000,000,000,000
21
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
set_rgbk_color_procs(gx_device * pdev, dev_t_proc_encode_color((*encode_color), gx_device), dev_t_proc_decode_color((*decode_color), gx_device)) { set_color_procs(pdev, encode_color, decode_color, gx_default_DevRGBK_get_color_mapping_procs, gx_default_DevRGBK_get_color_comp_index, ...
0
[]
ghostpdl
1ef5f08f2c2e27efa978f0010669ff22355c385f
321,019,686,431,964,100,000,000,000,000,000,000,000
9
Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829 The ICC profile checking needs to be told that the device supports_devn, so add a spec_op proc to return true when in separation mode, and add a proc for fill_rectangle_hl_color so that fillpage will work in Separation mode. This was fixed...
_gsasl_gssapi_server_step (Gsasl_session * sctx, void *mech_data, const char *input, size_t input_len, char **output, size_t *output_len) { _Gsasl_gssapi_server_state *state = mech_data; gss_buffer_desc bufdesc1, bufdesc2; OM_uint32 maj_stat, min_stat; gss_buffer_desc client_name; gss_OID me...
0
[ "CWE-125" ]
gsasl
796e4197f696261c1f872d7576371232330bcc30
134,044,831,326,523,140,000,000,000,000,000,000,000
196
GSSAPI server: Boundary check gss_wrap token (read OOB).
ss_apply_all_case_fold(OnigCaseFoldType flag ARG_UNUSED, OnigApplyAllCaseFoldFunc f, void* arg) { static OnigCodePoint ss[] = { 0x73, 0x73 }; return (*f)((OnigCodePoint )0xdf, ss, 2, arg); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
329,192,558,082,847,350,000,000,000,000,000,000,000
7
onig-5.9.2
static int __init genl_init(void) { int err; err = genl_register_family(&genl_ctrl); if (err < 0) goto problem; err = register_pernet_subsys(&genl_pernet_ops); if (err) goto problem; return 0; problem: panic("GENL: Cannot register controller: %d\n", err); }
0
[ "CWE-399", "CWE-401" ]
linux
ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2
167,906,532,045,009,400,000,000,000,000,000,000,000
17
genetlink: Fix a memory leak on error path In genl_register_family(), when idr_alloc() fails, we forget to free the memory we possibly allocate for family->attrbuf. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") Signed-off-by: YueHaibing <yuehaibing@huawei.com...
int xenvif_schedulable(struct xenvif *vif) { return netif_running(vif->dev) && netif_carrier_ok(vif->dev); }
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
217,891,997,997,907,140,000,000,000,000,000,000,000
4
xen-netback: disable rogue vif in kthread context When netback discovers frontend is sending malformed packet it will disables the interface which serves that frontend. However disabling a network interface involving taking a mutex which cannot be done in softirq context, so we need to defer this process to kthread c...
nfsd4_decode_getdeviceinfo(struct nfsd4_compoundargs *argp, struct nfsd4_getdeviceinfo *gdev) { DECODE_HEAD; u32 num, i; READ_BUF(sizeof(struct nfsd4_deviceid) + 3 * 4); COPYMEM(&gdev->gd_devid, sizeof(struct nfsd4_deviceid)); gdev->gd_layout_type = be32_to_cpup(p++); gdev->gd_maxcount = be32_to_cpup(p++); nu...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
116,767,007,826,216,630,000,000,000,000,000,000,000
23
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
bool FromkLinuxRusage(const struct klinux_rusage *input, struct rusage *output) { if (!input || !output) { return false; } if (!FromkLinuxtimeval(&input->ru_stime, &output->ru_stime) || !FromkLinuxtimeval(&input->ru_utime, &output->ru_utime)) { return false; } return true; ...
0
[ "CWE-787" ]
asylo
bda9772e7872b0d2b9bee32930cf7a4983837b39
90,127,330,183,746,950,000,000,000,000,000,000,000
11
Check input length in FromLinuxSockAddr PiperOrigin-RevId: 333785506 Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9
static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) { unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); tmp += ((unsigned long)dentry / L1_CACHE_BYTES); tmp = tmp + (tmp >> hash_bits); return tmp & hash_mask; }
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
67,775,449,670,475,970,000,000,000,000,000,000,000
7
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
static int hugetlbfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) { struct inode *inode; int error = -ENOSPC; inode = hugetlbfs_get_inode(dir->i_sb, dir, S_IFLNK|S_IRWXUGO, 0); if (inode) { int l = strlen(symname)+1; error = page_symlink(inode, symname, l); if (!error) { d_ins...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
95,296,737,803,637,470,000,000,000,000,000,000,000
20
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void i40e_undo_del_filter_entries(struct i40e_vsi *vsi, struct hlist_head *from) { struct i40e_mac_filter *f; struct hlist_node *h; hlist_for_each_entry_safe(f, h, from, hlist) { u64 key = i40e_addr_to_hkey(f->macaddr); /* Move the element back into MAC filter list*/ hlist_del(&f->hlist); hash...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
18,810,847,293,149,922,000,000,000,000,000,000,000
14
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 AVI_set_audio_bitrate(avi_t *AVI, int bitrate) { if(AVI->mode==AVI_MODE_READ) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } AVI->track[AVI->aptr].mp3rate = bitrate; return 0; }
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
2,265,448,238,105,631,800,000,000,000,000,000,000
10
fixed #2159
set_fflags(struct archive_write_disk *a) { struct fixup_entry *le; unsigned long set, clear; int r; mode_t mode = archive_entry_mode(a->entry); /* * Make 'critical_flags' hold all file flags that can't be * immediately restored. For example, on BSD systems, * SF_IMMUTABLE prevents hardlinks from being cre...
1
[ "CWE-59" ]
libarchive
ede459d2ebb879f5eedb6f7abea203be0b334230
11,449,916,282,346,800,000,000,000,000,000,000,000
74
archive_write_disk_posix: fix writing fflags broken in 8a1bd5c The fixup list was erroneously assumed to be directories only. Only in the case of critical file flags modification (e.g. SF_IMMUTABLE on BSD systems), other file types (e.g. regular files or symbolic links) may be added to the fixup list. We still need to...
static inline void io_put_req_deferred(struct io_kiocb *req, int refs) { if (refcount_sub_and_test(refs, &req->refs)) io_free_req_deferred(req); }
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
197,747,899,425,158,320,000,000,000,000,000,000,000
5
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
ex_buffer(exarg_T *eap) { if (*eap->arg) eap->errmsg = e_trailing; else { if (eap->addr_count == 0) /* default is current buffer */ goto_buffer(eap, DOBUF_CURRENT, FORWARD, 0); else goto_buffer(eap, DOBUF_FIRST, FORWARD, (int)eap->line2); if (eap->do_ecmd_cmd != NULL) do_cmdline_cmd(eap->...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
58,515,181,256,738,950,000,000,000,000,000,000,000
14
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
fileHandle_t FS_FOpenFileWrite( const char *filename ) { char *ospath; fileHandle_t f; if ( !fs_searchpaths ) { Com_Error( ERR_FATAL, "Filesystem call made without initialization" ); } f = FS_HandleForFile(); fsh[f].zipFile = qfalse; ospath = FS_BuildOSPath( fs_homepath->string, fs_gamedir, filename ); ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
104,001,215,250,610,830,000,000,000,000,000,000,000
36
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static ssize_t shmem_getxattr(struct dentry *dentry, const char *name, void *buffer, size_t size) { struct shmem_inode_info *info = SHMEM_I(dentry->d_inode); int err; /* * If this is a request for a synthetic attribute in the system.* * namespace use the generic infrastructure to resolve a handler * ...
0
[ "CWE-399" ]
linux
5f00110f7273f9ff04ac69a5f85bb535a4fd0987
152,285,412,415,186,100,000,000,000,000,000,000,000
20
tmpfs: fix use-after-free of mempolicy object The tmpfs remount logic preserves filesystem mempolicy if the mpol=M option is not specified in the remount request. A new policy can be specified if mpol=M is given. Before this patch remounting an mpol bound tmpfs without specifying mpol= mount option in the remount re...
NOEXPORT void outfile_close(void) { if(outfile) { file_close(outfile); outfile=NULL; } }
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
223,916,462,729,407,100,000,000,000,000,000,000,000
6
stunnel-5.57
void activeExpireCycle(void) { int j; for (j = 0; j < server.dbnum; j++) { int expired; redisDb *db = server.db+j; /* Continue to expire if at the end of the cycle more than 25% * of the keys were expired. */ do { long num = dictSize(db->expires); ...
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
301,934,705,093,357,100,000,000,000,000,000,000,000
36
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
inline BOOL IsPathSep(char ch) { return (ch == '\\' || ch == '/'); }
0
[]
perl5
52236464559c6e410a4587d3c6da9639e75f3ec1
35,727,055,673,098,007,000,000,000,000,000,000,000
4
avoid invalid memory access in MapPath[AW] This issue was assigned CVE-2015-8608. [perl #126755]
psf_open_fd (PSF_FILE * pfile) { int fd, oflag, mode ; /* ** Sanity check. If everything is OK, this test and the printfs will ** be optimised out. This is meant to catch the problems caused by ** "sfconfig.h" being included after <stdio.h>. */ if (sizeof (sf_count_t) != 8) { puts ("\n\n*** Fatal error : sizeof...
0
[ "CWE-369", "CWE-189" ]
libsndfile
725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6
275,169,537,759,650,170,000,000,000,000,000,000,000
42
src/file_io.c : Prevent potential divide-by-zero. Closes: https://github.com/erikd/libsndfile/issues/92
void device_unregister(struct device *dev) { pr_debug("device: '%s': %s\n", dev_name(dev), __func__); device_del(dev); put_device(dev); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
313,092,004,295,021,280,000,000,000,000,000,000,000
6
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
SPL_METHOD(SplHeap, key) { spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters_none() == FAILURE) { return; } RETURN_LONG(intern->heap->count - 1); }
0
[]
php-src
1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1
43,840,040,525,447,710,000,000,000,000,000,000,000
10
Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error