func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
inline int PacketSetData(Packet *p, uint8_t *pktdata, uint32_t pktlen) { SET_PKT_LEN(p, (size_t)pktlen); if (unlikely(!pktdata)) { return -1; } p->ext_pkt = pktdata; p->flags |= PKT_ZERO_COPY; return 0; }
0
[ "CWE-20" ]
suricata
11f3659f64a4e42e90cb3c09fcef66894205aefe
114,546,564,549,643,570,000,000,000,000,000,000,000
11
teredo: be stricter on what to consider valid teredo Invalid Teredo can lead to valid DNS traffic (or other UDP traffic) being misdetected as Teredo. This leads to false negatives in the UDP payload inspection. Make the teredo code only consider a packet teredo if the encapsulated data was decoded without any 'invali...
long __sys_sendmsg_sock(struct socket *sock, struct user_msghdr __user *umsg, unsigned int flags) { struct iovec iovstack[UIO_FASTIOV], *iov = iovstack; struct sockaddr_storage address; struct msghdr msg = { .msg_name = &address }; ssize_t err; err = sendmsg_copy_msghdr(&msg, umsg, flags, &iov); if (err) re...
0
[]
linux
d69e07793f891524c6bbf1e75b9ae69db4450953
198,201,028,473,020,850,000,000,000,000,000,000,000
22
net: disallow ancillary data for __sys_{send,recv}msg_file() Only io_uring uses (and added) these, and we want to disallow the use of sendmsg/recvmsg for anything but regular data transfers. Use the newly added prep helper to split the msghdr copy out from the core function, to check for msg_control and msg_controllen...
void mg_mqtt_disconnect(struct mg_connection *nc) { mg_send_mqtt_header(nc, MG_MQTT_CMD_DISCONNECT, 0, 0); }
0
[ "CWE-119", "CWE-284", "CWE-787" ]
mongoose
b3e0f780c34cea88f057a62213c012aa88fe2deb
66,567,227,238,075,080,000,000,000,000,000,000,000
3
Fix heap-based overflow in parse_mqtt PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b
static int __sctp_connect(struct sock *sk, struct sockaddr *kaddrs, int addrs_size, int flags, sctp_assoc_t *assoc_id) { struct sctp_sock *sp = sctp_sk(sk); struct sctp_endpoint *ep = sp->ep; struct sctp_transport *transport; struct sctp_association *asoc; void *addr_buf = kaddrs; union sctp_addr *daddr; st...
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
240,288,751,249,244,100,000,000,000,000,000,000,000
89
net/sctp: fix race condition in sctp_destroy_sock If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock held and sp->do_auto_asconf is true, then an element is removed from the auto_asconf_splist without any proper locking. This can happen in the following functions: 1. In sctp_accept, if sctp_sock_m...
int ssl3_send_client_key_exchange(SSL *s) { unsigned char *p; int n; unsigned long alg_k; #ifndef OPENSSL_NO_RSA unsigned char *q; EVP_PKEY *pkey = NULL; #endif #ifndef OPENSSL_NO_KRB5 KSSL_ERR kssl_err; #endif /* OPENSSL_NO_KRB5 */ #ifndef OPENSSL_NO_ECDH EC_KEY *cl...
1
[ "CWE-362" ]
openssl
3c66a669dfc7b3792f7af0758ea26fe8502ce70c
256,052,501,858,540,340,000,000,000,000,000,000,000
750
Fix PSK handling. The PSK identity hint should be stored in the SSL_SESSION structure and not in the parent context (which will overwrite values used by other SSL structures with the same SSL_CTX). Use BUF_strndup when copying identity as it may not be null terminated. Reviewed-by: Tim Hudson <tjh@openssl.org>
static int ml_ff_playback(struct input_dev *dev, int effect_id, int value) { struct ml_device *ml = dev->ff->private; struct ml_effect_state *state = &ml->states[effect_id]; if (value > 0) { pr_debug("initiated play\n"); __set_bit(FF_EFFECT_STARTED, &state->flags); state->count = value; state->play_at = ji...
0
[ "CWE-416" ]
linux
fa3a5a1880c91bb92594ad42dfe9eedad7996b86
151,065,715,036,261,460,000,000,000,000,000,000,000
29
Input: ff-memless - kill timer in destroy() No timer must be left running when the device goes away. Signed-off-by: Oliver Neukum <oneukum@suse.com> Reported-and-tested-by: syzbot+b6c55daa701fc389e286@syzkaller.appspotmail.com Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/1573726121.17351.3.camel@suse.co...
void Dispatcher::enqueueKernel(cl_command_queue & clQueue, cl_kernel & clKernel, size_t worksizeGlobal, const size_t worksizeLocal, cl_event * pEvent = NULL) { const size_t worksizeMax = m_worksizeMax; size_t worksizeOffset = 0; while (worksizeGlobal) { const size_t worksizeRun = std::min(worksizeGlobal, worksizeM...
0
[ "CWE-703" ]
profanity
69ff010c14ff80ec14246772db6a245aa59e6689
263,898,472,981,233,150,000,000,000,000,000,000,000
13
[FIX] pritive key seed .
static gdImagePtr gdImageScaleBilinearTC(gdImagePtr im, const unsigned int new_width, const unsigned int new_height) { long dst_w = MAX(1, new_width); long dst_h = MAX(1, new_height); float dx = (float)gdImageSX(im) / (float)dst_w; float dy = (float)gdImageSY(im) / (float)dst_h; gdFixed f_dx = gd_ftofx(dx); gdFix...
0
[ "CWE-399" ]
libgd
4751b606fa38edc456d627140898a7ec679fcc24
318,586,987,082,747,200,000,000,000,000,000,000,000
84
gdImageScaleTwoPass memory leak fix Fixing memory leak in gdImageScaleTwoPass, as reported by @cmb69 and confirmed by @vapier. This bug actually bit me in production and I'm very thankful that it was reported with an easy fix. Fixes #173.
void update_meta_page(struct f2fs_sb_info *sbi, void *src, block_t blk_addr) { struct page *page = grab_meta_page(sbi, blk_addr); void *dst = page_address(page); if (src) memcpy(dst, src, PAGE_SIZE); else memset(dst, 0, PAGE_SIZE); set_page_dirty(page); f2fs_put_page(page, 1); }
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
25,930,585,253,941,263,000,000,000,000,000,000,000
12
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
get_option_var(int opt_idx) { return options[opt_idx].var; }
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
156,944,685,275,752,950,000,000,000,000,000,000,000
4
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
int bgp_capability_receive(struct peer *peer, bgp_size_t size) { uint8_t *pnt; /* Fetch pointer. */ pnt = stream_pnt(peer->curr); if (bgp_debug_neighbor_events(peer)) zlog_debug("%s rcv CAPABILITY", peer->host); /* If peer does not have the capability, send notification. */ if (!CHECK_FLAG(peer->cap, PEER_CA...
0
[ "CWE-125" ]
frr
ff6db1027f8f36df657ff2e5ea167773752537ed
186,119,476,263,432,260,000,000,000,000,000,000,000
35
bgpd: Make sure hdr length is at a minimum of what is expected Ensure that if the capability length specified is enough data. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
static int unimac_mdio_probe(struct platform_device *pdev) { struct unimac_mdio_pdata *pdata = pdev->dev.platform_data; struct unimac_mdio_priv *priv; struct device_node *np; struct mii_bus *bus; struct resource *r; int ret; np = pdev->dev.of_node; priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); ...
0
[ "CWE-476" ]
linux
297a6961ffb8ff4dc66c9fbf53b924bd1dda05d5
295,094,669,149,773,620,000,000,000,000,000,000,000
66
net: phy: mdio-bcm-unimac: fix potential NULL dereference in unimac_mdio_probe() platform_get_resource() may fail and return NULL, so we should better check it's return value to avoid a NULL pointer dereference a bit later in the code. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, ...
private uint64_t file_strncmp(const char *s1, const char *s2, size_t len, size_t maxlen, uint32_t flags) { /* * Convert the source args to unsigned here so that (1) the * compare will be unsigned as it is in strncmp() and (2) so * the ctype functions will work correctly without extra * casting. */ cons...
0
[ "CWE-787" ]
php-src
ca6d511fa54b34d5b75bf120a86482a1b9e1e686
132,725,832,259,989,760,000,000,000,000,000,000,000
72
Fix #81723: Memory corruption in finfo_buffer() We need to use the same memory allocator throughout.
void run() { intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest()); const Document spec = getSpec(); const Value args = spec["input"]; if (!spec["expected"].missing()) { FieldIterator fields(spec["expected"].getDocument()); while (fiel...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
171,016,830,294,629,730,000,000,000,000,000,000,000
43
SERVER-38070 fix infinite loop in agg expression
ring_addr_to_vva(struct virtio_net *dev, struct vhost_virtqueue *vq, uint64_t ra, uint64_t *size) { if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) { uint64_t vva; vhost_user_iotlb_rd_lock(vq); vva = vhost_iova_to_vva(dev, vq, ra, size, VHOST_ACCESS_RW); vhost_user_iotlb_rd_unlock(vq); return...
0
[ "CWE-190" ]
dpdk
3ae4beb079ce242240c34376a066bbccd0c0b23e
320,760,159,082,307,460,000,000,000,000,000,000,000
16
vhost: check log mmap offset and size overflow vhost_user_set_log_base() is a message handler that is called to handle the VHOST_USER_SET_LOG_BASE message. Its payload contains a 64 bit size and offset. Both are added up and used as a size when calling mmap(). There is no integer overflow check. If an integer overflo...
template<typename tc, typename t> CImg<T>& draw_fill(const int x0, const int y0, const int z0, const tc *const color, const float opacity, CImg<t> &region, const float tolerance = 0, const bool is_high_connectivity =...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
180,247,702,172,405,370,000,000,000,000,000,000,000
127
.
int _bson_errprintf( const char *format, ... ) { va_list ap; int ret = 0; va_start( ap, format ); #ifndef R_SAFETY_NET ret = vfprintf( stderr, format, ap ); #endif va_end( ap ); return ret; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
301,676,823,880,169,970,000,000,000,000,000,000,000
11
don't mix up int and size_t (first pass to fix that)
extract_string_until (const char *original, const char *until_substring) { char *result; g_assert ((int) strlen (original) >= until_substring - original); g_assert (until_substring - original >= 0); result = g_malloc (until_substring - original + 1); strncpy (result, original, until_substring - original); resu...
0
[]
nautilus
ca2fd475297946f163c32dcea897f25da892b89d
45,415,704,462,927,310,000,000,000,000,000,000,000
13
Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if th...
void minix_truncate(struct inode * inode) { if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) return; if (INODE_VERSION(inode) == MINIX_V1) V1_minix_truncate(inode); else V2_minix_truncate(inode); }
0
[ "CWE-189" ]
linux-2.6
f5fb09fa3392ad43fbcfc2f4580752f383ab5996
55,650,007,351,896,310,000,000,000,000,000,000,000
9
[PATCH] Fix for minix crash Mounting a (corrupt) minix filesystem with zero s_zmap_blocks gives a spectacular crash on my 2.6.17.8 system, no doubt because minix/inode.c does an unconditional minix_set_bit(0,sbi->s_zmap[0]->b_data); [akpm@osdl.org: make labels conistent while we're there] Signed-off-by: Andrew Mort...
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) { SpaceToBatchNDContext op_context(context, node); // Resize the output tensor if the output tensor is dynamic. if (IsDynamicTensor(op_context.output)) { TF_LITE_ENSURE_OK(context, ResizeOutputTensor(context, &op_context)); } #define TF_LITE_SPAC...
0
[ "CWE-369" ]
tensorflow
6d36ba65577006affb272335b7c1abd829010708
257,873,700,914,522,900,000,000,000,000,000,000,000
68
Prevent division by 0 PiperOrigin-RevId: 370984990 Change-Id: Ib324955bbeb1cbd97c82fd5d61a00a2697c9a2de
static void CallNvmCtxCallback( LoRaMacNvmCtxModule_t module ) { if( ( MacCtx.MacCallbacks != NULL ) && ( MacCtx.MacCallbacks->NvmContextChange != NULL ) ) { MacCtx.MacCallbacks->NvmContextChange( module ); } }
0
[ "CWE-120", "CWE-787" ]
LoRaMac-node
e3063a91daa7ad8a687223efa63079f0c24568e4
333,942,935,992,899,160,000,000,000,000,000,000,000
7
Added received buffer size checks.
static inline int fxsave_user(struct i387_fxsave_struct __user *fx) { if (config_enabled(CONFIG_X86_32)) return user_insn(fxsave %[fx], [fx] "=m" (*fx), "m" (*fx)); else if (config_enabled(CONFIG_AS_FXSAVEQ)) return user_insn(fxsaveq %[fx], [fx] "=m" (*fx), "m" (*fx)); /* See comment in fpu_fxsave() below. */ ...
0
[ "CWE-284", "CWE-264" ]
linux
26bef1318adc1b3a530ecc807ef99346db2aa8b0
227,129,806,646,398,550,000,000,000,000,000,000,000
10
x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround Before we do an EMMS in the AMD FXSAVE information leak workaround we need to clear any pending exceptions, otherwise we trap with a floating-point exception inside this code. Reported-by: halfdog <me@halfdog.net> Tested-by: Borislav Petkov <bp@suse.de> Link: h...
dns_message_buildopt(dns_message_t *message, dns_rdataset_t **rdatasetp, unsigned int version, uint16_t udpsize, unsigned int flags, dns_ednsopt_t *ednsopts, size_t count) { dns_rdataset_t *rdataset = NULL; dns_rdatalist_t *rdatalist = NULL; dns_rdata_t *rdata = NULL; isc_result_t result; unsigned in...
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
10,834,867,176,787,575,000,000,000,000,000,000,000
89
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
prepare_singleton_class(mrb_state *mrb, struct RBasic *o) { struct RClass *sc, *c; if (o->c->tt == MRB_TT_SCLASS) return; sc = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_SCLASS, mrb->class_class); sc->flags |= MRB_FLAG_IS_INHERITED; sc->mt = kh_init(mt, mrb); sc->iv = 0; if (o->tt == MRB_TT_CLASS) { c...
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
267,540,256,562,523,730,000,000,000,000,000,000,000
34
`mrb_class_real()` did not work for `BasicObject`; fix #4037
MP4::Properties::Properties(File *file, MP4::Atoms *atoms, ReadStyle style) : AudioProperties(style) { d = new PropertiesPrivate; MP4::Atom *moov = atoms->find("moov"); if(!moov) { debug("MP4: Atom 'moov' not found"); return; } MP4::Atom *trak = 0; ByteVector data; MP4::AtomList trakList = mo...
0
[]
taglib
cce6ad46c912c4137131c97f67136a3d11881726
40,062,336,900,697,345,000,000,000,000,000,000,000
90
Reverse the version check, similarly to what mp4v2 does
void raw6_icmp_error(struct sk_buff *skb, int nexthdr, u8 type, u8 code, int inner_offset, __be32 info) { struct sock *sk; int hash; const struct in6_addr *saddr, *daddr; struct net *net; hash = nexthdr & (RAW_HTABLE_SIZE - 1); read_lock(&raw_v6_hashinfo.lock); sk = sk_head(&raw_v6_hashinfo.ht[hash]); if (s...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
23,566,273,031,080,430,000,000,000,000,000,000,000
28
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 cma_iboe_join_multicast(struct rdma_id_private *id_priv, struct cma_multicast *mc) { struct iboe_mcast_work *work; struct rdma_dev_addr *dev_addr = &id_priv->id.route.addr.dev_addr; int err; struct sockaddr *addr = (struct sockaddr *)&mc->addr; struct net_device *ndev = NULL; if (cma_zero_addr(...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
315,521,034,007,264,830,000,000,000,000,000,000,000
58
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
void isis_notif_if_state_change(const struct isis_circuit *circuit, bool down) { const char *xpath = "/frr-isisd:if-state-change"; struct list *arguments = yang_data_list_new(); char xpath_arg[XPATH_MAXLEN]; struct yang_data *data; struct isis_area *area = circuit->area; notif_prep_instance_hdr(xpath, area, "def...
0
[ "CWE-119", "CWE-787" ]
frr
ac3133450de12ba86c051265fc0f1b12bc57b40c
267,626,029,302,503,160,000,000,000,000,000,000,000
16
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>
char* encode_base64(byte* src,size_t ssize) { char* outbuf; char* retbuf; int pos; int i, l, left; unsigned long triple; byte *inb; /* Exit on empty input */ if (!ssize||src==NULL){ log_msg(LOG_LEVEL_DEBUG,"encode base64: empty string"); return NULL; } outbuf = (char *)checked_malloc(size...
1
[ "CWE-787" ]
aide
175d1f2626f4500b4fc5ecb7167bba9956b174bc
237,907,025,629,516,230,000,000,000,000,000,000,000
83
Precalculate buffer size in base64 functions Aide uses a fixed size (16k bytes) for the return buffer in encode_base64/decode_base64 functions. This results in a segfault if aide processes a file with too large extended attribute value or ACL. Fix this issue by precalculating the size of the return buffer depending o...
R_API RBinJavaAttrInfo *r_bin_java_annotation_default_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) { ut64 offset = 0; if (sz < 8) { return NULL; } RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset); offset += 6; if (attr && sz >= offset) { attr->type = R_BI...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
106,429,372,044,905,830,000,000,000,000,000,000,000
17
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
virDomainHostdevAssignAddress(virDomainXMLOptionPtr xmlopt, const virDomainDef *def, virDomainHostdevDefPtr hostdev) { int next_unit = 0; int controller = 0; unsigned int max_unit; if (xmlopt->config.features & VIR_DOMAIN_DEF_FEATURE_WIDE_SCSI...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
33,011,058,156,312,686,000,000,000,000,000,000,000
40
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
TEST(Printer, HealthTransitionPrinter) { std::ostringstream changed; changed << HealthTransition::Changed; EXPECT_EQ("Changed", changed.str()); std::ostringstream unchanged; unchanged << HealthTransition::Unchanged; EXPECT_EQ("Unchanged", unchanged.str()); }
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
291,692,600,974,484,730,000,000,000,000,000,000,000
9
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static void bond_netpoll_cleanup(struct net_device *bond_dev) { struct bonding *bond = netdev_priv(bond_dev); struct list_head *iter; struct slave *slave; bond_for_each_slave(bond, slave, iter) if (bond_slave_is_up(slave)) slave_disable_netpoll(slave); }
0
[ "CWE-476", "CWE-703" ]
linux
105cd17a866017b45f3c45901b394c711c97bf40
289,953,316,333,711,200,000,000,000,000,000,000,000
10
bonding: fix null dereference in bond_ipsec_add_sa() If bond doesn't have real device, bond->curr_active_slave is null. But bond_ipsec_add_sa() dereferences bond->curr_active_slave without null checking. So, null-ptr-deref would occur. Test commands: ip link add bond0 type bond ip link set bond0 up ip x s...
int btrfs_run_dev_replace(struct btrfs_trans_handle *trans, struct btrfs_fs_info *fs_info) { int ret; struct btrfs_root *dev_root = fs_info->dev_root; struct btrfs_path *path; struct btrfs_key key; struct extent_buffer *eb; struct btrfs_dev_replace_item *ptr; struct btrfs_dev_replace *dev_replace = &fs_info...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
103,106,003,751,842,290,000,000,000,000,000,000,000
107
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
static enum TIFFReadDirEntryErr TIFFReadDirEntryLong8Array(TIFF* tif, TIFFDirEntry* direntry, uint64** value) { enum TIFFReadDirEntryErr err; uint32 count; void* origdata; uint64* data; switch (direntry->tdir_type) { case TIFF_BYTE: case TIFF_SBYTE: case TIFF_SHORT: case TIFF_SSHORT: case TIFF_LONG: c...
0
[ "CWE-125" ]
libtiff
9a72a69e035ee70ff5c41541c8c61cd97990d018
14,046,063,101,947,237,000,000,000,000,000,000,000
165
* 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 ...
on_web_service_idling (CockpitWebService *service, gpointer data) { CockpitSession *session = data; if (session->timeout_tag) g_source_remove (session->timeout_tag); g_debug ("session is idle"); /* * The minimum amount of time before a request uses this new web service, * oth...
0
[ "CWE-1021" ]
cockpit
46f6839d1af4e662648a85f3e54bba2d57f39f0e
207,155,145,987,404,570,000,000,000,000,000,000,000
28
ws: Restrict our cookie to the login host only Mark our cookie as `SameSite: Strict` [1]. The current `None` default will soon be moved to `Lax` by Firefox and Chromium, and recent versions started to throw a warning about it. [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite https://...
static int32_t virtio_net_flush_tx(VirtIONetQueue *q) { VirtIONet *n = q->n; VirtIODevice *vdev = VIRTIO_DEVICE(n); VirtQueueElement *elem; int32_t num_packets = 0; int queue_index = vq2q(virtio_get_queue_index(q->tx_vq)); if (!(vdev->status & VIRTIO_CONFIG_S_DRIVER_OK)) { return num_pac...
0
[ "CWE-703" ]
qemu
abe300d9d894f7138e1af7c8e9c88c04bfe98b37
196,133,472,026,686,500,000,000,000,000,000,000,000
94
virtio-net: fix map leaking on error during receive Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg") tries to fix the use after free of the sg by caching the virtqueue elements in an array and unmap them at once after receiving the packets, But it forgot to unmap the cached elements on error which ...
clear_animation_timeout (NMApplet *applet) { if (applet->animation_id) { g_source_remove (applet->animation_id); applet->animation_id = 0; applet->animation_step = 0; } }
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
321,256,424,116,235,700,000,000,000,000,000,000,000
8
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
static void mtree_print_phys_entries(int start, int end, int skip, int ptr) { if (start == end - 1) { qemu_printf("\t%3d ", start); } else { qemu_printf("\t%3d..%-3d ", start, end - 1); } qemu_printf(" skip=%d ", skip); if (ptr == PHYS_MAP_NODE_NIL) { qemu_printf(" ptr=N...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
145,435,223,755,056,100,000,000,000,000,000,000,000
17
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
Get a specific body section's MIME headers */ PHP_FUNCTION(imap_fetchmime) { zval *streamind; zend_long msgno, flags = 0; pils *imap_le_struct; char *body; zend_string *sec; unsigned long len; int argc = ZEND_NUM_ARGS(); if (zend_parse_parameters(argc, "rlS|l", &streamind, &msgno, &sec, &flags) == FAILURE) ...
0
[ "CWE-88" ]
php-src
336d2086a9189006909ae06c7e95902d7d5ff77e
226,274,175,347,776,960,000,000,000,000,000,000,000
36
Disable rsh/ssh functionality in imap by default (bug #77153)
ATPrepSetStatistics(Relation rel, const char *colName, Node *newValue, LOCKMODE lockmode) { /* * We do our own permission checking because (a) we want to allow SET * STATISTICS on indexes (for expressional index columns), and (b) we want * to allow SET STATISTICS on system catalogs without requiring * allowSys...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
12,627,778,135,943,234,000,000,000,000,000,000,000
22
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...
bind_socket(struct TCP_Server_Info *server) { int rc = 0; if (server->srcaddr.ss_family != AF_UNSPEC) { /* Bind to the specified local IP address */ struct socket *socket = server->ssocket; rc = socket->ops->bind(socket, (struct sockaddr *) &server->srcaddr, sizeof(server->srcaddr)); if ...
0
[ "CWE-703", "CWE-189" ]
linux
1fc29bacedeabb278080e31bb9c1ecb49f143c3b
132,184,379,964,997,880,000,000,000,000,000,000,000
24
cifs: fix off-by-one bug in build_unc_path_to_root commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed the code such that the vol->prepath no longer contained a leading delimiter and then fixed up the places that accessed that field to account for that change. One spot in build_unc_path_to_root wa...
static ut64 get_vaddr(RBinFile *bf, ut64 baddr, ut64 paddr, ut64 vaddr) { return vaddr; }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
178,347,124,001,507,530,000,000,000,000,000,000,000
3
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
static double mp_median(_cimg_math_parser& mp) { const unsigned int i_end = (unsigned int)mp.opcode[2]; switch (i_end - 3) { case 1 : return _mp_arg(3); case 2 : return cimg::median(_mp_arg(3),_mp_arg(4)); case 3 : return cimg::median(_mp_arg(3),_mp_arg(4),_mp_arg(5)); ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
318,809,735,649,150,640,000,000,000,000,000,000,000
18
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static void perf_event_addr_filters_apply(struct perf_event *event) { struct perf_addr_filters_head *ifh = perf_event_addr_filters(event); struct task_struct *task = READ_ONCE(event->ctx->task); struct perf_addr_filter *filter; struct mm_struct *mm = NULL; unsigned int count = 0; unsigned long flags; /* * We ...
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
81,925,925,197,294,100,000,000,000,000,000,000,000
50
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 ...
static apr_status_t add_buffered_data(h2_stream *stream, apr_off_t requested, apr_off_t *plen, int *peos, int *is_all, h2_headers **pheaders) { apr_bucket *b, *e; *peos = 0; *plen = 0; *is_all = 0; if (pheaders) { ...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
51,145,852,825,175,780,000,000,000,000,000,000,000
62
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
bool TABLE_LIST::prepare_view_security_context(THD *thd) { DBUG_ENTER("TABLE_LIST::prepare_view_security_context"); DBUG_PRINT("enter", ("table: %s", alias)); DBUG_ASSERT(!prelocking_placeholder && view); if (view_suid) { DBUG_PRINT("info", ("This table is suid view => load contest")); DBUG_ASSERT(vi...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
140,672,365,116,198,800,000,000,000,000,000,000,000
48
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...
opj_bool pi_create_encode(opj_pi_iterator_t *pi, opj_cp_t *cp, int tileno, int pino, int tpnum, int tppos, J2K_T2_MODE t2_mode, int cur_totnum_tp) { char prog[4]; int i; int incr_top = 1, resetX = 0; opj_tcp_t *tcps = &cp->tcps[tileno]; opj_poc_t *tcp = &tcps->pocs[pino]; ...
0
[ "CWE-369" ]
openjpeg
c5bd64ea146162967c29bd2af0cbb845ba3eaaaf
113,814,955,960,343,740,000,000,000,000,000,000,000
243
[MJ2] To avoid divisions by zero / undefined behaviour on shift Signed-off-by: Young_X <YangX92@hotmail.com>
virtual int get_decrypt_filter(std::unique_ptr<RGWGetObj_Filter>* filter, RGWGetObj_Filter* cb, bufferlist* manifest_bl) { *filter = nullptr; return 0; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
45,109,217,561,300,890,000,000,000,000,000,000,000
4
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
int brcmf_proto_msgbuf_rx_trigger(struct device *dev) { struct brcmf_bus *bus_if = dev_get_drvdata(dev); struct brcmf_pub *drvr = bus_if->drvr; struct brcmf_msgbuf *msgbuf = (struct brcmf_msgbuf *)drvr->proto->pd; struct brcmf_commonring *commonring; void *buf; u32 flowid; int qlen; buf = msgbuf->commonrings[B...
0
[ "CWE-20" ]
linux
a4176ec356c73a46c07c181c6d04039fafa34a9f
45,538,784,885,332,210,000,000,000,000,000,000,000
30
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...
win_free_mem( win_T *win, int *dirp, // set to 'v' or 'h' for direction if 'ea' tabpage_T *tp) // tab page "win" is in, NULL for current { frame_T *frp; win_T *wp; tabpage_T *win_tp = tp == NULL ? curtab : tp; // Remove the window and its frame from the tree of frames. frp = win->w_f...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
134,399,941,303,225,380,000,000,000,000,000,000,000
22
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input, typename TTypes<T, 3>::ConstTensor filter, typename TTypes<T, 4>::ConstTensor out_backprop, int stride_rows, int stride_cols, int rate_rows, int rate_cols, int pad_top,...
1
[ "CWE-787" ]
tensorflow
3f6fe4dfef6f57e768260b48166c27d148f3015f
108,868,301,561,641,880,000,000,000,000,000,000,000
57
Add missing validations in dillation ops. PiperOrigin-RevId: 372037158 Change-Id: I4ee304c84a02550c030288a6534000b934fc1599
SERVER_REC *server_find_chatnet(const char *chatnet) { GSList *tmp; g_return_val_if_fail(chatnet != NULL, NULL); if (*chatnet == '\0') return NULL; for (tmp = servers; tmp != NULL; tmp = tmp->next) { SERVER_REC *server = tmp->data; if (server->connrec->chatnet != NULL && g_strcasecmp(server->connrec->c...
0
[ "CWE-20" ]
irssi-proxy
85bbc05b21678e80423815d2ef1dfe26208491ab
4,726,573,373,623,835,000,000,000,000,000,000,000
17
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
static int ati_remote2_probe(struct usb_interface *interface, const struct usb_device_id *id) { struct usb_device *udev = interface_to_usbdev(interface); struct usb_host_interface *alt = interface->cur_altsetting; struct ati_remote2 *ar2; int r; if (alt->desc.bInterfaceNumber) return -ENODEV; ar2 = kzalloc(si...
1
[ "CWE-703" ]
linux
950336ba3e4a1ffd2ca60d29f6ef386dd2c7351d
334,891,867,116,156,980,000,000,000,000,000,000,000
66
Input: ati_remote2 - fix crashes on detecting device with invalid descriptor The ati_remote2 driver expects at least two interfaces with one endpoint each. If given malicious descriptor that specify one interface or no endpoints, it will crash in the probe function. Ensure there is at least two interfaces and one endp...
static void cirrus_mmio_blt_write(CirrusVGAState * s, unsigned address, uint8_t value) { switch (address) { case (CIRRUS_MMIO_BLTBGCOLOR + 0): cirrus_hook_write_gr(s, 0x00, value); break; case (CIRRUS_MMIO_BLTBGCOLOR + 1): cirrus_hook_write_gr(s, 0x10, value); break; case (CIRRUS_MMIO_BLTBGCOL...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
247,476,223,324,605,400,000,000,000,000,000,000,000
108
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
do_filter( linenr_T line1, linenr_T line2, exarg_T *eap, // for forced 'ff' and 'fenc' char_u *cmd, int do_in, int do_out) { char_u *itmp = NULL; char_u *otmp = NULL; linenr_T linecount; linenr_T read_linecount; pos_T cursor_save; char_u *cmd_buf; buf_T *old_curbuf...
0
[ "CWE-122", "CWE-787" ]
vim
dc5490e2cbc8c16022a23b449b48c1bd0083f366
241,131,338,517,669,200,000,000,000,000,000,000,000
293
patch 8.2.4215: illegal memory access when copying lines in Visual mode Problem: Illegal memory access when copying lines in Visual mode. Solution: Adjust the Visual position after copying lines.
void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref, bool merge) { if (new_parent == get_depended_from()) depended_from= NULL; if (context) { bool need_change= false; /* Suppose there are nested selects: select_id=1 select_...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
141,583,347,632,714,070,000,000,000,000,000,000,000
92
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.
int git_tree__write_index( git_oid *oid, git_index *index, git_repository *repo) { int ret; bool old_ignore_case = false; assert(oid && index && repo); if (git_index_has_conflicts(index)) { giterr_set(GITERR_INDEX, "Cannot create a tree from a not fully merged index."); return GIT_EUNMERGED; } if (inde...
0
[ "CWE-20" ]
libgit2
928429c5c96a701bcbcafacb2421a82602b36915
58,325,371,878,581,040,000,000,000,000,000,000,000
36
tree: Check for `.git` with case insensitivy
int attach_capi_ctr(struct capi_ctr *ctr) { int i; mutex_lock(&capi_controller_lock); for (i = 0; i < CAPI_MAXCONTR; i++) { if (!capi_controller[i]) break; } if (i == CAPI_MAXCONTR) { mutex_unlock(&capi_controller_lock); printk(KERN_ERR "kcapi: out of controller slots\n"); return -EBUSY; } capi_cont...
0
[ "CWE-125" ]
linux
1f3e2e97c003f80c4b087092b225c8787ff91e4d
141,353,178,423,550,170,000,000,000,000,000,000,000
38
isdn: cpai: check ctr->cnr to avoid array index out of bound The cmtp_add_connection() would add a cmtp session to a controller and run a kernel thread to process cmtp. __module_get(THIS_MODULE); session->task = kthread_run(cmtp_session, session, "kcmtpd_ctr_%d", session->num); During this process, the ker...
var_check_lock(int flags, char_u *name, int use_gettext) { if (flags & DI_FLAGS_LOCK) { semsg(_(e_variable_is_locked_str), use_gettext ? (char_u *)_(name) : name); return TRUE; } return FALSE; }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
29,025,884,139,559,936,000,000,000,000,000,000,000
10
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
static int rtl8xxxu_start(struct ieee80211_hw *hw) { struct rtl8xxxu_priv *priv = hw->priv; struct rtl8xxxu_rx_urb *rx_urb; struct rtl8xxxu_tx_urb *tx_urb; unsigned long flags; int ret, i; ret = 0; init_usb_anchor(&priv->rx_anchor); init_usb_anchor(&priv->tx_anchor); init_usb_anchor(&priv->int_anchor); pri...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
124,811,113,378,293,610,000,000,000,000,000,000,000
77
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
process_ellipse2(STREAM s, ELLIPSE2_ORDER * os, uint32 present, RD_BOOL delta) { BRUSH brush; if (present & 0x0001) rdp_in_coord(s, &os->left, delta); if (present & 0x0002) rdp_in_coord(s, &os->top, delta); if (present & 0x0004) rdp_in_coord(s, &os->right, delta); if (present & 0x0008) rdp_in_coord(s, ...
0
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
153,560,087,137,421,940,000,000,000,000,000,000,000
40
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix ...
static int dt_remember_or_free_map(struct pinctrl *p, const char *statename, struct pinctrl_dev *pctldev, struct pinctrl_map *map, unsigned num_maps) { int i; struct pinctrl_dt_map *dt_map; /* Initialize common mapping table entry fields */ for (i = 0; i < num_maps; i++) { const char *devname; d...
0
[ "CWE-125" ]
linux
be4c60b563edee3712d392aaeb0943a768df7023
91,943,789,850,069,550,000,000,000,000,000,000,000
37
pinctrl: devicetree: Avoid taking direct reference to device name string When populating the pinctrl mapping table entries for a device, the 'dev_name' field for each entry is initialised to point directly at the string returned by 'dev_name()' for the device and subsequently used by 'create_pinctrl()' when looking up...
static int complete_sev_es_emulated_mmio(struct kvm_vcpu *vcpu) { struct kvm_run *run = vcpu->run; struct kvm_mmio_fragment *frag; unsigned int len; BUG_ON(!vcpu->mmio_needed); /* Complete previous fragment */ frag = &vcpu->mmio_fragments[vcpu->mmio_cur_fragment]; len = min(8u, frag->len); if (!vcpu->mmio_is_...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
11,654,910,649,534,968,000,000,000,000,000,000,000
45
KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it di...
int ssl3_get_server_certificate(SSL *s) { int al,i,ok,ret= -1; unsigned long n,nc,llen,l; X509 *x=NULL; const unsigned char *q,*p; unsigned char *d; STACK_OF(X509) *sk=NULL; SESS_CERT *sc; EVP_PKEY *pkey=NULL; int need_cert = 1; /* VRS: 0=> will allow null cert if auth == KRB5 */ n=s->method->ssl_get_messag...
0
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
130,991,937,724,056,270,000,000,000,000,000,000,000
183
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
static xmlEntityPtr SVGGetEntity(void *context,const xmlChar *name) { SVGInfo *svg_info; /* Get an entity by name. */ (void) LogMagickEvent(CoderEvent,GetMagickModule()," SAX.SVGGetEntity(%s)", name); svg_info=(SVGInfo *) context; return(xmlGetDocEntity(svg_info->document,name)); }
0
[ "CWE-125" ]
ImageMagick6
a5db4873626f702d2ddd8bc293573493e0a412c0
268,167,461,846,971,800,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/1336
bool OSDService::is_full() const { Mutex::Locker l(full_status_lock); return cur_state >= FULL; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
237,568,085,672,800,600,000,000,000,000,000,000,000
5
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 diff_fill_sha1_info(struct diff_filespec *one) { if (DIFF_FILE_VALID(one)) { if (!one->sha1_valid) { struct stat st; if (!strcmp(one->path, "-")) { hashcpy(one->sha1, null_sha1); return; } if (lstat(one->path, &st) < 0) die("stat %s", one->path); if (index_path(one->sha1, one->...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
75,565,546,424,763,610,000,000,000,000,000,000,000
18
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
bool AveragePool(const uint8* input_data, const Dims<4>& input_dims, int stride, int pad_width, int pad_height, int filter_width, int filter_height, int32 output_activation_min, int32 output_activation_max, uint8* output_data, const Dims<4>& output_dim...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
6,634,865,541,601,304,000,000,000,000,000,000,000
10
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
const char *CRYPTO_get_lock_name(int type) { if (type < 0) return("dynamic"); else if (type < CRYPTO_NUM_LOCKS) return(lock_names[type]); else if (type-CRYPTO_NUM_LOCKS > sk_OPENSSL_STRING_num(app_locks)) return("ERROR"); else return(sk_OPENSSL_STRING_value(app_locks,type-CRYPTO_NUM_LOCKS)); }
0
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
267,945,050,441,042,700,000,000,000,000,000,000,000
11
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
xmlKeepBlanksDefault(int val) { int old = xmlKeepBlanksDefaultValue; xmlKeepBlanksDefaultValue = val; if (!val) xmlIndentTreeOutput = 1; return(old); }
0
[ "CWE-119" ]
libxml2
23f05e0c33987d6605387b300c4be5da2120a7ab
313,619,572,682,406,000,000,000,000,000,000,000,000
7
Detect excessive entities expansion upon replacement If entities expansion in the XML parser is asked for, it is possble to craft relatively small input document leading to excessive on-the-fly content generation. This patch accounts for those replacement and stop parsing after a given threshold. it can be bypassed as...
static int oidc_target_link_uri_matches_configuration(request_rec *r, oidc_cfg *cfg, const char *target_link_uri) { apr_uri_t o_uri; apr_uri_parse(r->pool, target_link_uri, &o_uri); if (o_uri.hostname == NULL) { oidc_error(r, "could not parse the \"target_link_uri\" (%s) in to a valid URL: aborting.", t...
0
[ "CWE-20" ]
mod_auth_openidc
612e309bfffd6f9b8ad7cdccda3019fc0865f3b4
73,407,107,116,700,030,000,000,000,000,000,000,000
60
don't echo query params on invalid requests to redirect URI; closes #212 thanks @LukasReschke; I'm sure there's some OWASP guideline that warns against this
int RGWHandler_REST_S3Website::init(rgw::sal::RGWRadosStore *store, req_state *s, rgw::io::BasicClient* cio) { // save the original object name before retarget() replaces it with the // result of get_effective_key(). the error_handler() needs the original // object name for red...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
101,151,140,380,066,750,000,000,000,000,000,000,000
10
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static void redraw_titles(void) { need_maketitle = TRUE; # ifdef FEAT_WINDOWS redraw_tabline = TRUE; # endif }
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
213,396,147,209,318,500,000,000,000,000,000,000,000
7
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'.
proc_setgroups_write (const long child_pid, const char * const str) { const size_t str_len = strlen(str); char setgroups_path[sizeof ("/proc//setgroups") + INT_STRLEN_BOUND (long)]; snprintf (setgroups_path, sizeof (setgroups_path), "/proc/%ld/setgroups", child_pid); const int fd = open (setgroups_path,...
0
[ "CWE-284" ]
glibc
23e0e8f5f1fb5ed150253d986ecccdc90c2dcd5e
29,255,024,768,277,966,000,000,000,000,000,000,000
20
getcwd: Set errno to ERANGE for size == 1 (CVE-2021-3999) No valid path returned by getcwd would fit into 1 byte, so reject the size early and return NULL with errno set to ERANGE. This change is prompted by CVE-2021-3999, which describes a single byte buffer underflow and overflow when all of the following condition...
uint8_t* cli_bcapi_map_getvalue(struct cli_bc_ctx *ctx , int32_t id, int32_t valuesize) { struct cli_map *s = get_hashtab(ctx, id); if (!s) return NULL; if (cli_map_getvalue_size(s) != valuesize) return NULL; return cli_map_getvalue(s); }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
175,797,391,648,925,000,000,000,000,000,000,000,000
9
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static void ccall(JF, js_Ast *fun, js_Ast *args) { int n; switch (fun->type) { case EXP_INDEX: cexp(J, F, fun->a); emit(J, F, OP_DUP); cexp(J, F, fun->b); emit(J, F, OP_GETPROP); emit(J, F, OP_ROT2); break; case EXP_MEMBER: cexp(J, F, fun->a); emit(J, F, OP_DUP); emitstring(J, F, OP_GETPROP_S, fun...
0
[ "CWE-476" ]
mujs
5008105780c0b0182ea6eda83ad5598f225be3ee
97,166,370,020,126,900,000,000,000,000,000,000,000
32
Fix 697172: degenerate labeled break/continue statement. A labeled break statement will look for a matching label through its chain of parent statements. We start looking at the break statement though, so if the label is attached to the break, we'll return the break statement itself as a break target. Start looking f...
void Item_sum_hybrid::restore_to_before_no_rows_in_result() { if (!was_values) { was_values= TRUE; null_value= value->null_value= was_null_value; } }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
250,469,625,300,237,770,000,000,000,000,000,000,000
8
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...
rpmRC hdrblobRead(FD_t fd, int magic, int exact_size, rpmTagVal regionTag, hdrblob blob, char **emsg) { int32_t block[4]; int32_t *bs = (magic != 0) ? &block[0] : &block[2]; int blen = (magic != 0) ? sizeof(block) : sizeof(block) / 2; int32_t il; int32_t dl; int32_t * ei = NULL; size_t uc; ...
0
[ "CWE-125" ]
rpm
8f4b3c3cab8922a2022b9e47c71f1ecf906077ef
300,748,354,672,005,900,000,000,000,000,000,000,000
64
hdrblobInit() needs bounds checks too Users can pass untrusted data to hdrblobInit() and it must be robust against this.
void WebContents::MessageSync(bool internal, const std::string& channel, blink::CloneableMessage arguments, MessageSyncCallback callback) { TRACE_EVENT1("electron", "WebContents::MessageSync", "channel", channel); // webConten...
0
[ "CWE-284", "CWE-693" ]
electron
18613925610ba319da7f497b6deed85ad712c59b
126,500,861,410,618,800,000,000,000,000,000,000,000
10
refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065) * refactor: wire will-navigate up to a navigation throttle instead of OpenURL * spec: add test for x-site _top navigation * chore: old cod...
ex_behave(exarg_T *eap) { if (STRCMP(eap->arg, "mswin") == 0) { set_option_value((char_u *)"selection", 0L, (char_u *)"exclusive", 0); set_option_value((char_u *)"selectmode", 0L, (char_u *)"mouse,key", 0); set_option_value((char_u *)"mousemodel", 0L, (char_u *)"popup", 0); set_option_value((char_u *)"keymo...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
257,594,762,978,900,600,000,000,000,000,000,000,000
20
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
close_log_file(void) { if (log_file) { fclose(log_file); log_file = NULL; } }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
164,543,623,863,183,690,000,000,000,000,000,000,000
7
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
ipvs_start(void) { log_message(LOG_DEBUG, "Initializing ipvs"); /* Initialize IPVS module */ if (ipvs_init()) { if (modprobe_ipvs() || ipvs_init()) { log_message(LOG_INFO, "IPVS: Can't initialize ipvs: %s", ipvs_strerror(errno)); no_ipvs = true; return IPVS_ERROR; } } return IPVS_SUCCESS; }
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
277,596,586,328,672,000,000,000,000,000,000,000,000
15
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
void handle_command_error(struct st_command *command, uint error, int sys_errno) { DBUG_ENTER("handle_command_error"); DBUG_PRINT("enter", ("error: %d", error)); var_set_int("$sys_errno",sys_errno); var_set_int("$errno",error); if (error != 0) { int i; if (command->abort_o...
0
[]
server
01b39b7b0730102b88d8ea43ec719a75e9316a1e
1,688,087,666,605,677,800,000,000,000,000,000,000
48
mysqltest: don't eat new lines in --exec pass them through as is
void luaT_getvarargs (lua_State *L, CallInfo *ci, StkId where, int wanted) { int i; int nextra = ci->u.l.nextraargs; if (wanted < 0) { wanted = nextra; /* get all extra arguments available */ checkstackp(L, nextra, where); /* ensure stack space */ L->top = where + nextra; /* next instruction will n...
1
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
eb41999461b6f428186c55abd95f4ce1a76217d5
218,081,626,098,464,850,000,000,000,000,000,000,000
13
Fixed bugs of stack reallocation x GC Macro 'checkstackGC' was doing a GC step after resizing the stack; the GC could shrink the stack and undo the resize. Moreover, macro 'checkstackp' also does a GC step, which could remove the preallocated CallInfo when calling a function. (Its name has been changed to 'checkstackG...
ippWrite(http_t *http, /* I - HTTP connection */ ipp_t *ipp) /* I - IPP data */ { DEBUG_printf(("ippWrite(http=%p, ipp=%p)", (void *)http, (void *)ipp)); if (!http) return (IPP_STATE_ERROR); return (ippWriteIO(http, (ipp_iocb_t)httpWrite2, http->blocking, NULL, ipp)); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
226,973,189,573,441,950,000,000,000,000,000,000,000
10
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
static void fq_reset(struct fq *fq, fq_skb_free_t free_func) { int i; for (i = 0; i < fq->flows_cnt; i++) fq_flow_reset(fq, &fq->flows[i], free_func); kfree(fq->flows); fq->flows = NULL; }
0
[ "CWE-330" ]
linux
55667441c84fa5e0911a0aac44fb059c15ba6da2
253,030,601,764,580,960,000,000,000,000,000,000,000
11
net/flow_dissector: switch to siphash UDP IPv6 packets auto flowlabels are using a 32bit secret (static u32 hashrnd in net/core/flow_dissector.c) and apply jhash() over fields known by the receivers. Attackers can easily infer the 32bit secret and use this information to identify a device and/or user, since this 32bi...
QList<Message> PostgreSqlStorage::requestMsgs(UserId user, BufferId bufferId, MsgId first, MsgId last, int limit) { QList<Message> messagelist; QSqlDatabase db = logDb(); if (!beginReadOnlyTransaction(db)) { qWarning() << "PostgreSqlStorage::requestMsgs(): cannot start read only transaction!"; ...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
327,152,575,402,206,350,000,000,000,000,000,000,000
62
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
static struct calipso_doi *calipso_doi_search(u32 doi) { struct calipso_doi *iter; list_for_each_entry_rcu(iter, &calipso_doi_list, list) if (iter->doi == doi && refcount_read(&iter->refcount)) return iter; return NULL; }
0
[ "CWE-416" ]
linux
ad5d07f4a9cd671233ae20983848874731102c08
241,290,205,230,618,430,000,000,000,000,000,000,000
9
cipso,calipso: resolve a number of problems with the DOI refcounts The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only re...
int main(int argc, char *argv[]) { opj_dinfo_t* dinfo; opj_event_mgr_t event_mgr; /* event manager */ int tnum; unsigned int snum; opj_mj2_t *movie; mj2_tk_t *track; mj2_sample_t *sample; unsigned char* frame_codestream; FILE *file, *outfile; char outfilename[50]; mj2_dp...
1
[ "CWE-119", "CWE-787" ]
openjpeg
cc3824767bde397fedb8a1ae4786a222ba860c8d
175,493,277,472,519,040,000,000,000,000,000,000,000
89
opj_mj2_extract: Check provided output prefix for length This uses snprintf() with correct buffer length instead of sprintf(), which prevents a buffer overflow when providing a long output prefix. Furthermore the program exits with an error when the provided output prefix is too long. Fixes #1088.
stream_buffer_finalize (GObject *object) { CamelStreamBufferPrivate *priv; priv = CAMEL_STREAM_BUFFER (object)->priv; g_free (priv->buf); g_free (priv->linebuf); /* Chain up to parent's finalize() method. */ G_OBJECT_CLASS (camel_stream_buffer_parent_class)->finalize (object); }
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
169,393,364,628,306,440,000,000,000,000,000,000,000
12
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
static int dynamicGetbuf(gdIOCtxPtr ctx, void *buf, int len) { int rlen, remain; dpIOCtxPtr dctx; dynamicPtr *dp; dctx = (dpIOCtxPtr) ctx; dp = dctx->dp; remain = dp->logicalSize - dp->pos; if(remain >= len) { rlen = len; } else { if(remain <= 0) { /* 2.0.34: EOF is incorrect. We use 0 for * errors...
1
[ "CWE-125" ]
libgd
4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
243,428,089,281,886,900,000,000,000,000,000,000,000
29
Fix invalid read in gdImageCreateFromTiffPtr() tiff_invalid_read.tiff is corrupt, and causes an invalid read in gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case, dynamicGetbuf() is called with a negative dp->pos, bu...
fr_window_present_dialog_if_created (FrWindow *window, const char *dialog_name) { GtkWidget *dialog; dialog = g_hash_table_lookup (window->priv->named_dialogs, dialog_name); if (dialog != NULL) { gtk_window_present (GTK_WINDOW (dialog)); return TRUE; } return FALSE; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
227,542,409,154,220,860,000,000,000,000,000,000,000
13
libarchive: sanitize filenames before extracting
get_cmdline_screen_pos(void) { cmdline_info_T *p = get_ccline_ptr(); if (p == NULL) return -1; return p->cmdspos; }
0
[ "CWE-674", "CWE-787" ]
vim
51f0bfb88a3554ca2dde777d78a59880d1ee37a8
32,782,428,964,099,900,000,000,000,000,000,000,000
8
patch 8.2.4975: recursive command line loop may cause a crash Problem: Recursive command line loop may cause a crash. Solution: Limit recursion of getcmdline().
mswin_printer_fopen(gx_io_device * iodev, const char *fname, const char *access, gp_file ** pfile, char *rfname, uint rnamelen, gs_memory_t *mem) { DWORD version = GetVersion(); HANDLE hprinter; int pipeh[2]; uintptr_t tid; HANDLE hthread; char pname[gp_file_name_sizeof]; ...
0
[ "CWE-20" ]
ghostpdl
a9bd3dec9fde03327a4a2c69dad1036bf9632e20
306,490,172,750,432,350,000,000,000,000,000,000,000
105
Bug 704342: Include device specifier strings in access validation for the "%pipe%", %handle%" and %printer% io devices. We previously validated only the part after the "%pipe%" Postscript device specifier, but this proved insufficient. This rebuilds the original file name string, and validates it complete. The sligh...
void tcp_enter_loss(struct sock *sk, int how) { const struct inet_connection_sock *icsk = inet_csk(sk); struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *skb; /* Reduce ssthresh if it has not yet been made inside this window. */ if (icsk->icsk_ca_state <= TCP_CA_Disorder || tp->snd_una == tp->high_seq || (ic...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
105,040,551,570,075,170,000,000,000,000,000,000,000
57
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
static int php_stream_memory_stat(php_stream *stream, php_stream_statbuf *ssb TSRMLS_DC) /* {{{ */ { time_t timestamp = 0; php_stream_memory_data *ms = (php_stream_memory_data*)stream->abstract; assert(ms != NULL); memset(ssb, 0, sizeof(php_stream_statbuf)); /* read-only across the board */ ssb->sb.st_mode = m...
1
[ "CWE-20" ]
php-src
6297a117d77fa3a0df2e21ca926a92c231819cd5
116,178,345,785,508,770,000,000,000,000,000,000,000
41
Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input
R_API void r_bin_java_classes_free(void /*RBinClass*/ *k) { RBinClass *klass = k; if (klass) { r_list_free (klass->methods); r_list_free (klass->fields); free (klass->name); free (klass->super); free (klass->visibility_str); free (klass); } }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
90,092,289,332,957,790,000,000,000,000,000,000,000
11
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static PolygonInfo **AcquirePolygonThreadSet( const PrimitiveInfo *primitive_info,ExceptionInfo *exception) { PathInfo *magick_restrict path_info; PolygonInfo **polygon_info; ssize_t i; size_t number_threads; number_threads=(size_t) GetMagickResourceLimit(ThreadResource); polygon_info=...
0
[]
ImageMagick
f4cdb3f3aab28273960ffacf1d356312b56ffd27
233,196,379,089,361,340,000,000,000,000,000,000,000
84
https://github.com/ImageMagick/ImageMagick/issues/3338
static MagickBooleanType AcquireQuantumPixels(QuantumInfo *quantum_info, const size_t extent) { register ssize_t i; assert(quantum_info != (QuantumInfo *) NULL); assert(quantum_info->signature == MagickCoreSignature); quantum_info->number_threads=(size_t) GetMagickResourceLimit(ThreadResource); quantum...
0
[ "CWE-369" ]
ImageMagick
c4e63ad30bc42da691f2b5f82a24516dd6b4dc70
175,626,876,598,634,630,000,000,000,000,000,000,000
33
https://github.com/ImageMagick/ImageMagick/issues/105