func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
const char * active_filter_module_name(void){ if (m != 0) return m->name; return ""; }
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
320,556,634,517,424,800,000,000,000,000,000,000,000
5
Fix various bugs found by OSS-Fuze.
static inline u32 norm_file_page(u32 page_size, u32 *l_size, bool use_default) { if (use_default) page_size = DefaultLogPageSize; /* Round the file size down to a system page boundary. */ *l_size &= ~(page_size - 1); /* File should contain at least 2 restart pages and MinLogRecordPages pages. */ if (*l_size < ...
0
[ "CWE-416" ]
linux
f26967b9f7a830e228bb13fb41bd516ddd9d789d
259,086,697,816,144,930,000,000,000,000,000,000,000
14
fs/ntfs3: Fix invalid free in log_replay log_read_rst() returns ENOMEM error when there is not enough memory. In this case, if info is returned without initialization, it attempts to kfree the uninitialized info->r_page pointer. This patch moves the memset initialization code to before log_read_rst() is called. Repor...
R_IPI RBinFile *r_bin_file_find_by_id(RBin *bin, ut32 bf_id) { RBinFile *bf; RListIter *iter; r_list_foreach (bin->binfiles, iter, bf) { if (bf->id == bf_id) { return bf; } } return NULL; }
0
[ "CWE-125" ]
radare2
193f4fe01d7f626e2ea937450f2e0c4604420e9d
155,080,892,672,747,110,000,000,000,000,000,000,000
10
Fix integer overflow in string search causing oobread ##crash * Reported by @greatergoodest via huntrdev * BountyID: 8a3dc5cb-08b3-4807-82b2-77f08c137a04 * Reproducer bfileovf
R_API ut64 r_bin_java_enclosing_methods_attr_calc_size(RBinJavaAttrInfo *attr) { ut64 size = 0; if (attr) { size += 6; // attr->info.enclosing_method_attr.class_idx = R_BIN_JAVA_USHORT (buffer, offset); size += 2; // attr->info.enclosing_method_attr.method_idx = R_BIN_JAVA_USHORT (buffer, offset); size += 2...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
94,302,683,530,688,980,000,000,000,000,000,000,000
11
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
gid_t enc_untrusted_getgid() { return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_getgid); }
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
90,077,802,753,698,720,000,000,000,000,000,000,000
3
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
iperf_on_connect(struct iperf_test *test) { time_t now_secs; const char* rfc1123_fmt = "%a, %d %b %Y %H:%M:%S GMT"; char now_str[100]; char ipr[INET6_ADDRSTRLEN]; int port; struct sockaddr_storage sa; struct sockaddr_in *sa_inP; struct sockaddr_in6 *sa_in6P; socklen_t len; int op...
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
232,712,253,349,420,200,000,000,000,000,000,000,000
71
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
struct tevent_req *_tstream_tls_connect_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct tstream_context *plain_stream, struct tstream_tls_params *tls_params, const char *location) { struct tevent_req *req; struct tstream_tls_connect_state *state; #if ENABLE_GNUTLS ...
0
[]
samba
22af043d2f20760f27150d7d469c7c7b944c6b55
288,567,388,237,974,900,000,000,000,000,000,000,000
90
CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@s...
static int ip4ip6_gro_complete(struct sk_buff *skb, int nhoff) { skb->encapsulation = 1; skb_shinfo(skb)->gso_type |= SKB_GSO_IPXIP6; return inet_gro_complete(skb, nhoff); }
0
[ "CWE-125" ]
linux
2423496af35d94a87156b063ea5cedffc10a70a1
127,106,259,210,784,790,000,000,000,000,000,000,000
6
ipv6: Prevent overrun when parsing v6 header options The KASAN warning repoted below was discovered with a syzkaller program. The reproducer is basically: int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP); send(s, &one_byte_of_data, 1, MSG_MORE); send(s, &more_than_mtu_bytes_data, 2000, 0); The socket() call set...
template<typename t> CImg<T> get_sort(CImg<t>& permutations, const bool is_increasing=true) const { return (+*this).sort(permutations,is_increasing);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
194,219,638,345,091,450,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
shared_ptr<BufferedUpload> receiveRequestBody(request_rec *r) { TRACE_POINT(); DirConfig *config = getDirConfig(r); shared_ptr<BufferedUpload> tempFile; try { ServerInstanceDir::GenerationPtr generation = agentsStarter.getGeneration(); string uploadBufferDir = config->getUploadBufferDir(generation); t...
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
255,441,245,322,969,950,000,000,000,000,000,000,000
29
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
int cipso_v4_cache_add(const unsigned char *cipso_ptr, const struct netlbl_lsm_secattr *secattr) { int ret_val = -EPERM; u32 bkt; struct cipso_v4_map_cache_entry *entry = NULL; struct cipso_v4_map_cache_entry *old_entry = NULL; u32 cipso_ptr_len; if (!cipso_v4_cache_enabled || cipso_v4_cache_bucketsize ...
0
[ "CWE-835" ]
linux
40413955ee265a5e42f710940ec78f5450d49149
108,481,101,031,361,210,000,000,000,000,000,000,000
48
Cipso: cipso_v4_optptr enter infinite loop in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop. Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com> Acked-by: Paul Moore <paul@paul-moore.com> Signed-o...
Sql_mode_dependency value_depends_on_sql_mode() const { return Item_args::value_depends_on_sql_mode_bit_or().soft_to_hard(); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
304,326,113,458,686,300,000,000,000,000,000,000,000
4
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....
const char *imap_cmd_trailer(struct ImapAccountData *adata) { static const char *notrailer = ""; const char *s = adata->buf; if (!s) { mutt_debug(LL_DEBUG2, "not a tagged response\n"); return notrailer; } s = imap_next_word((char *) s); if (!s || (!mutt_str_startswith(s, "OK", CASE_IGNORE) && ...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
302,234,390,680,779,370,000,000,000,000,000,000,000
26
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
DeepTiledInputFile::DeepTiledInputFile (InputPartData* part) : _data (new Data (part->numThreads)) { _data->_deleteStream=false; try { multiPartInitialize(part); } catch(...) { delete _data; throw; } }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
248,039,619,132,786,600,000,000,000,000,000,000,000
14
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
sf_current_byterate (SNDFILE *sndfile) { SF_PRIVATE *psf ; if ((psf = (SF_PRIVATE*) sndfile) == NULL) return -1 ; if (psf->Magick != SNDFILE_MAGICK) return -1 ; /* This should cover all PCM and floating point formats. */ if (psf->bytewidth) return psf->sf.samplerate * psf->sf.channels * psf->bytewidth ; ...
0
[ "CWE-119", "CWE-787" ]
libsndfile
708e996c87c5fae77b104ccfeb8f6db784c32074
26,695,374,240,419,063,000,000,000,000,000,000,000
39
src/ : Move to a variable length header buffer Previously, the `psf->header` buffer was a fixed length specified by `SF_HEADER_LEN` which was set to `12292`. This was problematic for two reasons; this value was un-necessarily large for the majority of files and too small for some others. Now the size of the header bu...
int Item::save_in_field_no_warnings(Field *field, bool no_conversions) { int res; TABLE *table= field->table; THD *thd= table->in_use; enum_check_fields tmp= thd->count_cuted_fields; my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set); ulonglong sql_mode= thd->variables.sql_mode; thd...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
162,184,057,210,680,000,000,000,000,000,000,000,000
19
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; re_syntax_options = syntax; return ret; }
0
[ "CWE-19" ]
gnulib
5513b40999149090987a0341c018d05d3eea1272
83,632,269,382,105,880,000,000,000,000,000,000,000
8
Diagnose ERE '()|\1' Problem reported by Hanno Böck in: http://bugs.gnu.org/21513 * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep track of the set of previously-completed subexpressions available before the first alternative, and restore this set just before parsing each subsequent alternative. This...
int _gnutls_initialize_session_ticket_key_rotation(gnutls_session_t session, const gnutls_datum_t *key) { if (unlikely(session == NULL || key == NULL)) return gnutls_assert_val(GNUTLS_E_INTERNAL_ERROR); if (unlikely(session->key.totp.last_result != 0)) return GNUTLS_E_INVALID_REQUEST; memcpy(session->key.initi...
0
[]
gnutls
c2646aeee94e71cb15c90a3147cf3b5b0ca158ca
285,911,035,856,718,870,000,000,000,000,000,000,000
13
stek: differentiate initial state from valid time window of TOTP There was a confusion in the TOTP implementation in stek.c. When the mechanism is initialized at the first time, it records the timestamp but doesn't initialize the key. This removes the timestamp recording at the initialization phase, so the key is pr...
ssize_t blk_mq_tag_sysfs_show(struct blk_mq_tags *tags, char *page) { char *orig_page = page; unsigned int free, res; if (!tags) return 0; page += sprintf(page, "nr_tags=%u, reserved_tags=%u, " "bits_per_word=%u\n", tags->nr_tags, tags->nr_reserved_tags, tags->bitmap_tags.bits_per_word); free = bt_un...
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
324,729,868,897,853,700,000,000,000,000,000,000,000
21
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
_XimDelayModeSetICValues(ic, arg) Xic ic; XIMArg *arg; { XimDefICValues ic_values; char *name; _XimGetCurrentICValues(ic, &ic_values); name = _XimSetICValueData(ic, (XPointer)&ic_values, ic->private.proto.ic_resources, ic->private.proto.ic_num_resources, arg, XIM_SETICVALUES, Fal...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
164,008,582,991,514,320,000,000,000,000,000,000,000
15
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
def_raw_print(s) const char *s; { puts(s); }
0
[ "CWE-120", "CWE-269" ]
NetHack
f3def5c0b999478da2d0a8f0b6a7c370a2065f77
57,033,202,677,388,700,000,000,000,000,000,000,000
5
command line triggered buffer overruns Prevent extremely long command line arguments from overflowing local buffers in raw_printf or config_error_add. The increased buffer sizes they recently got to deal with long configuration file values aren't sufficient to handle command line induced overflows. choose_windows(co...
static int incomplete_class_has_property(zval *object, zval *member, int check_empty, const zend_literal *key TSRMLS_DC) /* {{{ */ { incomplete_class_message(object, E_NOTICE TSRMLS_CC); return 0; }
0
[]
php-src
fb83c76deec58f1fab17c350f04c9f042e5977d1
5,737,735,275,398,996,000,000,000,000,000,000,000
5
Check that the type is correct
void MirrorJob::SetOlderThan(const char *f) { struct timespec ts; if(parse_datetime(&ts,f,0)) { older_than=ts.tv_sec; return; } struct stat st; if(stat(f,&st)==-1) { perror(f); return; } older_than=st.st_mtime; }
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
24,285,134,282,338,080,000,000,000,000,000,000,000
16
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
f_inputsave(typval_T *argvars UNUSED, typval_T *rettv) { /* Add an entry to the stack of typeahead storage. */ if (ga_grow(&ga_userinput, 1) == OK) { save_typeahead((tasave_T *)(ga_userinput.ga_data) + ga_userinput.ga_len); ++ga_userinput.ga_len; /* default return is zero == OK */ } ...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
62,447,203,040,319,190,000,000,000,000,000,000,000
13
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.
virDomainFSTrim(virDomainPtr dom, const char *mountPoint, unsigned long long minimum, unsigned int flags) { VIR_DOMAIN_DEBUG(dom, "mountPoint=%s, minimum=%llu, flags=%x", mountPoint, minimum, flags); virResetLastError(); virCheckDomainRe...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
317,995,643,729,797,580,000,000,000,000,000,000,000
27
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
const Status status() const { return status_; }
0
[ "CWE-345" ]
tensorflow
368af875869a204b4ac552b9ddda59f6a46a56ec
86,591,463,493,744,100,000,000,000,000,000,000,000
1
Avoid buffer overflow when loading tensors with insufficient data from checkpoints. `CopyDataFromTensorSliceToTensorSlice` does not (and cannot conveniently) provide any bounds checking on its own, so the size is instead checked prior to passing unvalidated data to that function. PiperOrigin-RevId: 392971286 Change-I...
static bool encode_verify_name_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_verify_name_control *lvnc = talloc_get_type(in, struct ldb_verify_name_control); struct asn1_data *data = asn1_init(mem_ctx); DATA_BLOB gc_utf16; if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { r...
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
58,268,020,992,168,455,000,000,000,000,000,000,000
41
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
static void json_delete_array(json_array_t *array) { size_t i; for(i = 0; i < array->entries; i++) json_decref(array->table[i]); jsonp_free(array->table); jsonp_free(array); }
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
310,207,925,030,889,500,000,000,000,000,000,000,000
10
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
int unlzw(in, out) int in, out; /* input and output file descriptors */ { REG2 char_type *stackp; REG3 code_int code; REG4 int finchar; REG5 code_int oldcode; REG6 code_int incode; REG7 long inbits; REG8 long posbits; REG9 int outpo...
1
[ "CWE-189" ]
gzip
a3db5806d012082b9e25cc36d09f19cd736a468f
125,645,676,816,388,480,000,000,000,000,000,000,000
189
gzip -d: do not clobber stack for valid input on x86_64 * unlzw.c (unlzw): Avoid integer overflow. Aki Helin reported the segfault along with an input to trigger the bug. * NEWS (Bug fixes): Mention it.
sraRgnCreate(void) { return (sraRegion*)sraSpanListCreate(); }
0
[ "CWE-476" ]
libvncserver
38e98ee61d74f5f5ab4aa4c77146faad1962d6d0
239,429,241,392,652,740,000,000,000,000,000,000,000
3
libvncserver: add missing NULL pointer checks
apr_byte_t oidc_cache_mutex_lock(server_rec *s, oidc_cache_mutex_t *m) { apr_status_t rv = apr_global_mutex_lock(m->mutex); if (rv != APR_SUCCESS) oidc_serror(s, "apr_global_mutex_lock() failed: %s (%d)", oidc_cache_status2str(rv), rv); return TRUE; }
0
[ "CWE-330" ]
mod_auth_openidc
375407c16c61a70b56fdbe13b0d2c8f11398e92c
89,794,252,052,687,870,000,000,000,000,000,000,000
10
use encrypted JWTs for storing encrypted cache contents - avoid using static AAD/IV; thanks @niebardzo - bump to 2.4.9-dev Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
asmlinkage void do_notify_resume(__u32 thread_info_flags) { /* pending single-step? */ if (thread_info_flags & _TIF_SINGLESTEP) clear_thread_flag(TIF_SINGLESTEP); /* deal with pending signal delivery */ if (thread_info_flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK)) do_signal(); /* deal with notification o...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
334,608,346,120,831,240,000,000,000,000,000,000,000
19
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...
mcs_parse_domain_params(STREAM s) { uint32 length; struct stream packet = *s; ber_parse_header(s, MCS_TAG_DOMAIN_PARAMS, &length); if (!s_check_rem(s, length)) { rdp_protocol_error("mcs_parse_domain_params(), consume domain params from stream would overrun", &packet); } in_uint8s(s, length); return s_chec...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
55,199,490,500,835,910,000,000,000,000,000,000,000
16
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
void DSA_PrivateKey::SetPrivatePart(const Integer& x) { x_ = x; }
0
[]
mysql-server
5c6169fb309981b564a17bee31b367a18866d674
317,509,930,793,939,360,000,000,000,000,000,000,000
4
Bug #24740291: YASSL UPDATE TO 2.4.2
void free_used_memory() { uint i; DBUG_ENTER("free_used_memory"); if (connections) close_connections(); close_files(); my_hash_free(&var_hash); for (i= 0 ; i < q_lines.elements ; i++) { struct st_command **q= dynamic_element(&q_lines, i, struct st_command**); my_free((*q)->query_buf); if...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
294,064,452,257,535,430,000,000,000,000,000,000,000
42
mysqltest: don't eat new lines in --exec pass them through as is
static int slab_offline_cpu(unsigned int cpu) { /* * Shutdown cache reaper. Note that the slab_mutex is held so * that if cache_reap() is invoked it cannot do anything * expensive but will only modify reap_work and reschedule the * timer. */ cancel_delayed_work_sync(&per_cpu(slab_reap_work, cpu)); /* Now t...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
165,323,594,972,467,540,000,000,000,000,000,000,000
13
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static int tg3_fiber_aneg_smachine(struct tg3 *tp, struct tg3_fiber_aneginfo *ap) { u16 flowctrl; unsigned long delta; u32 rx_cfg_reg; int ret; if (ap->state == ANEG_STATE_UNKNOWN) { ap->rxconfig = 0; ap->link_time = 0; ap->cur_time = 0; ap->ability_match_cfg = 0; ap->ability_match_count = 0; a...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
255,157,328,497,594,560,000,000,000,000,000,000,000
251
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
local int build_bl_tree(s) deflate_state *s; { int max_blindex; /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ scan_tree(s, (ct_data *)s->dyn_ltree, s->l_desc.max_code); scan_tree(s, (ct_data *)s->dyn_dtree, s->d_desc....
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
316,891,387,667,821,860,000,000,000,000,000,000,000
29
Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare input...
int dtls1_do_write(SSL *s, int type) { int ret; int curr_mtu; unsigned int len, frag_off, mac_size, blocksize; /* AHA! Figure out the MTU, and stick to the right size */ if (s->d1->mtu < dtls1_min_mtu() && !(SSL_get_options(s) & SSL_OP_NO_QUERY_MTU)) { s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGR...
0
[ "CWE-310" ]
openssl
34628967f1e65dc8f34e000f0f5518e21afbfc7b
30,204,043,947,380,230,000,000,000,000,000,000,000
179
Fix DTLS retransmission from previous session. For DTLS we might need to retransmit messages from the previous session so keep a copy of write context in DTLS retransmission buffers instead of replacing it after sending CCS. CVE-2013-6450.
virDomainNetGetActualBridgeMACTableManager(const virDomainNetDef *iface) { if (iface->type == VIR_DOMAIN_NET_TYPE_NETWORK && iface->data.network.actual && (iface->data.network.actual->type == VIR_DOMAIN_NET_TYPE_BRIDGE || iface->data.network.actual->type == VIR_DOMAIN_NET_TYPE_NETWORK)) ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
135,343,016,650,907,400,000,000,000,000,000,000,000
9
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static void __exit usbvision_exit(void) { PDEBUG(DBG_PROBE, ""); usb_deregister(&usbvision_driver); PDEBUG(DBG_PROBE, "success"); }
0
[ "CWE-17" ]
media_tree
fa52bd506f274b7619955917abfde355e3d19ffe
165,517,530,625,201,810,000,000,000,000,000,000,000
7
[media] usbvision: fix crash on detecting device with invalid configuration The usbvision driver crashes when a specially crafted usb device with invalid number of interfaces or endpoints is detected. This fix adds checks that the device has proper configuration expected by the driver. Reported-by: Ralf Spenneberg <r...
parse_listitem(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t size, int *flags) { struct buf *work = 0, *inter = 0; size_t beg = 0, end, pre, sublist = 0, orgpre = 0, i; int in_empty = 0, has_inside_empty = 0, in_fence = 0; /* keeping track of the first indentation prefix */ while (orgpre < 3 && ...
0
[]
redcarpet
e5a10516d07114d582d13b9125b733008c61c242
88,678,968,888,477,610,000,000,000,000,000,000,000
131
Avoid rewinding previous inline when auto-linking When a bit like "_foo_1@bar.com" is processed, first the emphasis is rendered, then the 1 is output verbatim. When the `@` is encountered, Redcarpet tries to find the "local part" of the address and stops when it encounters an invalid char (i.e. here the `!`). The pro...
static pyc_object *get_interned_object(RzBuffer *buffer) { pyc_object *ret = NULL; bool error = false; ut32 n = 0; n = get_ut32(buffer, &error); if (n > ST32_MAX) { RZ_LOG_ERROR("bad marshal data (string size out of range)"); return NULL; } if (error) { return NULL; } ret = RZ_NEW0(pyc_object); if (!re...
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
169,919,388,047,023,600,000,000,000,000,000,000,000
26
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
void virtqueue_get_avail_bytes(VirtQueue *vq, unsigned int *in_bytes, unsigned int *out_bytes, unsigned max_in_bytes, unsigned max_out_bytes) { unsigned int idx; unsigned int total_bufs, in_total, out_total; idx = vq->last_avail_idx; total_...
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
43,941,504,767,536,330,000,000,000,000,000,000,000
69
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
TfLiteStatus Prepare(KernelType kernel_type, TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteConvParams*>(node->builtin_data); OpData* data = reinterpret_cast<OpData*>(node->user_data); bool has_bias = node->inputs->size == 3; // Check number of inputs/out...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
271,187,386,319,173,360,000,000,000,000,000,000,000
269
[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...
pseudo_random_number(int max) { unsigned int r; int i, needed_len; uschar *p; uschar smallbuf[sizeof(r)]; if (max <= 1) return 0; /* OpenSSL auto-seeds from /dev/random, etc, but this a double-check. */ if (!RAND_status()) { randstuff r; gettimeofday(&r.tv, NULL); r.p = getpid(); RAND_seed((uschar *)(&r)...
0
[]
exim
7be682ca5ebd9571a01b762195b11c34cd231830
124,879,906,096,205,350,000,000,000,000,000,000,000
48
TLS SNI support for OpenSSL ($tls_sni)
connect_callback (GDBusProxy *proxy, GAsyncResult *res, GSimpleAsyncResult *simple) { gboolean retval; GError *error = NULL; retval = device1_call_connect_finish (DEVICE1(proxy), res, &error); if (retval == FALSE) { g_debug ("Connect failed for %s: %s", g_dbus_proxy_get_object_path (pro...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
179,589,844,769,515,600,000,000,000,000,000,000,000
22
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
Message *_dequeue() override { if (messages.empty()) return NULL; Message *m = messages.front(); messages.pop_front(); return m; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
6,009,069,674,970,398,000,000,000,000,000,000,000
7
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
PyImaging_XbmEncoderNew(PyObject* self, PyObject* args) { ImagingEncoderObject* encoder; encoder = PyImaging_EncoderNew(0); if (encoder == NULL) return NULL; if (get_packer(encoder, "1", "1;R") < 0) return NULL; encoder->encode = ImagingXbmEncode; return (PyObject*) encoder; }
0
[ "CWE-119" ]
Pillow
a130c45990578a1bb0a6a000ed1b110e27324910
217,571,463,971,646,220,000,000,000,000,000,000,000
15
add several TIFF decoders and encoders
void getrangeCommand(client *c) { robj *o; long long start, end; char *str, llbuf[32]; size_t strlen; if (getLongLongFromObjectOrReply(c,c->argv[2],&start,NULL) != C_OK) return; if (getLongLongFromObjectOrReply(c,c->argv[3],&end,NULL) != C_OK) return; if ((o = lookupKeyReadO...
0
[ "CWE-190" ]
redis
92e3b1802f72ca0c5b0bde97f01d9b57a758d85c
41,820,285,827,722,010,000,000,000,000,000,000,000
40
Fix integer overflow in STRALGO LCS (CVE-2021-29477) An integer overflow bug in Redis version 6.0 or newer could be exploited using the STRALGO LCS command to corrupt the heap and potentially result with remote code execution. (cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9)
RZ_API void rz_bin_dex_checksum(RZ_NONNULL RzBinDex *dex, RZ_NONNULL RzBinHash *hash) { rz_return_if_fail(dex && hash); hash->type = "adler32"; hash->len = sizeof(dex->checksum); hash->addr = dex->checksum_offset; hash->from = dex->checksum_offset + sizeof(dex->checksum); hash->to = dex->file_size - hash->from; ...
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
250,604,977,455,301,800,000,000,000,000,000,000,000
9
fix #2969 - oob write (1 byte) in dex.c
ptaReadMem(const l_uint8 *data, size_t size) { FILE *fp; PTA *pta; PROCNAME("ptaReadMem"); if (!data) return (PTA *)ERROR_PTR("data not defined", procName, NULL); if ((fp = fopenReadFromMemory(data, size)) == NULL) return (PTA *)ERROR_PTR("stream not opened", procNa...
0
[ "CWE-119", "CWE-787" ]
leptonica
ee301cb2029db8a6289c5295daa42bba7715e99a
293,321,859,941,791,180,000,000,000,000,000,000,000
18
Security fixes: expect final changes for release 1.75.3. * Fixed a debian security issue with fscanf() reading a string with possible buffer overflow. * There were also a few similar situations with sscanf().
static GF_Err gf_export_message(GF_MediaExporter *dumper, GF_Err e, char *format, ...) { if (dumper->flags & GF_EXPORT_PROBE_ONLY) return e; #ifndef GPAC_DISABLE_LOG if (gf_log_tool_level_on(GF_LOG_AUTHOR, e ? GF_LOG_ERROR : GF_LOG_WARNING)) { va_list args; char szMsg[1024]; va_start(args, format); vsnprintf...
0
[ "CWE-476" ]
gpac
00194f5fe462123f70b0bae7987317b52898b868
279,744,596,465,401,530,000,000,000,000,000,000,000
16
fixed #1769 (fuzz)
static void __jbd2_journal_unreserve_handle(handle_t *handle, transaction_t *t) { journal_t *journal = handle->h_journal; WARN_ON(!handle->h_reserved); sub_reserved_credits(journal, handle->h_total_credits); if (t) atomic_sub(handle->h_total_credits, &t->t_outstanding_credits); }
0
[ "CWE-416" ]
linux
cc16eecae687912238ee6efbff71ad31e2bc414e
37,215,747,728,299,304,000,000,000,000,000,000,000
9
jbd2: fix use-after-free of transaction_t race jbd2_journal_wait_updates() is called with j_state_lock held. But if there is a commit in progress, then this transaction might get committed and freed via jbd2_journal_commit_transaction() -> jbd2_journal_free_transaction(), when we release j_state_lock. So check for jou...
*/ int dev_get_port_parent_id(struct net_device *dev, struct netdev_phys_item_id *ppid, bool recurse) { const struct net_device_ops *ops = dev->netdev_ops; struct netdev_phys_item_id first = { }; struct net_device *lower_dev; struct list_head *iter; int err; if (ops->ndo_get_port_parent_id) { err ...
0
[ "CWE-416" ]
linux
a4270d6795b0580287453ea55974d948393e66ef
263,771,366,529,771,900,000,000,000,000,000,000,000
35
net-gro: fix use-after-free read in napi_gro_frags() If a network driver provides to napi_gro_frags() an skb with a page fragment of exactly 14 bytes, the call to gro_pull_from_frag0() will 'consume' the fragment by calling skb_frag_unref(skb, 0), and the page might be freed and reused. Reading eth->h_proto at the en...
static inline void Eagle2X(const Image *source,const Quantum *pixels, Quantum *result,const size_t channels) { ssize_t i; (void) source; for (i=0; i < 4; i++) CopyPixels(pixels,4,result,i,channels); if (PixelsEqual(pixels,0,pixels,1,channels) && PixelsEqual(pixels,1,pixels,3,channels)) Copy...
0
[ "CWE-369" ]
ImageMagick
43539e67a47d2f8de832d33a5b26dc2a7a12294f
221,801,446,514,076,650,000,000,000,000,000,000,000
22
https://github.com/ImageMagick/ImageMagick/issues/1718
static int kvm_vcpu_release(struct inode *inode, struct file *filp) { struct kvm_vcpu *vcpu = filp->private_data; kvm_put_kvm(vcpu->kvm); return 0; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
330,985,142,140,596,500,000,000,000,000,000,000,000
7
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
int udp_get_port(struct sock *sk, unsigned short snum, int (*saddr_cmp)(const struct sock *sk1, const struct sock *sk2)) { struct hlist_node *node; struct hlist_head *head; struct sock *sk2; int error = 1; write_lock_bh(&udp_hash_lock); if (snum == 0) { int best_size_so_far, best, result, i; if (udp_p...
0
[ "CWE-476" ]
linux-2.6
1e0c14f49d6b393179f423abbac47f85618d3d46
335,331,958,588,780,960,000,000,000,000,000,000,000
71
[UDP]: Fix MSG_PROBE crash UDP tracks corking status through the pending variable. The IP layer also tracks it through the socket write queue. It is possible for the two to get out of sync when MSG_PROBE is used. This patch changes UDP to check the write queue to ensure that the two stay in sync. Signed-off-by: He...
static int ntop_getservbyport(lua_State* vm) { int port; char *proto; struct servent *s = NULL; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR); port = (int)lua_tonumber(vm, 1); if(ntop_lua_check(vm, __...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
260,610,387,573,656,830,000,000,000,000,000,000,000
27
Security fix: prevents empty host from being used
parse_edns_options(uint8_t* rdata_ptr, size_t rdata_len, struct edns_data* edns, struct regional* region) { /* while still more options, and have code+len to read */ /* ignores partial content (i.e. rdata len 3) */ while(rdata_len >= 4) { uint16_t opt_code = sldns_read_uint16(rdata_ptr); uint16_t opt_len = sldn...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
184,903,660,537,317,830,000,000,000,000,000,000,000
22
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
ldns_str2rdf_nsec(ldns_rdf **rd, const char *str) { const char *delimiters = "\n\t "; char *token = LDNS_XMALLOC(char, LDNS_MAX_RDFLEN); ldns_buffer *str_buf; ssize_t c; uint16_t cur_type; size_t type_count = 0; ldns_rr_type type_list[65536]; if(!token) return LDNS_STATUS_MEM_ERR; if(rd == NULL) { LDNS_FREE(...
0
[]
ldns
3bdeed02505c9bbacb3b64a97ddcb1de967153b7
59,768,283,021,230,130,000,000,000,000,000,000,000
46
bugfix #1257: Free after reallocing to 0 size Thanks Stephan Zeisberg
TEST(WriterTest, hex) { using fmt::hex; fmt::IntFormatSpec<int, fmt::TypeSpec<'x'> > (*phex)(int value) = hex; phex(42); // This shouldn't compile: //fmt::IntFormatSpec<short, fmt::TypeSpec<'x'> > (*phex2)(short value) = hex; EXPECT_EQ("cafe", (MemoryWriter() << hex(0xcafe)).str()); EXPECT_EQ("babe", (Me...
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
155,223,318,918,056,300,000,000,000,000,000,000,000
14
Fix segfault on complex pointer formatting (#642)
static bool mnt_ns_loop(struct dentry *dentry) { /* Could bind mounting the mount namespace inode cause a * mount namespace loop? */ struct mnt_namespace *mnt_ns; if (!is_mnt_ns_file(dentry)) return false; mnt_ns = to_mnt_ns(get_proc_ns(dentry->d_inode)); return current->nsproxy->mnt_ns->seq >= mnt_ns->seq;...
0
[ "CWE-703" ]
linux
cd4a40174b71acd021877341684d8bb1dc8ea4ae
2,698,036,653,311,056,300,000,000,000,000,000,000
12
mnt: Fail collect_mounts when applied to unmounted mounts The only users of collect_mounts are in audit_tree.c In audit_trim_trees and audit_add_tree_rule the path passed into collect_mounts is generated from kern_path passed an audit_tree pathname which is guaranteed to be an absolute path. In those cases collect_...
pfm_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len, unsigned long pgoff, unsigned long flags, unsigned long exec) { return get_unmapped_area(file, addr, len, pgoff, flags); }
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
287,635,092,303,198,030,000,000,000,000,000,000,000
4
[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...
BPF_CALL_2(bpf_ringbuf_submit, void *, sample, u64, flags) { bpf_ringbuf_commit(sample, flags, false /* discard */); return 0; }
0
[ "CWE-787" ]
bpf
4b81ccebaeee885ab1aa1438133f2991e3a2b6ea
69,807,125,746,764,110,000,000,000,000,000,000,000
5
bpf, ringbuf: Deny reserve of buffers larger than ringbuf A BPF program might try to reserve a buffer larger than the ringbuf size. If the consumer pointer is way ahead of the producer, that would be successfully reserved, allowing the BPF program to read or write out of the ringbuf allocated area. Reported-by: Ryota...
static void test_splitting_mem_unmap(void) { uc_engine *uc; OK(uc_open(UC_ARCH_X86, UC_MODE_32, &uc)); OK(uc_mem_map(uc, 0x20000, 0x1000, UC_PROT_NONE)); OK(uc_mem_map(uc, 0x21000, 0x2000, UC_PROT_NONE)); OK(uc_mem_unmap(uc, 0x21000, 0x1000)); OK(uc_close(uc)); }
0
[ "CWE-476" ]
unicorn
3d3deac5e6d38602b689c4fef5dac004f07a2e63
182,335,571,306,344,930,000,000,000,000,000,000,000
13
Fix crash when mapping a big memory and calling uc_close
xmlTextReaderConstXmlLang(xmlTextReaderPtr reader) { xmlChar *tmp; const xmlChar *ret; if (reader == NULL) return(NULL); if (reader->node == NULL) return(NULL); tmp = xmlNodeGetLang(reader->node); if (tmp == NULL) return(NULL); ret = CONSTSTR(tmp); xmlFree(tmp); return(ret...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
225,217,218,835,440,300,000,000,000,000,000,000,000
15
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
DeleteSequenceTuple(Oid relid) { Relation rel; HeapTuple tuple; rel = heap_open(SequenceRelationId, RowExclusiveLock); tuple = SearchSysCache1(SEQRELID, ObjectIdGetDatum(relid)); if (!HeapTupleIsValid(tuple)) elog(ERROR, "cache lookup failed for sequence %u", relid); CatalogTupleDelete(rel, &tuple->t_self); ...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
71,880,502,034,738,640,000,000,000,000,000,000,000
16
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static void __inet_del_ifa(struct in_device *in_dev, struct in_ifaddr **ifap, int destroy, struct nlmsghdr *nlh, u32 portid) { struct in_ifaddr *promote = NULL; struct in_ifaddr *ifa, *ifa1 = *ifap; struct in_ifaddr *last_prim = in_dev->ifa_list; struct in_ifaddr *prev_prom = NULL; int do_promote = IN_DEV_PROM...
1
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
144,202,068,653,295,480,000,000,000,000,000,000,000
99
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
static int process_backlog(struct napi_struct *napi, int quota) { int work = 0; struct softnet_data *queue = &__get_cpu_var(softnet_data); unsigned long start_time = jiffies; napi->weight = weight_p; do { struct sk_buff *skb; local_irq_disable(); skb = __skb_dequeue(&queue->input_pkt_queue); if (!skb) { ...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
281,550,348,688,069,060,000,000,000,000,000,000,000
24
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static void print_res_top(MYSQL_RES *result) { uint i,length; MYSQL_FIELD *field; putchar('+'); mysql_field_seek(result,0); while((field = mysql_fetch_field(result))) { if ((length=(uint) strlen(field->name)) > field->max_length) field->max_length=length; else length=field->max_length; ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
274,135,940,471,261,200,000,000,000,000,000,000,000
19
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
PCR_ERes GC_push_old_obj(void *p, size_t size, PCR_Any data) { GC_push_all_stack((ptr_t)p, (ptr_t)p + size); return(PCR_ERes_okay); }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
127,206,343,879,286,070,000,000,000,000,000,000,000
5
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
bool memcpy_field_possible(const Field *from) const { return real_type() == from->real_type() && decimals() == from->decimals(); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
206,852,552,807,178,030,000,000,000,000,000,000,000
5
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static CURLcode create_conn(struct SessionHandle *data, struct connectdata **in_connect, bool *async) { CURLcode result = CURLE_OK; struct connectdata *conn; struct connectdata *conn_temp = NULL; size_t urllen; char *user = NULL; char *passwd = NULL; ...
0
[ "CWE-287" ]
curl
d41dcba4e9b69d6b761e3460cc6ae7e8fd8f621f
148,434,789,167,925,940,000,000,000,000,000,000,000
532
NTLM: Fix ConnectionExists to compare Proxy credentials Proxy NTLM authentication should compare credentials when re-using a connection similar to host authentication, as it authenticate the connection. Example: curl -v -x http://proxy:port http://host/ -U good_user:good_pwd --proxy-ntlm --next -x http://proxy:port...
clientBeginRequest(const HttpRequestMethod& method, char const *url, CSCB * streamcallback, CSD * streamdetach, ClientStreamData streamdata, HttpHeader const *header, char *tailbuf, size_t taillen, const MasterXaction::Pointer &mx) { size_t url_sz; ClientHttpRequest *http =...
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
120,329,115,151,850,730,000,000,000,000,000,000,000
87
Handle more Range requests (#790) Also removed some effectively unused code.
void dput(struct dentry *dentry) { if (unlikely(!dentry)) return; repeat: rcu_read_lock(); if (likely(fast_dput(dentry))) { rcu_read_unlock(); return; } /* Slow case: now with the dentry lock held */ rcu_read_unlock(); /* Unreachable? Get rid of it */ if (unlikely(d_unhashed(dentry))) goto kill_it; ...
0
[ "CWE-401", "CWE-254" ]
linux
cde93be45a8a90d8c264c776fab63487b5038a65
157,478,596,685,401,350,000,000,000,000,000,000,000
40
dcache: Handle escaped paths in prepend_path A rename can result in a dentry that by walking up d_parent will never reach it's mnt_root. For lack of a better term I call this an escaped path. prepend_path is called by four different functions __d_path, d_absolute_path, d_path, and getcwd. __d_path only wants to see...
struct netdev_queue *dev_ingress_queue_create(struct net_device *dev) { struct netdev_queue *queue = dev_ingress_queue(dev); #ifdef CONFIG_NET_CLS_ACT if (queue) return queue; queue = kzalloc(sizeof(*queue), GFP_KERNEL); if (!queue) return NULL; netdev_init_one_queue(dev, queue, NULL); queue->qdisc = &noop_...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
34,224,332,991,878,720,000,000,000,000,000,000,000
17
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static void rel_ds_port_node_info(union md_node_info *node_info) { }
0
[ "CWE-476" ]
sparc
80caf43549e7e41a695c6d1e11066286538b336f
44,891,442,262,861,460,000,000,000,000,000,000,000
3
mdesc: fix a missing-check bug in get_vdev_port_node_info() In get_vdev_port_node_info(), 'node_info->vdev_port.name' is allcoated by kstrdup_const(), and it returns NULL when fails. So 'node_info->vdev_port.name' should be checked. Signed-off-by: Gen Zhang <blackgod016574@gmail.com> Signed-off-by: David S. Miller <d...
switch (recv_into_rbuf (h)) { case -1: SET_NEXT_STATE (%.DEAD); return 0; case 1: save_reply_state (h); SET_NEXT_STATE (%.READY); return 0; case 0: length = be32toh (h->sbuf.sr.structured_reply.length); msglen = be16toh (h->sbuf.sr.payload.error.error.len); if (msglen > length - sizeof h...
1
[]
libnbd
2c1987fc23d6d0f537edc6d4701e95a2387f7917
69,870,087,553,925,440,000,000,000,000,000,000,000
20
lib: Fix stack corruption with structured reply containing negative offset. Because of improper bounds checking, when receiving a structured reply some offset/lengths sent by the server could cause libnbd to execute arbitrary code under control of a malicious server. A structured reply segment containing (for example...
static int gen_request( git_buf *buf, http_stream *s, size_t content_length) { http_subtransport *t = OWNING_SUBTRANSPORT(s); const char *path = t->connection_data.path ? t->connection_data.path : "/"; size_t i; git_buf_printf(buf, "%s %s%s HTTP/1.1\r\n", s->verb, path, s->service_url); git_buf_printf(buf, "U...
0
[ "CWE-284" ]
libgit2
9a64e62f0f20c9cf9b2e1609f037060eb2d8eb22
35,930,940,715,796,450,000,000,000,000,000,000,000
41
http: check certificate validity before clobbering the error variable
MagickExport MagickBooleanType SetImageMonochrome(Image *image, ExceptionInfo *exception) { const char *value; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); ...
0
[ "CWE-369" ]
ImageMagick
75f6f5032690077cae3eaeda3c0165cc765eaeb5
227,154,190,589,057,540,000,000,000,000,000,000,000
25
https://github.com/ImageMagick/ImageMagick/issues/3295
gst_qtdemux_find_sample (GstQTDemux * qtdemux, gint64 byte_pos, gboolean fw, gboolean set, QtDemuxStream ** _stream, gint * _index, gint64 * _time) { gint i, n, index; gint64 time, min_time; QtDemuxStream *stream; min_time = -1; stream = NULL; index = -1; for (n = 0; n < qtdemux->n_streams; ++n) { ...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
207,636,647,524,368,200,000,000,000,000,000,000,000
75
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
nameOf (char* name, int cnt) { static char* buf = 0; if (*name == '\0') return name; if (cnt) { if (!buf) buf = N_NEW (strlen(name)+32,char); /* 32 to handle any integer plus null byte */ sprintf (buf, "%s%d", name, cnt); return buf; } else return name; }
0
[ "CWE-476" ]
graphviz
839085f8026afd6f6920a0c31ad2a9d880d97932
174,452,568,933,427,040,000,000,000,000,000,000,000
15
attempted fix for null pointer deference on malformed input
int fuse_fs_truncate(struct fuse_fs *fs, const char *path, off_t size) { fuse_get_context()->private_data = fs->user_data; if (fs->op.truncate) return fs->op.truncate(path, size); else return -ENOSYS; }
0
[]
ntfs-3g
fb28eef6f1c26170566187c1ab7dc913a13ea43c
103,125,064,899,699,430,000,000,000,000,000,000,000
8
Hardened the checking of directory offset requested by a readdir When asked for the next directory entries, make sure the chunk offset is within valid values, otherwise return no more entries in chunk.
charactersDefined (FileInfo * nested) { /*Check that all characters are defined by character-definition * opcodes*/ int noErrors = 1; int k; if ((newRule->opcode >= CTO_Space && newRule->opcode <= CTO_LitDigit) || newRule->opcode == CTO_SwapDd || newRule->opcode == CTO_Replace || newRule->opcod...
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
221,412,225,157,866,200,000,000,000,000,000,000,000
36
Merge branch 'table_resolver'
TEST_F(AllowMissingInOrListTest, BadJwt) { // Bad JWT should fail. EXPECT_CALL(mock_cb_, onComplete(Status::JwtVerificationFail)); auto headers = Http::TestRequestHeaderMapImpl{{kExampleHeader, NonExistKidToken}}; context_ = Verifier::createContext(headers, parent_span_, &mock_cb_); verifier_->verify(context_...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
143,587,999,670,011,370,000,000,000,000,000,000,000
8
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
static void arc_emac_set_address_internal(struct net_device *ndev) { struct arc_emac_priv *priv = netdev_priv(ndev); unsigned int addr_low, addr_hi; addr_low = le32_to_cpu(*(__le32 *) &ndev->dev_addr[0]); addr_hi = le16_to_cpu(*(__le16 *) &ndev->dev_addr[4]); arc_reg_set(priv, R_ADDRL, addr_low); arc_reg_set(pr...
0
[ "CWE-362" ]
linux
c278c253f3d992c6994d08aa0efb2b6806ca396f
153,820,391,127,074,570,000,000,000,000,000,000,000
11
net: arc_emac: fix koops caused by sk_buff free There is a race between arc_emac_tx() and arc_emac_tx_clean(). sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx() submitting sk_buff. In order to free sk_buff arc_emac_tx_clean() checks: if ((info & FOR_EMAC) || !txbd->data) break; ... dev_...
void Magick::Image::floodFillTexture(const Magick::Geometry &point_, const Magick::Image &texture_,const Magick::Color &borderColor_, const bool invert_) { floodFillTexture(point_.xOff(),point_.yOff(),texture_,borderColor_,invert_); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
93,441,670,645,519,680,000,000,000,000,000,000,000
6
Added missing return to avoid use after free.
rdpsnd_auto_select(void) { static RD_BOOL failed = False; if (!failed) { current_driver = drivers; while (current_driver != NULL) { DEBUG(("trying %s...\n", current_driver->name)); if (current_driver->wave_out_open()) { DEBUG(("selected %s\n", current_driver->name)); current_driver->wave_out_...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
249,160,626,246,547,400,000,000,000,000,000,000,000
26
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
void vrend_renderer_fill_caps(uint32_t set, uint32_t version, union virgl_caps *caps) { int gl_ver, gles_ver; GLenum err; bool fill_capset2 = false; if (!caps) return; switch (set) { case VIRGL_RENDERER_CAPSET_VIRGL: if (version > VREND_CAPSET_VIRGL_MAX_VERS...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
57,834,096,889,926,770,000,000,000,000,000,000,000
52
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
int move_addr_to_kernel(void __user *uaddr, int ulen, struct sockaddr *kaddr) { if (ulen < 0 || ulen > sizeof(struct sockaddr_storage)) return -EINVAL; if (ulen == 0) return 0; if (copy_from_user(kaddr, uaddr, ulen)) return -EFAULT; return audit_sockaddr(ulen, kaddr); }
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
167,292,698,812,524,360,000,000,000,000,000,000,000
10
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
void exit_io_context(void) { struct io_context *ioc; task_lock(current); ioc = current->io_context; current->io_context = NULL; task_unlock(current); if (atomic_dec_and_test(&ioc->nr_tasks)) { if (ioc->aic && ioc->aic->exit) ioc->aic->exit(ioc->aic); cfq_exit(ioc); put_io_context(ioc); } }
1
[ "CWE-20", "CWE-703", "CWE-400" ]
linux
61cc74fbb87af6aa551a06a370590c9bc07e29d9
208,780,272,854,648,400,000,000,000,000,000,000,000
17
block: Fix io_context leak after clone with CLONE_IO With CLONE_IO, copy_io() increments both ioc->refcount and ioc->nr_tasks. However exit_io_context() only decrements ioc->refcount if ioc->nr_tasks reaches 0. Always call put_io_context() in exit_io_context(). Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com...
static int rbd_lock(struct rbd_device *rbd_dev) { struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc; char cookie[32]; int ret; WARN_ON(__rbd_is_lock_owner(rbd_dev) || rbd_dev->lock_cookie[0] != '\0'); format_lock_cookie(rbd_dev, cookie); ret = ceph_cls_lock(osdc, &rbd_dev->header_oid, &rbd_dev...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
264,762,864,531,210,180,000,000,000,000,000,000,000
19
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
static int entersafe_compute_signature(sc_card_t *card, const u8 * data, size_t datalen, u8 * out, size_t outlen) { SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); return entersafe_compute_with_prkey(card,data,datalen,out,outlen); }
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
81,805,502,395,438,970,000,000,000,000,000,000,000
7
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
CachedQuery* DNS::GetCache(const std::string &source) { dnscache::iterator x = cache->find(source.c_str()); if (x != cache->end()) return &(x->second); else return NULL; }
0
[]
inspircd
58c893e834ff20495d007709220881a3ff13f423
251,170,736,936,752,470,000,000,000,000,000,000,000
8
Fixed infinite loop cauesd by invalid dns packets
handle_spawn (PortalFlatpak *object, GDBusMethodInvocation *invocation, GUnixFDList *fd_list, const gchar *arg_cwd_path, const gchar *const *arg_argv, GVariant *arg_fds, GVariant ...
1
[ "CWE-74" ]
flatpak
cc1401043c075268ecc652eac557ef8076b5eaba
337,708,073,948,946,750,000,000,000,000,000,000,000
608
portal: Do not use caller-supplied variables in environment If the caller specifies a variable that can be used to inject arbitrary code into processes, we must not allow it to enter the environment block used to run `flatpak run`, which runs unsandboxed. This change requires the previous commit "context: Add --env-f...
get_case_fold_codes_by_str(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem items[]) { return onigenc_get_case_fold_codes_by_str_with_map( sizeof(CaseFoldMap)/sizeof(OnigPairCaseFoldCodes), CaseFoldMap, 0, flag, p, end, items); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
219,998,240,794,732,350,000,000,000,000,000,000,000
8
onig-5.9.2
tc_cls_offload_cnt_reset(struct tcf_block *block, struct tcf_proto *tp, u32 *cnt, u32 *flags) { lockdep_assert_held(&block->cb_lock); spin_lock(&tp->lock); tcf_block_offload_dec(block, flags); *cnt = 0; spin_unlock(&tp->lock); }
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
195,177,397,554,833,940,000,000,000,000,000,000,000
10
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
void addToQueue(const std::string& hex) { queue_.append(getBuf(hex)); }
0
[ "CWE-119", "CWE-835", "CWE-787" ]
fizz
40bbb161e72fb609608d53b9d64c56bb961a6ee2
190,498,915,029,578,680,000,000,000,000,000,000,000
3
Avoid arithmetic operation on uint16 read from the wire. Summary: This could overflow previously. CVE-2019-3560 Reviewed By: yfeldblum Differential Revision: D14152362 fbshipit-source-id: c0ebb3fc59b49c7c23e6bcb90458c19cd891be65
dos_expandpath( garray_T *gap, char_u *path, int wildoff, int flags, // EW_* flags int didstar) // expanded "**" once already { char_u *buf; char_u *path_end; char_u *p, *s, *e; int start_len = gap->ga_len; char_u *pat; regmatch_T regmatch; int starts_with_dot; ...
0
[ "CWE-823", "CWE-703" ]
vim
5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
112,234,269,931,365,820,000,000,000,000,000,000,000
213
patch 8.2.4418: crash when using special multi-byte character Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character.