func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
ex_normal(exarg_T *eap)
{
save_state_T save_state;
char_u *arg = NULL;
int l;
char_u *p;
if (ex_normal_lock > 0)
{
emsg(_(e_secure));
return;
}
if (ex_normal_busy >= p_mmd)
{
emsg(_("E192: Recursive use of :normal too deep"));
return;
}
/*
* vgetc() expects a CSI ... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 339,611,561,845,736,000,000,000,000,000,000,000,000 | 118 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static void ffs_release_dev(struct ffs_data *ffs_data)
{
struct ffs_dev *ffs_dev;
ENTER();
ffs_dev_lock();
ffs_dev = ffs_data->private_data;
if (ffs_dev) {
ffs_dev->mounted = false;
if (ffs_dev->ffs_release_dev_callback)
ffs_dev->ffs_release_dev_callback(ffs_dev);
}
ffs_dev_unlock();
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 38740a5b87d53ceb89eb2c970150f6e94e00373a | 103,707,296,459,914,860,000,000,000,000,000,000,000 | 17 | usb: gadget: f_fs: Fix use-after-free
When using asynchronous read or write operations on the USB endpoints the
issuer of the IO request is notified by calling the ki_complete() callback
of the submitted kiocb when the URB has been completed.
Calling this ki_complete() callback will free kiocb. Make sure that the
str... |
xmlWalkRemoveRef(const void *data, const void *user)
{
xmlAttrPtr attr0 = ((xmlRefPtr)data)->attr;
xmlAttrPtr attr1 = ((xmlRemoveMemoPtr)user)->ap;
xmlListPtr ref_list = ((xmlRemoveMemoPtr)user)->l;
if (attr0 == attr1) { /* Matched: remove and terminate walk */
xmlListRemoveFirst(ref_list, (voi... | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 320,759,174,860,550,500,000,000,000,000,000,000,000 | 12 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
static int crt_to_pubkey(const gnutls_datum_t *raw_crt, gnutls_datum_t * out)
{
gnutls_pubkey_t pub = NULL;
gnutls_x509_crt_t crt = NULL;
int ret;
out->data = NULL;
ret = gnutls_x509_crt_init(&crt);
if (ret < 0)
return gnutls_assert_val(DANE_E_PUBKEY_ERROR);
ret = gnutls_pubkey_init( &pub);
if (ret < 0) {
... | 1 | [
"CWE-119"
] | gnutls | ed51e5e53cfbab3103d6b7b85b7ba4515e4f30c3 | 297,369,483,556,257,600,000,000,000,000,000,000,000 | 54 | Adding dane_raw_tlsa to allow initialization of dane_query_t from DANE records based on external DNS resolutions. Also fixing a buffer overflow.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org> |
ins_comp_get_next_word_or_line(
buf_T *ins_buf, // buffer being scanned
pos_T *cur_match_pos, // current match position
int *match_len,
int *cont_s_ipos) // next ^X<> will set initial_pos
{
char_u *ptr;
int len;
*match_len = 0;
ptr = ml_get_buf(ins_buf, cur_match_pos->lnum, FALSE) +
cur_match_... | 1 | [
"CWE-122",
"CWE-787"
] | vim | a6f9e300161f4cb54713da22f65b261595e8e614 | 205,333,609,836,782,940,000,000,000,000,000,000,000 | 90 | patch 9.0.0102: reading past end of line with insert mode completion
Problem: Reading past end of line with insert mode completion.
Solution: Check text length. |
_gnutls_x509_mac_to_oid (gnutls_mac_algorithm_t algorithm)
{
const char *ret = NULL;
/* avoid prefix */
GNUTLS_HASH_ALG_LOOP (ret = p->oid);
return ret;
} | 0 | [
"CWE-310"
] | gnutls | 34d87a7c3f12794a3ec2305cd2fdbae152bf2a76 | 248,214,693,692,456,600,000,000,000,000,000,000,000 | 9 | (_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the
NULL OID value in the hash_algorithms array, which happens when the
input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160.
Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>. |
njs_decode_utf8(njs_str_t *dst, const njs_str_t *src)
{
njs_unicode_decode_t ctx;
njs_utf8_decode_init(&ctx);
(void) njs_utf8_stream_encode(&ctx, src->start, src->start + src->length,
dst->start, 1, 0);
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 283,087,330,574,430,030,000,000,000,000,000,000,000 | 9 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
static bool need_wrongsec_check(struct svc_rqst *rqstp)
{
struct nfsd4_compoundres *resp = rqstp->rq_resp;
struct nfsd4_compoundargs *argp = rqstp->rq_argp;
struct nfsd4_op *this = &argp->ops[resp->opcnt - 1];
struct nfsd4_op *next = &argp->ops[resp->opcnt];
const struct nfsd4_operation *thisd = OPDESC(this);
con... | 0 | [
"CWE-476"
] | linux | 01310bb7c9c98752cc763b36532fab028e0f8f81 | 246,309,171,056,969,380,000,000,000,000,000,000,000 | 32 | nfsd: COPY and CLONE operations require the saved filehandle to be set
Make sure we have a saved filehandle, otherwise we'll oops with a null
pointer dereference in nfs4_preprocess_stateid_op().
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.... |
static struct rpc_task * __rpc_wake_up_next_priority(struct rpc_wait_queue *queue)
{
struct list_head *q;
struct rpc_task *task;
/*
* Service a batch of tasks from a single owner.
*/
q = &queue->tasks[queue->priority];
if (!list_empty(q)) {
task = list_entry(q->next, struct rpc_task, u.tk_wait.list);
if (... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 15,865,922,898,226,997,000,000,000,000,000,000,000 | 48 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
MODULE_ENTRY (fill_info) (GdkPixbufFormat *info)
{
static const GdkPixbufModulePattern signature[] = {
{ "\xff\xd8", NULL, 100 },
{ NULL, NULL, 0 }
};
static const gchar *mime_types[] = {
"image/jpeg",
NULL
};
static const gchar *extensions[] = {
"jpeg",
"jpe",
"jpg",
NULL
};
info->name = "jpeg"... | 0 | [
"CWE-787"
] | gdk-pixbuf | c2a40a92fe3df4111ed9da51fe3368c079b86926 | 126,146,939,877,097,490,000,000,000,000,000,000,000 | 25 | jpeg: Throw error when number of color components is unsupported
Explicitly check "3" or "4" output color components.
gdk-pixbuf assumed that the value of output_components to be either
3 or 4, but not an invalid value (9) or an unsupported value (1).
The way the buffer size was deduced was using a naive "== 4" chec... |
static void fdctrl_external_reset_isa(DeviceState *d)
{
FDCtrlISABus *isa = ISA_FDC(d);
FDCtrl *s = &isa->state;
fdctrl_reset(s, 0);
} | 0 | [
"CWE-119"
] | qemu | e907746266721f305d67bc0718795fedee2e824c | 253,427,894,556,507,300,000,000,000,000,000,000,000 | 7 | fdc: force the fifo access to be in bounds of the allocated buffer
During processing of certain commands such as FD_CMD_READ_ID and
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
get out of bounds leading to memory corruption with values coming
from the guest.
Fix this by making sure that the index i... |
void CertificateRequest::Build()
{
certificate_types_[0] = rsa_sign;
certificate_types_[1] = dss_sign;
typeTotal_ = 2;
uint16 authCount = 0;
uint16 authSz = 0;
for (int j = 0; j < authCount; j++) {
int sz = REQUEST_HEADER + MIN_DIS_SIZE;
DistinguishedName dn;
certifi... | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 70,246,670,932,457,530,000,000,000,000,000,000,000 | 26 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
static int propfind_tzid(const xmlChar *name, xmlNsPtr ns,
struct propfind_ctx *fctx,
xmlNodePtr resp __attribute__((unused)),
struct propstat propstat[],
void *rock __attribute__((unused)))
{
const char *prop_annot =
ANNOT_NS "<" XML_NS_CALDAV ">calendar-timezone-id";
struct buf attrib = BUF_I... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 174,456,056,199,403,200,000,000,000,000,000,000,000 | 52 | HTTP: don't overrun buffer when parsing strings with sscanf() |
static void merge_avc_config(GF_AVCConfig *dst_cfg, GF_AVCConfig *src_cfg)
{
GF_AVCConfig *cfg;
if (!src_cfg || !dst_cfg) return;
cfg = AVC_DuplicateConfig(src_cfg);
if (!cfg) return;
while (gf_list_count(cfg->sequenceParameterSets)) {
GF_NALUFFParam *p = (GF_NALUFFParam*)gf_list_get(cfg->sequenceParameterSets... | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 320,628,136,604,308,850,000,000,000,000,000,000,000 | 19 | fixed #1785 (fuzz) |
poppler_document_new_from_stream (GInputStream *stream,
goffset length,
const char *password,
GCancellable *cancellable,
GError **error)
{
PDFDoc *newDoc;
BaseStream *... | 0 | [
"CWE-476"
] | poppler | f162ecdea0dda5dbbdb45503c1d55d9afaa41d44 | 327,989,765,367,341,600,000,000,000,000,000,000,000 | 36 | Fix crash on missing embedded file
Check whether an embedded file is actually present in the PDF
and show warning in that case.
https://bugs.freedesktop.org/show_bug.cgi?id=106137
https://gitlab.freedesktop.org/poppler/poppler/issues/236 |
void CLASS foveon_make_curves
(short **curvep, float dq[3], float div[3], float filt)
{
double mul[3], max=0;
int c;
FORC3 mul[c] = dq[c]/div[c];
FORC3 if (max < mul[c]) max = mul[c];
FORC3 curvep[c] = foveon_make_curve (max, mul[c], filt);
} | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 210,001,956,441,887,670,000,000,000,000,000,000,000 | 10 | cumulated data checks patch |
static void print_hint_tree(RBTree tree, int mode) {
PJ *pj = NULL;
if (mode == 'j') {
pj = pj_new();
pj_a(pj);
}
#define END_ADDR \
if (pj) { \
pj_end(pj); \
} else if (mode != '*') { \
rz_cons_newline(); \
}
RBIter it;
HintNode *node;
ut64 last_addr = 0;
bool in_addr = false;
rz_rbtree_foreach (tre... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 53,629,295,433,396,740,000,000,000,000,000,000,000 | 43 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static inline const unsigned char *fsnotify_oldname_init(const unsigned char *name)
{
return kstrdup(name, GFP_KERNEL);
} | 1 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 45,042,899,987,494,010,000,000,000,000,000,000,000 | 4 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
intrusive_ptr<Expression> ExpressionCompare::parse(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
BSONElement bsonExpr,
const VariablesParseState& vps,
CmpOp op) {
intrusive_ptr<ExpressionCompare> expr = new ExpressionCompare(expCtx, op);
ExpressionVector args = parseArguments(expCtx, b... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 323,159,700,328,520,800,000,000,000,000,000,000,000 | 11 | SERVER-38070 fix infinite loop in agg expression |
static int ip_mr_forward(struct sk_buff *skb, struct mfc_cache *cache, int local)
{
int psend = -1;
int vif, ct;
vif = cache->mfc_parent;
cache->mfc_un.res.pkt++;
cache->mfc_un.res.bytes += skb->len;
/*
* Wrong interface: drop packet and (maybe) send PIM assert.
*/
if (vif_table[vif].dev != skb->dev) {
i... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 17,813,475,244,839,862,000,000,000,000,000,000,000 | 80 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int decode_modrm(struct x86_emulate_ctxt *ctxt,
struct operand *op)
{
u8 sib;
int index_reg, base_reg, scale;
int rc = X86EMUL_CONTINUE;
ulong modrm_ea = 0;
ctxt->modrm_reg = ((ctxt->rex_prefix << 1) & 8); /* REX.R */
index_reg = (ctxt->rex_prefix << 2) & 8; /* REX.X */
base_reg = (ctxt->rex_prefix <<... | 0 | [
"CWE-362",
"CWE-269"
] | linux | f3747379accba8e95d70cec0eae0582c8c182050 | 179,477,148,257,427,800,000,000,000,000,000,000,000 | 132 | KVM: x86: SYSENTER emulation is broken
SYSENTER emulation is broken in several ways:
1. It misses the case of 16-bit code segments completely (CVE-2015-0239).
2. MSR_IA32_SYSENTER_CS is checked in 64-bit mode incorrectly (bits 0 and 1 can
still be set without causing #GP).
3. MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSE... |
napi_status napi_create_typedarray(napi_env env,
napi_typedarray_type type,
size_t length,
napi_value arraybuffer,
size_t byte_offset,
napi_value... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 5,370,735,282,089,867,000,000,000,000,000,000,000 | 68 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
R_API RBinJavaAttrInfo *r_bin_java_default_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) {
// NOTE: this function receives the buffer offset in the original buffer,
// but the buffer is already point to that particular offset.
// XXX - all the code that relies on this function should probably be modified
// so th... | 0 | [
"CWE-125"
] | radare2 | e9ce0d64faf19fa4e9c260250fbdf25e3c11e152 | 255,577,355,384,190,750,000,000,000,000,000,000,000 | 32 | Fix #10498 - Fix crash in fuzzed java files (#10511) |
static const char *nfs_readdir_copy_name(const char *name, unsigned int len)
{
const char *ret = kmemdup_nul(name, len, GFP_KERNEL);
/*
* Avoid a kmemleak false positive. The pointer to the name is stored
* in a page cache page which kmemleak does not scan.
*/
if (ret != NULL)
kmemleak_not_leak(ret);
retur... | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 320,216,476,843,960,960,000,000,000,000,000,000,000 | 12 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
DECLAREwriteFunc(writeBufferToContigStrips)
{
uint32 row, rowsperstrip;
tstrip_t strip = 0;
(void) imagewidth; (void) spp;
(void) TIFFGetFieldDefaulted(out, TIFFTAG_ROWSPERSTRIP, &rowsperstrip);
for (row = 0; row < imagelength; row += rowsperstrip) {
uint32 nrows = (row+rowsperstrip > imagelength) ?
image... | 0 | [
"CWE-190"
] | libtiff | 43c0b81a818640429317c80fea1e66771e85024b | 211,066,426,821,021,150,000,000,000,000,000,000,000 | 20 | * tools/tiffcp.c: fix read of undefined variable in case of missing
required tags. Found on test case of MSVR 35100.
* tools/tiffcrop.c: fix read of undefined buffer in
readContigStripsIntoBuffer() due to uint16 overflow. Probably not a
security issue but I can be wrong. Reported as MSVR 35100 by Axel
Souchet from the ... |
void oidc_util_hdr_out_location_set(const request_rec *r, const char *value) {
oidc_util_hdr_out_set(r, OIDC_HTTP_HDR_LOCATION, value);
} | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 101,243,290,549,873,270,000,000,000,000,000,000,000 | 3 | Add a function to escape Javascript characters |
void CLASS foveon_interpolate()
{
static const short hood[] = { -1,-1, -1,0, -1,1, 0,-1, 0,1, 1,-1, 1,0, 1,1 };
short *pix, prev[3], *curve[8], (*shrink)[3];
float cfilt=0, ddft[3][3][2], ppm[3][3][3];
float cam_xyz[3][3], correct[3][3], last[3][3], trans[3][3];
float chroma_dq[3], color_dq[3], diag[3][3], di... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 218,315,805,925,909,400,000,000,000,000,000,000,000 | 396 | cumulated data checks patch |
TfLiteStatus ComparisonPrepare(TfLiteContext* context, TfLiteNode* node) {
return ComparisonPrepareCommon(context, node, false);
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 214,065,530,580,238,160,000,000,000,000,000,000,000 | 3 | [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... |
virtual std::string name() const {
char buf[100];
sprintf(buf,"sao-%d",ctb_y);
return buf;
} | 0 | [
"CWE-703"
] | libde265 | 45904e5667c5bf59c67fcdc586dfba110832894c | 71,393,236,329,743,230,000,000,000,000,000,000,000 | 5 | fix reading invalid images where shdr references are NULL in part of the image (#302) |
int ath6kl_wmi_scanparams_cmd(struct wmi *wmi, u8 if_idx,
u16 fg_start_sec,
u16 fg_end_sec, u16 bg_sec,
u16 minact_chdw_msec, u16 maxact_chdw_msec,
u16 pas_chdw_msec, u8 short_scan_ratio,
u8 scan_ctrl_flag, u32 max_dfsch_act_time,
u16 maxact_scan_per_ssid)
{
struct... | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 218,146,831,371,903,000,000,000,000,000,000,000,000 | 32 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
static char *getstr(RBinDexObj *bin, int idx) {
ut8 buf[6];
ut64 len;
int uleblen;
if (!bin || idx < 0 || idx >= bin->header.strings_size ||
!bin->strings) {
return NULL;
}
if (bin->strings[idx] >= bin->size) {
return NULL;
}
if (r_buf_read_at (bin->b, bin->strings[idx], buf, sizeof (buf)) < 1) {
retur... | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 200,399,759,141,311,870,000,000,000,000,000,000,000 | 43 | fix #6857 |
void CLASS unpacked_load_raw()
{
int row, col, bits = 0;
while (1 << ++bits < maximum)
;
read_shorts(raw_image, raw_width * raw_height);
if (maximum < 0xffff)
for (row = 0; row < raw_height; row++)
{
#ifdef LIBRAW_LIBRARY_BUILD
checkCancel();
#endif
for (col = 0; col < raw_width; col++)
... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 308,787,115,213,714,760,000,000,000,000,000,000,000 | 18 | Secunia SA75000 advisory: several buffer overruns |
static struct sk_filter *__sk_migrate_filter(struct sk_filter *fp,
struct sock *sk)
{
struct sock_filter *old_prog;
struct sk_filter *old_fp;
int i, err, new_len, old_len = fp->len;
/* We are free to overwrite insns et al right here as it
* won't be used at this point in time anymore internally
* aft... | 0 | [
"CWE-416",
"CWE-125",
"CWE-189"
] | linux | 05ab8f2647e4221cbdb3856dd7d32bd5407316b3 | 145,731,119,122,998,500,000,000,000,000,000,000,000 | 76 | filter: prevent nla extensions to peek beyond the end of the message
The BPF_S_ANC_NLATTR and BPF_S_ANC_NLATTR_NEST extensions fail to check
for a minimal message length before testing the supplied offset to be
within the bounds of the message. This allows the subtraction of the nla
header to underflow and therefore -... |
static long double nan() { const long double val_nan = -std::sqrt(-1.0L); return val_nan; } | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 46,513,918,155,959,570,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
size_t Downstream::count_crumble_request_cookie() {
size_t n = 0;
for (auto &kv : req_.fs.headers()) {
if (kv.token != http2::HD_COOKIE) {
continue;
}
for (auto it = std::begin(kv.value); it != std::end(kv.value);) {
if (*it == '\t' || *it == ' ' || *it == ';') {
++it;
conti... | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 115,331,539,589,998,440,000,000,000,000,000,000,000 | 20 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
std::string RemoteIo::path() const
{
return p_->path_;
} | 0 | [
"CWE-125"
] | exiv2 | 6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97 | 309,543,972,830,656,520,000,000,000,000,000,000,000 | 4 | Fix https://github.com/Exiv2/exiv2/issues/55 |
sigjson_vrrp(__attribute__((unused)) void *v, __attribute__((unused)) int sig)
{
log_message(LOG_INFO, "Printing VRRP as json for process(%d) on signal",
getpid());
thread_add_event(master, print_vrrp_json, NULL, 0);
} | 0 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 323,862,364,544,992,950,000,000,000,000,000,000,000 | 6 | Disable fopen_safe() append mode by default
If a non privileged user creates /tmp/keepalived.log and has it open
for read (e.g. tail -f), then even though keepalived will change the
owner to root and remove all read/write permissions from non owners,
the application which already has the file open will be able to read... |
static int h2c_handle_rst_stream(struct h2c *h2c, struct h2s *h2s)
{
int error;
if (h2c->dsi == 0) {
error = H2_ERR_PROTOCOL_ERROR;
goto conn_err;
}
if (h2c->dfl != 4) {
error = H2_ERR_FRAME_SIZE_ERROR;
goto conn_err;
}
/* process full frame only */
if (b_data(&h2c->dbuf) < h2c->dfl)
return 0;
/* ... | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 189,559,132,395,400,070,000,000,000,000,000,000,000 | 37 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
queue_get_spool_list(int subdiroffset, uschar *subdirs, int *subcount,
BOOL randomize)
{
int i;
int flags = 0;
int resetflags = -1;
int subptr;
queue_filename *yield = NULL;
queue_filename *last = NULL;
struct dirent *ent;
DIR *dd;
uschar buffer[256];
queue_filename *root[LOG2_MAXNODES];
/* When randomizing, the fil... | 0 | [
"CWE-78"
] | exim | 7ea1237c783e380d7bdb86c90b13d8203c7ecf26 | 335,267,739,745,622,850,000,000,000,000,000,000,000 | 186 | Events: raise msg:fail:internal & msg:complete for -Mrm. Bug 2310 |
void handle_connections_sockets()
{
my_socket UNINIT_VAR(sock), UNINIT_VAR(new_sock);
uint error_count=0;
THD *thd;
struct sockaddr_storage cAddr;
int ip_flags=0,socket_flags=0,flags=0,retval;
st_vio *vio_tmp;
#ifdef HAVE_POLL
int socket_count= 0;
struct pollfd fds[2]; // for ip_sock and unix_sock
#else... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 179,338,853,012,795,520,000,000,000,000,000,000,000 | 238 | 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... |
_archive_write_disk_finish_entry(struct archive *_a)
{
struct archive_write_disk *a = (struct archive_write_disk *)_a;
int ret = ARCHIVE_OK;
archive_check_magic(&a->archive, ARCHIVE_WRITE_DISK_MAGIC,
ARCHIVE_STATE_HEADER | ARCHIVE_STATE_DATA,
"archive_write_finish_entry");
if (a->archive.state & ARCHIVE_... | 0 | [
"CWE-703",
"CWE-22"
] | libarchive | 59357157706d47c365b2227739e17daba3607526 | 80,438,561,933,318,300,000,000,000,000,000,000,000 | 194 | Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool. |
void mutt_adv_mktemp (char *s, size_t l)
{
char buf[_POSIX_PATH_MAX];
char tmp[_POSIX_PATH_MAX];
char *period;
size_t sl;
struct stat sb;
strfcpy (buf, NONULL (Tempdir), sizeof (buf));
mutt_expand_path (buf, sizeof (buf));
if (s[0] == '\0')
{
snprintf (s, l, "%s/muttXXXXXX", buf);
mktemp (s... | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 275,515,350,512,947,800,000,000,000,000,000,000,000 | 34 | use a 64-bit random value in temporary filenames.
closes #3158 |
static int nfs_can_extend_write(struct file *file, struct page *page, struct inode *inode)
{
if (file->f_flags & O_DSYNC)
return 0;
if (NFS_PROTO(inode)->have_delegation(inode, FMODE_WRITE))
return 1;
if (nfs_write_pageuptodate(page, inode) && (inode->i_flock == NULL ||
(inode->i_flock->fl_start == 0 &&
in... | 1 | [
"CWE-20",
"CWE-200"
] | linux | 263b4509ec4d47e0da3e753f85a39ea12d1eff24 | 139,017,720,201,035,220,000,000,000,000,000,000,000 | 13 | nfs: always make sure page is up-to-date before extending a write to cover the entire page
We should always make sure the cached page is up-to-date when we're
determining whether we can extend a write to cover the full page -- even
if we've received a write delegation from the server.
Commit c7559663 added logic to s... |
virDomainNetAllocateActualDevice(virConnectPtr conn,
virDomainDefPtr dom,
virDomainNetDefPtr iface)
{
return virDomainNetCreatePort(conn, dom, iface, 0);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 195,245,069,611,753,340,000,000,000,000,000,000,000 | 6 | 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... |
X509Certificate::X509Certificate(
Environment* env,
Local<Object> object,
std::shared_ptr<ManagedX509> cert,
STACK_OF(X509)* issuer_chain)
: BaseObject(env, object),
cert_(std::move(cert)) {
MakeWeak();
if (issuer_chain != nullptr && sk_X509_num(issuer_chain)) {
X509Pointer cert(X509_... | 0 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 125,395,617,618,359,620,000,000,000,000,000,000,000 | 20 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
mrb_method_search_vm(mrb_state *mrb, struct RClass **cp, mrb_sym mid)
{
mrb_method_t m;
struct RClass *c = *cp;
#ifndef MRB_NO_METHOD_CACHE
struct RClass *oc = c;
int h = kh_int_hash_func(mrb, ((intptr_t)oc) ^ mid) & (MRB_METHOD_CACHE_SIZE-1);
struct mrb_cache_entry *mc = &mrb->cache[h];
if (mc->c == c && ... | 0 | [
"CWE-476",
"CWE-190"
] | mruby | f5e10c5a79a17939af763b1dcf5232ce47e24a34 | 276,161,902,794,478,800,000,000,000,000,000,000,000 | 46 | proc.c: add `mrb_state` argument to `mrb_proc_copy()`.
The function may invoke the garbage collection and it requires
`mrb_state` to run. |
proto_write_ulong_array (p11_rpc_message *msg,
CK_ULONG_PTR array,
CK_ULONG len,
CK_RV ret)
{
assert (msg != NULL);
/*
* When returning an ulong array, in many cases we need to pass
* an invalid array along with a length, which signifies ... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 324,112,828,277,332,220,000,000,000,000,000,000,000 | 29 | Check for arithmetic overflows before allocating |
int RegisterSignalHandler(int signum,
void (*klinux_sigaction)(int, klinux_siginfo_t *,
void *),
const sigset_t mask, int flags) {
int klinux_signum = TokLinuxSignalNumber(signum);
if (klinux_signum < 0) {
err... | 0 | [
"CWE-200",
"CWE-668"
] | asylo | ecfcd0008b6f8f63c6fa3cc1b62fcd4a52f2c0ad | 44,100,467,543,207,440,000,000,000,000,000,000,000 | 18 | Store untrusted input to enclave variable
The untrusted input pointer should be stored to trusted variable before
checking to avoid unexpected modifications after checking.
PiperOrigin-RevId: 362553830
Change-Id: I743f9bd3487de60269e247d74f2188f2ffc06d01 |
dissect_kafka_describe_log_dirs_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
proto_item *subti;
proto_tree *subtree;
offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset);
subtree = p... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 78,003,544,807,644,980,000,000,000,000,000,000,000 | 18 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
int dump_seek(struct file *file, loff_t off)
{
int ret = 1;
if (file->f_op->llseek && file->f_op->llseek != no_llseek) {
if (file->f_op->llseek(file, off, SEEK_CUR) < 0)
return 0;
} else {
char *buf = (char *)get_zeroed_page(GFP_KERNEL);
if (!buf)
return 0;
while (off > 0) {
unsigned long n = off;... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 162,195,039,429,530,180,000,000,000,000,000,000,000 | 27 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
{
int rc, xprefix;
switch (type) {
case ACL_TYPE_ACCESS:
xprefix = JFFS2_XPREFIX_ACL_ACCESS;
if (acl) {
umode_t mode = inode->i_mode;
rc = posix_acl_equiv_mode(acl, &mode);
if (rc < 0)
return rc;
if (inode->i_mode != mode) {... | 1 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 214,691,502,998,266,300,000,000,000,000,000,000,000 | 39 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
GF_Err gf_isom_add_track_to_root_od(GF_ISOFile *movie, u32 trackNumber)
{
GF_Err e;
GF_ES_ID_Inc *inc;
e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
if (e) return e;
e = gf_isom_insert_moov(movie);
if (e) return e;
if (!movie->moov->iods) AddMovieIOD(movie->moov, 0);
if (gf_isom_is_track_in_root_od(movie, t... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 90,790,911,132,698,180,000,000,000,000,000,000,000 | 26 | fixed #1706 |
LOCAL MMDB_entry_data_list_s *new_entry_data_list(void)
{
/* We need calloc here in order to ensure that the ->next pointer in the
* struct doesn't point to some random address. */
return calloc(1, sizeof(MMDB_entry_data_list_s));
} | 0 | [] | libmaxminddb | 51255f113fe3c7b63ffe957636a7656a3ff9d1ff | 215,379,412,589,367,200,000,000,000,000,000,000,000 | 6 | Fix several segfaults from missing bounds checks
These were found using afl-fuzz. There are several more similar failure
that warrant investigation. If we want to add tests, I have several
corrupt databases we could add, but these are trivially reproducible
when using the existing test databases as input to afl-fuzz. |
bool is_valid() const { return (len != -1); } | 0 | [] | envoy | 3b5acb2f43548862dadb243de7cf3994986a8e04 | 220,053,131,685,355,360,000,000,000,000,000,000,000 | 1 | http, url: Bring back chromium_url and http_parser_parse_url (#198)
* Revert GURL as HTTP URL parser utility
This reverts:
1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d
2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32
3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62
Signed-off-by: Dhi Aurrahman <dio@tetrat... |
int drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb,
const struct drm_framebuffer_funcs *funcs)
{
int ret;
ret = drm_mode_object_get(dev, &fb->base, DRM_MODE_OBJECT_FB);
if (ret) {
return ret;
}
fb->dev = dev;
fb->funcs = funcs;
dev->mode_config.num_fb++;
list_add(&fb->head, &dev... | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 308,091,095,281,999,960,000,000,000,000,000,000,000 | 17 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... |
//! Compute the bitwise left rotation of each pixel value \newinstance.
CImg<T> get_rol(const unsigned int n=1) const {
return (+*this).rol(n); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 198,942,297,921,344,830,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int udf_add_nondir(struct dentry *dentry, struct inode *inode)
{
struct udf_inode_info *iinfo = UDF_I(inode);
struct inode *dir = dentry->d_parent->d_inode;
struct udf_fileident_bh fibh;
struct fileIdentDesc cfi, *fi;
int err;
fi = udf_add_entry(dir, dentry, &fibh, &cfi, &err);
if (unlikely(!fi)) {
ino... | 0 | [
"CWE-17"
] | linux | 0e5cc9a40ada6046e6bc3bdfcd0c0d7e4b706b14 | 55,040,688,087,952,970,000,000,000,000,000,000,000 | 30 | udf: Check path length when reading symlink
Symlink reading code does not check whether the resulting path fits into
the page provided by the generic code. This isn't as easy as just
checking the symlink size because of various encoding conversions we
perform on path. So we have to check whether there is still enough ... |
static J9StringBuffer* jvmBufferEnsure(J9StringBuffer* buffer, UDATA len) {
if (buffer == NULL) {
UDATA newSize = len > MIN_GROWTH ? len : MIN_GROWTH;
buffer = (J9StringBuffer*) malloc( newSize + 1 + sizeof(UDATA)); /* 1 for null terminator */
if (buffer != NULL) {
buffer->remaining = newSize;
buffer->dat... | 0 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 295,155,172,552,102,700,000,000,000,000,000,000,000 | 25 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
static int cpu_cgroup_css_online(struct cgroup_subsys_state *css)
{
struct task_group *tg = css_tg(css);
struct task_group *parent = css_tg(css_parent(css));
if (parent)
sched_online_group(tg, parent);
return 0;
} | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 275,066,744,887,364,300,000,000,000,000,000,000,000 | 9 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
p11_rpc_message_write_ulong_array (p11_rpc_message *msg,
CK_ULONG_PTR array,
CK_ULONG n_array)
{
CK_ULONG i;
assert (msg != NULL);
assert (msg->output != NULL);
/* Check that we're supposed to have this at this point */
assert (!msg->signature... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 194,560,858,600,245,400,000,000,000,000,000,000,000 | 24 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
long keyctl_keyring_clear(key_serial_t ringid)
{
key_ref_t keyring_ref;
long ret;
keyring_ref = lookup_user_key(ringid, KEY_LOOKUP_CREATE, KEY_WRITE);
if (IS_ERR(keyring_ref)) {
ret = PTR_ERR(keyring_ref);
goto error;
}
ret = keyring_clear(key_ref_to_ptr(keyring_ref));
key_ref_put(keyring_ref);
error:
r... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 121,766,720,263,175,630,000,000,000,000,000,000,000 | 18 | 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... |
errhidecontext(bool hide_ctx)
{
ErrorData *edata = &errordata[errordata_stack_depth];
/* we don't bother incrementing recursion_depth */
CHECK_STACK_DEPTH();
edata->hide_ctx = hide_ctx;
return 0; /* return value does not matter */
} | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 173,068,269,906,307,260,000,000,000,000,000,000,000 | 11 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
int lcc_network_buffer_set_security_level (lcc_network_buffer_t *nb, /* {{{ */
lcc_security_level_t level,
const char *username, const char *password)
{
char *username_copy;
char *password_copy;
if (level == NONE)
{
free (nb->username);
free (nb->password);
nb->username = NULL;
nb->pass... | 0 | [
"CWE-119"
] | collectd | 8b4fed9940e02138b7e273e56863df03d1a39ef7 | 101,845,930,947,404,420,000,000,000,000,000,000,000 | 39 | network plugin, libcollectdclient: Check return value of gcry_control().
Fixes: #1665 |
static void cgi_setup_error(const char *err, const char *header, const char *info)
{
if (!got_request) {
/* damn browsers don't like getting cut off before they give a request */
char line[1024];
while (fgets(line, sizeof(line)-1, stdin)) {
if (strnequal(line,"GET ", 4) ||
strnequal(line,"POST ", 5) |... | 0 | [] | samba | 91f4275873ebeda8f57684f09df67162ae80515a | 228,756,662,073,586,700,000,000,000,000,000,000,000 | 19 | swat: Use additional nonce on XSRF protection
If the user had a weak password on the root account of a machine running
SWAT, there still was a chance of being targetted by an XSRF on a
malicious web site targetting the SWAT setup.
Use a random nonce stored in secrets.tdb to close this possible attack
window. Thanks t... |
void NumberFormatTest::Test11646_Equality() {
UErrorCode status = U_ZERO_ERROR;
DecimalFormatSymbols symbols(Locale::getEnglish(), status);
UnicodeString pattern(u"\u00a4\u00a4\u00a4 0.00 %\u00a4\u00a4");
DecimalFormat fmt(pattern, symbols, status);
if (!assertSuccess("", status)) return;
// Te... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 139,184,438,158,551,760,000,000,000,000,000,000,000 | 38 | ICU-20246 Fixing another integer overflow in number parsing. |
void writeErr(size_t, const AsyncSocketException& ex) noexcept override {
LOG(ERROR) << "write error: " << ex.what();
EXPECT_NE(
ex.getType(),
AsyncSocketException::AsyncSocketExceptionType::SSL_ERROR);
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 233,973,160,222,796,650,000,000,000,000,000,000,000 | 6 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
filter_check_rdns_table(struct filter *filter, enum table_service kind, const char *key)
{
int ret = 0;
if (filter->config->rdns_table == NULL)
return 0;
if (table_match(filter->config->rdns_table, kind, key) > 0)
ret = 1;
return filter->config->not_rdns_table < 0 ? !ret : ret;
} | 0 | [
"CWE-476"
] | src | 6c3220444ed06b5796dedfd53a0f4becd903c0d1 | 102,472,693,444,771,920,000,000,000,000,000,000,000 | 12 | smtpd's filter state machine can prematurely release resources
leading to a crash. From gilles@ |
Status RoleGraph::deleteRole(const RoleName& role) {
if (!roleExists(role)) {
return Status(ErrorCodes::RoleNotFound,
str::stream() << "Role: " << role.getFullName() << " does not exist");
}
if (isBuiltinRole(role)) {
return Status(ErrorCodes::InvalidRoleModification,
... | 0 | [
"CWE-863"
] | mongo | 521e56b407ac72bc69a97a24d1253f51a5b6e81b | 89,247,982,789,549,520,000,000,000,000,000,000,000 | 30 | SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON |
GF_VVCConfig *gf_isom_vvc_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex)
{
GF_TrackBox *trak;
GF_MPEGVisualSampleEntryBox *entry;
/*todo, add support for subpic track and nvcl tracks*/
trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak || !trak->Media || !DescriptionIndex... | 0 | [
"CWE-401"
] | gpac | 0a85029d694f992f3631e2f249e4999daee15cbf | 247,782,835,209,298,640,000,000,000,000,000,000,000 | 14 | fixed #1785 (fuzz) |
_Pickler_write_bytes(PicklerObject *self,
const char *header, Py_ssize_t header_size,
const char *data, Py_ssize_t data_size,
PyObject *payload)
{
int bypass_buffer = (data_size >= FRAME_SIZE_TARGET);
int framing = self->framing;
if (bypass_buf... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 254,572,905,891,128,600,000,000,000,000,000,000,000 | 64 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
Status InferenceContext::Divide(DimensionHandle dividend,
DimensionOrConstant divisor,
bool evenly_divisible, DimensionHandle* out) {
const int64_t divisor_value = Value(divisor);
if (divisor_value == 1) {
*out = dividend;
} else if (!ValueKnown(... | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 63,795,402,377,214,810,000,000,000,000,000,000,000 | 24 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
jp2_type_find (GstTypeFind * tf, gpointer unused)
{
const guint8 *data;
data = gst_type_find_peek (tf, 0, 24);
if (!data)
return;
/* jp2 signature */
if (memcmp (data, "\000\000\000\014jP \015\012\207\012", 12) != 0)
return;
/* check ftyp box */
data += 12;
if (memcmp (data + 4, "ftyp", 4) =... | 0 | [
"CWE-125"
] | gst-plugins-base | 2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095 | 34,009,621,468,388,683,000,000,000,000,000,000,000 | 21 | typefind: bounds check windows ico detection
Fixes out of bounds read
https://bugzilla.gnome.org/show_bug.cgi?id=774902 |
static void Process_ipfix_template_add(exporter_ipfix_domain_t *exporter, void *DataPtr, uint32_t size_left, FlowSource_t *fs) {
input_translation_t *translation_table;
ipfix_template_record_t *ipfix_template_record;
ipfix_template_elements_std_t *NextElement;
int i;
// a template flowset can contain multiple records... | 0 | [
"CWE-190"
] | nfdump | 3b006ededaf351f1723aea6c727c9edd1b1fff9b | 20,239,612,407,750,994,000,000,000,000,000,000,000 | 182 | Fix potential unsigned integer underflow |
static unsigned int tcp_syn_options(struct sock *sk, struct sk_buff *skb,
struct tcp_out_options *opts,
struct tcp_md5sig_key **md5)
{
struct tcp_sock *tp = tcp_sk(sk);
unsigned int remaining = MAX_TCP_OPTION_SPACE;
struct tcp_fastopen_request *fastopen = tp->fastopen_req;
#ifdef CONFIG_TCP_MD5SIG
*md5 = t... | 0 | [
"CWE-416"
] | linux | 7f582b248d0a86bae5788c548d7bb5bca6f7691a | 244,638,186,964,276,900,000,000,000,000,000,000,000 | 66 | tcp: purge write queue in tcp_connect_init()
syzkaller found a reliable way to crash the host, hitting a BUG()
in __tcp_retransmit_skb()
Malicous MSG_FASTOPEN is the root cause. We need to purge write queue
in tcp_connect_init() at the point we init snd_una/write_seq.
This patch also replaces the BUG() by a less int... |
dissect_tcpopt_tfo_payload(tvbuff_t *tvb, int offset, guint optlen,
packet_info *pinfo, proto_tree *exp_tree, void *data)
{
proto_item *ti;
struct tcpheader *tcph = (struct tcpheader*)data;
if (optlen == 2) {
/* Fast Open Cookie Request */
proto_tree_add_item(exp_tree, hf_tcp_option_fas... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 76,680,139,000,801,700,000,000,000,000,000,000,000 | 23 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
scan_env_add_mem_entry(ScanEnv* env)
{
int i, need, alloc;
Node** p;
need = env->num_mem + 1;
if (need > ONIG_MAX_CAPTURE_GROUP_NUM)
return ONIGERR_TOO_MANY_CAPTURE_GROUPS;
if (need >= SCANENV_MEMNODES_SIZE) {
if (env->mem_alloc <= need) {
if (IS_NULL(env->mem_nodes_dynamic)) {
alloc = INIT_SC... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 336,409,748,659,400,200,000,000,000,000,000,000,000 | 34 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
tparam_internal(int use_TPARM_ARG, const char *string, va_list ap)
{
char *p_is_s[NUM_PARM];
TPARM_ARG param[NUM_PARM];
int popcount = 0;
int number;
int num_args;
int len;
int level;
int x, y;
int i;
const char *cp = string;
size_t len2;
bool termcap_hack;
bool incre... | 1 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 158,149,538,740,105,940,000,000,000,000,000,000,000 | 363 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
static inline void register_as_ext2(void) { } | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 281,642,800,010,255,220,000,000,000,000,000,000,000 | 1 | 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 int aspeed_lpc_ctrl_remove(struct platform_device *pdev)
{
struct aspeed_lpc_ctrl *lpc_ctrl = dev_get_drvdata(&pdev->dev);
misc_deregister(&lpc_ctrl->miscdev);
clk_disable_unprepare(lpc_ctrl->clk);
return 0;
} | 0 | [] | linux | b49a0e69a7b1a68c8d3f64097d06dabb770fec96 | 135,319,796,797,213,500,000,000,000,000,000,000,000 | 9 | soc: aspeed: lpc-ctrl: Fix boundary check for mmap
The check mixes pages (vm_pgoff) with bytes (vm_start, vm_end) on one
side of the comparison, and uses resource address (rather than just the
resource size) on the other side of the comparison.
This can allow malicious userspace to easily bypass the boundary check and... |
void Item_sum_count::update_field()
{
longlong nr;
uchar *res=result_field->ptr;
nr=sint8korr(res);
if (!args[0]->maybe_null || !args[0]->is_null())
nr++;
int8store(res,nr);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 324,115,974,237,885,840,000,000,000,000,000,000,000 | 10 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
sc_pkcs15emu_oberthur_add_pubkey(struct sc_pkcs15_card *p15card,
unsigned int file_id, unsigned int size)
{
struct sc_context *ctx = p15card->card->ctx;
struct sc_pkcs15_pubkey_info key_info;
struct sc_pkcs15_object key_obj;
char ch_tmp[0x100];
unsigned char *info_blob = NULL;
size_t len, info_len, offs;
unsig... | 1 | [] | OpenSC | 05648b0604bf3e498e8d42dff3c6e7c56a5bf749 | 287,495,759,161,780,300,000,000,000,000,000,000,000 | 75 | oberthur: fixed Heap-buffer-overflow
fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32149 |
rs_filter_graph(RSFilter *filter)
{
g_return_if_fail(RS_IS_FILTER(filter));
gchar *dot_filename;
gchar *png_filename;
gchar *command_line;
GString *str = g_string_new("digraph G {\n");
rs_filter_graph_helper(str, filter);
g_string_append_printf(str, "}\n");
/* Here we would like to use g_mkdtemp(), but due t... | 0 | [
"CWE-59"
] | rawstudio | 9c2cd3c93c05d009a91d84eedbb85873b0cb505d | 243,014,607,730,996,220,000,000,000,000,000,000,000 | 32 | Fixes insecure use of temporary file (CVE-2014-4978). |
pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
#ifdef CONFIG_HUGETLB_SUPER_PAGES
pte_t *pte;
#endif
/* Get the top-level page table entry. */
pgd = (pgd_t *)get_pte((pte_t *)mm->pgd, pgd_index(addr), 0);
/* We don't have four levels. */
pud = pud_offset(... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 313,939,018,810,949,500,000,000,000,000,000,000,000 | 48 | 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 ... |
ews_backend_update_enabled (ESource *data_source,
ESource *collection_source)
{
ESourceCollection *collection_extension = NULL;
gboolean part_enabled = TRUE;
g_return_if_fail (E_IS_SOURCE (data_source));
if (!collection_source || !e_source_get_enabled (collection_source)) {
e_source_set_enabled (data_sou... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 121,696,974,328,966,520,000,000,000,000,000,000,000 | 30 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
int lz4_decompress(const unsigned char *src, size_t *src_len,
unsigned char *dest, size_t actual_dest_len)
{
int ret = -1;
int input_len = 0;
input_len = lz4_uncompress(src, dest, actual_dest_len);
if (input_len < 0)
goto exit_0;
*src_len = input_len;
return 0;
exit_0:
return ret;
} | 0 | [
"CWE-20"
] | linux | 206204a1162b995e2185275167b22468c00d6b36 | 49,344,210,512,235,670,000,000,000,000,000,000,000 | 15 | lz4: ensure length does not wrap
Given some pathologically compressed data, lz4 could possibly decide to
wrap a few internal variables, causing unknown things to happen. Catch
this before the wrapping happens and abort the decompression.
Reported-by: "Don A. Bailey" <donb@securitymouse.com>
Cc: stable <stable@vger.k... |
VariableWatcher() {} | 0 | [
"CWE-476",
"CWE-908"
] | tensorflow | 237822b59fc504dda2c564787f5d3ad9c4aa62d9 | 12,213,912,191,999,705,000,000,000,000,000,000,000 | 1 | Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types.
When iterating through the tensor to extract shape values, an underlying missing kernel
(`StridedSlice` for quantized types) causes an error, which then results in a `nullptr`
being passed to `ParseDimensionValue()`, causing a segfault.
The... |
static void flush_tx_queue(struct tty_struct *tty)
{
struct n_hdlc *n_hdlc = tty2n_hdlc(tty);
struct n_hdlc_buf *buf;
while ((buf = n_hdlc_buf_get(&n_hdlc->tx_buf_list)))
n_hdlc_buf_put(&n_hdlc->tx_free_buf_list, buf);
} | 0 | [
"CWE-362"
] | tty | 82f2341c94d270421f383641b7cd670e474db56b | 185,813,068,029,175,400,000,000,000,000,000,000,000 | 8 | tty: n_hdlc: get rid of racy n_hdlc.tbuf
Currently N_HDLC line discipline uses a self-made singly linked list for
data buffers and has n_hdlc.tbuf pointer for buffer retransmitting after
an error.
The commit be10eb7589337e5defbe214dae038a53dd21add8
("tty: n_hdlc add buffer flushing") introduced racy access to n_hdlc.... |
vhost_shadow_dequeue_single_packed_inorder(struct vhost_virtqueue *vq,
uint16_t buf_id,
uint16_t count)
{
uint16_t flags;
vq->shadow_used_packed[0].id = buf_id;
flags = vq->desc_packed[vq->last_used_idx].flags;
if (vq->used_wrap_counter) {
flags |= VRING_DESC_F_USED;
flags |= VRING_DESC_F_AVAI... | 0 | [
"CWE-665"
] | dpdk | 97ecc1c85c95c13bc66a87435758e93406c35c48 | 203,892,632,893,831,000,000,000,000,000,000,000,000 | 26 | vhost: fix translated address not checked
Malicious guest can construct desc with invalid address and zero buffer
length. That will request vhost to check both translated address and
translated data length. This patch will add missed address check.
CVE-2020-10725
Fixes: 75ed51697820 ("vhost: add packed ring batch deq... |
static void h2_session_ev_ngh2_done(h2_session *session, int arg, const char *msg)
{
switch (session->state) {
case H2_SESSION_ST_DONE:
/* nop */
break;
default:
transit(session, "nghttp2 done", H2_SESSION_ST_DONE);
break;
}
} | 0 | [] | mod_h2 | 5e75e5685dd043fe93a5a08a15edd087a43f6968 | 90,415,463,141,144,280,000,000,000,000,000,000,000 | 11 | v1.11.0
--------------------------------------------------------------------------------
* connection IO event handling reworked. Instead of reacting on incoming bytes, the
state machine now acts on incoming frames that are affecting it. This reduces
state transitions.
* pytest suite now covers some basic tests... |
g_file_load_partial_contents_finish (GFile *file,
GAsyncResult *res,
char **contents,
gsize *length,
char **etag_out,
... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 254,406,719,442,248,130,000,000,000,000,000,000,000 | 43 | 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 void xen_blkbk_unmap_and_respond(struct pending_req *req)
{
struct gntab_unmap_queue_data* work = &req->gnttab_unmap_data;
struct xen_blkif_ring *ring = req->ring;
struct grant_page **pages = req->segments;
unsigned int invcount;
invcount = xen_blkbk_unmap_prepare(ring, pages, req->nr_segs,
req->un... | 0 | [
"CWE-200"
] | linux | 089bc0143f489bd3a4578bdff5f4ca68fb26f341 | 76,481,562,708,355,560,000,000,000,000,000,000,000 | 19 | xen-blkback: don't leak stack data via response ring
Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).
Thi... |
static void vmx_sync_pir_to_irr_dummy(struct kvm_vcpu *vcpu)
{
return;
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 328,220,811,193,301,240,000,000,000,000,000,000,000 | 4 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
int qemu_chr_fe_get_msgfds(CharBackend *be, int *fds, int len)
{
CharDriverState *s = be->chr;
if (!s) {
return -1;
}
return s->get_msgfds ? s->get_msgfds(s, fds, len) : -1;
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 44,654,961,163,235,390,000,000,000,000,000,000,000 | 10 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
static void cmd_parse_exists(struct ImapAccountData *adata, const char *pn)
{
unsigned int count = 0;
mutt_debug(LL_DEBUG2, "Handling EXISTS\n");
if (mutt_str_atoui(pn, &count) < 0)
{
mutt_debug(LL_DEBUG1, "Malformed EXISTS: '%s'\n", pn);
return;
}
struct ImapMboxData *mdata = adata->mailbox->mdat... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 263,687,925,804,806,900,000,000,000,000,000,000,000 | 31 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
MONGO_EXPORT int bson_append_symbol_n( bson *b, const char *name, const char *value, size_t len ) {
return bson_append_string_base( b, name, value, len, BSON_SYMBOL );
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 215,699,488,098,415,060,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
ecc_mul_m (const struct ecc_modulo *m,
mp_limb_t a24,
unsigned bit_low, unsigned bit_high,
mp_limb_t *qx, const uint8_t *n, const mp_limb_t *px,
mp_limb_t *scratch)
{
unsigned i;
mp_limb_t swap;
#define x2 (scratch)
#define z2 (scratch + m->size)
#define x3 (scratch + 2*m->size)
#define z3 (scratch... | 0 | [
"CWE-787"
] | nettle | a63893791280d441c713293491da97c79c0950fe | 197,359,986,988,509,740,000,000,000,000,000,000,000 | 123 | New functions ecc_mod_mul_canonical and ecc_mod_sqr_canonical.
* ecc-mod-arith.c (ecc_mod_mul_canonical, ecc_mod_sqr_canonical):
New functions.
* ecc-internal.h: Declare and document new functions.
* curve448-eh-to-x.c (curve448_eh_to_x): Use ecc_mod_sqr_canonical.
* curve25519-eh-to-x.c (curve25519_eh_to_x): Use ecc_... |
ldns_rr_type2str(const ldns_rr_type type)
{
char *str;
ldns_buffer *buf;
buf = ldns_buffer_new(10);
if (!buf) {
return NULL;
}
str = NULL;
if (ldns_rr_type2buffer_str(buf, type) == LDNS_STATUS_OK) {
str = ldns_buffer_export2str(buf);
}
ldns_buffer_free(buf);
return str;
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 113,947,972,685,518,480,000,000,000,000,000,000,000 | 18 | CAA and URI |
static int snd_pcm_action_nonatomic(const struct action_ops *ops,
struct snd_pcm_substream *substream,
snd_pcm_state_t state)
{
int res;
/* Guarantee the group members won't change during non-atomic action */
down_read(&snd_pcm_link_rwsem);
if (snd_pcm_stream_linked(substream))
res = snd_pcm_acti... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 224,881,106,178,307,530,000,000,000,000,000,000,000 | 15 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
static void sctp_enter_memory_pressure(struct sock *sk)
{
sctp_memory_pressure = 1;
} | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 212,287,886,455,623,600,000,000,000,000,000,000,000 | 4 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
static int ext4_xattr_ibody_set(handle_t *handle, struct inode *inode,
struct ext4_xattr_info *i,
struct ext4_xattr_ibody_find *is)
{
struct ext4_xattr_ibody_header *header;
struct ext4_xattr_search *s = &is->s;
int error;
if (EXT4_I(inode)->i_extra_isize == 0)
return -ENOSPC;
error = ext4_xattr_set_ent... | 0 | [
"CWE-241",
"CWE-19"
] | linux | 82939d7999dfc1f1998c4b1c12e2f19edbdff272 | 179,551,509,015,108,970,000,000,000,000,000,000,000 | 23 | ext4: convert to mbcache2
The conversion is generally straightforward. The only 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 still valid after getting buffer lock.
Signed-off-by: Jan Kara <jack@sus... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.