func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void test_bug12337762() { int rc,i=0; MYSQL_RES *result; MYSQL_FIELD *field; unsigned int tab_charsetnr[3]= {0}; DBUG_ENTER("test_bug12337762"); myheader("test_bug12337762"); /* Creating table with specific charset. */ rc= mysql_query(mysql, "drop table if exists charset_tab"); rc= mysq...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
336,115,324,734,593,850,000,000,000,000,000,000,000
71
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...
add_to_include_set(struct bitmap *base, struct commit *commit) { khiter_t hash_pos; uint32_t bitmap_pos = find_object_pos(commit->object.oid.hash); if (bitmap_get(base, bitmap_pos)) return 0; hash_pos = kh_get_sha1(writer.bitmaps, commit->object.oid.hash); if (hash_pos < kh_end(writer.bitmaps)) { struct bitm...
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
299,969,786,782,496,800,000,000,000,000,000,000,000
18
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 ...
void CLASS parse_makernote(int base, int uptag) { unsigned offset = 0, entries, tag, type, len, save, c; unsigned ver97 = 0, serial = 0, i, wbi = 0, wb[4] = {0, 0, 0, 0}; uchar buf97[324], ci, cj, ck; short morder, sorder = order; char buf[10]; unsigned SamsungKey[11]; uchar NikonKey; #ifdef LIBRAW_LIBRA...
1
[ "CWE-787" ]
LibRaw
fbf60377c006eaea8d3eca3f5e4c654909dcdfd2
95,405,058,195,596,630,000,000,000,000,000,000,000
1,548
possible buffer overrun in Fuji makernotes parser
DSA_PrivateKey::DSA_PrivateKey(const AlgorithmIdentifier& alg_id, const secure_vector<uint8_t>& key_bits) : DL_Scheme_PrivateKey(alg_id, key_bits, DL_Group::ANSI_X9_57) { m_y = m_group.power_g_p(m_x); }
0
[ "CWE-200" ]
botan
48fc8df51d99f9d8ba251219367b3d629cc848e3
84,809,281,758,245,960,000,000,000,000,000,000,000
6
Address DSA/ECDSA side channel
WandExport double DrawGetStrokeWidth(const DrawingWand *wand) { assert(wand != (const DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); return(CurrentContext->stroke_width); }
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
35,293,529,384,868,960,000,000,000,000,000,000,000
8
https://github.com/ImageMagick/ImageMagick/issues/716
static void register_stuff(AvahiServer *s) { assert(s); server_set_state(s, AVAHI_SERVER_REGISTERING); s->n_host_rr_pending ++; /** Make sure that the state isn't changed tp AVAHI_SERVER_RUNNING too early */ register_hinfo(s); register_browse_domain(s); avahi_interface_monitor_update_rrs(s->mo...
0
[ "CWE-346" ]
avahi
e111def44a7df4624a4aa3f85fe98054bffb6b4f
287,719,149,953,555,200,000,000,000,000,000,000,000
16
Drop legacy unicast queries from address not on local link When handling legacy unicast queries, ensure that the source IP is inside a subnet on the local link, otherwise drop the packet. Fixes #145 Fixes #203 CVE-2017-6519 CVE-2018-100084
inline uint32_t Unref() { if (_refcount == 0) { return 0; } return --_refcount; }
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
291,750,375,978,039,880,000,000,000,000,000,000,000
6
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
Status ConvertNodeDefsToGraph(const GraphConstructorOptions& opts, gtl::ArraySlice<NodeDef> nodes, Graph* g) { ShapeRefiner refiner(TF_GRAPH_DEF_VERSION, g->op_registry()); // TODO(irving): Copy will go away once NodeInfo exists std::vector<const NodeDef*> node_defs; node_defs.rese...
0
[ "CWE-125", "CWE-369", "CWE-908" ]
tensorflow
0cc38aaa4064fd9e79101994ce9872c6d91f816b
172,454,641,249,108,630,000,000,000,000,000,000,000
14
Prevent unitialized memory access in `GraphConstructor::MakeEdge` The `MakeEdge` implementation assumes that there exists an output at `output_index` of `src` node and an input at `input_index` of `dst` node. However, if this is not the case this results in accessing data out of bounds. Because we are accessing an arr...
static int svm_interrupt_allowed(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb *vmcb = svm->vmcb; int ret; if (!gif_set(svm) || (vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK)) return 0; ret = !!(vmcb->save.rflags & X86_EFLAGS_IF); if (is_nested(svm)) return ret && !...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
238,100,652,964,098,100,000,000,000,000,000,000,000
17
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
inline void AveragePool(const PoolParams& params, const RuntimeShape& input_shape, const float* input_data, const RuntimeShape& output_shape, float* output_data) { ruy::profiler::ScopeLabel label("AveragePool"); TFLITE_DCHECK_EQ(input_shape.Dim...
1
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
325,526,093,205,511,140,000,000,000,000,000,000,000
61
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
void handleInvalidSpawnResponseType(const string &line, NegotiationDetails &details) { throwAppSpawnException("An error occurred while starting " "the web application. It sent an unknown response type \"" + cEscapeString(line) + "\".", SpawnException::APP_STARTUP_PROTOCOL_ERROR, details); }
0
[]
passenger
8c6693e0818772c345c979840d28312c2edd4ba4
182,175,903,514,643,070,000,000,000,000,000,000,000
7
Security check socket filenames reported by spawned application processes.
unsigned fuse_file_poll(struct file *file, poll_table *wait) { struct fuse_file *ff = file->private_data; struct fuse_conn *fc = ff->fc; struct fuse_poll_in inarg = { .fh = ff->fh, .kh = ff->kh }; struct fuse_poll_out outarg; FUSE_ARGS(args); int err; if (fc->no_poll) return DEFAULT_POLLMASK; poll_wait(file...
0
[ "CWE-399", "CWE-835" ]
linux
3ca8138f014a913f98e6ef40e939868e1e9ea876
259,853,358,959,467,370,000,000,000,000,000,000,000
42
fuse: break infinite loop in fuse_fill_write_pages() I got a report about unkillable task eating CPU. Further investigation shows, that the problem is in the fuse_fill_write_pages() function. If iov's first segment has zero length, we get an infinite loop, because we never reach iov_iter_advance() call. Fix this by c...
static void __user *get_addr_ref_64(struct insn *insn, struct pt_regs *regs) { return (void __user *)-1L; }
0
[ "CWE-416", "CWE-362" ]
linux
de9f869616dd95e95c00bdd6b0fcd3421e8a4323
273,036,129,213,631,760,000,000,000,000,000,000,000
4
x86/insn-eval: Fix use-after-free access to LDT entry get_desc() computes a pointer into the LDT while holding a lock that protects the LDT from being freed, but then drops the lock and returns the (now potentially dangling) pointer to its caller. Fix it by giving the caller a copy of the LDT entry instead. Fixes: 6...
static int hns_roce_set_mac(struct hns_roce_dev *hr_dev, u8 port, u8 *addr) { u8 phy_port; u32 i = 0; if (!memcmp(hr_dev->dev_addr[port], addr, MAC_ADDR_OCTET_NUM)) return 0; for (i = 0; i < MAC_ADDR_OCTET_NUM; i++) hr_dev->dev_addr[port][i] = addr[i]; phy_port = hr_dev->iboe.phy_port[port]; return hr_dev-...
0
[ "CWE-665" ]
kernel
72be029e947510dd6cbbbaf51879622af26e4200
98,057,797,779,978,440,000,000,000,000,000,000,000
14
RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427 FATE#326416). suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a
int nfs_atomic_open(struct inode *dir, struct dentry *dentry, struct file *file, unsigned open_flags, umode_t mode) { DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq); struct nfs_open_context *ctx; struct dentry *res; struct iattr attr = { .ia_valid = ATTR_OPEN }; struct inode *inode; unsigned int lookup_flags = 0...
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
242,922,560,145,518,200,000,000,000,000,000,000,000
140
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
do_wait_for_common(struct completion *x, long timeout, int state) { if (!x->done) { DECLARE_WAITQUEUE(wait, current); wait.flags |= WQ_FLAG_EXCLUSIVE; __add_wait_queue_tail(&x->wait, &wait); do { if ((state == TASK_INTERRUPTIBLE && signal_pending(current)) || (state == TASK_KILLABLE && ...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
274,697,841,924,585,050,000,000,000,000,000,000,000
29
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 ...
spell_load_cb(char_u *fname, void *cookie) { spelload_T *slp = (spelload_T *)cookie; slang_T *slang; slang = spell_load_file(fname, slp->sl_lang, NULL, FALSE); if (slang != NULL) { // When a previously loaded file has NOBREAK also use it for the // ".add" files. if (slp->sl_nobreak && slang->sl_...
0
[ "CWE-416" ]
vim
2813f38e021c6e6581c0c88fcf107e41788bc835
309,134,877,870,114,600,000,000,000,000,000,000,000
18
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.
bool remoteDecodeComplete() const { return stream_info_.downstreamTiming() && stream_info_.downstreamTiming()->lastDownstreamRxByteReceived().has_value(); }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
61,594,886,654,638,790,000,000,000,000,000,000,000
4
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int multipath_status(struct dm_target *ti, status_type_t type, char *result, unsigned int maxlen) { int sz = 0; unsigned long flags; struct multipath *m = (struct multipath *) ti->private; struct priority_group *pg; struct pgpath *p; unsigned pg_num; char state; spin_lock_irqsave(&m->lock, flags)...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
13,161,415,457,445,187,000,000,000,000,000,000,000
107
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
Word wasi_unstable_fd_writeHandler(void* raw_context, Word fd, Word iovs, Word iovs_len, Word nwritten_ptr) { auto context = WASM_CONTEXT(raw_context); Word nwritten(0); auto result = writevImpl(raw_context, fd, iovs, iovs_len, &nwritten); if (result.u64_ != 0) { // __WASI_ES...
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
131,428,986,782,311,910,000,000,000,000,000,000,000
14
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
static bool ip4_frag_match(struct inet_frag_queue *q, void *a) { struct ipq *qp; struct ip4_create_arg *arg = a; qp = container_of(q, struct ipq, q); return qp->id == arg->iph->id && qp->saddr == arg->iph->saddr && qp->daddr == arg->iph->daddr && qp->protocol == arg->iph->protocol && qp->user == arg->user;...
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
244,704,418,841,748,030,000,000,000,000,000,000,000
12
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
static void pthreads_thread_id(CRYPTO_THREADID *tid) { CRYPTO_THREADID_set_numeric(tid, (unsigned long)pthread_self()); }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
185,672,992,520,897,800,000,000,000,000,000,000,000
4
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static void inject_emulated_exception(struct kvm_vcpu *vcpu) { struct x86_emulate_ctxt *ctxt = &vcpu->arch.emulate_ctxt; if (ctxt->exception.vector == PF_VECTOR) kvm_propagate_fault(vcpu, &ctxt->exception); else if (ctxt->exception.error_code_valid) kvm_queue_exception_e(vcpu, ctxt->exception.vector, c...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
199,515,248,110,079,860,000,000,000,000,000,000,000
11
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
pdf_filter_gs_UseBlackPtComp(fz_context *ctx, pdf_processor *proc, pdf_obj *name) { pdf_filter_processor *p = (pdf_filter_processor*)proc; filter_flush(ctx, p, 0); if (p->chain->op_gs_UseBlackPtComp) p->chain->op_gs_UseBlackPtComp(ctx, p->chain, name); }
0
[ "CWE-125" ]
mupdf
97096297d409ec6f206298444ba00719607e8ba8
63,036,079,307,752,290,000,000,000,000,000,000,000
7
Bug 701292: Fix test for missing/empty string.
static void test_bug54041_impl() { int rc; MYSQL_STMT *stmt; MYSQL_BIND bind; DBUG_ENTER("test_bug54041"); myheader("test_bug54041"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE t1 (a INT)"); myquery(rc); stmt= mysql_simple_prepare(mysql, ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
80,493,282,506,727,730,000,000,000,000,000,000,000
51
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...
bool Item_sum_bit::add_as_window(ulonglong value) { DBUG_ASSERT(as_window_function); for (int i= 0; i < NUM_BIT_COUNTERS; i++) { bit_counters[i]+= (value & (1ULL << i)) ? 1 : 0; } // Prevent overflow; num_values_added = MY_MAX(num_values_added, num_values_added + 1); set_bits_from_counters(); return...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
78,285,738,019,338,460,000,000,000,000,000,000,000
12
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...
static inline struct cfs_rq *group_cfs_rq(struct sched_entity *grp) { return NULL; }
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
59,381,100,822,851,090,000,000,000,000,000,000,000
4
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
status_begin(stream * s, pcl_state_t * pcs) { byte *buffer = pcs->status.buffer; if (pcs->status.read_pos > 0) { memmove(buffer, buffer + pcs->status.read_pos, pcs->status.write_pos - pcs->status.read_pos); pcs->status.write_pos -= pcs->status.read_pos; pcs->status.read_...
0
[ "CWE-787" ]
ghostpdl
e1134d375e2ca176068e19a2aa9b040baffe1c22
114,900,279,199,117,600,000,000,000,000,000,000,000
23
Bug 705156(1): Avoid double free of PCL error buffer
void defer_recovery(float defer_for) { defer_recovery_until = ceph_clock_now(); defer_recovery_until += defer_for; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
267,223,499,858,982,030,000,000,000,000,000,000,000
4
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
class HuffmanStatistics *Scan::DCHuffmanStatisticsOf(UBYTE idx) const { class HuffmanTemplate *t; ScanType sc = m_pFrame->ScanTypeOf(); assert(idx < 4); t = m_pHuffman->DCTemplateOf(m_ucDCTable[idx],sc,m_pFrame->PrecisionOf(), m_pFrame->HiddenPrecisionOf(),m_ucScanIndex); if...
0
[ "CWE-476" ]
libjpeg
ea6315164b1649ff932a396b7600eac4bffcfaba
199,192,464,931,643,070,000,000,000,000,000,000,000
14
Added a check whether all components in a scan are actually present.
static inline int cmp_type_and_name(const struct ATTRIB *a1, const struct ATTRIB *a2) { return a1->type != a2->type || a1->name_len != a2->name_len || (a1->name_len && memcmp(attr_name(a1), attr_name(a2), a1->name_len * sizeof(short))); }
0
[ "CWE-416" ]
linux
f26967b9f7a830e228bb13fb41bd516ddd9d789d
292,539,975,344,773,330,000,000,000,000,000,000,000
7
fs/ntfs3: Fix invalid free in log_replay log_read_rst() returns ENOMEM error when there is not enough memory. In this case, if info is returned without initialization, it attempts to kfree the uninitialized info->r_page pointer. This patch moves the memset initialization code to before log_read_rst() is called. Repor...
void get_node_info(struct f2fs_sb_info *sbi, nid_t nid, struct node_info *ni) { struct f2fs_nm_info *nm_i = NM_I(sbi); struct curseg_info *curseg = CURSEG_I(sbi, CURSEG_HOT_DATA); struct f2fs_journal *journal = curseg->journal; nid_t start_nid = START_NID(nid); struct f2fs_nat_block *nat_blk; struct page *page = ...
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
29,540,755,634,296,312,000,000,000,000,000,000,000
51
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
TfLiteStatus NonMaxSuppressionMultiClassRegularHelper(TfLiteContext* context, TfLiteNode* node, OpData* op_data, const float* scores) { const TfLiteTensor* ...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
22,235,811,954,621,150,000,000,000,000,000,000,000
131
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static void enqueue_timer(struct timer_base *base, struct timer_list *timer, unsigned int idx) { hlist_add_head(&timer->entry, base->vectors + idx); __set_bit(idx, base->pending_map); timer_set_idx(timer, idx); trace_timer_start(timer, timer->expires, timer->flags); }
0
[ "CWE-200", "CWE-330" ]
linux
f227e3ec3b5cad859ad15666874405e8c1bbc1d4
259,665,884,664,898,820,000,000,000,000,000,000,000
9
random32: update the net random state on interrupt and activity This modifies the first 32 bits out of the 128 bits of a random CPU's net_rand_state on interrupt or CPU activity to complicate remote observations that could lead to guessing the network RNG's internal state. Note that depending on some network devices'...
static void complete_nread_binary(conn *c) { assert(c != NULL); assert(c->cmd >= 0); switch(c->substate) { case bin_reading_set_header: if (c->cmd == PROTOCOL_BINARY_CMD_APPEND || c->cmd == PROTOCOL_BINARY_CMD_PREPEND) { process_bin_append_prepend(c); } else ...
0
[ "CWE-20" ]
memcached
d9cd01ede97f4145af9781d448c62a3318952719
46,615,681,758,519,590,000,000,000,000,000,000,000
42
Use strncmp when checking for large ascii multigets.
get_name_end_code_point(OnigCodePoint start) { switch (start) { case '<': return (OnigCodePoint )'>'; break; case '\'': return (OnigCodePoint )'\''; break; case '(': return (OnigCodePoint )')'; break; case '{': return (OnigCodePoint )'}'; break; default: break; } return (OnigCodePoint )0; }
0
[ "CWE-476" ]
Onigmo
00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9
286,025,768,661,520,740,000,000,000,000,000,000,000
13
Fix SEGV in onig_error_code_to_str() (Fix #132) When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME, onig_error_code_to_str() crashes. onig_scan_env_set_error_string() should have been used when returning ONIGERR_INVALID_GROUP_NAME.
void MainWindow::on_actionTutorials_triggered() { QDesktopServices::openUrl(QUrl("https://www.shotcut.org/tutorials/")); }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
276,311,226,005,064,000,000,000,000,000,000,000,000
4
fix upgrade check is not using TLS correctly
static JSON_INLINE int bucket_is_empty(hashtable_t *hashtable, bucket_t *bucket) { return bucket->first == &hashtable->list && bucket->first == bucket->last; }
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
155,668,151,341,536,310,000,000,000,000,000,000,000
4
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
extern "C" void *SUB_REALLOC(void *ptr, size_t size) { void *new_ptr = NULL; #ifdef MBED_MEM_TRACING_ENABLED mbed_mem_trace_lock(); #endif #ifdef MBED_HEAP_STATS_ENABLED // Note - no lock needed since malloc and free are thread safe // Get old size uint32_t old_size = 0; if (ptr != NULL) { ...
0
[ "CWE-190" ]
mbed-os
151ebfcfc9f2383ee11ce3c771c3bf92900d6b43
278,997,080,826,780,700,000,000,000,000,000,000,000
37
Add integer overflow check to the malloc wrappers Add a check that the combined size of the buffer to allocate and alloc_info_t does not exceed the maximum integer value representable by size_t.
void *js_touserdata(js_State *J, int idx, const char *tag) { js_Value *v = stackidx(J, idx); if (v->type == JS_TOBJECT && v->u.object->type == JS_CUSERDATA) if (!strcmp(tag, v->u.object->u.user.tag)) return v->u.object->u.user.data; js_typeerror(J, "not a %s", tag); }
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
255,027,788,095,449,420,000,000,000,000,000,000,000
8
Fix 697401: Error when dropping extra arguments to lightweight functions.
CreateFileListInfo(FileListInfoPtr pFileListInfo, char* path, int flag) { DIR* pDir = NULL; struct dirent* pDirent = NULL; if(path == NULL) { return FAILURE; } if(strlen(path) == 0) { /* In this case we will send the list of entries in ftp root*/ sprintf(path, "%s%s", GetFtpRoot(), "/"); } if((pDir = op...
0
[ "CWE-416" ]
libvncserver
73cb96fec028a576a5a24417b57723b55854ad7b
80,603,598,581,700,460,000,000,000,000,000,000,000
68
tightvnc-filetransfer: wait for download thread end in CloseUndoneFileDownload() ...and use it when deregistering the file transfer extension. Closes #242
static int ext4_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) { struct inode *inode = mapping->host; int ret, needed_blocks = ext4_writepage_trans_blocks(inode); handle_t *handle; int retries = 0; struct page *pag...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
164,725,113,270,173,010,000,000,000,000,000,000,000
61
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
chkExternalURIBuffer(Buffer *buf) { int i; struct table2 *ump; for (i = 0; (ump = urimethods[i]) != NULL; i++) { for (; ump->item1 != NULL; ump++) { reAnchor(buf, Sprintf("%s:%s", ump->item1, URI_PATTERN)->ptr); } } for (ump = default_urimethods; ump->item1 != NULL; ump++) { reAnchor(buf, S...
0
[ "CWE-119" ]
w3m
ba9d78faeba9024c3e8840579c3b0e959ae2cb0f
48,845,879,331,211,650,000,000,000,000,000,000,000
14
Prevent global-buffer-overflow in parseURL() Bug-Debian: https://github.com/tats/w3m/issues/41
static int tracing_open(struct inode *inode, struct file *file) { struct trace_array *tr = inode->i_private; struct trace_iterator *iter; int ret = 0; if (trace_array_get(tr) < 0) return -ENODEV; /* If this file was open for write, then erase contents */ if ((file->f_mode & FMODE_WRITE) && (file->f_flags & O_...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
65,792,993,757,146,400,000,000,000,000,000,000,000
38
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
struct net_bridge_mdb_entry *br_mdb_get(struct net_bridge *br, struct sk_buff *skb) { struct net_bridge_mdb_htable *mdb = rcu_dereference(br->mdb); struct br_ip ip; if (br->multicast_disabled) return NULL; if (BR_INPUT_SKB_CB(skb)->igmp) return NULL; ip.proto = skb->protocol; switch (skb->protocol) {...
0
[ "CWE-399" ]
linux
6b0d6a9b4296fa16a28d10d416db7a770fc03287
153,770,663,402,869,860,000,000,000,000,000,000,000
29
bridge: Fix mglist corruption that leads to memory corruption The list mp->mglist is used to indicate whether a multicast group is active on the bridge interface itself as opposed to one of the constituent interfaces in the bridge. Unfortunately the operation that adds the mp->mglist node to the list neglected to che...
PJ_DEF(pj_status_t) pjsip_tpmgr_register_tpfactory( pjsip_tpmgr *mgr, pjsip_tpfactory *tpf) { pjsip_tpfactory *p; pj_status_t status; pj_lock_acquire(mgr->lock); /* Check that no same factory has been registered. */ status = PJ_SUCCESS; for (p=mgr->factory_list.next; p!=&mgr->factory...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
137,676,480,279,251,880,000,000,000,000,000,000,000
28
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 int hci_uart_set_proto(struct hci_uart *hu, int id) { const struct hci_uart_proto *p; int err; p = hci_uart_get_proto(id); if (!p) return -EPROTONOSUPPORT; hu->proto = p; set_bit(HCI_UART_PROTO_READY, &hu->flags); err = hci_uart_register_dev(hu); if (err) { clear_bit(HCI_UART_PROTO_READY, &hu->fla...
1
[ "CWE-416" ]
linux
56897b217a1d0a91c9920cb418d6b3fe922f590a
324,377,223,174,079,700,000,000,000,000,000,000,000
20
Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto() task A: task B: hci_uart_set_proto flush_to_ldisc - p->open(hu) -> h5_open //alloc h5 - receive_buf - set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf - hci_uar...
explicit BoostedTreesQuantileStreamResourceGetBucketBoundariesOp( OpKernelConstruction* const context) : OpKernel(context) { OP_REQUIRES_OK(context, context->GetAttr(kNumFeaturesName, &num_features_)); }
0
[ "CWE-703", "CWE-681" ]
tensorflow
8a84f7a2b5a2b27ecf88d25bad9ac777cd2f7992
220,572,269,980,903,620,000,000,000,000,000,000,000
5
Ensure num_streams >= 0 in tf.raw_ops.BoostedTreesCreateQuantileStreamResource PiperOrigin-RevId: 387452765 Change-Id: I9990c760e177fabca6a3b9b4612ceeaeeba51495
compileRule(FileInfo *nested, CharacterClass **characterClasses, TranslationTableCharacterAttributes *characterClassAttribute, short opcodeLengths[], TranslationTableOffset *newRuleOffset, TranslationTableRule **newRule, RuleName **ruleNames, TranslationTableHeader **table) { int lastToken = 0; int ok = 1; C...
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
3,496,946,251,092,518,000,000,000,000,000,000,000
1,052
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
static void cgroup_seqfile_stop(struct seq_file *seq, void *v) { if (seq_cft(seq)->seq_stop) seq_cft(seq)->seq_stop(seq, v); }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
328,330,878,288,272,800,000,000,000,000,000,000,000
5
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
__releases(aarp_lock) { read_unlock_bh(&aarp_lock); }
0
[ "CWE-476" ]
linux
9804501fa1228048857910a6bf23e085aade37cc
278,148,882,309,209,680,000,000,000,000,000,000,000
4
appletalk: Fix potential NULL pointer dereference in unregister_snap_client register_snap_client may return NULL, all the callers check it, but only print a warning. This will result in NULL pointer dereference in unregister_snap_client and other places. It has always been used like this since v2.6 Reported-by: Dan ...
void Vers_history_point::print(String *str, enum_query_type query_type, const char *prefix, size_t plen) const { const static LEX_CSTRING unit_type[]= { { STRING_WITH_LEN("") }, { STRING_WITH_LEN("TIMESTAMP ") }, { STRING_WITH_LEN("TRANSACTION ") } }; str->append(prefi...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
310,262,714,556,048,200,000,000,000,000,000,000,000
13
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static void ImportBlueQuantum(const Image *image,QuantumInfo *quantum_info, const MagickSizeType number_pixels,const unsigned char *magick_restrict p, Quantum *magick_restrict q,ExceptionInfo *exception) { QuantumAny range; register ssize_t x; unsigned int pixel; assert(image != (Image *) NUL...
0
[ "CWE-125" ]
ImageMagick
430403b0029b37decf216d57f810899cab2317dd
12,677,968,315,342,022,000,000,000,000,000,000,000
116
https://github.com/ImageMagick/ImageMagick/issues/126
static int install_permanent_handler(int num_cpus, uintptr_t smbase, size_t smsize, size_t save_state_size) { /* There are num_cpus concurrent stacks and num_cpus concurrent save * state areas. Lastly, set the stack size to 1KiB. */ struct smm_loader_params smm_params = { .per_cpu_stack_size = CONFIG_SMM_MOD...
1
[ "CWE-269" ]
coreboot
afb7a814783cda12f5b72167163b9109ee1d15a7
284,267,377,863,943,500,000,000,000,000,000,000,000
25
cpu/x86/smm: Introduce SMM module loader version 2 Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores). Current coreboot SMM is unable to handle more than ~32 CPU threads. This patch introduces a version 2 of the SMM module loader which addresses this problem. Having two versions of the SMM module lo...
static ssize_t cdc_ncm_show_tx_max(struct device *d, struct device_attribute *attr, char *buf) { struct usbnet *dev = netdev_priv(to_net_dev(d)); struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0]; return sprintf(buf, "%u\n", ctx->tx_max); }
0
[ "CWE-703" ]
linux
4d06dd537f95683aba3651098ae288b7cbff8274
35,132,872,408,860,014,000,000,000,000,000,000,000
7
cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind usbnet_link_change will call schedule_work and should be avoided if bind is failing. Otherwise we will end up with scheduled work referring to a netdev which has gone away. Instead of making the call conditional, we can just defer it to usbnet_probe, using the...
__releases(nfnl_queue_pernet(seq_file_net(s))->instances_lock) { spin_unlock(&nfnl_queue_pernet(seq_file_net(s))->instances_lock); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
199,501,001,105,914,900,000,000,000,000,000,000,000
4
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
static int sctp_cmd_process_sack(sctp_cmd_seq_t *cmds, struct sctp_association *asoc, struct sctp_chunk *chunk) { int err = 0; if (sctp_outq_sack(&asoc->outqueue, chunk)) { struct net *net = sock_net(asoc->base.sk); /* There are no more TSNs awaiting SACK. */ err = sctp_do_sm(net, SCTP_EVENT_T_OTHE...
0
[]
linux
196d67593439b03088913227093e374235596e33
43,269,639,023,376,365,000,000,000,000,000,000,000
18
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
GC_debug_malloc_atomic_ignore_off_page(size_t lb, GC_EXTRA_PARAMS) { void * result = GC_malloc_atomic_ignore_off_page(lb + DEBUG_BYTES); if (result == 0) { GC_err_printf("GC_debug_malloc_atomic_ignore_off_page(%lu)" " returning NULL (%s:%d)\n", (unsigned long)lb, s, i); ...
1
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
153,281,133,996,333,800,000,000,000,000,000,000,000
15
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
GC_API int GC_CALL GC_get_stack_base(struct GC_stack_base *b) { IF_CANCEL(int cancel_state;) DCL_LOCK_STATE; LOCK(); DISABLE_CANCEL(cancel_state); /* May be unnecessary? */ # ifdef STACK_GROWS_DOWN b -> mem_base = GC_find_limit(GC_approx_sp(), TRUE); # ifdef IA64 ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
104,522,162,346,010,820,000,000,000,000,000,000,000
19
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample, int width, int height) { guchar *buf; int channels; int rowstride; gsize bytes; g_return_val_if_fail (colorspace == GDK_COLO...
1
[]
gdk-pixbuf
deb78d971c4bcb9e3ccbb71e7925bc6baa707188
117,464,290,274,774,670,000,000,000,000,000,000,000
36
Use g_try_malloc_n where it makes sense This lets us avoid some manual overflow checks.
initoptions_finish() { #ifndef MAC char *opts = getenv("NETHACKOPTIONS"); if (!opts) opts = getenv("HACKOPTIONS"); if (opts) { if (*opts == '/' || *opts == '\\' || *opts == '@') { if (*opts == '@') opts++; /* @filename */ /* looks like a filename */ if (strlen(opts) < BUFSZ/2) read_config_file(opts...
0
[ "CWE-269" ]
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
262,457,328,978,488,800,000,000,000,000,000,000,000
31
escapes() revamp Partial rewrite of escapes(), mostly changing its if-then-else logic so that end-of-string can be checked once instead for each case. The previous version had a bug if the input string ended with backslash and one decimal digit (due to being lumped together with the handling for trailing \X or \O...
REF_EnableLocal(int stratum, double distance, int orphan) { enable_local_stratum = 1; local_stratum = CLAMP(1, stratum, NTP_MAX_STRATUM - 1); local_distance = distance; local_orphan = !!orphan; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
147,671,445,555,935,060,000,000,000,000,000,000,000
7
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
TEST(ModMatchExpression, ZeroDivisor) { ModMatchExpression mod; ASSERT(!mod.init("", 0, 1).isOK()); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
87,009,424,391,699,790,000,000,000,000,000,000,000
4
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
ring_buffer_commit_overrun_cpu(struct ring_buffer *buffer, int cpu) { struct ring_buffer_per_cpu *cpu_buffer; unsigned long ret; if (!cpumask_test_cpu(cpu, buffer->cpumask)) return 0; cpu_buffer = buffer->buffers[cpu]; ret = local_read(&cpu_buffer->commit_overrun); return ret; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
255,874,449,885,104,080,000,000,000,000,000,000,000
13
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
lyd_parse_path(struct ly_ctx *ctx, const char *path, LYD_FORMAT format, int options, ...) { int fd; struct lyd_node *ret; va_list ap; if (!ctx || !path) { LOGARG; return NULL; } fd = open(path, O_RDONLY); if (fd == -1) { LOGERR(ctx, LY_ESYS, "Failed to open data fil...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
238,866,282,652,849,450,000,000,000,000,000,000,000
25
schema tree BUGFIX do not check features while still resolving schema Fixes #723
STACK_OF(SSL_CIPHER) *ssl_bytes_to_cipher_list(SSL *s,unsigned char *p,int num, STACK_OF(SSL_CIPHER) **skp) { const SSL_CIPHER *c; STACK_OF(SSL_CIPHER) *sk; int i,n; if (s->s3) s->s3->send_connection_binding = 0; n=ssl_put_cipher_by_char(s,NULL,NULL); if ((num%n) != 0) { SSLerr(SSL_F_SSL_BYTES...
1
[ "CWE-310" ]
openssl
6bfe55380abbf7528e04e59f18921bd6c896af1c
150,845,871,496,867,880,000,000,000,000,000,000,000
65
Support TLS_FALLBACK_SCSV. Reviewed-by: Rich Salz <rsalz@openssl.org>
_copyAIndices(const A_Indices *from) { A_Indices *newnode = makeNode(A_Indices); COPY_NODE_FIELD(lidx); COPY_NODE_FIELD(uidx); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
308,008,505,307,655,860,000,000,000,000,000,000,000
9
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...
void tipc_sk_rcv(struct net *net, struct sk_buff_head *inputq) { struct sk_buff_head xmitq; u32 dnode, dport = 0; int err; struct tipc_sock *tsk; struct sock *sk; struct sk_buff *skb; __skb_queue_head_init(&xmitq); while (skb_queue_len(inputq)) { dport = tipc_skb_peek_port(inputq, dport); tsk = tipc_sk_loo...
0
[ "CWE-200", "CWE-909" ]
linux
d6d86830705f173fca6087a3e67ceaf68db80523
4,459,939,942,210,170,300,000,000,000,000,000,000
45
net ticp:fix a kernel-infoleak in __tipc_sendmsg() struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently copying it to user space,causing kernel-infoleak. BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in instrument_c...
libxlDomainShutdownThread(void *opaque) { struct libxlShutdownThreadInfo *shutdown_info = opaque; virDomainObj *vm = shutdown_info->vm; libxl_event *ev = shutdown_info->event; libxlDriverPrivate *driver = shutdown_info->driver; virObjectEvent *dom_event = NULL; libxl_shutdown_reason xl_reason = ...
1
[ "CWE-667" ]
libvirt
a4e6fba069c0809b8b5dde5e9db62d2efd91b4a0
71,813,687,864,462,610,000,000,000,000,000,000,000
125
libxl: Rename libxlShutdownThreadInfo struct An upcoming change will use the struct in a thread created to process death events. Rename libxlShutdownThreadInfo to libxlEventHandlerThreadInfo to reflect the more generic usage. Signed-off-by: Jim Fehlig <jfehlig@suse.com> Reviewed-by: Daniel P. Berrangé <berrange@redha...
static uint16_t nvme_identify_ns_csi(NvmeCtrl *n, NvmeRequest *req, bool active) { NvmeNamespace *ns; NvmeIdentify *c = (NvmeIdentify *)&req->cmd; uint32_t nsid = le32_to_cpu(c->nsid); trace_pci_nvme_identify_ns_csi(nsid, c->csi); if (!nvme_nsid_valid(n, nsid) ...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
138,318,871,750,740,540,000,000,000,000,000,000,000
34
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ { zval *value; zend_bool close_fp = 1; struct _phar_t *p_obj = (struct _phar_t*) puser; uint32_t str_key_len, base_len = p_obj->l; phar_entry_data *data; php_stream *fp; size_t fname_len; size_t contents_len; char *fname, *error = NULL, *...
1
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
291,454,051,633,721,800,000,000,000,000,000,000,000
315
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
R_API char *r_egg_to_string(REgg *egg) { return r_buf_to_string (egg->buf); }
0
[ "CWE-125" ]
radare2
e710401ebb4a892a87b0c709d709af8b5dcbbb01
294,011,400,619,038,830,000,000,000,000,000,000,000
3
patch #14211 heap buffer overflow in large ragg2 inputs. this should be refactored to use an RBuffer to enable dynamic resizing, but for now just patching it to bail out if we are about to overwrite the allocated statically sized buffer
PHP_METHOD(Phar, copy) { char *oldfile, *newfile, *error; const char *pcr_error; int oldfile_len, newfile_len; phar_entry_info *oldentry, newentry = {0}, *temp; PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &oldfile, &oldfile_len, &newfile, &newfile_len) == FAILURE) { retur...
0
[ "CWE-416" ]
php-src
b2cf3f064b8f5efef89bb084521b61318c71781b
201,455,425,313,882,500,000,000,000,000,000,000,000
102
Fixed bug #68901 (use after free)
PHP_METHOD(Phar, isValidPharFilename) { char *fname; const char *ext_str; int fname_len, ext_len, is_executable; zend_bool executable = 1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|b", &fname, &fname_len, &executable) == FAILURE) { return; } is_executable = executable; RETVAL_BOOL(phar_detect_...
0
[ "CWE-416" ]
php-src
b2cf3f064b8f5efef89bb084521b61318c71781b
322,223,242,466,590,700,000,000,000,000,000,000,000
14
Fixed bug #68901 (use after free)
mp_sint32 LoaderXM::load(XMFileBase& f, XModule* module) { mp_ubyte insData[230]; mp_sint32 smpReloc[MP_MAXINSSAMPS]; mp_ubyte nbu[MP_MAXINSSAMPS]; mp_uint32 fileSize = 0; module->cleanUp(); // this will make code much easier to read TXMHeader* header = &module->header; TXMInstrument* instr = module->i...
0
[ "CWE-787" ]
MilkyTracker
3a5474f9102cbdc10fbd9e7b1b2c8d3f3f45d91b
117,553,339,823,195,960,000,000,000,000,000,000,000
790
Fix possible stack corruption with XM instrument headers claiming a size of less than 4 Closes #275
struct timerqueue_node *timerqueue_getnext(struct timerqueue_head *head) { return head->next; }
1
[ "CWE-665" ]
tip
511885d7061eda3eb1faf3f57dcc936ff75863f1
192,534,851,203,297,680,000,000,000,000,000,000,000
4
lib/timerqueue: Rely on rbtree semantics for next timer Simplify the timerqueue code by using cached rbtrees and rely on the tree leftmost node semantics to get the timer with earliest expiration time. This is a drop in conversion, and therefore semantics remain untouched. The runtime overhead of cached rbtrees is be...
static int expand_occurrences(icalcomponent *ical, icalcomponent_kind kind, struct calquery_filter *calfilter) { struct freebusy_array *freebusy = &calfilter->freebusy; icalcomponent *comp; icaltimezone *utc = icaltimezone_get_utc_timezone(); icaltime_span rangespan; unsigned firstr, lastr;...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
226,998,661,185,131,100,000,000,000,000,000,000,000
102
HTTP: don't overrun buffer when parsing strings with sscanf()
static void ip6gre_tunnel_uninit(struct net_device *dev) { struct ip6_tnl *t = netdev_priv(dev); struct ip6gre_net *ign = net_generic(t->net, ip6gre_net_id); ip6gre_tunnel_unlink(ign, t); dst_cache_reset(&t->dst_cache); dev_put(dev); }
0
[ "CWE-125" ]
net
7892032cfe67f4bde6fc2ee967e45a8fbaf33756
235,251,112,494,540,900,000,000,000,000,000,000,000
9
ip6_gre: fix ip6gre_err() invalid reads Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6 headers. Let's use a "struct ...
mm_answer_pam_init_ctx(int sock, Buffer *m) { debug3("%s", __func__); sshpam_ctxt = (sshpam_device.init_ctx)(authctxt); sshpam_authok = NULL; buffer_clear(m); if (sshpam_ctxt != NULL) { monitor_permit(mon_dispatch, MONITOR_REQ_PAM_FREE_CTX, 1); buffer_put_int(m, 1); } else { buffer_put_int(m, 0); } mm_req...
0
[ "CWE-20", "CWE-200" ]
openssh-portable
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
322,463,115,523,036,470,000,000,000,000,000,000,000
15
Don't resend username to PAM; it already has it. Pointed out by Moritz Jodeit; ok dtucker@
NTLMSSPOWFencrypt (uschar passwd[8], uschar * ntlmchalresp, uschar p24[24]) { uschar p21[21]; memset (p21, '\0', 21); memcpy (p21, passwd, 8); memset (p21 + 8, 0xbd, 8); E_P24 (p21, ntlmchalresp, p24); #ifdef DEBUG_PASSWORD DEBUG_X (100, ("NTLMSSPOWFencrypt: p21, c8, p24\n")); dump_data (100, CS p21, 21); dump_data ...
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
184,900,131,140,792,030,000,000,000,000,000,000,000
16
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
void MainWindow::onKeyerTriggered(QAction *action) { LOG_DEBUG() << action->data().toString(); MLT.videoWidget()->setProperty("keyer", action->data()); MLT.consumerChanged(); Settings.setPlayerKeyerMode(action->data().toInt()); }
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
219,391,733,322,680,720,000,000,000,000,000,000,000
7
fix upgrade check is not using TLS correctly
mobility_opt_print(netdissect_options *ndo, const u_char *bp, const unsigned len) { unsigned i, optlen; for (i = 0; i < len; i += optlen) { ND_TCHECK(bp[i]); if (bp[i] == IP6MOPT_PAD1) optlen = 1; else { if (i + 1 < len) { ND_TCHECK(bp[i + 1]); optlen = bp[i + 1] + 2; } e...
1
[ "CWE-20", "CWE-125" ]
tcpdump
7d3aba9f06899d0128ef46e8a2fa143c6fad8f62
317,153,277,885,002,570,000,000,000,000,000,000,000
79
CVE-2017-13024/IPv6 mobility: Add a bounds check before fetching data This fixes a buffer over-read discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s), modified so the capture file won't cause 'tcpdump: pcap_loop: truncated dump file'
void ok_inflater_reset(ok_inflater *inflater) { if (inflater) { inflater->input = NULL; inflater->input_end = NULL; inflater->input_buffer = 0; inflater->input_buffer_bits = 0; inflater->buffer_start_pos = 0; inflater->buffer_end_pos = 0; inflater->final_bloc...
0
[ "CWE-787" ]
ok-file-formats
e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e
210,196,484,176,639,200,000,000,000,000,000,000,000
14
ok_png: Disallow multiple IHDR chunks (#15)
int skip_comments(FILE * file) { int ch; int n = 0; while (EOF != (ch = get_char(file))) { /* ch is now the first character of a line. */ if (++n > MAX_GARBAGE) return FALSE; while (ch == ' ' || ch == '\t') { ch = get_char(file); if (++n > MAX_GARBAGE) return FALSE; } if (ch == EOF) br...
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
133,612,102,133,256,400,000,000,000,000,000,000,000
41
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
set_data_file_type(SORT_INFO *sort_info, MYISAM_SHARE *share) { if ((sort_info->new_data_file_type=share->data_file_type) == COMPRESSED_RECORD && sort_info->param->testflag & T_UNPACK) { MYISAM_SHARE tmp; if (share->options & HA_OPTION_PACK_RECORD) sort_info->new_data_file_type = DYNAMIC_RECORD...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
96,558,972,944,994,700,000,000,000,000,000,000,000
19
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
char *__get_modname_by_ord(r_bin_le_obj_t *bin, ut32 ordinal) { char *modname = NULL; ut64 off = (ut64)bin->header->impmod + bin->headerOff; while (ordinal > 0) { free (modname); modname = __read_nonnull_str_at (bin->buf, &off); ordinal--; } return modname; }
0
[ "CWE-252" ]
radare2
d7ea20fb2e1433ebece9f004d87ad8f2377af23d
303,513,359,113,478,250,000,000,000,000,000,000,000
10
Fix #18923 - Fix resource exhaustion bug in LE binary (#18926)
int inet_csk_listen_start(struct sock *sk, const int nr_table_entries) { struct inet_sock *inet = inet_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); int rc = reqsk_queue_alloc(&icsk->icsk_accept_queue, nr_table_entries); if (rc != 0) return rc; sk->sk_max_ack_backlog = 0; sk->sk_ack_backlog = 0; ...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
233,681,863,787,308,100,000,000,000,000,000,000,000
32
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
launch_router_descriptor_downloads(smartlist_t *downloadable, routerstatus_t *source, time_t now) { int should_delay = 0, n_downloadable; or_options_t *options = get_options(); n_downloadable = smartlist_len(downloadable); if (!directory_fetches_dir_info_early(options)) { ...
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
297,245,239,394,399,370,000,000,000,000,000,000,000
78
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
buflist_match( regmatch_T *rmp, buf_T *buf, int ignore_case) // when TRUE ignore case, when FALSE use 'fic' { char_u *match; // First try the short file name, then the long file name. match = fname_match(rmp, buf->b_sfname, ignore_case); if (match == NULL) match = fname_match(rmp, buf->b...
1
[ "CWE-476" ]
vim
a59f2dfd0cf9ee1a584d3de5b7c2d47648e79060
83,973,833,373,093,060,000,000,000,000,000,000,000
14
patch 8.2.4938: crash when matching buffer with invalid pattern Problem: Crash when matching buffer with invalid pattern. Solution: Check for NULL regprog.
koi8_mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED, const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower) { const UChar* p = *pp; *lower = ENC_KOI8_TO_LOWER_CASE(*p); (*pp)++; return 1; }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
156,707,039,514,201,550,000,000,000,000,000,000,000
9
onig-5.9.2
static int on_frame_recv_cb(nghttp2_session *ng2s, const nghttp2_frame *frame, void *userp) { h2_session *session = (h2_session *)userp; h2_stream *stream; apr_status_t rv = APR_SUCCESS; if (APLOGcdebug(session->c)) { char buffer[256];...
1
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
197,754,370,408,027,600,000,000,000,000,000,000,000
138
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
static inline struct blk_align_bitmap *get_bm(struct blk_mq_hw_ctx *hctx, struct blk_mq_ctx *ctx) { return &hctx->ctx_map.map[ctx->index_hw / hctx->ctx_map.bits_per_word]; }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
256,687,183,409,471,460,000,000,000,000,000,000,000
5
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
ZEND_VM_HELPER(zend_bw_and_helper, ANY, ANY, zval *op_1, zval *op_2) { USE_OPLINE SAVE_OPLINE(); if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) { op_1 = ZVAL_UNDEFINED_OP1(); } if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) { op_2 = ZVAL_UNDEFINED_OP2(); } bitwise_and_function(EX_VAR(opline->result.var)...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
217,608,036,569,211,030,000,000,000,000,000,000,000
20
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
int json_rpc_call_sockopt_cb(void __maybe_unused *userdata, curl_socket_t fd, curlsocktype __maybe_unused purpose) { return keep_sockalive(fd); }
0
[ "CWE-119", "CWE-787" ]
bfgminer
c80ad8548251eb0e15329fc240c89070640c9d79
119,091,474,391,380,210,000,000,000,000,000,000,000
5
Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
SES_Wait(struct sess *sp, const struct transport *xp) { struct pool *pp; struct waited *wp; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(xp, TRANSPORT_MAGIC); pp = sp->pool; CHECK_OBJ_NOTNULL(pp, POOL_MAGIC); assert(sp->fd > 0); /* * XXX: waiter_epoll prevents us from zeroing the struct because * X...
1
[ "CWE-617" ]
varnish-cache
2d8fc1a784a1e26d78c30174923a2b14ee2ebf62
30,431,409,820,464,630,000,000,000,000,000,000,000
35
Take sizeof pool_task into account when reserving WS in SES_Wait The assert on WS_ReserveSize() in ses_handle() can not trip because sizeof (struct pool_task) is less than sizeof (struct waited). But to safe guard against future problems if that were to change, this patch makes sure that the session workspace can hold...
static int match_tcon(struct cifs_tcon *tcon, const char *unc) { if (tcon->tidStatus == CifsExiting) return 0; if (strncmp(tcon->treeName, unc, MAX_TREE_SIZE)) return 0; return 1; }
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
69,505,187,101,330,480,000,000,000,000,000,000,000
8
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
static long do_rmdir(int dfd, const char __user *pathname) { int error = 0; struct filename *name; struct dentry *dentry; struct path path; struct qstr last; int type; unsigned int lookup_flags = 0; retry: name = filename_parentat(dfd, getname(pathname), lookup_flags, &path, &last, &type); if (IS_ERR(name)...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
317,087,463,864,121,170,000,000,000,000,000,000,000
58
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
extern int afm_parse_file(FILE *fp, FontInfo **fi, FLAGS flags) { int code = ok; /* return code from each of the parsing routines */ int error = ok; /* used as the return code from this function */ register char *keyword; /* used to store a token */ /* storage data for the...
0
[ "CWE-20" ]
evince
d4139205b010ed06310d14284e63114e88ec6de2
26,667,110,893,319,715,000,000,000,000,000,000,000
151
backends: Fix several security issues in the dvi-backend. See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643.
~GenericDecipher() { clear(); }
0
[ "CWE-78" ]
ssh2
f763271f41320e71d5cbee02ea5bc6a2ded3ca21
300,878,372,505,225,880,000,000,000,000,000,000,000
3
examples,lib,test: switch to code rewrite For more information see: https://github.com/mscdex/ssh2/issues/935
static int open_input_stream(HTTPContext *c, const char *info) { char buf[128]; char input_filename[1024]; AVFormatContext *s = NULL; int buf_size, i, ret; int64_t stream_pos; /* find file name */ if (c->stream->feed) { strcpy(input_filename, c->stream->feed->feed_filename); ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
29,851,974,505,965,910,000,000,000,000,000,000,000
84
ffserver: Check chunk size Fixes out of array access Fixes: poc_ffserver.py Found-by: Paul Cher <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>