func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int ssl3_get_key_exchange(SSL *s) { #ifndef OPENSSL_NO_RSA unsigned char *q, md_buf[EVP_MAX_MD_SIZE * 2]; #endif EVP_MD_CTX md_ctx; unsigned char *param, *p; int al, j, ok; long i, param_len, n, alg_k, alg_a; EVP_PKEY *pkey = NULL; const EVP_MD *md = NULL; #ifndef OPENSSL_NO_RSA RSA *rsa...
1
[]
openssl
d6be3124f22870f1888c532523b74ea5d89795eb
92,630,970,805,982,470,000,000,000,000,000,000,000
673
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org> (cher...
hook_timer_check_system_clock () { time_t now; long diff_time; struct t_hook *ptr_hook; now = time (NULL); /* * check if difference with previous time is more than 10 seconds: * if it is, then consider it's clock skew and reinitialize all timers */ diff_time = now - hook_last_sy...
0
[ "CWE-20" ]
weechat
efb795c74fe954b9544074aafcebb1be4452b03a
164,884,790,727,136,630,000,000,000,000,000,000,000
34
core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764)
mark_trusted_job (GIOSchedulerJob *io_job, GCancellable *cancellable, gpointer user_data) { MarkTrustedJob *job = user_data; CommonJob *common; char *contents, *new_contents; gsize length, new_length; GError *error; guint32 current; int response; GFileInfo *info; common = (CommonJob *)job; common->i...
1
[]
nautilus
1e1c916f5537eb5e4144950f291f4a3962fc2395
93,816,849,436,748,860,000,000,000,000,000,000,000
151
Add "interactive" argument to nautilus_file_mark_desktop_file_trusted. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: * libnautilus-private/nautilus-mime-actions.c: Add "interactive" ...
u32 gf_isom_sample_has_subsamples(GF_ISOFile *movie, u32 track, u32 sampleNumber, u32 flags) { GF_TrackBox *trak = gf_isom_get_track_from_file(movie, track); if (!trak) return GF_BAD_PARAM; if (!trak->Media->information->sampleTable->sub_samples) return 0; if (!sampleNumber) return 1; return gf_isom_sample_get_sub...
0
[ "CWE-787" ]
gpac
f0a41d178a2dc5ac185506d9fa0b0a58356b16f7
153,537,071,520,916,980,000,000,000,000,000,000,000
8
fixed #2120
static int gem_context_register(struct i915_gem_context *ctx, struct drm_i915_file_private *fpriv) { int ret; ctx->file_priv = fpriv; if (ctx->ppgtt) ctx->ppgtt->vm.file = fpriv; ctx->pid = get_task_pid(current, PIDTYPE_PID); ctx->name = kasprintf(GFP_KERNEL, "%s[%d]", current->comm, pid_nr(ctx->p...
0
[ "CWE-416" ]
linux
7dc40713618c884bf07c030d1ab1f47a9dc1f310
39,692,150,796,164,797,000,000,000,000,000,000,000
35
drm/i915: Introduce a mutex for file_priv->context_idr Define a mutex for the exclusive use of interacting with the per-file context-idr, that was previously guarded by struct_mutex. This allows us to reduce the coverage of struct_mutex, with a view to removing the last bits coordinating GEM context later. (In the sho...
static void fm10k_set_num_queues(struct fm10k_intfc *interface) { /* Attempt to setup QoS and RSS first */ if (fm10k_set_qos_queues(interface)) return; /* If we don't have QoS, just fallback to only RSS. */ fm10k_set_rss_queues(interface); }
0
[ "CWE-476" ]
linux
01ca667133d019edc9f0a1f70a272447c84ec41f
192,181,813,089,942,200,000,000,000,000,000,000,000
9
fm10k: Fix a potential NULL pointer dereference Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),...
void Item::push_note_converted_to_positive_complement(THD *thd) { push_warning(thd, Sql_condition::WARN_LEVEL_NOTE, ER_UNKNOWN_ERROR, "Cast to unsigned converted negative integer to it's " "positive complement"); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
251,854,735,554,881,500,000,000,000,000,000,000,000
6
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
GF_Err gf_filter_request_opengl(GF_Filter *filter) { #ifndef GPAC_DISABLE_3D GF_Err e; if (filter->finalized || filter->removed) return GF_OK; filter->session->nb_gl_filters++; e = gf_fs_check_gl_provider(filter->session); if (e) { filter->session->nb_gl_filters--; filter->main_thread_forced = GF_FALSE; ret...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
248,970,234,800,506,460,000,000,000,000,000,000,000
20
fixed crashes for very long path - cf #1908
bool CIRCSock::OnKickMessage(CKickMessage& Message) { CString sChan = Message.GetParam(0); CString sKickedNick = Message.GetKickedNick(); CChan* pChan = m_pNetwork->FindChan(sChan); if (pChan) { Message.SetChan(pChan); IRCSOCKMODULECALL(OnKickMessage(Message), NOTHING); // do n...
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
207,995,670,552,719,230,000,000,000,000,000,000,000
23
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
static int __serdes_write_mcb_s1g(struct regmap *regmap, u8 macro, u32 op) { unsigned int regval; regmap_write(regmap, HSIO_MCB_S1G_ADDR_CFG, op | HSIO_MCB_S1G_ADDR_CFG_SERDES1G_ADDR(BIT(macro))); return regmap_read_poll_timeout(regmap, HSIO_MCB_S1G_ADDR_CFG, regval, (regval & op) != op, 100, MCB_...
0
[ "CWE-125" ]
linux
6acb47d1a318e5b3b7115354ebc4ea060c59d3a1
314,983,887,223,899,870,000,000,000,000,000,000,000
11
phy: ocelot-serdes: fix out-of-bounds read Currently, there is an out-of-bounds read on array ctrl->phys, once variable i reaches the maximum array size of SERDES_MAX in the for loop. Fix this by changing the condition in the for loop from i <= SERDES_MAX to i < SERDES_MAX. Addresses-Coverity-ID: 1473966 ("Out-of-bo...
static inline void SetPixelAlpha(const Image *restrict image, const Quantum alpha,Quantum *restrict pixel) { if (image->channel_map[AlphaPixelChannel].traits != UndefinedPixelTrait) pixel[image->channel_map[AlphaPixelChannel].offset]=alpha; }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
226,577,517,538,165,900,000,000,000,000,000,000,000
6
my_endmntent(FILE *stream, off_t size) { int rc, fd; fd = fileno(stream); if (fd < 0) return -EBADF; rc = fflush(stream); if (!rc) rc = fsync(fd); /* truncate file back to "size" -- best effort here */ if (rc) { rc = errno; ftruncate(fd, size); } endmntent(stream); return rc; }
0
[ "CWE-20" ]
cifs-utils
f6eae44a3d05b6515a59651e6bed8b6dde689aec
61,445,542,482,659,420,000,000,000,000,000,000,000
21
mtab: handle ENOSPC/EFBIG condition properly when altering mtab It's possible that when mount.cifs goes to append the mtab that there won't be enough space to do so, and the mntent won't be appended to the file in its entirety. Add a my_endmntent routine that will fflush and then fsync the FILE if that succeeds. If e...
static noinline int update_ref_for_cow(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, struct extent_buffer *cow, int *last_ref) { u64 refs; u64 owner; u64 flags; u64 new_flags = 0; int ret; /* * Backrefs update rules: * * Al...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
132,299,165,578,487,020,000,000,000,000,000,000,000
103
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...
TEST_F(OptimizePipeline, PushdownMatchAndAddFields) { auto unpackSpecObj = fromjson( "{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: 'myMeta', " "bucketMaxSpanSeconds: 3600}}"); auto pipeline = Pipeline::parse( makeVector(unpackSpecObj, fromjson(...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
212,963,639,626,132,630,000,000,000,000,000,000,000
23
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
static int ssl_parse_alpn_ext( mbedtls_ssl_context *ssl, const unsigned char *buf, size_t len ) { size_t list_len, cur_len, ours_len; const unsigned char *theirs, *start, *end; const char **ours; /* If ALPN not configured, just ignore the extension */ if( ssl->conf->a...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
36,210,738,499,409,610,000,000,000,000,000,000,000
85
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
void Item_direct_ref::save_val(Field *to) { (*ref)->save_val(to); null_value=(*ref)->null_value; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
270,092,177,931,204,780,000,000,000,000,000,000,000
5
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'...
bool LOGGER::flush_logs(THD *thd) { int rc= 0; /* Now we lock logger, as nobody should be able to use logging routines while log tables are closed */ logger.lock_exclusive(); /* reopen log files */ file_log_handler->flush(); /* end of log flush */ logger.unlock(); return rc; }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
188,826,896,127,817,530,000,000,000,000,000,000,000
17
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
static void xhci_alloc_streams(XHCIEPContext *epctx, dma_addr_t base) { assert(epctx->pstreams == NULL); epctx->nr_pstreams = 2 << epctx->max_pstreams; epctx->pstreams = xhci_alloc_stream_contexts(epctx->nr_pstreams, base); }
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
195,644,376,126,203,370,000,000,000,000,000,000,000
6
xhci: guard xhci_kick_epctx against recursive calls Track xhci_kick_epctx processing being active in a variable. Check the variable before calling xhci_kick_epctx from xhci_kick_ep. Add an assert to make sure we don't call recursively into xhci_kick_epctx. Cc: 1653384@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9...
static void megasas_release_mfi(struct megasas_instance *instance) { u32 reply_q_sz = sizeof(u32) *(instance->max_mfi_cmds + 1); if (instance->reply_queue) dma_free_coherent(&instance->pdev->dev, reply_q_sz, instance->reply_queue, instance->reply_queue_h); megasas_free_cmds(instance); iounmap(instance->...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
8,299,377,200,975,436,000,000,000,000,000,000,000
14
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
static int oidc_handle_request_uri(request_rec *r, oidc_cfg *c) { char *request_ref = NULL; oidc_util_get_request_parameter(r, "request_uri", &request_ref); if (request_ref == NULL) { oidc_error(r, "no \"request_uri\" parameter found"); return HTTP_BAD_REQUEST; } const char *jwt = NULL; c->cache->get(r, OID...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
296,597,701,173,108,170,000,000,000,000,000,000,000
21
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
HuffmanDecoder * operator()() const { unsigned int codeLengths[288]; std::fill(codeLengths + 0, codeLengths + 144, 8); std::fill(codeLengths + 144, codeLengths + 256, 9); std::fill(codeLengths + 256, codeLengths + 280, 7); std::fill(codeLengths + 280, codeLengths + 288, 8); member_ptr<HuffmanDecode...
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
25,961,036,395,667,200,000,000,000,000,000,000,000
11
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
static void cmd_parse_lsub (IMAP_DATA* idata, char* s) { char buf[STRING]; char errstr[STRING]; BUFFER err, token; ciss_url_t url; IMAP_LIST list; if (idata->cmddata && idata->cmdtype == IMAP_CT_LIST) { /* caller will handle response itself */ cmd_parse_list (idata, s); return; } if (!op...
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
155,249,738,669,979,500,000,000,000,000,000,000,000
47
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
n_tty_receive_char_inline(struct tty_struct *tty, unsigned char c) { struct n_tty_data *ldata = tty->disc_data; if (tty->stopped && !tty->flow_stopped && I_IXON(tty) && I_IXANY(tty)) { start_tty(tty); process_echoes(tty); } if (L_ECHO(tty)) { finish_erasing(ldata); /* Record the column of first canon char....
0
[ "CWE-362" ]
tty
4291086b1f081b869c6d79e5b7441633dc3ace00
82,928,811,870,978,370,000,000,000,000,000,000,000
21
n_tty: Fix n_tty_write crash when echoing in raw mode The tty atomic_write_lock does not provide an exclusion guarantee for the tty driver if the termios settings are LECHO & !OPOST. And since it is unexpected and not allowed to call TTY buffer helpers like tty_insert_flip_string concurrently, this may lead to crashe...
brcmf_cfg80211_set_pmksa(struct wiphy *wiphy, struct net_device *ndev, struct cfg80211_pmksa *pmksa) { struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy); struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_pmksa *pmk = &cfg->pmk_list.pmk[0]; s32 err; u32 npmk, i; brcmf_dbg(TRACE, "Enter\n"); if (!che...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
327,727,391,204,110,900,000,000,000,000,000,000,000
40
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
proto_tree_add_item_ret_display_string_and_length(proto_tree *tree, int hfindex, tvbuff_t *tvb, const gint start, gint length, const guint encoding, ...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
251,872,219,897,064,370,000,000,000,000,000,000,000
106
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
ipmi_lan_stats_clear(struct ipmi_intf * intf, uint8_t chan) { int rc = 0; struct ipmi_rs * rsp; struct ipmi_rq req; uint8_t msg_data[2]; if (!is_lan_channel(intf, chan)) { lprintf(LOG_ERR, "Channel %d is not a LAN channel", chan); return -1; } /* From here, we are ready to get the stats */ msg_data[0] = c...
0
[ "CWE-120" ]
ipmitool
d45572d71e70840e0d4c50bf48218492b79c1a10
141,275,480,224,742,620,000,000,000,000,000,000,000
36
lanp: Fix buffer overflows in get_lan_param_select Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `get_lan_param_select` function is missing a validation check on the response’s `data_len`, which it then returns to caller functions, where stack buff...
void Filter::UpstreamRequest::decodeTrailers(Http::HeaderMapPtr&& trailers) { ScopeTrackerScopeState scope(&parent_.callbacks_->scope(), parent_.callbacks_->dispatcher()); maybeEndDecode(true); if (!parent_.config_.upstream_logs_.empty()) { upstream_trailers_ = std::make_unique<Http::HeaderMapImpl>(*trailers...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
217,972,079,822,360,700,000,000,000,000,000,000,000
9
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...
xsltNeedElemSpaceHandling(xsltTransformContextPtr ctxt) { xsltStylesheetPtr style; if (ctxt == NULL) return(0); style = ctxt->style; while (style != NULL) { if (style->stripSpaces != NULL) return(1); style = xsltNextImport(style); } return(0); }
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
67,384,125,605,622,130,000,000,000,000,000,000,000
13
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
int redisGetReplyFromReader(redisContext *c, void **reply) { if (redisReaderGetReply(c->reader,reply) == REDIS_ERR) { __redisSetError(c,c->reader->err,c->reader->errstr); return REDIS_ERR; } return REDIS_OK; }
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
138,083,877,830,018,120,000,000,000,000,000,000,000
8
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
update_peer_certificate_and_compute_errors (GTlsConnectionBase *tls) { GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls); GTlsCertificate *peer_certificate = NULL; GTlsCertificateFlags peer_certificate_errors = 0; /* This function must be called from the handshake context threa...
0
[ "CWE-295" ]
glib-networking
29513946809590c4912550f6f8620468f9836d94
276,279,804,427,186,460,000,000,000,000,000,000,000
27
Return bad identity error if identity is unset When the server-identity property of GTlsClientConnection is unset, the documentation sasy we need to fail the certificate verification with G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise, it's easy for applications to fail to specify server identity....
void TRI_InitV8Actions(v8::Isolate* isolate) { v8::HandleScope scope(isolate); // ............................................................................. // create the global functions // ............................................................................. TRI_AddGlobalFunctionVocbase( ...
0
[ "CWE-918" ]
arangodb
d9b7f019d2435f107b19a59190bf9cc27d5f34dd
203,050,127,913,739,800,000,000,000,000,000,000,000
30
[APM-78] Disable installation from remote URL (#15292)
vector<CClient*> CUser::GetAllClients() const { vector<CClient*> vClients; for (CIRCNetwork* pNetwork : m_vIRCNetworks) { for (CClient* pClient : pNetwork->GetClients()) { vClients.push_back(pClient); } } for (CClient* pClient : m_vClients) { vClients.push_back(pCli...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
77,605,773,951,678,430,000,000,000,000,000,000,000
15
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static bool vrend_blit_needs_redblue_swizzle(struct vrend_resource *src_res, struct vrend_resource *dst_res, const struct pipe_blit_info *info) { /* Virgl's BGR* formats always use GL_RGBA8 internal format so texture views have...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
262,401,296,531,609,900,000,000,000,000,000,000,000
26
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>
CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE { size_t origin = parameters.size() > 1 ? 1 : 0; if (parameters[origin].empty()) { user->WriteNumeric(ERR_NOORIGIN, "No origin specified"); return CMD_FAILURE; } ClientProtocol::Messages::Pong pong(parameters[0], origin ?...
0
[ "CWE-200", "CWE-732" ]
inspircd
4350a11c663b0d75f8119743bffb7736d87abd4d
130,904,973,812,205,590,000,000,000,000,000,000,000
13
Fix sending malformed pong messages in some cases.
static cJSON_bool print_object(const cJSON * const item, printbuffer * const output_buffer) { unsigned char *output_pointer = NULL; size_t length = 0; cJSON *current_item = item->child; if (output_buffer == NULL) { return false; } /* Compose the output: */ length = (size_t) (ou...
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
91,548,939,224,664,580,000,000,000,000,000,000,000
112
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
scsi_nl_rcv_msg(struct sk_buff *skb) { struct nlmsghdr *nlh; struct scsi_nl_hdr *hdr; u32 rlen; int err, tport; while (skb->len >= NLMSG_HDRLEN) { err = 0; nlh = nlmsg_hdr(skb); if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) || (skb->len < nlh->nlmsg_len)) { printk(KERN_WARNING "%s: discardi...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
61,079,625,799,868,510,000,000,000,000,000,000,000
73
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
hybiDecodeCleanupComplete(ws_ctx_t *wsctx) { hybiDecodeCleanupBasics(wsctx); wsctx->continuation_opcode = WS_OPCODE_INVALID; ws_dbg("cleaned up wsctx completely\n"); }
0
[ "CWE-787" ]
libvncserver
0cf1400c61850065de590d403f6d49e32882fd76
280,232,631,886,682,660,000,000,000,000,000,000,000
6
fix crash because of unaligned accesses in hybiReadAndDecode()
static int do_send_XMotionEvent(rpc_message_t *message, XEvent *xevent) { int error; if ((error = do_send_XAnyEvent(message, xevent)) < 0) return error; if ((error = rpc_message_send_uint32(message, xevent->xmotion.root)) < 0) return error; if ((error = rpc_message_send_uint32(message, xevent->xmotion.subwind...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
16,063,816,495,239,144,000,000,000,000,000,000,000
27
Support all the new variables added
int http_response_forward_body(struct stream *s, struct channel *res, int an_bit) { struct session *sess = s->sess; struct http_txn *txn = s->txn; struct http_msg *msg = &s->txn->rsp; struct htx *htx; int ret; DBG_TRACE_ENTER(STRM_EV_STRM_ANA|STRM_EV_HTTP_ANA, s, txn, msg); htx = htxbuf(&res->buf); if (htx->...
0
[ "CWE-703", "CWE-835" ]
haproxy
bfb15ab34ead85f64cd6da0e9fb418c9cd14cee8
323,995,817,491,393,660,000,000,000,000,000,000,000
234
BUG/MAJOR: http/htx: prevent unbounded loop in http_manage_server_side_cookies Ensure calls to http_find_header() terminate. If a "Set-Cookie2" header is found then the while(1) loop in http_manage_server_side_cookies() will never terminate, resulting in the watchdog firing and the process terminating via SIGABRT. Th...
int kvm_arch_vcpu_ioctl_set_mpstate(struct kvm_vcpu *vcpu, struct kvm_mp_state *mp_state) { int r = 0; vcpu->arch.mp_state = mp_state->mp_state; if (vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZED) r = vcpu_reset(vcpu); return r; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
302,771,435,410,625,880,000,000,000,000,000,000,000
10
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 iwch_reject_cr(struct iw_cm_id *cm_id, const void *pdata, u8 pdata_len) { int err; struct iwch_ep *ep = to_ep(cm_id); PDBG("%s ep %p tid %u\n", __func__, ep, ep->hwtid); if (state_read(&ep->com) == DEAD) { put_ep(&ep->com); return -ECONNRESET; } BUG_ON(state_read(&ep->com) != MPA_REQ_RCVD); if (mpa_rev ...
0
[ "CWE-703" ]
linux
67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3
51,523,008,699,469,290,000,000,000,000,000,000,000
20
iw_cxgb3: Fix incorrectly returning error on success The cxgb3_*_send() functions return NET_XMIT_ values, which are positive integers values. So don't treat positive return values as an error. Signed-off-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off...
static inline bool skb_frag_must_loop(struct page *p) { #if defined(CONFIG_HIGHMEM) if (PageHighMem(p)) return true; #endif return false; }
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
149,849,441,655,410,140,000,000,000,000,000,000,000
8
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
static inline void vma_adjust_trans_huge(struct vm_area_struct *vma, unsigned long start, unsigned long end, long adjust_next) { }
1
[ "CWE-399" ]
linux
78f11a255749d09025f54d4e2df4fbcb031530e2
290,523,543,621,802,830,000,000,000,000,000,000,000
6
mm: thp: fix /dev/zero MAP_PRIVATE and vm_flags cleanups The huge_memory.c THP page fault was allowed to run if vm_ops was null (which would succeed for /dev/zero MAP_PRIVATE, as the f_op->mmap wouldn't setup a special vma->vm_ops and it would fallback to regular anonymous memory) but other THP logics weren't fully ac...
vhost_user_net_set_mtu(struct virtio_net **pdev, struct VhostUserMsg *msg, int main_fd __rte_unused) { struct virtio_net *dev = *pdev; if (validate_msg_fds(msg, 0) != 0) return RTE_VHOST_MSG_RESULT_ERR; if (msg->payload.u64 < VIRTIO_MIN_MTU || msg->payload.u64 > VIRTIO_MAX_MTU) { VHOST_LOG_CONFIG(ERR, "I...
0
[ "CWE-190" ]
dpdk
3ae4beb079ce242240c34376a066bbccd0c0b23e
282,381,120,023,356,850,000,000,000,000,000,000,000
20
vhost: check log mmap offset and size overflow vhost_user_set_log_base() is a message handler that is called to handle the VHOST_USER_SET_LOG_BASE message. Its payload contains a 64 bit size and offset. Both are added up and used as a size when calling mmap(). There is no integer overflow check. If an integer overflo...
DECLARESepPutFunc(putRGBUAseparate16bittile) { uint16 *wr = (uint16*) r; uint16 *wg = (uint16*) g; uint16 *wb = (uint16*) b; uint16 *wa = (uint16*) a; (void) img; (void) y; while (h-- > 0) { uint32 r2,g2,b2,a2; uint8* m; for (x = w; x-- > 0;) { a2 = img->Bitdepth16To8[*wa++]; m = img->UaToAa+((size_t)...
0
[ "CWE-20" ]
libtiff
48780b4fcc425cddc4ef8ffdf536f96a0d1b313b
328,397,049,269,214,700,000,000,000,000,000,000,000
22
* libtiff/tif_getimage.c: add explicit uint32 cast in putagreytile to avoid UndefinedBehaviorSanitizer warning. Patch by Nicolás Peña. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2658
sum_rect(short y0, short x0, short y1, short x1) { //printf("sum_rect %d,%d..%d,%d\n", y0, x0, y1, x1); y0--; x0--; y1--; x1--; if (term.curs.origin) { y0 += term.marg_top; x0 += term.marg_left; y1 += term.marg_top; x1 += term.marg_left; } if (y0 < 0) y0 = 0; if (x0 < 0) x0 = 0; ...
0
[ "CWE-703", "CWE-770" ]
mintty
bd52109993440b6996760aaccb66e68e782762b9
22,907,129,159,413,523,000,000,000,000,000,000,000
50
tame some window operations, just in case
static int update_queue(struct sem_array *sma, int semnum, struct list_head *pt) { struct sem_queue *q; struct list_head *walk; struct list_head *pending_list; int semop_completed = 0; if (semnum == -1) pending_list = &sma->sem_pending; else pending_list = &sma->sem_base[semnum].sem_pending; again: walk = ...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
193,481,081,979,685,600,000,000,000,000,000,000,000
53
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
static inline struct gadget_info *os_desc_item_to_gadget_info( struct config_item *item) { return to_gadget_info(to_os_desc(item)->group.cg_item.ci_parent); }
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
87,817,944,862,806,220,000,000,000,000,000,000,000
5
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...
xrdp_mm_delete(struct xrdp_mm* self) { if (self == 0) { return; } /* free any module stuff */ xrdp_mm_module_cleanup(self); trans_delete(self->sesman_trans); self->sesman_trans = 0; self->sesman_trans_up = 0; list_delete(self->login_names); list_delete(self->login_values); g_free(self); }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
296,427,196,656,912,700,000,000,000,000,000,000,000
15
move temp files from /tmp to /tmp/.xrdp
int l2tp_recv(int fd, struct l2tp_packet_t **p, struct in_pktinfo *pkt_info, const char *secret, size_t secret_len) { struct l2tp_packet_t *pack; struct l2tp_hdr_t *hdr; struct l2tp_avp_t *avp; struct l2tp_attr_t *RV = NULL; struct sockaddr_in addr; socklen_t addr_len; uint16_t orig_avp_len; void *orig_a...
0
[ "CWE-119", "CWE-125", "CWE-120" ]
accel-ppp
2324bcd5ba12cf28f47357a8f03cd41b7c04c52b
191,180,136,264,088,770,000,000,000,000,000,000,000
265
l2tp: fix RCE through buffer overflow & fix LE/BE compatibility Unsufficent checks of valid l2tp header & avp length cause possible RCE through buffer overflow, reported by https://github.com/WinMin swings & leommxj, Chaitin Security Research Lab. Add missed header length and avp length validation to fix the issue. O...
positive_int_multiply(int x, int y) { if (x == 0 || y == 0) return 0; if (x < INT_MAX / y) return x * y; else return -1; }
0
[ "CWE-476" ]
oniguruma
850bd9b0d8186eb1637722b46b12656814ab4ad2
14,476,424,697,951,950,000,000,000,000,000,000,000
9
fix #87: Read unknown address in onig_error_code_to_str()
testcase_getsolverflags(Solver *solv) { Pool *pool = solv->pool; const char *str = 0; int i, v; for (i = 0; solverflags2str[i].str; i++) { v = solver_get_flag(solv, solverflags2str[i].flag); if (v == solverflags2str[i].def) continue; str = pool_tmpappend(pool, str, v ? " " : " !", solverf...
0
[ "CWE-120" ]
libsolv
0077ef29eb46d2e1df2f230fc95a1d9748d49dec
98,037,346,941,325,410,000,000,000,000,000,000,000
14
testcase_read: error out if repos are added or the system is changed too late We must not add new solvables after the considered map was created, the solver was created, or jobs were added. We may not changed the system after jobs have been added. (Jobs may point inside the whatproviedes array, so we must not invalid...
explicit SparseBincountOp(OpKernelConstruction* ctx) : OpKernel(ctx) { OP_REQUIRES_OK(ctx, ctx->GetAttr("binary_output", &binary_output_)); }
0
[ "CWE-125" ]
tensorflow
f410212e373eb2aec4c9e60bf3702eba99a38aba
299,594,036,355,509,000,000,000,000,000,000,000,000
3
Prevent out-of-bound accesses in SparseBincount. PiperOrigin-RevId: 399918616 Change-Id: I11d154f4444d3fde1f09c5c40628b8671791a30d
virDomainDefMaybeAddVirtioSerialController(virDomainDefPtr def) { /* Look for any virtio serial or virtio console devs */ size_t i; for (i = 0; i < def->nchannels; i++) { virDomainChrDefPtr channel = def->channels[i]; if (channel->targetType == VIR_DOMAIN_CHR_CHANNEL_TARGET_TYPE_VIRTIO) { ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
305,282,935,688,139,270,000,000,000,000,000,000,000
36
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 ssize_t sbi_ui_store(struct ext4_attr *a, struct ext4_sb_info *sbi, const char *buf, size_t count) { unsigned int *ui = (unsigned int *) (((char *) sbi) + a->offset); unsigned long t; if (parse_strtoul(buf, 0xffffffff, &t)) return -EINVAL; *ui = t; return count; }
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
96,216,680,303,600,860,000,000,000,000,000,000,000
12
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
static void __netdev_printk(const char *level, const struct net_device *dev, struct va_format *vaf) { if (dev && dev->dev.parent) { dev_printk_emit(level[1] - '0', dev->dev.parent, "%s %s %s%s: %pV", dev_driver_string(dev->dev.parent), dev_name(dev->dev.parent), netdev_name(dev), netdev_r...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
193,981,009,848,739,670,000,000,000,000,000,000,000
18
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
static struct sk_buff **ipip_gro_receive(struct sk_buff **head, struct sk_buff *skb) { if (NAPI_GRO_CB(skb)->encap_mark) { NAPI_GRO_CB(skb)->flush = 1; return NULL; } NAPI_GRO_CB(skb)->encap_mark = 1; return inet_gro_receive(head, skb); }
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
323,956,210,665,435,440,000,000,000,000,000,000,000
12
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
CString CUser::AddTimestamp(const CString& sStr) const { timeval tv; gettimeofday(&tv, nullptr); return AddTimestamp(tv, sStr); }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
171,420,837,691,621,860,000,000,000,000,000,000,000
5
Don't crash if user specified invalid encoding. This is CVE-2019-9917
static struct fuse_forget_link *dequeue_forget(struct fuse_iqueue *fiq, unsigned max, unsigned *countp) { struct fuse_forget_link *head = fiq->forget_list_head.next; struct fuse_forget_link **newhead = &head; unsigned count; for (count = 0; *newhead != NULL && count < max; count++) newhea...
0
[ "CWE-416" ]
linux
15fab63e1e57be9fdb5eec1bbc5916e9825e9acb
300,610,357,927,586,500,000,000,000,000,000,000,000
21
fs: prevent page refcount overflow in pipe_buf_get Change pipe_buf_get() to return a bool indicating whether it succeeded in raising the refcount of the page (if the thing in the pipe is a page). This removes another mechanism for overflowing the page refcount. All callers converted to handle a failure. Reported-by:...
void CoreNetwork::startAutoWhoCycle() { if (!_autoWhoQueue.isEmpty()) { _autoWhoCycleTimer.stop(); return; } _autoWhoQueue = channels(); }
0
[ "CWE-399" ]
quassel
b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8
253,899,693,533,721,880,000,000,000,000,000,000,000
8
Improve the message-splitting algorithm for PRIVMSG and CTCP This introduces a new message splitting algorithm based on QTextBoundaryFinder. It works by first starting with the entire message to be sent, encoding it, and checking to see if it is over the maximum message length. If it is, it uses QTBF to find the wor...
static void log_request_response_communication(const char *request, const char *response, struct analyze_event_data *evd) { char *message = xasprintf(response ? "%s '%s'" : "%s", request, response); update_command_run_log(message, evd); free(message); }
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
182,074,785,426,169,430,000,000,000,000,000,000,000
6
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
static int wc_ecc_shared_secret_gen_sync(ecc_key* private_key, ecc_point* point, byte* out, word32* outlen, ecc_curve_spec* curve) { int err; #ifndef WOLFSSL_SP_MATH ecc_point* result = NULL; word32 x = 0; #endif mp_int* k = &private_key->k; #ifdef HAVE_ECC_CDH mp_int ...
0
[ "CWE-200" ]
wolfssl
9b9568d500f31f964af26ba8d01e542e1f27e5ca
252,147,676,040,084,870,000,000,000,000,000,000,000
83
Change ECDSA signing to use blinding.
static int io_recvmsg(struct io_kiocb *req, unsigned int issue_flags) { struct io_async_msghdr iomsg, *kmsg; struct socket *sock; struct io_buffer *kbuf; unsigned flags; int ret, cflags = 0; bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK; sock = sock_from_file(req->file); if (unlikely(!sock)) return...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
182,282,667,207,760,660,000,000,000,000,000,000,000
55
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock) { if (!ossl_assert(*(unsigned int *)lock == 1)) return 0; return 1; }
0
[ "CWE-330" ]
openssl
1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be
66,346,838,564,146,620,000,000,000,000,000,000,000
6
drbg: ensure fork-safety without using a pthread_atfork handler When the new OpenSSL CSPRNG was introduced in version 1.1.1, it was announced in the release notes that it would be fork-safe, which the old CSPRNG hadn't been. The fork-safety was implemented using a fork count, which was incremented by a pthread_atfork...
m4_format (struct obstack *obs, int argc, token_data **argv) { if (bad_argc (argv[0], argc, 2, -1)) return; format (obs, argc - 1, argv + 1); }
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
264,825,743,507,493,540,000,000,000,000,000,000,000
6
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
TEST(RegexMatchExpression, Equality1) { RegexMatchExpression r1("a", "b", ""); RegexMatchExpression r2("a", "b", "x"); RegexMatchExpression r3("a", "c", ""); RegexMatchExpression r4("b", "b", ""); ASSERT(r1.equivalent(&r1)); ASSERT(!r1.equivalent(&r2)); ASSERT(!r1.equivalent(&r3)); ASSE...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
122,426,880,171,504,600,000,000,000,000,000,000,000
11
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static void prep_write_cb(struct bt_att_chan *chan, uint8_t opcode, const void *pdu, uint16_t length, void *user_data) { struct bt_gatt_server *server = user_data; uint16_t handle = 0; uint16_t offset; struct gatt_db_attribute *attr; struct prep_write_complete_data *pwcd; uint8_t ecode, status; if (le...
1
[ "CWE-476", "CWE-119", "CWE-787" ]
bluez
591c546c536b42bef696d027f64aa22434f8c3f0
109,162,113,030,954,200,000,000,000,000,000,000,000
57
shared/gatt-server: Fix heap overflow when appending prepare writes The code shall check if the prepare writes would append more the allowed maximum attribute length. Fixes https://github.com/bluez/bluez/security/advisories/GHSA-479m-xcq5-9g2q
int ServerConnectionImpl::onHeadersComplete(HeaderMapImplPtr&& headers) { // Handle the case where response happens prior to request complete. It's up to upper layer code // to disconnect the connection but we shouldn't fire any more events since it doesn't make // sense. if (active_request_) { const char* ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
235,467,320,754,526,200,000,000,000,000,000,000,000
41
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...
int sqlite3WhereExplainOneScan( Parse *pParse, /* Parse context */ SrcList *pTabList, /* Table list this loop refers to */ WhereLevel *pLevel, /* Scan to write OP_Explain opcode for */ u16 wctrlFlags /* Flags passed to sqlite3WhereBegin() */ ){ int re...
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
7,512,727,332,588,659,000,000,000,000,000,000,000
101
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
template<typename tc> CImg<T>& draw_rectangle(const int x0, const int y0, const int z0, const int x1, const int y1, const int z1, const tc *const color, const float opacity, const unsigned int pattern) { return draw_line(x...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
616,085,878,651,980,700,000,000,000,000,000,000
17
Fix other issues in 'CImg<T>::load_bmp()'.
xmlRelaxNGSchemaTypeHave(void *data ATTRIBUTE_UNUSED, const xmlChar * type) { xmlSchemaTypePtr typ; if (type == NULL) return (-1); typ = xmlSchemaGetPredefinedType(type, BAD_CAST "http://www.w3.org/2001/XMLSchema"); if (t...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
221,488,371,131,457,570,000,000,000,000,000,000,000
13
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
bool MYSQL_BIN_LOG::append(Log_event* ev) { bool error = 0; mysql_mutex_lock(&LOCK_log); DBUG_ENTER("MYSQL_BIN_LOG::append"); DBUG_ASSERT(log_file.type == SEQ_READ_APPEND); /* Log_event::write() is smart enough to use my_b_write() or my_b_append() depending on the kind of cache we have. */ if (ev...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
203,963,494,040,338,000,000,000,000,000,000,000,000
27
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
void CoreAuthHandler::handle(const Login &msg) { if (!checkClientRegistered()) return; UserId uid = Core::validateUser(msg.user, msg.password); if (uid == 0) { quInfo() << qPrintable(tr("Invalid login attempt from %1 as \"%2\"").arg(socket()->peerAddress().toString(), msg.user)); _p...
0
[]
quassel
e67887343c433cc35bc26ad6a9392588f427e746
302,727,737,915,610,440,000,000,000,000,000,000,000
22
Handle invalid handshake data properly in the core Clients sending invalid handshake data could make the core crash due to an unchecked pointer. This commit fixes this issue by having the core close the socket if a peer could not be created. Thanks to Bas Pape (Tucos) for finding this one!
static void string_addr_inc(struct x86_emulate_ctxt *ctxt, int reg, struct operand *op) { int df = (ctxt->eflags & EFLG_DF) ? -op->count : op->count; register_address_increment(ctxt, reg_rmw(ctxt, reg), df * op->bytes); op->addr.mem.ea = register_address(ctxt, reg_read(ctxt, reg)); }
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
7,551,284,785,576,343,000,000,000,000,000,000,000
8
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
static void fanout_release(struct sock *sk) { struct packet_sock *po = pkt_sk(sk); struct packet_fanout *f; f = po->fanout; if (!f) return; mutex_lock(&fanout_mutex); po->fanout = NULL; if (atomic_dec_and_test(&f->sk_ref)) { list_del(&f->list); dev_remove_pack(&f->prot_hook); kfree(f); } mutex_unloc...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
155,370,609,260,059,450,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...
bool CModules::OnUserJoinMessage(CJoinMessage& Message) { MODHALTCHK(OnUserJoinMessage(Message)); }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
163,682,439,296,455,600,000,000,000,000,000,000,000
3
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
static int udp_seq_open(struct inode *inode, struct file *file) { struct udp_seq_afinfo *afinfo = PDE(inode)->data; struct udp_iter_state *s; int err; err = seq_open_net(inode, file, &afinfo->seq_ops, sizeof(struct udp_iter_state)); if (err < 0) return err; s = ((struct seq_file *)file->private_data)->p...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
40,492,743,723,542,730,000,000,000,000,000,000,000
16
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
static double Kaiser(const double x,const ResizeFilter *resize_filter) { /* Kaiser Windowing Function (bessel windowing) I0( beta * sqrt( 1-x^2) ) / IO(0) Beta (coeff[0]) is a free value from 5 to 8 (defaults to 6.5). However it is typically defined in terms of Alpha*PI The normalization fac...
0
[ "CWE-125" ]
ImageMagick
c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46
107,222,934,652,685,410,000,000,000,000,000,000,000
17
https://github.com/ImageMagick/ImageMagick/issues/717
store_fpr (app_t app, int keynumber, u32 timestamp, unsigned char *fpr, key_type_t key_type, ...) { unsigned int n, nbits; unsigned char *buffer, *p; int tag, tag2; int rc; const unsigned char *m[MAX_ARGS_STORE_FPR]; size_t mlen[MAX_ARGS_STORE_FPR]; va_list ap; int argc; int i; n = 6; ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
71,115,934,637,686,500,000,000,000,000,000,000,000
90
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int selinux_sb_copy_data(char *orig, char *copy) { int fnosec, fsec, rc = 0; char *in_save, *in_curr, *in_end; char *sec_curr, *nosec_save, *nosec; int open_quote = 0; in_curr = orig; sec_curr = copy; nosec = (char *)get_zeroed_page(GFP_KERNEL); if (!nosec) { rc = -ENOMEM; goto out; } nosec_save...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
172,005,685,736,410,900,000,000,000,000,000,000,000
41
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...
completeSWFShapeBlock(SWFBlock block) { SWFShape shape = (SWFShape)block; SWFShape_end(shape); return SWFOutput_getLength(shape->out); }
0
[ "CWE-20", "CWE-476" ]
libming
6e76e8c71cb51c8ba0aa9737a636b9ac3029887f
308,012,014,704,594,500,000,000,000,000,000,000,000
8
SWFShape_setLeftFillStyle: prevent fill overflow
static void grow_ple_window(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); unsigned int old = vmx->ple_window; vmx->ple_window = __grow_ple_window(old, ple_window, ple_window_grow, ple_window_max); if (vmx->ple_window != old) { vmx->ple_window_dirty = true; trace_kvm_ple_windo...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
221,379,036,550,287,260,000,000,000,000,000,000,000
15
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
searchc(cmdarg_T *cap, int t_cmd) { int c = cap->nchar; // char to search for int dir = cap->arg; // TRUE for searching forward long count = cap->count1; // repeat count int col; char_u *p; int len; int stop = TRUE; if (c != NUL) // normal search: remember args for repeat ...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
294,086,447,180,576,070,000,000,000,000,000,000,000
116
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
DEFUN (clear_ip_bgp_external_ipv4_soft_out, clear_ip_bgp_external_ipv4_soft_out_cmd, "clear ip bgp external ipv4 (unicast|multicast) soft out", CLEAR_STR IP_STR BGP_STR "Clear all external peers\n" "Address family\n" "Address Family modifier\n" "Address Fam...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
240,958,472,182,536,720,000,000,000,000,000,000,000
20
[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...
GF_Box *saio_box_new() { ISOM_DECL_BOX_ALLOC(GF_SampleAuxiliaryInfoOffsetBox, GF_ISOM_BOX_TYPE_SAIO); return (GF_Box *)tmp; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
16,262,630,056,839,375,000,000,000,000,000,000,000
5
fixed #2255
LogLuvDecodeTile(TIFF* tif, uint8* bp, tmsize_t cc, uint16 s) { tmsize_t rowlen = TIFFTileRowSize(tif); if (rowlen == 0) return 0; assert(cc%rowlen == 0); while (cc && (*tif->tif_decoderow)(tif, bp, rowlen, s)) { bp += rowlen; cc -= rowlen; } return (cc == 0); }
0
[ "CWE-125" ]
libtiff
1044b43637fa7f70fb19b93593777b78bd20da86
306,088,961,880,587,060,000,000,000,000,000,000,000
14
* libtiff/tif_pixarlog.c, libtiff/tif_luv.c: fix heap-based buffer overflow on generation of PixarLog / LUV compressed files, with ColorMap, TransferFunction attached and nasty plays with bitspersample. The fix for LUV has not been tested, but suffers from the same kind of issue of PixarLog. Reported by Agostino Sarubb...
TEST_F(Http1ClientConnectionImplTest, 204ResponseContentLengthNotAllowed) { // By default, content-length is barred. { initialize(); NiceMock<MockResponseDecoder> response_decoder; Http::RequestEncoder& request_encoder = codec_->newStream(response_decoder); TestRequestHeaderMapImpl headers{{":metho...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
121,335,848,170,164,130,000,000,000,000,000,000,000
33
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int gather_surplus_pages(struct hstate *h, int delta) { struct list_head surplus_list; struct page *page, *tmp; int ret, i; int needed, allocated; bool alloc_ok = true; needed = (h->resv_huge_pages + delta) - h->free_huge_pages; if (needed <= 0) { h->resv_huge_pages += delta; return 0; } allocated...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
18,654,358,704,092,744,000,000,000,000,000,000,000
83
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
void rtl8xxxu_update_rate_mask(struct rtl8xxxu_priv *priv, u32 ramask, int sgi) { struct h2c_cmd h2c; memset(&h2c, 0, sizeof(struct h2c_cmd)); h2c.ramask.cmd = H2C_SET_RATE_MASK; h2c.ramask.mask_lo = cpu_to_le16(ramask & 0xffff); h2c.ramask.mask_hi = cpu_to_le16(ramask >> 16); h2c.ramask.arg = 0x80; if (sgi) ...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
218,798,422,444,513,520,000,000,000,000,000,000,000
18
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
xmlParseReference(xmlParserCtxtPtr ctxt) { xmlEntityPtr ent; xmlChar *val; int was_checked; xmlNodePtr list = NULL; xmlParserErrors ret = XML_ERR_OK; if (RAW != '&') return; /* * Simple case of a CharRef */ if (NXT(1) == '#') { int i = 0; xmlChar out[10]; int hex ...
0
[ "CWE-119" ]
libxml2
23f05e0c33987d6605387b300c4be5da2120a7ab
136,746,579,832,851,350,000,000,000,000,000,000,000
413
Detect excessive entities expansion upon replacement If entities expansion in the XML parser is asked for, it is possble to craft relatively small input document leading to excessive on-the-fly content generation. This patch accounts for those replacement and stop parsing after a given threshold. it can be bypassed as...
static pfn_t get_fault_pfn(void) { get_page(fault_page); return fault_pfn; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
194,375,079,249,380,330,000,000,000,000,000,000,000
5
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 ...
static inline void ext2_xattr_destroy_cache(struct mb2_cache *cache) { }
0
[ "CWE-241", "CWE-19" ]
linux
be0726d33cb8f411945884664924bed3cb8c70ee
100,496,417,249,640,780,000,000,000,000,000,000,000
3
ext2: convert to mbcache2 The conversion is generally straightforward. We convert filesystem from a global cache to per-fs one. Similarly to ext4 the tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is sti...
QPDFWriter::write() { // Do preliminary setup if (this->m->linearized) { this->m->qdf_mode = false; } if (this->m->pclm) { this->m->stream_decode_level = qpdf_dl_none; this->m->compress_streams = false; this->m->encrypted = false; } if (this->m->qdf_mode) ...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
162,576,321,731,886,700,000,000,000,000,000,000,000
172
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static ssize_t _consolefs_writev( oe_fd_t* desc, const struct oe_iovec* iov, int iovcnt) { ssize_t ret = -1; file_t* file = _cast_file(desc); void* buf = NULL; size_t buf_size = 0; size_t data_size = 0; if (!file || (!iov && iovcnt) || iovcnt < 0 || iovcnt > OE_IOV_MAX) OE_R...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
106,940,166,810,679,840,000,000,000,000,000,000,000
53
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
TIFFFdOpen(int fd, const char* name, const char* mode) { TIFF* tif; fd_as_handle_union_t fdh; fdh.fd = fd; tif = TIFFClientOpen(name, mode, fdh.h, _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, _tiffMapProc, _tiffUnmapProc); if (tif) tif->tif_fd = fd; return (t...
0
[ "CWE-119" ]
libtiff
d60332057b9575ada4f264489582b13e30137be1
251,198,732,193,414,470,000,000,000,000,000,000,000
15
* libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc() * libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero initialize tif_rawdata. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651
networkstatus_parse_detached_signatures(const char *s, const char *eos) { /* XXXX there is too much duplicate shared between this function and * networkstatus_parse_vote_from_string(). */ directory_token_t *tok; memarea_t *area = NULL; digests_t *digests; smartlist_t *tokens = smartlist_new(); ns_detach...
0
[ "CWE-119" ]
tor
d978216dea6b21ac38230a59d172139185a68dbd
156,109,211,262,444,320,000,000,000,000,000,000,000
197
Fix parsing bug with unecognized token at EOS In get_token(), we could read one byte past the end of the region. This is only a big problem in the case where the region itself is (a) potentially hostile, and (b) not explicitly nul-terminated. This patch fixes the underlying bug, and also makes sure that the one remai...
static int do_rename(int olddfd, const char *oldname, int newdfd, const char *newname) { int error = 0; struct dentry * old_dir, * new_dir; struct dentry * old_dentry, *new_dentry; struct dentry * trap; struct nameidata oldnd, newnd; error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd); if (error) ...
0
[ "CWE-120" ]
linux-2.6
d70b67c8bc72ee23b55381bd6a884f4796692f77
280,677,035,199,111,450,000,000,000,000,000,000,000
80
[patch] vfs: fix lookup on deleted directory Lookup can install a child dentry for a deleted directory. This keeps the directory dentry alive, and the inode pinned in the cache and on disk, even after all external references have gone away. This isn't a big problem normally, since memory pressure or umount will clea...
aiff_next_chunk_iterator (SF_PRIVATE *psf, SF_CHUNK_ITERATOR * iterator) { return psf_next_chunk_iterator (&psf->rchunks, iterator) ; } /* aiff_next_chunk_iterator */
0
[ "CWE-119", "CWE-787" ]
libsndfile
f833c53cb596e9e1792949f762e0b33661822748
152,293,778,062,396,390,000,000,000,000,000,000,000
3
src/aiff.c: Fix a buffer read overflow Secunia Advisory SA76717. Found by: Laurent Delosieres, Secunia Research at Flexera Software
static void ttusb_dec_handle_irq( struct urb *urb) { struct ttusb_dec *dec = urb->context; char *buffer = dec->irq_buffer; int retval; switch(urb->status) { case 0: /*success*/ break; case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: case -ETIME: /* this urb is dead, cleanup */ dprintk("%s:urb sh...
0
[ "CWE-772" ]
linux
a10feaf8c464c3f9cfdd3a8a7ce17e1c0d498da1
337,230,473,844,060,930,000,000,000,000,000,000,000
51
media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() The function at issue does not always initialize each byte allocated for 'b' and can therefore leak uninitialized memory to a USB device in the call to usb_bulk_msg() Use kzalloc() instead of kmalloc() Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> R...
static int user_reset_fdc(int drive, int arg, bool interruptible) { int ret; if (lock_fdc(drive)) return -EINTR; if (arg == FD_RESET_ALWAYS) FDCS->reset = 1; if (FDCS->reset) { cont = &reset_cont; ret = wait_til_done(reset_fdc, interruptible); if (ret == -EINTR) return -EINTR; } process_fd_request(...
0
[ "CWE-190", "CWE-125" ]
linux
da99466ac243f15fbba65bd261bfc75ffa1532b6
81,505,714,128,420,610,000,000,000,000,000,000,000
18
floppy: fix out-of-bounds read in copy_buffer This fixes a global out-of-bounds read access in the copy_buffer function of the floppy driver. The FDDEFPRM ioctl allows one to set the geometry of a disk. The sect and head fields (unsigned int) of the floppy_drive structure are used to compute the max_sector (int) in ...