func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
exif_mnote_data_fuji_set_byte_order (ExifMnoteData *d, ExifByteOrder o) { ExifByteOrder o_orig; ExifMnoteDataFuji *n = (ExifMnoteDataFuji *) d; unsigned int i; if (!n) return; o_orig = n->order; n->order = o; for (i = 0; i < n->count; i++) { if (n->entries[i].components && (n->entries[i].size/n->entries[i].c...
0
[ "CWE-125" ]
libexif
435e21f05001fb03f9f186fa7cbc69454afd00d1
144,793,503,592,761,420,000,000,000,000,000,000,000
18
Fix MakerNote tag size overflow issues at read time. Check for a size overflow while reading tags, which ensures that the size is always consistent for the given components and type of the entry, making checking further down superfluous. This provides an alternate fix for https://sourceforge.net/p/libexif/bugs/125/ C...
static int replmd_add(struct ldb_module *module, struct ldb_request *req) { struct ldb_context *ldb; struct ldb_control *control; struct replmd_replicated_request *ac; enum ndr_err_code ndr_err; struct ldb_request *down_req; struct ldb_message *msg; const DATA_BLOB *guid_blob; DATA_BLOB gui...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
208,040,273,024,159,270,000,000,000,000,000,000,000
369
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 srpt_cm_timewait_exit(struct ib_cm_id *cm_id) { pr_info("Received IB TimeWait exit for cm_id %p.\n", cm_id); srpt_drain_channel(cm_id); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
127,003,859,647,395,460,000,000,000,000,000,000,000
5
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static inline bool f2fs_may_extent_tree(struct inode *inode) { struct f2fs_sb_info *sbi = F2FS_I_SB(inode); if (!test_opt(sbi, EXTENT_CACHE) || is_inode_flag_set(inode, FI_NO_EXTENT)) return false; /* * for recovered files during mount do not create extents * if shrinker is not registered. */ if (list_...
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
39,470,720,822,477,420,000,000,000,000,000,000,000
17
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static inline uint16_t dns_rnd16(void) { if (!dns_query_id_seed) dns_query_id_seed = now_ms; dns_query_id_seed ^= dns_query_id_seed << 13; dns_query_id_seed ^= dns_query_id_seed >> 7; dns_query_id_seed ^= dns_query_id_seed << 17; return dns_query_id_seed; }
0
[ "CWE-125" ]
haproxy
efbbdf72992cd20458259962346044cafd9331c0
265,845,188,499,014,750,000,000,000,000,000,000,000
9
BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response() We need to make sure that the record length is not making us read past the end of the data we received. Before this patch we could for example read the 16 bytes corresponding to an AAAA record from the non-initialized part of the buffer, possibly acce...
static void io_ring_submit_unlock(struct io_ring_ctx *ctx, unsigned issue_flags) { lockdep_assert_held(&ctx->uring_lock); if (issue_flags & IO_URING_F_UNLOCKED) mutex_unlock(&ctx->uring_lock); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
188,592,986,229,387,100,000,000,000,000,000,000,000
6
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) { int i, n; unsigned int b; /* Prevent accidental use of encryption context when decrypting */ if (ctx->encrypt) { EVPerr(EVP_F_EVP_DECRYPTFINAL_EX, EVP_R_INVALID_OPERATION); return 0; } *outl = 0; ...
0
[ "CWE-190" ]
openssl
6a51b9e1d0cf0bf8515f7201b68fb0a3482b3dc1
154,755,475,818,838,330,000,000,000,000,000,000,000
62
Don't overflow the output length in EVP_CipherUpdate calls CVE-2021-23840 Reviewed-by: Paul Dale <pauli@openssl.org>
static inline bool nested_cpu_has_vmwrite_any_field(struct kvm_vcpu *vcpu) { return to_vmx(vcpu)->nested.msrs.misc_low & MSR_IA32_VMX_MISC_VMWRITE_SHADOW_RO_FIELDS; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
175,788,874,123,240,900,000,000,000,000,000,000,000
5
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
ccss_start_selector (CRDocHandler * a_handler, CRSelector * a_selector_list) { CSSUserData *user_data; g_return_if_fail (a_handler); user_data = (CSSUserData *) a_handler->app_data; cr_selector_ref (a_selector_list); user_data->selector = a_selector_list; }
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
184,889,704,344,222,430,000,000,000,000,000,000,000
10
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
*/ static inline void skb_frag_unref(struct sk_buff *skb, int f) { __skb_frag_unref(&skb_shinfo(skb)->frags[f]);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
233,169,855,528,553,700,000,000,000,000,000,000,000
4
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
lr_prepare_repodata_dir(LrHandle *handle, GError **err) { int rc; int create_repodata_dir = 1; char *path_to_repodata; path_to_repodata = lr_pathconcat(handle->destdir, "repodata", NULL); if (handle->update) { /* Check if should create repodata/ subdir */ struct st...
0
[ "CWE-22" ]
librepo
7daea2a2429a54dad68b1de9b37a5f65c5cf2600
300,283,080,499,502,100,000,000,000,000,000,000,000
33
Validate path read from repomd.xml (RhBug:1868639) = changelog = msg: Validate path read from repomd.xml type: security resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1868639
dump_all_config_trees( FILE *df, int comment ) { config_tree * cfg_ptr; int return_value; return_value = 0; for (cfg_ptr = cfg_tree_history; cfg_ptr != NULL; cfg_ptr = cfg_ptr->link) return_value |= dump_config_tree(cfg_ptr, df, comment); return return_value; }
0
[ "CWE-19" ]
ntp
fe46889f7baa75fc8e6c0fcde87706d396ce1461
102,107,206,439,515,000,000,000,000,000,000,000,000
16
[Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn.
static void ims_pcu_destroy_gamepad(struct ims_pcu *pcu) { struct ims_pcu_gamepad *gamepad = pcu->gamepad; input_unregister_device(gamepad->input); kfree(gamepad); }
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
174,273,031,256,078,820,000,000,000,000,000,000,000
7
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
int GetOctetString(const byte* input, word32* inOutIdx, int* len, word32 maxIdx) { return GetASNHeader(input, ASN_OCTET_STRING, inOutIdx, len, maxIdx); }
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
76,678,007,057,414,910,000,000,000,000,000,000,000
5
OCSP: improve handling of OCSP no check extension
static float ___draw_object3d(const CImg<t>& opacities, const unsigned int n_primitive) { return n_primitive<opacities._width?(float)opacities[n_primitive]:1.f; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
80,831,529,896,254,000,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.
main( int argc, char** argv ) { grEvent event; parse_cmdline( &argc, &argv ); /* Initialize engine */ handle = FTDemo_New( status.encoding ); handle->use_sbits = 0; FTDemo_Update_Current_Flags( handle ); for ( ; argc > 0; argc--, argv++ ) { error = FTDemo_Ins...
0
[ "CWE-120" ]
freetype2-demos
b995299b73ba4cd259f221f500d4e63095508bec
37,416,312,156,713,660,000,000,000,000,000,000,000
128
Fix Savannah bug #30054. * src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c, src/ftview.c: Use precision for `%s' where appropriate to avoid buffer overflows.
static int smack_unix_may_send(struct socket *sock, struct socket *other) { struct inode *sp = SOCK_INODE(sock); struct inode *op = SOCK_INODE(other); struct smk_audit_info ad; smk_ad_init(&ad, __func__, LSM_AUDIT_DATA_NET); smk_ad_setfield_u_net_sk(&ad, other->sk); return smk_access(smk_of_inode(sp), smk_of_ino...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
62,971,867,395,709,560,000,000,000,000,000,000,000
10
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static inline void clear_user_asce(void) { S390_lowcore.user_asce = S390_lowcore.kernel_asce; __ctl_load(S390_lowcore.user_asce, 1, 1); __ctl_load(S390_lowcore.user_asce, 7, 7); }
0
[ "CWE-20" ]
linux
3446c13b268af86391d06611327006b059b8bab1
289,483,331,055,431,150,000,000,000,000,000,000,000
7
s390/mm: four page table levels vs. fork The fork of a process with four page table levels is broken since git commit 6252d702c5311ce9 "[S390] dynamic page tables." All new mm contexts are created with three page table levels and an asce limit of 4TB. If the parent has four levels dup_mmap will add vmas to the new co...
x_catch_free_colors(Display * dpy, XErrorEvent * err) { if (err->request_code == X_FreeColors) return 0; return x_error_handler.orighandler(dpy, err); }
1
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
168,302,853,177,701,780,000,000,000,000,000,000,000
6
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
AsyncConnectionRef _lookup_conn(const entity_addr_t& k) { assert(lock.is_locked()); ceph::unordered_map<entity_addr_t, AsyncConnectionRef>::iterator p = conns.find(k); if (p == conns.end()) return NULL; // lazy delete, see "deleted_conns" Mutex::Locker l(deleted_lock); if (deleted_conns...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
114,273,495,427,749,100,000,000,000,000,000,000,000
16
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void unix_release_sock(struct sock *sk, int embrion) { struct unix_sock *u = unix_sk(sk); struct path path; struct sock *skpair; struct sk_buff *skb; int state; unix_remove_socket(sk); /* Clear state */ unix_state_lock(sk); sock_orphan(sk); sk->sk_shutdown = SHUTDOWN_MASK; path = u->path; u->p...
1
[]
net
7d267278a9ece963d77eefec61630223fce08c6c
203,232,560,662,303,500,000,000,000,000,000,000,000
71
unix: avoid use-after-free in ep_remove_wait_queue Rainer Weikusat <rweikusat@mobileactivedefense.com> writes: An AF_UNIX datagram socket being the client in an n:1 association with some server socket is only allowed to send messages to the server if the receive queue of this socket contains at most sk_max_ack_backlog...
int pipe_eof(int fd) { struct pollfd pollfd = { .fd = fd, .events = POLLIN|POLLHUP, }; int r; r = poll(&pollfd, 1, 0); if (r < 0) return -errno; if (r == 0) return 0; return pollfd.revents & POLLH...
0
[ "CWE-770" ]
systemd
084eeb865ca63887098e0945fb4e93c852b91b0f
116,746,607,127,023,980,000,000,000,000,000,000,000
17
journald: do not store the iovec entry for process commandline on stack This fixes a crash where we would read the commandline, whose length is under control of the sending program, and then crash when trying to create a stack allocation for it. CVE-2018-16864 https://bugzilla.redhat.com/show_bug.cgi?id=1653855 The ...
static void qcow2_close(BlockDriverState *bs) { BDRVQcowState *s = bs->opaque; g_free(s->l1_table); /* else pre-write overlap checks in cache_destroy may crash */ s->l1_table = NULL; if (!(bs->open_flags & BDRV_O_INCOMING)) { qcow2_cache_flush(bs, s->l2_table_cache); qcow2_cache_flu...
0
[ "CWE-476" ]
qemu
11b128f4062dd7f89b14abc8877ff20d41b28be9
317,403,527,138,420,400,000,000,000,000,000,000,000
25
qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146) The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots != 0. By having the initialisation of both fields separated in qcow2_open(), any error occuring in between would cause the error path to dereference NULL in qcow2_free_snapshot...
static int __init mcheck_debugfs_init(void) { return -EINVAL; }
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
198,927,752,313,188,700,000,000,000,000,000,000,000
1
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
static int ext4_journalled_write_end(struct file *file, struct address_space *mapping, loff_t pos, unsigned len, unsigned copied, struct page *page, void *fsdata) { handle_t *handle = ext4_journal_current_handle(); struct inode *inode = mapping->host; loff_t old_size = inode->i_size; int ...
0
[]
linux
8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44
270,926,179,554,911,700,000,000,000,000,000,000,000
80
ext4: fail ext4_iget for root directory if unallocated If the root directory has an i_links_count of zero, then when the file system is mounted, then when ext4_fill_super() notices the problem and tries to call iput() the root directory in the error return path, ext4_evict_inode() will try to free the inode on disk, b...
static void *ffs_acquire_dev(const char *dev_name) { struct ffs_dev *ffs_dev; ENTER(); ffs_dev_lock(); ffs_dev = _ffs_find_dev(dev_name); if (!ffs_dev) ffs_dev = ERR_PTR(-ENOENT); else if (ffs_dev->mounted) ffs_dev = ERR_PTR(-EBUSY); else if (ffs_dev->ffs_acquire_dev_callback && ffs_dev->ffs_acquire_d...
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
291,172,312,606,197,300,000,000,000,000,000,000,000
21
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
_gnutls_x509_der_encode(ASN1_TYPE src, const char *src_name, gnutls_datum_t * res, int str) { int size, result; int asize; uint8_t *data = NULL; ASN1_TYPE c2 = ASN1_TYPE_EMPTY; size = 0; result = asn1_der_coding(src, src_name, NULL, &size, NULL); /* this check explicitly covers the case where size == 0 && re...
0
[]
gnutls
272854367efc130fbd4f1a51840d80c630214e12
148,099,255,867,870,240,000,000,000,000,000,000,000
74
Reset the output value on error in _gnutls_x509_dn_to_string() Reported by Kurt Roeckx.
static int raw6_getfrag(void *from, char *to, int offset, int len, int odd, struct sk_buff *skb) { struct raw6_frag_vec *rfv = from; if (offset < rfv->hlen) { int copy = min(rfv->hlen - offset, len); if (skb->ip_summed == CHECKSUM_PARTIAL) memcpy(to, rfv->c + offset, copy); else skb->csum = csu...
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
291,741,820,755,790,820,000,000,000,000,000,000,000
30
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...
void yang_str2ipv4p(const char *value, union prefixptr prefix) { struct prefix_ipv4 *prefix4 = prefix.p4; (void)str2prefix_ipv4(value, prefix4); apply_mask_ipv4(prefix4); }
0
[ "CWE-119", "CWE-787" ]
frr
ac3133450de12ba86c051265fc0f1b12bc57b40c
102,127,277,005,348,340,000,000,000,000,000,000,000
7
isisd: fix #10505 using base64 encoding Using base64 instead of the raw string to encode the binary data. Signed-off-by: whichbug <whichbug@github.com>
ip_make_menu_embeddable(interp, menu_path) VALUE interp; VALUE menu_path; { VALUE argv[1]; argv[0] = menu_path; return tk_funcall(ip_make_menu_embeddable_core, 1, argv, interp); }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
31,523,919,447,242,000,000,000,000,000,000,000,000
9
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void add_pixels_clamped2_c(const int16_t *block, uint8_t *av_restrict pixels, int line_size) { int i; /* read the pixels */ for(i=0;i<2;i++) { pixels[0] = av_clip_uint8(pixels[0] + block[0]); pixels[1] = av_clip_uint8(pixels[1] + block[1]); pixels +=...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
288,000,084,358,044,440,000,000,000,000,000,000,000
13
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
BGD_DECLARE(void) gdImageWebp (gdImagePtr im, FILE * outFile) { gdIOCtx *out = gdNewFileCtx(outFile); if (out == NULL) { return; } gdImageWebpCtx(im, out, -1); out->gd_free(out); }
1
[ "CWE-415" ]
libgd
a49feeae76d41959d85ee733925a4cf40bac61b2
309,100,114,157,648,460,000,000,000,000,000,000,000
9
Fix double-free in gdImageWebPtr() The issue is that gdImageWebpCtx() (which is called by gdImageWebpPtr() and the other WebP output functions to do the real work) does not return whether it succeeded or failed, so this is not checked in gdImageWebpPtr() and the function wrongly assumes everything is okay, which is no...
isoent_rr_move_dir(struct archive_write *a, struct isoent **rr_moved, struct isoent *curent, struct isoent **newent) { struct iso9660 *iso9660 = a->format_data; struct isoent *rrmoved, *mvent, *np; if ((rrmoved = *rr_moved) == NULL) { struct isoent *rootent = iso9660->primary.rootent; /* There isn't rr_move...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
196,253,816,732,295,520,000,000,000,000,000,000,000
79
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
NAN_METHOD(DetectCharacterEncoding) { Nan::HandleScope scope; v8::Local<v8::Object> inputBuffer = info[0]->ToObject(); UCharsetDetector *charsetDetector; const UCharsetMatch *charsetMatch; UErrorCode errorCode = U_ZERO_ERROR; charsetDetector = ucsdet_open(&errorCode); if(U_FAILURE(errorCode)) { Nan::ThrowE...
1
[ "CWE-755" ]
detect-character-encoding
992a11007fff6cfd40b952150ab8d30410c4a20a
190,770,535,096,398,050,000,000,000,000,000,000,000
60
Return null if no charset matches Fixes a segmentation fault if no charset matches. According to http://icu-project.org/apiref/icu4c/ucsdet_8h.html#aff2633b5055d472cff4108d94f97cf7d, ucsdet_detect() may return NULL if no charset matches. Fixes: #15 Co-authored-by: chenzhip <letme2010@gmail.com>
_g_ptr_array_binary_search (GPtrArray *array, gpointer value, GCompareFunc func) { int l, r, p, cmp = -1; l = 0; r = array->len; while (l < r) { p = l + ((r - l) / 2); cmp = func(value, &g_ptr_array_index (array, p)); if (cmp == 0) return p; else if (cmp < 0) r = p; else l =...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
157,853,067,935,804,210,000,000,000,000,000,000,000
21
libarchive: sanitize filenames before extracting
do_linkup(struct module *mp, struct node *np) { struct module_import *mip; struct node *onp, *oldp, *newp; struct tree *tp; int i, more; /* * All modules implicitly import * the roots of the tree */ if (snmp_get_do_debugging() > 1) dump_module_list(); ...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
237,940,167,869,327,360,000,000,000,000,000,000,000
135
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.
smb2_new_read_req(void **buf, unsigned int *total_len, struct cifs_io_parms *io_parms, unsigned int remaining_bytes, int request_type) { int rc = -EACCES; struct smb2_read_plain_req *req = NULL; struct smb2_sync_hdr *shdr; rc = smb2_plain_req_init(SMB2_READ, io_parms->tcon, (void **) &req, total_len);...
0
[ "CWE-476" ]
linux
cabfb3680f78981d26c078a26e5c748531257ebb
131,899,300,182,589,560,000,000,000,000,000,000,000
54
CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
GF_Err mvex_box_write(GF_Box *s, GF_BitStream *bs) { return gf_isom_box_write_header(s, bs); }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
244,240,676,300,692,750,000,000,000,000,000,000,000
4
fixed #1587
string_expand_home (const char *path) { char *ptr_home, *str; int length; if (!path) return NULL; if (!path[0] || (path[0] != '~') || ((path[1] && path[1] != DIR_SEPARATOR_CHAR))) { return strdup (path); } ptr_home = getenv ("HOME"); length = strlen (ptr_home)...
0
[ "CWE-20" ]
weechat
efb795c74fe954b9544074aafcebb1be4452b03a
339,756,623,835,514,930,000,000,000,000,000,000,000
25
core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764)
LUA_API int lua_resume (lua_State *L, lua_State *from, int nargs, int *nresults) { int status; lua_lock(L); if (L->status == LUA_OK) { /* may be starting a coroutine */ if (L->ci != &L->base_ci) /* not in base level? */ return resume_error(L, "cannot resume non-su...
0
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
6298903e35217ab69c279056f925fb72900ce0b7
149,503,134,931,167,800,000,000,000,000,000,000,000
38
Keep minimum size when shrinking a stack When shrinking a stack (during GC), do not make it smaller than the initial stack size.
static bool may_access_direct_pkt_data(struct bpf_verifier_env *env, const struct bpf_call_arg_meta *meta, enum bpf_access_type t) { switch (env->prog->type) { case BPF_PROG_TYPE_LWT_IN: case BPF_PROG_TYPE_LWT_OUT: case BPF_PROG_TYPE_LWT_SEG6LOCAL: case BPF_PROG_TYPE_SK_REUSEPORT: /* dst_in...
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
75,859,703,296,849,740,000,000,000,000,000,000,000
28
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
static irqreturn_t i40e_fdir_clean_ring(int irq, void *data) { struct i40e_q_vector *q_vector = data; struct i40e_vsi *vsi; if (!q_vector->tx.ring) return IRQ_HANDLED; vsi = q_vector->tx.ring->vsi; i40e_clean_fdir_tx_irq(q_vector->tx.ring, vsi->work_limit); return IRQ_HANDLED; }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
292,757,120,218,317,820,000,000,000,000,000,000,000
13
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
parse_pages_options( int argc, char* argv[], int& cur_arg) { std::vector<PageSpec> result; while (1) { if ((cur_arg < argc) && (strcmp(argv[cur_arg], "--") == 0)) { break; } if (cur_arg + 1 >= argc) { usage("insufficient arguments to --page...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
124,130,792,545,825,510,000,000,000,000,000,000,000
70
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
static void perf_pmu_sched_task(struct task_struct *prev, struct task_struct *next, bool sched_in) { struct perf_cpu_context *cpuctx; struct pmu *pmu; if (prev == next) return; list_for_each_entry(cpuctx, this_cpu_ptr(&sched_cb_list), sched_cb_entry) { pmu = cpuctx->ctx.pmu; /* software PMUs will not ...
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
111,775,243,590,450,600,000,000,000,000,000,000,000
25
perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun ...
rsvg_xinclude_handler_end (RsvgSaxHandler * self, const char *name) { RsvgSaxHandlerXinclude *z = (RsvgSaxHandlerXinclude *) self; RsvgHandle *ctx = z->ctx; if (!strcmp (name, "include") || !strcmp (name, "xi:include")) { if (ctx->priv->handler != NULL) { RsvgSaxHandler *previous_handle...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
261,679,436,427,250,080,000,000,000,000,000,000,000
18
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
static void setup_msrs(struct vcpu_vmx *vmx) { vmx->guest_uret_msrs_loaded = false; vmx->nr_active_uret_msrs = 0; #ifdef CONFIG_X86_64 /* * The SYSCALL MSRs are only needed on long mode guests, and only * when EFER.SCE is set. */ if (is_long_mode(&vmx->vcpu) && (vmx->vcpu.arch.efer & EFER_SCE)) { vmx_setup_...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
130,051,104,172,941,510,000,000,000,000,000,000,000
26
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
Item_in_subselect::select_in_like_transformer(JOIN *join) { Query_arena *arena= 0, backup; SELECT_LEX *current= thd->lex->current_select; const char *save_where= thd->where; bool trans_res= true; bool result; DBUG_ENTER("Item_in_subselect::select_in_like_transformer"); DBUG_ASSERT(thd == join->thd); /...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
65,331,715,122,790,940,000,000,000,000,000,000,000
84
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
MagickExport Window XWindowByName(Display *display,const Window root_window, const char *name) { register int i; Status status; unsigned int number_children; Window *children, child, window; XTextProperty window_name; assert(display != (Display *) NULL); assert(root_wind...
0
[ "CWE-401" ]
ImageMagick6
13801f5d0bd7a6fdb119682d34946636afdb2629
62,912,620,701,075,760,000,000,000,000,000,000,000
45
https://github.com/ImageMagick/ImageMagick/issues/1531
static int build_audio_procunit(struct mixer_build *state, int unitid, void *raw_desc, struct procunit_info *list, bool extension_unit) { struct uac_processing_unit_descriptor *desc = raw_desc; int num_ins; struct usb_mixer_elem_info *cval; struct snd_kcontrol *kctl; int i, err, nameid, type, len; struct ...
0
[ "CWE-674" ]
sound
19bce474c45be69a284ecee660aa12d8f1e88f18
119,580,819,966,543,810,000,000,000,000,000,000,000
161
ALSA: usb-audio: Fix a stack buffer overflow bug in check_input_term `check_input_term` recursively calls itself with input from device side (e.g., uac_input_terminal_descriptor.bCSourceID) as argument (id). In `check_input_term`, if `check_input_term` is called with the same `id` argument as the caller, it triggers e...
static nfa_state_t *re_to_nfa(rtn_ctx_t &ctx, const RE *re, nfa_state_t *t) { nfa_t &nfa = ctx.nfa; const size_t nrule = ctx.nrule; nfa_state_t *s = NULL; switch (re->type) { case RE::NIL: s = t; break; case RE::SYM: s = &nfa.states[nfa.size++]; ...
0
[ "CWE-787" ]
re2c
a3473fd7be829cb33907cb08612f955133c70a96
181,489,222,325,575,980,000,000,000,000,000,000,000
70
Limit maximum allowed NFA and DFA size. Instead of failing with an out of memory exception or crashing with a stack overflow, emit an error message and exit. This is a partial fix for bug #394 "Stack overflow due to recursion in src/dfa/dead_rules.cc", where re2c hit stack overflow on a counted repetition regexp with ...
static void kvm_build_io_pmt(struct kvm *kvm) { unsigned long i, j; /* Mark I/O ranges */ for (i = 0; i < (sizeof(io_ranges) / sizeof(struct kvm_io_range)); i++) { for (j = io_ranges[i].start; j < io_ranges[i].start + io_ranges[i].size; j += PAGE_SIZE) kvm_set_pmt_entry(kvm, j >> PAGE_SHIFT, ...
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
269,332,711,952,217,100,000,000,000,000,000,000,000
15
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
static void irda_connect_confirm(void *instance, void *sap, struct qos_info *qos, __u32 max_sdu_size, __u8 max_header_size, struct sk_buff *skb) { struct irda_sock *self; struct sock *sk; self = instance; IRDA_DEBUG(2, "%s(%p)\n", __func__, self); sk = instance; if (sk == NULL) { dev_kfree_skb...
0
[ "CWE-200" ]
linux-2.6
09384dfc76e526c3993c09c42e016372dc9dd22c
270,803,637,583,656,200,000,000,000,000,000,000,000
58
irda: Fix irda_getname() leak irda_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static void fastrpc_channel_ctx_free(struct kref *ref) { struct fastrpc_channel_ctx *cctx; cctx = container_of(ref, struct fastrpc_channel_ctx, refcount); kfree(cctx); }
0
[ "CWE-400", "CWE-401" ]
linux
fc739a058d99c9297ef6bfd923b809d85855b9a9
164,205,683,435,613,750,000,000,000,000,000,000,000
8
misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory for a should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com Signed-off-by: Greg...
drv_screen_init(SCREEN *sp) { TERMINAL_CONTROL_BLOCK *TCB = TCBOf(sp); AssertTCB(); /* * Check for mismatched graphic-rendition capabilities. Most SVr4 * terminfo trees contain entries that have rmul or rmso equated to * sgr0 (Solaris curses copes with those entries). We do this only ...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
152,077,044,551,931,880,000,000,000,000,000,000,000
37
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
void ListModulesFor(CModules& Modules) { CTable Table; Table.AddColumn(t_s("Name", "listmodules")); Table.AddColumn(t_s("Arguments", "listmodules")); for (const CModule* pMod : Modules) { Table.AddRow(); Table.SetCell(t_s("Name", "listmodules"), pMod->GetModN...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
278,948,354,706,390,020,000,000,000,000,000,000,000
13
Don't crash if user specified invalid encoding. This is CVE-2019-9917
_equalArrayRef(const ArrayRef *a, const ArrayRef *b) { COMPARE_SCALAR_FIELD(refarraytype); COMPARE_SCALAR_FIELD(refelemtype); COMPARE_SCALAR_FIELD(reftypmod); COMPARE_SCALAR_FIELD(refcollid); COMPARE_NODE_FIELD(refupperindexpr); COMPARE_NODE_FIELD(reflowerindexpr); COMPARE_NODE_FIELD(refexpr); COMPARE_NODE_FIEL...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
49,240,814,094,887,130,000,000,000,000,000,000,000
13
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
static int readAPListRid(struct airo_info *ai, APListRid *aplr) { return PC4500_readrid(ai, RID_APLIST, aplr, sizeof(*aplr), 1); }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
241,204,464,933,387,340,000,000,000,000,000,000,000
4
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...
poolAppend(STRING_POOL *pool, const ENCODING *enc, const char *ptr, const char *end) { if (!pool->ptr && !poolGrow(pool)) return NULL; for (;;) { const enum XML_Convert_Result convert_res = XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end); if ((convert_res == XML_CONVERT...
0
[ "CWE-190" ]
libexpat
d4f735b88d9932bd5039df2335eefdd0723dbe20
241,549,361,548,523,400,000,000,000,000,000,000,000
14
Detect integer overflow (CVE-2016-9063) Needs XML_CONTEXT_BYTES to be _undefined_ to trigger, default is defined and set to 1024. Previously patched downstream, e.g. https://sources.debian.net/src/expat/2.2.0-2/debian/patches/CVE-2016-9063.patch/ https://bug1274777.bmoattachments.org/attachment.cgi?id=8755538 This v...
get_line (void) { return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr, p_pass_comments_through); }
0
[ "CWE-59" ]
patch
44a987e02f04b9d81a0db4a611145cad1093a2d3
48,826,885,242,184,080,000,000,000,000,000,000,000
5
Add line number overflow checking * bootstrap.conf: use intprops module. * src/common.h: Define LINENUM_MIN and LINENUM_MAX macros. * src/pch.c (another_hunk): Add line number overflow checking. Based on Robert C. Seacord's INT32-C document for integer overflow checking and Tobias Stoeckmann's "integer overflows and ...
TABLE_CATEGORY get_table_category(const LEX_STRING *db, const LEX_STRING *name) { DBUG_ASSERT(db != NULL); DBUG_ASSERT(name != NULL); if (is_infoschema_db(db->str, db->length)) return TABLE_CATEGORY_INFORMATION; if ((db->length == PERFORMANCE_SCHEMA_DB_NAME.length) && (my_strcasecmp(system_charset_i...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
238,780,583,878,118,200,000,000,000,000,000,000,000
37
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...
static bool consumer_del(struct uprobe *uprobe, struct uprobe_consumer *uc) { struct uprobe_consumer **con; bool ret = false; down_write(&uprobe->consumer_rwsem); for (con = &uprobe->consumers; *con; con = &(*con)->next) { if (*con == uc) { *con = uc->next; ret = true; break; } } up_write(&uprobe->c...
0
[ "CWE-416" ]
linux
355627f518978b5167256d27492fe0b343aaf2f2
20,102,039,614,288,768,000,000,000,000,000,000,000
17
mm, uprobes: fix multiple free of ->uprobes_state.xol_area Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new error p...
static void _progress_coll_ring(pmixp_coll_ring_ctx_t *coll_ctx) { int ret = 0; pmixp_coll_t *coll = _ctx_get_coll(coll_ctx); pmixp_coll_ring_ctx_sanity_check(coll_ctx); do { ret = false; switch(coll_ctx->state) { case PMIXP_COLL_RING_SYNC: if (coll_ctx->contrib_local || coll_ctx->contrib_prev) { col...
0
[ "CWE-120" ]
slurm
c3142dd87e06621ff148791c3d2f298b5c0b3a81
128,699,824,584,255,820,000,000,000,000,000,000,000
44
PMIx - fix potential buffer overflows from use of unpackmem(). CVE-2020-27745.
static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, const char *mycert, const char *mypkey, const char *cafile, const char *capath, gboolean verify) { GIOSSLChannel *chan; GIOChannel *gchan; int fd; SSL *ssl; SSL_CTX *ctx = NULL; g_return_val_if_fail(handle != NULL, NULL); if(!ssl_ctx && !irssi_ssl_...
1
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
37,430,614,491,400,536,000,000,000,000,000,000,000
94
Check if an SSL certificate matches the hostname of the server we are connecting to git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564
void __io_uring_free(struct task_struct *tsk) { struct io_uring_task *tctx = tsk->io_uring; WARN_ON_ONCE(!xa_empty(&tctx->xa)); WARN_ON_ONCE(tctx->io_wq); WARN_ON_ONCE(tctx->cached_refs); kfree(tctx->registered_rings); percpu_counter_destroy(&tctx->inflight); kfree(tctx); tsk->io_uring = NULL;
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
237,366,897,002,493,160,000,000,000,000,000,000,000
13
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static int cancel_unpack_extension_callback(nghttp2_session *session, void **payload, const nghttp2_frame_hd *hd, void *user_data) { (void)session; (void)payload; (void)hd; (void)u...
0
[]
nghttp2
0a6ce87c22c69438ecbffe52a2859c3a32f1620f
339,540,616,884,726,000,000,000,000,000,000,000,000
11
Add nghttp2_option_set_max_outbound_ack
gchar *conv_filename_from_utf8(const gchar *utf8_file) { gchar *fs_file; GError *error = NULL; fs_file = g_filename_from_utf8(utf8_file, -1, NULL, NULL, &error); if (error) { debug_print("failed to convert encoding of file name: %s\n", error->message); g_error_free(error); } if (!fs_file) fs_file = g_...
0
[ "CWE-119" ]
claws
d390fa07f5548f3173dd9cc13b233db5ce934c82
310,360,160,921,966,900,000,000,000,000,000,000,000
16
Make sure we don't run out of the output buffer. Maybe fixes bug #3557
translate_compat_table(const char *name, unsigned int valid_hooks, struct xt_table_info **pinfo, void **pentry0, unsigned int total_size, unsigned int number, unsigned int *hook_entries, unsigned int *underflows) { unsigned int i; struct xt_table_info *newinfo, *info; void *pos, *entry0, *entry1; unsi...
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
53,023,342,842,039,880,000,000,000,000,000,000,000
105
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
create_device (ClutterDeviceManagerXI2 *manager_xi2, ClutterBackendX11 *backend_x11, XIDeviceInfo *info) { ClutterInputDeviceType source, touch_source; ClutterInputDevice *retval; ClutterInputMode mode; gboolean is_enabled; guint num_touches = 0; if (info->use...
0
[ "CWE-264" ]
clutter
e310c68d7b38d521e341f4e8a36f54303079d74e
106,965,987,655,231,460,000,000,000,000,000,000,000
80
x11: trap errors when calling XIQueryDevice Devices can disappear at any time, causing XIQueryDevice to throw an error. At the same time, plug a memory leak. https://bugzilla.gnome.org/show_bug.cgi?id=701974
save_funccal(funccal_entry_T *entry) { entry->top_funccal = current_funccal; entry->next = funccal_stack; funccal_stack = entry; current_funccal = NULL; }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
231,382,939,346,507,240,000,000,000,000,000,000,000
7
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
gx_get_largest_clipping_box(gx_device * dev, gs_fixed_rect * pbox) { pbox->p.x = min_fixed; pbox->p.y = min_fixed; pbox->q.x = max_fixed; pbox->q.y = max_fixed; }
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
162,930,858,636,124,290,000,000,000,000,000,000,000
7
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
MonoMethodSignature * mono_reflection_lookup_signature (MonoImage *image, MonoMethod *method, guint32 token) { MonoMethodSignature *sig; g_assert (image->dynamic); sig = g_hash_table_lookup (((MonoDynamicImage*)image)->vararg_aux_hash, GUINT_TO_POINTER (token)); if (sig) return sig; return mono_method_signatur...
0
[ "CWE-20" ]
mono
65292a69c837b8a5f7a392d34db63de592153358
298,320,148,780,933,780,000,000,000,000,000,000,000
11
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
static int xfrm_alloc_userspi(struct sk_buff *skb, struct nlmsghdr *nlh, struct nlattr **attrs) { struct net *net = sock_net(skb->sk); struct xfrm_state *x; struct xfrm_userspi_info *p; struct sk_buff *resp_skb; xfrm_address_t *daddr; int family; int err; u32 mark; struct xfrm_mark m; p = nlmsg_data(nlh); ...
0
[ "CWE-200" ]
linux
1f86840f897717f86d523a13e99a447e6a5d2fa5
250,745,541,707,567,350,000,000,000,000,000,000,000
58
xfrm_user: fix info leak in copy_to_user_tmpl() The memory used for the template copy is a local stack variable. As struct xfrm_user_tmpl contains multiple holes added by the compiler for alignment, not initializing the memory will lead to leaking stack bytes to userland. Add an explicit memset(0) to avoid the info le...
alert_match_text (char *text, char *masks) { unsigned char *p = text; unsigned char endchar; int res; if (masks[0] == 0) return FALSE; while (1) { if (*p >= '0' && *p <= '9') { p++; continue; } /* if it's RFC1459 <special>, it can be inside a word */ switch (*p) { case '-': case '[': case...
0
[ "CWE-22" ]
hexchat
4e061a43b3453a9856d34250c3913175c45afe9d
324,688,070,343,081,040,000,000,000,000,000,000,000
48
Clean up handling CAP LS
static u64 btrfs_dev_stats_value(const struct extent_buffer *eb, const struct btrfs_dev_stats_item *ptr, int index) { u64 val; read_extent_buffer(eb, &val, offsetof(struct btrfs_dev_stats_item, values) + ((unsigned long)ptr) + (index * sizeof(u64)), sizeof(val)); return val; }
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
314,353,122,204,721,560,000,000,000,000,000,000,000
12
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 bool idling_boosts_thr_without_issues(struct bfq_data *bfqd, struct bfq_queue *bfqq) { bool rot_without_queueing = !blk_queue_nonrot(bfqd->queue) && !bfqd->hw_tag, bfqq_sequential_and_IO_bound, idling_boosts_thr; /* No point in idling for bfqq if it won't get requests any longer */ if (unlik...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
174,636,819,163,564,940,000,000,000,000,000,000,000
78
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
static void sc_usage(void) { BIO_printf(bio_err,"usage: s_client args\n"); BIO_printf(bio_err,"\n"); BIO_printf(bio_err," -host host - use -connect instead\n"); BIO_printf(bio_err," -port port - use -connect instead\n"); BIO_printf(bio_err," -connect host:port - connect over TCP/IP (default is %s:%s)\n",S...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
246,224,229,297,819,900,000,000,000,000,000,000,000
92
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static int bearer_ctl_send_unacked(struct net_buf *buf) { if (!buf) { return -ENOMEM; } prov_clear_tx(); k_work_reschedule(&link.prot_timer, PROTOCOL_TIMEOUT); bt_mesh_adv_send(buf, &buf_sent_cb, NULL); net_buf_unref(buf); return 0; }
0
[ "CWE-787" ]
zephyr
6ec31c852049641095f2cdf25591f2e1bff86774
166,435,197,114,256,550,000,000,000,000,000,000,000
14
Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU When receiving Transaction Start PDU, assure that number of segments needed to send a Provisioning PDU with TotalLength size is equal to SegN value provided in the Transaction Start PDU. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no> (cher...
CImg<Tfloat> get_structure_tensors(const bool is_fwbw_scheme=false) const { if (is_empty()) return *this; CImg<Tfloat> res; if (_depth>1) { // 3D res.assign(_width,_height,_depth,6,0); if (!is_fwbw_scheme) { // Classical central finite differences cimg_pragma_openmp(paral...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
335,299,559,526,529,040,000,000,000,000,000,000,000
84
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void brcmf_escan_prep(struct brcmf_cfg80211_info *cfg, struct brcmf_scan_params_le *params_le, struct cfg80211_scan_request *request) { u32 n_ssids; u32 n_channels; s32 i; s32 offset; u16 chanspec; char *ptr; struct brcmf_ssid_le ssid_le; eth_broadcast_addr(params_le->bssid); params_le-...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
173,709,968,288,839,140,000,000,000,000,000,000,000
80
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 bool io_poll_remove_all(struct io_ring_ctx *ctx, struct task_struct *tsk, bool cancel_all) { struct hlist_node *tmp; struct io_kiocb *req; int posted = 0, i; spin_lock_irq(&ctx->completion_lock); for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) { struct hlist_head *list; list = &ctx->...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
246,491,754,392,446,460,000,000,000,000,000,000,000
24
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...
irc_server_login (struct t_irc_server *server) { const char *capabilities; char *password, *username, *realname, *username2; password = irc_server_eval_expression ( server, IRC_SERVER_OPTION_STRING(server, IRC_SERVER_OPTION_PASSWORD)); username = irc_server_eval_expression ( ser...
0
[ "CWE-120", "CWE-787" ]
weechat
40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f
234,813,634,411,100,130,000,000,000,000,000,000,000
72
irc: fix crash when a new message 005 is received with longer nick prefixes Thanks to Stuart Nevans Locke for reporting the issue.
static void JPEGSourceManager(j_decompress_ptr cinfo,Image *image) { SourceManager *source; cinfo->src=(struct jpeg_source_mgr *) (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo,JPOOL_IMAGE,sizeof(SourceManager)); source=(SourceManager *) cinfo->src; source->buffer=(JOCTET *) (*cinfo->mem->alloc_small...
0
[ "CWE-416" ]
ImageMagick
39f226a9c137f547e12afde972eeba7551124493
104,160,569,623,489,570,000,000,000,000,000,000,000
20
https://github.com/ImageMagick/ImageMagick/issues/1641
static HashTable* make_persistent_sdl_function_faults(sdlFunctionPtr func, HashTable *faults, HashTable *ptr_map) { HashTable *pfaults; sdlFaultPtr tmp, pfault; zend_string *key; pfaults = malloc(sizeof(HashTable)); zend_hash_init(pfaults, zend_hash_num_elements(faults), NULL, delete_fault_persistent, 1); ZEND_...
0
[ "CWE-476" ]
php-src
3c939e3f69955d087e0bb671868f7267dfb2a502
124,360,600,627,331,830,000,000,000,000,000,000,000
44
Fix bug #80672 - Null Dereference in SoapClient
cJSON *cJSON_GetObjectItem( cJSON *object, const char *string ) { cJSON *c = object->child; while ( c && cJSON_strcasecmp( c->string, string ) ) c = c->next; return c; }
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
17,003,179,773,241,696,000,000,000,000,000,000,000
7
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
static int call_extract_if_dead(struct connectdata *conn, void *param) { struct prunedead *p = (struct prunedead *)param; if(extract_if_dead(conn, p->data)) { /* stop the iteration here, pass back the connection that was extracted */ p->extracted = conn; return 1; } return 0; /* continue iteration *...
0
[ "CWE-416" ]
curl
81d135d67155c5295b1033679c606165d4e28f3f
292,265,107,292,205,900,000,000,000,000,000,000,000
10
Curl_close: clear data->multi_easy on free to avoid use-after-free Regression from b46cfbc068 (7.59.0) CVE-2018-16840 Reported-by: Brian Carpenter (Geeknik Labs) Bug: https://curl.haxx.se/docs/CVE-2018-16840.html
PS_CREATE_SID_FUNC(files) { char *sid; PS_FILES_DATA; sid = php_session_create_id((void **)&data, newlen TSRMLS_CC); return sid; }
1
[ "CWE-264" ]
php-src
82b0e8be99065b61b622df21bbc7494d2fbca3cd
209,735,556,622,839,000,000,000,000,000,000,000,000
9
Strict session. Detect session id collision
static int shift_data(AVFormatContext *s) { int ret = 0, moov_size; MOVMuxContext *mov = s->priv_data; int64_t pos, pos_end = avio_tell(s->pb); uint8_t *buf, *read_buf[2]; int read_buf_id = 0; int read_size[2]; AVIOContext *read_pb; if (mov->flags & FF_MOV_FLAG_FRAGMENT) moov_si...
0
[ "CWE-125" ]
FFmpeg
95556e27e2c1d56d9e18f5db34d6f756f3011148
18,042,999,859,283,173,000,000,000,000,000,000,000
65
avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample Fixes: out of array read Fixes: ffmpeg_crash_8.avi Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int tls1_export_keying_material(SSL *s, unsigned char *out, size_t olen, const char *label, size_t llen, const unsigned char *context, size_t contextlen, int use_context) { unsigned char *buff; unsigned char *val = NULL; size_t vallen, currentvalpos; int rv; #ifdef KSSL_DEBUG printf ("tls1_export_keying_mate...
0
[ "CWE-310" ]
openssl
cf6da05304d554aaa885151451aa4ecaa977e601
125,270,274,309,114,260,000,000,000,000,000,000,000
88
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
bool getdata_pair(IStream & in, DataPair & d, String & buf) { char * p; // get first non blank line and count all read ones do { buf.clear(); buf.append('\0'); // to avoid some special cases if (!in.append_line(buf)) return false; d.line_num++; p = buf.mstr() + 1; wh...
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
281,104,444,677,888,740,000,000,000,000,000,000,000
45
Fix various bugs found by OSS-Fuze.
bool kthread_cancel_delayed_work_sync(struct kthread_delayed_work *dwork) { return __kthread_cancel_work_sync(&dwork->work, true); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
313,551,258,335,150,400,000,000,000,000,000,000,000
4
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...
const void *SSL_get_current_expansion(SSL *s) { return NULL; }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
328,681,430,283,867,730,000,000,000,000,000,000,000
4
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
brcmf_msgbuf_rxbuf_data_fill(struct brcmf_msgbuf *msgbuf) { u32 fillbufs; u32 retcount; fillbufs = msgbuf->max_rxbufpost - msgbuf->rxbufpost; while (fillbufs) { retcount = brcmf_msgbuf_rxbuf_data_post(msgbuf, fillbufs); if (!retcount) break; msgbuf->rxbufpost += retcount; fillbufs -= retcount; } }
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
75,955,623,831,465,280,000,000,000,000,000,000,000
15
brcmfmac: add subtype check for event handling in data path For USB there is no separate channel being used to pass events from firmware to the host driver and as such are passed over the data path. In order to detect mock event messages an additional check is needed on event subtype. This check is added conditionally...
static Bigint * mult(Bigint *a, Bigint *b) { Bigint *c; int k, wa, wb, wc; ULong carry, y, z; ULong *x, *xa, *xae, *xb, *xbe, *xc, *xc0; #ifdef Pack_32 ULong z2; #endif if (a->wds < b->wds) { c = a; a = b; b = c; } k = a->k; wa = a->wds; wb = b->wds; wc = wa + wb; if (wc > a->maxwds) { k++; } c =...
0
[ "CWE-119" ]
php-src
37da90248deb2188e8ee50e4753ad6340679b425
166,404,119,619,622,400,000,000,000,000,000,000,000
83
Added missing allocation checks
static struct fdtable * alloc_fdtable(unsigned int nr) { struct fdtable *fdt; void *data; /* * Figure out how many fds we actually want to support in this fdtable. * Allocation steps are keyed to the size of the fdarray, since it * grows far faster than any of the other dynamic data. We try to fit * the fda...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
20,702,409,758,773,809,000,000,000,000,000,000,000
55
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
save_file_ff(buf_T *buf) { buf->b_start_ffc = *buf->b_p_ff; buf->b_start_eol = buf->b_p_eol; #ifdef FEAT_MBYTE buf->b_start_bomb = buf->b_p_bomb; /* Only use free/alloc when necessary, they take time. */ if (buf->b_start_fenc == NULL || STRCMP(buf->b_start_fenc, buf->b_p_fenc) != 0) { ...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
186,954,252,096,220,600,000,000,000,000,000,000,000
16
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd, uchar *arg) { st_select_lex *sel= (st_select_lex *)arg; Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel); if (gr_field) { Item *producing_clone= ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
49,617,010,208,778,040,000,000,000,000,000,000,000
15
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.
Ssl::ConnectionInfoConstSharedPtr upstreamSslConnection() const override { return upstream_ssl_info_; }
0
[ "CWE-416" ]
envoy
fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab
330,909,459,504,001,700,000,000,000,000,000,000,000
3
internal redirect: fix a lifetime bug (#785) Signed-off-by: Alyssa Wilk <alyssar@chromium.org> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
int pathjoin(char **path, int nseg, ...) { va_list ap; va_start(ap, nseg); for (int i=0; i < nseg; i++) { const char *seg = va_arg(ap, const char *); if (seg == NULL) seg = "()"; int len = strlen(seg) + 1; if (*path != NULL) { len += strlen(*path) + ...
0
[]
augeas
1a66739c3fc14b3257af5d4a32d0a2a714a7b39d
239,807,551,227,697,870,000,000,000,000,000,000,000
30
* src/transform.c (xread_file): catch failed fopen, e.g. EACCES
HttpHeader::findLastEntry(Http::HdrType id) const { assert(any_registered_header(id)); assert(!Http::HeaderLookupTable.lookup(id).list); /* check mask first */ if (!CBIT_TEST(mask, id)) return NULL; for (auto e = entries.rbegin(); e != entries.rend(); ++e) { if (*e && (*e)->id == i...
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
237,423,905,636,166,080,000,000,000,000,000,000,000
18
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
/* Return a string description of the given error */ inline const char * http_errno_description(enum http_errno err) { /* Map errno values to strings for human-readable output */ #define CROW_HTTP_STRERROR_GEN(n, s) { "CHPE_" #n, s }, static struct { const char *name; const char *description; } http_strerror_tab[] ...
0
[ "CWE-416" ]
Crow
fba01dc76d6ea940ad7c8392e8f39f9647241d8e
225,328,462,903,911,700,000,000,000,000,000,000,000
13
Prevent HTTP pipelining which Crow doesn't support.