func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void tracing_stop(void) { struct ring_buffer *buffer; unsigned long flags; raw_spin_lock_irqsave(&global_trace.start_lock, flags); if (global_trace.stop_count++) goto out; /* Prevent the buffers from switching */ arch_spin_lock(&global_trace.max_lock); buffer = global_trace.trace_buffer.buffer; if (buffer)...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
191,521,756,748,611,250,000,000,000,000,000,000,000
27
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
static MagickBooleanType TIFFGetGPSProperties(TIFF *tiff,Image *image) { #if defined(MAGICKCORE_HAVE_TIFFREADGPSDIRECTORY) MagickBooleanType status; tdir_t directory; #if defined(TIFF_VERSION_BIG) uint64 #else uint32 #endif offset; /* Read GPS properties. */ offset=0; if (TIFFGetField...
0
[ "CWE-401" ]
ImageMagick6
cd7f9fb7751b0d59d5a74b12d971155caad5a792
330,653,155,226,919,360,000,000,000,000,000,000,000
37
https://github.com/ImageMagick/ImageMagick/issues/3540
static __net_exit void pppoe_exit_net(struct net *net) { remove_proc_entry("pppoe", net->proc_net); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
109,151,204,635,625,390,000,000,000,000,000,000,000
4
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
void avpriv_color_frame(AVFrame *frame, const int c[4]) { const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(frame->format); int p, y, x; av_assert0(desc->flags & AV_PIX_FMT_FLAG_PLANAR); for (p = 0; p<desc->nb_components; p++) { uint8_t *dst = frame->data[p]; int is_chroma = p == 1 ...
0
[ "CWE-703" ]
FFmpeg
e5c7229999182ad1cef13b9eca050dba7a5a08da
242,357,499,405,082,350,000,000,000,000,000,000,000
22
avcodec/utils: set AVFrame format unconditional Fixes inconsistency and out of array accesses Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static struct sc_card_driver * sc_get_driver(void) { /* Inherit most of the things from the CAC driver */ struct sc_card_driver *cac_drv = sc_get_cac_driver(); cac_ops = *cac_drv->ops; cac_ops.match_card = cac_match_card; cac_ops.init = cac_init; cac_ops.finish = cac_finish; cac_ops.select_file = cac_select_f...
0
[ "CWE-119", "CWE-787" ]
OpenSC
b75c002cfb1fd61cd20ec938ff4937d7b1a94278
323,552,297,020,414,850,000,000,000,000,000,000,000
15
cac1: Correctly handle the buffer limits Found by oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18618 and others
PJ_DEF(pj_status_t) pjmedia_sdp_attr_remove( unsigned *count, pjmedia_sdp_attr *attr_array[], pjmedia_sdp_attr *attr ) { unsigned i, removed=0; PJ_ASSERT_RETURN(count && attr_array && attr, PJ_EINVAL); PJ_ASSERT_RETURN(*count <= PJMEDIA_MAX_SDP_ATTR, PJ_ETOOMANY); for (i=0; i<*coun...
0
[ "CWE-121", "CWE-120", "CWE-787" ]
pjproject
560a1346f87aabe126509bb24930106dea292b00
245,418,101,735,688,180,000,000,000,000,000,000,000
22
Merge pull request from GHSA-f5qg-pqcg-765m
int kvm_deassign_device(struct kvm *kvm, struct kvm_assigned_dev_kernel *assigned_dev) { struct iommu_domain *domain = kvm->arch.iommu_domain; struct pci_dev *pdev = NULL; /* check if iommu exists and in use */ if (!domain) return 0; pdev = assigned_dev->dev; if (pdev == NULL) return -ENODEV; iommu_det...
0
[ "CWE-119" ]
kvm
3d32e4dbe71374a6780eaf51d719d76f9a9bf22f
289,197,569,723,313,740,000,000,000,000,000,000,000
22
kvm: fix excessive pages un-pinning in kvm_iommu_map error path. The third parameter of kvm_unpin_pages() when called from kvm_iommu_map_pages() is wrong, it should be the number of pages to un-pin and not the page size. This error was facilitated with an inconsistent API: kvm_pin_pages() takes a size, but kvn_unpin_...
static int sst_donate_other(const char *method, const char *addr, const wsrep::gtid &gtid, bool bypass, char **env) // carries auth info { int const cmd_len = 4096; wsp::string cmd_str(cmd_len); if (!cmd_str()) { WSREP_ERROR( "sst_donate_other(...
0
[ "CWE-77" ]
percona-xtradb-cluster
8a338477c9184dd0e03a5c661e9c3a79456de8a4
198,827,302,373,064,200,000,000,000,000,000,000,000
70
PXC-3392: Donor uses invalid SST methods
static st32 getregmemstartend(const char *input) { st32 res; if (!input || (strlen (input) < 2) || (*input != '[') || !r_str_endswith (input, "]")) { return -1; } input++; char *temp = r_str_ndup (input, strlen (input) - 1); if (!temp) { return -1; } res = getreg (temp); free (temp); return res; }
0
[ "CWE-125", "CWE-787" ]
radare2
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
183,135,126,341,797,900,000,000,000,000,000,000,000
14
Fix #12417/#12418 (arm assembler heap overflows)
void nl80211_send_roamed(struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid, const u8 *req_ie, size_t req_ie_len, const u8 *resp_ie, size_t resp_ie_len, gfp_t gfp) { struct sk_buff *msg; void *hdr; msg = nlmsg_new(NLMSG_GOODSIZE, gfp); if (!msg) return; hdr = nl802...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
162,930,249,591,474,520,000,000,000,000,000,000,000
40
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, size_t len) { EVP_AES_HMAC_SHA1 *key = data(ctx); unsigned int l; size_t plen = key->payload_length, iv = 0, /* explicit IV in TLS 1.1 and ...
0
[ "CWE-310" ]
openssl
68595c0c2886e7942a14f98c17a55a88afb6c292
212,410,700,239,398,340,000,000,000,000,000,000,000
356
Check that we have enough padding characters. Reviewed-by: Emilia Käsper <emilia@openssl.org> CVE-2016-2107 MR: #2572
static int vt_bind(struct con_driver *con) { const struct consw *defcsw = NULL, *csw = NULL; int i, more = 1, first = -1, last = -1, deflt = 0; if (!con->con || !(con->flag & CON_DRIVER_FLAG_MODULE)) goto err; csw = con->con; for (i = 0; i < MAX_NR_CON_DRIVER; i++) { struct con_driver *con = &registered_co...
0
[ "CWE-125" ]
linux
3c4e0dff2095c579b142d5a0693257f1c58b4804
319,372,505,925,923,180,000,000,000,000,000,000,000
49
vt: Disable KD_FONT_OP_COPY It's buggy: On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote: > We recently discovered a slab-out-of-bounds read in fbcon in the latest > kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that > "fbcon_do_set_font" did not handle "vc->vc_font.data" and > "vc->...
void LibRaw::copy_bayer(unsigned short cblack[4],unsigned short *dmaxp) { // Both cropped and uncropped int row; #if defined(LIBRAW_USE_OPENMP) #pragma omp parallel for default(shared) #endif for (row=0; row < S.height; row++) { int col; unsigned short ldmax = 0; for (col=0; col < S.width; ...
0
[ "CWE-119", "CWE-787" ]
LibRaw
2f912f5b33582961b1cdbd9fd828589f8b78f21d
332,653,337,447,867,200,000,000,000,000,000,000,000
34
fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef
nfs4_find_client_ident(struct net *net, int cb_ident) { struct nfs_client *clp; struct nfs_net *nn = net_generic(net, nfs_net_id); spin_lock(&nn->nfs_client_lock); clp = idr_find(&nn->cb_ident_idr, cb_ident); if (clp) refcount_inc(&clp->cl_count); spin_unlock(&nn->nfs_client_lock); return clp; }
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
276,910,641,059,349,030,000,000,000,000,000,000,000
12
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
NICState *qemu_get_nic(NetClientState *nc) { NetClientState *nc0 = nc - nc->queue_index; return (NICState *)((void *)nc0 - nc->info->size); }
0
[ "CWE-190" ]
qemu
25c01bd19d0e4b66f357618aeefda1ef7a41e21a
246,563,926,595,963,430,000,000,000,000,000,000,000
6
net: drop too large packet early We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_...
char *getPROCID(msg_t *pM, sbool bLockMutex) { ISOBJ_TYPE_assert(pM, msg); preparePROCID(pM, bLockMutex); return (pM->pCSPROCID == NULL) ? "-" : (char*) cstrGetSzStrNoNULL(pM->pCSPROCID); }
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
52,836,559,374,690,530,000,000,000,000,000,000,000
6
backporting abort condition fix from 5.7.7
static void setautogain(struct gspca_dev *gspca_dev, s32 val) { struct sd *sd = (struct sd *) gspca_dev; i2c_w_mask(sd, 0x13, val ? 0x05 : 0x00, 0x05); }
0
[ "CWE-476" ]
linux
998912346c0da53a6dbb71fab3a138586b596b30
201,847,218,580,452,000,000,000,000,000,000,000,000
6
media: ov519: add missing endpoint sanity checks Make sure to check that we have at least one endpoint before accessing the endpoint array to avoid dereferencing a NULL-pointer on stream start. Note that these sanity checks are not redundant as the driver is mixing looking up altsettings by index and by number, which...
static bool sdhci_can_issue_command(SDHCIState *s) { if (!SDHC_CLOCK_IS_ON(s->clkcon) || (((s->prnsts & SDHC_DATA_INHIBIT) || s->stopped_state) && ((s->cmdreg & SDHC_CMD_DATA_PRESENT) || ((s->cmdreg & SDHC_CMD_RESPONSE) == SDHC_CMD_RSP_WITH_BUSY && !(SDHC_COMMAND_TYPE(s->cmdreg) == S...
0
[ "CWE-119" ]
qemu
dfba99f17feb6d4a129da19d38df1bcd8579d1c3
319,798,672,163,476,900,000,000,000,000,000,000,000
12
hw/sd/sdhci: Fix DMA Transfer Block Size field The 'Transfer Block Size' field is 12-bit wide. See section '2.2.2. Block Size Register (Offset 004h)' in datasheet. Two different bug reproducer available: - https://bugs.launchpad.net/qemu/+bug/1892960 - https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhc...
static inline bool rt_is_expired(const struct rtable *rth) { return rth->rt_genid != rt_genid_ipv4(dev_net(rth->dst.dev)); }
0
[ "CWE-17" ]
linux
df4d92549f23e1c037e83323aff58a21b3de7fe0
282,011,075,469,902,150,000,000,000,000,000,000,000
4
ipv4: try to cache dst_entries which would cause a redirect Not caching dst_entries which cause redirects could be exploited by hosts on the same subnet, causing a severe DoS attack. This effect aggravated since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()"). Lookups causing redirects will be allocated...
static struct dir *squashfs_opendir(unsigned int block_start, unsigned int offset, struct inode **i) { squashfs_dir_header_2 dirh; char buffer[sizeof(squashfs_dir_entry_2) + SQUASHFS_NAME_LEN + 1] __attribute__((aligned)); squashfs_dir_entry_2 *dire = (squashfs_dir_entry_2 *) buffer; long long start; int bytes;...
0
[ "CWE-22" ]
squashfs-tools
79b5a555058eef4e1e7ff220c344d39f8cd09646
11,333,009,479,078,924,000,000,000,000,000,000,000
123
Unsquashfs: fix write outside destination directory exploit An issue on Github (https://github.com/plougher/squashfs-tools/issues/72) shows how some specially crafted Squashfs filesystems containing invalid file names (with '/' and ..) can cause Unsquashfs to write files outside of the destination directory. This com...
static inline void deshufflePalette(Image *image,PixelInfo* oldColormap) { const size_t pages=image->colors/32, /* Pages per CLUT */ blocks=4, /* Blocks per page */ colors=8; /* Colors per block */ int page; size_t i=0; (void) memcpy(oldColormap,image->colormap,(size_t)image->colors* ...
0
[ "CWE-617" ]
ImageMagick
716496e6df0add89e9679d6da9c0afca814cfe49
116,356,806,419,684,930,000,000,000,000,000,000,000
29
do not attempt to write a null image list (thanks to Vinay Rohila)
static int coolkey_read_binary(sc_card_t *card, unsigned int idx, u8 *buf, size_t count, unsigned long flags) { coolkey_private_data_t * priv = COOLKEY_DATA(card); int r = 0, len; u8 *data = NULL; SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE); if (idx > priv->obj->length) { LOG_FUNC_RETURN(card->ctx, SC_ERR...
0
[ "CWE-415" ]
OpenSC
c246f6f69a749d4f68626b40795a4f69168008f4
323,101,607,731,229,100,000,000,000,000,000,000,000
56
coolkey: Make sure the object ID is unique when filling list Thanks to oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208
SetFieldNames(matvar_t *matvar, char *buf, size_t nfields, mat_uint32_t fieldname_length) { size_t i; matvar->internal->num_fields = nfields; matvar->internal->fieldnames = (char**)calloc(nfields,sizeof(*matvar->internal->fieldnames)); if ( NULL != matvar->internal->fieldnames ) { for ( ...
0
[ "CWE-190", "CWE-401" ]
matio
5fa49ef9fc4368fe3d19b5fdaa36d8fa5e7f4606
207,986,747,634,565,400,000,000,000,000,000,000,000
16
Fix integer addition overflow As reported by https://github.com/tbeu/matio/issues/121
auto GetTargetAndAlsoCheckForProxy() -> Local<Object> { auto object = Local<Object>::Cast(Deref(target)); if (HasProxy(object)) { throw RuntimeTypeError("Object is or has proxy"); } return object; }
0
[ "CWE-913" ]
isolated-vm
2646e6c1558bac66285daeab54c7d490ed332b15
172,241,845,715,242,950,000,000,000,000,000,000,000
7
Don't invoke accessors or proxies via Reference functions
uint check_join_cache_usage(JOIN_TAB *tab, ulonglong options, uint no_jbuf_after, uint table_index, JOIN_TAB *prev_tab) { Cost_estimate cost; uint flags= 0; ha_rows rows= 0; uint bufsz= 4096; JOIN_C...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
58,426,122,578,017,760,000,000,000,000,000,000,000
223
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
static inline u32 perc(u32 count, u32 total) { return (count * 100 + (total / 2)) / total; }
0
[ "CWE-200" ]
net
5d2be1422e02ccd697ccfcd45c85b4a26e6178e2
109,013,780,597,734,000,000,000,000,000,000,000,000
4
tipc: fix an infoleak in tipc_nl_compat_link_dump link_info.str is a char array of size 60. Memory after the NULL byte is not initialized. Sending the whole object out can cause a leak. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
static float* _mp_memcopy_float(_cimg_math_parser& mp, const ulongT *const p_ref, const longT siz, const long inc) { const unsigned ind = (unsigned int)p_ref[1]; const CImg<T> &img = ind==~0U?mp.imgin:mp.listin[cimg::mod((int)mp.mem[ind],mp.listin.width())]; ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
94,218,741,660,298,240,000,000,000,000,000,000,000
31
Fix other issues in 'CImg<T>::load_bmp()'.
struct tty_struct *alloc_tty_struct(struct tty_driver *driver, int idx) { struct tty_struct *tty; tty = kzalloc(sizeof(*tty), GFP_KERNEL); if (!tty) return NULL; kref_init(&tty->kref); tty->magic = TTY_MAGIC; if (tty_ldisc_init(tty)) { kfree(tty); return NULL; } tty->session = NULL; tty->pgrp = NULL; ...
0
[ "CWE-416" ]
linux
c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9
263,364,311,731,158,950,000,000,000,000,000,000,000
39
tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do tha...
static PixelChannels **AcquirePixelThreadSet(const Image *image) { PixelChannels **pixels; register ssize_t i; size_t number_threads; number_threads=(size_t) GetMagickResourceLimit(ThreadResource); pixels=(PixelChannels **) AcquireQuantumMemory(number_threads, sizeof(*pixels)); if (pixels...
1
[ "CWE-476", "CWE-119", "CWE-787" ]
ImageMagick
a906fe9298bf89e01d5272023db687935068849a
38,109,702,095,962,666,000,000,000,000,000,000,000
37
https://github.com/ImageMagick/ImageMagick/issues/1586
int migrate_misplaced_transhuge_page(struct mm_struct *mm, struct vm_area_struct *vma, pmd_t *pmd, pmd_t entry, unsigned long address, struct page *page, int node) { spinlock_t *ptl; pg_data_t *pgdat = NODE_DATA(node); int isolated = 0; struct page *new_page = NULL; int page_lru = page_is_file_cach...
0
[ "CWE-200" ]
linux
197e7e521384a23b9e585178f3f11c9fa08274b9
102,033,336,772,894,000,000,000,000,000,000,000,000
128
Sanitize 'move_pages()' permission checks The 'move_paghes()' system call was introduced long long ago with the same permission checks as for sending a signal (except using CAP_SYS_NICE instead of CAP_SYS_KILL for the overriding capability). That turns out to not be a great choice - while the system call really only ...
Perl_ckwarn(pTHX_ U32 w) { /* If lexical warnings have not been set, use $^W. */ if (isLEXWARN_off) return PL_dowarn & G_WARN_ON; return ckwarn_common(w); }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
perl5
34716e2a6ee2af96078d62b065b7785c001194be
77,151,179,599,572,690,000,000,000,000,000,000,000
8
Perl_my_setenv(); handle integer wrap RT #133204 Wean this function off int/I32 and onto UV/Size_t. Also, replace all malloc-ish calls with a wrapper that does overflow checks, In particular, it was doing (nlen + vlen + 2) which could wrap when the combined length of the environment variable name and value exceeded ...
static void php_wddx_serialize_array(wddx_packet *packet, zval *arr) { zval **ent; char *key; uint key_len; int is_struct = 0, ent_type; ulong idx; HashTable *target_hash; char tmp_buf[WDDX_BUF_LEN]; ulong ind = 0; int type; TSRMLS_FETCH(); target_hash = HASH_OF(arr); for (zend_hash_internal_pointer_reset...
1
[]
php-src
1785d2b805f64eaaacf98c14c9e13107bf085ab1
322,511,741,448,191,520,000,000,000,000,000,000,000
68
Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
u32 parse_bs_switch(char *arg_val, u32 opt) { if (!stricmp(arg_val, "no") || !stricmp(arg_val, "off")) bitstream_switching_mode = GF_DASH_BSMODE_NONE; else if (!stricmp(arg_val, "merge")) bitstream_switching_mode = GF_DASH_BSMODE_MERGED; else if (!stricmp(arg_val, "multi")) bitstream_switching_mode = GF_DASH_BSMO...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
56,312,564,084,487,520,000,000,000,000,000,000,000
14
fixed #2216
static int attach_aead(struct xfrm_algo_aead **algpp, u8 *props, struct nlattr *rta) { struct xfrm_algo_aead *p, *ualg; struct xfrm_algo_desc *algo; if (!rta) return 0; ualg = nla_data(rta); algo = xfrm_aead_get_byname(ualg->alg_name, ualg->alg_icv_len, 1); if (!algo) return -ENOSYS; *props = alg...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
89,907,038,047,295,570,000,000,000,000,000,000,000
24
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
void vmx_set_rflags(struct kvm_vcpu *vcpu, unsigned long rflags) { struct vcpu_vmx *vmx = to_vmx(vcpu); unsigned long old_rflags; if (is_unrestricted_guest(vcpu)) { kvm_register_mark_available(vcpu, VCPU_EXREG_RFLAGS); vmx->rflags = rflags; vmcs_writel(GUEST_RFLAGS, rflags); return; } old_rflags = vmx_ge...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
237,418,935,500,092,350,000,000,000,000,000,000,000
23
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...
NTSTATUS smbd_do_setfilepathinfo(connection_struct *conn, struct smb_request *req, TALLOC_CTX *mem_ctx, uint16_t info_level, files_struct *fsp, struct smb_filename *smb_fname, char **ppdata, int total_data, int *ret_data_size) { char *pdata = *ppdata; NTSTATUS status = NT_STATUS_OK; int d...
0
[ "CWE-787" ]
samba
22b4091924977f6437b59627f33a8e6f02b41011
127,589,543,993,219,100,000,000,000,000,000,000,000
200
CVE-2021-44142: smbd: add Netatalk xattr used by vfs_fruit to the list of private Samba xattrs This is an internal xattr that should not be user visible. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static cJSON *cJSON_New_Item( void ) { cJSON* node = (cJSON*) cJSON_malloc( sizeof(cJSON) ); if ( node ) memset( node, 0, sizeof(cJSON) ); return node; }
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
337,156,629,260,410,870,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 rio_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) { struct netdev_private *np = netdev_priv(dev); netif_carrier_off(dev); if (cmd->autoneg == AUTONEG_ENABLE) { if (np->an_enable) return 0; else { np->an_enable = 1; mii_set_media(dev); return 0; } } else { np->an_enable...
0
[ "CWE-284", "CWE-264" ]
linux
1bb57e940e1958e40d51f2078f50c3a96a9b2d75
152,244,598,053,314,670,000,000,000,000,000,000,000
36
dl2k: Clean up rio_ioctl The dl2k driver's rio_ioctl call has a few issues: - No permissions checking - Implements SIOCGMIIREG and SIOCGMIIREG using the SIOCDEVPRIVATE numbers - Has a few ioctls that may have been used for debugging at one point but have no place in the kernel proper. This patch removes all but the...
xfs_buf_ioerror_alert( struct xfs_buf *bp, const char *func) { xfs_alert(bp->b_target->bt_mount, "metadata I/O error: block 0x%llx (\"%s\") error %d numblks %d", (__uint64_t)XFS_BUF_ADDR(bp), func, bp->b_error, bp->b_length); }
0
[ "CWE-20", "CWE-703" ]
linux
eb178619f930fa2ba2348de332a1ff1c66a31424
98,137,761,905,594,880,000,000,000,000,000,000,000
8
xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end When _xfs_buf_find is passed an out of range address, it will fail to find a relevant struct xfs_perag and oops with a null dereference. This can happen when trying to walk a filesystem with a metadata inode that has a partially corrupted extent map (i.e....
managesieve_parser_read_string(struct managesieve_parser *parser, const unsigned char *data, size_t data_size) { size_t i; /* QUOTED-CHAR = SAFE-UTF8-CHAR / "\" QUOTED-SPECIALS * quoted = <"> *QUOTED-CHAR <"> * ;; limited to 1024 octets between the <">s */ /* read...
0
[ "CWE-787" ]
pigeonhole
7ce9990a5e6ba59e89b7fe1c07f574279aed922c
28,370,593,624,038,890,000,000,000,000,000,000,000
61
lib-managesieve: Don't accept strings with NULs ManageSieve doesn't allow NULs in strings. This fixes a bug with unescaping a string with NULs: str_unescape() could have been called for memory that points outside the allocated string, causing heap corruption. This could cause crashes or theoretically even result in r...
uint32_t writeListBegin(const TType elemType, const uint32_t size) { T_VIRTUAL_CALL(); return writeListBegin_virt(elemType, size); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
248,312,995,197,703,360,000,000,000,000,000,000,000
4
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
get_bkc_value(buf_T *buf) { return buf->b_bkc_flags ? buf->b_bkc_flags : bkc_flags; }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
319,857,157,716,557,070,000,000,000,000,000,000,000
4
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'.
static ssize_t _consolefs_readv( oe_fd_t* desc, const struct oe_iovec* iov, int iovcnt) { ssize_t ret = -1; file_t* file = _cast_file(desc); void* buf = NULL; size_t buf_size = 0; if (!file || !iov || iovcnt < 0 || iovcnt > OE_IOV_MAX) OE_RAISE_ERRNO(OE_EINVAL); /* Flatten ...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
125,376,126,933,687,200,000,000,000,000,000,000,000
35
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static int fuse_get_tree(struct fs_context *fc) { struct fuse_fs_context *ctx = fc->fs_private; if (!ctx->fd_present || !ctx->rootmode_present || !ctx->user_id_present || !ctx->group_id_present) return -EINVAL; #ifdef CONFIG_BLOCK if (ctx->is_bdev) return get_tree_bdev(fc, fuse_fill_super); #endif retur...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
26,744,266,151,248,405,000,000,000,000,000,000,000
15
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
void Monitor::forward_request_leader(MonOpRequestRef op) { op->mark_event(__func__); int mon = get_leader(); MonSession *session = op->get_session(); PaxosServiceMessage *req = op->get_req<PaxosServiceMessage>(); if (req->get_source().is_mon() && req->get_source_addr() != messenger->get_myaddr()) { do...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
315,952,961,199,139,680,000,000,000,000,000,000,000
44
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 inline void handle_socket_receive_known( fastd_socket_t *sock, const fastd_peer_address_t *local_addr, const fastd_peer_address_t *remote_addr, fastd_peer_t *peer, fastd_buffer_t *buffer) { if (!fastd_peer_may_connect(peer)) { fastd_buffer_free(buffer); return; } const uint8_t *packet_type = buffer->da...
1
[ "CWE-617", "CWE-119", "CWE-284" ]
fastd
737925113363b6130879729cdff9ccc46c33eaea
6,537,855,003,078,053,000,000,000,000,000,000,000
29
receive: fix buffer leak when receiving invalid packets For fastd versions before v20, this was just a memory leak (which could still be used for DoS, as it's remotely triggerable). With the new buffer management of fastd v20, this will trigger an assertion failure instead as soon as the buffer pool is empty.
static struct pattern *SFDParsePattern(FILE *sfd,char *tok) { struct pattern *pat = chunkalloc(sizeof(struct pattern)); int ch; getname(sfd,tok); pat->pattern = copy(tok); getreal(sfd,&pat->width); while ( isspace(ch=nlgetc(sfd))); if ( ch!=';' ) ungetc(ch,sfd); getreal(sfd,&pat->heigh...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
330,813,908,873,309,650,000,000,000,000,000,000,000
24
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
dissect_kafka_fetch_request_forgottent_topic_partition(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { proto_tree_add_item(tree, hf_kafka_forgotten_topic_partition, tvb, offset, 4, ENC_BIG_ENDIAN); offs...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
151,784,690,089,652,130,000,000,000,000,000,000,000
7
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...
bool execute_query(const char **query, unsigned int length) { if (!mysql_real_query(&mysql, (const char *) *query, length)) return FALSE; else if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR) { fprintf(stdout, " ... Failed! Error: %s\n", mysql_error(&mysql)); free_resources(); exit(1); } if ((...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
184,698,494,107,454,140,000,000,000,000,000,000,000
21
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...
virtual ~QPDFWordTokenFinder() { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
324,162,363,152,068,800,000,000,000,000,000,000,000
3
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 ...
#define GETS_FETCH_SIZE 8196LU static char *php_mail_gets(readfn_t f, void *stream, unsigned long size, GETS_DATA *md) /* {{{ */ { /* write to the gets stream if it is set, otherwise forward to c-clients gets */ if (IMAPG(gets_stream)) { char buf[GETS_FETCH_SIZE]; while (size) { unsigned long read; if ...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
7,234,116,450,131,043,000,000,000,000,000,000,000
41
Disable rsh/ssh functionality in imap by default (bug #77153)
struct hsts *Curl_hsts_init(void) { struct hsts *h = calloc(sizeof(struct hsts), 1); if(h) { Curl_llist_init(&h->list, NULL); } return h; }
0
[]
curl
fae6fea209a2d4db1582f608bd8cc8000721733a
275,762,001,068,014,300,000,000,000,000,000,000,000
8
hsts: ignore trailing dots when comparing hosts names CVE-2022-30115 Reported-by: Axel Chong Bug: https://curl.se/docs/CVE-2022-30115.html Closes #8821
static void rwpng_error_handler(png_structp png_ptr, png_const_charp msg) { rwpng_png_image *mainprog_ptr; /* This function, aside from the extra step of retrieving the "error * pointer" (below) and the fact that it exists within the application * rather than within libpng, is essentially identical ...
0
[ "CWE-190", "CWE-787" ]
pngquant
b7c217680cda02dddced245d237ebe8c383be285
26,121,836,529,349,590,000,000,000,000,000,000,000
21
Fix integer overflow in rwpng.h (CVE-2016-5735) Reported by Choi Jaeseung Found with Sparrow (http://ropas.snu.ac.kr/sparrow)
char* oidc_util_html_escape(apr_pool_t *pool, const char *s) { // TODO: this has performance/memory issues for large chunks of HTML const char chars[6] = { '&', '\'', '\"', '>', '<', '\0' }; const char *const replace[] = { "&amp;", "&apos;", "&quot;", "&gt;", "&lt;", }; unsigned int i, j = 0, k, n = 0, len = strle...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
244,273,995,394,530,900,000,000,000,000,000,000,000
26
Add a function to escape Javascript characters
_fill32_spans (void *abstract_renderer, int y, int h, const cairo_half_open_span_t *spans, unsigned num_spans) { cairo_image_span_renderer_t *r = abstract_renderer; if (num_spans == 0) return CAIRO_STATUS_SUCCESS; if (likely(h == 1)) { do { if (spans[0].coverage) { int len = spans[1].x - ...
0
[]
cairo
03a820b173ed1fdef6ff14b4468f5dbc02ff59be
261,628,816,586,847,320,000,000,000,000,000,000,000
47
Fix mask usage in image-compositor
void reset(bool is_change_master) { if (unlikely(is_change_master)) { delete_dynamic(&repl_ignore_server_ids); /* Free all the array elements. */ delete_dynamic(&repl_do_domain_ids); delete_dynamic(&repl_ignore_domain_ids); } host= user= password= log_file_name= ssl_key= ssl...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
209,553,189,655,629,060,000,000,000,000,000,000,000
21
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
bytes_find(PyBytesObject *self, PyObject *args) { Py_ssize_t result = bytes_find_internal(self, args, +1); if (result == -2) return NULL; return PyLong_FromSsize_t(result); }
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
85,160,646,854,216,100,000,000,000,000,000,000,000
7
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
void raw6_proc_exit(void) { unregister_pernet_subsys(&raw6_net_ops); }
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
243,910,463,438,149,800,000,000,000,000,000,000,000
4
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
static int net_read(struct wif *wi, unsigned char *h80211, int len, struct rx_info *ri) { struct priv_net *pn = wi_priv(wi); uint32_t buf[512]; // 512 * 4 = 2048 unsigned char *bufc = (unsigned char*)buf; int cmd; int sz = sizeof(*ri); int l; int ret; /* try queue */ l = queue_get(pn, buf, sizeof(buf));...
0
[ "CWE-20", "CWE-787" ]
aircrack-ng
88702a3ce4c28a973bf69023cd0312f412f6193e
270,260,748,169,587,870,000,000,000,000,000,000,000
46
OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab
static int setCompDefaults(struct jpeg_compress_struct *cinfo, int pixelFormat, int subsamp, int jpegQual, int flags) { int retval = 0; char *env = NULL; cinfo->in_color_space = pf2cs[pixelFormat]; cinfo->input_components = tjPixelSize[pixelFormat]; jpeg_set_defaults(cinfo); #ifnd...
0
[ "CWE-787" ]
libjpeg-turbo
3d9c64e9f8aa1ee954d1d0bb3390fc894bb84da3
13,811,566,000,443,690,000,000,000,000,000,000,000
67
tjLoadImage(): Fix int overflow/segfault w/big BMP Fixes #304
static void clear_dead_task(struct k_itimer *timer, union cpu_time_count now) { /* * That's all for this thread or process. * We leave our residual in expires to be reported. */ put_task_struct(timer->it.cpu.task); timer->it.cpu.task = NULL; timer->it.cpu.expires = cpu_time_sub(timer->it_clock, time...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
75,773,115,077,526,890,000,000,000,000,000,000,000
12
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
_outJoinExpr(StringInfo str, const JoinExpr *node) { WRITE_NODE_TYPE("JOINEXPR"); WRITE_ENUM_FIELD(jointype, JoinType); WRITE_BOOL_FIELD(isNatural); WRITE_NODE_FIELD(larg); WRITE_NODE_FIELD(rarg); WRITE_NODE_FIELD(usingClause); WRITE_NODE_FIELD(quals); WRITE_NODE_FIELD(alias); WRITE_INT_FIELD(rtindex); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
153,058,538,760,422,080,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 bool sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local, struct sta_info *sta, int ac) { unsigned long flags; struct sk_buff *skb; /* * First check for frames that should expire on the filtered * queue. Frames here were rejected by the driver and are on * a separate queue to avoid ...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
15,508,315,503,858,274,000,000,000,000,000,000,000
77
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
process_postgres_switches(int argc, char *argv[], GucContext ctx, const char **dbname) { bool secure = (ctx == PGC_POSTMASTER); int errs = 0; GucSource gucsource; int flag; if (secure) { gucsource = PGC_S_ARGV; /* switches came from command line */ /* Ignore the initial --single argument, if pr...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
242,203,474,577,770,600,000,000,000,000,000,000,000
245
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
lys_leaf_check_leafref(struct lys_node_leaf *leafref_target, struct lys_node *leafref) { struct lys_node_leaf *iter; struct lys_node *op; struct ly_ctx *ctx = leafref_target->module->ctx; if (!(leafref_target->nodetype & (LYS_LEAF | LYS_LEAFLIST))) { LOGINT(ctx); return -1; } /...
0
[ "CWE-617" ]
libyang
5ce30801f9ccc372bbe9b7c98bb5324b15fb010a
184,314,898,449,870,870,000,000,000,000,000,000,000
33
schema tree BUGFIX freeing nodes with no module set Context must be passed explicitly for these cases. Fixes #1452
e_ews_connection_find_folder_finish (EEwsConnection *cnc, GAsyncResult *result, gboolean *includes_last_item, GSList **folders, GError **error) { GSimpleAsyncResult *simple; EwsAsyncData *async_data; g_return_val_if_fail (cnc != NULL, FALSE); g_return_val_if_fail ( g_simple_as...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
82,079,209,474,624,865,000,000,000,000,000,000,000
26
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
TIFFNumberOfStrips(TIFF* tif) { TIFFDirectory *td = &tif->tif_dir; uint32 nstrips; /* If the value was already computed and store in td_nstrips, then return it, since ChopUpSingleUncompressedStrip might have altered and resized the since the td_stripbytecount and td_stripoffset arrays to the new va...
1
[ "CWE-125" ]
libtiff
9a72a69e035ee70ff5c41541c8c61cd97990d018
184,825,093,869,389,800,000,000,000,000,000,000,000
21
* libtiff/tif_dirread.c: modify ChopUpSingleUncompressedStrip() to instanciate compute ntrips as TIFFhowmany_32(td->td_imagelength, rowsperstrip), instead of a logic based on the total size of data. Which is faulty is the total size of data is not sufficient to fill the whole image, and thus results in reading outside ...
static int do_show_master_status(MYSQL *mysql_con) { MYSQL_ROW row; MYSQL_RES *master; const char *comment_prefix= (opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL) ? "-- " : ""; if (mysql_query_with_error_report(mysql_con, &master, "SHOW MASTER STATUS")) { return 1; } else { row= mys...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
199,316,712,039,993,200,000,000,000,000,000,000,000
37
WL#9072: Backport WL#8785 to 5.5
static void ssl_mac( md_context_t *md_ctx, unsigned char *secret, unsigned char *buf, size_t len, unsigned char *ctr, int type ) { unsigned char header[11]; unsigned char padding[48]; int padlen; int md_size = md_get_size( md_ctx->md_info ); int md_type = md...
0
[ "CWE-119" ]
mbedtls
c988f32adde62a169ba340fee0da15aecd40e76e
88,047,398,770,833,370,000,000,000,000,000,000,000
36
Added max length checking of hostname
dirvote_perform_vote(void) { crypto_pk_t *key = get_my_v3_authority_signing_key(); authority_cert_t *cert = get_my_v3_authority_cert(); networkstatus_t *ns; char *contents; pending_vote_t *pending_vote; time_t now = time(NULL); int status; const char *msg = ""; if (!cert || !key) { log_warn(LD_N...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
212,529,994,554,060,050,000,000,000,000,000,000,000
43
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
char sqlite3ExprAffinity(Expr *pExpr){ int op; while( ExprHasProperty(pExpr, EP_Skip) ){ assert( pExpr->op==TK_COLLATE ); pExpr = pExpr->pLeft; assert( pExpr!=0 ); } op = pExpr->op; if( op==TK_SELECT ){ assert( pExpr->flags&EP_xIsSelect ); return sqlite3ExprAffinity(pExpr->x.pSelect->pELis...
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
144,458,355,292,365,340,000,000,000,000,000,000,000
33
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static int audit_match_filetype(struct audit_context *ctx, int val) { struct audit_names *n; umode_t mode = (umode_t)val; if (unlikely(!ctx)) return 0; list_for_each_entry(n, &ctx->names_list, list) { if ((n->ino != AUDIT_INO_UNSET) && ((n->mode & S_IFMT) == mode)) return 1; } return 0; }
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
321,612,115,610,142,600,000,000,000,000,000,000,000
16
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
dnParent( struct berval *dn, struct berval *pdn ) { char *p; p = ber_bvchr( dn, ',' ); /* one-level dn */ if ( p == NULL ) { pdn->bv_val = dn->bv_val + dn->bv_len; pdn->bv_len = 0; return; } assert( DN_SEPARATOR( p[ 0 ] ) ); p++; assert( ATTR_LEADCHAR( p[ 0 ] ) ); pdn->bv_len = dn->bv_len - (p - ...
0
[ "CWE-763" ]
openldap
5a2017d4e61a6ddc4dcb4415028e0d08eb6bca26
323,730,981,044,050,840,000,000,000,000,000,000,000
24
ITS#9412 fix AVA_Sort on invalid RDN
void audit_filter_inodes(struct task_struct *tsk, struct audit_context *ctx) { struct audit_names *n; if (audit_pid && tsk->tgid == audit_pid) return; rcu_read_lock(); list_for_each_entry(n, &ctx->names_list, list) { if (audit_filter_inode_name(tsk, n, ctx)) break; } rcu_read_unlock(); }
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
50,085,032,017,689,140,000,000,000,000,000,000,000
15
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
static void complete_update_bin(conn *c) { protocol_binary_response_status eno = PROTOCOL_BINARY_RESPONSE_EINVAL; enum store_item_type ret = NOT_STORED; assert(c != NULL); item *it = c->item; pthread_mutex_lock(&c->thread->stats.mutex); c->thread->stats.slab_stats[ITEM_clsid(it)].set_cmds++; ...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
memcached
dbb7a8af90054bf4ef51f5814ef7ceb17d83d974
168,628,082,373,880,110,000,000,000,000,000,000,000
82
disable UDP port by default As reported, UDP amplification attacks have started to use insecure internet-exposed memcached instances. UDP used to be a lot more popular as a transport for memcached many years ago, but I'm not aware of many recent users. Ten years ago, the TCP connection overhead from many clients was ...
static bool rand_enough(void) { return (0 != RAND_status()) ? TRUE : FALSE; }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
48,588,551,662,150,690,000,000,000,000,000,000,000
4
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static int decode_block(AVCodecContext *avctx, void *tdata, int jobnr, int threadnr) { EXRContext *s = avctx->priv_data; AVFrame *const p = s->picture; EXRThreadData *td = &s->thread_data[threadnr]; const uint8_t *channel_buffer[4] = { 0 }; const uint8_t *buf = s->buf; ui...
0
[ "CWE-787" ]
FFmpeg
b0a8b40294ea212c1938348ff112ef1b9bf16bb3
270,772,191,651,297,900,000,000,000,000,000,000,000
281
avcodec/exr: skip bottom clearing loop when its outside the image Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int' Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tr...
cdf_read_header(const cdf_info_t *info, cdf_header_t *h) { char buf[512]; (void)memcpy(cdf_bo.s, "\01\02\03\04", 4); if (cdf_read(info, (off_t)0, buf, sizeof(buf)) == -1) return -1; cdf_unpack_header(h, buf); cdf_swap_header(h); if (h->h_magic != CDF_MAGIC) { DPRINTF(("Bad magic 0x%" INT64_T_FORMAT "x != 0x%...
0
[ "CWE-119" ]
file
1859fdb4e67c49c463c4e0078054335cd46ba295
206,513,663,757,675,700,000,000,000,000,000,000,000
30
add more check found by cert's fuzzer.
static int do_memory_failure(struct mce *m) { int flags = MF_ACTION_REQUIRED; int ret; pr_err("Uncorrected hardware memory error in user-access at %llx", m->addr); if (!(m->mcgstatus & MCG_STATUS_RIPV)) flags |= MF_MUST_KILL; ret = memory_failure(m->addr >> PAGE_SHIFT, flags); if (ret) pr_err("Memory error n...
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
216,043,296,528,614,740,000,000,000,000,000,000,000
15
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...
finish_writing_to_file_impl(open_file_t *file_data, int abort_write) { int r = 0; tor_assert(file_data && file_data->filename); if (file_data->stdio_file) { if (fclose(file_data->stdio_file)) { log_warn(LD_FS, "Error closing \"%s\": %s", file_data->filename, strerror(errno)); abort_...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
225,189,842,730,355,740,000,000,000,000,000,000,000
36
Fix assertion failure in tor_timegm. Fixes bug 6811.
PHP_MINIT_FUNCTION(snmp) { netsnmp_log_handler *logh; zend_class_entry ce, cex; le_snmp_session = zend_register_list_destructors_ex(php_snmp_session_destructor, NULL, PHP_SNMP_SESSION_RES_NAME, module_number); init_snmp("snmpapp"); #ifdef NETSNMP_DS_LIB_DONT_PERSIST_STATE /* Prevent update of the snmpapp.conf f...
0
[ "CWE-20" ]
php-src
6e25966544fb1d2f3d7596e060ce9c9269bbdcf8
256,987,834,974,404,740,000,000,000,000,000,000,000
87
Fixed bug #71704 php_snmp_error() Format String Vulnerability
return empty.eval(expression,x,y,z,c); } template<typename t>
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
251,119,198,551,874,000,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
static char *get_buf_asm(RCore *core, ut64 from, ut64 addr, RAnalFunction *fcn, bool color) { int has_color = core->print->flags & R_PRINT_FLAGS_COLOR; char str[512]; const int size = 12; ut8 buf[12]; RAsmOp asmop = {0}; char *buf_asm = NULL; bool asm_varsub = r_config_get_i (core->config, "asm.var.sub"); core-...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
115,080,630,022,476,230,000,000,000,000,000,000,000
37
Fix #12375 - Crash in bd+ao (#12382)
TEST(OverflowArithmetic, SignedAdditionTests) { using T = int64_t; static constexpr auto f = polyAdd; ASSERT(test<T>(f, 0, kMax<T>, kMax<T>)); ASSERT(test<T>(f, -1, kMax<T>, kMax<T> - 1)); ASSERT(test<T>(f, 1, kMax<T> - 1, kMax<T>)); ASSERT(test<T>(f, 0, kMin<T>, kMin<T>)); ASSERT(test<T>(f,...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
291,479,607,840,820,700,000,000,000,000,000,000,000
17
SERVER-43699 $mod should not overflow for large negative values
void resetServerStats(void) { int j; server.stat_numcommands = 0; server.stat_numconnections = 0; server.stat_expiredkeys = 0; server.stat_expired_stale_perc = 0; server.stat_expired_time_cap_reached_count = 0; server.stat_expire_cycle_time_used = 0; server.stat_evictedkeys = 0; ser...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
106,208,575,005,719,400,000,000,000,000,000,000,000
39
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
BOOL security_fips_decrypt(BYTE* data, size_t length, rdpRdp* rdp) { size_t olen; if (!rdp || !rdp->fips_decrypt) return FALSE; if (!winpr_Cipher_Update(rdp->fips_decrypt, data, length, data, &olen)) return FALSE; return TRUE; }
0
[ "CWE-125", "CWE-787" ]
FreeRDP
d6cd14059b257318f176c0ba3ee0a348826a9ef8
147,502,996,667,298,540,000,000,000,000,000,000,000
12
Fixed GHSL-2020-101 missing NULL check (cherry picked from commit b207dbba35c505bbc3ad5aadc10b34980c6b7e8e)
ZEND_API int zend_set_local_var(zend_string *name, zval *value, int force) /* {{{ */ { zend_execute_data *execute_data = EG(current_execute_data); while (execute_data && (!execute_data->func || !ZEND_USER_CODE(execute_data->func->common.type))) { execute_data = execute_data->prev_execute_data; } if (execute_dat...
0
[ "CWE-134" ]
php-src
b101a6bbd4f2181c360bd38e7683df4a03cba83e
240,182,214,257,191,400,000,000,000,000,000,000,000
40
Use format string
PHPAPI char *php_pcre_replace(char *regex, int regex_len, char *subject, int subject_len, zval *replace_val, int is_callable_replace, int *result_len, int limit, int *replace_count TSRMLS_DC) { pcre_cache_entry *pce; /* Compiled regular expression */ /* Compile regex or get it from...
1
[]
php-src
03964892c054d0c736414c10b3edc7a40318b975
72,942,431,786,513,610,000,000,000,000,000,000,000
15
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
unescape_gstring_inplace (GMarkupParseContext *context, GString *string, gboolean *is_ascii, GError **error) { char mask, *to; const char *from; gboolean normalize_attribute; *is_ascii = FALSE; ...
0
[ "CWE-476" ]
glib
fccef3cc822af74699cca84cd202719ae61ca3b9
139,281,316,765,987,540,000,000,000,000,000,000,000
168
gmarkup: Fix crash in error handling path for closing elements If something which looks like a closing tag is left unfinished, but isn’t paired to an opening tag in the document, the error handling code would do a null pointer dereference. Avoid that, at the cost of introducing a new translatable error message. Inclu...
struct winsdb_addr *winsdb_addr_list_check(struct winsdb_addr **addresses, const char *address) { size_t i; for (i=0; addresses[i]; i++) { if (strcmp(addresses[i]->address, address) == 0) { return addresses[i]; } } return NULL; }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
197,906,917,113,556,200,000,000,000,000,000,000,000
12
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...
piv_check_protected_objects(sc_card_t *card) { int r = 0; int i; piv_private_data_t * priv = PIV_DATA(card); u8 buf[8]; /* tag of 53 with 82 xx xx will fit in 4 */ u8 * rbuf; size_t buf_len; static int protected_objects[] = {PIV_OBJ_PI, PIV_OBJ_CHF, PIV_OBJ_IRIS_IMAGE}; LOG_FUNC_CALLED(card->ctx); /* * rou...
0
[]
OpenSC
456ac566938a1da774db06126a2fa6c0cba514b3
227,551,257,909,866,450,000,000,000,000,000,000,000
67
PIV Improved parsing of data from the card Based on Fuzz testing, many of the calls to sc_asn1_find_tag were replaced with sc_asn1_read_tag. The input is also tested that the expected tag is the first byte. Additional tests are also add. sc_asn1_find_tag will skip 0X00 or 0Xff if found. NIST sp800-73-x specs do not ...
void Tag::Clear() { while (simple_tags_count_ > 0) { SimpleTag& st = simple_tags_[--simple_tags_count_]; st.Clear(); } delete[] simple_tags_; simple_tags_ = NULL; simple_tags_size_ = 0; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
21,670,663,148,359,724,000,000,000,000,000,000,000
11
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
vmxnet3_dump_virt_hdr(struct virtio_net_hdr *vhdr) { VMW_PKPRN("VHDR: flags 0x%x, gso_type: 0x%x, hdr_len: %d, gso_size: %d, " "csum_start: %d, csum_offset: %d", vhdr->flags, vhdr->gso_type, vhdr->hdr_len, vhdr->gso_size, vhdr->csum_start, vhdr->csum_offset); }
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
147,603,669,294,927,770,000,000,000,000,000,000,000
7
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
int vm_sockets_get_local_cid(void) { return transport->get_local_cid(); }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
310,854,214,844,617,600,000,000,000,000,000,000,000
4
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
host_in_pool_p (hostinfo_t hi, int tblidx) { int i, pidx; for (i = 0; i < hi->pool_len && (pidx = hi->pool[i]) != -1; i++) if (pidx == tblidx && hosttable[pidx]) return 1; return 0; }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
300,779,817,388,299,300,000,000,000,000,000,000,000
9
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
Field_str::Field_str(uchar *ptr_arg,uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, utype unireg_check_arg, const char *field_name_arg, CHARSET_INFO *charset_arg) :Field(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_check_arg, field_name_arg) { fiel...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
274,096,335,771,905,400,000,000,000,000,000,000,000
12
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
int fuse_write_inode(struct inode *inode, struct writeback_control *wbc) { struct fuse_conn *fc = get_fuse_conn(inode); struct fuse_inode *fi = get_fuse_inode(inode); struct fuse_file *ff; int err; ff = __fuse_write_file_get(fc, fi); err = fuse_flush_times(inode, ff); if (ff) fuse_file_put(ff, 0); return er...
0
[ "CWE-399", "CWE-835" ]
linux
3ca8138f014a913f98e6ef40e939868e1e9ea876
206,724,428,384,064,760,000,000,000,000,000,000,000
14
fuse: break infinite loop in fuse_fill_write_pages() I got a report about unkillable task eating CPU. Further investigation shows, that the problem is in the fuse_fill_write_pages() function. If iov's first segment has zero length, we get an infinite loop, because we never reach iov_iter_advance() call. Fix this by c...
void ldb_req_mark_trusted(struct ldb_request *req) { req->handle->flags &= ~LDB_HANDLE_FLAG_UNTRUSTED; }
0
[ "CWE-476" ]
samba
d8b9bb274b7e7a390cf3bda9cd732cb2227bdbde
11,304,316,170,892,243,000,000,000,000,000,000,000
4
CVE-2020-10730: lib ldb: Check if ldb_lock_backend_callback called twice Prevent use after free issues if ldb_lock_backend_callback is called twice, usually due to ldb_module_done being called twice. This can happen if a module ignores the return value from function a function that calls ldb_module_done as part of it'...
decode_bitmap4(struct xdr_stream *xdr, uint32_t *bitmap, size_t sz) { ssize_t ret; ret = xdr_stream_decode_uint32_array(xdr, bitmap, sz); if (likely(ret >= 0)) return ret; if (ret != -EMSGSIZE) return -EIO; return sz; }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
308,792,670,737,333,100,000,000,000,000,000,000,000
11
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
STATIC void S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state) { /* This parses the flags that are in either the '(?foo)' or '(?foo:bar)' * constructs, and updates RExC_flags with them. On input, RExC_parse * should point to the first flag; it is updated on output to point to the * final...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
303,574,670,843,358,700,000,000,000,000,000,000,000
210
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)