func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
rsvg_start_desc (RsvgHandle * ctx) { rsvg_start_extra (ctx, "desc", &ctx->priv->desc); }
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
50,928,444,588,234,250,000,000,000,000,000,000,000
4
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx) { /* * We need to be idempotent because, unfortunately, free() also calls * cleanup(), so the natural call sequence new(), init(), cleanup(), free() * calls cleanup() for the same object twice! Thus we must zero the * pointers below after they're...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
298,602,837,524,685,400,000,000,000,000,000,000,000
25
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
ReturnCode_t DataReaderImpl::check_qos ( const DataReaderQos& qos) { if (qos.durability().kind == PERSISTENT_DURABILITY_QOS) { logError(DDS_QOS_CHECK, "PERSISTENT Durability not supported"); return ReturnCode_t::RETCODE_UNSUPPORTED; } if (qos.destination_order().kind == BY_SOURCE...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
15,672,689,870,899,798,000,000,000,000,000,000,000
20
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...
void preventCommandPropagation(client *c) { c->flags |= CLIENT_PREVENT_PROP; }
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
156,384,563,759,993,960,000,000,000,000,000,000,000
3
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
static ssize_t show_ibdev(struct device *device, struct device_attribute *attr, char *buf) { int ret = -ENODEV; int srcu_key; struct ib_uverbs_device *dev = dev_get_drvdata(device); struct ib_device *ib_dev; if (!dev) return -ENODEV; srcu_key = srcu_read_lock(&dev->disassociate_srcu); ib_dev = srcu_dere...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
77,675,211,710,226,300,000,000,000,000,000,000,000
19
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
void Item::print_item_w_name(String *str, enum_query_type query_type) { print(str, query_type); if (name.str) { DBUG_ASSERT(name.length == strlen(name.str)); THD *thd= current_thd; str->append(STRING_WITH_LEN(" AS ")); append_identifier(thd, str, &name); } }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
148,072,168,249,158,450,000,000,000,000,000,000,000
12
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
readHeaderTiff(const char *filename, l_int32 n, l_int32 *pw, l_int32 *ph, l_int32 *pbps, l_int32 *pspp, l_int32 *pres, l_int32 *pcmap, l_int32 *pformat) { l_int32 ret; FILE ...
0
[ "CWE-125" ]
leptonica
5ba34b1fe741d69d43a6c8cf767756997eadd87c
28,129,671,421,394,836,000,000,000,000,000,000,000
33
Issue 23654 in oss-fuzz: Heap-buffer-overflow in pixReadFromTiffStream * Increase scanline buffer for reading gray+alpha and converting to RGBA
INST_HANDLER (dec) { // DEC Rd int d = ((buf[0] >> 4) & 0xf) | ((buf[1] & 0x1) << 4); ESIL_A ("-1,r%d,+,", d); // --Rd // FLAGS: ESIL_A ("0,RPICK,0x7f,==,vf,=,"); // V ESIL_A ("0,RPICK,0x80,&,!,!,nf,=,"); // N ESIL_A ("0,RPICK,!,zf,=,"); // Z ESIL_A ("vf,nf,^,sf,=,"); // S ESIL_A ("r%d,=,", ...
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
161,684,900,100,440,800,000,000,000,000,000,000,000
10
Fix crash in anal.avr
static vpx_codec_err_t ctrl_set_byte_alignment(vpx_codec_alg_priv_t *ctx, va_list args) { const int legacy_byte_alignment = 0; const int min_byte_alignment = 32; const int max_byte_alignment = 1024; const int byte_alignment = va_arg(args, int); if (byte_alignmen...
0
[ "CWE-125" ]
libvpx
0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88
307,666,716,359,151,500,000,000,000,000,000,000,000
19
vp9: fix OOB read in decoder_peek_si_internal Profile 1 or 3 bitstreams may require 11 bytes for the header in the intra-only case. Additionally add a check on the bit reader's error handler callback to ensure it's non-NULL before calling to avoid future regressions. This has existed since at least (pre-1.4.0): 09bf...
static void intel_hda_regs_reset(IntelHDAState *d) { uint32_t *addr; int i; for (i = 0; i < ARRAY_SIZE(regtab); i++) { if (regtab[i].name == NULL) { continue; } if (regtab[i].offset == 0) { continue; } addr = intel_hda_reg_addr(d, regtab + i)...
0
[ "CWE-787" ]
qemu
79fa99831debc9782087e834382c577215f2f511
161,986,070,102,081,380,000,000,000,000,000,000,000
16
hw/audio/intel-hda: Restrict DMA engine to memories (not MMIO devices) Issue #542 reports a reentrancy problem when the DMA engine accesses the HDA controller I/O registers. Fix by restricting the DMA engine to memories regions (forbidding MMIO devices such the HDA controller). Reported-by: OSS-Fuzz (Issue 28435) Rep...
const struct GUID *samdb_ntds_invocation_id(struct ldb_context *ldb) { return samdb_ntds_GUID(ldb, "invocationId", "cache.invocation_id"); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
238,340,675,704,589,170,000,000,000,000,000,000,000
4
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static int cr_interception(struct vcpu_svm *svm) { int reg, cr; unsigned long val; int err; if (!static_cpu_has(X86_FEATURE_DECODEASSISTS)) return emulate_on_interception(svm); if (unlikely((svm->vmcb->control.exit_info_1 & CR_VALID) == 0)) return emulate_on_interception(svm); reg = svm->vmcb->control.exit...
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
101,732,366,872,644,640,000,000,000,000,000,000,000
70
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
ptvcursor_pop_subtree(ptvcursor_t *ptvc) { subtree_lvl *subtree; if (ptvc->pushed_tree_index <= 0) return; ptvc->pushed_tree_index--; subtree = ptvc->pushed_tree + ptvc->pushed_tree_index; if (subtree->it != NULL) proto_item_set_len(subtree->it, ptvcursor_current_offset(ptvc) - subtree->cursor_offset); ptv...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
222,832,504,722,105,270,000,000,000,000,000,000,000
14
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
static u32 vmx_get_pkru(struct kvm_vcpu *vcpu) { return to_vmx(vcpu)->guest_pkru; }
0
[ "CWE-284", "CWE-264" ]
linux
3ce424e45411cf5a13105e0386b6ecf6eeb4f66f
151,630,091,366,889,810,000,000,000,000,000,000,000
4
kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC...
ecma_bigint_parse_string_value (ecma_value_t string, /**< ecma string */ uint32_t options) /**< ecma_bigint_parse_string_options_t option bits */ { JERRY_ASSERT (ecma_is_value_string (string)); ECMA_STRING_TO_UTF8_STRING (ecma_get_string_from_value (string), string_buffer_p, string_...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
154,957,758,853,363,120,000,000,000,000,000,000,000
12
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void __rbd_osd_setup_zeroout_ops(struct ceph_osd_request *osd_req, int which) { struct rbd_obj_request *obj_req = osd_req->r_priv; u16 opcode; if (rbd_obj_is_entire(obj_req)) { if (obj_req->num_img_extents) { if (!(obj_req->flags & RBD_OBJ_FLAG_COPYUP_ENABLED)) osd_req_op_init(osd_req, which++,...
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
232,389,780,304,122,980,000,000,000,000,000,000,000
27
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...
SimpleWriteWrap<OtherBase>::SimpleWriteWrap( StreamBase* stream, v8::Local<v8::Object> req_wrap_obj) : WriteWrap(stream, req_wrap_obj), OtherBase(stream->stream_env(), req_wrap_obj, AsyncWrap::PROVIDER_WRITEWRAP) { }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
46,427,822,615,094,550,000,000,000,000,000,000,000
8
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
static void v4l_print_u32(const void *arg, bool write_only) { pr_cont("value=%u\n", *(const u32 *)arg); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
154,471,558,223,094,570,000,000,000,000,000,000,000
4
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
xmlDictCreate(void) { xmlDictPtr dict; if (!xmlDictInitialized) if (!xmlInitializeDict()) return(NULL); #ifdef DICT_DEBUG_PATTERNS fprintf(stderr, "C"); #endif dict = xmlMalloc(sizeof(xmlDict)); if (dict) { dict->ref_counter = 1; dict->size = MIN_DICT_SIZE; d...
0
[ "CWE-399" ]
libxml2
8973d58b7498fa5100a876815476b81fd1a2412a
288,302,535,414,333,350,000,000,000,000,000,000,000
33
Add hash randomization to hash and dict structures Following http://www.ocert.org/advisories/ocert-2011-003.html it seems that having hash randomization might be a good idea when using XML with untrusted data * configure.in: lookup for rand, srand and time * dict.c: add randomization to dictionaries hash tables * hash...
static void tipc_sk_retry_connect(struct sock *sk, struct sk_buff_head *list) { struct tipc_sock *tsk = tipc_sk(sk); /* Try again later if dest link is congested */ if (tsk->cong_link_cnt) { sk_reset_timer(sk, &sk->sk_timer, msecs_to_jiffies(100)); return; } /* Prepare SYN for retransmit */ tipc_msg_skb_clon...
0
[ "CWE-200", "CWE-909" ]
linux
d6d86830705f173fca6087a3e67ceaf68db80523
223,144,609,760,253,960,000,000,000,000,000,000,000
12
net ticp:fix a kernel-infoleak in __tipc_sendmsg() struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently copying it to user space,causing kernel-infoleak. BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in instrument_c...
void usbredirparser_send_get_alt_setting(struct usbredirparser *parser, uint64_t id, struct usb_redir_get_alt_setting_header *get_alt_setting) { usbredirparser_queue(parser, usb_redir_get_alt_setting, id, get_alt_setting, NULL, 0); }
0
[]
usbredir
03c519ff5831ba75120e00ebebbf1d5a1f7220ab
112,294,769,331,528,610,000,000,000,000,000,000,000
7
Avoid use-after-free in serialization Serializing parsers with large amounts of buffered write data (e.g. in case of a slow or blocked write destination) would cause "serialize_data" to reallocate the state buffer whose default size is 64kB (USBREDIRPARSER_SERIALIZE_BUF_SIZE). The pointer to the position for the write...
FLAC_API FLAC__ChannelAssignment FLAC__stream_decoder_get_channel_assignment(const FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->protected_); return decoder->protected_->channel_assignment; }
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
66,001,546,936,184,170,000,000,000,000,000,000,000
6
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
static apr_status_t md_get_credentials(server_rec *s, apr_pool_t *p, const char **pkeyfile, const char **pcertfile, const char **pchainfile) { *pchainfile = NULL; if (!compat_warned) { ...
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
132,374,170,261,599,770,000,000,000,000,000,000,000
14
v1.1.12, notifycmd improvements
flatten (var_hash_table, func, vlist, flags) HASH_TABLE *var_hash_table; sh_var_map_func_t *func; VARLIST *vlist; int flags; { register int i; register BUCKET_CONTENTS *tlist; int r; SHELL_VAR *var; if (var_hash_table == 0 || (HASH_ENTRIES (var_hash_table) == 0) || (vlist == 0 && func == ...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
294,109,854,326,772,870,000,000,000,000,000,000,000
26
commit bash-20120224 snapshot
static int match_session(struct cifs_ses *ses, struct smb_vol *vol) { switch (ses->server->secType) { case Kerberos: if (!uid_eq(vol->cred_uid, ses->cred_uid)) return 0; break; default: /* NULL username means anonymous session */ if (ses->user_name == NULL) { if (!vol->nullauth) return 0; break;...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
331,653,762,807,914,940,000,000,000,000,000,000,000
29
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
int udp6_seq_show(struct seq_file *seq, void *v) { if (v == SEQ_START_TOKEN) seq_printf(seq, " sl " "local_address " "remote_address " "st tx_queue rx_queue tr tm->when retrnsmt" " uid timeout inode ref pointer drops\n"); else udp6_...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
56,016,271,432,884,110,000,000,000,000,000,000,000
13
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
bool MasteringMetadata::Valid() const { if (luminance_min_ != kValueNotPresent) { if (luminance_min_ < kMinLuminance || luminance_min_ > kMinLuminanceMax || luminance_min_ > luminance_max_) { return false; } } if (luminance_max_ != kValueNotPresent) { if (luminance_max_ < kMinLuminance |...
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
182,014,377,098,430,000,000,000,000,000,000,000,000
24
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
static void coroutine_fn v9fs_readdir(void *opaque) { int32_t fid; V9fsFidState *fidp; ssize_t retval = 0; size_t offset = 7; uint64_t initial_offset; int32_t count; uint32_t max_count; V9fsPDU *pdu = opaque; V9fsState *s = pdu->s; retval = pdu_unmarshal(pdu, offset, "dqd", &fid...
0
[ "CWE-362" ]
qemu
89fbea8737e8f7b954745a1ffc4238d377055305
276,874,349,254,477,960,000,000,000,000,000,000,000
60
9pfs: Fully restart unreclaim loop (CVE-2021-20181) Depending on the client activity, the server can be asked to open a huge number of file descriptors and eventually hit RLIMIT_NOFILE. This is currently mitigated using a reclaim logic : the server closes the file descriptors of idle fids, based on the assumption that...
NCURSES_SP_NAME(_nc_screen_init) (NCURSES_SP_DCL0) { NCURSES_SP_NAME(_nc_screen_resume) (NCURSES_SP_ARG); }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
308,616,074,202,487,200,000,000,000,000,000,000,000
4
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
void spl_SplObjectStorage_free_storage(zend_object *object) /* {{{ */ { spl_SplObjectStorage *intern = spl_object_storage_from_obj(object); zend_object_std_dtor(&intern->std); zend_hash_destroy(&intern->storage); if (intern->gcdata != NULL) { efree(intern->gcdata); } } /* }}} */
0
[ "CWE-119", "CWE-787" ]
php-src
61cdd1255d5b9c8453be71aacbbf682796ac77d4
60,939,454,749,223,350,000,000,000,000,000,000,000
13
Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key
ACSequentialScan::ACSequentialScan(class Frame *frame,class Scan *scan, UBYTE start,UBYTE stop,UBYTE lowbit,UBYTE, bool differential,bool residual,bool large) : EntropyParser(frame,scan) #if ACCUSOFT_CODE , m_pBlockCtrl(NULL), m_ucScanStart(s...
0
[ "CWE-119", "CWE-703" ]
libjpeg
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
32,198,616,288,894,260,000,000,000,000,000,000,000
27
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
static char * __init memfmt(char *buf, unsigned long n) { if (n >= (1UL << 30)) sprintf(buf, "%lu GB", n >> 30); else if (n >= (1UL << 20)) sprintf(buf, "%lu MB", n >> 20); else sprintf(buf, "%lu KB", n >> 10); return buf; }
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
169,108,044,021,435,620,000,000,000,000,000,000,000
10
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
build_membership_diff(TALLOC_CTX *mem_ctx, const char *name, char **ldap_parent_names, char **sysdb_parent_names, struct membership_diff **_mdiff) { TALLOC_CTX *tmp_ctx; struct membership_diff *mdiff; errno_t ret; char **add_groups; char **del_groups; ...
0
[ "CWE-264" ]
sssd
0b6b4b7669b46d3d0b0ebefbc0e1621965444717
93,131,717,935,574,830,000,000,000,000,000,000,000
46
IPA: process non-posix nested groups Do not expect objectClass to be posixGroup but rather more general groupofnames. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit bc8c93ffe881271043492c938c626a9be948000e)
extract_l4_tcp(struct conn_key *key, const void *data, size_t size) { if (OVS_UNLIKELY(size < TCP_HEADER_LEN)) { return false; } const struct tcp_header *tcp = data; key->src.port = tcp->tcp_src; key->dst.port = tcp->tcp_dst; /* Port 0 is invalid */ return key->src.port && key->dst...
0
[ "CWE-400" ]
ovs
48ceca0446b1c2c2c03e7551048c5b19ed23cc97
8,206,921,708,240,889,000,000,000,000,000,000,000
13
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...
queue_ref_for_analysis (FlatpakDecomposed *ref, const char *arch, GHashTable *analyzed_refs, GQueue *refs_to_analyze) { if (arch != NULL && !flatpak_decomposed_is_arch (ref, arch)) return; if (g_hash_table_lookup (analyzed_refs, ref) !...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
128,172,267,691,201,130,000,000,000,000,000,000,000
14
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
int install_user_keyrings(void) { struct user_struct *user; const struct cred *cred; struct key *uid_keyring, *session_keyring; key_perm_t user_keyring_perm; char buf[20]; int ret; uid_t uid; user_keyring_perm = (KEY_POS_ALL & ~KEY_POS_SETATTR) | KEY_USR_ALL; cred = current_cred(); user = cred->user; uid = ...
1
[ "CWE-362" ]
linux
0da9dfdd2cd9889201bc6f6f43580c99165cd087
229,422,052,620,087,100,000,000,000,000,000,000,000
83
keys: fix race with concurrent install_user_keyrings() This fixes CVE-2013-1792. There is a race in install_user_keyrings() that can cause a NULL pointer dereference when called concurrently for the same user if the uid and uid-session keyrings are not yet created. It might be possible for an unprivileged user to tr...
static int find_hole(void) { unsigned x; int y, z; for (z = -1, y = INT_MAX, x = 0; x < FP_ENTRIES; x++) { if (fp_cache[x].lru_count < y && fp_cache[x].lock == 0) { z = x; y = fp_cache[x].lru_count; } } /* decrease all */ for (x = 0; x < FP_ENTRIES; x++) { ...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
29,479,404,983,646,520,000,000,000,000,000,000,000
31
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
free_object (void *data) { index_object *obj = data; p11_attrs_free (obj->attrs); free (obj); }
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
60,620,594,622,288,320,000,000,000,000,000,000,000
6
Check for arithmetic overflows before allocating
PREFIX(skipS)(const ENCODING *enc, const char *ptr) { for (;;) { switch (BYTE_TYPE(enc, ptr)) { case BT_LF: case BT_CR: case BT_S: ptr += MINBPC(enc); break; default: return ptr; } } }
0
[ "CWE-116" ]
libexpat
3f0a0cb644438d4d8e3294cd0b1245d0edb0c6c6
109,873,907,455,092,360,000,000,000,000,000,000,000
13
lib: Add missing validation of encoding (CVE-2022-25235)
lyd_new(struct lyd_node *parent, const struct lys_module *module, const char *name) { const struct lys_node *snode = NULL, *siblings; if ((!parent && !module) || !name) { LOGARG; return NULL; } siblings = lyd_new_find_schema(parent, module, 0); if (!siblings) { LOGARG; ...
0
[ "CWE-119" ]
libyang
32fb4993bc8bb49e93e84016af3c10ea53964be5
140,230,316,383,691,710,000,000,000,000,000,000,000
24
schema tree BUGFIX do not check features while still resolving schema Fixes #723
void comps_objrtree_copy_shallow(COMPS_ObjRTree *rt1, COMPS_ObjRTree *rt2){ COMPS_HSList *to_clone, *tmplist, *new_subnodes; COMPS_HSListItem *it, *it2; COMPS_ObjRTreeData *rtdata; COMPS_Object *new_data; rt1->subnodes = comps_hslist_create(); comps_hslist_init(rt1->subnodes, NULL, NULL, &comps...
0
[ "CWE-416", "CWE-862" ]
libcomps
e3a5d056633677959ad924a51758876d415e7046
205,217,206,859,729,700,000,000,000,000,000,000,000
56
Fix UAF in comps_objmrtree_unite function The added field is not used at all in many places and it is probably the left-over of some copy-paste.
TEST(LtOp, MatchesArrayValue) { BSONObj operand = BSON("$lt" << 5); LTMatchExpression lt("a", operand["$lt"]); ASSERT(lt.matchesBSON(BSON("a" << BSON_ARRAY(6 << 4.5)), NULL)); ASSERT(!lt.matchesBSON(BSON("a" << BSON_ARRAY(6 << 7)), NULL)); }
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
234,749,367,071,822,620,000,000,000,000,000,000,000
6
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
const T& operator()(const unsigned int x, const unsigned int y, const unsigned int z) const { return _data[x + y*(ulongT)_width + z*(ulongT)_width*_height];
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
105,714,904,165,698,900,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static int _gen_bpf_build_jmp_ret(struct bpf_state *state, struct bpf_blk *blk, unsigned int offset, struct bpf_blk *blk_ret) { unsigned int j_len; uint64_t tgt_hash = blk_ret->hash; struct bpf_blk *b_jmp, *b_new; /* calculate the jump distance */ j_len = blk->blk_cnt - (offset + 1); b_jmp = blk->nex...
0
[]
libseccomp
cf5d1538d243fb6f1839db70b69469d3d7e9e077
189,527,522,644,748,670,000,000,000,000,000,000,000
53
bpf: pass the correct accumulator state to the next level We were mistakenly passing the wrong accumulator state (the state at the start of the instruction block, not at the end) which was causing us to generate unnecessary load instructions. Signed-off-by: Paul Moore <paul@paul-moore.com>
static void scalar_min_max_or(struct bpf_reg_state *dst_reg, struct bpf_reg_state *src_reg) { bool src_known = tnum_is_const(src_reg->var_off); bool dst_known = tnum_is_const(dst_reg->var_off); s64 smin_val = src_reg->smin_value; u64 umin_val = src_reg->umin_value; if (src_known && dst_known) { __mark_...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
16,041,466,753,298,830,000,000,000,000,000,000,000
35
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
iakerb_gss_get_mic_iov_length(OM_uint32 *minor_status, gss_ctx_id_t context_handle, gss_qop_t qop_req, gss_iov_buffer_desc *iov, int iov_count) { iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle; if (ctx->gssc == GSS_C_NO_CONTEXT) return ...
0
[ "CWE-18" ]
krb5
e04f0283516e80d2f93366e0d479d13c9b5c8c2a
254,454,477,760,704,200,000,000,000,000,000,000,000
12
Fix IAKERB context aliasing bugs [CVE-2015-2696] The IAKERB mechanism currently replaces its context handle with the krb5 mechanism handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations for...
issuerAndThisUpdateValidate( Syntax *syntax, struct berval *in ) { int rc; struct berval i, tu; Debug( LDAP_DEBUG_TRACE, ">>> issuerAndThisUpdateValidate: <%s>\n", in->bv_val, 0, 0 ); rc = issuerAndThisUpdateCheck( in, &i, &tu, NULL ); if ( rc ) { goto done; } /* validate DN -- doesn't handle double dqu...
0
[ "CWE-617" ]
openldap
67670f4544e28fb09eb7319c39f404e1d3229e65
231,512,771,877,073,800,000,000,000,000,000,000,000
34
ITS#9383 remove assert in certificateListValidate
dw_read_str_index_val_itself(Dwarf_Debug dbg, unsigned theform, Dwarf_Small *info_ptr, Dwarf_Small *section_end, Dwarf_Unsigned *return_index, Dwarf_Error *error) { Dwarf_Unsigned index = 0; switch(theform) { case DW_FORM_strx: case DW_FORM_GNU_str_index: DECODE_LEB128_UWORD...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
7ef09e1fc9ba07653dd078edb2408631c7969162
72,381,897,198,581,350,000,000,000,000,000,000,000
42
Fixes old bug(which could result in Denial of Service) due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8. DW202206-001 modified: src/lib/libdwarf/dwarf_form.c
static int tcp_send_syn_data(struct sock *sk, struct sk_buff *syn) { struct tcp_sock *tp = tcp_sk(sk); struct tcp_fastopen_request *fo = tp->fastopen_req; int space, err = 0; struct sk_buff *syn_data; tp->rx_opt.mss_clamp = tp->advmss; /* If MSS is not cached */ if (!tcp_fastopen_cookie_check(sk, &tp->rx_opt.ms...
0
[ "CWE-416" ]
linux
7f582b248d0a86bae5788c548d7bb5bca6f7691a
323,623,095,567,501,730,000,000,000,000,000,000,000
85
tcp: purge write queue in tcp_connect_init() syzkaller found a reliable way to crash the host, hitting a BUG() in __tcp_retransmit_skb() Malicous MSG_FASTOPEN is the root cause. We need to purge write queue in tcp_connect_init() at the point we init snd_una/write_seq. This patch also replaces the BUG() by a less int...
static int vlv_value_compare(struct vlv_sort_context *target, struct GUID *guid) { struct ldb_result *result = NULL; struct ldb_message_element *el = NULL; struct vlv_context *ac = target->ac; int ret; const char *attrs[2] = { target->attr, NULL }; ret = vlv_search_by_dn_guid(ac->module, ac, &result...
0
[ "CWE-416" ]
samba
32c333def9ad5a1c67abee320cf5f3c4f2cb1e5c
2,413,237,249,939,186,500,000,000,000,000,000,000
25
CVE-2020-10760 dsdb: Ensure a proper talloc tree for saved controls Otherwise a paged search on the GC port will fail as the ->data was not kept around for the second page of searches. An example command to produce this is bin/ldbsearch --paged -H ldap://$SERVER:3268 -U$USERNAME%$PASSWORD This shows up later in the...
xmlGetNamespace(xmlParserCtxtPtr ctxt, const xmlChar *prefix) { int i; if (prefix == ctxt->str_xml) return(ctxt->str_xml_ns); for (i = ctxt->nsNr - 2;i >= 0;i-=2) if (ctxt->nsTab[i] == prefix) { if ((prefix == NULL) && (*ctxt->nsTab[i + 1] == 0)) return(NULL); return(ctxt->nsTab[...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
287,489,662,799,237,170,000,000,000,000,000,000,000
12
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
size_t miller_rabin_test_iterations(size_t bits, size_t level) { struct mapping { size_t bits; size_t verify_iter; size_t check_iter; }; static const mapping tests[] = { { 50, 55, 25 }, { 100, 38, 22 }, { 160, 32, 18 }, { 163, 31, 17 }, { 168, 30, 16 }, { 177, 29, 16...
0
[ "CWE-200" ]
botan
bcf13fa153a11b3e0ad54e2af6962441cea3adf1
308,970,366,798,398,680,000,000,000,000,000,000,000
55
Fixes for CVE-2015-7827 and CVE-2016-2849
string_startswith(PyStringObject *self, PyObject *args) { Py_ssize_t start = 0; Py_ssize_t end = PY_SSIZE_T_MAX; PyObject *subobj; int result; if (!stringlib_parse_args_finds("startswith", args, &subobj, &start, &end)) return NULL; if (PyTuple_Check(subobj)) { Py_ssize_t i; ...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
21,568,836,538,532,060,000,000,000,000,000,000,000
33
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
static void read_bulk_callback(struct urb *urb) { pegasus_t *pegasus = urb->context; struct net_device *net; int rx_status, count = urb->actual_length; int status = urb->status; u8 *buf = urb->transfer_buffer; __u16 pkt_len; if (!pegasus) return; net = pegasus->net; if (!netif_device_present(net) || !netif...
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
251,319,893,703,465,480,000,000,000,000,000,000,000
109
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
void NumberFormatTest::Test13056_GroupingSize() { UErrorCode status = U_ZERO_ERROR; DecimalFormat df(u"#,##0", status); if (!assertSuccess("", status)) return; assertEquals("Primary grouping should return 3", 3, df.getGroupingSize()); assertEquals("Secondary grouping should return 0", 0, df.getSecon...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
241,135,960,967,644,430,000,000,000,000,000,000,000
13
ICU-20246 Fixing another integer overflow in number parsing.
static int write_chunk(struct mctp_serial *dev, unsigned char *buf, int len) { return dev->tty->ops->write(dev->tty, buf, len); }
0
[]
linux
6c342ce2239c182c2428ce5a44cb32330434ae6e
107,820,913,683,013,340,000,000,000,000,000,000,000
4
mctp: serial: Cancel pending work from ndo_uninit handler We cannot do the cancel_work_sync from after the unregister_netdev, as the dev pointer is no longer valid, causing a uaf on ldisc unregister (or device close). Instead, do the cancel_work_sync from the ndo_uninit op, where the dev still exists, but the queue h...
xmlSchemaCheckSRCCT(xmlSchemaParserCtxtPtr ctxt, xmlSchemaTypePtr type) { xmlSchemaTypePtr base; int ret = 0; /* * TODO: Adjust the error codes here, as I used * XML_SCHEMAP_SRC_CT_1 only yet. */ base = type->baseType; if (! WXS_HAS_SIMPLE_CONTENT(type)) { /* * 1 If the <complex...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
67,219,381,249,807,270,000,000,000,000,000,000,000
152
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static bool nested_svm_vmrun(struct vcpu_svm *svm) { struct vmcb *nested_vmcb; struct vmcb *hsave = svm->nested.hsave; struct vmcb *vmcb = svm->vmcb; struct page *page; u64 vmcb_gpa; vmcb_gpa = svm->vmcb->save.rax; nested_vmcb = nested_svm_map(svm, svm->vmcb->save.rax, &page); if (!nested_vmcb) return false...
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
1,285,046,657,381,883,000,000,000,000,000,000,000
159
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
local block_state deflate_huff(s, flush) deflate_state *s; int flush; { int bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we have a literal to write. */ if (s->lookahead == 0) { fill_window(s); if (s->lookahead == 0) ...
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
116,196,792,340,478,250,000,000,000,000,000,000,000
34
Fix a bug that can crash deflate on some input when using Z_FIXED. This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare input...
void Compute(OpKernelContext* context) override { OpInputList indices_list_in; OP_REQUIRES_OK(context, context->input_list("indices", &indices_list_in)); OpInputList values_list_in; OP_REQUIRES_OK(context, context->input_list("values", &values_list_in)); OpInputList shapes_list_in; OP_REQUIRES...
0
[ "CWE-843" ]
tensorflow
b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025
116,255,221,264,946,900,000,000,000,000,000,000,000
55
Fix `tf.raw_ops.SparseCross` failing CHECK. PiperOrigin-RevId: 368701671 Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d
PHP_FUNCTION(odbc_tables) { zval *pv_conn; odbc_result *result = NULL; odbc_connection *conn; char *cat = NULL, *schema = NULL, *table = NULL, *type = NULL; int cat_len = 0, schema_len = 0, table_len = 0, type_len = 0; RETCODE rc; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|s!sss", &pv_conn, &cat,...
0
[ "CWE-20" ]
php-src
16db4d1462bf3eacb93c0cd940f799160a284b24
92,913,336,360,175,560,000,000,000,000,000,000,000
63
Fix #69975: PHP segfaults when accessing nvarchar(max) defined columns The SQL Server Native Client 11.0 and maybe other ODBC drivers report NVARCHAR(MAX) columns as SQL_WVARCHAR with size 0. This causes too small a buffer to be emalloc'd, likely causing a segfault in the following. As we don't know the real size of t...
virDomainScreenshot(virDomainPtr domain, virStreamPtr stream, unsigned int screen, unsigned int flags) { VIR_DOMAIN_DEBUG(domain, "stream=%p, flags=%x", stream, flags); virResetLastError(); virCheckDomainReturn(domain, NULL); virCheckStreamGo...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
277,951,741,322,992,950,000,000,000,000,000,000,000
36
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
void mpol_fix_fork_child_flag(struct task_struct *p) { if (p->mempolicy) p->flags |= PF_MEMPOLICY; else p->flags &= ~PF_MEMPOLICY; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
106,131,841,918,016,870,000,000,000,000,000,000,000
7
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
CServer* CIRCNetwork::FindServer(const CString& sName) const { for (CServer* pServer : m_vServers) { if (sName.Equals(pServer->GetName())) { return pServer; } } return nullptr; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
278,561,129,428,894,480,000,000,000,000,000,000,000
9
Don't crash if user specified invalid encoding. This is CVE-2019-9917
explicit RemoveInvolution(const GraphOptimizerContext& ctx, const ArithmeticOptimizerContext& ctx_ext) : ArithmeticOptimizerStage("RemoveInvolution", ctx, ctx_ext) {}
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
62,040,550,999,653,960,000,000,000,000,000,000,000
3
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
void resetLuaClient(void) { /* After the script done, remove the MULTI state. */ server.lua_client->flags &= ~CLIENT_MULTI; }
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
32,190,802,785,716,750,000,000,000,000,000,000,000
4
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
static void *file_ram_alloc(RAMBlock *block, ram_addr_t memory, const char *path, Error **errp) { char *filename; char *sanitized_name; char *c; void *area = NULL; int fd; uint64_t hpagesize; Error *local_err...
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
235,239,072,064,912,480,000,000,000,000,000,000,000
90
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
explicit CollectiveAllToAllV3OpKernel(OpKernelConstruction* c) : CollectiveOpV3Kernel(c) { name_ = strings::StrCat(c->def().name(), ": AllToAllV3"); VLOG(2) << "CollectiveAllToAllV3 " << this << " name " << name_; }
0
[ "CWE-416" ]
tensorflow
ca38dab9d3ee66c5de06f11af9a4b1200da5ef75
73,582,148,239,524,250,000,000,000,000,000,000,000
5
Fix undefined behavior in CollectiveReduceV2 and others We should not call done after it's moved. PiperOrigin-RevId: 400838185 Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1
static inline void paravirt_alloc_ldt(struct desc_struct *ldt, unsigned entries) { PVOP_VCALL2(cpu.alloc_ldt, ldt, entries); }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
304,929,005,864,751,830,000,000,000,000,000,000,000
4
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
void WebPImage::setIptcData(const IptcData& /*iptcData*/) { // not supported // just quietly ignore the request // throw(Error(kerInvalidSettingForImage, "IPTC metadata", "WebP")); }
0
[ "CWE-190" ]
exiv2
c73d1e27198a389ce7caf52ac30f8e2120acdafd
299,195,557,425,981,570,000,000,000,000,000,000,000
6
Avoid negative integer overflow when `filesize < io_->tell()`. This fixes #791.
GetXLogInsertRecPtr(void) { volatile XLogCtlInsert *Insert = &XLogCtl->Insert; uint64 current_bytepos; SpinLockAcquire(&Insert->insertpos_lck); current_bytepos = Insert->CurrBytePos; SpinLockRelease(&Insert->insertpos_lck); return XLogBytePosToRecPtr(current_bytepos); }
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
174,385,449,180,075,260,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...
L_I16L(UINT8 *out, const UINT8 *in, int xsize) { int x; for (x = 0; x < xsize; x++, in++) { *out++ = *in; *out++ = 0; } }
0
[ "CWE-120" ]
Pillow
518ee3722a99d7f7d890db82a20bd81c1c0327fb
219,730,925,813,926,800,000,000,000,000,000,000,000
7
Use snprintf instead of sprintf
static bool login_as_unix_peer(PgSocket *client) { if (!pga_is_unix(&client->remote_addr)) goto fail; if (!check_unix_peer_name(sbuf_socket(&client->sbuf), client->auth_user->name)) goto fail; return finish_client_login(client); fail: disconnect_client(client, true, "unix socket login rejected"); return false;...
0
[ "CWE-287", "CWE-284" ]
pgbouncer
7ca3e5279d05fceb1e8a043c6f5b6f58dea3ed38
249,257,030,981,237,050,000,000,000,000,000,000,000
11
Remove too early set of auth_user When query returns 0 rows (user not found), this user stays as login user... Should fix #69.
static char* lookup_loc_range(const char* loc_range, HashTable* hash_arr, int canonicalize TSRMLS_DC) { int i = 0; int cur_arr_len = 0; int result = 0; char* lang_tag = NULL; zval** ele_value = NULL; char** cur_arr = NULL; char* cur_loc_range = NULL; char* can_loc_range = NULL; int saved_pos = 0; char* re...
0
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
260,892,771,584,394,220,000,000,000,000,000,000,000
107
Fix bug #72241: get_icu_value_internal out-of-bounds read
void fxConstructArrayBufferResult(txMachine* the, txSlot* constructor, txInteger length) { txSlot* instance; if (constructor) mxPushSlot(constructor); else { mxPushSlot(mxThis); mxGetID(mxID(_constructor)); } fxToSpeciesConstructor(the, &mxArrayBufferConstructor); mxNew(); mxPushInteger(length); mxRunCoun...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
46,844,738,109,636,870,000,000,000,000,000,000,000
24
XS: #896
_equalAStar(const A_Star *a, const A_Star *b) { return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
27,715,228,024,472,560,000,000,000,000,000,000,000
4
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 int zval_object_property_dump(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; const char *prop_name, *class_name; level = va_arg(args, int); if (hash_key->nKeyLength == 0) { /* numeric key */ php_printf("%*c[%ld]=>\n", level + 1, ' ', hash_key->h); } else...
0
[]
php-src
e8429400d40e3c3aa4b22ba701991d698a2f3b2f
122,449,378,356,683,080,000,000,000,000,000,000,000
27
Fix bug #70172 - Use After Free Vulnerability in unserialize()
static inline void ModulateHCLp(const double percent_hue, const double percent_chroma,const double percent_luma,double *red, double *green,double *blue) { double hue, luma, chroma; /* Increase or decrease color luma, chroma, or hue. */ ConvertRGBToHCLp(*red,*green,*blue,&hue,&chroma,&luma);...
0
[ "CWE-835" ]
ImageMagick
a80ee0ee1a083b4991d12ed4c07b7c7c5890f329
169,653,375,686,358,970,000,000,000,000,000,000,000
18
https://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=31506
QPDFObjectHandle::Members::Members(QPDF* qpdf, int objid, int generation) : initialized(true), qpdf(qpdf), objid(objid), generation(generation), reserved(false) { }
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
316,046,611,918,337,360,000,000,000,000,000,000,000
8
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
ssize_t tpm_show_pubek(struct device *dev, struct device_attribute *attr, char *buf) { u8 *data; struct tpm_cmd_t tpm_cmd; ssize_t err; int i, rc; char *str = buf; struct tpm_chip *chip = dev_get_drvdata(dev); tpm_cmd.header.in = tpm_readpubek_header; err = transmit_cmd(chip, &tpm_cmd, READ_PUBEK_RES...
0
[ "CWE-200" ]
linux
1309d7afbed112f0e8e90be9af975550caa0076b
308,315,303,998,994,100,000,000,000,000,000,000,000
49
char/tpm: Fix unitialized usage of data buffer This patch fixes information leakage to the userspace by initializing the data buffer to zero. Reported-by: Peter Huewe <huewe.external@infineon.com> Signed-off-by: Peter Huewe <huewe.external@infineon.com> Signed-off-by: Marcel Selhorst <m.selhorst@sirrix.com> [ Also re...
static size_t backup_segments_serialize(struct luks2_hdr *hdr, uint8_t *buffer) { json_object *jobj_segment; size_t l, len = 0; jobj_segment = LUKS2_get_segment_by_flag(hdr, "backup-previous"); if (!jobj_segment || !(l = segment_serialize(jobj_segment, buffer))) return 0; len += l; if (buffer) buffer += l; ...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
133,316,521,550,377,460,000,000,000,000,000,000,000
28
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
bool isDisabled(ListenerFilterCallbacks& cb) { if (matcher_ == nullptr) { return false; } else { return matcher_->matches(cb); } }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
252,344,017,881,811,950,000,000,000,000,000,000,000
7
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static void load_host_msrs(struct kvm_vcpu *vcpu) { #ifdef CONFIG_X86_64 wrmsrl(MSR_GS_BASE, to_svm(vcpu)->host_gs_base); #endif }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
242,283,135,355,665,400,000,000,000,000,000,000,000
6
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
ip_optprint(netdissect_options *ndo, register const u_char *cp, u_int length) { register u_int option_len; const char *sep = ""; for (; length > 0; cp += option_len, length -= option_len) { u_int option_code; ND_PRINT((ndo, "%s", sep)); sep = ","; ND_TCHECK(*cp); option_code = *cp; ND_PRI...
1
[ "CWE-125", "CWE-787" ]
tcpdump
eee0b04bcfdae319c242b0b8fc3d07029ee65b8c
166,203,021,778,654,650,000,000,000,000,000,000,000
73
CVE-2017-13022/IP: Add bounds checks to ip_printroute(). This fixes a buffer over-read discovered by Bhargava Shastry, SecT/TU Berlin. Add a test using the capture file supplied by the reporter(s), modified so the capture file won't be rejected as an invalid capture.
static void i8042_stop(struct serio *serio) { struct i8042_port *port = serio->port_data; port->exists = false; /* * We synchronize with both AUX and KBD IRQs because there is * a (very unlikely) chance that AUX IRQ is raised for KBD port * and vice versa. */ synchronize_irq(I8042_AUX_IRQ); synchronize_i...
1
[ "CWE-476" ]
linux
340d394a789518018f834ff70f7534fc463d3226
328,120,393,330,008,360,000,000,000,000,000,000
15
Input: i8042 - fix crash at boot time The driver checks port->exists twice in i8042_interrupt(), first when trying to assign temporary "serio" variable, and second time when deciding whether it should call serio_interrupt(). The value of port->exists may change between the 2 checks, and we may end up calling serio_int...
piv_get_cached_data(sc_card_t * card, int enumtag, u8 **buf, size_t *buf_len) { piv_private_data_t * priv = PIV_DATA(card); int r; u8 *rbuf = NULL; size_t rbuflen; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); sc_log(card->ctx, "#%d", enumtag); assert(enumtag >= 0 && enumtag < PIV_OBJ_LAST_ENUM); /* see ...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
234,361,951,774,221,900,000,000,000,000,000,000,000
79
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
int enc_untrusted_symlink(const char *target, const char *linkpath) { return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_symlink, target, linkpath); }
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
229,902,804,492,412,030,000,000,000,000,000,000,000
4
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
XML_ParserCreate(const XML_Char *encodingName) { return XML_ParserCreate_MM(encodingName, NULL, NULL); }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
26,701,711,198,735,730,000,000,000,000,000,000,000
4
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
destination_from_pf(entry_connection_t *conn, socks_request_t *req) { struct sockaddr_storage proxy_addr; socklen_t proxy_addr_len = sizeof(proxy_addr); struct sockaddr *proxy_sa = (struct sockaddr*) &proxy_addr; struct pfioc_natlook pnl; tor_addr_t addr; int pf = -1; if (getsockname(ENTRY_TO_CONN(conn)-...
0
[ "CWE-532" ]
tor
80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9
236,823,821,355,616,730,000,000,000,000,000,000,000
82
Log warning when connecting to soon-to-be-deprecated v2 onions.
static int wc_ecc_make_pub_ex(ecc_key* key, ecc_curve_spec* curveIn, ecc_point* pubOut) { int err = MP_OKAY; #ifndef WOLFSSL_ATECC508A #ifndef WOLFSSL_SP_MATH ecc_point* base = NULL; #endif ecc_point* pub; DECLARE_CURVE_SPECS(curve, ECC_CURVE_FIELD_COUNT); #endif /* !WOLFSSL_ATECC508A */ if...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
47,430,142,447,158,610,000,000,000,000,000,000,000
145
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
void bnep_net_setup(struct net_device *dev) { memset(dev->broadcast, 0xff, ETH_ALEN); dev->addr_len = ETH_ALEN; ether_setup(dev); dev->netdev_ops = &bnep_netdev_ops; dev->watchdog_timeo = HZ * 2; }
1
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
94,364,936,583,682,660,000,000,000,000,000,000,000
11
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static void hci_disconn_loglink_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_disconn_logical_link_complete *ev = (void *) skb->data; struct hci_chan *hchan; BT_DBG("%s log handle 0x%4.4x status 0x%2.2x", hdev->name, le16_to_cpu(ev->handle), ev->status); if (ev->status)...
1
[ "CWE-416" ]
linux
5c4c8c9544099bb9043a10a5318130a943e32fc3
57,689,188,552,516,280,000,000,000,000,000,000,000
23
Bluetooth: verify AMP hci_chan before amp_destroy hci_chan can be created in 2 places: hci_loglink_complete_evt() if it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, Only AMP hci_chan should be removed by a call to hci_disconn_loglink_complete_evt(). However, the controller might mess up, call that fun...
static void virtio_gpu_resource_create_2d(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { pixman_format_code_t pformat; struct virtio_gpu_simple_resource *res; struct virtio_gpu_resource_create_2d c2d; VIRTIO_GPU_FILL_CMD(c2d); trace_virtio_gpu_cmd_res...
0
[]
qemu
acfc4846508a02cc4c83aa27799fd74ac280bdb2
70,178,158,718,516,510,000,000,000,000,000,000,000
57
virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
struct task_struct *css_task_iter_next(struct css_task_iter *it) { if (it->cur_task) { put_task_struct(it->cur_task); it->cur_task = NULL; } spin_lock_irq(&css_set_lock); /* @it may be half-advanced by skips, finish advancing */ if (it->flags & CSS_TASK_ITER_SKIPPED) css_task_iter_advance(it); if (it->ta...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
91,144,594,223,222,130,000,000,000,000,000,000,000
24
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
const CImg<T>& _display_object3d(CImgDisplay& disp, const char *const title, const CImg<tp>& vertices, const CImgList<tf>& primitives, const CImgList<tc>& colors, const...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
272,091,450,870,806,530,000,000,000,000,000,000,000
427
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static bool ad_unpack(struct adouble *ad, const size_t nentries, size_t filesize) { size_t bufsize = talloc_get_size(ad->ad_data); size_t adentries, i; uint32_t eid, len, off; bool ok; /* * The size of the buffer ad->ad_data is checked when read, so * we wouldn't have to check our own offsets, a few e...
1
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
112,944,291,364,810,300,000,000,000,000,000,000,000
131
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
asmlinkage long sys_time(time_t __user * tloc) { time_t i = get_seconds(); if (tloc) { if (put_user(i,tloc)) i = -EFAULT; } return i; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
329,670,890,406,036,450,000,000,000,000,000,000,000
10
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static inline int mmap_is_legacy(void) { if (current->personality & ADDR_COMPAT_LAYOUT) return 1; if (current->signal->rlim[RLIMIT_STACK].rlim_cur == RLIM_INFINITY) return 1; return sysctl_legacy_va_layout; }
0
[]
linux
a5adc91a4b44b5d1706b9d906cc14fe4f312afe9
229,325,363,125,211,820,000,000,000,000,000,000,000
10
powerpc: Ensure random space between stack and mmaps get_random_int() returns the same value within a 1 jiffy interval. This means that the mmap and stack regions will almost always end up the same distance apart, making a relative offset based attack possible. To fix this, shift the randomness we use for the mmap re...
static inline void get_strl(AVIOContext *pb, char *buf, int buf_size, int len) { int i; char *q, r; q = buf; for(i=0;i<len;i++) { r = avio_r8(pb); if (i < buf_size - 1) *q++ = r; } if (buf_size > 0) *q = '\0'; }
0
[ "CWE-399", "CWE-834" ]
FFmpeg
124eb202e70678539544f6268efc98131f19fa49
138,543,215,262,270,640,000,000,000,000,000,000,000
13
avformat/rmdec: Fix DoS due to lack of eof check Fixes: loop.ivr Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static inline void ioat_start(struct ioat_chan_common *chan) { u8 ver = chan->device->version; writeb(IOAT_CHANCMD_START, chan->reg_base + IOAT_CHANCMD_OFFSET(ver)); }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
65,069,840,226,859,725,000,000,000,000,000,000,000
6
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...