func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
bool CModules::OnDeop2(const CNick* pOpNick, const CNick& Nick, CChan& Channel, bool bNoChange) { MODUNLOADCHK(OnDeop2(pOpNick, Nick, Channel, bNoChange)); return false; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
129,576,537,158,944,630,000,000,000,000,000,000,000
5
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
_gcry_ecc_eddsa_sign (gcry_mpi_t input, ECC_secret_key *skey, gcry_mpi_t r_r, gcry_mpi_t s, int hashalgo, gcry_mpi_t pk) { int rc; mpi_ec_t ctx = NULL; int b; unsigned int tmp; unsigned char *digest = NULL; gcry_buffer_t hvec[3]; const void *mbuf; size_t mlen; unsigned char *rawm...
0
[ "CWE-200" ]
libgcrypt
5a22de904a0a366ae79f03ff1e13a1232a89e26b
192,408,209,189,591,340,000,000,000,000,000,000,000
145
ecc: Store EdDSA session key in secure memory. * cipher/ecc-eddsa.c (_gcry_ecc_eddsa_sign): use mpi_snew to allocate session key. -- An attacker who learns the EdDSA session key from side-channel observation during the signing process, can easily revover the long- term secret key. Storing the session key in secure me...
int samdb_msg_add_hashes(struct ldb_context *ldb, TALLOC_CTX *mem_ctx, struct ldb_message *msg, const char *attr_name, struct samr_Password *hashes, unsigned int count) { struct ldb_val val; unsigned int i; val.data = talloc_array_size(mem_ctx, 16, count); val.length = count*16; if (!val.data) { retu...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
337,129,645,022,209,420,000,000,000,000,000,000,000
17
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static void l2cap_sock_teardown_cb(struct l2cap_chan *chan, int err) { struct sock *sk = chan->data; struct sock *parent; BT_DBG("chan %p state %s", chan, state_to_string(chan->state)); /* This callback can be called both for server (BT_LISTEN) * sockets as well as "normal" ones. To avoid lockdep warnings * w...
1
[ "CWE-787" ]
linux
1bff51ea59a9afb67d2dd78518ab0582a54a472c
285,330,128,455,132,520,000,000,000,000,000,000,000
50
Bluetooth: fix use-after-free error in lock_sock_nested() use-after-free error in lock_sock_nested is reported: [ 179.140137][ T3731] ===================================================== [ 179.142675][ T3731] BUG: KMSAN: use-after-free in lock_sock_nested+0x280/0x2c0 [ 179.145494][ T3731] CPU: 4 PID: 3731 Comm: k...
static void btrfs_split_extent_hook(struct inode *inode, struct extent_state *orig, u64 split) { /* not delalloc, ignore it */ if (!(orig->state & EXTENT_DELALLOC)) return; spin_lock(&BTRFS_I(inode)->lock); BTRFS_I(inode)->outstanding_extents++; spin_unlock(&BTRFS_I(inode)->lock); }
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
300,265,360,316,561,350,000,000,000,000,000,000,000
11
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
int get_extraction_flag() { return marker & EXTRACTION_MASK; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
38,265,830,682,909,833,000,000,000,000,000,000,000
2
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
PyMODINIT_FUNC PyInit_curvemath(void) { PyObject * m = PyModule_Create(&moduledef); return m; }
0
[ "CWE-347" ]
fastecdsa
e592f106edd5acf6dacedfab2ad16fe6c735c9d1
3,411,253,064,543,065,000,000,000,000,000,000,000
4
Properly handle the point at infinity
static pyc_object *get_float_object(RBuffer *buffer) { pyc_object *ret = NULL; bool error = false; ut32 size = 0; ut8 n = get_ut8 (buffer, &error); if (error) { return NULL; } ret = R_NEW0 (pyc_object); if (!ret) { return NULL; } ut8 *s = malloc (n + 1); if (!s) { free (ret); return NULL; } /* obj...
0
[ "CWE-416" ]
radare2
8525ad0b9fd596f4b251bb3d7b114e6dc7ce1ee8
320,617,728,704,504,830,000,000,000,000,000,000,000
30
Fix bins/*/rep8 - UAF crash in pyc parser ##crash * Reported by Cen Zhang via huntr.dev
int copy_huge_pmd(struct mm_struct *dst_mm, struct mm_struct *src_mm, pmd_t *dst_pmd, pmd_t *src_pmd, unsigned long addr, struct vm_area_struct *vma) { spinlock_t *dst_ptl, *src_ptl; struct page *src_page; pmd_t pmd; pgtable_t pgtable = NULL; int ret = -ENOMEM; /* Skip if can be re-fill on fault */ if (...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
126,604,500,501,634,000,000,000,000,000,000,000,000
88
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...
static int pick_link(struct nameidata *nd, struct path *link, struct inode *inode, unsigned seq) { int error; struct saved *last; if (unlikely(nd->total_link_count++ >= MAXSYMLINKS)) { path_to_nameidata(link, nd); return -ELOOP; } if (!(nd->flags & LOOKUP_RCU)) { if (link->mnt == nd->path.mnt) mntg...
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
149,044,945,059,907,630,000,000,000,000,000,000,000
33
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
static void exif_process_TIFF_in_JPEG(image_info_type *ImageInfo, char *CharBuf, size_t length, size_t displacement) { unsigned exif_value_2a, offset_of_ifd; /* set the thumbnail stuff to nothing so we can test to see if they get set up */ if (memcmp(CharBuf, "II", 2) == 0) { ImageInfo->motorola_intel = 0; } els...
1
[ "CWE-125" ]
php-src
0c77b4307df73217283a4aaf9313e1a33a0967ff
83,047,315,946,140,310,000,000,000,000,000,000,000
43
Fixed bug #79282
process_owned_by(Relation seqrel, List *owned_by, bool for_identity) { DependencyType deptype; int nnames; Relation tablerel; AttrNumber attnum; deptype = for_identity ? DEPENDENCY_INTERNAL : DEPENDENCY_AUTO; nnames = list_length(owned_by); Assert(nnames > 0); if (nnames == 1) { /* Must be OWNED BY NONE ...
0
[ "CWE-94" ]
postgres
5721da7e41e7a280587bda29cd1674c7da3317f8
193,932,656,892,098,550,000,000,000,000,000,000,000
107
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...
PackLinuxElf32ppc::~PackLinuxElf32ppc() { }
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
241,741,251,564,033,530,000,000,000,000,000,000,000
3
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
video_usercopy(struct file *file, unsigned int cmd, unsigned long arg, v4l2_kioctl func) { char sbuf[128]; void *mbuf = NULL; void *parg = (void *)arg; long err = -EINVAL; bool has_array_args; size_t array_size = 0; void __user *user_ptr = NULL; void **kernel_ptr = NULL; /* Copy arguments into t...
0
[ "CWE-399" ]
linux
fc0a80798576f80ca10b3f6c9c7097f12fd1d64e
266,589,838,160,124,330,000,000,000,000,000,000,000
90
[media] v4l: Share code between video_usercopy and video_ioctl2 The two functions are mostly identical. They handle the copy_from_user and copy_to_user operations related with V4L2 ioctls and call the real ioctl handler. Create a __video_usercopy function that implements the core of video_usercopy and video_ioctl2, a...
bool LEX::sp_continue_statement(THD *thd, const LEX_CSTRING *label_name, Item *when) { sp_label *lab= spcont->find_label(label_name); if (!lab || lab->type != sp_label::ITERATION) { my_error(ER_SP_LILABEL_MISMATCH, MYF(0), "CONTINUE", label_name->str); return true; } re...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
339,090,208,213,379,260,000,000,000,000,000,000,000
11
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static void svm_decache_cr4_guest_bits(struct kvm_vcpu *vcpu) { }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
12,581,883,610,512,936,000,000,000,000,000,000,000
3
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static void crypto_ccm_exit_tfm(struct crypto_aead *tfm) { struct crypto_ccm_ctx *ctx = crypto_aead_ctx(tfm); crypto_free_ahash(ctx->mac); crypto_free_skcipher(ctx->ctr); }
0
[ "CWE-119", "CWE-787" ]
linux
3b30460c5b0ed762be75a004e924ec3f8711e032
202,780,311,216,701,670,000,000,000,000,000,000,000
7
crypto: ccm - move cbcmac input off the stack Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver") refactored the CCM driver to allow separate implementations of the underlying MAC to be provided by a platform. However, in doing so, it moved some data from the linear region to the stack, which violat...
jpeg_finish_output(j_decompress_ptr cinfo) { if ((cinfo->global_state == DSTATE_SCANNING || cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { /* Terminate this pass. */ /* We do not require the whole pass to have been completed. */ (*cinfo->master->finish_output_pass) (cinfo); c...
0
[]
libjpeg-turbo
6d2e8837b440ce4d8befd805a5abc0d351028d70
124,409,932,494,746,240,000,000,000,000,000,000,000
21
jpeg_skip_scanlines(): Avoid NULL + 0 UBSan error This error occurs at the call to (*cinfo->cconvert->color_convert)() in sep_upsample() whenever cinfo->upsample->need_context_rows == TRUE (i.e. whenever h2v2 or h1v2 fancy upsampling is used.) The error is innocuous, since (*cinfo->cconvert->color_convert)() points t...
void afterErrorReply(client *c, const char *s, size_t len) { /* Sometimes it could be normal that a slave replies to a master with * an error and this function gets called. Actually the error will never * be sent because addReply*() against master clients has no effect... * A notable example is: ...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
223,270,903,133,815,470,000,000,000,000,000,000,000
39
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
static int emulator_get_cpl(struct x86_emulate_ctxt *ctxt) { return kvm_x86_ops->get_cpl(emul_to_vcpu(ctxt)); }
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
307,290,560,085,655,420,000,000,000,000,000,000,000
4
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
void HEVC_RewriteESDescriptorEx(GF_MPEGVisualSampleEntryBox *hevc, GF_MediaBox *mdia) { GF_BitRateBox *btrt = gf_isom_sample_entry_get_bitrate((GF_SampleEntryBox *)hevc, GF_FALSE); if (hevc->emul_esd) gf_odf_desc_del((GF_Descriptor *)hevc->emul_esd); hevc->emul_esd = gf_odf_desc_esd_new(2); hevc->emul_esd->decoder...
0
[ "CWE-119", "CWE-787" ]
gpac
90dc7f853d31b0a4e9441cba97feccf36d8b69a4
23,969,309,970,456,236,000,000,000,000,000,000,000
47
fix some exploitable overflows (#994, #997)
static void rt_set_nexthop(struct rtable *rt, __be32 daddr, const struct fib_result *res, struct fib_nh_exception *fnhe, struct fib_info *fi, u16 type, u32 itag, const bool do_cache) { bool cached = false; if (fi) { struct fib_nh_common *nhc = FIB_RES_NHC(*res); if (nhc->nhc_gw_family &&...
0
[ "CWE-327" ]
linux
aa6dd211e4b1dde9d5dc25d699d35f789ae7eeba
276,755,473,987,162,730,000,000,000,000,000,000,000
58
inet: use bigger hash table for IP ID generation In commit 73f156a6e8c1 ("inetpeer: get rid of ip_id_count") I used a very small hash table that could be abused by patient attackers to reveal sensitive information. Switch to a dynamic sizing, depending on RAM size. Typical big hosts will now use 128x more storage (2...
impl_permission_manager_add (EphyPermissionManager *manager, const char *host, const char *type, EphyPermission permission) { }
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
152,593,855,823,725,450,000,000,000,000,000,000,000
6
Report broken certs through the padlock icon This uses a new feature in libsoup that reports through a SoupMessageFlag whether the message is talking to a server that has a trusted server. Bug #600663
mod_tree_less(struct latch_tree_node *a, struct latch_tree_node *b) { return __mod_tree_val(a) < __mod_tree_val(b); }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
193,849,302,150,962,150,000,000,000,000,000,000,000
4
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
void TLSWrap::Start(const FunctionCallbackInfo<Value>& args) { TLSWrap* wrap; ASSIGN_OR_RETURN_UNWRAP(&wrap, args.Holder()); CHECK(!wrap->started_); wrap->started_ = true; // Send ClientHello handshake CHECK(wrap->is_client()); // Seems odd to read when when we want to send, but SSL_read() triggers a ...
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
14,796,046,272,765,414,000,000,000,000,000,000,000
16
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
static void fts3SegWriterFree(SegmentWriter *pWriter){ if( pWriter ){ sqlite3_free(pWriter->aData); sqlite3_free(pWriter->zMalloc); fts3NodeFree(pWriter->pTree); sqlite3_free(pWriter); } }
0
[ "CWE-787" ]
sqlite
c72f2fb7feff582444b8ffdc6c900c69847ce8a9
138,212,714,859,850,200,000,000,000,000,000,000,000
8
More improvements to shadow table corruption detection in FTS3. FossilOrigin-Name: 51525f9c3235967bc00a090e84c70a6400698c897aa4742e817121c725b8c99d
processDataRcvd_regexFraming(ptcpsess_t *const __restrict__ pThis, char **const buff, struct syslogTime *const stTime, const time_t ttGenTime, multi_submit_t *const pMultiSub, unsigned *const __restrict__ pnMsgs) { DEFiRet; const instanceConf_t *const inst = pThis->pLstn->pSrv->inst; assert(inst->startRegex != ...
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
84,401,778,993,696,880,000,000,000,000,000,000,000
46
net bugfix: potential buffer overrun
static int_fast32_t pgx_getword(jas_stream_t *in, bool bigendian, int prec) { uint_fast32_t val; int i; int j; int c; int wordsize; wordsize = (prec + 7) / 8; if (prec > 32) { goto error; } val = 0; for (i = 0; i < wordsize; ++i) { if ((c = jas_stream_getc(in)) == EOF) { goto error; } j = bigend...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
69,115,204,989,288,480,000,000,000,000,000,000,000
28
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
static int vm_stat_get_per_vm_open(struct inode *inode, struct file *file) { __simple_attr_check_format("%llu\n", 0ull); return kvm_debugfs_open(inode, file, vm_stat_get_per_vm, vm_stat_clear_per_vm, "%llu\n"); }
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
299,013,911,576,079,900,000,000,000,000,000,000,000
6
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
static int compat_do_arpt_set_ctl(struct sock *sk, int cmd, void __user *user, unsigned int len) { int ret; if (!ns_capable(sock_net(sk)->user_ns, CAP_NET_ADMIN)) return -EPERM; switch (cmd) { case ARPT_SO_SET_REPLACE: ret = compat_do_replace(sock_net(sk), user, len); break; case ARPT_SO_SET_ADD_COU...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
192,105,712,269,038,520,000,000,000,000,000,000,000
23
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
static struct sched_domain *__build_mc_sched_domain(struct s_data *d, const struct cpumask *cpu_map, struct sched_domain_attr *attr, struct sched_domain *parent, int i) { struct sched_domain *sd = parent; #ifdef CONFIG_SCHED_MC sd = &per_cpu(core_domains, i).sd; SD_INIT(sd, MC); set_domain_attribute(sd, attr); c...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
188,983,473,151,378,660,000,000,000,000,000,000,000
16
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){ Vdbe *v = pParse->pVdbe; /* The VM under construction */ int op; /* The opcode being coded */ int inReg = target; /* Results stored in register inReg */ int regFree1 = 0; /* If non-zero free this temporary regist...
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
269,531,654,733,727,950,000,000,000,000,000,000,000
744
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
validate_cursor_col(void) { colnr_T off; colnr_T col; int width; validate_virtcol(); if (!(curwin->w_valid & VALID_WCOL)) { col = curwin->w_virtcol; off = curwin_col_off(); col += off; width = curwin->w_width - off + curwin_col_off2(); // long line wrapping, adjust curwin->w_wrow if ...
0
[ "CWE-122" ]
vim
777e7c21b7627be80961848ac560cb0a9978ff43
335,498,562,105,619,060,000,000,000,000,000,000,000
32
patch 8.2.3564: invalid memory access when scrolling without valid screen Problem: Invalid memory access when scrolling without a valid screen. Solution: Do not set VALID_BOTLINE in w_valid.
TEST_F(QueryPlannerTest, HintedBlockingSortIndexFilteredOut) { params.options = QueryPlannerParams::NO_BLOCKING_SORT; addIndex(BSON("a" << 1)); addIndex(BSON("b" << 1)); runQueryAsCommand( fromjson("{find: 'testns', filter: {a: 1, b: 1}, sort: {b: 1}, hint: {a: 1}}")); assertNumSolutions(0U)...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
208,017,026,680,893,030,000,000,000,000,000,000,000
8
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
plugin_can_flush (struct backend *b, struct connection *conn) { struct backend_plugin *p = container_of (b, struct backend_plugin, backend); assert (connection_get_handle (conn, 0)); if (p->plugin.can_flush) return p->plugin.can_flush (connection_get_handle (conn, 0)); else return p->plugin.flush || p...
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
313,197,643,064,513,180,000,000,000,000,000,000,000
11
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
static int write_pbkdf2_params(ASN1_TYPE pbes2_asn, const struct pbkdf2_params *kdf_params) { int result; ASN1_TYPE pbkdf2_asn = ASN1_TYPE_EMPTY; opaque tmp[64]; /* Write the key derivation algorithm */ result = asn1_write_value(pbes2_asn, "keyDerivationFunc.algorithm", PBKDF2_O...
0
[]
gnutls
112d537da5f3500f14316db26d18c37d678a5e0e
217,426,515,260,410,500,000,000,000,000,000,000,000
96
some changes for 64bit machines.
static int io_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe, bool is_timeout_link) { struct io_timeout_data *data; unsigned flags; u32 off = READ_ONCE(sqe->off); if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (sqe->ioprio || sqe->buf_index || sqe->len != 1 || ...
1
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
136,167,622,586,068,100,000,000,000,000,000,000,000
57
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs) { struct file *file = iocb->ki_filp; struct address_space *mapping = file->f_mapping; ssize_t retval; size_t write_len; pgoff_t end = 0; /* silence gcc */ /* * If it's a write, unmap all mmappings...
0
[ "CWE-20" ]
linux
124d3b7041f9a0ca7c43a6293e1cae4576c32fd5
338,867,771,114,743,900,000,000,000,000,000,000,000
54
fix writev regression: pan hanging unkillable and un-straceable Frederik Himpe reported an unkillable and un-straceable pan process. Zero length iovecs can go into an infinite loop in writev, because the iovec iterator does not always advance over them. The sequence required to trigger this is not trivial. I think i...
uint64 FastAttrValueHash(const AttrValue& a) { return AttrValueHash(a, FastTensorProtoHash); }
0
[ "CWE-369", "CWE-674" ]
tensorflow
e07e1c3d26492c06f078c7e5bf2d138043e199c1
288,858,852,088,631,350,000,000,000,000,000,000,000
3
Prevent memory overflow in ParseAttrValue from nested tensors. PiperOrigin-RevId: 370108442 Change-Id: I84d64a5e8895a6aeffbf4749841b4c54d51b5889
void blk_rq_init(struct request_queue *q, struct request *rq) { memset(rq, 0, sizeof(*rq)); INIT_LIST_HEAD(&rq->queuelist); rq->q = q; rq->__sector = (sector_t) -1; INIT_HLIST_NODE(&rq->hash); RB_CLEAR_NODE(&rq->rb_node); rq->tag = -1; rq->internal_tag = -1; rq->start_time_ns = ktime_get_ns(); rq->part = NUL...
0
[ "CWE-416" ]
linux
c3e2219216c92919a6bd1711f340f5faa98695e6
138,248,731,588,785,980,000,000,000,000,000,000,000
14
block: free sched's request pool in blk_cleanup_queue In theory, IO scheduler belongs to request queue, and the request pool of sched tags belongs to the request queue too. However, the current tags allocation interfaces are re-used for both driver tags and sched tags, and driver tags is definitely host wide, and doe...
static void print_res_top(MYSQL_RES *result) { uint i,length; MYSQL_FIELD *field; putchar('+'); mysql_field_seek(result,0); while((field = mysql_fetch_field(result))) { if ((length= strlen(field->name)) > field->max_length) field->max_length=length; else length=field->max_length; fo...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
61,154,494,511,196,520,000,000,000,000,000,000,000
19
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
void CLASS bad_pixels (const char *cfname) { FILE *fp=0; char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; if (!filters) return; if (cfname) fp = fopen (cfname, "r"); else { for (len=32 ; ; len *= 2) { fname = (char *) malloc (len); if (!fname) return; ...
0
[ "CWE-189" ]
rawstudio
983bda1f0fa5fa86884381208274198a620f006e
228,725,553,816,731,660,000,000,000,000,000,000,000
55
Avoid overflow in ljpeg_start().
miShmPutImage(dst, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data) DrawablePtr dst; GCPtr pGC; int depth, w, h, sx, sy, sw, sh, dx, dy; unsigned int format; char *data; { PixmapPtr pmap; GCPtr putGC; putGC = GetScratchGC(depth, dst->pScreen); if (!putGC) return; pmap ...
0
[ "CWE-189" ]
xserver
be6c17fcf9efebc0bbcc3d9a25f8c5a2450c2161
237,244,735,243,044,200,000,000,000,000,000,000,000
32
CVE-2007-6429: Always test for size+offset wrapping.
static int ext4_create_inline_data(handle_t *handle, struct inode *inode, unsigned len) { int error; void *value = NULL; struct ext4_xattr_ibody_find is = { .s = { .not_found = -ENODATA, }, }; struct ext4_xattr_info i = { .name_index = EXT4_XATTR_INDEX_SYSTEM, .name = EXT4_XATTR_SYSTEM_DATA, }; err...
0
[ "CWE-416" ]
linux
117166efb1ee8f13c38f9e96b258f16d4923f888
49,919,708,446,177,260,000,000,000,000,000,000,000
63
ext4: do not allow external inodes for inline data The inline data feature was implemented before we added support for external inodes for xattrs. It makes no sense to support that combination, but the problem is that there are a number of extended attribute checks that are skipped if e_value_inum is non-zero. Unfor...
void allocHealthChecker(const std::string& yaml) { health_checker_ = std::make_shared<TcpHealthCheckerImpl>( *cluster_, parseHealthCheckFromV3Yaml(yaml), dispatcher_, runtime_, random_, HealthCheckEventLoggerPtr(event_logger_storage_.release())); }
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
325,052,823,197,948,820,000,000,000,000,000,000,000
5
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static int hidpp_initialize_battery(struct hidpp_device *hidpp) { static atomic_t battery_no = ATOMIC_INIT(0); struct power_supply_config cfg = { .drv_data = hidpp }; struct power_supply_desc *desc = &hidpp->battery.desc; enum power_supply_property *battery_props; struct hidpp_battery *battery; unsigned int num_b...
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
36,853,054,128,769,383,000,000,000,000,000,000,000
77
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static double mp_prod(_cimg_math_parser& mp) { const unsigned int i_end = (unsigned int)mp.opcode[2]; double val = _mp_arg(3); for (unsigned int i = 4; i<i_end; ++i) val*=_mp_arg(i); return val; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
25,900,818,117,019,405,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 kvm_arch_destroy_vm(struct kvm *kvm) { if (current->mm == kvm->mm) { /* * Free memory regions allocated on behalf of userspace, * unless the the memory map has changed due to process exit * or fd copying. */ struct kvm_userspace_memory_region mem; memset(&mem, 0, sizeof(mem)); mem.slot = APIC_...
0
[ "CWE-119", "CWE-703", "CWE-120" ]
linux
a08d3b3b99efd509133946056531cdf8f3a0c09b
8,529,399,753,417,746,000,000,000,000,000,000,000
29
kvm: x86: fix emulator buffer overflow (CVE-2014-0049) The problem occurs when the guest performs a pusha with the stack address pointing to an mmio address (or an invalid guest physical address) to start with, but then extending into an ordinary guest physical address. When doing repeated emulated pushes emulator_re...
void Compute(OpKernelContext* context) override { // Checks what we're remapping and inverts the relevant remapping Tensors to // be maps with key = old ID, value = new ID. std::unordered_map<int64, int64> old_row_to_new_row_map; std::vector<bool> row_id_present; const Tensor* row_remapping_t; ...
1
[ "CWE-617", "CWE-369" ]
tensorflow
77dd114513d7796e1e2b8aece214a380af26fbf4
52,693,165,629,132,470,000,000,000,000,000,000,000
226
Fix a check fail PiperOrigin-RevId: 372011072 Change-Id: I1062cfaed0aa16884e9a16312483794d188db76f
static int ms_read_bytes(struct rtsx_usb_ms *host, u8 tpc, u8 cfg, u8 cnt, u8 *data, u8 *int_reg) { struct rtsx_ucr *ucr = host->ucr; int err, i; u8 *ptr; dev_dbg(ms_dev(host), "%s: tpc = 0x%02x\n", __func__, tpc); rtsx_usb_init_cmd(ucr); rtsx_usb_add_cmd(ucr, WRITE_REG_CMD, MS_TPC, 0xFF, tpc); rtsx_usb_add...
0
[ "CWE-416" ]
linux
42933c8aa14be1caa9eda41f65cde8a3a95d3e39
258,735,760,856,662,800,000,000,000,000,000,000,000
72
memstick: rtsx_usb_ms: fix UAF This patch fixes the following issues: 1. memstick_free_host() will free the host, so the use of ms_dev(host) after it will be a problem. To fix this, move memstick_free_host() after when we are done with ms_dev(host). 2. In rtsx_usb_ms_drv_remove(), pm need to be disabled before we remo...
isNumeric(char *source) { char *next = 0; long value = strtol(source, &next, 0); int result = (next == 0 || next == source || *next != '\0') ? 0 : 1; (void) value; return result; }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
209,949,202,397,758,730,000,000,000,000,000,000,000
8
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
file_tryelf(struct magic_set *ms, const struct buffer *b) { int fd = b->fd; const unsigned char *buf = b->fbuf; size_t nbytes = b->flen; union { int32_t l; char c[sizeof(int32_t)]; } u; int clazz; int swap; struct stat st; off_t fsize; int flags = 0; Elf32_Ehdr elf32hdr; Elf64_Ehdr elf64hdr; uint16_t t...
0
[ "CWE-125" ]
file
a642587a9c9e2dd7feacdf513c3643ce26ad3c22
263,338,804,747,596,050,000,000,000,000,000,000,000
70
Avoid reading past the end of buffer (Rui Reis)
bool self_get(JSContext *cx, unsigned argc, Value *vp) { CallArgs args = CallArgsFromVp(argc, vp); args.rval().setObject(*JS::CurrentGlobalOrNull(cx)); return true; }
0
[ "CWE-94" ]
js-compute-runtime
65524ffc962644e9fc39f4b368a326b6253912a9
20,719,837,583,104,692,000,000,000,000,000,000,000
5
use rangom_get instead of arc4random as arc4random does not work correctly with wizer wizer causes the seed in arc4random to be the same between executions which is not random
static int tty_driver_install_tty(struct tty_driver *driver, struct tty_struct *tty) { return driver->ops->install ? driver->ops->install(driver, tty) : tty_standard_install(driver, tty); }
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
104,270,625,519,706,710,000,000,000,000,000,000,000
6
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
f_listener_add(typval_T *argvars, typval_T *rettv) { callback_T callback; listener_T *lnr; buf_T *buf = curbuf; if (in_vim9script() && check_for_opt_buffer_arg(argvars, 1) == FAIL) return; callback = get_callback(&argvars[0]); if (callback.cb_name == NULL) return; if (argvars[1].v_type ...
0
[ "CWE-120" ]
vim
7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97
287,883,882,196,314,470,000,000,000,000,000,000,000
37
patch 8.2.4969: changing text in Visual mode may cause invalid memory access Problem: Changing text in Visual mode may cause invalid memory access. Solution: Check the Visual position after making a change.
static int r_bin_file_set_bytes(RBinFile *binfile, const ut8 *bytes, ut64 sz, bool steal_ptr) { if (!bytes) { return false; } r_buf_free (binfile->buf); binfile->buf = r_buf_new (); #if LIMIT_SIZE if (sz > 1024 * 1024) { eprintf ("Too big\n"); // TODO: use r_buf_io instead of setbytes all the time to save me...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
252,372,770,923,587,750,000,000,000,000,000,000,000
21
Fix #8748 - Fix oobread on string search
int ext4_map_blocks(handle_t *handle, struct inode *inode, struct ext4_map_blocks *map, int flags) { struct extent_status es; int retval; int ret = 0; #ifdef ES_AGGRESSIVE_TEST struct ext4_map_blocks orig_map; memcpy(&orig_map, map, sizeof(*map)); #endif map->m_flags = 0; ext_debug("ext4_map_blocks(): in...
1
[ "CWE-200" ]
linux
06bd3c36a733ac27962fea7d6f47168841376824
271,913,401,432,109,800,000,000,000,000,000,000,000
222
ext4: fix data exposure after a crash Huang has reported that in his powerfail testing he is seeing stale block contents in some of recently allocated blocks although he mounts ext4 in data=ordered mode. After some investigation I have found out that indeed when delayed allocation is used, we don't add inode to transa...
static int cap_task_wait(struct task_struct *p) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
283,939,555,992,508,760,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static void TIFFSetImageProperties(TIFF *tiff,Image *image, const char *tag,ExceptionInfo *exception) { char buffer[MagickPathExtent], filename[MagickPathExtent]; FILE *file; int unique_file; /* Set EXIF or GPS image properties. */ unique_file=AcquireUniqueFileResource(filename); ...
0
[ "CWE-703", "CWE-787" ]
ImageMagick
30ccf9a0da1f47161b5935a95be854fe84e6c2a2
90,681,462,084,724,990,000,000,000,000,000,000,000
49
squash heap-buffer-overflow, PoC TIFF from Hardik
CURLcode Curl_connected_proxy(struct connectdata *conn, int sockindex) { CURLcode result = CURLE_OK; if(conn->bits.socksproxy) { #ifndef CURL_DISABLE_PROXY /* for the secondary socket (FTP), use the "connect to host" * but ignore the "connect to port" (use the secondary port) */ const char * cons...
0
[ "CWE-119" ]
curl
9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400
83,379,878,422,028,710,000,000,000,000,000,000,000
45
url: fix alignment of ssl_backend_data struct - Align the array of ssl_backend_data on a max 32 byte boundary. 8 is likely to be ok but I went with 32 for posterity should one of the ssl_backend_data structs change to contain a larger sized variable in the future. Prior to this change (since dev 70f1db3, release 7.5...
static char *host_specific_filename(const char *prefix, const char *suffix) { /* * For cluster-wide use, where there is otherwise risk of the same * name being generated on more than one host at once, insert hostname * separated with dots, and return static buffer or NULL on failure. */ static char safename[...
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
284,165,607,163,519,350,000,000,000,000,000,000,000
26
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env) { int num; OnigCodePoint c, c2; const OnigSyntaxType* syn = env->syntax; OnigEncoding enc = env->enc; UChar* prev; UChar* p = *src; PFETCH_READY; if (PEND) { tok->type = TK_EOT; return tok->type; } PFETCH(c); tok->t...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
118,302,369,157,626,850,000,000,000,000,000,000,000
249
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes, const struct sigevent __user *, u_notification) { struct sigevent n, *p = NULL; if (u_notification) { if (copy_from_user(&n, u_notification, sizeof(struct sigevent))) return -EFAULT; p = &n; } return do_mq_notify(mqdes, p); }
0
[ "CWE-416" ]
linux
f991af3daabaecff34684fd51fac80319d1baad1
240,382,797,023,788,500,000,000,000,000,000,000,000
11
mqueue: fix a use-after-free in sys_mq_notify() The retry logic for netlink_attachskb() inside sys_mq_notify() is nasty and vulnerable: 1) The sock refcnt is already released when retry is needed 2) The fd is controllable by user-space because we already release the file refcnt so we when retry but the fd has bee...
zzip_disk_entry_strdup_comment(ZZIP_DISK* disk, struct zzip_disk_entry* entry) { if (! disk || ! entry) return 0; ___ char* text; zzip_size_t len; if ((len = zzip_disk_entry_comment (entry))) text = zzip_disk_entry_to_comment (entry); else return 0; if (disk->buffer > text || text+len > disk->en...
0
[ "CWE-119" ]
zziplib
596d9dfce2624e849417d4301e8d67935608aa5e
248,843,961,513,760,140,000,000,000,000,000,000,000
15
memdisk (.)
static void latm_dmx_check_pid(GF_Filter *filter, GF_LATMDmxCtx *ctx) { u8 *dsi_b; u32 dsi_s, sr, timescale=0; u32 codecid; if (!ctx->opid) { ctx->opid = gf_filter_pid_new(filter); gf_filter_pid_copy_properties(ctx->opid, ctx->ipid); latm_dmx_check_dur(filter, ctx); } if (!GF_M4ASampleRates[ctx->acfg.base_s...
0
[ "CWE-476" ]
gpac
b2db2f99b4c30f96e17b9a14537c776da6cb5dca
165,495,346,712,678,200,000,000,000,000,000,000,000
63
fixed #1728
static uint64_t megasas_mmio_read(void *opaque, hwaddr addr, unsigned size) { MegasasState *s = opaque; PCIDevice *pci_dev = PCI_DEVICE(s); MegasasBaseClass *base_class = MEGASAS_DEVICE_GET_CLASS(s); uint32_t retval = 0; switch (addr) { case MFI_IDB: re...
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
23,769,332,766,302,390,000,000,000,000,000,000,000
50
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
static int fail_path(struct pgpath *pgpath) { unsigned long flags; struct multipath *m = pgpath->pg->m; spin_lock_irqsave(&m->lock, flags); if (!pgpath->is_active) goto out; DMWARN("Failing path %s.", pgpath->path.dev->name); pgpath->pg->ps.type->fail_path(&pgpath->pg->ps, &pgpath->path); pgpath->is_active...
0
[ "CWE-284", "CWE-264" ]
linux
ec8013beddd717d1740cfefb1a9b900deef85462
278,196,717,296,714,800,000,000,000,000,000,000,000
31
dm: do not forward ioctls from logical volumes to the underlying device A logical volume can map to just part of underlying physical volume. In this case, it must be treated like a partition. Based on a patch from Alasdair G Kergon. Cc: Alasdair G Kergon <agk@redhat.com> Cc: dm-devel@redhat.com Signed-off-by: Paolo ...
Client::handleRequestBodyProductionEnded() { receivedWholeRequestBody = true; if (!requestSender) doneSendingRequestBody(); else debugs(9,3, HERE << "waiting for request body write to complete"); }
0
[ "CWE-20" ]
squid
6c9c44d0e9cf7b72bb233360c5308aa063af3d69
96,738,877,829,201,800,000,000,000,000,000,000,000
8
Handle more partial responses (#791)
static void cmd_parse_fetch(struct ImapData *idata, char *s) { unsigned int msn, uid; struct Header *h = NULL; int server_changes = 0; mutt_debug(3, "Handling FETCH\n"); if (mutt_str_atoui(s, &msn) < 0 || msn < 1 || msn > idata->max_msn) { mutt_debug(3, "#1 FETCH response ignored for this message\n");...
0
[ "CWE-78", "CWE-77" ]
neomutt
e52393740334443ae0206cab2d7caef381646725
126,670,046,399,290,720,000,000,000,000,000,000,000
75
quote imap strings more carefully Co-authored-by: JerikoOne <jeriko.one@gmx.us>
GF_Err mfro_box_read(GF_Box *s, GF_BitStream *bs) { GF_MovieFragmentRandomAccessOffsetBox *ptr = (GF_MovieFragmentRandomAccessOffsetBox *)s; ISOM_DECREASE_SIZE(ptr, 4); ptr->container_size = gf_bs_read_u32(bs); return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
262,478,019,501,170,900,000,000,000,000,000,000,000
8
fixed #1587
static void count_tx(struct net_device *dev, int ret, int len) { if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) { struct pcpu_sw_netstats *stats = this_cpu_ptr(dev->tstats); u64_stats_update_begin(&stats->syncp); stats->tx_packets++; stats->tx_bytes += len; u64_stats_update_end(&stats->syncp); ...
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
33,094,349,977,831,520,000,000,000,000,000,000,000
13
macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80...
unsigned char *cipso_v4_optptr(const struct sk_buff *skb) { const struct iphdr *iph = ip_hdr(skb); unsigned char *optptr = (unsigned char *)&(ip_hdr(skb)[1]); int optlen; int taglen; for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 0; ) { switch (optptr[0]) { case IPOPT_CIPSO: return optptr; cas...
0
[ "CWE-835" ]
linux
40413955ee265a5e42f710940ec78f5450d49149
117,948,161,893,898,500,000,000,000,000,000,000,000
25
Cipso: cipso_v4_optptr enter infinite loop in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop. Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com> Acked-by: Paul Moore <paul@paul-moore.com> Signed-o...
ccp_run_des3_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) { struct ccp_des3_engine *des3 = &cmd->u.des3; struct ccp_dm_workarea key, ctx; struct ccp_data src, dst; struct ccp_op op; unsigned int dm_offset; unsigned int len_singlekey; bool in_place = false; int ret; /* Error checks */ if (cmd_q->ccp...
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
321,592,738,622,776,060,000,000,000,000,000,000,000
195
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
GBool PSOutputDev::functionShadedFill(GfxState *state, GfxFunctionShading *shading) { double x0, y0, x1, y1; double *mat; int i; if (level == psLevel2Sep || level == psLevel3Sep) { if (shading->getColorSpace()->getMode() != csDeviceCMYK) { return gFalse; } processColors |= psProcessC...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
298,485,312,901,810,170,000,000,000,000,000,000,000
40
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int pn_ssl_domain_set_ciphers(pn_ssl_domain_t *domain, const char *ciphers) { return PN_ERR; }
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
296,500,632,611,133,650,000,000,000,000,000,000,000
4
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
ElectronBrowserClient* ElectronBrowserClient::Get() { return g_browser_client; }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
164,590,240,953,211,530,000,000,000,000,000,000,000
3
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static char *tcm_loop_parse_pr_out_transport_id( struct se_portal_group *se_tpg, const char *buf, u32 *out_tid_len, char **port_nexus_ptr) { struct tcm_loop_tpg *tl_tpg = (struct tcm_loop_tpg *)se_tpg->se_tpg_fabric_ptr; struct tcm_loop_hba *tl_hba = tl_tpg->tl_hba; switch (tl_hba->tl_proto_id) { case SCSI_...
0
[ "CWE-119", "CWE-787" ]
linux
12f09ccb4612734a53e47ed5302e0479c10a50f8
160,438,653,840,602,420,000,000,000,000,000,000,000
29
loopback: off by one in tcm_loop_make_naa_tpg() This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result in memory corruption. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
void aio_complete(struct kiocb *iocb, long res, long res2) { struct kioctx *ctx = iocb->ki_ctx; struct aio_ring *ring; struct io_event *ev_page, *event; unsigned long flags; unsigned tail, pos; /* * Special case handling for sync iocbs: * - events go directly into the iocb for fast handling * - the sync ...
1
[]
linux
f8567a3845ac05bb28f3c1b478ef752762bd39ef
111,418,081,394,454,930,000,000,000,000,000,000,000
99
aio: fix aio request leak when events are reaped by userspace The aio cleanups and optimizations by kmo that were merged into the 3.10 tree added a regression for userspace event reaping. Specifically, the reference counts are not decremented if the event is reaped in userspace, leading to the application being unabl...
static int fwnet_send_packet(struct fwnet_packet_task *ptask) { struct fwnet_device *dev; unsigned tx_len; struct rfc2734_header *bufhdr; unsigned long flags; bool free; dev = ptask->dev; tx_len = ptask->max_payload; switch (fwnet_get_hdr_lf(&ptask->hdr)) { case RFC2374_HDR_UNFRAG: bufhdr = (struct rfc2734_...
0
[ "CWE-119", "CWE-284", "CWE-787" ]
linux
667121ace9dbafb368618dbabcf07901c962ddac
199,717,398,683,256,600,000,000,000,000,000,000,000
100
firewire: net: guard against rx buffer overflows The IP-over-1394 driver firewire-net lacked input validation when handling incoming fragmented datagrams. A maliciously formed fragment with a respectively large datagram_offset would cause a memcpy past the datagram buffer. So, drop any packets carrying a fragment wi...
void btrfs_put_block_group_cache(struct btrfs_fs_info *info) { struct btrfs_block_group *block_group; u64 last = 0; while (1) { struct inode *inode; block_group = btrfs_lookup_first_block_group(info, last); while (block_group) { btrfs_wait_block_group_cache_done(block_group); spin_lock(&block_group->lo...
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
156,871,551,181,172,710,000,000,000,000,000,000,000
34
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt, xmlRelaxNGValidityErrorFunc err, xmlRelaxNGValidityWarningFunc warn, void *ctx) { if (ctxt == NULL) return; ctxt->error = err; ctxt->warning = warn; ctxt->serror = NULL; ctxt->userData...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
113,210,371,719,019,580,000,000,000,000,000,000,000
11
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
const char* Chapters::Atom::GetStringUID() const { return m_string_uid; }
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
67,510,287,059,624,050,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
prefix_hash (gconstpointer key) { /* end the string at the dot and compute its hash */ gchar* copy = g_strdup((const gchar *)key); gchar* c = copy; guint tmp; for (; *c; c++) { if (*c == '.') { *c = 0; break; } } tmp = g_str_hash(copy); g_free(copy); return tmp; }
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
170,674,975,231,211,560,000,000,000,000,000,000,000
17
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
int seccomp_protect_sysctl(void) { uint32_t arch; int r; SECCOMP_FOREACH_LOCAL_ARCH(arch) { _cleanup_(seccomp_releasep) scmp_filter_ctx seccomp = NULL; log_debug("Operating on architecture: %s", seccomp_arch_to_string(arch)); if (IN_SET(arch, SC...
0
[]
systemd
b835eeb4ec1dd122b6feff2b70881265c529fcdd
215,627,145,468,255,820,000,000,000,000,000,000,000
36
shared/seccomp: disallow pkey_mprotect the same as mprotect for W^X mappings (#7295) MemoryDenyWriteExecution policy could be be bypassed by using pkey_mprotect instead of mprotect to create an executable writable mapping. The impact is mitigated by the fact that the man page says "Note that this feature is fully...
gdata_service_get_proxy_uri (GDataService *self) { SoupURI *proxy_uri; g_return_val_if_fail (GDATA_IS_SERVICE (self), NULL); g_object_get (self->priv->session, SOUP_SESSION_PROXY_URI, &proxy_uri, NULL); g_object_unref (proxy_uri); /* remove the ref added by g_object_get */ return proxy_uri; }
0
[ "CWE-20" ]
libgdata
6799f2c525a584dc998821a6ce897e463dad7840
83,294,913,371,234,470,000,000,000,000,000,000,000
11
core: Validate SSL certificates for all connections This prevents MitM attacks which use spoofed SSL certificates. Note that this bumps our libsoup requirement to 2.37.91. Closes: https://bugzilla.gnome.org/show_bug.cgi?id=671535
PreventCommandDuringRecovery(const char *cmdname) { if (RecoveryInProgress()) ereport(ERROR, (errcode(ERRCODE_READ_ONLY_SQL_TRANSACTION), /* translator: %s is name of a SQL command, eg CREATE */ errmsg("cannot execute %s during recovery", cmdname))); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
111,505,790,081,424,080,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
dwg_free_eed (Dwg_Object *obj) { BITCODE_BL i; if (obj->supertype == DWG_SUPERTYPE_ENTITY) { Dwg_Object_Entity *_obj = obj->tio.entity; for (i = 0; i < _obj->num_eed; i++) { FREE_IF (_obj->eed[i].raw); FREE_IF (_obj->eed[i].data); } FREE_IF (_obj->eed); ...
0
[ "CWE-703", "CWE-835" ]
libredwg
c6f6668b82bfe595899cc820279ac37bb9ef16f5
199,118,705,761,161,100,000,000,000,000,000,000,000
28
cleanup tio.unknown not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common entity_data. Fixes GH #178 heap_overflow2
static int check_purpose_timestamp_sign(const X509_PURPOSE *xp, const X509 *x, int ca) { int i_ext; /* If ca is true we must return if this is a valid CA certificate. */ if (ca) return check_ca(x); /* * Check the optional key usage field: * if Key Usage is present, it must be one of digitalSignature ...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
61,069,080,109,772,800,000,000,000,000,000,000,000
34
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
PJ_DEF(int) pj_scan_peek_until( pj_scanner *scanner, const pj_cis_t *spec, pj_str_t *out) { register char *s = scanner->curptr; if (s >= scanner->end) { pj_scan_syntax_err(scanner); return -1; } while (PJ_SCAN_CHECK_EOF(s) && !pj_cis_match( spec, *s)) ++s; pj_strset3(out, scanner->cur...
0
[ "CWE-125" ]
pjproject
077b465c33f0aec05a49cd2ca456f9a1b112e896
311,168,664,025,677,500,000,000,000,000,000,000,000
17
Merge pull request from GHSA-7fw8-54cv-r7pm
const char *c_str() const { return &buffer_[0]; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
261,986,821,263,843,000,000,000,000,000,000,000,000
1
Fix segfault on complex pointer formatting (#642)
TEST_F(QueryPlannerTest, TwoRegexCompoundIndexCovering) { addIndex(BSON("a" << 1 << "b" << 1)); runQuerySortProj(fromjson("{a: /0/, b: /1/}"), BSONObj(), fromjson("{_id: 0, a: 1, b: 1}")); ASSERT_EQUALS(getNumSolutions(), 2U); assertSolutionExists( "{proj: {spec: {_id: 0, a: 1, b: 1}, node: " ...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
192,605,243,810,301,200,000,000,000,000,000,000,000
12
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
int imap_bodystructure_parse(const char *bodystructure, pool_t pool, struct message_part *parts, const char **error_r) { i_assert(parts != NULL); return imap_bodystructure_parse_full(bodystructure, pool, &parts, error_r); }
0
[ "CWE-20" ]
core
266e54b7b8c34c9a58dd60a2e53c5ca7d1deae19
90,429,870,017,601,200,000,000,000,000,000,000,000
9
lib-imap: Don't generate invalid BODYSTRUCTURE when reaching MIME part limit If the last MIME part was message/rfc822 and its child was truncated away, BODYSTRUCTURE was missing the ENVELOPE and BODY[STRUCTURE] parts. Fixed by writing empty dummy ones.
parser_compiled_code_set_function_name (parser_context_t *context_p, /**< context */ ecma_compiled_code_t *bytecode_p, /**< function literal index */ uint16_t name_index, /**< function name literal index */ ...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
210,957,382,764,670,150,000,000,000,000,000,000,000
56
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
static int intGetTdEntry(Header h, rpmtd td, headerGetFlags flags) { indexEntry entry; int rc; /* First find the tag */ /* FIX: h modified by sort. */ entry = findEntry(h, td->tag, RPM_NULL_TYPE); if (entry == NULL) { /* Td is zeroed above, just return... */ return 0; } if (entry->in...
0
[ "CWE-125" ]
rpm
8f4b3c3cab8922a2022b9e47c71f1ecf906077ef
9,841,129,409,287,822,000,000,000,000,000,000,000
24
hdrblobInit() needs bounds checks too Users can pass untrusted data to hdrblobInit() and it must be robust against this.
put_u32(struct ofpbuf *b, uint32_t x) { put_be32(b, htonl(x)); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
176,251,839,261,200,870,000,000,000,000,000,000,000
4
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
tiffsep_put_params(gx_device * pdev, gs_param_list * plist) { tiffsep_device * const pdevn = (tiffsep_device *) pdev; int code; const char *param_name; gs_param_string comprstr; long bpc = pdevn->BitsPerComponent; int max_spots = pdevn->max_spots; switch (code = param_read_bool(plist, (para...
0
[ "CWE-476" ]
ghostpdl
aadb53eb834b3def3ef68d78865ff87a68901804
153,386,896,233,887,100,000,000,000,000,000,000,000
136
Tiffsep and Tiffsep1 - abort on multi-page input wtithout %d OutputFile Bug #701821 "Segmentation fault at tiff//libtiff/tif_dirinfo.c:513 in TIFFFindField" The tiffsep and tiffsep1 only set 'code' to an error when an attempt is made to write a second output file without using %d in the OutputFile specification. Thi...
xmlXPathNewNodeSetList(xmlNodeSetPtr val) { xmlXPathObjectPtr ret; int i; if (val == NULL) ret = NULL; else if (val->nodeTab == NULL) ret = xmlXPathNewNodeSet(NULL); else { ret = xmlXPathNewNodeSet(val->nodeTab[0]); if (ret) for (i = 1; i < val->nodeNr; +...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
295,196,549,127,589,270,000,000,000,000,000,000,000
18
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
TEST_P(Security, BuiltinAuthenticationAndCryptoPlugin_besteffort_all_ok) { PubSubReader<HelloWorldType> reader(TEST_TOPIC_NAME); PubSubWriter<HelloWorldType> writer(TEST_TOPIC_NAME); PropertyPolicy pub_part_property_policy, sub_part_property_policy, pub_property_policy, sub_property_policy; ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
91,249,277,401,334,400,000,000,000,000,000,000,000
68
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
MagickPrivate MagickBooleanType FxEvaluateChannelExpression(FxInfo *fx_info, const PixelChannel channel,const ssize_t x,const ssize_t y, double *alpha,ExceptionInfo *exception) { double beta; size_t depth; depth=0; beta=0.0; *alpha=FxEvaluateSubexpression(fx_info,channel,x,y,fx_info->expression,...
0
[ "CWE-119", "CWE-703" ]
ImageMagick
3cbfb163cff9e5b8cdeace8312e9bfee810ed02b
316,581,656,011,856,150,000,000,000,000,000,000,000
16
https://github.com/ImageMagick/ImageMagick/issues/296
int dtls1_get_record(SSL *s) { int ssl_major,ssl_minor; int i,n; SSL3_RECORD *rr; unsigned char *p = NULL; unsigned short version; DTLS1_BITMAP *bitmap; unsigned int is_next_epoch; rr= &(s->s3->rrec); /* The epoch may have changed. If so, process all the * pending records. This is a non-blocking o...
0
[ "CWE-310" ]
openssl
270881316664396326c461ec7a124aec2c6cc081
300,209,684,009,712,250,000,000,000,000,000,000,000
163
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...