func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
\param axis Appending axis. Can be <tt>{ 'x' | 'y' | 'z' | 'c' }</tt>. \param align Appending alignment. **/ CImg<T> get_append(const char axis, const float align=0) const { if (is_empty()) return CImg<T>(); if (_width==1) return +((*this)[0]); unsigned int dx = 0, dy = 0, dz = 0...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
75,641,309,490,766,430,000,000,000,000,000,000,000
117
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
TfLiteRegistration* Register_BATCH_MATMUL_GENERIC_OPTIMIZED() { static TfLiteRegistration r = { batch_matmul::Init, batch_matmul::Free, batch_matmul::Prepare, batch_matmul::Eval<batch_matmul::kGenericOptimized>}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
284,347,338,798,808,000,000,000,000,000,000,000,000
6
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
static int aes_cfb1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len) { EVP_AES_KEY *dat = EVP_C_DATA(EVP_AES_KEY,ctx); if (EVP_CIPHER_CTX_test_flags(ctx, EVP_CIPH_FLAG_LENGTH_BITS)) { int num = EVP_CIPHER_CTX_num(ctx); CRYPTO_cfb128...
0
[ "CWE-125" ]
openssl
2198b3a55de681e1f3c23edb0586afe13f438051
22,896,709,629,241,080,000,000,000,000,000,000,000
32
crypto/evp: harden AEAD ciphers. Originally a crash in 32-bit build was reported CHACHA20-POLY1305 cipher. The crash is triggered by truncated packet and is result of excessive hashing to the edge of accessible memory. Since hash operation is read-only it is not considered to be exploitable beyond a DoS condition. Oth...
static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) { /* calling function is a known function? */ if (ci != NULL && !(ci->callstatus & CIST_TAIL)) return funcnamefromcall(L, ci->previous, name); else return NULL; /* no way to find a name */ }
0
[ "CWE-787" ]
lua
42d40581dd919fb134c07027ca1ce0844c670daf
202,574,689,496,352,200,000,000,000,000,000,000,000
6
Save stack space while handling errors Because error handling (luaG_errormsg) uses slots from EXTRA_STACK, and some errors can recur (e.g., string overflow while creating an error message in 'luaG_runerror', or a C-stack overflow before calling the message handler), the code should use stack slots with parsimony. Thi...
int streamAppendItem(stream *s, robj **argv, int64_t numfields, streamID *added_id, streamID *use_id, int seq_given) { /* Generate the new entry ID. */ streamID id; if (use_id) { if (seq_given) { id = *use_id; } else { /* The automatically generated sequence can be e...
0
[ "CWE-703", "CWE-401" ]
redis
4a7a4e42db8ff757cdf3f4a824f66426036034ef
90,723,480,110,485,450,000,000,000,000,000,000,000
240
Fix memory leak in streamGetEdgeID (#10753) si is initialized by streamIteratorStart(), we should call streamIteratorStop() on it when done. regression introduced in #9127 (redis 7.0)
static Sdb *store_versioninfo(ELFOBJ *bin) { Sdb *sdb_versioninfo = NULL; int num_verdef = 0; int num_verneed = 0; int num_versym = 0; int i; if (!bin || !bin->shdr) { return NULL; } if (!(sdb_versioninfo = sdb_new0 ())) { return NULL; } for (i = 0; i < bin->ehdr.e_shnum; i++) { Sdb *sdb = NULL; cha...
0
[ "CWE-125" ]
radare2
c6d0076c924891ad9948a62d89d0bcdaf965f0cd
218,803,691,205,865,430,000,000,000,000,000,000,000
48
Fix #8731 - Crash in ELF parser with negative 32bit number
void hci_conn_hash_flush(struct hci_dev *hdev) { struct hci_conn_hash *h = &hdev->conn_hash; struct hci_conn *c, *n; BT_DBG("hdev %s", hdev->name); list_for_each_entry_safe(c, n, &h->list, list) { c->state = BT_CLOSED; hci_disconn_cfm(c, HCI_ERROR_LOCAL_HOST_TERM); hci_conn_del(c); } }
0
[ "CWE-327" ]
linux
d5bb334a8e171b262e48f378bd2096c0ea458265
279,009,359,810,393,700,000,000,000,000,000,000,000
14
Bluetooth: Align minimum encryption key size for LE and BR/EDR connections The minimum encryption key size for LE connections is 56 bits and to align LE with BR/EDR, enforce 56 bits of minimum encryption key size for BR/EDR connections as well. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan...
static void sess_free_vps(UNUSED void *parent, void *data_ptr, UNUSED CRYPTO_EX_DATA *ad, UNUSED int idx, UNUSED long argl, UNUSED void *argp) { VALUE_PAIR *vp = data_ptr; if (!vp) return; DEBUG2(LOG_PREFIX ": Freeing cached session VPs"); pairfree(&vp); }
0
[ "CWE-295" ]
freeradius-server
874b39451702338389260edbfc52b381b20352ec
268,241,404,229,478,130,000,000,000,000,000,000,000
11
Set X509_V_FLAG_CRL_CHECK_ALL
static enum audit_state audit_filter_syscall(struct task_struct *tsk, struct audit_context *ctx, struct list_head *list) { struct audit_entry *e; enum audit_state state; if (audit_pid && tsk->tgid == audit_pid) return AUDIT_DISABLED; rcu_read_lock(); if (!list_empty(list)) { list_for_each...
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
272,084,018,141,685,500,000,000,000,000,000,000,000
25
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
static long sock_do_ioctl(struct net *net, struct socket *sock, unsigned int cmd, unsigned long arg) { int err; void __user *argp = (void __user *)arg; err = sock->ops->ioctl(sock, cmd, arg); /* * If this ioctl is unknown try to hand it down * to the NIC driver. */ if (err == -ENOIOCTLCMD) err = dev...
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
265,787,180,170,189,760,000,000,000,000,000,000,000
17
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
write_int (unsigned char * data, int offset, int value) { data [offset] = value >> 24 ; data [offset + 1] = value >> 16 ; data [offset + 2] = value >> 8 ; data [offset + 3] = value ; } /* write_int */
0
[ "CWE-119", "CWE-787" ]
libsndfile
dbe14f00030af5d3577f4cabbf9861db59e9c378
325,067,787,169,448,860,000,000,000,000,000,000,000
6
src/sd2.c : Fix two potential buffer read overflows. Closes: https://github.com/erikd/libsndfile/issues/93
TfLiteStatus AverageEval(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLitePoolParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); TfLiteTensor* output; TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output)); const TfLiteTenso...
1
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
307,937,839,865,885,500,000,000,000,000,000,000,000
31
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
static void print_word(FILE *file, struct diff_words_buffer *buffer, int len, int color, int suppress_newline) { const char *ptr; int eol = 0; if (len == 0) return; ptr = buffer->text.ptr + buffer->current; buffer->current += len; if (ptr[len - 1] == '\n') { eol = 1; len--; } fputs(diff_get_color(1...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
227,792,277,765,098,750,000,000,000,000,000,000,000
28
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
static apr_status_t transit(h2_stream *stream, int new_state) { if (new_state == stream->state) { return APR_SUCCESS; } else if (new_state < 0) { ap_log_cerror(APLOG_MARK, APLOG_WARNING, 0, stream->session->c, H2_STRM_LOG(APLOGNO(03081), stream, "invalid transition"));...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
158,452,661,274,333,620,000,000,000,000,000,000,000
44
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
static int xenvif_set_skb_gso(struct xenvif *vif, struct sk_buff *skb, struct xen_netif_extra_info *gso) { if (!gso->u.gso.size) { netdev_err(vif->dev, "GSO size must not be zero.\n"); xenvif_fatal_tx_err(vif); return -EINVAL; } switch (gso->u.gso.type) { case XEN_NETIF_GSO_TYPE_TCPV4: sk...
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
12,742,932,247,525,566,000,000,000,000,000,000,000
28
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...
static int ssl_write_server_hello( mbedtls_ssl_context *ssl ) { #if defined(MBEDTLS_HAVE_TIME) mbedtls_time_t t; #endif int ret; size_t olen, ext_len = 0, n; unsigned char *buf, *p; MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> write server hello" ) ); #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) if( ssl->con...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
232,036,964,331,418,500,000,000,000,000,000,000,000
230
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
void ConnectionManagerImpl::ActiveStream::onIdleTimeout() { connection_manager_.stats_.named_.downstream_rq_idle_timeout_.inc(); // See below for more information on this early return block. if (Runtime::runtimeFeatureEnabled( "envoy.reloadable_features.override_request_timeout_by_gateway_timeout")) { ...
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
268,306,701,776,776,040,000,000,000,000,000,000,000
35
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>
envoy::config::core::v3::TrafficDirection PerListenerFactoryContextImpl::direction() const { return listener_factory_context_base_->direction(); };
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
63,931,420,875,660,010,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
check_entry_size_and_hooks(struct ipt_entry *e, struct xt_table_info *newinfo, const unsigned char *base, const unsigned char *limit, const unsigned int *hook_entries, const unsigned int *underflows, unsigned int valid_hooks) { unsigned int h; int err; if ((unsigned long)e % __al...
0
[ "CWE-119", "CWE-787" ]
linux
54d83fc74aa9ec72794373cb47432c5f7fb1a309
334,183,747,514,143,400,000,000,000,000,000,000,000
51
netfilter: x_tables: fix unconditional helper Ben Hawkes says: In the mark_source_chains function (net/ipv4/netfilter/ip_tables.c) it is possible for a user-supplied ipt_entry structure to have a large next_offset field. This field is not bounds checked prior to writing a counter value at the supplied offset. Pr...
exif_mnote_data_canon_load (ExifMnoteData *ne, const unsigned char *buf, unsigned int buf_size) { ExifMnoteDataCanon *n = (ExifMnoteDataCanon *) ne; ExifShort c; size_t i, tcount, o, datao; long failsafe_size = 0; if (!n || !buf || !buf_size) { exif_log (ne->log, EXIF_LOG_CODE_CORRUPT_DATA, "ExifMnoteCano...
0
[ "CWE-400", "CWE-703", "CWE-770" ]
libexif
e6a38a1a23ba94d139b1fa2cd4519fdcfe3c9bab
215,870,267,647,801,100,000,000,000,000,000,000,000
121
Add a failsafe on the maximum number of Canon MakerNote subtags. A malicious file could be crafted to cause extremely large values in some tags without tripping any buffer range checks. This is bad with the libexif representation of Canon MakerNotes because some arrays are turned into individual tags that the applica...
BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert) { int i, j; BIO *out = NULL, *btmp = NULL, *etmp = NULL, *bio = NULL; X509_ALGOR *xa; ASN1_OCTET_STRING *data_body = NULL; const EVP_MD *evp_md; const EVP_CIPHER *evp_cipher = NULL; EVP_CIPHER_CTX *evp_ctx = NULL; ...
1
[ "CWE-703" ]
openssl
59302b600e8d5b77ef144e447bb046fd7ab72686
56,579,458,144,976,805,000,000,000,000,000,000,000
217
PKCS#7: Fix NULL dereference with missing EncryptedContent. CVE-2015-1790 Reviewed-by: Rich Salz <rsalz@openssl.org>
apr_byte_t oidc_util_regexp_substitute(apr_pool_t *pool, const char *input, const char *regexp, const char *replace, char **output, char **error_str) { const char *errorptr = NULL; int erroffset; char *substituted = NULL; apr_byte_t rc = FALSE; pcre *preg = pcre_compile(regexp, 0, &errorptr, &erroffset, NULL...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
154,437,130,687,577,030,000,000,000,000,000,000,000
44
Add a function to escape Javascript characters
static int accel_fp_mul2add(int idx1, int idx2, mp_int* kA, mp_int* kB, ecc_point *R, mp_int* a, mp_int* modulus, mp_digit mp) { #define KB_SIZE 128 #ifdef WOLFSSL_SMALL_STACK unsigned char* kb[2] = {NULL, NULL}; #else unsigned c...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
254,082,180,448,838,060,000,000,000,000,000,000,000
314
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.
static inline int security_vm_enough_memory(long pages) { WARN_ON(current->mm == NULL); return cap_vm_enough_memory(current->mm, pages); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
106,866,888,776,894,600,000,000,000,000,000,000,000
5
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...
_fr_window_notify_creation_complete (FrWindow *window) { char *basename; char *message; NotifyNotification *notification; gboolean notification_supports_actions; GList *caps; NotifyData *notify_data; basename = _g_file_get_display_basename (window->pri...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
96,962,590,825,546,360,000,000,000,000,000,000,000
46
libarchive: sanitize filenames before extracting
gen_assignment(codegen_scope *s, node *tree, node *rhs, int sp, int val) { int idx; int type = nint(tree->car); switch (type) { case NODE_GVAR: case NODE_ARG: case NODE_LVAR: case NODE_IVAR: case NODE_CVAR: case NODE_CONST: case NODE_NIL: case NODE_MASGN: if (rhs) { codegen(s, rhs, VAL)...
1
[ "CWE-125" ]
mruby
f72315575f78a9a773adbce0ee7d3ec33434cb76
258,543,986,172,995,800,000,000,000,000,000,000,000
174
codegen.c: fix a argument generation bug in array assignment.
static inline bool __ipv6_addr_needs_scope_id(int type) { return type & IPV6_ADDR_LINKLOCAL || (type & IPV6_ADDR_MULTICAST && (type & (IPV6_ADDR_LOOPBACK|IPV6_ADDR_LINKLOCAL))); }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
234,277,336,028,117,860,000,000,000,000,000,000,000
6
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
static av_cold int smka_decode_init(AVCodecContext *avctx) { if (avctx->channels < 1 || avctx->channels > 2) { av_log(avctx, AV_LOG_ERROR, "invalid number of channels\n"); return AVERROR_INVALIDDATA; } avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO; ...
0
[ "CWE-119", "CWE-787" ]
libav
cd4663dc80323ba64989d0c103d51ad3ee0e9c2f
251,438,000,704,590,900,000,000,000,000,000,000,000
11
smacker: add sanity check for length in smacker_decode_tree() Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Bug-Id: 1098 Cc: libav-stable@libav.org Signed-off-by: Sean McGovern <gseanmcg@gmail.com>
static struct page *alloc_page_interleave(gfp_t gfp, unsigned order, unsigned nid) { struct zonelist *zl; struct page *page; zl = node_zonelist(nid, gfp); page = __alloc_pages(gfp, order, zl); if (page && page_zone(page) == zonelist_zone(&zl->_zonerefs[0])) inc_zone_page_state(page, NUMA_INTERLEAVE_HIT); ...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
313,387,998,017,438,630,000,000,000,000,000,000,000
12
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(...
asym_active_balance(struct lb_env *env) { /* * ASYM_PACKING needs to force migrate tasks from busy but * lower priority CPUs in order to pack all tasks in the * highest priority CPUs. */ return env->idle != CPU_NOT_IDLE && (env->sd->flags & SD_ASYM_PACKING) && sched_asym_prefer(env->dst_cpu, env->src_...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
258,240,000,122,444,000,000,000,000,000,000,000,000
10
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
static void jpc_picomp_destroy(jpc_picomp_t *picomp) { int rlvlno; jpc_pirlvl_t *pirlvl; if (picomp->pirlvls) { for (rlvlno = 0, pirlvl = picomp->pirlvls; rlvlno < picomp->numrlvls; ++rlvlno, ++pirlvl) { pirlvl_destroy(pirlvl); } jas_free(picomp->pirlvls); } }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
85,830,772,558,964,360,000,000,000,000,000,000,000
12
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
MockWriteFilter::MockWriteFilter() { EXPECT_CALL(*this, initializeWriteFilterCallbacks(_)) .WillOnce(Invoke( [this](WriteFilterCallbacks& callbacks) -> void { write_callbacks_ = &callbacks; })); }
0
[ "CWE-835" ]
envoy
c8de199e2971f79cbcbc6b5eadc8c566b28705d1
251,726,116,021,422,800,000,000,000,000,000,000,000
5
listener: clean up accept filter before creating connection (#8922) Signed-off-by: Yuchen Dai <silentdai@gmail.com>
Value ExpressionFilter::serialize(bool explain) const { return Value( DOC("$filter" << DOC("input" << _input->serialize(explain) << "as" << _varName << "cond" << _filter->serialize(explain)))); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
10,850,442,882,382,030,000,000,000,000,000,000,000
5
SERVER-38070 fix infinite loop in agg expression
xps_endpath(gx_device_vector *vdev, gx_path_type_t type) { gx_device_xps *xps = (gx_device_xps *)vdev; char line[200]; const char *fmt; /* skip non-drawing paths for now */ if (!drawing_path(type, xps->filltype)) { if_debug1m('_', xps->memory, "xps_endpath: type not supported %x\n", type); ...
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
40,784,097,876,240,672,000,000,000,000,000,000,000
28
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static const char *parse_authority(struct parse_state *state) { const char *tmp = state->ptr, *host = NULL; do { switch (*state->ptr) { case '@': /* userinfo delimiter */ if (host) { TSRMLS_FETCH_FROM_CTX(state->ts); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Failed to parse userinfo; unexp...
0
[ "CWE-119" ]
ext-http
3724cd76a28be1d6049b5537232e97ac567ae1f5
288,579,477,059,267,230,000,000,000,000,000,000,000
37
fix bug #71719 (Buffer overflow in HTTP url parsing functions) The parser's offset was not reset when we softfail in scheme parsing and continue to parse a path. Thanks to hlt99 at blinkenshell dot org for the report.
static struct kvm_memslots *kvm_dup_memslots(struct kvm_memslots *old, enum kvm_mr_change change) { struct kvm_memslots *slots; size_t old_size, new_size; old_size = sizeof(struct kvm_memslots) + (sizeof(struct kvm_memory_slot) * old->used_slots); if (change == KVM_MR_CREATE) new_size = old_size ...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
35,666,076,386,249,710,000,000,000,000,000,000,000
20
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...
static int device_check_offline(struct device *dev, void *not_used) { int ret; ret = device_for_each_child(dev, NULL, device_check_offline); if (ret) return ret; return device_supports_offline(dev) && !dev->offline ? -EBUSY : 0; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
210,389,094,256,077,200,000,000,000,000,000,000,000
10
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...
poolDestroy(STRING_POOL *pool) { BLOCK *p = pool->blocks; while (p) { BLOCK *tem = p->next; pool->mem->free_fcn(p); p = tem; } p = pool->freeBlocks; while (p) { BLOCK *tem = p->next; pool->mem->free_fcn(p); p = tem; } }
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
87,275,490,730,112,390,000,000,000,000,000,000,000
14
xmlparse.c: Deny internal entities closing the doctype
void Gfx::opRectangle(Object args[], int numArgs) { double x, y, w, h; x = args[0].getNum(); y = args[1].getNum(); w = args[2].getNum(); h = args[3].getNum(); state->moveTo(x, y); state->lineTo(x + w, y); state->lineTo(x + w, y + h); state->lineTo(x, y + h); state->closePath(); }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
199,420,564,824,745,130,000,000,000,000,000,000,000
13
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
inline unsigned int wait(const unsigned int milliseconds) { cimg::mutex(3); static cimg_uint64 timer = cimg::time(); cimg::mutex(3,0); return cimg::wait(milliseconds,&timer); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
168,536,002,633,366,800,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
vrrp_open_sockpool(list l) { sock_t *sock; element e; interface_t *ifp; LIST_FOREACH(l, sock, e) { if (!sock->ifindex) { sock->fd_in = sock->fd_out = -1; continue; } ifp = if_get_by_ifindex(sock->ifindex); sock->fd_in = open_vrrp_read_socket(sock->family, sock->proto, ifp, sock->unicast, ...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
5,613,747,745,669,611,000,000,000,000,000,000,000
21
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
static int do_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long addr, pmd_t *pmdp) { pmd_t pmd; pte_t *pte, *orig_pte; unsigned long _addr = addr & PMD_MASK; unsigned long offset; spinlock_t *ptl; bool numa = false; int local_nid = numa_node_id(); spin_lock(&mm->page_table_lo...
0
[ "CWE-703", "CWE-189" ]
linux
b4cbb197c7e7a68dbad0d491242e3ca67420c13e
109,428,303,568,527,260,000,000,000,000,000,000,000
82
vm: add vm_iomap_memory() helper function Various drivers end up replicating the code to mmap() their memory buffers into user space, and our core memory remapping function may be very flexible but it is unnecessarily complicated for the common cases to use. Our internal VM uses pfn's ("page frame numbers") which sim...
bool get_check_queues(pn_connection_t *c) { return (bool)pn_connection_get_context(c);
0
[]
qpid-proton
159fac1f90d9b1ace1138d510176e7a5da54e9e9
327,557,234,074,489,900,000,000,000,000,000,000,000
3
PROTON-2014: [c] Fix example broker to warn when it fails to set up ssl - Also make send-ssl tell you the remote peer
InitParserList(parserList_t **pListRoot) { *pListRoot = NULL; return RS_RET_OK; }
0
[]
rsyslog
20f8237870eb5e971fa068e4dd4d296f1dbef329
142,366,857,169,988,380,000,000,000,000,000,000,000
5
core: fix potential misadressing in parser message sanitizer misadressing could happen when an oversize message made it to the sanitizer AND contained a control character in the oversize part of the message. Note that it is an error in itself that such an oversize message enters the system, but we harden the sanitizer...
static void elo_work(struct work_struct *work) { struct elo_priv *priv = container_of(work, struct elo_priv, work.work); struct usb_device *dev = priv->usbdev; unsigned char *buffer = priv->buffer; int ret; ret = elo_flush_smartset_responses(dev); if (ret < 0) { dev_err(&dev->dev, "initial FLUSH_SMARTSET_RESPO...
0
[ "CWE-200", "CWE-401" ]
linux
817b8b9c5396d2b2d92311b46719aad5d3339dbe
333,025,782,216,168,900,000,000,000,000,000,000,000
49
HID: elo: fix memory leak in elo_probe When hid_parse() in elo_probe() fails, it forgets to call usb_put_dev to decrease the refcount. Fix this by adding usb_put_dev() in the error handling code of elo_probe(). Fixes: fbf42729d0e9 ("HID: elo: update the reference count of the usb device structure") Reported-by: syzk...
static int add_dirent_to_buf(handle_t *handle, struct ext4_filename *fname, struct inode *dir, struct inode *inode, struct ext4_dir_entry_2 *de, struct buffer_head *bh) { unsigned int blocksize = dir->i_sb->s_blocksize; int csum_size = 0; int err, err2; if (ext4_has_metadata_csum(inode->i...
0
[ "CWE-125" ]
linux
5872331b3d91820e14716632ebb56b1399b34fe1
200,450,196,274,583,000,000,000,000,000,000,000,000
49
ext4: fix potential negative array index in do_split() If for any reason a directory passed to do_split() does not have enough active entries to exceed half the size of the block, we can end up iterating over all "count" entries without finding a split point. In this case, count == move, and split will be zero, and w...
static double mp_pow3(_cimg_math_parser& mp) { const double val = _mp_arg(2); return val*val*val;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
96,270,662,467,191,200,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
static inline bool req_ref_sub_and_test(struct io_kiocb *req, int refs) { WARN_ON_ONCE(req_ref_zero_or_close_to_overflow(req)); return atomic_sub_and_test(refs, &req->refs); }
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
229,276,124,106,624,800,000,000,000,000,000,000,000
5
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
handle_is_ok(int i, int type) { return i >= 0 && (u_int)i < num_handles && handles[i].use == type; }
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
203,049,158,175,743,850,000,000,000,000,000,000,000
4
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
get_light_normal_matrix_x (gint n) { static const FactorAndMatrix matrix_list[] = { { {0, 0, 0, 0, -2, 2, 0, -1, 1}, 2.0 / 3.0}, { {0, 0, 0, -2, 0, 2, -1, 0, 1}, 1.0 / 3.0}, { {0, 0, 0, -2, 2, 0, ...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
61,276,969,150,874,100,000,000,000,000,000,000,000
52
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...
redraw_buf_later(buf_T *buf, int type) { win_T *wp; FOR_ALL_WINDOWS(wp) { if (wp->w_buffer == buf) redraw_win_later(wp, type); } #if defined(FEAT_TERMINAL) && defined(FEAT_PROP_POPUP) // terminal in popup window is not in list of windows if (curwin->w_buffer == buf) redraw_win_later(curw...
0
[ "CWE-122" ]
vim
826bfe4bbd7594188e3d74d2539d9707b1c6a14b
48,557,885,402,987,425,000,000,000,000,000,000,000
15
patch 8.2.3487: illegal memory access if buffer name is very long Problem: Illegal memory access if buffer name is very long. Solution: Make sure not to go over the end of the buffer.
inline klinux_cpu_set_word kLinuxCpuBitNum(int cpu) { return cpu % (8 * sizeof(klinux_cpu_set_word)); }
0
[ "CWE-787" ]
asylo
bda9772e7872b0d2b9bee32930cf7a4983837b39
206,687,947,824,855,040,000,000,000,000,000,000,000
3
Check input length in FromLinuxSockAddr PiperOrigin-RevId: 333785506 Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9
nautilus_file_emit_changed (NautilusFile *file) { GList *link_files, *p; g_assert (NAUTILUS_IS_FILE (file)); /* Invalidate the emblem compare cache. -- This is not the cleanest * place to do it but it is the one guaranteed bottleneck through * which all change notifications pass. */ g_free (file->details->...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
248,607,215,194,920,320,000,000,000,000,000,000,000
26
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-...
directory_load_state_free (DirectoryLoadState *state) { if (state->enumerator) { if (!g_file_enumerator_is_closed (state->enumerator)) { g_file_enumerator_close_async (state->enumerator, 0, NULL, NULL, NULL); } g_object_unref...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
243,935,917,712,770,930,000,000,000,000,000,000,000
20
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
static int __init nf_conntrack_proto_dccp_init(void) { int ret; ret = register_pernet_subsys(&dccp_net_ops); if (ret < 0) goto out_pernet; ret = nf_ct_l4proto_register(&dccp_proto4); if (ret < 0) goto out_dccp4; ret = nf_ct_l4proto_register(&dccp_proto6); if (ret < 0) goto out_dccp6; return 0; out_dcc...
0
[ "CWE-20" ]
linux
b22f5126a24b3b2f15448c3f2a254fc10cbc2b92
125,191,743,671,228,360,000,000,000,000,000,000,000
24
netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages Some occurences in the netfilter tree use skb_header_pointer() in the following way ... struct dccp_hdr _dh, *dh; ... skb_header_pointer(skb, dataoff, sizeof(_dh), &dh); ... where dh itself is a pointer that is being passed as the copy buffer. Ins...
int ssl3_connect(SSL *s) { BUF_MEM *buf=NULL; unsigned long Time=(unsigned long)time(NULL); void (*cb)(const SSL *ssl,int type,int val)=NULL; int ret= -1; int new_state,state,skip=0; RAND_add(&Time,sizeof(Time),0); ERR_clear_error(); clear_sys_error(); if (s->info_callback != NULL) cb=s->info_callback; e...
0
[ "CWE-326", "CWE-310" ]
openssl
bc8923b1ec9c467755cd86f7848c50ee8812e441
94,756,372,627,960,310,000,000,000,000,000,000,000
458
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 ...
static bool nl80211_put_txq_stats(struct sk_buff *msg, struct cfg80211_txq_stats *txqstats, int attrtype) { struct nlattr *txqattr; #define PUT_TXQVAL_U32(attr, memb) do { \ if (txqstats->filled & BIT(NL80211_TXQ_STATS_ ## attr) && \ nla_put_u32(msg, NL80211_TXQ_STATS_ ## attr, txqstats->mem...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
121,022,487,647,104,860,000,000,000,000,000,000,000
32
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
gsicc_profile_reference(cmm_profile_t *icc_profile, int delta) { if (icc_profile != NULL) rc_adjust(icc_profile, delta, "gsicc_profile_reference"); }
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
209,361,438,263,896,500,000,000,000,000,000,000,000
5
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
find_rawstring_end(char_u *linep, pos_T *startpos, pos_T *endpos) { char_u *p; char_u *delim_copy; size_t delim_len; linenr_T lnum; int found = FALSE; for (p = linep + startpos->col + 1; *p && *p != '('; ++p) ; delim_len = (p - linep) - startpos->col - 1; delim_copy = vim_strnsave(lin...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
222,303,704,600,023,000,000,000,000,000,000,000,000
36
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
B44Compressor::compressTile (const char *inPtr, int inSize, IMATH_NAMESPACE::Box2i range, const char *&outPtr) { return compress (inPtr, inSize, range, outPtr); }
0
[ "CWE-190" ]
openexr
eec0dba242bedd2778c973ae4af112107b33d9c9
294,678,156,632,511,550,000,000,000,000,000,000,000
7
fix undefined behavior: ignore unused bits in B44 mode detection (#832) Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static void bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) { bfq_log_bfqq(bfqd, bfqq, "merging with queue %lu", (unsigned long)new_bfqq->pid); /* Save weight raising and idle window of the merged queues */ bfq_bfqq_save_state(bfqq); bfq_bfqq_sav...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
161,511,078,296,409,000,000,000,000,000,000,000,000
71
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
static int multiSelectValues( Parse *pParse, /* Parsing context */ Select *p, /* The right-most of SELECTs to be coded */ SelectDest *pDest /* What to do with query results */ ){ int nRow = 1; int rc = 0; int bShowAll = p->pLimit==0; assert( p->selFlags & SF_MultiValue ); do{ a...
0
[ "CWE-476" ]
sqlite
5f69512404cd2e5153ddf90ea277fbba6dd58ab7
44,717,397,647,203,420,000,000,000,000,000,000,000
31
Early-out on the INTERSECT query processing following an error. FossilOrigin-Name: a67cf5b7d37d5b1484be32092635faafd8f76e5881898cd9435517c4b287d663
static bool low_pfn(unsigned long pfn) { return pfn < max_low_pfn; }
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
264,325,736,765,327,030,000,000,000,000,000,000,000
4
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
parse_exp(Node** np, PToken* tok, int term, UChar** src, UChar* end, ScanEnv* env, int group_head) { int r, len, group = 0; Node* qn; Node** tp; *np = NULL; if (tok->type == (enum TokenSyms )term) goto end_of_token; switch (tok->type) { case TK_ALT: case TK_EOT: end_of_token: *np =...
1
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
273,808,895,206,846,550,000,000,000,000,000,000,000
385
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
mrb_const_name_p(mrb_state *mrb, const char *name, mrb_int len) { return len > 0 && ISUPPER(name[0]) && mrb_ident_p(name+1, len-1); }
0
[ "CWE-787" ]
mruby
b1d0296a937fe278239bdfac840a3fd0e93b3ee9
299,013,665,311,771,900,000,000,000,000,000,000,000
4
class.c: clear method cache after `remove_method`.
flatpak_dir_get_priority (FlatpakDir *self) { if (self->extra_data != NULL) return self->extra_data->priority; return 0; }
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
199,377,651,810,039,800,000,000,000,000,000,000,000
7
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc) { struct inode *inode = mapping->host; unsigned long *bitlock = &NFS_I(inode)->flags; struct nfs_pageio_descriptor pgio; int err; /* Stop dirtying of new pages while we sync */ err = wait_on_bit_lock(bitlock, NFS_INO_FLUSHING, nf...
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
170,303,015,498,947,300,000,000,000,000,000,000,000
32
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
int rsa_rsaes_pkcs1_v15_decrypt( rsa_context *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, size_t *olen, const unsigned char *input, ...
0
[ "CWE-310" ]
polarssl
43f9799ce61c6392a014d0a2ea136b4b3a9ee194
268,549,118,685,243,220,000,000,000,000,000,000,000
91
RSA blinding on CRT operations to counter timing attacks
int _yr_emit_inst_arg_uint16( RE_EMIT_CONTEXT* emit_context, uint8_t opcode, uint16_t argument, uint8_t** instruction_addr, uint16_t** argument_addr, size_t* code_size) { FAIL_ON_ERROR(yr_arena_write_data( emit_context->arena, &opcode, sizeof(uint8_t), (void**) instruct...
0
[ "CWE-674", "CWE-787" ]
yara
925bcf3c3b0a28b5b78e25d9efda5c0bf27ae699
26,085,765,021,022,694,000,000,000,000,000,000,000
24
Fix issue #674. Move regexp limits to limits.h.
proto_item_fill_display_label(field_info *finfo, gchar *display_label_str, const int label_str_size) { header_field_info *hfinfo = finfo->hfinfo; int label_len = 0; char *tmp_str; guint8 *bytes; guint32 number; guint64 number64; const true_false_string *tfstring; const char *hf_str_val; char number_buf[48]; ...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
332,128,403,333,360,060,000,000,000,000,000,000,000
285
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static ssize_t ucma_disconnect(struct ucma_file *file, const char __user *inbuf, int in_len, int out_len) { struct rdma_ucm_disconnect cmd; struct ucma_context *ctx; int ret; if (copy_from_user(&cmd, inbuf, sizeof(cmd))) return -EFAULT; ctx = ucma_get_ctx_dev(file, cmd.id); if (IS_ERR(ctx)) return...
0
[ "CWE-416" ]
linux
f5449e74802c1112dea984aec8af7a33c4516af1
19,576,852,663,176,777,000,000,000,000,000,000,000
20
RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concu...
func_endswith (struct _ESExp *f, gint argc, struct _ESExpResult **argv, gpointer data) { EBookBackendLDAPSExpData *ldap_data = data; ESExpResult *r; if (argc == 2 && argv[0]->type == ESEXP_RES_STRING && argv[1]->type == ESEXP_RES_STRING) { gchar *propname = a...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
155,076,035,337,660,940,000,000,000,000,000,000,000
29
Bug 796174 - strcat() considered unsafe for buffer overflow
static int bpf_prog_query(const union bpf_attr *attr, union bpf_attr __user *uattr) { if (!capable(CAP_NET_ADMIN)) return -EPERM; if (CHECK_ATTR(BPF_PROG_QUERY)) return -EINVAL; if (attr->query.query_flags & ~BPF_F_QUERY_EFFECTIVE) return -EINVAL; switch (attr->query.attach_type) { case BPF_CGROUP_INET...
0
[ "CWE-307" ]
linux
350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef
134,931,872,976,892,580,000,000,000,000,000,000,000
44
bpf: Dont allow vmlinux BTF to be used in map_create and prog_load. The syzbot got FD of vmlinux BTF and passed it into map_create which caused crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save memory. To avoid such is...
int ssl3_get_server_hello(SSL *s) { STACK_OF(SSL_CIPHER) *sk; const SSL_CIPHER *c; unsigned char *p,*d; int i,al,ok; unsigned int j; long n; #ifndef OPENSSL_NO_COMP SSL_COMP *comp; #endif n=s->method->ssl_get_message(s, SSL3_ST_CR_SRVR_HELLO_A, SSL3_ST_CR_SRVR_HELLO_B, -1, 20000, /* ?? */ &ok); if...
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
172,185,928,924,842,900,000,000,000,000,000,000,000
252
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
rend_get_service_list_mutable(smartlist_t* substitute_service_list) { if (substitute_service_list) { return substitute_service_list; } /* If no special service list is provided, then just use the global one. */ if (BUG(!rend_service_list)) { /* No global HS list, which is a programmer error. */ re...
0
[ "CWE-532" ]
tor
09ea89764a4d3a907808ed7d4fe42abfe64bd486
73,096,125,282,499,730,000,000,000,000,000,000,000
15
Fix log-uninitialized-stack bug in rend_service_intro_established. Fixes bug 23490; bugfix on 0.2.7.2-alpha. TROVE-2017-008 CVE-2017-0380
f_keys(typval_T *argvars, typval_T *rettv) { dict_list(argvars, rettv, 0); }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
198,333,007,980,834,300,000,000,000,000,000,000,000
4
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
_wrap_gmac_aes128_set_key(void *_ctx, size_t len, const uint8_t * key) { struct gmac_ctx *ctx = _ctx; if (unlikely(len != 16)) abort(); aes128_set_encrypt_key(&ctx->cipher.aes128, key); gcm_set_key(&ctx->key, &ctx->cipher, ctx->encrypt); ctx->pos = 0; }
0
[ "CWE-476" ]
gnutls
3db352734472d851318944db13be73da61300568
206,470,594,643,499,150,000,000,000,000,000,000,000
10
wrap_nettle_hash_fast: avoid calling _update with zero-length input As Nettle's hash update functions internally call memcpy, providing zero-length input may cause undefined behavior. Signed-off-by: Daiki Ueno <ueno@gnu.org>
static u32 temac_dma_dcr_in(struct temac_local *lp, int reg) { return dcr_read(lp->sdma_dcrs, reg); }
0
[ "CWE-120", "CWE-787" ]
linux
c364df2489b8ef2f5e3159b1dff1ff1fdb16040d
157,354,650,340,822,730,000,000,000,000,000,000,000
4
net: ll_temac: Fix TX BD buffer overwrite Just as the initial check, we need to ensure num_frag+1 buffers available, as that is the number of buffers we are going to use. This fixes a buffer overflow, which might be seen during heavy network load. Complete lockup of TEMAC was reproducible within about 10 minutes of a...
static NTSTATUS read_packet_remainder(int fd, char *buffer, unsigned int timeout, ssize_t len) { if (len <= 0) { return NT_STATUS_OK; } return read_fd_with_timeout(fd, buffer, len, len, timeout, NULL); }
0
[]
samba
25452a2268ac7013da28125f3df22085139af12d
129,932,637,482,178,360,000,000,000,000,000,000,000
9
s3: Fix a NULL pointer dereference Found by Laurent Gaffie <laurent.gaffie@gmail.com>. Thanks! Volker
return err; } static int iscsi_delete_chap(struct iscsi_transport *transport, struct iscsi_uevent *ev) { struct Scsi_Host *shost; int err = 0; if (!transport->delete_chap) return -ENOSYS; shost = scsi_host_lookup(ev->u.delete_chap.host_no); if (!shost) { printk(KERN_ERR "%s could not find host no %...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
34,503,458,765,734,593,000,000,000,000,000,000,000
20
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:...
static void ifbw_add(IFBW *ptr) { assert(ptr); if (ifbw != NULL) ptr->next = ifbw; ifbw = ptr; }
0
[ "CWE-284", "CWE-269" ]
firejail
5d43fdcd215203868d440ffc42036f5f5ffc89fc
17,889,569,587,664,110,000,000,000,000,000,000,000
7
security fix
R_API bool r_core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth) { if (depth < 0) { if (core->anal->verbose) { eprintf ("Message: Early deepness at 0x%08"PFMT64x"\n", at); } return false; } if (from == UT64_MAX && is_skippable_addr (core, at)) { if (core->anal->verbose) { eprintf ("M...
0
[ "CWE-416" ]
radare2
10517e3ff0e609697eb8cde60ec8dc999ee5ea24
163,327,680,976,322,190,000,000,000,000,000,000,000
79
aaef on arm/thumb switches causes uaf ##crash * Reported by peacock-doris via huntr.dev * Reproducer: poc_uaf_r_reg_get
static struct page *cache_grow_begin(struct kmem_cache *cachep, gfp_t flags, int nodeid) { void *freelist; size_t offset; gfp_t local_flags; int page_node; struct kmem_cache_node *n; struct page *page; /* * Be lazy and only check for valid flags here, keeping it out of the * critical path in kmem_cache...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
115,488,015,852,192,290,000,000,000,000,000,000,000
72
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...
on_connected (GObject *source_object, GAsyncResult *result, gpointer user_data) { GSocketConnection *conn; GError *error = NULL; conn = g_socket_client_connect_to_uri_finish (G_SOCKET_CLIENT (source_object), result, &error); g_assert_no_error (error); g_object_unref (co...
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
304,097,170,302,590,880,000,000,000,000,000,000,000
13
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
void ZipTest::testDecompressFlatVuln() { std::string testFile = getTestFile("data", "vuln.zip"); std::ifstream inp(testFile.c_str(), std::ios::binary); assert(inp.good()); Decompress dec(inp, Poco::Path::temp(), true); dec.EError += Poco::Delegate<ZipTest, std::pair<const Poco::Zip::ZipLocalFileHeader, const std::...
0
[ "CWE-22" ]
poco
bb7e5feece68ccfd8660caee93da25c5c39a4707
141,167,636,442,822,900,000,000,000,000,000,000,000
12
merge zip entry absolute path vulnerability fix (#1968) from develop
rsvg_filter_primitive_convolve_matrix_set_atts (RsvgNode * self, RsvgHandle * ctx, RsvgPropertyBag * atts) { gint i, j; guint listlen = 0; const char *value; gboolean has_target_x, has_target_y; RsvgFilterPrimitiveConvolveMatrix *filter; filter = ...
0
[]
librsvg
a51919f7e1ca9c535390a746fbf6e28c8402dc61
246,483,982,229,539,870,000,000,000,000,000,000,000
87
rsvg: Add rsvg_acquire_node() This function does proper recursion checks when looking up resources from URLs and thereby helps avoiding infinite loops when cyclic references span multiple types of elements.
void fix_from_value(Derivation dv, const Metadata metadata) { fix_charset_and_length_from_str_value(dv, metadata); // it is constant => can be used without fix_fields (and frequently used) fixed= 1; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
165,902,672,546,454,000,000,000,000,000,000,000,000
6
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....
static void security_netlbl_cache_add(struct netlbl_lsm_secattr *secattr, u32 sid) { u32 *sid_cache; sid_cache = kmalloc(sizeof(*sid_cache), GFP_ATOMIC); if (sid_cache == NULL) return; secattr->cache = netlbl_secattr_cache_alloc(GFP_ATOMIC); if (secattr->cache == NULL) { kfree(sid_cache); return; ...
0
[ "CWE-20" ]
linux
2172fa709ab32ca60e86179dc67d0857be8e2c98
123,511,000,975,697,190,000,000,000,000,000,000,000
19
SELinux: Fix kernel BUG on empty security contexts. Setting an empty security context (length=0) on a file will lead to incorrectly dereferencing the type and other fields of the security context structure, yielding a kernel BUG. As a zero-length security context is never valid, just reject all such security contexts...
bool is_visible() const { return !is_closed(); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
297,442,788,446,952,940,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.
_gnutls_cipher_is_ok (gnutls_cipher_algorithm_t algorithm) { ssize_t ret = -1; GNUTLS_ALG_LOOP (ret = p->id); if (ret >= 0) ret = 0; else ret = 1; return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
117,299,828,792,188,550,000,000,000,000,000,000,000
10
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
static int handle_cmd(AHCIState *s, int port, uint8_t slot) { IDEState *ide_state; uint64_t tbl_addr; AHCICmdHdr *cmd; uint8_t *cmd_fis; dma_addr_t cmd_len; if (s->dev[port].port.ifs[0].status & (BUSY_STAT|DRQ_STAT)) { /* Engine currently busy, try again later */ DPRINTF(port, "...
0
[ "CWE-772", "CWE-401" ]
qemu
d68f0f778e7f4fbd674627274267f269e40f0b04
126,227,267,000,127,240,000,000,000,000,000,000,000
69
ide: ahci: call cleanup function in ahci unit This can avoid memory leak when hotunplug the ahci device. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn Signed-off-by: John Snow <jsnow@redhat.com>
DEFUN(srchnxt, SEARCH_NEXT, "Continue search forward") { srch_nxtprv(0); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
141,222,894,799,067,850,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
int jpc_putdata(jas_stream_t *out, jas_stream_t *in, long len) { return jas_stream_copy(out, in, len); }
0
[]
jasper
4031ca321d8cb5798c316ab39c7a5dc88a61fdd7
129,833,557,668,644,330,000,000,000,000,000,000,000
4
Incorporated changes from patch jasper-1.900.3-libjasper-stepsizes-overflow.patch
static int not_resumable_sess_cb(SSL *s, int is_forward_secure) { /* disable resumption for sessions with forward secure ciphers */ return is_forward_secure; }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
13,592,764,093,119,620,000,000,000,000,000,000,000
5
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
static ssize_t o2nm_node_local_show(struct config_item *item, char *page) { return sprintf(page, "%d\n", to_o2nm_node(item)->nd_local); }
0
[ "CWE-476", "CWE-284" ]
linux
853bc26a7ea39e354b9f8889ae7ad1492ffa28d2
88,868,534,433,038,980,000,000,000,000,000,000,000
4
ocfs2: subsystem.su_mutex is required while accessing the item->ci_parent The subsystem.su_mutex is required while accessing the item->ci_parent, otherwise, NULL pointer dereference to the item->ci_parent will be triggered in the following situation: add node delete node sys_write vfs_write con...
std::unique_ptr<HttpRequest> HttpRequestEntry::popHttpRequest() { return std::move(httpRequest_); }
0
[ "CWE-532" ]
aria2
37368130ca7de5491a75fd18a20c5c5cc641824a
339,031,343,462,121,700,000,000,000,000,000,000,000
4
Mask headers
fire_sched_out_preempt_notifiers(struct task_struct *curr, struct task_struct *next) { struct preempt_notifier *notifier; struct hlist_node *node; hlist_for_each_entry(notifier, node, &curr->preempt_notifiers, link) notifier->ops->sched_out(notifier, next); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
171,427,942,909,375,200,000,000,000,000,000,000,000
9
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
ex_global(exarg_T *eap) { linenr_T lnum; // line number according to old situation int ndone = 0; int type; // first char of cmd: 'v' or 'g' char_u *cmd; // command argument char_u delim; // delimiter, normally '/' char_u *pat; regmmatch_T regmatch; int match; int which_pat;...
0
[ "CWE-787" ]
vim
e2bd8600b873d2cd1f9d667c28cba8b1dba18839
266,470,212,958,060,700,000,000,000,000,000,000,000
146
patch 8.2.4977: memory access error when substitute expression changes window Problem: Memory access error when substitute expression changes window. Solution: Disallow changing window in substitute expression.
static void php_zip_get_from(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ { struct zip *intern; zval *this = getThis(); struct zip_stat sb; struct zip_file *zf; char *filename; int filename_len; long index = -1; long flags = 0; long len = 0; char *buffer; int n = 0; if (!this) { RETURN_FALSE; } ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
130,308,905,235,587,520,000,000,000,000,000,000,000
66
- 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
GF_Err gf_m2ts_set_pes_framing(GF_M2TS_PES *pes, u32 mode) { if (!pes) return GF_BAD_PARAM; GF_LOG(GF_LOG_DEBUG, GF_LOG_CONTAINER, ("[MPEG-2 TS] Setting pes framing mode of PID %d to %d\n", pes->pid, mode) ); /*ignore request for section PIDs*/ if (pes->flags & GF_M2TS_ES_IS_SECTION) { if (pes->flags & GF_M2TS_E...
0
[ "CWE-416", "CWE-125" ]
gpac
1ab4860609f2e7a35634930571e7d0531297e090
52,901,739,725,402,050,000,000,000,000,000,000,000
78
fixed potential crash on PMT IOD parse - cf #1268 #1269