func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void php_cli_server_poller_add(php_cli_server_poller *poller, int mode, int fd) /* {{{ */ { if (mode & POLLIN) { PHP_SAFE_FD_SET(fd, &poller->rfds); } if (mode & POLLOUT) { PHP_SAFE_FD_SET(fd, &poller->wfds); } if (fd > poller->max_fd) { poller->max_fd = fd; } } /* }}} */
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
307,911,713,657,875,800,000,000,000,000,000,000,000
12
slim post data
codegen(codegen_scope *s, node *tree, int val) { int nt; int rlev = s->rlev; if (!tree) { if (val) { genop_1(s, OP_LOADNIL, cursp()); push(); } return; } s->rlev++; if (s->rlev > MRB_CODEGEN_LEVEL_MAX) { codegen_error(s, "too complex expression"); } if (s->irep && s->filena...
0
[ "CWE-125" ]
mruby
f72315575f78a9a773adbce0ee7d3ec33434cb76
331,098,739,854,123,960,000,000,000,000,000,000,000
1,537
codegen.c: fix a argument generation bug in array assignment.
static inline int shmem_find_swp(swp_entry_t entry, swp_entry_t *dir, swp_entry_t *edir) { swp_entry_t *ptr; for (ptr = dir; ptr < edir; ptr++) { if (ptr->val == entry.val) return ptr - dir; } return -1; }
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
286,180,273,349,392,100,000,000,000,000,000,000,000
10
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 btrfs_finish_sprout(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info) { struct btrfs_root *root = fs_info->chunk_root; struct btrfs_path *path; struct extent_buffer *leaf; struct btrfs_dev_item *dev_item; struct btrfs_device *device; struct btrfs_key key; u8 fs_uuid[BTRFS_FSID...
1
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
117,580,612,497,972,860,000,000,000,000,000,000,000
71
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
static void set_cpu_sd_state_busy(int cpu) { struct sched_domain *sd; rcu_read_lock(); sd = rcu_dereference(per_cpu(sd_llc, cpu)); if (!sd || !sd->nohz_idle) goto unlock; sd->nohz_idle = 0; atomic_inc(&sd->shared->nr_busy_cpus); unlock: rcu_read_unlock(); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
260,549,846,324,786,120,000,000,000,000,000,000,000
15
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static void generate_json_array(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj) { char *array_nl = state->array_nl; long array_nl_len = state->array_nl_len; char *indent = state->indent; long indent_len = state->indent_len; long max_nesting = state->max_nesting; char *deli...
0
[ "CWE-119", "CWE-787" ]
json
8f782fd8e181d9cfe9387ded43a5ca9692266b85
122,463,654,482,166,080,000,000,000,000,000,000,000
37
Fix arbitrary heap exposure problem
update_encoding_table(table, interp, error_mode) VALUE table; VALUE interp; VALUE error_mode; { struct tcltkip *ptr; int retry = 0; int i, objc; Tcl_Obj **objv; Tcl_Obj *enc_list; volatile VALUE encname = Qnil; /* interpreter check */ if (NIL_P(interp)) return 0; ptr = get_ip(interp); ...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
30,294,021,012,344,750,000,000,000,000,000,000,000
44
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
xsltCompilerBuildInScopeNsList(xsltCompilerCtxtPtr cctxt, xmlNodePtr node) { xsltNsListContainerPtr nsi = NULL; xmlNsPtr *list = NULL, ns; int i, maxns = 5; /* * Create a new ns-list for this position in the node-tree. * xmlGetNsList() will return NULL, if there are no ns-decls in the * tree...
0
[]
libxslt
7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
56,242,570,196,625,990,000,000,000,000,000,000,000
108
Crash compiling stylesheet with DTD * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation process could get seriously wrong
bool ldb_dn_is_valid(struct ldb_dn *dn) { if ( ! dn) return false; return ! dn->invalid; }
0
[ "CWE-200" ]
samba
7f51ec8c4ed9ba1f53d722e44fb6fb3cde933b72
121,497,493,887,871,330,000,000,000,000,000,000,000
5
CVE-2015-5330: ldb_dn: simplify and fix ldb_dn_escape_internal() Previously we relied on NUL terminated strings and jumped back and forth between copying escaped bytes and memcpy()ing un-escaped chunks. This simple version is easier to reason about and works with unterminated strings. It may also be faster as it avoid...
getWrongSecret(const std::string& secret_name) { envoy::extensions::transport_sockets::tls::v3::Secret secret; secret.set_name(secret_name); secret.mutable_tls_certificate(); return secret; }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
256,467,755,359,529,400,000,000,000,000,000,000,000
6
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
int ssl_parse_clienthello_use_srtp_ext(SSL *s, unsigned char *d, int len,int *al) { SRTP_PROTECTION_PROFILE *cprof,*sprof; STACK_OF(SRTP_PROTECTION_PROFILE) *clnt=0,*srvr; int ct; int mki_len; int i,j; int id; int ret; /* Length value + the MKI length */ if(len < 3) { ...
1
[ "CWE-20" ]
openssl
2b0532f3984324ebe1236a63d15893792384328d
289,058,969,956,311,800,000,000,000,000,000,000,000
99
Fix for SRTP Memory Leak CVE-2014-3513 This issue was reported to OpenSSL on 26th September 2014, based on an origi issue and patch developed by the LibreSSL project. Further analysis of the i was performed by the OpenSSL team. The fix was developed by the OpenSSL team. Reviewed-by: Tim Hudson <tjh@openssl.org>
fp_set_per_packet_inf_from_conv(umts_fp_conversation_info_t *p_conv_data, tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_) { fp_info *fpi; guint8 tfi, c_t; int offset = 0, i=0, j=0, num_tbs, chan, tb_size, tb_bit_off; gboo...
1
[ "CWE-20" ]
wireshark
7d7190695ce2ff269fdffb04e87139995cde21f4
317,987,666,851,063,480,000,000,000,000,000,000,000
344
UMTS_FP: fix handling reserved C/T value The spec puts the reserved value at 0xf but our internal table has 'unknown' at 0; since all the other values seem to be offset-by-one, just take the modulus 0xf to avoid running off the end of the table. Bug: 12191 Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0 Reviewed...
static int bond_xmit_roundrobin(struct sk_buff *skb, struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); struct slave *slave, *start_at; int i, slave_no, res = 1; struct iphdr *iph = ip_hdr(skb); /* * Start with the curr_active_slave that joined the bond as the * default for sending I...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
274,761,003,891,495,950,000,000,000,000,000,000,000
56
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 nfs_access_add_cache(struct inode *inode, struct nfs_access_entry *set) { struct nfs_access_entry *cache = kmalloc(sizeof(*cache), GFP_KERNEL); if (cache == NULL) return; RB_CLEAR_NODE(&cache->rb_node); cache->jiffies = set->jiffies; cache->cred = get_rpccred(set->cred); cache->mask = set->mask; nfs_acce...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
115,355,617,402,210,190,000,000,000,000,000,000,000
24
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
TEST_P(DownstreamProtocolIntegrationTest, PathWithFragmentRejectedByDefault) { initialize(); codec_client_ = makeHttpConnection(makeClientConnection((lookupPort("http")))); Http::TestRequestHeaderMapImpl request_headers{{":method", "GET"}, {":path", "/some/path#fr...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
28,146,565,899,230,820,000,000,000,000,000,000,000
13
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
int _xml_externalEntityRefHandler(XML_Parser parserPtr, const XML_Char *openEntityNames, const XML_Char *base, const XML_Char *systemId, const XML_Char *publicId) { xml_parser *parser = XML_GetUserData(parserPtr); int ret = 0; /* abort if no handler is set (should be config...
0
[ "CWE-190" ]
php-src
57b997ebf99e0eb9a073e0dafd2ab100bd4a112d
328,394,631,970,089,100,000,000,000,000,000,000,000
27
Fix bug #71637: Multiple Heap Overflow due to integer overflows
static double mp_set_Ixyz_s(_cimg_math_parser& mp) { CImg<T> &img = mp.imgout; const int x = (int)_mp_arg(2), y = (int)_mp_arg(3), z = (int)_mp_arg(4); const T val = (T)_mp_arg(1); if (x>=0 && x<img.width() && y>=0 && y<img.height() && z>=0 && z<img.d...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
200,300,356,311,595,550,000,000,000,000,000,000,000
14
Fix other issues in 'CImg<T>::load_bmp()'.
check_auth(Key *key, const unsigned char *data, int data_len, const unsigned char *auth, int auth_len, int trunc_len) { unsigned char buf[MAX_HASH_LENGTH]; int hash_len; hash_len = generate_auth(key, data, data_len, buf, sizeof (buf)); return MIN(hash_len, trunc_len) == auth_len && !memcmp(buf, aut...
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
304,596,840,762,079,220,000,000,000,000,000,000,000
10
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha256(void) { return ((OPENSSL_ia32cap_P[1] & AESNI_CAPABLE) && aesni_cbc_sha256_enc(NULL, NULL, 0, NULL, NULL, NULL, NULL) ? &aesni_128_cbc_hmac_sha256_cipher : NULL); }
0
[ "CWE-310" ]
openssl
68595c0c2886e7942a14f98c17a55a88afb6c292
228,792,871,909,507,100,000,000,000,000,000,000,000
6
Check that we have enough padding characters. Reviewed-by: Emilia Käsper <emilia@openssl.org> CVE-2016-2107 MR: #2572
ssize_t tpm_store_cancel(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { struct tpm_chip *chip = dev_get_drvdata(dev); if (chip == NULL) return 0; chip->vendor.cancel(chip); return count; }
0
[ "CWE-200" ]
linux
1309d7afbed112f0e8e90be9af975550caa0076b
17,925,377,932,251,578,000,000,000,000,000,000,000
10
char/tpm: Fix unitialized usage of data buffer This patch fixes information leakage to the userspace by initializing the data buffer to zero. Reported-by: Peter Huewe <huewe.external@infineon.com> Signed-off-by: Peter Huewe <huewe.external@infineon.com> Signed-off-by: Marcel Selhorst <m.selhorst@sirrix.com> [ Also re...
bool TagComparison(const MatchExpression* lhs, const MatchExpression* rhs) { IndexTag* lhsTag = static_cast<IndexTag*>(lhs->getTag()); size_t lhsValue = (NULL == lhsTag) ? IndexTag::kNoIndex : lhsTag->index; size_t lhsPos = (NULL == lhsTag) ? IndexTag::kNoIndex : lhsTag->pos; IndexTag* rhsTag = static_...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
305,385,084,990,957,800,000,000,000,000,000,000,000
43
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
static void SchroFrameFree( SchroFrame *frame, void *priv) { struct picture_free_t *p_free = priv; if( !p_free ) return; picture_Release( p_free->p_pic ); free(p_free); (void)frame; }
0
[ "CWE-120", "CWE-787" ]
vlc
9bb0353a5c63a7f8c6fc853faa3df4b4df1f5eb5
199,098,259,472,616,000,000,000,000,000,000,000,000
11
codec: schroedinger: fix potential buffer overflow. The variable len is a raw 32 bit value read using GetDWBE. If this value is larger than UINT32_MAX - sizeof(eos), this will cause an integer overflow in the subsequent call to malloc, and finally a buffer overflow when calling memcpy. We fix this by checking len acco...
static struct idr *cma_select_inet_ps(struct rdma_id_private *id_priv) { switch (id_priv->id.ps) { case RDMA_PS_TCP: return &tcp_ps; case RDMA_PS_UDP: return &udp_ps; case RDMA_PS_IPOIB: return &ipoib_ps; case RDMA_PS_IB: return &ib_ps; default: return NULL; } }
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
96,192,490,596,717,580,000,000,000,000,000,000,000
15
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
static inline ut64 r_read_ble(const void *src, bool big_endian, int size) { switch (size) { case 8: return (ut64) ((ut8*)src)[0]; case 16: return r_read_ble16 (src, big_endian); case 32: return r_read_ble32 (src, big_endian); case 64: return r_read_ble64 (src, big_endian); default: return UT64_MAX; } }
0
[ "CWE-476" ]
radare2
1ea23bd6040441a21fbcfba69dce9a01af03f989
281,423,278,251,488,460,000,000,000,000,000,000,000
14
Fix #6816 - null deref in r_read_*
Item_cache_year(THD *thd, const Type_handler *handler) :Item_cache_int(thd, handler) { }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
43,523,302,529,979,350,000,000,000,000,000,000,000
2
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 ...
group_smaller_max_cpu_capacity(struct sched_group *sg, struct sched_group *ref) { return sg->sgc->max_capacity * capacity_margin < ref->sgc->max_capacity * 1024; }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
226,546,717,464,359,170,000,000,000,000,000,000,000
5
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
int security_msg_queue_associate(struct msg_queue *msq, int msqflg) { return security_ops->msg_queue_associate(msq, msqflg); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
218,540,763,536,707,780,000,000,000,000,000,000,000
4
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...
void AbstractSqlStorage::addConnectionToPool() { QMutexLocker locker(&_connectionPoolMutex); // we have to recheck if the connection pool already contains a connection for // this thread. Since now (after the lock) we can only tell for sure if (_connectionPool.contains(QThread::currentThread())) ...
1
[ "CWE-89" ]
quassel
6605882f41331c80f7ac3a6992650a702ec71283
304,316,327,252,123,900,000,000,000,000,000,000,000
44
Execute initDbSession() on DB reconnects Previously, the initDbSession() function would only be run on the initial connect. Since the initDbSession() code in PostgreSQL is used to fix the CVE-2013-4422 SQL Injection bug, this means that Quassel was still vulnerable to that CVE if the PostgreSQL server is restarted or...
static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb, bool vectored, bool compat) { struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs; struct iov_iter iter; struct file *file; ssize_t ret; ret = aio_prep_rw(req, iocb); if (ret) return ret; file = req->ki_filp; ret = -EBADF; if ...
1
[ "CWE-416" ]
linux
84c4e1f89fefe70554da0ab33be72c9be7994379
156,495,146,006,126,290,000,000,000,000,000,000,000
45
aio: simplify - and fix - fget/fput for io_submit() Al Viro root-caused a race where the IOCB_CMD_POLL handling of fget/fput() could cause us to access the file pointer after it had already been freed: "In more details - normally IOCB_CMD_POLL handling looks so: 1) io_submit(2) allocates aio_kiocb instance and p...
bool isConstantExpr(ESTree::Node *node) { // TODO: a little more agressive constant folding. switch (node->getKind()) { case ESTree::NodeKind::StringLiteral: case ESTree::NodeKind::NumericLiteral: case ESTree::NodeKind::NullLiteral: case ESTree::NodeKind::BooleanLiteral: return true; defau...
0
[ "CWE-125", "CWE-787" ]
hermes
091835377369c8fd5917d9b87acffa721ad2a168
276,859,210,488,001,970,000,000,000,000,000,000,000
12
Correctly restore whether or not a function is an inner generator Summary: If a generator was large enough to be lazily compiled, we would lose that information when reconstituting the function's context. This meant the function was generated as a regular function instead of a generator. #utd-hermes-ignore-android R...
int mp_montgomery_reduce(fp_int *a, fp_int *m, fp_digit mp) { return fp_montgomery_reduce(a, m, mp); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
135,431,627,981,867,400,000,000,000,000,000,000,000
4
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
QUInt16() : value(0) {}
0
[ "CWE-908", "CWE-787" ]
tensorflow
ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2
225,717,480,531,643,730,000,000,000,000,000,000,000
1
Default initialize fixed point Eigen types. In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN. PiperOrigin-RevId: 344101137 Change-Id: I14555fd...
BSONObj expectedOptimized() { return BSON("$const" << false); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
325,069,436,987,304,620,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
sraRgnPrint(const sraRegion *rgn) { sraSpanListPrint((sraSpanList*)rgn); }
0
[ "CWE-476" ]
libvncserver
38e98ee61d74f5f5ab4aa4c77146faad1962d6d0
21,117,080,539,201,443,000,000,000,000,000,000,000
3
libvncserver: add missing NULL pointer checks
static zend_class_entry *row_get_ce(const zval *object TSRMLS_DC) { return pdo_row_ce;
0
[ "CWE-476" ]
php-src
6045de69c7dedcba3eadf7c4bba424b19c81d00d
122,746,406,847,608,430,000,000,000,000,000,000,000
4
Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle Proper soltion would be to call serialize/unserialize and deal with the result, but this requires more work that should be done by wddx maintainer (not me).
check_stale_routes(struct multi_context *m) { struct gc_arena gc = gc_new(); struct hash_iterator hi; struct hash_element *he; dmsg(D_MULTI_DEBUG, "MULTI: Checking stale routes"); hash_iterator_init_range(m->vhash, &hi, 0, hash_n_buckets(m->vhash)); while ((he = hash_iterator_next(&hi)) != NUL...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
8,654,278,847,742,967,000,000,000,000,000,000,000
24
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
static void event_nick_invalid(IRC_SERVER_REC *server, const char *data) { if (!server->connected) /* we used to call server_disconnect but that crashes irssi because of undefined memory access. instead, indicate that the connection should be dropped and let the irc method to the clean-up. */ server...
0
[ "CWE-476" ]
irssi
6c6c42e3d1b49d90aacc0b67f8540471cae02a1d
81,793,761,848,467,320,000,000,000,000,000,000,000
9
Merge branch 'security' into 'master' See merge request !7
static void fill_exports_list(struct MACH0_(obj_t) *bin, const char *name, ut64 flags, ut64 offset, void *ctx) { RList *list = (RList*) ctx; RBinSymbol *sym = R_NEW0 (RBinSymbol); if (!sym) { return; } sym->vaddr = offset_to_vaddr (bin, offset); sym->paddr = offset; sym->type = "EXT"; sym->name = strdup (name...
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
2,930,326,191,919,252,000,000,000,000,000,000,000
13
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
generic_make_request_checks(struct bio *bio) { struct request_queue *q; int nr_sectors = bio_sectors(bio); blk_status_t status = BLK_STS_IOERR; char b[BDEVNAME_SIZE]; might_sleep(); q = bio->bi_disk->queue; if (unlikely(!q)) { printk(KERN_ERR "generic_make_request: Trying to access " "nonexistent...
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
46,077,774,128,925,060,000,000,000,000,000,000,000
105
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
static inline FDrive *drv0(FDCtrl *fdctrl) { return &fdctrl->drives[(fdctrl->tdr & FD_TDR_BOOTSEL) >> 2]; }
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
323,623,408,659,054,350,000,000,000,000,000,000,000
4
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
static void save_cur(struct vc_data *vc) { vc->vc_saved_x = vc->vc_x; vc->vc_saved_y = vc->vc_y; vc->vc_s_intensity = vc->vc_intensity; vc->vc_s_italic = vc->vc_italic; vc->vc_s_underline = vc->vc_underline; vc->vc_s_blink = vc->vc_blink; vc->vc_s_reverse = vc->vc_reverse; vc->vc_s_charset = vc->vc_c...
0
[ "CWE-416", "CWE-362" ]
linux
ca4463bf8438b403596edd0ec961ca0d4fbe0220
61,814,332,898,215,430,000,000,000,000,000,000,000
14
vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console The VT_DISALLOCATE ioctl can free a virtual console while tty_release() is still running, causing a use-after-free in con_shutdown(). This occurs because VT_DISALLOCATE considers a virtual console's 'struct vc_data' to be unused as soon as the correspond...
find_ident_at_pos( win_T *wp, linenr_T lnum, colnr_T startcol, char_u **text, int *textcol, // column where "text" starts, can be NULL int find_type) { char_u *ptr; int col = 0; // init to shut up GCC int i; int this_class = 0; int prev_class; int prevcol; int ...
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
7,219,366,809,805,758,000,000,000,000,000,000,000
154
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
void HttpIo::HttpImpl::writeRemote(const byte* data, size_t size, long from, long to) { std::string scriptPath(getEnv(envHTTPPOST)); if (scriptPath == "") { throw Error(1, "Please set the path of the server script to handle http post data to EXIV2_HTTP_POST environmental variable.");...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
196,444,938,886,761,500,000,000,000,000,000,000,000
51
Fix https://github.com/Exiv2/exiv2/issues/55
static void xennet_end_access(int ref, void *page) { /* This frees the page as a side-effect */ if (ref != INVALID_GRANT_REF) gnttab_end_foreign_access(ref, virt_to_page(page)); }
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
51,347,402,410,778,945,000,000,000,000,000,000,000
6
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
get_cmdline_ipaddr(char * arg, uint8_t * buf) { uint32_t ip1, ip2, ip3, ip4; if (sscanf(arg, "%" PRIu32 ".%" PRIu32 ".%" PRIu32 ".%" PRIu32, &ip1, &ip2, &ip3, &ip4) != 4) { lprintf(LOG_ERR, "Invalid IP address: %s", arg); return (-1); } if (ip1 > UINT8_MAX || ip2 > UINT8_MAX || ip3 > UINT8_MAX || ip4...
0
[ "CWE-120" ]
ipmitool
d45572d71e70840e0d4c50bf48218492b79c1a10
199,873,101,170,765,480,000,000,000,000,000,000,000
20
lanp: Fix buffer overflows in get_lan_param_select Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `get_lan_param_select` function is missing a validation check on the response’s `data_len`, which it then returns to caller functions, where stack buff...
static int propfind_calurl(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr resp __attribute__((unused)), struct propstat propstat[], xmlNodePtr expand, const char *cal) { xmlNodePtr node; if (!(namespace_calendar.enabled && fctx->req_tgt->user)) return HTT...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
188,973,666,322,940,900,000,000,000,000,000,000,000
37
HTTP: don't overrun buffer when parsing strings with sscanf()
void hllRawRegHisto(uint8_t *registers, int* reghisto) { uint64_t *word = (uint64_t*) registers; uint8_t *bytes; int j; for (j = 0; j < HLL_REGISTERS/8; j++) { if (*word == 0) { reghisto[0] += 8; } else { bytes = (uint8_t*) word; reghisto[bytes[0]]++;...
0
[ "CWE-787" ]
redis
e216ceaf0e099536fe3658a29dcb725d812364e0
104,057,711,529,949,460,000,000,000,000,000,000,000
22
HyperLogLog: handle wrong offset in the base case.
static void pair_int(const char *key, int val, int mode, bool last) { pair (key, sdb_fmt ("%d", val), mode, last); }
0
[ "CWE-78" ]
radare2
5411543a310a470b1257fb93273cdd6e8dfcb3af
247,026,628,210,088,300,000,000,000,000,000,000,000
3
More fixes for the CVE-2019-14745
ofputil_decode_packet_out(struct ofputil_packet_out *po, const struct ofp_header *oh, const struct tun_table *tun_table, struct ofpbuf *ofpacts) { struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length)); enum ofpraw raw = of...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
56,661,116,488,112,260,000,000,000,000,000,000,000
90
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static int xenvif_check_gop(struct xenvif *vif, int nr_meta_slots, struct netrx_pending_operations *npo) { struct gnttab_copy *copy_op; int status = XEN_NETIF_RSP_OKAY; int i; for (i = 0; i < nr_meta_slots; i++) { copy_op = npo->copy + npo->copy_cons++; if (copy_op->status != GNTST_okay) { netdev...
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
336,503,587,853,585,500,000,000,000,000,000,000,000
19
xen-netback: disable rogue vif in kthread context When netback discovers frontend is sending malformed packet it will disables the interface which serves that frontend. However disabling a network interface involving taking a mutex which cannot be done in softirq context, so we need to defer this process to kthread c...
void HTTPSession::setMaxConcurrentIncomingStreams(uint32_t num) { CHECK(!started_); if (codec_->supportsParallelRequests()) { maxConcurrentIncomingStreams_ = num; HTTPSettings* settings = codec_->getEgressSettings(); if (settings) { settings->setSetting(SettingsId::MAX_CONCURRENT_STREAMS, ...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
87,739,276,711,341,320,000,000,000,000,000,000,000
11
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
int mem_cgroup_select_victim_node(struct mem_cgroup *memcg) { int node; mem_cgroup_may_update_nodemask(memcg); node = memcg->last_scanned_node; node = next_node(node, memcg->scan_nodes); if (node == MAX_NUMNODES) node = first_node(memcg->scan_nodes); /* * We call this when we hit limit, not when pages are a...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
26,228,179,739,724,945,000,000,000,000,000,000,000
22
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(...
gettime1900d(void) { struct timeval tv; gettimeofday(&tv, NULL); /* never fails */ G.cur_time = tv.tv_sec + (1.0e-6 * tv.tv_usec) + OFFSET_1900_1970; return G.cur_time; }
0
[ "CWE-399" ]
busybox
150dc7a2b483b8338a3e185c478b4b23ee884e71
211,628,142,700,914,680,000,000,000,000,000,000,000
7
ntpd: respond only to client and symmetric active packets The busybox NTP implementation doesn't check the NTP mode of packets received on the server port and responds to any packet with the right size. This includes responses from another NTP server. An attacker can send a packet with a spoofed source address in orde...
EXPORTED void comma_list_hdr(const char *hdr, const char *vals[], unsigned flags, ...) { const char *sep = " "; va_list args; int i; va_start(args, flags); prot_printf(httpd_out, "%s:", hdr); for (i = 0; vals[i]; i++) { if (flags & (1 << i)) { prot_puts(httpd_out, sep); prot_vprintf(...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
29,642,456,095,903,550,000,000,000,000,000,000,000
22
HTTP: don't overrun buffer when parsing strings with sscanf()
void Http2Session::AltSvc(const FunctionCallbackInfo<Value>& args) { Environment* env = Environment::GetCurrent(args); Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); int32_t id = args[0]->Int32Value(env->context()).ToChecked(); // origin and value are both required to be ASCII, han...
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
152,938,692,148,796,770,000,000,000,000,000,000,000
29
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
void msix_load(PCIDevice *dev, QEMUFile *f) { unsigned n = dev->msix_entries_nr; unsigned int vector; if (!msix_present(dev)) { return; } msix_clear_all_vectors(dev); qemu_get_buffer(f, dev->msix_table, n * PCI_MSIX_ENTRY_SIZE); qemu_get_buffer(f, dev->msix_pba, (n + 7) / 8); m...
0
[]
qemu
43b11a91dd861a946b231b89b7542856ade23d1b
214,131,914,890,392,500,000,000,000,000,000,000,000
18
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...
ok_jpg ok_jpg_read_with_allocator(FILE *file, ok_jpg_decode_flags decode_flags, ok_jpg_allocator allocator, void *allocator_user_data) { ok_jpg jpg = { 0 }; if (file) { ok_jpg_decode(&jpg, decode_flags, OK_JPG_FILE_INPUT, file, allocator, allocator_user_data); } els...
0
[ "CWE-787" ]
ok-file-formats
a9cc1711dd4ed6a215038f1c5c03af0ef52c3211
119,704,069,654,066,120,000,000,000,000,000,000,000
10
ok_jpg: Fix invalid DHT (#11)
bool DNP3_Base::ParseAppLayer(Endpoint* endp) { bool orig = (endp == &orig_state); binpac::DNP3::DNP3_Flow* flow = orig ? interp->upflow() : interp->downflow(); u_char* data = endp->buffer + PSEUDO_TRANSPORT_INDEX; // The transport layer byte counts as app-layer it seems. int len = endp->pkt_length - 5; // DNP3...
0
[ "CWE-119", "CWE-787" ]
bro
6cedd67c381ff22fde653adf02ee31caf66c81a0
129,697,268,439,925,360,000,000,000,000,000,000,000
63
DNP3: fix reachable assertion and buffer over-read/overflow. A DNP3 packet using a link layer header that specifies a zero length can trigger an assertion failure if assertions are enabled. Assertions are enabled unless Bro is compiled with the NDEBUG preprocessor macro defined. The default configuration of Bro will...
static int php_date_period_initialize_from_hash(php_period_obj *period_obj, HashTable *myht TSRMLS_DC) { zval **ht_entry; /* this function does no rollback on error */ if (zend_hash_find(myht, "start", sizeof("start"), (void**) &ht_entry) == SUCCESS) { if (Z_TYPE_PP(ht_entry) == IS_OBJECT && Z_OBJCE_PP(ht_entry...
0
[]
php-src
7b1898183032eeabc64a086ff040af991cebcd93
92,243,560,619,188,400,000,000,000,000,000,000,000
72
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) Conflicts: ext/date/php_date.c
CImg<T>& operator<<=(const char *const expression) { return *this<<=(+*this)._fill(expression,true,1,0,0,"operator<<=",this); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
116,059,951,852,860,800,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
T& _atXY(const int x, const int y, const int z=0, const int c=0) { return (*this)(cimg::cut(x,0,width() - 1), cimg::cut(y,0,height() - 1),z,c); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
59,620,305,613,535,380,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
bool dispatch_command(enum enum_server_command command, THD *thd, char* packet, uint packet_length, bool is_com_multi, bool is_next_command) { NET *net= &thd->net; bool error= 0; bool do_end_of_statement= true; DBUG_ENTER("dispatch_command"); DBUG_PRINT("info", ("command: %d %s",...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
241,428,891,825,828,450,000,000,000,000,000,000,000
953
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 int ext4_run_li_request(struct ext4_li_request *elr) { struct ext4_group_desc *gdp = NULL; ext4_group_t group, ngroups; struct super_block *sb; unsigned long timeout = 0; int ret = 0; sb = elr->lr_super; ngroups = EXT4_SB(sb)->s_groups_count; for (group = elr->lr_next_group; group < ngroups; group++) {...
0
[ "CWE-703" ]
linux
0449641130f5652b344ef6fa39fa019d7e94660a
291,350,119,799,036,750,000,000,000,000,000,000,000
43
ext4: init timer earlier to avoid a kernel panic in __save_error_info During mount, when we fail to open journal inode or root inode, the __save_error_info will mod_timer. But actually s_err_report isn't initialized yet and the kernel oops. The detailed information can be found https://bugzilla.kernel.org/show_bug.cgi...
static void esp_input_restore_header(struct sk_buff *skb) { esp_restore_header(skb, 0); __skb_pull(skb, 4); }
0
[ "CWE-787" ]
linux
ebe48d368e97d007bfeb76fcb065d6cfc4c96645
324,290,077,799,948,540,000,000,000,000,000,000,000
5
esp: Fix possible buffer overflow in ESP transformation The maximum message size that can be send is bigger than the maximum site that skb_page_frag_refill can allocate. So it is possible to write beyond the allocated buffer. Fix this by doing a fallback to COW in that case. v2: Avoid get get_order() costs as sugg...
static void InsertSampler(FlowSource_t *fs, exporter_ipfix_domain_t *exporter, int32_t id, uint16_t mode, uint32_t interval) { generic_sampler_t *sampler; dbg_printf("[%u] Insert Sampler: Exporter is 0x%llu\n", exporter->info.id, (long long unsigned)exporter); if ( !exporter->sampler ) { // no samplers so far s...
0
[ "CWE-190" ]
nfdump
3b006ededaf351f1723aea6c727c9edd1b1fff9b
230,080,670,708,916,100,000,000,000,000,000,000,000
83
Fix potential unsigned integer underflow
void add_disk_randomness(struct gendisk *disk) { if (!disk || !disk->random) return; /* first major is 1, so we get >= 0x200 here */ DEBUG_ENT("disk event %d:%d\n", MAJOR(disk_devt(disk)), MINOR(disk_devt(disk))); add_timer_randomness(disk->random, 0x100 + disk_devt(disk)); }
0
[ "CWE-310" ]
linux-2.6
8a0a9bd4db63bc45e3017bedeafbd88d0eb84d02
53,822,123,564,992,030,000,000,000,000,000,000,000
10
random: make get_random_int() more random It's a really simple patch that basically just open-codes the current "secure_ip_id()" call, but when open-coding it we now use a _static_ hashing area, so that it gets updated every time. And to make sure somebody can't just start from the same original seed of all-zeroes, a...
Ruleset_Obj Parser::parse_ruleset(Lookahead lookahead) { NESTING_GUARD(nestings); // inherit is_root from parent block Block_Obj parent = block_stack.back(); bool is_root = parent && parent->is_root(); // make sure to move up the the last position lex < optional_css_whitespace >(false, true)...
0
[ "CWE-125" ]
libsass
eb15533b07773c30dc03c9d742865604f47120ef
169,644,417,385,540,300,000,000,000,000,000,000,000
29
Fix memory leak in `parse_ie_keyword_arg` `kwd_arg` would never get freed when there was a parse error in `parse_ie_keyword_arg`. Closes #2656
rb_enc_str_new(const char *ptr, long len, rb_encoding *enc) { VALUE str = rb_str_new(ptr, len); rb_enc_associate(str, enc); return str; }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
185,434,205,723,129,700,000,000,000,000,000,000,000
6
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void get_timewait6_sock(struct seq_file *seq, struct inet_timewait_sock *tw, int i) { const struct in6_addr *dest, *src; __u16 destp, srcp; s32 delta = tw->tw_ttd - inet_tw_time_stamp(); dest = &tw->tw_v6_daddr; src = &tw->tw_v6_rcv_saddr; destp = ntohs(tw->tw_dport); srcp = ntohs(tw->tw_spor...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
235,816,782,614,995,100,000,000,000,000,000,000,000
24
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...
xmlTextReaderDepth(xmlTextReaderPtr reader) { if (reader == NULL) return(-1); if (reader->node == NULL) return(0); if (reader->curnode != NULL) { if ((reader->curnode->type == XML_ATTRIBUTE_NODE) || (reader->curnode->type == XML_NAMESPACE_DECL)) return(reader->depth + 1); return(reader->depth...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
221,161,814,921,916,070,000,000,000,000,000,000,000
14
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
GF_Box *stsg_New() { ISOM_DECL_BOX_ALLOC(GF_SubTrackSampleGroupBox, GF_ISOM_BOX_TYPE_STSG); return (GF_Box *)tmp; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
159,380,754,359,077,000,000,000,000,000,000,000,000
5
fixed 2 possible heap overflows (inc. #1088)
inline int Offset(const RuntimeShape& shape, int* index) { return Offset(shape, index[0], index[1], index[2], index[3]); }
0
[ "CWE-125", "CWE-787" ]
tensorflow
8ee24e7949a203d234489f9da2c5bf45a7d5157d
144,307,630,417,954,560,000,000,000,000,000,000,000
3
[tflite] Ensure `MatchingDim` does not allow buffer overflow. We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ...
bool DaemonServer::ms_handle_reset(Connection *con) { if (con->get_peer_type() == CEPH_ENTITY_TYPE_OSD) { MgrSessionRef session(static_cast<MgrSession*>(con->get_priv())); if (!session) { return false; } session->put(); // SessionRef takes a ref Mutex::Locker l(lock); dout(10) << "unregi...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
5,638,608,238,610,203,000,000,000,000,000,000,000
20
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
Field::pack(uchar *to, const uchar *from, uint max_length) { uint32 length= pack_length(); set_if_smaller(length, max_length); memcpy(to, from, length); return to+length; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
261,387,418,939,669,280,000,000,000,000,000,000,000
7
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 inline void skb_reset_tail_pointer(struct sk_buff *skb) { skb->tail = skb->data - skb->head;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
230,962,869,001,864,580,000,000,000,000,000,000,000
4
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...
otp_init(krb5_context context, krb5_kdcpreauth_moddata *moddata_out, const char **realmnames) { krb5_error_code retval; otp_state *state; retval = otp_state_new(context, &state); if (retval) return retval; *moddata_out = (krb5_kdcpreauth_moddata)state; return 0; }
0
[ "CWE-284", "CWE-264" ]
krb5
e3b5a5e5267818c97750b266df50b6a3d4649604
225,227,664,233,663,530,000,000,000,000,000,000,000
12
Prevent requires_preauth bypass [CVE-2015-2694] In the OTP kdcpreauth module, don't set the TKT_FLG_PRE_AUTH bit until the request is successfully verified. In the PKINIT kdcpreauth module, don't respond with code 0 on empty input or an unconfigured realm. Together these bugs could cause the KDC preauth framework to...
asmlinkage long sys_mkdirat(int dfd, const char __user *pathname, int mode) { int error = 0; char * tmp; struct dentry *dentry; struct nameidata nd; tmp = getname(pathname); error = PTR_ERR(tmp); if (IS_ERR(tmp)) goto out_err; error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd); if (error) goto out; de...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
102,796,622,629,321,340,000,000,000,000,000,000,000
37
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
void HTTPSession::dumpConnectionState(uint8_t /*loglevel*/) {}
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
176,810,305,363,297,440,000,000,000,000,000,000,000
1
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
int prepare_bitmap_git(void) { if (bitmap_git.loaded) return 0; if (!open_pack_bitmap()) return load_pack_bitmap(); return -1; }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
288,909,109,154,043,480,000,000,000,000,000,000,000
10
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
static void sasl_step_fail(IRC_SERVER_REC *server) { irc_send_cmd_now(server, "AUTHENTICATE *"); cap_finish_negotiation(server); server->sasl_timeout = 0; signal_emit("server sasl failure", 2, server, "The server sent an invalid payload"); }
1
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
334,102,178,284,941,130,000,000,000,000,000,000,000
9
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg) { struct socket *sock; struct sock *sk; void __user *argp = (void __user *)arg; int pid, err; struct net *net; sock = file->private_data; sk = sock->sk; net = sock_net(sk); if (unlikely(cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE +...
0
[ "CWE-362" ]
linux
6d8c50dcb029872b298eea68cc6209c866fd3e14
214,528,454,859,738,830,000,000,000,000,000,000,000
87
socket: close race condition between sock_close() and sockfs_setattr() fchownat() doesn't even hold refcnt of fd until it figures out fd is really needed (otherwise is ignored) and releases it after it resolves the path. This means sock_close() could race with sockfs_setattr(), which leads to a NULL pointer dereferenc...
static void SFDParseChainContext(FILE *sfd,SplineFont *sf,FPST *fpst, char *tok, int old) { int ch, i, j, k, temp; SplineFont *sli_sf = sf->cidmaster ? sf->cidmaster : sf; fpst->type = strnmatch(tok,"ContextPos",10)==0 ? pst_contextpos : strnmatch(tok,"ContextSub",10)==0 ? pst_contextsub : strnmatch(to...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
63,811,479,089,551,960,000,000,000,000,000,000,000
155
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
pdf_t *pdf_new(const char *name) { const char *n; pdf_t *pdf; pdf = calloc(1, sizeof(pdf_t)); if (name) { /* Just get the file name (not path) */ if ((n = strrchr(name, '/'))) ++n; else n = name; pdf->name = malloc(strlen(n) + 1); ...
1
[ "CWE-787" ]
pdfresurrect
0c4120fffa3dffe97b95c486a120eded82afe8a6
27,117,883,447,734,003,000,000,000,000,000,000,000
26
Zero and sanity check all dynamic allocs. This addresses the memory issues in Issue #6 expressed in calloc_some.pdf and malloc_some.pdf
int Field_decimal::store(const char *from_arg, uint len, CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; char buff[STRING_BUFFER_USUAL_SIZE]; String tmp(buff,sizeof(buff), &my_charset_bin); const uchar *from= (uchar*) from_arg; /* Convert character set if the old one is multi uchar */ if (c...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
290,252,969,895,879,800,000,000,000,000,000,000,000
363
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static struct stub_device *stub_device_alloc(struct usb_device *udev) { struct stub_device *sdev; int busnum = udev->bus->busnum; int devnum = udev->devnum; dev_dbg(&udev->dev, "allocating stub device"); /* yes, it's a new device */ sdev = kzalloc(sizeof(struct stub_device), GFP_KERNEL); if (!sdev) return NU...
0
[ "CWE-362" ]
linux
22076557b07c12086eeb16b8ce2b0b735f7a27e7
23,602,817,954,217,810,000,000,000,000,000,000,000
46
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors usbip_host updates device status without holding lock from stub probe, disconnect and rebind code paths. When multiple requests to import a device are received, these unprotected code paths step all over each other and drive fails with NULL-ptr deref and ...
EntryStackItem(PerIsolateThreadData* previous_thread_data, Isolate* previous_isolate, EntryStackItem* previous_item) : entry_count(1), previous_thread_data(previous_thread_data), previous_isolate(previous_isolate), previous_item(previous_it...
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
99,744,469,079,229,400,000,000,000,000,000,000,000
7
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
unsigned long lh_ptr_hash(const void *k) { /* CAW: refactored to be 64bit nice */ return (unsigned long)((((ptrdiff_t)k * LH_PRIME) >> 4) & ULONG_MAX); }
0
[ "CWE-119", "CWE-310" ]
json-c
64e36901a0614bf64a19bc3396469c66dcd0b015
194,411,917,259,590,380,000,000,000,000,000,000,000
5
Patch to address the following issues: * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
static int xfrm6_tunnel_rcv(struct sk_buff *skb) { struct ipv6hdr *iph = ipv6_hdr(skb); __be32 spi; spi = xfrm6_tunnel_spi_lookup((xfrm_address_t *)&iph->saddr); return xfrm6_rcv_spi(skb, spi) > 0 ? : 0; }
0
[ "CWE-399" ]
linux
d0772b70faaf8e9f2013b6c4273d94d5eac8047a
256,030,766,738,267,800,000,000,000,000,000,000,000
8
[IPV6]: Fix slab corruption running ip6sic From: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
compileError(const FileInfo *file, const char *format, ...) { #ifndef __SYMBIAN32__ char buffer[MAXSTRING]; va_list arguments; va_start(arguments, format); vsnprintf(buffer, sizeof(buffer), format, arguments); va_end(arguments); if (file) _lou_logMessage(LOU_LOG_ERROR, "%s:%d: error: %s", file->fileName, fi...
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
150,935,545,963,113,260,000,000,000,000,000,000,000
15
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
ssize_t splice_from_pipe(struct pipe_inode_info *pipe, struct file *out, loff_t *ppos, size_t len, unsigned int flags, splice_actor *actor) { ssize_t ret; struct splice_desc sd = { .total_len = len, .flags = flags, .pos = *ppos, .u.file = out, }; pipe_lock(pipe); ret = __splice_from_pipe(pipe, &sd...
0
[ "CWE-284", "CWE-264" ]
linux
8d0207652cbe27d1f962050737848e5ad4671958
23,204,216,810,035,340,000,000,000,000,000,000,000
18
->splice_write() via ->write_iter() iter_file_splice_write() - a ->splice_write() instance that gathers the pipe buffers, builds a bio_vec-based iov_iter covering those and feeds it to ->write_iter(). A bunch of simple cases coverted to that... [AV: fixed the braino spotted by Cyrill] Signed-off-by: Al Viro <viro@z...
absl::optional<Http::Protocol> protocol() const override { return protocol_; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
61,076,362,347,850,440,000,000,000,000,000,000,000
1
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static bool update_buffer_size(THD *thd, KEY_CACHE *key_cache, ptrdiff_t offset, ulonglong new_value) { bool error= false; DBUG_ASSERT(offset == offsetof(KEY_CACHE, param_buff_size)); if (new_value == 0) { if (key_cache == dflt_key_cache) { my_error(ER_WARN_CANT_DRO...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
332,345,241,071,315,200,000,000,000,000,000,000,000
51
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static void sctp_mark_missing(struct sctp_outq *q, struct list_head *transmitted_queue, struct sctp_transport *transport, __u32 highest_new_tsn_in_sack, int count_of_newacks) { struct sctp_chunk *chunk; __u32 tsn; char do_fast_retransmit = 0; struct sctp_association *asoc = q->as...
0
[]
linux
196d67593439b03088913227093e374235596e33
105,612,466,115,933,650,000,000,000,000,000,000,000
65
sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call The current SCTP stack is lacking a mechanism to have per association statistics. This is an implementation modeled after OpenSolaris' SCTP_GET_ASSOC_STATS. Userspace part will follow on lksctp if/when there is a general ACK on this. ...
rsvg_new_node_component_transfer_function (char channel) { RsvgNodeComponentTransferFunc *filter; filter = g_new (RsvgNodeComponentTransferFunc, 1); _rsvg_node_init (&filter->super); filter->super.free = rsvg_component_transfer_function_free; filter->super.set_atts = rsvg_node_component_transfer_fu...
1
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
332,419,879,957,569,970,000,000,000,000,000,000,000
12
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
next_entry_size (GstQTDemux * demux) { QtDemuxStream *stream; int i; int smallidx = -1; guint64 smalloffs = (guint64) - 1; QtDemuxSample *sample; GST_LOG_OBJECT (demux, "Finding entry at offset %" G_GUINT64_FORMAT, demux->offset); for (i = 0; i < demux->n_streams; i++) { stream = demux->stream...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
333,702,580,064,624,940,000,000,000,000,000,000,000
63
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
rl_function_of_keyseq (keyseq, map, type) const char *keyseq; Keymap map; int *type; { register int i; if (map == 0) map = _rl_keymap; for (i = 0; keyseq && keyseq[i]; i++) { unsigned char ic = keyseq[i]; if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii) { if (map[ES...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
119,975,408,976,335,640,000,000,000,000,000,000,000
61
bash-4.4-rc2 release
sudoers_policy_close(int exit_status, int error_code) { debug_decl(sudoers_policy_close, SUDOERS_DEBUG_PLUGIN); if (session_opened) { /* Close the session we opened in sudoers_policy_init_session(). */ (void)sudo_auth_end_session(runas_pw); /* We do not currently log the exit status. */ if (error_code) { ...
0
[ "CWE-193" ]
sudo
c4d384082fdbc8406cf19e08d05db4cded920a55
28,203,823,356,080,140,000,000,000,000,000,000,000
47
Add sudoedit flag checks in plugin that are consistent with front-end. Don't assume the sudo front-end is sending reasonable mode flags. These checks need to be kept consistent between the sudo front-end and the sudoers plugin.
void _addReplySdsToList(client *c, sds s) { robj *tail; if (c->flags & CLIENT_CLOSE_AFTER_REPLY) { sdsfree(s); return; } if (listLength(c->reply) == 0) { listAddNodeTail(c->reply,createObject(OBJ_STRING,s)); c->reply_bytes += sdsZmallocSize(s); } else { tail...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
321,297,794,550,210,250,000,000,000,000,000,000,000
30
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
static RList *classes(RBinFile *arch) { RBinDexObj *bin; if (!arch || !arch->o || !arch->o->bin_obj) { return NULL; } bin = (RBinDexObj*) arch->o->bin_obj; if (!bin->classes_list) { dex_loadcode (arch, bin); } return bin->classes_list; }
0
[ "CWE-125" ]
radare2
ead645853a63bf83d8386702cad0cf23b31d7eeb
71,937,694,474,909,060,000,000,000,000,000,000,000
11
fix #6857
int sc_asn1_decode_bit_string_ni(const u8 * inbuf, size_t inlen, void *outbuf, size_t outlen) { return decode_bit_string(inbuf, inlen, outbuf, outlen, 0); }
0
[ "CWE-119", "CWE-787" ]
OpenSC
412a6142c27a5973c61ba540e33cdc22d5608e68
55,505,788,805,388,670,000,000,000,000,000,000,000
5
fixed out of bounds access of ASN.1 Bitstring Credit to OSS-Fuzz