func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void ConnectDialogEdit::init() { m_si = NULL; usPort = 0; bOk = true; bCustomLabel = false; qwInlineNotice->hide(); qlePort->setValidator(new QIntValidator(1, 65535, qlePort)); qlePort->setText(QString::number(DEFAULT_MUMBLE_PORT)); qlePassword->setEchoMode(QLineEdit::Password); connect(qleName, SIGNAL(text...
0
[ "CWE-59", "CWE-61" ]
mumble
e59ee87abe249f345908c7d568f6879d16bfd648
297,997,122,703,103,540,000,000,000,000,000,000,000
20
FIX(client): Only allow "http"/"https" for URLs in ConnectDialog Our public server list registration script doesn't have an URL scheme whitelist for the website field. Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine. User interaction is required, as the ...
static int gfs2_rbm_find(struct gfs2_rbm *rbm, u8 state, u32 *minext, const struct gfs2_inode *ip, bool nowrap) { struct buffer_head *bh; int initial_bii; u32 initial_offset; int first_bii = rbm->bii; u32 first_offset = rbm->offset; u32 offset; u8 *buffer; int n = 0; int iters = rbm->rgd->rd_length; int r...
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
179,395,713,348,579,000,000,000,000,000,000,000,000
98
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
struct stsentry *Curl_hsts(struct hsts *h, const char *hostname, bool subdomain) { if(h) { time_t now = time(NULL); size_t hlen = strlen(hostname); struct Curl_llist_element *e; struct Curl_llist_element *n; for(e = h->list.head; e; e = n) { struct stsentry *sts = ...
1
[]
curl
fae6fea209a2d4db1582f608bd8cc8000721733a
130,192,758,227,568,270,000,000,000,000,000,000,000
32
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 int nested_vmx_check_msr_switch(struct kvm_vcpu *vcpu, u32 count, u64 addr) { int maxphyaddr; if (count == 0) return 0; maxphyaddr = cpuid_maxphyaddr(vcpu); if (!IS_ALIGNED(addr, 16) || addr >> maxphyaddr || (addr + count * sizeof(struct vmx_msr_entry) - 1) >> maxphyaddr) return -EINVAL;...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
18,294,721,613,796,895,000,000,000,000,000,000,000
14
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
OFCondition ASC_setIdentRQUserOnly( T_ASC_Parameters * params, const OFString& userName, const OFBool requestRsp) { if (params == NULL) return ASC_NULLKEY; // length field for user identity content is only 2 bytes -> 65535 bytes max if (userName.length() > 65535) return EC_IllegalCall; UserI...
0
[ "CWE-415", "CWE-703", "CWE-401" ]
dcmtk
a9697dfeb672b0b9412c00c7d36d801e27ec85cb
53,791,782,017,288,490,000,000,000,000,000,000,000
21
Fixed poss. NULL pointer dereference/double free. Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
static void get_pixel_clock_parameters( const struct pipe_ctx *pipe_ctx, struct pixel_clk_params *pixel_clk_params) { const struct dc_stream_state *stream = pipe_ctx->stream; /*TODO: is this halved for YCbCr 420? in that case we might want to move * the pixel clock normalization for hdmi up to here instead of do...
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
317,615,745,783,147,400,000,000,000,000,000,000,000
34
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
static int bpf_input(struct sk_buff *skb) { struct dst_entry *dst = skb_dst(skb); struct bpf_lwt *bpf; int ret; bpf = bpf_lwt_lwtunnel(dst->lwtstate); if (bpf->in.prog) { ret = run_lwt_bpf(skb, &bpf->in, dst, NO_REDIRECT); if (ret < 0) return ret; if (ret == BPF_LWT_REROUTE) return bpf_lwt_input_rerou...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
40,842,106,072,305,065,000,000,000,000,000,000,000
22
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static void vdagent_connection_finalize(GObject *obj) { VDAgentConnection *self = VDAGENT_CONNECTION(obj); VDAgentConnectionPrivate *priv = vdagent_connection_get_instance_private(self); g_queue_free_full(priv->write_queue, (GDestroyNotify)g_bytes_unref); g_free(priv->header_buf); g_free(priv->data...
0
[ "CWE-362" ]
spice-vd_agent
51c415df82a52e9ec033225783c77df95f387891
111,611,285,655,201,520,000,000,000,000,000,000,000
11
Avoids user session hijacking Avoids user hijacking sessions by reusing PID. In theory an attacker could: - open a connection to the daemon; - fork and exit the process but keep the file descriptor open (inheriting or duplicating it in forked process); - force OS to recycle the initial PID, by creating many short li...
gdk_pixbuf_loader_new (void) { return g_object_new (GDK_TYPE_PIXBUF_LOADER, NULL); }
0
[ "CWE-20" ]
gdk-pixbuf
3bac204e0d0241a0d68586ece7099e6acf0e9bea
215,322,047,234,650,300,000,000,000,000,000,000,000
4
Initial stab at getting the focus code to work. Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com> * gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at getting the focus code to work. (gtk_tree_view_class_init): Add a bunch of keybindings. * gtk/gtktreeviewcolumn.c (gtk_tree_view_column_set_c...
static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dentry) { struct superblock_security_struct *sbsec = NULL; struct inode_security_struct *isec = inode->i_security; u32 sid; struct dentry *dentry; #define INITCONTEXTLEN 255 char *context = NULL; unsigned len = 0; int rc = 0; if (isec-...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
252,903,186,131,672,670,000,000,000,000,000,000,000
178
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
} static int iscsi_multicast_skb(struct sk_buff *skb, uint32_t group, gfp_t gfp)
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
105,511,037,642,103,780,000,000,000,000,000,000,000
4
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
xdr_generic_ret(XDR *xdrs, generic_ret *objp) { if (!xdr_ui_4(xdrs, &objp->api_version)) { return (FALSE); } if (!xdr_kadm5_ret_t(xdrs, &objp->code)) { return (FALSE); } return(TRUE); }
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
229,561,555,788,572,730,000,000,000,000,000,000,000
11
Fix kadm5/gssrpc XDR double free [CVE-2014-9421] [MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free partial deserialization results upon failure to deserialize. This responsibility belongs to the callers, svctcp_getargs() and svcudp_getargs(); doing it in the unwrap function results in freeing the result...
static int wolfSSH_SFTPNAME_readdir(WOLFSSH* ssh, WDIR* dir, WS_SFTPNAME* out, char* dirName) { FILINFO f; FILINFO *dp; int sz; if (dir == NULL || ssh == NULL || out == NULL) { return WS_BAD_ARGUMENT; } dp = &f; if (f_readdir(dir, dp) != FR_OK) { return WS_FATAL_ERR...
0
[ "CWE-190" ]
wolfssh
edb272e35ee57e7b89f3e127222c6981b6a1e730
318,647,274,104,433,040,000,000,000,000,000,000,000
74
ASAN SFTP Fixes When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766)
static struct oz_endpoint *oz_ep_alloc(int buffer_size, gfp_t mem_flags) { struct oz_endpoint *ep; ep = kzalloc(sizeof(struct oz_endpoint)+buffer_size, mem_flags); if (!ep) return NULL; INIT_LIST_HEAD(&ep->urb_list); INIT_LIST_HEAD(&ep->link); ep->credit = -1; if (buffer_size) { ep->buffer_size = buffer_si...
0
[ "CWE-703", "CWE-189" ]
linux
b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c
87,621,717,586,397,070,000,000,000,000,000,000,000
18
ozwpan: Use unsigned ints to prevent heap overflow Using signed integers, the subtraction between required_size and offset could wind up being negative, resulting in a memcpy into a heap buffer with a negative length, resulting in huge amounts of network-supplied data being copied into the heap, which could potentiall...
*/ struct sk_buff *pskb_extract(struct sk_buff *skb, int off, int to_copy, gfp_t gfp) { struct sk_buff *clone = skb_clone(skb, gfp); if (!clone) return NULL; if (pskb_carve(clone, off, gfp) < 0 || pskb_trim(clone, to_copy)) { kfree_skb(clone); return NULL; } return clone;
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
139,176,897,891,096,700,000,000,000,000,000,000,000
15
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static inline int sadb_key_len(const struct sadb_key *key) { int key_bytes = DIV_ROUND_UP(key->sadb_key_bits, 8); return DIV_ROUND_UP(sizeof(struct sadb_key) + key_bytes, sizeof(uint64_t)); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
264,448,469,598,330,200,000,000,000,000,000,000,000
7
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
static ssize_t pages_to_scan_store(struct kobject *kobj, struct kobj_attribute *attr, const char *buf, size_t count) { int err; unsigned long nr_pages; err = strict_strtoul(buf, 10, &nr_pages); if (err || nr_pages > UINT_MAX) return -EINVAL; ksm_thread_pages_to_scan = nr_pages; return count; }
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
151,138,868,734,979,760,000,000,000,000,000,000,000
15
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static void Ins_SVTCA( INS_ARG ) { Short A, B; (void)args; if ( CUR.opcode & 1 ) A = 0x4000; else A = 0; B = A ^ 0x4000; CUR.GS.freeVector.x = A; CUR.GS.projVector.x = A; CUR.GS.dualVector.x = A; CUR.GS.freeVector.y = B; CUR.GS.projVector.y = B; CUR....
0
[ "CWE-125" ]
ghostpdl
c7c55972758a93350882c32147801a3485b010fe
325,670,897,034,273,180,000,000,000,000,000,000,000
22
Bug 698024: bounds check zone pointer in Ins_MIRP()
reference_queue_proccess_all (void) { MonoReferenceQueue **iter; MonoReferenceQueue *queue = ref_queues; for (; queue; queue = queue->next) reference_queue_proccess (queue); restart: EnterCriticalSection (&reference_queue_mutex); for (iter = &ref_queues; *iter;) { queue = *iter; if (!queue->should_be_delete...
0
[ "CWE-399", "CWE-264" ]
mono
8eb1189099e02372fd45ca1c67230eccf1edddc0
60,871,860,643,082,845,000,000,000,000,000,000,000
25
Implement a reference queue API. * gc.c: A reference queue allows one to queue callbcks for when objects are collected. It allows for safe cleanup of objects that can only be done when it is effectively collected. The major difference with regular finalization is that the collector makes sure the object was col...
inline char lowercase(const char x) { return (char)((x<'A'||x>'Z')?x:x - 'A' + 'a'); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
170,901,157,964,971,920,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ssize_t vb2_fop_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct video_device *vdev = video_devdata(file); struct mutex *lock = vdev->queue->lock ? vdev->queue->lock : vdev->lock; int err = -EBUSY; if (!(vdev->queue->io_modes & VB2_READ)) return -EINVAL; if (lock && mutex_lock_in...
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
310,060,550,541,768,300,000,000,000,000,000,000,000
22
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
String_copier_for_item::copy_with_warn(CHARSET_INFO *dstcs, String *dst, CHARSET_INFO *srccs, const char *src, uint32 src_length, uint32 nchars) { if (unlikely((dst->copy(dstcs, srccs, src, src_length, nchars, this)))) return true; // E...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
199,458,612,959,985,800,000,000,000,000,000,000,000
32
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.
static struct page *first_bvec_segment(const struct iov_iter *i, size_t *size, size_t *start, size_t maxsize, unsigned maxpages) { struct page *page; size_t skip = i->iov_offset, len; len = i->bvec->bv_len - skip; if (len > maxsize) len = maxsize; skip += i->bvec->bv_offset; page = i->bve...
0
[ "CWE-665", "CWE-284" ]
linux
9d2231c5d74e13b2a0546fee6737ee4446017903
49,946,735,296,455,590,000,000,000,000,000,000,000
18
lib/iov_iter: initialize "flags" in new pipe_buffer The functions copy_page_to_iter_pipe() and push_pipe() can both allocate a new pipe_buffer, but the "flags" member initializer is missing. Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") To: Alexander Viro <viro@zeniv.linux.org.uk> To: linux-fsdevel@vger.k...
void Item_param::invalid_default_param() const { my_message(ER_INVALID_DEFAULT_PARAM, ER_THD(current_thd, ER_INVALID_DEFAULT_PARAM), MYF(0)); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
165,634,055,523,073,830,000,000,000,000,000,000,000
5
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.
is_qf_win(win_T *win, qf_info_T *qi) { // A window displaying the quickfix buffer will have the w_llist_ref field // set to NULL. // A window displaying a location list buffer will have the w_llist_ref // pointing to the location list. if (bt_quickfix(win->w_buffer)) if ((IS_QF_STACK(qi) && win->w_...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
148,852,838,444,934,950,000,000,000,000,000,000,000
13
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
static struct rad_dict_attr_t *dict_find_attr(struct list_head *items, const char *name) { struct rad_dict_attr_t *attr; list_for_each_entry(attr, items, entry) if (!strcmp(attr->name, name)) return attr; return NULL; }
0
[ "CWE-787" ]
accel-ppp
d4cb89721cc8e5b3dd3fbefaf173eb77ecb85615
65,281,468,889,699,330,000,000,000,000,000,000,000
10
fix buffer overflow when receive radius packet This patch fixes buffer overflow if radius packet contains invalid atribute length and attrubute type from the following list: ipv4addr, ipv6addr, ipv6prefix or ifid Reported-by: Chloe Ong Reported-by: Eugene Lim <spaceraccoon@users.noreply.github.com> Reported-by: Kar We...
void squashfs_closedir(struct dir *dir) { struct dir_ent *ent = dir->dirs; while(ent) { struct dir_ent *tmp = ent; ent = ent->next; free(tmp->name); free(tmp); } free(dir); }
0
[ "CWE-200", "CWE-59", "CWE-22" ]
squashfs-tools
e0485802ec72996c20026da320650d8362f555bd
179,636,981,661,680,240,000,000,000,000,000,000,000
14
Unsquashfs: additional write outside destination directory exploit fix An issue on github (https://github.com/plougher/squashfs-tools/issues/72) showed how some specially crafted Squashfs filesystems containing invalid file names (with '/' and '..') can cause Unsquashfs to write files outside of the destination direct...
static inline int is_cow_mapping(vm_flags_t flags) { return (flags & (VM_SHARED | VM_MAYWRITE)) == VM_MAYWRITE; }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
257,370,910,513,316,900,000,000,000,000,000,000,000
4
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static RBinSymbol *get_symbol(RBin *bin, RList *symbols, const char *name, ut64 addr) { RBinSymbol *symbol, *res = NULL; RListIter *iter; if (mydb && symbols != osymbols) { sdb_free (mydb); mydb = NULL; osymbols = symbols; } if (mydb) { if (name) { res = (RBinSymbol*)(void*)(size_t) sdb_num_get (myd...
0
[ "CWE-416" ]
radare2
f85bc674b2a2256a364fe796351bc1971e106005
140,640,335,582,512,210,000,000,000,000,000,000,000
40
Fix #7698 - UAF in r_config_set when loading a dex
static int sigignore(int sig) { struct sigaction sa = { .sa_handler = SIG_IGN, .sa_flags = 0 }; if (sigemptyset(&sa.sa_mask) == -1 || sigaction(sig, &sa, 0) == -1) { return -1; } return 0; }
0
[ "CWE-189" ]
memcached
6695ccbc525c36d693aaa3e8337b36aa0c784424
20,182,914,027,182,442,000,000,000,000,000,000,000
8
Fix segfault on specially crafted packet.
R_API RBinJavaAttrInfo *r_bin_java_deprecated_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) { RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset); if (attr) { attr->type = R_BIN_JAVA_ATTR_TYPE_DEPRECATED_ATTR; attr->size = 6; } // IFDBG r_bin_java_print_depreca...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
10,997,305,898,545,600,000,000,000,000,000,000,000
9
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
get_clkbug_info( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { register int i; register struct info_clkbug *ic; register u_int32 *clkaddr; register int items; struct refclockbug bug; sockaddr_u addr; ZERO_SOCK(&addr); AF(&addr) = AF_INET; #ifdef ISC_PLATFORM_HAVESALEN addr.sa.sa_len = SOCKLE...
0
[ "CWE-476" ]
ntp
8a0c765f3c47633fa262356b0818788d1cf249b1
178,807,687,893,492,730,000,000,000,000,000,000,000
62
[Bug 2939] reslist NULL pointer dereference [Bug 2940] Stack exhaustion in recursive traversal of restriction list -- these two where fixed together --
WalSndShutdown(void) { /* * Reset whereToSendOutput to prevent ereport from attempting to send any * more messages to the standby. */ if (whereToSendOutput == DestRemote) whereToSendOutput = DestNone; proc_exit(0); abort(); /* keep the compiler quiet */ }
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
150,662,063,438,305,860,000,000,000,000,000,000,000
12
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...
repo_pull_local_untrusted (FlatpakDir *self, OstreeRepo *repo, const char *remote_name, const char *url, const char **dirs_to_pull, const cha...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
194,458,368,092,303,800,000,000,000,000,000,000,000
65
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
_gcry_rngcsprng_add_bytes (const void *buf, size_t buflen, int quality) { size_t nbytes; const char *bufptr; if (quality == -1) quality = 35; else if (quality > 100) quality = 100; else if (quality < 0) quality = 0; if (!buf) return gpg_error (GPG_ERR_INV_ARG); if (!buflen || quality < ...
0
[ "CWE-200" ]
libgcrypt
8dd45ad957b54b939c288a68720137386c7f6501
43,394,048,708,121,365,000,000,000,000,000,000,000
36
random: Hash continuous areas in the csprng pool. * random/random-csprng.c (mix_pool): Store the first hash at the end of the pool. -- This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG. An attacker who obtains 580 bytes of the random number from the standard RNG can trivially predict the next 20 byte...
dp_packet_mbuf_init(struct dp_packet *p) { p->mbuf.ol_flags = p->mbuf.tx_offload = p->mbuf.packet_type = 0; p->mbuf.nb_segs = 1; p->mbuf.next = NULL; }
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
17,307,519,838,570,714,000,000,000,000,000,000,000
6
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void pn533_usb_abort_cmd(struct pn533 *dev, gfp_t flags) { struct pn533_usb_phy *phy = dev->phy; /* ACR122U does not support any command which aborts last * issued command i.e. as ACK for standard PN533. Additionally, * it behaves stange, sending broken or incorrect responses, * when we cancel urb befor...
0
[ "CWE-416" ]
linux
6af3aa57a0984e061f61308fe181a9a12359fecc
135,556,234,258,100,950,000,000,000,000,000,000,000
18
NFC: pn533: fix use-after-free and memleaks The driver would fail to deregister and its class device and free related resources on late probe errors. Reported-by: syzbot+cb035c75c03dbe34b796@syzkaller.appspotmail.com Fixes: 32ecc75ded72 ("NFC: pn533: change order operations in dev registation") Signed-off-by: Johan H...
t2p_seekproc(thandle_t handle, uint64 offset, int whence) { T2P *t2p = (T2P*) handle; if (t2p->outputdisable <= 0 && t2p->outputfile) return _TIFF_fseek_f(t2p->outputfile, (_TIFF_off_t) offset, whence); return offset; }
0
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
39,281,572,201,777,140,000,000,000,000,000,000,000
7
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
static int __init binder_init(void) { int ret; char *device_name, *device_names, *device_tmp; struct binder_device *device; struct hlist_node *tmp; ret = binder_alloc_shrinker_init(); if (ret) return ret; atomic_set(&binder_transaction_log.cur, ~0U); atomic_set(&binder_transaction_log_failed.cur, ~0U); bi...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
122,719,554,466,777,200,000,000,000,000,000,000,000
80
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
ConnStateData::validatePinnedConnection(HttpRequest *request, const CachePeer *aPeer) { debugs(33, 7, HERE << pinning.serverConnection); bool valid = true; if (!Comm::IsConnOpen(pinning.serverConnection)) valid = false; else if (pinning.auth && pinning.host && request && strcasecmp(pinning.host...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
181,324,117,080,263,360,000,000,000,000,000,000,000
23
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
static void ok_png_transform_scanline(ok_png_decoder *decoder, const uint8_t *src, uint32_t width) { ok_png *png = decoder->png; const bool dst_flip_y = (decoder->decode_flags & OK_PNG_FLIP_Y) != 0; uint8_t *dst_start; uint8_t *dst_end; if (decoder->interlace_method == 0) { const uint32_t ds...
0
[ "CWE-787" ]
ok-file-formats
e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e
264,568,170,950,687,330,000,000,000,000,000,000,000
259
ok_png: Disallow multiple IHDR chunks (#15)
my_decimal *Item_ignore_value::val_decimal(my_decimal *decimal_value) { DBUG_ASSERT(0); // never should be called null_value= 1; return 0; }
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
179,881,375,385,810,160,000,000,000,000,000,000,000
6
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
test_util_load_win_lib(void *ptr) { HANDLE h = load_windows_system_library("advapi32.dll"); (void) ptr; tt_assert(h); done: if (h) CloseHandle(h); }
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
58,561,850,505,052,930,000,000,000,000,000,000,000
10
Fix assertion failure in tor_timegm. Fixes bug 6811.
z2setgstate(i_ctx_t *i_ctx_p) { os_ptr op = osp; check_stype(*op, st_igstate_obj); if (!restore_page_device(igs, igstate_ptr(op))) return zsetgstate(i_ctx_p); return push_callout(i_ctx_p, "%setgstatepagedevice"); }
1
[]
ghostpdl
3e5d316b72e3965b7968bb1d96baa137cd063ac6
61,549,733,589,600,810,000,000,000,000,000,000,000
9
Bug 699718: Ensure stack space is available before gsrestore call out During a grestore, if the device is going to change, we call out to Postscript to restore the device configuration, before returning to restore the graphics state internally. We have to ensure sufficient op stack space is available to complete the ...
void free_pgd_range(struct mmu_gather *tlb, unsigned long addr, unsigned long end, unsigned long floor, unsigned long ceiling) { pgd_t *pgd; unsigned long next; /* * The next few lines have given us lots of grief... * * Why are we testing PMD* at this top level? Because often * there will be no work ...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
281,432,155,011,016,900,000,000,000,000,000,000,000
61
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static void lis_on_destroy(void *arg) { struct tls_listener *listener = (struct tls_listener*)arg; if (listener->cert) { pj_ssl_cert_wipe_keys(listener->cert); listener->cert = NULL; } if (listener->factory.lock) { pj_lock_destroy(listener->factory.lock); listener->factory.lock = NULL; } ...
0
[ "CWE-362", "CWE-703" ]
pjproject
d5f95aa066f878b0aef6a64e60b61e8626e664cd
211,632,207,496,661,300,000,000,000,000,000,000,000
19
Merge pull request from GHSA-cv8x-p47p-99wr * - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count. - Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport. * - Fix silly mistake: accepted active socket created without...
writeContinue(HTTPConnectionPtr client) { static char httpContinue[] = "HTTP/1.1 100 Continue\r\n\r\n"; /* don't bother writing continue if the post is already completed */ if (client->reqlen - client->reqbegin < client->bodylen) { do_stream(IO_WRITE, client->fd, 0, httpContinue, 25, ...
0
[ "CWE-617" ]
polipo
0e2b44af619e46e365971ea52b97457bc0778cd3
92,754,593,778,798,320,000,000,000,000,000,000,000
10
Try to read POST requests to local configuration interface correctly.
ldns_rdf2buffer_str_nsec3_salt(ldns_buffer *output, const ldns_rdf *rdf) { uint8_t salt_length; uint8_t salt_pos; uint8_t *data = ldns_rdf_data(rdf); if(ldns_rdf_size(rdf) < 1) { return LDNS_STATUS_WIRE_RDATA_ERR; } salt_length = data[0]; /* from now there are variable length entr...
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
63,603,097,483,292,150,000,000,000,000,000,000,000
23
CAA and URI
static void destroy_freelist(void) { int i; Bigint *tmp; _THREAD_PRIVATE_MUTEX_LOCK(dtoa_mutex); for (i = 0; i <= Kmax; i++) { Bigint **listp = &freelist[i]; while ((tmp = *listp) != NULL) { *listp = tmp->next; free(tmp); } freelist[i] = NULL; } _THREAD_PRIVATE_MUTEX_UNLOCK(dtoa_mutex); }
0
[ "CWE-119" ]
php-src
37da90248deb2188e8ee50e4753ad6340679b425
164,209,795,002,764,260,000,000,000,000,000,000,000
17
Added missing allocation checks
static int ipv6_generate_eui64(u8 *eui, struct net_device *dev) { switch (dev->type) { case ARPHRD_ETHER: case ARPHRD_FDDI: return addrconf_ifid_eui48(eui, dev); case ARPHRD_ARCNET: return addrconf_ifid_arcnet(eui, dev); case ARPHRD_INFINIBAND: return addrconf_ifid_infiniband(eui, dev); case ARPHRD_SIT: r...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
55,384,361,081,025,040,000,000,000,000,000,000,000
21
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
static int do_send_NPString(rpc_message_t *message, void *p_value) { NPString *string = (NPString *)p_value; if (string == NULL) return RPC_ERROR_MESSAGE_ARGUMENT_INVALID; int error = rpc_message_send_uint32(message, string->UTF8Length); if (error < 0) return error; if (string->UTF8Length && string->UTF8Ch...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
287,709,930,228,198,850,000,000,000,000,000,000,000
13
Support all the new variables added
mysql_get_server_name(MYSQL *mysql) { if (mysql->options.extension && mysql->options.extension->db_driver != NULL) return mysql->options.extension->db_driver->name; return mariadb_connection(mysql) ? "MariaDB" : "MySQL"; }
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
8,532,162,994,848,849,000,000,000,000,000,000,000
7
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen) { unsigned len; int i; if (!access_ok(VERIFY_WRITE, name, namelen)) return -EFAULT; len = namelen; if (namelen > 32) len = 32; down_read(&uts_sem); for (i = 0; i < len; ++i) { __put_user(utsname()->domainname[i], name + i); if (utsn...
1
[ "CWE-703", "CWE-264", "CWE-189" ]
linux
21c5977a836e399fc710ff2c5367845ed5c2527f
278,077,466,379,350,070,000,000,000,000,000,000,000
22
alpha: fix several security issues Fix several security issues in Alpha-specific syscalls. Untested, but mostly trivial. 1. Signedness issue in osf_getdomainname allows copying out-of-bounds kernel memory to userland. 2. Signedness issue in osf_sysinfo allows copying large amounts of kernel memory to userland. 3. ...
TEST(GteOp, MatchesDotNotationNull) { BSONObj operand = BSON("$gte" << BSONNULL); GTEMatchExpression gte("a.b", operand["$gte"]); ASSERT(gte.matchesBSON(BSONObj(), NULL)); ASSERT(gte.matchesBSON(BSON("a" << BSONNULL), NULL)); ASSERT(gte.matchesBSON(BSON("a" << 4), NULL)); ASSERT(gte.matchesBSON(...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
172,114,097,477,508,300,000,000,000,000,000,000,000
12
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
pair_decode(char *str, float8 *x, float8 *y, char **s) { int has_delim; char *cp; if (!PointerIsValid(str)) return FALSE; while (isspace((unsigned char) *str)) str++; if ((has_delim = (*str == LDELIM))) str++; while (isspace((unsigned char) *str)) str++; *x = strtod(str, &cp); if (cp <= str) r...
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
74,151,556,391,806,700,000,000,000,000,000,000,000
42
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
static int lock_fs(struct mapped_device *md) { int r; WARN_ON(md->frozen_sb); md->frozen_sb = freeze_bdev(md->bdev); if (IS_ERR(md->frozen_sb)) { r = PTR_ERR(md->frozen_sb); md->frozen_sb = NULL; return r; } set_bit(DMF_FROZEN, &md->flags); return 0; }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
243,898,642,480,995,830,000,000,000,000,000,000,000
17
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
static void test_bug4026() { MYSQL_STMT *stmt; MYSQL_BIND my_bind[2]; MYSQL_TIME time_in, time_out; MYSQL_TIME datetime_in, datetime_out; const char *stmt_text; int rc; myheader("test_bug4026"); /* Check that microseconds are inserted and selected successfully */ /* Create a statement handle and pr...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
145,325,485,750,796,340,000,000,000,000,000,000,000
74
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...
**/ CImg<T>& load_ascii(const char *const filename) { return _load_ascii(0,filename);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
333,619,834,727,102,300,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
int bprintf(u32 *bin_buf, size_t size, const char *fmt, ...) { va_list args; int ret; va_start(args, fmt); ret = vbin_printf(bin_buf, size, fmt, args); va_end(args); return ret; }
0
[ "CWE-200" ]
linux
ad67b74d2469d9b82aaa572d76474c95bc484d57
226,572,313,354,234,600,000,000,000,000,000,000,000
11
printk: hash addresses printed with %p Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the a...
int recv_files(int f_in, int f_out, char *local_name) { int fd1,fd2; STRUCT_STAT st; int iflags, xlen; char *fname, fbuf[MAXPATHLEN]; char xname[MAXPATHLEN]; char fnametmp[MAXPATHLEN]; char *fnamecmp, *partialptr; char fnamecmpbuf[MAXPATHLEN]; uchar fnamecmp_type; struct file_struct *file; int itemizing = am...
1
[]
rsync
5509597decdbd7b91994210f700329d8a35e70a1
246,946,619,054,792,840,000,000,000,000,000,000,000
436
Check daemon filter against fnamecmp in recv_files().
TEST_F(QueryPlannerTest, ContainedOrPredicateIsLeadingFieldIndexIntersection) { params.options = QueryPlannerParams::INCLUDE_COLLSCAN | QueryPlannerParams::INDEX_INTERSECTION; addIndex(BSON("a" << 1 << "b" << 1)); addIndex(BSON("c" << 1)); runQuery(fromjson("{$and: [{a: 5}, {$or: [{b: 6}, {c: 7}]}]}"))...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
113,082,058,653,984,960,000,000,000,000,000,000,000
29
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
struct cgroup_subsys_state *cgroup_get_e_css(struct cgroup *cgrp, struct cgroup_subsys *ss) { struct cgroup_subsys_state *css; if (!CGROUP_HAS_SUBSYS_CONFIG) return NULL; rcu_read_lock(); do { css = cgroup_css(cgrp, ss); if (css && css_tryget_online(css)) goto out_unlock; cgrp = cgroup_pare...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
41,247,813,578,245,470,000,000,000,000,000,000,000
24
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static int exif_process_IFD_in_JPEG(image_info_type *ImageInfo, char *dir_start, char *offset_base, size_t IFDlength, size_t displacement, int section_index) { int de; int NumDirEntries; int NextDirOffset; #ifdef EXIF_DEBUG exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_NOTICE, "Process %s (x%04X(=%d))", exif_get...
0
[ "CWE-125" ]
php-src
887a7b571407f7a49a5e7cf1e612d21ef83fedb4
113,829,476,259,802,600,000,000,000,000,000,000,000
73
Fixed bug #77831 - Heap-buffer-overflow in exif_iif_add_value in EXIF
name_appeared_handler (GDBusConnection *connection, const gchar *name, const gchar *name_owner, gpointer user_data) { GVfsDaemon *daemon = G_VFS_DAEMON (user_data); if (strcmp (name, G_VFS_DBUS_DAEMON_NAME) == 0 && *name_owner != 0 && ...
0
[ "CWE-276" ]
gvfs
e3808a1b4042761055b1d975333a8243d67b8bfe
123,461,334,010,955,100,000,000,000,000,000,000,000
15
gvfsdaemon: Check that the connecting client is the same user Otherwise, an attacker who learns the abstract socket address from netstat(8) or similar could connect to it and issue D-Bus method calls. Signed-off-by: Simon McVittie <smcv@collabora.com>
static WERROR dcesrv_DnssrvQuery(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct DnssrvQuery *r) { struct dnsserver_state *dsstate; struct dnsserver_zone *z; WERROR ret; ZERO_STRUCTP(r->out.pdwTypeId); ZERO_STRUCTP(r->out.ppData); if ((dsstate = dnsserver_connect(dce_call)) == NULL) { return W...
0
[]
samba
4cbf95e731b39b2dbfec02f33fd6b195d0b0f7a8
142,782,156,953,200,570,000,000,000,000,000,000,000
38
CVE-2020-14383: s4/dns: Ensure variable initialization with NULL. Based on patches from Francis Brosnan Blázquez <francis@aspl.es> and Jeremy Allison <jra@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14472 BUG: https://bugzilla.samba.org/show_bug.cgi?id=12795 Signed-off-by: Douglas Bagnall <douglas.bag...
static __be32 confirm_addr_indev(struct in_device *in_dev, __be32 dst, __be32 local, int scope) { int same = 0; __be32 addr = 0; for_ifa(in_dev) { if (!addr && (local == ifa->ifa_local || !local) && ifa->ifa_scope <= scope) { addr = ifa->ifa_local; if (same) break; } if (!same) ...
0
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
267,136,650,790,680,960,000,000,000,000,000,000,000
36
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
create_work_q(void) { struct Slapi_work_q *work_q = (struct Slapi_work_q *)PR_StackPop(work_q_stack); if (!work_q) { work_q = (struct Slapi_work_q *)slapi_ch_malloc(sizeof(struct Slapi_work_q)); } else { PR_AtomicDecrement(&work_q_stack_size); } return work_q; }
0
[ "CWE-415" ]
389-ds-base
a3c298f8140d3e4fa1bd5a670f1bb965a21a9b7b
244,557,906,200,158,800,000,000,000,000,000,000,000
10
Issue 5218 - double-free of the virtual attribute context in persistent search (#5219) description: A search is processed by a worker using a private pblock. If the search is persistent, the worker spawn a thread and kind of duplicate its private pblock so that the spawn thread continue to process the p...
private int cvt_8(union VALUETYPE *p, const struct magic *m) { DO_CVT(b, (uint8_t)); return 0;
0
[ "CWE-787" ]
file
d65781527c8134a1202b2649695d48d5701ac60b
216,459,682,378,500,500,000,000,000,000,000,000,000
5
PR/62: spinpx: limit size of file_printable.
QUtil::toUTF8(unsigned long uval) { std::string result; // A UTF-8 encoding of a Unicode value is a single byte for // Unicode values <= 127. For larger values, the first byte of // the UTF-8 encoding has '1' as each of its n highest bits and // '0' for its (n+1)th highest bit where n is the total...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
142,004,192,660,277,400,000,000,000,000,000,000,000
56
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 ...
set_result_format_version(ulong new_version) { switch (new_version){ case 1: /* The first format */ break; case 2: /* New format that also writes comments and empty lines from test file to result */ break; default: die("Version format %lu has not yet been implemented", new_version); ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
33,178,621,721,893,155,000,000,000,000,000,000,000
16
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...
static void load_config(void) { char *opt; opt = conf_get_opt("pptp", "timeout"); if (opt && atoi(opt) > 0) conf_timeout = atoi(opt); opt = conf_get_opt("pptp", "echo-interval"); if (opt && atoi(opt) >= 0) conf_echo_interval = atoi(opt); opt = conf_get_opt("pptp", "echo-failure"); if (opt && atoi(opt) >= ...
0
[ "CWE-787" ]
accel-ppp
a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f
97,158,552,086,156,740,000,000,000,000,000,000,000
57
Fix post_msg implementation bug I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`: https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L5...
const char *gf_filter_get_version(GF_Filter *filter) { return filter ? filter->instance_version : NULL; }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
145,845,421,583,541,600,000,000,000,000,000,000,000
4
fixed crashes for very long path - cf #1908
static inline void spl_filesystem_object_get_file_name(spl_filesystem_object *intern) /* {{{ */ { char slash = SPL_HAS_FLAG(intern->flags, SPL_FILE_DIR_UNIXPATHS) ? '/' : DEFAULT_SLASH; switch (intern->type) { case SPL_FS_INFO: case SPL_FS_FILE: if (!intern->file_name) { php_error_docref(NULL, E_ERROR, "O...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
100,366,547,719,651,340,000,000,000,000,000,000,000
30
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
void ZrtpStateClass::evWaitConfirm1(void) { DEBUGOUT((cout << "Checking for match in WaitConfirm1.\n")); char *msg, first, last; uint8_t *pkt; uint32_t errorCode = 0; if (event->type == ZrtpPacket) { pkt = event->packet; msg = (char *)pkt + 4; first = tolower(*msg); ...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
202,429,274,984,338,730,000,000,000,000,000,000,000
70
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
static int client_need_auth(struct transaction_t *txn, int sasl_result) { if (httpd_tls_required) { /* We only support TLS+Basic, so tell client to use TLS */ const char **hdr; /* Check which response is required */ if ((hdr = spool_getheader(txn->req_hdrs, "Upgrade")) && ...
0
[]
cyrus-imapd
602f12ed2af0a49ac4a58affbfea57d0fc23dea5
234,964,092,197,878,930,000,000,000,000,000,000,000
52
httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder
static Image *ReadDPSImage(const ImageInfo *image_info,ExceptionInfo *exception) { const char *client_name; Display *display; float pixels_per_point; Image *image; int sans, status; Pixmap pixmap; register ssize_t i; register Quantum *q; register size_t ...
0
[]
ImageMagick
f391a5f4554fe47eb56d6277ac32d1f698572f0e
337,179,683,274,938,780,000,000,000,000,000,000,000
434
https://github.com/ImageMagick/ImageMagick/issues/1531
static int old_password_authenticate(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info) { uchar *pkt; int pkt_len; MPVIO_EXT *mpvio= (MPVIO_EXT *) vio; /* generate the scramble, or reuse the old one */ if (mpvio->scramble[SCRAMBLE_LENGTH]) create_random_string(mpvi...
0
[]
mysql-server
25d1b7e03b9b375a243fabdf0556c063c7282361
13,808,647,085,100,082,000,000,000,000,000,000,000
52
Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string
proto_write_session_info (p11_rpc_message *msg, CK_SESSION_INFO_PTR info) { assert (msg != NULL); assert (info != NULL); if (!p11_rpc_message_write_ulong (msg, info->slotID) || !p11_rpc_message_write_ulong (msg, info->state) || !p11_rpc_message_write_ulong (msg, info->flags) || ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
220,958,900,482,723,250,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
static inline CompressionType ConvertPSDCompression( PSDCompressionType compression) { switch (compression) { case RLE: return RLECompression; case ZipWithPrediction: case ZipWithoutPrediction: return ZipCompression; default: return NoCompression; } }
0
[]
ImageMagick
bd9f1e7d1bd2c8e2cf7895d133c5c5b5cd3526b6
36,117,342,015,083,080,000,000,000,000,000,000,000
14
Fixed memory leak when reading incorrect PSD files
void CL_Disconnect( qboolean showMainMenu ) { if ( !com_cl_running || !com_cl_running->integer ) { return; } // shutting down the client so enter full screen ui mode Cvar_Set("r_uiFullScreen", "1"); if ( clc.demorecording ) { CL_StopRecord_f (); } if (clc.download) { FS_FCloseFile( clc.download ); clc...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
156,226,758,690,053,960,000,000,000,000,000,000,000
104
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
readfile_linenr( linenr_T linecnt, /* line count before reading more bytes */ char_u *p, /* start of more bytes read */ char_u *endp) /* end of more bytes read */ { char_u *s; linenr_T lnum; lnum = curbuf->b_ml.ml_line_count - linecnt + 1; for (s = p; s < endp; ++s) if (*s == '\n') ...
0
[ "CWE-200", "CWE-668" ]
vim
5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8
17,950,731,427,624,433,000,000,000,000,000,000,000
14
patch 8.0.1263: others can read the swap file if a user is careless Problem: Others can read the swap file if a user is careless with his primary group. Solution: If the group permission allows for reading but the world permissions doesn't, make sure the group is right.
tiff_set_handlers (void) { TIFFSetErrorHandler (tiff_warning_handler); TIFFSetWarningHandler (tiff_warning_handler); }
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
76,439,804,953,038,020,000,000,000,000,000,000,000
5
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
static int check_cond_jmp_op(struct bpf_verifier_env *env, struct bpf_insn *insn, int *insn_idx) { struct bpf_verifier_state *this_branch = env->cur_state; struct bpf_verifier_state *other_branch; struct bpf_reg_state *regs = this_branch->frame[this_branch->curframe]->regs; struct bpf_reg_state *dst_reg, *o...
0
[ "CWE-125" ]
linux
b799207e1e1816b09e7a5920fbb2d5fcf6edd681
324,236,654,812,393,430,000,000,000,000,000,000,000
121
bpf: 32-bit RSH verification must truncate input before the ALU op When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it is sufficient to just truncate the output to 32 bits; and so I just moved the register size coercion t...
static inline struct hugepage_subpool *subpool_vma(struct vm_area_struct *vma) { return subpool_inode(vma->vm_file->f_dentry->d_inode); }
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
233,784,163,934,604,430,000,000,000,000,000,000,000
4
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static AVFrame *get_video_buffer(AVFilterLink *inlink, int w, int h) { PadContext *s = inlink->dst->priv; AVFrame *frame = ff_get_video_buffer(inlink->dst->outputs[0], w + (s->w - s->in_w), h + (s->h - s->in_h)); int plane; ...
1
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
289,787,785,222,215,270,000,000,000,000,000,000,000
24
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
GF_Err lsr1_on_child_box(GF_Box *s, GF_Box *a) { GF_LASeRSampleEntryBox *ptr = (GF_LASeRSampleEntryBox *)s; switch (a->type) { case GF_ISOM_BOX_TYPE_LSRC: if (ptr->lsr_config) ERROR_ON_DUPLICATED_BOX(a, ptr) ptr->lsr_config = (GF_LASERConfigurationBox *)a; break; case GF_ISOM_BOX_TYPE_M4DS: if (ptr->descr)...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
68,356,217,418,066,210,000,000,000,000,000,000,000
15
fixed #1587
jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) { /* * Convert jiffies to nanoseconds and separate with * one divide. */ u64 nsec = (u64)jiffies * TICK_NSEC; u32 rem; value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem); value->tv_usec = rem / NSEC_PER_USEC; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
310,028,940,789,877,580,000,000,000,000,000,000,000
11
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 ...
static int ext4_da_write_credits(struct inode *inode, loff_t pos, unsigned len) { if (likely(ext4_has_feature_large_file(inode->i_sb))) return 1; if (pos + len <= 0x7fffffffULL) return 1; /* We might need to update the superblock to set LARGE_FILE */ return 2; }
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
137,663,579,631,727,220,000,000,000,000,000,000,000
11
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
print_simple_status(pe_working_set_t * data_set) { node_t *dc = NULL; GListPtr gIter = NULL; int nodes_online = 0; int nodes_standby = 0; dc = data_set->dc_node; if (dc == NULL) { mon_warn("No DC "); } for (gIter = data_set->nodes; gIter != NULL; gIter = gIter->next) { ...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
128,939,417,464,243,570,000,000,000,000,000,000,000
36
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
static int io_statx(struct io_kiocb *req, bool force_nonblock) { struct io_statx *ctx = &req->statx; int ret; if (force_nonblock) { /* only need file table for an actual valid fd */ if (ctx->dfd == -1 || ctx->dfd == AT_FDCWD) req->flags |= REQ_F_NO_FILE_TABLE; return -EAGAIN; } ret = do_statx(ctx->dfd, ...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
332,694,781,297,955,730,000,000,000,000,000,000,000
20
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
static PureFileInfo *sreaddir(char **names_pnt) { struct stat st; DIR *d; struct dirent *de; PureFileInfo *files_info; PureFileInfo *file_info; size_t files_info_size; size_t files_info_counter = (size_t) 0U; char *names; size_t names_size; size_t names_counter = (size_t) 0U; ...
0
[ "CWE-400", "CWE-703" ]
pure-ftpd
aea56f4bcb9948d456f3fae4d044fd3fa2e19706
229,455,253,250,710,200,000,000,000,000,000,000,000
100
listdir(): reuse a single buffer to store every file name to display Allocating a new buffer for each entry is useless. And as these buffers are allocated on the stack, on systems with a small stack size, with many entries, the limit can easily be reached, causing a stack exhaustion and aborting the user session. Re...
UnicodeString(const char * /*src*/, int32_t length, enum EInvariant /*inv*/ ) : i(length) {}
0
[ "CWE-190", "CWE-787" ]
icu
b7d08bc04a4296982fcef8b6b8a354a9e4e7afca
282,240,541,066,510,960,000,000,000,000,000,000,000
2
ICU-20958 Prevent SEGV_MAPERR in append See #971
evbuffer_copyout_from(struct evbuffer *buf, const struct evbuffer_ptr *pos, void *data_out, size_t datlen) { /*XXX fails badly on sendfile case. */ struct evbuffer_chain *chain; char *data = data_out; size_t nread; ev_ssize_t result = 0; size_t pos_in_chain; EVBUFFER_LOCK(buf); if (pos) { chain = pos->i...
1
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
275,901,632,035,586,330,000,000,000,000,000,000,000
59
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
ProcSendSignal(int pid) { PGPROC *proc = NULL; if (RecoveryInProgress()) { /* use volatile pointer to prevent code rearrangement */ volatile PROC_HDR *procglobal = ProcGlobal; SpinLockAcquire(ProcStructLock); /* * Check to see whether it is the Startup process we wish to signal. * This call is ma...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
156,342,069,338,189,160,000,000,000,000,000,000,000
31
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...
void setupServiceNameValidationHC(const std::string& prefix) { std::string yaml = fmt::format(R"EOF( timeout: 1s interval: 1s interval_jitter: 1s unhealthy_threshold: 2 healthy_threshold: 2 http_health_check: service_name_matcher: prefix: {0} path: /healthcheck )EOF...
0
[ "CWE-476" ]
envoy
9b1c3962172a972bc0359398af6daa3790bb59db
178,735,511,842,683,130,000,000,000,000,000,000,000
17
healthcheck: fix grpc inline removal crashes (#749) Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static bool vmxnet3_validate_queues(VMXNET3State *s) { /* * txq_num and rxq_num are total number of queues * configured by guest. These numbers must not * exceed corresponding maximal values. */ if (s->txq_num > VMXNET3_DEVICE_MAX_TX_QUEUES) { qemu_log_mask(LOG_GUEST_ERROR, "vmxnet3: Ba...
0
[]
qemu
d05dcd94aee88728facafb993c7280547eb4d645
99,113,788,352,842,000,000,000,000,000,000,000,000
22
net: vmxnet3: validate configuration values during activate (CVE-2021-20203) While activating device in vmxnet3_acticate_device(), it does not validate guest supplied configuration values against predefined minimum - maximum limits. This may lead to integer overflow or OOB access issues. Add checks to avoid it. Fixes...
static char *ask_helper(const char *msg, void *args, bool password) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(g_wnd_assistant), GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_OK_CANCEL, "%s", msg); char *tagged_m...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
276,798,929,025,498,870,000,000,000,000,000,000,000
44
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
void *md_config_merge_svr(apr_pool_t *pool, void *basev, void *addv) { return md_config_merge(pool, basev, addv); }
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
22,885,373,686,968,270,000,000,000,000,000,000,000
4
v1.1.12, notifycmd improvements
void Compute(OpKernelContext* ctx) override { const Tensor& shape = ctx->input(0); const Tensor& minval = ctx->input(1); const Tensor& maxval = ctx->input(2); OP_REQUIRES(ctx, TensorShapeUtils::IsScalar(minval.shape()), errors::InvalidArgument("minval must be 0-D, got shape ", ...
0
[ "CWE-703", "CWE-197" ]
tensorflow
27b417360cbd671ef55915e4bb6bb06af8b8a832
103,209,914,401,159,730,000,000,000,000,000,000,000
37
Prevent `int64` to `int` truncation in `Shard` API usage. The function argument in `Shard` must be a function of two `int64` arguments. However, we are passing in a function with two `int` arguments. Thus, for large workloads, these arguments get truncated from positive `int64` values to negative `int` ones, resulting...
ProtocolV1::ProtocolV1(AsyncConnection *connection) : Protocol(1, connection), temp_buffer(nullptr), can_write(WriteStatus::NOWRITE), keepalive(false), connect_seq(0), peer_global_seq(0), msg_left(0), cur_msg_size(0), replacing(false), is_reset_from_peer(false),...
0
[ "CWE-294" ]
ceph
6c14c2fb5650426285428dfe6ca1597e5ea1d07d
231,347,220,570,098,300,000,000,000,000,000,000,000
17
mon/MonClient: bring back CEPHX_V2 authorizer challenges Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and AuthClient") introduced a backwards compatibility issue into msgr1. To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2 challenge if client doesn't support it") set out to skip authorizer c...