func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate) { FILE *file= (info_type == INFO_ERROR ? stderr : stdout); static int inited=0; if (status.batch) { if (info_type == INFO_ERROR) { (void) fflush(file); fprintf(file,"ERROR"); if (error) { if (sqlsta...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
94,813,581,175,868,700,000,000,000,000,000,000,000
61
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...
g_execvp(const char* p1, char* args[]) { #if defined(_WIN32) return 0; #else return execvp(p1, args); #endif }
1
[]
xrdp
cadad6e181d2a67698e5eb7cacd6b233ae29eb97
16,832,954,679,418,721,000,000,000,000,000,000,000
8
/tmp cleanup
Mat_VarWrite4(mat_t *mat,matvar_t *matvar) { typedef struct { mat_int32_t type; mat_int32_t mrows; mat_int32_t ncols; mat_int32_t imagf; mat_int32_t namelen; } Fmatrix; mat_int32_t nelems = 1, i; Fmatrix x; if ( NULL == mat || NULL == matvar || NULL == matva...
0
[ "CWE-703", "CWE-125", "CWE-908" ]
matio
651a8e28099edb5fbb9e4e1d4d3238848f446c9a
235,029,418,784,677,000,000,000,000,000,000,000,000
174
Avoid uninitialized memory As reported by https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16856
static int ZEND_FASTCALL ZEND_ADD_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; add_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC), _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSR...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
129,612,511,219,696,590,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
int mbedtls_ssl_check_pending( const mbedtls_ssl_context *ssl ) { /* * Case A: We're currently holding back * a message for further processing. */ if( ssl->keep_current_message == 1 ) { MBEDTLS_SSL_DEBUG_MSG( 3, ( "ssl_check_pending: record held back for processing" ) ); retu...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
238,502,552,523,496,850,000,000,000,000,000,000,000
54
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
inline bool all_tables_not_ok(THD *thd, TABLE_LIST *tables) { Rpl_filter *rpl_filter= thd->system_thread_info.rpl_sql_info->rpl_filter; return rpl_filter->is_on() && tables && !thd->spcont && !rpl_filter->tables_ok(thd->db.str, tables); }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
191,068,671,089,497,220,000,000,000,000,000,000,000
6
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static I32 S_backref_value(char *p, char *e) { const char* endptr = e; UV val; if (grok_atoUV(p, &val, &endptr) && val <= I32_MAX) return (I32)val; return I32_MAX;
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
68,681,184,830,543,985,000,000,000,000,000,000,000
8
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
m4_index (struct obstack *obs, int argc, token_data **argv) { const char *haystack; const char *result; int retval; if (bad_argc (argv[0], argc, 3, 3)) { /* builtin(`index') is blank, but index(`abc') is 0. */ if (argc == 2) shipout_int (obs, 0); return; } haystack = ARG (1); r...
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
41,399,366,228,791,947,000,000,000,000,000,000,000
20
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
const char *dns_server_string(DnsServer *server) { assert(server); if (!server->server_string) (void) in_addr_ifindex_to_string(server->family, &server->address, dns_server_ifindex(server), &server->server_string); return strna(server->server_string); }
0
[ "CWE-416" ]
systemd
904dcaf9d4933499f8334859f52ea8497f2d24ff
302,837,560,847,653,230,000,000,000,000,000,000,000
8
resolved: take particular care when detaching DnsServer from its default stream DnsStream and DnsServer have a symbiotic relationship: one DnsStream is the current "default" stream of the server (and thus reffed by it), but each stream also refs the server it is connected to. This cyclic dependency can result in weird...
stack_peek (VerifyContext *ctx, int distance) { g_assert (ctx->eval.size - distance > 0); return ctx->eval.stack + (ctx->eval.size - 1 - distance); }
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
176,690,290,493,899,300,000,000,000,000,000,000,000
5
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
Perl_re_compile(pTHX_ SV * const pattern, U32 rx_flags) { SV *pat = pattern; /* defeat constness! */ PERL_ARGS_ASSERT_RE_COMPILE; return Perl_re_op_compile(aTHX_ &pat, 1, NULL, #ifdef PERL_IN_XSUB_RE &my_reg_engine, #else &PL_core_reg_engine, #...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
336,226,261,209,510,240,000,000,000,000,000,000,000
12
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
static void ahci_start_transfer(IDEDMA *dma) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); IDEState *s = &ad->port.ifs[0]; uint32_t size = (uint32_t)(s->data_end - s->data_ptr); /* write == ram -> device */ uint32_t opts = le32_to_cpu(ad->cur_cmd->opts); int is_write = opts & AHCI_CMD_WRIT...
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
89,489,062,874,886,620,000,000,000,000,000,000,000
48
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...
static int fuse_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) { struct inode *inode = page->mapping->host; /* Haven't copied anything? Skip zeroing, size extending, dirtying. */ if (!copied) goto unlock; if (!PageUpto...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
107,670,793,263,132,060,000,000,000,000,000,000,000
27
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
int cil_gen_roleattribute(struct cil_db *db, struct cil_tree_node *parse_current, struct cil_tree_node *ast_node) { enum cil_syntax syntax[] = { CIL_SYN_STRING, CIL_SYN_STRING, CIL_SYN_END }; int syntax_len = sizeof(syntax)/sizeof(*syntax); char *key = NULL; struct cil_roleattribute *attr = NULL; int rc = S...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
186,309,285,751,335,900,000,000,000,000,000,000,000
36
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 int selinux_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) { const struct cred *cred = current_cred(); struct path path; path.dentry = dentry; path.mnt = mnt; return path_has_perm(cred, &path, FILE__GETATTR); }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
162,220,860,505,087,670,000,000,000,000,000,000,000
10
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
int uwsgi_endswith(char *str1, char *str2) { size_t i; size_t str1len = strlen(str1); size_t str2len = strlen(str2); char *ptr; if (str2len > str1len) return 0; ptr = (str1 + str1len) - str2len; for (i = 0; i < str2len; i++) { if (*ptr != str2[i]) return 0; ptr++; } return 1; }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
5,524,785,808,516,746,000,000,000,000,000,000,000
20
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
remove_callback_link (NautilusDirectory *directory, GList *link) { ReadyCallback *callback; callback = link->data; remove_callback_link_keep_data (directory, link); g_free (callback); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
163,105,240,508,818,300,000,000,000,000,000,000,000
9
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static void iscsi_start_tx(struct iscsi_conn *conn) { clear_bit(ISCSI_SUSPEND_BIT, &conn->suspend_tx); iscsi_conn_queue_work(conn); }
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
73,255,683,616,470,290,000,000,000,000,000,000,000
5
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
parse_SET_QUEUE(char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { return str_to_u32(arg, &ofpact_put_SET_QUEUE(ofpacts)->queue_id); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
26,279,028,250,124,240,000,000,000,000,000,000,000
5
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
SCTP_STATIC int sctp_setsockopt(struct sock *sk, int level, int optname, char __user *optval, int optlen) { int retval = 0; SCTP_DEBUG_PRINTK("sctp_setsockopt(sk: %p... optname: %d)\n", sk, optname); /* I can hardly begin to describe how wrong this is. This is * so broken as to be worse than useless. ...
0
[]
linux-2.6
5e739d1752aca4e8f3e794d431503bfca3162df4
219,335,902,027,612,400,000,000,000,000,000,000,000
137
sctp: fix potential panics in the SCTP-AUTH API. All of the SCTP-AUTH socket options could cause a panic if the extension is disabled and the API is envoked. Additionally, there were some additional assumptions that certain pointers would always be valid which may not always be the case. This patch hardens the API a...
static int tda9874a_checkit(struct CHIPSTATE *chip) { int dic,sic; /* device id. and software id. codes */ if(-1 == (dic = chip_read2(chip,TDA9874A_DIC))) return 0; if(-1 == (sic = chip_read2(chip,TDA9874A_SIC))) return 0; v4l_dbg(1, debug, chip->c, "tda9874a_checkit(): DIC=0x%X, SIC=0x%X.\n", dic, sic); if...
0
[ "CWE-399" ]
linux-2.6
01a1a3cc1e3fbe718bd06a2a5d4d1a2d0fb4d7d9
298,881,535,722,365,600,000,000,000,000,000,000,000
18
V4L/DVB (9624): CVE-2008-5033: fix OOPS on tvaudio when controlling bass/treble This bug were supposed to be fixed by 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1, where a call to NULL happens. Not all tvaudio chips allow controlling bass/treble. So, the driver has a table with a flag to indicate if the chip does support...
TfLiteStatus Subgraph::EnsureMemoryAllocations() { if (memory_planner_) { state_ = kStateUninvokable; TF_LITE_ENSURE_OK(&context_, memory_planner_->PlanAllocations()); } TF_LITE_ENSURE_OK(&context_, AllocateTensors()); TF_LITE_ENSURE_EQ(&context_, state_, kStateInvokable); return kTfLiteOk; }
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
306,949,953,460,373,470,000,000,000,000,000,000,000
9
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
void fx_TypedArray_of(txMachine* the) { txInteger count = mxArgc; txInteger index = 0; mxPushSlot(mxThis); mxNew(); mxPushInteger(count); mxRunCount(1); mxPullSlot(mxResult); { mxResultTypedArrayDeclarations; txU2 shift = resultDispatch->value.typedArray.dispatch->shift; if (resultLength < count) mxTyp...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
87,662,042,177,837,610,000,000,000,000,000,000,000
23
XS: #896
static NTSTATUS dcesrv_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE *r) { DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
197,978,384,643,163,600,000,000,000,000,000,000,000
5
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
SPL_METHOD(SplDoublyLinkedList, setIteratorMode) { long value; spl_dllist_object *intern; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &value) == FAILURE) { return; } intern = (spl_dllist_object*)zend_object_store_get_object(getThis() TSRMLS_CC); if (intern->flags & SPL_DLLIST_IT_FIX && (inter...
0
[]
php-src
df78c48354f376cf419d7a97f88ca07d572f00fb
204,503,880,598,405,750,000,000,000,000,000,000,000
21
Fixed Bug #67538 (SPL Iterators use-after-free)
Returns TRUE if the mode outputs blocks of bytes */ PHP_FUNCTION(mcrypt_module_is_block_mode) { MCRYPT_GET_MODE_DIR_ARGS(modes_dir) if (mcrypt_module_is_block_mode(module, dir) == 1) { RETURN_TRUE; } else { RETURN_FALSE; }
0
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
39,505,000,417,813,723,000,000,000,000,000,000,000
10
Fix bug #72455: Heap Overflow due to integer overflows
mrb_singleton_class_ptr(mrb_state *mrb, mrb_value v) { struct RBasic *obj; switch (mrb_type(v)) { case MRB_TT_FALSE: if (mrb_nil_p(v)) return mrb->nil_class; return mrb->false_class; case MRB_TT_TRUE: return mrb->true_class; case MRB_TT_CPTR: case MRB_TT_SYMBOL: case MRB_TT_INTEGER: #if...
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
272,517,281,223,403,700,000,000,000,000,000,000,000
26
class.c: clear method cache after `remove_method`.
bool skb_page_frag_refill(unsigned int sz, struct page_frag *pfrag, gfp_t prio) { int order; if (pfrag->page) { if (atomic_read(&pfrag->page->_count) == 1) { pfrag->offset = 0; return true; } if (pfrag->offset + sz <= pfrag->size) return true; put_page(pfrag->page); } order = SKB_FRAG_PAGE_ORDER;...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
178,080,659,994,604,730,000,000,000,000,000,000,000
30
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static bool socks4_negotiate(struct pool *pool, int sockd, bool socks4a) { unsigned short port; in_addr_t inp; char buf[515]; int i, len; buf[0] = 0x04; buf[1] = 0x01; port = atoi(pool->stratum_port); buf[2] = port >> 8; buf[3] = port & 0xff; sprintf(&buf[8], "CGMINER"); /* See if we've been given an IP ad...
0
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
73,457,136,867,821,740,000,000,000,000,000,000,000
74
Do some random sanity checking for stratum message parsing
static int _php_check_ignore(const char *charset) { size_t clen = strlen(charset); if (clen >= 9 && strcmp("//IGNORE", charset+clen-8) == 0) { return 1; } if (clen >= 19 && strcmp("//IGNORE//TRANSLIT", charset+clen-18) == 0) { return 1; } return 0; }
0
[ "CWE-835" ]
php-src
06d309fd7a917575d65c7a6f4f57b0e6bb0f9711
232,445,657,451,919,370,000,000,000,000,000,000,000
11
Fix bug #76249 - fail on invalid sequences
static ssize_t wakeup_active_show(struct device *dev, struct device_attribute *attr, char *buf) { unsigned int active = 0; bool enabled = false; spin_lock_irq(&dev->power.lock); if (dev->power.wakeup) { active = dev->power.wakeup->active; enabled = true; } spin_unlock_irq(&dev->power.lock); return ena...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
73,909,019,729,131,610,000,000,000,000,000,000,000
14
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...
static bool checkreturn decode_static_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *iter) { pb_type_t type; pb_decoder_t func; type = iter->pos->type; func = PB_DECODERS[PB_LTYPE(type)]; switch (PB_HTYPE(type)) { case PB_HTYPE_REQUIRED: return f...
1
[ "CWE-20", "CWE-119" ]
nanopb
4fe23595732b6f1254cfc11a9b8d6da900b55b0c
115,823,340,557,839,140,000,000,000,000,000,000,000
75
Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615) Nanopb would leak memory when all of the following conditions were true: - PB_ENABLE_MALLOC is defined at the compile time - Message definitions contains an oneof field, the oneof contains a static submessage, and the static submessage contains a pointer fiel...
static bool atl2_write_eeprom(struct atl2_hw *hw, u32 offset, u32 value) { return true; }
0
[ "CWE-200" ]
linux
f43bfaeddc79effbf3d0fcb53ca477cca66f3db8
36,628,618,044,138,540,000,000,000,000,000,000,000
4
atl2: Disable unimplemented scatter/gather feature atl2 includes NETIF_F_SG in hw_features even though it has no support for non-linear skbs. This bug was originally harmless since the driver does not claim to implement checksum offload and that used to be a requirement for SG. Now that SG and checksum offload are i...
lldpd_alloc_default_local_port(struct lldpd *cfg) { struct lldpd_port *port; if ((port = (struct lldpd_port *) calloc(1, sizeof(struct lldpd_port))) == NULL) fatal("main", NULL); #ifdef ENABLE_DOT1 TAILQ_INIT(&port->p_vlans); TAILQ_INIT(&port->p_ppvids); TAILQ_INIT(&port->p_pids); #endif #ifdef ENABLE_CUSTOM...
0
[ "CWE-617", "CWE-703" ]
lldpd
9221b5c249f9e4843f77c7f888d5705348d179c0
232,021,487,530,528,800,000,000,000,000,000,000,000
18
protocols: don't use assert on paths that can be reached Malformed packets should not make lldpd crash. Ensure we can handle them by not using assert() in this part.
static MOBI_RET mobi_decompress_huffman_internal(MOBIBuffer *buf_out, MOBIBuffer *buf_in, const MOBIHuffCdic *huffcdic, size_t depth) { if (depth > MOBI_HUFFMAN_MAXDEPTH) { debug_print("Too many levels of recursion: %zu\n", depth); return MOBI_DATA_CORRUPT; } MOBI_RET ret = MOBI_SUCCESS; ...
1
[ "CWE-119", "CWE-125" ]
libmobi
bec783e6212439a335ba6e8df7ab8ed610ca9a21
318,726,643,269,711,560,000,000,000,000,000,000,000
67
Fix potential out-of-buffer read while parsing corrupt file, closes #35, #36
static void check_array_for_usertypes (MonoArray *arr) { int i; if (!arr) return; for (i = 0; i < mono_array_length (arr); ++i) RESOLVE_ARRAY_TYPE_ELEMENT (arr, i);
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
58,268,203,863,798,930,000,000,000,000,000,000,000
10
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
MagickExport ChannelFeatures *GetImageChannelFeatures(const Image *image, const size_t distance,ExceptionInfo *exception) { typedef struct _ChannelStatistics { DoublePixelPacket direction[4]; /* horizontal, vertical, left and right diagonals */ } ChannelStatistics; CacheView *image_view; Ch...
0
[ "CWE-369" ]
ImageMagick6
b522d2d857d2f75b659936b59b0da9df1682c256
56,461,574,720,814,610,000,000,000,000,000,000,000
1,104
https://github.com/ImageMagick/ImageMagick/issues/1552
void dormd(char *name) { #ifdef QUOTAS Quota quota; #endif #ifndef ANON_CAN_DELETE if (guest != 0) { addreply_noformat(550, MSG_ANON_CANT_RMD); return; } #endif if (checknamesanity(name, dot_write_ok) != 0) { addreply_noformat(553, MSG_SANITY_DIRECTORY_FAILURE); return; ...
0
[ "CWE-434" ]
pure-ftpd
37ad222868e52271905b94afea4fc780d83294b4
268,913,338,386,527,000,000,000,000,000,000,000,000
27
Initialize the max upload file size when quotas are enabled Due to an unwanted check, files causing the quota to be exceeded were deleted after the upload, but not during the upload. The bug was introduced in 2009 in version 1.0.23 Spotted by @DroidTest, thanks!
GF_Err text_box_dump(GF_Box *a, FILE * trace) { GF_TextSampleEntryBox *p = (GF_TextSampleEntryBox *)a; gf_isom_box_dump_start(a, "TextSampleEntryBox", trace); gf_fprintf(trace, "dataReferenceIndex=\"%d\" displayFlags=\"%x\" textJustification=\"%d\" ", p->dataReferenceIndex, p->displayFlags, p->textJustific...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
62,659,379,957,560,530,000,000,000,000,000,000,000
18
fixed #2138
static void ndpi_search_tls_wrapper(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; #ifdef DEBUG_TLS printf("==>> %s() %u [len: %u][version: %u]\n", __FUNCTION__, flow->guessed_host_protocol_id, packet->payload_pack...
0
[ "CWE-190", "CWE-787" ]
nDPI
23594f036536468072198a57c59b6e9d63caf6ce
224,468,129,252,353,660,000,000,000,000,000,000,000
17
Fixed stack overflow caused by missing length check Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static inline size_t ctnetlink_timestamp_size(const struct nf_conn *ct) { #ifdef CONFIG_NF_CONNTRACK_TIMESTAMP if (!nf_ct_ext_exist(ct, NF_CT_EXT_TSTAMP)) return 0; return nla_total_size(0) + 2 * nla_total_size_64bit(sizeof(uint64_t)); #else return 0; #endif }
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
258,757,370,984,477,950,000,000,000,000,000,000,000
10
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
xmlCheckHTTPInput(xmlParserCtxtPtr ctxt, xmlParserInputPtr ret) { #ifdef LIBXML_HTTP_ENABLED if ((ret != NULL) && (ret->buf != NULL) && (ret->buf->readcallback == xmlIOHTTPRead) && (ret->buf->context != NULL)) { const char *encoding; const char *redir; const char *mime; ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
48,733,408,579,536,920,000,000,000,000,000,000,000
60
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.
wait_sigint_handler (sig) int sig; { SigHandler *sigint_handler; if (interrupt_immediately || (this_shell_builtin && this_shell_builtin == wait_builtin)) { last_command_exit_value = 128+SIGINT; restore_sigint_handler (); /* If we got a SIGINT while in `wait', and SIGINT is trapped,...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
330,457,770,867,089,840,000,000,000,000,000,000,000
51
bash-4.4-rc2 release
static void *slab_get_obj(struct kmem_cache *cachep, struct page *page) { void *objp; objp = index_to_obj(cachep, page, get_free_obj(page, page->active)); page->active++; #if DEBUG if (cachep->flags & SLAB_STORE_USER) set_store_user_dirty(cachep); #endif return objp; }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
101,976,041,588,571,870,000,000,000,000,000,000,000
14
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static int ns_resolv(struct server_data *server, struct request_data *req, gpointer request, gpointer name) { GList *list; int sk, err, type = 0; char *dot, *lookup = (char *) name; struct cache_entry *entry; entry = cache_check(request, &type, req->protocol); if (entry) { int ttl_left = 0; struct cache_...
0
[ "CWE-119" ]
connman
5c281d182ecdd0a424b64f7698f32467f8f67b71
250,718,450,213,403,400,000,000,000,000,000,000,000
122
dnsproxy: Fix crash on malformed DNS response If the response query string is malformed, we might access memory pass the end of "name" variable in parse_response().
page_was_cached (struct rw_file *rwf, uint64_t offset) { uint64_t page = offset / page_size; assert (page < rwf->cached_pages.len); return (rwf->cached_pages.ptr[page] & 1) != 0; }
0
[ "CWE-252" ]
libnbd
8d444b41d09a700c7ee6f9182a649f3f2d325abb
124,274,219,559,881,520,000,000,000,000,000,000,000
7
copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails nbdcopy has a nasty bug when performing multi-threaded copies using asynchronous nbd calls - it was blindly treating the completion of an asynchronous command as successful, rather than checking the *error parameter. This can result in the silent creation o...
static char * parameter_brace_remove_pattern (varname, value, ind, patstr, rtype, quoted, flags) char *varname, *value; int ind; char *patstr; int rtype, quoted, flags; { int vtype, patspec, starsub; char *temp1, *val, *pattern; SHELL_VAR *v; if (value == 0) return ((char *)NULL); th...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
28,642,380,534,682,770,000,000,000,000,000,000,000
74
Bash-4.4 patch 7
Utility::QueryParams Utility::parseParameters(absl::string_view data, size_t start, bool decode_params) { QueryParams params; while (start < data.size()) { size_t end = data.find('&', start); if (end == std::string::npos) { end = data.size(); } ab...
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
11,625,978,267,465,022,000,000,000,000,000,000,000
26
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
dwg_section_page_checksum (const uint32_t seed, Bit_Chain *restrict dat, uint32_t size) { uint32_t sum1 = seed & 0xffff; uint32_t sum2 = seed >> 0x10; unsigned char *data = &(dat->chain[dat->byte]); while (size) { uint32_t i; uint32_t chunksize = size < 0x15b0 ? size : 0x15b0; size -= chu...
0
[ "CWE-703", "CWE-835" ]
libredwg
c6f6668b82bfe595899cc820279ac37bb9ef16f5
294,103,580,507,567,880,000,000,000,000,000,000,000
21
cleanup tio.unknown not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common entity_data. Fixes GH #178 heap_overflow2
static SLJIT_INLINE void add_jump(struct sljit_compiler *compiler, jump_list **list, struct sljit_jump *jump) { jump_list *list_item = sljit_alloc_memory(compiler, sizeof(jump_list)); if (list_item) { list_item->next = *list; list_item->jump = jump; *list = list_item; } }
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
217,769,258,279,116,900,000,000,000,000,000,000,000
10
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
int mongo_env_read_socket( mongo *conn, void *buf, size_t len ) { char *cbuf = buf; while ( len ) { size_t sent = recv( conn->sock, cbuf, len, 0 ); if ( sent == 0 || sent == -1 ) { conn->err = MONGO_IO_ERROR; return MONGO_ERROR; } cbuf += sent; len...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
122,850,207,841,732,930,000,000,000,000,000,000,000
14
don't mix up int and size_t (first pass to fix that)
void addNodeAtPathHelper(ProjectionPathASTNode* root, const FieldPath& path, size_t componentIndex, std::unique_ptr<ASTNode> newChild) { invariant(root); invariant(path.getPathLength() > componentIndex); const auto nextComponent = pa...
0
[ "CWE-732" ]
mongo
cd583b6c4d8aa2364f255992708b9bb54e110cf4
305,464,945,129,831,700,000,000,000,000,000,000,000
34
SERVER-53929 Add stricter parser checks around positional projection
static void ntp_update_frequency(void) { u64 second_length = (u64)(tick_usec * NSEC_PER_USEC * USER_HZ) << TICK_LENGTH_SHIFT; second_length += (s64)ntp_tick_adj << TICK_LENGTH_SHIFT; second_length += (s64)time_freq << (TICK_LENGTH_SHIFT - SHIFT_NSEC); tick_length_base = second_length; tick_nsec = div_u64(sec...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
42,329,069,701,086,800,000,000,000,000,000,000,000
12
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static int vxlan_init(struct net_device *dev) { dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); if (!dev->tstats) return -ENOMEM; return 0; }
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
188,734,726,728,638,830,000,000,000,000,000,000,000
8
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
int kvm_read_guest_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, void *data, unsigned long len) { struct kvm_memslots *slots = kvm_memslots(kvm); int r; BUG_ON(len > ghc->len); if (slots->generation != ghc->generation) { if (__kvm_gfn_to_hva_cache_init(slots, ghc, ghc->gpa, ghc->len)) return -E...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
58,426,066,765,929,810,000,000,000,000,000,000,000
25
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
mark_source_chains(const struct xt_table_info *newinfo, unsigned int valid_hooks, void *entry0) { unsigned int hook; /* No recursion; use packet counter to save back ptrs (reset to 0 as we leave), and comefrom to save source hook bitmask */ for (hook = 0; hook < NF_INET_NUMHOOKS; hook++) { unsigned int p...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
50,462,651,616,262,245,000,000,000,000,000,000,000
108
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
g_load_library(char* in) { #if defined(_WIN32) return (long)LoadLibraryA(in); #else return (long)dlopen(in, RTLD_LOCAL | RTLD_LAZY); #endif }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
272,710,985,730,248,530,000,000,000,000,000,000,000
8
move temp files from /tmp to /tmp/.xrdp
int FS_PathCmp( const char *s1, const char *s2 ) { int c1, c2; do { c1 = *s1++; c2 = *s2++; if (c1 >= 'a' && c1 <= 'z') { c1 -= ('a' - 'A'); } if (c2 >= 'a' && c2 <= 'z') { c2 -= ('a' - 'A'); } if ( c1 == '\\' || c1 == ':' ) { c1 = '/'; } if ( c2 == '\\' || c2 == ':' ) { c2 = '/'; ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
200,767,016,665,823,500,000,000,000,000,000,000,000
31
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
xdr_shift_buf(struct xdr_buf *buf, size_t len) { xdr_shrink_bufhead(buf, buf->head->iov_len - len); }
0
[ "CWE-119", "CWE-787" ]
linux
6d1c0f3d28f98ea2736128ed3e46821496dc3a8c
148,464,752,273,083,200,000,000,000,000,000,000,000
4
sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() This seems to happen fairly easily during READ_PLUS testing on NFS v4.2. I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr greater than the number of pages in the array. So let's just return early if we're setting base to a poin...
Item_func_or_sum(THD *thd, Item *a, Item *b, Item *c, Item *d, Item *e): Item_result_field(thd), Item_args(thd, a, b, c, d, e) { }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
29,791,013,221,365,033,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
iasecc_get_algorithm(struct sc_context *ctx, const struct sc_security_env *env, unsigned operation, unsigned mechanism) { const struct sc_supported_algo_info *info = NULL; int ii; if (!env) return 0; for (ii=0;ii<SC_MAX_SUPPORTED_ALGORITHMS && env->supported_algos[ii].reference; ii++) ...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
260,260,752,170,339,000,000,000,000,000,000,000,000
25
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static redisReply *reconnectingRedisCommand(redisContext *c, const char *fmt, ...) { redisReply *reply = NULL; int tries = 0; va_list ap; assert(!c->err); while(reply == NULL) { while (c->err & (REDIS_ERR_IO | REDIS_ERR_EOF)) { printf("\r\x1b[0K"); /* Cursor to left edge + clear...
0
[ "CWE-119", "CWE-787" ]
redis
9fdcc15962f9ff4baebe6fdd947816f43f730d50
216,045,735,070,750,570,000,000,000,000,000,000,000
32
Security: fix redis-cli buffer overflow. Thanks to Fakhri Zulkifli for reporting it. The fix switched to dynamic allocation, copying the final prompt in the static buffer only at the end.
u32 gf_seng_get_stream_count(GF_SceneEngine *seng) { return gf_list_count(seng->ctx->streams); }
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
41,532,054,557,797,186,000,000,000,000,000,000,000
4
fixed #2138
static void *shmem_follow_link(struct dentry *dentry, struct nameidata *nd) { struct page *page = NULL; int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL); nd_set_link(nd, res ? ERR_PTR(res) : kmap(page)); return page; }
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
74,327,387,563,395,765,000,000,000,000,000,000,000
7
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
static int get_name(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) { struct sockaddr_tipc *addr = (struct sockaddr_tipc *)uaddr; struct tipc_sock *tsock = tipc_sk(sock->sk); memset(addr, 0, sizeof(*addr)); if (peer) { if ((sock->state != SS_CONNECTED) && ((peer != 2) || (sock->st...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
208,985,136,598,168,470,000,000,000,000,000,000,000
26
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
DEFUN (neighbor_update_source, neighbor_update_source_cmd, NEIGHBOR_CMD2 "update-source " BGP_UPDATE_SOURCE_STR, NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "Source of routing updates\n" BGP_UPDATE_SOURCE_HELP_STR) { return peer_update_source_vty (vty, argv[0], argv[1]); }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
291,025,888,297,956,830,000,000,000,000,000,000,000
10
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static int _extend_sdma_tx_descs(struct hfi1_devdata *dd, struct sdma_txreq *tx) { int i; /* Handle last descriptor */ if (unlikely((tx->num_desc == (MAX_DESC - 1)))) { /* if tlen is 0, it is for padding, release last descriptor */ if (!tx->tlen) { tx->desc_limit = MAX_DESC; } else if (!tx->coalesce_buf) {...
0
[ "CWE-400", "CWE-401" ]
linux
34b3be18a04ecdc610aae4c48e5d1b799d8689f6
315,583,617,646,969,200,000,000,000,000,000,000,000
40
RDMA/hfi1: Prevent memory leak in sdma_init In sdma_init if rhashtable_init fails the allocated memory for tmp_sdma_rht should be released. Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable") Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com Signed-off-by: ...
static ssize_t tun_chr_read_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *file = iocb->ki_filp; struct tun_file *tfile = file->private_data; struct tun_struct *tun = __tun_get(tfile); ssize_t len = iov_iter_count(to), ret; if (!tun) return -EBADFD; ret = tun_do_read(tun, tfile, to, file->f_flags...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
135,862,101,456,564,100,000,000,000,000,000,000,000
16
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static int __init mcheck_late_init(void) { if (mca_cfg.recovery) static_branch_inc(&mcsafe_key); mcheck_debugfs_init(); cec_init(); /* * Flush out everything that has been logged during early boot, now that * everything has been initialized (workqueues, decoders, ...). */ mce_schedule_work(); return 0;...
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
107,081,628,489,695,050,000,000,000,000,000,000,000
16
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
ax88179_get_eeprom(struct net_device *net, struct ethtool_eeprom *eeprom, u8 *data) { struct usbnet *dev = netdev_priv(net); u16 *eeprom_buff; int first_word, last_word; int i, ret; if (eeprom->len == 0) return -EINVAL; eeprom->magic = AX88179_EEPROM_MAGIC; first_word = eeprom->offset >> 1; last_word ...
0
[ "CWE-787" ]
linux
57bc3d3ae8c14df3ceb4e17d26ddf9eeab304581
334,108,726,750,512,980,000,000,000,000,000,000,000
35
net: usb: ax88179_178a: Fix out-of-bounds accesses in RX fixup ax88179_rx_fixup() contains several out-of-bounds accesses that can be triggered by a malicious (or defective) USB device, in particular: - The metadata array (hdr_off..hdr_off+2*pkt_cnt) can be out of bounds, causing OOB reads and (on big-endian syst...
static char *php_mime_get_hdr_value(zend_llist header, char *key) { mime_header_entry *entry; if (key == NULL) { return NULL; } entry = zend_llist_get_first(&header); while (entry) { if (!strcasecmp(entry->key, key)) { return entry->value; } entry = zend_llist_get_next(&header); } return NULL; }
0
[ "CWE-399" ]
php-src
4605d536d23b00813d11cc906bb48d39bdcf5f25
84,099,070,678,585,270,000,000,000,000,000,000,000
18
Fixed bug #69364 - use smart_str to assemble strings
void ring_buffer_set_time_stamp_abs(struct trace_buffer *buffer, bool abs) { buffer->time_stamp_abs = abs; }
0
[ "CWE-362" ]
linux
bbeb97464eefc65f506084fd9f18f21653e01137
230,547,836,811,135,050,000,000,000,000,000,000,000
4
tracing: Fix race in trace_open and buffer resize call Below race can come, if trace_open and resize of cpu buffer is running parallely on different cpus CPUX CPUY ring_buffer_resize atomic_read(&buffer->resize_disabled) tracing_open tracing_reset_online_cpus ring_buffer_...
static int fuse_setlk(struct file *file, struct file_lock *fl, int flock) { struct inode *inode = file->f_path.dentry->d_inode; struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_req *req; int opcode = (fl->fl_flags & FL_SLEEP) ? FUSE_SETLKW : FUSE_SETLK; pid_t pid = fl->fl_type != F_UNLCK ? current->tgid : ...
0
[]
linux-2.6
0bd87182d3ab18a32a8e9175d3f68754c58e3432
19,284,138,478,096,287,000,000,000,000,000,000,000
31
fuse: fix kunmap in fuse_ioctl_copy_user Looks like another victim of the confusing kmap() vs kmap_atomic() API differences. Reported-by: Todor Gyumyushev <yodor1@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Tejun Heo <tj@kernel.org> Cc: stable@kern...
static void macvlan_broadcast(struct sk_buff *skb, const struct macvlan_port *port, struct net_device *src, enum macvlan_mode mode) { const struct ethhdr *eth = eth_hdr(skb); const struct macvlan_dev *vlan; struct hlist_node *n; struct sk_buff *nskb; unsigned int i; int err; if (skb->...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
30,106,339,164,561,833,000,000,000,000,000,000,000
28
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
void t_cpp_generator::generate_service_interface(t_service* tservice, string style) { string service_if_name = service_name_ + style + "If"; if (style == "CobCl") { // Forward declare the client. string client_name = service_name_ + "CobClient"; if (gen_templates_) { client_name += "T"; ser...
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
265,155,226,863,843,250,000,000,000,000,000,000,000
49
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
check_global_and_subst(char_u *cmd, char_u *arg) { if (arg == cmd + 1 && vim_strchr((char_u *)":-.", *arg) != NULL) { semsg(_(e_separator_not_supported_str), arg); return FAIL; } if (VIM_ISWHITE(cmd[1])) { semsg(_(e_no_white_space_allowed_before_separator_str), cmd); return FAIL; } retur...
0
[ "CWE-703", "CWE-122" ]
vim
d1d8f6bacb489036d0fd479c9dd3c0102c988889
339,996,310,421,195,160,000,000,000,000,000,000,000
14
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.
void __exit hidp_cleanup_sockets(void) { bt_procfs_cleanup(&init_net, "hidp"); bt_sock_unregister(BTPROTO_HIDP); proto_unregister(&hidp_proto); }
0
[ "CWE-200", "CWE-77" ]
linux
a1616a5ac99ede5d605047a9012481ce7ff18b16
100,383,637,119,254,520,000,000,000,000,000,000,000
6
Bluetooth: hidp: fix buffer overflow Struct ca is copied from userspace. It is not checked whether the "name" field is NULL terminated, which allows local users to obtain potentially sensitive information from kernel stack memory, via a HIDPCONNADD command. This vulnerability is similar to CVE-2011-1079. Signed-off-...
set_string_default(char *name, char_u *val) { char_u *p; int opt_idx; p = vim_strsave(val); if (p != NULL) /* we don't want a NULL */ { opt_idx = findoption((char_u *)name); if (opt_idx >= 0) { if (options[opt_idx].flags & P_DEF_ALLOCED) vim_free(options[opt_idx].def_val[VI_DEFAULT]); ...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
43,304,819,997,249,400,000,000,000,000,000,000,000
18
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
static double mp_decrement(_cimg_math_parser& mp) { return _mp_arg(2) - 1;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
312,656,228,902,386,370,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
TEST_P(DnsImplAresFlagsForUdpTest, UdpLookupsEnabled) { server_->addCName("root.cnam.domain", "result.cname.domain"); server_->addHosts("result.cname.domain", {"201.134.56.7"}, RecordType::A); ares_options opts{}; int optmask = 0; EXPECT_EQ(ARES_SUCCESS, ares_save_options(peer_->channel(), &opts, &optmask)); ...
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
32,971,760,200,765,880,000,000,000,000,000,000,000
11
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
load_key_file_for_file (GdmSession *self, const char *file, char **full_path) { GKeyFile *key_file; GError *error; gboolean res; key_file = g_key_file_new (); error = NULL; res = g_key_file_load_from_di...
0
[]
gdm
5ac224602f1d603aac5eaa72e1760d3e33a26f0a
50,562,302,855,068,060,000,000,000,000,000,000,000
26
session: disconnect signals from worker proxy when conversation is freed We don't want an outstanding reference on the worker proxy to lead to signal handlers getting dispatched after the conversation is freed. https://bugzilla.gnome.org/show_bug.cgi?id=758032
static int nfs4_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *info) { int i, len, status = 0; rpc_authflavor_t flav_array[NFS_MAX_SECFLAVORS]; len = gss_mech_list_pseudoflavors(&flav_array[0]); flav_array[len] = RPC_AUTH_NULL; len += 1; for (i = 0; i < len; i++) { ...
0
[ "CWE-703", "CWE-189" ]
linux
20e0fa98b751facf9a1101edaefbc19c82616a68
275,096,015,882,449,760,000,000,000,000,000,000,000
27
Fix length of buffer copied in __nfs4_get_acl_uncached _copy_from_pages() used to copy data from the temporary buffer to the user passed buffer is passed the wrong size parameter when copying data. res.acl_len contains both the bitmap and acl lenghts while acl_len contains the acl length after adjusting for the bitmap...
void resumeListening() override { listener_->enable(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
102,657,377,207,216,630,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int handle_sal_call(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { struct exit_ctl_data *p; p = kvm_get_exit_data(vcpu); if (p->exit_reason == EXIT_REASON_SAL_CALL) { kvm_sal_emul(vcpu); return 1; } else { kvm_run->exit_reason = KVM_EXIT_UNKNOWN; kvm_run->hw.hardware_exit_reason = 3; return 0;...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
224,426,576,846,279,930,000,000,000,000,000,000,000
16
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 int __ref setup_cpu_cache(struct kmem_cache *cachep, gfp_t gfp) { if (slab_state >= FULL) return enable_cpucache(cachep, gfp); cachep->cpu_cache = alloc_kmem_cache_cpus(cachep, 1, 1); if (!cachep->cpu_cache) return 1; if (slab_state == DOWN) { /* Creation of first cache (kmem_cache). */ set_up_node...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
253,167,488,021,728,550,000,000,000,000,000,000,000
38
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static void test_stiny_bug() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[4]; short short_value; int32 long_value; ulong s_length, l_length, ll_length, t_length; ulonglong longlong_value; int rc; uchar tiny_value; char llbuf[22]; myheader("test_stiny_bug"); rc= mysql_...
0
[ "CWE-416" ]
server
eef21014898d61e77890359d6546d4985d829ef6
183,501,825,891,358,500,000,000,000,000,000,000,000
82
MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list mysql_prune_stmt_list() was walking the list following element->next pointers, but inside the loop it was invoking list_add(element) that modified element->next. So, mysql_prune_stmt_list() failed to visit and reset all elements, and some of them were left...
static int megasas_dcmd_ld_list_query(MegasasState *s, MegasasCmd *cmd) { uint16_t flags; struct mfi_ld_targetid_list info; size_t dcmd_size = sizeof(info), resid; uint32_t num_ld_disks = 0, max_ld_disks = s->fw_luns; BusChild *kid; /* mbox0 contains flags */ flags = le16_to_cpu(cmd->frame-...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
269,993,327,445,158,330,000,000,000,000,000,000,000
48
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
explicit StageOp(OpKernelConstruction* ctx) : OpKernel(ctx) {}
0
[ "CWE-20", "CWE-703" ]
tensorflow
cebe3c45d76357d201c65bdbbf0dbe6e8a63bbdb
252,537,901,938,276,060,000,000,000,000,000,000,000
1
Fix tf.raw_ops.StagePeek vulnerability with invalid `index`. Check that input is actually a scalar before treating it as such. PiperOrigin-RevId: 445524908
int ssl3_get_server_certificate(SSL *s) { int al,i,ok,ret= -1; unsigned long n,nc,llen,l; X509 *x=NULL; const unsigned char *q,*p; unsigned char *d; STACK_OF(X509) *sk=NULL; SESS_CERT *sc; EVP_PKEY *pkey=NULL; int need_cert = 1; /* VRS: 0=> will allow null cert if auth == KRB5 */ n=s->method->ssl_get_messag...
0
[ "CWE-326" ]
openssl
410a49a4fa1d2a1a9775ee29f9e40cbbda79c149
244,472,352,918,070,850,000,000,000,000,000,000,000
185
Fix for CVE-2014-0224 Only accept change cipher spec when it is expected instead of at any time. This prevents premature setting of session keys before the master secret is determined which an attacker could use as a MITM attack. Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue and providing the ...
void audit_log_secctx(struct audit_buffer *ab, u32 secid) { u32 len; char *secctx; if (security_secid_to_secctx(secid, &secctx, &len)) { audit_panic("Cannot convert secid to context"); } else { audit_log_format(ab, " obj=%s", secctx); security_release_secctx(secctx, len); } }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
95,166,532,879,020,830,000,000,000,000,000,000,000
12
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static boolean ReadIPTCProfile(j_decompress_ptr jpeg_info) { char magick[MaxTextExtent]; ErrorManager *error_manager; Image *image; MagickBooleanType status; register ssize_t i; register unsigned char *p; size_t length; StringInfo *iptc_profile, *profile; /*...
0
[ "CWE-416" ]
ImageMagick6
c1a5aa3f4214ad6e4748de84dad44398959014e1
181,434,586,909,330,200,000,000,000,000,000,000,000
123
https://github.com/ImageMagick/ImageMagick/issues/1641
int mnt_fs_get_passno(struct libmnt_fs *fs) { return fs ? fs->passno: 0; }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
143,590,092,679,179,490,000,000,000,000,000,000,000
4
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
xmlParseElementChildrenContentDeclPriv(xmlParserCtxtPtr ctxt, int inputchk, int depth) { xmlElementContentPtr ret = NULL, cur = NULL, last = NULL, op = NULL; const xmlChar *elem; xmlChar type = 0; if (((depth > 128) && ((ctxt->options & XML_PARSE_HUGE) == 0)) || ...
0
[ "CWE-776" ]
libxml2
8598060bacada41a0eb09d95c97744ff4e428f8e
286,798,715,462,245,600,000,000,000,000,000,000,000
271
Patch for security issue CVE-2021-3541 This is relapted to parameter entities expansion and following the line of the billion laugh attack. Somehow in that path the counting of parameters was missed and the normal algorithm based on entities "density" was useless.
static void udp_v4_unhash(struct sock *sk) { write_lock_bh(&udp_hash_lock); if (sk_del_node_init(sk)) { inet_sk(sk)->num = 0; sock_prot_dec_use(sk->sk_prot); } write_unlock_bh(&udp_hash_lock); }
0
[ "CWE-476" ]
linux-2.6
1e0c14f49d6b393179f423abbac47f85618d3d46
224,121,233,013,750,100,000,000,000,000,000,000,000
9
[UDP]: Fix MSG_PROBE crash UDP tracks corking status through the pending variable. The IP layer also tracks it through the socket write queue. It is possible for the two to get out of sync when MSG_PROBE is used. This patch changes UDP to check the write queue to ensure that the two stay in sync. Signed-off-by: He...
static struct hstate *kobj_to_hstate(struct kobject *kobj, int *nidp) { int i; for (i = 0; i < HUGE_MAX_HSTATE; i++) if (hstate_kobjs[i] == kobj) { if (nidp) *nidp = NUMA_NO_NODE; return &hstates[i]; } return kobj_to_node_hstate(kobj, nidp); }
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
318,230,608,238,848,130,000,000,000,000,000,000,000
13
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
read_layer_block (FILE *f, gint image_ID, guint total_len, PSPimage *ia) { gint i; long block_start, sub_block_start, channel_start; gint sub_id; guint32 sub_init_len, sub_total_len; gchar *name = NULL; guint16 namelen; guchar type, opacit...
0
[ "CWE-787" ]
gimp
48ec15890e1751dede061f6d1f469b6508c13439
208,822,599,491,710,230,000,000,000,000,000,000,000
321
file-psp: fix for bogus input data. Fixes bug #639203
static ssize_t proc_coredump_filter_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct task_struct *task = get_proc_task(file->f_dentry->d_inode); struct mm_struct *mm; char buffer[PROC_NUMBUF]; size_t len; int ret; if (!task) return -ESRCH; ret = 0; mm = get_task_mm(task);...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
222,612,050,583,178,200,000,000,000,000,000,000,000
26
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
int ssl3_get_req_cert_type(SSL *s, unsigned char *p) { int ret=0; unsigned long alg_k; alg_k = s->s3->tmp.new_cipher->algorithm_mkey; #ifndef OPENSSL_NO_GOST if (s->version >= TLS1_VERSION) { if (alg_k & SSL_kGOST) { p[ret++]=TLS_CT_GOST94_SIGN; p[ret++]=TLS_CT_GOST01_SIGN; return(ret); } } ...
0
[ "CWE-310" ]
openssl
ca989269a2876bae79393bd54c3e72d49975fc75
94,865,529,786,911,150,000,000,000,000,000,000,000
65
Use version in SSL_METHOD not SSL structure. When deciding whether to use TLS 1.2 PRF and record hash algorithms use the version number in the corresponding SSL_METHOD structure instead of the SSL structure. The SSL structure version is sometimes inaccurate. Note: OpenSSL 1.0.2 and later effectively do this already. (...
static int notesize(struct memelfnote *en) { int sz; sz = sizeof(struct elf_note); sz += roundup(strlen(en->name) + 1, 4); sz += roundup(en->datasz, 4); return sz; }
0
[ "CWE-284", "CWE-264" ]
linux
4e7c22d447bb6d7e37bfe39ff658486ae78e8d77
153,317,888,478,971,570,000,000,000,000,000,000,000
10
x86, mm/ASLR: Fix stack randomization on 64-bit systems The issue is that the stack for processes is not properly randomized on 64 bit architectures due to an integer overflow. The affected function is randomize_stack_top() in file "fs/binfmt_elf.c": static unsigned long randomize_stack_top(unsigned long stack_top...
static void nfs4_xdr_enc_symlink(struct rpc_rqst *req, struct xdr_stream *xdr, const void *data) { const struct nfs4_create_arg *args = data; nfs4_xdr_enc_create(req, xdr, args); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
137,641,244,723,763,040,000,000,000,000,000,000,000
7
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...