func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int ZEND_FASTCALL ZEND_IS_NOT_IDENTICAL_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zval *result = &EX_T(opline->result.u.var).tmp_var;
is_identical_function(result,
&opline->op1.u.constant,
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC) TSRMLS_CC);
Z_LV... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 12,737,436,804,290,277,000,000,000,000,000,000,000 | 14 | - 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 |
static void __split_huge_page_tail(struct page *head, int tail,
struct lruvec *lruvec, struct list_head *list)
{
struct page *page_tail = head + tail;
VM_BUG_ON_PAGE(atomic_read(&page_tail->_mapcount) != -1, page_tail);
VM_BUG_ON_PAGE(page_ref_count(page_tail) != 0, page_tail);
/*
* tail_page->_refcount is ze... | 0 | [
"CWE-362"
] | linux | a8f97366452ed491d13cf1e44241bc0b5740b1f0 | 119,897,683,555,294,070,000,000,000,000,000,000,000 | 60 | mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().
We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE... |
void ms_handle_remote_reset(Connection *con) override {
Mutex::Locker l(lock);
list<uint64_t> c = conn_sent[con];
for (list<uint64_t>::iterator it = c.begin();
it != c.end(); ++it)
sent.erase(*it);
conn_sent.erase(con);
got_remote_reset = true;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 219,269,285,766,866,760,000,000,000,000,000,000,000 | 9 | 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 ... |
TF_EXCLUSIVE_LOCKS_REQUIRED(mu_) {
// Insert key and tuples into the map
map_.insert({key, std::move(*tuple)});
notify_removers();
return Status::OK();
} | 1 | [
"CWE-125",
"CWE-824"
] | tensorflow | 532f5c5a547126c634fefd43bbad1dc6417678ac | 139,284,874,825,629,340,000,000,000,000,000,000,000 | 8 | Prevent nullptr deref in validation of indexes in map ops.
PiperOrigin-RevId: 387738023
Change-Id: I83d18d36a7b82ffd2a40b5124a4e5b4c72238f27 |
EbmlElement * EbmlElement::FindNextElement(IOCallback & DataStream, const EbmlSemanticContext & Context, int & UpperLevel,
uint64 MaxDataSize, bool AllowDummyElt, unsigned int MaxLowerLevel)
{
int PossibleID_Length = 0;
binary PossibleIdNSize[16];
int PossibleSizeLength;... | 0 | [
"CWE-200"
] | libebml | 24e5cd7c666b1ddd85619d60486db0a5481c1b90 | 141,647,255,323,867,520,000,000,000,000,000,000,000 | 110 | EbmlElement: don't read beyond end of buffer when reading variable length integers |
pci_msix_enabled(struct pci_vdev *dev)
{
return (dev->msix.enabled && !dev->msi.enabled);
} | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 6199e653418eda58cd698d8769820904453e2535 | 339,750,534,250,990,520,000,000,000,000,000,000,000 | 4 | 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> |
void avahi_server_config_free(AvahiServerConfig *c) {
assert(c);
avahi_free(c->host_name);
avahi_free(c->domain_name);
avahi_string_list_free(c->browse_domains);
avahi_string_list_free(c->allow_interfaces);
avahi_string_list_free(c->deny_interfaces);
} | 0 | [
"CWE-399"
] | avahi | 6fabf9d5189cf0efb86af1cd57e5399f8e31112a | 247,172,868,058,276,300,000,000,000,000,000,000,000 | 9 | CVE-2009-0758: Reflector creates packet storm on legacy unicast traffic
Fixes rhbz #488314. |
GF_Err gf_isom_cenc_merge_saiz_saio(GF_SampleEncryptionBox *senc, GF_SampleTableBox *stbl, u64 offset, u32 len)
{
u32 i;
assert(stbl);
if (!senc->cenc_saiz) {
senc->cenc_saiz = (GF_SampleAuxiliaryInfoSizeBox *) gf_isom_box_new_parent(&stbl->child_boxes, GF_ISOM_BOX_TYPE_SAIZ);
if (!senc->cenc_saiz) return GF_OU... | 0 | [
"CWE-476"
] | gpac | 3b84ffcbacf144ce35650df958432f472b6483f8 | 69,088,860,426,756,390,000,000,000,000,000,000,000 | 60 | fixed #1735 |
TEST_F(QueryPlannerTest, IndexBoundsOrOfNegations) {
addIndex(BSON("a" << 1));
runQuery(fromjson("{$or: [{a: {$ne: null}}, {a: {$ne: 4}}]}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: null, node: {ixscan: {pattern: {a:1}, "
... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 339,793,298,876,443,100,000,000,000,000,000,000,000 | 10 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static NTSTATUS smb_bytes_talloc_string(TALLOC_CTX *mem_ctx,
const uint8_t *hdr,
char **dest,
uint8_t *src,
size_t srclen,
ssize_t *destlen)
{
*destlen = clistr_pull_talloc(mem_ctx,
(const char *)hdr,
SVAL(hdr, HDR_FLG2),
dest,
(char *)src,
srclen,
STR_TERMINATE);
if (... | 0 | [
"CWE-94"
] | samba | 94295b7aa22d2544af5323bca70d3dcb97fd7c64 | 41,663,047,847,726,260,000,000,000,000,000,000,000 | 26 | CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
array_command()
{
int nsize = 0; /* Size of array when we leave */
int est_size = 0; /* Estimated size */
struct udvt_entry *array;
struct value *A;
int i;
/* Create or recycle a udv containing an array with the requested name */
if (!isletter(++c_token))
int_error(c_token, "illegal variab... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 295,153,404,475,027,100,000,000,000,000,000,000,000 | 82 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
void reset(){
tType = DRW::PLOTSETTINGS;
marginLeft = 0.0;
marginBottom = 0.0;
marginRight = 0.0;
marginTop = 0.0;
DRW_TableEntry::reset();
} | 0 | [
"CWE-191"
] | libdxfrw | fcd977cc7f8f6cc7f012e5b72d33cf7d77b3fa69 | 142,401,230,939,042,460,000,000,000,000,000,000,000 | 8 | fixed heap use after free vulnerability CVE-2021-21900
as reported in TALOS-2021-1351 / CVE-2021-21900,
DRW_TableEntry::parseCode had the potential to trigger an use after free exception with a malformed DXF file. |
gdm_session_worker_update_username (GdmSessionWorker *worker)
{
char *username;
gboolean res;
username = NULL;
res = gdm_session_worker_get_username (worker, &username);
if (res) {
g_debug ("GdmSessionWorker: old-username='%s' new-username='%s'",
... | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 298,090,400,488,433,900,000,000,000,000,000,000,000 | 44 | Store the face and dmrc files in a cache. Refer to bug #565151. |
static int lua_ap_get_active_config(lua_State *L) {
ap_directive_t *subdir;
ap_directive_t *dir = ap_conftree;
request_rec *r = ap_lua_check_request_rec(L, 1);
for (dir = ap_conftree; dir; dir = dir->next) {
if (ap_strcasestr(dir->directive, "<virtualhost") && dir->first_child) {
... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 149,470,471,116,015,590,000,000,000,000,000,000,000 | 23 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
int ClientHandler::read_clear() {
auto should_break = false;
rb_.ensure_chunk();
for (;;) {
if (rb_.rleft() && on_read() != 0) {
return -1;
}
if (rb_.rleft() == 0) {
rb_.reset();
} else if (rb_.wleft() == 0) {
conn_.rlimit.stopw();
return 0;
}
if (!ev_is_active(&co... | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 153,448,797,217,712,740,000,000,000,000,000,000,000 | 35 | Don't read too greedily |
static int Special(int c)
{
switch (c) {
case '\b':
BackSpace();
return 1;
case '\r':
Return();
return 1;
case '\n':
if (curr->w_autoaka)
FindAKA();
case '\013': /* Vertical tab is the same as Line Feed */
LineFeed(0);
return 1;
case '\007':
WBell(curr, visual_bell);
return 1;
case '\t':
... | 0 | [
"CWE-119"
] | screen | c336a32a1dcd445e6b83827f83531d4c6414e2cd | 189,415,132,831,615,200,000,000,000,000,000,000,000 | 30 | Fix stack overflow due to too deep recursion
Bug: 45713
How to reproduce:
Run this command inside screen
$ printf '\x1b[10000000T'
screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge. |
void license_generate_randoms(rdpLicense* license)
{
ZeroMemory(license->ClientRandom, CLIENT_RANDOM_LENGTH); /* ClientRandom */
ZeroMemory(license->PremasterSecret, PREMASTER_SECRET_LENGTH); /* PremasterSecret */
#ifndef LICENSE_NULL_CLIENT_RANDOM
crypto_nonce(license->ClientRandom, CLIENT_RANDOM_LENGTH); /* Clien... | 0 | [] | FreeRDP | f1d6afca6ae620f9855a33280bdc6f3ad9153be0 | 173,600,066,186,753,460,000,000,000,000,000,000,000 | 13 | Fix CVE-2014-0791
This patch fixes CVE-2014-0791, the remaining length in the stream is checked
before doing some malloc(). |
xmlFAIsChar(xmlRegParserCtxtPtr ctxt) {
int cur;
int len;
cur = CUR_SCHAR(ctxt->cur, len);
if ((cur == '.') || (cur == '\\') || (cur == '?') ||
(cur == '*') || (cur == '+') || (cur == '(') ||
(cur == ')') || (cur == '|') || (cur == 0x5B) ||
(cur == 0x5D) || (cur == 0))
return(-1);
return(cur);
... | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 22,874,334,165,502,935,000,000,000,000,000,000,000 | 12 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
static void unit_free_requires_mounts_for(Unit *u) {
assert(u);
for (;;) {
_cleanup_free_ char *path;
path = hashmap_steal_first_key(u->requires_mounts_for);
if (!path)
break;
else {
char s[... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 76,494,324,036,062,220,000,000,000,000,000,000,000 | 33 | 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... |
void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp)
{
struct vfs_fsp_data *head;
for (head = fsp->vfs_extension; head; head = head->next) {
if (head->owner == handle) {
return head;
}
}
return NULL;
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 130,873,940,664,520,020,000,000,000,000,000,000,000 | 12 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
int unit_require_mounts_for(Unit *u, const char *path, UnitDependencyMask mask) {
_cleanup_free_ char *p = NULL;
UnitDependencyInfo di;
int r;
assert(u);
assert(path);
/* Registers a unit for requiring a certain path and all its prefixes. We keep a hashtable of these pa... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 256,408,701,829,513,030,000,000,000,000,000,000,000 | 76 | 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... |
MenuCacheItem* menu_cache_item_ref(MenuCacheItem* item)
{
g_atomic_int_inc( &item->n_ref );
/* DEBUG("item_ref %s: %d -> %d", item->id, item->n_ref-1, item->n_ref); */
return item;
} | 0 | [
"CWE-20"
] | menu-cache | 56f66684592abf257c4004e6e1fff041c64a12ce | 275,313,062,485,362,500,000,000,000,000,000,000,000 | 6 | Fix potential access violation, use runtime user dir instead of tmp dir.
Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0. |
int __init nfc_llcp_sock_init(void)
{
return nfc_proto_register(&llcp_nfc_proto);
} | 0 | [
"CWE-276"
] | linux | 3a359798b176183ef09efb7a3dc59abad1cc7104 | 270,870,617,669,665,000,000,000,000,000,000,000,000 | 4 | nfc: enforce CAP_NET_RAW for raw sockets
When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked
first.
Signed-off-by: Ori Nimron <orinimron123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int php_cli_server_begin_send_static(php_cli_server *server, php_cli_server_client *client TSRMLS_DC) /* {{{ */
{
int fd;
int status = 200;
if (client->request.path_translated && strlen(client->request.path_translated) != client->request.path_translated_len) {
/* can't handle paths that contain nul bytes *... | 0 | [] | php-src | 2438490addfbfba51e12246a74588b2382caa08a | 324,579,904,372,779,700,000,000,000,000,000,000,000 | 56 | slim post data |
static GF_Node *lsr_read_polygon(GF_LASeRCodec *lsr, Bool is_polyline, u32 same_type)
{
GF_FieldInfo info;
GF_Node *elt = gf_node_new(lsr->sg, is_polyline ? TAG_SVG_polyline : TAG_SVG_polygon);
lsr->last_error = gf_node_get_attribute_by_tag(elt, TAG_SVG_ATT_points, 1, 0, &info);
if (same_type) {
if (lsr->prev_p... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 134,632,323,466,675,800,000,000,000,000,000,000,000 | 29 | fixed #2213 |
Formattable::Formattable(const UnicodeString& stringToCopy)
{
init();
fType = kString;
fValue.fString = new UnicodeString(stringToCopy);
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 166,414,916,991,958,230,000,000,000,000,000,000,000 | 6 | ICU-20246 Fixing another integer overflow in number parsing. |
void __kvm_set_or_clear_apicv_inhibit(struct kvm *kvm,
enum kvm_apicv_inhibit reason, bool set)
{
unsigned long old, new;
lockdep_assert_held_write(&kvm->arch.apicv_update_lock);
if (!static_call(kvm_x86_check_apicv_inhibit_reasons)(reason))
return;
old = new = kvm->arch.apicv_inhibit_reasons;
set_... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 154,035,796,504,464,340,000,000,000,000,000,000,000 | 37 | 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... |
spnego_gss_delete_name_attribute(OM_uint32 *minor_status,
gss_name_t name,
gss_buffer_t attr)
{
OM_uint32 ret;
ret = gss_delete_name_attribute(minor_status,
name,
attr);
return (ret);
} | 0 | [
"CWE-415"
] | krb5 | f18ddf5d82de0ab7591a36e465bc24225776940f | 27,463,736,132,450,410,000,000,000,000,000,000,000 | 10 | Fix double-free in SPNEGO [CVE-2014-4343]
In commit cd7d6b08 ("Verify acceptor's mech in SPNEGO initiator") the
pointer sc->internal_mech became an alias into sc->mech_set->elements,
which should be considered constant for the duration of the SPNEGO
context. So don't free it.
CVE-2014-4343:
In MIT krb5 releases 1.1... |
const DH_METHOD *DH_get_default_method(void)
{
return default_DH_method;
} | 0 | [
"CWE-320"
] | openssl | ea7abeeabf92b7aca160bdd0208636d4da69f4f4 | 114,161,303,678,231,640,000,000,000,000,000,000,000 | 4 | Reject excessively large primes in DH key generation.
CVE-2018-0732
Signed-off-by: Guido Vranken <guidovranken@gmail.com>
(cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe)
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openss... |
static MagickBooleanType DecodeLabImage(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 PixelPacket
*... | 0 | [
"CWE-400"
] | ImageMagick6 | 0701e59f00194897494fa2be74cee8ca626d8f6f | 312,113,291,909,918,200,000,000,000,000,000,000,000 | 51 | https://github.com/ImageMagick/ImageMagick/issues/664 |
BSONObj spec() {
return BSON("$gt" << BSON_ARRAY(2 << 3 << 4));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 300,657,978,999,650,400,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
int bcf_update_id(const bcf_hdr_t *hdr, bcf1_t *line, const char *id)
{
if ( !(line->unpacked & BCF_UN_STR) ) bcf_unpack(line, BCF_UN_STR);
kstring_t tmp;
tmp.l = 0; tmp.s = line->d.id; tmp.m = line->d.m_id;
if ( id )
kputs(id, &tmp);
else
kputs(".", &tmp);
line->d.id = tmp.s; li... | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 98,641,924,142,923,840,000,000,000,000,000,000,000 | 13 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
static void cdlistcheck(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int i, base, j;
SplineFont *sub, *cidmaster = fv->b.cidmaster;
for ( i=0; cdlist[i].mid!=MID_CIDFontInfo; ++i );
base = i+2;
for ( i=base; cdlist[i].ti.text!=NULL; ++... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 151,636,405,198,689,390,000,000,000,000,000,000,000 | 51 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static void checkChrootDirectories(const Options &options) {
if (!options.preexecChroot.empty()) {
// TODO: check whether appRoot is a child directory of preexecChroot
// and whether postexecChroot is a child directory of appRoot.
}
} | 0 | [
"CWE-200",
"CWE-61"
] | passenger | 4043718264095cde6623c2cbe8c644541036d7bf | 88,292,239,132,577,460,000,000,000,000,000,000,000 | 6 | Disable unused feature. |
int crypto_ahash_final(struct ahash_request *req)
{
return crypto_ahash_op(req, crypto_ahash_reqtfm(req)->final);
} | 0 | [
"CWE-835"
] | linux | ef0579b64e93188710d48667cb5e014926af9f1b | 209,212,998,107,895,200,000,000,000,000,000,000,000 | 4 | crypto: ahash - Fix EINPROGRESS notification callback
The ahash API modifies the request's callback function in order
to clean up after itself in some corner cases (unaligned final
and missing finup).
When the request is complete ahash will restore the original
callback and everything is fine. However, when the requ... |
void fxUint32Setter(txMachine* the, txSlot* data, txInteger offset, txSlot* slot, int endian)
{
txU4 value = (slot->kind == XS_INTEGER_KIND) ? (txU4)slot->value.integer : (txU4)slot->value.number;
#ifdef mxMisalignedSettersCrash
value = EXPORT(U32);
c_memcpy(data->value.arrayBuffer.address + offset, &value, sizeof(t... | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 338,988,985,773,158,850,000,000,000,000,000,000,000 | 11 | XS: #896 |
CHUNK_WRITE_PTR(chunk_t *chunk)
{
return chunk->data + chunk->datalen;
} | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 337,560,193,072,775,380,000,000,000,000,000,000,000 | 4 | Log malformed hostnames in socks5 request respecting SafeLogging |
int get_partition_id_range(partition_info *part_info,
uint32 *part_id,
longlong *func_value)
{
longlong *range_array= part_info->range_int_array;
uint max_partition= part_info->num_parts - 1;
uint min_part_id= 0;
uint max_part_id= max_partition;
uint loc_p... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 158,792,576,451,608,070,000,000,000,000,000,000,000 | 44 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
MODRET auth_post_pass(cmd_rec *cmd) {
config_rec *c = NULL;
char *grantmsg = NULL, *user;
unsigned int ctxt_precedence = 0;
unsigned char have_user_timeout, have_group_timeout, have_class_timeout,
have_all_timeout, *root_revoke = NULL, *authenticated;
struct stat st;
/* Was there a precending USER comm... | 0 | [
"CWE-59",
"CWE-61"
] | proftpd | ecff21e0d0e84f35c299ef91d7fda088e516d4ed | 78,869,863,463,963,310,000,000,000,000,000,000,000 | 257 | Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks
is off, to 1.3.5 branch. |
finish_newstyle_options (struct connection *conn)
{
if (protocol_common_open (conn, &conn->exportsize, &conn->eflags) == -1)
return -1;
debug ("newstyle negotiation: flags: export 0x%x", conn->eflags);
return 0;
} | 0 | [
"CWE-406"
] | nbdkit | e06cde00659ff97182173d0e33fff784041bcb4a | 297,995,572,296,794,180,000,000,000,000,000,000,000 | 8 | server: Wait until handshake complete before calling .open callback
Currently we call the plugin .open callback as soon as we receive a
TCP connection:
$ nbdkit -fv --tls=require --tls-certificates=tests/pki null \
--run "telnet localhost 10809"
[...]
Trying ::1...
Connected to localhost.
Escape ... |
void LibRaw::identify_finetune_by_filesize(int fsize)
{
if (fsize == 4771840)
{ // hack Nikon 3mpix: E880, E885, E990, E995;
// Olympus C-3030Z
if (!timestamp && nikon_e995())
strcpy(model, "E995");
}
else if (fsize == 2940928)
{ // hack Nikon 2mpix: E2100, E2500
if (!timestamp && !nikon_e2100())
str... | 0 | [
"CWE-787"
] | LibRaw | 4feaed4dea636cee4fee010f615881ccf76a096d | 137,736,208,783,605,850,000,000,000,000,000,000,000 | 32 | limit loops to MIN(colors,4) in dng fields parser |
int ip_recv_error(struct sock *sk, struct msghdr *msg, int len, int *addr_len)
{
struct sock_exterr_skb *serr;
struct sk_buff *skb;
DECLARE_SOCKADDR(struct sockaddr_in *, sin, msg->msg_name);
struct {
struct sock_extended_err ee;
struct sockaddr_in offender;
} errhdr;
int err;
int copied;
err = -EAGAIN;
... | 0 | [
"CWE-476"
] | net | 425aa0e1d01513437668fa3d4a971168bbaa8515 | 160,819,365,361,910,940,000,000,000,000,000,000,000 | 62 | ip_sockglue: Fix missing-check bug in ip_ra_control()
In function ip_ra_control(), the pointer new_ra is allocated a memory
space via kmalloc(). And it is used in the following codes. However,
when there is a memory allocation error, kmalloc() fails. Thus null
pointer dereference may happen. And it will cause the ker... |
static struct lo_inode *lo_find(struct lo_data *lo, struct stat *st,
uint64_t mnt_id)
{
struct lo_inode *p;
struct lo_key key = {
.ino = st->st_ino,
.dev = st->st_dev,
.mnt_id = mnt_id,
};
pthread_mutex_lock(&lo->mutex);
p = g_hash_table_looku... | 0 | [
"CWE-281"
] | qemu | e586edcb410543768ef009eaa22a2d9dd4a53846 | 152,519,536,710,590,510,000,000,000,000,000,000,000 | 21 | virtiofs: drop remapped security.capability xattr as needed
On Linux, the 'security.capability' xattr holds a set of
capabilities that can change when an executable is run, giving
a limited form of privilege escalation to those programs that
the writer of the file deemed worthy.
Any write causes the 'security.capabil... |
ReturnProcessId(HANDLE pipe, DWORD pid, DWORD count, LPHANDLE events)
{
const WCHAR msg[] = L"Process ID";
WCHAR buf[22 + _countof(msg)]; /* 10 chars each for error and PID and 2 for line breaks */
/*
* Same format as error messages (3 line string) with error = 0 in
* 0x%08x format, PID on line 2... | 0 | [
"CWE-415"
] | openvpn | 1394192b210cb3c6624a7419bcf3ff966742e79b | 276,676,796,767,210,500,000,000,000,000,000,000,000 | 14 | Fix potential double-free() in Interactive Service (CVE-2018-9336)
Malformed input data on the service pipe towards the OpenVPN interactive
service (normally used by the OpenVPN GUI to request openvpn instances
from the service) can result in a double free() in the error handling code.
This usually only leads to a pr... |
int dns_str_to_dn_label(const char *str, int str_len, char *dn, int dn_len)
{
int i, offset;
if (dn_len < str_len + 1)
return -1;
/* First byte of dn will be used to store the length of the first
* label */
offset = 0;
for (i = 0; i < str_len; ++i) {
if (str[i] == '.') {
/* 2 or more consecutive dots is... | 0 | [
"CWE-125"
] | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | 153,598,982,601,455,380,000,000,000,000,000,000,000 | 26 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly acce... |
f_argv(typval_T *argvars, typval_T *rettv)
{
int idx;
aentry_T *arglist = NULL;
int argcount = -1;
if (argvars[0].v_type != VAR_UNKNOWN)
{
if (argvars[1].v_type == VAR_UNKNOWN)
{
arglist = ARGLIST;
argcount = ARGCOUNT;
}
else if (argvars[1].v_type == VAR_NUMBER
&& tv_get_num... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 280,362,689,199,562,100,000,000,000,000,000,000,000 | 42 | 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 int em_call_far(struct x86_emulate_ctxt *ctxt)
{
u16 sel, old_cs;
ulong old_eip;
int rc;
struct desc_struct old_desc, new_desc;
const struct x86_emulate_ops *ops = ctxt->ops;
int cpl = ctxt->ops->cpl(ctxt);
enum x86emul_mode prev_mode = ctxt->mode;
old_eip = ctxt->_eip;
ops->get_segment(ctxt, &old_cs, ... | 0 | [
"CWE-284"
] | linux | 33ab91103b3415e12457e3104f0e4517ce12d0f3 | 289,467,945,698,730,830,000,000,000,000,000,000,000 | 43 | KVM: x86: fix emulation of "MOV SS, null selector"
This is CVE-2017-2583. On Intel this causes a failed vmentry because
SS's type is neither 3 nor 7 (even though the manual says this check is
only done for usable SS, and the dmesg splat says that SS is unusable!).
On AMD it's worse: svm.c is confused and sets CPL to ... |
void Magick::Image::levelColorsChannel(const ChannelType channel_,
const Color &blackColor_,const Color &whiteColor_,const bool invert_)
{
PixelInfo
black,
white;
modifyImage();
black=static_cast<PixelInfo>(blackColor_);
white=static_cast<PixelInfo>(whiteColor_);
GetPPException;
GetAndSetPPChann... | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 168,124,759,675,459,330,000,000,000,000,000,000,000 | 18 | Added missing return to avoid use after free. |
char *get_manufacturer(unsigned char mac0, unsigned char mac1, unsigned char mac2) {
static char * oui_location = NULL;
char oui[OUI_STR_SIZE + 1];
char *manuf;
//char *buffer_manuf;
char * manuf_str;
struct oui *ptr;
FILE *fp;
char buffer[BUFSIZ];
char temp[OUI_STR_SIZE + 1];
unsigned char a[2];
unsigned ch... | 0 | [
"CWE-787"
] | aircrack-ng | ff70494dd389ba570dbdbf36f217c28d4381c6b5 | 306,741,982,031,503,200,000,000,000,000,000,000,000 | 95 | Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab |
static void agent_read_complete(UdscsConnection *conn,
struct udscs_message_header *header, uint8_t *data)
{
switch (header->type) {
case VDAGENTD_GUEST_XORG_RESOLUTION:
do_agent_xorg_resolution(conn, header, data);
break;
case VDAGENTD_CLIPBOARD_GRAB:
case VDAGENTD_CLIPBOARD_REQUEST... | 0 | [
"CWE-770"
] | spice-vd_agent | 1a8b93ca6ac0b690339ab7f0afc6fc45d198d332 | 30,433,117,305,531,490,000,000,000,000,000,000,000 | 22 | Avoids unchecked file transfer IDs allocation and usage
Avoid agents allocating file transfers.
The "active_xfers" entries are now inserted when client start sending
files.
Also different agents cannot mess with other agent transfers as a
transfer is bound to a single agent.
This issue was reported by SUSE security t... |
NamespaceString _getCollectionNssFromUUID(OperationContext* opCtx, const UUID& uuid) {
Collection* source = UUIDCatalog::get(opCtx).lookupCollectionByUUID(uuid);
return source ? source->ns() : NamespaceString();
} | 0 | [
"CWE-20"
] | mongo | 35c1b1f588f04926a958ad2fe4d9c59d79f81e8b | 297,655,316,939,574,330,000,000,000,000,000,000,000 | 4 | SERVER-35636 renameCollectionForApplyOps checks for complete namespace |
const COMP_METHOD *SSL_get_current_compression(SSL *s)
{
if (s->compress != NULL)
return(s->compress->meth);
return(NULL);
} | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 51,056,356,658,174,730,000,000,000,000,000,000,000 | 6 | Add Next Protocol Negotiation. |
int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn, unsigned long size, pgprot_t prot)
{
pgd_t *pgd;
unsigned long next;
unsigned long end = addr + PAGE_ALIGN(size);
struct mm_struct *mm = vma->vm_mm;
int err;
/*
* Physically remapped pages are special. Tell the
* res... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 104,501,357,885,003,660,000,000,000,000,000,000,000 | 48 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
wStream* rdp_data_pdu_init(rdpRdp* rdp)
{
wStream* s = rdp_send_stream_pdu_init(rdp);
if (!s)
return NULL;
if (!Stream_SafeSeek(s, RDP_SHARE_DATA_HEADER_LENGTH))
goto fail;
return s;
fail:
Stream_Release(s);
return NULL;
} | 0 | [
"CWE-125"
] | FreeRDP | 9301bfe730c66180263248b74353daa99f5a969b | 203,128,399,267,068,150,000,000,000,000,000,000,000 | 15 | Fixed #6007: Boundary checks in rdp_read_flow_control_pdu |
static int nla_client_authenticate(rdpNla* nla)
{
int rc = -1;
wStream* s;
int status;
WINPR_ASSERT(nla);
s = Stream_New(NULL, 4096);
if (!s)
{
WLog_ERR(TAG, "Stream_New failed!");
return -1;
}
if (nla_client_begin(nla) < 1)
goto fail;
while (nla_get_state(nla) < NLA_STATE_AUTH_INFO)
{
Stream_Se... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 179,099,032,114,594,470,000,000,000,000,000,000,000 | 41 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
static __inline__ void neigh_update_hhs(struct neighbour *neigh)
{
struct hh_cache *hh;
void (*update)(struct hh_cache*, struct net_device*, unsigned char *) =
neigh->dev->header_cache_update;
if (update) {
for (hh = neigh->hh; hh; hh = hh->hh_next) {
write_lock_bh(&hh->hh_lock);
update(hh, neigh->dev, ne... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 260,962,027,420,205,050,000,000,000,000,000,000,000 | 14 | [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> |
ff_pop(ff_search_ctx_T *search_ctx)
{
ff_stack_T *sptr;
sptr = search_ctx->ffsc_stack_ptr;
if (search_ctx->ffsc_stack_ptr != NULL)
search_ctx->ffsc_stack_ptr = search_ctx->ffsc_stack_ptr->ffs_prev;
return sptr;
} | 0 | [
"CWE-122"
] | vim | 615ddd5342b50a6878a907062aa471740bd9a847 | 130,021,489,118,197,200,000,000,000,000,000,000,000 | 10 | patch 8.2.3611: crash when using CTRL-W f without finding a file name
Problem: Crash when using CTRL-W f without finding a file name.
Solution: Bail out when the file name length is zero. |
struct dentry *d_lookup(const struct dentry *parent, const struct qstr *name)
{
struct dentry *dentry;
unsigned seq;
do {
seq = read_seqbegin(&rename_lock);
dentry = __d_lookup(parent, name);
if (dentry)
break;
} while (read_seqretry(&rename_lock, seq));
return dentry;
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 274,861,365,103,299,830,000,000,000,000,000,000,000 | 13 | 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... |
ebt_check_watcher(struct ebt_entry_watcher *w, struct xt_tgchk_param *par,
unsigned int *cnt)
{
const struct ebt_entry *e = par->entryinfo;
struct xt_target *watcher;
size_t left = ((char *)e + e->target_offset) - (char *)w;
int ret;
if (left < sizeof(struct ebt_entry_watcher) ||
left - sizeof(struct ebt_... | 0 | [
"CWE-787"
] | linux | b71812168571fa55e44cdd0254471331b9c4c4c6 | 296,281,094,532,353,500,000,000,000,000,000,000,000 | 29 | netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
We need to make sure the offsets are not out of range of the
total size.
Also check that they are in ascending order.
The WARN_ON triggered by syzkaller (it sets panic_on_warn) is
changed to also bail out, no point in continuing parsing.
Briefly tested... |
scheme_leading_string (enum url_scheme scheme)
{
return supported_schemes[scheme].leading_string;
} | 0 | [
"CWE-93"
] | wget | 4d729e322fae359a1aefaafec1144764a54e8ad4 | 52,950,714,308,331,280,000,000,000,000,000,000,000 | 4 | Fix CRLF injection in Wget host part
* src/url.c (url_parse): Reject control characters in host part of URL
Reported-by: Orange Tsai |
static int snd_timer_user_fasync(int fd, struct file * file, int on)
{
struct snd_timer_user *tu;
tu = file->private_data;
return fasync_helper(fd, file, on, &tu->fasync);
} | 0 | [
"CWE-200",
"CWE-362"
] | linux | ee8413b01045c74340aa13ad5bdf905de32be736 | 27,133,962,048,557,864,000,000,000,000,000,000,000 | 7 | ALSA: timer: Fix double unlink of active_list
ALSA timer instance object has a couple of linked lists and they are
unlinked unconditionally at snd_timer_stop(). Meanwhile
snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
the element list itself unchanged. This ends up with unlinking twice,
and i... |
nautilus_file_get_keywords (NautilusFile *file)
{
GList *keywords;
if (file == NULL) {
return NULL;
}
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
/* Put all the keywords into a list. */
keywords = nautilus_file_get_metadata_list
(file, "keyword", "name");
keywords = g_list_concat (keywords, eel... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 159,383,566,945,124,200,000,000,000,000,000,000,000 | 19 | 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-... |
g_NPP_WriteReady(NPP instance, NPStream *stream)
{
if (instance == NULL)
return 0;
if (plugin_funcs.writeready == NULL)
return 0;
if (stream == NULL)
return 0;
D(bugiI("NPP_WriteReady instance=%p, stream=%p\n", instance, stream));
int32_t ret = plugin_funcs.writeready(instance, stream);
D(bugiD("NPP_W... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 88,870,871,251,611,740,000,000,000,000,000,000,000 | 16 | Support all the new variables added |
nv_drop(cmdarg_T *cap UNUSED)
{
do_put('~', NULL, BACKWARD, 1L, PUT_CURSEND);
} | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 161,619,053,378,824,370,000,000,000,000,000,000,000 | 4 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
static struct dentry *proc_base_instantiate(struct inode *dir,
struct dentry *dentry, struct task_struct *task, const void *ptr)
{
const struct pid_entry *p = ptr;
struct inode *inode;
struct proc_inode *ei;
struct dentry *error = ERR_PTR(-EINVAL);
/* Allocate the inode */
error = ERR_PTR(-ENOMEM);
inode = new... | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 306,029,733,139,847,060,000,000,000,000,000,000,000 | 44 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
int cil_gen_type_rule(struct cil_tree_node *parse_current, struct cil_tree_node *ast_node, uint32_t rule_kind)
{
enum cil_syntax syntax[] = {
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_STRING,
CIL_SYN_END
};
int syntax_len = sizeof(syntax)/sizeof(*syntax);
struct cil_type_ru... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 188,509,208,717,908,460,000,000,000,000,000,000,000 | 41 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static void cleanup_single_sta(struct sta_info *sta)
{
int ac, i;
struct tid_ampdu_tx *tid_tx;
struct ieee80211_sub_if_data *sdata = sta->sdata;
struct ieee80211_local *local = sdata->local;
struct ps_data *ps;
if (test_sta_flag(sta, WLAN_STA_PS_STA)) {
if (sta->sdata->vif.type == NL80211_IFTYPE_AP ||
st... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 251,253,778,213,087,700,000,000,000,000,000,000,000 | 51 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
msgGetMsgVar(msg_t *pThis, cstr_t *pstrPropName, var_t **ppVar)
{
DEFiRet;
var_t *pVar;
size_t propLen;
uchar *pszProp = NULL;
cstr_t *pstrProp;
propid_t propid;
unsigned short bMustBeFreed = 0;
ISOBJ_TYPE_assert(pThis, msg);
ASSERT(pstrPropName != NULL);
ASSERT(ppVar != NULL);
/* make sure we have a var_t... | 0 | [
"CWE-772"
] | rsyslog | 8083bd1433449fd2b1b79bf759f782e0f64c0cd2 | 153,361,079,138,399,260,000,000,000,000,000,000,000 | 36 | backporting abort condition fix from 5.7.7 |
virDomainGetUUIDString(virDomainPtr domain, char *buf)
{
VIR_DOMAIN_DEBUG(domain, "buf=%p", buf);
virResetLastError();
virCheckDomainReturn(domain, -1);
virCheckNonNullArgGoto(buf, error);
virUUIDFormat(domain->uuid, buf);
return 0;
error:
virDispatchError(domain->conn);
return -1;
... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 112,215,466,900,332,680,000,000,000,000,000,000,000 | 16 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
while ((i < MAX_CLIENT_ACCESSES) &&
p) {
request.data.client_accesses.client_ips[i] = htonl(p->ip);
p = p->next;
i++;
} | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 165,291,104,544,218,810,000,000,000,000,000,000,000 | 7 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
void set_use_tensor_op_math(bool use_tensor_op_math) {
cudnnMathType_t math_type =
#if CUDNN_VERSION >= 8000
(use_tensor_op_math ? CUDNN_TENSOR_OP_MATH : CUDNN_FMA_MATH);
#else
(use_tensor_op_math ? CUDNN_TENSOR_OP_MATH : CUDNN_DEFAULT_MATH);
#endif
CHECK_CUDNN_OK(cudnnSetConvolutionMathType(h... | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 59,087,334,359,636,580,000,000,000,000,000,000,000 | 9 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
static size_t consume_s32 (ut8 *buf, ut8 *max, st32 *out, ut32 *offset) {
size_t n;
if (!buf || !max || !out) {
return 0;
}
if (!(n = read_i32_leb128 (buf, max, out)) || n > 5) {
return 0;
}
if (offset) {
*offset += n;
}
return n;
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | d2632f6483a3ceb5d8e0a5fb11142c51c43978b4 | 115,951,107,091,880,650,000,000,000,000,000,000,000 | 13 | Fix crash in fuzzed wasm r2_hoobr_consume_init_expr |
psf_strlcpy_crlf (char *dest, const char *src, size_t destmax, size_t srcmax)
{ /* Must be minus 2 so it can still expand a single trailing '\n' or '\r'. */
char * destend = dest + destmax - 2 ;
const char * srcend = src + srcmax ;
while (dest < destend && src < srcend)
{ if ((src [0] == '\r' && src [1] == '\n') |... | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | 708e996c87c5fae77b104ccfeb8f6db784c32074 | 281,910,003,819,005,280,000,000,000,000,000,000,000 | 33 | src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.
Now the size of the header bu... |
CImgList(const unsigned int n, const unsigned int width, const unsigned int height,
const unsigned int depth, const unsigned int spectrum, const T& val):
_width(0),_allocated_width(0),_data(0) {
assign(n);
cimglist_apply(*this,assign)(width,height,depth,spectrum,val);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 263,483,294,713,571,620,000,000,000,000,000,000,000 | 6 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void tty_ldisc_deinit(struct tty_struct *tty)
{
tty_ldisc_put(tty->ldisc);
tty->ldisc = NULL;
} | 0 | [
"CWE-200"
] | linux-stable | dd42bf1197144ede075a9d4793123f7689e164bc | 154,504,065,236,640,650,000,000,000,000,000,000,000 | 5 | tty: Prevent ldisc drivers from re-using stale tty fields
Line discipline drivers may mistakenly misuse ldisc-related fields
when initializing. For example, a failure to initialize tty->receive_room
in the N_GIGASET_M101 line discipline was recently found and fixed [1].
Now, the N_X25 line discipline has been discover... |
static long vhost_set_vring_endian(struct vhost_virtqueue *vq, int __user *argp)
{
return -ENOIOCTLCMD;
} | 0 | [
"CWE-399"
] | linux | 7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5 | 42,703,691,690,651,280,000,000,000,000,000,000,000 | 4 | vhost: actually track log eventfd file
While reviewing vhost log code, I found out that log_file is never
set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet).
Cc: stable@vger.kernel.org
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> |
static void FVMenuRemoveUnused(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
FVRemoveUnused((FontViewBase *) fv);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 184,244,477,367,037,000,000,000,000,000,000,000,000 | 4 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
flatpak_dir_remove_appstream (FlatpakDir *self,
const char *remote,
GCancellable *cancellable,
GError **error)
{
g_autoptr(GFile) appstream_dir = NULL;
g_autoptr(GFile) remote_dir = NULL;
if (!flatpak_dir_ensure_re... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 8,854,386,244,371,968,000,000,000,000,000,000,000 | 20 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
void _eval(CImg<t>& output, CImg<T> *const img_output, const char *const expression,
const double x, const double y, const double z, const double c,
CImgList<T> *const list_images) const {
if (!expression || !*expression) { output.assign(1); *output = 0; return; }
double _v... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 147,666,737,425,660,350,000,000,000,000,000,000,000 | 15 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TfLitePackParams* data =
reinterpret_cast<TfLitePackParams*>(node->builtin_data);
TF_LITE_ENSURE_EQ(context, NumInputs(node), data->values_count);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* input0;
TF_LITE_ENSUR... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 316,699,379,003,617,560,000,000,000,000,000,000,000 | 60 | [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... |
static void manager_deserialize_uid_refs_one_internal(
Manager *m,
Hashmap** uid_refs,
const char *value) {
uid_t uid;
uint32_t c;
int r;
assert(m);
assert(uid_refs);
assert(value);
r = parse_uid(value, &uid);
... | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 62,858,750,575,427,740,000,000,000,000,000,000,000 | 37 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
push_node_to_stack (class ipa_topo_info *topo, struct cgraph_node *node)
{
class ipa_node_params *info = IPA_NODE_REF (node);
if (info->node_enqueued)
return;
info->node_enqueued = 1;
topo->stack[topo->stack_top++] = node;
} | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 182,261,370,500,653,520,000,000,000,000,000,000,000 | 8 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
int ssl3_client_hello(SSL *s)
{
unsigned char *buf;
unsigned char *p,*d;
int i;
unsigned long Time,l;
#ifndef OPENSSL_NO_COMP
int j;
SSL_COMP *comp;
#endif
buf=(unsigned char *)s->init_buf->data;
if (s->state == SSL3_ST_CW_CLNT_HELLO_A)
{
SSL_SESSION *sess = s->session;
if ((sess == NULL) ||
(sess->s... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 257,767,973,091,449,850,000,000,000,000,000,000,000 | 122 | Add Next Protocol Negotiation. |
int wc_RsaDirect(byte* in, word32 inLen, byte* out, word32* outSz,
RsaKey* key, int type, WC_RNG* rng)
{
int ret;
if (in == NULL || outSz == NULL || key == NULL) {
return BAD_FUNC_ARG;
}
/* sanity check on type of RSA operation */
switch (type) {
case RSA_PUBLIC_ENCRYPT:
... | 0 | [
"CWE-310",
"CWE-787"
] | wolfssl | fb2288c46dd4c864b78f00a47a364b96a09a5c0f | 85,782,067,837,466,130,000,000,000,000,000,000,000 | 82 | RSA-PSS: Handle edge case with encoding message to hash
When the key is small relative to the digest (1024-bit key, 64-byte
hash, 61-byte salt length), the internal message to hash is larger than
the output size.
Allocate a buffer for the message when this happens. |
void WebContents::ReadyToCommitNavigation(
content::NavigationHandle* navigation_handle) {
// Don't focus content in an inactive window.
if (!owner_window())
return;
#if defined(OS_MAC)
if (!owner_window()->IsActive())
return;
#else
if (!owner_window()->widget()->IsActive())
return;
#endif
// ... | 0 | [] | electron | ea1f402417022c59c0794e97c87e6be2553989e7 | 247,758,521,822,391,900,000,000,000,000,000,000,000 | 20 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323) (#33350)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary mai... |
int HevcPpsUnit::deserialize()
{
int rez = HevcUnit::deserialize();
if (rez)
return rez;
try
{
pps_id = extractUEGolombCode();
if (pps_id > 63)
return 1;
sps_id = extractUEGolombCode();
if (sps_id > 15)
return 1;
dependent_slice_se... | 0 | [
"CWE-22"
] | tsMuxer | 3763dd34755a8944d903aa19578fa22cd3734165 | 40,150,450,238,854,880,000,000,000,000,000,000,000 | 25 | Fix Buffer Overflow
Fixes issue #509. |
static void cassignop(JF, js_Ast *exp, int opcode)
{
js_Ast *lhs = exp->a;
js_Ast *rhs = exp->b;
cassignop1(J, F, lhs);
cexp(J, F, rhs);
emitline(J, F, exp);
emit(J, F, opcode);
cassignop2(J, F, lhs, 0);
} | 0 | [
"CWE-703",
"CWE-787"
] | mujs | df8559e7bdbc6065276e786217eeee70f28fce66 | 73,689,760,203,931,615,000,000,000,000,000,000,000 | 10 | Bug 704749: Clear jump list after patching jump addresses.
Since we can emit a statement multiple times when compiling try/finally
we have to use a new patch list for each instance. |
QPDFWriter::writeStringNoQDF(std::string const& str)
{
if (! this->qdf_mode)
{
writeString(str);
}
} | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 8249a26d69f72b9cda584c14cc3f12769985e481 | 131,108,035,836,441,030,000,000,000,000,000,000,000 | 7 | Fix infinite loop in QPDFWriter (fixes #143) |
static void mem_cgroup_clear_mc(void)
{
struct mem_cgroup *from = mc.from;
/*
* we must clear moving_task before waking up waiters at the end of
* task migration.
*/
mc.moving_task = NULL;
__mem_cgroup_clear_mc();
spin_lock(&mc.lock);
mc.from = NULL;
mc.to = NULL;
spin_unlock(&mc.lock);
mem_cgroup_end_m... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 204,193,280,281,989,600,000,000,000,000,000,000,000 | 16 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static int decode_hextile(VmncContext *c, uint8_t* dst, GetByteContext *gb,
int w, int h, int stride)
{
int i, j, k;
int bg = 0, fg = 0, rects, color, flags, xy, wh;
const int bpp = c->bpp2;
uint8_t *dst2;
int bw = 16, bh = 16;
for (j = 0; j < h; j += 16) {
dst... | 1 | [
"CWE-703"
] | FFmpeg | 6ba02602aa7fc7d38db582e75b8b093fb3c1608d | 289,253,306,481,859,200,000,000,000,000,000,000,000 | 58 | avcodec/vmnc: Check that rectangles are within the picture
Prevents out of array accesses with CODEC_FLAG_EMU_EDGE
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
int
router_load_routers_from_string(const char *s, const char *eos,
saved_location_t saved_location,
smartlist_t *requested_fingerprints,
int descriptor_digests,
const char *prepend_annotation... | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 298,475,330,435,477,880,000,000,000,000,000,000,000 | 94 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
cmsBool Type_Text_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsMLU* mlu = (cmsMLU*) Ptr;
cmsUInt32Number size;
cmsBool rc;
char* Text;
// Get the size of the string. Note there is an extra "\0" at the end
size = cmsMLUgetASCII(mlu, cmsNo... | 0 | [
"CWE-125"
] | Little-CMS | 5ca71a7bc18b6897ab21d815d15e218e204581e2 | 229,573,195,974,541,830,000,000,000,000,000,000,000 | 25 | Added an extra check to MLU bounds
Thanks to Ibrahim el-sayed for spotting the bug |
OJPEGReadHeaderInfoSecTablesAcTable(TIFF* tif)
{
static const char module[]="OJPEGReadHeaderInfoSecTablesAcTable";
OJPEGState* sp=(OJPEGState*)tif->tif_data;
uint8 m;
uint8 n;
uint8 o[16];
uint32 p;
uint32 q;
uint32 ra;
uint8* rb;
if (sp->actable_offset[0]==0)
{
TIFFErrorExt(tif->tif_clientdata,module,"Mis... | 0 | [
"CWE-772"
] | libtiff | 2ea32f7372b65c24b2816f11c04bf59b5090d05b | 89,531,295,073,344,650,000,000,000,000,000,000,000 | 65 | * libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable,
OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable |
void smbd_notify_cancel_by_smbreq(const struct smb_request *smbreq)
{
struct smbd_server_connection *sconn = smbreq->sconn;
struct notify_mid_map *map;
for (map = sconn->smb1.notify_mid_maps; map; map = map->next) {
if (map->req->req == smbreq) {
break;
}
}
if (map == NULL) {
return;
}
smbd_notify_ca... | 0 | [
"CWE-266"
] | samba | 5dd4c789c13035b805fdd2c3a9c38721657b05b3 | 197,873,660,544,430,560,000,000,000,000,000,000,000 | 17 | s3: smbd: Ensure change notifies can't get set unless the directory handle is open for SEC_DIR_LIST.
Remove knownfail entry.
CVE-2020-14318
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434
Signed-off-by: Jeremy Allison <jra@samba.org> |
static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
{
int alen;
int blksize;
struct ip_esp_hdr *esph;
struct crypto_aead *aead;
struct esp_info esp;
esp.inplace = true;
esp.proto = *skb_mac_header(skb);
*skb_mac_header(skb) = IPPROTO_ESP;
/* skb is pure payload to encrypt */
aead = x->data;
... | 0 | [
"CWE-787"
] | linux | ebe48d368e97d007bfeb76fcb065d6cfc4c96645 | 270,057,264,728,803,620,000,000,000,000,000,000,000 | 49 | esp: Fix possible buffer overflow in ESP transformation
The maximum message size that can be send is bigger than
the maximum site that skb_page_frag_refill can allocate.
So it is possible to write beyond the allocated buffer.
Fix this by doing a fallback to COW in that case.
v2:
Avoid get get_order() costs as sugg... |
static int vhdx_get_info(BlockDriverState *bs, BlockDriverInfo *bdi)
{
BDRVVHDXState *s = bs->opaque;
bdi->cluster_size = s->block_size;
bdi->unallocated_blocks_are_zero =
(s->params.data_bits & VHDX_PARAMS_HAS_PARENT) == 0;
return 0;
} | 0 | [
"CWE-835"
] | qemu | 1d7678dec4761acdc43439da6ceda41a703ba1a6 | 267,904,198,653,290,840,000,000,000,000,000,000,000 | 11 | vhdx: Bounds checking for block_size and logical_sector_size (CVE-2014-0148)
Other variables (e.g. sectors_per_block) are calculated using these
variables, and if not range-checked illegal values could be obtained
causing infinite loops and other potential issues when calculating
BAT entries.
The 1.00 VHDX spec requi... |
static int get_cluster_duration(MOVTrack *track, int cluster_idx)
{
int64_t next_dts;
if (cluster_idx >= track->entry)
return 0;
if (cluster_idx + 1 == track->entry)
next_dts = track->track_duration + track->start_dts;
else
next_dts = track->cluster[cluster_idx + 1].dts;
n... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 45,701,911,370,384,330,000,000,000,000,000,000,000 | 19 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static void Sp_charAt(js_State *J)
{
char buf[UTFmax + 1];
const char *s = checkstring(J, 0);
int pos = js_tointeger(J, 1);
Rune rune = js_runeat(J, s, pos);
if (rune > 0) {
buf[runetochar(buf, &rune)] = 0;
js_pushstring(J, buf);
} else {
js_pushliteral(J, "");
}
} | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | mujs | 00d4606c3baf813b7b1c176823b2729bf51002a2 | 209,786,117,330,813,060,000,000,000,000,000,000,000 | 13 | Bug 700937: Limit recursion in regexp matcher.
Also handle negative return code as an error in the JS bindings. |
kg_seal_iov(OM_uint32 *minor_status,
gss_ctx_id_t context_handle,
int conf_req_flag,
gss_qop_t qop_req,
int *conf_state,
gss_iov_buffer_desc *iov,
int iov_count,
int toktype)
{
krb5_gss_ctx_id_rec *ctx;
krb5_error_code code;
... | 0 | [
"CWE-703"
] | krb5 | 82dc33da50338ac84c7b4102dc6513d897d0506a | 23,483,519,248,896,500,000,000,000,000,000,000,000 | 54 | Fix gss_process_context_token() [CVE-2014-5352]
[MITKRB5-SA-2015-001] The krb5 gss_process_context_token() should not
actually delete the context; that leaves the caller with a dangling
pointer and no way to know that it is invalid. Instead, mark the
context as terminated, and check for terminated contexts in the GSS... |
CImg<T>& draw_axes(const float x0, const float x1, const float y0, const float y1,
const tc *const color, const float opacity=1,
const int subdivisionx=-60, const int subdivisiony=-60,
const float precisionx=0, const float precisiony=0,
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 221,853,680,009,284,270,000,000,000,000,000,000,000 | 24 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.