func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void encode_lookup(struct xdr_stream *xdr, const struct qstr *name, struct compound_hdr *hdr) { int len = name->len; __be32 *p; p = reserve_space(xdr, 8 + len); *p++ = cpu_to_be32(OP_LOOKUP); xdr_encode_opaque(p, name->name, len); hdr->nops++; hdr->replen += decode_lookup_maxsz; }
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
324,902,156,237,312,300,000,000,000,000,000,000,000
11
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...
int Field_timestamp::store(longlong nr, bool unsigned_val) { MYSQL_TIME l_time; int error; ErrConvInteger str(nr, unsigned_val); THD *thd= get_thd(); longlong tmp= number_to_datetime(nr, 0, &l_time, sql_mode_for_timestamp(thd), &error); return store_TIME_with_warning(thd,...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
66,958,921,065,998,980,000,000,000,000,000,000,000
11
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...
void Config::set_extra(const KeyInfo * begin, const KeyInfo * end) { extra_begin = begin; extra_end = end; }
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
303,112,278,095,457,930,000,000,000,000,000,000,000
6
Fix various bugs found by OSS-Fuze.
innodb_bk_thread( /*=============*/ void* arg) { ENGINE_HANDLE* handle; struct innodb_engine* innodb_eng; innodb_conn_data_t* conn_data; void* thd = NULL; bk_thd_exited = false; handle = (ENGINE_HANDLE*) (arg); innodb_eng = innodb_handle(handle); if (innodb_eng->enable_binlog) { /* This thread will c...
1
[]
mysql-server
659514dc83299a7d8c7defeb543be4339fbe1ee1
272,194,019,071,320,220,000,000,000,000,000,000,000
192
Bug #25147515 SET DAEMON_MEMCACHED_R_BATCH_SIZE GREATER THAN 1 MAKE MYSQLD CRASHED PROBLEM ------- User starts a "get" the the connection with SET DAEMON_MEMCACHED_R_BATCH_SIZE= 5 and with binlog on. Since "get" is a read transaction this connection is not allocated any conn_data->thd (which is used for bin log commit...
HttpTransact::does_client_request_permit_cached_response(const OverridableHttpConfigParams *p, CacheControlResult *c, HTTPHdr *h, char *via_string) { //////////////////////////////////////////////////////////////////////// // If aren't ignoring client's cache...
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
334,540,092,172,715,360,000,000,000,000,000,000,000
22
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
static int rotate_back_and_peek(gnutls_session_t session, uint8_t key[TICKET_MASTER_KEY_SIZE]) { int64_t t; gnutls_datum_t secret; /* Get the previous TOTP */ t = totp_previous(session); if (t < 0) return gnutls_assert_val(t); secret.data = session->key.initial_stek; secret.size = TICKET_MASTER_KEY_SIZE;...
0
[]
gnutls
c2646aeee94e71cb15c90a3147cf3b5b0ca158ca
159,266,163,694,695,350,000,000,000,000,000,000,000
19
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...
static int l2cap_le_connect_req(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u16 cmd_len, u8 *data) { struct l2cap_le_conn_req *req = (struct l2cap_le_conn_req *) data; struct l2cap_le_conn_rsp rsp; struct l2cap_chan *chan, *pchan; u16 dcid, scid, credits, mtu, mps; __le16 psm; u8 result; if (cmd...
0
[ "CWE-125" ]
linux
7c9cbd0b5e38a1672fcd137894ace3b042dfbf69
323,132,480,461,060,300,000,000,000,000,000,000,000
126
Bluetooth: Verify that l2cap_get_conf_opt provides large enough buffer The function l2cap_get_conf_opt will return L2CAP_CONF_OPT_SIZE + opt->len as length value. The opt->len however is in control over the remote user and can be used by an attacker to gain access beyond the bounds of the actual packet. To prevent an...
static int unittest_i2c_mux_remove(struct i2c_client *client) { struct device *dev = &client->dev; struct device_node *np = client->dev.of_node; struct i2c_mux_core *muxc = i2c_get_clientdata(client); dev_dbg(dev, "%s for node @%pOF\n", __func__, np); i2c_mux_del_adapters(muxc); return 0; }
0
[ "CWE-401" ]
linux
e13de8fe0d6a51341671bbe384826d527afe8d44
136,846,749,090,127,740,000,000,000,000,000,000,000
10
of: unittest: fix memory leak in unittest_data_add In unittest_data_add, a copy buffer is created via kmemdup. This buffer is leaked if of_fdt_unflatten_tree fails. The release for the unittest_data buffer is added. Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree") Signed-off-by: Navid ...
CImg<T>& draw_object3d(const float x0, const float y0, const float z0, const CImg<tp>& vertices, const CImgList<tf>& primitives, const CImgList<tc>& colors, const unsigned int render_type=4, const bool is_dou...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
314,655,161,277,373,170,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
char *ssh_path_expand_tilde(const char *d) { char *h = NULL, *r; const char *p; size_t ld; size_t lh = 0; if (d[0] != '~') { return strdup(d); } d++; /* handle ~user/path */ p = strchr(d, '/'); if (p != NULL && p > d) { #ifdef _WIN32 return strdup(d); #else ...
0
[]
libssh
2ba1dea5493fb2f5a5be2dd263ce46ccb5f8ec76
250,678,756,820,063,430,000,000,000,000,000,000,000
57
CVE-2019-14889: misc: Add function to quote file names The added function quote file names strings to be used in a shell. Special cases are treated for the charactes '\'' and '!'. Fixes T181 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry pic...
DEFUN (no_bgp_redistribute_ipv4, no_bgp_redistribute_ipv4_cmd, "no redistribute (connected|kernel|ospf|rip|static)", NO_STR "Redistribute information from another routing protocol\n" "Connected\n" "Kernel routes\n" "Open Shurtest Path First (OSPF)\n" "Routing Info...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
65,232,499,457,871,090,000,000,000,000,000,000,000
22
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
QPDF::replaceObject(int objid, int generation, QPDFObjectHandle oh) { if (oh.isIndirect()) { QTC::TC("qpdf", "QPDF replaceObject called with indirect object"); throw std::logic_error( "QPDF::replaceObject called with indirect object handle"); } // Force new object to appear in the cache reso...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
199,581,839,878,838,640,000,000,000,000,000,000,000
17
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int quiet) { time_t *ptime; int i; if (ctx->param->flags & X509_V_FLAG_USE_CHECK_TIME) ptime = &ctx->param->check_time; else if (ctx->param->flags & X509_V_FLAG_NO_CHECK_TIME) return 1; else ptime = NULL; i = X509_c...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
168,679,551,140,375,210,000,000,000,000,000,000,000
52
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
void psi_cgroup_free(struct cgroup *cgroup) { if (static_branch_likely(&psi_disabled)) return; cancel_delayed_work_sync(&cgroup->psi.avgs_work); free_percpu(cgroup->psi.pcpu); /* All triggers must be removed by now */ WARN_ONCE(cgroup->psi.poll_states, "psi: trigger leak\n"); }
0
[ "CWE-787" ]
linux
6fcca0fa48118e6d63733eb4644c6cd880c15b8f
292,623,963,634,900,930,000,000,000,000,000,000,000
10
sched/psi: Fix OOB write when writing 0 bytes to PSI files Issuing write() with count parameter set to 0 on any file under /proc/pressure/ will cause an OOB write because of the access to buf[buf_size-1] when NUL-termination is performed. Fix this by checking for buf_size to be non-zero. Signed-off-by: Suren Baghdasa...
mainloop_del_fd(mainloop_io_t *client) { if(client != NULL) { crm_trace("Removing client %s[%p] %d", client->name, client, mainloop_gio_refcount(client)); if (client->source) { /* Results in mainloop_gio_destroy() being called just * before the source is removed from mainloo...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
161,959,735,745,349,630,000,000,000,000,000,000,000
12
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
static int hugetlb_vmtruncate(struct inode *inode, loff_t offset) { pgoff_t pgoff; struct address_space *mapping = inode->i_mapping; struct hstate *h = hstate_inode(inode); BUG_ON(offset & ~huge_page_mask(h)); pgoff = offset >> PAGE_SHIFT; i_size_write(inode, offset); i_mmap_lock_write(mapping); if (!RB_EMPTY...
1
[]
linux
1bfad99ab42569807d0ca1698449cae5e8c0334a
165,161,072,599,374,800,000,000,000,000,000,000,000
17
hugetlbfs: hugetlb_vmtruncate_list() needs to take a range to delete fallocate hole punch will want to unmap a specific range of pages. Modify the existing hugetlb_vmtruncate_list() routine to take a start/end range. If end is 0, this indicates all pages after start should be unmapped. This is the same as the existi...
isdn_net_ciscohdlck_receive(isdn_net_local *lp, struct sk_buff *skb) { unsigned char *p; u8 addr; u8 ctrl; u16 type; if (skb->len < 4) goto out_free; p = skb->data; addr = *(u8 *)(p + 0); ctrl = *(u8 *)(p + 1); type = be16_to_cpup((__be16 *)(p + 2)); p += 4; skb_pull(skb, 4); if (addr != CISCO_ADDR_UNI...
0
[ "CWE-119" ]
linux
9f5af546e6acc30f075828cb58c7f09665033967
59,364,246,014,727,845,000,000,000,000,000,000,000
48
isdn/i4l: fix buffer overflow This fixes a potential buffer overflow in isdn_net.c caused by an unbounded strcpy. [ ISDN seems to be effectively unmaintained, and the I4L driver in particular is long deprecated, but in case somebody uses this.. - Linus ] Signed-off-by: Jiten Thakkar <jitenmt@gmail.com> Signed-...
flatpak_dir_update_deploy_ref (FlatpakDir *self, const char *ref, const char *checksum, GError **error) { g_autofree char *deploy_ref = g_strconcat ("deploy/", ref, NULL); if (!ostree_repo_set_ref_immediate (self->repo,...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
48,384,305,355,342,770,000,000,000,000,000,000,000
12
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
static void ept_save_pdptrs(struct kvm_vcpu *vcpu) { if (is_paging(vcpu) && is_pae(vcpu) && !is_long_mode(vcpu)) { vcpu->arch.pdptrs[0] = vmcs_read64(GUEST_PDPTR0); vcpu->arch.pdptrs[1] = vmcs_read64(GUEST_PDPTR1); vcpu->arch.pdptrs[2] = vmcs_read64(GUEST_PDPTR2); vcpu->arch.pdptrs[3] = vmcs_read64(GUEST_PDPTR...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
317,248,408,000,010,200,000,000,000,000,000,000,000
14
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static int uwsgi_run_command_do(char *command, char *arg) { char *argv[4]; #ifdef __linux__ if (prctl(PR_SET_PDEATHSIG, SIGKILL, 0, 0, 0)) { uwsgi_error("prctl()"); } #endif if (command == NULL) { argv[0] = uwsgi_binsh(); argv[1] = "-c"; argv[2] = arg; argv[3] = NULL; execvp(argv[0], argv); } else ...
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
214,923,487,132,173,300,000,000,000,000,000,000,000
29
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
static int send_header(void *data, const char *key, const char *val) { char *header_line = NULL; hdr_ptr *hdr = (hdr_ptr*)data; header_line = apr_pstrcat(hdr->bb->p, key, ": ", val, CRLF, NULL); ap_xlate_proto_to_ascii(header_line, strlen(header_line)); ap_fputs(hdr->f, hdr->bb, header_line); r...
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
13,887,485,691,350,570,000,000,000,000,000,000,000
10
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
void do_eval(DYNAMIC_STRING *query_eval, const char *query, const char *query_end, my_bool pass_through_escape_chars) { const char *p; register char c, next_c; register int escaped = 0; VAR *v; DBUG_ENTER("do_eval"); for (p= query; (c= *p) && p < query_end; ++p) { switch(c) { case '$...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
168,563,886,555,526,170,000,000,000,000,000,000,000
60
mysqltest: don't eat new lines in --exec pass them through as is
e_ews_connection_get_server_time_zones (EEwsConnection *cnc, gint pri, GSList *msdn_locations, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { ESoapMessage *msg; GSimpleAsyncResult *simple; EwsAsyncData *async_data; GSList *l; g_return_if_fail (cnc != NULL);...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
255,808,168,137,551,280,000,000,000,000,000,000,000
53
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
void kvm_release_page_clean(struct page *page) { WARN_ON(is_error_page(page)); kvm_release_pfn_clean(page_to_pfn(page)); }
0
[ "CWE-399" ]
linux
12d6e7538e2d418c08f082b1b44ffa5fb7270ed8
103,314,822,072,213,550,000,000,000,000,000,000,000
6
KVM: perform an invalid memslot step for gpa base change PPC must flush all translations before the new memory slot is visible. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
int regulator_is_enabled(struct regulator *regulator) { int ret; if (regulator->always_on) return 1; mutex_lock(&regulator->rdev->mutex); ret = _regulator_is_enabled(regulator->rdev); mutex_unlock(&regulator->rdev->mutex); return ret; }
0
[ "CWE-416" ]
linux
60a2362f769cf549dc466134efe71c8bf9fbaaba
304,030,315,094,051,700,000,000,000,000,000,000,000
13
regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing After freeing pin from regulator_ena_gpio_free, loop can access the pin. So this patch fixes not to access pin after freeing. Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
fr_window_finalize (GObject *object) { FrWindow *window = FR_WINDOW (object); fr_window_free_open_files (window); if (window->archive != NULL) { g_object_unref (window->archive); window->archive = NULL; } if (window->priv != NULL) { fr_window_free_private_data (window); g_free (window->priv); window->...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
129,344,107,296,238,740,000,000,000,000,000,000,000
19
libarchive: sanitize filenames before extracting
void expectProtocol(const std::string& proto) { expectHandshakeSuccess(); EXPECT_NE(client->nextProtoLength, 0); EXPECT_EQ(client->nextProtoLength, server->nextProtoLength); EXPECT_EQ( memcmp(client->nextProto, server->nextProto, server->nextProtoLength), 0); string selected((const...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
31,247,787,187,301,673,000,000,000,000,000,000,000
10
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static struct dcb_app_type *dcb_app_lookup(const struct dcb_app *app, int ifindex, int prio) { struct dcb_app_type *itr; list_for_each_entry(itr, &dcb_app_list, list) { if (itr->app.selector == app->selector && itr->app.protocol == app->protocol && itr->ifindex == ifindex && (!prio || itr...
0
[ "CWE-399" ]
linux-2.6
29cd8ae0e1a39e239a3a7b67da1986add1199fc0
177,264,307,409,429,720,000,000,000,000,000,000,000
15
dcbnl: fix various netlink info leaks The dcb netlink interface leaks stack memory in various places: * perm_addr[] buffer is only filled at max with 12 of the 32 bytes but copied completely, * no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand, so we're leaking up to 58 bytes for ieee_ets structs...
execute_arith_for_command (arith_for_command) ARITH_FOR_COM *arith_for_command; { intmax_t expresult; int expok, body_status, arith_lineno, save_lineno; body_status = EXECUTION_SUCCESS; loop_level++; save_lineno = line_number; if (arith_for_command->flags & CMD_IGNORE_RETURN) arith_for_command->a...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
156,221,452,491,772,000,000,000,000,000,000,000,000
86
bash-4.4-rc2 release
MOBI_RET mobi_markup_to_utf8(MOBIPart *part) { if (part == NULL) { return MOBI_INIT_FAILED; } unsigned char *text = part->data; size_t length = part->size; /* extreme case in which each input character is converted to 3-byte utf-8 sequence */ size_t out_length = 3 * length + 1; ...
0
[ "CWE-703", "CWE-125" ]
libmobi
fb1ab50e448ddbed746fd27ae07469bc506d838b
312,076,602,796,706,050,000,000,000,000,000,000,000
35
Fix array boundary check when parsing inflections which could result in buffer over-read with corrupt input
xmlSchemaVContentModelCallback(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED, const xmlChar * name ATTRIBUTE_UNUSED, xmlSchemaElementPtr item, xmlSchemaNodeInfoPtr inode) { inode->decl = item; #ifdef DEBUG_CONTENT { xmlChar *str = NULL; if (item->type == XML_SCHEMA_TYPE_ELEMENT) ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
186,103,971,002,407,300,000,000,000,000,000,000,000
26
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static inline struct sk_buff *tcp_write_queue_next(const struct sock *sk, const struct sk_buff *skb) { return skb_queue_next(&sk->sk_write_queue, skb); }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
321,063,761,507,164,970,000,000,000,000,000,000,000
5
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
ex_colorscheme(exarg_T *eap) { if (*eap->arg == NUL) { #ifdef FEAT_EVAL char_u *expr = vim_strsave((char_u *)"g:colors_name"); char_u *p = NULL; if (expr != NULL) { ++emsg_off; p = eval_to_string(expr, FALSE); --emsg_off; vim_free(expr); } if (p != NULL) { msg((char *)p); v...
0
[ "CWE-416" ]
vim
35d21c6830fc2d68aca838424a0e786821c5891c
339,503,140,787,238,000,000,000,000,000,000,000,000
38
patch 9.0.0360: crash when invalid line number on :for is ignored Problem: Crash when invalid line number on :for is ignored. Solution: Do not check breakpoint for non-existing line.
void Filter::onSoftPerTryTimeout(UpstreamRequest& upstream_request) { // Track this as a timeout for outlier detection purposes even though we didn't // cancel the request yet and might get a 2xx later. updateOutlierDetection(Upstream::Outlier::Result::LOCAL_ORIGIN_TIMEOUT, upstream_request, ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
158,767,188,278,968,470,000,000,000,000,000,000,000
27
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 int translate_table(struct xt_table_info *newinfo, void *entry0, const struct arpt_replace *repl) { struct arpt_entry *iter; unsigned int i; int ret = 0; newinfo->size = repl->size; newinfo->number = repl->num_entries; /* Init all hooks to impossible value. */ for (i = 0; i < ...
0
[ "CWE-200" ]
linux-2.6
42eab94fff18cb1091d3501cd284d6bd6cc9c143
212,230,573,846,915,370,000,000,000,000,000,000,000
91
netfilter: arp_tables: fix infoleak to userspace Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive i...
addr_policy_permits_address(uint32_t addr, uint16_t port, smartlist_t *policy) { tor_addr_t a; tor_addr_from_ipv4h(&a, addr); return addr_policy_permits_tor_addr(&a, port, policy); }
0
[ "CWE-119" ]
tor
43414eb98821d3b5c6c65181d7545ce938f82c8e
300,652,288,575,773,350,000,000,000,000,000,000,000
7
Fix bounds-checking in policy_summarize Found by piebeer.
TEST_P(RBACIntegrationTest, HeaderMatchConditionDuplicateHeaderMatch) { config_helper_.addFilter(fmt::format(RBAC_CONFIG_HEADER_MATCH_CONDITION, "yyy,zzz")); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto response = codec_client_->makeRequestWithBody( Http::TestRequestHeaderM...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
327,253,914,487,143,650,000,000,000,000,000,000,000
23
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
void sk_prot_clear_portaddr_nulls(struct sock *sk, int size) { unsigned long nulls1, nulls2; nulls1 = offsetof(struct sock, __sk_common.skc_node.next); nulls2 = offsetof(struct sock, __sk_common.skc_portaddr_node.next); if (nulls1 > nulls2) swap(nulls1, nulls2); if (nulls1 != 0) memset((char *)sk, 0, nulls1)...
0
[ "CWE-119", "CWE-787" ]
linux
82981930125abfd39d7c8378a9cfdf5e1be2002b
276,644,800,603,913,700,000,000,000,000,000,000,000
16
net: cleanups in sock_setsockopt() Use min_t()/max_t() macros, reformat two comments, use !!test_bit() to match !!sock_flag() Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int auto_connect(struct socket *sock, struct tipc_msg *msg) { struct tipc_sock *tsock = tipc_sk(sock->sk); struct tipc_port *p_ptr; tsock->peer_name.ref = msg_origport(msg); tsock->peer_name.node = msg_orignode(msg); p_ptr = tipc_port_deref(tsock->p->ref); if (!p_ptr) return -EINVAL; __tipc_connect(ts...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
57,802,553,408,532,610,000,000,000,000,000,000,000
19
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
void ndp_msgra_flag_managed_set(struct ndp_msgra *msgra, bool flag_managed) { if (flag_managed) msgra->ra->nd_ra_flags_reserved |= ND_RA_FLAG_MANAGED; else msgra->ra->nd_ra_flags_reserved &= ~ND_RA_FLAG_MANAGED; }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
5,243,920,876,024,055,000,000,000,000,000,000,000
7
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
static UINT cliprdr_server_receive_format_list(CliprdrServerContext* context, wStream* s, const CLIPRDR_HEADER* header) { CLIPRDR_FORMAT_LIST formatList; UINT error = CHANNEL_RC_OK; formatList.msgType = CB_FORMAT_LIST; formatList.msgFlags = header->msgFlags; formatLi...
0
[]
FreeRDP
8e1a1b407565eb0a48923c796f5b1f69167b3c48
318,686,276,242,293,220,000,000,000,000,000,000,000
23
Fixed cliprdr_server_receive_capabilities Thanks to hac425 CVE-2020-11017, CVE-2020-11018
static inline bool should_force_cow_break(struct vm_area_struct *vma, unsigned int flags) { return is_cow_mapping(vma->vm_flags) && (flags & (FOLL_GET | FOLL_PIN)); }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
337,592,755,885,211,860,000,000,000,000,000,000,000
4
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
static struct sk_buff *packet_alloc_skb(struct sock *sk, size_t prepad, size_t reserve, size_t len, size_t linear, int noblock, int *err) { struct sk_buff *skb; /* Under a page? Don't bother with paged skb. */ if (prepad + len < PAGE_SIZE || !linear) linear = len; skb = sock...
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
325,900,145,650,344,400,000,000,000,000,000,000,000
23
packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to...
TEST(HeaderMapImplTest, DoubleCookieAdd) { HeaderMapImpl headers; const std::string foo("foo"); const std::string bar("bar"); const LowerCaseString& set_cookie = Http::Headers::get().SetCookie; headers.addReference(set_cookie, foo); headers.addReference(set_cookie, bar); EXPECT_EQ(2UL, headers.size()); ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
274,110,047,356,077,930,000,000,000,000,000,000,000
16
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...
UnicodeString &UnicodeString::setToUTF8(StringPiece utf8) { unBogus(); int32_t length = utf8.length(); int32_t capacity; // The UTF-16 string will be at most as long as the UTF-8 string. if(length <= US_STACKBUF_SIZE) { capacity = US_STACKBUF_SIZE; } else { capacity = length + 1; // +1 for the term...
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
138,053,458,511,023,630,000,000,000,000,000,000,000
24
ICU-20958 Prevent SEGV_MAPERR in append See #971
static uint32_t fdctrl_read_statusA(FDCtrl *fdctrl) { uint32_t retval = fdctrl->sra; FLOPPY_DPRINTF("status register A: 0x%02x\n", retval); return retval; }
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
268,749,071,143,948,000,000,000,000,000,000,000,000
8
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
jas_matrix_t *jas_matrix_create(jas_matind_t numrows, jas_matind_t numcols) { jas_matrix_t *matrix; jas_matind_t i; size_t size; matrix = 0; if (numrows < 0 || numcols < 0) { return NULL; } // matrix->datasize_ = numrows * numcols; if (!jas_safe_size_mul(numrows, numcols, &size)) { return NULL; } if (...
0
[ "CWE-787" ]
jasper
e2f2e5f4022baef2386eec25c57b63debfe4cb20
303,460,166,954,997,720,000,000,000,000,000,000,000
60
jas_seq: check bounds in jas_seq2d_bindsub() Fixes CVE-2017-5503, CVE-2017-5504, CVE-2017-5505, Closes https://github.com/jasper-maint/jasper/issues/3 Closes https://github.com/jasper-maint/jasper/issues/4 Closes https://github.com/jasper-maint/jasper/issues/5 Closes https://github.com/mdadams/jasper/issues/88 Closes...
alloc_does_fail(size_t size) { if (alloc_fail_countdown == 0) { if (--alloc_fail_repeat <= 0) alloc_fail_id = 0; do_outofmem_msg(size); return TRUE; } --alloc_fail_countdown; return FALSE; }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
15,057,239,232,293,927,000,000,000,000,000,000,000
12
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
static bool decode_flag_request(void *mem_ctx, DATA_BLOB in, void *_out) { if (in.length != 0) { return false; } return true; }
0
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
182,364,574,253,734,440,000,000,000,000,000,000,000
8
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...
RZ_API RZ_OWN char *rz_bin_dex_version(RZ_NONNULL RzBinDex *dex) { rz_return_val_if_fail(dex, NULL); // https://cs.android.com/android/platform/superproject/+/master:dalvik/dx/src/com/android/dex/DexFormat.java;l=55;bpv=1;bpt=0 // https://developer.android.com/studio/releases/platforms if (!strncmp((char *)dex->ver...
0
[ "CWE-787" ]
rizin
1524f85211445e41506f98180f8f69f7bf115406
89,284,723,258,432,330,000,000,000,000,000,000,000
21
fix #2969 - oob write (1 byte) in dex.c
_gnutls_copy_comp_methods (gnutls_session_t session, opaque * ret_data, size_t ret_data_size) { int ret, i; uint8_t *compression_methods, comp_num; int datalen, pos; ret = _gnutls_supported_compression_methods (session, &compression_methods); if (ret < 0) { gnutls_assert (); return ret;...
0
[ "CWE-189" ]
gnutls
bc8102405fda11ea00ca3b42acc4f4bce9d6e97b
201,535,816,437,954,050,000,000,000,000,000,000,000
36
Fix GNUTLS-SA-2008-1 security vulnerabilities. See http://www.gnu.org/software/gnutls/security.html for updates.
static void hci_cc_write_ssp_mode(struct hci_dev *hdev, struct sk_buff *skb) { __u8 status = *((__u8 *) skb->data); struct hci_cp_write_ssp_mode *sent; BT_DBG("%s status 0x%2.2x", hdev->name, status); sent = hci_sent_cmd_data(hdev, HCI_OP_WRITE_SSP_MODE); if (!sent) return; hci_dev_lock(hdev); if (!status)...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
278,427,985,181,823,640,000,000,000,000,000,000,000
31
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
char *fzofft(__G__ val, pre, post) __GDEF zoff_t val; ZCONST char *pre; ZCONST char *post; { /* Storage cylinder. (now in globals.h) */ /*static char fzofft_buf[FZOFFT_NUM][FZOFFT_LEN];*/ /*static int fzofft_index = 0;*/ /* Temporary format string storage. */ char fmt[16]; /* A...
0
[ "CWE-400" ]
unzip
41beb477c5744bc396fa1162ee0c14218ec12213
174,358,862,235,245,660,000,000,000,000,000,000,000
46
Fix bug in undefer_input() that misplaced the input state.
static int hugetlbfs_write_begin(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, void **fsdata) { return -EINVAL; }
0
[]
linux
1bfad99ab42569807d0ca1698449cae5e8c0334a
284,361,145,588,413,270,000,000,000,000,000,000,000
7
hugetlbfs: hugetlb_vmtruncate_list() needs to take a range to delete fallocate hole punch will want to unmap a specific range of pages. Modify the existing hugetlb_vmtruncate_list() routine to take a start/end range. If end is 0, this indicates all pages after start should be unmapped. This is the same as the existi...
static u32 dispatch(struct tipc_port *tport, struct sk_buff *buf) { struct sock *sk = tport->sk; u32 res; /* * Process message if socket is unlocked; otherwise add to backlog queue * * This code is based on sk_receive_skb(), but must be distinct from it * since a TIPC-specific filter/reject mechanism is uti...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
200,791,656,522,547,500,000,000,000,000,000,000,000
24
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static int exif_process_user_comment(image_info_type *ImageInfo, char **pszInfoPtr, char **pszEncoding, char *szValuePtr, int ByteCount) { int a; char *decode; size_t len; *pszEncoding = NULL; /* Copy the comment */ if (ByteCount>=8) { const zend_encoding *from, *to; if (!memcmp(szValuePtr, "UNICODE\0", 8...
1
[ "CWE-125" ]
php-src
e648fa4699e8d072db6db34fcc09826e8127fab8
5,427,184,732,579,812,000,000,000,000,000,000,000
84
Fix bug #78256 (heap-buffer-overflow on exif_process_user_comment) (cherry picked from commit aeb6d13185a2ea4f1496ede2697469faed98ce05)
void Save() { url_.Save(); for (int i = 0; i < num_fields_; i++) { fields_[i].Save(); } for (int i = 0; i < num_values_; i++) { values_[i].Save(); } }
0
[]
node
7b3fb22290c3b6acb497ca85cf2f1648d75c8154
274,947,491,642,862,660,000,000,000,000,000,000,000
11
typo in node_http_parser
static int check_map_func_compatibility(struct bpf_verifier_env *env, struct bpf_map *map, int func_id) { if (!map) return 0; /* We need a two way check, first is from map perspective ... */ switch (map->map_type) { case BPF_MAP_TYPE_PROG_ARRAY: if (func_id != BPF_FUNC_tail_call) goto error; break; ...
0
[ "CWE-843" ]
bpf
5b029a32cfe4600f5e10e36b41778506b90fd4de
106,478,003,913,559,310,000,000,000,000,000,000,000
208
bpf: Fix ringbuf helper function compatibility Commit 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") extended check_map_func_compatibility() by enforcing map -> helper function match, but not helper -> map type match. Due to this all of the bpf_ringbuf_*() helper functions could be used w...
GF_Err Media_GetSampleDesc(GF_MediaBox *mdia, u32 SampleDescIndex, GF_SampleEntryBox **out_entry, u32 *dataRefIndex) { GF_SampleDescriptionBox *stsd; GF_SampleEntryBox *entry = NULL; if (!mdia) return GF_ISOM_INVALID_FILE; stsd = mdia->information->sampleTable->SampleDescription; if (!stsd) return GF_ISOM_INVALI...
0
[ "CWE-787" ]
gpac
328def7d3b93847d64ecb6e9e0399684e57c3eca
252,065,104,214,927,670,000,000,000,000,000,000,000
18
fixed #1766 (fuzz)
static void __set_monitor_timer(struct l2cap_chan *chan) { __clear_retrans_timer(chan); if (chan->monitor_timeout) { l2cap_set_timer(chan, &chan->monitor_timer, msecs_to_jiffies(chan->monitor_timeout)); } }
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
317,572,808,817,689,980,000,000,000,000,000,000,000
8
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
static int get_filter(void __user *arg, struct sock_filter **p) { struct sock_fprog uprog; struct sock_filter *code = NULL; int len; if (copy_from_user(&uprog, arg, sizeof(uprog))) return -EFAULT; if (!uprog.len) { *p = NULL; return 0; } len = uprog.len * sizeof(struct sock_filter); code = memdup_user(...
0
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
143,235,667,244,246,850,000,000,000,000,000,000,000
22
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
xmlNewTextChild(xmlNodePtr parent, xmlNsPtr ns, const xmlChar *name, const xmlChar *content) { xmlNodePtr cur, prev; if (parent == NULL) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlNewTextChild : parent == NULL\n"); #endif return(NULL); } if (name == NULL) { ...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
321,981,744,034,253,570,000,000,000,000,000,000,000
59
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
void AuthorizationSession::_buildAuthenticatedRolesVector() { _authenticatedRoleNames.clear(); for (UserSet::iterator it = _authenticatedUsers.begin(); it != _authenticatedUsers.end(); ++it) { RoleNameIterator roles = (*it)->getIndirectRoles(); while (roles.more()) { RoleNam...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
226,064,766,518,831,160,000,000,000,000,000,000,000
11
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static int ocfs2_dir_open(struct inode *inode, struct file *file) { return ocfs2_init_file_private(inode, file); }
0
[ "CWE-401" ]
linux
28f5a8a7c033cbf3e32277f4cc9c6afd74f05300
42,134,323,930,541,974,000,000,000,000,000,000,000
4
ocfs2: should wait dio before inode lock in ocfs2_setattr() we should wait dio requests to finish before inode lock in ocfs2_setattr(), otherwise the following deadlock will happen: process 1 process 2 process 3 truncate file 'A' end_io of writing file 'A' receiving the ...
void _out_dns_mark_bad(conn_t out) { if (out->s2s->dns_bad_timeout > 0) { dnsres_t bad; char *ipport; /* mark this host as bad */ ipport = dns_make_ipport(out->ip, out->port); bad = xhash_get(out->s2s->dns_bad, ipport); if (bad == NULL) { bad = (dnsres_t)...
0
[ "CWE-20" ]
jabberd2
aabcffae560d5fd00cd1d2ffce5d760353cf0a4d
149,899,026,295,932,530,000,000,000,000,000,000,000
16
Fixed possibility of Unsolicited Dialback Attacks
xmlParseCharRef(xmlParserCtxtPtr ctxt) { int val = 0; int count = 0; /* * Using RAW/CUR/NEXT is okay since we are working on ASCII range here */ if ((RAW == '&') && (NXT(1) == '#') && (NXT(2) == 'x')) { SKIP(3); GROW; while (RAW != ';') { /* loop blocked by count */ if (count+...
0
[ "CWE-776" ]
libxml2
8598060bacada41a0eb09d95c97744ff4e428f8e
273,942,395,692,312,400,000,000,000,000,000,000,000
90
Patch for security issue CVE-2021-3541 This is relapted to parameter entities expansion and following the line of the billion laugh attack. Somehow in that path the counting of parameters was missed and the normal algorithm based on entities "density" was useless.
test_bson_append_int64 (void) { bson_t *b; bson_t *b2; b = bson_new (); BSON_ASSERT (bson_append_int64 (b, "a", -1, 100000000000000ULL)); b2 = get_bson ("test34.bson"); BSON_ASSERT_BSON_EQUAL (b, b2); bson_destroy (b); bson_destroy (b2); }
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
144,799,353,842,194,730,000,000,000,000,000,000,000
12
CDRIVER-2269 Check for zero string length in codewscope
static void streamFile(char *filename) { xmlTextReaderPtr reader; int ret; #ifdef HAVE_MMAP int fd = -1; struct stat info; const char *base = NULL; xmlParserInputBufferPtr input = NULL; if (memory) { if (stat(filename, &info) < 0) return; if ((fd = open(filename, O_RDONLY)) < 0) ...
0
[ "CWE-416" ]
libxml2
1358d157d0bd83be1dfe356a69213df9fac0b539
328,293,334,190,481,700,000,000,000,000,000,000,000
169
Fix use-after-free with `xmllint --html --push` Call htmlCtxtUseOptions to make sure that names aren't stored in dictionaries. Note that this issue only affects xmllint using the HTML push parser. Fixes #230.
btrfs_lookup_dir_index_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct btrfs_path *path, u64 dir, u64 objectid, const char *name, int name_len, int mod) { int ret; struct btrfs_key key; int ins_len = mod < 0 ? -1 : 0; int cow = mod != 0; key.objectid = dir; key....
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
230,753,926,637,106,900,000,000,000,000,000,000,000
22
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) { struct ip_esp_hdr *esph; struct esp_data *esp = x->data; struct crypto_aead *aead = esp->aead; struct aead_request *req; struct sk_buff *trailer; int elen = skb->len - sizeof(*esph) - crypto_aead_ivsize(aead); int nfrags; int ret = 0; void *tmp...
0
[ "CWE-16" ]
linux-2.6
920fc941a9617f95ccb283037fe6f8a38d95bb69
195,006,693,569,356,900,000,000,000,000,000,000,000
65
[ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access ESP does not account for the IV size when calling pskb_may_pull() to ensure everything it accesses directly is within the linear part of a potential fragment. This results in a BUG() being triggered when the both the IPv4 and IPv6 ESP stack...
void vQueueDelete( QueueHandle_t xQueue ) { Queue_t * const pxQueue = xQueue; configASSERT( pxQueue ); traceQUEUE_DELETE( pxQueue ); #if ( configQUEUE_REGISTRY_SIZE > 0 ) { vQueueUnregisterQueue( pxQueue ); } #endif #if ( ( configSUPPORT_DYNAMIC_ALLOCA...
0
[ "CWE-200", "CWE-190" ]
FreeRTOS-Kernel
47338393f1f79558f6144213409f09f81d7c4837
248,899,252,856,479,450,000,000,000,000,000,000,000
40
add assert for addition overflow on queue creation (#225)
xmlFreeTextReader(xmlTextReaderPtr reader) { if (reader == NULL) return; #ifdef LIBXML_SCHEMAS_ENABLED if (reader->rngSchemas != NULL) { xmlRelaxNGFree(reader->rngSchemas); reader->rngSchemas = NULL; } if (reader->rngValidCtxt != NULL) { if (! reader->rngPreserveCtxt) xmlRelaxNGFreeValidCtxt(re...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
108,240,696,622,087,130,000,000,000,000,000,000,000
73
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.
static int init_cache_node(struct kmem_cache *cachep, int node, gfp_t gfp) { struct kmem_cache_node *n; /* * Set up the kmem_cache_node for cpu before we can * begin anything. Make sure some other cpu on this * node has not already allocated this */ n = get_node(cachep, node); if (n) { spin_lock_irq(&n->...
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
157,412,306,211,779,670,000,000,000,000,000,000,000
39
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...
find_func(char_u *name, int is_global) { ufunc_T *fp = find_func_even_dead(name, is_global ? FFED_IS_GLOBAL : 0); if (fp != NULL && (fp->uf_flags & FC_DEAD) == 0) return fp; return NULL; }
0
[ "CWE-416" ]
vim
91c7cbfe31bbef57d5fcf7d76989fc159f73ef15
135,501,918,926,601,420,000,000,000,000,000,000,000
8
patch 9.0.0225: using freed memory with multiple line breaks in expression Problem: Using freed memory with multiple line breaks in expression. Solution: Free eval_tofree later.
static void WM_FreePatches(void) { int i; struct _patch * tmp_patch; struct _sample * tmp_sample; _WM_Lock(&_WM_patch_lock); for (i = 0; i < 128; i++) { while (_WM_patch[i]) { while (_WM_patch[i]->first_sample) { tmp_sample = _WM_patch[i]->first_sample->next; ...
0
[ "CWE-200", "CWE-119" ]
wildmidi
814f31d8eceda8401eb812fc2e94ed143fdad0ab
303,134,758,167,712,600,000,000,000,000,000,000,000
22
wildmidi_lib.c (WildMidi_Open, WildMidi_OpenBuffer): refuse to proceed if less then 18 bytes of input Fixes bug #178.
static long fuse_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { return fuse_ioctl_common(file, cmd, arg, 0); }
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
318,508,941,170,088,120,000,000,000,000,000,000,000
5
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
void Flush() { HandleScope scope; Local<Value> cb = handle_->Get(on_headers_sym); if (!cb->IsFunction()) return; Local<Value> argv[2] = { CreateHeaders(), url_.ToString() }; Local<Value> r = Local<Function>::Cast(cb)->Call(handle_, 2, argv); if (r.IsEmpty()) go...
0
[]
node
7b3fb22290c3b6acb497ca85cf2f1648d75c8154
267,767,791,949,057,740,000,000,000,000,000,000,000
21
typo in node_http_parser
static int mpls_route_del(struct mpls_route_config *cfg, struct netlink_ext_ack *extack) { struct net *net = cfg->rc_nlinfo.nl_net; unsigned index; int err = -EINVAL; index = cfg->rc_label; if (!mpls_label_ok(net, &index, extack)) goto errout; mpls_route_update(net, index, NULL, &cfg->rc_nlinfo); err ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
128,181,297,747,638,420,000,000,000,000,000,000,000
18
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static void p54u_disconnect(struct usb_interface *intf) { struct ieee80211_hw *dev = usb_get_intfdata(intf); struct p54u_priv *priv; if (!dev) return; priv = dev->priv; wait_for_completion(&priv->fw_wait_load); p54_unregister_common(dev); release_firmware(priv->fw); p54_free_common(dev); }
0
[ "CWE-416" ]
linux
6e41e2257f1094acc37618bf6c856115374c6922
167,382,408,257,419,370,000,000,000,000,000,000,000
15
p54usb: Fix race between disconnect and firmware loading The syzbot fuzzer found a bug in the p54 USB wireless driver. The issue involves a race between disconnect and the firmware-loader callback routine, and it has several aspects. One big problem is that when the firmware can't be loaded, the callback routine tri...
uint32_t mg_crc32(uint32_t crc, const char *buf, size_t len) { int i; crc = ~crc; while (len--) { crc ^= *(unsigned char *) buf++; for (i = 0; i < 8; i++) crc = crc & 1 ? (crc >> 1) ^ 0xedb88320 : crc >> 1; } return ~crc; }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
174,498,408,006,741,500,000,000,000,000,000,000,000
9
Protect against the directory traversal in mg_upload()
int tls_collect_extensions(SSL *s, PACKET *packet, unsigned int context, RAW_EXTENSION **res, size_t *len, int init) { PACKET extensions = *packet; size_t i = 0; size_t num_exts; custom_ext_methods *exts = &s->cert->custext; RAW_EXTENSION *raw_extensions = NULL; const ...
0
[ "CWE-476" ]
openssl
fb9fa6b51defd48157eeb207f52181f735d96148
194,182,538,725,248,530,000,000,000,000,000,000,000
123
ssl sigalg extension: fix NULL pointer dereference As the variable peer_sigalgslen is not cleared on ssl rehandshake, it's possible to crash an openssl tls secured server remotely by sending a manipulated hello message in a rehandshake. On such a manipulated rehandshake, tls1_set_shared_sigalgs() calls tls12_shared_s...
hook_process_add_to_buffer (struct t_hook *hook_process, int index_buffer, const char *buffer, int size) { if (HOOK_PROCESS(hook_process, buffer_size[index_buffer]) + size > HOOK_PROCESS_BUFFER_SIZE) hook_process_send_buffers (hook_process, WEECHAT_HOOK_PROCESS_RUNNING); ...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
99,630,524,320,888,980,000,000,000,000,000,000,000
11
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
lseg_parallel(PG_FUNCTION_ARGS) { LSEG *l1 = PG_GETARG_LSEG_P(0); LSEG *l2 = PG_GETARG_LSEG_P(1); #ifdef NOT_USED PG_RETURN_BOOL(FPeq(l1->m, l2->m)); #endif PG_RETURN_BOOL(FPeq(point_sl(&l1->p[0], &l1->p[1]), point_sl(&l2->p[0], &l2->p[1]))); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
323,170,212,879,772,400,000,000,000,000,000,000,000
11
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
remove_timers (GSManager *manager) { remove_lock_timer (manager); remove_cycle_timer (manager); }
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
162,589,882,926,627,130,000,000,000,000,000,000,000
5
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
UnicodeString::countChar32(int32_t start, int32_t length) const { pinIndices(start, length); // if(isBogus()) then fArray==0 and start==0 - u_countChar32() checks for NULL return u_countChar32(getArrayStart()+start, length); }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
3,739,006,231,853,787,600,000,000,000,000,000,000
5
ICU-20958 Prevent SEGV_MAPERR in append See #971
static inline size_t xfrm_sa_len(struct xfrm_state *x) { size_t l = 0; if (x->aead) l += nla_total_size(aead_len(x->aead)); if (x->aalg) { l += nla_total_size(sizeof(struct xfrm_algo) + (x->aalg->alg_key_len + 7) / 8); l += nla_total_size(xfrm_alg_auth_len(x->aalg)); } if (x->ealg) l += nla_total_s...
0
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
112,235,709,194,035,000,000,000,000,000,000,000,000
31
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
static inline char * expand_string_to_string_internal (string, quoted, func) char *string; int quoted; EXPFUNC *func; { WORD_LIST *list; char *ret; if (string == 0 || *string == '\0') return ((char *)NULL); list = (*func) (string, quoted); if (list) { ret = string_list (list); ...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
25,948,974,384,613,560,000,000,000,000,000,000,000
22
Bash-4.4 patch 7
static void *spl_ptr_llist_last(spl_ptr_llist *llist) /* {{{ */ { spl_ptr_llist_element *tail = llist->tail; if (tail == NULL) { return NULL; } else { return tail->data; } }
0
[]
php-src
df78c48354f376cf419d7a97f88ca07d572f00fb
72,025,521,363,507,530,000,000,000,000,000,000,000
10
Fixed Bug #67538 (SPL Iterators use-after-free)
struct dce_hwseq *dcn20_hwseq_create( struct dc_context *ctx) { struct dce_hwseq *hws = kzalloc(sizeof(struct dce_hwseq), GFP_KERNEL); if (hws) { hws->ctx = ctx; hws->regs = &hwseq_reg; hws->shifts = &hwseq_shift; hws->masks = &hwseq_mask; } return hws; }
0
[ "CWE-400", "CWE-703", "CWE-401" ]
linux
055e547478a11a6360c7ce05e2afc3e366968a12
89,759,929,247,264,670,000,000,000,000,000,000,000
13
drm/amd/display: memory leak In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated clk_src needs release. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
fr_window_get_batch_title (FrWindow *window) { return window->priv->batch_title; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
138,530,960,839,758,480,000,000,000,000,000,000,000
4
libarchive: sanitize filenames before extracting
parse_keyblock_image (iobuf_t iobuf, int pk_no, int uid_no, const u32 *sigstatus, kbnode_t *r_keyblock) { gpg_error_t err; PACKET *pkt; kbnode_t keyblock = NULL; kbnode_t node, *tail; int in_cert, save_mode; u32 n_sigs; int pk_count, uid_count; *r_keyblock = NULL; pkt = xtrymal...
1
[ "CWE-416" ]
gnupg
f0f71a721ccd7ab9e40b8b6b028b59632c0cc648
46,344,756,122,396,080,000,000,000,000,000,000,000
152
gpg: Prevent an invalid memory read using a garbled keyring. * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet types. * g10/keydb.c (parse_keyblock_image): Ditto. -- The keyring DB code did not reject packets which don't belong into a keyring. If for example the keyblock contains a literal data packet...
static Image *ReadVIFFImage(const ImageInfo *image_info, ExceptionInfo *exception) { #define VFF_CM_genericRGB 15 #define VFF_CM_ntscRGB 1 #define VFF_CM_NONE 0 #define VFF_DEP_DECORDER 0x4 #define VFF_DEP_NSORDER 0x8 #define VFF_DES_RAW 0 #define VFF_LOC_IMPLICIT 1 #define VFF_MAPTYP_NONE 0 #define VFF_MAPTY...
1
[ "CWE-400" ]
ImageMagick
23acdce3651447328c6ef71ede20ee60637ba39d
101,804,520,406,687,290,000,000,000,000,000,000,000
648
https://github.com/ImageMagick/ImageMagick/issues/1286
gnutls_global_set_mem_functions(gnutls_alloc_function alloc_func, gnutls_alloc_function secure_alloc_func, gnutls_is_secure_function is_secure_func, gnutls_realloc_function realloc_func, gnutls_free_function free_func) { _gnutls_debug_log("called the deprecated gnutls_global_set_mem_functions()\n"); }
0
[ "CWE-20" ]
gnutls
b0a3048e56611a2deee4976aeba3b8c0740655a6
82,825,337,665,688,160,000,000,000,000,000,000,000
8
env: use secure_getenv when reading environment variables
void KaxSimpleBlock::SetParent(KaxCluster & aParentCluster) { KaxInternalBlock::SetParent( aParentCluster ); }
0
[ "CWE-200", "CWE-399", "CWE-119" ]
libmatroska
0a2d3e3644a7453b6513db2f9bc270f77943573f
226,368,017,995,053,200,000,000,000,000,000,000,000
3
KaxBlockInternal: check EBML lace sizes against available buffer space
lou_getEmphClasses(const char *tableList) { const char *names[MAX_EMPH_CLASSES + 1]; unsigned int count = 0; const TranslationTableHeader *table = _lou_getTranslationTable(tableList); if (!table) return NULL; while (count < MAX_EMPH_CLASSES) { char const *name = table->emphClassNames[count]; if (!name) break;...
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
258,557,068,565,850,900,000,000,000,000,000,000,000
23
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
bool SetOpAttrScalar(TFE_Context* ctx, TFE_Op* op, const char* key, PyObject* py_value, TF_AttrType type, tensorflow::gtl::FlatMap<string, int64_t>* attr_list_sizes, TF_Status* status) { if (type == TF_ATTR_STRING) { tensorflow::StringPiece value; ...
1
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
9,094,187,509,084,024,000,000,000,000,000,000,000
95
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
static void ib_uverbs_remove_one(struct ib_device *device, void *client_data) { struct ib_uverbs_device *uverbs_dev = client_data; int wait_clients = 1; if (!uverbs_dev) return; cdev_device_del(&uverbs_dev->cdev, &uverbs_dev->dev); ida_free(&uverbs_ida, uverbs_dev->devnum); if (device->ops.disassociate_ucont...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
204,403,931,201,881,820,000,000,000,000,000,000,000
34
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
inline Padding3DValues ComputePadding3DValues( int stride_height, int stride_width, int stride_depth, int dilation_rate_height, int dilation_rate_width, int dilation_rate_depth, int in_height, int in_width, int in_depth, int filter_height, int filter_width, int filter_depth, TfLitePadding padding, int* ...
0
[ "CWE-369" ]
tensorflow
49847ae69a4e1a97ae7f2db5e217c77721e37948
270,006,874,560,540,600,000,000,000,000,000,000,000
29
Fix division by zero in TFLite padding. PiperOrigin-RevId: 370777494 Change-Id: Ic1331e4a1603b9e4c8aa183012a6c8237410aa0f
static void update_and_free_pages_bulk(struct hstate *h, struct list_head *list) { struct page *page, *t_page; list_for_each_entry_safe(page, t_page, list, lru) { update_and_free_page(h, page, false); cond_resched(); } }
0
[]
linux
a4a118f2eead1d6c49e00765de89878288d4b890
138,401,509,228,572,800,000,000,000,000,000,000,000
9
hugetlbfs: flush TLBs correctly after huge_pmd_unshare When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB flush is missing. This TLB flush must be performed before releasing the i_mmap_rwsem, in order to prevent an unshared PMDs page from being released and reused before the TLB flush took place...
static int dtls1_process_buffered_records(SSL *s) { pitem *item; item = pqueue_peek(s->d1->unprocessed_rcds.q); if (item) { /* Check if epoch is current. */ if (s->d1->unprocessed_rcds.epoch != s->d1->r_epoch) return (1); /* Nothing to do. */ /* Process all the ...
1
[ "CWE-189" ]
openssl
fa75569758298e2930c78989b516cac937118acc
288,222,067,568,821,400,000,000,000,000,000,000,000
30
Fix DTLS unprocessed records bug During a DTLS handshake we may get records destined for the next epoch arrive before we have processed the CCS. In that case we can't decrypt or verify the record yet, so we buffer it for later use. When we do receive the CCS we work through the queue of unprocessed records and process...