func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
TPMI_ST_COMMAND_TAG_Unmarshal(TPMI_ST_COMMAND_TAG *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = TPM_ST_Unmarshal(target, buffer, size); } if (rc == TPM_RC_SUCCESS) { switch (*target) { case TPM_ST_NO_SESSIONS: case TPM_ST_SESSIONS: br...
1
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
59,578,710,054,784,050,000,000,000,000,000,000,000
18
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
rsvg_processing_instruction (void *ctx, const xmlChar * target, const xmlChar * data) { /* http://www.w3.org/TR/xml-stylesheet/ */ RsvgHandle *handle = (RsvgHandle *) ctx; if (!strcmp ((const char *) target, "xml-stylesheet")) { RsvgPropertyBag *atts; char **xml_atts; xml_atts = rs...
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
189,567,688,276,331,750,000,000,000,000,000,000,000
47
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
PHP_FUNCTION(glob) { int cwd_skip = 0; #ifdef ZTS char cwd[MAXPATHLEN]; char work_pattern[MAXPATHLEN]; char *result; #endif char *pattern = NULL; int pattern_len; long flags = 0; glob_t globbuf; int n; int ret; zend_bool basedir_limit = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &patter...
1
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
28,467,511,144,185,075,000,000,000,000,000,000,000
122
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void WebContents::ReceivePostMessage( const std::string& channel, blink::TransferableMessage message, content::RenderFrameHost* render_frame_host) { v8::Isolate* isolate = JavascriptEnvironment::GetIsolate(); v8::HandleScope handle_scope(isolate); auto wrapped_ports = MessagePort::EntanglePorts(...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
225,659,265,837,022,760,000,000,000,000,000,000,000
14
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
void operator+=(ActionSet& target, const ActionSet& source) { target.addAllActionsFromSet(source); }
0
[ "CWE-20" ]
mongo
cbec187266a9f902b3906ae8ccef2bbda0c5b27b
180,027,829,165,095,630,000,000,000,000,000,000,000
3
SERVER-36263 Bypassing operation validation in applyOps should require special privilege
input_csi_dispatch_sgr_rgb(struct input_ctx *ictx, int fgbg, u_int *i) { int r, g, b; r = input_get(ictx, (*i) + 1, 0, -1); g = input_get(ictx, (*i) + 2, 0, -1); b = input_get(ictx, (*i) + 3, 0, -1); if (input_csi_dispatch_sgr_rgb_do(ictx, fgbg, r, g, b)) (*i) += 3; }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
60,180,665,640,504,790,000,000,000,000,000,000,000
10
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
yang_free_inout(struct ly_ctx *ctx, struct lys_node_inout *inout) { uint8_t i; yang_tpdf_free(ctx, inout->tpdf, 0, inout->tpdf_size); free(inout->tpdf); for (i = 0; i < inout->must_size; ++i) { lys_restr_free(ctx, &inout->must[i], NULL); } free(inout->must); }
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
110,667,010,100,671,250,000,000,000,000,000,000,000
12
yang parser BUGFIX double free Fixes #742
void HGraphBuilder::VisitTryFinallyStatement(TryFinallyStatement* stmt) { ASSERT(!HasStackOverflow()); ASSERT(current_block() != NULL); ASSERT(current_block()->HasPredecessor()); return Bailout("TryFinallyStatement"); }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
333,584,859,615,092,300,000,000,000,000,000,000,000
6
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...
ews_affected_tasks_to_str (EwsAffectedTaskOccurrencesType affected_tasks) { switch (affected_tasks) { case EWS_NONE_OCCURRENCES: return NULL; case EWS_ALL_OCCURRENCES: return "AllOccurrences"; case EWS_SPECIFIED_OCCURRENCE_ONLY: return "SpecifiedOccurrenceOnly"; } return NULL; }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
79,625,207,902,011,160,000,000,000,000,000,000,000
12
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
static void ocfs2_write_end_inline(struct inode *inode, loff_t pos, unsigned len, unsigned *copied, struct ocfs2_dinode *di, struct ocfs2_write_ctxt *wc) { void *kaddr; if (unlikely(*copied < len)) { if (!PageUptodate(wc->w_target_page)) { *copied = 0; return; } } kaddr = kmap_atomi...
0
[ "CWE-362" ]
linux
3e4c56d41eef5595035872a2ec5a483f42e8917f
122,780,652,356,326,100,000,000,000,000,000,000,000
24
ocfs2: ip_alloc_sem should be taken in ocfs2_get_block() ip_alloc_sem should be taken in ocfs2_get_block() when reading file in DIRECT mode to prevent concurrent access to extent tree with ocfs2_dio_end_io_write(), which may cause BUGON in the following situation: read file 'A' end_io...
const CImg<T>& _save_pandore(std::FILE *const file, const char *const filename, const unsigned int colorspace) const { #define __cimg_save_pandore_case(dtype) \ dtype *buffer = new dtype[size()]; \ const T *ptrs = _data; \ cimg_foroff(*this,off) *(buffer++) = (...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
209,912,433,754,183,400,000,000,000,000,000,000,000
154
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
PHP_FUNCTION(imagechar) { php_imagechar(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
296,274,749,028,328,240,000,000,000,000,000,000,000
4
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
bool Field_time::send_binary(Protocol *protocol) { MYSQL_TIME ltime; get_date(&ltime, TIME_TIME_ONLY); return protocol->store_time(&ltime, decimals()); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
110,852,613,278,013,160,000,000,000,000,000,000,000
6
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 gdFontPtr php_find_gd_font(int size TSRMLS_DC) { gdFontPtr font; int ind_type; switch (size) { case 1: font = gdFontTiny; break; case 2: font = gdFontSmall; break; case 3: font = gdFontMediumBold; break; case 4: font = gdFontLarge; break; case 5: font = gdFontGia...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
252,084,028,803,008,780,000,000,000,000,000,000,000
35
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
int __save_altstack(stack_t __user *uss, unsigned long sp) { struct task_struct *t = current; return __put_user((void __user *)t->sas_ss_sp, &uss->ss_sp) | __put_user(sas_ss_flags(sp), &uss->ss_flags) | __put_user(t->sas_ss_size, &uss->ss_size); }
0
[ "CWE-399" ]
linux
b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
227,410,278,758,141,300,000,000,000,000,000,000,000
7
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls This fixes a kernel memory contents leak via the tkill and tgkill syscalls for compat processes. This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field when handling signals delivered from tkill. The place of the infoleak: int ...
void sigchld_handler(int s) { int* status=NULL; int* i; pid_t pid; int done=0; while(!done && (pid=wait(status)) > 0) { if(WIFEXITED(status)) { msg3(LOG_INFO, "Child exited with %d", WEXITSTATUS(status)); msg3(LOG_INFO, "pid is %d", pid); done=1; } i=g_hash_table_lookup(children, &pid); if...
0
[ "CWE-119" ]
nbd
4ed24fe0d64c7cc9963c57b52cad1555ad7c6b60
316,108,564,135,260,700,000,000,000,000,000,000,000
21
r134: CVE-2005-3534
static int everybody_uninteresting(struct commit_list *orig, struct commit **interesting_cache) { struct commit_list *list = orig; if (*interesting_cache) { struct commit *commit = *interesting_cache; if (!(commit->object.flags & UNINTERESTING)) return 0; } while (list) { struct commit *commit = l...
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
252,628,410,620,490,640,000,000,000,000,000,000,000
22
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
static int svm_check_intercept(struct kvm_vcpu *vcpu, struct x86_instruction_info *info, enum x86_intercept_stage stage, struct x86_exception *exception) { struct vcpu_svm *svm = to_svm(vcpu); int vmexit, ret = X86EMUL_CONTINUE; struct __x86_intercept icpt_info; struct vmcb *vmcb = svm...
0
[ "CWE-835" ]
linux
e72436bc3a5206f95bb384e741154166ddb3202e
181,757,803,024,389,100,000,000,000,000,000,000,000
121
KVM: SVM: avoid infinite loop on NPF from bad address When a nested page fault is taken from an address that does not have a memslot associated to it, kvm_mmu_do_page_fault returns RET_PF_EMULATE (via mmu_set_spte) and kvm_mmu_page_fault then invokes svm_need_emulation_on_page_fault. The default answer there is to re...
thisudp (struct dns_transmit *d) { const char *ip = NULL; socketfree (d); mergefree (d); while (d->udploop < 4) { for (; d->curserver < 16; ++d->curserver) { ip = d->servers + 4 * d->curserver; if (byte_diff (ip, 4, "\0\0\0\0")) { ...
0
[ "CWE-362" ]
ndjbdns
177b5522e9b3d25778001c8cebfddd4d2973fcfd
269,829,857,078,382,760,000,000,000,000,000,000,000
63
Merge identical outgoing requests - patch 2. This patch fixes dnscache to combine *same* client queries into one single outgoing request, thus securing the server from possible cache poisoning attacks. The merges operation takes place in the dns_transmit layer, rather than between query and dns_transmit layers, as don...
static struct event *get_request_event(struct auth_request *request, const char *subsystem) { if (subsystem == AUTH_SUBSYS_DB) return authdb_event(request); else if (subsystem == AUTH_SUBSYS_MECH) return request->mech_event; else return request->event; }
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
264,977,364,210,677,470,000,000,000,000,000,000,000
10
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
evdev_is_scrolling(const struct evdev_device *device, enum libinput_pointer_axis axis) { assert(axis == LIBINPUT_POINTER_AXIS_SCROLL_HORIZONTAL || axis == LIBINPUT_POINTER_AXIS_SCROLL_VERTICAL); return (device->scroll.direction & bit(axis)) != 0; }
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
100,505,746,616,349,190,000,000,000,000,000,000,000
8
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
PHP_FUNCTION(locale_get_display_name) { get_icu_disp_value_src_php( DISP_NAME , INTERNAL_FUNCTION_PARAM_PASSTHRU ); }
1
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
198,537,496,493,742,040,000,000,000,000,000,000,000
4
Fix bug #72241: get_icu_value_internal out-of-bounds read
basic_pin_checks (const char *pinvalue, int minlen, int maxlen) { if (strlen (pinvalue) < minlen) { log_error ("PIN is too short; minimum length is %d\n", minlen); return gpg_error (GPG_ERR_BAD_PIN); } if (strlen (pinvalue) > maxlen) { log_error ("PIN is too large; maximum length is %d...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
271,122,047,829,585,480,000,000,000,000,000,000,000
14
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
SEQSET_ITERATOR *mutt_seqset_iterator_new (const char *seqset) { SEQSET_ITERATOR *iter; if (!seqset || !*seqset) return NULL; iter = safe_calloc (1, sizeof(SEQSET_ITERATOR)); iter->full_seqset = safe_strdup (seqset); iter->eostr = strchr (iter->full_seqset, '\0'); iter->substr_cur = iter->substr_end =...
0
[ "CWE-125" ]
mutt
7c4779ac24d2fb68a2a47b58c7904118f40965d5
113,652,513,552,045,430,000,000,000,000,000,000,000
14
Fix seqset iterator when it ends in a comma. If the seqset ended with a comma, the substr_end marker would be just before the trailing nul. In the next call, the loop to skip the marker would iterate right past the end of string too. The fix is simple: place the substr_end marker and skip past it immediately.
static ssize_t sched_mc_power_savings_show(struct sysdev_class *class, struct sysdev_class_attribute *attr, char *page) { return sprintf(page, "%u\n", sched_mc_power_savings); }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
81,467,200,674,115,840,000,000,000,000,000,000,000
6
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
void LinkResolver::linktime_resolve_static_method(methodHandle& resolved_method, KlassHandle resolved_klass, Symbol* method_name, Symbol* method_signature, KlassHandle current_klass, bool check_access, TRAPS) { if (!r...
0
[]
jdk8u
f14e35d20e1a4d0f507f05838844152f2242c6d3
302,916,981,954,628,900,000,000,000,000,000,000,000
21
8281866: Enhance MethodHandle invocations Reviewed-by: andrew Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
bool Item_sp_variable::is_null() { return this_item()->is_null(); }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
93,842,861,827,198,170,000,000,000,000,000,000,000
4
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
adisplay_change_gamma( ADisplay display, double delta ) { display->gamma += delta; if ( display->gamma > 3.0 ) display->gamma = 3.0; else if ( display->gamma < 0.0 ) display->gamma = 0.0; grSetGlyphGamma( display->gamma ); }
0
[ "CWE-120" ]
freetype2-demos
b995299b73ba4cd259f221f500d4e63095508bec
89,231,329,137,390,390,000,000,000,000,000,000,000
11
Fix Savannah bug #30054. * src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c, src/ftview.c: Use precision for `%s' where appropriate to avoid buffer overflows.
static void *merge_core_dir_configs(apr_pool_t *a, void *basev, void *newv) { core_dir_config *base = (core_dir_config *)basev; core_dir_config *new = (core_dir_config *)newv; core_dir_config *conf; /* Create this conf by duplicating the base, replacing elements * (or creating copies for merging) ...
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
30,942,284,598,839,604,000,000,000,000,000,000,000
233
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
vector<OSDHealthMetric> OSD::get_health_metrics() { vector<OSDHealthMetric> metrics; lock_guard<mutex> pending_creates_locker{pending_creates_lock}; auto n_primaries = pending_creates_from_mon; for (const auto& create : pending_creates_from_osd) { if (create.second) { n_primaries++; } } metric...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
110,470,901,820,569,670,000,000,000,000,000,000,000
13
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
int slirp_getsockname_wrap(int sockfd, struct sockaddr *addr, int *addrlen) { int ret; ret = getsockname(sockfd, addr, addrlen); if (ret < 0) { errno = socket_error(); } return ret; }
0
[ "CWE-120" ]
libslirp
30648c03b27fb8d9611b723184216cd3174b6775
166,320,555,764,252,340,000,000,000,000,000,000,000
9
util: add slirp_fmt() helpers Various calls to snprintf() in libslirp assume that snprintf() returns "only" the number of bytes written (excluding terminating NUL). https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04 "Upon successful completion, the snprintf() function shall return...
void ConnectionManagerImpl::ActiveStreamDecoderFilter::removeDownstreamWatermarkCallbacks( DownstreamWatermarkCallbacks& watermark_callbacks) { ASSERT(std::find(parent_.watermark_callbacks_.begin(), parent_.watermark_callbacks_.end(), &watermark_callbacks) != parent_.watermark_callbacks_.end())...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
300,634,534,023,071,220,000,000,000,000,000,000,000
6
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
hexValue(FileInfo *nested, const widechar *digits, int length) { int k; unsigned int binaryValue = 0; for (k = 0; k < length; k++) { unsigned int hexDigit = 0; if (digits[k] >= '0' && digits[k] <= '9') hexDigit = digits[k] - '0'; else if (digits[k] >= 'a' && digits[k] <= 'f') hexDigit = digits[k] - 'a' +...
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
17,480,233,820,521,688,000,000,000,000,000,000,000
19
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
void cil_destroy_classperms(struct cil_classperms *cp) { if (cp == NULL) { return; } cil_list_destroy(&cp->perm_strs, CIL_TRUE); cil_list_destroy(&cp->perms, CIL_FALSE); free(cp); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
174,279,837,345,848,850,000,000,000,000,000,000,000
11
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 canbcm_pernet_exit(struct net *net) { #if IS_ENABLED(CONFIG_PROC_FS) /* remove /proc/net/can-bcm directory */ if (net->can.bcmproc_dir) remove_proc_entry("can-bcm", net->proc_net); #endif /* CONFIG_PROC_FS */ }
0
[ "CWE-362" ]
linux
d5f9023fa61ee8b94f37a93f08e94b136cf1e463
177,685,404,343,180,260,000,000,000,000,000,000,000
8
can: bcm: delay release of struct bcm_op after synchronize_rcu() can_rx_register() callbacks may be called concurrently to the call to can_rx_unregister(). The callbacks and callback data, though, are protected by RCU and the struct sock reference count. So the callback data is really attached to the life of sk, mean...
static handle_t *ocfs2_zero_start_ordered_transaction(struct inode *inode, struct buffer_head *di_bh) { struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); handle_t *handle = NULL; int ret = 0; if (!ocfs2_should_order_data(inode)) goto out; handle = ocfs2_start_trans(osb, OCFS2_INODE_UPDATE_CREDITS); if (I...
0
[ "CWE-401" ]
linux
28f5a8a7c033cbf3e32277f4cc9c6afd74f05300
64,676,850,860,084,760,000,000,000,000,000,000,000
37
ocfs2: should wait dio before inode lock in ocfs2_setattr() we should wait dio requests to finish before inode lock in ocfs2_setattr(), otherwise the following deadlock will happen: process 1 process 2 process 3 truncate file 'A' end_io of writing file 'A' receiving the ...
garbage_collect_globvars(int copyID) { return set_ref_in_ht(&globvarht, copyID, NULL); }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
27,168,178,909,206,443,000,000,000,000,000,000,000
4
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
static int __snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info) { struct snd_rawmidi *rmidi; struct snd_rawmidi_str *pstr; struct snd_rawmidi_substream *substream; rmidi = snd_rawmidi_search(card, info->device); if (!rmidi) return -ENXIO; if (info->stream < 0 || info->stream...
0
[ "CWE-415" ]
linux
39675f7a7c7e7702f7d5341f1e0d01db746543a0
323,370,133,729,265,400,000,000,000,000,000,000,000
23
ALSA: rawmidi: Change resized buffers atomically The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the current code is racy. For example, the sequencer client may write to buffer while it being resized. As a simple workaround, let's switch to the resized buffer inside the stream runtime lock. Reported...
static void *pool_calloc(size_t count, size_t size) { size_t len = count * size; void *r = pool_alloc(len); memset(r, 0, len); return r; }
0
[]
git
68061e3470210703cb15594194718d35094afdc0
319,244,333,609,948,600,000,000,000,000,000,000,000
7
fast-import: disallow "feature export-marks" by default The fast-import stream command "feature export-marks=<path>" lets the stream write marks to an arbitrary path. This may be surprising if you are running fast-import against an untrusted input (which otherwise cannot do anything except update Git objects and refs)...
static void vmx_flush_tlb(struct kvm_vcpu *vcpu) { vpid_sync_context(to_vmx(vcpu)); if (enable_ept) { if (!VALID_PAGE(vcpu->arch.mmu.root_hpa)) return; ept_sync_context(construct_eptp(vcpu->arch.mmu.root_hpa)); } }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
227,304,387,405,761,870,000,000,000,000,000,000,000
9
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
**/ CImg<T>& load_ffmpeg_external(const char *const filename, const char axis='z', const float align=0) { return get_load_ffmpeg_external(filename,axis,align).move_to(*this);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
239,843,001,677,055,700,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int selinux_sb_show_options(struct seq_file *m, struct super_block *sb) { struct superblock_security_struct *sbsec = sb->s_security; int rc; if (!(sbsec->flags & SE_SBINITIALIZED)) return 0; if (!selinux_initialized(&selinux_state)) return 0; if (sbsec->flags & FSCONTEXT_MNT) { seq_putc(m, ','); ...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
63,853,410,562,382,390,000,000,000,000,000,000,000
47
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
static void dns_resolver_free_preparse(struct key_preparsed_payload *prep) { pr_devel("==>%s()\n", __func__); kfree(prep->payload[0]); }
0
[ "CWE-476" ]
linux
c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81
2,507,682,620,499,836,300,000,000,000,000,000,000
6
KEYS: Remove key_type::match in favour of overriding default by match_preparse A previous patch added a ->match_preparse() method to the key type. This is allowed to override the function called by the iteration algorithm. Therefore, we can just set a default that simply checks for an exact match of the key descripti...
mask2plen(uint32_t mask) { uint32_t bitmasks[33] = { 0x00000000, 0x80000000, 0xc0000000, 0xe0000000, 0xf0000000, 0xf8000000, 0xfc000000, 0xfe000000, 0xff000000, 0xff800000, 0xffc00000, 0xffe00000, 0xfff00000, 0xfff80000, 0xfffc0000, 0xfffe0000, 0xffff0000, 0xffff8000, 0xffffc000, 0xffffe000, 0xfffff000, ...
0
[ "CWE-119", "CWE-125" ]
tcpdump
9f0730bee3eb65d07b49fd468bc2f269173352fe
340,262,916,073,734,400,000,000,000,000,000,000,000
23
CVE-2017-13011/Properly check for buffer overflow in bittok2str_internal(). Also, make the buffer bigger. This fixes a buffer overflow discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s), modified so the capture file won't be rejected as an invalid capture.
const char* menu_cache_item_get_id( MenuCacheItem* item ) { return item->id; }
0
[ "CWE-20" ]
menu-cache
56f66684592abf257c4004e6e1fff041c64a12ce
266,345,981,322,262,850,000,000,000,000,000,000,000
4
Fix potential access violation, use runtime user dir instead of tmp dir. Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0.
static void sc_make_slave_mount_ns(void) { if (unshare(CLONE_NEWNS) < 0) { die("can not unshare mount namespace"); } // In our new mount namespace, recursively change all mounts // to slave mode, so we see changes from the parent namespace // but don't propagate our own changes. sc_do_mount("none", "/", NULL, M...
0
[ "CWE-59", "CWE-703" ]
snapd
bdbfeebef03245176ae0dc323392bb0522a339b1
161,477,875,688,392,550,000,000,000,000,000,000,000
10
cmd/snap-confine: chown private /tmp parent to root.root When snap-confine creates a private /tmp directory for a given snap it first creates a temporary directory in /tmp/ named after the snap, along with a random name. Inside that directory it creates a /tmp directory with permissions appropriate for a future /tmp, ...
pblock_analytics_destroy(Slapi_PBlock *pb) { /* Some parts of DS re-use or double free pblocks >.< */ if (pb->analytics_init != ANALYTICS_MAGIC) { return; } /* Free the array of values */ PL_HashTableDestroy(pb->analytics); pb->analytics_init = 0; }
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
105,530,359,714,257,710,000,000,000,000,000,000,000
10
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
vmx_restore_control_msr(struct vcpu_vmx *vmx, u32 msr_index, u64 data) { u64 supported; u32 *lowp, *highp; switch (msr_index) { case MSR_IA32_VMX_TRUE_PINBASED_CTLS: lowp = &vmx->nested.msrs.pinbased_ctls_low; highp = &vmx->nested.msrs.pinbased_ctls_high; break; case MSR_IA32_VMX_TRUE_PROCBASED_CTLS: lowp...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
29,756,511,619,575,035,000,000,000,000,000,000,000
44
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
static void test_status() { const char *status; DBUG_ENTER("test_status"); myheader("test_status"); if (!(status= mysql_stat(mysql))) { myerror("mysql_stat failed"); /* purecov: inspected */ die(__FILE__, __LINE__, "mysql_stat failed"); /* purecov: inspected */ } DBUG_VOID_RETURN;...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
319,907,303,428,120,800,000,000,000,000,000,000,000
13
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
nfssvc_encode_entry(void *ccdv, const char *name, int namlen, loff_t offset, u64 ino, unsigned int d_type) { struct readdir_cd *ccd = ccdv; struct nfsd_readdirres *cd = container_of(ccd, struct nfsd_readdirres, common); __be32 *p = cd->buffer; int buflen, slen; /* dprintk("nfsd: entry(%.*s off %ld ino %ld)...
0
[ "CWE-119", "CWE-703" ]
linux
13bf9fbff0e5e099e2b6f003a0ab8ae145436309
212,701,624,216,950,500,000,000,000,000,000,000,000
43
nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could b...
static int burl_normalize_2F_to_slash_fix (buffer *b, int qs, int i) { char * const s = b->ptr; const int blen = (int)buffer_string_length(b); const int used = qs < 0 ? blen : qs; int j = i; for (; i < used; ++i, ++j) { s[j] = s[i]; if (s[i] == '%' && s[i+1] == '2' && s[i+2] == 'F') ...
1
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
177,820,008,027,414,100,000,000,000,000,000,000,000
20
[core] fix abort in http-parseopts (fixes #2945) fix abort in server.http-parseopts with url-path-2f-decode enabled (thx stze) x-ref: "Security - SIGABRT during GET request handling with url-path-2f-decode enabled" https://redmine.lighttpd.net/issues/2945
static irqreturn_t armpmu_dispatch_irq(int irq, void *dev) { struct arm_pmu *armpmu = (struct arm_pmu *) dev; struct platform_device *plat_device = armpmu->plat_device; struct arm_pmu_platdata *plat = dev_get_platdata(&plat_device->dev); if (plat && plat->handle_irq) return plat->handle_irq(irq, dev, armpmu->han...
0
[ "CWE-20" ]
linux
c95eb3184ea1a3a2551df57190c81da695e2144b
320,286,143,474,899,100,000,000,000,000,000,000,000
11
ARM: 7809/1: perf: fix event validation for software group leaders It is possible to construct an event group with a software event as a group leader and then subsequently add a hardware event to the group. This results in the event group being validated by adding all members of the group to a fake PMU and attempting ...
njs_array_is_array(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t unused) { const njs_value_t *value; if (nargs > 1 && njs_is_array(&args[1])) { value = &njs_value_true; } else { value = &njs_value_false; } vm->retval = *value; return NJS_OK; }
0
[ "CWE-703" ]
njs
2e00e95473861846aa8538be87db07699d9f676d
269,248,374,721,252,660,000,000,000,000,000,000,000
16
Fixed Array.prototype.slice() with slow "this" argument. Previously, when "this" argument was not a fast array, but the "deleted" array was a fast array, the "deleted" array may be left in uninitialized state if "this" argument had gaps. This fix is to ensure that "deleted" is properly initialized. This fixes #485 i...
static void nested_save_pending_event_to_vmcb12(struct vcpu_svm *svm, struct vmcb *vmcb12) { struct kvm_vcpu *vcpu = &svm->vcpu; u32 exit_int_info = 0; unsigned int nr; if (vcpu->arch.exception.injected) { nr = vcpu->arch.exception.nr; exit_int_info = nr | SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_EXEPT; if ...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
28,757,710,108,145,540,000,000,000,000,000,000,000
32
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static void khugepaged_alloc_sleep(void) { DEFINE_WAIT(wait); add_wait_queue(&khugepaged_wait, &wait); schedule_timeout_interruptible( msecs_to_jiffies( khugepaged_alloc_sleep_millisecs)); remove_wait_queue(&khugepaged_wait, &wait); }
0
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
97,950,178,169,881,240,000,000,000,000,000,000,000
9
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
GetConnectionTypeInfo(struct upnphttp * h, const char * action, const char * ns) { #if 0 static const char resp[] = "<u:GetConnectionTypeInfoResponse " "xmlns:u=\"" SERVICE_TYPE_WANIPC "\">" "<NewConnectionType>IP_Routed</NewConnectionType>" "<NewPossibleConnectionTypes>IP_Routed</NewPossibleConnectionTypes>" ...
0
[ "CWE-476" ]
miniupnp
13585f15c7f7dc28bbbba1661efb280d530d114c
244,499,761,161,371,920,000,000,000,000,000,000,000
23
GetOutboundPinholeTimeout: check args
uint32_t vrend_renderer_object_insert(struct vrend_context *ctx, void *data, uint32_t size, uint32_t handle, enum virgl_object_type type) { return vrend_object_insert(ctx->sub->object_hash, data, size, handle, type); }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
205,069,889,398,934,920,000,000,000,000,000,000,000
5
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>
void qemu_del_net_client(NetClientState *nc) { NetClientState *ncs[MAX_QUEUE_NUM]; int queues, i; NetFilterState *nf, *next; assert(nc->info->type != NET_CLIENT_DRIVER_NIC); /* If the NetClientState belongs to a multiqueue backend, we will change all * other NetClientStates also. */ ...
0
[ "CWE-190" ]
qemu
25c01bd19d0e4b66f357618aeefda1ef7a41e21a
88,889,519,070,517,650,000,000,000,000,000,000,000
48
net: drop too large packet early We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_...
SPL_METHOD(SplHeap, isEmpty) { spl_heap_object *intern = (spl_heap_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE) { return; } RETURN_BOOL(spl_ptr_heap_count(intern->heap)==0); }
0
[]
php-src
1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1
91,444,461,372,965,400,000,000,000,000,000,000,000
10
Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error
ZEND_VM_COLD_CONSTCONST_HANDLER(187, ZEND_SWITCH_LONG, CONST|TMPVARCV, CONST, JMP_ADDR) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op, *jump_zv; HashTable *jumptable; op = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); jumptable = Z_ARRVAL_P(GET_OP2_ZVAL_PTR(BP_VAR_R)); if (Z_TYPE_P(op) != IS_LONG) { ZVAL_DEREF(...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
95,280,319,460,649,030,000,000,000,000,000,000,000
28
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static int consume(struct archive_read* a, int64_t how_many) { int ret; ret = how_many == __archive_read_consume(a, how_many) ? ARCHIVE_OK : ARCHIVE_FATAL; return ret; }
0
[ "CWE-20", "CWE-125" ]
libarchive
94821008d6eea81e315c5881cdf739202961040a
193,776,390,077,581,300,000,000,000,000,000,000,000
9
RAR5 reader: reject files that declare invalid header flags One of the fields in RAR5's base block structure is the size of the header. Some invalid files declare a 0 header size setting, which can confuse the unpacker. Minimum header size for RAR5 base blocks is 7 bytes (4 bytes for CRC, and 3 bytes for the rest), so...
bool samdb_is_pdc(struct ldb_context *ldb) { int ret; bool is_pdc; ret = samdb_reference_dn_is_our_ntdsa(ldb, ldb_get_default_basedn(ldb), "fsmoRoleOwner", &is_pdc); if (ret != LDB_SUCCESS) { DEBUG(1,("Failed to find if we are the PDC for this ldb: Searching for fSMORoleOwner in %s failed: %s\n", ...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
81,752,673,046,924,230,000,000,000,000,000,000,000
16
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...
ofputil_put_ofp13_table_stats(const struct ofputil_table_stats *stats, struct ofpbuf *buf) { struct ofp13_table_stats *out; out = ofpbuf_put_zeros(buf, sizeof *out); out->table_id = stats->table_id; out->active_count = htonl(stats->active_count); out->lookup_count = ht...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
293,778,274,405,088,050,000,000,000,000,000,000,000
11
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
TORRENT_TEST(unepected_eof) { char b[] = "l2:.."; // expected terminating 'e' bdecode_node e; error_code ec; int pos; int ret = bdecode(b, b + sizeof(b)-1, e, ec, &pos); TEST_EQUAL(ret, -1); TEST_EQUAL(pos, 5); TEST_EQUAL(ec, error_code(bdecode_errors::unexpected_eof)); printf("%s\n", print_entry(e).c_str());...
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
93,195,628,510,034,140,000,000,000,000,000,000,000
13
fix out-of-bounds read in bdecode Fixes #2099
load_data_skip (struct archive *a, void *client_data, gint64 request) { GSeekable *seekable; off_t old_offset, new_offset; LoadData *load_data = client_data; seekable = (GSeekable*)(load_data->istream); if (load_data->error != NULL || load_data->istream == NULL) return -1; old_off...
0
[ "CWE-22" ]
file-roller
21dfcdbfe258984db89fb65243a1a888924e45a0
169,951,292,419,786,620,000,000,000,000,000,000,000
20
libarchive: do not follow external links when extracting files Do not extract a file if its parent is a symbolic link to a directory external to the destination.
bash_vi_complete (count, key) int count, key; { #if defined (SPECIFIC_COMPLETION_FUNCTIONS) int p, r; char *t; if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point]))) { if (!whitespace (rl_line_buffer[rl_point + 1])) rl_vi_end_word (1, 'E'); rl_point++; } /* Find boundar...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
251,614,904,769,585,060,000,000,000,000,000,000,000
49
Bash-4.4 patch 7
ccid_vendor_specific_init (ccid_driver_t handle) { if (handle->id_vendor == VENDOR_VEGA && handle->id_product == VEGA_ALPHA) { int r; /* * Vega alpha has a feature to show retry counter on the pinpad * display. But it assumes that the card returns the value of * retry counter by ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
13,838,753,724,262,084,000,000,000,000,000,000,000
23
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
int pipe_resize_ring(struct pipe_inode_info *pipe, unsigned int nr_slots) { struct pipe_buffer *bufs; unsigned int head, tail, mask, n; bufs = kcalloc(nr_slots, sizeof(*bufs), GFP_KERNEL_ACCOUNT | __GFP_NOWARN); if (unlikely(!bufs)) return -ENOMEM; spin_lock_irq(&pipe->rd_wait.lock); mask = pipe->rin...
0
[ "CWE-362" ]
linux
189b0ddc245139af81198d1a3637cac74f96e13a
251,283,999,615,483,950,000,000,000,000,000,000,000
59
pipe: Fix missing lock in pipe_resize_ring() pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to prevent post_one_notification() from trying to insert into the ring whilst the ring is being replaced. The occupancy check must be done after the lock is taken, and the lock must be taken after the new rin...
static char *strndup(const char *s, size_t n) { char *r; r = malloc(n + 1); if (!r) return NULL; strncpy(r, s, n); r[n] = 0; return r; }
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
207,556,020,043,096,470,000,000,000,000,000,000,000
13
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
update_topline_cursor(void) { check_cursor(); // put cursor on valid line update_topline(); if (!curwin->w_p_wrap) validate_cursor(); update_curswant(); }
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
294,042,034,425,138,560,000,000,000,000,000,000,000
8
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
void addCallbacks(StreamCallbacks& callbacks) override { addCallbacksHelper(callbacks); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
178,764,144,939,751,300,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...
int shadow_server_start(rdpShadowServer* server) { BOOL ipc; BOOL status; WSADATA wsaData; if (!server) return -1; if (WSAStartup(MAKEWORD(2, 2), &wsaData) != 0) return -1; #ifndef _WIN32 signal(SIGPIPE, SIG_IGN); #endif server->screen = shadow_screen_new(server); if (!server->screen) { WLog_ERR(TAG,...
0
[ "CWE-416", "CWE-703" ]
FreeRDP
6d86e20e1e7caaab4f0c7f89e36d32914dbccc52
53,245,765,794,334,940,000,000,000,000,000,000,000
89
Fixed double free
TEST_F(ConnectionManagerUtilityTest, MergeSlashes) { ON_CALL(config_, shouldNormalizePath()).WillByDefault(Return(true)); ON_CALL(config_, shouldMergeSlashes()).WillByDefault(Return(true)); TestRequestHeaderMapImpl original_headers; original_headers.setPath("/xyz///abc"); TestRequestHeaderMapImpl header_map(...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
147,782,314,438,549,340,000,000,000,000,000,000,000
10
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
bool CudnnSupport::DoMemcpyD2HQuantized( Stream* stream, const DeviceMemory<float>& gpu_unquantized_src, dnn::QuantizedActivationMode mode, void* host_dst, int64 size) { LOG(ERROR) << "quantized memcpy not supported by cuDNN"; return false; }
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
118,450,339,226,525,600,000,000,000,000,000,000,000
6
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
json_t *json_load_file(const char *path, size_t flags, json_error_t *error) { json_t *result; FILE *fp; jsonp_error_init(error, path); if (path == NULL) { error_set(error, NULL, "wrong arguments"); return NULL; } fp = fopen(path, "rb"); if(!fp) { error_set(erro...
0
[ "CWE-20" ]
jansson
64ce0ad3731ebd77e02897b07920eadd0e2cc318
236,478,787,778,667,130,000,000,000,000,000,000,000
25
Fix for issue #282 The fix limits recursion depths when parsing arrays and objects. The limit is configurable via the `JSON_PARSER_MAX_DEPTH` setting within `jansson_config.h` and is set by default to 2048. Update the RFC conformance document to note the limit; the RFC allows limits to be set by the implementation so...
static long setup_trampoline(unsigned int syscall, unsigned int __user *tramp) { int i; long err = 0; /* addi r1, r1, __SIGNAL_FRAMESIZE # Pop the dummy stackframe */ err |= __put_user(0x38210000UL | (__SIGNAL_FRAMESIZE & 0xffff), &tramp[0]); /* li r0, __NR_[rt_]sigreturn| */ err |= __put_user(0x38000000UL | (s...
0
[ "CWE-20", "CWE-284", "CWE-369" ]
linux
d2b9d2a5ad5ef04ff978c9923d19730cb05efd55
111,652,163,854,621,630,000,000,000,000,000,000,000
22
powerpc/tm: Block signal return setting invalid MSR state Currently we allow both the MSR T and S bits to be set by userspace on a signal return. Unfortunately this is a reserved configuration and will cause a TM Bad Thing exception if attempted (via rfid). This patch checks for this case in both the 32 and 64 bit s...
get_indent_str( char_u *ptr, int ts, int list) // if TRUE, count only screen size for tabs { int count = 0; for ( ; *ptr; ++ptr) { if (*ptr == TAB) { if (!list || curwin->w_lcs_chars.tab1) // count a tab for what it is worth count += ts - (count % ts); else // In list mode,...
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
301,067,896,326,074,560,000,000,000,000,000,000,000
26
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
void SSL::deriveTLSKeys() { int length = 2 * secure_.get_parms().hash_size_ + 2 * secure_.get_parms().key_size_ + 2 * secure_.get_parms().iv_size_; opaque seed[SEED_LEN]; input_buffer key_data(length); memcpy(seed, secure_.get_connection().server_random_, RAN_L...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
67,338,913,937,788,310,000,000,000,000,000,000,000
16
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static void avrcp_play_item(struct avrcp *session, uint64_t uid) { uint8_t buf[AVRCP_HEADER_LENGTH + 11]; struct avrcp_player *player = session->controller->player; struct avrcp_header *pdu = (void *) buf; uint16_t length; memset(buf, 0, sizeof(buf)); set_company_id(pdu->company_id, IEEEID_BTSIG); pdu->pdu_id ...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
232,703,903,490,031,700,000,000,000,000,000,000,000
24
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
void __exit f2fs_destroy_post_read_processing(void) { mempool_destroy(bio_post_read_ctx_pool); kmem_cache_destroy(bio_post_read_ctx_cache); }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
288,748,376,927,794,970,000,000,000,000,000,000,000
5
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
bool Item_datetime_literal::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date) { DBUG_ASSERT(fixed); fuzzy_date |= sql_mode_for_dates(current_thd); *ltime= cached_time; return (null_value= check_date_with_warn(ltime, fuzzy_date, MYSQL_TIMESTAMP_ERROR)); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
222,006,749,773,154,900,000,000,000,000,000,000,000
8
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.
static int ecryptfs_flush(struct file *file, fl_owner_t td) { struct file *lower_file = ecryptfs_file_to_lower(file); if (lower_file->f_op->flush) { filemap_write_and_wait(file->f_mapping); return lower_file->f_op->flush(lower_file, td); } return 0; }
0
[ "CWE-119", "CWE-787" ]
linux
f0fe970df3838c202ef6c07a4c2b36838ef0a88b
129,460,421,136,229,920,000,000,000,000,000,000,000
11
ecryptfs: don't allow mmap when the lower fs doesn't support it There are legitimate reasons to disallow mmap on certain files, notably in sysfs or procfs. We shouldn't emulate mmap support on file systems that don't offer support natively. CVE-2016-1583 Signed-off-by: Jeff Mahoney <jeffm@suse.com> Cc: stable@vger....
int btrfs_chunk_readonly(struct btrfs_fs_info *fs_info, u64 chunk_offset) { struct extent_map *em; struct map_lookup *map; int readonly = 0; int miss_ndevs = 0; int i; em = btrfs_get_chunk_map(fs_info, chunk_offset, 1); if (IS_ERR(em)) return 1; map = em->map_lookup; for (i = 0; i < map->num_stripes; i++) ...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
306,282,261,273,718,960,000,000,000,000,000,000,000
37
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
ptp_unpack_EOS_FocusInfoEx (PTPParams* params, unsigned char** data, uint32_t datasize ) { uint32_t size = dtoh32a( *data ); uint32_t halfsize = dtoh16a( (*data) + 4); uint32_t version = dtoh16a( (*data) + 6); uint32_t focus_points_in_struct = dtoh16a( (*data) + 8); uint32_t focus_points_in_use = dtoh16a( (*d...
0
[ "CWE-190" ]
libgphoto2
203df81b9d97e820411e1eb94ae08139af73bbd0
83,685,318,903,823,910,000,000,000,000,000,000,000
80
check for an integer overflow in ptp_unpack_OPL
static void annotation_get_size(annotate_state_t *state, struct annotate_entry_list *entry) { struct mailbox *mailbox = state->mailbox; struct buf value = BUF_INITIALIZER; assert(mailbox); buf_printf(&value, QUOTA_T_FMT, mailbox->i.quota_mailbox_used); output_entrya...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
31,706,543,860,954,670,000,000,000,000,000,000,000
12
annotate: don't allow everyone to write shared server entries
static void io_poll_remove_double(struct io_kiocb *req) { struct io_poll_iocb *poll = io_poll_get_double(req); lockdep_assert_held(&req->ctx->completion_lock); if (poll && poll->head) { struct wait_queue_head *head = poll->head; spin_lock(&head->lock); list_del_init(&poll->wait.entry); if (poll->wait.priv...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
71,355,160,969,054,300,000,000,000,000,000,000,000
17
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
int64 MkvWriter::Position() const { if (!file_) return 0; #ifdef _MSC_VER return _ftelli64(file_); #else return ftell(file_); #endif }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
298,514,377,020,969,000,000,000,000,000,000,000,000
10
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
gst_rtsp_connection_connect_with_response (GstRTSPConnection * conn, GTimeVal * timeout, GstRTSPMessage * response) { GstRTSPResult res; GSocketConnection *connection; GSocket *socket; GError *error = NULL; gchar *connection_uri, *request_uri, *remote_ip; GstClockTime to; guint16 url_port; GstRTSPUr...
0
[]
gst-plugins-base
f672277509705c4034bc92a141eefee4524d15aa
64,211,371,894,464,770,000,000,000,000,000,000,000
99
gstrtspconnection: Security loophole making heap overflow The former code allowed an attacker to create a heap overflow by sending a longer than allowed session id in a response and including a semicolon to change the maximum length. With this change, the parser will never go beyond 512 bytes.
__alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order, struct alloc_context *ac) { bool can_direct_reclaim = gfp_mask & __GFP_DIRECT_RECLAIM; const bool costly_order = order > PAGE_ALLOC_COSTLY_ORDER; struct page *page = NULL; unsigned int alloc_flags; unsigned long did_some_progress; enum compact_prior...
1
[]
linux
400e22499dd92613821374c8c6c88c7225359980
48,784,133,390,323,100,000,000,000,000,000,000,000
269
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
void ConnectionManagerImpl::ActiveStream::setRoute(Router::RouteConstSharedPtr route) { filter_manager_.streamInfo().route_entry_ = route ? route->routeEntry() : nullptr; cached_route_ = std::move(route); if (nullptr == filter_manager_.streamInfo().route_entry_) { cached_cluster_info_ = nullptr; } else { ...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
72,999,508,074,827,140,000,000,000,000,000,000,000
16
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
TIFFWriteDirectoryTagSbytePerSample(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value) { static const char module[] = "TIFFWriteDirectoryTagSbytePerSample"; int8* m; int8* na; uint16 nb; int o; if (dir==NULL) { (*ndir)++; return(1); } m=_TIFFmalloc(tif->tif_dir.td_samplesperpixel*sizeof(in...
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
223,305,524,389,679,360,000,000,000,000,000,000,000
24
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
static int xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, xmlNodeSetPtr set, int contextSize, int minPos, int maxPos, int hasNsNodes) { if (op->ch1 != -1) { xmlXPathCompExprPtr comp = ctxt->comp; if (comp->ste...
0
[ "CWE-415" ]
libxml2
f5048b3e71fc30ad096970b8df6e7af073bae4cb
271,569,740,363,463,400,000,000,000,000,000,000,000
194
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.
bool wsrep_sst_method_update (sys_var *self, THD* thd, enum_var_type type) { return 0; }
0
[ "CWE-77" ]
mysql-wsrep
4ea4b0c6a318209ac09b15aaa906c7b4a13b988c
317,437,558,868,231,560,000,000,000,000,000,000,000
4
codership/mysql-wsrep-bugs#758 Donor uses invalid SST methods
static netdev_tx_t sit_tunnel_xmit(struct sk_buff *skb, struct net_device *dev) { if (!pskb_inet_may_pull(skb)) goto tx_err; switch (skb->protocol) { case htons(ETH_P_IP): sit_tunnel_xmit__(skb, dev, IPPROTO_IPIP); break; case htons(ETH_P_IPV6): ipip6_tunnel_xmit(skb, dev); break; #if IS_ENABLED(C...
0
[ "CWE-703", "CWE-772", "CWE-401" ]
linux
07f12b26e21ab359261bf75cfcb424fdc7daeb6d
301,341,815,699,100,800,000,000,000,000,000,000,000
30
net: sit: fix memory leak in sit_init_net() If register_netdev() is failed to register sitn->fb_tunnel_dev, it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev). BUG: memory leak unreferenced object 0xffff888378daad00 (size 512): comm "syz-executor.1", pid 4006, jiffies 4295121142 (age 16.115s) ...
libssh2_channel_get_exit_status(LIBSSH2_CHANNEL *channel) { if(!channel) return 0; return channel->exit_status; }
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
321,620,271,729,750,100,000,000,000,000,000,000,000
7
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu) { atomic_set(&vcpu->arch.nmi_queued, 0); vcpu->arch.nmi_pending = 0; vcpu->arch.nmi_injected = false; memset(vcpu->arch.db, 0, sizeof(vcpu->arch.db)); vcpu->arch.dr6 = DR6_FIXED_1; vcpu->arch.dr7 = DR7_FIXED_1; kvm_update_dr7(vcpu); kvm_make_request(KVM_REQ_EVENT...
0
[]
linux
6d1068b3a98519247d8ba4ec85cd40ac136dbdf9
197,648,836,898,533,600,000,000,000,000,000,000,000
25
KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) On hosts without the XSAVE support unprivileged local user can trigger oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN ioctl. invalid opcode: 0000 [#2]...
print_p2r_iccpoweron (const unsigned char *msg, size_t msglen) { print_p2r_header ("PC_to_RDR_IccPowerOn", msg, msglen); if (msglen < 10) return; printf (" bPowerSelect ......: 0x%02x (%s)\n", msg[7], msg[7] == 0? "auto": msg[7] == 1? "5.0 V": msg[7] == 2? "3.0 V": msg...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
173,995,185,743,024,320,000,000,000,000,000,000,000
12
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
int rose_rx_call_request(struct sk_buff *skb, struct net_device *dev, struct rose_neigh *neigh, unsigned int lci) { struct sock *sk; struct sock *make; struct rose_sock *make_rose; struct rose_facilities_struct facilities; int n, len; skb->sk = NULL; /* Initially we don't know who it's for */ /* * skb->data...
1
[ "CWE-20" ]
linux
e0bccd315db0c2f919e7fcf9cb60db21d9986f52
318,671,854,384,583,630,000,000,000,000,000,000,000
80
rose: Add length checks to CALL_REQUEST parsing Define some constant offsets for CALL_REQUEST based on the description at <http://www.techfest.com/networking/wan/x25plp.htm> and the definition of ROSE as using 10-digit (5-byte) addresses. Use them consistently. Validate all implicit and explicit facilities lengths. ...
static PHP_INI_MH(OnUpdateSaveHandler) /* {{{ */ { ps_module *tmp; SESSION_CHECK_ACTIVE_STATE; tmp = _php_find_ps_module(new_value TSRMLS_CC); if (PG(modules_activated) && !tmp) { int err_type; if (stage == ZEND_INI_STAGE_RUNTIME) { err_type = E_WARNING; } else { err_type = E_ERROR; } /* Do not ...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
35,690,894,364,840,090,000,000,000,000,000,000,000
28
Strict session
TEST_F(QueryPlannerTest, CompoundIndexBoundsStringBounds) { addIndex(BSON("a" << 1 << "b" << 1)); runQuery(fromjson("{a: {$gt: 'foo'}, b: {$gte: 'bar'}}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: null, node: {ixscan: {filte...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
19,022,480,509,473,876,000,000,000,000,000,000,000
11
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.