func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
dissect_kafka_join_group_response_member(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *subti; proto_tree *subtree; int member_start, member_len; subtree = proto_tree_add_subtree(tree, tvb, offset,...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
59,522,925,172,936,080,000,000,000,000,000,000,000
33
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
hashbin_t *hashbin_new(int type) { hashbin_t* hashbin; /* * Allocate new hashbin */ hashbin = kzalloc(sizeof(*hashbin), GFP_ATOMIC); if (!hashbin) return NULL; /* * Initialize structure */ hashbin->hb_type = type; hashbin->magic = HB_MAGIC; //hashbin->hb_current = NULL; /* Make sure all spinlock's...
0
[ "CWE-200" ]
linux
4c03b862b12f980456f9de92db6d508a4999b788
170,938,150,901,810,740,000,000,000,000,000,000,000
25
irda: Fix lockdep annotations in hashbin_delete(). A nested lock depth was added to the hasbin_delete() code but it doesn't actually work some well and results in tons of lockdep splats. Fix the code instead to properly drop the lock around the operation and just keep peeking the head of the hashbin queue. Reported-...
nm_gconf_set_ip4_helper (GConfClient *client, const char *path, const char *key, const char *setting, guint32 tuple_len, GPtrArray *value) { char *gc_key; int i; GSList *list = NULL; gboolean...
0
[ "CWE-310" ]
network-manager-applet
4020594dfbf566f1852f0acb36ad631a9e73a82b
200,393,358,898,070,060,000,000,000,000,000,000,000
46
core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793) If a connection was created with a CA certificate, but the user later moved or deleted that CA certificate, the applet would simply provide the connection to NetworkManager without any CA certificate. This could cause NM to connect to t...
static int follow_pfn_pte(struct vm_area_struct *vma, unsigned long address, pte_t *pte, unsigned int flags) { /* No page to get reference */ if (flags & FOLL_GET) return -EFAULT; if (flags & FOLL_TOUCH) { pte_t entry = *pte; if (flags & FOLL_WRITE) entry = pte_mkdirty(entry); entry = pte_mkyoung(entr...
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
175,183,481,583,403,120,000,000,000,000,000,000,000
23
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...
int processMultibulkBuffer(client *c) { char *newline = NULL; int pos = 0, ok; long long ll; if (c->multibulklen == 0) { /* The client should have been reset */ serverAssertWithInfo(c,NULL,c->argc == 0); /* Multi bulk length cannot be read without a \r\n */ newline = st...
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
148,306,697,101,794,360,000,000,000,000,000,000,000
137
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
sftp_dir sftp_opendir(sftp_session sftp, const char *path){ sftp_message msg = NULL; sftp_file file = NULL; sftp_dir dir = NULL; sftp_status_message status; ssh_string path_s; ssh_buffer payload; uint32_t id; payload = ssh_buffer_new(); if (payload == NULL) { ssh_set_error_oom(sftp->session); ...
0
[]
libssh
4d8420f3282ed07fc99fc5e930c17df27ef1e9b2
86,850,150,226,018,100,000,000,000,000,000,000,000
88
sftp: Fix bug in sftp_mkdir not returning on error. resolves: #84 (cherry picked from commit a92c97b2e17715c1b3cdd693d14af6c3311d8e44)
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b) { int i; const BIGNUM *at, *bt; bn_check_top(a); bn_check_top(b); if (a->top < b->top) { at = b; bt = a; } else { at = a; bt = b; } if (bn_wexpand(r, at->top) == NULL) return 0; f...
0
[ "CWE-399" ]
openssl
f61bbf8da532038ed0eae16a9a11771f3da22d30
46,409,305,543,475,740,000,000,000,000,000,000,000
31
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 int post_copy_siginfo_from_user(kernel_siginfo_t *info, const siginfo_t __user *from) { if (unlikely(!known_siginfo_layout(info->si_signo, info->si_code))) { char __user *expansion = si_expansion(from); char buf[SI_EXPANSION_SIZE]; int i; /* * An unknown si_code might need more than * s...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
55,060,182,503,102,100,000,000,000,000,000,000,000
22
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
GC_INNER struct hblk * GC_next_used_block(struct hblk *h) { register bottom_index * bi; register word j = ((word)h >> LOG_HBLKSIZE) & (BOTTOM_SZ-1); GET_BI(h, bi); if (bi == GC_all_nils) { register word hi = (word)h >> (LOG_BOTTOM_SZ + LOG_HBLKSIZE); bi = GC_all_bottom_indices; ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
115,913,799,133,959,720,000,000,000,000,000,000,000
32
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...
on_setup_for_user (GdmSessionWorker *worker, DBusMessage *message) { DBusError error; const char *service; const char *x11_display_name; const char *x11_authority_file; const char *console; const char *hostname; const char *username; ...
0
[]
gdm
c25ef9245be4e0be2126ef3d075df4401949b570
225,156,458,750,729,120,000,000,000,000,000,000,000
42
Store the face and dmrc files in a cache. Refer to bug #565151.
static void free_entry(struct nf_queue_entry *entry) { nf_queue_entry_release_refs(entry); kfree(entry); }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
222,248,646,340,499,300,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...
FLAC_API FLAC__bool FLAC__stream_encoder_set_bits_per_sample(FLAC__StreamEncoder *encoder, uint32_t value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) return false; encoder->protec...
0
[ "CWE-787" ]
flac
e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be
258,219,715,718,258,250,000,000,000,000,000,000,000
10
libFlac: Exit at EOS in verify mode When verify mode is enabled, once decoder flags end of stream, encode processing is considered complete. CVE-2021-0561 Signed-off-by: Ralph Giles <giles@thaumas.net>
static int do_recv_NPPrintData(rpc_message_t *message, void *p_value) { NPPrintData *printData = (NPPrintData *)p_value; int error; if ((error = rpc_message_recv_uint32(message, &printData->size)) < 0) return error; if ((error = rpc_message_recv_bytes(message, printData->data, printData->size)) < 0) return e...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
68,662,373,144,941,715,000,000,000,000,000,000,000
12
Support all the new variables added
iterate_md5_digest(MD5& md5, MD5::Digest& digest, int iterations, int key_len) { md5.digest(digest); for (int i = 0; i < iterations; ++i) { MD5 m; m.encodeDataIncrementally(reinterpret_cast<char*>(digest), QIntC::to_size(key_len)); m.digest(digest); ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
247,028,659,543,865,020,000,000,000,000,000,000,000
13
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 ...
void ctts_box_del(GF_Box *s) { GF_CompositionOffsetBox *ptr = (GF_CompositionOffsetBox *)s; if (ptr->entries) gf_free(ptr->entries); gf_free(ptr); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
221,866,816,365,120,900,000,000,000,000,000,000,000
6
fixed #1587
START_TEST(virgl_test_transfer_read_illegal_ctx) { int ret; struct virgl_box box; ret = virgl_renderer_transfer_read_iov(1, 2, 0, 1, 1, &box, 0, NULL, 0); ck_assert_int_eq(ret, EINVAL); }
0
[ "CWE-909" ]
virglrenderer
b05bb61f454eeb8a85164c8a31510aeb9d79129c
334,748,645,115,062,640,000,000,000,000,000,000,000
8
vrend: clear memory when allocating a host-backed memory resource Closes: #249 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
void init_by_cur_dir() { if (my_getwd(target_dir_name,sizeof(target_dir_name),MYF(MY_WME))) exit(1); target_dir_name_len= strlen(target_dir_name); }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
190,227,472,076,904,900,000,000,000,000,000,000,000
6
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...
ews_store_unset_oof_settings_state (CamelSession *session, GCancellable *cancellable, gpointer user_data, GError **error) { CamelEwsStore *ews_store = user_data; EEwsConnection *connection; EEwsOofSettings *oof_settings; EEwsOofState state; GError *local_error = NULL; camel_operation_pus...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
277,696,843,293,950,000,000,000,000,000,000,000,000
36
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
static int perform_http_xact(void) { /* use free instead of g_free so that we can use xstr* functions from * libreport/lib/xfuncs.c */ GHashTable *problem_info = g_hash_table_new_full(g_str_hash, g_str_equal, free, free); /* Read header */ char *body_start ...
0
[ "CWE-59" ]
abrt
3287aa12eb205cff95cdd00d6d6c5c9a4f8f0eca
31,368,222,166,317,706,000,000,000,000,000,000,000
193
daemon: allow only root user to trigger the post-create There is no reason to allow non-root users to trigger this functionality. Regular users can create abrt problems only through abrtd or abrt-dbus and both triggers the post-create. Other hooks run under root user (CCpp, Koops, VMCore, Xorg). Related: #1212861 S...
void Inspect::operator()(At_Root_Block_Ptr at_root_block) { append_indentation(); append_token("@at-root ", at_root_block); append_mandatory_space(); if(at_root_block->expression()) at_root_block->expression()->perform(this); if(at_root_block->block()) at_root_block->block()->perform(this); }
0
[ "CWE-476" ]
libsass
38f4c3699d06b64128bebc7cf1e8b3125be74dc4
190,317,191,008,744,760,000,000,000,000,000,000,000
8
Fix possible bug with handling empty reference combinators Fixes #2665
static void llc_do_mcast(struct llc_sap *sap, struct sk_buff *skb, struct sock **stack, int count) { struct sk_buff *skb1; int i; for (i = 0; i < count; i++) { skb1 = skb_clone(skb, GFP_ATOMIC); if (!skb1) { sock_put(stack[i]); continue; } llc_sap_rcv(sap, skb1, stack[i]); sock_put(stack[i]); ...
0
[ "CWE-20", "CWE-401" ]
linux
8b74d439e1697110c5e5c600643e823eb1dd0762
183,718,886,084,603,560,000,000,000,000,000,000,000
17
net/llc: avoid BUG_ON() in skb_orphan() It seems nobody used LLC since linux-3.12. Fortunately fuzzers like syzkaller still know how to run this code, otherwise it would be no fun. Setting skb->sk without skb->destructor leads to all kinds of bugs, we now prefer to be very strict about it. Ideally here we would use...
int digest_generic_verify(struct digest *d, const unsigned char *md) { int ret; int len = digest_length(d); unsigned char *tmp; tmp = xmalloc(len); ret = digest_final(d, tmp); if (ret) goto end; if (crypto_memneq(md, tmp, len)) ret = -EINVAL; else ret = 0; end: free(tmp); return ret; }
0
[ "CWE-200" ]
barebox
0a9f9a7410681e55362f8311537ebc7be9ad0fbe
94,487,863,317,095,010,000,000,000,000,000,000,000
20
crypto: digest: use crypto_memneq() When verifying a digest it is important not to leak timing information through memcmp(). Use crypto_memneq() instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
static void free_pcppages_bulk(struct zone *zone, int count, struct per_cpu_pages *pcp) { int migratetype = 0; int batch_free = 0; bool isolated_pageblocks; spin_lock(&zone->lock); isolated_pageblocks = has_isolate_pageblock(zone); while (count) { struct page *page; struct list_head *list; /* * R...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
301,764,584,114,246,120,000,000,000,000,000,000,000
55
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
void rds_conn_shutdown(struct rds_connection *conn) { /* shut it down unless it's down already */ if (!rds_conn_transition(conn, RDS_CONN_DOWN, RDS_CONN_DOWN)) { /* * Quiesce the connection mgmt handlers before we start tearing * things down. We don't hold the mutex for the entire * duration of the shutdow...
0
[ "CWE-703" ]
linux
74e98eb085889b0d2d4908f59f6e00026063014f
14,979,352,323,810,303,000,000,000,000,000,000,000
57
RDS: verify the underlying transport exists before creating a connection There was no verification that an underlying transport exists when creating a connection, this would cause dereferencing a NULL ptr. It might happen on sockets that weren't properly bound before attempting to send a message, which will cause a N...
gint32 ves_icall_System_Threading_Interlocked_CompareExchange_Int(gint32 *location, gint32 value, gint32 comparand) { MONO_ARCH_SAVE_REGS; return InterlockedCompareExchange(location, value, comparand); }
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
105,142,038,510,594,890,000,000,000,000,000,000,000
6
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
dissect_kafka_metadata_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version) { proto_item *ti; proto_tree *subtree; if (api_version >= 3) { offset = dissect_kafka_throttle_time(tvb, pinfo, tree, offset); } ...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
282,613,322,473,270,180,000,000,000,000,000,000,000
36
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static void packet_id_queue_empty(struct PacketIdQueue *q) { USBRedirDevice *dev = q->dev; struct PacketIdQueueEntry *e, *next_e; DPRINTF("removing %d packet-ids from %s queue\n", q->size, q->name); QTAILQ_FOREACH_SAFE(e, &q->head, next, next_e) { QTAILQ_REMOVE(&q->head, e, next); g_fr...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
181,356,408,277,129,000,000,000,000,000,000,000,000
13
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
void arch_pick_mmap_layout(struct mm_struct *mm) { mm->mmap_legacy_base = mmap_legacy_base(); mm->mmap_base = mmap_upper_limit(); if (mmap_is_legacy()) { mm->mmap_base = mm->mmap_legacy_base; mm->get_unmapped_area = arch_get_unmapped_area; } else { mm->get_unmapped_area = arch_get_unmapped_area_topdown; } }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
192,146,097,146,184,480,000,000,000,000,000,000,000
12
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static inline LayerInfo *DestroyLayerInfo(LayerInfo *layer_info, const ssize_t number_layers) { ssize_t i; for (i=0; i<number_layers; i++) { if (layer_info[i].image != (Image *) NULL) layer_info[i].image=DestroyImage(layer_info[i].image); if (layer_info[i].mask.image != (Image *) NULL) ...
0
[ "CWE-787" ]
ImageMagick
d4ec73f866a7c42a2e7f301fcd696e5cb7a7d3ab
96,155,101,530,245,940,000,000,000,000,000,000,000
18
https://github.com/ImageMagick/ImageMagick/issues/350
static int qeth_halt_channels(struct qeth_card *card) { int rc1 = 0, rc2 = 0, rc3 = 0; QETH_CARD_TEXT(card, 3, "haltchs"); rc1 = qeth_halt_channel(&card->read); rc2 = qeth_halt_channel(&card->write); rc3 = qeth_halt_channel(&card->data); if (rc1) return rc1; if (rc2) return rc2; return rc3; }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
250,019,471,633,000,240,000,000,000,000,000,000,000
14
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
TEST_P(QuicHttpIntegrationTest, Retry) { testRetry(); }
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
249,866,443,008,487,400,000,000,000,000,000,000,000
1
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...
static inline u32 hwsim_net_get_wmediumd(struct net *net) { struct hwsim_net *hwsim_net = net_generic(net, hwsim_net_id); return hwsim_net->wmediumd; }
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
82,602,103,515,175,390,000,000,000,000,000,000,000
6
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static BOOL update_read_dstblt_order(wStream* s, const ORDER_INFO* orderInfo, DSTBLT_ORDER* dstblt) { ORDER_FIELD_COORD(1, dstblt->nLeftRect); ORDER_FIELD_COORD(2, dstblt->nTopRect); ORDER_FIELD_COORD(3, dstblt->nWidth); ORDER_FIELD_COORD(4, dstblt->nHeight); ORDER_FIELD_BYTE(5, dstblt->bRop); return TRUE; }
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
251,505,587,241,467,280,000,000,000,000,000,000,000
9
Fixed #6013: Check new length is > 0
filter_pwrite (struct backend *b, struct connection *conn, const void *buf, uint32_t count, uint64_t offset, uint32_t flags, int *err) { struct backend_filter *f = container_of (b, struct backend_filter, backend); void *handle = connection_get_handle (conn, f->backend.i); struct b_co...
0
[ "CWE-406" ]
nbdkit
bf0d61883a2f02f4388ec10dc92d4c61c093679e
212,091,222,069,154,100,000,000,000,000,000,000,000
20
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
Header::lineOrder () { return static_cast <LineOrderAttribute &> ((*this)["lineOrder"]).value(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
269,053,986,778,143,860,000,000,000,000,000,000,000
5
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
s32 hid_snto32(__u32 value, unsigned n) { return snto32(value, n); }
0
[ "CWE-125" ]
linux
50220dead1650609206efe91f0cc116132d59b3f
317,122,620,242,514,950,000,000,000,000,000,000,000
4
HID: core: prevent out-of-bound readings Plugging a Logitech DJ receiver with KASAN activated raises a bunch of out-of-bound readings. The fields are allocated up to MAX_USAGE, meaning that potentially, we do not have enough fields to fit the incoming values. Add checks and silence KASAN. Signed-off-by: Benjamin Tis...
QPDFWriter::writeHeader() { writeString("%PDF-"); writeString(this->m->final_pdf_version); if (this->m->pclm) { // PCLm version writeString("\n%PCLm 1.0\n"); } else { // This string of binary characters would not be valid UTF-8, so // it really should be treat...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
4,926,081,553,083,624,000,000,000,000,000,000,000
23
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 ...
void Completed( const blink::WebVector<v8::Local<v8::Value>>& result) override { v8::Isolate* isolate = promise_.isolate(); if (!result.empty()) { if (!result[0].IsEmpty()) { v8::Local<v8::Value> value = result[0]; // Either the result was created in the same world as the caller ...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
338,709,916,946,827,050,000,000,000,000,000,000,000
54
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 ...
static struct stub_priv *stub_priv_pop(struct stub_device *sdev) { unsigned long flags; struct stub_priv *priv; spin_lock_irqsave(&sdev->priv_lock, flags); priv = stub_priv_pop_from_listhead(&sdev->priv_init); if (priv) goto done; priv = stub_priv_pop_from_listhead(&sdev->priv_tx); if (priv) goto done; ...
0
[ "CWE-362" ]
linux
22076557b07c12086eeb16b8ce2b0b735f7a27e7
330,480,952,296,976,160,000,000,000,000,000,000,000
22
usbip: usbip_host: fix NULL-ptr deref and use-after-free errors usbip_host updates device status without holding lock from stub probe, disconnect and rebind code paths. When multiple requests to import a device are received, these unprotected code paths step all over each other and drive fails with NULL-ptr deref and ...
static void discard_vq_data(VirtQueue *vq, VirtIODevice *vdev) { VirtQueueElement elem; if (!virtio_queue_ready(vq)) { return; } while (virtqueue_pop(vq, &elem)) { virtqueue_push(vq, &elem, 0); } virtio_notify(vdev, vq); }
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
82,659,624,073,535,810,000,000,000,000,000,000,000
12
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>
static unsigned int nodeHash(i64 iNode){ return ((unsigned)iNode) % HASHSIZE; }
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
202,987,650,052,468,860,000,000,000,000,000,000,000
3
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
static int encode_open_confirm(struct xdr_stream *xdr, const struct nfs_open_confirmargs *arg) { __be32 *p; RESERVE_SPACE(4+NFS4_STATEID_SIZE+4); WRITE32(OP_OPEN_CONFIRM); WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE); WRITE32(arg->seqid->sequence->counter); return 0; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
181,211,744,816,978,600,000,000,000,000,000,000,000
11
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static int muscle_read_binary(sc_card_t *card, unsigned int idx, u8* buf, size_t count, unsigned long flags) { mscfs_t *fs = MUSCLE_FS(card); int r; msc_id objectId; u8* oid = objectId.id; mscfs_file_t *file; r = mscfs_check_selection(fs, -1); if(r < 0) SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, r); file =...
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
152,508,064,310,886,550,000,000,000,000,000,000,000
21
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
ENCODE_JSON(DateTime) { UA_DateTimeStruct tSt = UA_DateTime_toStruct(*src); /* Format: yyyy-MM-dd'T'HH:mm:ss.SSSSSSSSS'Z' is used. max 30 bytes.*/ UA_Byte buffer[UA_JSON_DATETIME_LENGTH]; printNumber(tSt.year, &buffer[0], 4); buffer[4] = '-'; printNumber(tSt.month, &buffer[5], 2); buffer[7...
0
[ "CWE-703", "CWE-787" ]
open62541
c800e2987b10bb3af6ef644b515b5d6392f8861d
71,902,114,206,484,270,000,000,000,000,000,000,000
32
fix(json): Check max recursion depth in more places
static inline void skb_split_no_header(struct sk_buff *skb, struct sk_buff* skb1, const u32 len, int pos) { int i, k = 0; const int nfrags = skb_shinfo(skb)->nr_frags; skb_shinfo(skb)->nr_frags = 0; skb1->len = skb1->data_len = skb->len - len; skb->len = len; skb->data_len = len -...
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
15,832,909,661,226,899,000,000,000,000,000,000,000
40
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static int check_ptr_alignment(struct bpf_verifier_env *env, const struct bpf_reg_state *reg, int off, int size) { bool strict = env->strict_alignment; const char *pointer_desc = ""; switch (reg->type) { case PTR_TO_PACKET: case PTR_TO_PACKET_META: /* Special case, because of NET_IP_ALIGN. G...
0
[ "CWE-190" ]
linux
bb7f0f989ca7de1153bd128a40a71709e339fa03
147,146,880,388,670,030,000,000,000,000,000,000,000
34
bpf: fix integer overflows There were various issues related to the limited size of integers used in the verifier: - `off + size` overflow in __check_map_access() - `off + reg->off` overflow in check_mem_access() - `off + reg->var_off.value` overflow or 32-bit truncation of `reg->var_off.value` in check_mem_acce...
static int encrypt_nss( struct crypto_instance *instance, const unsigned char *buf_in, const size_t buf_in_len, unsigned char *buf_out, size_t *buf_out_len) { PK11Context* crypt_context = NULL; SECItem crypt_param; SECItem *nss_sec_param = NULL; int tmp1_outlen = 0; unsigned int tmp2_outlen = 0; unsigned ...
0
[ "CWE-703" ]
corosync
b3f456a8ceefac6e9f2e9acc2ea0c159d412b595
256,971,460,096,551,400,000,000,000,000,000,000,000
91
totemcrypto: fix hmac key initialization Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
bool Item::check_type_or_binary(const char *opname, const Type_handler *expect) const { const Type_handler *handler= type_handler(); if (handler == expect || (handler->is_general_purpose_string_type() && collation.collation == &my_charset_bin)) return false; my_err...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
24,663,454,491,886,535,000,000,000,000,000,000,000
12
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
QPDF::reconstruct_xref(QPDFExc& e) { if (this->m->reconstructed_xref) { // Avoid xref reconstruction infinite loops. This is getting // very hard to reproduce because qpdf is throwing many fewer // exceptions while parsing. Most situations are warnings now. throw e; } th...
1
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
321,387,629,123,707,360,000,000,000,000,000,000,000
119
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static void wsgi_manage_process(int reason, void *data, apr_wait_t status) { WSGIDaemonProcess *daemon = data; switch (reason) { /* Child daemon process has died. */ case APR_OC_REASON_DEATH: { int mpm_state; int stopping; /* Stop watching the existing pro...
0
[ "CWE-264" ]
mod_wsgi
d9d5fea585b23991f76532a9b07de7fcd3b649f4
12,769,558,854,267,612,000,000,000,000,000,000,000
100
Local privilege escalation when using daemon mode. (CVE-2014-0240)
void sta_info_free(struct ieee80211_local *local, struct sta_info *sta) { int i; if (sta->rate_ctrl) rate_control_free_sta(sta); if (sta->tx_lat) { for (i = 0; i < IEEE80211_NUM_TIDS; i++) kfree(sta->tx_lat[i].bins); kfree(sta->tx_lat); } sta_dbg(sta->sdata, "Destroyed STA %pM\n", sta->sta.addr); kfr...
0
[ "CWE-362" ]
linux
1d147bfa64293b2723c4fec50922168658e613ba
135,234,319,219,016,990,000,000,000,000,000,000,000
17
mac80211: fix AP powersave TX vs. wakeup race There is a race between the TX path and the STA wakeup: while a station is sleeping, mac80211 buffers frames until it wakes up, then the frames are transmitted. However, the RX and TX path are concurrent, so the packet indicating wakeup can be processed while a packet is b...
sds sdscpy(sds s, const char *t) { return sdscpylen(s, t, strlen(t)); }
0
[ "CWE-190" ]
redis
d32f2e9999ce003bad0bd2c3bca29f64dcce4433
146,271,901,671,661,360,000,000,000,000,000,000,000
3
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. A...
static void v4l_print_sliced_vbi_cap(const void *arg, bool write_only) { const struct v4l2_sliced_vbi_cap *p = arg; int i; pr_cont("type=%s, service_set=0x%08x\n", prt_names(p->type, v4l2_type_names), p->service_set); for (i = 0; i < 24; i++) printk(KERN_DEBUG "line[%02u]=0x%04x, 0x%04x\n", i, p->service_...
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
325,022,973,369,055,830,000,000,000,000,000,000,000
12
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
vhost_scsi_get_pr_transport_id_len(struct se_portal_group *se_tpg, struct se_node_acl *se_nacl, struct t10_pr_registration *pr_reg, int *format_code) { struct vhost_scsi_tpg *tpg = container_of(se_tpg, struct vhost_scsi_tpg, se_tpg); struct vhost_scsi_tport *tport = tpg->tport; switch (tport->...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
95,060,948,371,732,170,000,000,000,000,000,000,000
28
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
DeepScanLineInputFile::readPixels (int scanLine1, int scanLine2) { try { Lock lock (*_data->_streamData); if (_data->slices.size() == 0) throw IEX_NAMESPACE::ArgExc ("No frame buffer specified " "as pixel data destination."); int scanLineMin =...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
247,781,623,366,519,600,000,000,000,000,000,000,000
119
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
int64_t NumElements(PyObject* tensor) const final { if (EagerTensor_CheckExact(tensor)) { return PyEagerTensor_NumElements(tensor); } PyObject* arglist = Py_BuildValue("(O)", reinterpret_cast<PyObject*>(tensor)); PyObject* result = PyEval_CallObject(num_elements_, arglist); Py_DECREF...
0
[ "CWE-476", "CWE-908" ]
tensorflow
237822b59fc504dda2c564787f5d3ad9c4aa62d9
177,993,431,130,541,660,000,000,000,000,000,000,000
16
Fix tf.compat.v1.placeholder_with_default vulnerability with quantized types. When iterating through the tensor to extract shape values, an underlying missing kernel (`StridedSlice` for quantized types) causes an error, which then results in a `nullptr` being passed to `ParseDimensionValue()`, causing a segfault. The...
Bool Media_IsSelfContained(GF_MediaBox *mdia, u32 StreamDescIndex) { u32 drefIndex=0; GF_FullBox *a=NULL; GF_SampleEntryBox *se = NULL; Media_GetSampleDesc(mdia, StreamDescIndex, &se, &drefIndex); if (!drefIndex) return 0; if (mdia && mdia->information && mdia->information->dataInformation && mdia->informa...
0
[ "CWE-787" ]
gpac
328def7d3b93847d64ecb6e9e0399684e57c3eca
175,306,242,452,441,140,000,000,000,000,000,000,000
24
fixed #1766 (fuzz)
MagickExport void XMakeMagnifyImage(Display *display,XWindows *windows) { char tuple[MaxTextExtent]; int y; MagickPixelPacket pixel; register int x; register ssize_t i; register unsigned char *p, *q; ssize_t n; static unsigned int previous_magnify = 0; stati...
0
[ "CWE-401" ]
ImageMagick6
13801f5d0bd7a6fdb119682d34946636afdb2629
4,132,062,258,880,801,000,000,000,000,000,000,000
438
https://github.com/ImageMagick/ImageMagick/issues/1531
void Compute(OpKernelContext* context) override { FusedBatchNormGradOpBase<Device, T, U>::ComputeWithReservedSpace(context, true); }
0
[ "CWE-476", "CWE-703" ]
tensorflow
6972f9dfe325636b3db4e0bc517ee22a159365c0
153,742,970,175,712,030,000,000,000,000,000,000,000
4
Add missing valuidation to FusedBatchNorm. PiperOrigin-RevId: 372460336 Change-Id: Ic8c4e4de67c58a741bd87f2e182bed07247d1126
static void key_event(VncState *vs, int down, uint32_t sym) { int keycode; int lsym = sym; if (lsym >= 'A' && lsym <= 'Z' && is_graphic_console()) { lsym = lsym - 'A' + 'a'; } keycode = keysym2scancode(vs->vd->kbd_layout, lsym & 0xFFFF) & SCANCODE_KEYMASK; do_key_event(vs, down, keycod...
0
[ "CWE-125" ]
qemu
9f64916da20eea67121d544698676295bbb105a7
27,334,068,658,197,364,000,000,000,000,000,000,000
12
pixman/vnc: use pixman images in vnc. The vnc code uses *three* DisplaySurfaces: First is the surface of the actual QemuConsole, usually the guest screen, but could also be a text console (monitor/serial reachable via Ctrl-Alt-<nr> keys). This is left as-is. Second is the current server's view of the screen content...
struct device *platform_find_device_by_driver(struct device *start, const struct device_driver *drv) { return bus_find_device(&platform_bus_type, start, drv, __platform_match); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
125,497,771,660,676,410,000,000,000,000,000,000,000
6
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
ssize_t enc_untrusted_flistxattr(int fd, char *list, size_t size) { return EnsureInitializedAndDispatchSyscall( asylo::system_call::kSYS_flistxattr, fd, list, size); }
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
337,067,503,816,015,570,000,000,000,000,000,000,000
4
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
CImgDisplay& operator=(const CImg<t>& img) { return display(img); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
293,740,490,967,666,600,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 inline void flush_unauthorized_files(const struct cred *cred, struct files_struct *files) { struct file *file, *devnull = NULL; struct tty_struct *tty; int drop_tty = 0; unsigned n; tty = get_current_tty(); if (tty) { spin_lock(&tty_files_lock); if (!list_empty(&tty->tty_files)) { struct t...
0
[ "CWE-264" ]
linux
7b0d0b40cd78cadb525df760ee4cac151533c2b5
261,661,618,536,010,630,000,000,000,000,000,000,000
47
selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID. If the callee SID is bounded by the caller SID, then allowing the transition to occur poses no risk of privilege escalation and we can therefore safely allow the transition to occur. Add this exemption for both the case where a transition was explicitl...
bgp_decode_nlri_vpn6(struct bgp_parse_state *s, byte *pos, uint len, rta *a) { while (len) { net_addr_vpn6 net; u32 path_id = 0; /* Decode path ID */ if (s->add_path) { if (len < 5) bgp_parse_error(s, 1); path_id = get_u32(pos); ADVANCE(pos, len, 4); } /* Decode pre...
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
114,708,560,056,407,320,000,000,000,000,000,000,000
53
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
evbuffer_search(struct evbuffer *buffer, const char *what, size_t len, const struct evbuffer_ptr *start) { return evbuffer_search_range(buffer, what, len, start, NULL); }
0
[ "CWE-189" ]
libevent
20d6d4458bee5d88bda1511c225c25b2d3198d6c
233,039,056,516,837,600,000,000,000,000,000,000,000
4
Fix CVE-2014-6272 in Libevent 2.0 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, struct kvm_sregs *sregs) { int mmu_reset_needed = 0; int pending_vec, max_bits; struct desc_ptr dt; dt.size = sregs->idt.limit; dt.address = sregs->idt.base; kvm_x86_ops->set_idt(vcpu, &dt); dt.size = sregs->gdt.limit; dt.address = sregs->gdt.base;...
0
[ "CWE-200" ]
kvm
831d9d02f9522e739825a51a11e3bc5aa531a905
73,034,207,830,670,500,000,000,000,000,000,000,000
70
KVM: x86: fix information leak to userland Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and kvm_clock_data are copied to userland with some padding and reserved fields unitialized. It leads to leaking of contents of kernel stack memory. We have to initialize them to zero. In patch v1 Jan Kiszka suggest...
Status ModularFrameDecoder::DecodeGroup(const Rect& rect, BitReader* reader, int minShift, int maxShift, const ModularStreamId& stream, bool zerofill, PassesDec...
1
[ "CWE-787" ]
libjxl
1c05e110d69b457696366fb4e762057b6855349b
21,178,916,405,896,710,000,000,000,000,000,000,000
81
fix use_full_image==false case (#365) Some fixes to the case where the full modular image is skipped: - don't assume that everything happens at the modular AC group level (minShift==0), there can also be upsampling causing channels to have nonzero shift even when there's no Squeeze - for partial decodes (when zero...
TEST_F(QueryPlannerTest, SortElimTrailingFields) { addIndex(BSON("a" << 1 << "b" << 1 << "c" << 1)); runQuerySortProj(fromjson("{a: 5}"), BSON("b" << 1), BSONObj()); ASSERT_EQUALS(getNumSolutions(), 2U); assertSolutionExists( "{sort: {pattern: {b: 1}, limit: 0, node: {sortKeyGen: " "{no...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
16,987,594,989,702,138,000,000,000,000,000,000,000
12
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static void hci_change_link_key_complete_evt(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_ev_change_link_key_complete *ev = (void *) skb->data; struct hci_conn *conn; BT_DBG("%s status 0x%2.2x", hdev->name, ev->status); hci_dev_lock(hdev); conn = hci_conn_hash_lookup_handle(hdev, __le16_to_...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
111,541,043,794,331,050,000,000,000,000,000,000,000
22
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
void ResetJpgfile(void) { if (Sections == NULL){ Sections = (Section_t *)malloc(sizeof(Section_t)*5); SectionsAllocated = 5; } SectionsRead = 0; HaveAll = 0; }
0
[ "CWE-787" ]
jhead
5186ddcf9e35a7aa0ff0539489a930434a1325f4
158,413,870,133,207,600,000,000,000,000,000,000,000
10
Just allocate 20 bytes extra at the end of a section. Otherwise, we end up with a whole lot of little checks for structures that the file says are there but are unexpectedly cut off in fuzz tests
bool unit_inactive_or_pending(Unit *u) { assert(u); /* Returns true if the unit is inactive or going down */ if (UNIT_IS_INACTIVE_OR_DEACTIVATING(unit_active_state(u))) return true; if (unit_stop_pending(u)) return true; return false; }
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
173,982,575,767,858,960,000,000,000,000,000,000,000
13
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static int get_recurse_data_length(compiler_common *common, PCRE2_SPTR cc, PCRE2_SPTR ccend, BOOL *needs_control_head, BOOL *has_quit, BOOL *has_accept) { int length = 1; int size; PCRE2_SPTR alternative; BOOL quit_found = FALSE; BOOL accept_found = FALSE; BOOL setsom_found = FALSE; BOOL setmark_found = FALSE; BOOL c...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
214,907,660,214,652,950,000,000,000,000,000,000,000
214
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
TEST_P(LocalJwksIntegrationTest, WithGoodToken) { config_helper_.prependFilter(getFilterConfig(true)); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto response = codec_client_->makeHeaderOnlyRequest(Http::TestRequestHeaderMapImpl{ {":method", "GET"}, {":path", "/"}, ...
0
[ "CWE-476", "CWE-703" ]
envoy
9371333230b1a6e1be2eccf4868771e11af6253a
20,963,081,683,187,050,000,000,000,000,000,000,000
26
CVE-2021-43824 jwt_atuhn: fixed the crash when a CONNECT request is sent to JWT filter configured with regex match. Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int header_len(__le16 ctl) { u16 fc = le16_to_cpu(ctl); switch (fc & 0xc) { case 4: if ((fc & 0xe0) == 0xc0) return 10; /* one-address control packet */ return 16; /* two-address control packet */ case 8: if ((fc & 0x300) == 0x300) return 30; /* WDS packet */ } return 24; }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
26,426,764,589,645,140,000,000,000,000,000,000,000
14
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...
free_load_data(LoadData *ld) { free(ld->buf); ld->buf_used = 0; ld->buf_capacity = 0; ld->buf = NULL; if (ld->mapped_file) munmap(ld->mapped_file, ld->mapped_file_sz); ld->mapped_file = NULL; ld->mapped_file_sz = 0; }
0
[ "CWE-787" ]
kitty
82c137878c2b99100a3cdc1c0f0efea069313901
73,453,322,208,463,970,000,000,000,000,000,000,000
7
Graphics protocol: Dont return filename in the error message when opening file fails, since filenames can contain control characters Fixes #3128
Debug(const char *fmtstr, va_list args) { /* Ignored */ #ifdef VMX86_DEBUG sLog(log_debug, "Debug callback invoked. \n"); #endif }
1
[ "CWE-362" ]
open-vm-tools
c1304ce8bfd9c0c33999e496bf7049d5c3d45821
121,785,140,670,890,440,000,000,000,000,000,000,000
8
randomly generate tmp directory name, and add StrUtil_ReplaceAll() function.
static int check_addr_in_code (RBinJavaField *method, ut64 addr) { return !check_addr_less_start (method, addr) && \ check_addr_less_end ( method, addr); }
0
[ "CWE-125" ]
radare2
224e6bc13fa353dd3b7f7a2334588f1c4229e58d
94,690,535,195,187,060,000,000,000,000,000,000,000
4
Fix #10296 - Heap out of bounds read in java_switch_op()
static char *ptr_to_id(char *buf, char *end, void *ptr, struct printf_spec spec) { unsigned long hashval; const int default_width = 2 * sizeof(ptr); if (unlikely(!have_filled_random_ptr_key)) { spec.field_width = default_width; /* string length must be less than default_width */ return string(buf, end, "(ptrv...
0
[ "CWE-200" ]
linux
ad67b74d2469d9b82aaa572d76474c95bc484d57
227,795,485,245,628,300,000,000,000,000,000,000,000
31
printk: hash addresses printed with %p Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the a...
parse_ENQUEUE(char *arg, struct ofpbuf *ofpacts, enum ofputil_protocol *usable_protocols OVS_UNUSED) { char *sp = NULL; char *port = strtok_r(arg, ":q,", &sp); char *queue = strtok_r(NULL, "", &sp); struct ofpact_enqueue *enqueue; if (port == NULL || queue == NULL) { return xs...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
30,384,632,669,891,550,000,000,000,000,000,000,000
19
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static void ndpi_validate_protocol_initialization(struct ndpi_detection_module_struct *ndpi_str) { int i; for (i = 0; i < (int) ndpi_str->ndpi_num_supported_protocols; i++) { if(ndpi_str->proto_defaults[i].protoName == NULL) { NDPI_LOG_ERR(ndpi_str, "[NDPI] INTERNAL ERROR missing protoName initializ...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
226,010,206,871,904,160,000,000,000,000,000,000,000
17
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Mutex_static() { for (unsigned int i = 0; i<32; ++i) pthread_mutex_init(&mutex[i],0); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
9,085,095,988,631,596,000,000,000,000,000,000,000
1
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
CmdGrantRolesToRole() : Command("grantRolesToRole") {}
0
[ "CWE-613" ]
mongo
64d8e9e1b12d16b54d6a592bae8110226c491b4e
262,257,469,196,034,150,000,000,000,000,000,000,000
1
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
absl::string_view asStringView() const override { return antagonistic_name_; }
0
[ "CWE-400" ]
envoy
542f84c66e9f6479bc31c6f53157c60472b25240
296,413,443,910,183,000,000,000,000,000,000,000,000
1
overload: Runtime configurable global connection limits (#147) Signed-off-by: Tony Allen <tony@allen.gg>
static void write_real(bytearray_t * bplist, double val) { uint64_t size = get_real_bytes(val); //cheat to know used space uint8_t *buff = (uint8_t *) malloc(sizeof(uint8_t) + size); buff[0] = BPLIST_REAL | Log2(size); if (size == sizeof(double)) { memcpy(buff + 1, &val, size); } els...
0
[ "CWE-770" ]
libplist
26061aac4ec75e7a4469a9aab9a424716223e5c4
173,249,949,376,857,780,000,000,000,000,000,000,000
18
bplist: Check for invalid offset_size in bplist trailer
wrap_res_query (int type, unsigned char *answer, int answer_length) { return res_query (domain, C_IN, type, answer, answer_length); }
0
[ "CWE-476" ]
glibc
fc82b0a2dfe7dbd35671c10510a8da1043d746a5
171,545,175,822,996,330,000,000,000,000,000,000,000
4
CVE-2015-5180: resolv: Fix crash with internal QTYPE [BZ #18784] Also rename T_UNSPEC because an upcoming public header file update will use that name.
static inline void clear_soft_dirty_pmd(struct vm_area_struct *vma, unsigned long addr, pmd_t *pmdp) { pmd_t old, pmd = *pmdp; if (pmd_present(pmd)) { /* See comment in change_huge_pmd() */ old = pmdp_invalidate(vma, addr, pmdp); if (pmd_dirty(old)) pmd = pmd_mkdirty(pmd); if (pmd_young(old)) pmd = p...
0
[ "CWE-362", "CWE-703", "CWE-667" ]
linux
04f5866e41fb70690e28397487d8bd8eea7d712a
251,644,119,419,908,270,000,000,000,000,000,000,000
22
coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping The core dumping code has always run without holding the mmap_sem for writing, despite that is the only way to ensure that the entire vma layout will not change from under it. Only using some signal serialization on the processes bel...
virtual const UnicodeString *snext(UErrorCode &status) { if(U_SUCCESS(status) && i<UPRV_LENGTHOF(testEnumStrings)) { unistr=UnicodeString(testEnumStrings[i++], ""); return &unistr; } return NULL; }
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
203,732,604,302,237,400,000,000,000,000,000,000,000
8
ICU-20958 Prevent SEGV_MAPERR in append See #971
static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(const struct sock *sk, const struct in6_addr *addr) { return tcp_md5_do_lookup(sk, (union tcp_md5_addr *)addr, AF_INET6); }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
51,233,011,691,697,600,000,000,000,000,000,000,000
5
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_value) /* {{{ */ { #ifdef HAVE_GLOB char cwd[MAXPATHLEN]; int cwd_skip = 0; #ifdef ZTS char work_pattern[MAXPATHLEN]; char *result; #endif glob_t globbuf; int n; int ret; if (pattern_len >= MAXPATHLEN) { php_error_docref(NULL, E_W...
0
[ "CWE-190" ]
php-src
3b8d4de300854b3517c7acb239b84f7726c1353c
156,552,794,671,605,500,000,000,000,000,000,000,000
104
Fix bug #71923 - integer overflow in ZipArchive::getFrom*
Magick::CompositeOperator Magick::Image::compose(void) const { return(constImage()->compose); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
212,856,342,066,945,300,000,000,000,000,000,000,000
4
Added missing return to avoid use after free.
static inline void timer_stats_timer_set_start_info(struct timer_list *timer) { if (likely(!timer_stats_active)) return; __timer_stats_timer_set_start_info(timer, __builtin_return_address(0)); }
1
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
28,930,281,071,647,360,000,000,000,000,000,000,000
6
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
compile_length_option_node(BagNode* node, regex_t* reg) { int tlen; OnigOptionType prev = reg->options; reg->options = node->o.options; tlen = compile_length_tree(NODE_BAG_BODY(node), reg); reg->options = prev; return tlen; }
0
[ "CWE-476", "CWE-125" ]
oniguruma
c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c
285,814,412,209,167,950,000,000,000,000,000,000,000
11
Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode.
static int get_delta_q(vp8_reader *bc, int prev, int *q_update) { int ret_val = 0; if (vp8_read_bit(bc)) { ret_val = vp8_read_literal(bc, 4); if (vp8_read_bit(bc)) ret_val = -ret_val; } /* Trigger a quantizer update if the delta-q value has changed */ if (ret_val != prev) *q_update = 1; return r...
0
[ "CWE-125" ]
libvpx
45daecb4f73a47ab3236a29a3a48c52324cbf19a
301,219,838,956,155,800,000,000,000,000,000,000,000
14
vp8_decode_frame: fix oob read on truncated key frame the check for error correction being disabled was overriding the data length checks. this avoids returning incorrect information (width / height) for the decoded frame which could result in inconsistent sizes returned in to an application causing it to read beyond ...
DEFUN (show_ip_bgp_paths, show_ip_bgp_paths_cmd, "show ip bgp paths", SHOW_STR IP_STR BGP_STR "Path information\n") { vty_out (vty, "Address Refcnt Path%s", VTY_NEWLINE); aspath_print_all_vty (vty); return CMD_SUCCESS; }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
310,774,770,475,580,500,000,000,000,000,000,000,000
12
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static void brcmf_link_down(struct brcmf_cfg80211_vif *vif, u16 reason) { struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(vif->wdev.wiphy); s32 err = 0; brcmf_dbg(TRACE, "Enter\n"); if (test_and_clear_bit(BRCMF_VIF_STATUS_CONNECTED, &vif->sme_state)) { brcmf_dbg(INFO, "Call WLC_DISASSOC to stop excess roaming\n ...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
127,323,309,332,222,090,000,000,000,000,000,000,000
24
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
static __inline__ int udpv6_rcv(struct sk_buff *skb) { return __udp6_lib_rcv(skb, &udp_table, IPPROTO_UDP); }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
92,966,591,298,800,820,000,000,000,000,000,000,000
4
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
struct razer_report razer_chroma_extended_matrix_effect_starlight_single(unsigned char variable_storage, unsigned char led_id, unsigned char speed, struct razer_rgb *rgb1) { struct razer_report report = razer_chroma_extended_matrix_effect_base(0x09, variable_storage, led_id, 0x07); speed = clamp_u8(speed, 0x01...
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
192,636,807,637,791,260,000,000,000,000,000,000,000
14
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
R_API int r_bin_file_ref_by_bind(RBinBind *binb) { RBin *bin = binb? binb->bin: NULL; RBinFile *a = r_bin_cur (bin); return r_bin_file_ref (bin, a); }
0
[ "CWE-125" ]
radare2
3fcf41ed96ffa25b38029449520c8d0a198745f3
16,545,750,428,755,129,000,000,000,000,000,000,000
5
Fix #9902 - Fix oobread in RBin.string_scan_range
static int snd_nativeinstruments_create_mixer(struct usb_mixer_interface *mixer, const struct snd_kcontrol_new *kc, unsigned int count) { int i, err = 0; struct snd_kcontrol_new template = { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .access = SNDRV_CTL_ELEM_ACCESS_READWRITE, .get = snd_nativein...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
308,832,619,967,416,500,000,000,000,000,000,000,000
29
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...