func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ZEND_FASTCALL ZEND_FETCH_OBJ_RW_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zval **container = _get_zval_ptr_ptr_cv(&opline->op1, EX(Ts), BP_VAR_RW TSRMLS_CC)...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
155,338,722,407,056,550,000,000,000,000,000,000,000
30
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
inline static void _set_priority(priority_st * st, const int *list) { int num = 0, i; while (list[num] != 0) num++; if (num > MAX_ALGOS) num = MAX_ALGOS; st->algorithms = num; for (i = 0; i < num; i++) { st->priority[i] = list[i]; } return; }
0
[ "CWE-310" ]
gnutls
21f89efad7014a5ee0debd4cd3d59e27774b29e6
104,832,585,941,476,090,000,000,000,000,000,000,000
16
handshake: add FALLBACK_SCSV priority option This allows clients to enable the TLS_FALLBACK_SCSV mechanism during the handshake, as defined in RFC7507.
int ff_side_data_update_matrix_encoding(AVFrame *frame, enum AVMatrixEncoding matrix_encoding) { AVFrameSideData *side_data; enum AVMatrixEncoding *data; side_data = av_frame_get_side_data(frame, AV_FRAME_DATA_MATRIXENCODING); if (!side_data) side_data = ...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
97,814,553,009,169,970,000,000,000,000,000,000,000
19
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
int imap_fast_trash(struct Context *ctx, char *dest) { char mbox[LONG_STRING]; char mmbox[LONG_STRING]; char prompt[LONG_STRING]; int rc; struct ImapMbox mx; bool triedcreate = false; struct Buffer *sync_cmd = NULL; int err_continue = MUTT_NO; struct ImapData *idata = ctx->data; if (imap_parse_pat...
0
[ "CWE-78", "CWE-77" ]
neomutt
95e80bf9ff10f68cb6443f760b85df4117cb15eb
208,102,472,246,240,420,000,000,000,000,000,000,000
106
Quote path in imap_subscribe
ExecRuntime *unit_get_exec_runtime(Unit *u) { size_t offset; if (u->type < 0) return NULL; offset = UNIT_VTABLE(u)->exec_runtime_offset; if (offset <= 0) return NULL; return *(ExecRuntime**) ((uint8_t*) u + offset); }
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
35,527,336,205,894,680,000,000,000,000,000,000,000
12
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
AlterObjectNamespace_oid(Oid classId, Oid objid, Oid nspOid, ObjectAddresses *objsMoved) { Oid oldNspOid = InvalidOid; ObjectAddress dep; dep.classId = classId; dep.objectId = objid; dep.objectSubId = 0; switch (getObjectClass(&dep)) { case OCLASS_CLASS: { Relation rel; rel = relation_op...
0
[ "CWE-862" ]
postgres
b048f558dd7c26a0c630a2cff29d3d8981eaf6b9
273,593,337,679,603,000,000,000,000,000,000,000,000
88
Fix priv checks for ALTER <object> DEPENDS ON EXTENSION Marking an object as dependant on an extension did not have any privilege check whatsoever; this allowed any user to mark objects as droppable by anyone able to DROP EXTENSION, which could be used to cause system-wide havoc. Disallow by checking that the calling...
t2p_sizeproc(thandle_t handle) { (void) handle; return -1; }
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
281,615,789,486,612,850,000,000,000,000,000,000,000
5
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
static void GTextFieldInit() { FontRequest rq; memset(&rq,0,sizeof(rq)); GGadgetInit(); GDrawDecomposeFont(_ggadget_default_font,&rq); rq.family_name = NULL; rq.utf8_family_name = MONO_UI_FAMILIES; _gtextfield_font = GDrawInstanciateFont(NULL,&rq); _GGadgetCopyDefaultBox(&_GGadget_gtext...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
7,935,713,096,855,530,000,000,000,000,000,000,000
27
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static int file_close(jas_stream_obj_t *obj) { jas_stream_fileobj_t *fileobj = JAS_CAST(jas_stream_fileobj_t *, obj); int ret; ret = close(fileobj->fd); if (fileobj->flags & JAS_STREAM_FILEOBJ_DELONCLOSE) { unlink(fileobj->pathname); } jas_free(fileobj); return ret; }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
248,434,265,937,089,800,000,000,000,000,000,000,000
11
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 pop_stack(struct bpf_verifier_env *env, int *prev_insn_idx) { struct bpf_verifier_stack_elem *elem; int insn_idx; if (env->head == NULL) return -1; memcpy(&env->cur_state, &env->head->st, sizeof(env->cur_state)); insn_idx = env->head->insn_idx; if (prev_insn_idx) *prev_insn_idx = env->head->prev_...
0
[ "CWE-200" ]
linux
0d0e57697f162da4aa218b5feafe614fb666db07
286,245,177,078,094,100,000,000,000,000,000,000,000
18
bpf: don't let ldimm64 leak map addresses on unprivileged The patch fixes two things at once: 1) It checks the env->allow_ptr_leaks and only prints the map address to the log if we have the privileges to do so, otherwise it just dumps 0 as we would when kptr_restrict is enabled on %pK. Given the latter is of...
static int TS_check_policy(ASN1_OBJECT *req_oid, TS_TST_INFO *tst_info) { ASN1_OBJECT *resp_oid = TS_TST_INFO_get_policy_id(tst_info); if (OBJ_cmp(req_oid, resp_oid) != 0) { TSerr(TS_F_TS_CHECK_POLICY, TS_R_POLICY_MISMATCH); return 0; } return 1; }
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
217,919,661,057,956,200,000,000,000,000,000,000,000
12
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
cgiSetSize(const char *name, /* I - Name of variable */ int size) /* I - Number of elements (0 to N) */ { int i; /* Looping var */ _cgi_var_t *var; /* Returned variable */ if (name == NULL || size < 0 || size > 100000) return; if ((var = cgi_find_variable(name)) == NULL) retu...
0
[]
cups
b9ff93ce913ff633a3f667317e5a81fa7fe0d5d3
338,563,325,748,653,940,000,000,000,000,000,000,000
40
CVE-2018-4700: Linux session cookies used a predictable random number seed.
struct kvm_memory_slot *kvm_vcpu_gfn_to_memslot(struct kvm_vcpu *vcpu, gfn_t gfn) { struct kvm_memslots *slots = kvm_vcpu_memslots(vcpu); u64 gen = slots->generation; struct kvm_memory_slot *slot; /* * This also protects against using a memslot from a different address space, * since different address spaces ...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
114,559,505,459,033,920,000,000,000,000,000,000,000
32
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...
w3m_exit(int i) { #ifdef USE_MIGEMO init_migemo(); /* close pipe to migemo */ #endif stopDownload(); deleteFiles(); #ifdef USE_SSL free_ssl_ctx(); #endif disconnectFTP(); #ifdef USE_NNTP disconnectNews(); #endif #ifdef __MINGW32_VERSION WSACleanup(); #endif #ifdef HAVE_MKDTEMP if (no_rc...
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
247,135,278,041,220,600,000,000,000,000,000,000,000
26
Make temporary directory safely when ~/.w3m is unwritable
static ssize_t ucma_create_id(struct ucma_file *file, const char __user *inbuf, int in_len, int out_len) { struct rdma_ucm_create_id cmd; struct rdma_ucm_create_id_resp resp; struct ucma_context *ctx; enum ib_qp_type qp_type; int ret; if (out_len < sizeof(resp)) return -ENOSPC; if (copy_from_user(&c...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
205,677,568,497,960,550,000,000,000,000,000,000,000
50
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
xdr_gpols_ret(XDR *xdrs, gpols_ret *objp) { if (!xdr_ui_4(xdrs, &objp->api_version)) { return (FALSE); } if (!xdr_kadm5_ret_t(xdrs, &objp->code)) { return (FALSE); } if (objp->code == KADM5_OK) { if (!xdr_int(xdrs, &objp->count)) { return (FALSE); } if (!xdr_array(xdrs, (...
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
297,112,340,943,592,950,000,000,000,000,000,000,000
21
Fix kadm5/gssrpc XDR double free [CVE-2014-9421] [MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free partial deserialization results upon failure to deserialize. This responsibility belongs to the callers, svctcp_getargs() and svcudp_getargs(); doing it in the unwrap function results in freeing the result...
cmsStage* ReadCLUT(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number Offset, int InputChannels, int OutputChannels) { cmsUInt8Number gridPoints8[cmsMAXCHANNELS]; // Number of grid points in each dimension. cmsUInt32Number GridPoints[cmsMAXCHANNELS], i; cmsUInt8Number Precision; c...
0
[ "CWE-125" ]
Little-CMS
5ca71a7bc18b6897ab21d815d15e218e204581e2
272,827,695,283,645,800,000,000,000,000,000,000,000
57
Added an extra check to MLU bounds Thanks to Ibrahim el-sayed for spotting the bug
dtls1_process_heartbeat(SSL *s) { unsigned char *p = &s->s3->rrec.data[0], *pl; unsigned short hbtype; unsigned int payload; unsigned int padding = 16; /* Use minimum padding */ if (s->msg_callback) s->msg_callback(0, s->version, TLS1_RT_HEARTBEAT, &s->s3->rrec.data[0], s->s3->rrec.length, s, s->msg_call...
0
[]
openssl
96db9023b881d7cd9f379b0c154650d6c108e9a3
76,451,328,488,845,400,000,000,000,000,000,000,000
78
Add heartbeat extension bounds check. A missing bounds check in the handling of the TLS heartbeat extension can be used to reveal up to 64k of memory to a connected client or server. Thanks for Neel Mehta of Google Security for discovering this bug and to Adam Langley <agl@chromium.org> and Bodo Moeller <bmoeller@acm...
xmlMemShow(FILE *fp, int nr ATTRIBUTE_UNUSED) { #ifdef MEM_LIST MEMHDR *p; #endif if (fp != NULL) fprintf(fp," MEMORY ALLOCATED : %lu, MAX was %lu\n", debugMemSize, debugMaxMemSize); #ifdef MEM_LIST xmlMutexLock(xmlMemMutex); if (nr > 0) { fprintf(fp,"NUMBER SIZE TYPE WHERE\n"); p = meml...
0
[ "CWE-787" ]
libxml2
897dffbae322b46b83f99a607d527058a72c51ed
45,254,445,319,648,600,000,000,000,000,000,000,000
37
Check for integer overflow in memory debug code Fixes bug 783026. Thanks to Pranjal Jumde for the report.
static PHP_FUNCTION(session_set_save_handler) { zval ***args = NULL; int i, num_args, argc = ZEND_NUM_ARGS(); char *name; if (PS(session_status) != php_session_none) { RETURN_FALSE; } if (argc != 1 && argc != 2 && argc != 6) { WRONG_PARAM_COUNT; } if (argc <= 2) { zval *obj = NULL, *callback = NULL; ...
0
[]
php-src
df4bf28f9f104ca3ef78ed94b497859f15b004e5
30,985,409,824,692,597,000,000,000,000,000,000,000
114
Fix bug #70219 (Use after free vulnerability in session deserializer)
static bool valid_smtp_code(char *buf, size_t buflen, int *n) { char code[4]; if (buflen < 4) return false; code[0] = buf[0]; code[1] = buf[1]; code[2] = buf[2]; code[3] = '\0'; if (mutt_str_atoi(code, n) < 0) return false; return true; }
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
207,112,861,546,169,800,000,000,000,000,000,000,000
14
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>
cdk_pk_to_fingerprint(cdk_pubkey_t pk, byte * fprbuf, size_t fprbuflen, size_t * r_nout) { size_t key_fprlen; cdk_error_t err; if (!pk) return CDK_Inv_Value; if (pk->version < 4) key_fprlen = 16; else key_fprlen = 20; /* Only return the required buffer size for the fingerprint. */ if (!fprbuf &&...
0
[ "CWE-119" ]
gnutls
5140422e0d7319a8e2fe07f02cbcafc4d6538732
339,308,311,876,024,700,000,000,000,000,000,000,000
29
opencdk: cdk_pk_get_keyid: fix stack overflow Issue found using oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=340 Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
int on_header_callback2(nghttp2_session *session, const nghttp2_frame *frame, nghttp2_rcbuf *name, nghttp2_rcbuf *value, uint8_t flags, void *user_data) { auto hd = static_cast<Http2Handler *>(user_data); auto namebuf = nghttp2_rcbuf_get_buf(name); auto valuebuf = ...
0
[]
nghttp2
95efb3e19d174354ca50c65d5d7227d92bcd60e1
242,651,159,111,661,400,000,000,000,000,000,000,000
73
Don't read too greedily
MagickPrivate int XCheckDefineCursor(Display *display,Window window, Cursor cursor) { (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); assert(display != (Display *) NULL); if (window == XRootWindow(display,XDefaultScreen(display))) return(0); return(XDefineCursor(display,window,cursor)); }
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
48,489,802,761,512,155,000,000,000,000,000,000,000
9
https://github.com/ImageMagick/ImageMagick/issues/1531
static void brcmf_deinit_priv_mem(struct brcmf_cfg80211_info *cfg) { kfree(cfg->conf); cfg->conf = NULL; kfree(cfg->extra_buf); cfg->extra_buf = NULL; kfree(cfg->wowl.nd); cfg->wowl.nd = NULL; kfree(cfg->wowl.nd_info); cfg->wowl.nd_info = NULL; kfree(cfg->escan_info.escan_buf); cfg->escan_info.escan_buf = NUL...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
156,591,215,361,512,690,000,000,000,000,000,000,000
13
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
struct nfs_server *nfs4_create_referral_server(struct fs_context *fc) { struct nfs_fs_context *ctx = nfs_fc2context(fc); struct nfs_client *parent_client; struct nfs_server *server, *parent_server; bool auth_probe; int error; server = nfs_alloc_server(); if (!server) return ERR_PTR(-ENOMEM); parent_server =...
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
220,975,585,161,177,720,000,000,000,000,000,000,000
71
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
static char *TranslateEvent(const char *module,const char *function, const size_t line,const char *domain,const char *event) { char *text; double elapsed_time, user_time; ExceptionInfo *exception; LogInfo *log_info; register char *q; register const char *p; size_t e...
0
[ "CWE-476" ]
ImageMagick
107ce8577e818cf4801e5a59641cb769d645cc95
159,992,352,984,492,450,000,000,000,000,000,000,000
221
https://github.com/ImageMagick/ImageMagick/issues/1224
void decode(bufferlist::iterator& bl) { __u8 struct_v; ::decode(struct_v, bl); ::decode(secret_id, bl); ::decode(blob, bl); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
11,970,075,804,419,067,000,000,000,000,000,000,000
6
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
void Compute(OpKernelContext* const context) override { // node_id_range const Tensor* node_id_range_t; OP_REQUIRES_OK(context, context->input("node_id_range", &node_id_range_t)); OP_REQUIRES( context, node_id_range_t->NumElements() == 2, errors::InvalidArgument("node_id_range argument...
1
[ "CWE-476", "CWE-369" ]
tensorflow
5c8c9a8bfe750f9743d0c859bae112060b216f5c
7,202,424,637,991,012,000,000,000,000,000,000,000
188
Fixing security fixes in boosted trees ops PiperOrigin-RevId: 405669548 Change-Id: Iae224d240d1779bcc02405c2fff99785644fbd0d
TEST(BoolTest, FormatBool) { EXPECT_EQ("true", format("{}", true)); EXPECT_EQ("false", format("{}", false)); EXPECT_EQ("1", format("{:d}", true)); EXPECT_EQ("true ", format("{:5}", true)); EXPECT_EQ(L"true", format(L"{}", true)); }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
38,423,163,649,420,490,000,000,000,000,000,000,000
7
Fix segfault on complex pointer formatting (#642)
static void nfs4_destroy_server(struct nfs_server *server) { LIST_HEAD(freeme); nfs_server_return_all_delegations(server); unset_pnfs_layoutdriver(server); nfs4_purge_state_owners(server, &freeme); nfs4_free_state_owners(&freeme); }
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
308,258,045,588,436,040,000,000,000,000,000,000,000
9
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
static int ntop_dump_file(lua_State* vm) { char *fname; FILE *fd; struct mg_connection *conn; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); lua_getglobal(vm, CONST_HTTP_CONN); if((conn = (struct mg_connection*)lua_touserdata(vm, lua_gettop(vm))) == NULL) { ntop->getTrace()->t...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
34,529,004,953,682,386,000,000,000,000,000,000,000
36
Security fix: prevents empty host from being used
static void session_unsub(broker_t *b, pn_session_t *ssn) { pn_connection_t *c = pn_session_connection(ssn); pn_link_t *l; for (l = pn_link_head(c, 0); l != NULL; l = pn_link_next(l, 0)) { if (pn_link_session(l) == ssn) link_unsub(b, l); }
0
[]
qpid-proton
159fac1f90d9b1ace1138d510176e7a5da54e9e9
277,542,837,520,524,200,000,000,000,000,000,000,000
8
PROTON-2014: [c] Fix example broker to warn when it fails to set up ssl - Also make send-ssl tell you the remote peer
write_card32 (FILE *ofp, L_CARD32 c) { putc ((int) ((c >> 24) & 0xff), ofp); putc ((int) ((c >> 16) & 0xff), ofp); putc ((int) ((c >> 8) & 0xff), ofp); putc ((int) ((c) & 0xff), ofp); }
0
[ "CWE-787" ]
gimp
0b35f6a082a0b3c372c568ea6bde39a4796acde2
31,709,675,318,414,318,000,000,000,000,000,000,000
8
Bug 687392 - Memory corruption vulnerability when reading XWD files Applied and enhanced patch from andres which makes file-xwd detect this kind of file corruption and abort loading with an error message.
int sqlite3ExprContainsSubquery(Expr *p){ Walker w; w.eCode = 1; w.xExprCallback = sqlite3ExprWalkNoop; w.xSelectCallback = sqlite3SelectWalkFail; #ifdef SQLITE_DEBUG w.xSelectCallback2 = sqlite3SelectWalkAssert2; #endif sqlite3WalkExpr(&w, p); return w.eCode==0; }
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
184,046,857,421,702,300,000,000,000,000,000,000,000
11
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static int selinux_binder_set_context_mgr(struct task_struct *mgr) { return avc_has_perm(&selinux_state, current_sid(), task_sid_binder(mgr), SECCLASS_BINDER, BINDER__SET_CONTEXT_MGR, NULL); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
62,195,760,426,971,520,000,000,000,000,000,000,000
6
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
void expectNoProtocol() { expectHandshakeSuccess(); EXPECT_EQ(client->nextProtoLength, 0); EXPECT_EQ(server->nextProtoLength, 0); EXPECT_EQ(client->nextProto, nullptr); EXPECT_EQ(server->nextProto, nullptr); }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
4,775,311,824,206,311,000,000,000,000,000,000,000
7
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static bool cmd_ibm_sense_condition(IDEState *s, uint8_t cmd) { switch (s->feature) { case 0x01: /* sense temperature in device */ s->nsector = 0x50; /* +20 C */ break; default: ide_abort_command(s); return true; } return true; }
0
[ "CWE-189" ]
qemu
940973ae0b45c9b6817bab8e4cf4df99a9ef83d7
158,488,838,950,567,770,000,000,000,000,000,000,000
13
ide: Correct improper smart self test counter reset in ide core. The SMART self test counter was incorrectly being reset to zero, not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE: * We would write off the beginning of a dynamically allocated buffer * We forgot the SMART history Fix this. Signed-o...
static void nalm_dump(FILE * trace, char *data, u32 data_size) { GF_BitStream *bs; Bool rle, large_size; u32 entry_count; if (!data) { gf_fprintf(trace, "<NALUMap rle=\"\" large_size=\"\">\n"); gf_fprintf(trace, "<NALUMapEntry NALU_startNumber=\"\" groupID=\"\"/>\n"); gf_fprintf(trace, "</NALUMap>\n"); re...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
270,332,910,197,558,770,000,000,000,000,000,000,000
36
fixed #2138
xmlSchemaAddType(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlSchemaTypeType type, const xmlChar * name, const xmlChar * nsName, xmlNodePtr node, int topLevel) { xmlSchemaTypePtr ret = NULL; if ((ctxt == NULL) || (schema == NULL)) return (NULL); ret = (xmlSchemaTypeP...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
125,168,708,111,798,160,000,000,000,000,000,000,000
36
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
void dw_spi_remove_host(struct dw_spi *dws) { dw_spi_debugfs_remove(dws); if (dws->dma_ops && dws->dma_ops->dma_exit) dws->dma_ops->dma_exit(dws); spi_shutdown_chip(dws); free_irq(dws->irq, dws->master); }
0
[ "CWE-662" ]
linux
19b61392c5a852b4e8a0bf35aecb969983c5932d
212,238,814,548,671,270,000,000,000,000,000,000,000
11
spi: spi-dw: Add lock protect dw_spi rx/tx to prevent concurrent calls dw_spi_irq() and dw_spi_transfer_one concurrent calls. I find a panic in dw_writer(): txw = *(u8 *)(dws->tx), when dw->tx==null, dw->len==4, and dw->tx_end==1. When tpm driver's message overtime dw_spi_irq() and dw_spi_transfer_one may concurrent...
static int perf_swevent_init(struct perf_event *event) { int event_id = event->attr.config; if (event->attr.type != PERF_TYPE_SOFTWARE) return -ENOENT; /* * no branch sampling for software events */ if (has_branch_stack(event)) return -EOPNOTSUPP; switch (event_id) { case PERF_COUNT_SW_CPU_CLOCK: case...
1
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
210,222,523,471,394,240,000,000,000,000,000,000,000
38
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
void setattr_copy(struct inode *inode, const struct iattr *attr) { unsigned int ia_valid = attr->ia_valid; if (ia_valid & ATTR_UID) inode->i_uid = attr->ia_uid; if (ia_valid & ATTR_GID) inode->i_gid = attr->ia_gid; if (ia_valid & ATTR_ATIME) inode->i_atime = timespec_trunc(attr->ia_atime, inode->i_sb->...
0
[ "CWE-284", "CWE-264" ]
linux
23adbe12ef7d3d4195e80800ab36b37bee28cd03
3,535,170,711,390,075,000,000,000,000,000,000,000
26
fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IMMUTABLE) would be nonsense. This patch changes inode_capable to check for uid and gid mappings and rena...
int multi_update::do_updates() { TABLE_LIST *cur_table; int local_error= 0; ha_rows org_updated; TABLE *table, *tmp_table, *err_table; List_iterator_fast<TABLE> check_opt_it(unupdated_check_opt_tables); DBUG_ENTER("multi_update::do_updates"); do_update= 0; // Don't retry this function if (!found) ...
0
[ "CWE-617" ]
server
ecb6f9c894d3ebafeff1c6eb3b65cd248062296f
48,668,189,709,956,170,000,000,000,000,000,000,000
266
MDEV-28095 crash in multi-update and implicit grouping disallow implicit grouping in multi-update. explicit GROUP BY is not allowed by the grammar.
static void oz_plat_shutdown(struct platform_device *dev) { }
0
[ "CWE-703", "CWE-189" ]
linux
b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c
63,592,330,609,522,140,000,000,000,000,000,000,000
3
ozwpan: Use unsigned ints to prevent heap overflow Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentiall...
static int ZEND_FASTCALL zend_fetch_var_address_helper_SPEC_CONST(int type, ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *varname = &opline->op1.u.constant; zval **retval; zval tmp_varname; HashTable *target_symbol_table; if (IS_CONST != IS_CONST && Z_TYPE_P(varname) !=...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
293,516,145,490,800,830,000,000,000,000,000,000,000
101
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
file_list_cancel (NautilusDirectory *directory) { directory_load_cancel (directory); if (directory->details->dequeue_pending_idle_id != 0) { g_source_remove (directory->details->dequeue_pending_idle_id); directory->details->dequeue_pending_idle_id = 0; } if (directory->details->pending_file_info != NULL) { ...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
93,162,714,150,591,850,000,000,000,000,000,000,000
18
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
StreamInfoImpl( Http::Protocol protocol, TimeSource& time_source, const Network::ConnectionInfoProviderSharedPtr& downstream_connection_info_provider, FilterStateSharedPtr parent_filter_state, FilterState::LifeSpan life_span) : StreamInfoImpl( protocol, time_source, downstream_conn...
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
294,117,978,201,771,100,000,000,000,000,000,000,000
9
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
copy_msg(struct regional* region, struct lruhash_entry* e, struct query_info** k, struct reply_info** d) { struct reply_info* rep = (struct reply_info*)e->data; if(rep->rrset_count > RR_COUNT_MAX) return 0; /* to protect against integer overflow */ *d = (struct reply_info*)regional_alloc_init(region, e->data, ...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
142,674,918,584,038,600,000,000,000,000,000,000,000
23
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
ieee80211_sched_scan_start(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_sched_scan_request *req) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); if (!sdata->local->ops->sched_scan_start) return -EOPNOTSUPP; return ieee80211_request_sched_scan_start(sdata, req); }
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
273,770,752,746,339,280,000,000,000,000,000,000,000
11
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
Status KernelAndDeviceOp::Init(const Context& ctx, const NodeDef& ndef, GraphCollector* graph_collector) { OpKernel* k = nullptr; if (flr_ == nullptr) { return errors::Internal( "A valid FunctionLibraryRuntime must be provided when running ops " "based on OpKernel....
0
[ "CWE-476", "CWE-369" ]
tensorflow
da8558533d925694483d2c136a9220d6d49d843c
129,103,471,789,584,780,000,000,000,000,000,000,000
31
Fix undefined behavior in `tf.raw_ops.Switch` in eager mode. PiperOrigin-RevId: 332578058 Change-Id: I9727571d2f21476b10d8aa27c1b7176564b76ac9
void HeaderMapImpl::HeaderEntryImpl::value(const HeaderEntry& header) { value(header.value().getStringView()); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
85,936,018,631,232,030,000,000,000,000,000,000,000
3
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static bool mtrr_is_enabled(struct kvm_mtrr *mtrr_state) { return !!(mtrr_state->deftype & IA32_MTRR_DEF_TYPE_E); }
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
161,608,701,687,464,980,000,000,000,000,000,000,000
4
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
inline void process_header() { handler_->handle_header(); }
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
132,797,139,447,303,500,000,000,000,000,000,000,000
4
Prevent HTTP pipelining which Crow doesn't support.
rsvg_parse_style_pair (RsvgHandle * ctx, RsvgState * state, const gchar * name, const gchar * value, gboolean important) { StyleValueData *data; data = g_hash_table_lookup (state->styles, name); if (data && data->im...
1
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
66,552,833,168,416,300,000,000,000,000,000,000,000
388
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
Value ExpressionBsonSize::evaluate(const Document& root, Variables* variables) const { Value arg = _children[0]->evaluate(root, variables); if (arg.nullish()) return Value(BSONNULL); uassert(31393, str::stream() << "$bsonSize requires a document input, found: " ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
75,138,442,077,873,490,000,000,000,000,000,000,000
13
SERVER-49404 Enforce additional checks in $arrayToObject
tsize_t t2p_write_pdf_xobject_palettecs_stream(T2P* t2p, TIFF* output){ tsize_t written=0; written += t2p_write_pdf_stream( (tdata_t) t2p->pdf_palette, (tsize_t) t2p->pdf_palettesize, output); return(written); }
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
178,668,200,132,061,750,000,000,000,000,000,000,000
11
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
pci_emul_add_pciecap(struct pci_vdev *dev, int type) { int err; struct pciecap pciecap; if (type != PCIEM_TYPE_ROOT_PORT) return -1; bzero(&pciecap, sizeof(pciecap)); pciecap.capid = PCIY_EXPRESS; pciecap.pcie_capabilities = PCIECAP_VERSION | PCIEM_TYPE_ROOT_PORT; pciecap.link_capabilities = 0x411; /* gen1,...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
307,105,363,114,329,800,000,000,000,000,000,000,000
18
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
static size_t snd_compr_calc_avail(struct snd_compr_stream *stream, struct snd_compr_avail *avail) { memset(avail, 0, sizeof(*avail)); snd_compr_update_tstamp(stream, &avail->tstamp); /* Still need to return avail even if tstamp can't be filled in */ if (stream->runtime->total_bytes_available == 0 && stream->...
0
[ "CWE-703" ]
linux
6217e5ede23285ddfee10d2e4ba0cc2d4c046205
162,429,048,695,875,880,000,000,000,000,000,000,000
35
ALSA: compress: fix an integer overflow check I previously added an integer overflow check here but looking at it now, it's still buggy. The bug happens in snd_compr_allocate_buffer(). We multiply ".fragments" and ".fragment_size" and that doesn't overflow but then we save it in an unsigned int so it truncates the h...
dns_zone_flush(dns_zone_t *zone) { isc_result_t result = ISC_R_SUCCESS; bool dumping; REQUIRE(DNS_ZONE_VALID(zone)); LOCK_ZONE(zone); DNS_ZONE_SETFLAG(zone, DNS_ZONEFLG_FLUSH); if (DNS_ZONE_FLAG(zone, DNS_ZONEFLG_NEEDDUMP) && zone->masterfile != NULL) { result = ISC_R_ALREADYRUNNING; dumping = was_dump...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
173,745,244,903,399,580,000,000,000,000,000,000,000
19
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static int nfs4_verify_channel_attrs(struct nfs41_create_session_args *args, struct nfs41_create_session_res *res) { int ret; ret = nfs4_verify_fore_channel_attrs(args, res); if (ret) return ret; return nfs4_verify_back_channel_attrs(args, res); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
266,510,953,336,912,230,000,000,000,000,000,000,000
10
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static inline void posix_cpu_timers_init(struct task_struct *tsk) { }
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
131,907,813,316,772,970,000,000,000,000,000,000,000
1
fork: fix incorrect fput of ->exe_file causing use-after-free 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 erro...
static struct cmd_rcvr *find_cmd_rcvr(struct ipmi_smi *intf, unsigned char netfn, unsigned char cmd, unsigned char chan) { struct cmd_rcvr *rcvr; list_for_each_entry_rcu(rcvr, &intf->cmd_rcvrs, link) { if ((rcvr->netfn == netfn) && (rcvr->cmd == cmd) && (rcvr->chans & (1 << chan)...
0
[ "CWE-416", "CWE-284" ]
linux
77f8269606bf95fcb232ee86f6da80886f1dfae8
6,602,710,983,622,352,000,000,000,000,000,000,000
14
ipmi: fix use-after-free of user->release_barrier.rda When we do the following test, we got oops in ipmi_msghandler driver while((1)) do service ipmievd restart & service ipmievd restart done --------------------------------------------------------------- [ 294.230186] Unable to handle kernel paging request at virt...
int test_div(BIO *bp, BN_CTX *ctx) { BIGNUM a,b,c,d,e; int i; BN_init(&a); BN_init(&b); BN_init(&c); BN_init(&d); BN_init(&e); for (i=0; i<num0+num1; i++) { if (i < num1) { BN_bntest_rand(&a,400,0,0); BN_copy(&b,&a); BN_lshift(&a,&a,i); BN_add_word(&a,i); } else BN_bntest_rand(&b,5...
0
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
129,067,452,262,468,770,000,000,000,000,000,000,000
63
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
static __be32 fattr_handle_absent_fs(u32 *bmval0, u32 *bmval1, u32 *bmval2, u32 *rdattr_err) { /* As per referral draft: */ if (*bmval0 & ~WORD0_ABSENT_FS_ATTRS || *bmval1 & ~WORD1_ABSENT_FS_ATTRS) { if (*bmval0 & FATTR4_WORD0_RDATTR_ERROR || *bmval0 & FATTR4_WORD0_FS_LOCATIONS) *rdattr_err = ...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
174,559,418,976,563,500,000,000,000,000,000,000,000
16
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
ProcessPtr handleSpawnResponse(const SpawnPreparationInfo &preparation, NegotiationDetails &details) { TRACE_POINT(); SocketListPtr sockets = make_shared<SocketList>(); while (true) { string line; try { line = readMessageLine(details); } catch (const SystemException &e) { throwAppSpawnExc...
0
[]
passenger
8c6693e0818772c345c979840d28312c2edd4ba4
236,240,472,906,062,350,000,000,000,000,000,000,000
98
Security check socket filenames reported by spawned application processes.
static MagickBooleanType EncodeLabImage(Image *image,ExceptionInfo *exception) { CacheView *image_view; MagickBooleanType status; ssize_t y; status=MagickTrue; image_view=AcquireAuthenticCacheView(image,exception); for (y=0; y < (ssize_t) image->rows; y++) { register Quantum *magi...
0
[ "CWE-125" ]
ImageMagick
803bc34ebe023f209f745baf8a112610ff77cc8c
123,988,102,557,264,340,000,000,000,000,000,000,000
51
Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team)
bool CMerkleTx::AcceptToMemoryPool() { CTxDB txdb("r"); return AcceptToMemoryPool(txdb); }
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
200,817,970,836,112,740,000,000,000,000,000,000,000
5
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
set_default_modes (server *serv) { char modes[8]; modes[0] = '+'; modes[1] = '\0'; if (prefs.hex_irc_wallops) strcat (modes, "w"); if (prefs.hex_irc_servernotice) strcat (modes, "s"); if (prefs.hex_irc_invisible) strcat (modes, "i"); if (prefs.hex_irc_hidehost) strcat (modes, "x"); if (modes[1] != '\...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
151,497,800,777,553,950,000,000,000,000,000,000,000
21
Clean up handling CAP LS
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); #if 0 || IS_CON...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
16,752,974,408,008,992,000,000,000,000,000,000,000
78
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
main (void) { TEST_INIT (); const lit_utf8_byte_t *ptrs[test_sub_iters]; ecma_number_t numbers[test_sub_iters]; lit_utf8_byte_t strings[test_sub_iters][max_characters_in_string + 1]; lit_utf8_size_t lengths[test_sub_iters]; jmem_init (); for (uint32_t i = 0; i < test_iters; i++) { memset (numbers...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
18,951,495,909,198,342,000,000,000,000,000,000,000
78
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
kvm_pfn_t gfn_to_pfn_memslot_atomic(struct kvm_memory_slot *slot, gfn_t gfn) { return __gfn_to_pfn_memslot(slot, gfn, true, NULL, true, NULL, NULL); }
0
[ "CWE-119" ]
linux
f8be156be163a052a067306417cd0ff679068c97
143,196,951,646,798,850,000,000,000,000,000,000,000
4
KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the p...
R_API ut64 rbin_java_verification_info_calc_size(RBinJavaVerificationObj *se) { ut64 sz = 1; if (!se) { return 0; } // r_buf_read_at (bin->b, offset, (ut8*)(&se->tag), 1) switch (se->tag) { case R_BIN_JAVA_STACKMAP_OBJECT: // r_buf_read_at (bin->b, offset+1, (ut8*)buf, 2) sz += 2; break; case R_BIN_JAVA_...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
94,104,356,271,232,140,000,000,000,000,000,000,000
18
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs) { struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); unsigned int cur_mss; int diff, len, err; /* Inconclusive MTU probe */ if (icsk->icsk_mtup.probe_size) icsk->icsk_mtup.probe_size = 0; /* Do not sent...
1
[ "CWE-416" ]
linux
7f582b248d0a86bae5788c548d7bb5bca6f7691a
114,213,026,118,832,340,000,000,000,000,000,000,000
107
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...
TEST_F(HttpConnectionManagerImplTest, TestDownstreamProtocolErrorAccessLog) { std::shared_ptr<AccessLog::MockInstance> handler(new NiceMock<AccessLog::MockInstance>()); access_logs_ = {handler}; setup(false, ""); EXPECT_CALL(*handler, log(_, _, _, _)) .WillOnce(Invoke([](const HeaderMap*, const HeaderMap...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
246,129,513,393,889,130,000,000,000,000,000,000,000
22
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static const struct oid_to_string *get_oid_entry(const char *oid) { unsigned int i = 0; unsigned len = strlen(oid); do { if (len == _oid2str[i].oid_size && strcmp(_oid2str[i].oid, oid) == 0) return &_oid2str[i]; i++; } while (_oid2str[i].oid != NULL); return NULL; }
0
[]
gnutls
272854367efc130fbd4f1a51840d80c630214e12
261,287,808,942,391,000,000,000,000,000,000,000,000
15
Reset the output value on error in _gnutls_x509_dn_to_string() Reported by Kurt Roeckx.
AP_DECLARE(int) ap_setup_client_block(request_rec *r, int read_policy) { const char *tenc = apr_table_get(r->headers_in, "Transfer-Encoding"); const char *lenp = apr_table_get(r->headers_in, "Content-Length"); r->read_body = read_policy; r->read_chunked = 0; r->remaining = 0; if (tenc) { ...
0
[ "CWE-20" ]
httpd
a6027e56924bb6227c1fdbf6f91e7e2438338be6
115,543,351,081,565,060,000,000,000,000,000,000,000
53
Limit accepted chunk-size to 2^63-1 and be strict about chunk-ext authorized characters. Submitted by: Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684513 13f79535-47bb-0310-9956-ffa450edef68
xrdp_mm_get_sesman_port(char* port, int port_bytes) { int fd; int error; int index; char* val; char cfg_file[256]; struct list* names; struct list* values; g_memset(cfg_file,0,sizeof(char) * 256); /* default to port 3350 */ g_strncpy(port, "3350", port_bytes - 1); /* see if port is in xrdp.ini fi...
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
301,111,312,089,159,700,000,000,000,000,000,000,000
49
move temp files from /tmp to /tmp/.xrdp
inline static void _slurm_rpc_dump_spank(slurm_msg_t * msg) { int rc = SLURM_SUCCESS; spank_env_request_msg_t *spank_req_msg = (spank_env_request_msg_t *) msg->data; spank_env_responce_msg_t *spank_resp_msg = NULL; /* Locks: read job */ slurmctld_lock_t job_read_lock = { NO_LOCK, READ_LOCK, NO_LOCK, NO_LO...
0
[ "CWE-20" ]
slurm
033dc0d1d28b8d2ba1a5187f564a01c15187eb4e
101,653,514,173,867,360,000,000,000,000,000,000,000
62
Fix insecure handling of job requested gid. Only trust MUNGE signed values, unless the RPC was signed by SlurmUser or root. CVE-2018-10995.
set_directory_hook () { if (dircomplete_expand) { rl_directory_completion_hook = bash_directory_completion_hook; rl_directory_rewrite_hook = (rl_icppfunc_t *)0; } else { rl_directory_rewrite_hook = bash_directory_completion_hook; rl_directory_completion_hook = (rl_icppfunc_t *)0;...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
86,827,386,348,365,960,000,000,000,000,000,000,000
13
Bash-4.4 patch 7
int kernel_execve(const char *kernel_filename, const char *const *argv, const char *const *envp) { struct filename *filename; struct linux_binprm *bprm; int fd = AT_FDCWD; int retval; filename = getname_kernel(kernel_filename); if (IS_ERR(filename)) return PTR_ERR(filename); bprm = alloc_bprm(fd, filenam...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
154,073,095,304,461,870,000,000,000,000,000,000,000
52
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
get_mib_parse_error_count(void) { return erroneousMibs; }
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
172,816,828,701,069,680,000,000,000,000,000,000,000
4
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
updateSelectOption(FormItemList *fi, FormSelectOptionItem *item) { int i; if (fi == NULL || item == NULL) return; for (i = 0; item != NULL; i++, item = item->next) { if (i == fi->selected) item->checked = TRUE; else item->checked = FALSE; } }
0
[ "CWE-119" ]
w3m
9f0bdcfdf061db3520bd1f112bdc5e83acdec4be
108,788,781,012,151,380,000,000,000,000,000,000,000
13
Prevent segfault for formUpdateBuffer Bug-Debian: https://github.com/tats/w3m/issues/9 Bug-Debian: https://github.com/tats/w3m/issues/10
static void hci_cc_write_page_scan_activity(struct hci_dev *hdev, struct sk_buff *skb) { u8 status = *((u8 *) skb->data); struct hci_cp_write_page_scan_activity *sent; BT_DBG("%s status 0x%2.2x", hdev->name, status); if (status) return; sent = hci_sent_cmd_data(hdev, HCI_OP_WRITE_PAGE_SCAN_ACTIVITY);...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
283,116,893,238,049,500,000,000,000,000,000,000,000
18
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
OperatorGet(const char *operatorName, Oid operatorNamespace, Oid leftObjectId, Oid rightObjectId, bool *defined) { HeapTuple tup; Oid operatorObjectId; tup = SearchSysCache4(OPERNAMENSP, PointerGetDatum(operatorName), ObjectIdGetDatum(leftObjectId), ObjectIdGetDatum(rightObject...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
328,191,291,806,812,740,000,000,000,000,000,000,000
30
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
int bnx2x_set_vlan_one(struct bnx2x *bp, u16 vlan, struct bnx2x_vlan_mac_obj *obj, bool set, unsigned long *ramrod_flags) { int rc; struct bnx2x_vlan_mac_ramrod_params ramrod_param; memset(&ramrod_param, 0, sizeof(ramrod_param)); /* Fill general parameters */ ramrod_param.vlan_mac_obj = obj; r...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
42,351,257,290,509,700,000,000,000,000,000,000,000
35
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static inline int decode_attr_length(struct xdr_stream *xdr, uint32_t *attrlen, __be32 **savep) { __be32 *p; READ_BUF(4); READ32(*attrlen); *savep = xdr->p; return 0; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
241,714,726,768,788,880,000,000,000,000,000,000,000
9
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
max3421_set_address(struct usb_hcd *hcd, struct usb_device *dev, int epnum, int force_toggles) { struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd); int old_epnum, same_ep, rcvtog, sndtog; struct usb_device *old_dev; u8 hctl; old_dev = max3421_hcd->loaded_dev; old_epnum = max3421_hcd->loaded_epnum; sa...
1
[ "CWE-416" ]
linux
b5fdf5c6e6bee35837e160c00ac89327bdad031b
164,445,247,275,147,700,000,000,000,000,000,000,000
43
usb: max-3421: Prevent corruption of freed memory The MAX-3421 USB driver remembers the state of the USB toggles for a device/endpoint. To save SPI writes, this was only done when a new device/endpoint was being used. Unfortunately, if the old device was removed, this would cause writes to freed memory. To fix this, ...
static void kvm_destroy_vm(struct kvm *kvm) { int i; struct mm_struct *mm = kvm->mm; kvm_destroy_pm_notifier(kvm); kvm_uevent_notify_change(KVM_EVENT_DESTROY_VM, kvm); kvm_destroy_vm_debugfs(kvm); kvm_arch_sync_events(kvm); mutex_lock(&kvm_lock); list_del(&kvm->vm_list); mutex_unlock(&kvm_lock); kvm_arch_pr...
1
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
135,302,587,656,361,500,000,000,000,000,000,000,000
52
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...
static int ath6kl_usb_power_on(struct ath6kl *ar) { hif_start(ar); return 0; }
0
[ "CWE-476" ]
linux
39d170b3cb62ba98567f5c4f40c27b5864b304e5
130,573,669,732,034,500,000,000,000,000,000,000,000
5
ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe() The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects are initialized to point to the containing `ath6kl_usb` object according to endpoint descriptors read from the device side, as shown below in `ath6kl_usb_setup_pipe_resources`: for (i = 0; i <...
static bool cull_entries(int fd, char *me, char *t, char *br) { struct stat sb; char *buf, *p, *e, *nic; off_t len; struct entry_line *entry_lines = NULL; int i, n = 0; nic = alloca(100); if (fstat(fd, &sb) < 0) { fprintf(stderr, "Failed to fstat: %s\n", strerror(errno)); return false; } len = sb.st_size...
0
[ "CWE-284", "CWE-862" ]
lxc
16af238036a5464ae8f2420ed3af214f0de875f9
143,931,741,631,942,970,000,000,000,000,000,000,000
59
CVE-2017-5985: Ensure target netns is caller-owned Before this commit, lxc-user-nic could potentially have been tricked into operating on a network namespace over which the caller did not hold privilege. This commit ensures that the caller is privileged over the network namespace by temporarily dropping privilege. L...
static void adu_release_internal(struct adu_device *dev) { /* decrement our usage count for the device */ --dev->open_count; dev_dbg(&dev->udev->dev, "%s : open count %d\n", __func__, dev->open_count); if (dev->open_count <= 0) { adu_abort_transfers(dev); dev->open_count = 0; } }
0
[ "CWE-416" ]
linux
44efc269db7929f6275a1fa927ef082e533ecde0
262,098,219,007,398,360,000,000,000,000,000,000,000
11
USB: adutux: fix use-after-free on disconnect The driver was clearing its struct usb_device pointer, which it used as an inverted disconnected flag, before deregistering the character device and without serialising against racing release(). This could lead to a use-after-free if a racing release() callback observes t...
static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) { zval *retval_ptr = NULL; zval fname; if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements)) { return 0; } if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY && zend_hash_exists(&Z_OBJCE_PP(rval)->function_table, "__wakeup", siz...
1
[]
php-src
d3fdacb99fab186654bdf2f3adb17d9c628202f0
189,616,282,498,630,130,000,000,000,000,000,000,000
22
- Fixed #55798: serialize followed by unserialize with numeric object prop. gives integer prop.
archive_acl_next(struct archive *a, struct archive_acl *acl, int want_type, int *type, int *permset, int *tag, int *id, const char **name) { *name = NULL; *id = -1; /* * The acl_state is either zero (no entries available), -1 * (reading from list), or an entry type (retrieve that type * from ae_stat.aest_...
0
[ "CWE-476" ]
libarchive
15bf44fd2c1ad0e3fd87048b3fcc90c4dcff1175
157,346,678,687,934,190,000,000,000,000,000,000,000
64
Skip 0-length ACL fields Currently, it is possible to create an archive that crashes bsdtar with a malformed ACL: Program received signal SIGSEGV, Segmentation fault. archive_acl_from_text_l (acl=<optimised out>, text=0x7e2e92 "", want_type=<optimised out>, sc=<optimised out>) at libarchive/archive_acl.c:1726 1726 ...
static int jpc_dec_tiledecode(jpc_dec_t *dec, jpc_dec_tile_t *tile) { int i; int j; jpc_dec_tcomp_t *tcomp; jpc_dec_rlvl_t *rlvl; jpc_dec_band_t *band; int compno; int rlvlno; int bandno; int adjust; int v; jpc_dec_ccp_t *ccp; jpc_dec_cmpt_t *cmpt; if (jpc_dec_decodecblks(dec, tile)) { jas_eprintf("jpc_...
0
[ "CWE-189" ]
jasper
5dbe57e4808bea4b83a97e2f4aaf8c91ab6fdecb
321,893,140,666,814,660,000,000,000,000,000,000,000
119
CVE-2014-9029
return err; } static int iscsi_logout_flashnode(struct iscsi_transport *transport, struct iscsi_uevent *ev) { struct Scsi_Host *shost; struct iscsi_bus_flash_session *fnode_sess; struct iscsi_bus_flash_conn *fnode_conn; struct device *dev; uint32_t idx; int err = 0; if (!transport->logout_flashnode) { ...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
162,779,946,136,049,800,000,000,000,000,000,000,000
52
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:...
bool PamBackend::closeSession() { if (m_pam->isOpen()) { qDebug() << "[PAM] Closing session"; m_pam->closeSession(); m_pam->setCred(PAM_DELETE_CRED); return true; } qWarning() << "[PAM] Asked to close the session but it wasn't previously open";...
0
[ "CWE-613", "CWE-287", "CWE-284" ]
sddm
147cec383892d143b5e02daa70f1e7def50f5d98
280,000,254,220,522,240,000,000,000,000,000,000,000
10
Fix authentication when reusing an existing session - Check the success value before unlocking the session - Don't attempt to use the nonexistant "sddm-check" PAM service
int tls1_set_sigalgs(CERT *c, const int *salg, size_t salglen) { TLS_SIGALGS *sigalgs, *sptr; int rhash, rsign; size_t i; if (salglen & 1) return 0; salglen /= 2; sigalgs = OPENSSL_malloc(sizeof(TLS_SIGALGS) * salglen); if (sigalgs == NULL) return 0; for (i = 0, sptr = sigalgs; i < salglen; i++, sptr++) ...
1
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
4,146,853,087,409,819,000,000,000,000,000,000,000
42
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
int device_match_any(struct device *dev, const void *unused) { return 1; }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
318,366,075,033,947,320,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...
static bool fm10k_alloc_mapped_page(struct fm10k_ring *rx_ring, struct fm10k_rx_buffer *bi) { struct page *page = bi->page; dma_addr_t dma; /* Only page will be NULL if buffer was consumed */ if (likely(page)) return true; /* alloc new page for storage */ page = dev_alloc_page(); if (unlikely(!page))...
0
[ "CWE-476" ]
linux
01ca667133d019edc9f0a1f70a272447c84ec41f
296,239,010,784,542,900,000,000,000,000,000,000,000
36
fm10k: Fix a potential NULL pointer dereference Syzkaller report this: kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),...