func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int clusterip_proc_open(struct inode *inode, struct file *file)
{
int ret = seq_open(file, &clusterip_seq_ops);
if (!ret) {
struct seq_file *sf = file->private_data;
struct clusterip_config *c = PDE(inode)->data;
sf->private = c;
clusterip_config_get(c);
}
return ret;
} | 0 | [
"CWE-120"
] | linux-2.6 | 961ed183a9fd080cf306c659b8736007e44065a5 | 105,199,977,879,863,100,000,000,000,000,000,000,000 | 15 | netfilter: ipt_CLUSTERIP: fix buffer overflow
'buffer' string is copied from userspace. It is not checked whether it is
zero terminated. This may lead to overflow inside of simple_strtoul().
Changli Gao suggested to copy not more than user supplied 'size' bytes.
It was introduced before the git epoch. Files "ipt_C... |
ServerState& States::useServer()
{
return serverState_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 268,824,254,840,651,940,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
_rpc_network_callerid(slurm_msg_t *msg)
{
network_callerid_msg_t *req = (network_callerid_msg_t *)msg->data;
slurm_msg_t resp_msg;
network_callerid_resp_t *resp = NULL;
uid_t req_uid = -1;
uid_t job_uid = -1;
uint32_t job_id = (uint32_t)NO_VAL;
callerid_conn_t conn;
int rc = ESLURM_INVALID_JOB_ID;
char ip_src... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 63,611,720,381,244,850,000,000,000,000,000,000,000 | 61 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
static void set_rx_flow_off(struct caifsock *cf_sk)
{
clear_bit(RX_FLOW_ON_BIT,
(void *) &cf_sk->flow_state);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 26,321,823,080,714,670,000,000,000,000,000,000,000 | 5 | 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... |
init_current_post(void)
{
rbufpos = 2;
cur_post_id = 501;
blocktyp = POST_ASCII;
} | 0 | [
"CWE-119",
"CWE-787"
] | t1utils | 6b9d1aafcb61a3663c883663eb19ccdbfcde8d33 | 180,924,062,160,959,600,000,000,000,000,000,000,000 | 6 | Security fixes.
- Don't overflow the small cs_start buffer (reported by Niels
Thykier via the debian tracker (Jakub Wilk), found with a
fuzzer ("American fuzzy lop")).
- Cast arguments to <ctype.h> functions to unsigned char. |
static void AppLayerProtoDetectProbingParserElementFree(AppLayerProtoDetectProbingParserElement *p)
{
SCEnter();
SCFree(p);
SCReturn;
} | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 99,485,802,170,808,610,000,000,000,000,000,000,000 | 6 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
xps_true_get_glyph_index(gs_font_type42 *pfont42, gs_glyph glyph)
{
/* identity */
return glyph;
} | 0 | [
"CWE-119"
] | ghostpdl | 3c2aebbedd37fab054e80f2e315de07d7e9b5bdb | 273,861,537,572,856,380,000,000,000,000,000,000,000 | 5 | Bug 698044: restrict font name length to the buffer size. |
xmlHTMLPrintFileInfo(xmlParserInputPtr input) {
int len;
xmlGenericError(xmlGenericErrorContext, "<p>");
len = strlen(buffer);
if (input != NULL) {
if (input->filename) {
snprintf(&buffer[len], sizeof(buffer) - len, "%s:%d: ", input->filename,
input->line);
} else {
snprintf(&buffer[l... | 0 | [
"CWE-416"
] | libxml2 | 1358d157d0bd83be1dfe356a69213df9fac0b539 | 238,971,866,305,987,870,000,000,000,000,000,000,000 | 15 | 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. |
batchInit(batch_t *pBatch, int maxElem) {
DEFiRet;
pBatch->iDoneUpTo = 0;
pBatch->maxElem = maxElem;
CHKmalloc(pBatch->pElem = calloc((size_t)maxElem, sizeof(batch_obj_t)));
// TODO: replace calloc by inidividual writes?
finalize_it:
RETiRet;
} | 0 | [
"CWE-772",
"CWE-401"
] | rsyslog | 1ef709cc97d54f74d3fdeb83788cc4b01f4c6a2a | 108,499,787,313,634,970,000,000,000,000,000,000,000 | 9 | bugfix: fixed a memory leak and potential abort condition
this could happen if multiple rulesets were used and some output batches
contained messages belonging to more than one ruleset.
fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=226
fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=218 |
allocate_and_init_ipcp_value (tree source)
{
ipcp_value<tree> *val;
val = new (ipcp_cst_values_pool.allocate ()) ipcp_value<tree>();
val->value = source;
return val;
} | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 163,365,665,925,372,240,000,000,000,000,000,000,000 | 8 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
static int wcd9335_trigger(struct snd_pcm_substream *substream, int cmd,
struct snd_soc_dai *dai)
{
struct wcd_slim_codec_dai_data *dai_data;
struct wcd9335_codec *wcd;
struct slim_stream_config *cfg;
wcd = snd_soc_component_get_drvdata(dai->component);
dai_data = &wcd->dai[dai->id];
switch (cmd) {
case... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 315,867,094,211,741,550,000,000,000,000,000,000,000 | 31 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
long keyctl_join_session_keyring(const char __user *_name)
{
char *name;
long ret;
/* fetch the name from userspace */
name = NULL;
if (_name) {
name = strndup_user(_name, PAGE_SIZE);
if (IS_ERR(name)) {
ret = PTR_ERR(name);
goto error;
}
}
/* join the session */
ret = join_session_keyring(name);
... | 0 | [
"CWE-476"
] | linux-2.6 | 9d1ac65a9698513d00e5608d93fca0c53f536c14 | 331,093,038,742,391,530,000,000,000,000,000,000,000 | 23 | KEYS: Fix RCU no-lock warning in keyctl_session_to_parent()
There's an protected access to the parent process's credentials in the middle
of keyctl_session_to_parent(). This results in the following RCU warning:
===================================================
[ INFO: suspicious rcu_dereference_check() usage.... |
int ssl_get_verify_result( const ssl_context *ssl )
{
if( ssl->session != NULL )
return( ssl->session->verify_result );
if( ssl->session_negotiate != NULL )
return( ssl->session_negotiate->verify_result );
return( -1 );
} | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 331,876,903,974,224,060,000,000,000,000,000,000,000 | 10 | Added max length checking of hostname |
static double mp_copy(_cimg_math_parser& mp) {
return _mp_arg(2);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 318,060,163,155,593,080,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
SetReindexProcessing(Oid heapOid, Oid indexOid)
{
Assert(OidIsValid(heapOid) && OidIsValid(indexOid));
/* Reindexing is not re-entrant. */
if (OidIsValid(currentlyReindexedHeap))
elog(ERROR, "cannot reindex while reindexing");
currentlyReindexedHeap = heapOid;
currentlyReindexedIndex = indexOid;
/* Index is no ... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 121,779,617,566,499,590,000,000,000,000,000,000,000 | 11 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
circle_overright(PG_FUNCTION_ARGS)
{
CIRCLE *circle1 = PG_GETARG_CIRCLE_P(0);
CIRCLE *circle2 = PG_GETARG_CIRCLE_P(1);
PG_RETURN_BOOL(FPge((circle1->center.x - circle1->radius),
(circle2->center.x - circle2->radius)));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 228,824,308,317,197,640,000,000,000,000,000,000,000 | 8 | 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... |
static void rdev_free(struct kobject *ko)
{
struct md_rdev *rdev = container_of(ko, struct md_rdev, kobj);
kfree(rdev);
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 196,890,236,343,735,800,000,000,000,000,000,000,000 | 5 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
bgp_attr_originator_id (struct bgp_attr_parser_args *args)
{
struct peer *const peer = args->peer;
struct attr *const attr = args->attr;
const bgp_size_t length = args->length;
/* Length check. */
if (length != 4)
{
zlog (peer->log, LOG_ERR, "Bad originator ID length %d", length);
return ... | 0 | [] | quagga | 8794e8d229dc9fe29ea31424883433d4880ef408 | 65,044,206,455,432,970,000,000,000,000,000,000,000 | 23 | bgpd: Fix regression in args consolidation, total should be inited from args
* bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args. |
static int ep_aio_cancel(struct kiocb *iocb)
{
struct kiocb_priv *priv = iocb->private;
struct ep_data *epdata;
int value;
local_irq_disable();
epdata = priv->epdata;
// spin_lock(&epdata->dev->lock);
if (likely(epdata && epdata->ep && priv->req))
value = usb_ep_dequeue (epdata->ep, priv->req);
else
val... | 0 | [
"CWE-763"
] | linux | 501e38a5531efbd77d5c73c0ba838a889bfc1d74 | 269,426,495,645,491,930,000,000,000,000,000,000,000 | 18 | usb: gadget: clear related members when goto fail
dev->config and dev->hs_config and dev->dev need to be cleaned if
dev_config fails to avoid UAF.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com
Signed... |
njs_string_decode_base64url(njs_vm_t *vm, njs_value_t *value,
const njs_str_t *src)
{
return njs_string_decode_base64_core(vm, value, src, 1);
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 126,650,728,160,783,920,000,000,000,000,000,000,000 | 5 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
int jas_iccprof_gethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr)
{
*hdr = prof->hdr;
return 0;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 21,902,136,889,618,905,000,000,000,000,000,000,000 | 5 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static int fit_config_verify_required_sigs(const void *fit, int conf_noffset,
const void *sig_blob)
{
const char *name = fit_get_name(fit, conf_noffset, NULL);
int noffset;
int sig_node;
int verified = 0;
int reqd_sigs = 0;
bool reqd_policy_all = true;
const char *reqd_mode;
/*
* We don't support thi... | 0 | [] | u-boot | 79af75f7776fc20b0d7eb6afe1e27c00fdb4b9b4 | 175,623,769,507,130,140,000,000,000,000,000,000,000 | 69 | fit: Don't allow verification of images with @ nodes
When searching for a node called 'fred', any unit address appended to the
name is ignored by libfdt, meaning that 'fred' can match 'fred@1'. This
means that we cannot be sure that the node originally intended is the one
that is used.
Disallow use of nodes with unit... |
may_compile_assignment(exarg_T *eap, char_u **line, cctx_T *cctx)
{
char_u *pskip;
char_u *p;
// Assuming the command starts with a variable or function name,
// find what follows.
// Skip over "var.member", "var[idx]" and the like.
// Also "&opt = val", "$ENV = val" and "@r = val".
pskip... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 308,799,014,861,145,780,000,000,000,000,000,000,000 | 62 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
void downstream_timeoutcb(struct ev_loop *loop, ev_timer *w, int revents) {
auto downstream = static_cast<Downstream *>(w->data);
auto which = revents == EV_READ ? "read" : "write";
if (LOG_ENABLED(INFO)) {
DLOG(INFO, downstream) << "downstream timeout stream_id="
<< downstream->g... | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 9,306,977,732,780,082,000,000,000,000,000,000,000 | 20 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
claim_op (GTlsConnectionBase *tls,
GTlsConnectionBaseOp op,
gint64 timeout,
GCancellable *cancellable,
GError **error)
{
GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
try_again:
if (g_cancella... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 266,730,451,485,335,000,000,000,000,000,000,000,000 | 179 | 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.... |
do_exmode(
int improved) // TRUE for "improved Ex" mode
{
int save_msg_scroll;
int prev_msg_row;
linenr_T prev_line;
varnumber_T changedtick;
if (improved)
exmode_active = EXMODE_VIM;
else
exmode_active = EXMODE_NORMAL;
State = NORMAL;
may_trigger_modechanged();
// Whe... | 0 | [
"CWE-122"
] | vim | f50808ed135ab973296bca515ae4029b321afe47 | 264,322,600,913,880,060,000,000,000,000,000,000,000 | 91 | patch 8.2.4763: using invalid pointer with "V:" in Ex mode
Problem: Using invalid pointer with "V:" in Ex mode.
Solution: Correctly handle the command being changed to "+". |
static int jpc_qcx_getcompparms(jpc_qcxcp_t *compparms, jpc_cstate_t *cstate,
jas_stream_t *in, uint_fast16_t len)
{
uint_fast8_t tmp;
int n;
int i;
/* Eliminate compiler warning about unused variables. */
cstate = 0;
n = 0;
if (jpc_getuint8(in, &tmp)) {
return -1;
}
++n;
compparms->qntsty = tmp & 0x1f;... | 1 | [] | jasper | 4031ca321d8cb5798c316ab39c7a5dc88a61fdd7 | 254,403,990,052,538,500,000,000,000,000,000,000,000 | 54 | Incorporated changes from patch
jasper-1.900.3-libjasper-stepsizes-overflow.patch |
static PyObject * curvemath_mul(PyObject *self, PyObject *args) {
char * x, * y, * d, * p, * a, * b, * q, * gx, * gy;
if (!PyArg_ParseTuple(args, "sssssssss", &x, &y, &d, &p, &a, &b, &q, &gx, &gy)) {
return NULL;
}
PointZZ_p result;
mpz_t scalar;
mpz_init_set_str(scalar, d, 10);
Cu... | 0 | [
"CWE-347"
] | fastecdsa | e592f106edd5acf6dacedfab2ad16fe6c735c9d1 | 330,966,247,816,346,700,000,000,000,000,000,000,000 | 26 | Properly handle the point at infinity |
_zip_dirent_read(zip_dirent_t *zde, zip_source_t *src, zip_buffer_t *buffer, bool local, zip_error_t *error)
{
zip_uint8_t buf[CDENTRYSIZE];
zip_uint16_t dostime, dosdate;
zip_uint32_t size, variable_size;
zip_uint16_t filename_len, comment_len, ef_len;
bool from_buffer = (buffer != NULL);
siz... | 1 | [
"CWE-416",
"CWE-415"
] | libzip | 2217022b7d1142738656d891e00b3d2d9179b796 | 278,196,664,851,895,700,000,000,000,000,000,000,000 | 252 | Fix double free().
Found by Brian 'geeknik' Carpenter using AFL. |
void WebContents::SetOwnerWindow(content::WebContents* web_contents,
NativeWindow* owner_window) {
if (owner_window) {
owner_window_ = owner_window->GetWeakPtr();
NativeWindowRelay::CreateForWebContents(web_contents,
owner_window->Ge... | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 324,797,095,722,813,500,000,000,000,000,000,000,000 | 16 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
gnutls_x509_crt_get_subject_key_id(gnutls_x509_crt_t cert, void *ret,
size_t * ret_size,
unsigned int *critical)
{
int result;
gnutls_datum_t id = {NULL,0};
gnutls_datum_t der = {NULL, 0};
if (cert == NULL) {
gnutls_assert();
return GNUTLS_E_INVALID_REQUEST;
}
if (ret == NULL)
*ret_size = 0;... | 0 | [
"CWE-295"
] | gnutls | 6e76e9b9fa845b76b0b9a45f05f4b54a052578ff | 34,727,732,295,250,610,000,000,000,000,000,000,000 | 41 | on certificate import check whether the two signature algorithms match |
int vfs_rmdir(struct inode *dir, struct dentry *dentry)
{
int error = may_delete(dir, dentry, 1);
if (error)
return error;
if (!dir->i_op->rmdir)
return -EPERM;
dget(dentry);
inode_lock(dentry->d_inode);
error = -EBUSY;
if (is_local_mountpoint(dentry))
goto out;
error = security_inode_rmdir(dir, dent... | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 193,821,857,130,183,400,000,000,000,000,000,000,000 | 37 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
static inline int pud_devmap(pud_t pud)
{
return 0;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 120,939,543,198,980,340,000,000,000,000,000,000,000 | 4 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static enum ssb_mitigation_cmd __init ssb_parse_cmdline(void)
{
enum ssb_mitigation_cmd cmd = SPEC_STORE_BYPASS_CMD_AUTO;
char arg[20];
int ret, i;
if (cmdline_find_option_bool(boot_command_line, "nospec_store_bypass_disable") ||
cpu_mitigations_off()) {
return SPEC_STORE_BYPASS_CMD_NONE;
} else {
ret = ... | 0 | [] | linux | a2059825986a1c8143fd6698774fa9d83733bb11 | 262,362,157,958,926,430,000,000,000,000,000,000,000 | 31 | x86/speculation: Enable Spectre v1 swapgs mitigations
The previous commit added macro calls in the entry code which mitigate the
Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are
enabled. Enable those features where applicable.
The mitigations may be disabled with "nospectre_v1" or "mitigations... |
static void test_http_no_content_length(void) {
struct mg_mgr mgr;
const char *url = "http://127.0.0.1:12348";
char buf[FETCH_BUF_SIZE];
mg_mgr_init(&mgr);
mg_http_listen(&mgr, url, f4, (void *) "baz");
ASSERT(fetch(&mgr, buf, url, "GET /foo/bar HTTP/1.0\r\n\n") == 200);
ASSERT(cmpbody(buf, "/foo/bar/baz"... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 184,270,392,347,683,330,000,000,000,000,000,000,000 | 11 | Protect against the directory traversal in mg_upload() |
R_API int r_core_print_bb_custom(RCore *core, RAnalFunction *fcn) {
RAnalBlock *bb;
RListIter *iter;
if (!fcn) {
return false;
}
RConfigHold *hc = r_config_hold_new (core->config);
r_config_hold (hc, "scr.color", "scr.utf8", "asm.marks", "asm.offset", "asm.lines",
"asm.cmt.right", "asm.cmt.col", "asm.lines.... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 94,938,166,391,018,450,000,000,000,000,000,000,000 | 73 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
void *nghttp2_session_get_stream_user_data(nghttp2_session *session,
int32_t stream_id) {
nghttp2_stream *stream;
stream = nghttp2_session_get_stream(session, stream_id);
if (stream) {
return stream->stream_user_data;
} else {
return NULL;
}
} | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 41,102,167,839,672,707,000,000,000,000,000,000,000 | 10 | Add nghttp2_option_set_max_outbound_ack |
int fp_exptmod(fp_int * G, fp_int * X, fp_int * P, fp_int * Y)
{
#if defined(WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI) && \
!defined(NO_WOLFSSL_ESP32WROOM32_CRYPT_RSA_PRI)
int x = fp_count_bits (X);
#endif
/* handle modulus of zero and prevent overflows */
if (fp_iszero(P) || (P->used > (FP_SIZE/2))) {
re... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 53,825,461,971,948,220,000,000,000,000,000,000,000 | 76 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
get_max_rate_ht_40(int mcs)
{
switch (mcs) {
case 0:
return 13500000;
case 1:
case 8:
return 27000000;
case 2:
return 40500000;
case 3:
case 9:
case 24:
return 54000000;
case 4:
case 10:
case 17:
return 81000000;
case 5:
case 11... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 231,763,003,633,587,020,000,000,000,000,000,000,000 | 57 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
int bson_check_field_name( bson *b, const char *string,
const int length ) {
return bson_validate_string( b, ( const unsigned char * )string, length, 1, 1, 1 );
} | 1 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 206,862,999,983,769,040,000,000,000,000,000,000,000 | 5 | don't mix up int and size_t (first pass to fix that) |
resource_tree_free (ResTreeNode * node)
{
GSList * list;
for (list = node->children; list; list = list->next)
resource_tree_free ((ResTreeNode*)list->data);
g_slist_free(node->children);
g_free (node);
} | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 110,477,867,313,077,200,000,000,000,000,000,000,000 | 8 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static void _xmlrpc_endElement(void *userData, const char *name)
{
xml_elem_data* mydata = (xml_elem_data*)userData;
if(mydata && mydata->current && mydata->current->parent) {
Q_PushTail(&mydata->current->parent->children, mydata->current);
mydata->current = mydata->current->parent;
}
} | 0 | [
"CWE-125"
] | php-src | 780ff63c377dc79de2c04d6b341913ab0102135b | 13,464,527,739,884,912,000,000,000,000,000,000,000 | 10 | MFH: Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error
when given bad data). |
static bool parse_extranonce(struct pool *pool, json_t *val)
{
char *nonce1;
int n2size;
nonce1 = json_array_string(val, 0);
if (!nonce1) {
return false;
}
n2size = json_integer_value(json_array_get(val, 1));
if (!n2size) {
free(nonce1);
return false;
}
cg_wlock(&pool->data_lock);
pool->nonce1 = nonce... | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 254,573,998,362,561,250,000,000,000,000,000,000,000 | 30 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
xmlFindCharEncodingHandler(const char *name) {
const char *nalias;
const char *norig;
xmlCharEncoding alias;
#ifdef LIBXML_ICONV_ENABLED
xmlCharEncodingHandlerPtr enc;
iconv_t icv_in, icv_out;
#endif /* LIBXML_ICONV_ENABLED */
#ifdef LIBXML_ICU_ENABLED
xmlCharEncodingHandlerPtr encu;
uconv_t... | 0 | [
"CWE-189"
] | libxml2 | 69f04562f75212bfcabecd190ea8b06ace28ece2 | 19,487,478,172,086,597,000,000,000,000,000,000,000 | 133 | Fix an off by one error in encoding
this off by one error doesn't seems to reproduce on linux
but the error is real. |
static void optimize_keyuse(JOIN *join, DYNAMIC_ARRAY *keyuse_array)
{
KEYUSE *end,*keyuse= dynamic_element(keyuse_array, 0, KEYUSE*);
for (end= keyuse+ keyuse_array->elements ; keyuse < end ; keyuse++)
{
table_map map;
/*
If we find a ref, assume this table matches a proportional
part of thi... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 120,912,852,072,579,220,000,000,000,000,000,000,000 | 40 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
xmlBufWriteChar(xmlBufPtr buf, const char *string) {
if ((buf == NULL) || (buf->error))
return(-1);
CHECK_COMPAT(buf)
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE)
return(-1);
return(xmlBufCCat(buf, string));
} | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 306,882,579,046,689,730,000,000,000,000,000,000,000 | 8 | 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. |
virtual GBool fillMaskCSPattern(GfxState * state)
{ return state->getFillColorSpace()->getMode() == csPattern; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 225,001,579,094,135,500,000,000,000,000,000,000,000 | 2 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
TRIO_PUBLIC_STRING int trio_xstring_contains TRIO_ARGS2((self, other), trio_string_t* self,
TRIO_CONST char* other)
{
assert(self);
assert(other);
return trio_contains(self->content, other);
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 216,054,759,910,163,170,000,000,000,000,000,000,000 | 8 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static __init void nested_vmx_setup_ctls_msrs(void)
{
/*
* Note that as a general rule, the high half of the MSRs (bits in
* the control fields which may be 1) should be initialized by the
* intersection of the underlying hardware's MSR (i.e., features which
* can be supported) and the list of features we want... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 263,194,234,815,865,430,000,000,000,000,000,000,000 | 128 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
prop_to_command (SmProp *prop)
{
GString *str;
int i, j;
gboolean need_quotes;
str = g_string_new (NULL);
for (i = 0; i < prop->num_vals; i++) {
char *val = prop->vals[i].value;
need_quotes = FALSE;
for (j = 0; j < prop->vals[i].l... | 0 | [
"CWE-125",
"CWE-835"
] | gnome-session | b0dc999e0b45355314616321dbb6cb71e729fc9d | 206,610,798,681,024,040,000,000,000,000,000,000,000 | 43 | [gsm] Delay the creation of the GsmXSMPClient until it really exists
We used to create the GsmXSMPClient before the XSMP connection is really
accepted. This can lead to some issues, though. An example is:
https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting:
"What is happening is that a new client (probabl... |
static int rbd_cls_object_map_update(struct ceph_osd_request *req,
int which, u64 objno, u8 new_state,
const u8 *current_state)
{
struct page **pages;
void *p, *start;
int ret;
ret = osd_req_op_cls_init(req, which, "rbd", "object_map_update");
if (ret)
return ret;
pages = ceph_alloc_page_vec... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 116,879,096,833,246,500,000,000,000,000,000,000,000 | 31 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
virDomainSetAutostart(virDomainPtr domain,
int autostart)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(domain, "autostart=%d", autostart);
virResetLastError();
virCheckDomainReturn(domain, -1);
conn = domain->conn;
virCheckReadOnlyGoto(conn->flags, error);
if (conn->driv... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 36,498,613,900,737,480,000,000,000,000,000,000,000 | 28 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
static int md_http_challenge_pr(request_rec *r)
{
apr_bucket_brigade *bb;
const md_srv_conf_t *sc;
const char *name, *data;
md_reg_t *reg;
int configured;
apr_status_t rv;
if (r->parsed_uri.path
&& !strncmp(ACME_CHALLENGE_PREFIX, r->parsed_uri.path, sizeof(ACME_CHALLENGE_PREFIX... | 0 | [
"CWE-476"
] | mod_md | e71001955809247b3aa4d269e1e0741b4fe0fc3d | 296,609,519,064,667,640,000,000,000,000,000,000,000 | 65 | v1.1.12, notifycmd improvements |
nsim_map_get_next_key(struct bpf_offloaded_map *offmap,
void *key, void *next_key)
{
struct nsim_bpf_bound_map *nmap = offmap->dev_priv;
int idx = -ENOENT;
mutex_lock(&nmap->mutex);
if (key)
idx = nsim_map_key_find(offmap, key);
if (idx == -ENOENT)
idx = 0;
else
idx++;
for (; idx < ARRAY_SIZE(nm... | 0 | [] | net | 481221775d53d6215a6e5e9ce1cce6d2b4ab9a46 | 182,468,794,691,805,150,000,000,000,000,000,000,000 | 29 | netdevsim: Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
Zero-initialize memory for new map's value in function nsim_bpf_map_alloc
since it may cause a potential kernel information leak issue, as follows:
1. nsim_bpf_map_alloc calls nsim_map_alloc_elem to allocate elements for
a new map.
2.... |
static int create_uaxx_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{
static const struct audioformat ua_format = {
.formats = SNDRV_PCM_FMTBIT_S24_3LE,
.channels = 2,
.fmt_type = UAC_FORMAT_TYPE_I,
.a... | 0 | [] | linux | 836b34a935abc91e13e63053d0a83b24dfb5ea78 | 113,463,292,631,866,430,000,000,000,000,000,000,000 | 92 | ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call
create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and
create_uaxx_quirk() functions allocate the audioformat object by themselves
and free it upon error before returning. However, once the object is linked
to a stream, it'... |
BasicWriter &operator<<(long value) {
write_decimal(value);
return *this;
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 99,263,025,796,583,230,000,000,000,000,000,000,000 | 4 | Fix segfault on complex pointer formatting (#642) |
construct_cipher_name(SSL *ssl, uschar *cipherbuf, int bsize, int *bits)
{
/* With OpenSSL 1.0.0a, this needs to be const but the documentation doesn't
yet reflect that. It should be a safe change anyway, even 0.9.8 versions have
the accessor functions use const in the prototype. */
const SSL_CIPHER *c;
const uschar *... | 0 | [
"CWE-264"
] | exim | 43ba2742c700d625dcdcdaf7bbadc2f72776854a | 274,048,502,561,881,060,000,000,000,000,000,000,000 | 18 | Fix CVE-2016-1531
Add keep_environment, add_environment.
Change the working directory to "/" during the early startup
phase.
(cherry picked from commit bc3c7bb7d4aba3e563434e5627fe1f2176aa18c0)
(cherry picked from commit 2b92b67bfc33efe05e6ff2ea3852731ac2273832)
(cherry picked from commit 14b82c8b736c8ed24eda... |
static X509 *ocsp_find_signer_sk(STACK_OF(X509) *certs, OCSP_RESPID *id)
{
int i, r;
unsigned char tmphash[SHA_DIGEST_LENGTH], *keyhash;
EVP_MD *md;
X509 *x;
/* Easy if lookup by name */
if (id->type == V_OCSP_RESPID_NAME)
return X509_find_by_subject(certs, id->value.byName);
/* Lo... | 0 | [
"CWE-703",
"CWE-295"
] | openssl | 2eda98790c5c2741d76d23cc1e74b0dc4f4b391a | 111,968,276,736,516,470,000,000,000,000,000,000,000 | 32 | Fix OCSP_basic_verify signer certificate validation
The function `OCSP_basic_verify` validates the signer certificate on an OCSP
response. The internal function, ocsp_verify_signer, is responsible for this
and is expected to return a 0 value in the event of a failure to verify.
Unfortunately, due to a bug, it actually... |
static uint32_t vpc_checksum(uint8_t* buf, size_t size)
{
uint32_t res = 0;
int i;
for (i = 0; i < size; i++)
res += buf[i];
return ~res;
} | 0 | [
"CWE-20"
] | qemu | 97f1c45c6f456572e5b504b8614e4a69e23b8e3a | 222,834,859,448,189,160,000,000,000,000,000,000,000 | 10 | vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144)
This adds checks to make sure that max_table_entries and block_size
are in sane ranges. Memory is allocated based on max_table_entries,
and block_size is used to calculate indices into that allocated
memory, so if these values are incorrec... |
PHP_FUNCTION(stream_filter_prepend)
{
apply_filter_to_stream(0, INTERNAL_FUNCTION_PARAM_PASSTHRU);
} | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 9,399,284,409,077,008,000,000,000,000,000,000,000 | 4 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
void pm_qos_sysfs_remove_flags(struct device *dev)
{
sysfs_unmerge_group(&dev->kobj, &pm_qos_flags_attr_group);
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 335,860,142,085,790,300,000,000,000,000,000,000,000 | 4 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
u32 hugetlb_fault_mutex_hash(struct address_space *mapping, pgoff_t idx)
{
unsigned long key[2];
u32 hash;
key[0] = (unsigned long) mapping;
key[1] = idx;
hash = jhash2((u32 *)&key, sizeof(key)/(sizeof(u32)), 0);
return hash & (num_fault_mutexes - 1);
} | 0 | [
"CWE-362"
] | linux | 17743798d81238ab13050e8e2833699b54e15467 | 289,318,102,934,496,560,000,000,000,000,000,000,000 | 12 | mm/hugetlb: fix a race between hugetlb sysctl handlers
There is a race between the assignment of `table->data` and write value
to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on
the other thread.
CPU0: CPU1:
proc_sys_write
... |
void isor_set_crypt_config(ISOMChannel *ch)
{
GF_ISOFile *mov = ch->owner->mov;
u32 track = ch->track;
u32 scheme_type, scheme_version, i, count;
const char *kms_uri, *scheme_uri;
Bool selectiveEncryption=0;
u32 IVLength=0;
u32 KeyIndicationLength=0;
const char *txtHdr=NULL;
const char *contentID=NULL;
u32 tx... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 199,089,893,168,970,800,000,000,000,000,000,000,000 | 108 | fixed crashes for very long path - cf #1908 |
static int disconnect_helper(struct transport *transport)
{
struct helper_data *data = transport->data;
int res = 0;
if (data->helper) {
if (debug)
fprintf(stderr, "Debug: Disconnecting.\n");
if (!data->no_disconnect_req) {
/*
* Ignore write errors; there's nothing we can do,
* since we're about t... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 137,696,918,329,529,400,000,000,000,000,000,000,000 | 27 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
void init_re_comp(my_regex_t *re, const char* str)
{
int err= my_regcomp(re, str, (MY_REG_EXTENDED | MY_REG_ICASE | MY_REG_NOSUB),
&my_charset_latin1);
if (err)
{
char erbuf[100];
int len= my_regerror(err, re, erbuf, sizeof(erbuf));
die("error %s, %d/%d `%s'\n",
re_eprint(err), ... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 95,523,120,798,918,130,000,000,000,000,000,000,000 | 12 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input));
TfLiteTensor* output_index_tensor;
TF_LITE_ENSURE_OK(context,
GetOutputSafe(context, node, 1, &output_index_tensor));
TF_LITE_ENSURE_... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 57,326,556,503,579,950,000,000,000,000,000,000,000 | 35 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
_copyFuncCall(const FuncCall *from)
{
FuncCall *newnode = makeNode(FuncCall);
COPY_NODE_FIELD(funcname);
COPY_NODE_FIELD(args);
COPY_NODE_FIELD(agg_order);
COPY_NODE_FIELD(agg_filter);
COPY_SCALAR_FIELD(agg_within_group);
COPY_SCALAR_FIELD(agg_star);
COPY_SCALAR_FIELD(agg_distinct);
COPY_SCALAR_FIELD(func_v... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 105,663,976,614,596,460,000,000,000,000,000,000,000 | 17 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static int nfc_genl_send_params(struct sk_buff *msg,
struct nfc_llcp_local *local,
u32 portid, u32 seq)
{
void *hdr;
hdr = genlmsg_put(msg, portid, seq, &nfc_genl_family, 0,
NFC_CMD_LLC_GET_PARAMS);
if (!hdr)
return -EMSGSIZE;
if (nla_put_u32(msg, NFC_ATTR_DEVICE_INDEX, local->dev->idx) ||
nla... | 0 | [
"CWE-476"
] | linux | 385097a3675749cbc9e97c085c0e5dfe4269ca51 | 314,541,291,651,076,700,000,000,000,000,000,000,000 | 24 | nfc: Ensure presence of required attributes in the deactivate_target handler
Check that the NFC_ATTR_TARGET_INDEX attributes (in addition to
NFC_ATTR_DEVICE_INDEX) are provided by the netlink client prior to
accessing them. This prevents potential unhandled NULL pointer dereference
exceptions which can be triggered by... |
MONGO_COMPILER_NOINLINE DocumentSource::GetNextResult DocumentSourceGroup::initializeSelf(
GetNextResult input) {
const size_t numAccumulators = _accumulatedFields.size();
// Barring any pausing, this loop exhausts 'pSource' and populates '_groups'.
for (; input.isAdvanced(); input = pSource->getNext())... | 0 | [] | mongo | 07b8851825836911265e909d6842d4586832f9bb | 282,657,042,130,477,700,000,000,000,000,000,000,000 | 108 | SERVER-60218-44: SERVER-60218 add initialize helper function for document_source_group (cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2) |
OutputUpdater(const std::vector<int64>& output_start_indices,
Tensor* indices_out, Tensor* values_out)
: output_start_indices_(output_start_indices),
indices_out_(indices_out),
values_out_(values_out) {} | 0 | [
"CWE-843"
] | tensorflow | b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025 | 277,032,518,148,732,960,000,000,000,000,000,000,000 | 5 | Fix `tf.raw_ops.SparseCross` failing CHECK.
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d |
int main(int argc, char *argv[])
{
struct fuse_args args = FUSE_ARGS_INIT(argc, argv);
struct fuse_session *se;
struct fuse_cmdline_opts opts;
struct lo_data lo = {
.sandbox = SANDBOX_NAMESPACE,
.debug = 0,
.writeback = 0,
.posix_lock = 0,
.allow_direct_io = 0,
... | 0 | [
"CWE-273"
] | qemu | 449e8171f96a6a944d1f3b7d3627ae059eae21ca | 327,393,900,514,360,200,000,000,000,000,000,000,000 | 191 | virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)
At the start, drop membership of all supplementary groups. This is
not required.
If we have membership of "root" supplementary group and when we switch
uid/gid using setresuid/setsgid, we still retain membership of existing
supplemntary groups. An... |
void BrotliDecoderDestroyInstance(BrotliDecoderState* state) {
if (!state) {
return;
} else {
brotli_free_func free_func = state->free_func;
void* opaque = state->memory_manager_opaque;
BrotliDecoderStateCleanup(state);
free_func(opaque, state);
}
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 176,333,350,534,097,200,000,000,000,000,000,000,000 | 10 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
static void kvm_io_bus_destroy(struct kvm_io_bus *bus)
{
int i;
for (i = 0; i < bus->dev_count; i++) {
struct kvm_io_device *pos = bus->range[i].dev;
kvm_iodevice_destructor(pos);
}
kfree(bus); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 280,078,456,160,696,550,000,000,000,000,000,000,000 | 11 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
const uchar *unpack_int16(uchar* to, const uchar *from, const uchar *from_end)
{ return unpack_int(to, from, from_end, 2); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 326,898,781,637,284,200,000,000,000,000,000,000,000 | 2 | 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... |
measure_disk_usage_invoke_progress (gpointer user_data)
{
MeasureProgress *progress = user_data;
(* progress->callback) (progress->reporting,
progress->current_size, progress->num_dirs, progress->num_files,
progress->user_data);
return FALSE;
} | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 127,376,320,932,740,480,000,000,000,000,000,000,000 | 10 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static TPM_RC AddSession( SESSION_LIST_ENTRY **sessionEntry )
{
SESSION_LIST_ENTRY **newEntry;
// find end of list.
for( newEntry = &local_sessions_list; *newEntry != 0; *newEntry = ( (SESSION_LIST_ENTRY *)*newEntry)->nextEntry )
;
// allocate space for session structure.
*newEntry = mallo... | 0 | [
"CWE-522",
"CWE-200"
] | tpm2.0-tools | c5d72beaab1cbbbe68271f4bc4b6670d69985157 | 31,762,270,239,052,323,000,000,000,000,000,000,000 | 22 | kdfa: use openssl for hmac not tpm
While not reachable in the current code base tools, a potential
security bug lurked in tpm_kdfa().
If using that routine for an hmac authorization, the hmac was
calculated using the tpm. A user of an object wishing to
authenticate via hmac, would expect that the password is never
se... |
GF_Err gf_isom_set_pixel_aspect_ratio(GF_ISOFile *movie, u32 trackNumber, u32 StreamDescriptionIndex, s32 hSpacing, s32 vSpacing, Bool force_par)
{
GF_Err e;
GF_TrackBox *trak;
GF_SampleEntryBox *entry;
GF_SampleDescriptionBox *stsd;
e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
if (e) return e;
trak = gf_isom... | 0 | [
"CWE-476"
] | gpac | 586e817dcd531bb3e75438390f1f753cfe6e940a | 280,452,463,159,155,630,000,000,000,000,000,000,000 | 41 | fixed #2046 |
pfm_free_smpl_buffer(pfm_context_t *ctx)
{
pfm_buffer_fmt_t *fmt;
if (ctx->ctx_smpl_hdr == NULL) goto invalid_free;
/*
* we won't use the buffer format anymore
*/
fmt = ctx->ctx_buf_fmt;
DPRINT(("sampling buffer @%p size %lu vaddr=%p\n",
ctx->ctx_smpl_hdr,
ctx->ctx_smpl_size,
ctx->ctx_smpl_vaddr));
... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 33,852,176,907,482,495,000,000,000,000,000,000,000 | 32 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
static RList *symbols(RBinFile *bf) {
RDyldCache *cache = (RDyldCache*) bf->o->bin_obj;
if (!cache) {
return NULL;
}
RList *ret = r_list_newf (free);
if (!ret) {
return NULL;
}
RListIter *iter;
RDyldBinImage *bin;
r_list_foreach (cache->bins, iter, bin) {
SetU *hash = set_u_new ();
if (!hash) {
r_... | 0 | [
"CWE-787"
] | radare2 | c84b7232626badd075caf3ae29661b609164bac6 | 74,009,239,496,463,580,000,000,000,000,000,000,000 | 34 | Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf |
return err;
}
static int iscsi_session_has_conns(int sid)
{
struct iscsi_cls_conn *conn;
unsigned long flags;
int found = 0;
spin_lock_irqsave(&connlock, flags);
list_for_each_entry(conn, &connlist, conn_list) {
if (iscsi_conn_get_sid(conn) == sid) {
found = 1;
break;
}
}
spin_unlock_irqrestore(&con... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 67,473,531,258,428,240,000,000,000,000,000,000,000 | 17 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
static inline int crypto_rng_generate(struct crypto_rng *tfm,
const u8 *src, unsigned int slen,
u8 *dst, unsigned int dlen)
{
return tfm->generate(tfm, src, slen, dst, dlen);
} | 1 | [
"CWE-476",
"CWE-703"
] | linux | 94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6 | 319,942,326,790,849,840,000,000,000,000,000,000,000 | 6 | crypto: rng - Remove old low-level rng interface
Now that all rng implementations have switched over to the new
interface, we can remove the old low-level interface.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
DepsTracker::State GroupFromFirstDocumentTransformation::addDependencies(DepsTracker* deps) const {
for (auto&& expr : _accumulatorExprs) {
expr.second->addDependencies(deps);
}
// This stage will replace the entire document with a new document, so any existing fields
// will be replaced and ca... | 0 | [] | mongo | 14784757ff5e983ea40b21c14e661aba81dfc083 | 272,749,677,372,003,850,000,000,000,000,000,000,000 | 11 | SERVER-60218 add initialize helper function for document_source_group
(cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2) |
get_match(
char *s,
struct masks *m
)
{
while (m->name) {
if (strcmp(s, m->name) == 0)
return m->mask;
else
m++;
}
return 0;
} | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 49,639,830,350,821,460,000,000,000,000,000,000,000 | 13 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
static int sev_asid_new(struct kvm_sev_info *sev)
{
int asid, min_asid, max_asid, ret;
bool retry = true;
WARN_ON(sev->misc_cg);
sev->misc_cg = get_current_misc_cg();
ret = sev_misc_cg_try_charge(sev);
if (ret) {
put_misc_cg(sev->misc_cg);
sev->misc_cg = NULL;
return ret;
}
mutex_lock(&sev_bitmap_lock);... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 259,641,032,200,608,900,000,000,000,000,000,000,000 | 45 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
HttpHeader::append(const HttpHeader * src)
{
assert(src);
assert(src != this);
debugs(55, 7, "appending hdr: " << this << " += " << src);
for (auto e : src->entries) {
if (e)
addEntry(e->clone());
}
} | 0 | [
"CWE-444"
] | squid | 9c8e2a71aa1d3c159a319d9365c346c48dc783a5 | 143,155,203,762,133,440,000,000,000,000,000,000,000 | 11 | Enforce token characters for field-name (#700)
RFC 7230 defines field-name as a token. Request splitting and cache
poisoning attacks have used non-token characters to fool broken HTTP
agents behind or in front of Squid for years. This change should
significantly reduce that abuse.
If we discover exceptional situatio... |
static inline void paravirt_arch_dup_mmap(struct mm_struct *oldmm,
struct mm_struct *mm)
{
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 206,026,927,519,721,200,000,000,000,000,000,000,000 | 4 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static int doing_getsock(struct Curl_easy *data,
struct connectdata *conn,
curl_socket_t *socks)
{
if(conn && conn->handler->doing_getsock)
return conn->handler->doing_getsock(data, conn, socks);
return GETSOCK_BLANK;
} | 0 | [
"CWE-416",
"CWE-295"
] | curl | 7f4a9a9b2a49547eae24d2e19bc5c346e9026479 | 232,507,483,071,917,100,000,000,000,000,000,000,000 | 8 | openssl: associate/detach the transfer from connection
CVE-2021-22901
Bug: https://curl.se/docs/CVE-2021-22901.html |
validate_msg_fds(struct VhostUserMsg *msg, int expected_fds)
{
if (msg->fd_num == expected_fds)
return 0;
VHOST_LOG_CONFIG(ERR,
" Expect %d FDs for request %s, received %d\n",
expected_fds,
vhost_message_str[msg->request.master],
msg->fd_num);
close_msg_fds(msg);
return -1;
} | 0 | [
"CWE-190"
] | dpdk | 3ae4beb079ce242240c34376a066bbccd0c0b23e | 159,071,256,492,002,400,000,000,000,000,000,000,000 | 15 | 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... |
pa2hsv(UINT8 *out, const UINT8 *in, int xsize, const UINT8 *palette) {
int x;
for (x = 0; x < xsize; x++, in += 4, out += 4) {
const UINT8 *rgb = &palette[in[0] * 4];
rgb2hsv_row(out, rgb);
out[3] = 255;
}
} | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 92,587,576,689,751,810,000,000,000,000,000,000,000 | 8 | Use snprintf instead of sprintf |
xmlCtxtReset(xmlParserCtxtPtr ctxt)
{
xmlParserInputPtr input;
xmlDictPtr dict;
if (ctxt == NULL)
return;
dict = ctxt->dict;
while ((input = inputPop(ctxt)) != NULL) { /* Non consuming */
xmlFreeInputStream(input);
}
ctxt->inputNr = 0;
ctxt->input = NULL;
ctxt->sp... | 0 | [
"CWE-401"
] | libxml2 | 5a02583c7e683896d84878bd90641d8d9b0d0549 | 88,946,087,065,705,000,000,000,000,000,000,000,000 | 91 | Fix memory leak in xmlParseBalancedChunkMemoryRecover
When doc is NULL, namespace created in xmlTreeEnsureXMLDecl
is bind to newDoc->oldNs, in this case, set newDoc->oldNs to
NULL and free newDoc will cause a memory leak.
Found with libFuzzer.
Closes #82. |
int kvm_mmu_memory_cache_nr_free_objects(struct kvm_mmu_memory_cache *mc)
{
return mc->nobjs;
} | 0 | [
"CWE-401"
] | linux | f65886606c2d3b562716de030706dfe1bea4ed5e | 76,204,744,721,944,300,000,000,000,000,000,000,000 | 4 | KVM: fix memory leak in kvm_io_bus_unregister_dev()
when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing
the bus, we should iterate over all other devices linked to it and call
kvm_iodevice_destructor() for them
Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail")
Cc: stable@vger... |
static void ax25_kill_by_device(struct net_device *dev)
{
ax25_dev *ax25_dev;
ax25_cb *s;
struct sock *sk;
if ((ax25_dev = ax25_dev_ax25dev(dev)) == NULL)
return;
spin_lock_bh(&ax25_list_lock);
again:
ax25_for_each(s, &ax25_list) {
if (s->ax25_dev == ax25_dev) {
sk = s->sk;
sock_hold(sk);
spin_unlo... | 1 | [
"CWE-476"
] | linux | 71171ac8eb34ce7fe6b3267dce27c313ab3cb3ac | 161,209,022,314,619,110,000,000,000,000,000,000,000 | 36 | ax25: Fix NULL pointer dereference in ax25_kill_by_device
When two ax25 devices attempted to establish connection, the requester use ax25_create(),
ax25_bind() and ax25_connect() to initiate connection. The receiver use ax25_rcv() to
accept connection and use ax25_create_cb() in ax25_rcv() to create ax25_cb, but the
a... |
SYSCALL_DEFINE2(rename, const char __user *, oldname, const char __user *, newname)
{
return do_renameat2(AT_FDCWD, oldname, AT_FDCWD, newname, 0);
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | d0cb50185ae942b03c4327be322055d622dc79f6 | 319,479,119,827,773,100,000,000,000,000,000,000,000 | 4 | do_last(): fetch directory ->i_mode and ->i_uid before it's too late
may_create_in_sticky() call is done when we already have dropped the
reference to dir.
Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
read_2007_section_preview (Bit_Chain *restrict dat, Dwg_Data *restrict dwg,
r2007_section *restrict sections_map,
r2007_page *restrict pages_map)
{
static Bit_Chain sec_dat = { 0 };
int error;
BITCODE_RL size;
unsigned char *sentinel;
error = read_data_se... | 0 | [
"CWE-787"
] | libredwg | 45d2a290c65ed691be0901ba2b2ef51044e07a16 | 200,832,502,899,803,500,000,000,000,000,000,000,000 | 54 | decode_r2007: fix for invalid section size
See GH #350. With fuzzing section->data_size might not fit
section_page->uncomp_size. |
static int attach_child_main(void* data)
{
struct attach_clone_payload* payload = (struct attach_clone_payload*)data;
int ipc_socket = payload->ipc_socket;
int procfd = payload->procfd;
lxc_attach_options_t* options = payload->options;
struct lxc_proc_context_info* init_ctx = payload->init_ctx;
#if HAVE_SYS_PERSON... | 0 | [
"CWE-17"
] | lxc | 15ec0fd9d490dd5c8a153401360233c6ee947c24 | 199,433,880,145,469,420,000,000,000,000,000,000,000 | 191 | CVE-2015-1334: Don't use the container's /proc during attach
A user could otherwise over-mount /proc and prevent the apparmor profile
or selinux label from being written which combined with a modified
/bin/sh or other commonly used binary would lead to unconfined code
execution.
Reported-by: Roman Fiedler
Signed-off-... |
void daemonize(const char *name, ...)
{
va_list args;
sigset_t blocked;
va_start(args, name);
vsnprintf(current->comm, sizeof(current->comm), name, args);
va_end(args);
/*
* If we were started as result of loading a module, close all of the
* user space pages. We don't need them, and if we didn't close the... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | linux | b69f2292063d2caf37ca9aec7d63ded203701bf3 | 213,576,315,280,284,250,000,000,000,000,000,000,000 | 42 | block: Fix io_context leak after failure of clone with CLONE_IO
With CLONE_IO, parent's io_context->nr_tasks is incremented, but never
decremented whenever copy_process() fails afterwards, which prevents
exit_io_context() from calling IO schedulers exit functions.
Give a task_struct to exit_io_context(), and call exi... |
static inline bool __ipv6_prefix_equal64_half(const __be64 *a1,
const __be64 *a2,
unsigned int len)
{
if (len && ((*a1 ^ *a2) & cpu_to_be64((~0UL) << (64 - len))))
return false;
return true;
} | 0 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 226,903,347,136,538,570,000,000,000,000,000,000,000 | 8 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
static inline bool consumer_filter(struct uprobe_consumer *uc,
enum uprobe_filter_ctx ctx, struct mm_struct *mm)
{
return !uc->filter || uc->filter(uc, ctx, mm);
} | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 336,366,515,990,490,550,000,000,000,000,000,000,000 | 5 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
static inline unsigned long nonhyp_mask(int i)
{
unsigned int nonhyp_fai = (sclp.hmfai << i * 2) >> 30;
return 0x0000ffffffffffffUL >> (nonhyp_fai << 4);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 105,008,827,821,000,090,000,000,000,000,000,000,000 | 6 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static void do_item_unlink_q(item *it) {
item **head, **tail;
head = &heads[it->slabs_clsid];
tail = &tails[it->slabs_clsid];
if (*head == it) {
assert(it->prev == 0);
*head = it->next;
}
if (*tail == it) {
assert(it->next == 0);
*tail = it->prev;
}
asser... | 0 | [
"CWE-190"
] | memcached | bd578fc34b96abe0f8d99c1409814a09f51ee71c | 310,056,433,000,901,000,000,000,000,000,000,000,000 | 22 | CVE reported by cisco talos |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.