func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static CURLcode identity_unencode_write(struct Curl_easy *data, struct contenc_writer *writer, const char *buf, size_t nbytes) { return Curl_unencode_write(data, writer->downstream, buf, nbytes); }
0
[]
curl
3a09fbb7f264c67c438d01a30669ce325aa508e2
93,586,476,062,506,030,000,000,000,000,000,000,000
6
content_encoding: return error on too many compression steps The max allowed steps is arbitrarily set to 5. Bug: https://curl.se/docs/CVE-2022-32206.html CVE-2022-32206 Reported-by: Harry Sintonen Closes #9049
static void brcmf_clear_assoc_ies(struct brcmf_cfg80211_info *cfg) { struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg); kfree(conn_info->req_ie); conn_info->req_ie = NULL; conn_info->req_ie_len = 0; kfree(conn_info->resp_ie); conn_info->resp_ie = NULL; conn_info->resp_ie_len = 0; }
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
229,827,093,813,029,800,000,000,000,000,000,000,000
11
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
lys_features_change(const struct lys_module *module, const char *name, int op, int skip_checks) { int all = 0; int i, j, k; int progress, faili = 0, failj = 0, failk = 0; uint8_t fsize; struct lys_feature *f; if (!module || !name || !strlen(name)) { LOGARG; return EXIT_FAILURE;...
0
[ "CWE-617" ]
libyang
5ce30801f9ccc372bbe9b7c98bb5324b15fb010a
217,606,895,887,508,830,000,000,000,000,000,000,000
99
schema tree BUGFIX freeing nodes with no module set Context must be passed explicitly for these cases. Fixes #1452
char *FLTGetMapserverExpression(FilterEncodingNode *psFilterNode, layerObj *lp) { char *pszExpression = NULL; const char *pszAttribute = NULL; char szTmp[256]; char **tokens = NULL; int nTokens = 0, i=0,bString=0; if (!psFilterNode) return NULL; if (psFilterNode->eType == FILTER_NODE_TYPE_COMPARISON...
0
[ "CWE-200", "CWE-119" ]
mapserver
e52a436c0e1c5e9f7ef13428dba83194a800f4df
6,299,162,864,357,195,000,000,000,000,000,000,000
76
security fix (patch by EvenR)
GC_API GC_ATTR_MALLOC void * GC_CALL GC_malloc(size_t lb) { return GC_malloc_kind(lb, NORMAL); }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
35,370,101,816,454,093,000,000,000,000,000,000,000
4
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...
gst_asf_demux_process_ext_content_desc (GstASFDemux * demux, guint8 * data, guint64 size) { /* Other known (and unused) 'text/unicode' metadata available : * * WM/Lyrics = * WM/MediaPrimaryClassID = {D1607DBC-E323-4BE2-86A1-48A42A28441E} * WMFSDKVersion = 9.00.00.2980 * WMFSDKNeeded = 0.0.0...
1
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
339,918,804,602,536,760,000,000,000,000,000,000,000
265
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
degas_type_find (GstTypeFind * tf, gpointer private) { /* No magic, but it should have a fixed size and a few invalid values */ /* http://www.fileformat.info/format/atari/spec/6ecf9f6eb5be494284a47feb8a214687/view.htm */ gint64 len; const guint8 *data; guint16 resolution; int n; len = gst_type_find_get_l...
0
[ "CWE-125" ]
gst-plugins-base
2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095
163,985,045,917,092,930,000,000,000,000,000,000,000
50
typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
static void set_lineinfo(VTermState *state, int row, int force, int dwl, int dhl) { VTermLineInfo info = state->lineinfo[row]; if(dwl == DWL_OFF) info.doublewidth = DWL_OFF; else if(dwl == DWL_ON) info.doublewidth = DWL_ON; // else -1 to ignore if(dhl == DHL_OFF) info.doubleheight = DHL_OFF; e...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
101,191,546,805,076,900,000,000,000,000,000,000,000
23
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static long kvm_vcpu_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm_vcpu *vcpu = filp->private_data; void __user *argp = (void __user *)arg; int r; struct kvm_fpu *fpu = NULL; struct kvm_sregs *kvm_sregs = NULL; if (vcpu->kvm->mm != current->mm) return -EIO; #if defined(CON...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
77,931,416,466,228,965,000,000,000,000,000,000,000
201
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
static inline void set_kthread_struct(void *kthread) { /* * We abuse ->set_child_tid to avoid the new member and because it * can't be wrongly copied by copy_process(). We also rely on fact * that the caller can't exec, so PF_KTHREAD can't be cleared. */ current->set_child_tid = (__force void __user *)kthread...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
117,541,136,060,437,380,000,000,000,000,000,000,000
9
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
xmlSchemaGetNotation(xmlSchemaPtr schema, const xmlChar *name, const xmlChar *nsName) { xmlSchemaNotationPtr ret = NULL; if ((name == NULL) || (schema == NULL)) return (NULL); if (schema != NULL) { WXS_FIND_GLOBAL_ITEM(notaDecl) } exit: return (ret); }
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
31,090,737,897,040,300,000,000,000,000,000,000,000
14
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
int iter_dp_cangodown(struct query_info* qinfo, struct delegpt* dp) { /* no delegation point, do not see how we can go down, * robust check, it should really exist */ if(!dp) return 0; /* see if dp equals the qname, then we cannot go down further */ if(query_dname_compare(qinfo->qname, dp->name) == 0) return 0...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
39,356,275,817,324,057,000,000,000,000,000,000,000
14
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
DecodeNormLookup(NormTable<E> * d) : data(d) {}
0
[ "CWE-125" ]
aspell
de29341638833ba7717bd6b5e6850998454b044b
233,188,188,659,416,650,000,000,000,000,000,000,000
1
Don't allow null-terminated UCS-2/4 strings using the original API. Detect if the encoding is UCS-2/4 and the length is -1 in affected API functions and refuse to convert the string. If the string ends up being converted somehow, abort with an error message in DecodeDirect and ConvDirect. To convert a null terminate...
void Field_blob::sort_string(uchar *to,uint length) { String buf; val_str(&buf, &buf); if (!buf.length() && field_charset->pad_char == 0) bzero(to,length); else { if (field_charset == &my_charset_bin) { /* Store length of blob last in blob to shorter blobs before longer blobs ...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
93,272,624,002,367,020,000,000,000,000,000,000,000
28
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int parse_hints_parse(struct parse_hints *ph, const char **v_in_out) { const char *v = *v_in_out; char *nv; int base; int repeats = 0; int repeat_fixup = ph->result_len; if (ph->repeat) { if (!parse_hints_add_result_octet(ph, 0)) { return 0; } } do { base = 0; switch...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
196,159,215,347,160,800,000,000,000,000,000,000,000
70
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
ManagedX509& ManagedX509::operator=(const ManagedX509& that) { cert_.reset(that.get()); if (cert_) X509_up_ref(cert_.get()); return *this; }
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
175,476,350,222,028,740,000,000,000,000,000,000,000
8
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
int processClientServerHello(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; struct ja3_info ja3; u_int8_t invalid_ja3 = 0; u_int16_t tls_version, ja3_str_len; char ja3_str[JA3_STR_LEN]; ndpi_MD5_CTX ctx; u_char ...
0
[ "CWE-190", "CWE-787" ]
nDPI
23594f036536468072198a57c59b6e9d63caf6ce
162,987,409,737,511,700,000,000,000,000,000,000,000
591
Fixed stack overflow caused by missing length check Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static int check_relocations(const struct drm_i915_gem_exec_object2 *entry) { const char __user *addr, *end; unsigned long size; char __maybe_unused c; size = entry->relocation_count; if (size == 0) return 0; if (size > N_RELOC(ULONG_MAX)) return -EINVAL; addr = u64_to_user_ptr(entry->relocs_ptr); size *...
0
[ "CWE-20" ]
linux
594cc251fdd0d231d342d88b2fdff4bc42fb0690
328,667,832,809,411,240,000,000,000,000,000,000,000
26
make 'user_access_begin()' do 'access_ok()' Originally, the rule used to be that you'd have to do access_ok() separately, and then user_access_begin() before actually doing the direct (optimized) user access. But experience has shown that people then decide not to do access_ok() at all, and instead rely on it being i...
GF_Err hinf_box_dump(GF_Box *a, FILE * trace) { // GF_HintInfoBox *p = (GF_HintInfoBox *)a; gf_isom_box_dump_start(a, "HintInfoBox", trace); gf_fprintf(trace, ">\n"); gf_isom_box_dump_done("HintInfoBox", a, trace); return GF_OK; }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
139,885,836,806,441,900,000,000,000,000,000,000,000
8
fixed #2138
int Arg_comparator::compare_e_int_diff_signedness() { longlong val1= (*a)->val_int(); longlong val2= (*b)->val_int(); if ((*a)->null_value || (*b)->null_value) return MY_TEST((*a)->null_value && (*b)->null_value); return (val1 >= 0) && MY_TEST(val1 == val2); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
205,728,389,017,598,640,000,000,000,000,000,000,000
8
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
pfm_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { DPRINT(("pfm_ioctl called\n")); return -EINVAL; }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
192,300,992,653,796,830,000,000,000,000,000,000,000
5
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
perf_callchain(struct perf_event *event, struct pt_regs *regs) { bool kernel = !event->attr.exclude_callchain_kernel; bool user = !event->attr.exclude_callchain_user; /* Disallow cross-task user callchains. */ bool crosstask = event->ctx->task && event->ctx->task != current; const u32 max_stack = event->attr.sam...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
68,375,163,440,682,660,000,000,000,000,000,000,000
16
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
rb_str_rstrip_bang(str) VALUE str; { char *s, *t, *e; s = RSTRING(str)->ptr; if (!s || RSTRING(str)->len == 0) return Qnil; e = t = s + RSTRING(str)->len; /* remove trailing '\0's */ while (s < t && t[-1] == '\0') t--; /* remove trailing spaces */ while (s < t && ISSPACE(*(t-1))) ...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
245,282,670,497,590,670,000,000,000,000,000,000,000
23
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
njs_generate_object(njs_vm_t *vm, njs_generator_t *generator, njs_parser_node_t *node) { njs_vmcode_object_t *object; node->index = njs_generate_object_dest_index(vm, generator, node); if (njs_slow_path(node->index == NJS_INDEX_ERROR)) { return NJS_ERROR; } njs_generate_code(generator...
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
3,120,228,810,722,782,000,000,000,000,000,000,000
22
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...
static int jpc_ppm_putparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *out) { jpc_ppm_t *ppm = &ms->parms.ppm; /* Eliminate compiler warning about unused variables. */ cstate = 0; if (JAS_CAST(uint, jas_stream_write(out, (char *) ppm->data, ppm->len)) != ppm->len) { return -1; } return 0; }
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
122,041,158,902,419,260,000,000,000,000,000,000,000
12
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
onig_check_callout_data_and_clear_old_values(OnigCalloutArgs* args) { OnigMatchParam* mp; int num; CalloutData* d; mp = args->msa->mp; num = args->num; d = CALLOUT_DATA_AT_NUM(mp, num); if (d->last_match_at_call_counter != mp->match_at_call_counter) { xmemset(d, 0, sizeof(*d)); d->last_match_at...
0
[ "CWE-125" ]
oniguruma
d3e402928b6eb3327f8f7d59a9edfa622fec557b
325,484,732,667,582,530,000,000,000,000,000,000,000
18
fix heap-buffer-overflow
static int rc4_hmac_md5_set_ctx_params(void *vctx, const OSSL_PARAM params[]) { PROV_RC4_HMAC_MD5_CTX *ctx = (PROV_RC4_HMAC_MD5_CTX *)vctx; const OSSL_PARAM *p; size_t sz; if (params == NULL) return 1; p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); if (p != NULL) { ...
0
[ "CWE-327" ]
openssl
7d56a74a96828985db7354a55227a511615f732b
283,560,090,724,124,700,000,000,000,000,000,000,000
64
Fix the RC4-MD5 cipher A copy&paste error meant that the RC4-MD5 cipher (used in TLS) used the TLS AAD data as the MAC key. CVE-2022-1434 Fixes #18112 Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Shane Lontis <shane.lontis@oracle.com> Reviewed-by: Matt Caswell <matt@openssl.org>
static apr_status_t on_stream_headers(h2_session *session, h2_stream *stream, h2_headers *headers, apr_off_t len, int eos) { apr_status_t status = APR_SUCCESS; const char *s; int rv = 0; ap_assert(session); ap_log_cerror(...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
116,650,618,226,732,730,000,000,000,000,000,000,000
152
* 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...
open_readwrite_async_thread (GTask *task, gpointer object, gpointer task_data, GCancellable *cancellable) { GFileIOStream *stream; GError *error = NULL; stream = g_file_open_readwrite (G_FILE (object), cancell...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
67,631,362,799,740,210,000,000,000,000,000,000,000
15
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
congestion_control_build_ext_request(uint8_t **msg_out, size_t *msg_len_out) { uint8_t *request = NULL; trn_extension_t *ext = NULL; trn_extension_field_t *field = NULL; ext = trn_extension_new(); /* With congestion control enabled, add the request, else it is an empty * request in the payload. */ if ...
0
[]
tor
b0496d40197dd5b4fb7b694c1410082d4e34dda6
24,697,300,686,023,990,000,000,000,000,000,000,000
47
Fix for RTT calculation hang during congestion control. Only cache RTT on explicit stalls; Only use this cache for the RTT decrease case. Otherwise use only local circuit RTT state for clock jump checks.
int t2p_tile_is_corner_edge(T2P_TILES tiles, ttile_t tile){ return(t2p_tile_is_right_edge(tiles, tile) & t2p_tile_is_bottom_edge(tiles, tile) ); }
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
145,772,113,237,394,950,000,000,000,000,000,000,000
4
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
do_tag( char_u *tag, // tag (pattern) to jump to int type, int count, int forceit, // :ta with ! int verbose) // print "tag not found" message { taggy_T *tagstack = curwin->w_tagstack; int tagstackidx = curwin->w_tagstackidx; int tagstacklen = curwin->w_tagstacklen; int cur_m...
1
[ "CWE-416" ]
vim
ccfde4d028e891a41e3548323c3d47b06fb0b83e
205,452,544,640,445,200,000,000,000,000,000,000,000
686
patch 9.0.0389: crash when 'tagfunc' closes the window Problem: Crash when 'tagfunc' closes the window. Solution: Bail out when the window was closed.
static inline __le32 ext4_encode_extra_time(struct timespec *time) { u32 extra = sizeof(time->tv_sec) > 4 ? ((time->tv_sec - (s32)time->tv_sec) >> 32) & EXT4_EPOCH_MASK : 0; return cpu_to_le32(extra | (time->tv_nsec << EXT4_EPOCH_BITS));
0
[ "CWE-787" ]
linux
c37e9e013469521d9adb932d17a1795c139b36db
299,710,633,986,942,700,000,000,000,000,000,000,000
6
ext4: add more inode number paranoia checks If there is a directory entry pointing to a system inode (such as a journal inode), complain and declare the file system to be corrupted. Also, if the superblock's first inode number field is too small, refuse to mount the file system. This addresses CVE-2018-10882. https...
void t_cpp_generator::generate_struct_swap(ofstream& out, t_struct* tstruct) { out << indent() << "void swap(" << tstruct->get_name() << " &a, " << tstruct->get_name() << " &b) {" << endl; indent_up(); // Let argument-dependent name lookup find the correct swap() function to // use based on the argument ...
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
128,648,887,390,371,620,000,000,000,000,000,000,000
36
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
char *SSL_get_srp_userinfo(SSL *s) { if (s->srp_ctx.info != NULL) return s->srp_ctx.info; return s->ctx->srp_ctx.info; }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
124,429,795,715,441,000,000,000,000,000,000,000,000
6
Add SRP support.
static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAMETERS) { const char* loc_name = NULL; int loc_name_len = 0; const char* disp_loc_name = NULL; int disp_loc_name_len = 0; int free_loc_name = 0; UChar* disp_name = NULL; i...
1
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
161,937,504,778,513,930,000,000,000,000,000,000,000
134
Fix bug #72241: get_icu_value_internal out-of-bounds read
static int _nfs4_recover_proc_open(struct nfs4_opendata *data) { struct inode *dir = data->dir->d_inode; struct nfs_openres *o_res = &data->o_res; int status; status = nfs4_run_open_task(data, 1); if (status != 0 || !data->rpc_done) return status; nfs_refresh_inode(dir, o_res->dir_attr); if (o_res->r...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
194,629,154,206,189,330,000,000,000,000,000,000,000
20
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
transformIndexStmt(Oid relid, IndexStmt *stmt, const char *queryString) { ParseState *pstate; ParseNamespaceItem *nsitem; ListCell *l; Relation rel; /* Nothing to do if statement already transformed. */ if (stmt->transformed) return stmt; /* * We must not scribble on the passed-in IndexStmt, so copy it. ...
0
[ "CWE-94" ]
postgres
7e92f78abe80e4b30e648a40073abb59057e21f8
228,408,391,435,716,940,000,000,000,000,000,000,000
92
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
compile_substitute(char_u *arg, exarg_T *eap, cctx_T *cctx) { char_u *cmd = eap->arg; char_u *expr = (char_u *)strstr((char *)cmd, "\\="); if (expr != NULL) { int delimiter = *cmd++; // There is a \=expr, find it in the substitute part. cmd = skip_regexp_ex(cmd, delimiter, magic_isset(), NULL, NU...
0
[ "CWE-703", "CWE-122" ]
vim
d1d8f6bacb489036d0fd479c9dd3c0102c988889
256,502,264,136,261,570,000,000,000,000,000,000,000
76
patch 9.0.0211: invalid memory access when compiling :lockvar Problem: Invalid memory access when compiling :lockvar. Solution: Don't read past the end of the line.
_equalAlterSeqStmt(const AlterSeqStmt *a, const AlterSeqStmt *b) { COMPARE_NODE_FIELD(sequence); COMPARE_NODE_FIELD(options); COMPARE_SCALAR_FIELD(missing_ok); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
194,233,172,462,349,950,000,000,000,000,000,000,000
8
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...
absl::optional<std::string> CookieValueSelector::extract(Http::HeaderMap& map) const { std::string value = Envoy::Http::Utility::parseCookieValue(map, cookie_); if (!value.empty()) { return absl::optional<std::string>(std::move(value)); } return absl::nullopt; }
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
38,050,877,773,231,870,000,000,000,000,000,000,000
7
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
static void _luks2_reload(struct crypt_device *cd) { if (!cd || !isLUKS2(cd->type)) return; (void) _crypt_load_luks2(cd, 1, 0); }
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
290,687,503,214,907,830,000,000,000,000,000,000,000
7
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
static int __ext4_journalled_writepage(struct page *page, unsigned int len) { struct address_space *mapping = page->mapping; struct inode *inode = mapping->host; struct buffer_head *page_bufs = NULL; handle_t *handle = NULL; int ret = 0, err = 0; int inline_data = ext4_has_inline_data(inode); struct b...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
255,173,468,426,652,440,000,000,000,000,000,000,000
80
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
static int build_expire(struct sk_buff *skb, struct xfrm_state *x, const struct km_event *c) { struct xfrm_user_expire *ue; struct nlmsghdr *nlh; int err; nlh = nlmsg_put(skb, c->pid, 0, XFRM_MSG_EXPIRE, sizeof(*ue), 0); if (nlh == NULL) return -EMSGSIZE; ue = nlmsg_data(nlh); copy_to_user_state(x, &ue->stat...
0
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
24,817,274,539,704,010,000,000,000,000,000,000,000
20
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
static bool set_blocked_keys(struct btd_adapter *adapter) { uint8_t buffer[sizeof(struct mgmt_cp_set_blocked_keys) + sizeof(blocked_keys)] = { 0 }; struct mgmt_cp_set_blocked_keys *cp = (struct mgmt_cp_set_blocked_keys *)buffer; int i; cp->key_count = ARRAY_SIZE(blocked_keys); for (i = 0; i < cp->key_cou...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
134,123,110,978,423,180,000,000,000,000,000,000,000
20
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
void ConnectionImpl::ClientStreamImpl::submitHeaders(const std::vector<nghttp2_nv>& final_headers, nghttp2_data_provider* provider) { ASSERT(stream_id_ == -1); stream_id_ = nghttp2_submit_request(parent_.session_, nullptr, &final_headers.data()[0], ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
28,437,301,929,162,130,000,000,000,000,000,000,000
7
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
bgp_create_update(struct bgp_conn *conn, byte *buf) { struct bgp_proto *p = conn->bgp; struct bgp_bucket *buck; int size, second, rem_stored; int remains = bgp_max_packet_length(p) - BGP_HEADER_LENGTH - 4; byte *w, *w_stored, *tmp, *tstart; ip_addr *ipp, ip, ip_ll; ea_list *ea; eattr *nh; put_u16(buf...
0
[ "CWE-787" ]
bird
1657c41c96b3c07d9265b07dd4912033ead4124b
206,732,327,101,178,240,000,000,000,000,000,000,000
157
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
DEFUN (show_ip_bgp_vpnv4_all_tags, show_ip_bgp_vpnv4_all_tags_cmd, "show ip bgp vpnv4 all tags", SHOW_STR IP_STR BGP_STR "Display VPNv4 NLRI specific information\n" "Display information about all VPNv4 NLRIs\n" "Display BGP tags for prefixes\n") { return bgp_sho...
0
[ "CWE-119" ]
quagga
a3bc7e9400b214a0f078fdb19596ba54214a1442
93,714,298,095,111,930,000,000,000,000,000,000,000
12
bgpd: Fix VU#270232, VPNv4 NLRI parser memcpys to stack on unchecked length Address CERT vulnerability report VU#270232, memcpy to stack data structure based on length field from packet data whose length field upper-bound was not properly checked. This likely allows BGP peers that are enabled to send Labeled-VPN SAFI...
gimp_channel_sharpen (GimpChannel *channel, gboolean push_undo) { g_return_if_fail (GIMP_IS_CHANNEL (channel)); if (! gimp_item_is_attached (GIMP_ITEM (channel))) push_undo = FALSE; GIMP_CHANNEL_GET_CLASS (channel)->sharpen (channel, push_undo); }
0
[ "CWE-703" ]
gimp
6ab90ecbbd7cc95901933f62227fd140c0576d55
6,760,538,743,542,193,000,000,000,000,000,000,000
10
app: fix #8230 crash in gimp_layer_invalidate_boundary when channel is NULL gimp_channel_is_empty returns FALSE if channel is NULL. This causes gimp_layer_invalidate_boundary to crash if the mask channel is NULL. With a NULL channel gimp_channel_is_empty should return TRUE, just like the similar gimp_image_is_empty d...
TargetToSelection(TScreen *screen, String name) { int result = -1; int cutb; if (isSELECT(name)) { result = DefaultSelection(screen); } else if (!strcmp(name, PRIMARY_NAME)) { result = PRIMARY_CODE; } else if (!strcmp(name, CLIPBOARD_NAME)) { result = CLIPBOARD_CODE; } else if (!strcmp(name,...
0
[ "CWE-399" ]
xterm-snapshots
82ba55b8f994ab30ff561a347b82ea340ba7075c
265,679,261,730,892,680,000,000,000,000,000,000,000
25
snapshot of project "xterm", label xterm-365d
#endif } inline FILE* _stdout(const bool throw_exception) { #ifndef cimg_use_r cimg::unused(throw_exception); return stdout; #else if (throw_exception) { cimg::exception_mode(0); throw CImgIOException("cimg::stdout(): Reference to 'stdout' stream not allowed in R mode " ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
199,169,689,712,802,930,000,000,000,000,000,000,000
13
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int oe_socketpair(int domain, int type, int protocol, int retfd[2]) { int ret = -1; ssize_t retval; oe_fd_t* socks[2] = {0}; oe_device_t* device; uint64_t devid = OE_DEVID_HOST_SOCKET_INTERFACE; /* Resolve the device id. */ if (!(device = oe_device_table_get(devid, OE_DEVICE_TYPE_SOCKET_INT...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
154,120,528,349,465,070,000,000,000,000,000,000,000
45
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static js_Ast *funexp(js_State *J) { js_Ast *a, *b, *c; a = identifieropt(J); jsP_expect(J, '('); b = parameters(J); jsP_expect(J, ')'); c = funbody(J); return EXP3(FUN, a, b, c); }
0
[ "CWE-674" ]
mujs
4d45a96e57fbabf00a7378b337d0ddcace6f38c1
102,355,966,351,322,870,000,000,000,000,000,000,000
10
Guard binary expressions from too much recursion.
ecryptfs_write_metadata_to_xattr(struct dentry *ecryptfs_dentry, struct ecryptfs_crypt_stat *crypt_stat, char *page_virt, size_t size) { int rc; rc = ecryptfs_setxattr(ecryptfs_dentry, ECRYPTFS_XATTR_NAME, page_virt, size, 0); return rc; }
1
[ "CWE-189" ]
linux-2.6
8faece5f906725c10e7a1f6caf84452abadbdc7b
202,098,872,001,199,300,000,000,000,000,000,000,000
10
eCryptfs: Allocate a variable number of pages for file headers When allocating the memory used to store the eCryptfs header contents, a single, zeroed page was being allocated with get_zeroed_page(). However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche...
struct dst_entry *ip6_blackhole_route(struct net *net, struct dst_entry *dst_orig) { struct rt6_info *rt, *ort = (struct rt6_info *) dst_orig; struct dst_entry *new = NULL; rt = dst_alloc(&ip6_dst_blackhole_ops, ort->dst.dev, 1, DST_OBSOLETE_NONE, 0); if (rt) { new = &rt->dst; memset(new + 1, 0, sizeof(*rt) -...
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
249,083,590,973,080,800,000,000,000,000,000,000,000
39
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
void initServer() { int j; signal(SIGHUP, SIG_IGN); signal(SIGPIPE, SIG_IGN); setupSigSegvAction(); if (server.syslog_enabled) { openlog(server.syslog_ident, LOG_PID | LOG_NDELAY | LOG_NOWAIT, server.syslog_facility); } server.mainthread = pthread_self(); server.cl...
1
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
43,832,495,662,493,120,000,000,000,000,000,000,000
82
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
**/ iterator end() { return _data + _width;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
32,503,395,354,792,280,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
bool ShapeRefiner::IsUpdatedShapesOrTypes( InferenceContext* c, const std::vector<ShapeAndType>& existing, const std::vector<ShapeAndType>& updated) { if (existing.size() != updated.size()) { return true; } for (int i = 0; i < existing.size(); i++) { if (!SameDefinedShape(c, existing[i].shape, upd...
0
[ "CWE-416", "CWE-369" ]
tensorflow
ee119d4a498979525046fba1c3dd3f13a039fbb1
111,614,235,028,966,050,000,000,000,000,000,000,000
14
Fix segmentation fault in shape inference logic. When running shape functions, some functions (such as `MutableHashTableShape`) produce extra output information in the form of a `ShapeAndType` struct. The shapes embedded in this struct are owned by an inference context that is cleaned up almost immediately; if the up...
_gnutls_version_get (int major, int minor) { int ret = -1; GNUTLS_VERSION_LOOP (if ((p->major == major) && (p->minor == minor)) ret = p->id); return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
20,140,753,479,658,495,000,000,000,000,000,000,000
8
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
int phar_parse_tarfile(php_stream* fp, char *fname, int fname_len, char *alias, int alias_len, phar_archive_data** pphar, int is_data, php_uint32 compression, char **error TSRMLS_DC) /* {{{ */ { char buf[512], *actual_alias = NULL, *p; phar_entry_info entry = {0}; size_t pos = 0, read, totalsize; tar_header *hdr; ...
0
[ "CWE-189" ]
php-src
c27f012b7a447e59d4a704688971cbfa7dddaa74
196,229,996,737,177,700,000,000,000,000,000,000,000
473
Fix bug #69453 - don't try to cut empty string
on_saved_session_name_read (GdmSessionWorker *worker) { char *session_name; session_name = gdm_session_settings_get_session_name (worker->priv->user_settings); send_dbus_string_method (worker->priv->connection, "SavedSessionNameRead", ...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
61,667,500,347,516,730,000,000,000,000,000,000,000
10
Store the face and dmrc files in a cache. Refer to bug #565151.
static void nfs4_delegreturn_done(struct rpc_task *task, void *calldata) { struct nfs4_delegreturndata *data = calldata; data->rpc_status = task->tk_status; if (data->rpc_status == 0) renew_lease(data->res.server, data->timestamp); }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
220,727,054,110,408,600,000,000,000,000,000,000,000
7
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void avrcp_setting_changed(struct avrcp *session, struct avrcp_header *pdu) { struct avrcp_player *player = session->controller->player; struct media_player *mp = player->user_data; uint8_t count = pdu->params[1]; int i; for (i = 2; count > 0; count--, i += 2) { const char *key; const char *value...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
31,696,328,876,508,200,000,000,000,000,000,000,000
23
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
virtual ~ValueSetter() { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
293,079,138,079,627,880,000,000,000,000,000,000,000
3
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
_outSortBy(StringInfo str, const SortBy *node) { WRITE_NODE_TYPE("SORTBY"); WRITE_NODE_FIELD(node); WRITE_ENUM_FIELD(sortby_dir, SortByDir); WRITE_ENUM_FIELD(sortby_nulls, SortByNulls); WRITE_NODE_FIELD(useOp); WRITE_LOCATION_FIELD(location); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
303,397,190,255,603,780,000,000,000,000,000,000,000
10
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...
static bool type_is_pkt_pointer(enum bpf_reg_type type) { return type == PTR_TO_PACKET || type == PTR_TO_PACKET_META; }
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
92,065,843,614,209,160,000,000,000,000,000,000,000
5
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
static int oidc_check_max_session_duration(request_rec *r, oidc_cfg *cfg, oidc_session_t *session) { const char *s_session_expires = NULL; apr_time_t session_expires; /* get the session expiry from the session data */ oidc_session_get(r, session, OIDC_SESSION_EXPIRES_SESSION_KEY, &s_session_expires); /* con...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
32,393,717,274,053,680,000,000,000,000,000,000,000
27
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
TfLiteTensor* GetTempLhs(TfLiteContext* context, TfLiteNode* node, const TfLiteTensor* lhs) { TfLiteTensor* transposed_lhs = GetTemporary(context, node, 0); if (lhs->type == kTfLiteInt8) { // Get the quantization params from the LHS tensor. transposed_lhs->params.scale = lhs->params...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
195,146,581,669,321,140,000,000,000,000,000,000,000
10
[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 k90_backlight_work(struct work_struct *work) { int ret; struct k90_led *led = container_of(work, struct k90_led, work); struct device *dev; struct usb_interface *usbif; struct usb_device *usbdev; if (led->removed) return; dev = led->cdev.dev->parent; usbif = to_usb_interface(dev->parent); usbde...
0
[ "CWE-399", "CWE-119" ]
linux
6d104af38b570d37aa32a5803b04c354f8ed513d
108,323,816,048,658,750,000,000,000,000,000,000,000
24
HID: corsair: fix DMA buffers on stack Not all platforms support DMA to the stack, and specifically since v4.9 this is no longer supported on x86 with VMAP_STACK either. Note that the macro-mode buffer was larger than necessary. Fixes: 6f78193ee9ea ("HID: corsair: Add Corsair Vengeance K90 driver") Cc: stable <stabl...
static int id3_has_changed_values(struct playlist *pls, AVDictionary *metadata, ID3v2ExtraMetaAPIC *apic) { AVDictionaryEntry *entry = NULL; AVDictionaryEntry *oldentry; /* check that no keys have changed values */ while ((entry = av_dict_get(metadata, "", entry, AV_DIC...
0
[ "CWE-703" ]
FFmpeg
7ba100d3e6e8b1e5d5342feb960a7f081d6e15af
113,346,145,993,942,560,000,000,000,000,000,000,000
27
avformat/hls: Fix DoS due to infinite loop Fixes: loop.m3u The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome Found-by: Xiaohei and Wangchu from Alibaba Security Team Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <...
GF_Box *gama_box_new() { ISOM_DECL_BOX_ALLOC(GF_GamaInfoBox, GF_QT_BOX_TYPE_GAMA); return (GF_Box *)tmp; }
0
[ "CWE-476" ]
gpac
6170024568f4dda310e98ef7508477b425c58d09
325,694,593,898,744,270,000,000,000,000,000,000,000
5
fixed potential crash - cf #1263
static void reply_sesssetup_and_X_spnego(struct smb_request *req) { const uint8 *p; DATA_BLOB blob1; size_t bufrem; char *tmp; const char *native_os; const char *native_lanman; const char *primary_domain; const char *p2; uint16 data_blob_len = SVAL(req->vwv+7, 0); enum remote_arch_types ra_type = get_remote_a...
1
[ "CWE-119" ]
samba
9280051bfba337458722fb157f3082f93cbd9f2b
328,722,533,825,058,300,000,000,000,000,000,000,000
180
s3: Fix an uninitialized variable read Found by Laurent Gaffie <laurent.gaffie@gmail.com> Thanks for that, Volker Fix bug #7254 (An uninitialized variable read could cause an smbd crash).
read_appdata_xml_from_deploy_dir (GFile *deploy_dir, const char *id) { g_autoptr(GFile) appdata_file = NULL; g_autofree char *appdata_name = NULL; g_autoptr(GFileInputStream) appdata_in = NULL; gsize size; appdata_name = g_strconcat (id, ".xml.gz", NULL); appdata_file = flatpak_build_file (deploy_dir, "fi...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
323,581,149,834,388,940,000,000,000,000,000,000,000
24
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
gs_interp_make_oper(ref * opref, op_proc_t proc, int idx) { int i; for (i = num_special_ops; i > 0 && proc != interp1_op_defs[i].proc; --i) DO_NOTHING; if (i > 0) make_tasv(opref, tx_op + (i - 1), a_executable, i, opproc, proc); else make_tasv(opref, t_operator, a_executable, id...
0
[]
ghostpdl
b575e1ec42cc86f6a58c603f2a88fcc2af699cc8
265,917,053,108,290,400,000,000,000,000,000,000,000
11
Bug 699668: handle stack overflow during error handling When handling a Postscript error, we push the object throwing the error onto the operand stack for the error handling procedure to access - we were not checking the available stack before doing so, thus causing a crash. Basically, if we get a stack overflow when...
asmlinkage int sys_rt_sigsuspend(nabi_no_regargs struct pt_regs regs) { sigset_t newset; sigset_t __user *unewset; size_t sigsetsize; /* XXX Don't preclude handling different sized sigset_t's. */ sigsetsize = regs.regs[5]; if (sigsetsize != sizeof(sigset_t)) return -EINVAL; unewset = (sigset_t __user *) reg...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
204,102,663,903,621,300,000,000,000,000,000,000,000
27
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static unsigned uv__utf8_decode1_slow(const char** p, const char* pe, unsigned a) { unsigned b; unsigned c; unsigned d; unsigned min; if (a > 0xF7) return -1; switch (*p - pe) { default: if (a > 0xEF) { min = 0x100...
1
[ "CWE-125" ]
libuv
b7466e31e4bee160d82a68fca11b1f61d46debae
201,999,174,822,125,130,000,000,000,000,000,000,000
63
idna: fix OOB read in punycode decoder libuv was vulnerable to out-of-bounds reads in the uv__idna_toascii() function which is used to convert strings to ASCII. This is called by the DNS resolution function and can lead to information disclosures or crashes. Reported by Eric Sesterhenn in collaboration with Cure53 an...
static s64 tctx_inflight(struct io_uring_task *tctx, bool tracked) { if (tracked) return atomic_read(&tctx->inflight_tracked); return percpu_counter_sum(&tctx->inflight);
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
228,008,637,457,185,700,000,000,000,000,000,000,000
6
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
static struct tcf_proto *tcf_proto_create(const char *kind, u32 protocol, u32 prio, struct tcf_chain *chain, bool rtnl_held, struct netlink_ext_ack *extack) { struct tcf_proto *tp; int err; tp = kzalloc(sizeof(*tp), GFP_KERNEL); if (!tp) return ERR_PTR(-ENOBUFS); tp->ops = tcf_proto_lookup...
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
286,872,099,406,973,750,000,000,000,000,000,000,000
35
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static inline void put_link(struct nameidata *nd) { struct saved *last = nd->stack + --nd->depth; do_delayed_call(&last->done); if (!(nd->flags & LOOKUP_RCU)) path_put(&last->link); }
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
273,017,042,667,045,700,000,000,000,000,000,000,000
7
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
QPDF_Array::getJSON() { JSON j = JSON::makeArray(); for (std::vector<QPDFObjectHandle>::iterator iter = this->items.begin(); iter != this->items.end(); ++iter) { j.addArrayElement((*iter).getJSON()); } return j; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
61,087,548,130,639,590,000,000,000,000,000,000,000
10
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
int cil_gen_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr) { int rc = SEPOL_ERR; cil_list_init(expr, flavor); if (current->cl_head == NULL) { rc = __cil_fill_expr(current, flavor, *expr); } else { rc = __cil_fill_expr_helper(current->cl_head, flavor, *expr); } if (rc !=...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
159,312,639,049,902,350,000,000,000,000,000,000,000
19
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
static void zipfileFree(void *p) { sqlite3_free(p); }
0
[ "CWE-434" ]
sqlite
54d501092d88c0cf89bec4279951f548fb0b8618
295,106,729,196,346,300,000,000,000,000,000,000,000
3
Fix the zipfile extension so that INSERT works even if the pathname of the file being inserted is a NULL. Bug discovered by the Yongheng and Rui fuzzer. FossilOrigin-Name: a80f84b511231204658304226de3e075a55afc2e3f39ac063716f7a57f585c06
*/ static void xmlXPathCompNumber(xmlXPathParserContextPtr ctxt) { double ret = 0.0; double mult = 1; int ok = 0; int exponent = 0; int is_exponent_negative = 0; #ifdef __GNUC__ unsigned long tmp = 0; double temp; #endif CHECK_ERROR; if ((CUR != '.') && ((CUR < '0') || (CUR > '9'))...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
258,420,784,236,769,830,000,000,000,000,000,000,000
68
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
BSONObj spec() { return BSON("$eq" << BSON_ARRAY(1)); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
252,536,863,617,212,470,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static struct memory_block *find_memory_block_by_id(unsigned long block_id) { struct memory_block *mem; mem = xa_load(&memory_blocks, block_id); if (mem) get_device(&mem->dev); return mem; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
8,406,605,617,373,750,000,000,000,000,000,000,000
9
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
//! Remove white spaces on the start and/or end of a C-string. inline bool strpare(char *const str, const bool is_symmetric, const bool is_iterative) { if (!str) return false; const int l = (int)std::strlen(str); int p, q; if (is_symmetric) for (p = 0, q = l - 1; p<q && is_blank(str[p]) ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
95,548,457,262,374,930,000,000,000,000,000,000,000
14
.
addSess(ptcplstn_t *pLstn, int sock, prop_t *peerName, prop_t *peerIP) { DEFiRet; ptcpsess_t *pSess = NULL; ptcpsrv_t *pSrv = pLstn->pSrv; CHKmalloc(pSess = malloc(sizeof(ptcpsess_t))); CHKmalloc(pSess->pMsg = malloc(iMaxLine)); pSess->pLstn = pLstn; pSess->sock = sock; pSess->bSuppOctetFram = pLstn->bSuppOcte...
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
181,334,894,825,498,600,000,000,000,000,000,000,000
42
imptcp: fix Segmentation Fault when octet count is to high
*/ static inline void skb_postpush_rcsum(struct sk_buff *skb, const void *start, unsigned int len) { __skb_postpush_rcsum(skb, start, len, 0);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
158,347,308,372,649,850,000,000,000,000,000,000,000
5
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
TfLiteRegistration* Register_REVERSE_SEQUENCE() { static TfLiteRegistration r = {nullptr, nullptr, reverse_sequence::Prepare, reverse_sequence::Eval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
110,572,784,246,456,760,000,000,000,000,000,000,000
5
[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...
zclipsave(i_ctx_t *i_ctx_p) { return gs_clipsave(igs); }
0
[]
ghostpdl
4f83478c88c2e05d6e8d79ca4557eb039354d2f3
189,884,682,981,025,440,000,000,000,000,000,000,000
4
Bug 697799: have .eqproc check its parameters The Ghostscript custom operator .eqproc was not check the number or type of the parameters it was given.
static int dccp_v6_send_response(const struct sock *sk, struct request_sock *req) { struct inet_request_sock *ireq = inet_rsk(req); struct ipv6_pinfo *np = inet6_sk(sk); struct sk_buff *skb; struct in6_addr *final_p, final; struct flowi6 fl6; int err = -1; struct dst_entry *dst; memset(&fl6, 0, sizeof(fl6)); ...
1
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
329,946,091,455,722,030,000,000,000,000,000,000,000
46
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
int msix_enabled(PCIDevice *dev) { return (dev->cap_present & QEMU_PCI_CAP_MSIX) && (dev->config[dev->msix_cap + MSIX_CONTROL_OFFSET] & MSIX_ENABLE_MASK); }
0
[]
qemu
43b11a91dd861a946b231b89b7542856ade23d1b
237,115,257,182,835,160,000,000,000,000,000,000,000
6
msix: implement pba write (but read-only) qpci_msix_pending() writes on pba region, causing qemu to SEGV: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff7fba8c0 (LWP 25882)] 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in () #1 0x00005555556556c5 in memor...
pn_ssl_domain_t *pn_ssl_domain( pn_ssl_mode_t mode ) { pn_ssl_domain_t *domain = (pn_ssl_domain_t *) calloc(1, sizeof(pn_ssl_domain_t)); if (!domain) return NULL; InitializeCriticalSectionAndSpinCount(&domain->cslock, 4000); csguard(&domain->cslock); domain->ref_count = 1; domain->mode = mode; switch(mod...
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
118,594,734,715,899,040,000,000,000,000,000,000,000
22
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
static int vcpu_mmio_gva_to_gpa(struct kvm_vcpu *vcpu, unsigned long gva, gpa_t *gpa, struct x86_exception *exception, bool write) { struct kvm_mmu *mmu = vcpu->arch.walk_mmu; u64 access = ((static_call(kvm_x86_get_cpl)(vcpu) == 3) ? PFERR_USER_MASK : 0) | (write ? PFERR_WRITE_MASK : 0); /* * currently ...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
316,883,417,839,963,660,000,000,000,000,000,000,000
29
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
compression_name(const int compression) { static const int num_compression_methods = sizeof(compression_methods)/sizeof(compression_methods[0]); int i=0; while(compression >= 0 && i < num_compression_methods) { if (compression_methods[i].id == compression) return compression_methods[i].name; i++; } retur...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
39,720,999,011,200,503,000,000,000,000,000,000,000
13
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...
static void parse_rotation_parameter(Options& o, std::string const& parameter) { std::string angle_str; std::string range; size_t colon = parameter.find(':'); int relative = 0; if (colon != std::string::npos) { if (colon > 0) { angle_str = parameter.substr(0, colon); ...
1
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
22,456,577,167,128,270,000,000,000,000,000,000,000
55
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static inline u64 nsec_to_cycles(struct kvm_vcpu *vcpu, u64 nsec) { u64 ret; WARN_ON(preemptible()); if (kvm_tsc_changes_freq()) printk_once(KERN_WARNING "kvm: unreliable cycle conversion on adjustable rate TSC\n"); ret = nsec * vcpu_tsc_khz(vcpu); do_div(ret, USEC_PER_SEC); return ret; }
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
22,386,247,959,824,990,000,000,000,000,000,000,000
12
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...
int X509_verify_cert(X509_STORE_CTX *ctx) { X509 *x, *xtmp, *xtmp2, *chain_ss = NULL; int bad_chain = 0; X509_VERIFY_PARAM *param = ctx->param; int depth, i, ok = 0; int num, j, retry; int (*cb) (int xok, X509_STORE_CTX *xctx); STACK_OF(X509) *sktmp = NULL; if (ctx->cert == NULL) { ...
1
[ "CWE-254" ]
openssl
b3b1eb5735c5b3d566a9fc3bf745bf716a29afa0
194,918,017,300,195,560,000,000,000,000,000,000,000
279
Reject calls to X509_verify_cert that have not been reinitialised The function X509_verify_cert checks the value of |ctx->chain| at the beginning, and if it is NULL then it initialises it, along with the value of ctx->untrusted. The normal way to use X509_verify_cert() is to first call X509_STORE_CTX_init(); then set ...
static void con_cleanup(struct tty_struct *tty) { struct vc_data *vc = tty->driver_data; tty_port_put(&vc->port); }
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
292,935,824,931,171,900,000,000,000,000,000,000,000
6
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
static int do_vm86_irq_handling(int subfunction, int irqnumber) { int ret; switch (subfunction) { case VM86_GET_AND_RESET_IRQ: { return get_and_reset_irq(irqnumber); } case VM86_GET_IRQ_BITS: { return irqbits; } case VM86_REQUEST_IRQ: { int sig = irqnumber >> 8; int irq = irqnumber & 255; if ...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
225,230,686,695,924,820,000,000,000,000,000,000,000
33
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...