func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
smb2_is_network_name_deleted(char *buf, struct TCP_Server_Info *server)
{
struct smb2_hdr *shdr = (struct smb2_hdr *)buf;
struct list_head *tmp, *tmp1;
struct cifs_ses *ses;
struct cifs_tcon *tcon;
if (shdr->Status != STATUS_NETWORK_NAME_DELETED)
return;
spin_lock(&cifs_tcp_ses_lock);
list_for_each(tmp, &ser... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 1,473,817,569,389,913,200,000,000,000,000,000,000 | 26 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
static int index_reuc_insert(
git_index *index,
git_index_reuc_entry *reuc)
{
int res;
assert(index && reuc && reuc->path != NULL);
assert(git_vector_is_sorted(&index->reuc));
res = git_vector_insert_sorted(&index->reuc, reuc, &index_reuc_on_dup);
return res == GIT_EEXISTS ? 0 : res;
} | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 33,697,603,171,614,013,000,000,000,000,000,000,000 | 12 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
set_display_name (GdmSession *self,
const char *name)
{
g_free (self->priv->display_name);
self->priv->display_name = g_strdup (name);
} | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 284,685,463,034,961,300,000,000,000,000,000,000,000 | 6 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
TEST_F(GrpcHealthCheckerImplTest, SuccessWithAdditionalHeaders) {
const std::string ENVOY_OK_KEY = "x-envoy-ok";
const std::string ENVOY_OK_VAL = "ok";
const std::string ENVOY_COOL_KEY = "x-envoy-cool";
const std::string ENVOY_COOL_VAL = "cool";
const std::string ENVOY_AWESOME_KEY = "x-envoy-awesome";
const... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 290,124,540,420,718,800,000,000,000,000,000,000,000 | 119 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static inline void __init of_unittest_overlay(void) { } | 0 | [
"CWE-401"
] | linux | e13de8fe0d6a51341671bbe384826d527afe8d44 | 238,482,900,586,691,840,000,000,000,000,000,000,000 | 1 | of: unittest: fix memory leak in unittest_data_add
In unittest_data_add, a copy buffer is created via kmemdup. This buffer
is leaked if of_fdt_unflatten_tree fails. The release for the
unittest_data buffer is added.
Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree")
Signed-off-by: Navid ... |
sslFactory::sslFactory() :
messageFactory_(InitMessageFactory),
handShakeFactory_(InitHandShakeFactory),
serverKeyFactory_(InitServerKeyFactory),
clientKeyFactory_(InitClientKeyFactory)
{} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 65,258,515,459,468,020,000,000,000,000,000,000,000 | 6 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
_gnutls_compression_get_mem_level (gnutls_compression_method_t algorithm)
{
int ret = -1;
/* avoid prefix */
GNUTLS_COMPRESSION_ALG_LOOP (ret = p->mem_level);
return ret;
} | 0 | [
"CWE-310"
] | gnutls | 34d87a7c3f12794a3ec2305cd2fdbae152bf2a76 | 20,460,161,953,734,370,000,000,000,000,000,000,000 | 7 | (_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the
NULL OID value in the hash_algorithms array, which happens when the
input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160.
Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>. |
void sweep() FOLLY_OVERRIDE {
// if m_domNode isn't null, then he owns the m_doc. Otherwise, I own it
if (m_doc && m_domNode.isNull()) {
xmlFreeDoc(m_doc);
}
} | 0 | [
"CWE-94"
] | hhvm | 95f96e7287effe2fcdfb9a5338d1a7e4f55b083b | 327,964,563,932,780,150,000,000,000,000,000,000,000 | 6 | Fix libxml_disable_entity_loader()
This wasn't calling requestInit and setting the libxml handler no null.
So the first time an error came along it would reset the handler from
no-op to reading again.
This is a much better fix, we set our custom handler in requestInit and
when libxml_disable_entity_loader we store th... |
verify_file_table (MonoImage *image, GSList *list, int level)
{
MonoTableInfo *t = &image->tables [MONO_TABLE_FILE];
guint32 cols [MONO_FILE_SIZE];
const char *p;
guint32 i;
GHashTable *dups = g_hash_table_new (g_str_hash, g_str_equal);
for (i = 0; i < t->rows; ++i) {
mono_metadata_decode_row (t, i, cols, MONO... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 273,115,718,473,104,920,000,000,000,000,000,000,000 | 43 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
bufferedReadPixels (InputFile::Data* ifd, int scanLine1, int scanLine2)
{
//
// bufferedReadPixels reads each row of tiles that intersect the
// scan-line range (scanLine1 to scanLine2). The previous row of
// tiles is cached in order to prevent redundent tile reads when
// accessing scanlines seque... | 0 | [
"CWE-770"
] | openexr | d80f11f4f55100d007ae80a162bf257ec291612c | 278,351,605,826,100,160,000,000,000,000,000,000,000 | 218 | More efficient handling of filled channels reading tiles with scanline API (#830)
* refactor channel filling in InputFile API with tiled source
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
* handle edge-case of empty framebuffer
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
void agent_start_op(const hobject_t& oid) {
Mutex::Locker l(agent_lock);
++agent_ops;
assert(agent_oids.count(oid) == 0);
agent_oids.insert(oid);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 183,054,181,470,924,100,000,000,000,000,000,000,000 | 6 | 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 ... |
Ha_data() :ha_ptr(NULL) {} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 75,806,218,826,831,855,000,000,000,000,000,000,000 | 1 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
void ldb_msg_sort_elements(struct ldb_message *msg)
{
TYPESAFE_QSORT(msg->elements, msg->num_elements,
ldb_msg_element_compare_name);
} | 0 | [
"CWE-200"
] | samba | 7efe8182c165fbf17d2f88c173527a7a554e214b | 102,751,143,709,869,560,000,000,000,000,000,000,000 | 5 | CVE-2022-32746 ldb: Add flag to mark message element values as shared
When making a shallow copy of an ldb message, mark the message elements
of the copy as sharing their values with the message elements in the
original message.
This flag value will be heeded in the next commit.
BUG: https://bugzilla.samba.org/show_... |
static void *seq_next(struct seq_file *s, void *v, loff_t *pos)
{
(*pos)++;
return get_next(s, v);
} | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 210,865,191,180,418,930,000,000,000,000,000,000,000 | 5 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
latin_ptr2len_len(char_u *p, int size)
{
if (size < 1 || *p == NUL)
return 0;
return 1;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | f6d39c31d2177549a986d170e192d8351bd571e2 | 188,521,409,526,025,700,000,000,000,000,000,000,000 | 6 | patch 9.0.0220: invalid memory access with for loop over NULL string
Problem: Invalid memory access with for loop over NULL string.
Solution: Make sure mb_ptr2len() consistently returns zero for NUL. |
yaffscache_inode_to_obj_id_and_version(TSK_INUM_T inode, uint32_t *obj_id, uint32_t *version_num) {
*obj_id = inode & YAFFS_OBJECT_ID_MASK;
*version_num = (inode >> YAFFS_VERSION_NUM_SHIFT) & YAFFS_VERSION_NUM_MASK;
return TSK_OK;
} | 0 | [
"CWE-125",
"CWE-787"
] | sleuthkit | 459ae818fc8dae717549810150de4d191ce158f1 | 327,125,701,005,853,400,000,000,000,000,000,000,000 | 6 | Fix stack buffer overflow in yaffsfs_istat
Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str. |
static void *packet_previous_frame(struct packet_sock *po,
struct packet_ring_buffer *rb,
int status)
{
unsigned int previous = rb->head ? rb->head - 1 : rb->frame_max;
return packet_lookup_frame(po, rb, previous, status);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 171,321,745,907,189,300,000,000,000,000,000,000,000 | 7 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
socket_close(int code, Datum arg)
{
if (MyProcPort != NULL)
{
#if defined(ENABLE_GSS) || defined(ENABLE_SSPI)
#ifdef ENABLE_GSS
OM_uint32 min_s;
/* Shutdown GSSAPI layer */
if (MyProcPort->gss->ctx != GSS_C_NO_CONTEXT)
gss_delete_sec_context(&min_s, &MyProcPort->gss->ctx, NULL);
if (MyProcPort->gss->cred... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 194,466,237,108,430,250,000,000,000,000,000,000,000 | 36 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
explicit RenegotiatingServer(AsyncSSLSocket::UniquePtr socket)
: socket_(std::move(socket)) {
socket_->sslAccept(this);
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 1,893,292,786,263,640,000,000,000,000,000,000,000 | 4 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
AddVerboseIntPart(char *cp, int value, const char *units,
bool *is_zero, bool *is_before)
{
if (value == 0)
return cp;
/* first nonzero value sets is_before */
if (*is_zero)
{
*is_before = (value < 0);
value = abs(value);
}
else if (*is_before)
value = -value;
sprintf(cp, " %d %s%s", value, units, ... | 0 | [
"CWE-416",
"CWE-119"
] | postgres | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | 6,904,529,498,214,230,000,000,000,000,000,000,000 | 17 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone na... |
int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **delegated_inode)
{
struct inode *inode = dentry->d_inode;
umode_t mode = inode->i_mode;
int error;
struct timespec now;
unsigned int ia_valid = attr->ia_valid;
WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex));
if (ia_valid & (ATTR_MOD... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 23adbe12ef7d3d4195e80800ab36b37bee28cd03 | 260,573,768,368,589,970,000,000,000,000,000,000,000 | 88 | fs,userns: Change inode_capable to capable_wrt_inode_uidgid
The kernel has no concept of capabilities with respect to inodes; inodes
exist independently of namespaces. For example, inode_capable(inode,
CAP_LINUX_IMMUTABLE) would be nonsense.
This patch changes inode_capable to check for uid and gid mappings and
rena... |
static ssize_t driver_override_show(struct device *_dev,
struct device_attribute *attr, char *buf)
{
struct amba_device *dev = to_amba_device(_dev);
return sprintf(buf, "%s\n", dev->driver_override);
} | 1 | [
"CWE-415"
] | linux | 6a7228d90d42bcacfe38786756ba62762b91c20a | 293,711,624,977,032,400,000,000,000,000,000,000,000 | 7 | ARM: amba: Fix race condition with driver_override
The driver_override implementation is susceptible to a race condition
when different threads are reading vs storing a different driver
override. Add locking to avoid this race condition.
Cfr. commits 6265539776a0810b ("driver core: platform: fix race
condition with ... |
static void sg_complete(struct urb *urb)
{
struct usb_sg_request *io = urb->context;
int status = urb->status;
spin_lock(&io->lock);
/* In 2.5 we require hcds' endpoint queues not to progress after fault
* reports, until the completion callback (this!) returns. That lets
* device driver code (like this routi... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2e1c42391ff2556387b3cb6308b24f6f65619feb | 314,336,248,864,006,460,000,000,000,000,000,000,000 | 67 | USB: core: harden cdc_parse_cdc_header
Andrey Konovalov reported a possible out-of-bounds problem for the
cdc_parse_cdc_header function. He writes:
It looks like cdc_parse_cdc_header() doesn't validate buflen
before accessing buffer[1], buffer[2] and so on. The only check
present is while (buflen > 0).
So fix thi... |
static void sdma_cleanup_sde_map(struct sdma_rht_map_elem *map,
struct sdma_engine *sde)
{
unsigned int i, pow;
/* only need to check the first ctr entries for a match */
for (i = 0; i < map->ctr; i++) {
if (map->sde[i] == sde) {
memmove(&map->sde[i], &map->sde[i + 1],
(map->ctr - i - 1) * sizeof(map-... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 34b3be18a04ecdc610aae4c48e5d1b799d8689f6 | 266,312,839,866,884,400,000,000,000,000,000,000,000 | 18 | RDMA/hfi1: Prevent memory leak in sdma_init
In sdma_init if rhashtable_init fails the allocated memory for
tmp_sdma_rht should be released.
Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable")
Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com
Signed-off-by: ... |
void operator=(F fn) {
fn_ = make_adaptor(fn, fn);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 74,439,201,911,031,020,000,000,000,000,000,000,000 | 3 | Fix #122 |
void reply_ntcreate_and_X(struct smb_request *req)
{
connection_struct *conn = req->conn;
struct smb_filename *smb_fname = NULL;
char *fname = NULL;
uint32 flags;
uint32 access_mask;
uint32 file_attributes;
uint32 share_access;
uint32 create_disposition;
uint32 create_options;
uint16 root_dir_fid;
uint64_t a... | 0 | [
"CWE-189"
] | samba | b4bfcdf921aeee05c4608d7b48618fdfb1f134dc | 35,315,608,771,521,750,000,000,000,000,000,000,000 | 301 | Fix bug #10010 - Missing integer wrap protection in EA list reading can cause server to loop with DOS.
Ensure we never wrap whilst adding client provided input.
Signed-off-by: Jeremy Allison <jra@samba.org> |
COMPS_RTreeData * comps_rtree_data_create_n(COMPS_RTree *rt, char * key,
size_t keylen, void * data) {
COMPS_RTreeData * rtd;
rtd = __comps_rtree_data_create(rt, key, keylen, data);
return rtd;
} | 0 | [
"CWE-416",
"CWE-862"
] | libcomps | e3a5d056633677959ad924a51758876d415e7046 | 61,131,299,965,435,520,000,000,000,000,000,000,000 | 6 | 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. |
static enum d_walk_ret path_check_mount(void *data, struct dentry *dentry)
{
struct check_mount *info = data;
struct path path = { .mnt = info->mnt, .dentry = dentry };
if (likely(!d_mountpoint(dentry)))
return D_WALK_CONTINUE;
if (__path_is_mountpoint(&path)) {
info->mounted = 1;
return D_WALK_QUIT;
}
ret... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 118,537,366,210,325,650,000,000,000,000,000,000,000 | 13 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
template<typename t>
void _load_tiff_separate(TIFF *const tif, const uint16 samplesperpixel, const uint32 nx, const uint32 ny) {
t *buf = (t*)_TIFFmalloc(TIFFStripSize(tif));
if (buf) {
uint32 row, rowsperstrip = (uint32)-1;
TIFFGetField(tif,TIFFTAG_ROWSPERSTRIP,&rowsperstrip);
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 53,952,915,762,734,940,000,000,000,000,000,000,000 | 24 | Fix other issues in 'CImg<T>::load_bmp()'. |
dirserv_add_extrainfo(extrainfo_t *ei, const char **msg)
{
routerinfo_t *ri;
int r;
tor_assert(msg);
*msg = NULL;
ri = router_get_by_digest(ei->cache_info.identity_digest);
if (!ri) {
*msg = "No corresponding router descriptor for extra-info descriptor";
extrainfo_free(ei);
return ROUTER_BAD_EI... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 209,612,026,395,366,750,000,000,000,000,000,000,000 | 34 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
void KrecipesView::translate()
{
button0->setTitle( i18n( "Find/Edit Recipes" ) );
button1->setTitle( i18n( "Shopping List" ) );
button2->setTitle( i18n( "Ingredients" ) );
button3->setTitle( i18n( "Properties" ) );
button4->setTitle( i18n( "Units" ) );
button9->setTitle( i18n( "Preparation Methods" ) );
button5... | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 309,515,012,493,201,240,000,000,000,000,000,000,000 | 13 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
void sched_setnuma(struct task_struct *p, int nid)
{
struct rq *rq;
unsigned long flags;
bool queued, running;
rq = task_rq_lock(p, &flags);
queued = task_on_rq_queued(p);
running = task_current(rq, p);
if (queued)
dequeue_task(rq, p, DEQUEUE_SAVE);
if (running)
put_prev_task(rq, p);
p->numa_preferred_n... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 54,601,998,583,364,300,000,000,000,000,000,000,000 | 23 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon,
const unsigned char *searchName,
__u64 *inode_number,
const struct nls_table *nls_codepage, int remap)
{
int rc = 0;
TRANSACTION2_QPI_REQ *pSMB = NULL;
TRANSACTION2_QPI_RSP *pSMBr = NULL;
int name_len, bytes_returned;
__u16 params... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 277,752,955,096,781,840,000,000,000,000,000,000,000 | 91 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
static bool check_ids(u32 old_id, u32 cur_id, struct idpair *idmap)
{
unsigned int i;
for (i = 0; i < ID_MAP_SIZE; i++) {
if (!idmap[i].old) {
/* Reached an empty slot; haven't seen this id before */
idmap[i].old = old_id;
idmap[i].cur = cur_id;
return true;
}
if (idmap[i].old == old_id)
return ... | 0 | [
"CWE-20"
] | linux | c131187db2d3fa2f8bf32fdf4e9a4ef805168467 | 225,630,384,756,703,380,000,000,000,000,000,000,000 | 18 | bpf: fix branch pruning logic
when the verifier detects that register contains a runtime constant
and it's compared with another constant it will prune exploration
of the branch that is guaranteed not to be taken at runtime.
This is all correct, but malicious program may be constructed
in such a way that it always has... |
*/
static void _cimg_recursive_apply(T *data, const double filter[], const int N, const ulongT off,
const unsigned int order, const bool boundary_conditions) {
double val[4] = { 0 }; // res[n,n - 1,n - 2,n - 3,..] or res[n,n + 1,n + 2,n + 3,..]
const double
sumsq = filter[0], sum = sumsq... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 119,138,312,474,715,180,000,000,000,000,000,000,000 | 139 | . |
ogs_sbi_response_t *ogs_sbi_response_new(void)
{
ogs_sbi_response_t *response = NULL;
ogs_pool_alloc(&response_pool, &response);
ogs_expect_or_return_val(response, NULL);
memset(response, 0, sizeof(ogs_sbi_response_t));
response->http.params = ogs_hash_make();
ogs_expect_or_return_val(response... | 0 | [
"CWE-476",
"CWE-787"
] | open5gs | d919b2744cd05abae043490f0a3dd1946c1ccb8c | 4,836,234,968,129,648,000,000,000,000,000,000,000 | 15 | [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type |
ModuleSQL::ModuleSQL()
{
Dispatcher = NULL;
} | 0 | [
"CWE-476"
] | inspircd | 8745660fcdac7c1b80c94cfc0ff60928cd4dd4b7 | 43,387,929,681,488,840,000,000,000,000,000,000,000 | 4 | Initialise and deallocate the MySQL library correctly. |
void addClusterManagerPrivileges(PrivilegeVector* privileges) {
Privilege::addPrivilegeToPrivilegeVector(
privileges,
Privilege(ResourcePattern::forClusterResource(), clusterManagerRoleClusterActions));
Privilege::addPrivilegeToPrivilegeVector(
privileges,
Privilege(ResourcePatte... | 0 | [
"CWE-20"
] | mongo | cbec187266a9f902b3906ae8ccef2bbda0c5b27b | 298,169,072,330,668,400,000,000,000,000,000,000,000 | 26 | SERVER-36263 Bypassing operation validation in applyOps should require special privilege |
static u64 *io_get_tag_slot(struct io_rsrc_data *data, unsigned int idx)
{
unsigned int off = idx & IO_RSRC_TAG_TABLE_MASK;
unsigned int table_idx = idx >> IO_RSRC_TAG_TABLE_SHIFT;
return &data->tags[table_idx][off]; | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 44,516,943,884,370,290,000,000,000,000,000,000,000 | 7 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
void __fastcall TSaveSessionDialog::Init(bool CanSavePassword,
bool NotRecommendedSavingPassword, TStrings * AdditionalFolders)
{
Caption = LoadStr(SAVE_SESSION_CAPTION);
SessionNameEdit = new TEdit(this);
AddEdit(SessionNameEdit, CreateLabel(LoadStr(SAVE_SESSION_PROMPT)));
FRootFolder = LoadStr(SAV... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 316,019,003,006,097,150,000,000,000,000,000,000,000 | 46 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
jinit_read_gif(j_compress_ptr cinfo)
{
gif_source_ptr source;
/* Create module interface object */
source = (gif_source_ptr)
(*cinfo->mem->alloc_small) ((j_common_ptr)cinfo, JPOOL_IMAGE,
sizeof(gif_source_struct));
source->cinfo = cinfo; /* make back link for subrouti... | 0 | [
"CWE-369"
] | libjpeg-turbo | 1719d12e51641cce5c77e259516649ba5ef6303c | 168,079,075,915,287,700,000,000,000,000,000,000,000 | 15 | cjpeg: Fix FPE when compressing 0-width GIF
Fixes #493 |
void *vterm_state_get_unrecognised_fbdata(VTermState *state)
{
return state->fbdata;
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 134,091,154,566,447,420,000,000,000,000,000,000,000 | 4 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
merge_anon_children(struct tree *tp1, struct tree *tp2)
/*
* NB: tp1 is the 'anonymous' node
*/
{
struct tree *child1, *child2, *previous;
for (child1 = tp1->child_list; child1;) {
for (child2 = tp2->child_list, previous = NULL;
child2... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 280,376,340,965,015,380,000,000,000,000,000,000,000 | 89 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
I_I16B(UINT8 *out, const UINT8 *in_, int xsize) {
int x, v;
for (x = 0; x < xsize; x++, in_ += 4) {
INT32 i;
memcpy(&i, in_, sizeof(i));
v = CLIP16(i);
*out++ = (UINT8)(v >> 8);
*out++ = (UINT8)v;
}
} | 0 | [
"CWE-120"
] | Pillow | 518ee3722a99d7f7d890db82a20bd81c1c0327fb | 159,122,103,942,235,960,000,000,000,000,000,000,000 | 10 | Use snprintf instead of sprintf |
QPDFObjectHandle newInteger(size_t val)
{
return QPDFObjectHandle::newInteger(QIntC::to_longlong(val));
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 178,504,009,917,688,930,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 ... |
callbacks_scrollbar_button_released (GtkWidget *widget, GdkEventButton *event){
screen.off_x = 0;
screen.off_y = 0;
screen.state = NORMAL;
render_refresh_rendered_image_on_screen();
return FALSE;
} | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 282,954,242,888,411,620,000,000,000,000,000,000,000 | 7 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
static struct sk_buff *tcp_collapse_one(struct sock *sk, struct sk_buff *skb,
struct sk_buff_head *list)
{
struct sk_buff *next = NULL;
if (!skb_queue_is_last(list, skb))
next = skb_queue_next(list, skb);
__skb_unlink(skb, list);
__kfree_skb(skb);
NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPRCVCOLLAPSED);
... | 0 | [
"CWE-200"
] | net | 75ff39ccc1bd5d3c455b6822ab09e533c551f758 | 137,080,868,150,696,220,000,000,000,000,000,000,000 | 14 | tcp: make challenge acks less predictable
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.
This patch increases the default limit from 100 to 1000, and adds
s... |
static void append_socket_pair(int *array, size_t *n, const int pair[static 2]) {
assert(array);
assert(n);
if (!pair)
return;
if (pair[0] >= 0)
array[(*n)++] = pair[0];
if (pair[1] >= 0)
array[(*n)++] = pair[1];
} | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 315,134,222,240,434,830,000,000,000,000,000,000,000 | 12 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
void qemu_mutex_unlock_ramlist(void)
{
qemu_mutex_unlock(&ram_list.mutex);
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 249,320,877,293,528,200,000,000,000,000,000,000,000 | 4 | 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... |
DU_findSOPClassAndInstanceInDataSet(
DcmItem *obj,
char* sopClass,
size_t sopClassSize,
char* sopInstance,
size_t sopInstanceSize,
OFBool tolerateSpacePaddedUIDs)
{
OFBool result = (DU_getStringDOElement(obj, DCM_SOPClassUID, sopClass, sopClassSize) &&
DU_getStringDOElement(obj, DCM_SOPInstanceU... | 0 | [
"CWE-476",
"CWE-787"
] | dcmtk | 5c14bf53fb42ceca12bbcc0016e8704b1580920d | 62,026,618,120,173,630,000,000,000,000,000,000,000 | 23 | Fixed possible NULL pointer dereference.
Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch. |
cmdline_paste(
int regname,
int literally, // Insert text literally instead of "as typed"
int remcr) // remove trailing CR
{
long i;
char_u *arg;
char_u *p;
int allocated;
// check for valid regname; also accept special characters for CTRL-R in
// the command line
if (regn... | 0 | [
"CWE-126",
"CWE-787"
] | vim | 6046aded8da002b08d380db29de2ba0268b6616e | 308,263,497,999,347,720,000,000,000,000,000,000,000 | 77 | patch 8.2.5148: invalid memory access when using expression on command line
Problem: Invalid memory access when using an expression on the command line.
Solution: Make sure the position does not go negative. |
static void svm_vm_free(struct kvm *kvm)
{
vfree(to_kvm_svm(kvm));
} | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 230,025,265,879,941,230,000,000,000,000,000,000,000 | 4 | 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... |
GC_API void GC_CALL GC_set_no_dls(int value)
{
GC_ASSERT(value != -1);
/* value is of boolean type. */
GC_no_dls = value;
} | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 6,045,873,901,344,323,000,000,000,000,000,000,000 | 6 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static inline bool IsGlobbingPattern(const std::string& pattern) {
return (pattern.find_first_of(kGlobbingChars) != std::string::npos);
} | 0 | [
"CWE-125"
] | tensorflow | 8b5b9dc96666a3a5d27fad7179ff215e3b74b67c | 219,749,312,620,200,340,000,000,000,000,000,000,000 | 3 | Completely rewrite `GetMatchingPaths`.
The current parallel implementation is too complex (lambda inside lambda, two levels of parallelism) and has a read outside of bounds issue.
The new implementation cleans up artifacts from the previous implementations that were left in the code as it evolves. We add multiple hel... |
rdp_out_unistr_mandatory_null(STREAM s, char *string, int len)
{
/* LEGACY:
*
* Do not write new code that uses this function, use the ones defined
* in stream.h for writing utf16 strings to a stream.
*
*/
if (string && len > 0)
rdp_out_unistr(s, string, len);
else
out_uint16_le(s, 0);
} | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 238,785,241,190,990,230,000,000,000,000,000,000,000 | 13 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
static const char *ib_qp_type_str(enum ib_qp_type type)
{
switch (type) {
case IB_QPT_SMI:
return "IB_QPT_SMI";
case IB_QPT_GSI:
return "IB_QPT_GSI";
case IB_QPT_RC:
return "IB_QPT_RC";
case IB_QPT_UC:
return "IB_QPT_UC";
case IB_QPT_UD:
return "IB_QPT_UD";
case IB_QPT_RAW_IPV6:
return "IB_QPT_RAW_IP... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 162,912,412,026,726,670,000,000,000,000,000,000,000 | 32 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
HTTP_create(void *p, uint16_t nhttp, unsigned len)
{
struct http *hp;
hp = p;
hp->magic = HTTP_MAGIC;
hp->hd = (void*)(hp + 1);
hp->shd = nhttp;
hp->hdf = (void*)(hp->hd + nhttp);
assert((unsigned char*)p + len == hp->hdf + PRNDUP(nhttp));
return (hp);
} | 0 | [
"CWE-703"
] | varnish-cache | c5fd097e5cce8b461c6443af02b3448baef2491d | 332,051,838,954,819,400,000,000,000,000,000,000,000 | 12 | Do not call http_hdr_flags() on pseudo-headers
In http_EstimateWS(), all headers are passed to the http_isfiltered()
function to calculate how many bytes is needed to serialize the entire
struct http. http_isfiltered() will check the headers for whether they are
going to be filtered out later and if so skip them.
How... |
static inline struct hlist_head *vxlan_fdb_head(struct vxlan_dev *vxlan,
const u8 *mac, __be32 vni)
{
return &vxlan->fdb_head[fdb_head_index(vxlan, mac, vni)];
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 162,804,173,099,822,710,000,000,000,000,000,000,000 | 5 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
slapi_pblock_get_op_stack_elem(Slapi_PBlock *pb)
{
#ifdef PBLOCK_ANALYTICS
pblock_analytics_record(pb, SLAPI_OP_STACK_ELEM);
#endif
if (pb->pb_intop != NULL) {
return pb->pb_intop->op_stack_elem;
}
return NULL;
} | 0 | [
"CWE-415"
] | 389-ds-base | a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b | 321,493,805,398,504,520,000,000,000,000,000,000,000 | 10 | Issue 5218 - double-free of the virtual attribute context in persistent search (#5219)
description:
A search is processed by a worker using a private pblock.
If the search is persistent, the worker spawn a thread
and kind of duplicate its private pblock so that the spawn
thread continue to process the p... |
static const char *am_set_hash_string_slot(cmd_parms *cmd,
void *struct_ptr,
const char *key,
const char *value)
{
server_rec *s = cmd->server;
apr_pool_t *pconf = s->process->pconf;
... | 0 | [
"CWE-601"
] | mod_auth_mellon | 9d28908e28ef70a12196c215503fb0075e1fd7f3 | 195,215,989,985,961,380,000,000,000,000,000,000,000 | 23 | Add MellonRedirectDomains option.
Limit the domains that we will redirect to after login / logout to a
set of trusted domains. By default we only allow redirects to the
current domain.
This change breaks backwards compatibility with any site that relies on
redirects to separate domains.
Fixes #35 |
unsigned paravirt_patch_default(u8 type, u16 clobbers, void *insnbuf,
unsigned long addr, unsigned len)
{
void *opfunc = get_call_destination(type);
unsigned ret;
if (opfunc == NULL)
/* If there's no function, patch it with a ud2a (BUG) */
ret = paravirt_patch_insns(insnbuf, len, ud2a, ud2a+sizeof(ud2a));
... | 0 | [
"CWE-200"
] | linux | 5800dc5c19f34e6e03b5adab1282535cb102fafd | 61,306,234,923,407,840,000,000,000,000,000,000,000 | 30 | x86/paravirt: Fix spectre-v2 mitigations for paravirt guests
Nadav reported that on guests we're failing to rewrite the indirect
calls to CALLEE_SAVE paravirt functions. In particular the
pv_queued_spin_unlock() call is left unpatched and that is all over the
place. This obviously wrecks Spectre-v2 mitigation (for par... |
static int __io_register_rsrc_update(struct io_ring_ctx *ctx, unsigned type,
struct io_uring_rsrc_update2 *up,
unsigned nr_args)
{
__u32 tmp;
int err;
if (up->resv)
return -EINVAL;
if (check_add_overflow(up->offset, nr_args, &tmp))
return -EOVERFLOW;
err = io_rsrc_node_switch_start(ctx);
i... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 142,607,771,810,002,730,000,000,000,000,000,000,000 | 23 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static void svm_disable_lbrv(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->control.virt_ext &= ~LBR_CTL_ENABLE_MASK;
set_msr_interception(vcpu, svm->msrpm, MSR_IA32_LASTBRANCHFROMIP, 0, 0);
set_msr_interception(vcpu, svm->msrpm, MSR_IA32_LASTBRANCHTOIP, 0, 0);
set_msr_interception(vcpu,... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 79,184,304,194,107,280,000,000,000,000,000,000,000 | 17 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
evutil_weakrand_(struct evutil_weakrand_state *state)
{
/* This RNG implementation is a linear congruential generator, with
* modulus 2^31, multiplier 1103515245, and addend 12345. It's also
* used by OpenBSD, and by Glibc's TYPE_0 RNG.
*
* The linear congruential generator is not an industrial-strength
* R... | 0 | [
"CWE-119",
"CWE-787"
] | libevent | 329acc18a0768c21ba22522f01a5c7f46cacc4d5 | 40,741,660,767,321,678,000,000,000,000,000,000,000 | 13 | evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
Consequently, it will pass the check at line 1816. Segfault happens at line
1819.
... |
int ring_buffer_wait(struct trace_buffer *buffer, int cpu, int full)
{
struct ring_buffer_per_cpu *cpu_buffer;
DEFINE_WAIT(wait);
struct rb_irq_work *work;
int ret = 0;
/*
* Depending on what the caller is waiting for, either any
* data in any cpu buffer, or a specific buffer, put the
* caller on the approp... | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 70,048,833,082,593,200,000,000,000,000,000,000,000 | 96 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
int btrfs_recover_balance(struct btrfs_fs_info *fs_info)
{
struct btrfs_balance_control *bctl;
struct btrfs_balance_item *item;
struct btrfs_disk_balance_args disk_bargs;
struct btrfs_path *path;
struct extent_buffer *leaf;
struct btrfs_key key;
int ret;
path = btrfs_alloc_path();
if (!path)
return -ENOMEM;... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 184,207,504,406,697,140,000,000,000,000,000,000,000 | 71 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
static int dsa_security_bits(const EVP_PKEY *pkey)
{
return DSA_security_bits(pkey->pkey.dsa);
} | 0 | [] | openssl | ab4a81f69ec88d06c9d8de15326b9296d7f498ed | 227,877,262,036,723,660,000,000,000,000,000,000,000 | 4 | Remove broken DSA private key workarounds.
Remove old code that handled various invalid DSA formats in ancient
software.
This also fixes a double free bug when parsing malformed DSA private keys.
Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
libFuzzer.
CVE-2016-0705
Reviewed-by: Emilia K... |
main(int argc, char *argv[])
{
static char buff[16384];
struct cpio _cpio; /* Allocated on stack. */
struct cpio *cpio;
const char *errmsg;
int uid, gid;
int opt;
cpio = &_cpio;
memset(cpio, 0, sizeof(*cpio));
cpio->buff = buff;
cpio->buff_size = sizeof(buff);
#if defined(HAVE_SIGACTION) && defined(SIGPIPE)... | 1 | [
"CWE-703",
"CWE-22"
] | libarchive | 59357157706d47c365b2227739e17daba3607526 | 262,290,717,975,594,800,000,000,000,000,000,000,000 | 300 | Add ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS option
This fixes a directory traversal in the cpio tool. |
static bool check_log_rec(const struct LOG_REC_HDR *lr, u32 bytes, u32 tr,
u32 bytes_per_attr_entry)
{
u16 t16;
if (bytes < sizeof(struct LOG_REC_HDR))
return false;
if (!tr)
return false;
if ((tr - sizeof(struct RESTART_TABLE)) %
sizeof(struct TRANSACTION_ENTRY))
return false;
if (le16_to_cpu(l... | 0 | [
"CWE-416"
] | linux | f26967b9f7a830e228bb13fb41bd516ddd9d789d | 265,449,419,165,820,730,000,000,000,000,000,000,000 | 43 | fs/ntfs3: Fix invalid free in log_replay
log_read_rst() returns ENOMEM error when there is not enough memory.
In this case, if info is returned without initialization,
it attempts to kfree the uninitialized info->r_page pointer. This patch
moves the memset initialization code to before log_read_rst() is called.
Repor... |
TEST_P(SslCertficateIntegrationTest, ServerRsaEcdsa) {
server_rsa_cert_ = true;
server_ecdsa_cert_ = true;
ConnectionCreationFunction creator = [&]() -> Network::ClientConnectionPtr {
return makeSslClientConnection({});
};
testRouterRequestAndResponseWithBody(1024, 512, false, false, &creator);
checkSta... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 316,938,315,744,583,450,000,000,000,000,000,000,000 | 9 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
GF_Err gf_isom_set_ipod_compatible(GF_ISOFile *the_file, u32 trackNumber)
{
GF_TrackBox *trak;
GF_Err e;
GF_MPEGVisualSampleEntryBox *entry;
e = CanAccessMovie(the_file, GF_ISOM_OPEN_WRITE);
if (e) return e;
trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak || !trak->Media) return GF_BAD_PARA... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 258,561,638,208,498,630,000,000,000,000,000,000,000 | 32 | fix some exploitable overflows (#994, #997) |
user_var_entry *get_variable(HASH *hash, LEX_STRING &name,
bool create_if_not_exists)
{
user_var_entry *entry;
if (!(entry = (user_var_entry*) my_hash_search(hash, (uchar*) name.str,
name.length)) &&
create_if_not_exists)
{
uint size=ALIGN_SIZE(s... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 218,595,274,024,390,800,000,000,000,000,000,000,000 | 45 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
Env *DefaultEnv::GetEnv()
{
return sEnv;
} | 0 | [
"CWE-78"
] | xrootd | befa2e627a5a33a38c92db3e57c07d8246a24acf | 110,770,137,420,688,360,000,000,000,000,000,000,000 | 4 | secgsi: do not build/package libXrdSecgsiGMAPLDAP-4.so
The way the LDAP query is implemented may represent a security threat.
Any related building and packaging reference is removed.
The code is left in place (for the time being) to remind its functionality
in the case a sanitized version is required. |
static int dcbnl_cee_fill(struct sk_buff *skb, struct net_device *netdev)
{
struct nlattr *cee, *app;
struct dcb_app_type *itr;
const struct dcbnl_rtnl_ops *ops = netdev->dcbnl_ops;
int dcbx, i, err = -EMSGSIZE;
u8 value;
if (nla_put_string(skb, DCB_ATTR_IFNAME, netdev->name))
goto nla_put_failure;
cee = nla_... | 0 | [
"CWE-399"
] | linux-2.6 | 29cd8ae0e1a39e239a3a7b67da1986add1199fc0 | 73,936,678,150,122,990,000,000,000,000,000,000,000 | 139 | dcbnl: fix various netlink info leaks
The dcb netlink interface leaks stack memory in various places:
* perm_addr[] buffer is only filled at max with 12 of the 32 bytes but
copied completely,
* no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand,
so we're leaking up to 58 bytes for ieee_ets structs... |
static int aac_send_reset_adapter(struct aac_dev *dev, void __user *arg)
{
struct aac_reset_iop reset;
int retval;
if (copy_from_user((void *)&reset, arg, sizeof(struct aac_reset_iop)))
return -EFAULT;
retval = aac_reset_adapter(dev, 0, reset.reset_type);
return retval;
} | 0 | [
"CWE-200"
] | linux | 342ffc26693b528648bdc9377e51e4f2450b4860 | 181,826,829,008,781,400,000,000,000,000,000,000,000 | 12 | scsi: aacraid: Don't copy uninitialized stack memory to userspace
Both aac_send_raw_srb() and aac_get_hba_info() may copy stack allocated
structs to userspace without initializing all members of these
structs. Clear out this memory to prevent information leaks.
Fixes: 423400e64d377 ("scsi: aacraid: Include HBA direct... |
complain_about_duplicate(opts, iscompound)
const char *opts;
int iscompound; /* 0 == boolean option, 1 == compound */
{
#if defined(MAC)
/* the Mac has trouble dealing with the output of messages while
* processing the config file. That should get fixed one day.
* For now just return.
*/
return;
#endif
raw_... | 0 | [
"CWE-269"
] | NetHack | 612755bfb5c412079795c68ba392df5d93874ed8 | 82,364,416,571,738,750,000,000,000,000,000,000,000 | 18 | escapes() revamp
Partial rewrite of escapes(), mostly changing its if-then-else
logic so that end-of-string can be checked once instead for each case.
The previous version had a bug if the input string ended with backslash
and one decimal digit (due to being lumped together with the handling
for trailing \X or \O... |
const CImg<T>& save_bmp(const char *const filename) const {
return _save_bmp(0,filename);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 68,934,650,558,932,250,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static struct task *h2_deferred_shut(struct task *t, void *ctx, unsigned short state)
{
struct h2s *h2s = ctx;
long reason = (long)h2s->wait_event.handle;
if (h2s->send_wait) {
h2s->send_wait->events &= ~SUB_CALL_UNSUBSCRIBE;
h2s->send_wait = NULL;
LIST_DEL(&h2s->list);
LIST_INIT(&h2s->list);
}
if (reason... | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 288,737,899,638,435,060,000,000,000,000,000,000,000 | 21 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
void PrintSWFUsage()
{
u32 i=0;
gf_sys_format_help(helpout, help_flags, "# SWF Importer Options\n"
"\n"
"MP4Box can import simple Macromedia Flash files (\".SWF\")\n"
"You can specify a SWF input file with \'-bt\', \'-xmt\' and \'-mp4\' options\n"
" \n"
"Options:\n"
);
... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 175,668,828,577,624,000,000,000,000,000,000,000,000 | 16 | fixed #1734 |
void testToString_Bug1950126() {
UriParserStateW state;
UriUriW uriOne;
UriUriW uriTwo;
const wchar_t * const uriOneString = L"http://e.com/";
const wchar_t * const uriTwoString = L"http://e.com";
state.uri = &uriOne;
TEST_ASSERT(URI_SUCCESS == uriParseUriW(&state, uriOneString));
state.uri = &uriTwo;
... | 0 | [
"CWE-787"
] | uriparser | 864f5d4c127def386dd5cc926ad96934b297f04e | 121,627,767,062,127,220,000,000,000,000,000,000,000 | 17 | UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex
Reported by Google Autofuzz team |
void gd_error_ex(int priority, const char *format, ...)
{
va_list args;
va_start(args, format);
if (gd_error_method) {
gd_error_method(priority, format, args);
}
va_end(args);
} | 0 | [
"CWE-119",
"CWE-787"
] | libgd | 77f619d48259383628c3ec4654b1ad578e9eb40e | 284,183,510,726,267,330,000,000,000,000,000,000,000 | 10 | fix #215 gdImageFillToBorder stack-overflow when invalid color is used |
static void intf_mem_outl(const struct si_sm_io *io, unsigned int offset,
unsigned char b)
{
writel(b << io->regshift, (io->addr)+(offset * io->regspacing));
} | 0 | [
"CWE-416"
] | linux | 401e7e88d4ef80188ffa07095ac00456f901b8c4 | 202,654,267,551,352,860,000,000,000,000,000,000,000 | 5 | ipmi_si: fix use-after-free of resource->name
When we excute the following commands, we got oops
rmmod ipmi_si
cat /proc/ioports
[ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
[ 1623.482382] Mem abort info:
[ 1623.482383] ESR = 0x96000007
[ 1623.482385] Exception class =... |
static void remove_from_request_hash(REQUEST *request)
{
if (!request->in_request_hash) return;
fr_packet_list_yank(pl, request->packet);
request->in_request_hash = FALSE;
request_stats_final(request);
} | 0 | [
"CWE-399"
] | freeradius-server | ff94dd35673bba1476594299d31ce8293b8bd223 | 280,148,430,353,513,380,000,000,000,000,000,000,000 | 9 | Do not delete "old" requests until they are free.
If the request is in the queue for 30+ seconds, do NOT delete it.
Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die",
which waits for a child thread to pick it up, and acknowledge that it's
done. Once it's marked done, we can finally clean it up.
T... |
static void mincore_pmd_range(struct vm_area_struct *vma, pud_t *pud,
unsigned long addr, unsigned long end,
unsigned char *vec)
{
unsigned long next;
pmd_t *pmd;
pmd = pmd_offset(pud, addr);
do {
next = pmd_addr_end(addr, end);
if (pmd_trans_huge(*pmd)) {
if (mincore_huge_pmd(vma, pmd, addr, next, ve... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 264,041,239,032,194,560,000,000,000,000,000,000,000 | 24 | 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(... |
static inline void irqenable_tx(struct cx23885_dev *dev, u32 mask)
{
mask &= IRQEN_TSE;
cx23888_ir_and_or4(dev, CX23888_IR_IRQEN_REG, ~IRQEN_TSE, mask);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | a7b2df76b42bdd026e3106cf2ba97db41345a177 | 267,723,481,840,764,740,000,000,000,000,000,000,000 | 5 | 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> |
void ConnPoolImplBase::checkForIdleAndCloseIdleConnsIfDraining() {
if (is_draining_for_deletion_) {
closeIdleConnectionsForDrainingPool();
}
if (isIdleImpl()) {
ENVOY_LOG(debug, "invoking idle callbacks - is_draining_for_deletion_={}",
is_draining_for_deletion_);
for (const Instance::Id... | 1 | [
"CWE-703",
"CWE-674"
] | envoy | 4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31 | 306,699,036,154,585,600,000,000,000,000,000,000,000 | 13 | CVE-2022-23606
Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed.
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void unix_seq_stop(struct seq_file *seq, void *v)
{
spin_unlock(&unix_table_lock);
} | 0 | [] | linux-2.6 | 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9 | 309,737,262,011,527,800,000,000,000,000,000,000,000 | 4 | [AF_UNIX]: Rewrite garbage collector, fixes race.
Throw out the old mark & sweep garbage collector and put in a
refcounting cycle detecting one.
The old one had a race with recvmsg, that resulted in false positives
and hence data loss. The old algorithm operated on all unix sockets
in the system, so any additional l... |
void run_explain(struct st_connection *cn, struct st_command *command,
int flags, bool json)
{
if ((flags & QUERY_REAP_FLAG) &&
!command->expected_errors.count &&
match_re(&explain_re, command->query))
{
st_command save_command= *command;
DYNAMIC_STRING query_str;
DYNAMIC_ST... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 48,862,850,513,632,590,000,000,000,000,000,000,000 | 29 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
findcmd(
const char * str,
struct xcmd * clist1,
struct xcmd * clist2,
struct xcmd ** cmd
)
{
struct xcmd *cl;
int clen;
int nmatch;
struct xcmd *nearmatch = NULL;
struct xcmd *clist;
clen = strlen(str);
nmatch = 0;
if (clist1 != 0)
clist = clist1;
else if (clist2 != 0)
clist = clist2;
else
... | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 49,102,221,871,743,310,000,000,000,000,000,000,000 | 61 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
void cil_destroy_class(struct cil_class *class)
{
if (class == NULL) {
return;
}
cil_symtab_datum_destroy(&class->datum);
cil_symtab_destroy(&class->perms);
free(class);
} | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 305,633,179,249,902,900,000,000,000,000,000,000,000 | 11 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
f_getbufline(typval_T *argvars, typval_T *rettv)
{
linenr_T lnum;
linenr_T end;
buf_T *buf;
(void)tv_get_number(&argvars[0]); /* issue errmsg if type error */
++emsg_off;
buf = tv_get_buf(&argvars[0], FALSE);
--emsg_off;
lnum = tv_get_lnum_buf(&argvars[1], buf);
if (argvars[2].... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 160,354,778,250,508,110,000,000,000,000,000,000,000 | 19 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int MP4_ReadBox_sample_mp4s( stream_t *p_stream, MP4_Box_t *p_box )
{
stream_Seek( p_stream, p_box->i_pos + mp4_box_headersize( p_box ) + 8 );
MP4_ReadBoxContainerRaw( p_stream, p_box );
return 1;
} | 0 | [
"CWE-120",
"CWE-191",
"CWE-787"
] | vlc | 2e7c7091a61aa5d07e7997b393d821e91f593c39 | 317,536,041,419,484,400,000,000,000,000,000,000,000 | 6 | demux: mp4: fix buffer overflow in parsing of string boxes.
We ensure that pbox->i_size is never smaller than 8 to avoid an
integer underflow in the third argument of the subsequent call to
memcpy. We also make sure no truncation occurs when passing values
derived from the 64 bit integer p_box->i_size to arguments of ... |
void CLASS apply_tiff()
{
int max_samp=0, ties=0, os, ns, raw=-1, thm=-1, i;
struct jhead jh;
thumb_misc = 16;
if (thumb_offset) {
fseek (ifp, thumb_offset, SEEK_SET);
if (ljpeg_start (&jh, 1)) {
if((unsigned)jh.bits<17 && (unsigned)jh.wide < 0x10000 && (unsigned)jh.high < 0x10000)
{
... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | LibRaw | d13e8f6d1e987b7491182040a188c16a395f1d21 | 186,760,588,526,203,770,000,000,000,000,000,000,000 | 220 | CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access |
irc_nick_nicklist_add (struct t_irc_server *server,
struct t_irc_channel *channel,
struct t_irc_nick *nick)
{
struct t_gui_nick_group *ptr_group;
char *color;
ptr_group = irc_nick_get_nicklist_group (server, channel->buffer, nick);
color = irc_nick_get_colo... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 337,354,501,465,092,300,000,000,000,000,000,000,000 | 18 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
static int setcos_generate_store_key(sc_card_t *card,
struct sc_cardctl_setcos_gen_store_key_info *data)
{
struct sc_apdu apdu;
u8 sbuf[SC_MAX_APDU_BUFFER_SIZE];
int r, len;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
/* Setup key-generation parameters */
len = 0;
if (data->op_type == OP_TYPE_GENERATE)
... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 325,588,879,060,028,740,000,000,000,000,000,000,000 | 49 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
cycle_timeout (GSManager *manager)
{
g_return_val_if_fail (manager != NULL, FALSE);
g_return_val_if_fail (GS_IS_MANAGER (manager), FALSE);
if (! manager->priv->dialog_up) {
gs_manager_cycle (manager);
}
return TRUE;
} | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 262,743,419,594,965,700,000,000,000,000,000,000,000 | 11 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
uint32_t dsdb_dn_rmd_flags(struct ldb_dn *dn)
{
uint32_t rmd_flags = 0;
NTSTATUS status = dsdb_get_extended_dn_uint32(dn, &rmd_flags,
"RMD_FLAGS");
if (NT_STATUS_IS_OK(status)) {
return rmd_flags;
}
return 0;
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 89,185,603,083,562,100,000,000,000,000,000,000,000 | 10 | 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 void vmcs_load(struct vmcs *vmcs)
{
u64 phys_addr = __pa(vmcs);
u8 error;
asm volatile (__ex(ASM_VMX_VMPTRLD_RAX) "; setna %0"
: "=g"(error) : "a"(&phys_addr), "m"(phys_addr)
: "cc", "memory");
if (error)
printk(KERN_ERR "kvm: vmptrld %p/%llx fail\n",
vmcs, phys_addr);
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 215,930,123,476,340,200,000,000,000,000,000,000,000 | 12 | 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-... |
GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP)
{
int i, j, ret;
int count;
if (flag) {
scd->curbit = 0;
scd->lastbit = 0;
scd->last_byte = 0;
scd->done = FALSE;
return 0;
}
if ( (scd->curbit + code_size) >= scd->lastbit) {
if (scd->done)... | 0 | [
"CWE-681"
] | php-src | 8d6e9588671136837533fe3785657c31c5b52767 | 244,882,676,784,592,760,000,000,000,000,000,000,000 | 43 | Fixed bug #75571: Potential infinite loop in gdImageCreateFromGifCtx
Due to a signedness confusion in `GetCode_` a corrupt GIF file can
trigger an infinite loop. Furthermore we make sure that a GIF without
any palette entries is treated as invalid *after* open palette entries
have been removed. |
static void nf_tables_expr_destroy(const struct nft_ctx *ctx,
struct nft_expr *expr)
{
const struct nft_expr_type *type = expr->ops->type;
if (expr->ops->destroy)
expr->ops->destroy(ctx, expr);
module_put(type->owner);
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 218,878,823,358,690,330,000,000,000,000,000,000,000 | 9 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.