func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void ssl_cipher_collect_ciphers(const SSL_METHOD *ssl_method, int num_of_ciphers, unsigned long disabled_mkey, unsigned long disabled_auth, unsigned long disabled_enc, unsigned long disabled_mac, unsigned long disabled_ssl, CIPHER_OR...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
161,758,190,385,489,200,000,000,000,000,000,000,000
71
Add SRP support.
const struct sockaddr_storage *smbXcli_conn_local_sockaddr(struct smbXcli_conn *conn) { return &conn->local_ss; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
134,550,796,784,274,880,000,000,000,000,000,000,000
4
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static int pb0100_set_exposure(struct gspca_dev *gspca_dev, __s32 val) { struct sd *sd = (struct sd *) gspca_dev; int err; err = stv06xx_write_sensor(sd, PB_RINTTIME, val); gspca_dbg(gspca_dev, D_CONF, "Set exposure to %d, status: %d\n", val, err); return err; }
0
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
88,874,444,056,072,840,000,000,000,000,000,000,000
11
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
int f2fs_init_acl(struct inode *inode, struct inode *dir, struct page *ipage, struct page *dpage) { struct posix_acl *default_acl = NULL, *acl = NULL; int error = 0; error = f2fs_acl_create(dir, &inode->i_mode, &default_acl, &acl, dpage); if (error) return error; f2fs_mark_inode_dirty_sync(inode); if ...
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
261,449,577,453,132,020,000,000,000,000,000,000,000
26
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
const SSL_SESSION& Security::get_resume() const { return resumeSession_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
21,144,599,640,032,235,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
#ifdef cimg_use_half inline half rol(const half a, const unsigned int n=1) { return (half)rol((int)a,n);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
172,685,954,805,283,500,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int run_filter(struct tap_filter *filter, const struct sk_buff *skb) { /* Cannot use eth_hdr(skb) here because skb_mac_hdr() is incorrect * at this point. */ struct ethhdr *eh = (struct ethhdr *) skb->data; int i; /* Exact match */ for (i = 0; i < filter->count; i++) if (ether_addr_equal(eh->h_dest, fi...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
44,887,326,668,633,130,000,000,000,000,000,000,000
18
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
void HSideEffectMap::Kill(GVNFlagSet flags) { for (int i = 0; i < kNumberOfTrackedSideEffects; i++) { GVNFlag changes_flag = HValue::ChangesFlagFromInt(i); if (flags.Contains(changes_flag)) { if (data_[i] != NULL) count_--; data_[i] = NULL; } } }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
19,311,124,789,967,300,000,000,000,000,000,000,000
9
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
GF_Box *sdtp_box_new() { ISOM_DECL_BOX_ALLOC(GF_SampleDependencyTypeBox, GF_ISOM_BOX_TYPE_SDTP); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
191,444,067,642,552,350,000,000,000,000,000,000,000
5
fixed #2255
replace_character(int c) { int n = State; State = REPLACE; ins_char(c); State = n; // Backup to the replaced character. dec_cursor(); }
0
[ "CWE-416", "CWE-787" ]
vim
9f8c304c8a390ade133bac29963dc8e56ab14cbc
301,579,371,062,247,660,000,000,000,000,000,000,000
10
patch 8.2.4120: block insert goes over the end of the line Problem: Block insert goes over the end of the line. Solution: Handle invalid byte better. Fix inserting the wrong text.
process_cmd_cmdallow(CMD_Request *msg, char *line) { int status; msg->command = htons(REQ_CMDALLOW); status = parse_allow_deny(msg, line); return status; }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
50,856,882,562,768,200,000,000,000,000,000,000,000
7
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
static void *cgroup_seqfile_next(struct seq_file *seq, void *v, loff_t *ppos) { return seq_cft(seq)->seq_next(seq, v, ppos); }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
302,019,219,960,737,900,000,000,000,000,000,000,000
4
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
void Compute(OpKernelContext *ctx) override { // (0) validations const Tensor *a_indices, *b_indices, *a_values_t, *b_values_t, *a_shape, *b_shape, *thresh_t; OP_REQUIRES_OK(ctx, ctx->input("a_indices", &a_indices)); OP_REQUIRES_OK(ctx, ctx->input("b_indices", &b_indices)); OP_REQUIRES(ct...
1
[ "CWE-787" ]
tensorflow
41727ff06111117bdf86b37db198217fd7a143cc
49,579,086,162,774,250,000,000,000,000,000,000,000
141
Validate that a and b are proper sparse tensors PiperOrigin-RevId: 373248068 Change-Id: I0a2041a0747901b3f00387a6a3bce9bca6b0b3b1
QPDFObjectHandle::newDictionary() { return newDictionary(std::map<std::string, QPDFObjectHandle>()); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
310,979,070,699,566,540,000,000,000,000,000,000,000
4
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_CV_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); bitwise_or_function(&EX_T(opline->result.u.var).tmp_var, _get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC), &opline->op2.u.constant TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
8,550,815,749,517,121,000,000,000,000,000,000,000
12
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int ZEND_FASTCALL ZEND_ASSIGN_REF_SPEC_CV_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval **variable_ptr_ptr; zval **value_ptr_ptr = _get_zval_ptr_ptr_cv(&opline->op2, EX(Ts), BP_VAR_W TSRMLS_CC); if (IS_CV == IS_VAR && value_ptr_ptr && !Z_ISREF_P...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
243,078,980,432,083,500,000,000,000,000,000,000,000
47
- 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
static void mca_get(struct ifmcaddr6 *mc) { refcount_inc(&mc->mca_refcnt); }
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
55,385,906,299,478,990,000,000,000,000,000,000,000
4
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
TfLiteStatus GatherStrings(TfLiteContext* context, const TfLiteTensor* input, const TfLiteTensor* positions, TfLiteTensor* output) { DynamicBuffer buffer; const PositionT* indexes = GetTensorData<PositionT>(positions); bool indices_has_only_positive_elements ...
0
[ "CWE-703", "CWE-125" ]
tensorflow
eb921122119a6b6e470ee98b89e65d721663179d
206,258,619,580,286,140,000,000,000,000,000,000,000
28
Prevent heap OOB read in TFLite's `gather.cc`. Passing negative indices is illegal but there was a missing check so that resulted in OOB accesses. PiperOrigin-RevId: 387231300 Change-Id: I3111b54b2f232638d795be17efc46abe4ede6bf8
SYSCALL_DEFINE5(keyctl, int, option, unsigned long, arg2, unsigned long, arg3, unsigned long, arg4, unsigned long, arg5) { switch (option) { case KEYCTL_GET_KEYRING_ID: return keyctl_get_keyring_ID((key_serial_t) arg2, (int) arg3); case KEYCTL_JOIN_SESSION_KEYRING: return keyctl_join_session_keyring...
0
[ "CWE-347" ]
linux
ee8f844e3c5a73b999edf733df1c529d6503ec2f
168,153,535,058,600,950,000,000,000,000,000,000,000
112
KEYS: Disallow keyrings beginning with '.' to be joined as session keyrings This fixes CVE-2016-9604. Keyrings whose name begin with a '.' are special internal keyrings and so userspace isn't allowed to create keyrings by this name to prevent shadowing. However, the patch that added the guard didn't fix KEYCTL_JOIN_...
STATIC void S_delete_recursion_entry(pTHX_ void *key) { /* Deletes the entry used to detect recursion when expanding user-defined * properties. This is a function so it can be set up to be called even if * the program unexpectedly quits */ dVAR; SV ** current_entry; const STRLEN key_len = st...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
110,925,937,787,912,300,000,000,000,000,000,000,000
27
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
Http::FilterDataStatus Filter::decodeData(Buffer::Instance& data, bool end_stream) { // upstream_requests_.size() cannot be 0 because we add to it unconditionally // in decodeHeaders(). It cannot be > 1 because that only happens when a per // try timeout occurs with hedge_on_per_try_timeout enabled but the per ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
145,489,602,122,024,270,000,000,000,000,000,000,000
39
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static cJSON *get_object_item(const cJSON * const object, const char * const name, const cJSON_bool case_sensitive) { cJSON *current_element = NULL; if ((object == NULL) || (name == NULL)) { return NULL; } current_element = object->child; if (case_sensitive) { while ((curre...
1
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
14,517,797,940,381,683,000,000,000,000,000,000,000
27
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
void igmp6_event_report(struct sk_buff *skb) { struct inet6_dev *idev = __in6_dev_get(skb->dev); if (!idev || idev->dead) goto out; spin_lock_bh(&idev->mc_report_lock); if (skb_queue_len(&idev->mc_report_queue) < MLD_MAX_SKBS) { __skb_queue_tail(&idev->mc_report_queue, skb); if (!mod_delayed_work(mld_wq, &i...
0
[ "CWE-703" ]
linux
2d3916f3189172d5c69d33065c3c21119fe539fc
16,189,745,857,268,416,000,000,000,000,000,000,000
18
ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report() While investigating on why a synchronize_net() has been added recently in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report() might drop skbs in some cases. Discussion about removing synchronize_net() from ipv6_mc_down() will ha...
int StreamResource::DoTryWrite(uv_buf_t** bufs, size_t* count) { // No TryWrite by default return 0; }
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
104,927,487,396,088,650,000,000,000,000,000,000,000
4
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
int32 MkvWriter::Position(int64 position) { if (!file_) return -1; #ifdef _MSC_VER return _fseeki64(file_, position, SEEK_SET); #elif defined(_WIN32) return fseeko64(file_, static_cast<off_t>(position), SEEK_SET); #else return fseeko(file_, static_cast<off_t>(position), SEEK_SET); #endif }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
228,691,919,655,382,240,000,000,000,000,000,000,000
12
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
bool PM_io_parser<PMDEC>::check_sep(const char* sep) { char c; do in.get(c); while (isspace(c)); while (*sep != '\0') { if (*sep != c) { in.putback(c); return false; } ++sep; in.get(c); } in.putback(c); return true; }
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
95,171,699,905,574,540,000,000,000,000,000,000,000
14
Fix Nef_2 and Nef_S2 IO
do_create_from_keygrip (ctrl_t ctrl, int algo, const char *hexkeygrip, kbnode_t pub_root, u32 timestamp, u32 expireval, int is_subkey) { int err; PACKET *pkt; PKT_public_key *pk; gcry_sexp_t s_key; const char *algoelem; if (hexkeygrip[0] == '&') hexkeygri...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
135,965,198,667,184,800,000,000,000,000,000,000,000
83
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
ast_for_binop(struct compiling *c, const node *n) { /* Must account for a sequence of expressions. How should A op B op C by represented? BinOp(BinOp(A, op, B), op, C). */ int i, nops; expr_ty expr1, expr2, result; operator_ty newoperator; expr1 = ast_for_expr(c, CHILD(n, 0)); ...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
127,924,647,216,208,840,000,000,000,000,000,000,000
53
bpo-35766: Merge typed_ast back into CPython (GH-11645)
void resched_cpu(int cpu) { struct rq *rq = cpu_rq(cpu); unsigned long flags; if (!raw_spin_trylock_irqsave(&rq->lock, flags)) return; resched_curr(rq); raw_spin_unlock_irqrestore(&rq->lock, flags); }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
221,688,592,731,647,630,000,000,000,000,000,000,000
10
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static bool cmd_identify(IDEState *s, uint8_t cmd) { if (s->blk && s->drive_kind != IDE_CD) { if (s->drive_kind != IDE_CFATA) { ide_identify(s); } else { ide_cfata_identify(s); } s->status = READY_STAT | SEEK_STAT; ide_transfer_start(s, s->io_buffer, 5...
0
[ "CWE-399" ]
qemu
3251bdcf1c67427d964517053c3d185b46e618e8
28,887,407,190,420,890,000,000,000,000,000,000,000
21
ide: Correct handling of malformed/short PRDTs This impacts both BMDMA and AHCI HBA interfaces for IDE. Currently, we confuse the difference between a PRDT having "0 bytes" and a PRDT having "0 complete sectors." When we receive an incomplete sector, inconsistent error checking leads to an infinite loop wherein the c...
static void MoveWindow(miccntx *context, u32 micSeq) { u32 shift; //Move window if seq greater than the middle of the window if (micSeq > context->window) { shift = (micSeq - context->window) >> 1; //Shift out old if (shift < 32) context->rx >>= shift; else context->rx = 0; context->window...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
228,036,417,854,728,650,000,000,000,000,000,000,000
17
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...
TouchSocketFiles(void) { ListCell *l; /* Loop through all created sockets... */ foreach(l, sock_paths) { char *sock_path = (char *) lfirst(l); /* * utime() is POSIX standard, utimes() is a common alternative. If we * have neither, there's no way to affect the mod or access time of * the socket :...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
231,038,279,080,104,400,000,000,000,000,000,000,000
25
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
g_socket_client_proxy_connect_callback (GObject *object, GAsyncResult *result, gpointer user_data) { GSocketClientAsyncConnectData *data = user_data; g_object_unref (data->connection); data->connection = g_proxy_connect_finish (G_PROXY (object), result, &data->last_error);...
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
260,485,758,539,021,480,000,000,000,000,000,000,000
22
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
mk_env_string (name, value) const char *name, *value; { int name_len, value_len; char *p; name_len = strlen (name); value_len = STRLEN (value); p = (char *)xmalloc (2 + name_len + value_len); strcpy (p, name); p[name_len] = '='; if (value && *value) strcpy (p + name_len + 1, value); else ...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
210,912,462,216,513,720,000,000,000,000,000,000,000
17
commit bash-20120224 snapshot
BSONObj spec() { return BSON("$lt" << BSON_ARRAY(1 << "$a")); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
314,147,923,229,138,260,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
bool LEX::sp_for_loop_cursor_condition_test(THD *thd, const Lex_for_loop_st &loop) { const LEX_CSTRING *cursor_name; Item *expr; spcont->set_for_loop(loop); sphead->reset_lex(thd); cursor_name= spcont->find_cursor(loop.m_cursor_offset); DBUG_ASSERT(cursor_name); ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
62,207,667,624,131,990,000,000,000,000,000,000,000
18
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...
_libssh2_packet_add(LIBSSH2_SESSION * session, unsigned char *data, size_t datalen, int macstate) { int rc = 0; unsigned char *message = NULL; unsigned char *language = NULL; size_t message_len = 0; size_t language_len = 0; LIBSSH2_CHANNEL *channelp = NULL; size_t data_he...
0
[ "CWE-190", "CWE-703" ]
libssh2
dedcbd106f8e52d5586b0205bc7677e4c9868f9c
132,242,532,710,662,260,000,000,000,000,000,000,000
611
packet.c: improve message parsing (#402) * packet.c: improve parsing of packets file: packet.c notes: Use _libssh2_get_string API in SSH_MSG_DEBUG/SSH_MSG_DISCONNECT. Additional uint32 bounds check in SSH_MSG_GLOBAL_REQUEST.
static int tcp_clean_rtx_queue(struct sock *sk, int prior_fackets, u32 prior_snd_una, struct tcp_sacktag_state *sack) { const struct inet_connection_sock *icsk = inet_csk(sk); struct skb_mstamp first_ackt, last_ackt, now; struct tcp_sock *tp = tcp_sk(sk); u32 prior_sacked = tp->sacked_out; u32 ...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
284,218,559,441,205,900,000,000,000,000,000,000,000
173
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
dwg_free_object (Dwg_Object *obj) { int error = 0; long unsigned int j; Dwg_Data *dwg; Bit_Chain *dat = &pdat; if (obj && obj->parent) { dwg = obj->parent; dat->version = dwg->header.version; } else return; if (obj->type == DWG_TYPE_FREED || obj->tio.object == NULL) return; ...
0
[ "CWE-703", "CWE-835" ]
libredwg
c6f6668b82bfe595899cc820279ac37bb9ef16f5
245,532,218,967,910,670,000,000,000,000,000,000,000
285
cleanup tio.unknown not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common entity_data. Fixes GH #178 heap_overflow2
uint32_t cli_bcapi_trace_scope(struct cli_bc_ctx *ctx, const uint8_t *scope, uint32_t scopeid) { if (LIKELY(!ctx->trace_level)) return 0; if (ctx->scope != (const char*)scope) { ctx->scope = (const char*)scope ? (const char*)scope : "?"; ctx->scopeid = scopeid; ctx->trace_level |= 0x80;/* temporarely increa...
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
140,005,527,948,510,620,000,000,000,000,000,000,000
14
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
int hfi1_user_sdma_alloc_queues(struct hfi1_ctxtdata *uctxt, struct hfi1_filedata *fd) { int ret = -ENOMEM; char buf[64]; struct hfi1_devdata *dd; struct hfi1_user_sdma_comp_q *cq; struct hfi1_user_sdma_pkt_q *pq; if (!uctxt || !fd) return -EBADF; if (!hfi1_sdma_comp_ring_size) return -EINVAL; dd = u...
1
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
132,166,217,881,861,100,000,000,000,000,000,000,000
96
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
recursive_regmatch( nfa_state_T *state, nfa_pim_T *pim, nfa_regprog_T *prog, regsubs_T *submatch, regsubs_T *m, int **listids, int *listids_len) { int save_reginput_col = (int)(rex.input - rex.line); int save_reglnum = rex.lnum; int save_nfa_match =...
0
[ "CWE-122" ]
vim
65b605665997fad54ef39a93199e305af2fe4d7f
87,592,816,243,288,330,000,000,000,000,000,000,000
175
patch 8.2.3409: reading beyond end of line with invalid utf-8 character Problem: Reading beyond end of line with invalid utf-8 character. Solution: Check for NUL when advancing.
void readRandomDevice(void* data, size_t size) { #ifdef _MSC_VER static folly::once_flag flag; static HCRYPTPROV cryptoProv; folly::call_once(flag, [&] { if (!CryptAcquireContext( &cryptoProv, nullptr, nullptr, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { ...
0
[ "CWE-119", "CWE-787" ]
folly
8e927ee48b114c8a2f90d0cbd5ac753795a6761f
153,898,959,772,270,400,000,000,000,000,000,000,000
31
Flush secureRandom buffer on fork Summary: On fork, flush the secureRandom buffer, so that we don't share entropy between the parent and child. Reviewed By: ricklavoie Differential Revision: D9196474 fbshipit-source-id: 12ff8488d814466186df61328a5f1d4000beb27f
static u32 seq_scale(u32 seq) { /* * As close as possible to RFC 793, which * suggests using a 250 kHz clock. * Further reading shows this assumes 2 Mb/s networks. * For 10 Mb/s Ethernet, a 1 MHz clock is appropriate. * For 10 Gb/s Ethernet, a 1 GHz clock should be ok, but * we also need to limit the resol...
0
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
9,763,551,611,855,852,000,000,000,000,000,000,000
14
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
int LUKS2_keyslot_find_empty(struct crypt_device *cd, struct luks2_hdr *hdr, size_t keylength) { int i; for (i = 0; i < LUKS2_KEYSLOTS_MAX; i++) if (!LUKS2_get_keyslot_jobj(hdr, i)) break; if (i == LUKS2_KEYSLOTS_MAX) return -EINVAL; /* Check also there is a space for the key in keyslots area */ if (keyl...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
185,531,158,688,782,100,000,000,000,000,000,000,000
17
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
gp_get_string(char * buffer, size_t len, const char * prompt) { # ifdef USE_READLINE if (interactive) return rlgets(buffer, len, prompt); else return fgets_ipc(buffer, len); # else if (interactive) PUT_STRING(prompt); return GET_STRING(buffer, len); # endif }
0
[ "CWE-415" ]
gnuplot
052cbd17c3cbbc602ee080b2617d32a8417d7563
154,999,977,592,179,200,000,000,000,000,000,000,000
14
successive failures of "set print <foo>" could cause double-free Bug #2312
static TEE_Result alloc_temp_sec_mem(size_t size, struct mobj **mobj, uint8_t **va) { /* Allocate section in secure DDR */ #ifdef CFG_PAGED_USER_TA *mobj = mobj_seccpy_shm_alloc(size); #else *mobj = mobj_mm_alloc(mobj_sec_ddr, size, &tee_mm_sec_ddr); #endif if (!*mobj) return TEE_ERROR_GENERIC; *va = m...
0
[ "CWE-119", "CWE-787" ]
optee_os
d5c5b0b77b2b589666024d219a8007b3f5b6faeb
308,949,890,839,301,940,000,000,000,000,000,000,000
15
core: svc: always check ta parameters Always check TA parameters from a user TA. This prevents a user TA from passing invalid pointers to a pseudo TA. Fixes: OP-TEE-2018-0007: "Buffer checks missing when calling pseudo TAs". Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Joakim Bech <joakim.bec...
static void tx3g_dump_box(FILE * trace, GF_BoxRecord *rec) { fprintf(trace, "<BoxRecord top=\"%d\" left=\"%d\" bottom=\"%d\" right=\"%d\"/>\n", rec->top, rec->left, rec->bottom, rec->right); }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
167,171,185,681,920,720,000,000,000,000,000,000,000
4
fixed 2 possible heap overflows (inc. #1088)
TEST_P(DownstreamProtocolIntegrationTest, MultipleContentLengths) { initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto encoder_decoder = codec_client_->startRequest(Http::TestHeaderMapImpl{{":method", "POST"}, {":path", "/test...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
336,158,828,006,461,860,000,000,000,000,000,000,000
20
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
hrtimer_force_reprogram(struct hrtimer_cpu_base *cpu_base, int skip_equal) { ktime_t expires_next; if (!cpu_base->hres_active) return; expires_next = __hrtimer_get_next_event(cpu_base); if (skip_equal && expires_next == cpu_base->expires_next) return; cpu_base->expires_next = expires_next; /* * If a ha...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
243,391,936,136,085,420,000,000,000,000,000,000,000
33
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
cliprdr_server_unlock_clipboard_data(CliprdrServerContext* context, const CLIPRDR_UNLOCK_CLIPBOARD_DATA* unlockClipboardData) { wStream* s; CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*)context->handle; if (unlockClipboardData->msgType != CB_UNLOCK_CLIPDATA) WLog_WARN(...
0
[]
FreeRDP
8e1a1b407565eb0a48923c796f5b1f69167b3c48
130,493,964,695,978,810,000,000,000,000,000,000,000
21
Fixed cliprdr_server_receive_capabilities Thanks to hac425 CVE-2020-11017, CVE-2020-11018
Item_date_literal_for_invalid_dates(THD *thd, const Date *ltime) :Item_date_literal(thd, ltime) { maybe_null= false; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
54,308,002,906,361,430,000,000,000,000,000,000,000
5
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 ...
NOEXPORT void reload_config() { static int delay=10; /* 10ms */ #ifdef HAVE_CHROOT struct stat sb; #endif /* HAVE_CHROOT */ if(options_parse(CONF_RELOAD)) { s_log(LOG_ERR, "Failed to reload the configuration file"); return; } unbind_ports(); log_flush(LOG_MODE_BUFFER); #ifdef HA...
1
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
159,852,796,721,658,920,000,000,000,000,000,000,000
41
stunnel-5.57
u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr, __be16 sport, __be16 dport) { u64 seq; __u32 hash[4]; struct keydata *keyptr = get_keyptr(); hash[0] = (__force u32)saddr; hash[1] = (__force u32)daddr; hash[2] = ((__force u16)sport << 16) + (__force u16)dport; hash[3] = keyptr->secret[11]; seq ...
1
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
151,426,578,254,416,180,000,000,000,000,000,000,000
20
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
MagickPrivate Quantum *GetAuthenticPixelCacheNexus(Image *image,const ssize_t x, const ssize_t y,const size_t columns,const size_t rows,NexusInfo *nexus_info, ExceptionInfo *exception) { CacheInfo *magick_restrict cache_info; Quantum *magick_restrict pixels; /* Transfer pixels from the cache. ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
256,281,155,908,475,420,000,000,000,000,000,000,000
30
Set pixel cache to undefined if any resource limit is exceeded
static int aio_setup_ring(struct kioctx *ctx, unsigned int nr_events) { struct aio_ring *ring; struct mm_struct *mm = current->mm; unsigned long size, unused; int nr_pages; int i; struct file *file; /* Compensate for the ring buffer's head/tail overlap entry */ nr_events += 2; /* 1 is required, 2 for good luck...
0
[ "CWE-416" ]
linux
84c4e1f89fefe70554da0ab33be72c9be7994379
188,385,242,972,279,200,000,000,000,000,000,000,000
96
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...
void LIRGenerator::do_LogicOp(LogicOp* x) { // when an operand with use count 1 is the left operand, then it is // likely that no move for 2-operand-LIR-form is necessary if (x->is_commutative() && x->y()->as_Constant() == NULL && x->x()->use_count() > x->y()->use_count()) { x->swap_operands(); } LIRItem...
0
[]
jdk17u
268c0159253b3de5d72eb826ef2329b27bb33fea
270,044,045,963,057,550,000,000,000,000,000,000,000
16
8272014: Better array indexing Reviewed-by: thartmann Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f
static inline void vm_entry_controls_setbit(struct vcpu_vmx *vmx, u32 val) { vm_entry_controls_set(vmx, vm_entry_controls_get(vmx) | val); }
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
44,411,635,693,098,700,000,000,000,000,000,000,000
4
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
TypeId CiffComponent::typeId(uint16_t tag) { TypeId ti = invalidTypeId; switch (tag & 0x3800) { case 0x0000: ti = unsignedByte; break; case 0x0800: ti = asciiString; break; case 0x1000: ti = unsignedShort; break; case 0x1800: ti = unsignedLong; break; case...
0
[ "CWE-400" ]
exiv2
b3d077dcaefb6747fff8204490f33eba5a144edb
330,760,107,633,250,630,000,000,000,000,000,000,000
14
Fix #460 by adding more checks in CiffDirectory::readDirectory
**/ T cubic_atX_c(const float fx, const int y, const int z, const int c, const T& out_value) const { return cimg::type<T>::cut(cubic_atX(fx,y,z,c,out_value));
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
178,149,470,711,881,740,000,000,000,000,000,000,000
3
.
static ssize_t wolfssl_send(struct Curl_easy *data, int sockindex, const void *mem, size_t len, CURLcode *curlcode) { struct connectdata *conn = data->conn; struct ssl_connect_data *connssl = &conn->ssl[s...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
174,900,599,703,390,040,000,000,000,000,000,000,000
32
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc) { /* mrb_assert(MRB_PROC_CFUNC_P(proc)) */ const mrb_irep *irep = proc->body.irep; const mrb_pool_value *pool = irep->pool; const mrb_sym *syms = irep->syms; mrb_code insn; int ai = mrb_gc_arena_save(mrb); struct mrb_jmpbuf *prev_jm...
1
[ "CWE-125", "CWE-94" ]
mruby
ff3a5ebed6ffbe3e70481531cfb969b497aa73ad
116,202,136,365,729,780,000,000,000,000,000,000,000
1,821
vm.c: should check type before hash access. Since the operand of double splat (`**`) may not be a hash, simple assertion (previous code since d42a64e) was not enough for this case.
base160_sql(sqlite3_context * hContext, int argc, sqlite3_value ** argv) { int i; long long val; char result[5]; val = sqlite3_value_int64(argv[0]); for (i = 3; i >= 0; i--) { result[i] = base160tab[val % 160]; val /= 160; }...
0
[ "CWE-20" ]
samba
3f95957d6de321c803a66f3ec67a8ff09befd16d
113,869,681,125,949,730,000,000,000,000,000,000,000
20
CVE-2018-1140 ldb: Check for ldb_dn_get_casefold() failure in ldb_sqlite Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374
Sets the ISO date. */ PHP_FUNCTION(date_isodate_set) { zval *object; long y, w, d = 1; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll|l", &object, date_ce_date, &y, &w, &d) == FAILURE) { RETURN_FALSE; } php_date_isodate_set(object, y, w, d, return_value TSRMLS_CC);
0
[]
php-src
bb057498f7457e8b2eba98332a3bad434de4cf12
30,917,720,258,536,340,000,000,000,000,000,000,000
13
Fix #70277: new DateTimeZone($foo) is ignoring text after null byte The DateTimeZone constructors are not binary safe. They're parsing the timezone as string, but discard the length when calling timezone_initialize(). This patch adds a tz_len parameter and a respective check to timezone_initialize().
static long cmm_alloc_pages(long nr, long *counter, struct cmm_page_array **list) { struct cmm_page_array *pa, *npa; unsigned long addr; while (nr) { addr = __get_free_page(GFP_NOIO); if (!addr) break; spin_lock(&cmm_lock); pa = *list; if (!pa || pa->index >= CMM_NR_PAGES) { /* Need a new pag...
0
[]
linux
b8e51a6a9db94bc1fb18ae831b3dab106b5a4b5f
248,414,549,764,540,500,000,000,000,000,000,000,000
39
s390/cmm: fix information leak in cmm_timeout_handler() The problem is that we were putting the NUL terminator too far: buf[sizeof(buf) - 1] = '\0'; If the user input isn't NUL terminated and they haven't initialized the whole buffer then it leads to an info leak. The NUL terminator should be: buf[len - 1] = '\0...
static void virtio_msg_uint32_from_le(uint8_t *_msg, uint32_t size, uint32_t offset) { uint32_t i, *msg = (uint32_t *)(_msg + offset); /* offset - size % 4 should be 0 - extra bytes are ignored */ for (i = 0; i < (size - offset) / 4; i++) msg[i] = GUINT32_FROM_LE(msg[i]); }
0
[ "CWE-770" ]
spice-vd_agent
1a8b93ca6ac0b690339ab7f0afc6fc45d198d332
56,938,296,478,120,940,000,000,000,000,000,000,000
8
Avoids unchecked file transfer IDs allocation and usage Avoid agents allocating file transfers. The "active_xfers" entries are now inserted when client start sending files. Also different agents cannot mess with other agent transfers as a transfer is bound to a single agent. This issue was reported by SUSE security t...
inf_gtk_certificate_manager_dispose(GObject* object) { InfGtkCertificateManager* manager; InfGtkCertificateManagerPrivate* priv; GSList* item; manager = INF_GTK_CERTIFICATE_MANAGER(object); priv = INF_GTK_CERTIFICATE_MANAGER_PRIVATE(manager); if(priv->parent_window != NULL) { g_object_unref(priv->pa...
0
[ "CWE-295" ]
libinfinity
c97f870f5ae13112988d9f8ad464b4f679903706
121,188,014,625,001,840,000,000,000,000,000,000,000
33
Fix expired certificate validation (gobby #61)
TIFFWriteDirectoryTagCheckedSlongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int32* value) { assert(count<0x40000000); assert(sizeof(int32)==4); if (tif->tif_flags&TIFF_SWAB) TIFFSwabArrayOfLong((uint32*)value,count); return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_SLONG,cou...
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
179,753,650,503,388,460,000,000,000,000,000,000,000
8
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
static int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_sr_msg *sr = &req->sr_msg; if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; sr->msg_flags = READ_ONCE(sqe->msg_flags); sr->umsg = u64_to_user_ptr(READ_ONCE(sqe->addr)); sr->len = READ_ONCE(sqe->len)...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
208,364,849,327,778,370,000,000,000,000,000,000,000
17
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
HttpHdrRange::canonize (int64_t newClen) { clen = newClen; debugs(64, 3, "HttpHdrRange::canonize: started with " << specs.size() << " specs, clen: " << clen); std::vector<HttpHdrRangeSpec*> goods; getCanonizedSpecs(goods); merge (goods); debugs(64, 3, "HttpHdrRange::canonize: finished...
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
309,318,780,293,881,760,000,000,000,000,000,000,000
12
Handle more Range requests (#790) Also removed some effectively unused code.
usage_err(const char *buf) { return fputs(buf, stderr); }
0
[ "CWE-193" ]
sudo
b301b46b79c6e2a76d530fa36d05992e74952ee8
242,757,449,341,079,760,000,000,000,000,000,000,000
4
Reset valid_flags to MODE_NONINTERACTIVE for sudoedit. This is consistent with how the -e option is handled. Also reject -H and -P flags for sudoedit as was done in sudo 1.7. Found by Qualys, this is part of the fix for CVE-2021-3156.
enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be) { static const enum AVCodecID map[AV_SAMPLE_FMT_NB][2] = { [AV_SAMPLE_FMT_U8 ] = { AV_CODEC_ID_PCM_U8, AV_CODEC_ID_PCM_U8 }, [AV_SAMPLE_FMT_S16 ] = { AV_CODEC_ID_PCM_S16LE, AV_CODEC_ID_PCM_S16BE }, [AV_SAMPLE_FMT_S32 ] =...
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
329,788,457,814,144,200,000,000,000,000,000,000,000
21
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
ip_set_no_event_wait(self, wait) VALUE self; VALUE wait; { struct tcltkip *ptr = get_ip(self); /* ip is deleted? */ if (deleted_ip(ptr)) { return get_no_event_wait(self); } if (Tcl_GetMaster(ptr->ip) != (Tcl_Interp*)NULL) { /* slave IP */ return get_no_event_wait(se...
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
243,635,204,624,062,450,000,000,000,000,000,000,000
17
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
static void process_proxy_header(apr_table_t *headers, h2_proxy_stream *stream, const char *n, const char *v) { static const struct { const char *name; ap_proxy_header_reverse_map_fn func; } transform_hdrs[] = { { "Location", ap_proxy_location_reverse_ma...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
53,828,377,620,567,690,000,000,000,000,000,000,000
35
* 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 void bnx2x_remove_one(struct pci_dev *pdev) { struct net_device *dev = pci_get_drvdata(pdev); struct bnx2x *bp; if (!dev) { dev_err(&pdev->dev, "BAD net device from bnx2x_init_one\n"); return; } bp = netdev_priv(dev); __bnx2x_remove(pdev, dev, bp, true); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
327,632,519,440,750,430,000,000,000,000,000,000,000
13
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static int putint(jas_stream_t *out, int sgnd, int prec, long val) { int n; int c; bool s; ulong tmp; assert((!sgnd && prec >= 1) || (sgnd && prec >= 2)); if (sgnd) { val = encode_twos_comp(val, prec); } assert(val >= 0); val &= (1 << prec) - 1; n = (prec + 7) / 8; while (--n >= 0) { c = (val >> (n * 8))...
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
87,069,546,521,800,300,000,000,000,000,000,000,000
20
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
static int assign_eip_far(struct x86_emulate_ctxt *ctxt, ulong dst, const struct desc_struct *cs_desc) { enum x86emul_mode mode = ctxt->mode; #ifdef CONFIG_X86_64 if (ctxt->mode >= X86EMUL_MODE_PROT32 && cs_desc->l) { u64 efer = 0; ctxt->ops->get_msr(ctxt, MSR_EFER, &efer); if (efer & EFER_LMA) mode =...
0
[ "CWE-362", "CWE-269" ]
linux
f3747379accba8e95d70cec0eae0582c8c182050
333,732,905,076,717,540,000,000,000,000,000,000,000
18
KVM: x86: SYSENTER emulation is broken SYSENTER emulation is broken in several ways: 1. It misses the case of 16-bit code segments completely (CVE-2015-0239). 2. MSR_IA32_SYSENTER_CS is checked in 64-bit mode incorrectly (bits 0 and 1 can still be set without causing #GP). 3. MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSE...
pfm_mod_write_dbrs(struct task_struct *task, void *req, unsigned int nreq, struct pt_regs *regs) { pfm_context_t *ctx; if (req == NULL) return -EINVAL; ctx = GET_PMU_CTX(); if (ctx == NULL) return -EINVAL; /* * for now limit to current task, which is enough when calling * from overflow handler */ if (t...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
232,839,002,671,730,800,000,000,000,000,000,000,000
18
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
nautilus_file_add_emblem (NautilusFile *file, const char *emblem_name) { if (file->details->pending_info_providers) { file->details->pending_extension_emblems = g_list_prepend (file->details->pending_extension_emblems, g_strdup (emblem_name)); } else { file->details->extension_emblems = g_list_pr...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
152,880,642,933,991,110,000,000,000,000,000,000,000
13
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static inline void inode_sb_list_del(struct inode *inode) { if (!list_empty(&inode->i_sb_list)) { spin_lock(&inode->i_sb->s_inode_list_lock); list_del_init(&inode->i_sb_list); spin_unlock(&inode->i_sb->s_inode_list_lock); } }
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
57,581,108,624,505,270,000,000,000,000,000,000,000
8
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
static void phar_add_file(phar_archive_data **pphar, char *filename, int filename_len, char *cont_str, size_t cont_len, zval *zresource) { int start_pos=0; char *error; size_t contents_len; phar_entry_data *data; php_stream *contents_file = NULL; php_stream_statbuf ssb; if (filename_len >= (int)sizeof(".phar")-...
0
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
173,985,679,761,335,870,000,000,000,000,000,000,000
71
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
fstring_compile_expr(const char *expr_start, const char *expr_end, struct compiling *c, const node *n) { PyCompilerFlags cf; node *mod_n; mod_ty mod; char *str; Py_ssize_t len; const char *s; assert(expr_end >= expr_start); assert(*(expr_start-1) == '{'); asser...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
185,075,215,070,847,100,000,000,000,000,000,000,000
64
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
gst_matroska_demux_finalize (GObject * object) { GstMatroskaDemux *demux = GST_MATROSKA_DEMUX (object); gst_matroska_read_common_finalize (&demux->common); gst_flow_combiner_free (demux->flowcombiner); G_OBJECT_CLASS (parent_class)->finalize (object); }
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
14,236,115,828,103,800,000,000,000,000,000,000,000
8
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
static void sctp_process_ext_param(struct sctp_association *asoc, union sctp_params param) { __u16 num_ext = ntohs(param.p->length) - sizeof(struct sctp_paramhdr); struct net *net = sock_net(asoc->base.sk); int i; for (i = 0; i < num_ext; i++) { switch (param.ext->chunks[i]) { case SCTP_CID_RECONF: i...
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
318,519,293,350,714,100,000,000,000,000,000,000,000
39
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
static char **subsystems_from_mount_options(const char *mount_options, char **kernel_list) { char *token, *str, *saveptr = NULL; char **result = NULL; size_t result_capacity = 0; size_t result_count = 0; int saved_errno; int r; str = alloca(strlen(mount_options)+1); strcpy(str, mount_options); for (;...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
184,776,703,635,861,700,000,000,000,000,000,000,000
37
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
push(void) /* push onstack on to the stack */ { if (stackptr >= MAX_PUSHED) _nc_warning("string too complex to convert"); else stack[stackptr++] = onstack; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
275,964,786,153,613,850,000,000,000,000,000,000,000
8
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
int X509_check_trust(X509 *x, int id, int flags) { X509_TRUST *pt; int idx; if(id == -1) return 1; idx = X509_TRUST_get_by_id(id); if(idx == -1) return default_trust(id, x, flags); pt = X509_TRUST_get0(idx); return pt->check_trust(pt, x, flags); }
1
[]
openssl
d65b8b2162f33ac0d53dace588a0847ed827626c
10,895,955,079,239,676,000,000,000,000,000,000,000
10
Backport OCSP fixes.
DetectPostInspectFileFlagsUpdate(Flow *pflow, const SigGroupHead *sgh, uint8_t direction) { /* see if this sgh requires us to consider file storing */ if (!FileForceFilestore() && (sgh == NULL || sgh->filestore_cnt == 0)) { FileDisableStoring(pflow, direction); } #ifdef HAVE_MAGI...
0
[ "CWE-347" ]
suricata
d8634daf74c882356659addb65fb142b738a186b
65,195,745,963,100,160,000,000,000,000,000,000,000
48
stream: fix false negative on bad RST If a bad RST was received the stream inspection would not happen for that packet, but it would still move the 'raw progress' tracker forward. Following good packets would then fail to detect anything before the 'raw progress' position. Bug #2770 Reported-by: Alexey Vishnyakov
field_width_warning (const char *filename, const char *fieldname) { if (warn_option & CPIO_WARN_TRUNCATE) error (0, 0, _("%s: truncating %s"), filename, fieldname); }
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
172,336,459,204,186,070,000,000,000,000,000,000,000
5
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
usage(int code) { int i; FILE * out = (code == EXIT_SUCCESS) ? stdout : stderr; fprintf(out, "%s\n\n", TIFFGetVersion()); for (i = 0; stuff[i] != NULL; i++) fprintf(out, "%s\n", stuff[i]); exit(code); }
0
[ "CWE-119" ]
libtiff
98a254f5b92cea22f5436555ff7fceb12afee84d
118,752,773,188,802,320,000,000,000,000,000,000,000
10
enforce (configurable) memory limit in tiff2rgba fixes #207 fixes #209
uint16_fromregion(isc_region_t *region) { uint16_t val; unsigned char *cp = region->base; val = ((unsigned int)(cp[0])) << 8; val |= ((unsigned int)(cp[1])); isc_region_consume(region, 2); return (val); }
0
[ "CWE-617" ]
bind9
8d807cc21655eaa6e6a08afafeec3682c0f3f2ab
31,537,096,426,329,416,000,000,000,000,000,000,000
11
Fix crash in pk11_numbits() when native-pkcs11 is used When pk11_numbits() is passed a user provided input that contains all zeroes (via crafted DNS message), it would crash with assertion failure. Fix that by properly handling such input.
static int cac_cac1_get_certificate(sc_card_t *card, u8 **out_buf, size_t *out_len) { u8 buf[CAC_MAX_SIZE]; u8 *out_ptr; size_t size = 0; size_t left = 0; size_t len; sc_apdu_t apdu; int r = SC_SUCCESS; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); /* get the size */ size = left = *out_buf ? *out_len : siz...
0
[ "CWE-119", "CWE-787" ]
OpenSC
b75c002cfb1fd61cd20ec938ff4937d7b1a94278
129,045,472,773,530,430,000,000,000,000,000,000,000
54
cac1: Correctly handle the buffer limits Found by oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18618 and others
RnnDescriptor CreateRnnDescriptor() { cudnnRNNDescriptor_t result; CHECK_CUDNN_OK(cudnnCreateRNNDescriptor(&result)); return RnnDescriptor(result); }
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
65,794,927,656,865,805,000,000,000,000,000,000,000
5
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
tty_force_cursor_colour(struct tty *tty, const char *ccolour) { if (*ccolour == '\0') tty_putcode(tty, TTYC_CR); else tty_putcode_ptr1(tty, TTYC_CS, ccolour); free(tty->ccolour); tty->ccolour = xstrdup(ccolour); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
70,582,537,187,002,840,000,000,000,000,000,000,000
9
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
int pdf_modify_text_render_mode(pdf_text_state_t *pts, int render_mode) { switch (pts->in.render_mode) { case 0: if (render_mode == 1) { pts->in.render_mode = 2; return(1); } break; case 1: if (render_mode == 1) ...
0
[ "CWE-119" ]
ghostpdl
39b1e54b2968620723bf32e96764c88797714879
112,212,875,447,775,230,000,000,000,000,000,000,000
48
pdfwrite - Guard against trying to output an infinite number Bug #699255 " Buffer overflow on pprintg1 due to mishandle postscript file data to pdf" The file uses an enormous parameter to xyxhow, causing an overflow in the calculation of text positioning (value > 1e39). Since this is basically a nonsense value, and ...
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher, const unsigned char *key, size_t keylen, unsigned int flags) { CMS_ContentInfo *cms; if (!cipher) { CMSerr(CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT, ...
0
[ "CWE-311", "CWE-327" ]
openssl
08229ad838c50f644d7e928e2eef147b4308ad64
77,794,384,610,898,320,000,000,000,000,000,000,000
25
Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey An attack is simple, if the first CMS_recipientInfo is valid but the second CMS_recipientInfo is chosen ciphertext. If the second recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct encryption key will be replaced by garbage, and the mess...
static inline int xfrm_aevent_is_on(struct net *net) { struct sock *nlsk; int ret = 0; rcu_read_lock(); nlsk = rcu_dereference(net->xfrm.nlsk); if (nlsk) ret = netlink_has_listeners(nlsk, XFRMNLGRP_AEVENTS); rcu_read_unlock(); return ret; }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
148,064,511,140,394,020,000,000,000,000,000,000,000
12
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
struct file *filp_open(const char *filename, int flags, int mode) { return do_filp_open(AT_FDCWD, filename, flags, mode, 0); }
0
[ "CWE-20", "CWE-362", "CWE-416" ]
linux
86acdca1b63e6890540fa19495cfc708beff3d8b
68,234,598,268,990,500,000,000,000,000,000,000,000
4
fix autofs/afs/etc. magic mountpoint breakage We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT) if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type is bogus here; we want LAST_BIND for everything of that kind and we get LAST_NORM left over from finding parent directory. So make...
static void filterScanline(unsigned char* out, const unsigned char* scanline, const unsigned char* prevline, size_t length, size_t bytewidth, unsigned char filterType) { size_t i; switch(filterType) { case 0: /*None*/ for(i = 0; i < length; i++) out[i] = scanline[i]; bre...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
134,965,991,897,349,180,000,000,000,000,000,000,000
55
Fixed #5645: realloc return handling
QPDF::read_xref(qpdf_offset_t xref_offset) { std::map<int, int> free_table; while (xref_offset) { char buf[7]; memset(buf, 0, sizeof(buf)); this->m->file->seek(xref_offset, SEEK_SET); this->m->file->read(buf, sizeof(buf) - 1); // The PDF spec says xref must be followed by a line ...
1
[ "CWE-399", "CWE-835" ]
qpdf
85f05cc57ffa0a863d9d9b23e73acea9410b2937
114,914,915,474,107,950,000,000,000,000,000,000,000
63
Detect xref pointer infinite loop (fixes #149)