func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static ASN1_OBJECT *TS_RESP_get_policy(TS_RESP_CTX *ctx)
{
ASN1_OBJECT *requested = TS_REQ_get_policy_id(ctx->request);
ASN1_OBJECT *policy = NULL;
int i;
/* Return the default policy if none is requested or the default is
requested. */
if (!requested || !OBJ_cmp(requested, ctx->default_policy))
policy = c... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 49,878,224,492,424,490,000,000,000,000,000,000,000 | 28 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
void cgsleep_ms_r(cgtimer_t *ts_start, int ms)
{
LARGE_INTEGER li;
li.QuadPart = ts_start->QuadPart + (int64_t)ms * 10000LL;
liSleep(&li, ms);
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 285,289,849,670,562,900,000,000,000,000,000,000,000 | 7 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
mono_reflection_get_custom_attrs_by_type (MonoObject *obj, MonoClass *attr_klass)
{
MonoArray *result;
MonoCustomAttrInfo *cinfo;
cinfo = mono_reflection_get_custom_attrs_info (obj);
if (cinfo) {
if (attr_klass)
result = mono_custom_attrs_construct_by_type (cinfo, attr_klass);
else
result = mono_custom_a... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 164,497,231,265,790,840,000,000,000,000,000,000,000 | 21 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
nfs3svc_encode_writeres(struct svc_rqst *rqstp, __be32 *p,
struct nfsd3_writeres *resp)
{
struct nfsd_net *nn = net_generic(SVC_NET(rqstp), nfsd_net_id);
p = encode_wcc_data(rqstp, p, &resp->fh);
if (resp->status == 0) {
*p++ = htonl(resp->count);
*p++ = htonl(resp->committed);
*p++ = htonl(nn->nfssvc_bo... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 13bf9fbff0e5e099e2b6f003a0ab8ae145436309 | 77,440,053,649,468,180,000,000,000,000,000,000,000 | 14 | nfsd: stricter decoding of write-like NFSv2/v3 ops
The NFSv2/v3 code does not systematically check whether we decode past
the end of the buffer. This generally appears to be harmless, but there
are a few places where we do arithmetic on the pointers involved and
don't account for the possibility that a length could b... |
int reset(void)
{
charset()->cset->fill(charset(),(char*) ptr, field_length,
(has_charset() ? ' ' : 0));
return 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 212,306,189,687,457,080,000,000,000,000,000,000,000 | 6 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
main(int argc, char *argv[])
{
int cnt,rc,cc;
char cmnd[255];
strcpy(cmnd, CMD);
if (argc > 1)
{
for (cnt = 1; cnt < argc; cnt++)
{
strcat(cmnd, " ");
strcat(cmnd, argv[cnt]);
}
}
else
{
fprintf(stderr, "__ %s: failed %d %d\n", argv[0], rc, cc);
return 255;
}
cc ... | 1 | [
"CWE-74"
] | roundcubemail | 7c96646de0efda16cded8491138bfefe31aca940 | 239,134,284,132,334,120,000,000,000,000,000,000,000 | 32 | Fix security issue in DBMail driver of password plugin (#1490261) |
static void mon_text_read_intstat(struct mon_reader_text *rp,
struct mon_text_ptr *p, const struct mon_event_text *ep)
{
p->cnt += snprintf(p->pbuf + p->cnt, p->limit - p->cnt,
" %d:%d", ep->status, ep->interval);
} | 0 | [
"CWE-787"
] | linux | a5f596830e27e15f7a0ecd6be55e433d776986d8 | 237,448,803,798,321,140,000,000,000,000,000,000,000 | 6 | usb: usbmon: Read text within supplied buffer size
This change fixes buffer overflows and silent data corruption with the
usbmon device driver text file read operations.
Signed-off-by: Fredrik Noring <noring@nocrew.org>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by... |
const Type_handler *type_handler() const { return &type_handler_timestamp2; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 166,324,960,077,607,450,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
Item *Item_cond::build_clone(THD *thd)
{
List_iterator_fast<Item> li(list);
Item *item;
Item_cond *copy= (Item_cond *) get_copy(thd);
if (!copy)
return 0;
copy->list.empty();
while ((item= li++))
{
Item *arg_clone= item->build_clone(thd);
if (!arg_clone)
return 0;
if (copy->list.push... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 193,346,945,311,094,030,000,000,000,000,000,000,000 | 18 | 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 ... |
int is_current_stmt_binlog_format_row() const {
DBUG_ASSERT(current_stmt_binlog_format == BINLOG_FORMAT_STMT ||
current_stmt_binlog_format == BINLOG_FORMAT_ROW);
return current_stmt_binlog_format == BINLOG_FORMAT_ROW;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 21,452,017,453,549,950,000,000,000,000,000,000,000 | 5 | 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... |
static int assess_keyring_mode(
const struct security_assessor *a,
const struct security_info *info,
const void *data,
uint64_t *ret_badness,
char **ret_description) {
assert(ret_badness);
assert(ret_description);
... | 0 | [
"CWE-269"
] | systemd | 9d880b70ba5c6ca83c82952f4c90e86e56c7b70c | 142,351,287,485,568,980,000,000,000,000,000,000,000 | 15 | analyze: check for RestrictSUIDSGID= in "systemd-analyze security"
And let's give it a heigh weight, since it pretty much can be used for
bad things only. |
ZRtp::ZRtp(uint8_t *myZid, ZrtpCallback *cb, std::string id, ZrtpConfigure* config, bool mitmm, bool sasSignSupport):
callback(cb), dhContext(NULL), DHss(NULL), auxSecret(NULL), auxSecretLength(0), rs1Valid(false),
rs2Valid(false), msgShaContext(NULL), hash(NULL), cipher(NULL), pubKey(NULL), sasType(NUL... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 92,380,225,268,060,700,000,000,000,000,000,000,000 | 64 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
int apply_subsystem_event_filter(struct trace_subsystem_dir *dir,
char *filter_string)
{
struct event_subsystem *system = dir->subsystem;
struct trace_array *tr = dir->tr;
struct event_filter *filter = NULL;
int err = 0;
mutex_lock(&event_mutex);
/* Make sure the system still has events */
if (!dir->nr_ev... | 0 | [
"CWE-400",
"CWE-284",
"CWE-401"
] | linux | 96c5c6e6a5b6db592acae039fed54b5c8844cd35 | 228,523,581,069,475,200,000,000,000,000,000,000,000 | 42 | tracing: Have error path in predicate_parse() free its allocated memory
In predicate_parse, there is an error path that is not going to
out_free instead it returns directly which leads to a memory leak.
Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com
Signed-off-by: Navid Emamdoost <nav... |
static inline int shmem_acct_block(unsigned long flags)
{
return (flags & VM_NORESERVE) ?
security_vm_enough_memory_mm(current->mm, VM_ACCT(PAGE_CACHE_SIZE)) : 0;
} | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 192,143,051,450,500,000,000,000,000,000,000,000,000 | 5 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... |
TPMI_RH_NV_INDEX_Unmarshal(TPMI_RH_NV_INDEX *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPMI_RH_NV_INDEX orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = TPM_HANDLE_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
BOOL isNotNv = (*tar... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 78,436,806,477,906,530,000,000,000,000,000,000,000 | 17 | 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> |
static void ff_layout_read_record_layoutstats_start(struct rpc_task *task,
struct nfs_pgio_header *hdr)
{
if (test_and_set_bit(NFS_IOHDR_STAT, &hdr->flags))
return;
nfs4_ff_layout_stat_io_start_read(hdr->inode,
FF_LAYOUT_COMP(hdr->lseg, hdr->pgio_mirror_idx),
hdr->args.count,
task->tk_start);
} | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 32,293,857,655,617,290,000,000,000,000,000,000,000 | 10 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
GooString *PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex) {
FoFiTrueType *ffTT;
Gushort *codeToGID;
GooString *psName;
int i;
GooString *myFileName;
myFileName = fileName->copy();
if (faceIndex > 0) {
char tmp[32];
sprintf(tmp, ",%d", faceIndex);
... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 197,093,992,627,899,800,000,000,000,000,000,000,000 | 72 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
int X509_add_cert_new(STACK_OF(X509) **sk, X509 *cert, int flags)
{
if (*sk == NULL
&& (*sk = sk_X509_new_null()) == NULL) {
ERR_raise(ERR_LIB_X509, ERR_R_MALLOC_FAILURE);
return 0;
}
return X509_add_cert(*sk, cert, flags);
} | 0 | [
"CWE-476"
] | openssl | 8130d654d1de922ea224fa18ee3bc7262edc39c0 | 173,495,461,924,178,960,000,000,000,000,000,000,000 | 9 | Fix Null pointer deref in X509_issuer_and_serial_hash()
The OpenSSL public API function X509_issuer_and_serial_hash() attempts
to create a unique hash value based on the issuer and serial number data
contained within an X509 certificate. However it fails to correctly
handle any errors that may occur while parsing the ... |
int GetNumBlocksOfPeers()
{
return std::max(cPeerBlockCounts.median(), Checkpoints::GetTotalBlocksEstimate());
} | 0 | [
"CWE-16",
"CWE-787"
] | bitcoin | a206b0ea12eb4606b93323268fc81a4f1f952531 | 199,927,122,295,414,340,000,000,000,000,000,000,000 | 4 | Do not allow overwriting unspent transactions (BIP 30)
Introduce the following network rule:
* a block is not valid if it contains a transaction whose hash
already exists in the block chain, unless all that transaction's
outputs were already spent before said block.
Warning: this is effectively a network rule ... |
int
yyparse (void *yyscanner, RE_LEX_ENVIRONMENT *lex_env)
{
/* The lookahead symbol. */
int yychar;
/* The semantic value of the lookahead symbol. */
/* Default value used for initialization, for pacifying older GCCs
or non-GCC compilers. */
YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
YYSTYPE yylval YY_I... | 1 | [
"CWE-674",
"CWE-787"
] | yara | 925bcf3c3b0a28b5b78e25d9efda5c0bf27ae699 | 6,947,496,626,550,129,000,000,000,000,000,000,000 | 881 | Fix issue #674. Move regexp limits to limits.h. |
open_cmdwin(void)
{
bufref_T old_curbuf;
win_T *old_curwin = curwin;
bufref_T bufref;
win_T *wp;
int i;
linenr_T lnum;
int histtype;
garray_T winsizes;
int save_restart_edit = restart_edit;
int save_State = State;
int save_exmode = exmode_active;
#ifdef FEAT_R... | 1 | [
"CWE-122",
"CWE-787"
] | vim | 71223e2db87c2bf3b09aecb46266b56cda26191d | 167,841,961,496,016,700,000,000,000,000,000,000,000 | 276 | patch 8.2.5043: can open a cmdline window from a substitute expression
Problem: Can open a cmdline window from a substitute expression.
Solution: Disallow opening a command line window when text or buffer is
locked. |
static void freeContainerEndFunc(tr_variant const* v, void* unused UNUSED)
{
tr_free(v->val.l.vals);
} | 0 | [
"CWE-416",
"CWE-284"
] | transmission | 2123adf8e5e1c2b48791f9d22fc8c747e974180e | 2,819,408,220,035,535,000,000,000,000,000,000,000 | 4 | CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk
In libtransmission/variant.c, function tr_variantWalk, when the variant
stack is reallocated, a pointer to the previously allocated memory
region is kept. This address is later accessed (heap use-after-free)
while walking back down the stack, causing the applic... |
bad_area(struct pt_regs *regs, unsigned long error_code, unsigned long address)
{
__bad_area(regs, error_code, address, NULL, SEGV_MAPERR);
} | 0 | [
"CWE-20"
] | linux | 342db04ae71273322f0011384a9ed414df8bdae4 | 53,409,027,749,984,270,000,000,000,000,000,000,000 | 4 | x86/dumpstack: Don't dump kernel memory based on usermode RIP
show_opcodes() is used both for dumping kernel instructions and for dumping
user instructions. If userspace causes #PF by jumping to a kernel address,
show_opcodes() can be reached with regs->ip controlled by the user,
pointing to kernel code. Make sure th... |
static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
unsigned long end, struct mm_walk *walk)
{
struct clear_refs_private *cp = walk->private;
struct vm_area_struct *vma = walk->vma;
pte_t *pte, ptent;
spinlock_t *ptl;
struct page *page;
ptl = pmd_trans_huge_lock(pmd, vma);
if (ptl) {
if (cp->t... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 325,138,914,434,449,750,000,000,000,000,000,000,000 | 55 | 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 ... |
unsigned int regulator_get_mode(struct regulator *regulator)
{
return _regulator_get_mode(regulator->rdev);
} | 0 | [
"CWE-416"
] | linux | 60a2362f769cf549dc466134efe71c8bf9fbaaba | 180,443,560,360,275,000,000,000,000,000,000,000,000 | 4 | regulator: core: Fix regualtor_ena_gpio_free not to access pin after freeing
After freeing pin from regulator_ena_gpio_free, loop can access
the pin. So this patch fixes not to access pin after freeing.
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org> |
int regset_fpregs_active(struct task_struct *target, const struct user_regset *regset)
{
struct fpu *target_fpu = &target->thread.fpu;
return target_fpu->fpstate_active ? regset->n : 0;
} | 0 | [
"CWE-200"
] | linux | 814fb7bb7db5433757d76f4c4502c96fc53b0b5e | 115,251,651,617,284,760,000,000,000,000,000,000,000 | 6 | x86/fpu: Don't let userspace set bogus xcomp_bv
On x86, userspace can use the ptrace() or rt_sigreturn() system calls to
set a task's extended state (xstate) or "FPU" registers. ptrace() can
set them for another task using the PTRACE_SETREGSET request with
NT_X86_XSTATE, while rt_sigreturn() can set them for the curr... |
int kvm_io_bus_register_dev(struct kvm *kvm, enum kvm_bus bus_idx, gpa_t addr,
int len, struct kvm_io_device *dev)
{
struct kvm_io_bus *new_bus, *bus;
bus = kvm->buses[bus_idx];
/* exclude ioeventfd which is limited by maximum fd */
if (bus->dev_count - bus->ioeventfd_count > NR_IOBUS_DEVS - 1)
return -EN... | 0 | [
"CWE-416",
"CWE-284"
] | linux | a0f1d21c1ccb1da66629627a74059dd7f5ac9c61 | 52,359,642,174,200,840,000,000,000,000,000,000,000 | 23 | KVM: use after free in kvm_ioctl_create_device()
We should move the ops->destroy(dev) after the list_del(&dev->vm_node)
so that we don't use "dev" after freeing it.
Fixes: a28ebea2adc4 ("KVM: Protect device ops->create and list_add with kvm->lock")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: ... |
int Field_varstring::store(const char *from,size_t length,CHARSET_INFO *cs)
{
ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
uint copy_length;
int rc;
rc= well_formed_copy_with_check((char*) get_data(), field_length,
cs, from, length,
field_lengt... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 134,947,896,832,424,830,000,000,000,000,000,000,000 | 15 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
add_char2buf(int c, char_u *s)
{
char_u temp[MB_MAXBYTES + 1];
int i;
int len;
len = (*mb_char2bytes)(c, temp);
for (i = 0; i < len; ++i)
{
c = temp[i];
// Need to escape K_SPECIAL and CSI like in the typeahead buffer.
if (c == K_SPECIAL)
{
*s++ = K_SPECIAL;
*s++ = KS_SPECIAL;
... | 0 | [] | vim | 98a336dd497d3422e7efeef9f24cc9e25aeb8a49 | 96,326,190,494,456,140,000,000,000,000,000,000,000 | 30 | patch 8.2.0133: invalid memory access with search command
Problem: Invalid memory access with search command.
Solution: When :normal runs out of characters in bracketed paste mode break
out of the loop.(closes #5511) |
int ha_maria::repair(THD * thd, HA_CHECK_OPT *check_opt)
{
int error;
HA_CHECK *param= (HA_CHECK*) thd->alloc(sizeof *param);
ha_rows start_records;
const char *old_proc_info;
if (!file || !param)
return HA_ADMIN_INTERNAL_ERROR;
maria_chk_init(param);
param->thd= thd;
param->op_name= "repair";
... | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 13,418,314,487,391,655,000,000,000,000,000,000,000 | 84 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
static void ct_show_zone(struct seq_file *s, const struct nf_conn *ct,
int dir)
{
const struct nf_conntrack_zone *zone = nf_ct_zone(ct);
if (zone->dir != dir)
return;
switch (zone->dir) {
case NF_CT_DEFAULT_ZONE_DIR:
seq_printf(s, "zone=%u ", zone->id);
break;
case NF_CT_ZONE_DIR_ORIG:
seq_printf(s, "... | 0 | [
"CWE-203"
] | linux | 2671fa4dc0109d3fb581bc3078fdf17b5d9080f6 | 31,477,574,334,848,000,000,000,000,000,000,000,000 | 21 | netfilter: conntrack: Make global sysctls readonly in non-init netns
These sysctls point to global variables:
- NF_SYSCTL_CT_MAX (&nf_conntrack_max)
- NF_SYSCTL_CT_EXPECT_MAX (&nf_ct_expect_max)
- NF_SYSCTL_CT_BUCKETS (&nf_conntrack_htable_size_user)
Because their data pointers are not updated to point to per-netns
s... |
static void l2cap_connect_cfm(struct hci_conn *hcon, u8 status)
{
struct hci_dev *hdev = hcon->hdev;
struct l2cap_conn *conn;
struct l2cap_chan *pchan;
u8 dst_type;
if (hcon->type != ACL_LINK && hcon->type != LE_LINK)
return;
BT_DBG("hcon %p bdaddr %pMR status %d", hcon, &hcon->dst, status);
if (status) {
... | 0 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 305,833,394,526,476,550,000,000,000,000,000,000,000 | 60 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
call_ready (p11_rpc_message *msg)
{
assert (msg->output);
/*
* Called right before invoking the actual PKCS#11 function
* Reading out of data is complete, get ready to write return values.
*/
if (p11_buffer_failed (msg->output)) {
p11_message ("invalid request from module, probably too short"); \
return ... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 98,710,835,374,392,700,000,000,000,000,000,000,000 | 26 | Check for arithmetic overflows before allocating |
cudnnConvolutionDescriptor_t handle() const { return handle_.get(); } | 0 | [
"CWE-20"
] | tensorflow | 14755416e364f17fb1870882fa778c7fec7f16e3 | 67,573,973,517,118,380,000,000,000,000,000,000,000 | 1 | Prevent CHECK-fail in LSTM/GRU with zero-length input.
PiperOrigin-RevId: 346239181
Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f |
startElementHandler(void *userData, const char *name, const char **atts)
{
int pos;
userdata_t *ud = (userdata_t *) userData;
Agraph_t *g = NULL;
if (strcmp(name, "graphml") == 0) {
/* do nothing */
} else if (strcmp(name, "graph") == 0) {
const char *edgeMode = "";
const char *id;
Agdesc_t dir... | 1 | [
"CWE-476"
] | graphviz | 839085f8026afd6f6920a0c31ad2a9d880d97932 | 189,558,412,731,499,800,000,000,000,000,000,000,000 | 111 | attempted fix for null pointer deference on malformed input |
destroy_worker_thread(comp_thread_ctxt_t *thd)
{
pthread_mutex_lock(&thd->data_mutex);
thd->cancelled = TRUE;
pthread_cond_signal(&thd->data_cond);
pthread_mutex_unlock(&thd->data_mutex);
pthread_join(thd->id, NULL);
pthread_cond_destroy(&thd->data_cond);
pthread_mutex_destroy(&thd->data_mutex);
my_free(thd-... | 0 | [
"CWE-703"
] | edgeless-mariadb | 91d5fffa0796b8208c3d6633c8f296da8914af4d | 91,858,999,689,066,580,000,000,000,000,000,000,000 | 14 | MDEV-28719: compress_write() leaks data_mutex on error |
test_bson_append_general (void)
{
uint8_t bytes[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0x01, 0x23, 0x45};
bson_oid_t oid;
bson_t *bson;
bson_t *array;
bson_t *subdoc;
bson = bson_new ();
BSON_ASSERT (bson_append_int32 (bson, "int", -1, 1));
BSON_ASSERT_BSON_EQUAL_FILE (bson, "test1.bson");
bson_d... | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 271,679,064,314,098,360,000,000,000,000,000,000,000 | 113 | CDRIVER-2269 Check for zero string length in codewscope |
static unsigned int fuse_write_flags(struct kiocb *iocb)
{
unsigned int flags = iocb->ki_filp->f_flags;
if (iocb->ki_flags & IOCB_DSYNC)
flags |= O_DSYNC;
if (iocb->ki_flags & IOCB_SYNC)
flags |= O_SYNC;
return flags;
} | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 126,423,857,046,111,640,000,000,000,000,000,000,000 | 11 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
nfs4_shutdown_ds_clients(struct nfs_client *clp)
{
struct nfs4_ds_server *dss;
while (!list_empty(&clp->cl_ds_clients)) {
dss = list_entry(clp->cl_ds_clients.next,
struct nfs4_ds_server, list);
list_del(&dss->list);
rpc_shutdown_client(dss->rpc_clnt);
kfree (dss);
}
} | 0 | [
"CWE-703"
] | linux | dd99e9f98fbf423ff6d365b37a98e8879170f17c | 287,460,890,952,708,600,000,000,000,000,000,000,000 | 12 | NFSv4: Initialise connection to the server in nfs4_alloc_client()
Set up the connection to the NFSv4 server in nfs4_alloc_client(), before
we've added the struct nfs_client to the net-namespace's nfs_client_list
so that a downed server won't cause other mounts to hang in the trunking
detection code.
Reported-by: Mich... |
static ZEND_RESULT_CODE parse_userinfo(struct parse_state *state, const char *ptr)
{
size_t mb;
const char *password = NULL, *end = state->ptr, *tmp = ptr;
TSRMLS_FETCH_FROM_CTX(state->ts);
state->url.user = &state->buffer[state->offset];
do {
switch (*ptr) {
case ':':
if (password) {
php_error_docref... | 0 | [
"CWE-119"
] | ext-http | 3724cd76a28be1d6049b5537232e97ac567ae1f5 | 15,742,526,697,425,259,000,000,000,000,000,000,000 | 64 | fix bug #71719 (Buffer overflow in HTTP url parsing functions)
The parser's offset was not reset when we softfail in scheme
parsing and continue to parse a path.
Thanks to hlt99 at blinkenshell dot org for the report. |
XkbWriteGeomColors(char *wire, XkbGeometryPtr geom, Bool swap)
{
register int i;
register XkbColorPtr color;
for (i = 0, color = geom->colors; i < geom->num_colors; i++, color++) {
wire = XkbWriteCountedString(wire, color->spec, swap);
}
return wire;
} | 0 | [
"CWE-119"
] | xserver | f7cd1276bbd4fe3a9700096dec33b52b8440788d | 136,255,138,541,318,440,000,000,000,000,000,000,000 | 10 | Correct bounds checking in XkbSetNames()
CVE-2020-14345 / ZDI 11428
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
KEY_GenerateAuth(uint32_t key_id, const unsigned char *data, int data_len,
unsigned char *auth, int auth_len)
{
Key *key;
key = get_key_by_id(key_id);
if (!key)
return 0;
return generate_auth(key, data, data_len, auth, auth_len);
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 28,841,581,306,563,718,000,000,000,000,000,000,000 | 12 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
gnutls_ocsp_resp_check_crt(gnutls_ocsp_resp_t resp,
unsigned int indx, gnutls_x509_crt_t crt)
{
int ret;
gnutls_digest_algorithm_t digest;
gnutls_datum_t rdn_hash = { NULL, 0 }, rserial = {
NULL, 0};
gnutls_datum_t cserial = { NULL, 0 };
gnutls_datum_t dn = { NULL, 0 };
uint8_t cdn_hash[MAX_HASH_SIZE];
si... | 0 | [
"CWE-264"
] | gnutls | 964632f37dfdfb914ebc5e49db4fa29af35b1de9 | 108,745,304,371,553,520,000,000,000,000,000,000,000 | 80 | ocsp: corrected the comparison of the serial size in OCSP response
Previously the OCSP certificate check wouldn't verify the serial length
and could succeed in cases it shouldn't.
Reported by Stefan Buehler. |
static int vidioc_enum_fmt_cap(struct file *file, void *fh, struct v4l2_fmtdesc *f)
{
struct v4l2_loopback_device *dev;
MARK();
dev = v4l2loopback_getdevice(file);
if (f->index)
return -EINVAL;
if (dev->ready_for_capture) {
const __u32 format = dev->pix_format.pixelformat;
snprintf(f->description, sizeof(... | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 16,754,667,555,484,210,000,000,000,000,000,000,000 | 27 | add explicit format specifier to printf() invocations
CWE-134 |
int pin_inotify_watch(struct inotify_watch *watch)
{
struct super_block *sb = watch->inode->i_sb;
spin_lock(&sb_lock);
if (sb->s_count >= S_BIAS) {
atomic_inc(&sb->s_active);
spin_unlock(&sb_lock);
atomic_inc(&watch->count);
return 1;
}
spin_unlock(&sb_lock);
return 0;
} | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 304,105,842,668,552,600,000,000,000,000,000,000,000 | 13 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
void wsrep_abort_cb(void) { wsrep_sst_cancel(false); } | 0 | [
"CWE-77"
] | percona-xtradb-cluster | 8a338477c9184dd0e03a5c661e9c3a79456de8a4 | 236,912,003,567,020,300,000,000,000,000,000,000,000 | 1 | PXC-3392: Donor uses invalid SST methods |
pam_sm_setcred (pam_handle_t * pamh, int flags, int argc, const char **argv)
{
return PAM_SUCCESS;
} | 0 | [
"CWE-20"
] | yubico-pam | 4712da70cac159d5ca9579c1e4fac0645b674043 | 17,561,130,221,247,142,000,000,000,000,000,000,000 | 4 | Fix big security hole: Authentication succeeded when no password
was given, unless use_first_pass was being used.
This is fatal if pam_yubico is considered 'sufficient' in the PAM
configuration.
Signed-off-by: Nanakos Chrysostomos <nanakos@wired-net.gr> |
void stralgoLCS(client *c) {
uint32_t i, j;
long long minmatchlen = 0;
sds a = NULL, b = NULL;
int getlen = 0, getidx = 0, withmatchlen = 0;
robj *obja = NULL, *objb = NULL;
for (j = 2; j < (uint32_t)c->argc; j++) {
char *opt = c->argv[j]->ptr;
int moreargs = (c->argc-1) - j;
... | 1 | [
"CWE-190"
] | redis | 394614a5f91d88380f480c4610926a865b5b0f16 | 5,416,716,427,636,361,000,000,000,000,000,000,000 | 211 | Fix integer overflow in STRALGO LCS (CVE-2021-29477)
An integer overflow bug in Redis version 6.0 or newer could be exploited using
the STRALGO LCS command to corrupt the heap and potentially result with remote
code execution.
(cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9) |
static int find_watcher(struct rbd_device *rbd_dev,
const struct ceph_locker *locker)
{
struct ceph_osd_client *osdc = &rbd_dev->rbd_client->client->osdc;
struct ceph_watch_item *watchers;
u32 num_watchers;
u64 cookie;
int i;
int ret;
ret = ceph_osdc_list_watchers(osdc, &rbd_dev->header_oid,
&rbd_d... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 138,834,041,787,757,670,000,000,000,000,000,000,000 | 40 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
qb_ipcs_service_t *mainloop_add_ipc_server(
const char *name, enum qb_ipc_type type, struct qb_ipcs_service_handlers *callbacks)
{
int rc = 0;
qb_ipcs_service_t* server = NULL;
if(gio_map == NULL) {
gio_map = qb_array_create_2(64, sizeof(struct gio_to_qb_poll), 1);
}
server = qb_ipcs_... | 0 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 304,612,135,660,291,200,000,000,000,000,000,000,000 | 21 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
char *
pat_subst (string, pat, rep, mflags)
char *string, *pat, *rep;
int mflags;
{
char *ret, *s, *e, *str, *rstr, *mstr;
int rptr, mtype, rxpand, mlen;
size_t rsize, l, replen, rslen;
if (string == 0)
return (savestring (""));
mtype = mflags & MATCH_TYPEMASK;
#if 0 /* bash-4.2 ? */
rxpan... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 258,535,040,067,046,750,000,000,000,000,000,000,000 | 130 | Bash-4.4 patch 7 |
cleanup_entry(struct ipt_entry *e, unsigned int *i)
{
struct ipt_entry_target *t;
if (i && (*i)-- == 0)
return 1;
/* Cleanup all matches */
IPT_MATCH_ITERATE(e, cleanup_match, NULL);
t = ipt_get_target(e);
if (t->u.kernel.target->destroy)
t->u.kernel.target->destroy(t->u.kernel.target, t->data);
module_put... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 190,089,762,059,296,950,000,000,000,000,000,000,000 | 15 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
root_schema(agooErr err, gqlDoc doc, gqlCobj obj, gqlField field, gqlSel sel, gqlValue result, int depth) {
struct _gqlCobj child = { .clas = &schema_class, .ptr = NULL };
gqlValue co;
const char *key = sel->name;
if (NULL != sel->alias) {
key = sel->alias;
}
if (NULL == (co = gql_object_cre... | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 180,958,360,382,457,300,000,000,000,000,000,000,000 | 14 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
add_opcode_option(regex_t* reg, int opcode, OnigOptionType option)
{
int r;
r = add_opcode(reg, opcode);
if (r) return r;
r = add_option(reg, option);
return r;
} | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 77,814,044,186,694,870,000,000,000,000,000,000,000 | 9 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
bool parse_n(const char *s, size_t n, any &dt,
const char *path = nullptr) const {
if (grammar_ != nullptr) {
const auto &rule = (*grammar_)[start_];
auto r = rule.parse(s, n, dt, path);
output_log(s, n, r);
return r.ret && r.len == n;
}
return false;
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 226,190,359,356,302,700,000,000,000,000,000,000,000 | 10 | Fix #122 |
minimask_has_extra(const struct minimask *a, const struct minimask *b)
{
const uint64_t *bp = miniflow_get_values(&b->masks);
size_t idx;
FLOWMAP_FOR_EACH_INDEX(idx, b->masks.map) {
uint64_t b_u64 = *bp++;
/* 'b_u64' is non-zero, check if the data in 'a' is either zero
* or misses... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 74,842,670,852,691,300,000,000,000,000,000,000,000 | 18 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
pa_enc_ts_validate(kdc_request_t r, const PA_DATA *pa)
{
EncryptedData enc_data;
krb5_error_code ret;
krb5_crypto crypto;
krb5_data ts_data;
PA_ENC_TS_ENC p;
size_t len;
Key *pa_key;
char *str;
if (_kdc_is_anon_request(&r->req.req_body)) {
ret = KRB5KRB_AP_ERR_BAD_INTEGRITY;
_kdc... | 0 | [
"CWE-476"
] | heimdal | 1a6a6e462dc2ac6111f9e02c6852ddec4849b887 | 240,680,686,446,704,960,000,000,000,000,000,000,000 | 153 | Security: Avoid NULL structure pointer member dereference
This can happen in the error path when processing malformed AS
requests with a NULL client name. Bug originally introduced on
Fri Feb 13 09:26:01 2015 +0100 in commit:
a873e21d7c06f22943a90a41dc733ae76799390d
kdc: base _kdc_fast_mk_error() on krb5_mk... |
f_count(typval_T *argvars, typval_T *rettv)
{
long n = 0;
int ic = FALSE;
int error = FALSE;
if (argvars[2].v_type != VAR_UNKNOWN)
ic = (int)tv_get_number_chk(&argvars[2], &error);
if (argvars[0].v_type == VAR_STRING)
{
char_u *expr = tv_get_string_chk(&argvars[1]);
char_u *p = argvars[0]... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 95,080,367,858,688,610,000,000,000,000,000,000,000 | 102 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
int main(int argc, char** argv)
{
int i,
filenamesStart=2;
char* exename=argv[0];
char* input_filename=0;
// Welcome message
DISPLAY(WELCOME_MESSAGE);
if (argc<2) { badusage(exename); return 1; }
for(i=1; i<argc; i++)
{
char* argument = argv[i];
if(!argument) ... | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 131,219,702,193,020,570,000,000,000,000,000,000,000 | 111 | Fixed : issue 52 (reported by Ludwig Strigeus) |
MODRET set_createhome(cmd_rec *cmd) {
int bool = -1, start = 2;
mode_t mode = (mode_t) 0700, dirmode = (mode_t) 0711;
char *skel_path = NULL;
config_rec *c = NULL;
uid_t cuid = 0;
gid_t cgid = 0, hgid = -1;
unsigned long flags = 0UL;
if (cmd->argc-1 < 1) {
CONF_ERROR(cmd, "wrong number of parameter... | 0 | [
"CWE-59",
"CWE-295"
] | proftpd | 349addc3be4fcdad9bd4ec01ad1ccd916c898ed8 | 242,725,110,357,423,420,000,000,000,000,000,000,000 | 188 | Walk the entire DefaultRoot path, checking for symlinks of any component,
when AllowChrootSymlinks is disabled. |
vrrp_print(netdissect_options *ndo,
register const u_char *bp, register u_int len,
register const u_char *bp2, int ttl)
{
int version, type, auth_type = VRRP_AUTH_NONE; /* keep compiler happy */
const char *type_s;
ND_TCHECK(bp[0]);
version = (bp[0] & 0xf0) >> 4;
type = bp[0] & 0x0f;
type_s... | 0 | [
"CWE-787"
] | tcpdump | a152aebfd1114376ba266ed30416be596ef9d806 | 196,987,294,509,399,280,000,000,000,000,000,000,000 | 82 | (for 4.9.3) VRRP: Add a missing bounds check
In vrrp_print().
This fixes a buffer over-read discovered by Konrad Rieck and
Bhargava Shastry.
Add a test using the capture file supplied by the reporter(s)
restricted to VRRP packets. |
Curl_compareheader(const char *headerline, /* line to check */
const char *header, /* header keyword _with_ colon */
const char *content) /* content string to find */
{
/* RFC2616, section 4.2 says: "Each header field consists of a name followed
* by a colon (":") and the fie... | 0 | [
"CWE-284"
] | curl | 79b9d5f1a42578f807a6c94914bc65cbaa304b6d | 151,599,370,982,077,410,000,000,000,000,000,000,000 | 47 | http_done: close Negotiate connections when done
When doing HTTP requests Negotiate authenticated, the entire connnection
may become authenticated and not just the specific HTTP request which is
otherwise how HTTP works, as Negotiate can basically use NTLM under the
hood. curl was not adhering to this fact but would a... |
void WebContents::SetImageAnimationPolicy(const std::string& new_policy) {
auto* web_preferences = WebContentsPreferences::From(web_contents());
web_preferences->SetImageAnimationPolicy(new_policy);
web_contents()->OnWebPreferencesChanged();
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 80,728,495,620,901,960,000,000,000,000,000,000,000 | 5 | 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
... |
fast_pf_fix_direct_spte(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
u64 *sptep, u64 old_spte, u64 new_spte)
{
/*
* Theoretically we could also set dirty bit (and flush TLB) here in
* order to eliminate unnecessary PML logging. See comments in
* set_spte. But fast_page_fault is very unlikely to happen... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 144,997,529,058,913,160,000,000,000,000,000,000,000 | 23 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
static void clock_handler(const int fd, const short which, void *arg) {
struct timeval t = {.tv_sec = 1, .tv_usec = 0};
static bool initialized = false;
if (initialized) {
/* only delete the event if it's actually there. */
evtimer_del(&clockevent);
} else {
initialized = true;
... | 0 | [
"CWE-20"
] | memcached | d9cd01ede97f4145af9781d448c62a3318952719 | 292,426,188,445,139,800,000,000,000,000,000,000,000 | 17 | Use strncmp when checking for large ascii multigets. |
static int cit_start_model1(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
int i, clock_div;
clock_div = cit_get_clock_div(gspca_dev);
if (clock_div < 0)
return clock_div;
cit_read_reg(gspca_dev, 0x0128, 1);
cit_read_reg(gspca_dev, 0x0100, 0);
cit_write_reg(gspca_dev, 0x01, 0x0100); ... | 0 | [
"CWE-476"
] | linux | a246b4d547708f33ff4d4b9a7a5dbac741dc89d8 | 197,813,465,130,363,840,000,000,000,000,000,000,000 | 201 | media: xirlink_cit: add missing descriptor sanity checks
Make sure to check that we have two alternate settings and at least one
endpoint before accessing the second altsetting structure and
dereferencing the endpoint arrays.
This specifically avoids dereferencing NULL-pointers or corrupting
memory when a device does... |
static void whereUndoExprMods(WhereInfo *pWInfo){
while( pWInfo->pExprMods ){
WhereExprMod *p = pWInfo->pExprMods;
pWInfo->pExprMods = p->pNext;
memcpy(p->pExpr, &p->orig, sizeof(p->orig));
sqlite3DbFree(pWInfo->pParse->db, p);
}
} | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 147,512,998,829,893,390,000,000,000,000,000,000,000 | 8 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
mono_reflection_get_token (MonoObject *obj)
{
MonoClass *klass;
guint32 token = 0;
klass = obj->vtable->klass;
if (strcmp (klass->name, "MethodBuilder") == 0) {
MonoReflectionMethodBuilder *mb = (MonoReflectionMethodBuilder *)obj;
token = mb->table_idx | MONO_TOKEN_METHOD_DEF;
} else if (strcmp (klass->name... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 41,522,988,826,363,620,000,000,000,000,000,000,000 | 79 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static int udplite_v4_get_port(struct sock *sk, unsigned short snum)
{
return udplite_get_port(sk, snum, ipv4_rcv_saddr_equal);
} | 0 | [] | linux-2.6 | 32c1da70810017a98aa6c431a5494a302b6b9a30 | 26,468,956,851,249,000,000,000,000,000,000,000,000 | 4 | [UDP]: Randomize port selection.
This patch causes UDP port allocation to be randomized like TCP.
The earlier code would always choose same port (ie first empty list).
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int do_reconstruct(struct findall_data *data, void *rock)
{
if (!data) return 0;
struct reconstruct_rock *rrock = (struct reconstruct_rock *) rock;
int r;
struct mailbox *mailbox = NULL;
char outpath[MAX_MAILBOX_PATH];
const char *name = NULL;
int make_changes = reconstruct_flags & RE... | 0 | [] | cyrus-imapd | 1d6d15ee74e11a9bd745e80be69869e5fb8d64d6 | 87,698,979,195,146,100,000,000,000,000,000,000,000 | 250 | mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path() |
static void ocfs2_calc_trunc_pos(struct inode *inode,
struct ocfs2_extent_list *el,
struct ocfs2_extent_rec *rec,
u32 trunc_start, u32 *trunc_cpos,
u32 *trunc_len, u32 *trunc_end,
u64 *blkno, int *done)
{
int ret = 0;
u32 coff, range;
range = le32_to_cpu(rec->e_cpos) + ocfs2_rec_clusters(el... | 0 | [
"CWE-401"
] | linux | 28f5a8a7c033cbf3e32277f4cc9c6afd74f05300 | 219,043,688,481,664,420,000,000,000,000,000,000,000 | 55 | ocfs2: should wait dio before inode lock in ocfs2_setattr()
we should wait dio requests to finish before inode lock in
ocfs2_setattr(), otherwise the following deadlock will happen:
process 1 process 2 process 3
truncate file 'A' end_io of writing file 'A' receiving the ... |
bool Smb4KGlobal::coreIsRunning()
{
return (Smb4KScanner::self()->isRunning() ||
Smb4KMounter::self()->isRunning() ||
Smb4KPrint::self()->isRunning() ||
Smb4KSynchronizer::self()->isRunning() ||
Smb4KPreviewer::self()->isRunning() ||
Smb4KSearch::self()->isRunning());... | 0 | [
"CWE-20"
] | smb4k | 71554140bdaede27b95dbe4c9b5a028a83c83cce | 125,417,166,191,330,790,000,000,000,000,000,000,000 | 9 | Find the mount/umount commands in the helper
Instead of trusting what we get passed in
CVE-2017-8849 |
static int rose_node_show(struct seq_file *seq, void *v)
{
char rsbuf[11];
int i;
if (v == SEQ_START_TOKEN)
seq_puts(seq, "address mask n neigh neigh neigh\n");
else {
const struct rose_node *rose_node = v;
/* if (rose_node->loopback) {
seq_printf(seq, "%-10s %04d 1 loopback\n",
rose2asc(rsbuf, ... | 0 | [
"CWE-20"
] | linux | e0bccd315db0c2f919e7fcf9cb60db21d9986f52 | 198,752,817,519,140,800,000,000,000,000,000,000,000 | 28 | rose: Add length checks to CALL_REQUEST parsing
Define some constant offsets for CALL_REQUEST based on the description
at <http://www.techfest.com/networking/wan/x25plp.htm> and the
definition of ROSE as using 10-digit (5-byte) addresses. Use them
consistently. Validate all implicit and explicit facilities lengths.
... |
void blk_mq_tag_init_last_tag(struct blk_mq_tags *tags, unsigned int *tag)
{
unsigned int depth = tags->nr_tags - tags->nr_reserved_tags;
*tag = prandom_u32() % depth;
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 118,260,090,833,771,980,000,000,000,000,000,000,000 | 6 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
const GUID_t& persistence_guid() const
{
return m_guid;
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 144,383,072,213,054,430,000,000,000,000,000,000,000 | 4 | 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... |
inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int chans, int ord, const DivPattern** patCache) {
static char id[32];
bool selectedRow=(i>=sel1.y && i<=sel2.y);
ImGui::TableNextRow(0,lineHeight);
ImGui::TableNextColumn();
float cursorPosY=ImGui::GetCursorPos().y-ImGui::GetScrollY(... | 0 | [
"CWE-703"
] | furnace | 0eb02422d5161767e9983bdaa5c429762d3477ce | 200,281,707,593,833,640,000,000,000,000,000,000,000 | 281 | fix possible pattern crash
issue #325 |
void metx_box_del(GF_Box *s)
{
GF_MetaDataSampleEntryBox *ptr = (GF_MetaDataSampleEntryBox*)s;
if (ptr == NULL) return;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)s);
if (ptr->content_encoding) gf_free(ptr->content_encoding);
if (ptr->xml_namespace) gf_free(ptr->xml_namespace);
if (ptr->xml_schema_loc... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 122,646,689,847,241,180,000,000,000,000,000,000,000 | 12 | fixed #1587 |
static pj_status_t parse_rr(pj_dns_parsed_rr *rr, pj_pool_t *pool,
const pj_uint8_t *pkt,
const pj_uint8_t *start, const pj_uint8_t *max,
int *parsed_len)
{
const pj_uint8_t *p = start;
int name_len, name_part_len;
pj_status_t status;
/* Get the length of the name */
status = g... | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | 9fae8f43accef8ea65d4a8ae9cdf297c46cfe29a | 168,449,580,624,566,640,000,000,000,000,000,000,000 | 137 | Merge pull request from GHSA-p6g5-v97c-w5q4
* Prevent heap buffer overflow when parsing DNS packets
* Make sure packet parsing doesn't advance beyond max/end
* Update checks
* Remove check
Co-authored-by: sauwming <ming@teluu.com> |
static int save_selftest(struct tracer *type)
{
struct trace_selftests *selftest;
selftest = kmalloc(sizeof(*selftest), GFP_KERNEL);
if (!selftest)
return -ENOMEM;
selftest->type = type;
list_add(&selftest->list, &postponed_selftests);
return 0;
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 66,809,826,175,488,970,000,000,000,000,000,000,000 | 12 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
ScrollSelection(TScreen *screen, int amount, Bool always)
{
int minrow = INX2ROW(screen, -screen->savedlines);
int maxrow = INX2ROW(screen, screen->max_row);
int maxcol = screen->max_col;
#define scroll_update_one(cell) \
(cell)->row += amount; \
if ((cell)->row < minrow) { \
(cell)->row = minrow; \... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 17,087,770,022,896,696,000,000,000,000,000,000,000 | 51 | snapshot of project "xterm", label xterm-365d |
load_binfloat(UnpicklerObject *self)
{
PyObject *value;
double x;
char *s;
if (_Unpickler_Read(self, &s, 8) < 0)
return -1;
x = _PyFloat_Unpack8((unsigned char *)s, 0);
if (x == -1.0 && PyErr_Occurred())
return -1;
if ((value = PyFloat_FromDouble(x)) == NULL)
retur... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 284,631,038,098,744,750,000,000,000,000,000,000,000 | 19 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
rdp_in_coord(STREAM s, sint16 * coord, RD_BOOL delta)
{
sint8 change;
if (delta)
{
in_uint8(s, change);
*coord += change;
}
else
{
in_uint16_le(s, *coord);
}
} | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 313,633,494,778,940,600,000,000,000,000,000,000,000 | 14 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
static char sctp_tietags_compare(struct sctp_association *new_asoc,
const struct sctp_association *asoc)
{
/* In this case, the peer may have restarted. */
if ((asoc->c.my_vtag != new_asoc->c.my_vtag) &&
(asoc->c.peer_vtag != new_asoc->c.peer_vtag) &&
(asoc->c.my_vtag == new_asoc->c.my_ttag) &&
(... | 0 | [
"CWE-20"
] | linux-2.6 | ba0166708ef4da7eeb61dd92bbba4d5a749d6561 | 59,829,251,428,953,960,000,000,000,000,000,000,000 | 32 | sctp: Fix kernel panic while process protocol violation parameter
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramh... |
static int syscall_enter_register(struct ftrace_event_call *event,
enum trace_reg type, void *data)
{
struct ftrace_event_file *file = data;
switch (type) {
case TRACE_REG_REGISTER:
return reg_event_syscall_enter(file, event);
case TRACE_REG_UNREGISTER:
unreg_event_syscall_enter(file, event);
return 0;
... | 0 | [
"CWE-125",
"CWE-476",
"CWE-119",
"CWE-264"
] | linux | 086ba77a6db00ed858ff07451bedee197df868c9 | 270,115,368,097,231,120,000,000,000,000,000,000,000 | 27 | tracing/syscalls: Ignore numbers outside NR_syscalls' range
ARM has some private syscalls (for example, set_tls(2)) which lie
outside the range of NR_syscalls. If any of these are called while
syscall tracing is being performed, out-of-bounds array access will
occur in the ftrace and perf sys_{enter,exit} handlers.
... |
static int tls_check_certificate (CONNECTION* conn)
{
tlssockdata *data = conn->sockdata;
gnutls_session_t state = data->state;
const gnutls_datum_t *cert_list;
unsigned int cert_list_size = 0;
gnutls_certificate_status_t certstat;
int certerr, i, preauthrc, savedcert, rc = 0;
int max_preauth_pass = -1;
... | 0 | [
"CWE-74"
] | mutt | c547433cdf2e79191b15c6932c57f1472bfb5ff4 | 220,837,309,794,147,750,000,000,000,000,000,000,000 | 81 | Fix STARTTLS response injection attack.
Thanks again to Damian Poddebniak and Fabian Ising from the Münster
University of Applied Sciences for reporting this issue. Their
summary in ticket 248 states the issue clearly:
We found another STARTTLS-related issue in Mutt. Unfortunately, it
affects SMTP, POP3 and IMAP... |
ZEND_VM_COLD_CONST_HANDLER(14, ZEND_BOOL_NOT, CONST|TMPVAR|CV, ANY)
{
USE_OPLINE
zval *val;
zend_free_op free_op1;
val = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
if (Z_TYPE_INFO_P(val) == IS_TRUE) {
ZVAL_FALSE(EX_VAR(opline->result.var));
} else if (EXPECTED(Z_TYPE_INFO_P(val) <= IS_TRUE)) {
/* The result and op1 c... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 14,878,996,347,632,544,000,000,000,000,000,000,000 | 26 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
static int find_desc_store(annotate_state_t *state,
const char *name,
const annotate_entrydesc_t **descp)
{
int scope = state->which;
const ptrarray_t *descs;
const annotate_entrydesc_t *db_entry;
annotate_entrydesc_t *desc;
int i;
if (scope... | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 125,231,597,035,046,910,000,000,000,000,000,000,000 | 62 | annotate: don't allow everyone to write shared server entries |
static char *__read_nonnull_str_at(RBuffer *buf, ut64 *offset) {
ut8 size = r_buf_read8_at (buf, *offset);
size &= 0x7F; // Max is 127
if (!size) {
return NULL;
}
(*offset)++;
char *str = calloc ((ut64)size + 1, sizeof (char));
r_buf_read_at (buf, *offset, (ut8 *)str, size);
*offset += size;
return str;
} | 0 | [
"CWE-252"
] | radare2 | d7ea20fb2e1433ebece9f004d87ad8f2377af23d | 303,738,796,814,357,570,000,000,000,000,000,000,000 | 12 | Fix #18923 - Fix resource exhaustion bug in LE binary (#18926) |
static ssize_t part_discard_alignment_show(struct device *dev,
struct device_attribute *attr, char *buf)
{
struct block_device *bdev = dev_to_bdev(dev);
return sprintf(buf, "%u\n",
queue_limit_discard_alignment(&bdev->bd_disk->queue->limits,
bdev->bd_start_sect));
} | 0 | [
"CWE-416"
] | linux | 9fbfabfda25d8774c5a08634fdd2da000a924890 | 260,878,281,032,976,600,000,000,000,000,000,000,000 | 9 | block: fix incorrect references to disk objects
When adding partitions to the disk, the reference count of the disk
object is increased. then alloc partition device and called
device_add(), if the device_add() return error, the reference
count of the disk object will be reduced twice, at put_device(pdev)
and put_disk(... |
static void icmp_address(struct sk_buff *skb)
{
#if 0
if (net_ratelimit())
printk(KERN_DEBUG "a guy asks for address mask. Who is it?\n");
#endif
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 278,800,906,579,678,540,000,000,000,000,000,000,000 | 7 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
int32_t cli_bcapi_read_number(struct cli_bc_ctx *ctx, uint32_t radix)
{
unsigned i;
char *p;
int32_t result;
if ((radix != 10 && radix != 16) || !ctx->fmap)
return -1;
cli_event_int(EV, BCEV_OFFSET, ctx->off);
while ((p = fmap_need_off_once(ctx->fmap, ctx->off, BUF))) {
for (i=0;i<BUF;i++) {
... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 68,243,031,845,492,350,000,000,000,000,000,000,000 | 25 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
static int kexinit(LIBSSH2_SESSION * session)
{
/* 62 = packet_type(1) + cookie(16) + first_packet_follows(1) +
reserved(4) + length longs(40) */
size_t data_len = 62;
size_t kex_len, hostkey_len = 0;
size_t crypt_cs_len, crypt_sc_len;
size_t comp_cs_len, comp_sc_len;
size_t mac_cs_len, m... | 0 | [
"CWE-200"
] | libssh2 | ca5222ea819cc5ed797860070b4c6c1aeeb28420 | 148,264,697,605,061,220,000,000,000,000,000,000,000 | 153 | diffie_hellman_sha256: convert bytes to bits
As otherwise we get far too small numbers.
Reported-by: Andreas Schneider
CVE-2016-0787 |
static uint16_t nvme_admin_cmd(NvmeCtrl *n, NvmeRequest *req)
{
trace_pci_nvme_admin_cmd(nvme_cid(req), nvme_sqid(req), req->cmd.opcode,
nvme_adm_opc_str(req->cmd.opcode));
if (!(nvme_cse_acs[req->cmd.opcode] & NVME_CMD_EFF_CSUPP)) {
trace_pci_nvme_err_invalid_admin_opc(req... | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 18,869,799,357,342,082,000,000,000,000,000,000,000 | 50 | hw/nvme: fix CVE-2021-3929
This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the
device itself. This still allows DMA to MMIO regions of other devices
(e.g. doing P2P DMA to the controller memory buffer of another NVMe
device).
Fixes: CVE-2021-3929
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Review... |
static inline int cpy_str_at_offset(void *new, const void *old, size_t offset)
{
char **o = (char **) ((char *) old + offset);
char **n = (char **) ((char *) new + offset);
if (*n)
return 0; /* already set, don't overwrite */
return update_str(n, *o);
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 198,866,986,734,264,700,000,000,000,000,000,000,000 | 10 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
TEST_F(QueryPlannerTest, ContainedOrMultikeyCannotCompoundFields) {
const bool multikey = true;
addIndex(BSON("a.c" << 1 << "a.b" << 1), multikey);
addIndex(BSON("d" << 1));
runQuery(fromjson("{$and: [{'a.b': 5}, {$or: [{'a.c': 6}, {d: 7}]}]}"));
assertNumSolutions(2);
assertSolutionExists(
... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 29,540,912,720,737,470,000,000,000,000,000,000,000 | 15 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
double val_real() { DBUG_ASSERT(fixed == 1); return value; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 48,734,086,319,311,940,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
static bool mount_too_revealing(const struct super_block *sb, int *new_mnt_flags)
{
const unsigned long required_iflags = SB_I_NOEXEC | SB_I_NODEV;
struct mnt_namespace *ns = current->nsproxy->mnt_ns;
unsigned long s_iflags;
if (ns->user_ns == &init_user_ns)
return false;
/* Can this filesystem be too revealin... | 0 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 120,561,185,743,277,460,000,000,000,000,000,000,000 | 22 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... |
void t_go_generator::generate_go_struct_writer(ofstream& out,
t_struct* tstruct,
const string& tstruct_name,
bool is_result,
bool us... | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 37,701,016,790,498,730,000,000,000,000,000,000,000 | 105 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
MagickExport int XCommandWidget(Display *display,XWindows *windows,
const char *const *selections,XEvent *event)
{
#define tile_width 112
#define tile_height 70
static const unsigned char
tile_bits[]=
{
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x1f, 0x... | 0 | [] | ImageMagick6 | 366c9708a7ca1256ee03d0d4addb2690ed42273f | 282,919,074,594,253,800,000,000,000,000,000,000,000 | 390 | https://github.com/ImageMagick/ImageMagick/issues/3333 |
PHP_METHOD(Phar, unlinkArchive)
{
char *fname, *error, *zname, *arch, *entry;
int fname_len, zname_len, arch_len, entry_len;
phar_archive_data *phar;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p", &fname, &fname_len) == FAILURE) {
RETURN_FALSE;
}
if (!fname_len) {
zend_throw_exception_ex(phar_ce_... | 0 | [
"CWE-416"
] | php-src | d144590d38fa321b46b8e199c754006318985c84 | 231,822,181,407,829,200,000,000,000,000,000,000,000 | 60 | Fix bug #72321 - use efree() for emalloc allocation |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.