func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void migrate_dead_tasks(unsigned int dead_cpu) { struct rq *rq = cpu_rq(dead_cpu); struct task_struct *next; for ( ; ; ) { if (!rq->nr_running) break; update_rq_clock(rq); next = pick_next_task(rq, rq->curr); if (!next) break; migrate_dead(dead_cpu, next); } }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
278,349,715,160,411,900,000,000,000,000,000,000,000
16
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
int SSL_connect(SSL *s) { if (s->handshake_func == 0) /* Not properly initialized yet */ SSL_set_connect_state(s); return(s->method->ssl_connect(s)); }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
306,382,658,841,267,030,000,000,000,000,000,000,000
8
Add Next Protocol Negotiation.
void DES_ede3_cbc_encrypt(const byte* input, byte* output, long sz, DES_key_schedule* ks1, DES_key_schedule* ks2, DES_key_schedule* ks3, DES_cblock* ivec, int enc) { DES_EDE des; byte key[DES_EDE_KEY_SZ]; memcpy(key, *ks1, DES_BLOCK); memcpy(&key[DES_...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
249,778,608,143,597,020,000,000,000,000,000,000,000
20
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
*/ void unregister_netdevice_many(struct list_head *head) { struct net_device *dev; if (!list_empty(head)) { rollback_registered_many(head); list_for_each_entry(dev, head, unreg_list) net_set_todo(dev); }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
319,865,414,979,749,430,000,000,000,000,000,000,000
10
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
compile_length_cclass_node(CClassNode* cc, regex_t* reg) { int len; if (IS_NCCLASS_SHARE(cc)) { len = SIZE_OPCODE + SIZE_POINTER; return len; } if (IS_NULL(cc->mbuf)) { len = SIZE_OPCODE + SIZE_BITSET; } else { if (ONIGENC_MBC_MINLEN(reg->enc) > 1 || bitset_is_empty(cc->bs)) { len = ...
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
45,460,774,079,520,570,000,000,000,000,000,000,000
28
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
COMPAT_SYSCALL_DEFINE4(rt_sigaction, int, sig, const struct compat_sigaction __user *, act, struct compat_sigaction __user *, oact, compat_size_t, sigsetsize) { struct k_sigaction new_ka, old_ka; compat_sigset_t mask; #ifdef __ARCH_HAS_SA_RESTORER compat_uptr_t restorer; #endif int ret; /* XXX: Don't preclu...
0
[ "CWE-399" ]
linux
b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
246,171,050,619,114,900,000,000,000,000,000,000,000
45
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 ...
PosibErr<int> Config::retrieve_int(ParmStr key) const { assert(committed_); // otherwise the value may not be an integer // as it has not been verified. RET_ON_ERR_SET(keyinfo(key), const KeyInfo *, ki); if (ki->type != KeyInfoInt) return make_err(key_not_int, ki->name); co...
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
260,569,612,571,873,500,000,000,000,000,000,000,000
14
Fix various bugs found by OSS-Fuze.
char *concat_path_basename(const char *path, const char *filename) { char *abspath = realpath(filename, NULL); char *base = strrchr((abspath ? abspath : filename), '/'); /* If realpath failed and filename is malicious (say, "/foo/.."), * we may end up tricked into doing some bad things. Don't allow th...
0
[ "CWE-22" ]
libreport
54ecf8d017580b495d6501e53ca54e453a73a364
133,969,548,475,013,520,000,000,000,000,000,000,000
23
lib: add a function checking file names Move the code from ABRT and extend it a bit: * allow only 64 characters * allow '.' in names (vmcore_dmesg.txt) * forbid '/' * forbid "." * forbid ".." Related: #1214451 Signed-off-by: Jakub Filak <jfilak@redhat.com>
vte_insert_line_internal(VteTerminal *terminal, glong position) { VteRowData *row, *old_row; old_row = terminal->pvt->free_row; /* Pad out the line data to the insertion point. */ while (_vte_ring_next(terminal->pvt->screen->row_data) < position) { if (old_row) { row = _vte_reset_row_data (terminal, old_row, T...
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
42,779,108,198,003,980,000,000,000,000,000,000,000
27
fix bug #548272 svn path=/trunk/; revision=2365
static int burl_normalize_basic_unreserved (buffer *b, buffer *t) { const unsigned char * const s = (unsigned char *)b->ptr; const int used = (int)buffer_string_length(b); unsigned int n1, n2, x; int qs = -1; for (int i = 0; i < used; ++i) { if (!encoded_chars_http_uri_reqd[s[i]]) { ...
0
[ "CWE-190" ]
lighttpd1.4
32120d5b8b3203fc21ccb9eafb0eaf824bb59354
69,945,097,507,509,350,000,000,000,000,000,000,000
30
[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
qtdemux_tag_add_location (GstQTDemux * qtdemux, GstTagList * taglist, const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; int offset; char *name; gchar *data; gdouble longitude, latitude, altitude; gint len; len = QT_UINT3...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
76,776,394,207,655,900,000,000,000,000,000,000,000
68
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
slang_clear(slang_T *lp) { garray_T *gap; fromto_T *ftp; salitem_T *smp; int i; int round; VIM_CLEAR(lp->sl_fbyts); VIM_CLEAR(lp->sl_kbyts); VIM_CLEAR(lp->sl_pbyts); VIM_CLEAR(lp->sl_fidxs); VIM_CLEAR(lp->sl_kidxs); VIM_CLEAR(lp->sl_pidxs); for (round = 1; round <= 2...
0
[ "CWE-416" ]
vim
2813f38e021c6e6581c0c88fcf107e41788bc835
136,608,730,273,529,260,000,000,000,000,000,000,000
84
patch 8.2.5072: using uninitialized value and freed memory in spell command Problem: Using uninitialized value and freed memory in spell command. Solution: Initialize "attr". Check for empty line early.
static void vmx_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg) { struct vcpu_vmx *vmx = to_vmx(vcpu); const struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg]; vmx_segment_cache_clear(vmx); if (vmx->rmode.vm86_active && seg != VCPU_SREG_LDTR) { vmx->rmode.segs[seg] = *v...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
150,964,399,636,099,380,000,000,000,000,000,000,000
40
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
proto_cleanup_base(void) { protocol_t *protocol; header_field_info *hfinfo; /* Free the abbrev/ID hash table */ if (gpa_name_map) { g_hash_table_destroy(gpa_name_map); gpa_name_map = NULL; } if (gpa_protocol_aliases) { g_hash_table_destroy(gpa_protocol_aliases); gpa_protocol_aliases = NULL; } g_free(la...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
14,348,607,476,153,832,000,000,000,000,000,000,000
75
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static void setfreq(struct gspca_dev *gspca_dev, s32 val) { struct sd *sd = (struct sd *) gspca_dev; setfreq_i(sd, val); /* Ugly but necessary */ if (sd->bridge == BRIDGE_W9968CF) w9968cf_set_crop_window(sd); }
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
299,377,689,267,918,700,000,000,000,000,000,000,000
10
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
static int mailbox_reconstruct_compare_update(struct mailbox *mailbox, struct index_record *record, bit32 *valid_user_flags, int flags, int have_file, ...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
285,964,558,744,078,900,000,000,000,000,000,000,000
256
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
combine_sources(int n_sel_sources, struct timespec *ref_time, double *offset, double *offset_sd, double *frequency, double *frequency_sd, double *skew) { struct timespec src_ref_time; double src_offset, src_offset_sd, src_frequency, src_frequency_sd, src_skew; double src_root_delay, src_root_dispe...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
263,787,717,286,161,550,000,000,000,000,000,000,000
86
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static void balistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); for ( mi = mi->sub; mi->ti.text!=NULL || mi->ti.line ; ++mi ) { if ( mi->mid==MID_BuildAccent || mi->mid==MID_BuildComposite ) { int anybuildable = false; int onlya...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
166,222,067,545,163,890,000,000,000,000,000,000,000
38
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static inline enum ib_mig_state to_ib_mig_state(int mlx5_mig_state) { switch (mlx5_mig_state) { case MLX5_QP_PM_ARMED: return IB_MIG_ARMED; case MLX5_QP_PM_REARM: return IB_MIG_REARM; case MLX5_QP_PM_MIGRATED: return IB_MIG_MIGRATED; default: return -1; } }
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
100,811,209,263,784,180,000,000,000,000,000,000,000
9
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
static void loosen_unused_packed_objects(struct rev_info *revs) { struct packed_git *p; uint32_t i; const unsigned char *sha1; for (p = packed_git; p; p = p->next) { if (!p->pack_local || p->pack_keep) continue; if (open_pack_index(p)) die("cannot open pack index"); for (i = 0; i < p->num_objects; i+...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
230,325,846,626,005,000,000,000,000,000,000,000,000
23
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static int vnc_display_get_addresses(QemuOpts *opts, bool reverse, SocketAddress ***retsaddr, size_t *retnsaddr, SocketAddress ***retwsaddr, ...
0
[ "CWE-772" ]
qemu
d3b0db6dfea6b3a9ee0d96aceb796bdcafa84314
151,271,656,570,559,560,000,000,000,000,000,000,000
106
vnc: Set default kbd delay to 10ms The current VNC default keyboard delay is 1ms. With that we're constantly typing faster than the guest receives keyboard events from an XHCI attached USB HID device. The default keyboard delay time in the input layer however is 10ms. I don't know how that number came to be, but empi...
u32 gf_isom_oinf_size_entry(void *entry) { GF_OperatingPointsInformation* ptr = (GF_OperatingPointsInformation *)entry; u32 size = 0, i ,j, count; if (!ptr) return 0; size += 3; //scalability_mask + reserved + num_profile_tier_level count=gf_list_count(ptr->profile_tier_levels); size += count * 12; //general_pro...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
296,282,335,954,299,740,000,000,000,000,000,000,000
36
fix some exploitable overflows (#994, #997)
static int get_uint16(QEMUFile *f, void *pv, size_t size) { uint16_t *v = pv; qemu_get_be16s(f, v); return 0; }
0
[ "CWE-119" ]
qemu
d2ef4b61fe6d33d2a5dcf100a9b9440de341ad62
193,699,929,713,922,680,000,000,000,000,000,000,000
6
vmstate: fix buffer overflow in target-arm/machine.c CVE-2013-4531 cpreg_vmstate_indexes is a VARRAY_INT32. A negative value for cpreg_vmstate_array_len will cause a buffer overflow. VMSTATE_INT32_LE was supposed to protect against this but doesn't because it doesn't validate that input is non-negative. Fix this ma...
JOIN::destroy() { DBUG_ENTER("JOIN::destroy"); select_lex->join= 0; cond_equal= 0; having_equal= 0; cleanup(1); if (join_tab) { for (JOIN_TAB *tab= first_linear_tab(this, WITH_BUSH_ROOTS, WITH_CONST_TABLES); tab; tab= next_linear_tab(this, tab, WITH...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
304,662,252,453,400,900,000,000,000,000,000,000,000
39
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...
GfxResources::~GfxResources() { if (fonts) { delete fonts; } xObjDict.free(); colorSpaceDict.free(); patternDict.free(); shadingDict.free(); gStateDict.free(); propertiesDict.free(); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
305,754,787,702,231,300,000,000,000,000,000,000,000
11
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
static void mptsas_process_message(MPTSASState *s, MPIRequestHeader *req) { trace_mptsas_process_message(s, req->Function, req->MsgContext); switch (req->Function) { case MPI_FUNCTION_SCSI_TASK_MGMT: mptsas_process_scsi_task_mgmt(s, (MPIMsgSCSITaskMgmt *)req); break; case MPI_FUNCTION_I...
0
[ "CWE-416" ]
qemu
3791642c8d60029adf9b00bcb4e34d7d8a1aea4d
221,324,100,733,578,470,000,000,000,000,000,000,000
38
mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392) While processing SCSI i/o requests in mptsas_process_scsi_io_request(), the Megaraid emulator appends new MPTSASRequest object 'req' to the 's->pending' queue. In case of an error, this same object gets dequeued in mptsas_free_request() only if SCSIRequ...
void SetBackgroundColor(content::RenderWidgetHostView* rwhv, SkColor color) { rwhv->SetBackgroundColor(color); static_cast<content::RenderWidgetHostViewBase*>(rwhv) ->SetContentBackgroundColor(color); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
169,486,145,976,432,000,000,000,000,000,000,000,000
5
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 ...
static char *file_name_path(struct augeas *aug, const char *fname) { char *path = NULL; pathjoin(&path, 2, AUGEAS_FILES_TREE, fname + strlen(aug->root) - 1); return path; }
0
[]
augeas
051c73a9a7ffe9e525f6f0a1b8f5198ff8cc6752
320,314,507,727,354,700,000,000,000,000,000,000,000
6
Fix regression in permissions of created files Commit 16387744 changed temporary file creation to use mkstemp, resulting in new files being created with 0600 permissions. For brand new files created through Augeas, their permissions stayed at 0600 rather than being set by the umask as before. * src/transform.c (tr...
static void mwifiex_pcie_reset_done(struct pci_dev *pdev) { struct pcie_service_card *card = pci_get_drvdata(pdev); struct mwifiex_adapter *adapter = card->adapter; int ret; if (!adapter) { dev_err(&pdev->dev, "%s: adapter structure is not valid\n", __func__); return; } mwifiex_dbg(adapter, INFO, "...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
304,454,669,646,859,600,000,000,000,000,000,000,000
22
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
static int l2tp_ip6_backlog_recv(struct sock *sk, struct sk_buff *skb) { int rc; /* Charge it to the socket, dropping if the queue is full. */ rc = sock_queue_rcv_skb(sk, skb); if (rc < 0) goto drop; return 0; drop: IP_INC_STATS(sock_net(sk), IPSTATS_MIB_INDISCARDS); kfree_skb(skb); return -1; }
0
[ "CWE-416", "CWE-284" ]
linux
32c231164b762dddefa13af5a0101032c70b50ef
283,976,956,307,157,830,000,000,000,000,000,000,000
16
l2tp: fix racy SOCK_ZAPPED flag check in l2tp_ip{,6}_bind() Lock socket before checking the SOCK_ZAPPED flag in l2tp_ip6_bind(). Without lock, a concurrent call could modify the socket flags between the sock_flag(sk, SOCK_ZAPPED) test and the lock_sock() call. This way, a socket could be inserted twice in l2tp_ip6_bin...
read_old_length(cdk_stream_t inp, int ctb, size_t * r_len, size_t * r_size) { int llen = ctb & 0x03; int c; if (llen == 0) { c = cdk_stream_getc(inp); if (c == EOF) goto fail; *r_len = c; (*r_size)++; } else if (llen == 1) { *r_len = read_16(inp); if (*r_len == (u16)-1) goto fail; (*r_size) +=...
0
[ "CWE-125" ]
gnutls
49be4f7b82eba2363bb8d4090950dad976a77a3a
229,468,755,419,276,960,000,000,000,000,000,000,000
30
opencdk: added error checking in the stream reading functions This addresses an out of memory error. Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=337 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
static void uvesafb_vbe_state_restore(struct uvesafb_par *par, u8 *state_buf) { struct uvesafb_ktask *task; int err; if (!state_buf) return; task = uvesafb_prep(); if (!task) return; task->t.regs.eax = 0x4f04; task->t.regs.ecx = 0x000f; task->t.regs.edx = 0x0002; task->t.buf_len = par->vbe_state_size; ...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
154,176,039,106,884,700,000,000,000,000,000,000,000
26
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
char* parseValue( char* ptr, FileNode& node, int min_indent, bool is_parent_flow ) { if (!ptr) CV_PARSE_ERROR_CPP("Invalid input"); char* endptr = 0; char c = ptr[0], d = ptr[1]; int value_type = FileNode::NONE; int len; bool is_binary_string = false;...
0
[ "CWE-476" ]
opencv
5691d998ead1d9b0542bcfced36c2dceb3a59023
337,862,103,071,978,100,000,000,000,000,000,000,000
332
core(persistence): added null ptr checks
void* Type_LUTA2B_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag) { cmsUInt32Number BaseOffset; cmsUInt8Number inputChan; // Number of input channels cmsUInt8Number outputChan; // Number of output channels cmsUInt...
1
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
120,686,308,932,838,680,000,000,000,000,000,000,000
66
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...
checkconfig(const char *confpath, int argc, char **argv, uid_t uid, gid_t *groups, int ngroups, uid_t target) { const struct rule *rule; if (setresuid(uid, uid, uid) != 0) err(1, "setresuid"); parseconfig(confpath, 0); if (!argc) exit(0); if (permit(uid, groups, ngroups, &rule, target, argv[0], (co...
0
[ "CWE-200", "CWE-909" ]
OpenDoas
d5acd52e2a15c36a8e06f9103d35622933aa422d
132,366,093,313,522,200,000,000,000,000,000,000,000
21
correctly reset path for rules without specific command This is a fixup for commit 01c658f8c45cb92a343be5f32aa6da70b2032168 where the behaviour was changed to not inherit the PATH variable by default.
ENCODE_JSON(DiagnosticInfo) { status ret = UA_STATUSCODE_GOOD; if(!src->hasSymbolicId && !src->hasNamespaceUri && !src->hasLocalizedText && !src->hasLocale && !src->hasAdditionalInfo && !src->hasInnerDiagnosticInfo && !src->hasInnerStatusCode) { return writeJsonNull(ctx); /*no element pres...
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
21,389,621,978,453,870,000,000,000,000,000,000,000
63
fix(json): Check max recursion depth in more places
const char *jsP_aststring(enum js_AstType type) { if (type < nelem(astname)-1) return astname[type]; return "<unknown>"; }
0
[ "CWE-476" ]
mujs
f5b3c703e18725e380b83427004632e744f85a6f
117,212,951,048,885,300,000,000,000,000,000,000,000
6
Issue #161: Cope with empty programs in mujs-pp.
int ConnectionImpl::onStreamClose(int32_t stream_id, uint32_t error_code) { StreamImpl* stream = getStream(stream_id); if (stream) { ENVOY_CONN_LOG(debug, "stream closed: {}", connection_, error_code); if (!stream->remote_end_stream_ || !stream->local_end_stream_) { StreamResetReason reason; if ...
1
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
25,530,565,004,056,220,000,000,000,000,000,000,000
34
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...
void set_allow_inc_recurse(void) { client_info = shell_cmd ? shell_cmd : ""; if (!recurse || use_qsort) allow_inc_recurse = 0; else if (!am_sender && (delete_before || delete_after || delay_updates || prune_empty_dirs)) allow_inc_recurse = 0; else if (am_server && !local_server && (strchr(client_info, '...
0
[]
rsync
eac858085e3ac94ec0ab5061d11f52652c90a869
306,649,140,982,999,000,000,000,000,000,000,000,000
14
Add compat flag to allow proper seed checksum order. Fixes the equivalent of librsync's CVE-2014-8242 issue.
} else if (tk_eventloop_thread_id) { /* Tcl_ThreadQueueEvent(tk_eventloop_thread_id, &(callq->ev), TCL_QUEUE_HEAD); */ Tcl_ThreadQueueEvent(tk_eventloop_thread_id, (Tcl_Event*)callq, TCL_QUEUE_HEAD); Tcl_ThreadAlert(tk_eventloop_thread_id); } else {
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
333,712,620,858,625,840,000,000,000,000,000,000
7
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int em_lseg(struct x86_emulate_ctxt *ctxt) { int seg = ctxt->src2.val; unsigned short sel; int rc; memcpy(&sel, ctxt->src.valptr + ctxt->op_bytes, 2); rc = load_segment_descriptor(ctxt, sel, seg); if (rc != X86EMUL_CONTINUE) return rc; ctxt->dst.val = ctxt->src.val; return rc; }
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
252,761,852,322,191,800,000,000,000,000,000,000,000
15
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
int ssl3_write_bytes(SSL *s, int type, const void *buf_, int len) { const unsigned char *buf = buf_; int tot; unsigned int n, nw; #if !defined(OPENSSL_NO_MULTIBLOCK) && EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK unsigned int max_send_fragment; #endif SSL3_BUFFER *wb = &(s->s3->wbuf); int i; s->rwstate...
0
[ "CWE-17" ]
openssl
77c77f0a1b9f15b869ca3342186dfbedd1119d0e
280,238,300,772,351,800,000,000,000,000,000,000,000
222
Multiblock corrupted pointer fix OpenSSL 1.0.2 introduced the "multiblock" performance improvement. This feature only applies on 64 bit x86 architecture platforms that support AES NI instructions. A defect in the implementation of "multiblock" can cause OpenSSL's internal write buffer to become incorrectly set to NULL...
arg(identifier arg, expr_ty annotation, string type_comment, int lineno, int col_offset, int end_lineno, int end_col_offset, PyArena *arena) { arg_ty p; if (!arg) { PyErr_SetString(PyExc_ValueError, "field arg is required for arg"); return NULL; } p = (arg_ty)...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
194,770,443,369,784,800,000,000,000,000,000,000,000
21
bpo-35766: Merge typed_ast back into CPython (GH-11645)
xfs_da3_node_verify( struct xfs_buf *bp) { struct xfs_mount *mp = bp->b_target->bt_mount; struct xfs_da_intnode *hdr = bp->b_addr; struct xfs_da3_icnode_hdr ichdr; const struct xfs_dir_ops *ops; ops = xfs_dir_get_ops(mp, NULL); ops->node_hdr_from_disk(&ichdr, hdr); if (xfs_sb_version_hascrc(&mp->m_sb)) { ...
0
[ "CWE-399" ]
linux
c88547a8119e3b581318ab65e9b72f27f23e641d
205,925,884,366,457,940,000,000,000,000,000,000,000
45
xfs: fix directory hash ordering bug Commit f5ea1100 ("xfs: add CRCs to dir2/da node blocks") introduced in 3.10 incorrectly converted the btree hash index array pointer in xfs_da3_fixhashpath(). It resulted in the the current hash always being compared against the first entry in the btree rather than the current bloc...
static int __init efi_load_efivars(void) { struct platform_device *pdev; if (!efi_enabled(EFI_RUNTIME_SERVICES)) return 0; pdev = platform_device_register_simple("efivars", 0, NULL, 0); return PTR_ERR_OR_ZERO(pdev); }
0
[]
linux
1957a85b0032a81e6482ca4aab883643b8dae06e
219,723,287,348,123,050,000,000,000,000,000,000,000
10
efi: Restrict efivar_ssdt_load when the kernel is locked down efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Ard Biesheuvel <...
~ExecutionAccess() { Unlock(isolate_); }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
97,940,011,413,687,460,000,000,000,000,000,000,000
1
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
dp_packet_hwol_set_csum_udp(struct dp_packet *b) { *dp_packet_ol_flags_ptr(b) |= DP_PACKET_OL_TX_UDP_CKSUM; }
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
253,143,757,551,041,230,000,000,000,000,000,000,000
4
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static OPJ_BOOL opj_tcd_t1_decode ( opj_tcd_t *p_tcd ) { OPJ_UINT32 compno; opj_t1_t * l_t1; opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles; opj_tcd_tilecomp_t* l_tile_comp = l_tile->comps; opj_tccp_t * l_tccp = p_tcd->tcp->tccps; l_t1 = opj_t1_create(OPJ_FALSE); ...
0
[ "CWE-369" ]
openjpeg
8f9cc62b3f9a1da9712329ddcedb9750d585505c
247,784,281,373,967,440,000,000,000,000,000,000,000
28
Fix division by zero Fix uclouvain/openjpeg#733
static bool reanalyze_fcns_cb(void *u, const ut64 k, const void *v) { RzCore *core = u; RzAnalysisFunction *fcn = (RzAnalysisFunction *)(size_t)k; if (fcn->addr && analyze_noreturn_function(core, fcn)) { fcn->is_noreturn = true; rz_analysis_noreturn_add(core->analysis, NULL, fcn->addr); } return true; }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
148,830,172,326,503,680,000,000,000,000,000,000,000
9
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
fm_fe_status_query ( IN p_fm_config_conx_hdlt hdl, IN fm_mgr_action_t action, OUT fm_fe_status_t *info, OUT fm_msg_ret_code_t *ret_code ) { p_hsm_com_client_hdl_t client_hdl; if ( (client_hdl = get_mgr_hdl(hdl,FM_MGR_FE)) != NULL ) { return fm_mgr_general_query(client_hdl,...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
335,891,342,272,165,230,000,000,000,000,000,000,000
18
Fix scripts and code that use well-known tmp files.
static void test_frm_bug() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[2]; MYSQL_RES *result; MYSQL_ROW row; FILE *test_file; char data_dir[FN_REFLEN]; char test_frm[FN_REFLEN]; int rc; myheader("test_frm_bug"); mysql_autocommit(mysql, TRUE); rc= mysql_query(mysql, "drop t...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
167,344,335,527,567,080,000,000,000,000,000,000,000
83
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...
static int rsa_cms_sign(CMS_SignerInfo *si) { int pad_mode = RSA_PKCS1_PADDING; X509_ALGOR *alg; EVP_PKEY_CTX *pkctx = CMS_SignerInfo_get0_pkey_ctx(si); ASN1_STRING *os = NULL; CMS_SignerInfo_get0_algs(si, NULL, NULL, NULL, &alg); if (pkctx) { if (EVP_PKEY_CTX_get_rsa_padding(pkctx, &pad...
0
[]
openssl
4b22cce3812052fe64fc3f6d58d8cc884e3cb834
289,084,019,699,680,370,000,000,000,000,000,000,000
24
Reject invalid PSS parameters. Fix a bug where invalid PSS parameters are not rejected resulting in a NULL pointer exception. This can be triggered during certificate verification so could be a DoS attack against a client or a server enabling client authentication. Thanks to Brian Carpenter for reporting this issues....
struct razer_report razer_chroma_standard_set_device_mode(unsigned char mode, unsigned char param) { struct razer_report report = get_razer_report(0x00, 0x04, 0x02); if(mode != 0x00 && mode != 0x03) { // Explicitly blocking the 0x02 mode mode = 0x00; } if(param != 0x00) { param = 0x00; ...
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
17,527,904,631,295,569,000,000,000,000,000,000,000
16
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
hb_set_union (hb_set_t *set, const hb_set_t *other) { if (unlikely (hb_object_is_immutable (set))) return; set->union_ (*other); }
1
[ "CWE-787" ]
harfbuzz
d3e09bf4654fe5478b6dbf2b26ebab6271317d81
67,022,321,955,891,300,000,000,000,000,000,000,000
8
[set] Make all operators null-safe again Changed my mind. Also for hb_map_clear(). Part of https://github.com/harfbuzz/harfbuzz/pull/3162
static gg_action_t gg_handle_tls_negotiation(struct gg_session *sess, struct gg_event *e, enum gg_state_t next_state, enum gg_state_t alt_state, enum gg_state_t alt2_state) { #ifdef GG_CONFIG_HAVE_GNUTLS unsigned int status; int valid_hostname = 0; int res; gg_debug_session(sess, GG_DEBUG_MISC, "// gg_watch_fd() G...
1
[ "CWE-310" ]
libgadu
77fdc9351bf5c1913c7fc518f8a0c0c87ab3860f
200,058,763,643,053,420,000,000,000,000,000,000,000
195
Weryfikacja nazwy hosta w OpenSSL. Ignorujemy subjectAltname póki co.
DocumentSource::GetNextResult DocumentSourceUnionWith::doGetNext() { if (!_pipeline) { // We must have already been disposed, so we're finished. return GetNextResult::makeEOF(); } if (_executionState == ExecutionProgress::kIteratingSource) { auto nextInput = pSource->getNext(); ...
0
[]
mongo
6518b22420c5bbd92c42caf907671c3a2b140bb6
116,233,947,624,890,800,000,000,000,000,000,000,000
51
SERVER-58203 factor out logging statements into helper functions
int line6_send_sysex_message(struct usb_line6 *line6, const char *buffer, int size) { return line6_send_raw_message(line6, buffer, size + SYSEX_EXTRA_SIZE) - SYSEX_EXTRA_SIZE; }
0
[ "CWE-476" ]
linux
0b074ab7fc0d575247b9cc9f93bb7e007ca38840
99,260,276,876,066,840,000,000,000,000,000,000,000
7
ALSA: line6: Assure canceling delayed work at disconnection The current code performs the cancel of a delayed work at the late stage of disconnection procedure, which may lead to the access to the already cleared state. This patch assures to call cancel_delayed_work_sync() at the beginning of the disconnection proced...
njs_generator_pop(njs_vm_t *vm, njs_generator_t *generator, njs_parser_node_t *node) { return njs_generator_stack_pop(vm, generator, NULL); }
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
434,007,479,987,586,000,000,000,000,000,000,000
5
Fixed break instruction in a try-catch block. Previously, JUMP offset for a break instruction inside a try-catch block was not set to a correct offset during code generation when a return instruction was present in inner try-catch block. The fix is to update the JUMP offset appropriately. This closes #553 issue on G...
GF_EXPORT GF_Err gf_isom_open_segment(GF_ISOFile *movie, const char *fileName, u64 start_range, u64 end_range, GF_ISOSegOpenMode flags) { #ifdef GPAC_DISABLE_ISOM_FRAGMENTS return GF_NOT_SUPPORTED; #else u64 MissingBytes; GF_Err e; u32 i; Bool segment_map_assigned = GF_FALSE; Bool is_scalable_segment = (flags & G...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
329,900,638,363,676,760,000,000,000,000,000,000,000
81
fixed #1706
static bool pb_message_set_to_defaults(pb_field_iter_t *iter) { pb_istream_t defstream = PB_ISTREAM_EMPTY; uint32_t tag = 0; pb_wire_type_t wire_type = PB_WT_VARINT; bool eof; if (iter->descriptor->default_value) { defstream = pb_istream_from_buffer(iter->descriptor->default_value, (siz...
0
[ "CWE-763" ]
nanopb
e2f0ccf939d9f82931d085acb6df8e9a182a4261
199,836,713,831,568,700,000,000,000,000,000,000,000
34
Fix invalid free() with oneof (#647) Nanopb would call free() or realloc() on an invalid (attacker controlled) pointer value when all the following conditions are true: - PB_ENABLE_MALLOC is defined at the compile time - Message definition contains an oneof field, and the oneof contains at least one pointer type fi...
make_absent_tree(Node** node, Node* absent, Node* expr, int is_range_cutter, ScanEnv* env) { int r; int i; int id1, id2; int possessive; Node* x; Node* ns[7]; r = ONIGERR_MEMORY; for (i = 0; i < 7; i++) ns[i] = NULL_NODE; ns[4] = expr; ns[5] = absent; if (is_range_cutter == 0) { ...
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
110,647,834,273,481,300,000,000,000,000,000,000,000
93
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
static void cmd_desc_free(RCmdDesc *cd) { if (!cd) { return; } r_pvector_clear (&cd->children); free (cd->name); free (cd); }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
94,211,943,768,868,840,000,000,000,000,000,000,000
9
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
void ovs_match_init(struct sw_flow_match *match, struct sw_flow_key *key, bool reset_key, struct sw_flow_mask *mask) { memset(match, 0, sizeof(*match)); match->key = key; match->mask = mask; if (reset_key) memset(key, 0, sizeof(*key)); if (mask) { memset(&mask->key, 0, sizeof(mask->key)); ...
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
152,247,895,346,010,940,000,000,000,000,000,000,000
17
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
ModuleExport size_t RegisterPCLImage(void) { MagickInfo *entry; entry=AcquireMagickInfo("PCL","PCL","Printer Control Language"); entry->decoder=(DecodeImageHandler *) ReadPCLImage; entry->encoder=(EncodeImageHandler *) WritePCLImage; entry->magick=(IsImageFormatHandler *) IsPCL; entry->flags^=CoderBlob...
0
[ "CWE-401" ]
ImageMagick
c0fe488e7052f68d4eb7768805a857ef6fef928d
129,783,378,422,077,450,000,000,000,000,000,000,000
14
https://github.com/ImageMagick/ImageMagick/issues/1520
match_address(struct TCP_Server_Info *server, struct sockaddr *addr, struct sockaddr *srcaddr) { switch (addr->sa_family) { case AF_INET: { struct sockaddr_in *addr4 = (struct sockaddr_in *)addr; struct sockaddr_in *srv_addr4 = (struct sockaddr_in *)&server->dstaddr; if (addr4->sin_addr.s_addr != s...
0
[ "CWE-20" ]
linux
70945643722ffeac779d2529a348f99567fa5c33
41,417,292,083,584,000,000,000,000,000,000,000,000
35
cifs: always do is_path_accessible check in cifs_mount Currently, we skip doing the is_path_accessible check in cifs_mount if there is no prefixpath. I have a report of at least one server however that allows a TREE_CONNECT to a share that has a DFS referral at its root. The reporter in this case was using a UNC that ...
static void tg3_coal_tx_init(struct tg3 *tp, struct ethtool_coalesce *ec) { int i = 0; if (!tg3_flag(tp, ENABLE_TSS)) { tw32(HOSTCC_TXCOL_TICKS, ec->tx_coalesce_usecs); tw32(HOSTCC_TXMAX_FRAMES, ec->tx_max_coalesced_frames); tw32(HOSTCC_TXCOAL_MAXF_INT, ec->tx_max_coalesced_frames_irq); } else { tw32(HOSTCC...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
295,936,210,276,543,150,000,000,000,000,000,000,000
31
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
bool body_get(JSContext *cx, unsigned argc, Value *vp) { METHOD_HEADER(0) return RequestOrResponse::body_get(cx, args, self, true); }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
221,803,056,615,541,200,000,000,000,000,000,000,000
4
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
static void mig_throttle_guest_down(void) { CPUState *cpu; qemu_mutex_lock_iothread(); CPU_FOREACH(cpu) { async_run_on_cpu(cpu, mig_sleep_cpu, NULL); } qemu_mutex_unlock_iothread(); }
0
[ "CWE-20" ]
qemu
0be839a2701369f669532ea5884c15bead1c6e08
192,657,950,778,301,170,000,000,000,000,000,000,000
10
migration: fix parameter validation on ram load During migration, the values read from migration stream during ram load are not validated. Especially offset in host_from_stream_offset() and also the length of the writes in the callers of said function. To fix this, we need to make sure that the [offset, offset + leng...
PJ_DEF(pj_status_t) pjsip_dlg_set_route_set( pjsip_dialog *dlg, const pjsip_route_hdr *route_set ) { pjsip_route_hdr *r; PJ_ASSERT_RETURN(dlg, PJ_EINVAL); pjsip_dlg_inc_lock(dlg); /* Clear route set. */ pj_list_init(&dlg->route_set); if (!route_set) { pjsip_dlg_dec_lock(dlg); ret...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
163,743,893,409,745,440,000,000,000,000,000,000,000
30
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
static void Sp_split_regexp(js_State *J) { js_Regexp *re; const char *text; int limit, len, k; const char *p, *a, *b, *c, *e; Resub m; text = checkstring(J, 0); re = js_toregexp(J, 1); limit = js_isdefined(J, 2) ? js_tointeger(J, 2) : 1 << 30; js_newarray(J); len = 0; e = text + strlen(text); /* splitti...
0
[ "CWE-400", "CWE-674", "CWE-787" ]
mujs
00d4606c3baf813b7b1c176823b2729bf51002a2
29,971,365,985,524,296,000,000,000,000,000,000,000
58
Bug 700937: Limit recursion in regexp matcher. Also handle negative return code as an error in the JS bindings.
TEST_F(ConnectionHandlerTest, TcpListenerRemoveFilterChain) { InSequence s; uint64_t listener_tag = 1; Network::ListenerCallbacks* listener_callbacks; auto listener = new NiceMock<Network::MockListener>(); TestListener* test_listener = addListener(listener_tag, true, false, "test_listener", listener, &l...
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
105,564,966,360,000,630,000,000,000,000,000,000,000
41
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int io_symlinkat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_symlink *sl = &req->symlink; const char __user *oldpath, *newpath; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->ioprio || sqe->len || sqe->rw_flags || sqe->buf_index || sqe-...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
154,472,623,307,759,380,000,000,000,000,000,000,000
31
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
process_extra(const char *p, size_t extra_length, struct zip_entry* zip_entry) { unsigned offset = 0; while (offset < extra_length - 4) { unsigned short headerid = archive_le16dec(p + offset); unsigned short datasize = archive_le16dec(p + offset + 2); offset += 4; if (offset + datasize > extra_length) { ...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
298,513,825,853,401,220,000,000,000,000,000,000,000
304
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
int dtls1_send_client_certificate(SSL *s) { X509 *x509 = NULL; EVP_PKEY *pkey = NULL; int i; unsigned long l; if (s->state == SSL3_ST_CW_CERT_A) { if ((s->cert == NULL) || (s->cert->key->x509 == NULL) || (s->cert->key->privatekey == NULL)) s->state = SSL3...
0
[ "CWE-399" ]
openssl
00a4c1421407b6ac796688871b0a49a179c694d9
22,962,249,545,815,105,000,000,000,000,000,000,000
78
Fix DTLS buffered message DoS attack DTLS can handle out of order record delivery. Additionally since handshake messages can be bigger than will fit into a single packet, the messages can be fragmented across multiple records (as with normal TLS). That means that the messages can arrive mixed up, and we have to reasse...
int AsyncSSLSocket::bioWrite(BIO* b, const char* in, int inl) { struct msghdr msg; struct iovec iov; AsyncSSLSocket* tsslSock; iov.iov_base = const_cast<char*>(in); iov.iov_len = size_t(inl); memset(&msg, 0, sizeof(msg)); msg.msg_iov = &iov; msg.msg_iovlen = 1; auto appData = OpenSSLUtils::getBioApp...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
37,476,753,799,922,317,000,000,000,000,000,000,000
49
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
mrb_bidx(uint16_t c) { uint8_t n = c & 0xf; uint8_t k = (c>>4) & 0xf; if (n == 15) n = 1; if (k == 15) n += 1; else n += k*2; return n + 1; /* self + args + kargs */ }
0
[ "CWE-122", "CWE-787" ]
mruby
47068ae07a5fa3aa9a1879cdfe98a9ce0f339299
124,723,718,597,583,980,000,000,000,000,000,000,000
9
vm.c: packed arguments length may be zero for `send` method.
static int eafnosupport_fib6_nh_init(struct net *net, struct fib6_nh *fib6_nh, struct fib6_config *cfg, gfp_t gfp_flags, struct netlink_ext_ack *extack) { NL_SET_ERR_MSG(extack, "IPv6 support not enabled in kernel"); return -EAFNOSUPPORT; }
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
66,825,186,546,333,990,000,000,000,000,000,000,000
7
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags) { struct pipe_buffer *ibuf, *obuf; int ret = 0, i = 0, nbuf; /* * Potential ABBA deadlock, work around it by ordering lock * grabbing by pipe info address. Otherwise two different pro...
1
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
291,239,606,612,353,230,000,000,000,000,000,000,000
74
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
followForm(void) { _followForm(FALSE); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
47,717,178,970,804,510,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
void fx_DataView_prototype_setInt32(txMachine* the) { fx_DataView_prototype_set(the, 4, fxIntCoerce, fxInt32Setter); }
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
31,989,095,296,167,026,000,000,000,000,000,000,000
4
XS: #896
xfs_destroy_ioend( struct xfs_ioend *ioend, int error) { struct inode *inode = ioend->io_inode; struct bio *last = ioend->io_bio; struct bio *bio, *next; for (bio = &ioend->io_inline_bio; bio; bio = next) { struct bio_vec *bvec; int i; /* * For the last bio, bi_private points to the ioend, so we ...
0
[ "CWE-362" ]
linux
04197b341f23b908193308b8d63d17ff23232598
129,267,573,683,239,740,000,000,000,000,000,000,000
28
xfs: don't BUG() on mixed direct and mapped I/O We've had reports of generic/095 causing XFS to BUG() in __xfs_get_blocks() due to the existence of delalloc blocks on a direct I/O read. generic/095 issues a mix of various types of I/O, including direct and memory mapped I/O to a single file. This is clearly not suppor...
mime_header_decoder_new(enum mbfl_no_encoding outcode) { struct mime_header_decoder_data *pd; pd = (struct mime_header_decoder_data*)mbfl_malloc(sizeof(struct mime_header_decoder_data)); if (pd == NULL) { return NULL; } mbfl_memory_device_init(&pd->outdev, 0, 0); mbfl_memory_device_init(&pd->tmpdev, 0, 0); p...
0
[ "CWE-119" ]
php-src
64f42c73efc58e88671ad76b6b6bc8e2b62713e1
75,617,500,448,638,240,000,000,000,000,000,000,000
29
Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut
bool interface_is_up(int index) { int sk, err; struct ifreq ifr; bool ret = false; sk = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0); if (sk < 0) { perror("Open socket error"); return false; } memset(&ifr, 0, sizeof(ifr)); ifr.ifr_ifindex = index; err = ioctl(sk, SIOCGIFNAME, &ifr); if (err < 0) { p...
0
[]
connman
58d397ba74873384aee449690a9070bacd5676fa
46,673,232,555,996,170,000,000,000,000,000,000,000
35
gdhcp: Avoid reading invalid data in dhcp_get_option
show_signal_msg(struct pt_regs *regs, unsigned long error_code, unsigned long address, struct task_struct *tsk) { const char *loglvl = task_pid_nr(tsk) > 1 ? KERN_INFO : KERN_EMERG; if (!unhandled_signal(tsk, SIGSEGV)) return; if (!printk_ratelimit()) return; printk("%s%s[%d]: segfault at %lx ip %px sp %px...
1
[ "CWE-20" ]
linux
342db04ae71273322f0011384a9ed414df8bdae4
39,990,333,952,621,840,000,000,000,000,000,000,000
21
x86/dumpstack: Don't dump kernel memory based on usermode RIP show_opcodes() is used both for dumping kernel instructions and for dumping user instructions. If userspace causes #PF by jumping to a kernel address, show_opcodes() can be reached with regs->ip controlled by the user, pointing to kernel code. Make sure th...
bool operator==(const SmallIntVal& other) const { if (is_null && other.is_null) { return true; } if (is_null || other.is_null) { return false; } return val == other.val; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
229,072,195,267,534,400,000,000,000,000,000,000,000
11
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
void CLASS identify() { static const short pana[][6] = { { 3130, 1743, 4, 0, -6, 0 }, { 3130, 2055, 4, 0, -6, 0 }, { 3130, 2319, 4, 0, -6, 0 }, { 3170, 2103, 18, 0,-42, 20 }, { 3170, 2367, 18, 13,-42,-21 }, { 3177, 2367, 0, 0, -1, 0 }, { 3304, 2458, 0, 0, -1, 0 }, { 333...
0
[]
LibRaw
9ae25d8c3a6bfb40c582538193264f74c9b93bc0
111,887,897,656,533,300,000,000,000,000,000,000,000
1,183
backported 0.15.4 datachecks
bson_iter_visit_all (bson_iter_t *iter, /* INOUT */ const bson_visitor_t *visitor, /* IN */ void *data) /* IN */ { uint32_t bson_type; const char *key; bool unsupported; BSON_ASSERT (iter); BSON_ASSERT (visitor); while (_bson_i...
0
[ "CWE-125" ]
mongo-c-driver
0d9a4d98bfdf4acd2c0138d4aaeb4e2e0934bd84
32,138,336,674,521,387,000,000,000,000,000,000,000
263
Fix for CVE-2018-16790 -- Verify bounds before binary length read. As reported here: https://jira.mongodb.org/browse/CDRIVER-2819, a heap overread occurs due a failure to correctly verify data bounds. In the original check, len - o returns the data left including the sizeof(l) we just read. Instead, the comparison sh...
void add_index_objects_to_pending(struct rev_info *revs, unsigned flags) { int i; read_cache(); for (i = 0; i < active_nr; i++) { struct cache_entry *ce = active_cache[i]; struct blob *blob; if (S_ISGITLINK(ce->ce_mode)) continue; blob = lookup_blob(ce->sha1); if (!blob) die("unable to add index b...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
124,191,655,493,716,900,000,000,000,000,000,000,000
25
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static bool kvm_test_age_rmapp(struct kvm *kvm, struct kvm_rmap_head *rmap_head, struct kvm_memory_slot *slot, gfn_t gfn, int level, pte_t unused) { u64 *sptep; struct rmap_iterator iter; for_each_rmap_spte(rmap_head, &iter, sptep) if (is_accessed_spte(*sptep)) return true; return false; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
231,206,866,613,647,830,000,000,000,000,000,000,000
12
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 ssize_t portio_name_show(struct uio_port *port, char *buf) { if (unlikely(!port->name)) port->name = ""; return sprintf(buf, "%s\n", port->name); }
0
[ "CWE-119", "CWE-189", "CWE-703" ]
linux
7314e613d5ff9f0934f7a0f74ed7973b903315d1
244,774,927,736,938,000,000,000,000,000,000,000,000
7
Fix a few incorrectly checked [io_]remap_pfn_range() calls Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that really should use the vm_iomap_memory() helper. This trivially converts two of them to the helper, and comments about why the third one really needs to continue to use remap_pfn_range(), ...
void ZipTest::testValidPath() { assert (ZipCommon::isValidPath(".")); assert (ZipCommon::isValidPath("file.txt")); assert (ZipCommon::isValidPath(".file.txt")); assert (ZipCommon::isValidPath("..file.txt")); assert (ZipCommon::isValidPath("file.txt..")); assert (ZipCommon::isValidPath(".file..txt")); assert (Zip...
0
[ "CWE-22" ]
poco
bb7e5feece68ccfd8660caee93da25c5c39a4707
68,441,721,830,478,990,000,000,000,000,000,000,000
35
merge zip entry absolute path vulnerability fix (#1968) from develop
static int iwl_trans_pcie_start_hw(struct iwl_trans *trans) { struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); int ret; mutex_lock(&trans_pcie->mutex); ret = _iwl_trans_pcie_start_hw(trans); mutex_unlock(&trans_pcie->mutex); return ret; }
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
49,426,450,713,916,340,000,000,000,000,000,000,000
11
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
static int v4l_prepare_buf(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct v4l2_buffer *b = arg; int ret = check_fmt(file, b->type); return ret ? ret : ops->vidioc_prepare_buf(file, fh, b); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
93,593,508,668,867,900,000,000,000,000,000,000,000
8
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
struct r_bin_pe_addr_t *PE_(check_msvcseh) (struct PE_(r_bin_pe_obj_t) *bin) { struct r_bin_pe_addr_t* entry; ut8 b[512]; int n = 0; if (!bin || !bin->b) { return 0LL; } entry = PE_(r_bin_pe_get_entrypoint) (bin); ZERO_FILL (b); if (r_buf_read_at (bin->b, entry->paddr, b, sizeof (b)) < 0) { bprintf ("Warnin...
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
248,087,356,255,253,900,000,000,000,000,000,000,000
133
Fix crash in pe
virDomainRedirFilterUSBDevDefParseXML(xmlNodePtr node) { virDomainRedirFilterUSBDevDefPtr def; g_autofree char *class = NULL; g_autofree char *vendor = NULL; g_autofree char *product = NULL; g_autofree char *version = NULL; g_autofree char *allow = NULL; if (VIR_ALLOC(def) < 0) retu...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
150,213,432,377,492,750,000,000,000,000,000,000,000
80
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...
flatpak_dir_get_locale_languages (FlatpakDir *self) { char **langs = NULL; /* Fetch the list of languages specified by xa.languages - if this key is empty, * this would mean that all languages are accepted. You can read the man for the * flatpak-config section for more info. */ langs = flatpak_dir_get_c...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
68,964,308,401,369,480,000,000,000,000,000,000,000
14
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
dissect_kafka_list_partition_reassignments_response_replica(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { proto_tree_add_item(tree, hf_kafka_replica, tvb, offset, 4, ENC_BIG_ENDIAN); offset...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
254,716,386,983,928,130,000,000,000,000,000,000,000
8
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static int str_is_ascii(const char *str) { int i; for (i = 0; str[i] != '\0'; i++) if (str[i] & 0x80) return 0; return 1; }
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
91,629,386,375,617,250,000,000,000,000,000,000,000
9
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
static struct cgroup_meta_data *lxc_cgroup_load_meta2(const char **subsystem_whitelist) { bool all_kernel_subsystems = true; bool all_named_subsystems = false; struct cgroup_meta_data *meta_data = NULL; char **kernel_subsystems = NULL; int saved_errno = 0; /* if the subsystem whitelist is not specified, include ...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
336,128,081,677,644,570,000,000,000,000,000,000,000
55
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
bool need_refix() const { return flags & VCOL_SESSION_FUNC; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
130,509,812,714,722,820,000,000,000,000,000,000,000
4
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...