func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int jpc_dec_dump(jpc_dec_t *dec, FILE *out) { jpc_dec_tile_t *tile; int tileno; jpc_dec_tcomp_t *tcomp; int compno; jpc_dec_rlvl_t *rlvl; int rlvlno; jpc_dec_band_t *band; int bandno; jpc_dec_prc_t *prc; int prcno; jpc_dec_cblk_t *cblk; int cblkno; for (tileno = 0, tile = dec->tiles; tileno < dec->...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
290,276,313,488,878,200,000,000,000,000,000,000,000
57
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 dns_transaction_request_dnssec_keys(DnsTransaction *t) { DnsResourceRecord *rr; int r; assert(t); /* * Retrieve all auxiliary RRs for the answer we got, so that * we can verify signatures or prove that RRs are rightfully * unsigned. Specifically: ...
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
15,414,369,144,306,601,000,000,000,000,000,000,000
309
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
void SelectFree(TfLiteContext* context, void* buffer) { delete reinterpret_cast<OpData*>(buffer); }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
257,181,074,680,530,550,000,000,000,000,000,000,000
3
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
Opal::Call::DoSetUp (OpalConnection & connection) { OpalCall::OnSetUp (connection); }
0
[]
ekiga
7d09807257963a4f5168a01aec1795a398746372
269,422,248,187,663,540,000,000,000,000,000,000,000
4
Validate UTF-8 strings before showing them Closes bug #653009.
static int add_unformed_module(struct module *mod) { int err; struct module *old; mod->state = MODULE_STATE_UNFORMED; again: mutex_lock(&module_mutex); old = find_module_all(mod->name, strlen(mod->name), true); if (old != NULL) { if (old->state != MODULE_STATE_LIVE) { /* Wait in case it fails to load. */ ...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
143,357,115,918,718,170,000,000,000,000,000,000,000
33
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
static int vmrun_interception(struct vcpu_svm *svm) { if (nested_svm_check_permissions(svm)) return 1; return nested_svm_vmrun(svm); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
20,834,164,584,422,987,000,000,000,000,000,000,000
7
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
void DelChan(const CString& sLine) { const CString sUsername = sLine.Token(1); const CString sNetwork = sLine.Token(2); const CString sChan = sLine.Token(3); if (sChan.empty()) { PutModule(t_s("Usage: DelChan <username> <network> <channel>")); return; ...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
139,211,572,857,389,960,000,000,000,000,000,000,000
40
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static int sctp_setsockopt_fragment_interleave(struct sock *sk, int *val, unsigned int optlen) { if (optlen != sizeof(int)) return -EINVAL; sctp_sk(sk)->frag_interleave = !!*val; if (!sctp_sk(sk)->frag_interleave) sctp_sk(sk)->ep->intl_enable = 0; return 0; }
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
23,424,929,722,019,605,000,000,000,000,000,000,000
13
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
internalSubsetSplit(void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { xmlSchemaSAXPlugPtr ctxt = (xmlSchemaSAXPlugPtr) ctx; if ((ctxt != NULL) && (ctxt->user_sax != NULL) && (ctxt->user_sax->internalSubset != NULL)) ctxt->user_sax->internalSubset(ctxt->user_d...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
48,885,393,362,880,300,000,000,000,000,000,000,000
9
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static void netlink_sock_destruct_work(struct work_struct *work) { struct netlink_sock *nlk = container_of(work, struct netlink_sock, work); sk_free(&nlk->sk); }
0
[ "CWE-200" ]
linux
93c647643b48f0131f02e45da3bd367d80443291
180,290,076,701,341,900,000,000,000,000,000,000,000
7
netlink: Add netns check on taps Currently, a nlmon link inside a child namespace can observe systemwide netlink activity. Filter the traffic so that nlmon can only sniff netlink messages from its own netns. Test case: vpnns -- bash -c "ip link add nlmon0 type nlmon; \ ip link set nlmon0 u...
static int tcm_loop_is_state_remove(struct se_cmd *se_cmd) { /* * Assume struct scsi_cmnd is not in remove state.. */ return 0; }
0
[ "CWE-119", "CWE-787" ]
linux
12f09ccb4612734a53e47ed5302e0479c10a50f8
332,261,043,886,229,530,000,000,000,000,000,000,000
7
loopback: off by one in tcm_loop_make_naa_tpg() This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result in memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
gerbv_gdk_draw_prim22(GdkPixmap *pixmap, GdkGC *gc, double *p, double scale, gint x, gint y) { const int exposure_idx = 0; const int width_idx = 1; const int height_idx = 2; const int x_lower_left_idx = 3; const int y_lower_left_idx = 4; const int rotation_idx = 5; const int nuf_points ...
1
[ "CWE-703" ]
gerbv
b2c2f8da851f2ac8079a91ce9d498d87ff96abcf
9,069,680,128,171,827,000,000,000,000,000,000,000
51
Avoid direct access on array of unknown size Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array.
static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *param, int len) { struct adapter *padapter = rtw_netdev_priv(dev); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int ie_len; DBG_88E("%s, len =%d\n", __func__, len); if (!check_fwstate(pmlmepriv, WIFI_AP_STATE)) return -EINVAL; ...
0
[ "CWE-787" ]
linux
74b6b20df8cfe90ada777d621b54c32e69e27cd7
163,149,216,251,215,880,000,000,000,000,000,000,000
28
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16") Signed-off-by: Dan Carpenter <dan.carpenter@o...
CImg<T> operator>>(const t value) const { return (+*this)>>=value; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
331,750,810,071,845,620,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
LJ_NORET LJ_NOINLINE static void err_argmsg(lua_State *L, int narg, const char *msg) { const char *fname = "?"; const char *ftype = lj_debug_funcname(L, L->base - 1, &fname); if (narg < 0 && narg > LUA_REGISTRYINDEX) narg = (int)(L->top - L->base) + narg + 1; if (ftype && ftype[3] == 'h' && --narg ...
0
[ "CWE-125" ]
LuaJIT
53f82e6e2e858a0a62fd1a2ff47e9866693382e6
327,924,494,174,115,630,000,000,000,000,000,000,000
13
Fix frame traversal for __gc handler frames. Reported by Changochen.
bool Virtual_column_info::cleanup_session_expr() { DBUG_ASSERT(need_refix()); if (expr->walk(&Item::cleanup_excluding_fields_processor, 0, 0)) return true; return false; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
50,598,633,308,172,080,000,000,000,000,000,000,000
7
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...
static int read_sample_rate (WavpackContext *wpc, WavpackMetadata *wpmd) { int bytecnt = wpmd->byte_length; unsigned char *byteptr = wpmd->data; if (bytecnt == 3 || bytecnt == 4) { wpc->config.sample_rate = (int32_t) *byteptr++; wpc->config.sample_rate |= (int32_t) *byteptr++ << 8; ...
0
[ "CWE-125" ]
WavPack
4bc05fc490b66ef2d45b1de26abf1455b486b0dc
166,009,765,249,123,300,000,000,000,000,000,000,000
18
fixes for 4 fuzz failures posted to SourceForge mailing list
void Compute(OpKernelContext* context) override { // Get inputs const Tensor& input_tensor = context->input(0); const auto input_tensor_flat = input_tensor.flat<int32>(); const Tensor& input_splits = context->input(1); const auto input_splits_flat = input_splits.flat<SPLITS_TYPE>(); // Since ...
1
[ "CWE-125", "CWE-787" ]
tensorflow
51300ba1cc2f487aefec6e6631fef03b0e08b298
446,394,916,603,269,000,000,000,000,000,000,000
42
Fix heap buffer overflow in tf.raw_ops.UnicodeEncode. PiperOrigin-RevId: 371717714 Change-Id: If33443b28f158e58078f1268f6b92f2728d219e0
static void bnx2x_setup_ndsb_state_machine(struct hc_status_block_sm *hc_sm, int igu_sb_id, int igu_seg_id) { hc_sm->igu_sb_id = igu_sb_id; hc_sm->igu_seg_id = igu_seg_id; hc_sm->timer_value = 0xFF; hc_sm->time_to_expire = 0xFFFFFFFF; }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
183,808,069,909,317,030,000,000,000,000,000,000,000
8
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
void THD::reset_for_next_command(bool do_clear_error) { THD *thd= this; DBUG_ENTER("THD::reset_for_next_command"); DBUG_ASSERT(!thd->spcont); /* not for substatements of routines */ DBUG_ASSERT(! thd->in_sub_stmt); if (do_clear_error) clear_error(1); thd->free_list= 0; /* We also assign thd->stm...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
316,279,073,250,872,420,000,000,000,000,000,000,000
94
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
static int __dm_pr_register(struct dm_target *ti, struct dm_dev *dev, sector_t start, sector_t len, void *data) { struct dm_pr *pr = data; const struct pr_ops *ops = dev->bdev->bd_disk->fops->pr_ops; if (!ops || !ops->pr_register) return -EOPNOTSUPP; return ops->pr_register(dev->bdev, pr->old_key, pr->new...
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
22,074,734,944,164,280,000,000,000,000,000,000,000
10
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
static void r_bin_dwarf_dump_debug_info(FILE *f, const RBinDwarfDebugInfo *inf) { size_t i, j, k; RBinDwarfDIE *dies; RBinDwarfAttrValue *values; if (!inf || !f) { return; } for (i = 0; i < inf->length; i++) { fprintf (f, " Compilation Unit @ offset 0x%"PFMT64x":\n", inf->comp_units [i].offset); fprintf (...
0
[ "CWE-119", "CWE-125" ]
radare2
d37d2b858ac47f2f108034be0bcecadaddfbc8b3
161,288,643,026,036,630,000,000,000,000,000,000,000
49
Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478)
routerlist_remove_old_cached_routers_with_id(time_t now, time_t cutoff, int lo, int hi, digestset_t *retain) { int i, n = hi-lo+1; unsigned n_extra, n_rmv = 0; struct duration_idx_t *lifespans; uint8_t *rmv, *must_keep; ...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
196,637,331,443,737,100,000,000,000,000,000,000,000
79
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.
int inflate_block(e) int *e; /* last block flag */ /* decompress an inflated block */ { unsigned t; /* block type */ unsigned w; /* current window position */ register ulg b; /* bit buffer */ register unsigned k; /* number of bits in bit buffer */ /* make local bit...
0
[ "CWE-20" ]
gzip
39a362ae9d9b007473381dba5032f4dfc1744cf2
69,768,274,565,004,440,000,000,000,000,000,000,000
45
avoid creating an undersized buffer for the hufts table A malformed input file can cause gzip to crash with a segmentation violation or hang in an endless loop. Reported in <http://bugs.debian.org/507263>. * NEWS (Bug fixes): Mention it.
bool ptrace_may_access(struct task_struct *task, unsigned int mode) { int err; task_lock(task); err = __ptrace_may_access(task, mode); task_unlock(task); return !err; }
0
[ "CWE-284", "CWE-264" ]
linux
d049f74f2dbe71354d43d393ac3a188947811348
210,094,485,859,117,150,000,000,000,000,000,000,000
8
exec/ptrace: fix get_dumpable() incorrect tests The get_dumpable() return value is not boolean. Most users of the function actually want to be testing for non-SUID_DUMP_USER(1) rather than SUID_DUMP_DISABLE(0). The SUID_DUMP_ROOT(2) is also considered a protected state. Almost all places did this correctly, excepti...
R_API int r_bin_file_deref(RBin *bin, RBinFile *a) { RBinObject *o = r_bin_cur_object (bin); int res = false; if (a && !o) { //r_list_delete_data (bin->binfiles, a); res = true; } else if (a && o->referenced - 1 < 1) { //r_list_delete_data (bin->binfiles, a); res = true; // not thread safe } else if (o) ...
0
[ "CWE-125" ]
radare2
3fcf41ed96ffa25b38029449520c8d0a198745f3
85,835,967,797,045,890,000,000,000,000,000,000,000
21
Fix #9902 - Fix oobread in RBin.string_scan_range
bool is_adouble_file(const char *path) { const char *p = NULL; int match; p = strrchr(path, '/'); if (p == NULL) { p = path; } else { p++; } match = strncmp(p, ADOUBLE_NAME_PREFIX, strlen(ADOUBLE_NAME_PREFIX)); if (match != 0) { return false; } return true; }
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
331,837,879,679,802,900,000,000,000,000,000,000,000
20
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static struct kvm *kvm_create_vm(unsigned long type) { int r, i; struct kvm *kvm = kvm_arch_alloc_vm(); if (!kvm) return ERR_PTR(-ENOMEM); spin_lock_init(&kvm->mmu_lock); atomic_inc(&current->mm->mm_count); kvm->mm = current->mm; kvm_eventfd_init(kvm); mutex_init(&kvm->lock); mutex_init(&kvm->irq_lock); m...
0
[ "CWE-416", "CWE-284" ]
linux
a0f1d21c1ccb1da66629627a74059dd7f5ac9c61
236,809,516,004,296,930,000,000,000,000,000,000,000
77
KVM: use after free in kvm_ioctl_create_device() We should move the ops->destroy(dev) after the list_del(&dev->vm_node) so that we don't use "dev" after freeing it. Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: ...
static char *gs_main_tempnames(gs_main_instance *minst) { i_ctx_t *i_ctx_p = minst->i_ctx_p; ref *SAFETY; ref *tempfiles; ref keyval[2]; /* for key and value */ char *tempnames = NULL; int i; int idict; int len = 0; const byte *data = NULL; uint size; if (minst->init_don...
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
187,073,390,719,570,470,000,000,000,000,000,000,000
40
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
int32_t cli_bcapi_map_setvalue(struct cli_bc_ctx *ctx, const uint8_t* value, int32_t valuesize, int32_t id) { struct cli_map *s = get_hashtab(ctx, id); if (!s) return -1; return cli_map_setvalue(s, value, valuesize); }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
163,523,622,664,387,530,000,000,000,000,000,000,000
7
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
char* SFDMoveToNextStartChar( FILE* sfd ) { char ret[2000]; memset( ret, '\0', 2000 ); char* line = 0; while((line = getquotedeol( sfd ))) { if( !strnmatch( line, "StartChar:", strlen( "StartChar:" ))) { // FIXME: use the getname()/SFDReadUTF7Str() combo // from SFDGetChar int len = str...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
132,600,204,160,744,100,000,000,000,000,000,000,000
23
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
ins_compl_addleader(int c) { int cc; if (stop_arrow() == FAIL) return; if (has_mbyte && (cc = (*mb_char2len)(c)) > 1) { char_u buf[MB_MAXBYTES + 1]; (*mb_char2bytes)(c, buf); buf[cc] = NUL; ins_char_bytes(buf, cc); if (compl_opt_refresh_always) AppendToRedobuff(buf); } else { ...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
268,669,669,359,260,500,000,000,000,000,000,000,000
39
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
void pb_controller::play_file(const std::string& file) { std::string cmdline; std::string player = cfg->get_configvalue("player"); if (player == "") return; cmdline.append(player); cmdline.append(" \""); cmdline.append(utils::replace_all(file,"\"", "\\\"")); cmdline.append("\""); stfl::reset(); utils::run_in...
1
[ "CWE-78" ]
newsbeuter
c8fea2f60c18ed30bdd1bb6f798e994e51a58260
189,077,926,802,611,250,000,000,000,000,000,000,000
12
Work around shell code in podcast names (#598)
g_file_set_attribute_uint32 (GFile *file, const gchar *attribute, guint32 value, GFileQueryInfoFlags flags, GCancellable *cancellable, ...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
54,136,739,810,733,050,000,000,000,000,000,000,000
11
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
int dane_state_init(dane_state_t* s, unsigned int flags) { struct ub_ctx* ctx; int ret; *s = calloc(1, sizeof(struct dane_state_st)); if (*s == NULL) return gnutls_assert_val(DANE_E_MEMORY_ERROR); ctx = ub_ctx_create(); if(!ctx) { gnutls_assert(); ret = DANE_E_INITIALIZATION_ERROR; goto cl...
0
[ "CWE-119" ]
gnutls
ed51e5e53cfbab3103d6b7b85b7ba4515e4f30c3
7,669,874,885,972,642,000,000,000,000,000,000,000
50
Adding dane_raw_tlsa to allow initialization of dane_query_t from DANE records based on external DNS resolutions. Also fixing a buffer overflow. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
static void testUmask077(CuTest *tc) { testUmask(tc, 0077, 0600); }
0
[]
augeas
f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26
302,769,474,189,974,550,000,000,000,000,000,000,000
3
Fix umask handling when creating new files * src/transform.c (transform_save): faulty umask arithmetic would cause overly-open file modes when the umask contains "7", as the umask was incorrectly subtracted from the target file mode Fixes CVE-2013-6412, RHBZ#1034261
void CompactProtocolReader::readI16(int16_t& i16) { int32_t value; apache::thrift::util::readVarint(in_, value); i16 = (int16_t)apache::thrift::util::zigzagToI32(value); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
83,292,867,624,204,720,000,000,000,000,000,000,000
5
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static size_t write_to_port(VirtIOSerialPort *port, const uint8_t *buf, size_t size) { VirtQueueElement elem; VirtQueue *vq; size_t offset; vq = port->ivq; if (!virtio_queue_ready(vq)) { return 0; } offset = 0; while (offset < size) { size_t ...
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
95,974,432,812,768,350,000,000,000,000,000,000,000
30
virtio-serial: fix ANY_LAYOUT Don't assume a specific layout for control messages. Required by virtio 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
Pl_AES_PDF::useZeroIV() { this->use_zero_iv = true; }
0
[ "CWE-787" ]
qpdf
dc92574c10f3e2516ec6445b88c5d584f40df4e5
92,191,887,638,338,470,000,000,000,000,000,000,000
4
Fix some pipelines to be safe if downstream write fails (fuzz issue 28262)
AnyVal() : is_null(false) {}
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
238,877,677,002,210,550,000,000,000,000,000,000,000
1
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
static void qeth_fill_ipacmd_header(struct qeth_card *card, struct qeth_ipa_cmd *cmd, __u8 command, enum qeth_prot_versions prot) { memset(cmd, 0, sizeof(struct qeth_ipa_cmd)); cmd->hdr.command = command; cmd->hdr.initiator = IPA_CMD_INITIATOR_HOST; cmd->hdr.seqno = card->seqno.ipa; cmd->hdr.adapter_type = qet...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
48,185,889,212,528,020,000,000,000,000,000,000,000
19
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
GF_Box *pcrb_box_new() { ISOM_DECL_BOX_ALLOC(GF_PcrInfoBox, GF_ISOM_BOX_TYPE_PCRB); return (GF_Box *)tmp;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
47,678,699,954,278,670,000,000,000,000,000,000,000
5
fixed #1587
static void my_caldav_close(struct caldav_db *caldavdb) { if (caldavdb && (caldavdb != auth_caldavdb)) caldav_close(caldavdb); }
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
134,911,144,814,477,670,000,000,000,000,000,000,000
4
HTTP: don't overrun buffer when parsing strings with sscanf()
FLAC__bool read_residual_partitioned_rice_(FLAC__StreamDecoder *decoder, unsigned predictor_order, unsigned partition_order, FLAC__EntropyCodingMethod_PartitionedRiceContents *partitioned_rice_contents, FLAC__int32 *residual, FLAC__bool is_extended) { FLAC__uint32 rice_parameter; int i; unsigned partition, sample, u...
1
[ "CWE-119" ]
flac
fcf0ba06ae12ccd7c67cee3c8d948df15f946b85
233,881,057,957,329,200,000,000,000,000,000,000,000
57
src/libFACL/stream_decoder.c : Fail safely to avoid a heap overflow. A file provided by the reporters caused the stream decoder to write to un-allocated heap space resulting in a segfault. The solution is to error out (by returning false from read_residual_partitioned_rice_()) instead of trying to continue to decode. ...
static void dev_watchdog_down(struct net_device *dev) { netif_tx_lock_bh(dev); if (del_timer(&dev->watchdog_timer)) dev_put(dev); netif_tx_unlock_bh(dev); }
0
[ "CWE-399" ]
linux-2.6
2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0
128,074,058,306,187,700,000,000,000,000,000,000,000
7
[NET]: Add preemption point in qdisc_run The qdisc_run loop is currently unbounded and runs entirely in a softirq. This is bad as it may create an unbounded softirq run. This patch fixes this by calling need_resched and breaking out if necessary. It also adds a break out if the jiffies value changes since that woul...
static void restoreSecCtx(char **pPrevCtx) { #ifdef WITH_SELINUX if (!*pPrevCtx) /* no security context saved for restoration */ return; /* set default security context to the previously stored one */ if (selinux_enabled && setfscreatecon_raw(*pPrevCtx) < 0) message(MESS_ERROR, "set...
0
[ "CWE-732" ]
logrotate
f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25
61,996,913,814,129,930,000,000,000,000,000,000,000
19
Lock state file to prevent parallel execution Running multiple instances of logrotate on the same set of log-files might have undesirable effects. Add command line option --skip-state-lock to skip locking the state file, for example if locking is unsupported or prohibited. Fixes: https://github.com/logrotate/logrota...
static void cvarinit(JF, js_Ast *list) { while (list) { js_Ast *var = list->a; if (var->b) { cexp(J, F, var->b); emitlocal(J, F, OP_SETLOCAL, OP_SETVAR, var->a); emit(J, F, OP_POP); } list = list->b; } }
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
100,865,472,228,687,420,000,000,000,000,000,000,000
12
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
static inline QString toString(bool b) { return b ? QLatin1String("true") : QLatin1String("false"); }
0
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
176,568,489,733,819,520,000,000,000,000,000,000,000
4
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
cmsBool CMSEXPORT cmsCloseIOhandler(cmsIOHANDLER* io) { return io -> Close(io); }
0
[]
Little-CMS
d2d902b9a03583ae482c782b2f243f7e5268a47d
1,346,838,671,793,583,000,000,000,000,000,000,000
4
>Changes from Richard Hughes
cmsStage* _cmsStageAllocIdentityCurves(cmsContext ContextID, int nChannels) { cmsStage* mpe = cmsStageAllocToneCurves(ContextID, nChannels, NULL); if (mpe == NULL) return NULL; mpe ->Implements = cmsSigIdentityElemType; return mpe; }
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
157,148,908,566,780,520,000,000,000,000,000,000,000
8
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
handle_close(int handle) { int ret = -1; if (handle_is_ok(handle, HANDLE_FILE)) { ret = close(handles[handle].fd); free(handles[handle].name); handle_unused(handle); } else if (handle_is_ok(handle, HANDLE_DIR)) { ret = closedir(handles[handle].dirp); free(handles[handle].name); handle_unused(handle); }...
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
275,877,945,847,275,880,000,000,000,000,000,000,000
17
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
void Item_field::make_send_field(THD *thd, Send_field *tmp_field) { field->make_send_field(tmp_field); DBUG_ASSERT(tmp_field->table_name != 0); if (name.str) { DBUG_ASSERT(name.length == strlen(name.str)); tmp_field->col_name= name; // Use user supplied name } if (table_name) tmp_field->table_n...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
247,519,165,088,030,300,000,000,000,000,000,000,000
14
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
BGD_DECLARE(gdImagePtr) gdImageCreateFromPngCtx (gdIOCtx * infile) { png_byte sig[8]; #ifdef PNG_SETJMP_SUPPORTED jmpbuf_wrapper jbw; #endif png_structp png_ptr; png_infop info_ptr; png_uint_32 width, height, rowbytes, w, h, res_x, res_y; int bit_depth, color_type, interlace_type, unit_type; int num_palette = 0,...
0
[ "CWE-415" ]
libgd
56ce6ef068b954ad28379e83cca04feefc51320c
258,381,744,854,268,500,000,000,000,000,000,000,000
346
Fix #381: libgd double-free vulnerability The issue is that `gdImagePngCtxEx` (which is called by `gdImagePngPtr` and the other PNG output functions to do the real work) does not return whether it succeeded or failed, so this is not checked in `gdImagePngPtr` and the function wrongly assumes everything is okay, which ...
Header::chunkCount() { return typedAttribute <IntAttribute> ("chunkCount").value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
215,743,237,171,098,560,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
int RGWRESTOp::verify_permission() { return check_caps(s->user->caps); }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
96,433,816,815,212,220,000,000,000,000,000,000,000
4
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static zval **php_zip_get_property_ptr_ptr(zval *object, zval *member, int type, const zend_literal *key TSRMLS_DC) /* {{{ */ { ze_zip_object *obj; zval tmp_member; zval **retval = NULL; zip_prop_handler *hnd; zend_object_handlers *std_hnd; int ret; if (member->type != IS_STRING) { tmp_member = *member; zv...
0
[ "CWE-416" ]
php-src
f6aef68089221c5ea047d4a74224ee3deead99a6
79,422,624,861,694,820,000,000,000,000,000,000,000
40
Fix bug #72434: ZipArchive class Use After Free Vulnerability in PHP's GC algorithm and unserialize
static Bool scene_dump_vrml_can_dump(GF_SceneDumper *sdump, GF_Node *node) { #ifndef GPAC_DISABLE_VRML u32 tag; if (node->sgprivate->tag==TAG_ProtoNode) return 1; if (sdump->X3DDump || (sdump->dump_mode==GF_SM_DUMP_VRML)) { if (node->sgprivate->tag>=GF_NODE_RANGE_FIRST_X3D) return 1; if (node->sgprivate->tag==...
0
[ "CWE-476" ]
gpac
0102c5d4db7fdbf08b5b591b2a6264de33867a07
262,777,679,490,368,380,000,000,000,000,000,000,000
30
fixed #2232
_zip_dirent_write(struct zip_dirent *zde, FILE *fp, int localp, struct zip_error *error) { unsigned short dostime, dosdate; fwrite(localp ? LOCAL_MAGIC : CENTRAL_MAGIC, 1, 4, fp); if (!localp) _zip_write2(zde->version_madeby, fp); _zip_write2(zde->version_needed, fp); _zip_write2(zde->bitflag...
0
[ "CWE-189" ]
php-src
ef8fc4b53d92fbfcd8ef1abbd6f2f5fe2c4a11e5
47,589,877,189,681,160,000,000,000,000,000,000,000
50
Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary
void ax25_destroy_socket(ax25_cb *ax25) { struct sk_buff *skb; ax25_cb_del(ax25); ax25_stop_heartbeat(ax25); ax25_stop_t1timer(ax25); ax25_stop_t2timer(ax25); ax25_stop_t3timer(ax25); ax25_stop_idletimer(ax25); ax25_clear_queues(ax25); /* Flush the queues */ if (ax25->sk != NULL) { while ((skb = skb_dequ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
331,846,796,175,399,170,000,000,000,000,000,000,000
51
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static void sungem_mmio_rxdma_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { SunGEMState *s = opaque; if (!(addr <= 0x28) && !(addr >= 0x100 && addr <= 0x120)) { qemu_log_mask(LOG_GUEST_ERROR, "Write to unknown RXDMA register 0x...
0
[ "CWE-835" ]
qemu
8c92060d3c0248bd4d515719a35922cd2391b9b4
61,640,972,677,592,080,000,000,000,000,000,000,000
43
sungem: 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 Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande...
CImg<T>& _LU(CImg<t>& indx, bool& d) { const int N = width(); int imax = 0; CImg<Tfloat> vv(N); indx.assign(N); d = true; bool return0 = false; cimg_pragma_openmp(parallel for cimg_openmp_if(_width*_height>=512)) cimg_forX(*this,i) { Tfloat vmax = 0; ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
244,866,749,344,067,080,000,000,000,000,000,000,000
49
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int llhttp__internal__c_update_http_minor( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { state->http_minor = 9; return 0; }
0
[ "CWE-444" ]
node
641f786bb1a1f6eb1ff8750782ed939780f2b31a
103,241,516,139,031,050,000,000,000,000,000,000,000
7
http: unset `F_CHUNKED` on new `Transfer-Encoding` Duplicate `Transfer-Encoding` header should be a treated as a single, but with original header values concatenated with a comma separator. In the light of this, even if the past `Transfer-Encoding` ended with `chunked`, we should be not let the `F_CHUNKED` to leak int...
static unsigned long to_ratio(u64 period, u64 runtime) { if (runtime == RUNTIME_INF) return 1ULL << 16; return div64_64(runtime << 16, period); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
200,937,582,393,366,400,000,000,000,000,000,000,000
7
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
long long Block::GetTime(const Cluster* pCluster) const { assert(pCluster); const long long tc = GetTimeCode(pCluster); const Segment* const pSegment = pCluster->m_pSegment; const SegmentInfo* const pInfo = pSegment->GetInfo(); assert(pInfo); const long long scale = pInfo->GetTimeCodeScale(); assert(sc...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
82,863,086,440,073,960,000,000,000,000,000,000,000
20
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
ZEND_API void ZEND_FASTCALL zend_hash_graceful_destroy(HashTable *ht) { uint32_t idx; Bucket *p; IS_CONSISTENT(ht); HT_ASSERT(GC_REFCOUNT(ht) == 1); p = ht->arData; for (idx = 0; idx < ht->nNumUsed; idx++, p++) { if (UNEXPECTED(Z_TYPE(p->val) == IS_UNDEF)) continue; _zend_hash_del_el(ht, HT_IDX_TO_HASH(idx)...
0
[ "CWE-190" ]
php-src
4cc0286f2f3780abc6084bcdae5dce595daa3c12
67,220,169,372,772,415,000,000,000,000,000,000,000
19
Fix #73832 - leave the table in a safe state if the size is too big.
static void cswitch(JF, js_Ast *ref, js_Ast *head) { js_Ast *node, *clause, *def = NULL; int end; cexp(J, F, ref); /* emit an if-else chain of tests for the case clause expressions */ for (node = head; node; node = node->b) { clause = node->a; if (clause->type == STM_DEFAULT) { if (def) jsC_error(J, c...
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
321,631,438,276,683,100,000,000,000,000,000,000,000
40
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
void usbredirparser_send_start_interrupt_receiving(struct usbredirparser *parser, uint64_t id, struct usb_redir_start_interrupt_receiving_header *start_interrupt_receiving) { usbredirparser_queue(parser, usb_redir_start_interrupt_receiving, id, start_interrupt_receiving, NULL, 0); }
0
[]
usbredir
03c519ff5831ba75120e00ebebbf1d5a1f7220ab
276,294,433,892,004,450,000,000,000,000,000,000,000
7
Avoid use-after-free in serialization Serializing parsers with large amounts of buffered write data (e.g. in case of a slow or blocked write destination) would cause "serialize_data" to reallocate the state buffer whose default size is 64kB (USBREDIRPARSER_SERIALIZE_BUF_SIZE). The pointer to the position for the write...
get_next_include_file_completion(int compl_type) { find_pattern_in_path(compl_pattern, compl_direction, (int)STRLEN(compl_pattern), FALSE, FALSE, (compl_type == CTRL_X_PATH_DEFINES && !(compl_cont_status & CONT_SOL)) ? FIND_DEFINE : FIND_ANY, 1L, ACTION_EXPAND, (linenr_T)1, (linenr_T)MAXLN...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
153,410,085,585,002,170,000,000,000,000,000,000,000
9
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session) { const gnutls_group_entry_st *e; e = get_group(session); if (e == NULL || e->curve == 0) return 0; return e->curve; }
0
[]
gnutls
3d7fae761e65e9d0f16d7247ee8a464d4fe002da
32,674,689,655,528,263,000,000,000,000,000,000,000
9
valgrind: check if session ticket key is used without initialization This adds a valgrind client request for session->key.session_ticket_key to make sure that it is not used without initialization. Signed-off-by: Daiki Ueno <ueno@gnu.org>
RGWSetBucketWebsite() {}
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
271,905,005,638,972,160,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static struct sock *udp_get_first(struct seq_file *seq) { struct sock *sk; struct udp_iter_state *state = seq->private; for (state->bucket = 0; state->bucket < UDP_HTABLE_SIZE; ++state->bucket) { struct hlist_node *node; sk_for_each(sk, node, &udp_hash[state->bucket]) { if (sk->sk_family == state->family) ...
0
[ "CWE-476" ]
linux-2.6
1e0c14f49d6b393179f423abbac47f85618d3d46
120,911,272,699,233,120,000,000,000,000,000,000,000
16
[UDP]: Fix MSG_PROBE crash UDP tracks corking status through the pending variable. The IP layer also tracks it through the socket write queue. It is possible for the two to get out of sync when MSG_PROBE is used. This patch changes UDP to check the write queue to ensure that the two stay in sync. Signed-off-by: He...
Value ExpressionObject::evaluate(const Document& root) const { MutableDocument outputDoc; for (auto&& pair : _expressions) { outputDoc.addField(pair.first, pair.second->evaluate(root)); } return outputDoc.freezeToValue(); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
160,229,564,224,650,600,000,000,000,000,000,000,000
7
SERVER-38070 fix infinite loop in agg expression
TEST_F(EncryptionUtilTest, sm4_test_by_case) { std::string case_1 = "P/Ub8/arZ22TW+rAT5sgYg=="; // base64 for encrypted "hello, doris" std::string source_1 = "hello, doris"; std::string case_2 = "2I+UW9axOP2Tv35BGYgy+g=="; // base64 for encrypted "doris test" std::string source_2 = "doris test"; st...
1
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
310,373,180,946,264,970,000,000,000,000,000,000,000
27
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
static bool find_jump_target(const struct xt_table_info *t, const struct arpt_entry *target) { struct arpt_entry *iter; xt_entry_foreach(iter, t->entries, t->size) { if (iter == target) return true; } return false; }
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
189,669,015,093,795,470,000,000,000,000,000,000,000
11
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
TEST(ExpressionTypeTest, WithBoolValue) { assertExpectedResults("$type", {{{Value(true)}, Value("bool"_sd)}}); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
261,936,276,969,707,680,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
int coroutine_fn bdrv_co_flush(BlockDriverState *bs) { int ret; if (!bs || !bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) { return 0; } /* Write back cached data to the OS even with cache=unsafe */ BLKDBG_EVENT(bs->file, BLKDBG_FLUSH_TO_OS); if (bs->drv->bdrv_co_flush_to_os) { ...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
76,594,711,020,467,370,000,000,000,000,000,000,000
62
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
static BOOL nla_set_package_name(rdpNla* nla, const TCHAR* name) { if (!nla) return FALSE; free(nla->packageName); nla->packageName = NULL; if (name) { #if defined(UNICODE) ConvertFromUnicode(CP_UTF8, 0, name, -1, &nla->packageName, 0, NULL, NULL); #else nla->packageName = _strdup(name); #endif if (!nla->p...
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
76,229,117,253,612,640,000,000,000,000,000,000,000
18
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
sync_hierarchy_response_cb (ESoapResponse *response, GSimpleAsyncResult *simple) { EwsAsyncData *async_data; ESoapParameter *param; ESoapParameter *subparam; GError *error = NULL; async_data = g_simple_async_result_get_op_res_gpointer (simple); /* * During the first connection, we ...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
32,628,682,346,853,617,000,000,000,000,000,000,000
52
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
NamedArgWithType<Char, T> operator=(T &&value) const { return {str, std::forward<T>(value)}; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
59,532,269,792,866,960,000,000,000,000,000,000,000
3
Fix segfault on complex pointer formatting (#642)
static int evp_cipher_set_decrypt_key(struct ssh_cipher_struct *cipher, void *key, void *IV) { int rc; evp_cipher_init(cipher); EVP_CIPHER_CTX_init(cipher->ctx); rc = EVP_DecryptInit_ex(cipher->ctx, cipher->cipher, NULL, key, IV); if (rc != 1){ SSH_LOG(SSH_LOG_WARNING, "EVP_Dec...
0
[ "CWE-476" ]
libssh
b36272eac1b36982598c10de7af0a501582de07a
130,565,135,410,154,220,000,000,000,000,000,000,000
32
CVE-2020-1730: Fix a possible segfault when zeroing AES-CTR key Fixes T213 Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
static int oidc_handle_redirect_authorization_response(request_rec *r, oidc_cfg *c, oidc_session_t *session) { oidc_debug(r, "enter"); /* read the parameters from the query string */ apr_table_t *params = apr_table_make(r->pool, 8); oidc_util_read_form_encoded_params(r, params, r->args); /* do the actual work...
0
[ "CWE-601" ]
mod_auth_openidc
5c15dfb08106c2451c2c44ce7ace6813c216ba75
99,944,316,641,577,740,000,000,000,000,000,000,000
13
improve validation of the post-logout URL; closes #449 - to avoid an open redirect; thanks AIMOTO Norihito - release 2.4.0.1 Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
static void DetectRunTx(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, Packet *p, Flow *f, DetectRunScratchpad *scratch) { const uint8_t flow_flags = scratch->flow_flags; const SigGroupH...
0
[ "CWE-347" ]
suricata
d8634daf74c882356659addb65fb142b738a186b
104,147,930,763,900,520,000,000,000,000,000,000,000
250
stream: fix false negative on bad RST If a bad RST was received the stream inspection would not happen for that packet, but it would still move the 'raw progress' tracker forward. Following good packets would then fail to detect anything before the 'raw progress' position. Bug #2770 Reported-by: Alexey Vishnyakov
int ring_buffer_print_entry_header(struct trace_seq *s) { trace_seq_puts(s, "# compressed entry header\n"); trace_seq_puts(s, "\ttype_len : 5 bits\n"); trace_seq_puts(s, "\ttime_delta : 27 bits\n"); trace_seq_puts(s, "\tarray : 32 bits\n"); trace_seq_putc(s, '\n'); trace_seq_printf(s, "\tpadding ...
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
277,819,710,454,780,170,000,000,000,000,000,000,000
18
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
static int bond_vlan_rx_kill_vid(struct net_device *bond_dev, __be16 proto, u16 vid) { struct bonding *bond = netdev_priv(bond_dev); struct list_head *iter; struct slave *slave; bond_for_each_slave(bond, slave, iter) vlan_vid_del(slave->dev, proto, vid); if (bond_is_lb(bond)) bond_alb_clear_vlan(bond, v...
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
285,727,472,827,422,680,000,000,000,000,000,000,000
15
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
TIFFReadRawTile1(TIFF* tif, uint32 tile, void* buf, tmsize_t size, const char* module) { TIFFDirectory *td = &tif->tif_dir; if (!_TIFFFillStriles( tif )) return ((tmsize_t)(-1)); assert((tif->tif_flags&TIFF_NOREADRAW)==0); if (!isMapped(tif)) { tmsize_t cc; if (!SeekOK(tif, td->td_stripoffset[tile...
1
[ "CWE-189" ]
libtiff
0ba5d8814a17a64bdb8d9035f4c533f3f3f4b496
23,509,755,624,112,450,000,000,000,000,000,000,000
73
* libtiff/tif_read.c: Fix out-of-bounds read on memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1() when stripoffset is beyond tmsize_t max value (reported by Mathias Svensson)
static void handle_tx_kick(struct vhost_work *work) { struct vhost_virtqueue *vq = container_of(work, struct vhost_virtqueue, poll.work); struct vhost_net *net = container_of(vq->dev, struct vhost_net, dev); handle_tx(net); }
0
[ "CWE-399" ]
linux
dd7633ecd553a5e304d349aa6f8eb8a0417098c5
151,231,526,337,314,420,000,000,000,000,000,000,000
8
vhost-net: fix use-after-free in vhost_net_flush vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 "vhost-net: flush outstanding DMAs on memory change" vhost_net_flush tries to use the argument after passing it to ...
follow_huge_pud(struct mm_struct *mm, unsigned long address, pud_t *pud, int flags) { if (flags & FOLL_GET) return NULL; return pte_page(*(pte_t *)pud) + ((address & ~PUD_MASK) >> PAGE_SHIFT); }
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
251,191,247,816,596,670,000,000,000,000,000,000,000
8
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
static char *store_file_unix_basic(connection_struct *conn, char *pdata, files_struct *fsp, const SMB_STRUCT_STAT *psbuf) { DEBUG(10,("store_file_unix_basic: SMB_QUERY_FILE_UNIX_BASIC\n")); DEBUG(4,("store_file_unix_basic: st_mode=%o\n",(int)psbuf->st_ex_mode)); SOFF_T(pdata,0,get_file_size_stat(psbuf))...
0
[ "CWE-22" ]
samba
bd269443e311d96ef495a9db47d1b95eb83bb8f4
255,076,958,097,361,000,000,000,000,000,000,000,000
51
Fix bug 7104 - "wide links" and "unix extensions" are incompatible. Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow t...
static int ipmr_vif_open(struct inode *inode, struct file *file) { struct seq_file *seq; int rc = -ENOMEM; struct ipmr_vif_iter *s = kmalloc(sizeof(*s), GFP_KERNEL); if (!s) goto out; rc = seq_open(file, &ipmr_vif_seq_ops); if (rc) goto out_kfree; s->ct = 0; seq = file->private_data; seq->private...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
160,799,007,592,011,360,000,000,000,000,000,000,000
23
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
int enc_untrusted_bind(int sockfd, const struct sockaddr *addr, socklen_t addrlen) { socklen_t klinux_sock_len = std::max(std::max(sizeof(klinux_sockaddr_un), sizeof(klinux_sockaddr_in)), sizeof(klinux_sockaddr_in6)); auto klinux_sock = absl::make_unique<char[]>(klinux_so...
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
208,866,193,298,553,040,000,000,000,000,000,000,000
17
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
R_API void r_bin_java_deprecated_attr_free(void /*RBinJavaAttrInfo*/ *a) { RBinJavaAttrInfo *attr = a; if (attr) { free (attr->name); free (attr->metas); free (attr); } }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
18,146,137,756,914,748,000,000,000,000,000,000,000
8
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
void reply_findclose(struct smb_request *req) { int dptr_num; struct smbd_server_connection *sconn = req->sconn; files_struct *fsp = NULL; START_PROFILE(SMBfindclose); if (req->wct < 1) { reply_nterror(req, NT_STATUS_INVALID_PARAMETER); END_PROFILE(SMBfindclose); return; } dptr_num = SVALS(req->vwv+0, 0...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
37,668,914,344,000,420,000,000,000,000,000,000,000
40
CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs This is an internal xattr that should not be user visible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
quote_assign (string) const char *string; { size_t slen; int saw_eq; char *temp, *t, *subs; const char *s, *send; int ss, se; DECLARE_MBSTATE; slen = strlen (string); send = string + slen; t = temp = (char *)xmalloc (slen * 2 + 1); saw_eq = 0; for (s = string; *s; ) { if (*s == '=...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
32,074,814,523,452,085,000,000,000,000,000,000,000
41
bash-4.4-rc2 release
PostorderProcessor* parent() {return father_; }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
235,450,907,093,060,670,000,000,000,000,000,000,000
1
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
R_API int r_bin_dwarf_parse_aranges_raw(const ut8 *obuf, int len, FILE *f) { ut32 length, offset; ut16 version; ut32 debug_info_offset; ut8 address_size, segment_size; const ut8 *buf = obuf; int idx = 0; if (!buf || len< 4) { return false; } READ_BUF (length, ut32); if (f) { printf("parse_aranges\n"); ...
0
[ "CWE-119", "CWE-125" ]
radare2
d37d2b858ac47f2f108034be0bcecadaddfbc8b3
266,251,991,528,789,040,000,000,000,000,000,000,000
64
Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478)
_krb5_pk_load_id(krb5_context context, struct krb5_pk_identity **ret_id, const char *user_id, const char *anchor_id, char * const *chain_list, char * const *revoke_list, krb5_prompter_fct prompter, void *prompter_data, char *password) { struct krb5_pk_identity *id = NULL; struct prompter...
0
[ "CWE-320" ]
heimdal
2f7f3d9960aa6ea21358bdf3687cee5149aa35cf
226,126,087,377,086,770,000,000,000,000,000,000,000
135
CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon PKINIT RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge when anonymous PKINIT is used. Failure to do so can permit an active attacker to become a man-in-the-middle. Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f. First tagged...
load_nameservers_from_registry(struct evdns_base *base) { int found = 0; int r; #define TRY(k, name) \ if (!found && config_nameserver_from_reg_key(base,k,TEXT(name)) == 0) { \ log(EVDNS_LOG_DEBUG,"Found nameservers in %s/%s",#k,name); \ found = 1; \ } else if (!found) { \ log(EVDNS_LOG_DEBUG,"Didn'...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
113,653,971,622,695,100,000,000,000,000,000,000,000
54
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
CImg<T>& index(const CImg<t>& colormap, const float dithering=1, const bool map_indexes=false) { return get_index(colormap,dithering,map_indexes).move_to(*this); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
47,197,317,342,631,340,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int kvm_vcpu_initialized(struct kvm_vcpu *vcpu) { return vcpu->arch.target >= 0; }
0
[ "CWE-399", "CWE-284" ]
linux
e8180dcaa8470ceca21109f143876fdcd9fe050a
22,140,323,636,783,740,000,000,000,000,000,000,000
4
ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl Some ARM KVM VCPU ioctls require the vCPU to be properly initialized with the KVM_ARM_VCPU_INIT ioctl before being used with further requests. KVM_RUN checks whether this initialization has been done, but other ioctls do not. Namely KVM_GET_REG_LIST will ...
void calc_group_buffer(TMP_TABLE_PARAM *param, ORDER *group) { uint key_length=0, parts=0, null_parts=0; for (; group ; group=group->next) { Item *group_item= *group->item; Field *field= group_item->get_tmp_table_field(); if (field) { enum_field_types type; if ((type= field->type()) =...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
149,229,687,667,020,160,000,000,000,000,000,000,000
77
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...