func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline void gen_pop_update(DisasContext *s, TCGMemOp ot)
{
gen_stack_update(s, 1 << ot);
} | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 157,272,886,265,692,760,000,000,000,000,000,000,000 | 4 | tcg/i386: Check the size of instruction being translated
This fixes the bug: 'user-to-root privesc inside VM via bad translation
caching' reported by Jann Horn here:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1122
Reviewed-by: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.... |
static void iwl_trans_pcie_configure(struct iwl_trans *trans,
const struct iwl_trans_config *trans_cfg)
{
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
trans_pcie->cmd_queue = trans_cfg->cmd_queue;
trans_pcie->cmd_fifo = trans_cfg->cmd_fifo;
trans_pcie->cmd_q_wdg_timeout = trans_cfg... | 0 | [
"CWE-476"
] | linux | 8188a18ee2e48c9a7461139838048363bfce3fef | 44,570,170,507,927,890,000,000,000,000,000,000,000 | 38 | iwlwifi: pcie: fix rb_allocator workqueue allocation
We don't handle failures in the rb_allocator workqueue allocation
correctly. To fix that, move the code earlier so the cleanup is
easier and we don't have to undo all the interrupt allocations in
this case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Sig... |
static inline void text_update_xy(QemuConsole *s, int x, int y)
{
s->text_x[0] = MIN(s->text_x[0], x);
s->text_x[1] = MAX(s->text_x[1], x);
s->text_y[0] = MIN(s->text_y[0], y);
s->text_y[1] = MAX(s->text_y[1], y);
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 275,517,765,930,885,080,000,000,000,000,000,000,000 | 7 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
static int snd_rawmidi_dev_disconnect(struct snd_device *device)
{
struct snd_rawmidi *rmidi = device->device_data;
int dir;
mutex_lock(®ister_mutex);
mutex_lock(&rmidi->open_mutex);
wake_up(&rmidi->open_wait);
list_del_init(&rmidi->list);
for (dir = 0; dir < 2; dir++) {
struct snd_rawmidi_substream *s;
... | 0 | [
"CWE-416"
] | linux | c1f6e3c818dd734c30f6a7eeebf232ba2cf3181d | 274,015,456,005,020,160,000,000,000,000,000,000,000 | 36 | ALSA: rawmidi: Fix racy buffer resize under concurrent accesses
The rawmidi core allows user to resize the runtime buffer via ioctl,
and this may lead to UAF when performed during concurrent reads or
writes: the read/write functions unlock the runtime lock temporarily
during copying form/to user-space, and that's the ... |
virtual ~placeholder() {} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 44,997,159,176,467,480,000,000,000,000,000,000,000 | 1 | Fix #122 |
parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
re_token_t *token)
{
unsigned char ch, delim = token->opr.c;
int i = 0;
if (re_string_eoi(regexp))
return REG_EBRACK;
for (;; ++i)
{
if (i >= BRACKET_NAME_BUF_SIZE)
return REG_EBRACK;
if (token->type == OP_OPEN_CHAR_CL... | 0 | [
"CWE-19"
] | gnulib | 5513b40999149090987a0341c018d05d3eea1272 | 267,234,623,417,123,440,000,000,000,000,000,000,000 | 39 | Diagnose ERE '()|\1'
Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative. This... |
String *Field_float::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
ASSERT_COLUMN_MARKED_FOR_READ;
DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
float nr;
float4get(nr,ptr);
uint to_length= 70;
if (val_buffer->alloc(to_length))
{
my_error(ER_OUT_OF_RE... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 53,940,341,791,154,590,000,000,000,000,000,000,000 | 35 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
setup_arch (char **cmdline_p)
{
unw_init();
ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist);
*cmdline_p = __va(ia64_boot_param->command_line);
strlcpy(boot_command_line, *cmdline_p, COMMAND_LINE_SIZE);
efi_init();
io_port_init();
#ifdef CONFIG_IA64_GENERIC
/* machvec needs to be... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4dcc29e1574d88f4465ba865ed82800032f76418 | 277,775,565,240,609,130,000,000,000,000,000,000,000 | 94 | [IA64] Workaround for RSE issue
Problem: An application violating the architectural rules regarding
operation dependencies and having specific Register Stack Engine (RSE)
state at the time of the violation, may result in an illegal operation
fault and invalid RSE state. Such faults may initiate a cascade of
repeated ... |
TrackMouse(XtermWidget xw,
int func,
CELL *start,
int firstrow,
int lastrow)
{
TScreen *screen = TScreenOf(xw);
if (screen->waitingForTrackInfo) { /* if Timed, ignore */
screen->waitingForTrackInfo = False;
if (func != 0) {
CELL first = *start;
boundsCheck(first.row);
boundsC... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 217,698,089,364,804,900,000,000,000,000,000,000,000 | 24 | snapshot of project "xterm", label xterm-365d |
static inline bool tm_abort_check(struct pt_regs *regs, int cause)
{
/* If we're emulating a load/store in an active transaction, we cannot
* emulate it as the kernel operates in transaction suspended context.
* We need to abort the transaction. This creates a persistent TM
* abort s... | 0 | [] | linux | 5d176f751ee3c6eededd984ad409bff201f436a7 | 197,622,608,695,999,040,000,000,000,000,000,000,000 | 14 | powerpc: tm: Enable transactional memory (TM) lazily for userspace
Currently the MSR TM bit is always set if the hardware is TM capable.
This adds extra overhead as it means the TM SPRS (TFHAR, TEXASR and
TFAIR) must be swapped for each process regardless of if they use TM.
For processes that don't use TM the TM MSR ... |
static inline void set_debugreg(unsigned long val, int reg)
{
PVOP_VCALL2(cpu.set_debugreg, reg, val);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 310,326,276,667,680,070,000,000,000,000,000,000,000 | 4 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
longlong Item::val_int_from_str(int *error)
{
char buff[MAX_FIELD_WIDTH];
String tmp(buff,sizeof(buff), &my_charset_bin), *res;
/*
For a string result, we must first get the string and then convert it
to a longlong
*/
if (!(res= val_str(&tmp)))
{
*error= 0;
return 0;
}
Converter_strtoll... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 189,961,918,725,996,550,000,000,000,000,000,000,000 | 19 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static int _nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{
struct nfs4_lookup_root_arg args = {
.bitmask = nfs4_fattr_bitmap,
};
struct nfs4_lookup_res res = {
.server = server,
.fattr = info->fattr,
.fh = fhandle,
};
struct rpc_message msg = {
.rpc_proc ... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 85,566,084,984,321,600,000,000,000,000,000,000,000 | 19 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
category_compare (EContact *contact1,
EContact *contact2)
{
const gchar *categories1, *categories2;
gboolean equal;
categories1 = e_contact_get_const (contact1, E_CONTACT_CATEGORIES);
categories2 = e_contact_get_const (contact2, E_CONTACT_CATEGORIES);
if (categories1 && categories2)
equal = !... | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 121,334,169,696,053,450,000,000,000,000,000,000,000 | 16 | Bug 796174 - strcat() considered unsafe for buffer overflow |
static void imagick_fiddle_with_geometry_info(ssize_t type, GeometryFlags flags, GeometryInfo *geometry_info) {
/* special handling of missing values in input string */
switch( type ) {
/* Shape Kernel Defaults */
case UnityKernel: {
if ((flags & WidthValue) == 0)
geometry_info->rho = 1.0; /* Default sc... | 0 | [
"CWE-787"
] | imagick | 7187b37250b87edb75160c7beda980f2fa308f5d | 290,395,159,461,800,950,000,000,000,000,000,000,000 | 66 | Bounds check kernel origin position. |
static void spd_release_page(struct splice_pipe_desc *spd, unsigned int i)
{
page_cache_release(spd->pages[i]);
} | 0 | [
"CWE-94"
] | linux-2.6 | 8811930dc74a503415b35c4a79d14fb0b408a361 | 236,118,113,908,065,000,000,000,000,000,000,000,000 | 4 | splice: missing user pointer access verification
vmsplice_to_user() must always check the user pointer and length
with access_ok() before copying. Likewise, for the slow path of
copy_from_user_mmap_sem() we need to check that we may read from
the user region.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Wojc... |
**/
CImgList<Tfloat> get_FFT(const char axis, const bool is_invert=false) const {
CImgList<Tfloat> res(*this,CImg<Tfloat>());
CImg<Tfloat>::FFT(res[0],res[1],axis,is_invert);
return res; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 37,295,766,039,470,800,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
gsf_infile_tar_seek (GsfInput *input, gsf_off_t offset, GSeekType whence)
{
(void)input;
(void)offset;
(void)whence;
return FALSE;
} | 0 | [
"CWE-476"
] | libgsf | 95a8351a75758cf10b3bf6abae0b6b461f90d9e5 | 126,859,186,828,387,850,000,000,000,000,000,000,000 | 7 | tar: fix crash on broken tar file. |
client_senddone(isc_nmhandle_t *handle, isc_result_t result, void *cbarg) {
ns_client_t *client = cbarg;
REQUIRE(client->sendhandle == handle);
CTRACE("senddone");
/*
* Set sendhandle to NULL, but don't detach it immediately, in
* case we need to retry the send. If we do resend, then
* sendhandle will be r... | 0 | [
"CWE-617"
] | bind9 | 15996f0cb15631b95a801e3e88928494a69ad6ee | 212,656,089,101,591,570,000,000,000,000,000,000,000 | 34 | ns_client_error() could assert if rcode was overridden to NOERROR
The client->rcode_override was originally created to force the server
to send SERVFAIL in some cases when it would normally have sent FORMERR.
More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2
commit (part of GL #2790) to force the... |
bmexec (kwset_t kwset, char const *text, size_t size)
{
/* Help the compiler inline bmexec_trans in two ways, depending on
whether kwset->trans is null. */
return (kwset->trans
? bmexec_trans (kwset, text, size)
: bmexec_trans (kwset, text, size));
} | 0 | [
"CWE-119"
] | grep | 83a95bd8c8561875b948cadd417c653dbe7ef2e2 | 253,324,396,499,683,000,000,000,000,000,000,000,000 | 8 | grep -F: fix a heap buffer (read) overrun
grep's read buffer is often filled to its full size, except when
reading the final buffer of a file. In that case, the number of
bytes read may be far less than the size of the buffer. However, for
certain unusual pattern/text combinations, grep -F would mistakenly
examine b... |
resume_copy_required_values (gnutls_session_t session)
{
/* get the new random values */
memcpy (session->internals.resumed_security_parameters.
server_random,
session->security_parameters.server_random, TLS_RANDOM_SIZE);
memcpy (session->internals.resumed_security_parameters.
client_random,
session->... | 0 | [
"CWE-189"
] | gnutls | bc8102405fda11ea00ca3b42acc4f4bce9d6e97b | 179,883,944,112,752,500,000,000,000,000,000,000,000 | 41 | Fix GNUTLS-SA-2008-1 security vulnerabilities.
See http://www.gnu.org/software/gnutls/security.html for updates. |
static int __kvmppc_handle_load(struct kvm_run *run, struct kvm_vcpu *vcpu,
unsigned int rt, unsigned int bytes,
int is_default_endian, int sign_extend)
{
int idx, ret;
bool host_swabbed;
/* Pity C doesn't have a logical XOR operator */
if (kvmppc_need_byteswap(vcpu)) {
host_swabbed = is_default_endian;
... | 0 | [
"CWE-476"
] | linux | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 | 108,816,612,559,497,930,000,000,000,000,000,000,000 | 44 | KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
The following program causes a kernel oops:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kvm.h>
main()
{
int fd = open("/dev/kvm", O_RDWR);
ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
}
This happe... |
QPDFFormFieldObjectHelper::getQuadding()
{
int result = 0;
QPDFObjectHandle fv = getInheritableFieldValue("/Q");
if (fv.isInteger())
{
QTC::TC("qpdf", "QPDFFormFieldObjectHelper Q present");
result = QIntC::to_int(fv.getIntValue());
}
return result;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 332,444,035,203,895,400,000,000,000,000,000,000,000 | 11 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
selftest_encr_2048 (gcry_sexp_t pkey, gcry_sexp_t skey)
{
const char *errtxt = NULL;
gcry_error_t err;
static const char plaintext[] =
"Jim quickly realized that the beautiful gowns are expensive.";
gcry_sexp_t plain = NULL;
gcry_sexp_t encr = NULL;
gcry_mpi_t ciphertext = NULL;
gcry_sexp_t decr = ... | 0 | [
"CWE-310"
] | libgcrypt | 8725c99ffa41778f382ca97233183bcd687bb0ce | 185,367,651,915,644,450,000,000,000,000,000,000,000 | 108 | rsa: Add exponent blinding.
* cipher/rsa.c (secret_core_crt): Blind secret D with randomized
nonce R for mpi_powm computation.
--
Co-authored-by: Werner Koch <wk@gnupg.org>
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
The paper describing attack: https://eprint.iacr.org/2017/627
Sliding right into disaster: Left-... |
rfbDefaultPtrAddEvent(int buttonMask, int x, int y, rfbClientPtr cl)
{
rfbClientIteratorPtr iterator;
rfbClientPtr other_client;
rfbScreenInfoPtr s = cl->screen;
if (x != s->cursorX || y != s->cursorY) {
LOCK(s->cursorMutex);
s->cursorX = x;
s->cursorY = y;
UNLOCK(s->cursorMutex);
/* The c... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 201,932,998,550,974,900,000,000,000,000,000,000,000 | 26 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t *cdef... | 1 | [] | jasper | 4bb93a6c49da7c1b6ad2acb60b18954a6547c637 | 148,816,774,044,574,820,000,000,000,000,000,000,000 | 343 | Add fixes for CVE-2014-8137. |
generate_sub_request(uint8_t* qname, size_t qnamelen, uint16_t qtype,
uint16_t qclass, struct module_qstate* qstate, int id,
struct iter_qstate* iq, enum iter_state initial_state,
enum iter_state finalstate, struct module_qstate** subq_ret, int v,
int detached)
{
struct module_qstate* subq = NULL;
struct iter_q... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 215,904,276,050,367,950,000,000,000,000,000,000,000 | 89 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
static void wc_ecc_curve_free(ecc_curve_spec* curve)
{
/* don't free cached curves */
#ifndef ECC_CACHE_CURVE
_wc_ecc_curve_free(curve);
#endif
(void)curve;
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 289,313,526,613,377,550,000,000,000,000,000,000,000 | 8 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
void smbXcli_req_unset_pending(struct tevent_req *req)
{
struct smbXcli_req_state *state =
tevent_req_data(req,
struct smbXcli_req_state);
struct smbXcli_conn *conn = state->conn;
size_t num_pending = talloc_array_length(conn->pending);
size_t i;
TALLOC_FREE(state->write_req);
if (state->smb1.mid != 0) {
... | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 332,402,080,580,718,400,000,000,000,000,000,000,000 | 61 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
next_entry_seek(struct archive_read *a, struct iso9660 *iso9660,
struct file_info **pfile)
{
struct file_info *file;
int r;
r = next_cache_entry(a, iso9660, pfile);
if (r != ARCHIVE_OK)
return (r);
file = *pfile;
/* Don't waste time seeking for zero-length bodies. */
if (file->size == 0)
file->offset =... | 0 | [
"CWE-125"
] | libarchive | f9569c086ff29259c73790db9cbf39fe8fb9d862 | 211,972,871,424,616,030,000,000,000,000,000,000,000 | 36 | iso9660: validate directory record length |
void run() {
intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
intrusive_ptr<Expression> expression = ExpressionFieldPath::create(expCtx, "a.b");
assertBinaryEqual(fromjson("{'':[]}"),
toBson(expression->evaluate(fromBson(fromjson("{a:[... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 165,035,060,120,634,400,000,000,000,000,000,000,000 | 6 | SERVER-38070 fix infinite loop in agg expression |
static int __init slcan_init(void)
{
int status;
if (maxdev < 4)
maxdev = 4; /* Sanity */
pr_info("slcan: serial line CAN interface driver\n");
pr_info("slcan: %d dynamic interface channels.\n", maxdev);
slcan_devs = kcalloc(maxdev, sizeof(struct net_device *), GFP_KERNEL);
if (!slcan_devs)
return -ENOMEM;... | 0 | [
"CWE-200",
"CWE-909",
"CWE-908"
] | linux | b9258a2cece4ec1f020715fe3554bc2e360f6264 | 149,624,600,573,300,320,000,000,000,000,000,000,000 | 22 | slcan: Don't transmit uninitialized stack data in padding
struct can_frame contains some padding which is not explicitly zeroed in
slc_bump. This uninitialized data will then be transmitted if the stack
initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).
This commit just zeroes the whole struct i... |
void bnxt_re_destroy_srq(struct ib_srq *ib_srq, struct ib_udata *udata)
{
struct bnxt_re_srq *srq = container_of(ib_srq, struct bnxt_re_srq,
ib_srq);
struct bnxt_re_dev *rdev = srq->rdev;
struct bnxt_qplib_srq *qplib_srq = &srq->qplib_srq;
struct bnxt_qplib_nq *nq = NULL;
if (qplib_srq->cq)
nq = qpl... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4a9d46a9fe14401f21df69cea97c62396d5fb053 | 319,363,443,582,744,300,000,000,000,000,000,000,000 | 16 | RDMA: Fix goto target to release the allocated memory
In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory
should be released by goto fail.
Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters")
Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com
Si... |
static void jslLexString() {
char delim = lex->currCh;
lex->tokenValue = jsvNewFromEmptyString();
if (!lex->tokenValue) {
lex->tk = LEX_EOF;
return;
}
JsvStringIterator it;
jsvStringIteratorNew(&it, lex->tokenValue, 0);
// strings...
jslGetNextCh();
while (lex->currCh && lex->currCh!=delim) {
... | 0 | [
"CWE-787"
] | Espruino | bed844f109b6c222816740555068de2e101e8018 | 212,650,966,938,159,200,000,000,000,000,000,000,000 | 78 | remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426) |
getwinvar(
typval_T *argvars,
typval_T *rettv,
int off) // 1 for gettabwinvar()
{
win_T *win;
char_u *varname;
dictitem_T *v;
tabpage_T *tp = NULL;
int done = FALSE;
switchwin_T switchwin;
int need_switch_win;
if (off == 1)
tp = find_tabpage((int)tv_get_number_chk(&a... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 280,846,877,444,081,000,000,000,000,000,000,000,000 | 75 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
**/
CImgList<Tfloat> get_hessian(const char *const axes=0) const {
CImgList<Tfloat> res;
const char *naxes = axes, *const def_axes2d = "xxxyyy", *const def_axes3d = "xxxyxzyyyzzz";
if (!axes) naxes = _depth>1?def_axes3d:def_axes2d;
const unsigned int lmax = (unsigned int)std::strlen(naxe... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 54,177,216,334,806,995,000,000,000,000,000,000,000 | 109 | Fix other issues in 'CImg<T>::load_bmp()'. |
rl_redisplay ()
{
register int in, out, c, linenum, cursor_linenum;
register char *line;
int inv_botlin, lb_botlin, lb_linenum, o_cpos;
int newlines, lpos, temp, n0, num, prompt_lines_estimate;
char *prompt_this_line;
int mb_cur_max = MB_CUR_MAX;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;
size_t wc_byte... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 233,496,069,270,334,270,000,000,000,000,000,000,000 | 787 | bash-4.4-rc2 release |
lys_node_xpath_atomize(const struct lys_node *node, int options)
{
const struct lys_node *next, *elem, *parent, *tmp;
struct lyxp_set set;
struct ly_set *ret_set;
uint16_t i;
if (!node) {
LOGARG;
return NULL;
}
for (parent = node; parent && !(parent->nodetype & (LYS_NOTIF |... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 24,262,613,935,488,945,000,000,000,000,000,000,000 | 67 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
void HttpIntegrationTest::testMaxStreamDurationWithRetry(bool invoke_retry_upstream_disconnect) {
config_helper_.addConfigModifier([](envoy::config::bootstrap::v3::Bootstrap& bootstrap) {
auto* static_resources = bootstrap.mutable_static_resources();
auto* cluster = static_resources->mutable_clusters(0);
... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 262,732,095,410,203,200,000,000,000,000,000,000,000 | 56 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
unsigned int TConsoleRunner::InputTimeout()
{
return ((FScript != NULL) && (FScript->Batch != TScript::BatchOff) ? BATCH_INPUT_TIMEOUT : 0);
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 67,944,916,918,408,805,000,000,000,000,000,000,000 | 4 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
feed_table_block_tag(struct table *tbl,
char *line, struct table_mode *mode, int indent, int cmd)
{
int offset;
if (mode->indent_level <= 0 && indent == -1)
return;
if (mode->indent_level >= CHAR_MAX && indent == 1)
return;
setwidth(tbl, mode);
feed_table_inline_tag(tbl, line, mode, -1);
... | 1 | [
"CWE-399",
"CWE-835"
] | w3m | 8354763b90490d4105695df52674d0fcef823e92 | 241,864,441,999,128,760,000,000,000,000,000,000,000 | 31 | Prevent negative indent value in feed_table_block_tag()
Bug-Debian: https://github.com/tats/w3m/issues/88 |
TPMS_RSA_PARMS_Unmarshal(TPMS_RSA_PARMS *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPMT_SYM_DEF_OBJECT_Unmarshal(&target->symmetric, buffer, size, YES);
}
if (rc == TPM_RC_SUCCESS) {
rc = TPMT_RSA_SCHEME_Unmarshal(&target->scheme, buffer, s... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 285,122,561,291,909,600,000,000,000,000,000,000,000 | 18 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
ZEND_API void zend_exception_error(zval *exception, int severity TSRMLS_DC) /* {{{ */
{
zend_class_entry *ce_exception = Z_OBJCE_P(exception);
if (instanceof_function(ce_exception, default_exception_ce TSRMLS_CC)) {
zval *str, *file, *line;
EG(exception) = NULL;
zend_call_method_with_0_params(&exception, ce_e... | 0 | [] | php-src | a894a8155fab068d68a04bf181dbaddfa01ccbb0 | 233,019,637,263,204,580,000,000,000,000,000,000,000 | 47 | More fixes for bug #69152 |
TEST_P(QuicHttpIntegrationTest, GetRequestAndResponseWithBody) {
initialize();
sendRequestAndVerifyResponse(default_request_headers_, /*request_size=*/0,
default_response_headers_, /*response_size=*/1024,
/*backend_index*/ 0);
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 333,873,988,606,158,060,000,000,000,000,000,000,000 | 6 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static void cdc_ncm_tx_timeout_start(struct cdc_ncm_ctx *ctx)
{
/* start timer, if not already started */
if (!(hrtimer_active(&ctx->tx_timer) || atomic_read(&ctx->stop)))
hrtimer_start(&ctx->tx_timer,
ktime_set(0, ctx->timer_interval),
HRTIMER_MODE_REL);
} | 0 | [
"CWE-703"
] | linux | 4d06dd537f95683aba3651098ae288b7cbff8274 | 98,329,270,092,043,600,000,000,000,000,000,000,000 | 8 | cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.
Instead of making the call conditional, we can just defer
it to usbnet_probe, using the... |
silentObjectSetPrototypeOf(void *, Runtime *runtime, NativeArgs args) {
JSObject *O = dyn_vmcast<JSObject>(args.getArg(0));
if (!O)
return HermesValue::encodeUndefinedValue();
JSObject *parent;
HermesValue V = args.getArg(1);
if (V.isNull())
parent = nullptr;
else if (V.isObject())
parent = vmc... | 0 | [
"CWE-787"
] | hermes | 86543ac47e59c522976b5632b8bf9a2a4583c7d2 | 77,881,381,596,810,380,000,000,000,000,000,000,000 | 21 | Added stack overflow check for hermes::vm:: hermesBuiltinApply
Summary: This adds a missing check for stack overflow.
Reviewed By: tmikov
Differential Revision: D20104955
fbshipit-source-id: 1f37e23d2e28ebcd3aa4176d134b8418e7059ebd |
xmlMemBlocks(void) {
int res;
xmlMutexLock(xmlMemMutex);
res = debugMemBlocks;
xmlMutexUnlock(xmlMemMutex);
return(res);
} | 0 | [
"CWE-787"
] | libxml2 | 897dffbae322b46b83f99a607d527058a72c51ed | 93,732,011,061,410,480,000,000,000,000,000,000,000 | 8 | Check for integer overflow in memory debug code
Fixes bug 783026.
Thanks to Pranjal Jumde for the report. |
static void bfq_exit_icq_bfqq(struct bfq_io_cq *bic, bool is_sync)
{
struct bfq_queue *bfqq = bic_to_bfqq(bic, is_sync);
struct bfq_data *bfqd;
if (bfqq)
bfqd = bfqq->bfqd; /* NULL if scheduler already exited */
if (bfqq && bfqd) {
unsigned long flags;
spin_lock_irqsave(&bfqd->lock, flags);
bfqq->bic = ... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 324,382,333,858,071,840,000,000,000,000,000,000,000 | 18 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
hufPackEncTable
(const Int64* hcode, // i : encoding table [HUF_ENCSIZE]
int im, // i : min hcode index
int iM, // i : max hcode index
char** pcode) // o: ptr to packed table (updated)
{
char *p = *pcode;
Int64 c = 0;
int lc = 0;
for (; im <= iM; im++)
{
int l = hufLengt... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 35,035,115,379,750,987,000,000,000,000,000,000,000 | 49 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
CURLcode Curl_http_done(struct connectdata *conn,
CURLcode status, bool premature)
{
struct SessionHandle *data = conn->data;
struct HTTP *http =data->req.protop;
Curl_unencode_cleanup(conn);
/* set the proper values (possibly modified on POST) */
conn->fread_func = data->set.fread_f... | 1 | [
"CWE-284"
] | curl | f78ae415d24b9bd89d6c121c556e411fdb21c6aa | 129,576,503,364,789,860,000,000,000,000,000,000,000 | 57 | Don't clear GSSAPI state between each exchange in the negotiation
GSSAPI doesn't work very well if we forget everything ever time.
XX: Is Curl_http_done() the right place to do the final cleanup? |
static int aes_set_key(struct ssh_cipher_struct *cipher, void *key, void *IV) {
int mode=GCRY_CIPHER_MODE_CBC;
if (cipher->key == NULL) {
if (alloc_key(cipher) < 0) {
return -1;
}
if(strstr(cipher->name,"-ctr"))
mode=GCRY_CIPHER_MODE_CTR;
switch (cipher->keysize) {
case 128:
... | 0 | [
"CWE-310"
] | libssh | e99246246b4061f7e71463f8806b9dcad65affa0 | 134,866,877,675,548,700,000,000,000,000,000,000,000 | 51 | security: fix for vulnerability CVE-2014-0017
When accepting a new connection, a forking server based on libssh forks
and the child process handles the request. The RAND_bytes() function of
openssl doesn't reset its state after the fork, but simply adds the
current process id (getpid) to the PRNG state, which is not g... |
static void perf_event_mmap_output(struct perf_event *event,
void *data)
{
struct perf_mmap_event *mmap_event = data;
struct perf_output_handle handle;
struct perf_sample_data sample;
int size = mmap_event->event_id.header.size;
u32 type = mmap_event->event_id.header.type;
int ret;
if (!perf_event_mmap_m... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 39,406,800,280,075,903,000,000,000,000,000,000,000 | 53 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
static int nft_fwd_netdev_offload(struct nft_offload_ctx *ctx,
struct nft_flow_rule *flow,
const struct nft_expr *expr)
{
const struct nft_fwd_netdev *priv = nft_expr_priv(expr);
int oif = ctx->regs[priv->sreg_dev].data.data[0];
return nft_fwd_dup_netdev_offload(ctx, flow, FLOW_ACTION_REDIRECT, oif);
} | 0 | [
"CWE-269"
] | nf | b1a5983f56e371046dcf164f90bfaf704d2b89f6 | 106,099,422,865,020,130,000,000,000,000,000,000,000 | 9 | netfilter: nf_tables_offload: incorrect flow offload action array size
immediate verdict expression needs to allocate one slot in the flow offload
action array, however, immediate data expression does not need to do so.
fwd and dup expression need to allocate one slot, this is missing.
Add a new offload_action inter... |
static int opvmptrld(RAsm *a, ut8 *data, const Opcode *op) {
int l = 0;
switch (op->operands_count) {
case 1:
if ( op->operands[0].type & OT_MEMORY &&
op->operands[0].type & OT_QWORD
) {
data[l++] = 0x0f;
data[l++] = 0xc7;
data[l++] = 0x30 | op->operands[0].regs[0];
} else {
return -1;
... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | radare2 | 9b46d38dd3c4de6048a488b655c7319f845af185 | 156,924,662,186,887,710,000,000,000,000,000,000,000 | 19 | Fix #12372 and #12373 - Crash in x86 assembler (#12380)
0 ,0,[bP-bL-bP-bL-bL-r-bL-bP-bL-bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx--
leA ,0,[bP-bL-bL-bP-bL-bP-bL-60@bL-
leA ,0,[bP-bL-r-bP-bL-bP-bL-60@bL-
mov ,0,[ax+Bx-ax+Bx-ax+ax+Bx-ax+Bx-- |
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
/*
xmlInitParser();
*/
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size);
if (ctxt) {
zend_bool old;
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
ctxt->sax->comment = soap_Comment;
c... | 1 | [
"CWE-200"
] | php-src | fcd4b5335a6df4e0676ee32e2267ca71d70fe623 | 134,084,765,210,679,430,000,000,000,000,000,000,000 | 49 | Fix TSRM (after afc1debb) |
static int kvm_vm_ioctl_reinject(struct kvm *kvm,
struct kvm_reinject_control *control)
{
if (!kvm->arch.vpit)
return -ENXIO;
kvm->arch.vpit->pit_state.pit_timer.reinject = control->pit_reinject;
return 0;
} | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 227,380,992,054,478,850,000,000,000,000,000,000,000 | 8 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx)
{
int error;
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
dmu_object_type_t otype;
zfs_acl_locator_cb_t locate = { 0 };
uint64_t mode;
sa_bulk_attr_t bulk[5];
uint64_t ctime[2];
int count = 0;
zfs_acl_phys_t acl_phys;
ASSERT_VOP_IN_SEQC(Z... | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 218,933,077,953,537,540,000,000,000,000,000,000,000 | 152 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
future_hack(parser_state *ps)
{
node *n = ps->p_stack.s_top->s_parent;
node *ch, *cch;
int i;
/* from __future__ import ..., must have at least 4 children */
n = CHILD(n, 0);
if (NCH(n) < 4)
return;
ch = CHILD(n, 0);
if (STR(ch) == NULL || strcmp(STR(ch), "from") != 0)
r... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 292,549,787,383,724,020,000,000,000,000,000,000,000 | 38 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
dvi_document_finalize (GObject *object)
{
DviDocument *dvi_document = DVI_DOCUMENT(object);
g_mutex_lock (&dvi_context_mutex);
if (dvi_document->context) {
mdvi_cairo_device_free (&dvi_document->context->device);
mdvi_destroy_context (dvi_document->context);
}
g_mutex_unlock (&dvi_context_mutex);
if (dvi_... | 0 | [
"CWE-78"
] | evince | 350404c76dc8601e2cdd2636490e2afc83d3090e | 45,371,433,863,277,710,000,000,000,000,000,000,000 | 24 | dvi: Mitigate command injection attacks by quoting filename
With commit 1fcca0b8041de0d6074d7e17fba174da36c65f99 came a DVI backend.
It exports to PDF via the dvipdfm tool.
It calls that tool with the filename of the currently loaded document.
If that filename is cleverly crafted, it can escape the currently
used manu... |
const CImg<T>& save_raw(std::FILE *const file, const bool is_multiplexed=false) const {
return _save_raw(file,0,is_multiplexed);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 241,774,788,378,818,950,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static bool reg_type_mismatch_ok(enum bpf_reg_type type)
{
switch (type) {
case PTR_TO_CTX:
case PTR_TO_SOCKET:
case PTR_TO_SOCKET_OR_NULL:
case PTR_TO_SOCK_COMMON:
case PTR_TO_SOCK_COMMON_OR_NULL:
case PTR_TO_TCP_SOCK:
case PTR_TO_TCP_SOCK_OR_NULL:
case PTR_TO_XDP_SOCK:
case PTR_TO_BTF_ID:
case PTR_TO_BTF_I... | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 188,788,423,586,180,600,000,000,000,000,000,000,000 | 18 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
static void avrcp_target_remove(struct btd_service *service)
{
control_unregister(service);
} | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 220,094,915,580,027,880,000,000,000,000,000,000,000 | 4 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
static int _nfs4_do_open(struct inode *dir,
struct nfs_open_context *ctx,
int flags,
const struct nfs4_open_createattrs *c,
int *opened)
{
struct nfs4_state_owner *sp;
struct nfs4_state *state = NULL;
struct nfs_server *server = NFS_SERVER(dir);
struct nfs4_opendata *opendata;
struct dentry ... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 61,114,720,342,187,110,000,000,000,000,000,000,000 | 109 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static uint32_t deserialize_gw_speed(uint8_t value) {
uint32_t speed;
uint32_t exp;
if (!value) {
return 0;
}
if (value == UINT8_MAX) {
/* maximum value: also return maximum value */
return MAX_SMARTGW_SPEED;
}
speed = (value >> 3) + 1;
exp = value & 7;
while (exp-- > 0) {
speed *=... | 0 | [
"CWE-125"
] | tcpdump | 0cb1b8a434b599b8d636db029aadb757c24e39d6 | 226,238,254,182,913,920,000,000,000,000,000,000,000 | 21 | CVE-2017-13688/OLSR: Do bounds checks before we fetch data.
While we're at it, clean up some other bounds checks, so we check that
we have a complete IPv4 message header if it's IPv4 and a complete IPv6
message header if it's IPv6.
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add tes... |
static void ntlmssp_append_target_info(buffer_t *buf, size_t buffer_offset, ...)
{
struct ntlmssp_v2_target_info info;
struct ntlmssp_buffer buffer;
va_list args;
unsigned int length, total_length = 0;
int type;
write_le32(&buffer.offset, buf->used);
va_start(args, buffer_offset);
do {
const char *data;
... | 0 | [
"CWE-125"
] | core | fb246611e62ad8c5a95b0ca180a63f17aa34b0d8 | 304,744,503,973,824,600,000,000,000,000,000,000,000 | 50 | lib-ntlm: Check buffer length on responses
Add missing check for buffer length.
If this is not checked, it is possible to send message which
causes read past buffer bug.
Broken in c7480644202e5451fbed448508ea29a25cffc99c |
inline void strwindows_reserved(char *const str, const char c='_') {
for (char *s = str; *s; ++s) {
const char i = *s;
if (i=='<' || i=='>' || i==':' || i=='\"' || i=='/' || i=='\\' || i=='|' || i=='?' || i=='*') *s = c;
}
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 91,176,758,126,912,640,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. |
eval_method(
char_u **arg,
typval_T *rettv,
evalarg_T *evalarg,
int verbose) // give error messages
{
char_u *name;
long len;
char_u *alias;
char_u *tofree = NULL;
typval_T base = *rettv;
int ret = OK;
int evaluate = evalarg != NULL
&& (evalarg->eval_flags & EVAL... | 0 | [
"CWE-786",
"CWE-119",
"CWE-787"
] | vim | fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d | 95,070,222,753,357,120,000,000,000,000,000,000,000 | 88 | patch 8.2.4206: condition with many "(" causes a crash
Problem: Condition with many "(" causes a crash.
Solution: Limit recursion to 1000. |
static char *wsgi_module_name(apr_pool_t *pool, const char *filename)
{
char *hash = NULL;
char *file = NULL;
/*
* Calculate a name for the module using the MD5 of its full
* pathname. This is so that different code files with the
* same basename are still considered unique. Note that where
... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 123,018,197,615,680,630,000,000,000,000,000,000,000 | 25 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
static int __packet_get_status(struct packet_sock *po, void *frame)
{
union tpacket_uhdr h;
smp_rmb();
h.raw = frame;
switch (po->tp_version) {
case TPACKET_V1:
flush_dcache_page(pgv_to_page(&h.h1->tp_status));
return h.h1->tp_status;
case TPACKET_V2:
flush_dcache_page(pgv_to_page(&h.h2->tp_status));
re... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 320,994,407,001,688,640,000,000,000,000,000,000,000 | 21 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
string_input_for_buffer (const char *string)
{
char *pos_slash, *pos_space, *next_char;
/* special case for C comments pasted in input line */
if (strncmp (string, "/*", 2) == 0)
return string;
/*
* special case if string starts with '/': to allow to paste a path line
* "/path/to/fil... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 215,858,603,664,182,400,000,000,000,000,000,000,000 | 41 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
void DepthwiseConv(const uint8* input_data, const Dims<4>& input_dims,
int32 input_offset, const uint8* filter_data,
const Dims<4>& filter_dims, int32 filter_offset,
const int32* bias_data, const Dims<4>& bias_dims, int stride,
int pad_width, i... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 179,725,114,995,484,780,000,000,000,000,000,000,000 | 16 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
static int cqspi_of_get_flash_pdata(struct platform_device *pdev,
struct cqspi_flash_pdata *f_pdata,
struct device_node *np)
{
if (of_property_read_u32(np, "cdns,read-delay", &f_pdata->read_delay)) {
dev_err(&pdev->dev, "couldn't determine read-delay\n");
return -ENXIO;
}
if (of_property_read_u3... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 193e87143c290ec16838f5368adc0e0bc94eb931 | 200,853,869,977,171,550,000,000,000,000,000,000,000 | 36 | mtd: spi-nor: Off by one in cqspi_setup_flash()
There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the >
should be >=.
Fixes: 140623410536 ('mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Marek Vasut <marex@denx.de>
... |
disconnect_server_nomutex_ext(Connection *conn, PRUint64 opconnid, int opid, PRErrorCode reason, PRInt32 error, int schedule_closure_job)
{
if ((conn->c_sd != SLAPD_INVALID_SOCKET &&
conn->c_connid == opconnid) &&
!(conn->c_flags & CONN_FLAG_CLOSING))
{
slapi_log_err(SLAPI_LOG_CONNS, "d... | 0 | [
"CWE-415"
] | 389-ds-base | a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b | 179,616,908,866,680,650,000,000,000,000,000,000,000 | 77 | Issue 5218 - double-free of the virtual attribute context in persistent search (#5219)
description:
A search is processed by a worker using a private pblock.
If the search is persistent, the worker spawn a thread
and kind of duplicate its private pblock so that the spawn
thread continue to process the p... |
ClientRequestContext::httpStateIsValid()
{
ClientHttpRequest *http_ = http;
if (cbdataReferenceValid(http_))
return true;
http = NULL;
cbdataReferenceDone(http_);
return false;
} | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 333,265,196,490,357,440,000,000,000,000,000,000,000 | 13 | Handle more Range requests (#790)
Also removed some effectively unused code. |
bool Item_func_in::list_contains_null()
{
Item **arg,**arg_end;
for (arg= args + 1, arg_end= args+arg_count; arg != arg_end ; arg++)
{
if ((*arg)->null_inside())
return 1;
}
return 0;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 50,267,539,671,872,380,000,000,000,000,000,000,000 | 10 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static int parse_part_encr_aes256 (sockent_t *se, /* {{{ */
void **ret_buffer, size_t *ret_buffer_len,
int flags)
{
char *buffer = *ret_buffer;
size_t buffer_len = *ret_buffer_len;
size_t payload_len;
size_t part_size;
size_t buffer_offset;
uint16_t username_len;
part_encryption_aes256_t pea;
unsig... | 0 | [
"CWE-119",
"CWE-787"
] | collectd | b589096f907052b3a4da2b9ccc9b0e2e888dfc18 | 296,146,674,055,469,240,000,000,000,000,000,000,000 | 121 | network plugin: Fix heap overflow in parse_packet().
Emilien Gaspar has identified a heap overflow in parse_packet(), the
function used by the network plugin to parse incoming network packets.
This is a vulnerability in collectd, though the scope is not clear at
this point. At the very least specially crafted network... |
size_t syslog_parse_identifier(const char **buf, char **identifier, char **pid) {
const char *p;
char *t;
size_t l, e;
assert(buf);
assert(identifier);
assert(pid);
p = *buf;
p += strspn(p, WHITESPACE);
l = strcspn(p, WHITESPACE);
if (l... | 1 | [
"CWE-125"
] | systemd | a6aadf4ae0bae185dc4c414d492a4a781c80ffe5 | 254,846,726,189,620,000,000,000,000,000,000,000,000 | 51 | journal: fix syslog_parse_identifier()
Fixes #9829. |
CImg<floatT> *pI; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 150,959,050,269,899,440,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
guint btd_request_authorization_cable_configured(const bdaddr_t *src, const bdaddr_t *dst,
const char *uuid, service_auth_cb cb,
void *user_data)
{
struct btd_adapter *adapter;
if (bacmp(src, BDADDR_ANY) == 0)
return 0;
adapter = adapter_find(src);
if (!adapter)
return 0;
return adapter_authoriz... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 184,847,002,544,762,170,000,000,000,000,000,000,000 | 16 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
//! Construct a 2D representation of a 3D image, with XY,XZ and YZ views \inplace.
CImg<T>& projections2d(const unsigned int x0, const unsigned int y0, const unsigned int z0) {
if (_depth<2) return *this;
return get_projections2d(x0,y0,z0).move_to(*this); | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 227,652,584,240,486,500,000,000,000,000,000,000,000 | 4 | . |
int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address)
{
kvm_mmu_invlpg(vcpu, address);
return X86EMUL_CONTINUE;
} | 0 | [
"CWE-476"
] | linux-2.6 | 59839dfff5eabca01cc4e20b45797a60a80af8cb | 291,677,712,514,875,200,000,000,000,000,000,000,000 | 5 | KVM: x86: check for cr3 validity in ioctl_set_sregs
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries... |
ialloc_add_clump(gs_ref_memory_t *imem, ulong space, client_name_t cname)
{
clump_t *cp;
/* Allow acquisition of this clump. */
imem->is_controlled = false;
imem->large_size = imem->clump_size;
imem->limit = max_long;
imem->gc_status.max_vm = max_long;
/* Acquire the clump. */
cp = all... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 205,343,276,337,691,700,000,000,000,000,000,000,000 | 31 | Bug 697985: bounds check the array allocations methods
The clump allocator has four allocation functions that use 'number of elements'
and 'size of elements' parameters (rather than a simple 'number of bytes').
Those need specific bounds checking. |
static int tipc_connect(struct socket *sock, struct sockaddr *dest,
int destlen, int flags)
{
struct sock *sk = sock->sk;
struct tipc_sock *tsk = tipc_sk(sk);
struct sockaddr_tipc *dst = (struct sockaddr_tipc *)dest;
struct msghdr m = {NULL,};
long timeout = (flags & O_NONBLOCK) ? 0 : tsk->conn_timeout;
socket... | 0 | [
"CWE-703"
] | linux | 45e093ae2830cd1264677d47ff9a95a71f5d9f9c | 4,002,533,450,267,105,000,000,000,000,000,000,000 | 80 | tipc: check nl sock before parsing nested attributes
Make sure the socket for which the user is listing publication exists
before parsing the socket netlink attributes.
Prior to this patch a call without any socket caused a NULL pointer
dereference in tipc_nl_publ_dump().
Tested-and-reported-by: Baozeng Ding <splovi... |
void agp_generic_enable(struct agp_bridge_data *bridge, u32 requested_mode)
{
u32 bridge_agpstat, temp;
get_agp_version(agp_bridge);
dev_info(&agp_bridge->dev->dev, "AGP %d.%d bridge\n",
agp_bridge->major_version, agp_bridge->minor_version);
pci_read_config_dword(agp_bridge->dev,
agp_bridge->capndx + ... | 0 | [
"CWE-190"
] | linux-2.6 | 194b3da873fd334ef183806db751473512af29ce | 42,443,185,560,404,785,000,000,000,000,000,000,000 | 43 | agp: fix arbitrary kernel memory writes
pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNBIND ioctl
cmds of agp_ioctl() and passed to agpioc_bind_wrap(). As said in the
comment, (pg_start + mem->page_count) may wrap in case of AGPIOC_BIND,
and it is not checked at all in case of AGPIOC_UNBIND. As a resu... |
LEX_STRING *make_lex_string(const char* str, uint length)
{
LEX_STRING *lex_str;
if (!(lex_str= (LEX_STRING *)alloc_root(mem_root, sizeof(LEX_STRING))))
return 0;
return make_lex_string(lex_str, str, length);
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 285,079,388,163,972,540,000,000,000,000,000,000,000 | 7 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
set_bound_node_opt_info(OptNode* opt, MinMax* plen)
{
copy_mml(&(opt->sb.mmd), plen);
copy_mml(&(opt->spr.mmd), plen);
copy_mml(&(opt->map.mmd), plen);
} | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 41,142,894,935,732,033,000,000,000,000,000,000,000 | 6 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
static int MagickDLLCall PDFDelegateMessage(void *handle,const char *message,
int length)
{
char
**messages;
ssize_t
offset;
offset=0;
messages=(char **) handle;
if (*messages == (char *) NULL)
*messages=(char *) AcquireQuantumMemory(length+1,sizeof(char *));
else
{
offset=strlen(*... | 0 | [
"CWE-200",
"CWE-399",
"CWE-401"
] | ImageMagick | 306c1f0fa5754ca78efd16ab752f0e981d4f6b82 | 99,024,155,688,687,970,000,000,000,000,000,000,000 | 25 | https://github.com/ImageMagick/ImageMagick/issues/1454 |
void ActiveStreamDecoderFilter::setUpstreamOverrideHost(absl::string_view host) {
parent_.upstream_override_host_.emplace(std::move(host));
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 240,025,983,321,461,330,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
e_util_strv_equal (gconstpointer v1,
gconstpointer v2)
{
gchar **strv1 = (gchar **) v1;
gchar **strv2 = (gchar **) v2;
guint length1, length2, ii;
if (strv1 == strv2)
return TRUE;
if (strv1 == NULL || strv2 == NULL)
return FALSE;
length1 = g_strv_length (strv1);
length2 = g_strv_length ... | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 171,579,949,191,945,900,000,000,000,000,000,000,000 | 26 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static void vmx_setup_uret_msr(struct vcpu_vmx *vmx, unsigned int msr)
{
struct vmx_uret_msr tmp;
int from, to;
from = __vmx_find_uret_msr(vmx, msr);
if (from < 0)
return;
to = vmx->nr_active_uret_msrs++;
tmp = vmx->guest_uret_msrs[to];
vmx->guest_uret_msrs[to] = vmx->guest_uret_msrs[from];
vmx->guest_uret_... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 46,660,410,951,478,390,000,000,000,000,000,000,000 | 14 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
dissect_spoolss_string_parm(tvbuff_t *tvb, gint offset, packet_info *pinfo,
proto_tree *tree, dcerpc_info *di, guint8 *drep, const char *text)
{
offset = dissect_ndr_pointer(
tvb, offset, pinfo, tree, di, drep,
dissect_spoolss_string_parm_data, NDR_POINTER_UNIQUE,
text, -1);
return offset;
} | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 134,580,539,395,248,520,000,000,000,000,000,000,000 | 10 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
static ostream& _prefix(std::ostream* _dout, int whoami, epoch_t epoch) {
return *_dout << "osd." << whoami << " " << epoch << " ";
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 153,564,963,660,007,050,000,000,000,000,000,000,000 | 3 | 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 ... |
static void sctp_v6_to_addr(union sctp_addr *addr, struct in6_addr *saddr,
__be16 port)
{
addr->sa.sa_family = AF_INET6;
addr->v6.sin6_port = port;
addr->v6.sin6_addr = *saddr;
} | 0 | [
"CWE-310"
] | net | 95ee62083cb6453e056562d91f597552021e6ae7 | 320,419,627,250,152,400,000,000,000,000,000,000,000 | 7 | net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit
Alan Chester reported an issue with IPv6 on SCTP that IPsec traffic is not
being encrypted, whereas on IPv4 it is. Setting up an AH + ESP transport
does not seem to have the desired effect:
SCTP + IPv4:
22:14:20.809645 IP (tos 0x2,ECT(0), ttl 64, id 0, offse... |
static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
unsigned long addr, unsigned long len,
unsigned long pgoff, unsigned long flags)
{
struct hstate *h = hstate_file(file);
struct vm_unmapped_area_info info;
info.flags = 0;
info.length = len;
info.low_limit = TASK_UNMAPPED_BASE;
info.h... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 221,217,531,346,928,100,000,000,000,000,000,000,000 | 15 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
nbd_unlocked_get_version (struct nbd_handle *h)
{
return PACKAGE_VERSION;
} | 0 | [
"CWE-252"
] | libnbd | c79706af4e7475bf58861a143b77b77a54e7a1cd | 250,668,422,465,891,800,000,000,000,000,000,000,000 | 4 | api: Add new API nbd_set_pread_initialize()
The recent patch series for CVE-2022-0485 demonstrated that when
applications using libnbd are not careful about error checking, the
difference on whether a data leak is at least sanitized (all zeroes,
partial reads, or data leftover from a prior read) vs. a dangerous
inform... |
static apr_byte_t oidc_authorization_response_match_state(request_rec *r,
oidc_cfg *c, const char *state, struct oidc_provider_t **provider,
json_t **proto_state) {
oidc_debug(r, "enter (state=%s)", state);
if ((state == NULL) || (apr_strnatcmp(state, "") == 0)) {
oidc_error(r, "state parameter is not set");
... | 0 | [
"CWE-20"
] | mod_auth_openidc | 612e309bfffd6f9b8ad7cdccda3019fc0865f3b4 | 27,981,620,728,630,307,000,000,000,000,000,000,000 | 22 | don't echo query params on invalid requests to redirect URI; closes #212
thanks @LukasReschke; I'm sure there's some OWASP guideline that warns
against this |
int netdev_txq_to_tc(struct net_device *dev, unsigned int txq)
{
if (dev->num_tc) {
struct netdev_tc_txq *tc = &dev->tc_to_txq[0];
int i;
/* walk through the TCs and see if it falls into any of them */
for (i = 0; i < TC_MAX_QUEUE; i++, tc++) {
if ((txq - tc->offset) < tc->count)
return i;
}
/* d... | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 256,278,787,768,597,300,000,000,000,000,000,000,000 | 18 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
static void fwnet_broadcast_stop(struct fwnet_device *dev)
{
if (dev->broadcast_state == FWNET_BROADCAST_ERROR)
return;
fw_iso_context_stop(dev->broadcast_rcv_context);
__fwnet_broadcast_stop(dev);
} | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 321,012,737,025,112,200,000,000,000,000,000,000,000 | 7 | 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 hrtimer_interrupt(struct clock_event_device *dev)
{
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
struct hrtimer_clock_base *base;
ktime_t expires_next, now;
int i, raise = 0;
BUG_ON(!cpu_base->hres_active);
cpu_base->nr_events++;
dev->next_event.tv64 = KTIME_MAX;
retry:
now = ktime... | 0 | [
"CWE-189"
] | linux-2.6 | 13788ccc41ceea5893f9c747c59bc0b28f2416c2 | 86,424,170,423,475,950,000,000,000,000,000,000,000 | 83 | [PATCH] hrtimer: prevent overrun DoS in hrtimer_forward()
hrtimer_forward() does not check for the possible overflow of
timer->expires. This can happen on 64 bit machines with large interval
values and results currently in an endless loop in the softirq because the
expiry value becomes negative and therefor the timer... |
static struct dentry *proc_task_instantiate(struct inode *dir,
struct dentry *dentry, struct task_struct *task, const void *ptr)
{
struct dentry *error = ERR_PTR(-ENOENT);
struct inode *inode;
inode = proc_pid_make_inode(dir->i_sb, task);
if (!inode)
goto out;
inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO;
inode->i... | 0 | [] | linux | 0499680a42141d86417a8fbaa8c8db806bea1201 | 334,741,757,197,814,160,000,000,000,000,000,000,000 | 26 | procfs: add hidepid= and gid= mount options
Add support for mount options to restrict access to /proc/PID/
directories. The default backward-compatible "relaxed" behaviour is left
untouched.
The first mount option is called "hidepid" and its value defines how much
info about processes we want to be available for non... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.