func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
BSONObj expectedResult() {
return BSON("" << 10LL);
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 128,689,098,464,600,200,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
void RGWListBuckets_ObjStore_SWIFT::handle_listing_chunk(RGWUserBuckets&& buckets)
{
if (wants_reversed) {
/* Just store in the reversal buffer. Its content will be handled later,
* in send_response_end(). */
reverse_buffer.emplace(std::begin(reverse_buffer), std::move(buckets));
} else {
return se... | 0 | [
"CWE-617"
] | ceph | f44a8ae8aa27ecef69528db9aec220f12492810e | 10,204,849,441,236,054,000,000,000,000,000,000,000 | 10 | rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b... |
parse_set_tunnel(char *arg, struct ofpbuf *ofpacts,
enum ofp_raw_action_type raw)
{
struct ofpact_tunnel *tunnel;
tunnel = ofpact_put_SET_TUNNEL(ofpacts);
tunnel->ofpact.raw = raw;
return str_to_u64(arg, &tunnel->tun_id);
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 332,052,595,220,560,080,000,000,000,000,000,000,000 | 9 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
_dbus_geteuid (void)
{
return geteuid ();
} | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 157,312,035,519,349,920,000,000,000,000,000,000,000 | 4 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
column_format_type column_format() const
{
return (column_format_type)
((flags >> FIELD_FLAGS_COLUMN_FORMAT) & 3);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 255,784,059,926,223,250,000,000,000,000,000,000,000 | 5 | 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... |
rpc_C_EncryptUpdate (CK_X_FUNCTION_LIST *self,
p11_rpc_message *msg)
{
CK_SESSION_HANDLE session;
CK_BYTE_PTR part;
CK_ULONG part_len;
CK_BYTE_PTR encrypted_part;
CK_ULONG encrypted_part_len;
BEGIN_CALL (EncryptUpdate);
IN_ULONG (session);
IN_BYTE_ARRAY (part, part_len);
IN_BYTE_BUF... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 31,982,219,995,934,030,000,000,000,000,000,000,000 | 17 | Check for arithmetic overflows before allocating |
static void cli_session_setup_gensec_remote_next(struct tevent_req *req)
{
struct cli_session_setup_gensec_state *state =
tevent_req_data(req,
struct cli_session_setup_gensec_state);
struct tevent_req *subreq = NULL;
if (state->remote_ready) {
tevent_req_nterror(req, NT_STATUS_INVALID_NETWORK_RESPONSE);
ret... | 0 | [
"CWE-94"
] | samba | 94295b7aa22d2544af5323bca70d3dcb97fd7c64 | 220,053,344,368,334,800,000,000,000,000,000,000,000 | 21 | CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860
Signed-off-by: Stefan Metzmacher <metze@samba.org> |
static RRBNode *_node_new(void *data, RRBNode *parent) {
RRBNode *node = R_NEW0 (RRBNode);
r_return_val_if_fail (node, NULL);
node->red = 1;
node->data = data;
node->parent = parent;
return node;
} | 0 | [
"CWE-416"
] | radare2 | b5cb90b28ec71fda3504da04e3cc94a362807f5e | 20,089,131,847,790,557,000,000,000,000,000,000,000 | 10 | Prefer memleak over usaf in io.bank's rbtree bug ##crash
* That's a workaround, proper fix will come later
* Reproducer: bins/fuzzed/iobank-crash
* Reported by Akyne Choi via huntr.dev |
static void foreach_pairs(RCore *core, const char *cmd, const char *each) {
const char *arg;
int pair = 0;
for (arg = each ; ; ) {
char *next = strchr (arg, ' ');
if (next) {
*next = 0;
}
if (arg && *arg) {
ut64 n = r_num_get (NULL, arg);
if (pair%2) {
r_core_block_size (core, n);
r_core_cmd... | 0 | [
"CWE-78"
] | radare2 | dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7 | 116,321,753,187,279,440,000,000,000,000,000,000,000 | 24 | Fix #14990 - multiple quoted command parsing issue ##core
> "?e hello""?e world"
hello
world"
> "?e hello";"?e world"
hello
world |
static int mxf_absolute_bodysid_offset(MXFContext *mxf, int body_sid, int64_t offset, int64_t *offset_out, MXFPartition **partition_out)
{
MXFPartition *last_p = NULL;
int a, b, m, m0;
if (offset < 0)
return AVERROR(EINVAL);
a = -1;
b = mxf->partitions_count;
while (b - a > 1) {
... | 0 | [
"CWE-125"
] | FFmpeg | bab0716c7f4793ec42e05a5aa7e80d82a0dd4e75 | 39,944,972,965,673,147,000,000,000,000,000,000,000 | 39 | avformat/mxfdec: Fix av_log context
Fixes: out of array access
Fixes: mxf-crash-1c2e59bf07a34675bfb3ada5e1ec22fa9f38f923
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int moverect_user(VTermRect dest, VTermRect src, void *user)
{
VTermScreen *screen = user;
if(screen->callbacks && screen->callbacks->moverect) {
if(screen->damage_merge != VTERM_DAMAGE_SCROLL)
// Avoid an infinite loop
vterm_screen_flush_damage(screen);
if((*screen->callbacks->moverect... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 140,158,794,569,572,350,000,000,000,000,000,000,000 | 17 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
uECC_VLI_API uECC_word_t uECC_vli_add(uECC_word_t *result,
const uECC_word_t *left,
const uECC_word_t *right,
wordcount_t num_words) {
uECC_word_t carry = 0;
wordcount_t i;
for (i = 0; i < num_w... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 283,635,745,809,201,500,000,000,000,000,000,000,000 | 15 | Fix for #168 |
real_save_jpeg (GdkPixbuf *pixbuf,
gchar **keys,
gchar **values,
GError **error,
gboolean to_callback,
FILE *f,
GdkPixbufSaveFunc save_func,
gpointer user_data)
{
/* FIXME error handling is broken */
... | 0 | [
"CWE-787"
] | gdk-pixbuf | c2a40a92fe3df4111ed9da51fe3368c079b86926 | 100,354,098,769,178,200,000,000,000,000,000,000,000 | 276 | jpeg: Throw error when number of color components is unsupported
Explicitly check "3" or "4" output color components.
gdk-pixbuf assumed that the value of output_components to be either
3 or 4, but not an invalid value (9) or an unsupported value (1).
The way the buffer size was deduced was using a naive "== 4" chec... |
void DL_Dxf::writeComment(DL_WriterA& dw, const std::string& comment) {
dw.dxfString(999, comment);
} | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 208,679,995,453,488,620,000,000,000,000,000,000,000 | 3 | check vertexIndex which might be -1 for broken DXF |
static void tda8425_setmode(struct CHIPSTATE *chip, int mode)
{
int s1 = chip->shadow.bytes[TDA8425_S1+1] & 0xe1;
if (mode & V4L2_TUNER_MODE_LANG1) {
s1 |= TDA8425_S1_ML_SOUND_A;
s1 |= TDA8425_S1_STEREO_PSEUDO;
} else if (mode & V4L2_TUNER_MODE_LANG2) {
s1 |= TDA8425_S1_ML_SOUND_B;
s1 |= TDA8425_S1_STEREO_... | 0 | [
"CWE-399"
] | linux-2.6 | 01a1a3cc1e3fbe718bd06a2a5d4d1a2d0fb4d7d9 | 222,367,751,528,633,500,000,000,000,000,000,000,000 | 22 | V4L/DVB (9624): CVE-2008-5033: fix OOPS on tvaudio when controlling bass/treble
This bug were supposed to be fixed by 5ba2f67afb02c5302b2898949ed6fc3b3d37dcf1,
where a call to NULL happens.
Not all tvaudio chips allow controlling bass/treble. So, the driver
has a table with a flag to indicate if the chip does support... |
static void __init do_add_efi_memmap(void)
{
efi_memory_desc_t *md;
for_each_efi_memory_desc(md) {
unsigned long long start = md->phys_addr;
unsigned long long size = md->num_pages << EFI_PAGE_SHIFT;
int e820_type;
switch (md->type) {
case EFI_LOADER_CODE:
case EFI_LOADER_DATA:
case EFI_BOOT_SERVICES_... | 0 | [
"CWE-388"
] | tip | 4e78921ba4dd0aca1cc89168f45039add4183f8e | 262,624,270,445,455,680,000,000,000,000,000,000,000 | 45 | efi/x86/Add missing error handling to old_memmap 1:1 mapping code
The old_memmap flow in efi_call_phys_prolog() performs numerous memory
allocations, and either does not check for failure at all, or it does
but fails to propagate it back to the caller, which may end up calling
into the firmware with an incomplete 1:1 ... |
void smb_vfs_call_init_search_op(struct vfs_handle_struct *handle,
DIR *dirp)
{
VFS_FIND(init_search_op);
handle->fns->init_search_op_fn(handle, dirp);
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 144,773,984,225,321,800,000,000,000,000,000,000,000 | 6 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
CJSON_PUBLIC(cJSON *) cJSON_CreateRaw(const char *raw)
{
cJSON *item = cJSON_New_Item(&global_hooks);
if(item)
{
item->type = cJSON_Raw;
item->valuestring = (char*)cJSON_strdup((const unsigned char*)raw, &global_hooks);
if(!item->valuestring)
{
cJSON_Delete(item);... | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 258,203,819,130,600,000,000,000,000,000,000,000,000 | 16 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
static int matchlabel(js_Ast *node, const char *label)
{
while (node && node->type == STM_LABEL) {
if (!strcmp(node->a->string, label))
return 1;
node = node->parent;
}
return 0;
} | 0 | [
"CWE-476"
] | mujs | 5008105780c0b0182ea6eda83ad5598f225be3ee | 264,251,875,672,443,030,000,000,000,000,000,000,000 | 9 | Fix 697172: degenerate labeled break/continue statement.
A labeled break statement will look for a matching label through
its chain of parent statements. We start looking at the break statement
though, so if the label is attached to the break, we'll return the break
statement itself as a break target.
Start looking f... |
int jpc_mqenc_codemps2(jpc_mqenc_t *mqenc)
{
/* Note: This function only performs part of the work associated with
the CODEMPS algorithm from the standard. Some of the work is also
performed by the caller. */
jpc_mqstate_t *state = *(mqenc->curctx);
if (mqenc->areg < state->qeval) {
mqenc->areg = state->qeval;... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 148,764,936,067,939,530,000,000,000,000,000,000,000 | 16 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
batchState2String(batch_state_t state) {
switch(state) {
case BATCH_STATE_RDY:
return "BATCH_STATE_RDY";
case BATCH_STATE_BAD:
return "BATCH_STATE_BAD";
case BATCH_STATE_SUB:
return "BATCH_STATE_SUB";
case BATCH_STATE_COMM:
return "BATCH_STATE_COMM";
case BATCH_STATE_DISC:
return "BATCH_STATE_DISC";
}
... | 0 | [
"CWE-772",
"CWE-401"
] | rsyslog | 1ef709cc97d54f74d3fdeb83788cc4b01f4c6a2a | 270,872,909,415,522,020,000,000,000,000,000,000,000 | 15 | bugfix: fixed a memory leak and potential abort condition
this could happen if multiple rulesets were used and some output batches
contained messages belonging to more than one ruleset.
fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=226
fixes: http://bugzilla.adiscon.com/show_bug.cgi?id=218 |
static int vfat_unlink(struct inode *dir, struct dentry *dentry)
{
struct inode *inode = dentry->d_inode;
struct super_block *sb = dir->i_sb;
struct fat_slot_info sinfo;
int err;
lock_super(sb);
err = vfat_find(dir, &dentry->d_name, &sinfo);
if (err)
goto out;
err = fat_remove_entries(dir, &sinfo); /* and ... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0720a06a7518c9d0c0125bd5d1f3b6264c55c3dd | 94,993,559,329,527,090,000,000,000,000,000,000,000 | 24 | NLS: improve UTF8 -> UTF16 string conversion routine
The utf8s_to_utf16s conversion routine needs to be improved. Unlike
its utf16s_to_utf8s sibling, it doesn't accept arguments specifying
the maximum length of the output buffer or the endianness of its
16-bit output.
This patch (as1501) adds the two missing argumen... |
striter_dealloc(striterobject *it)
{
_PyObject_GC_UNTRACK(it);
Py_XDECREF(it->it_seq);
PyObject_GC_Del(it);
} | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 311,896,028,399,738,660,000,000,000,000,000,000,000 | 6 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
lowerstr_ctx(IspellDict *Conf, const char *src)
{
MemoryContext saveCtx;
char *dst;
saveCtx = MemoryContextSwitchTo(Conf->buildCxt);
dst = lowerstr(src);
MemoryContextSwitchTo(saveCtx);
return dst;
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 237,217,816,005,343,600,000,000,000,000,000,000,000 | 11 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
variable_exists(char_u *name, size_t len, cctx_T *cctx)
{
return (cctx != NULL
&& (lookup_local(name, len, NULL, cctx) == OK
|| arg_exists(name, len, NULL, NULL, NULL, cctx) == OK))
|| script_var_exists(name, len, cctx) == OK
|| find_imported(name, len, cctx) != NULL;
} | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 234,274,023,840,875,270,000,000,000,000,000,000,000 | 8 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
void do_notify_resume(struct pt_regs *regs, long in_syscall)
{
if (test_thread_flag(TIF_SIGPENDING) ||
test_thread_flag(TIF_RESTORE_SIGMASK))
do_signal(regs, in_syscall);
if (test_thread_flag(TIF_NOTIFY_RESUME)) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}
} | 1 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 59,503,171,509,773,630,000,000,000,000,000,000,000 | 11 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
PJ_DEF(pj_status_t) pjsua_start(void)
{
pj_status_t status;
pjsua_set_state(PJSUA_STATE_STARTING);
pj_log_push_indent();
status = pjsua_call_subsys_start();
if (status != PJ_SUCCESS)
goto on_return;
status = pjsua_media_subsys_start();
if (status != PJ_SUCCESS)
goto on_return;
stat... | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | d27f79da11df7bc8bb56c2f291d71e54df8d2c47 | 96,944,297,926,147,980,000,000,000,000,000,000,000 | 25 | Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009)
* Use PJ_ASSERT_RETURN on pjsip_auth_create_digest
* Use PJ_ASSERT_RETURN on pjsua_init_tpselector()
* Fix incorrect check.
* Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256()
* Modifi... |
static int sctp_getsockopt_scheduler(struct sock *sk, int len,
char __user *optval,
int __user *optlen)
{
struct sctp_assoc_value params;
struct sctp_association *asoc;
int retval = -EFAULT;
if (len < sizeof(params)) {
retval = -EINVAL;
goto out;
}
len = sizeof(params);
if (copy_from_user... | 0 | [
"CWE-416"
] | linux | a0ff660058b88d12625a783ce9e5c1371c87951f | 160,998,410,518,430,920,000,000,000,000,000,000,000 | 36 | sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf
After commit cea0cc80a677 ("sctp: use the right sk after waking up from
wait_buf sleep"), it may change to lock another sk if the asoc has been
peeled off in sctp_wait_for_sndbuf.
However, the asoc's new sk could be already closed elsewhere, a... |
bool kvm_inject_emulated_page_fault(struct kvm_vcpu *vcpu,
struct x86_exception *fault)
{
struct kvm_mmu *fault_mmu;
WARN_ON_ONCE(fault->vector != PF_VECTOR);
fault_mmu = fault->nested_page_fault ? vcpu->arch.mmu :
vcpu->arch.walk_mmu;
/*
* Invalidate the TLB entry for the faulting address, ... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 238,158,375,237,123,800,000,000,000,000,000,000,000 | 21 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
bool arch_within_kprobe_blacklist(unsigned long addr)
{
return (addr >= (unsigned long)__kprobes_text_start &&
addr < (unsigned long)__kprobes_text_end) ||
(addr >= (unsigned long)__entry_text_start &&
addr < (unsigned long)__entry_text_end);
} | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 192,208,338,672,156,600,000,000,000,000,000,000,000 | 7 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
list_add_event(struct perf_event *event, struct perf_event_context *ctx)
{
WARN_ON_ONCE(event->attach_state & PERF_ATTACH_CONTEXT);
event->attach_state |= PERF_ATTACH_CONTEXT;
/*
* If we're a stand alone event or group leader, we go to the context
* list, group events are kept attached to the group so that
* ... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 171,616,506,070,548,800,000,000,000,000,000,000,000 | 30 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
parser_process_expression_sequence (parser_context_t *context_p) /**< context */
{
if (!CBC_NO_RESULT_OPERATION (context_p->last_cbc_opcode))
{
parser_emit_cbc (context_p, CBC_POP);
}
if (context_p->stack_top_uint8 == LEXER_LEFT_PAREN)
{
parser_mem_page_t *page_p = context_p->stack.first_p;
JERR... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 69,672,026,285,003,820,000,000,000,000,000,000,000 | 19 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
void ConnectionImpl::onMessageCompleteBase() {
ENVOY_CONN_LOG(trace, "message complete", connection_);
if (handling_upgrade_) {
// If this is an upgrade request, swallow the onMessageComplete. The
// upgrade payload will be treated as stream body.
ASSERT(!deferred_end_stream_headers_);
ENVOY_CONN_LO... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 298,296,905,004,421,280,000,000,000,000,000,000,000 | 12 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
gdm_user_get_display_name (GdmUser *user)
{
g_return_val_if_fail (GDM_IS_USER (user), NULL);
return (user->display_name ? user->display_name
: gdm_user_get_real_name (user));
} | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 103,863,631,182,852,020,000,000,000,000,000,000,000 | 7 | Store the face and dmrc files in a cache. Refer to bug #565151. |
MagickExport PixelChannelMap *ClonePixelChannelMap(PixelChannelMap *channel_map)
{
PixelChannelMap
*clone_map;
assert(channel_map != (PixelChannelMap *) NULL);
clone_map=AcquirePixelChannelMap();
if (clone_map == (PixelChannelMap *) NULL)
return((PixelChannelMap *) NULL);
(void) memcpy(clone_map,chan... | 0 | [
"CWE-190"
] | ImageMagick | 406da3af9e09649cda152663c179902edf5ab3ac | 139,293,522,230,908,030,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/1732 |
cdataSectionProcessor(XML_Parser parser, const char *start, const char *end,
const char **endPtr) {
enum XML_Error result
= doCdataSection(parser, parser->m_encoding, &start, end, endPtr,
(XML_Bool)! parser->m_parsingStatus.finalBuffer);
if (result != XML_ERROR_NON... | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 156,482,792,861,866,640,000,000,000,000,000,000,000 | 18 | xmlparse.c: Deny internal entities closing the doctype |
send_complete( struct net_local *nl )
{
#ifdef CONFIG_SBNI_MULTILINE
((struct net_local *) nl->master->priv)->stats.tx_packets++;
((struct net_local *) nl->master->priv)->stats.tx_bytes
+= nl->tx_buf_p->len;
#else
nl->stats.tx_packets++;
nl->stats.tx_bytes += nl->tx_buf_p->len;
#endif
dev_kfree_skb_irq( nl->tx_... | 0 | [
"CWE-264"
] | linux-2.6 | f2455eb176ac87081bbfc9a44b21c7cd2bc1967e | 51,832,587,408,821,350,000,000,000,000,000,000,000 | 18 | wan: Missing capability checks in sbni_ioctl()
There are missing capability checks in the following code:
1300 static int
1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd)
1302 {
[...]
1319 case SIOCDEVRESINSTATS :
1320 if( current->euid != 0 ) /* root only */
1321 ... |
messageAddStr(message *m, const char *data)
{
line_t *repeat = NULL;
assert(m != NULL);
if(data) {
if(*data == '\0')
data = NULL;
else {
/*
* If it's only white space, just store one space to
* save memory. You must store something since it may
* be a header line
*/
int iswhite = 1;
... | 0 | [
"CWE-125"
] | clamav-devel | 586a5180287262070637c8943f2f7efd652e4a2c | 72,703,532,932,222,470,000,000,000,000,000,000,000 | 89 | bb11797 - fix invalid read in fuzzed mail file. |
enum precedence precedence() const
{
return ref ? (*ref)->precedence() : DEFAULT_PRECEDENCE;
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 326,267,646,280,748,450,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static int WSAGetLastError()
{
return errno;
} | 0 | [
"CWE-476"
] | exiv2 | ccde30afa8ca787a3fe17388a15977f107a53b72 | 273,820,469,772,865,660,000,000,000,000,000,000,000 | 4 | Avoid null pointer exception due to NULL return value from strchr.
This fixes #793.
(cherry picked from commit ae20c30805b330275b2aa0303a42e1f2bbd53661) |
static unsigned readChunk_pHYs(LodePNGInfo* info, const unsigned char* data, size_t chunkLength)
{
if(chunkLength != 9) return 74; /*invalid pHYs chunk size*/
info->phys_defined = 1;
info->phys_x = 16777216u * data[0] + 65536u * data[1] + 256u * data[2] + data[3];
info->phys_y = 16777216u * data[4] + 65536u * ... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 328,154,495,687,569,920,000,000,000,000,000,000,000 | 11 | Fixed #5645: realloc return handling |
rotate_point(GdkPoint point, double angle)
{
double sint, cost;
GdkPoint returned;
if (angle == 0.0)
return point;
sint = sin(DEG2RAD(-angle));
cost = cos(DEG2RAD(-angle));
returned.x = lround(cost*point.x - sint*point.y);
returned.y = lround(sint*point.x + cost*point.y);
... | 0 | [
"CWE-703"
] | gerbv | b2c2f8da851f2ac8079a91ce9d498d87ff96abcf | 247,439,282,890,700,340,000,000,000,000,000,000,000 | 16 | Avoid direct access on array of unknown size
Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array. |
static int encode_lookup(struct xdr_stream *xdr, const struct qstr *name)
{
int len = name->len;
__be32 *p;
RESERVE_SPACE(8 + len);
WRITE32(OP_LOOKUP);
WRITE32(len);
WRITEMEM(name->name, len);
return 0;
} | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 108,463,408,565,326,420,000,000,000,000,000,000,000 | 12 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
int af_alg_cmsg_send(struct msghdr *msg, struct af_alg_control *con)
{
struct cmsghdr *cmsg;
for_each_cmsghdr(cmsg, msg) {
if (!CMSG_OK(msg, cmsg))
return -EINVAL;
if (cmsg->cmsg_level != SOL_ALG)
continue;
switch (cmsg->cmsg_type) {
case ALG_SET_IV:
if (cmsg->cmsg_len < CMSG_LEN(sizeof(*con->iv)))... | 0 | [
"CWE-416"
] | linux | 9060cb719e61b685ec0102574e10337fa5f445ea | 259,921,699,831,096,120,000,000,000,000,000,000,000 | 39 | net: crypto set sk to NULL when af_alg_release.
KASAN has found use-after-free in sockfs_setattr.
The existed commit 6d8c50dcb029 ("socket: close race condition between sock_close()
and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore
that crypto module forgets to set the sk to NULL after af_al... |
int migrate_misplaced_page(struct page *page, struct vm_area_struct *vma,
int node)
{
pg_data_t *pgdat = NODE_DATA(node);
int isolated;
int nr_remaining;
LIST_HEAD(migratepages);
/*
* Don't migrate file pages that are mapped in multiple processes
* with execute permissions as they are probably shared li... | 0 | [
"CWE-476"
] | linux | 42cb14b110a5698ccf26ce59c4441722605a3743 | 327,136,195,577,177,900,000,000,000,000,000,000,000 | 49 | mm: migrate dirty page without clear_page_dirty_for_io etc
clear_page_dirty_for_io() has accumulated writeback and memcg subtleties
since v2.6.16 first introduced page migration; and the set_page_dirty()
which completed its migration of PageDirty, later had to be moderated to
__set_page_dirty_nobuffers(); then PageSwa... |
ceph::bufferlist AES128GCM_OnWireRxHandler::authenticated_decrypt_update_final(
ceph::bufferlist&& ciphertext_and_tag,
std::uint32_t alignment)
{
const auto cnt_len = ciphertext_and_tag.length();
ceph_assert(cnt_len >= AESGCM_TAG_LEN);
// decrypt optional data. Caller is obliged to provide only signature but... | 0 | [
"CWE-323"
] | ceph | 20b7bb685c5ea74c651ca1ea547ac66b0fee7035 | 278,328,570,821,652,830,000,000,000,000,000,000,000 | 49 | msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities
The secure mode uses AES-128-GCM with 96-bit nonces consisting of a
32-bit counter followed by a 64-bit salt. The counter is incremented
after processing each frame, the salt is fixed for the duration of
the session. Both are initialized from the sessio... |
static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsigned int src_size, double scale_d, const interpolation_method pFilter)
{
double width_d;
double scale_f_d = 1.0;
const double filter_width_d = DEFAULT_BOX_RADIUS;
int windows_size;
unsigned int u;
LineContribType *res;
int overflow_... | 0 | [
"CWE-119"
] | php-src | 8fa9d1ce28f3a894b104979df30d0b65e0f21107 | 203,443,726,186,405,240,000,000,000,000,000,000,000 | 59 | improve fix #72558, while (u>=0) with unsigned int will always be true |
bool CephXTicketHandler::have_key()
{
if (have_key_flag) {
have_key_flag = ceph_clock_now() < expires;
}
return have_key_flag;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 71,866,966,340,028,160,000,000,000,000,000,000,000 | 8 | 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 ... |
BYTE* crypto_cert_hash(X509* xcert, const char* hash, UINT32* length)
{
UINT32 fp_len = EVP_MAX_MD_SIZE;
BYTE* fp;
const EVP_MD* md = EVP_get_digestbyname(hash);
if (!md)
return NULL;
if (!length)
return NULL;
if (!xcert)
return NULL;
fp = calloc(fp_len, sizeof(BYTE));
if (!fp)
return NULL;
if (X509_... | 0 | [
"CWE-787"
] | FreeRDP | 8305349a943c68b1bc8c158f431dc607655aadea | 258,407,869,867,369,750,000,000,000,000,000,000,000 | 25 | Fixed GHSL-2020-102 heap overflow
(cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581) |
static int test_gf2m_moddiv(void)
{
BIGNUM *a = NULL, *b[2] = {NULL, NULL}, *c = NULL, *d = NULL;
BIGNUM *e = NULL, *f = NULL;
int i, j, st = 0;
if (!TEST_ptr(a = BN_new())
|| !TEST_ptr(b[0] = BN_new())
|| !TEST_ptr(b[1] = BN_new())
|| !TEST_ptr(c = BN_new())
... | 0 | [] | openssl | 336923c0c8d705cb8af5216b29a205662db0d590 | 158,965,173,593,664,700,000,000,000,000,000,000,000 | 43 | Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets
bn_sqr_comba8 does for instance compute a wrong result for the value:
a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45
The correct result is:
r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f
9... |
void blk_put_queue(struct request_queue *q)
{
kobject_put(&q->kobj);
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 52,278,555,164,697,990,000,000,000,000,000,000,000 | 4 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
register_on_commit_action(Oid relid, OnCommitAction action)
{
OnCommitItem *oc;
MemoryContext oldcxt;
/*
* We needn't bother registering the relation unless there is an ON COMMIT
* action we need to take.
*/
if (action == ONCOMMIT_NOOP || action == ONCOMMIT_PRESERVE_ROWS)
return;
oldcxt = MemoryContextSw... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 96,894,476,482,547,500,000,000,000,000,000,000,000 | 24 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static const char *parse_interpreter(const char *cmd)
{
static char buf[100];
char *p, *opt;
int n, fd;
/* don't even try a .exe */
n = strlen(cmd);
if (n >= 4 && !strcasecmp(cmd+n-4, ".exe"))
return NULL;
fd = open(cmd, O_RDONLY);
if (fd < 0)
return NULL;
n = read(fd, buf, sizeof(buf)-1);
close(fd);
i... | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 50,555,701,919,846,960,000,000,000,000,000,000,000 | 34 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
void sequencer_unload(void)
{
vfree(queue);
vfree(iqueue);
queue = iqueue = NULL;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | b769f49463711205d57286e64cf535ed4daf59e9 | 232,640,367,932,837,870,000,000,000,000,000,000,000 | 6 | sound/oss: remove offset from load_patch callbacks
Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of
uninitialized value, and signedness issue
The offset passed to midi_synth_load_patch() can be essentially
arbitrary. If it's greater than the header length, this will result in
a copy_from_user(dst, src, n... |
convert_indexed_contact_property_to_updatexml_physical_address (ESoapMessage *message,
const gchar *name,
const gchar *uri_element,
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 315,364,937,146,235,770,000,000,000,000,000,000,000 | 31 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
placeholder *clone() const override { return new holder(value_); } | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 292,195,762,183,302,000,000,000,000,000,000,000,000 | 1 | Fix #122 |
virDomainLeaseDefFormat(virBufferPtr buf,
virDomainLeaseDefPtr def)
{
virBufferAddLit(buf, "<lease>\n");
virBufferAdjustIndent(buf, 2);
virBufferEscapeString(buf, "<lockspace>%s</lockspace>\n", def->lockspace);
virBufferEscapeString(buf, "<key>%s</key>\n", def->key);
virBuffe... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 272,623,553,598,174,000,000,000,000,000,000,000,000 | 16 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static inline void rb_event_discard(struct ring_buffer_event *event)
{
if (event->type_len == RINGBUF_TYPE_TIME_EXTEND)
event = skip_time_extend(event);
/* array[0] holds the actual length for the discarded event */
event->array[0] = rb_event_data_length(event) - RB_EVNT_HDR_SIZE;
event->type_len = RINGBUF_TYPE_... | 0 | [
"CWE-190"
] | linux-stable | 59643d1535eb220668692a5359de22545af579f6 | 27,979,474,758,607,320,000,000,000,000,000,000,000 | 12 | ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
then the DIV_ROUND_UP() will return zero.
Here's the details:
# echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb
tracing_entries_write() processes this... |
apr_status_t h2_beam_destroy(h2_bucket_beam *beam)
{
apr_pool_cleanup_kill(beam->pool, beam, beam_pool_cleanup);
return beam_cleanup(beam, 0);
} | 0 | [
"CWE-400"
] | mod_h2 | 83a2e3866918ce6567a683eb4c660688d047ee81 | 203,723,433,533,381,840,000,000,000,000,000,000,000 | 5 | * fixes a race condition where aborting streams triggers an unnecessary timeout. |
static int snd_seq_ioctl_unsubscribe_port(struct snd_seq_client *client,
void *arg)
{
struct snd_seq_port_subscribe *subs = arg;
int result = -ENXIO;
struct snd_seq_client *receiver = NULL, *sender = NULL;
struct snd_seq_client_port *sport = NULL, *dport = NULL;
if ((receiver = snd_seq_client_use_ptr(subs-... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 71105998845fb012937332fe2e806d443c09e026 | 178,260,939,929,583,600,000,000,000,000,000,000,000 | 36 | ALSA: seq: Fix use-after-free at creating a port
There is a potential race window opened at creating and deleting a
port via ioctl, as spotted by fuzzing. snd_seq_create_port() creates
a port object and returns its pointer, but it doesn't take the
refcount, thus it can be deleted immediately by another thread.
Meanwh... |
void delayed_work_timer_fn(unsigned long __data)
{
struct delayed_work *dwork = (struct delayed_work *)__data;
/* should have been called from irqsafe timer with irq already off */
__queue_work(dwork->cpu, dwork->wq, &dwork->work);
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 190,033,013,398,416,600,000,000,000,000,000,000,000 | 7 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
congestion_control_enabled(void)
{
const or_options_t *opts = NULL;
tor_assert_nonfatal_once(in_main_thread());
opts = get_options();
/* If the user has set "__AlwaysCongesttionControl",
* then always try to negotiate congestion control, regardless
* of consensus param. This is to be used for testing a... | 0 | [] | tor | b0496d40197dd5b4fb7b694c1410082d4e34dda6 | 226,845,317,677,745,920,000,000,000,000,000,000,000 | 20 | Fix for RTT calculation hang during congestion control.
Only cache RTT on explicit stalls; Only use this cache for the
RTT decrease case. Otherwise use only local circuit RTT state for clock jump
checks. |
static int setup_rx_descbuffer(struct b43_dmaring *ring,
struct b43_dmadesc_generic *desc,
struct b43_dmadesc_meta *meta, gfp_t gfp_flags)
{
dma_addr_t dmaaddr;
struct sk_buff *skb;
B43_WARN_ON(ring->tx);
skb = __dev_alloc_skb(ring->rx_buffersize, gfp_flags);
if (unlikely(!skb))
return -ENO... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 91,462,858,312,553,180,000,000,000,000,000,000,000 | 40 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
static int __cil_fill_expr_helper(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr)
{
int rc = SEPOL_ERR;
enum cil_flavor op;
op = __cil_get_expr_operator_flavor(current->data);
rc = cil_verify_expr_syntax(current, op, flavor);
if (rc != SEPOL_OK) {
goto exit;
}
if (op != CIL_NON... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 84,649,531,932,486,210,000,000,000,000,000,000,000 | 29 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static LogEst whereSortingCost(
WhereInfo *pWInfo,
LogEst nRow,
int nOrderBy,
int nSorted
){
/* TUNING: Estimated cost of a full external sort, where N is
** the number of rows to sort is:
**
** cost = (3.0 * N * log(N)).
**
** Or, if the order-by clause has X terms but only the last Y
** ter... | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 118,489,738,246,870,990,000,000,000,000,000,000,000 | 40 | 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 |
static int cbtls_verify(int ok, X509_STORE_CTX *ctx)
{
char subject[1024]; /* Used for the subject name */
char issuer[1024]; /* Used for the issuer name */
char attribute[1024];
char value[1024];
char common_name[1024];
char cn_str[1024];
char buf[64];
EAP_HANDLER *handler = NULL;
X509 *client_cert;
X509_CIN... | 0 | [
"CWE-295"
] | freeradius-server | 5e698b407dcac2bc45cf03484bac4398109d25c3 | 78,845,657,668,554,490,000,000,000,000,000,000,000 | 363 | Set X509_V_FLAG_CRL_CHECK_ALL |
bool_on_stack(cctx_T *cctx)
{
type_T *type;
type = get_type_on_stack(cctx, 0);
if (type == &t_bool)
return OK;
if (type == &t_any
|| type == &t_unknown
|| type == &t_number
|| type == &t_number_bool)
// Number 0 and 1 are OK to use as a bool. "any" could also be a bool.
// This requ... | 0 | [
"CWE-200",
"CWE-122"
] | vim | 5f25c3855071bd7e26255c68bf458b1b5cf92f39 | 61,066,450,752,614,760,000,000,000,000,000,000,000 | 18 | patch 8.2.4049: Vim9: reading before the start of the line with "$"
Problem: Vim9: reading before the start of the line with "$" by itself.
Solution: Do not subtract one when reporting the error. |
Status explain(OperationContext* opCtx,
const OpMsgRequest& request,
ExplainOptions::Verbosity verbosity,
BSONObjBuilder* out) const override {
std::string dbname = request.getDatabase().toString();
const BSONObj& cmdObj = request.body;
... | 1 | [
"CWE-20"
] | mongo | d315547544d7146b93a8e6e94cc4b88cd0d19c95 | 129,405,377,919,576,930,000,000,000,000,000,000,000 | 45 | SERVER-38275 ban explain with UUID |
static void lsr_translate_anim_value(GF_LASeRCodec *lsr, SMIL_AnimateValue *val, u32 coded_type)
{
switch (val->type) {
case SVG_StrokeDashArray_datatype:
//if list of fixed only
if (coded_type == 8) {
SVG_StrokeDashArray *da;
GF_List *l = (GF_List *)val->value;
u32 i;
GF_SAFEALLOC(da, SVG_StrokeDashA... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 30,565,671,311,536,180,000,000,000,000,000,000,000 | 130 | fixed #2213 |
//! Load gif file, using ImageMagick or GraphicsMagick's external tools.
/**
\param filename Filename to read data from.
**/
CImgList<T>& load_gif_external(const char *const filename) {
if (!filename)
throw CImgArgumentException(_cimglist_instance
... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 219,470,547,311,104,950,000,000,000,000,000,000,000 | 15 | . |
dump_routerlist_mem_usage(int severity)
{
uint64_t livedescs = 0;
uint64_t olddescs = 0;
if (!routerlist)
return;
SMARTLIST_FOREACH(routerlist->routers, routerinfo_t *, r,
livedescs += r->cache_info.signed_descriptor_len);
SMARTLIST_FOREACH(routerlist->old_routers, signed_descriptor_t ... | 0 | [
"CWE-399"
] | tor | 308f6dad20675c42b29862f4269ad1fbfb00dc9a | 311,226,250,377,559,040,000,000,000,000,000,000,000 | 17 | Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix. |
static int dsa_sig_print(BIO *bp, const X509_ALGOR *sigalg,
const ASN1_STRING *sig, int indent, ASN1_PCTX *pctx)
{
DSA_SIG *dsa_sig;
const unsigned char *p;
if (!sig) {
if (BIO_puts(bp, "\n") <= 0)
return 0;
else
return 1;
}
p = sig->d... | 0 | [] | openssl | ab4a81f69ec88d06c9d8de15326b9296d7f498ed | 245,429,661,636,279,400,000,000,000,000,000,000,000 | 40 | Remove broken DSA private key workarounds.
Remove old code that handled various invalid DSA formats in ancient
software.
This also fixes a double free bug when parsing malformed DSA private keys.
Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
libFuzzer.
CVE-2016-0705
Reviewed-by: Emilia K... |
apr_status_t h2_mplx_pop_task(h2_mplx *m, h2_task **ptask)
{
apr_status_t rv = APR_EOF;
*ptask = NULL;
ap_assert(m);
ap_assert(m->lock);
if (APR_SUCCESS != (rv = apr_thread_mutex_lock(m->lock))) {
return rv;
}
if (m->aborted) {
rv = APR_EOF;
}
else {
... | 0 | [
"CWE-444"
] | mod_h2 | 825de6a46027b2f4c30d7ff5a0c8b852d639c207 | 185,299,704,042,264,130,000,000,000,000,000,000,000 | 25 | * Fixed keepalives counter on slave connections. |
enum_field_types field_type_for_temporal_comparison(const Item *other) const
{
if (cmp_type() == TIME_RESULT)
{
if (other->cmp_type() == TIME_RESULT)
return Field::field_type_merge(field_type(), other->field_type());
else
return field_type();
}
else
{
if (other-... | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 108,793,612,182,775,600,000,000,000,000,000,000,000 | 17 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
static int session_headers_add_pad(nghttp2_session *session,
nghttp2_frame *frame) {
int rv;
ssize_t padded_payloadlen;
nghttp2_active_outbound_item *aob;
nghttp2_bufs *framebufs;
size_t padlen;
size_t max_payloadlen;
aob = &session->aob;
framebufs = &aob->framebufs;
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 59,682,663,175,123,010,000,000,000,000,000,000,000 | 37 | Add nghttp2_option_set_max_outbound_ack |
Field *Field_blob::new_key_field(MEM_ROOT *root, TABLE *new_table,
uchar *new_ptr, uint32 length,
uchar *new_null_ptr, uint new_null_bit)
{
Field_varstring *res= new (root) Field_varstring(new_ptr, length, 2,
... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 281,178,793,253,580,000,000,000,000,000,000,000,000 | 12 | 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... |
bool Curl_meets_timecondition(struct Curl_easy *data, time_t timeofdoc)
{
if((timeofdoc == 0) || (data->set.timevalue == 0))
return TRUE;
switch(data->set.timecondition) {
case CURL_TIMECOND_IFMODSINCE:
default:
if(timeofdoc <= data->set.timevalue) {
infof(data,
"The requested documen... | 0 | [] | curl | 620ea21410030a9977396b4661806bc187231b79 | 234,742,286,586,030,800,000,000,000,000,000,000,000 | 27 | transfer: redirects to other protocols or ports clear auth
... unless explicitly permitted.
Bug: https://curl.se/docs/CVE-2022-27774.html
Reported-by: Harry Sintonen
Closes #8748 |
static inline struct htx_blk *htx_add_trailer(struct htx *htx, const struct ist name,
const struct ist value)
{
struct htx_blk *blk;
/* FIXME: check name.len (< 256B) and value.len (< 1MB) */
blk = htx_add_blk(htx, HTX_BLK_TLR, name.len + value.len);
if (!blk)
return NULL;
blk->info += (value.len <<... | 1 | [
"CWE-190"
] | haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | 330,050,885,029,992,750,000,000,000,000,000,000,000 | 15 | BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer
Ori Hollander of JFrog Security reported that htx_add_header() and
htx_add_trailer() were missing a length check on the header name. While
this does not allow to overwrite any memory area, it results in bits of
the header name length to sli... |
load_font(
XOC oc)
{
XOCGenericPart *gen = XOC_GENERIC(oc);
FontSet font_set = gen->font_set;
int num = gen->font_set_num;
for ( ; num-- > 0; font_set++) {
if (font_set->font_name == NULL)
continue;
if (load_fontset_data (oc, font_set) != True)
return False;
#ifndef TESTVERSION
... | 0 | [
"CWE-190"
] | libx11 | acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d | 72,016,872,277,597,520,000,000,000,000,000,000,000 | 42 | Fix an integer overflow in init_om()
CVE-2020-14363
This can lead to a double free later, as reported by Jayden Rivers.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
QUInt16(const uint16_t v) : value(v) {} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 60,698,451,866,556,200,000,000,000,000,000,000,000 | 1 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
static int vsock_getname(struct socket *sock,
struct sockaddr *addr, int *addr_len, int peer)
{
int err;
struct sock *sk;
struct vsock_sock *vsk;
struct sockaddr_vm *vm_addr;
sk = sock->sk;
vsk = vsock_sk(sk);
err = 0;
lock_sock(sk);
if (peer) {
if (sock->state != SS_CONNECTED) {
err = -ENOTCONN;
... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 152,940,054,358,128,200,000,000,000,000,000,000,000 | 42 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static int selinux_socket_getpeersec_stream(struct socket *sock, char __user *optval,
int __user *optlen, unsigned len)
{
int err = 0;
char *scontext;
u32 scontext_len;
struct sk_security_struct *sksec = sock->sk->sk_security;
u32 peer_sid = SECSID_NULL;
if (sksec->sclass == SECCLASS_UNIX_STREAM_SOCKET ... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 135,660,570,986,069,360,000,000,000,000,000,000,000 | 33 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
const CString& CUser::GetCleanUserName() const { return m_sCleanUserName; } | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 84,636,547,140,411,790,000,000,000,000,000,000,000 | 1 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
void force_vm_exit(const cpumask_t *mask)
{
smp_call_function_many(mask, exit_vm_noop, NULL, true);
} | 0 | [
"CWE-399",
"CWE-284"
] | linux | e8180dcaa8470ceca21109f143876fdcd9fe050a | 52,300,283,805,278,170,000,000,000,000,000,000,000 | 4 | ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl
Some ARM KVM VCPU ioctls require the vCPU to be properly initialized
with the KVM_ARM_VCPU_INIT ioctl before being used with further
requests. KVM_RUN checks whether this initialization has been
done, but other ioctls do not.
Namely KVM_GET_REG_LIST will ... |
gs_main_lib_open(gs_main_instance * minst, const char *file_name, ref * pfile)
{
/* This is a separate procedure only to avoid tying up */
/* extra stack space while running the file. */
i_ctx_t *i_ctx_p = minst->i_ctx_p;
#define maxfn 2048
char fn[maxfn];
uint len;
return lib_file_open(&minst-... | 0 | [] | ghostpdl | 6d444c273da5499a4cd72f21cb6d4c9a5256807d | 274,127,139,413,712,670,000,000,000,000,000,000,000 | 14 | Bug 697178: Add a file permissions callback
For the rare occasions when the graphics library directly opens a file
(currently for reading), this allows us to apply any restrictions on
file access normally applied in the interpteter. |
static void test_bug43560(void)
{
MYSQL* conn;
uint rc;
MYSQL_STMT *stmt= 0;
MYSQL_BIND bind;
my_bool is_null= 0;
char buffer[256];
const uint BUFSIZE= sizeof(buffer);
const char* values[] = {"eins", "zwei", "drei", "viele", NULL};
const char insert_str[] = "INSERT ... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 293,974,118,814,949,900,000,000,000,000,000,000,000 | 89 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
qf_jump_edit_buffer(
qf_info_T *qi,
qfline_T *qf_ptr,
int forceit,
int prev_winid,
int *opened_window)
{
qf_list_T *qfl = qf_get_curlist(qi);
int old_changedtick = qfl->qf_changedtick;
qfltype_T qfl_type = qfl->qfl_type;
int retval = OK;
int old_qf_curlist = qi->qf_curlist;
int save_... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 247,509,510,388,900,130,000,000,000,000,000,000,000 | 67 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static ssize_t lo_add_fd_mapping(fuse_req_t req, int fd)
{
struct lo_map_elem *elem;
elem = lo_map_alloc_elem(&lo_data(req)->fd_map);
if (!elem) {
return -1;
}
elem->fd = fd;
return elem - lo_data(req)->fd_map.elems;
} | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 222,372,605,976,086,140,000,000,000,000,000,000,000 | 12 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
void Compute(OpKernelContext* context) override {
const Tensor& tensor_in = context->input(0);
const Tensor& tensor_out = context->input(1);
const Tensor& out_grad_backprop = context->input(2);
// For maxpooling3d, tensor_in should have 5 dimensions.
OP_REQUIRES(context, tensor_in.dims() == 5,
... | 1 | [
"CWE-369",
"CWE-787"
] | tensorflow | 63c6a29d0f2d692b247f7bf81f8732d6442fad09 | 93,004,229,093,993,130,000,000,000,000,000,000,000 | 38 | Add missing validation, prevent heap OOB
PiperOrigin-RevId: 372246723
Change-Id: I1a454a643810e77d7d14821b342098c56a09fbbf |
void derive_temporal_luma_vector_prediction(base_context* ctx,
de265_image* img,
const slice_segment_header* shdr,
int xP,int yP,
int nPbW,int n... | 0 | [
"CWE-787"
] | libde265 | 697aa4f7c774abd6374596e6707a6f4f54265355 | 78,853,456,832,637,830,000,000,000,000,000,000,000 | 95 | fix MC with HDR chroma, but SDR luma (#301) |
unsigned int msix_nr_vectors_allocated(const PCIDevice *dev)
{
return dev->msix_entries_nr;
} | 0 | [] | qemu | 43b11a91dd861a946b231b89b7542856ade23d1b | 156,517,482,348,897,520,000,000,000,000,000,000,000 | 4 | msix: implement pba write (but read-only)
qpci_msix_pending() writes on pba region, causing qemu to SEGV:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff7fba8c0 (LWP 25882)]
0x0000000000000000 in ?? ()
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00005555556556c5 in memor... |
g_markup_parse_context_get_element_stack (GMarkupParseContext *context)
{
g_return_val_if_fail (context != NULL, NULL);
return context->tag_stack;
} | 0 | [
"CWE-476"
] | glib | fccef3cc822af74699cca84cd202719ae61ca3b9 | 74,309,225,371,993,750,000,000,000,000,000,000,000 | 5 | gmarkup: Fix crash in error handling path for closing elements
If something which looks like a closing tag is left unfinished, but
isn’t paired to an opening tag in the document, the error handling code
would do a null pointer dereference. Avoid that, at the cost of
introducing a new translatable error message.
Inclu... |
NOEXPORT void socks5_client_address(CLI *c) {
SOCKADDR_UNION addr;
SOCKS5_UNION socks;
if(original_dst(c->local_rfd.fd, &addr))
throw_exception(c, 2); /* don't reset */
memset(&socks, 0, sizeof socks);
socks.req.ver=5; /* SOCKS5 */
socks.req.cmd=0x01; /* CONNECT */
switch(addr.sa.sa... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 126,465,878,301,109,950,000,000,000,000,000,000,000 | 83 | stunnel-5.57 |
inline bool SegmentBuilder::tryExtend(word* from, word* to) {
// Careful about overflow.
if (pos == from && to <= ptr.end() && to >= from) {
pos = to;
return true;
} else {
return false;
}
} | 0 | [
"CWE-20"
] | capnproto | 52bc956459a5e83d7c31be95763ff6399e064ae4 | 124,321,379,359,121,420,000,000,000,000,000,000,000 | 9 | SECURITY: Prevent compiler from eliding bounds checks.
Details: https://github.com/sandstorm-io/capnproto/blob/master/security-advisories/2017-04-17-0-apple-32bit-elides-bounds-check.md |
void usbip_vhci_driver_close(void)
{
if (!vhci_driver)
return;
udev_device_unref(vhci_driver->hc_device);
free(vhci_driver);
vhci_driver = NULL;
udev_unref(udev_context);
} | 0 | [
"CWE-200"
] | linux | 2f2d0088eb93db5c649d2a5e34a3800a8a935fc5 | 288,361,945,319,833,630,000,000,000,000,000,000,000 | 13 | usbip: prevent vhci_hcd driver from leaking a socket pointer address
When a client has a USB device attached over IP, the vhci_hcd driver is
locally leaking a socket pointer address via the
/sys/devices/platform/vhci_hcd/status file (world-readable) and in debug
output when "usbip --debug port" is run.
Fix it to not... |
static UChar32 escLeftBracket5Routine(UChar32 c) {
c = readUnicodeCharacter();
if (c == 0)
return 0;
return doDispatch(c, escLeftBracket5Dispatch);
} | 0 | [
"CWE-200"
] | mongo | 035cf2afc04988b22cb67f4ebfd77e9b344cb6e0 | 62,670,691,675,568,315,000,000,000,000,000,000,000 | 6 | SERVER-25335 avoid group and other permissions when creating .dbshell history file |
bool CModules::OnClientDisconnect() {
MODUNLOADCHK(OnClientDisconnect());
return false;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 76,649,686,786,855,730,000,000,000,000,000,000,000 | 4 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static size_t ZSTD_resetCCtx_byCopyingCDict(ZSTD_CCtx* cctx,
const ZSTD_CDict* cdict,
ZSTD_CCtx_params params,
U64 pledgedSrcSize,
ZSTD_buffered_policy_e zbuff)
{
const ZSTD_compressionParameters *cdict_c... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 239,866,699,541,020,040,000,000,000,000,000,000,000 | 55 | fixed T36302429 |
int kvm_emulate_invd(struct kvm_vcpu *vcpu)
{
/* Treat an INVD instruction as a NOP and just skip it. */
return kvm_emulate_as_nop(vcpu);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 336,462,869,252,012,020,000,000,000,000,000,000,000 | 5 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
struct wireless_dev *brcmf_ap_add_vif(struct wiphy *wiphy, const char *name,
u32 *flags, struct vif_params *params)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct brcmf_if *ifp = netdev_priv(cfg_to_ndev(cfg));
struct brcmf_cfg80211_vif *vif;
int err;
if (brcmf_cfg80211_vif_event_armed(c... | 0 | [
"CWE-119",
"CWE-703"
] | linux | ded89912156b1a47d940a0c954c43afbabd0c42c | 308,367,313,991,033,950,000,000,000,000,000,000,000 | 56 | brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap()
User-space can choose to omit NL80211_ATTR_SSID and only provide raw
IE TLV data. When doing so it can provide SSID IE with length exceeding
the allowed size. The driver further processes this IE copying it
into a local variable without checking the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.