func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
test_bson_append_null (void) { bson_t *b; bson_t *b2; b = bson_new (); BSON_ASSERT (bson_append_null (b, "hello", -1)); b2 = get_bson ("test18.bson"); BSON_ASSERT_BSON_EQUAL (b, b2); bson_destroy (b); bson_destroy (b2); }
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
237,272,558,012,885,200,000,000,000,000,000,000,000
12
CDRIVER-2269 Check for zero string length in codewscope
multistatus_get_response_iter (Multistatus *multistatus, xmlNodeIter *iter) { iter->cur_node = multistatus->root->children; iter->next_node = multistatus->root->children; iter->name = "response"; iter->ns_href = "DAV:"; iter->user_data = multistatus; }
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
219,575,870,224,415,900,000,000,000,000,000,000,000
8
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
WebContents::WebContents(v8::Isolate* isolate, const gin_helper::Dictionary& options) : id_(GetAllWebContents().Add(this)), devtools_file_system_indexer_( base::MakeRefCounted<DevToolsFileSystemIndexer>()), exclusive_access_manager_(std::make_unique<ExclusiveAccessMana...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
209,357,882,978,397,700,000,000,000,000,000,000,000
101
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
uint32_t CompactProtocolWriter::writeBinary(const folly::IOBuf& str) { size_t size = str.computeChainDataLength(); // leave room for varint size if (size > std::numeric_limits<uint32_t>::max() - serializedSizeI32()) { TProtocolException::throwExceededSizeLimit(); } uint32_t result = apache::thrift::util::...
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
17,335,931,452,847,527,000,000,000,000,000,000,000
16
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
next_CE(struct read_ce_queue *heap) { uint64_t a_offset, b_offset, c_offset; int a, b, c; struct read_ce_req tmp; if (heap->cnt < 1) return; /* * Move the last item in the heap to the root of the tree */ heap->reqs[0] = heap->reqs[--(heap->cnt)]; /* * Rebalance the heap. */ a = 0; /* Starting eleme...
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
40,128,608,413,286,197,000,000,000,000,000,000,000
40
iso9660: validate directory record length
static void acquire_privilege(const char *name, Error **errp) { HANDLE token = NULL; TOKEN_PRIVILEGES priv; Error *local_err = NULL; if (OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES|TOKEN_QUERY, &token)) { if (!LookupPrivilegeValue(NULL, name, &priv.Privileges[0].Lu...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
28,541,504,639,216,290,000,000,000,000,000,000,000
35
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
TEST_P(Security, BuiltinAuthenticationPlugin_PKIDH_validation_ok_same_participant) { PubSubWriterReader<HelloWorldType> wreader(TEST_TOPIC_NAME); PropertyPolicy property_policy; property_policy.properties().emplace_back(Property("dds.sec.auth.plugin", "builtin.PKI-DH")); property_policy.pr...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
286,508,721,087,935,370,000,000,000,000,000,000,000
34
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 Sessions::Flush() { Lock guard(mutex_); sess_iterator next = list_.begin(); uint current = lowResTimer(); while (next != list_.end()) { sess_iterator si = next; ++next; if ( ((*si)->GetBornOn() + (*si)->GetTimeOut()) < current) { del_ptr_zero()(*si); ...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
25,561,811,507,266,020,000,000,000,000,000,000,000
16
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap) { /* used in both lgz201 and th7579 */ if (usb_set_interface(adap->dev->udev, 0, 0) < 0) err("set interface failed"); cxusb_ctrl_msg(adap->dev, CMD_DIGITAL, NULL, 0, NULL, 0); adap->fe_adap[0].fe = dvb_attach(mt352_attach, &cxusb_mt352_config,...
0
[ "CWE-119", "CWE-787" ]
linux
3f190e3aec212fc8c61e202c51400afa7384d4bc
126,512,965,236,360,240,000,000,000,000,000,000,000
15
[media] cxusb: Use a dma capable buffer also for reading Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack") added a kmalloc'ed bounce buffer for writes, but missed to do the same for reads. As the read only happens after the write is finished, we can reuse the same buffer. As dvb_usb_generic_rw handles a re...
static int shm_fault(struct vm_fault *vmf) { struct file *file = vmf->vma->vm_file; struct shm_file_data *sfd = shm_file_data(file); return sfd->vm_ops->fault(vmf); }
0
[]
linux
95e91b831f87ac8e1f8ed50c14d709089b4e01b8
283,434,175,286,634,200,000,000,000,000,000,000,000
7
ipc/shm: Fix shmat mmap nil-page protection The issue is described here, with a nice testcase: https://bugzilla.kernel.org/show_bug.cgi?id=192931 The problem is that shmat() calls do_mmap_pgoff() with MAP_FIXED, and the address rounded down to 0. For the regular mmap case, the protection mentioned above is that...
xmlSchemaParseModelGroupDefRef(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema, xmlNodePtr node) { xmlSchemaParticlePtr item; xmlNodePtr child = NULL; xmlAttrPtr attr; const xmlChar *ref = NULL, *refNs = NULL; int min, max; if ((ctxt == NULL) || (schema == NULL) || (node ==...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
308,635,740,300,276,900,000,000,000,000,000,000,000
83
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 int sg_proc_open_debug(struct inode *inode, struct file *file) { return seq_open(file, &debug_seq_ops); }
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
289,457,774,196,151,080,000,000,000,000,000,000,000
4
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
mz_bool mz_zip_writer_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint64 size_to_reserve_at_beginning) { MZ_FILE *pFile; pZip->m_pWrite = mz_zip_file_write_func; pZip->m_pIO_opaque = pZip; if (!mz_zip_writer_init(pZip, size_to_reserve_at_beginning)) return MZ_FALSE;...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
339,347,347,901,967,430,000,000,000,000,000,000,000
27
Make line_no with too large value(2**20) invalid. Fixes #124
SAPI_API int sapi_force_http_10(TSRMLS_D) { if (sapi_module.force_http_10) { return sapi_module.force_http_10(TSRMLS_C); } else { return FAILURE; } }
0
[ "CWE-190", "CWE-79" ]
php-src
996faf964bba1aec06b153b370a7f20d3dd2bb8b
68,925,579,618,521,550,000,000,000,000,000,000,000
8
Update header handling to RFC 7230
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *yy, const BIGNUM *xx, const int p[], BN_CTX *ctx) { BIGNUM *field; int ret = 0; bn_check_top(yy); bn_check_top(xx); BN_CTX_start(ctx); if ((field = BN_CTX_get(ctx)) == NULL) goto err; if (!BN_GF2m_arr2poly(p, ...
0
[ "CWE-399" ]
openssl
f61bbf8da532038ed0eae16a9a11771f3da22d30
164,351,535,269,871,330,000,000,000,000,000,000,000
22
bn/bn_gf2m.c: avoid infinite loop wich malformed ECParamters. CVE-2015-1788 Reviewed-by: Matt Caswell <matt@openssl.org> (cherry picked from commit 4924b37ee01f71ae19c94a8934b80eeb2f677932)
static void process_respfile(FILE * rfile, int pass) { char *buffer, *p, *q, *prevarg; int bufsize, prevargsize; bufsize = prevargsize = ARG_BUF_DELTA; buffer = nasm_malloc(ARG_BUF_DELTA); prevarg = nasm_malloc(ARG_BUF_DELTA); prevarg[0] = '\0'; while (1) { /* Loop to handl...
0
[ "CWE-476" ]
nasm
e996d28c70d45008085322b442b44a9224308548
34,355,554,013,853,180,000,000,000,000,000,000,000
57
labels: Don't nil dereference if no label provided An equ without label may cause nil dereference | equ 0x100 Fixes 98578071b9d71ecaa2344dd9c185237c1765041e Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA): FoFiBase(fileA, lenA, freeFileDataA) { tables = NULL; nTables = 0; cmaps = NULL; nCmaps = 0; nameToGID = NULL; parsedOk = gFalse; faceIndex = faceIndexA; gsubFeatureTable = 0; gsubLookupList = 0; parse(); }
0
[ "CWE-125" ]
poppler
cdb7ad95f7c8fbf63ade040d8a07ec96467042fc
147,974,059,521,851,460,000,000,000,000,000,000,000
15
Fix malformed file crash in bug #85243
static inline int unix_recvq_full(struct sock const *sk) { return skb_queue_len(&sk->sk_receive_queue) > sk->sk_max_ack_backlog; }
0
[]
linux-2.6
6209344f5a3795d34b7f2c0061f49802283b6bdd
340,262,675,419,134,100,000,000,000,000,000,000,000
4
net: unix: fix inflight counting bug in garbage collector Previously I assumed that the receive queues of candidates don't change during the GC. This is only half true, nothing can be received from the queues (see comment in unix_gc()), but buffers could be added through the other half of the socket pair, which may s...
void vmxnet_tx_pkt_reset(struct VmxnetTxPkt *pkt) { int i; /* no assert, as reset can be called before tx_pkt_init */ if (!pkt) { return; } memset(&pkt->virt_hdr, 0, sizeof(pkt->virt_hdr)); g_free(pkt->vec[VMXNET_TX_PKT_L3HDR_FRAG].iov_base); pkt->vec[VMXNET_TX_PKT_L3HDR_FRAG].iov...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
316,859,718,827,483,070,000,000,000,000,000,000,000
35
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
long get_user_pages_remote(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, unsigned long nr_pages, int write, int force, struct page **pages, struct vm_area_struct **vmas) { return __get_user_pages_locked(tsk, mm, start, nr_pages, write, force, pages, vmas, NULL, false, ...
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
40,109,204,981,189,686,000,000,000,000,000,000,000
9
mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_p...
static void *conncache_add_bundle(struct conncache *connc, char *key, struct connectbundle *bundle) { return Curl_hash_add(&connc->hash, key, strlen(key), bundle); }
0
[]
curl
058f98dc3fe595f21dc26a5b9b1699e519ba5705
252,018,785,156,304,700,000,000,000,000,000,000,000
6
conncache: include the zone id in the "bundle" hashkey Make connections to two separate IPv6 zone ids create separate connections. Reported-by: Harry Sintonen Bug: https://curl.se/docs/CVE-2022-27775.html Closes #8747
void dnotify_flush(struct file *filp, fl_owner_t id) { struct dnotify_struct *dn; struct dnotify_struct **prev; struct inode *inode; inode = filp->f_path.dentry->d_inode; if (!S_ISDIR(inode->i_mode)) return; spin_lock(&inode->i_lock); prev = &inode->i_dnotify; while ((dn = *prev) != NULL) { if ((dn->dn_own...
0
[ "CWE-362" ]
linux-2.6
214b7049a7929f03bbd2786aaef04b8b79db34e2
23,930,575,374,313,706,000,000,000,000,000,000,000
22
Fix dnotify/close race We have a race between fcntl() and close() that can lead to dnotify_struct inserted into inode's list *after* the last descriptor had been gone from current->files. Since that's the only point where dnotify_struct gets evicted, we are screwed - it will stick around indefinitely. Even after str...
void AsyncConnection::_append_keepalive_or_ack(bool ack, utime_t *tp) { ldout(async_msgr->cct, 10) << __func__ << dendl; if (ack) { assert(tp); struct ceph_timespec ts; tp->encode_timeval(&ts); outcoming_bl.append(CEPH_MSGR_TAG_KEEPALIVE2_ACK); outcoming_bl.append((char*)&ts, sizeof(ts)); } el...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
145,912,698,379,054,910,000,000,000,000,000,000,000
19
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
*/ static void php_wddx_serialize_boolean(wddx_packet *packet, zval *var) { php_wddx_add_chunk(packet, Z_TYPE_P(var) == IS_TRUE ? WDDX_BOOLEAN_TRUE : WDDX_BOOLEAN_FALSE);
0
[]
php-src
366f9505a4aae98ef2f4ca39a838f628a324b746
240,501,220,368,698,100,000,000,000,000,000,000,000
4
Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization) Conflicts: ext/wddx/wddx.c
Opal::Call::parse_info (OpalConnection & connection) { char start_special_chars [] = "$"; char end_special_chars [] = "([;="; std::string l_party_name; std::string r_party_name; std::string app; if (!PIsDescendant(&connection, OpalPCSSConnection)) { remote_uri = (const char *) connection.GetRemoteP...
1
[]
ekiga
7d09807257963a4f5168a01aec1795a398746372
216,343,202,443,910,000,000,000,000,000,000,000,000
35
Validate UTF-8 strings before showing them Closes bug #653009.
static char *userauth_list(LIBSSH2_SESSION *session, const char *username, unsigned int username_len) { static const unsigned char reply_codes[3] = { SSH_MSG_USERAUTH_SUCCESS, SSH_MSG_USERAUTH_FAILURE, 0 }; /* packet_type(1) + username_len(4) + service_len(4) + service(...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
209,823,059,160,023,130,000,000,000,000,000,000,000
98
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static const struct cpumask *cpu_cpu_mask(int cpu) { return cpumask_of_node(cpu_to_node(cpu)); }
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
335,954,601,091,749,000,000,000,000,000,000,000,000
4
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
int parse_feature_request(const char *feature_list, const char *feature) { return !!parse_feature_value(feature_list, feature, NULL); }
0
[ "CWE-706" ]
git
f82a97eb9197c1e3768e72648f37ce0ca3233734
597,368,000,381,621,700,000,000,000,000,000,000
4
mingw: handle `subst`-ed "DOS drives" Over a decade ago, in 25fe217b86c (Windows: Treat Windows style path names., 2008-03-05), Git was taught to handle absolute Windows paths, i.e. paths that start with a drive letter and a colon. Unbeknownst to us, while drive letters of physical drives are limited to letters of th...
static void cm_destroy_id(struct ib_cm_id *cm_id, int err) { struct cm_id_private *cm_id_priv; struct cm_work *work; cm_id_priv = container_of(cm_id, struct cm_id_private, id); retest: spin_lock_irq(&cm_id_priv->lock); switch (cm_id->state) { case IB_CM_LISTEN: cm_id->state = IB_CM_IDLE; spin_unlock_irq(&cm_...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
282,478,753,095,939,070,000,000,000,000,000,000,000
85
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
static void arm_opcode_parse(ArmOpcode *ao, const char *str) { int i; memset (ao, 0, sizeof (ArmOpcode)); if (strlen (str) + 1 >= sizeof (ao->op)) { return; } strncpy (ao->op, str, sizeof (ao->op)-1); strcpy (ao->opstr, ao->op); ao->a[0] = strchr (ao->op, ' '); for (i=0; i<15; i++) { if (ao->a[i]) { *ao-...
0
[ "CWE-125", "CWE-787" ]
radare2
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
317,098,040,283,117,900,000,000,000,000,000,000,000
27
Fix #12417/#12418 (arm assembler heap overflows)
void Track::Info::Clear() { delete[] nameAsUTF8; nameAsUTF8 = NULL; delete[] language; language = NULL; delete[] codecId; codecId = NULL; delete[] codecPrivate; codecPrivate = NULL; codecPrivateSize = 0; delete[] codecNameAsUTF8; codecNameAsUTF8 = NULL; }
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
256,452,611,544,354,500,000,000,000,000,000,000,000
17
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
static inline void io_ring_clear_wakeup_flag(struct io_ring_ctx *ctx) { spin_lock_irq(&ctx->completion_lock); ctx->rings->sq_flags &= ~IORING_SQ_NEED_WAKEUP; spin_unlock_irq(&ctx->completion_lock); }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
313,516,476,545,904,270,000,000,000,000,000,000,000
6
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static const char *wsgi_add_daemon_process(cmd_parms *cmd, void *mconfig, const char *args) { const char *name = NULL; const char *user = NULL; const char *group = NULL; int processes = 1; int multiprocess = 0; int threads = 15; long umask = -1; ...
0
[ "CWE-254" ]
mod_wsgi
545354a80b9cc20d8b6916ca30542eab36c3b8bd
200,949,023,955,942,500,000,000,000,000,000,000,000
508
When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state.
bool Filter::setupRetry() { // If we responded before the request was complete we don't bother doing a retry. This may not // catch certain cases where we are in full streaming mode and we have a connect timeout or an // overflow of some kind. However, in many cases deployments will use the buffer filter before ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
74,472,387,479,135,980,000,000,000,000,000,000,000
16
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...
int __weak efi_capsule_setup_info(struct capsule_info *cap_info, void *kbuff, size_t hdr_bytes) { /* Only process data block that is larger than efi header size */ if (hdr_bytes < sizeof(efi_capsule_header_t)) return 0; memcpy(&cap_info->header, kbuff, sizeof(cap_info->header)); cap_info->total_size = cap_...
0
[ "CWE-416", "CWE-200" ]
linux
9cb636b5f6a8cc6d1b50809ec8f8d33ae0c84c95
50,886,843,605,542,940,000,000,000,000,000,000,000
12
efi: capsule-loader: Fix use-after-free in efi_capsule_write A race condition may occur if the user calls close() on another thread during a write() operation on the device node of the efi capsule. This is a race condition that occurs between the efi_capsule_write() and efi_capsule_flush() functions of efi_capsule_fo...
static void radix_count(const RCCMPEntry *data, int size, int buckets[RADIX_PASSES][NBUCKETS]) { int i, j; memset(buckets, 0, sizeof(buckets[0][0]) * RADIX_PASSES * NBUCKETS); for (i = 0; i < size; i++) { int v = data[i].value; for (j = 0; j < RADIX_PASSES; j++) { buckets[j][get_...
0
[ "CWE-703" ]
FFmpeg
f1caaa1c61310beba705957e6366f0392a0b005b
311,494,838,735,493,000,000,000,000,000,000,000,000
19
dnxhdenc: fix mb_rc size Fixes out of array access with RC_VARIANCE set to 0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
mm_skey_query(void *ctx, char **name, char **infotxt, u_int *numprompts, char ***prompts, u_int **echo_on) { Buffer m; u_int success; char *challenge; debug3("%s: entering", __func__); buffer_init(&m); mm_request_send(pmonitor->m_recvfd, MONITOR_REQ_SKEYQUERY, &m); mm_request_receive_expect(pmonitor->m_rec...
0
[ "CWE-20", "CWE-200" ]
openssh-portable
d4697fe9a28dab7255c60433e4dd23cf7fce8a8b
238,472,443,092,233,020,000,000,000,000,000,000,000
34
Don't resend username to PAM; it already has it. Pointed out by Moritz Jodeit; ok dtucker@
~SubgraphGuard() { // If tht original status was OK, recover the boolean flag. if (status_ == kTfLiteOk) { *is_subgraph_in_use_ = false; } }
0
[ "CWE-703", "CWE-835" ]
tensorflow
c6173f5fe66cdbab74f4f869311fe6aae2ba35f4
76,690,318,282,221,970,000,000,000,000,000,000,000
6
TFLite: Error out when the graph has a recurion. Recursion is currently unsupported. PiperOrigin-RevId: 371708957 Change-Id: I8dfad0d85cbfe08e39ae8ea7bad21254ddee5003
static int pragmaVtabRowid(sqlite3_vtab_cursor *pVtabCursor, sqlite_int64 *p){ PragmaVtabCursor *pCsr = (PragmaVtabCursor*)pVtabCursor; *p = pCsr->iRowid; return SQLITE_OK; }
0
[ "CWE-754" ]
sqlite
ebd70eedd5d6e6a890a670b5ee874a5eae86b4dd
188,392,023,494,509,250,000,000,000,000,000,000
5
Fix the NOT NULL verification logic in PRAGMA integrity_check so that it works for generated columns whose value is the result of a comparison operator. Ticket [bd8c280671ba44a7] FossilOrigin-Name: f3b39c71b88cb6721f443de56cdce4c08252453a5e340b00a2bd88dc10c42400
static void unicode_domain_string(char **pbcc_area, struct cifs_ses *ses, const struct nls_table *nls_cp) { char *bcc_ptr = *pbcc_area; int bytes_ret = 0; /* copy domain */ if (ses->domainName == NULL) { /* Sending null domain better than using a bogus domain name (as we did briefly in 2.6.18) since ser...
0
[ "CWE-476" ]
linux
cabfb3680f78981d26c078a26e5c748531257ebb
67,839,874,356,975,390,000,000,000,000,000,000,000
21
CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
log_allocator (void *pointer, size_t size) { void *result = realloc (pointer, (size_t)size); return_val_if_fail (!size || result != NULL, NULL); return result; }
0
[ "CWE-787" ]
p11-kit
2617f3ef888e103324a28811886b99ed0a56346d
114,445,256,420,267,000,000,000,000,000,000,000,000
7
Check attribute length against buffer size If an attribute's length does not match the length of the byte array inside it, one length was used for allocation, and the other was used for memcpy. This additional check will instead return an error on malformed messages.
l2tp_framing_cap_print(netdissect_options *ndo, const u_char *dat, u_int length) { const uint32_t *ptr = (const uint32_t *)dat; if (length < 4) { ND_PRINT((ndo, "AVP too short")); return; } if (EXTRACT_32BITS(ptr) & L2TP_FRAMING_CAP_ASYNC_MASK) { ND_PRINT((ndo, "A")); } if (EXTRACT_32BITS(ptr) & L2TP_FRA...
0
[ "CWE-125", "CWE-787" ]
tcpdump
cc4a7391c616be7a64ed65742ef9ed3f106eb165
55,366,369,427,050,720,000,000,000,000,000,000,000
15
CVE-2017-13006/L2TP: Check whether an AVP's content exceeds the AVP length. It's not good enough to check whether all the data specified by the AVP length was captured - you also have to check whether that length is large enough for all the required data in the AVP. This fixes a buffer over-read discovered by Yannick...
static int bond_xmit_activebackup(struct sk_buff *skb, struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); int res = 1; read_lock(&bond->curr_slave_lock); if (bond->curr_active_slave) res = bond_dev_queue_xmit(bond, skb, bond->curr_active_slave->dev); if (res) /* no suitable inte...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
103,843,484,564,885,990,000,000,000,000,000,000,000
19
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...
void zend_exception_restore(TSRMLS_D) /* {{{ */ { if (EG(prev_exception)) { if (EG(exception)) { zend_exception_set_previous(EG(exception), EG(prev_exception) TSRMLS_CC); } else { EG(exception) = EG(prev_exception); } EG(prev_exception) = NULL; } }
0
[]
php-src
a894a8155fab068d68a04bf181dbaddfa01ccbb0
65,940,455,749,340,380,000,000,000,000,000,000,000
11
More fixes for bug #69152
void msPostGISCloseConnection(void *pgconn) { PQfinish((PGconn*)pgconn); }
0
[ "CWE-89" ]
mapserver
3a10f6b829297dae63492a8c63385044bc6953ed
28,220,223,794,766,830,000,000,000,000,000,000,000
4
Fix potential SQL Injection with postgis TIME filters (#4834)
static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a, union iwreq_data *wrqu, char *b) { struct adapter *padapter = rtw_netdev_priv(dev); enum ndis_802_11_network_infra networkType; int ret = 0; if (!rtw_pwr_wakeup(padapter)) { ret = -EPERM; goto exit; } if (!padapter->hw_init_...
0
[ "CWE-787" ]
linux
74b6b20df8cfe90ada777d621b54c32e69e27cd7
121,251,049,267,659,000,000,000,000,000,000,000,000
47
staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan() This code has a check to prevent read overflow but it needs another check to prevent writing beyond the end of the ->ssid[] array. Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16") Signed-off-by: Dan Carpenter <dan.carpenter@o...
__poll_t dccp_poll(struct file *file, struct socket *sock, poll_table *wait) { __poll_t mask; struct sock *sk = sock->sk; sock_poll_wait(file, sk_sleep(sk), wait); if (sk->sk_state == DCCP_LISTEN) return inet_csk_listen_poll(sk); /* Socket is not locked. We are protected from async events by poll ...
0
[ "CWE-476" ]
linux
67f93df79aeefc3add4e4b31a752600f834236e2
17,424,952,988,077,467,000,000,000,000,000,000,000
47
dccp: check sk for closed state in dccp_sendmsg() dccp_disconnect() sets 'dp->dccps_hc_tx_ccid' tx handler to NULL, therefore if DCCP socket is disconnected and dccp_sendmsg() is called after it, it will cause a NULL pointer dereference in dccp_write_xmit(). This crash and the reproducer was reported by syzbot. Looks...
__releases(dentry->d_inode->i_lock) { struct inode *inode = dentry->d_inode; if (inode) { __d_clear_type_and_inode(dentry); hlist_del_init(&dentry->d_u.d_alias); spin_unlock(&dentry->d_lock); spin_unlock(&inode->i_lock); if (!inode->i_nlink) fsnotify_inoderemove(inode); if (dentry->d_op && dentry->d_o...
0
[ "CWE-401", "CWE-254" ]
linux
cde93be45a8a90d8c264c776fab63487b5038a65
159,269,824,918,549,800,000,000,000,000,000,000,000
18
dcache: Handle escaped paths in prepend_path A rename can result in a dentry that by walking up d_parent will never reach it's mnt_root. For lack of a better term I call this an escaped path. prepend_path is called by four different functions __d_path, d_absolute_path, d_path, and getcwd. __d_path only wants to see...
cancel_job(cupsd_client_t *con, /* I - Client connection */ ipp_attribute_t *uri) /* I - Job or Printer URI */ { ipp_attribute_t *attr; /* Current attribute */ int jobid; /* Job ID */ char scheme[HTTP_MAX_URI], /* Scheme portion of URI */ username[HTTP_MAX_URI], /* Username portion of URI */ host[HT...
0
[ "CWE-20" ]
cups
49fa4983f25b64ec29d548ffa3b9782426007df3
292,285,410,093,507,540,000,000,000,000,000,000,000
200
DBUS notifications could crash the scheduler (Issue #5143) - scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
u32 gf_base16_encode(u8 *_in, u32 inSize, u8 *_out, u32 outSize) { u32 i = 0; unsigned char *in = (unsigned char *)_in; unsigned char *out = (unsigned char *)_out; if (outSize < (inSize * 2)+1) return 0; for (i=0; i<inSize; i++) { out[2*i] = base_16[((in[i] & 0xf0) >> 4)]; out[2*i+1] = base_16[(in[i] & 0x0f)...
1
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
306,556,941,486,243,120,000,000,000,000,000,000,000
16
fixed #2138
static inline void ept_sync_global(void) { __invept(VMX_EPT_EXTENT_GLOBAL, 0, 0); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
261,741,147,211,213,660,000,000,000,000,000,000,000
4
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
get_current_codepage(void) { return (-1);/* Unknown */ }
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
98,068,402,455,147,500,000,000,000,000,000,000,000
4
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
JBIG2SymbolDict::JBIG2SymbolDict(unsigned int segNumA, unsigned int sizeA) : JBIG2Segment(segNumA) { ok = true; size = sizeA; if (size != 0) { bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(size, sizeof(JBIG2Bitmap *)); if (!bitmaps) { ok = false; size = 0; ...
0
[ "CWE-476", "CWE-190" ]
poppler
27354e9d9696ee2bc063910a6c9a6b27c5184a52
128,637,808,315,890,470,000,000,000,000,000,000,000
19
JBIG2Stream: Fix crash on broken file https://github.com/jeffssh/CVE-2021-30860 Thanks to David Warren for the heads up
local void send_all_trees(s, lcodes, dcodes, blcodes) deflate_state *s; int lcodes, dcodes, blcodes; /* number of codes for each tree */ { int rank; /* index in bl_order */ Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); Assert (lcodes <= L_CODES && dco...
0
[ "CWE-284", "CWE-787" ]
zlib
5c44459c3b28a9bd3283aaceab7c615f8020c531
155,394,774,155,508,980,000,000,000,000,000,000,000
25
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...
mrb_io_set_sync(mrb_state *mrb, mrb_value self) { struct mrb_io *fptr; mrb_bool b; fptr = io_get_open_fptr(mrb, self); mrb_get_args(mrb, "b", &b); fptr->sync = b; return mrb_bool_value(b); }
0
[ "CWE-416", "CWE-787" ]
mruby
b51b21fc63c9805862322551387d9036f2b63433
162,074,137,787,972,430,000,000,000,000,000,000,000
10
Fix `use after free in File#initilialize_copy`; fix #4001 The bug and the fix were reported by https://hackerone.com/pnoltof
static GPtrArray *amstar_build_argv( application_argument_t *argument, int level, int command, FILE *mesgstream) { char *dirname; char *fsname; char levelstr[NUM_STR_SIZE+7]; GPtrArray *argv_ptr = g_ptr_array_new(); char *s; char *tardumpfile; GS...
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
48,791,925,058,825,090,000,000,000,000,000,000,000
200
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
static char *ttxt_parse_string(char *str, Bool strip_lines) { u32 i=0; u32 k=0; u32 len = (u32) strlen(str); u32 state = 0; if (!strip_lines) { for (i=0; i<len; i++) { if ((str[i] == '\r') && (str[i+1] == '\n')) { i++; } str[k] = str[i]; k++; } str[k]=0; return str; } if (str[0]!='\'') ...
0
[ "CWE-276" ]
gpac
96699aabae042f8f55cf8a85fa5758e3db752bae
310,184,368,170,950,340,000,000,000,000,000,000,000
47
fixed #2061
static void set_status(VirtIODevice *vdev, uint8_t status) { VirtIOSerial *vser; VirtIOSerialPort *port; vser = VIRTIO_SERIAL(vdev); port = find_port_by_id(vser, 0); if (port && !use_multiport(port->vser) && (status & VIRTIO_CONFIG_S_DRIVER_OK)) { /* * Non-multiport guests...
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
78,550,858,098,091,350,000,000,000,000,000,000,000
22
virtio-serial: fix ANY_LAYOUT Don't assume a specific layout for control messages. Required by virtio 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
DLLIMPORT int cfg_setcomment(cfg_t *cfg, const char *name, char *comment) { return cfg_opt_setcomment(cfg_getopt(cfg, name), comment); }
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
312,298,339,906,102,980,000,000,000,000,000,000,000
4
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
SYSCALL_DEFINE3(recvmsg, int, fd, struct msghdr __user *, msg, unsigned int, flags) { if (flags & MSG_CMSG_COMPAT) return -EINVAL; return __sys_recvmsg(fd, msg, flags); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
238,711,626,246,032,460,000,000,000,000,000,000,000
7
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...
append_wild(char *to, char *end, const char *wild) { end-=5; /* Some extra */ if (wild && wild[0]) { to=strmov(to," like '"); while (*wild && to < end) { if (*wild == '\\' || *wild == '\'') *to++='\\'; *to++= *wild++; } if (*wild) /* Too small buffer */ *to++='%'; ...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
306,448,946,741,118,920,000,000,000,000,000,000,000
18
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
static void mysql_close_memory(MYSQL *mysql) { free(mysql->host_info); free(mysql->host); free(mysql->user); free(mysql->passwd); free(mysql->db); free(mysql->unix_socket); free(mysql->server_version); mysql->host_info= mysql->host= mysql->unix_socket= mysql->server_version=mysql->us...
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
243,354,570,438,748,950,000,000,000,000,000,000,000
12
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
static void bnx2x_clear_func_ilt(struct bnx2x *bp, u32 func) { u32 i, base = FUNC_ILT_BASE(func); for (i = base; i < base + ILT_PER_FUNC; i++) bnx2x_ilt_wr(bp, i, 0); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
161,324,688,474,493,150,000,000,000,000,000,000,000
6
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static double mp_arg(_cimg_math_parser& mp) { const int _ind = (int)_mp_arg(4); const unsigned int nb_args = (unsigned int)mp.opcode[2] - 4, ind = _ind<0?_ind + nb_args:(unsigned int)_ind, siz = (unsigned int)mp.opcode[3]; if (siz>0) { if (ind>=nb_a...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
140,477,801,514,474,940,000,000,000,000,000,000,000
14
Fix other issues in 'CImg<T>::load_bmp()'.
ConnStateData::clientParseRequests() { bool parsed_req = false; debugs(33, 5, HERE << clientConnection << ": attempting to parse"); // Loop while we have read bytes that are not needed for producing the body // On errors, bodyPipe may become nil, but readMore will be cleared while (!inBuf.isEmpty(...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
124,967,477,804,669,900,000,000,000,000,000,000,000
69
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
TEST_F(EncryptionUtilTest, aes_with_iv_test_by_case) { std::string case_1 = "XbJgw1AxBNwZZPpvzPtWyg=="; // base64 for encrypted "hello, doris" std::string source_1 = "hello, doris"; std::string case_2 = "gpKcO/iwgeRCIWBQdkpAkQ=="; // base64 for encrypted "doris test" std::string source_2 = "doris test";...
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
192,943,938,715,022,860,000,000,000,000,000,000,000
43
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
static void bnx2x_attn_int(struct bnx2x *bp) { /* read local copy of bits */ u32 attn_bits = le32_to_cpu(bp->def_status_blk->atten_status_block. attn_bits); u32 attn_ack = le32_to_cpu(bp->def_status_blk->atten_status_block. attn_bits_ack); u32 attn_state = bp->attn_state; /* look for changed bits ...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
33,334,899,728,609,400,000,000,000,000,000,000,000
27
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static void vmx_compute_secondary_exec_control(struct vcpu_vmx *vmx) { struct kvm_vcpu *vcpu = &vmx->vcpu; u32 exec_control = vmcs_config.cpu_based_2nd_exec_ctrl; if (vmx_pt_mode_is_system()) exec_control &= ~(SECONDARY_EXEC_PT_USE_GPA | SECONDARY_EXEC_PT_CONCEAL_VMX); if (!cpu_need_virtualize_apic_accesses(vcp...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
197,864,012,983,609,560,000,000,000,000,000,000,000
72
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
OJPEGSubsamplingCorrect(TIFF* tif) { static const char module[]="OJPEGSubsamplingCorrect"; OJPEGState* sp=(OJPEGState*)tif->tif_data; uint8 mh; uint8 mv; _TIFFFillStriles( tif ); assert(sp->subsamplingcorrect_done==0); if ((tif->tif_dir.td_samplesperpixel!=3) || ((tif->tif_dir.td_photometric!=PHO...
0
[ "CWE-369" ]
libtiff
43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec
338,305,434,788,699,580,000,000,000,000,000,000,000
53
* libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues. Reported by Agostino Sarubbo. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611
int ext4_force_commit(struct super_block *sb) { journal_t *journal; if (sb_rdonly(sb)) return 0; journal = EXT4_SB(sb)->s_journal; return ext4_journal_force_commit(journal); }
0
[]
linux
a45403b51582a87872927a3e0fc0a389c26867f1
35,151,325,169,493,165,000,000,000,000,000,000,000
10
ext4: always initialize the crc32c checksum driver The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mou...
m4_define (struct obstack *obs, int argc, token_data **argv) { define_macro (argc, argv, SYMBOL_INSERT); }
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
111,580,215,494,698,230,000,000,000,000,000,000,000
4
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
find_check_match(struct xt_entry_match *m, struct xt_mtchk_param *par) { struct xt_match *match; int ret; match = xt_request_find_match(NFPROTO_IPV6, m->u.user.name, m->u.user.revision); if (IS_ERR(match)) { duprintf("find_check_match: `%s' not found\n", m->u.user.name); return PTR_ERR(match); } m-...
0
[ "CWE-200" ]
linux-2.6
6a8ab060779779de8aea92ce3337ca348f973f54
181,923,062,385,264,080,000,000,000,000,000,000,000
22
ipv6: netfilter: ip6_tables: fix infoleak to userspace Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sen...
njs_string_prototype_to_utf8(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t unused) { njs_int_t ret; njs_slice_prop_t slice; njs_string_prop_t string; ret = njs_string_object_validate(vm, njs_argument(args, 0)); if (njs_slow_path(ret != NJS_OK)) { return ret;...
0
[]
njs
36f04a3178fcb6da8513cc3dbf35215c2a581b3f
164,826,846,594,364,760,000,000,000,000,000,000,000
24
Fixed String.prototype.replace() with byte strings. This closes #522 issue on Github.
GF_Err stvi_Read(GF_Box *s, GF_BitStream *bs) { GF_StereoVideoBox *ptr = (GF_StereoVideoBox *)s; ISOM_DECREASE_SIZE(ptr, 12); gf_bs_read_int(bs, 30); ptr->single_view_allowed = gf_bs_read_int(bs, 2); ptr->stereo_scheme = gf_bs_read_u32(bs); ptr->sit_len = gf_bs_read_u32(bs); ISOM_DECREASE_SIZE(ptr, ptr->sit_le...
0
[ "CWE-416" ]
gpac
6063b1a011c3f80cee25daade18154e15e4c058c
336,816,136,702,333,400,000,000,000,000,000,000,000
18
fix UAF in audio_sample_entry_Read (#1440)
void Statement::Work_Prepare(napi_env e, void* data) { STATEMENT_INIT(PrepareBaton); // In case preparing fails, we use a mutex to make sure we get the associated // error message. STATEMENT_MUTEX(mtx); sqlite3_mutex_enter(mtx); stmt->status = sqlite3_prepare_v2( baton->db->_handle, ...
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
135,352,262,893,715,220,000,000,000,000,000,000,000
23
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
static int nfs_init_server_rpcclient(struct nfs_server *server, rpc_authflavor_t pseudoflavour) { struct nfs_client *clp = server->nfs_client; server->client = rpc_clone_client(clp->cl_rpcclient); if (IS_ERR(server->client)) { dprintk("%s: couldn't create rpc_client!\n", __FUNCTION__); return PTR_ERR(server->cl...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
249,543,279,995,511,920,000,000,000,000,000,000,000
29
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
unsigned int rijndaelSetupEncrypt(u32 *rk, const u8 *key, size_t keybits) { int i = 0; u32 temp; rk[0] = GETU32(key ); rk[1] = GETU32(key + 4); rk[2] = GETU32(key + 8); rk[3] = GETU32(key + 12); if (keybits == 128) { for (;;) { temp = rk[3]; rk[4] = rk[0] ^ (Te4[(temp...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
301,126,792,197,514,340,000,000,000,000,000,000,000
83
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
_rsvg_svg_free (RsvgNode * self) { RsvgNodeSvg *svg = (RsvgNodeSvg *) self; if (svg->atts) { rsvg_property_bag_free (svg->atts); svg->atts = NULL; } _rsvg_node_free (self); }
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
201,800,432,695,719,040,000,000,000,000,000,000,000
11
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static void ext4_write_super(struct super_block *sb) { if (EXT4_SB(sb)->s_journal) { if (mutex_trylock(&sb->s_lock) != 0) BUG(); sb->s_dirt = 0; } else { ext4_commit_super(sb, EXT4_SB(sb)->s_es, 1); } }
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
212,145,228,731,831,500,000,000,000,000,000,000,000
10
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
static unsigned int rxclk_rx_s_carrier(struct cx23885_dev *dev, unsigned int freq, u16 *divider) { *divider = carrier_freq_to_clock_divider(freq); cx23888_ir_write4(dev, CX23888_IR_RXCLK_REG, *divider); return clock_divider_to_carrier_freq(*divider); }
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
252,823,227,433,080,800,000,000,000,000,000,000,000
8
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
inline bool HasOverlappingRange( const SNPRange_t &range, const std::map<SNPRange_t,T,L> &map ) { auto l = map.lower_bound( range ); if ( l != map.end() ) { Assert( l->first.m_nBegin >= range.m_nBegin ); if ( l->first.m_nBegin < range.m_nEnd ) return true; } auto u = map.upper_bound( range ); if ( u != map...
0
[ "CWE-787" ]
GameNetworkingSockets
e0c86dcb9139771db3db0cfdb1fb8bef0af19c43
49,366,110,359,332,700,000,000,000,000,000,000,000
19
Drop unreliable segments with weird offset/size. And be more deliberate about limits of unreliable message/segment sizes.
struct razer_report razer_chroma_standard_get_led_brightness(unsigned char variable_storage, unsigned char led_id) { struct razer_report report = get_razer_report(0x03, 0x83, 0x03); report.arguments[0] = variable_storage; report.arguments[1] = led_id; return report; }
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
108,400,150,947,145,490,000,000,000,000,000,000,000
8
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
int pn_ssl_domain_set_protocols(pn_ssl_domain_t *domain, const char *protocols) { static const struct { const char *name; const long option; } protocol_options[] = { {"TLSv1", SSL_OP_NO_TLSv1}, {"TLSv1.1", SSL_OP_NO_TLSv1_1}, {"TLSv1.2", SSL_OP_NO_TLSv1_2}, #ifdef SSL_OP_NO_TLSv1_3 {"TLS...
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
205,586,807,761,787,660,000,000,000,000,000,000,000
59
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
static bool __sock_filter_check_size(int off, int size, struct bpf_insn_access_aux *info) { const int size_default = sizeof(__u32); switch (off) { case bpf_ctx_range(struct bpf_sock, src_ip4): case bpf_ctx_range_till(struct bpf_sock, src_ip6[0], src_ip6[3]): bpf_ctx_record_field_size(info, size_default)...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
245,305,914,074,309,440,000,000,000,000,000,000,000
14
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
static void TIFFIgnoreTags(TIFF *tiff) { char *q; const char *p, *tags; Image *image; register ssize_t i; size_t count; TIFFFieldInfo *ignore; if (TIFFGetReadProc(tiff) != TIFFReadBlob) return; image=(Image *)TIFFClientdata(tiff); tags=GetImageArtifact(image,"tiff:...
0
[ "CWE-125" ]
ImageMagick
803bc34ebe023f209f745baf8a112610ff77cc8c
255,549,317,588,216,200,000,000,000,000,000,000,000
67
Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team)
ves_icall_get_enum_info (MonoReflectionType *type, MonoEnumInfo *info) { MonoDomain *domain = mono_object_domain (type); MonoClass *enumc = mono_class_from_mono_type (type->type); guint j = 0, nvalues, crow; gpointer iter; MonoClassField *field; MONO_ARCH_SAVE_REGS; MONO_STRUCT_SETREF (info, utype, mono_type_...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
168,666,928,803,113,970,000,000,000,000,000,000,000
54
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
alist_clear(alist_T *al) { if (check_arglist_locked() == FAIL) return; while (--al->al_ga.ga_len >= 0) vim_free(AARGLIST(al)[al->al_ga.ga_len].ae_fname); ga_clear(&al->al_ga); }
0
[ "CWE-416", "CWE-125" ]
vim
6f98371532fcff911b462d51bc64f2ce8a6ae682
38,170,709,203,302,945,000,000,000,000,000,000,000
8
patch 8.2.3884: crash when clearing the argument list while using it Problem: Crash when clearing the argument list while using it. Solution: Lock the argument list for ":all".
i40e_status i40e_get_partition_bw_setting(struct i40e_pf *pf) { i40e_status status; bool min_valid, max_valid; u32 max_bw, min_bw; status = i40e_read_bw_from_alt_ram(&pf->hw, &max_bw, &min_bw, &min_valid, &max_valid); if (!status) { if (min_valid) pf->min_bw = min_bw; if (max_valid) pf->max_bw ...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
128,729,591,297,004,990,000,000,000,000,000,000,000
18
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static void ldap_decode_attrib(TALLOC_CTX *mem_ctx, struct asn1_data *data, struct ldb_message_element *attrib) { asn1_start_tag(data, ASN1_SEQUENCE(0)); asn1_read_OctetString_talloc(mem_ctx, data, &attrib->name); asn1_start_tag(data, ASN1_SET); while (asn1_peek_tag(data, ASN1_OCTET_STRING)) { DATA_BLOB...
1
[ "CWE-399" ]
samba
530d50a1abdcdf4d1775652d4c456c1274d83d8d
260,855,500,362,538,460,000,000,000,000,000,000,000
15
CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): F...
ldns_rdf_set_data(ldns_rdf *rd, void *data) { /* only copy the pointer */ assert(rd != NULL); rd->_data = data; }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
237,404,677,121,808,880,000,000,000,000,000,000,000
6
CAA and URI
static int parse_monitor_flags(struct nlattr *nla, u32 *mntrflags) { struct nlattr *flags[NL80211_MNTR_FLAG_MAX + 1]; int flag; *mntrflags = 0; if (!nla) return -EINVAL; if (nla_parse_nested_deprecated(flags, NL80211_MNTR_FLAG_MAX, nla, mntr_flags_policy, NULL)) return -EINVAL; for (flag = 1; flag <= NL80...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
45,188,546,428,358,620,000,000,000,000,000,000,000
21
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
cv::Mat _cimg2cvmat() const { if (is_empty()) throw CImgInstanceException(_cimg_instance "_cimg2cvmat() : Instance image is empty.", cimg_instance); if (_spectrum==2) throw CImgInstanceException(_cimg_instance ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
295,815,119,935,776,440,000,000,000,000,000,000,000
34
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
GF_Err trex_box_read(GF_Box *s, GF_BitStream *bs) { GF_TrackExtendsBox *ptr = (GF_TrackExtendsBox *)s; ISOM_DECREASE_SIZE(ptr, 20); ptr->trackID = gf_bs_read_u32(bs); ptr->def_sample_desc_index = gf_bs_read_u32(bs); ptr->def_sample_duration = gf_bs_read_u32(bs); ptr->def_sample_size = gf_bs_read_u32(bs); ptr->...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
193,171,986,367,599,230,000,000,000,000,000,000,000
12
fixed #1587
static int rds_ib_conn_info_visitor(struct rds_connection *conn, void *buffer) { struct rds_info_rdma_connection *iinfo = buffer; struct rds_ib_connection *ic; /* We will only ever look at IB transports */ if (conn->c_trans != &rds_ib_transport) return 0; iinfo->src_addr = conn->c_laddr; iinfo->dst_ad...
0
[ "CWE-399", "CWE-476" ]
linux
c2349758acf1874e4c2b93fe41d072336f1a31d0
167,026,832,931,986,900,000,000,000,000,000,000,000
33
rds: prevent dereference of a NULL device Binding might result in a NULL device, which is dereferenced causing this BUG: [ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097 4 [ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110 [ 1317.263315] PGD 418bcb067 PUD 3ceb...
TEST(SnappyMessageCompressor, Fidelity) { auto testMessage = buildMessage(); checkFidelity(testMessage, std::make_unique<SnappyMessageCompressor>()); }
0
[ "CWE-697" ]
mongo
1411cf602a21e45a5ef42b6869c480eb420976ee
142,191,464,867,356,390,000,000,000,000,000,000,000
4
SERVER-43751 Recompute compressor manager message parameters
ebb_ews_get_x_attribute (EContact *contact, const gchar *xname) { EVCardAttribute *attr; GList *values = NULL; const gchar *value; g_return_val_if_fail (E_IS_CONTACT (contact), NULL); g_return_val_if_fail (xname != NULL, NULL); attr = e_vcard_get_attribute (E_VCARD (contact), xname); if (!attr) return NU...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
56,388,976,910,957,330,000,000,000,000,000,000,000
25
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
do_open_lookup(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_open *open, struct svc_fh **resfh) { struct svc_fh *current_fh = &cstate->current_fh; int accmode; __be32 status; *resfh = kmalloc(sizeof(struct svc_fh), GFP_KERNEL); if (!*resfh) return nfserr_jukebox; fh_init(*resfh, NFS...
0
[ "CWE-20", "CWE-129" ]
linux
b550a32e60a4941994b437a8d662432a486235a5
263,906,496,738,619,500,000,000,000,000,000,000,000
77
nfsd: fix undefined behavior in nfsd4_layout_verify UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34 shift exponent 128 is too large for 32-bit type 'int' Depending on compiler+architecture, this may cause the check for layout_type to succeed for overly large values (which seems to be the case with amd64)...
int do_dtls1_write(SSL *s, int type, const unsigned char *buf, unsigned int len, int create_empty_fragment) { unsigned char *p,*pseq; int i,mac_size,clear=0; int prefix_len = 0; SSL3_RECORD *wr; SSL3_BUFFER *wb; SSL_SESSION *sess; int bs; /* first check if there is a SSL3_BUFFER still being written * out. ...
0
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
64,713,679,818,730,300,000,000,000,000,000,000,000
207
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
virtual cond_result eq_cmp_result() const { return COND_OK; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
84,353,153,177,332,630,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
QPDFPageObjectHelper::rotatePage(int angle, bool relative) { this->oh.rotatePage(angle, relative); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
91,689,518,408,508,410,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...