func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
mono_class_set_ref_info (MonoClass *klass, gpointer obj) { klass->ref_info_handle = mono_gchandle_new ((MonoObject*)obj, FALSE); g_assert (klass->ref_info_handle != 0); }
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
231,968,533,996,640,800,000,000,000,000,000,000,000
5
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
hook_add_to_infolist (struct t_infolist *infolist, const char *arguments) { const char *pos_arguments; char *type; int i, type_int; if (!infolist) return 0; type = NULL; pos_arguments = NULL; if (arguments) { pos_arguments = strchr (arguments, ','); ...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
293,389,698,148,165,320,000,000,000,000,000,000,000
37
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
static enum test_return test_binary_stat(void) { union { protocol_binary_request_no_extras request; protocol_binary_response_no_extras response; char bytes[1024]; } buffer; size_t len = raw_command(buffer.bytes, sizeof(buffer.bytes), PROTOCOL_BINARY_CMD_...
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
241,450,654,268,595,150,000,000,000,000,000,000,000
20
Issue 102: Piping null to the server will crash it
bool HttpConnection::sendBufferIsEmpty() const { return socketBuffer_.sendBufferIsEmpty(); }
0
[ "CWE-532" ]
aria2
37368130ca7de5491a75fd18a20c5c5cc641824a
61,187,947,443,584,290,000,000,000,000,000,000,000
4
Mask headers
hcom_client_init ( OUT p_hsm_com_client_hdl_t *p_hdl, IN char *server_path, IN char *client_path, IN int max_data_len ) { hsm_com_client_hdl_t *hdl = NULL; hsm_com_errno_t res = HSM_COM_OK; if((strlen(server_path) > (HSM_COM_SVR_MAX_PATH - 1)) || (strlen(server_path) == 0))...
1
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
30,237,618,956,425,930,000,000,000,000,000,000,000
80
Fix scripts and code that use well-known tmp files.
static void ext4_update_dx_flag(struct inode *inode) { if (!EXT4_HAS_COMPAT_FEATURE(inode->i_sb, EXT4_FEATURE_COMPAT_DIR_INDEX)) ext4_clear_inode_flag(inode, EXT4_INODE_INDEX); }
0
[ "CWE-20" ]
linux
c9b92530a723ac5ef8e352885a1862b18f31b2f5
268,654,272,807,799,600,000,000,000,000,000,000,000
6
ext4: make orphan functions be no-op in no-journal mode Instead of checking whether the handle is valid, we check if journal is enabled. This avoids taking the s_orphan_lock mutex in all cases when there is no journal in use, including the error paths where ext4_orphan_del() is called with a handle set to NULL. Signe...
void js_setglobal(js_State *J, const char *name) { jsR_setproperty(J, J->G, name); js_pop(J, 1); }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
283,582,038,841,220,940,000,000,000,000,000,000,000
5
Fix 697401: Error when dropping extra arguments to lightweight functions.
term_after_channel_closed(term_T *term) { /* Unless in Terminal-Normal mode: clear the vterm. */ if (!term->tl_normal_mode) { int fnum = term->tl_buffer->b_fnum; cleanup_vterm(term); if (term->tl_finish == TL_FINISH_CLOSE) { aco_save_T aco; int do_set_w_closing = term->tl_buffer->b_nwindows...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
127,177,028,186,383,200,000,000,000,000,000,000,000
46
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
brcmf_notify_sched_scan_results(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) { struct brcmf_cfg80211_info *cfg = ifp->drvr->config; struct brcmf_pno_net_info_le *netinfo, *netinfo_start; struct cfg80211_scan_request *request = NULL; struct wiphy *wiphy = cfg_to_wiphy(cfg); int i, err = 0;...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
30,334,634,257,963,620,000,000,000,000,000,000,000
84
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
xmlNodeAddContent(xmlNodePtr cur, const xmlChar *content) { int len; if (cur == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNodeAddContent : node == NULL\n"); #endif return; } if (content == NULL) return; len = xmlStrlen(content); xmlNodeAddContentLen(cur, c...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
189,267,578,863,547,940,000,000,000,000,000,000,000
14
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
get_next_spell_completion(linenr_T lnum UNUSED) { #ifdef FEAT_SPELL char_u **matches; int num_matches; num_matches = expand_spelling(lnum, compl_pattern, &matches); if (num_matches > 0) ins_compl_add_matches(num_matches, matches, p_ic); else vim_free(matches); #endif }
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
310,947,824,666,935,160,000,000,000,000,000,000,000
13
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.
xmlXPtrInsideRange(xmlXPathParserContextPtr ctxt, xmlXPathObjectPtr loc) { if (loc == NULL) return(NULL); if ((ctxt == NULL) || (ctxt->context == NULL) || (ctxt->context->doc == NULL)) return(NULL); switch (loc->type) { case XPATH_POINT: { xmlNodePtr node = (xmlNodePtr) loc->user; switc...
0
[ "CWE-415" ]
libxml2
f5048b3e71fc30ad096970b8df6e7af073bae4cb
12,945,867,188,761,947,000,000,000,000,000,000,000
73
Hardening of XPath evaluation Add a mechanism of frame for XPath evaluation when entering a function or a scoped evaluation, also fix a potential problem in predicate evaluation.
static void perf_trace_event_unreg(struct perf_event *p_event) { struct ftrace_event_call *tp_event = p_event->tp_event; int i; if (--tp_event->perf_refcount > 0) goto out; tp_event->class->reg(tp_event, TRACE_REG_PERF_UNREGISTER, NULL); /* * Ensure our callback won't be called anymore. The buffers * will...
0
[]
linux
ced39002f5ea736b716ae233fb68b26d59783912
199,959,530,391,634,370,000,000,000,000,000,000,000
28
ftrace, perf: Add support to use function tracepoint in perf Adding perf registration support for the ftrace function event, so it is now possible to register it via perf interface. The perf_event struct statically contains ftrace_ops as a handle for function tracer. The function tracer is registered/unregistered in ...
rb_str_locktmp(VALUE str) { if (FL_TEST(str, STR_TMPLOCK)) { rb_raise(rb_eRuntimeError, "temporal locking already locked string"); } FL_SET(str, STR_TMPLOCK); return str; }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
142,287,481,208,928,480,000,000,000,000,000,000,000
8
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int __netlink_sendskb(struct sock *sk, struct sk_buff *skb) { int len = skb->len; netlink_deliver_tap(skb); #ifdef CONFIG_NETLINK_MMAP if (netlink_skb_is_mmaped(skb)) netlink_queue_mmaped_skb(sk, skb); else if (netlink_rx_is_mmaped(sk)) netlink_ring_set_copied(sk, skb); else #endif /* CONFIG_NETLINK_M...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
120,544,117,094,125,180,000,000,000,000,000,000,000
17
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...
Status Examples::SampleAdaptiveProbabilities( const int num_loss_partitions, const Regularizations& regularization, const ModelWeights& model_weights, const TTypes<float>::Matrix example_state_data, const std::unique_ptr<DualLossUpdater>& loss_updater, const int num_weight_vectors) { if (num_weigh...
0
[ "CWE-703", "CWE-125" ]
tensorflow
a4e138660270e7599793fa438cd7b2fc2ce215a6
258,510,786,527,182,200,000,000,000,000,000,000,000
75
Add remaining validation to `sdca_internal.cc` PiperOrigin-RevId: 387738010 Change-Id: I28eedcfd87a53aaf34deb075acea1f8c95470808
static av_cold int decode_end(AVCodecContext *avctx) { SmackVContext * const smk = avctx->priv_data; av_freep(&smk->mmap_tbl); av_freep(&smk->mclr_tbl); av_freep(&smk->full_tbl); av_freep(&smk->type_tbl); av_frame_free(&smk->pic); return 0; }
0
[ "CWE-119", "CWE-787" ]
libav
cd4663dc80323ba64989d0c103d51ad3ee0e9c2f
310,581,641,865,341,770,000,000,000,000,000,000,000
13
smacker: add sanity check for length in smacker_decode_tree() Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Bug-Id: 1098 Cc: libav-stable@libav.org Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
SV* dbd_db_FETCH_attrib(SV *dbh, imp_dbh_t *imp_dbh, SV *keysv) { dTHX; STRLEN kl; char *key = SvPV(keysv, kl); char* fine_key = NULL; SV* result = NULL; dbh= dbh; switch (*key) { case 'A': if (strEQ(key, "AutoCommit")) { if (imp_dbh->has_transactions) return sv_2mortal(...
0
[ "CWE-119" ]
DBD-mysql
7c164a0c86cec6ee95df1d141e67b0e85dfdefd2
245,987,545,794,491,060,000,000,000,000,000,000,000
177
Do not use unsafe sprintf w/variable length input This can cause a buffer overflow to occur when reporting error message about validation of (untrusted) user input parameters.
static void run_multi_thread_test(void) { unsigned char buf[256]; time_t start = time(NULL); RAND_DRBG *public = NULL, *private = NULL; if (!TEST_ptr(public = RAND_DRBG_get0_public()) || !TEST_ptr(private = RAND_DRBG_get0_private())) { multi_thread_rand_bytes_succeeded = 0; ...
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
127,576,540,365,481,840,000,000,000,000,000,000,000
22
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...
flatpak_dir_get_exports_dir (FlatpakDir *self) { return g_file_get_child (self->basedir, "exports"); }
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
320,822,674,693,118,900,000,000,000,000,000,000,000
4
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static int selinux_tun_dev_attach_queue(void *security) { struct tun_security_struct *tunsec = security; return avc_has_perm(current_sid(), tunsec->sid, SECCLASS_TUN_SOCKET, TUN_SOCKET__ATTACH_QUEUE, NULL); }
0
[ "CWE-264" ]
linux
7b0d0b40cd78cadb525df760ee4cac151533c2b5
68,834,921,914,817,000,000,000,000,000,000,000,000
7
selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID. If the callee SID is bounded by the caller SID, then allowing the transition to occur poses no risk of privilege escalation and we can therefore safely allow the transition to occur. Add this exemption for both the case where a transition was explicitl...
void disable_config(void) { EUID_USER(); #ifndef HAVE_ONLY_SYSCFG_PROFILES char *fname; if (asprintf(&fname, "%s/.config/firejail", cfg.homedir) == -1) errExit("asprintf"); disable_file(BLACKLIST_FILE, fname); free(fname); #endif // disable run time information disable_file(BLACKLIST_FILE, RUN_FIREJAIL_SANDBO...
0
[ "CWE-269", "CWE-94" ]
firejail
27cde3d7d1e4e16d4190932347c7151dc2a84c50
272,956,657,091,463,840,000,000,000,000,000,000,000
19
fixing CVE-2022-31214
ssize_t ovl_listxattr(struct dentry *dentry, char *list, size_t size) { struct path realpath; enum ovl_path_type type = ovl_path_real(dentry, &realpath); ssize_t res; int off; res = vfs_listxattr(realpath.dentry, list, size); if (res <= 0 || size == 0) return res; if (!ovl_need_xattr_filter(dentry, type)) ...
0
[ "CWE-284", "CWE-264" ]
linux
acff81ec2c79492b180fade3c2894425cd35a545
79,262,175,465,831,690,000,000,000,000,000,000,000
31
ovl: fix permission checking for setattr [Al Viro] The bug is in being too enthusiastic about optimizing ->setattr() away - instead of "copy verbatim with metadata" + "chmod/chown/utimes" (with the former being always safe and the latter failing in case of insufficient permissions) it tries to combine these two. Note...
void ha_partition::print_error(int error, myf errflag) { THD *thd= ha_thd(); DBUG_ENTER("ha_partition::print_error"); /* Should probably look for my own errors first */ DBUG_PRINT("enter", ("error: %d", error)); if (error == HA_ERR_NO_PARTITION_FOUND) { switch(thd_sql_command(thd)) { case SQLC...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
98,626,832,359,573,280,000,000,000,000,000,000,000
76
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static int lo_req_flush(struct loop_device *lo, struct request *rq) { struct file *file = lo->lo_backing_file; int ret = vfs_fsync(file, 0); if (unlikely(ret && ret != -EINVAL)) ret = -EIO; return ret; }
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
117,871,445,052,510,890,000,000,000,000,000,000,000
9
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
gs_window_real_scroll_event (GtkWidget *widget, GdkEventScroll *event) { GSWindow *window; window = GS_WINDOW (widget); maybe_handle_activity (window); return FALSE; }
0
[]
gnome-screensaver
a5f66339be6719c2b8fc478a1d5fc6545297d950
178,256,505,880,391,470,000,000,000,000,000,000,000
10
Ensure keyboard grab and unlock dialog exist after monitor removal gnome-screensaver currently doesn't deal with monitors getting removed properly. If the unlock dialog is on the removed monitor then the unlock dialog and its associated keyboard grab are not moved to an existing monitor when the monitor removal is pr...
static void nntp_adata_free(void **ptr) { if (!ptr || !*ptr) return; struct NntpAccountData *adata = *ptr; mutt_file_fclose(&adata->fp_newsrc); FREE(&adata->newsrc_file); FREE(&adata->authenticators); FREE(&adata->overview_fmt); FREE(&adata->conn); FREE(&adata->groups_list); mutt_hash_free(&adat...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
234,529,078,801,785,400,000,000,000,000,000,000,000
16
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
another_hunk (enum diff difftype, bool rev) { char *s; lin context = 0; size_t chars_read; char numbuf0[LINENUM_LENGTH_BOUND + 1]; char numbuf1[LINENUM_LENGTH_BOUND + 1]; char numbuf2[LINENUM_LENGTH_BOUND + 1]; char numbuf3[LINENUM_LENGTH_BOUND + 1]; while (p_end >= 0) { if (p_end == p...
1
[ "CWE-399" ]
patch
0c08d7a902c6fdd49b704623a12d8d672ef18944
158,358,895,882,106,630,000,000,000,000,000,000,000
769
Fail when out of memory in set_hunkmax() src/pch.c (another_hunk): Call set_hunkmax() from here to make sure it is called even when falling back from plan A to plan B. (open_patch_file): No need to call set_hunkmax() anymore. src/pch.c (set_hunkmax): Fail when out of memory. Make static. src/pch.h: Remove set_hunkmax(...
pack_pack(int argc, VALUE *argv, VALUE ary) { static const char nul10[] = "\0\0\0\0\0\0\0\0\0\0"; static const char spc10[] = " "; const char *p, *pend; VALUE fmt, opt = Qnil, res, from, associates = 0, buffer = 0; char type; long len, idx, plen; const char *ptr; int enc_info = ...
1
[]
ruby
a2958f6743664006d21fc0bafd4ca6214df1d429
300,107,394,025,013,900,000,000,000,000,000,000,000
620
merge revision(s) 65125: infect taint flag on Array#pack and String#unpack with the directives "B", "b", "H" and "h". * pack.c (pack_pack, pack_unpack_internal): infect taint flag. * test/ruby/test_pack.rb: add test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@65128 b2dd03c8-39d4-4...
static int ethtool_set_gso(struct net_device *dev, char __user *useraddr) { struct ethtool_value edata; if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; if (edata.data) dev->features |= NETIF_F_GSO; else dev->features &= ~NETIF_F_GSO; return 0; }
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
107,437,335,915,446,200,000,000,000,000,000,000,000
12
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
bool item_size_ok(const size_t nkey, const int flags, const int nbytes) { char prefix[40]; uint8_t nsuffix; size_t ntotal = item_make_header(nkey + 1, flags, nbytes, prefix, &nsuffix); if (settings.use_cas) { ntotal += sizeof(uint64_t); } return sla...
0
[ "CWE-119" ]
memcached
fbe823d9a61b5149cd6e3b5e17bd28dd3b8dd760
209,126,472,916,311,750,000,000,000,000,000,000,000
12
fix potential unbounded key prints item key isn't necessarily null terminated. user submitted a patch for one, this clears two more.
static int ip_rt_bug(struct net *net, struct sock *sk, struct sk_buff *skb) { pr_debug("%s: %pI4 -> %pI4, %s\n", __func__, &ip_hdr(skb)->saddr, &ip_hdr(skb)->daddr, skb->dev ? skb->dev->name : "?"); kfree_skb(skb); WARN_ON(1); return 0; }
0
[ "CWE-476" ]
linux
bc3aae2bbac46dd894c89db5d5e98f7f0ef9e205
191,854,080,621,185,000,000,000,000,000,000,000,000
9
net: check and errout if res->fi is NULL when RTM_F_FIB_MATCH is set Syzkaller hit 'general protection fault in fib_dump_info' bug on commit 4.13-rc5.. Guilty file: net/ipv4/fib_semantics.c kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN Modules linked...
static int setup_console(const struct lxc_rootfs *rootfs, const struct lxc_console *console, char *ttydir) { /* We don't have a rootfs, /dev/console will be shared */ if (!rootfs->path) return 0; if (!ttydir) return setup_dev_console(rootfs, console); return setup_ttydir_console(rootfs, console, ttydir...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
288,573,710,588,890,900,000,000,000,000,000,000,000
12
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); const Tensor& filter = context->input(1); const Tensor& out_backprop = context->input(2); // Determine relevant sizes from input and filters. int stride_rows = 0, stride_cols = 0; int rate_rows = 0, rat...
1
[ "CWE-787" ]
tensorflow
3f6fe4dfef6f57e768260b48166c27d148f3015f
270,616,225,899,835,530,000,000,000,000,000,000,000
42
Add missing validations in dillation ops. PiperOrigin-RevId: 372037158 Change-Id: I4ee304c84a02550c030288a6534000b934fc1599
ZEND_API zend_bool ZEND_FASTCALL instanceof_function(const zend_class_entry *instance_ce, const zend_class_entry *ce) /* {{{ */ { if (ce->ce_flags & ZEND_ACC_INTERFACE) { return instanceof_interface(instance_ce, ce); } else { return instanceof_class(instance_ce, ce); } }
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
212,606,658,309,316,100,000,000,000,000,000,000,000
8
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
get_expr_indent(void) { int indent = -1; char_u *inde_copy; pos_T save_pos; colnr_T save_curswant; int save_set_curswant; int save_State; int use_sandbox = was_set_insecurely((char_u *)"indentexpr", OPT_LOCAL); sctx_T save_sctx = current_sctx; // Save and restore curs...
0
[ "CWE-122", "CWE-787" ]
vim
652dee448618589de5528a9e9a36995803f5557a
82,503,183,966,555,590,000,000,000,000,000,000,000
61
patch 8.2.4245: ":retab 0" may cause illegal memory access Problem: ":retab 0" may cause illegal memory access. Solution: Limit the value of 'tabstop' to 10000.
static OPJ_BOOL opj_j2k_write_tlm( opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ) { OPJ_BYTE * l_current_data = 00; OPJ_UINT32 ...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
1,566,582,678,452,488,200,000,000,000,000,000,000
53
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static inline int is_var(char *x) { return x[0] == '.' || ((x[0] == '*' || x[0] == '&') && x[1] == '.'); }
0
[ "CWE-416" ]
radare2
93af319e0af787ede96537d46210369f5c24240c
260,555,745,404,952,700,000,000,000,000,000,000,000
3
Fix #14296 - Segfault in ragg2 (#14308)
std::string base_name(const std::string& file) // Analogous to POSIX basename(3), but for C++ string-object pathnames { #ifdef _WIN32 static const std::string dir_separators = "\\/:"; #else static const std::string dir_separators = "/"; #endif std::string::size_type pos = file.find_last_of(dir_separators); if(pos...
0
[ "CWE-200" ]
wesnoth
f8914468182e8d0a1551b430c0879ba236fe4d6d
38,676,031,387,206,490,000,000,000,000,000,000,000
18
Disallow inclusion of .pbl files from WML (bug #23504) Note that this will also cause Lua wesnoth.have_file() to return false on .pbl files.
static void *zrle_convert_fb(VncState *vs, int x, int y, int w, int h, int bpp) { Buffer tmp; buffer_reset(&vs->zrle->fb); buffer_reserve(&vs->zrle->fb, w * h * bpp + bpp); tmp = vs->output; vs->output = vs->zrle->fb; vnc_raw_send_framebuffer_update(vs, x, y, w, h...
0
[ "CWE-401" ]
qemu
6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0
235,381,310,493,246,260,000,000,000,000,000,000,000
17
vnc: fix memory leak when vnc disconnect Currently when qemu receives a vnc connect, it creates a 'VncState' to represent this connection. In 'vnc_worker_thread_loop' it creates a local 'VncState'. The connection 'VcnState' and local 'VncState' exchange data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'. ...
static inline struct sk_buff *packet_alloc_skb(struct sock *sk, size_t prepad, size_t reserve, size_t len, size_t linear, int noblock, int *err) { struct sk_buff *skb; /* Under a page? Don't bother with paged skb. */ if (prepad + len < PAGE_SIZE || !linear) linear = len; skb...
0
[ "CWE-909" ]
linux-2.6
67286640f638f5ad41a946b9a3dc75327950248f
225,609,885,589,861,650,000,000,000,000,000,000,000
23
net: packet: fix information leak to userland packet_getname_spkt() doesn't initialize all members of sa_data field of sockaddr struct if strlen(dev->name) < 13. This structure is then copied to userland. It leads to leaking of contents of kernel stack memory. We have to fully fill sa_data with strncpy() instead of ...
inline bool is_arena_for_set_stmt() {return arena_for_set_stmt != 0;}
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
312,436,227,175,124,600,000,000,000,000,000,000,000
1
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int check_map_func_compatibility(struct bpf_map *map, int func_id) { bool bool_map, bool_func; int i; if (!map) return 0; for (i = 0; i < ARRAY_SIZE(func_limit); i++) { bool_map = (map->map_type == func_limit[i].map_type); bool_func = (func_id == func_limit[i].func_id); /* only when map & func pair...
0
[ "CWE-703" ]
linux
92117d8443bc5afacc8d5ba82e541946310f106e
241,487,013,335,499,030,000,000,000,000,000,000,000
24
bpf: fix refcnt overflow On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK, the malicious application may overflow 32-bit bpf program refcnt. It's also possible to overflow map refcnt on 1Tb system. Impose 32k hard limit which means that the same bpf program or map cannot be shared by more than ...
static struct vrend_resource *vrend_renderer_ctx_res_lookup(struct vrend_context *ctx, int res_handle) { struct vrend_resource *res = vrend_object_lookup(ctx->res_hash, res_handle, 1); return res; }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
282,431,954,771,318,620,000,000,000,000,000,000,000
6
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
GST_START_TEST (test_GstDateTime_get_minute) { GstDateTime *dt; dt = gst_date_time_new (0, 2009, 12, 1, 1, 31, 0); assert_equals_int (31, gst_date_time_get_minute (dt)); gst_date_time_unref (dt); }
0
[ "CWE-125" ]
gstreamer
9398b7f1a75b38844ae7050b5a7967e4cdebe24f
116,130,377,198,719,100,000,000,000,000,000,000,000
8
datetime: fix potential out-of-bound read on malformed datetime string https://bugzilla.gnome.org/show_bug.cgi?id=777263
static void agraph_print_node(RANode *n, void *user) { char *encbody, *cmd; int len = strlen (n->body); if (len > 0 && n->body[len - 1] == '\n') { len--; } encbody = r_base64_encode_dyn (n->body, len); cmd = r_str_newf ("agn \"%s\" base64:%s\n", n->title, encbody); r_cons_printf (cmd); free (cmd); free (enc...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
199,825,749,871,507,220,000,000,000,000,000,000,000
13
Fix #12375 - Crash in bd+ao (#12382)
static int wanxl_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) { const size_t size = sizeof(sync_serial_settings); sync_serial_settings line; port_t *port = dev_to_port(dev); if (cmd != SIOCWANDEV) return hdlc_ioctl(dev, ifr, cmd); switch (ifr->ifr_settings.type) { case IF_GET_IFACE: ifr->ifr_se...
1
[ "CWE-399" ]
linux
2b13d06c9584b4eb773f1e80bbaedab9a1c344e1
324,988,242,365,662,960,000,000,000,000,000,000,000
48
wanxl: fix info leak in ioctl The wanxl_ioctl() code fails to initialize the two padding bytes of struct sync_serial_settings after the ->loopback member. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Salva Peiró <speiro@ai2.upv.es> Signed-off-by: David S. Miller <davem...
bgp_schedule_packet(struct bgp_conn *conn, struct bgp_channel *c, int type) { ASSERT(conn->sk); DBG("BGP: Scheduling packet type %d\n", type); if (c) { if (! conn->channels_to_send) { conn->last_channel = c->index; conn->last_channel_count = 0; } c->packets_to_send |= 1 << type; ...
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
243,165,790,454,062,100,000,000,000,000,000,000,000
23
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
static int __init input_init(void) { int err; err = class_register(&input_class); if (err) { pr_err("unable to register input_dev class\n"); return err; } err = input_proc_init(); if (err) goto fail1; err = register_chrdev_region(MKDEV(INPUT_MAJOR, 0), INPUT_MAX_CHAR_DEVICES, "input"); if (err...
0
[ "CWE-703", "CWE-787" ]
linux
cb222aed03d798fc074be55e59d9a112338ee784
73,261,212,139,575,790,000,000,000,000,000,000,000
27
Input: add safety guards to input_set_keycode() If we happen to have a garbage in input device's keycode table with values too big we'll end up doing clear_bit() with offset way outside of our bitmaps, damaging other objects within an input device or even outside of it. Let's add sanity checks to the returned old keyc...
gif_get_lzw (GifContext *context) { guchar *dest, *temp; gint lower_bound, upper_bound; /* bounds for emitting the area_updated signal */ gboolean bound_flag; gint first_pass; /* bounds for emitting the area_updated signal */ gint v; if (context->frame == NULL) { context->frame = g_new (GdkPixbuf...
1
[]
gdk-pixbuf
0012e066ba37439d402ce46afbc1311530a4ec61
95,557,767,559,540,220,000,000,000,000,000,000,000
289
io-gif: Fail quickly when image dimensions are too big Fail quickly when the dimensions would create an image that's bigger than MAXINT bytes long. See https://bugzilla.gnome.org/show_bug.cgi?id=765094 https://bugzilla.gnome.org/show_bug.cgi?id=785973
static bool synic_has_vector_auto_eoi(struct kvm_vcpu_hv_synic *synic, int vector) { int i; u64 sint_value; for (i = 0; i < ARRAY_SIZE(synic->sint); i++) { sint_value = synic_read_sint(synic, i); if (synic_get_sint_vector(sint_value) == vector && sint_value & HV_SYNIC_SINT_AUTO_EOI) return tru...
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
188,499,153,277,755,720,000,000,000,000,000,000,000
14
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
int cil_gen_fsuse(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_STRING | CIL_SYN_LIST, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); char *type = NULL; struct...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
102,337,459,239,606,970,000,000,000,000,000,000,000
61
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static void nf_tables_unregister_hook(struct net *net, const struct nft_table *table, struct nft_chain *chain) { return __nf_tables_unregister_hook(net, table, chain, false); }
0
[ "CWE-400", "CWE-703" ]
linux
e02f0d3970404bfea385b6edb86f2d936db0ea2b
6,112,999,001,374,380,000,000,000,000,000,000,000
6
netfilter: nf_tables: disallow binding to already bound chain Update nft_data_init() to report EINVAL if chain is already bound. Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING") Reported-by: Gwangun Jung <exsociety@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
long do_msgsnd(int msqid, long mtype, void __user *mtext, size_t msgsz, int msgflg) { struct msg_queue *msq; struct msg_msg *msg; int err; struct ipc_namespace *ns; ns = current->nsproxy->ipc_ns; if (msgsz > ns->msg_ctlmax || (long) msgsz < 0 || msqid < 0) return -EINVAL; if (mtype < 1) return -EINVAL; ...
1
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
11,619,925,190,617,180,000,000,000,000,000,000,000
90
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
inline double abs(const double a) { return std::fabs(a); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
150,085,333,947,748,400,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.
int generic_pipe_buf_steal(struct pipe_inode_info *pipe, struct pipe_buffer *buf) { struct page *page = buf->page; /* * A reference of one is golden, that means that the owner of this * page is the only one holding a reference to it. lock the page * and return OK. */ if (page_count(page) == 1) { loc...
0
[ "CWE-17" ]
linux
f0d1bec9d58d4c038d0ac958c9af82be6eb18045
8,997,585,865,889,688,000,000,000,000,000,000,000
17
new helper: copy_page_from_iter() parallel to copy_page_to_iter(). pipe_write() switched to it (and became ->write_iter()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static int btrfs_finish_sprout(struct btrfs_trans_handle *trans) { struct btrfs_fs_info *fs_info = trans->fs_info; struct btrfs_root *root = fs_info->chunk_root; struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_dev_item *dev_item; struct btrfs_device *device; struct btrfs_key key; u8 fs_uuid[BT...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
123,159,551,672,696,830,000,000,000,000,000,000,000
71
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
static int mov_read_ddts(MOVContext *c, AVIOContext *pb, MOVAtom atom) { const uint32_t ddts_size = 20; AVStream *st = NULL; uint8_t *buf = NULL; uint32_t frame_duration_code = 0; uint32_t channel_layout_code = 0; GetBitContext gb; buf = av_malloc(ddts_size + AV_INPUT_BUFFER_PADDING_SIZE); ...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
213,206,209,699,024,300,000,000,000,000,000,000,000
61
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void start_client_init(VncState *vs) { vnc_read_when(vs, protocol_client_init, 1); }
0
[ "CWE-125" ]
qemu
bea60dd7679364493a0d7f5b54316c767cf894ef
214,813,501,088,066,830,000,000,000,000,000,000,000
4
ui/vnc: fix potential memory corruption issues this patch makes the VNC server work correctly if the server surface and the guest surface have different sizes. Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of VNC_DIRTY_PIXELS...
CollationCreate(const char *collname, Oid collnamespace, Oid collowner, char collprovider, int32 collencoding, const char *collcollate, const char *collctype, const char *collversion, bool if_not_exists, bool quiet) { Relation rel; TupleDesc tupDesc; HeapTuple tup; Datum values[Natts_pg...
1
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
136,672,221,743,889,920,000,000,000,000,000,000,000
156
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static CImg<T> get_load_off(CImgList<tf>& primitives, CImgList<tc>& colors, const char *const filename) { return CImg<T>().load_off(primitives,colors,filename); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
97,884,264,301,718,750,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.
int ecryptfs_init_crypt_ctx(struct ecryptfs_crypt_stat *crypt_stat) { char *full_alg_name; int rc = -EINVAL; if (!crypt_stat->cipher) { ecryptfs_printk(KERN_ERR, "No cipher specified\n"); goto out; } ecryptfs_printk(KERN_DEBUG, "Initializing cipher [%s]; strlen = [%d]; " "key_size_bits = [%d]\n", cry...
0
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
5,995,539,926,338,791,000,000,000,000,000,000,000
40
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
int is_dir(const char *path) { struct stat statbuf; int ret = stat(path, &statbuf); if (ret == 0 && S_ISDIR(statbuf.st_mode)) return 1; return 0; }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
268,168,445,382,929,900,000,000,000,000,000,000,000
8
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static void tsk_set_nagle(struct tipc_sock *tsk) { struct sock *sk = &tsk->sk; tsk->maxnagle = 0; if (sk->sk_type != SOCK_STREAM) return; if (tsk->nodelay) return; if (!(tsk->peer_caps & TIPC_NAGLE)) return; /* Limit node local buffer size to avoid receive queue overflow */ if (tsk->max_pkt == MAX_MSG_SIZ...
0
[ "CWE-200", "CWE-909" ]
linux
d6d86830705f173fca6087a3e67ceaf68db80523
185,088,217,439,424,400,000,000,000,000,000,000,000
17
net ticp:fix a kernel-infoleak in __tipc_sendmsg() struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently copying it to user space,causing kernel-infoleak. BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in instrument_c...
static void hci_chan_selected_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_channel_selected *ev = (void *)skb->data; struct hci_conn *hcon; BT_DBG("%s handle 0x%2.2x", hdev->name, ev->phy_handle); skb_pull(skb, sizeof(*ev)); hcon = hci_conn_hash_lookup_handle(hdev, ev->phy_handle); if (!hcon)...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
184,635,959,084,642,700,000,000,000,000,000,000,000
15
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
STATIC regnode_offset S_reg2Lanode(pTHX_ RExC_state_t *pRExC_state, const U8 op, const U32 arg1, const I32 arg2) { /* emit a node with U32 and I32 arguments */ const regnode_offset ret = regnode_guts(pRExC_state, op, regarglen[op], "reg2Lanode"); regnode_offset ptr = ret; PERL_ARGS_ASSERT_REG2LANODE; ...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
48,808,064,407,039,640,000,000,000,000,000,000,000
15
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
HttpIntegrationTest::~HttpIntegrationTest() { cleanupUpstreamAndDownstream(); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
6,023,444,121,377,227,000,000,000,000,000,000,000
1
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static void can_can_gw_rcv(struct sk_buff *skb, void *data) { struct cgw_job *gwj = (struct cgw_job *)data; struct can_frame *cf; struct sk_buff *nskb; int modidx = 0; /* * Do not handle CAN frames routed more than 'max_hops' times. * In general we should never catch this delimiter which is intended * to co...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
306,957,378,034,532,900,000,000,000,000,000,000,000
90
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static int jpc_sop_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_sop_t *sop = &ms->parms.sop; /* Eliminate compiler warning about unused variable. */ cstate = 0; if (jpc_getuint16(in, &sop->seqno)) { return -1; } return 0; }
0
[]
jasper
4031ca321d8cb5798c316ab39c7a5dc88a61fdd7
54,285,686,887,230,430,000,000,000,000,000,000,000
12
Incorporated changes from patch jasper-1.900.3-libjasper-stepsizes-overflow.patch
__acquires(rq->lock) { struct rq *rq; local_irq_disable(); rq = this_rq(); spin_lock(&rq->lock); return rq; }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
99,760,645,933,443,910,000,000,000,000,000,000,000
10
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 ...
sendAndValidateRequestAndSendResponse(absl::string_view raw_request, const TestRequestHeaderMapImpl& expected_request_headers) { Buffer::OwnedImpl buffer(raw_request); sendAndValidateRequestAndSendResponse(buffer, expected_request_headers); }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
93,095,392,678,917,030,000,000,000,000,000,000,000
5
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
RsaPrivateKeyOp( bigNum inOut, // IN/OUT: number to be exponentiated bigNum N, // IN: public modulus (can be NULL if CRT) bigNum P, // IN: one of the primes (can be NULL if not CRT) privateExponent_t *pExp ) { BOOL OK; #if CRT_FORMAT_RSA ...
0
[ "CWE-787" ]
libtpms
505ef841c00b4c096b1977c667cb957bec3a1d8b
173,215,536,329,172,000,000,000,000,000,000,000,000
43
tpm2: Fix output buffer parameter and size for RSA decyrption For the RSA decryption we have to use an output buffer of the size of the (largest possible) RSA key for the decryption to always work. This fixes a stack corruption bug that caused a SIGBUS and termination of 'swtpm'. Signed-off-by: Stefan Berger <stefan...
myodbc_remove_escape(MYSQL *mysql,char *name) { char *to; #ifdef USE_MB my_bool use_mb_flag=use_mb(mysql->charset); char *UNINIT_VAR(end); if (use_mb_flag) for (end=name; *end ; end++) ; #endif for (to=name ; *name ; name++) { #ifdef USE_MB int l; if (use_mb_flag && (l = my_ismbchar( mysql->cha...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
47,366,350,036,061,150,000,000,000,000,000,000,000
28
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
int PRINTF_ATTRIBUTE(6, 7) dsdb_domain_count( struct ldb_context *ldb, size_t *count, struct ldb_dn *base, struct dom_sid *dom_sid, enum ldb_scope scope, const char *exp_fmt, ...) { TALLOC_CTX *tmp_ctx = NULL; struct ldb_request *req = NULL; struct dsdb_count_domain_context *context = NULL; char *expression =...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
298,478,689,655,529,050,000,000,000,000,000,000,000
72
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
spread_undeadness (struct cgraph_node *node) { struct cgraph_edge *cs; for (cs = node->callees; cs; cs = cs->next_callee) if (ipa_edge_within_scc (cs)) { struct cgraph_node *callee; class ipa_node_params *info; callee = cs->callee->function_symbol (NULL); info = IPA_NODE_REF (callee); if (info && ...
0
[ "CWE-20" ]
gcc
a09ccc22459c565814f79f96586fe4ad083fe4eb
126,041,276,646,555,700,000,000,000,000,000,000,000
20
Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015) 2019-12-21 Martin Jambor <mjambor@suse.cz> PR ipa/93015 * ipa-cp.c (ipcp_store_vr_results): Check that info exists testsuite/ * gcc.dg/lto/pr93015_0.c: New test. From-SVN: r279695
static void php_wddx_process_data(void *user_data, const XML_Char *s, int len) { st_entry *ent; wddx_stack *stack = (wddx_stack *)user_data; TSRMLS_FETCH(); if (!wddx_stack_is_empty(stack) && !stack->done) { wddx_stack_top(stack, (void**)&ent); switch (Z_TYPE_P(ent)) { case ST_STRING: if (Z_STRLEN_P(en...
1
[]
php-src
1785d2b805f64eaaacf98c14c9e13107bf085ab1
286,896,486,571,092,500,000,000,000,000,000,000,000
78
Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
static int do_recv_NPWindow(rpc_message_t *message, void *p_value) { NPWindow **window_p = (NPWindow **)p_value; NPWindow *window; uint32_t window_valid; int error; if (window_p) *window_p = NULL; if ((error = rpc_message_recv_uint32(message, &window_valid)) < 0) return error; if (window_valid) { if (...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
307,664,673,312,617,660,000,000,000,000,000,000,000
24
Support all the new variables added
void ssl_calc_verify_ssl( ssl_context *ssl, unsigned char hash[36] ) { md5_context md5; sha1_context sha1; unsigned char pad_1[48]; unsigned char pad_2[48]; SSL_DEBUG_MSG( 2, ( "=> calc verify ssl" ) ); memcpy( &md5 , &ssl->handshake->fin_md5 , sizeof(md5_context) ); memcpy( &sha1, &ssl->...
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
32,354,993,895,379,150,000,000,000,000,000,000,000
43
Added max length checking of hostname
static int ssl23_get_server_hello(SSL *s) { char buf[8]; unsigned char *p; int i; int n; n=ssl23_read_bytes(s,7); if (n != 7) return(n); p=s->packet; memcpy(buf,p,n); if ((p[0] & 0x80) && (p[2] == SSL2_MT_SERVER_HELLO) && (p[5] == 0x00) && (p[6] == 0x02)) { #ifdef OPENSSL_NO_SSL2 SSLerr(SSL_F_SSL23_...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
8,342,969,773,424,761,000,000,000,000,000,000,000
204
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
inline float uint2float(const unsigned int u) { if (u<(1U<<19)) return (float)u; // Consider safe storage of unsigned int as floats until 19bits (i.e 524287) float f; const unsigned int v = u|(1U<<(8*sizeof(unsigned int)-1)); // set sign bit to 1 // use memcpy instead of simple assignment ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
161,173,259,844,094,220,000,000,000,000,000,000,000
8
.
LoRaMacStatus_t SetTxContinuousWave1( uint16_t timeout, uint32_t frequency, uint8_t power ) { Radio.SetTxContinuousWave( frequency, power, timeout ); MacCtx.MacState |= LORAMAC_TX_RUNNING; return LORAMAC_STATUS_OK; }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
49,091,462,750,977,600,000,000,000,000,000,000,000
8
Added received buffer size checks.
void MP4_BoxDumpStructure( stream_t *s, MP4_Box_t *p_box ) { MP4_BoxDumpStructure_Internal( s, p_box, 0 ); }
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
324,997,364,753,124,940,000,000,000,000,000,000,000
4
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
compileString(const char *inString, TranslationTableHeader **table, DisplayTableHeader **displayTable) { /* This function can be used to make changes to tables on the fly. */ int k; FileInfo file; if (inString == NULL) return 0; memset(&file, 0, sizeof(file)); file.fileName = inString; file.encoding = noEncodi...
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
283,685,396,562,806,150,000,000,000,000,000,000,000
21
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
sql_mode_t Field_string::value_depends_on_sql_mode() const { return has_charset() ? MODE_PAD_CHAR_TO_FULL_LENGTH : sql_mode_t(0); };
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
213,751,940,726,609,500,000,000,000,000,000,000,000
4
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...
f_getfsize(typval_T *argvars, typval_T *rettv) { char_u *fname; stat_T st; fname = tv_get_string(&argvars[0]); rettv->v_type = VAR_NUMBER; if (mch_stat((char *)fname, &st) >= 0) { if (mch_isdir(fname)) rettv->vval.v_number = 0; else { rettv->vval.v_number = (varnumber_T)st.st_siz...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
251,175,319,936,270,580,000,000,000,000,000,000,000
25
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.
static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, char *offset_base, size_t IFDlength, size_t displacement, int section_index, int ReadNextIFD, tag_table_type tag_table) { size_t length; int tag, format, components; char *value_ptr, tagname[64], cbuf[32], *outside=NULL; size_t byte_count,...
1
[ "CWE-125" ]
php-src
330f1716df49c0d3474c18b6dcd370a9dcf57422
300,204,893,993,116,120,000,000,000,000,000,000,000
322
Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
static void avic_vcpu_put(struct kvm_vcpu *vcpu) { u64 entry; struct vcpu_svm *svm = to_svm(vcpu); if (!kvm_vcpu_apicv_active(vcpu)) return; entry = READ_ONCE(*(svm->avic_physical_id_cache)); if (entry & AVIC_PHYSICAL_ID_ENTRY_IS_RUNNING_MASK) avic_update_iommu_vcpu_affinity(vcpu, -1, 0); entry &= ~AVIC_PH...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
275,786,450,144,915,560,000,000,000,000,000,000,000
15
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...
static int screen_width() { _no_display_exception(); return 0; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
36,108,338,803,144,220,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
pixReadFromTiffStream(TIFF *tif) { char *text; l_uint8 *linebuf, *data, *rowptr; l_uint16 spp, bps, photometry, tiffcomp, orientation, sample_fmt; l_uint16 *redmap, *greenmap, *bluemap; l_int32 d, wpl, bpl, comptype, i, j, k, ncolors, rval, gval, bval, aval; l_int32 xres, yres, tiffbpl, packedbpl, half...
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
288,150,895,440,705,820,000,000,000,000,000,000,000
264
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
Status V2UserDocumentParser::checkValidUserDocument(const BSONObj& doc) const { BSONElement userElement = doc[AuthorizationManager::USER_NAME_FIELD_NAME]; BSONElement userDBElement = doc[AuthorizationManager::USER_DB_FIELD_NAME]; BSONElement credentialsElement = doc[CREDENTIALS_FIELD_NAME]; BSONElement ...
1
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
215,113,309,401,945,600,000,000,000,000,000,000,000
76
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
//! Load image from a file \newinstance. static CImg<T> get_load(const char *const filename) { return CImg<T>().load(filename);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
230,198,680,280,871,250,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int apply_credentials(git_buf *buf, http_subtransport *t) { git_cred *cred = t->cred; git_http_auth_context *context; /* Apply the credentials given to us in the URL */ if (!cred && t->connection_data.user && t->connection_data.pass) { if (!t->url_cred && git_cred_userpass_plaintext_new(&t->url_cred, ...
0
[ "CWE-284" ]
libgit2
b5c6a1b407b7f8b952bded2789593b68b1876211
200,177,796,439,104,740,000,000,000,000,000,000,000
24
http: check certificate validity before clobbering the error variable
static void property_set_discoverable(const GDBusPropertyTable *property, DBusMessageIter *iter, GDBusPendingPropertySet id, void *user_data) { struct btd_adapter *adapter = user_data; if (adapter->discoverable_timeout > 0 && !btd_adapter_get_powered(adapter)) { g_dbus_pending_property_error(id, ERROR_I...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
273,541,824,009,246,560,000,000,000,000,000,000,000
18
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void ide_atapi_cmd_read_dma(IDEState *s, int lba, int nb_sectors, int sector_size) { s->lba = lba; s->packet_transfer_size = nb_sectors * sector_size; s->io_buffer_index = 0; s->io_buffer_size = 0; s->cd_sector_size = sector_size; bdrv_acct_start(s->bs,...
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
186,819,673,504,506,500,000,000,000,000,000,000,000
16
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
vrrp_garp_delay_handler(vector_t *strvec) { unsigned timeout; if (!read_unsigned_strvec(strvec, 1, &timeout, 0, UINT_MAX / TIMER_HZ, true)) { report_config_error(CONFIG_GENERAL_ERROR, "vrrp_garp_master_delay '%s' invalid - ignoring", FMT_STR_VSLOT(strvec, 1)); return; } global_data...
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
111,040,114,476,585,180,000,000,000,000,000,000,000
11
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
struct btrfs_dir_item *btrfs_match_dir_item_name(struct btrfs_root *root, struct btrfs_path *path, const char *name, int name_len) { struct btrfs_dir_item *dir_item; unsigned long name_ptr; u32 total_len; u32 cur = 0; u32 this_len; struct extent_buffer *leaf; leaf = path->nodes[0]; dir_item = btr...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
262,206,671,608,514,400,000,000,000,000,000,000,000
33
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs, int granularity) { int64_t bitmap_size; BdrvDirtyBitmap *bitmap; assert((granularity & (granularity - 1)) == 0); granularity >>= BDRV_SECTOR_BITS; assert(granularity); bitmap_size = (bdrv_getlength(bs) >> BDRV_SECTOR_BITS); bi...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
20,825,212,826,243,446,000,000,000,000,000,000,000
15
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...
void stat_remove_node(SpiceServer *reds, RedStatNode *node) { if (node->ref != INVALID_STAT_REF) { stat_file_remove_node(reds->stat_file, node->ref); node->ref = INVALID_STAT_REF; } }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
115,942,063,082,157,020,000,000,000,000,000,000,000
7
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>
GF_Err fiin_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; FDItemInformationBox *ptr = (FDItemInformationBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u16(bs, gf_list_count(ptr->partition_entries) ); return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
269,875,020,807,431,200,000,000,000,000,000,000,000
11
fixed #1587
table_map used_tables() const { return orig_item->used_tables(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
99,911,701,012,299,580,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....