func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
op_formatexpr(oparg_T *oap) { if (oap->is_VIsual) // When there is no change: need to remove the Visual selection redraw_curbuf_later(INVERTED); if (fex_format(oap->start.lnum, oap->line_count, NUL) != 0) // As documented: when 'formatexpr' returns non-zero fall back to // internal formatting. op_format(o...
0
[ "CWE-125" ]
vim
78d52883e10d71f23ab72a3d8b9733b00da8c9ad
117,328,549,399,670,420,000,000,000,000,000,000,000
11
patch 8.2.5013: after text formatting cursor may be in an invalid position Problem: After text formatting the cursor may be in an invalid position. Solution: Correct the cursor position after formatting.
void EagerKernelExecuteAsync( EagerContext* ctx, const absl::InlinedVector<TensorHandle*, 4>& op_inputs, const absl::optional<EagerFunctionParams>& eager_func_params, const core::RefCountPtr<KernelAndDevice> kernel, GraphCollector* graph_collector, CancellationManager* cancellation_manager, TensorHa...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
186,098,264,660,008,200,000,000,000,000,000,000,000
43
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
void OPJ_CALLCONV opj_image_destroy(opj_image_t *image) { if (image) { if (image->comps) { OPJ_UINT32 compno; /* image components */ for (compno = 0; compno < image->numcomps; compno++) { opj_image_comp_t *image_comp = &(image->comps[compno]); ...
0
[ "CWE-787" ]
openjpeg
c22cbd8bdf8ff2ae372f94391a4be2d322b36b41
213,889,035,094,542,000,000,000,000,000,000,000,000
23
Avoid heap buffer overflow in function pnmtoimage of convert.c, and unsigned integer overflow in opj_image_create() (CVE-2016-9118, #861)
Http::Context& PerListenerFactoryContextImpl::httpContext() { return listener_factory_context_base_->httpContext(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
14,782,989,087,247,343,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
void dane_query_deinit(dane_query_t q) { if (q->result) ub_resolve_free(q->result); free(q); }
0
[ "CWE-119" ]
gnutls
ed51e5e53cfbab3103d6b7b85b7ba4515e4f30c3
57,880,100,021,174,680,000,000,000,000,000,000,000
5
Adding dane_raw_tlsa to allow initialization of dane_query_t from DANE records based on external DNS resolutions. Also fixing a buffer overflow. Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
static void incstep (lua_State *L, global_State *g) { int stepmul = (getgcparam(g->gcstepmul) | 1); /* avoid division by 0 */ l_mem debt = (g->GCdebt / WORK2MEM) * stepmul; l_mem stepsize = (g->gcstepsize <= log2maxs(l_mem)) ? ((cast(l_mem, 1) << g->gcstepsize) / WORK2MEM) * stepmul ...
0
[ "CWE-125" ]
lua
127e7a6c8942b362aa3c6627f44d660a4fb75312
71,168,381,889,717,330,000,000,000,000,000,000,000
17
Fixed bug of old finalized objects in the GC When an object aged OLD1 is finalized, it is moved from the list 'finobj' to the *beginning* of the list 'allgc'. So, this part of the list (and not only the survival list) must be visited by 'markold'.
DnD_TransportBufReset(DnDTransportBuffer *buf) // IN/OUT { ASSERT(buf); free(buf->buffer); buf->buffer = NULL; buf->seqNum = 0; buf->totalSize = 0; buf->offset = 0; buf->lastUpdateTime = 0; }
0
[]
open-vm-tools
e88f91b00a715b79255de6576506d80ecfdb064c
22,132,621,374,219,630,000,000,000,000,000,000,000
12
Fix possible security issue with the permissions of the intermediate staging directory and path /tmp/VMwareDnD is a staging directory used for DnD and CnP. It should be a regular directory, but malicious code or user may create the /tmp/VMwareDnD as a symbolic link which points elsewhere on the system. This may prov...
static void sit_add_v4_addrs(struct inet6_dev *idev) { struct in6_addr addr; struct net_device *dev; struct net *net = dev_net(idev->dev); int scope; ASSERT_RTNL(); memset(&addr, 0, sizeof(struct in6_addr)); memcpy(&addr.s6_addr32[3], idev->dev->dev_addr, 4); if (idev->dev->flags&IFF_POINTOPOINT) { addr.s6...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
6,642,500,369,551,905,000,000,000,000,000,000,000
53
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
_copyBitmapHeapScan(const BitmapHeapScan *from) { BitmapHeapScan *newnode = makeNode(BitmapHeapScan); /* * copy node superclass fields */ CopyScanFields((const Scan *) from, (Scan *) newnode); /* * copy remainder of node */ COPY_NODE_FIELD(bitmapqualorig); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
293,697,277,474,654,600,000,000,000,000,000,000,000
16
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
QPDFPageObjectHelper::Members::~Members() { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
152,209,260,849,043,630,000,000,000,000,000,000,000
3
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
u8 ath6kl_wmi_get_traffic_class(u8 user_priority) { return up_to_ac[user_priority & 0x7]; }
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
15,990,028,691,615,253,000,000,000,000,000,000,000
4
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
e_util_strv_to_slist (const gchar * const *strv) { GSList *slist = NULL; gint ii; if (!strv) return NULL; for (ii = 0; strv[ii]; ii++) { slist = g_slist_prepend (slist, g_strdup (strv[ii])); } return g_slist_reverse (slist); }
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
19,020,122,762,309,170,000,000,000,000,000,000,000
14
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
com_help(String *buffer __attribute__((unused)), char *line __attribute__((unused))) { int i, j; char * help_arg= strchr(line,' '), buff[32], *end; if (help_arg) { while (my_isspace(charset_info,*help_arg)) help_arg++; if (*help_arg) return com_server_help(buffer,line,help_arg); } put_in...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
60,978,758,167,862,800,000,000,000,000,000,000,000
36
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...
ipsecmod_init(struct module_env* env, int id) { struct ipsecmod_env* ipsecmod_env = (struct ipsecmod_env*)calloc(1, sizeof(struct ipsecmod_env)); if(!ipsecmod_env) { log_err("malloc failure"); return 0; } env->modinfo[id] = (void*)ipsecmod_env; ipsecmod_env->whitelist = NULL; if(!ipsecmod_apply_cfg(ipsecmod...
0
[ "CWE-78" ]
unbound
34e52a4313d59b9d57e928c44300fd81e1a48910
77,745,912,066,383,900,000,000,000,000,000,000,000
16
Fix CVE-2019-18934, shell execution in ipsecmod.
Item_string(THD *thd, CHARSET_INFO *csi, const char *str_arg, uint length_arg): Item_basic_constant(thd) { collation.set(csi, DERIVATION_COERCIBLE); set_name(thd, NULL, 0, system_charset_info); decimals= NOT_FIXED_DEC; fixed= 1; str_value.copy(str_arg, length_arg, csi); max_length= str_v...
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
191,373,478,033,148,800,000,000,000,000,000,000,000
10
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....
comp_col(void) { #if defined(FEAT_CMDL_INFO) && defined(FEAT_WINDOWS) int last_has_status = (p_ls == 2 || (p_ls == 1 && firstwin != lastwin)); sc_col = 0; ru_col = 0; if (p_ru) { #ifdef FEAT_STL_OPT ru_col = (ru_wid ? ru_wid : COL_RULER) + 1; #else ru_col = COL_RULER + 1; #endif /* no last statu...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
116,523,806,176,312,060,000,000,000,000,000,000,000
35
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) { u32 uninitialized_var(curval), uval, vpid = task_pid_vnr(current); union futex_key key = FUTEX_KEY_INIT; struct futex_hash_bucket *hb; struct futex_q *top_waiter; int ret; retry: if (get_user(uval, uaddr)) return -EFAULT; /* * We release on...
0
[ "CWE-416" ]
linux
48fb6f4db940e92cfb16cd878cddd59ea6120d06
81,925,294,397,901,830,000,000,000,000,000,000,000
116
futex: Remove unnecessary warning from get_futex_key Commit 65d8fc777f6d ("futex: Remove requirement for lock_page() in get_futex_key()") removed an unnecessary lock_page() with the side-effect that page->mapping needed to be treated very carefully. Two defensive warnings were added in case any assumption was missed ...
static int selinux_inode_getsecurity(struct inode *inode, const char *name, void **buffer, bool alloc) { u32 size; int error; char *context = NULL; struct inode_security_struct *isec; if (strcmp(name, XATTR_SELINUX_SUFFIX)) return -EOPNOTSUPP; /* * If the caller has CAP_MAC_ADMIN, then get the raw context ...
0
[ "CWE-682" ]
linux-stable
0c461cb727d146c9ef2d3e86214f498b78b7d125
324,182,522,818,204,300,000,000,000,000,000,000,000
41
selinux: fix off-by-one in setprocattr SELinux tries to support setting/clearing of /proc/pid/attr attributes from the shell by ignoring terminating newlines and treating an attribute value that begins with a NUL or newline as an attempt to clear the attribute. However, the test for clearing attributes has always bee...
static inline int hid_hw_idle(struct hid_device *hdev, int report, int idle, int reqtype) { if (hdev->ll_driver->idle) return hdev->ll_driver->idle(hdev, report, idle, reqtype); return 0; }
0
[ "CWE-787" ]
linux
35556bed836f8dc07ac55f69c8d17dce3e7f0e25
305,726,265,283,085,870,000,000,000,000,000,000,000
8
HID: core: Sanitize event code and type when mapping input When calling into hid_map_usage(), the passed event code is blindly stored as is, even if it doesn't fit in the associated bitmap. This event code can come from a variety of sources, including devices masquerading as input devices, only a bit more "programmab...
void ZRtp::setEnrollmentMode(bool enrollmentMode) { this->enrollmentMode = enrollmentMode; }
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
72,163,223,640,012,840,000,000,000,000,000,000,000
3
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
QPDFObjectHandle::getRawStreamData() { assertStream(); return dynamic_cast<QPDF_Stream*>(obj.getPointer())->getRawStreamData(); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
125,313,621,984,681,170,000,000,000,000,000,000,000
5
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static double mp_image_whds(_cimg_math_parser& mp) { unsigned int ind = (unsigned int)mp.opcode[2]; if (ind!=~0U) { if (!mp.imglist.width()) return cimg::type<double>::nan(); ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); } const CImg<T> &img...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
287,743,607,523,803,600,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static DWORD WINAPI drdynvc_virtual_channel_client_thread(LPVOID arg) { wStream* data; wMessage message; UINT error = CHANNEL_RC_OK; drdynvcPlugin* drdynvc = (drdynvcPlugin*) arg; if (!drdynvc) { ExitThread((DWORD) CHANNEL_RC_BAD_CHANNEL_HANDLE); return CHANNEL_RC_BAD_CHANNEL_HANDLE; } while (1) { if (...
0
[ "CWE-125" ]
FreeRDP
baee520e3dd9be6511c45a14c5f5e77784de1471
338,458,959,597,527,740,000,000,000,000,000,000,000
69
Fix for #4866: Added additional length checks
int ha_partition::reset(void) { int result= 0, tmp; handler **file; DBUG_ENTER("ha_partition::reset"); if (m_part_info) bitmap_set_all(&m_part_info->used_partitions); file= m_file; do { if ((tmp= (*file)->ha_reset())) result= tmp; } while (*(++file)); DBUG_RETURN(result); }
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
167,600,062,906,751,900,000,000,000,000,000,000,000
15
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 __poke_user_compat(struct task_struct *child, addr_t addr, addr_t data) { struct user32 *dummy32 = NULL; per_struct32 *dummy_per32 = NULL; __u32 tmp = (__u32) data; addr_t offset; if (addr < (addr_t) &dummy32->regs.acrs) { /* * psw, gprs, acrs and orig_gpr2 are stored on the stack */ ...
1
[ "CWE-399" ]
linux-2.6
3d6e48f43340343d97839eadb1ab7b6a3ea98797
336,645,180,341,076,800,000,000,000,000,000,000,000
80
[S390] CVE-2008-1514: prevent ptrace padding area read/write in 31-bit mode When running a 31-bit ptrace, on either an s390 or s390x kernel, reads and writes into a padding area in struct user_regs_struct32 will result in a kernel panic. This is also known as CVE-2008-1514. Test case available here: http://sources.r...
void kvm_zap_gfn_range(struct kvm *kvm, gfn_t gfn_start, gfn_t gfn_end) { bool flush; int i; if (WARN_ON_ONCE(gfn_end <= gfn_start)) return; write_lock(&kvm->mmu_lock); kvm_inc_notifier_count(kvm, gfn_start, gfn_end); flush = __kvm_zap_rmaps(kvm, gfn_start, gfn_end); if (is_tdp_mmu_enabled(kvm)) { for (...
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
160,421,748,484,914,020,000,000,000,000,000,000,000
28
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
_abort_step(uint32_t job_id, uint32_t step_id) { step_complete_msg_t resp; slurm_msg_t resp_msg; slurm_msg_t_init(&resp_msg); int rc, rc2; resp.job_id = job_id; resp.job_step_id = step_id; resp.range_first = 0; resp.range_last = 0; resp.step_rc = 1; resp.jobacct = jobacctinfo_create(NULL)...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
150,806,481,122,657,240,000,000,000,000,000,000,000
20
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
static void cexp(JF, js_Ast *exp) { int then, end; int n; switch (exp->type) { case EXP_STRING: emitline(J, F, exp); emitstring(J, F, OP_STRING, exp->string); break; case EXP_NUMBER: emitline(J, F, exp); emitnumber(J, F, exp->number); break; case EXP_UNDEF: emitline(J, F, exp); emit(J, F, OP_UNDE...
0
[ "CWE-670", "CWE-119", "CWE-787" ]
mujs
1e5479084bc9852854feb1ba9bf68b52cd127e02
191,836,158,693,295,130,000,000,000,000,000,000,000
213
Bug 700947: Add missing ENDTRY opcode in try/catch/finally byte code. In one of the code branches in handling exceptions in the catch block we forgot to call the ENDTRY opcode to pop the inner hidden try. This leads to an unbalanced exception stack which can cause a crash due to us jumping to a stack frame that has al...
void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) { int tileno, compno, resno, bandno, precno;/*, cblkno;*/ fprintf(fd, "image {\n"); fprintf(fd, " tw=%d, th=%d x0=%d x1=%d y0=%d y1=%d\n", img->tw, img->th, tcd->image->x0, tcd->image->x1, tcd->image->y0, tcd->imag...
0
[ "CWE-369" ]
openjpeg
8f9cc62b3f9a1da9712329ddcedb9750d585505c
116,774,734,973,471,770,000,000,000,000,000,000,000
58
Fix division by zero Fix uclouvain/openjpeg#733
static int iscsi_xmit_task(struct iscsi_conn *conn, struct iscsi_task *task, bool was_requeue) { int rc; spin_lock_bh(&conn->session->back_lock); if (!conn->task) { /* Take a ref so we can access it after xmit_task() */ __iscsi_get_task(task); } else { /* Already have a ref from when we failed to send...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
2,039,695,791,441,212,600,000,000,000,000,000,000
59
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
dnMatch( int *matchp, slap_mask_t flags, Syntax *syntax, MatchingRule *mr, struct berval *value, void *assertedValue ) { int match; struct berval *asserted = (struct berval *) assertedValue; assert( matchp != NULL ); assert( value != NULL ); assert( assertedValue != NULL ); assert( !BER_BVISNULL( value ) )...
0
[ "CWE-763" ]
openldap
5a2017d4e61a6ddc4dcb4415028e0d08eb6bca26
142,088,002,273,366,150,000,000,000,000,000,000,000
30
ITS#9412 fix AVA_Sort on invalid RDN
template<typename T> CImgDisplay& assign(const CImgList<T>& list, const char *const title=0, const unsigned int normalization=3, const bool is_fullscreen=false, const bool is_closed=false) { _no_display_exception(); return assign(list._width,list._widt...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
340,154,084,643,630,860,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
static int ZEND_FASTCALL zend_isset_isempty_dim_prop_obj_handler_SPEC_CV_CV(int prop_dim, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_IS TSRMLS_CC); zval **value = NULL; int result = 0; if (IS_CV != IS_VAR || container) { zval ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
287,510,428,665,502,400,000,000,000,000,000,000,000
130
- 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
bool chopOffDotted(string &domain) { if(domain.empty() || (domain.size()==1 && domain[0]=='.')) return false; bool escaped = false; const string::size_type domainLen = domain.length(); for (size_t fdot = 0; fdot < domainLen; fdot++) { if (domain[fdot] == '.' && !escaped) { if (fdot==domain.size...
0
[ "CWE-399" ]
pdns
881b5b03a590198d03008e4200dd00cc537712f3
51,504,533,575,791,660,000,000,000,000,000,000,000
31
Reject qname's wirelength > 255, `chopOff()` handle dot inside labels
psutil_proc_memory_maps(PyObject *self, PyObject *args) { MEMORY_BASIC_INFORMATION basicInfo; DWORD pid; HANDLE hProcess = NULL; PVOID baseAddress; ULONGLONG previousAllocationBase; WCHAR mappedFileName[MAX_PATH]; LPVOID maxAddr; // required by GetMappedFileNameW DWORD access = PROCE...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
292,741,142,548,323,170,000,000,000,000,000,000,000
73
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
void CompressTest::setUp() { }
0
[ "CWE-22" ]
poco
bb7e5feece68ccfd8660caee93da25c5c39a4707
181,153,560,589,469,850,000,000,000,000,000,000,000
3
merge zip entry absolute path vulnerability fix (#1968) from develop
PHP_FUNCTION(imagecolormatch) { zval *IM1, *IM2; gdImagePtr im1, im2; int result; if (zend_parse_parameters(ZEND_NUM_ARGS(), "rr", &IM1, &IM2) == FAILURE) { return; } if ((im1 = (gdImagePtr)zend_fetch_resource(Z_RES_P(IM1), "Image", le_gd)) == NULL) { RETURN_FALSE; } if ((im2 = (gdImagePtr)zend_fetch_reso...
0
[ "CWE-787" ]
php-src
28022c9b1fd937436ab67bb3d61f652c108baf96
38,836,129,020,692,910,000,000,000,000,000,000,000
39
Fix bug#72697 - select_colors write out-of-bounds (cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4) Conflicts: ext/gd/gd.c
static int ahash_setkey_unaligned(struct crypto_ahash *tfm, const u8 *key, unsigned int keylen) { unsigned long alignmask = crypto_ahash_alignmask(tfm); int ret; u8 *buffer, *alignbuffer; unsigned long absize; absize = keylen + alignmask; buffer = kmalloc(absize, GFP_KERNEL); if (!buffer) return -ENOMEM; ...
0
[ "CWE-835" ]
linux
ef0579b64e93188710d48667cb5e014926af9f1b
240,462,939,293,047,230,000,000,000,000,000,000,000
19
crypto: ahash - Fix EINPROGRESS notification callback The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the requ...
static OPJ_BOOL opj_j2k_read_ppm ( opj_j2k_t *p_j2k, OPJ_BYTE * p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t * p_manager ) { opj_cp_t *l_cp = 00; OPJ_UINT32 l_Z_ppm; /* preconditions */ assert(p_header_data != 00); assert(p_j2k != 00...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
221,368,583,955,446,150,000,000,000,000,000,000,000
69
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, void *arg) { struct tcmsg *tcm; struct rtattr **tca; struct net_device *dev; u32 clid; struct Qdisc *q, *p; int err; replay: /* Reinit, just in case something touches this. */ tcm = NLMSG_DATA(n); tca = arg; clid = tcm->tcm_parent; q = p = ...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
260,795,284,154,780,470,000,000,000,000,000,000,000
136
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static int MP4_ReadBox_Metadata( stream_t *p_stream, MP4_Box_t *p_box ) { const uint8_t *p_peek; if ( stream_Peek( p_stream, &p_peek, 16 ) < 16 ) return 0; if ( stream_Read( p_stream, NULL, 8 ) < 8 ) return 0; return MP4_ReadBoxContainerChildren( p_stream, p_box, ATOM_data ); }
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
260,828,964,143,167,750,000,000,000,000,000,000,000
9
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 ...
virtual Item* compile(THD *thd, Item_analyzer analyzer, uchar **arg_p, Item_transformer transformer, uchar *arg_t) { if ((this->*analyzer) (arg_p)) return ((this->*transformer) (thd, arg_t)); return 0; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
143,665,835,922,037,940,000,000,000,000,000,000,000
7
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....
static void queue_request(struct intel_engine_cs *engine, struct i915_sched_node *node, int prio) { GEM_BUG_ON(!list_empty(&node->link)); list_add_tail(&node->link, i915_sched_lookup_priolist(engine, prio)); }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
321,109,221,455,867,860,000,000,000,000,000,000,000
7
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
static void update_super_roots(struct btrfs_root *root) { struct btrfs_root_item *root_item; struct btrfs_super_block *super; super = root->fs_info->super_copy; root_item = &root->fs_info->chunk_root->root_item; super->chunk_root = root_item->bytenr; super->chunk_root_generation = root_item->generation; super-...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
290,891,066,074,506,720,000,000,000,000,000,000,000
19
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
TEST_P(ProtocolIntegrationTest, EnvoyProxying102) { testEnvoyProxying1xx(false, false, false, "102"); }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
194,708,557,038,840,920,000,000,000,000,000,000,000
3
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static MagickBooleanType LoadDelegateCache(LinkedListInfo *cache, const char *xml,const char *filename,const size_t depth, ExceptionInfo *exception) { char keyword[MagickPathExtent], *token; const char *q; DelegateInfo *delegate_info; MagickStatusType status; size_t extent; ...
0
[ "CWE-476" ]
ImageMagick
2c75f301d9ac84f91071393b02d8c88c8341c91c
306,231,875,985,148,650,000,000,000,000,000,000,000
237
https://github.com/ImageMagick/ImageMagick/issues/1225
static bool kvm_mmu_prepare_zap_page(struct kvm *kvm, struct kvm_mmu_page *sp, struct list_head *invalid_list) { int nr_zapped; __kvm_mmu_prepare_zap_page(kvm, sp, invalid_list, &nr_zapped); return nr_zapped; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
288,890,494,962,884,160,000,000,000,000,000,000,000
8
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
static int mailimf_addr_spec_msg_id_parse(const char * message, size_t length, size_t * indx, char ** result) { size_t cur_token; char * addr_spec; int r; int res; size_t begin; size_t end; int final; siz...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
220,051,875,717,235,700,000,000,000,000,000,000,000
83
Fixed crash #274
static __u8 *mr_report_fixup(struct hid_device *hdev, __u8 *rdesc, unsigned int *rsize) { if (*rsize >= 30 && rdesc[29] == 0x05 && rdesc[30] == 0x09) { hid_info(hdev, "fixing up button/consumer in HID report descriptor\n"); rdesc[30] = 0x0c; } return rdesc; }
1
[ "CWE-119", "CWE-787" ]
linux
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
54,311,938,080,526,620,000,000,000,000,000,000,000
9
HID: fix a couple of off-by-ones There are a few very theoretical off-by-one bugs in report descriptor size checking when performing a pre-parsing fixup. Fix those. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jir...
getParamDescriptions(PGconn *conn) { PGresult *result; int nparams; int i; result = PQmakeEmptyPGresult(conn, PGRES_COMMAND_OK); if (!result) goto failure; /* parseInput already read the 't' label and message length. */ /* the next two bytes are the number of parameters */ if (pqGetInt(&(result->numPa...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
275,262,502,961,458,400,000,000,000,000,000,000,000
44
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
struct dentry *ovl_dentry_upper(struct dentry *dentry) { struct ovl_entry *oe = dentry->d_fsdata; return ovl_upperdentry_dereference(oe); }
0
[ "CWE-284", "CWE-264" ]
linux
69c433ed2ecd2d3264efd7afec4439524b319121
302,814,319,342,394,500,000,000,000,000,000,000,000
6
fs: limit filesystem stacking depth Add a simple read-only counter to super_block that indicates how deep this is in the stack of filesystems. Previously ecryptfs was the only stackable filesystem and it explicitly disallowed multiple layers of itself. Overlayfs, however, can be stacked recursively and also may be s...
gst_h264_video_calculate_framerate (const GstH264SPS * sps, guint field_pic_flag, guint pic_struct, gint * fps_num, gint * fps_den) { gint num = 0; gint den = 1; /* To calculate framerate, we use this formula: * time_scale 1 1 * fps = ----------------- x...
0
[ "CWE-787" ]
gst-plugins-bad
11353b3f6e2f047cc37483d21e6a37ae558896bc
186,401,885,907,365,300,000,000,000,000,000,000,000
58
codecparsers: h264parser: guard against ref_pic_markings overflow Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703>
int r_jwe_compact_parsen(jwe_t * jwe, const char * jwe_str, size_t jwe_str_len, int x5u_flags) { return r_jwe_advanced_compact_parsen(jwe, jwe_str, jwe_str_len, R_PARSE_HEADER_ALL, x5u_flags); }
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
183,575,418,579,493,480,000,000,000,000,000,000,000
3
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
int i2d_PKCS8PrivateKeyInfo_fp(FILE *fp, EVP_PKEY *key) { PKCS8_PRIV_KEY_INFO *p8inf; int ret; p8inf = EVP_PKEY2PKCS8(key); if(!p8inf) return 0; ret = i2d_PKCS8_PRIV_KEY_INFO_fp(fp, p8inf); PKCS8_PRIV_KEY_INFO_free(p8inf); return ret; }
0
[ "CWE-310" ]
openssl
684400ce192dac51df3d3e92b61830a6ef90be3e
316,839,458,878,657,670,000,000,000,000,000,000,000
10
Fix various certificate fingerprint issues. By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. t...
static void test_long_data_str1() { MYSQL_STMT *stmt; int rc, i; char data[255]; long length; ulong max_blob_length, blob_length, length1; my_bool true_value; MYSQL_RES *result; MYSQL_BIND my_bind[2]; MYSQL_FIELD *field; char query[MAX_TEST_QUERY_LENGTH]; myheader("tes...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
229,941,569,442,876,040,000,000,000,000,000,000,000
155
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
static void nfs4_reclaim_complete_prepare(struct rpc_task *task, void *data) { struct nfs4_reclaim_complete_data *calldata = data; rpc_task_set_priority(task, RPC_PRIORITY_PRIVILEGED); if (nfs41_setup_sequence(calldata->clp->cl_session, &calldata->arg.seq_args, &calldata->res.seq_res, 0, task)) return; ...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
258,765,996,542,599,900,000,000,000,000,000,000,000
12
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
R_API RBinJavaAttrInfo *r_bin_java_local_variable_type_table_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { RBinJavaLocalVariableTypeAttribute *lvattr; ut64 offset = 6; ut32 i = 0; RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (buffer, sz, 0); if (!attr) { return NULL; } attr->type = R_BIN_JAVA_ATTR_...
1
[ "CWE-125" ]
radare2
e9ce0d64faf19fa4e9c260250fbdf25e3c11e152
106,180,454,845,037,150,000,000,000,000,000,000,000
47
Fix #10498 - Fix crash in fuzzed java files (#10511)
static int sctp_getsockopt_active_key(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct net *net = sock_net(sk); struct sctp_authkeyid val; struct sctp_association *asoc; if (!net->sctp.auth_enable) return -EACCES; if (len < sizeof(struct sctp_authkeyid)) return -EINVAL; if...
0
[ "CWE-20" ]
linux
726bc6b092da4c093eb74d13c07184b18c1af0f1
226,158,042,616,132,600,000,000,000,000,000,000,000
32
net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Building sctp may fail with: In function ‘copy_from_user’, inlined from ‘sctp_getsockopt_assoc_stats’ at net/sctp/socket.c:5656:20: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: c...
gdm_session_worker_load_env_d (GdmSessionWorker *worker) { GFile *dir; dir = g_file_new_for_path (DATADIR "/gdm/env.d"); gdm_session_worker_load_env_dir (worker, dir); g_object_unref (dir); dir = g_file_new_for_path (GDMCONFDIR "/env.d"); gdm_session_worker_load_env_dir...
0
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
294,494,633,497,004,160,000,000,000,000,000,000,000
12
session-worker: Don't switch back VTs until session is fully exited There's a race condition on shutdown where the session worker is switching VTs back to the initial VT at the same time as the session exit is being processed. This means that manager may try to start a login screen (because of the VT switch) when aut...
void tsel_box_del(GF_Box *s) { GF_TrackSelectionBox *ptr; ptr = (GF_TrackSelectionBox *) s; if (ptr == NULL) return; if (ptr->attributeList) gf_free(ptr->attributeList); gf_free(ptr); }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
97,630,118,186,201,100,000,000,000,000,000,000,000
8
fixed #1768
static void exif_process_APP1(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement) { /* Check the APP1 for Exif Identifier Code */ static const uchar ExifHeader[] = {0x45, 0x78, 0x69, 0x66, 0x00, 0x00}; if (length <= 8 || memcmp(CharBuf+2, ExifHeader, 6)) { exif_error_docref(NULL EXIFERR_...
0
[ "CWE-416" ]
php-src
3fdde65617e9f954e2c964768aac8831005497e5
185,503,930,916,143,180,000,000,000,000,000,000,000
13
Fix #76409: heap use after free in _php_stream_free We must not close the stream in exif_read_from_impl(), since it is the responsibility of the (caller's) caller to do so, if it actually opened the stream. We simplify the reproduce script, which is actually about supplying a path to a directory (opposed to a regular...
TEST_F(HttpConnectionManagerConfigTest, DefaultRequestIDExtension) { const std::string yaml_string = R"EOF( stat_prefix: ingress_http route_config: name: local_route http_filters: - name: envoy.filters.http.router )EOF"; HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_strin...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
154,450,363,115,051,450,000,000,000,000,000,000,000
18
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
void sbgp_del(GF_Box *a) { GF_SampleGroupBox *p = (GF_SampleGroupBox *)a; if (p->sample_entries) gf_free(p->sample_entries); gf_free(p); }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
55,244,529,587,686,380,000,000,000,000,000,000,000
6
fixed 2 possible heap overflows (inc. #1088)
reconstructLineOffsets (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, LineOrder lineOrder, vector<Int64> &lineOffsets) { Int64 position = is.tellg(); try { for (unsigned int i = 0; i < lineOffsets.size(); i++) { Int64 lineOffset = i...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
200,793,317,798,341,420,000,000,000,000,000,000,000
41
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
server_client_how_many(void) { struct client *c; u_int n; n = 0; TAILQ_FOREACH(c, &clients, entry) { if (c->session != NULL && (~c->flags & CLIENT_DETACHING)) n++; } return (n); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
17,654,317,879,257,070,000,000,000,000,000,000,000
12
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
static int bond_update_speed_duplex(struct slave *slave) { struct net_device *slave_dev = slave->dev; struct ethtool_cmd etool = { .cmd = ETHTOOL_GSET }; u32 slave_speed; int res; /* Fake speed and duplex */ slave->speed = SPEED_100; slave->duplex = DUPLEX_FULL; if (!slave_dev->ethtool_ops || !slave_dev->etht...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
125,161,444,903,104,250,000,000,000,000,000,000,000
35
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static void ext3_put_super (struct super_block * sb) { struct ext3_sb_info *sbi = EXT3_SB(sb); struct ext3_super_block *es = sbi->s_es; int i, err; dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED); ext3_xattr_put_super(sb); err = journal_destroy(sbi->s_journal); sbi->s_journal = NULL; if (err ...
0
[ "CWE-20" ]
linux
8d0c2d10dd72c5292eda7a06231056a4c972e4cc
211,952,958,738,719,200,000,000,000,000,000,000,000
56
ext3: Fix format string issues ext3_msg() takes the printk prefix as the second parameter and the format string as the third parameter. Two callers of ext3_msg omit the prefix and pass the format string as the second parameter and the first parameter to the format string as the third parameter. In both cases this stri...
static int check_match(struct xt_entry_match *m, struct xt_mtchk_param *par) { const struct ip6t_ip6 *ipv6 = par->entryinfo; par->match = m->u.kernel.match; par->matchinfo = m->data; return xt_check_match(par, m->u.match_size - sizeof(*m), ipv6->proto, ipv6->invflags & IP6T_INV_PROTO); }
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
263,887,626,262,652,700,000,000,000,000,000,000,000
10
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
void Type_Data_Free(struct _cms_typehandler_struct* self, void* Ptr) { _cmsFree(self ->ContextID, Ptr); }
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
145,850,343,297,811,030,000,000,000,000,000,000,000
4
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
my_decimal *Item_func_set_user_var::val_decimal(my_decimal *val) { DBUG_ASSERT(fixed == 1); check(0); update(); // Store expression return m_var_entry->val_decimal(&null_value, val); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
291,811,061,234,614,470,000,000,000,000,000,000,000
7
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
void sas_free_device(struct kref *kref) { struct domain_device *dev = container_of(kref, typeof(*dev), kref); put_device(&dev->rphy->dev); dev->rphy = NULL; if (dev->parent) sas_put_device(dev->parent); sas_port_put_phy(dev->phy); dev->phy = NULL; /* remove the phys and ports, everything else should be gon...
0
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
330,583,203,851,323,200,000,000,000,000,000,000,000
24
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
EXPORTED int http_allow_noauth_get(struct transaction_t *txn) { /* Inverse logic: True means we *require* authentication */ switch (txn->meth) { case METH_GET: case METH_HEAD: /* Let method processing function decide if auth is needed */ return 0; default: return 1; } }
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
83,418,375,181,226,830,000,000,000,000,000,000,000
12
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
static ssize_t tty_line_name(struct tty_driver *driver, int index, char *p) { if (driver->flags & TTY_DRIVER_UNNUMBERED_NODE) return sprintf(p, "%s", driver->name); else return sprintf(p, "%s%d", driver->name, index + driver->name_base); }
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
301,790,338,222,910,070,000,000,000,000,000,000,000
8
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
Verifier::Callbacks* callback() const override { return callback_; }
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
289,957,842,158,998,360,000,000,000,000,000,000,000
1
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
static void get_server_splits(void *key, NETSPLIT_REC *split, TEMP_SPLIT_REC *rec) { TEMP_SPLIT_CHAN_REC *chanrec; GSList *tmp; if (split->printed || g_slist_find(rec->servers, split->server) == NULL) return; split->printed = TRUE; for (tmp = split->channels; tmp != NULL; tmp = tmp->next) { NET...
0
[ "CWE-416" ]
irssi
a6cae91cecba2e8cf11ed779c5da5a229472575c
90,066,243,477,747,100,000,000,000,000,000,000,000
43
Merge pull request #812 from ailin-nemui/tape-netsplit revert netsplit print optimisation (cherry picked from commit 7de1378dab8081932d9096e19ae3d0921e560230)
static int sgi_timer_create(struct k_itimer *timer) { /* Insure that a newly created timer is off */ timer->it.mmtimer.clock = TIMER_OFF; return 0; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
276,964,488,458,537,070,000,000,000,000,000,000,000
6
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static const char* oidc_get_current_url_scheme(const request_rec *r) { /* first see if there's a proxy/load-balancer in front of us */ const char *scheme_str = oidc_util_hdr_in_x_forwarded_proto_get(r); /* if not we'll determine the scheme used to connect to this server */ if (scheme_str == NULL) { #ifdef APACHE2_0...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
124,555,281,571,901,050,000,000,000,000,000,000,000
21
Add a function to escape Javascript characters
static unsigned int btrfs_inode_flags_to_xflags(unsigned int flags) { unsigned int xflags = 0; if (flags & BTRFS_INODE_APPEND) xflags |= FS_XFLAG_APPEND; if (flags & BTRFS_INODE_IMMUTABLE) xflags |= FS_XFLAG_IMMUTABLE; if (flags & BTRFS_INODE_NOATIME) xflags |= FS_XFLAG_NOATIME; if (flags & BTRFS_INODE_NODU...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
172,134,460,676,007,650,000,000,000,000,000,000,000
17
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
void __weak bpf_jit_compile(struct bpf_prog *prog) { }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
143,136,732,716,784,330,000,000,000,000,000,000,000
3
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static inline void setsck(const struct spi_device *spi, int is_on) { struct spi_gpio *spi_gpio = spi_to_spi_gpio(spi); gpiod_set_value_cansleep(spi_gpio->sck, is_on); }
0
[ "CWE-400", "CWE-401" ]
linux
d3b0ffa1d75d5305ebe34735598993afbb8a869d
234,469,264,969,393,270,000,000,000,000,000,000,000
6
spi: gpio: prevent memory leak in spi_gpio_probe In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but this controller should be released if devm_add_action_or_reset fails, otherwise memory leaks. In order to avoid leak spi_contriller_put must be called in case of failure for devm_add_action_or_reset....
QPDFObjectHandle::pipeStreamData(Pipeline* p, bool filter, bool normalize, bool compress) { int encode_flags = 0; qpdf_stream_decode_level_e decode_level = qpdf_dl_none; if (filter) { decode_level = qpdf_dl_generalized; if (normalize) { encode_flags |= qpdf_ef_no...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
312,085,884,047,783,950,000,000,000,000,000,000,000
19
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
virDomainDefMemtuneValidate(const virDomainDef *def) { const virDomainMemtune *mem = &(def->mem); size_t i; ssize_t pos = virDomainNumaGetNodeCount(def->numa) - 1; for (i = 0; i < mem->nhugepages; i++) { size_t j; ssize_t nextBit; for (j = 0; j < i; j++) { if (mem->...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
150,348,924,232,800,420,000,000,000,000,000,000,000
49
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
PHPAPI zend_string *php_escape_shell_cmd(char *str) { register int x, y, l = (int)strlen(str); size_t estimate = (2 * l) + 1; zend_string *cmd; #ifndef PHP_WIN32 char *p = NULL; #endif cmd = zend_string_safe_alloc(2, l, 0, 0); for (x = 0, y = 0; x < l; x++) { int mb_len = php_mblen(str + x, (l - x)); /* s...
0
[ "CWE-703", "CWE-189" ]
php-src
2871c70efaaaa0f102557a17c727fd4d5204dd4b
250,894,841,768,207,060,000,000,000,000,000,000,000
91
Patch for Heap Buffer Overflow in EscapeShell Proposed patch for bug #71270
static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx, CodedBitstreamFragment *frag, int header) { AVBufferRef *data_ref; uint8_t *data; size_t data_size; int unit, start, end, marker, next_start, next_marker; int err, i, ...
1
[ "CWE-787" ]
FFmpeg
a3a3730b5456ca00587455004d40c047f7b20a99
97,423,740,291,215,520,000,000,000,000,000,000,000
136
avcodec/cbs_jpeg: Check length for SOS Fixes: out of array access Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584 Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680 Found-by: continuous fuzzing process https://github.com/google/oss...
Item *Item_cache_wrapper::check_cache() { DBUG_ENTER("Item_cache_wrapper::check_cache"); if (expr_cache) { Expression_cache_tmptable::result res; Item *cached_value; init_on_demand(); res= expr_cache->check_value(&cached_value); if (res == Expression_cache_tmptable::HIT) DBUG_RETURN(cach...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
241,118,721,356,740,240,000,000,000,000,000,000,000
14
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'...
static bool is_inf(const bool) { return false; }
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
79,394,480,518,433,080,000,000,000,000,000,000,000
1
Fix other issues in 'CImg<T>::load_bmp()'.
set_default_script_user(const char *username, const char *groupname) { if (!default_script_uid_set || username) { /* Even if we fail to set it, there is no point in trying again */ default_script_uid_set = true; if (set_uid_gid(username, groupname, &default_script_uid, &default_script_gid, true)) { if (usern...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
67,688,413,231,530,740,000,000,000,000,000,000,000
16
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static int v9fs_mapped_dotl_flags(int flags) { int i; int rflags = 0; struct dotl_openflag_map dotl_oflag_map[] = { { O_CREAT, P9_DOTL_CREATE }, { O_EXCL, P9_DOTL_EXCL }, { O_NOCTTY, P9_DOTL_NOCTTY }, { O_APPEND, P9_DOTL_APPEND }, { O_NONBLOCK, P9_DOTL_NONBLOCK }, { O_DSYNC, P9_DOTL_DSYNC }, { FASYNC, ...
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
329,687,526,521,314,800,000,000,000,000,000,000,000
26
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){ const uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; int i; for(i=0; i<w; i++){ const int src_1= src[ -srcStride]; const int src0 = src[0 ]; const int src1 = src[ srcStride]; ...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
240,701,155,429,680,200,000,000,000,000,000,000,000
28
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
init_chartab(void) { return buf_init_chartab(curbuf, TRUE); }
0
[ "CWE-125", "CWE-787" ]
vim
94f3192b03ed27474db80b4d3a409e107140738b
14,512,039,099,415,942,000,000,000,000,000,000,000
4
patch 8.2.3950: going beyond the end of the line with /\%V Problem: Going beyond the end of the line with /\%V. Solution: Check for valid column in getvcol().
static void snd_usbmidi_standard_output(struct snd_usb_midi_out_endpoint *ep, struct urb *urb) { int p; /* FIXME: lower-numbered ports can starve higher-numbered ports */ for (p = 0; p < 0x10; ++p) { struct usbmidi_out_port *port = &ep->ports[p]; if (!port->active) continue; while (urb->transfer_buffe...
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
339,968,728,973,447,500,000,000,000,000,000,000,000
20
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
Item *remove_pushed_top_conjuncts(THD *thd, Item *cond) { if (cond->get_extraction_flag() == FULL_EXTRACTION_FL) { cond->clear_extraction_flag(); return 0; } if (cond->type() == Item::COND_ITEM) { if (((Item_cond*) cond)->functype() == Item_func::COND_AND_FUNC) { List_iterator<Item> li(...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
176,951,320,661,621,700,000,000,000,000,000,000,000
34
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
static void tcp_data_queue(struct sock *sk, struct sk_buff *skb) { const struct tcphdr *th = tcp_hdr(skb); struct tcp_sock *tp = tcp_sk(sk); int eaten = -1; if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) goto drop; skb_dst_drop(skb); __skb_pull(skb, th->doff * 4); TCP_ECN_accept_cwr(tp, skb); tp->r...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
208,994,624,140,729,400,000,000,000,000,000,000,000
215
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
char* oidc_util_escape_string(const request_rec *r, const char *str) { CURL *curl = curl_easy_init(); if (curl == NULL) { oidc_error(r, "curl_easy_init() error"); return NULL; } char *result = curl_easy_escape(curl, str, 0); if (result == NULL) { oidc_error(r, "curl_easy_escape() error"); return NULL; } ...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
59,011,112,646,932,560,000,000,000,000,000,000,000
16
Add a function to escape Javascript characters
static int stgi_interception(struct kvm_vcpu *vcpu) { int ret; if (nested_svm_check_permissions(vcpu)) return 1; ret = kvm_skip_emulated_instruction(vcpu); svm_set_gif(to_svm(vcpu), true); return ret; }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
301,419,130,908,906,100,000,000,000,000,000,000,000
11
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 int selinux_sctp_bind_connect(struct sock *sk, int optname, struct sockaddr *address, int addrlen) { int len, err = 0, walk_size = 0; void *addr_buf; struct sockaddr *addr; struct socket *sock; if (!selinux_policycap_extsockclass()) return 0; /* Process one or more addresses that may ...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
82,637,035,462,024,450,000,000,000,000,000,000,000
77
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 debug_print_tree(struct ext4_sb_info *sbi) { struct rb_node *node; struct ext4_system_zone *entry; struct ext4_system_blocks *system_blks; int first = 1; printk(KERN_INFO "System zones: "); rcu_read_lock(); system_blks = rcu_dereference(sbi->system_blks); node = rb_first(&system_blks->root); while...
0
[ "CWE-703" ]
linux
ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1
202,679,097,059,376,450,000,000,000,000,000,000,000
21
ext4: check journal inode extents more carefully Currently, system zones just track ranges of block, that are "important" fs metadata (bitmaps, group descriptors, journal blocks, etc.). This however complicates how extent tree (or indirect blocks) can be checked for inodes that actually track such metadata - currently...
oberthur_detect_card(struct sc_pkcs15_card * p15card) { struct sc_card *card = p15card->card; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); if (p15card->card->type != SC_CARD_TYPE_OBERTHUR_64K) LOG_FUNC_RETURN(p15card->card->ctx, SC_ERROR_WRONG_CARD); LOG_FUNC_RETURN(p15card->card->ctx, SC_SUCCESS); }
0
[ "CWE-787" ]
OpenSC
6903aebfddc466d966c7b865fae34572bf3ed23e
1,983,533,969,969,801,400,000,000,000,000,000,000
9
Heap-buffer-overflow WRITE fixes https://oss-fuzz.com/testcase-detail/5088104168554496
g_NPN_ReloadPlugins(NPBool reloadPages) { D(bug("NPN_ReloadPlugins reloadPages=%d\n", reloadPages)); NPW_UNIMPLEMENTED(); }
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
165,141,944,026,312,260,000,000,000,000,000,000,000
6
Support all the new variables added
struct libmnt_fs *mnt_copy_fs(struct libmnt_fs *dest, const struct libmnt_fs *src) { const struct libmnt_fs *org = dest; if (!src) return NULL; if (!dest) { dest = mnt_new_fs(); if (!dest) return NULL; dest->tab = NULL; } dest->id = src->id; dest->parent = src->parent; dest->d...
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
80,101,768,096,662,650,000,000,000,000,000,000,000
60
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...