func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int sqfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition) { struct squashfs_super_block *sblk; int ret; ctxt.cur_dev = fs_dev_desc; ctxt.cur_part_info = *fs_partition; ret = sqfs_read_sblk(&sblk); if (ret) goto error; /* Make sure it has a valid SquashFS magic number*/ if (get_unali...
0
[ "CWE-787" ]
u-boot
2ac0baab4aff1a0b45067d0b62f00c15f4e86856
245,630,546,447,150,360,000,000,000,000,000,000,000
33
fs/squashfs: sqfs_read: Prevent arbitrary code execution Following Jincheng's report, an out-of-band write leading to arbitrary code execution is possible because on one side the squashfs logic accepts directory names up to 65535 bytes (u16), while U-Boot fs logic accepts directory names up to 255 bytes long. Prevent...
irc_server_autojoin_channels (struct t_irc_server *server) { struct t_irc_channel *ptr_channel; const char *autojoin; /* auto-join after disconnection (only rejoins opened channels) */ if (!server->disable_autojoin && server->reconnect_join && server->channels) { for (ptr_channel = serv...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
50,108,309,452,099,300,000,000,000,000,000,000,000
41
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
int LibRaw::subtract_black() { CHECK_ORDER_LOW(LIBRAW_PROGRESS_RAW2_IMAGE); try { if(!is_phaseone_compressed() && (C.cblack[0] || C.cblack[1] || C.cblack[2] || C.cblack[3])) { #define BAYERC(row,col,c) imgdata.image[((row) >> IO.shrink)*S.iwidth + ((col) >> IO.shrink)][c] int cblk[4],i; ...
1
[ "CWE-119", "CWE-787" ]
LibRaw
2f912f5b33582961b1cdbd9fd828589f8b78f21d
258,457,425,769,399,280,000,000,000,000,000,000,000
51
fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef
int cdev_device_add(struct cdev *cdev, struct device *dev) { int rc = 0; if (dev->devt) { cdev_set_parent(cdev, &dev->kobj); rc = cdev_add(cdev, dev->devt, 1); if (rc) return rc; } rc = device_add(dev); if (rc) cdev_del(cdev); return rc; }
0
[ "CWE-362" ]
linux
68faa679b8be1a74e6663c21c3a9d25d32f1c079
2,493,730,040,943,291,800,000,000,000,000,000,000
18
chardev: Avoid potential use-after-free in 'chrdev_open()' 'chrdev_open()' calls 'cdev_get()' to obtain a reference to the 'struct cdev *' stashed in the 'i_cdev' field of the target inode structure. If the pointer is NULL, then it is initialised lazily by looking up the kobject in the 'cdev_map' and so the whole proc...
static int manager_rtnl_process_link(sd_netlink *rtnl, sd_netlink_message *message, void *userdata) { Manager *m = userdata; Link *link = NULL; NetDev *netdev = NULL; uint16_t type; const char *name; int r, ifindex; assert(rtnl); assert(message); ...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
60,159,515,830,078,410,000,000,000,000,000,000,000
84
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
evalpipe(union node *n, int flags) { struct job *jp; struct nodelist *lp; int pipelen; int prevfd; int pip[2]; int status = 0; TRACE(("evalpipe(0x%lx) called\n", (long)n)); pipelen = 0; for (lp = n->npipe.cmdlist ; lp ; lp = lp->next) pipelen++; flags |= EV_EXIT; INTOFF; jp = makejob(n, pipelen); prevfd...
0
[]
dash
29d6f2148f10213de4e904d515e792d2cf8c968e
92,467,769,801,595,130,000,000,000,000,000,000,000
55
eval: Check nflag in evaltree instead of cmdloop This patch moves the nflag check from cmdloop into evaltree. This is so that nflag will be in force even if we enter the shell via a path other than cmdloop, e.g., through sh -c. Reported-by: Joey Hess <id@joeyh.name> Signed-off-by: Herbert Xu <herbert@gondor.apana.or...
static int ip_vs_stats_percpu_seq_open(struct inode *inode, struct file *file) { return single_open_net(inode, file, ip_vs_stats_percpu_show); }
0
[ "CWE-200" ]
linux
2d8a041b7bfe1097af21441cb77d6af95f4f4680
154,268,098,820,582,600,000,000,000,000,000,000,000
4
ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT) If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is not set, __ip_vs_get_timeouts() does not fully initialize the structure that gets copied to userland and that for leaks up to 12 bytes of kernel stack. Add an explicit memset(0) before passing...
static void tg3_disable_ints(struct tg3 *tp) { int i; tw32(TG3PCI_MISC_HOST_CTRL, (tp->misc_host_ctrl | MISC_HOST_CTRL_MASK_PCI_INT)); for (i = 0; i < tp->irq_max; i++) tw32_mailbox_f(tp->napi[i].int_mbox, 0x00000001); }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
192,761,791,664,254,250,000,000,000,000,000,000,000
9
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static int cap_sem_semctl(struct sem_array *sma, int cmd) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
312,380,187,576,811,650,000,000,000,000,000,000,000
4
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 struct io *sock_io_new(int fd, void *user_data) { struct io *io; io = io_new(fd); io_set_close_on_destroy(io, true); io_set_disconnect_handler(io, sock_hup, user_data, NULL); return io; }
0
[ "CWE-416" ]
bluez
838c0dc7641e1c991c0f3027bf94bee4606012f8
223,379,828,034,360,300,000,000,000,000,000,000,000
12
gatt: Fix not cleaning up when disconnected There is a current use after free possible on a gatt server if a client disconnects while a WriteValue call is being processed with dbus. This patch includes the addition of a pending disconnect callback to handle cleanup better if a disconnect occurs during a write, an acq...
static int ZEND_FASTCALL ZEND_FETCH_UNSET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { return zend_fetch_var_address_helper_SPEC_TMP(BP_VAR_UNSET, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); }
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
302,322,286,258,775,600,000,000,000,000,000,000,000
4
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
void gnutls_x509_crl_dist_points_deinit(gnutls_x509_crl_dist_points_t cdp) { unsigned i; for (i = 0; i < cdp->size; i++) { gnutls_free(cdp->points[i].san.data); } gnutls_free(cdp->points); gnutls_free(cdp); }
0
[]
gnutls
d6972be33264ecc49a86cd0958209cd7363af1e9
161,383,262,615,726,520,000,000,000,000,000,000,000
10
eliminated double-free in the parsing of dist points Reported by Robert Święcki.
string serializeEnvvarsFromPoolOptions(const Options &options) const { vector< pair<StaticString, StaticString> >::const_iterator it, end; string result; appendNullTerminatedKeyValue(result, "IN_PASSENGER", "1"); appendNullTerminatedKeyValue(result, "PYTHONUNBUFFERED", "1"); appendNullTerminatedKeyValue(r...
0
[]
passenger
8c6693e0818772c345c979840d28312c2edd4ba4
222,878,587,846,561,760,000,000,000,000,000,000,000
31
Security check socket filenames reported by spawned application processes.
mt_del(mrb_state *mrb, mt_tbl *t, mrb_sym sym) { size_t hash, pos, start; if (t == NULL) return FALSE; if (t->alloc == 0) return FALSE; if (t->size == 0) return FALSE; hash = kh_int_hash_func(mrb, sym); start = pos = hash & (t->alloc-1); for (;;) { struct mt_elem *slot = &t->table[pos]; if (sl...
0
[ "CWE-476", "CWE-190" ]
mruby
f5e10c5a79a17939af763b1dcf5232ce47e24a34
151,258,883,425,955,250,000,000,000,000,000,000,000
28
proc.c: add `mrb_state` argument to `mrb_proc_copy()`. The function may invoke the garbage collection and it requires `mrb_state` to run.
static inline int sctp_wspace(struct sctp_association *asoc) { struct sock *sk = asoc->base.sk; return asoc->ep->sndbuf_policy ? sk->sk_sndbuf - asoc->sndbuf_used : sk_stream_wspace(sk); }
0
[ "CWE-362" ]
linux
b166a20b07382b8bc1dcee2a448715c9c2c81b5b
40,953,444,117,353,530,000,000,000,000,000,000,000
7
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...
void main_init() { /* one-time initialization */ #ifdef USE_SYSTEMD int i; systemd_fds=sd_listen_fds(1); if(systemd_fds<0) fatal("systemd initialization failed"); listen_fds_start=SD_LISTEN_FDS_START; /* set non-blocking mode on systemd file descriptors */ for(i=0; i<systemd_fds; ++i) ...
1
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
323,285,150,592,833,460,000,000,000,000,000,000,000
38
stunnel-5.57
static inline u16 freq_to_clock_divider(unsigned int freq, unsigned int rollovers) { return count_to_clock_divider( DIV_ROUND_CLOSEST(CX23888_IR_REFCLK_FREQ, freq * rollovers)); }
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
175,759,434,561,854,770,000,000,000,000,000,000,000
6
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
koi8_r_is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { int v; const UChar* p = *pp; (*pp)++; v = (EncKOI8_R_CtypeTable[*p] & (BIT_CTYPE_UPPER | BIT_CTYPE_LOWER)); return (v != 0 ? TRUE : FALSE); }
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
178,720,601,043,134,400,000,000,000,000,000,000,000
9
onig-5.9.2
void CL_ServerStatusResponse( netadr_t from, msg_t *msg ) { char *s; char info[MAX_INFO_STRING]; int i, l, score, ping; int len; serverStatus_t *serverStatus; serverStatus = NULL; for (i = 0; i < MAX_SERVERSTATUSREQUESTS; i++) { if ( NET_CompareAdr( from, cl_serverStatusList[i].address ) ) { serverStatus...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
136,695,488,919,342,980,000,000,000,000,000,000,000
87
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static mz_bool tdefl_compress_lz_codes(tdefl_compressor *d) { mz_uint flags; mz_uint8 *pLZ_codes; flags = 1; for (pLZ_codes = d->m_lz_code_buf; pLZ_codes < d->m_pLZ_code_buf; flags >>= 1) { if (flags == 1) flags = *pLZ_codes++ | 0x100; if (flags & 1) { mz_uint sym, num_extra_bits; mz...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
236,003,623,697,418,880,000,000,000,000,000,000,000
41
Make line_no with too large value(2**20) invalid. Fixes #124
inline int16x8_t ToInt16x8(const int16* v0, const int16* v1, const int16* v2, const int16* v3, const int16* v4, const int16* v5, const int16* v6, const int16* v7) { static const int16x8_t ZERO_16x8 = vmovq_n_s16(0); int16x8_t ret = vld1q_lane_s16(v0, ZERO_16x8, ...
0
[ "CWE-787" ]
tensorflow
f6c40f0c6cbf00d46c7717a26419f2062f2f8694
336,957,576,777,173,150,000,000,000,000,000,000,000
14
Validate min and max arguments to `QuantizedResizeBilinear`. PiperOrigin-RevId: 369765091 Change-Id: I33be8b78273ab7d08b97541692fe05cb7f94963a
static char *resolv_usage_page(unsigned page, struct seq_file *f) { const struct hid_usage_entry *p; char *buf = NULL; if (!f) { buf = kzalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC); if (!buf) return ERR_PTR(-ENOMEM); } for (p = hid_usage_table; p->description; p++) if (p->page == page) { if (...
0
[ "CWE-835", "CWE-787" ]
linux
717adfdaf14704fd3ec7fa2c04520c0723247eac
186,668,257,650,907,400,000,000,000,000,000,000,000
28
HID: debug: check length before copy_to_user() If our length is greater than the size of the buffer, we overflow the buffer Cc: stable@vger.kernel.org Signed-off-by: Daniel Rosenberg <drosen@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
static int f_hidg_release(struct inode *inode, struct file *fd) { fd->private_data = NULL; return 0; }
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
072684e8c58d17e853f8e8b9f6d9ce2e58d2b036
334,981,421,063,804,660,000,000,000,000,000,000,000
5
USB: gadget: f_hid: fix deadlock in f_hidg_write() In f_hidg_write() the write_spinlock is acquired before calling usb_ep_queue() which causes a deadlock when dummy_hcd is being used. This is because dummy_queue() callbacks into f_hidg_req_complete() which tries to acquire the same spinlock. This is (part of) the back...
create_socket_dir (void) { char *dirname; long iteration = 0; char *safe_dir; gchar tmp[9]; int i; safe_dir = NULL; do { g_free (safe_dir); gvfs_randomize_string (tmp, 8); tmp[8] = '\0'; dirname = g_strdup_printf ("gvfs-%s-%s", g_get_user_name (), tmp); safe_d...
0
[ "CWE-276" ]
gvfs
e3808a1b4042761055b1d975333a8243d67b8bfe
314,655,817,564,407,530,000,000,000,000,000,000,000
58
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>
void peak_usb_init_time_ref(struct peak_time_ref *time_ref, const struct peak_usb_adapter *adapter) { if (time_ref) { memset(time_ref, 0, sizeof(struct peak_time_ref)); time_ref->adapter = adapter; } }
0
[ "CWE-909" ]
linux
f7a1337f0d29b98733c8824e165fca3371d7d4fd
113,165,210,820,528,500,000,000,000,000,000,000,000
8
can: peak_usb: fix slab info leak Fix a small slab info leak due to a failure to clear the command buffer at allocation. The first 16 bytes of the command buffer are always sent to the device in pcan_usb_send_cmd() even though only the first two may have been initialised in case no argument payload is provided (e.g. ...
g_NPN_Evaluate(NPP instance, NPObject *npobj, NPString *script, NPVariant *result) { if (!thread_check()) { npw_printf("WARNING: NPN_Evaluate not called from the main thread\n"); return false; } if (instance == NULL) return false; PluginInstance *plugin = PLUGIN_INSTANCE(instance); if (plugin == NULL) r...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
144,725,423,371,273,840,000,000,000,000,000,000,000
29
Support all the new variables added
void asn1_free(struct asn1_data *data) { talloc_free(data); }
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
199,954,414,055,895,170,000,000,000,000,000,000,000
4
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
static int decode_write(struct xdr_stream *xdr, struct nfs_writeres *res) { __be32 *p; int status; status = decode_op_hdr(xdr, OP_WRITE); if (status) return status; READ_BUF(16); READ32(res->count); READ32(res->verf->committed); COPYMEM(res->verf->verifier, 8); return 0; }
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
229,611,760,441,864,170,000,000,000,000,000,000,000
15
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
event_no_set_filter_flag(struct trace_event_file *file) { if (file->flags & EVENT_FILE_FL_NO_SET_FILTER) return true; return false; }
0
[ "CWE-787" ]
linux
70303420b5721c38998cf987e6b7d30cc62d4ff1
300,241,594,031,356,500,000,000,000,000,000,000,000
7
tracing: Check for no filter when processing event filters The syzkaller detected a out-of-bounds issue with the events filter code, specifically here: prog[N].pred = NULL; /* #13 */ prog[N].target = 1; /* TRUE */ prog[N+1].pred = NULL; prog[N+1].target = 0; /* FALSE */ -> prog[N-1].target = N; prog[N-1].w...
static char *parse_gchord(char *p) { char *q; int l, l2; q = p; while (*p != '"') { if (*p == '\\') p++; if (*p == '\0') { syntax("No end of guitar chord", p); break; } p++; } l = p - q; if (gchord) { char *gch; /* many guitar chords: concatenate with '\n' */ l2 = strlen(gchord); gch =...
0
[ "CWE-125", "CWE-787" ]
abcm2ps
3169ace6d63f6f517a64e8df0298f44a490c4a15
331,464,566,156,664,800,000,000,000,000,000,000,000
36
fix: crash when accidental without a note at start of line after K: Issue #84.
DwaCompressor::initializeDefaultChannelRules () { _channelRules.clear(); _channelRules.push_back (Classifier ("R", LOSSY_DCT, HALF, 0, false)); _channelRules.push_back (Classifier ("R", LOSSY_DCT, FLOAT, 0, false)); _channelRules.push_back (Classifier ("G", LOSSY_DCT, HALF, 1, false));...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
66,356,336,557,867,130,000,000,000,000,000,000,000
22
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
check_compat_entry_size_and_hooks(struct compat_ipt_entry *e, struct xt_table_info *newinfo, unsigned int *size, const unsigned char *base, const unsigned char *limit) { struct xt_entry_match *ematch; struct xt_entry_target *t; struct xt_target *target; unsigned int entry_offset; unsigned i...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
18,358,436,388,852,604,000,000,000,000,000,000,000
67
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
static int limit_list(struct rev_info *revs) { int slop = SLOP; unsigned long date = ~0ul; struct commit_list *list = revs->commits; struct commit_list *newlist = NULL; struct commit_list **p = &newlist; struct commit_list *bottom = NULL; struct commit *interesting_cache = NULL; if (revs->ancestry_path) { bo...
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
125,087,858,443,594,700,000,000,000,000,000,000,000
78
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
int fits_to_pgmraw (char *fitsfile, char *pgmfile) {FITS_FILE *fitsin = NULL; FILE *pgmout = NULL; FITS_HDU_LIST *hdu; FITS_PIX_TRANSFORM trans; int retval = -1, nbytes, maxbytes; char buffer[1024]; fitsin = fits_open (fitsfile, "r"); /* Open FITS-file for reading */ if (fitsin == NULL) goto err_return; if ...
0
[ "CWE-476" ]
gimp
ace45631595e8781a1420842582d67160097163c
79,063,535,427,663,290,000,000,000,000,000,000,000
58
Bug 676804 - file handling DoS for fit file format Apply patch from joe@reactionis.co.uk which fixes a buffer overflow on broken/malicious fits files.
static u8 mtrr_disabled_type(struct kvm_vcpu *vcpu) { /* * Intel SDM 11.11.2.2: all MTRRs are disabled when * IA32_MTRR_DEF_TYPE.E bit is cleared, and the UC * memory type is applied to all of physical memory. * * However, virtual machines can be run with CPUID such that * there are no MTRRs. In that case...
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
167,079,335,133,065,650,000,000,000,000,000,000,000
17
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
vte_sequence_handler_DL (VteTerminal *terminal, GValueArray *params) { vte_sequence_handler_dl (terminal, params); }
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
165,109,589,031,560,140,000,000,000,000,000,000,000
4
fix bug #548272 svn path=/trunk/; revision=2365
static void ssl_write_extended_ms_ext( mbedtls_ssl_context *ssl, unsigned char *buf, size_t *olen ) { unsigned char *p = buf; if( ssl->handshake->extended_ms == MBEDTLS_SSL_EXTENDED_MS_DISABLED || ssl->minor_ver == MBEDTLS_SS...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
196,226,060,136,170,500,000,000,000,000,000,000,000
24
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
void LuaSettings::Register(lua_State* L) { lua_newtable(L); int methodtable = lua_gettop(L); luaL_newmetatable(L, className); int metatable = lua_gettop(L); lua_pushliteral(L, "__metatable"); lua_pushvalue(L, methodtable); lua_settable(L, metatable); // hide metatable from Lua getmetatable() lua_pushliteral(...
0
[]
minetest
da71e86633d0b27cd02d7aac9fdac625d141ca13
97,471,249,476,400,440,000,000,000,000,000,000,000
27
Protect a few more settings from being set from mods Of those settings main_menu_script has concrete security impact, the rest are added out of abundance of caution.
void kvm_hv_set_cpuid(struct kvm_vcpu *vcpu) { struct kvm_cpuid_entry2 *entry; entry = kvm_find_cpuid_entry(vcpu, HYPERV_CPUID_INTERFACE, 0); if (entry && entry->eax == HYPERV_CPUID_SIGNATURE_EAX) vcpu->arch.hyperv_enabled = true; else vcpu->arch.hyperv_enabled = false; }
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
314,781,742,603,652,520,000,000,000,000,000,000,000
10
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
static double mp_complex_exp(_cimg_math_parser& mp) { const double real = _mp_arg(2), imag = _mp_arg(3), exp_real = std::exp(real); double *ptrd = &_mp_arg(1) + 1; ptrd[0] = exp_real*std::cos(imag); ptrd[1] = exp_real*std::sin(imag); return cimg::type<double>::nan(); ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
184,439,497,475,264,100,000,000,000,000,000,000,000
7
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
const char* oidc_util_set_cookie_append_value(request_rec *r, oidc_cfg *c) { const char *env_var_value = NULL; if (r->subprocess_env != NULL) env_var_value = apr_table_get(r->subprocess_env, OIDC_SET_COOKIE_APPEND_ENV_VAR); if (env_var_value == NULL) { oidc_debug(r, "no cookie append environment variable %...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
308,499,253,841,829,540,000,000,000,000,000,000,000
18
Add a function to escape Javascript characters
bool TABLE::validate_default_values_of_unset_fields(THD *thd) const { DBUG_ENTER("TABLE::validate_default_values_of_unset_fields"); for (Field **fld= field; *fld; fld++) { if (!bitmap_is_set(write_set, (*fld)->field_index) && !((*fld)->flags & (NO_DEFAULT_VALUE_FLAG | VERS_SYSTEM_FIELD))) { ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
75,741,160,425,254,450,000,000,000,000,000,000,000
24
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.
BOOL license_read_binary_blob(wStream* s, LICENSE_BLOB* blob) { UINT16 wBlobType; if (Stream_GetRemainingLength(s) < 4) return FALSE; Stream_Read_UINT16(s, wBlobType); /* wBlobType (2 bytes) */ Stream_Read_UINT16(s, blob->length); /* wBlobLen (2 bytes) */ if (Stream_GetRemainingLength(s) < blob->length) ret...
0
[]
FreeRDP
f1d6afca6ae620f9855a33280bdc6f3ad9153be0
180,628,324,259,821,900,000,000,000,000,000,000,000
31
Fix CVE-2014-0791 This patch fixes CVE-2014-0791, the remaining length in the stream is checked before doing some malloc().
void audit_log_n_string(struct audit_buffer *ab, const char *string, size_t slen) { int avail, new_len; unsigned char *ptr; struct sk_buff *skb; if (!ab) return; BUG_ON(!ab->skb); skb = ab->skb; avail = skb_tailroom(skb); new_len = slen + 3; /* enclosing quotes + null terminator */ if (new_len > avail) ...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
315,591,645,064,659,100,000,000,000,000,000,000,000
27
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static const char *proc_pid_get_link(struct dentry *dentry, struct inode *inode, struct delayed_call *done) { struct path path; int error = -EACCES; if (!dentry) return ERR_PTR(-ECHILD); /* Are we allowed to snoop on the tasks file descriptors? */ if (!proc_fd_access_allowed(inode)) goto ou...
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
11,383,530,163,155,109,000,000,000,000,000,000,000
23
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
void imap_get_parent_path(const char *path, char *buf, size_t buflen) { struct ImapAccountData *adata = NULL; struct ImapMboxData *mdata = NULL; char mbox[1024]; if (imap_adata_find(path, &adata, &mdata) < 0) { mutt_str_copy(buf, path, buflen); return; } /* Gets the parent mbox in mbox */ imap...
0
[ "CWE-125" ]
neomutt
fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc
209,904,762,029,414,700,000,000,000,000,000,000,000
19
Fix seqset iterator when it ends in a comma If the seqset ended with a comma, the substr_end marker would be just before the trailing nul. In the next call, the loop to skip the marker would iterate right past the end of string too. The fix is simple: place the substr_end marker and skip past it immediately.
static bool vmx_check_apicv_inhibit_reasons(enum kvm_apicv_inhibit reason) { ulong supported = BIT(APICV_INHIBIT_REASON_DISABLE) | BIT(APICV_INHIBIT_REASON_ABSENT) | BIT(APICV_INHIBIT_REASON_HYPERV) | BIT(APICV_INHIBIT_REASON_BLOCKIRQ); return supported & BIT(reason); }
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
89,733,606,649,049,670,000,000,000,000,000,000,000
9
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
close_fd_bitmap (fdbp) struct fd_bitmap *fdbp; { register int i; if (fdbp) { for (i = 0; i < fdbp->size; i++) if (fdbp->bitmap[i]) { close (i); fdbp->bitmap[i] = 0; } } }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
179,950,137,880,357,600,000,000,000,000,000,000,000
15
bash-4.4-rc2 release
int TS_CONF_set_certs(CONF *conf, const char *section, const char *certs, TS_RESP_CTX *ctx) { int ret = 0; STACK_OF(X509) *certs_obj = NULL; if (!certs) certs = NCONF_get_string(conf, section, ENV_CERTS); /* Certificate chain is optional. */ if (!certs) goto end; if (!(certs_obj = TS_CONF_load_certs(c...
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
201,548,613,304,665,300,000,000,000,000,000,000,000
17
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
void CLASS ahd_interpolate() { int i, j, top, left, row, col, tr, tc, c, d, val, hm[2]; static const int dir[4] = {-1, 1, -TS, TS}; unsigned ldiff[2][4], abdiff[2][4], leps, abeps; ushort(*rgb)[TS][TS][3], (*rix)[3], (*pix)[4]; short(*lab)[TS][TS][3], (*lix)[3]; char(*homo)[TS][TS], *buffer; #ifdef DCRAW_V...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
7,427,779,025,704,346,000,000,000,000,000,000,000
109
Secunia SA75000 advisory: several buffer overruns
static bool setFunctionName(RCore *core, ut64 off, const char *_name, bool prefix) { char *name, *oname, *nname = NULL; RAnalFunction *fcn; if (!core || !_name) { return false; } const char *fcnpfx = r_config_get (core->config, "anal.fcnprefix"); if (!fcnpfx) { fcnpfx = "fcn"; } if (r_reg_get (core->anal->r...
0
[ "CWE-416", "CWE-908" ]
radare2
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
281,454,185,340,949,320,000,000,000,000,000,000,000
37
Fix #9943 - Invalid free on RAnal.avr
static char *my_get_line(FILE *fp) { char buf[4096]; char *nl = NULL; char *retval = NULL; do { if (NULL == fgets(buf, sizeof(buf), fp)) break; if (NULL == retval) retval = strdup(buf); else { if (NULL == (retval = realloc(retval, str...
0
[ "CWE-125" ]
curl
70b1900dd13d16f2e83f571407a614541d5ac9ba
172,753,905,606,588,970,000,000,000,000,000,000,000
25
'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194) pointed out that the warnf() function in the curl tool didn't properly deal with the cases when excessively long words were used in the string to chop up.
static void aes_decrypt(struct ssh_cipher_struct *cipher, void *in, void *out, unsigned long len) { gcry_cipher_decrypt(cipher->key[0], out, len, in, len); }
0
[ "CWE-310" ]
libssh
e99246246b4061f7e71463f8806b9dcad65affa0
96,674,688,498,511,930,000,000,000,000,000,000,000
4
security: fix for vulnerability CVE-2014-0017 When accepting a new connection, a forking server based on libssh forks and the child process handles the request. The RAND_bytes() function of openssl doesn't reset its state after the fork, but simply adds the current process id (getpid) to the PRNG state, which is not g...
MOCK_IMPL(const char *, dirvote_get_pending_detached_signatures, (void)) { return pending_consensus_signatures; }
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
175,264,771,677,920,720,000,000,000,000,000,000,000
5
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
vncProperties::Load(BOOL usersettings) { vnclog.Print(LL_INTINFO, VNCLOG("***** DBG - Entering Load\n")); //if (m_dlgvisible) { // vnclog.Print(LL_INTWARN, VNCLOG("service helper invoked while Properties panel displayed\n")); // return; //} ResetRegistry(); if (vncService::RunningAsService()) userset...
0
[ "CWE-787" ]
UltraVNC
36a31b37b98f70c1db0428f5ad83170d604fb352
89,736,219,269,603,420,000,000,000,000,000,000,000
287
security fix
if (runModConf->docroot.val) { count += 2; }
0
[ "CWE-787" ]
rsyslog
89955b0bcb1ff105e1374aad7e0e993faa6a038f
199,433,263,766,285,030,000,000,000,000,000,000,000
3
net bugfix: potential buffer overrun
static void bnx2x_hc_int_disable(struct bnx2x *bp) { int port = BP_PORT(bp); u32 addr = port ? HC_REG_CONFIG_1 : HC_REG_CONFIG_0; u32 val = REG_RD(bp, addr); /* in E1 we must use only PCI configuration space to disable * MSI/MSIX capability * It's forbidden to disable IGU_PF_CONF_MSI_MSIX_EN in HC block */ ...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
53,735,815,852,490,930,000,000,000,000,000,000,000
37
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
s32 i2c_smbus_write_block_data(const struct i2c_client *client, u8 command, u8 length, const u8 *values) { union i2c_smbus_data data; if (length > I2C_SMBUS_BLOCK_MAX) length = I2C_SMBUS_BLOCK_MAX; data.block[0] = length; memcpy(&data.block[1], values, length); return i2c_smbus_xfer(client->adapter, c...
0
[ "CWE-787" ]
linux
89c6efa61f5709327ecfa24bff18e57a4e80c7fa
50,909,005,476,702,810,000,000,000,000,000,000,000
13
i2c: core-smbus: prevent stack corruption on read I2C_BLOCK_DATA On a I2C_SMBUS_I2C_BLOCK_DATA read request, if data->block[0] is greater than I2C_SMBUS_BLOCK_MAX + 1, the underlying I2C driver writes data out of the msgbuf1 array boundary. It is possible from a user application to run into that issue by calling the ...
int tls1_change_cipher_state(SSL *s, int which) { static const unsigned char empty[]=""; unsigned char *p,*mac_secret; unsigned char *exp_label; unsigned char tmp1[EVP_MAX_KEY_LENGTH]; unsigned char tmp2[EVP_MAX_KEY_LENGTH]; unsigned char iv1[EVP_MAX_IV_LENGTH*2]; unsigned char iv2[EVP_MAX_IV_LENGTH*2]; unsign...
0
[ "CWE-310" ]
openssl
e5420be6cd09af2550b128575a675490cfba0483
307,605,385,599,717,000,000,000,000,000,000,000,000
238
Make CBC decoding constant time. This patch makes the decoding of SSLv3 and TLS CBC records constant time. Without this, a timing side-channel can be used to build a padding oracle and mount Vaudenay's attack. This patch also disables the stitched AESNI+SHA mode pending a similar fix to that code. In order to be eas...
PHP_FUNCTION(locale_get_display_language) { get_icu_disp_value_src_php( LOC_LANG_TAG , INTERNAL_FUNCTION_PARAM_PASSTHRU ); }
1
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
226,787,271,916,824,080,000,000,000,000,000,000,000
4
Fix bug #72241: get_icu_value_internal out-of-bounds read
static void mwifiex_wmm_cleanup_queues(struct mwifiex_private *priv) { int i; for (i = 0; i < MAX_NUM_TID; i++) mwifiex_wmm_del_pkts_in_ralist(priv, &priv->wmm.tid_tbl_ptr[i]. ra_list); atomic_set(&priv->wmm.tx_pkts_queued, 0); atomic_set(&priv->wmm.highest_queued_prio, HIGH_PRIO_TID); }
0
[ "CWE-787" ]
linux
3a9b153c5591548612c3955c9600a98150c81875
148,520,957,029,520,030,000,000,000,000,000,000,000
11
mwifiex: Fix possible buffer overflows in mwifiex_ret_wmm_get_status() mwifiex_ret_wmm_get_status() calls memcpy() without checking the destination size.Since the source is given from remote AP which contains illegal wmm elements , this may trigger a heap buffer overflow. Fix it by putting the length check before call...
wc_ucs_precompose(wc_uint32 ucs1, wc_uint32 ucs2) { wc_map3 *map; if (WcOption.use_combining && ucs1 <= WC_C_UCS2_END && ucs2 <= WC_C_UCS2_END && (map = wc_map3_search((wc_uint16)ucs1, (wc_uint16)ucs2, ucs_precompose_map, N_ucs_precompose_map)) != NULL) return map->code3; return WC_C_UCS4_ERROR; }
0
[ "CWE-119" ]
w3m
716bc126638393c733399d11d3228edb82877faa
199,901,241,903,999,130,000,000,000,000,000,000,000
11
Prevent global-buffer-overflow in wc_any_to_ucs() Bug-Debian: https://github.com/tats/w3m/issues/43
static void blk_mq_hctx_clear_pending(struct blk_mq_hw_ctx *hctx, struct blk_mq_ctx *ctx) { struct blk_align_bitmap *bm = get_bm(hctx, ctx); clear_bit(CTX_TO_BIT(hctx, ctx), &bm->word); }
0
[ "CWE-362", "CWE-264" ]
linux
0048b4837affd153897ed1222283492070027aa9
142,530,571,346,376,980,000,000,000,000,000,000,000
7
blk-mq: fix race between timeout and freeing request Inside timeout handler, blk_mq_tag_to_rq() is called to retrieve the request from one tag. This way is obviously wrong because the request can be freed any time and some fiedds of the request can't be trusted, then kernel oops might be triggered[1]. Currently wrt. ...
void vrend_fb_bind_texture_id(struct vrend_resource *res, int id, int idx, uint32_t level, uint32_t layer) { const struct util_format_description *desc = util_format_description(res->base.format); GLenum attachment = GL_COLO...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
88,511,069,095,776,980,000,000,000,000,000,000,000
76
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
bind an input parameter to the value of a PHP variable. $paramno is the 1-based position of the placeholder in the SQL statement (but can be the parameter name for drivers that support named placeholders). It should be called prior to execute(). */ static PHP_METHOD(PDOStatement, bindValue) { struct pdo_bound_par...
0
[ "CWE-476" ]
php-src
6045de69c7dedcba3eadf7c4bba424b19c81d00d
183,243,110,458,254,830,000,000,000,000,000,000,000
35
Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle Proper soltion would be to call serialize/unserialize and deal with the result, but this requires more work that should be done by wddx maintainer (not me).
void ldbPrintAll(lua_State *lua) { lua_Debug ar; int vars = 0; if (lua_getstack(lua,0,&ar) != 0) { const char *name; int i = 1; /* Variable index. */ while((name = lua_getlocal(lua,&ar,i)) != NULL) { i++; if (!strstr(name,"(*temporary)")) { sd...
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
326,660,795,874,098,800,000,000,000,000,000,000,000
23
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
void MsgSetRawMsg(msg_t *pThis, char* pszRawMsg, size_t lenMsg) { assert(pThis != NULL); if(pThis->pszRawMsg != pThis->szRawMsg) free(pThis->pszRawMsg); pThis->iLenRawMsg = lenMsg; if(pThis->iLenRawMsg < CONF_RAWMSG_BUFSIZE) { /* small enough: use fixed buffer (faster!) */ pThis->pszRawMsg = pThis->szRawMsg;...
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
153,004,687,446,590,020,000,000,000,000,000,000,000
19
backporting abort condition fix from 5.7.7
void visit(Sequence & /*ope*/) override { name = "Sequence"; }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
83,824,765,298,404,720,000,000,000,000,000,000,000
1
Fix #122
void CLASS apply_tiff() { int max_samp = 0, ties = 0, raw = -1, thm = -1, i; unsigned long long ns, os; struct jhead jh; thumb_misc = 16; if (thumb_offset) { fseek(ifp, thumb_offset, SEEK_SET); if (ljpeg_start(&jh, 1)) { if ((unsigned)jh.bits < 17 && (unsigned)jh.wide < 0x10000 && (unsign...
0
[ "CWE-119", "CWE-125" ]
LibRaw
f1394822a0152ceed77815eafa5cac4e8baab10a
216,648,762,152,863,100,000,000,000,000,000,000,000
269
SECUNIA advisory 76000 #1 (wrong fuji width set via tiff tag
vnc_display_create_creds(bool x509, bool x509verify, const char *dir, const char *id, Error **errp) { gchar *credsid = g_strdup_printf("tlsvnc%s", id); Object *parent = object_get_objects_root(); Object *cred...
0
[]
qemu
4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3
205,572,668,630,676,720,000,000,000,000,000,000,000
38
ui: vnc: avoid floating point exception While sending 'SetPixelFormat' messages to a VNC server, the client could set the 'red-max', 'green-max' and 'blue-max' values to be zero. This leads to a floating point exception in write_png_palette while doing frame buffer updates. Reported-by: Lian Yihan <lianyihan@360.cn> ...
long FileIo::write(const byte* data, long wcount) { assert(p_->fp_ != 0); if (p_->switchMode(Impl::opWrite) != 0) return 0; return (long)std::fwrite(data, 1, wcount, p_->fp_); }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
246,468,427,756,189,300,000,000,000,000,000,000,000
6
Fix https://github.com/Exiv2/exiv2/issues/55
escape_remove_attachment (int argc, char **argv, compose_env_t *env) { size_t count; unsigned long n; char *p; if (escape_check_args (argc, argv, 2, 2)) return 1; n = strtoul (argv[1], &p, 10); if (*p) { mu_error (_("not a valid number: %s"), argv[1]); return 1; } mu_list_cou...
0
[]
mailutils
4befcfd015256c568121653038accbd84820198f
137,212,307,581,911,240,000,000,000,000,000,000,000
24
mail: disable compose escapes in non-interctive mode. * NEWS: Document changes. * doc/texinfo/programs/mail.texi: Document changes. * mail/send.c (mail_compose_send): Recognize escapes only in interactive mode.
compare_address (GtkTreeStore *store, GtkTreeIter *iter, gpointer user_data) { const char *address = user_data; char *tmp_address; gboolean found = FALSE; gtk_tree_model_get (GTK_TREE_MODEL(store), iter, BLUETOOTH_COLUMN_ADDRESS, &tmp_address, -1); found = g_str_equal (address, tmp_address); g_free ...
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
215,347,641,152,720,600,000,000,000,000,000,000,000
15
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){ Expr *p = sqlite3ExprAlloc(db, TK_COLUMN, 0, 0); if( p ){ struct SrcList_item *pItem = &pSrc->a[iSrc]; p->y.pTab = pItem->pTab; p->iTable = pItem->iCursor; if( p->y.pTab->iPKey==iCol ){ p->iColumn = -1; }else{ ...
1
[ "CWE-754" ]
sqlite
926f796e8feec15f3836aa0a060ed906f8ae04d3
40,473,809,992,784,534,000,000,000,000,000,000,000
17
Ensure that the SrcList_item.colUsed field is set correctly (set to have a 1 for all columns of the table) when a generated column appears in the USING clause of a join. FossilOrigin-Name: 1923efb283e8840fa7436eb20b9d2174ef7cace1690d3b97b572a0db2048b8e3
xsltParseStylesheetKey(xsltStylesheetPtr style, xmlNodePtr key) { xmlChar *prop = NULL; xmlChar *use = NULL; xmlChar *match = NULL; xmlChar *name = NULL; xmlChar *nameURI = NULL; if ((style == NULL) || (key == NULL)) return; /* * Get arguments */ prop = xmlGetNsProp(key, (co...
0
[]
libxslt
7089a62b8f133b42a2981cf1f920a8b3fe9a8caa
175,164,182,071,697,850,000,000,000,000,000,000,000
76
Crash compiling stylesheet with DTD * libxslt/xslt.c: when a stylesheet embbeds a DTD the compilation process could get seriously wrong
static int ZEND_FASTCALL ZEND_JMP_SET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *value = _get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); if (i_zend_is_true(value)) { EX_T(opline->result.u.var).tmp_var = *value; zendi_zval_copy_ctor(EX_...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
123,618,250,356,399,110,000,000,000,000,000,000,000
19
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int nl80211_connect(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct net_device *dev = info->user_ptr[1]; struct cfg80211_connect_params connect; struct wiphy *wiphy; struct cfg80211_cached_keys *connkeys = NULL; int err; memset(&connect, ...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
291,647,075,478,451,140,000,000,000,000,000,000,000
233
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
STBIDEF int stbi_is_hdr_from_file(FILE *f) { #ifndef STBI_NO_HDR long pos = ftell(f); int res; stbi__context s; stbi__start_file(&s,f); res = stbi__hdr_test(&s); fseek(f, pos, SEEK_SET); return res; #else STBI_NOTUSED(f); return 0; #endif }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
263,556,405,976,781,040,000,000,000,000,000,000,000
15
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static int cap_task_getsid(struct task_struct *p) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
176,987,514,468,880,200,000,000,000,000,000,000,000
4
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...
int rm_rf_child(int fd, const char *name, RemoveFlags flags) { /* Removes one specific child of the specified directory */ if (fd < 0) return -EBADF; if (!filename_is_valid(name)) return -EINVAL; if ((flags & (REMOVE_ROOT|REMOVE_MISSING_OK)) != 0) /* D...
0
[ "CWE-674" ]
systemd
5b1cf7a9be37e20133c0208005274ce4a5b5c6a1
26,785,563,676,090,165,000,000,000,000,000,000,000
18
shared/rm-rf: loop over nested directories instead of instead of recursing To remove directory structures, we need to remove the innermost items first, and then recursively remove higher-level directories. We would recursively descend into directories and invoke rm_rf_children and rm_rm_children_inner. This is problem...
void CDCCBounce::PutPeer(const CString& sLine) { if (m_pPeer) { m_pPeer->PutServ(sLine); } else { PutServ("*** Not connected yet ***"); } }
0
[ "CWE-399" ]
znc
11508aa72efab4fad0dbd8292b9614d9371b20a9
183,624,360,818,905,900,000,000,000,000,000,000,000
7
Fix crash in bouncedcc module. It happens when DCC RESUME is received. Affected ZNC versions: 0.200, 0.202. Thanks to howeyc for reporting this and providing the patch.
static int nft_set_catchall_flush(const struct nft_ctx *ctx, struct nft_set *set) { u8 genmask = nft_genmask_next(ctx->net); struct nft_set_elem_catchall *catchall; struct nft_set_elem elem; struct nft_set_ext *ext; int ret = 0; list_for_each_entry_rcu(catchall, &set->catchall_list, list) { ext = nft_set...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
136,212,317,537,373,180,000,000,000,000,000,000,000
23
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static PrimitiveInfo *TraceStrokePolygon(const DrawInfo *draw_info, const PrimitiveInfo *primitive_info,ExceptionInfo *exception) { #define MaxStrokePad (6*BezierQuantum+360) #define CheckPathExtent(pad_p,pad_q) \ { \ if ((pad_p) > MaxBezierCoordinates) \ stroke_p=(PointInfo *) RelinquishMagickMemory(stroke_...
0
[]
ImageMagick
24c88041d53853406ee710e144da495ae8e0f874
251,157,854,074,440,150,000,000,000,000,000,000,000
503
https://github.com/ImageMagick/ImageMagick/issues/3339
label_fill(char *label_str, gsize pos, const header_field_info *hfinfo, const char *text) { gsize name_pos; /* "%s: %s", hfinfo->name, text */ name_pos = pos = label_concat(label_str, pos, hfinfo->name); if (!(hfinfo->display & BASE_NO_DISPLAY_VALUE)) { pos = label_concat(label_str, pos, ": "); pos = label_con...
0
[ "CWE-401" ]
wireshark
a9fc769d7bb4b491efb61c699d57c9f35269d871
313,841,684,510,363,340,000,000,000,000,000,000,000
18
epan: Fix a memory leak. Make sure _proto_tree_add_bits_ret_val allocates a bits array using the packet scope, otherwise we leak memory. Fixes #17032.
STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, const char *ibuffer, int ilen) { stbi__zbuf a; a.zbuffer = (stbi_uc *) ibuffer; a.zbuffer_end = (stbi_uc *) ibuffer + ilen; if (stbi__do_zlib(&a, obuffer, olen, 0, 0)) return (int) (a.zout - a.zout_start); else return -1; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
280,760,196,298,203,600,000,000,000,000,000,000,000
10
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
ews_update_foreign_subfolders_data_free (gpointer data) { struct EwsUpdateForeignSubfoldersData *euf = data; if (euf) { g_object_unref (euf->ews_store); g_free (euf->folder_id); g_free (euf); } }
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
156,090,653,230,809,030,000,000,000,000,000,000,000
10
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static void h2_detach(struct conn_stream *cs) { struct h2s *h2s = cs->ctx; struct h2c *h2c; cs->ctx = NULL; if (!h2s) return; h2c = h2s->h2c; h2s->cs = NULL; /* this stream may be blocked waiting for some data to leave (possibly * an ES or RST frame), so orphan it in this case. */ if (!(cs->conn->flags...
0
[ "CWE-119" ]
haproxy
3f0e1ec70173593f4c2b3681b26c04a4ed5fc588
113,434,000,972,594,400,000,000,000,000,000,000,000
55
BUG/CRITICAL: h2: fix incorrect frame length check The incoming H2 frame length was checked against the max_frame_size setting instead of being checked against the bufsize. The max_frame_size only applies to outgoing traffic and not to incoming one, so if a large enough frame size is advertised in the SETTINGS frame, ...
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri, ASN1_OCTET_STRING **keyid, X509_NAME **issuer, ASN1_INTEGER **sno) { CMS_KeyTransRecipientInfo *ktri; if (ri->type != CMS...
0
[ "CWE-311", "CWE-327" ]
openssl
08229ad838c50f644d7e928e2eef147b4308ad64
20,079,305,059,596,573,000,000,000,000,000,000,000
15
Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey An attack is simple, if the first CMS_recipientInfo is valid but the second CMS_recipientInfo is chosen ciphertext. If the second recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct encryption key will be replaced by garbage, and the mess...
virtual void updateFlatness(GfxState *state) { }
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
51,652,353,139,734,640,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
void SSL_free(SSL *s) { int i; if(s == NULL) return; i=CRYPTO_add(&s->references,-1,CRYPTO_LOCK_SSL); #ifdef REF_PRINT REF_PRINT("SSL",s); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"SSL_free, bad reference count\n"); abort(); /* ok */ } #endif if (s->param) X509_VE...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
261,455,162,175,985,400,000,000,000,000,000,000,000
97
Add Next Protocol Negotiation.
int odbc_bindcols(odbc_result *result TSRMLS_DC) { RETCODE rc; int i; SQLSMALLINT colnamelen; /* Not used */ SQLLEN displaysize; SQLUSMALLINT colfieldid; int charextraalloc; result->values = (odbc_result_value *) safe_emalloc(sizeof(odbc_result_value), result->numcols, 0); result->longreadlen = ODBCG(...
0
[ "CWE-20" ]
php-src
344ff5dd4c538eaebea075f7705321f8b86d0b47
138,674,750,289,500,120,000,000,000,000,000,000,000
90
fixed fix #69975 wrt. ODBCVER < 0x0300
print_signed_nanoseconds(double s) { double x; x = fabs(s); if (x < 9999.5e-9) { printf("%+5.0fns", s * 1e9); } else if (x < 9999.5e-6) { printf("%+5.0fus", s * 1e6); } else if (x < 9999.5e-3) { printf("%+5.0fms", s * 1e3); } else if (x < 999.5) { printf("%+6.1fs", s); } else if (x < 999...
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
147,209,676,711,843,900,000,000,000,000,000,000,000
26
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
stateless_send_resolver_callback( pj_status_t status, void *token, const struct pjsip_server_addresses *addr) { pjsip_send_state *stateless_data = (pjsip_send_state*) token; pjsip_tx_data *tdata = stateless_data->tdata; /* Fail on server resolution. */ if (status != PJ_SUCCESS) { if (state...
0
[ "CWE-297", "CWE-295" ]
pjproject
67e46c1ac45ad784db5b9080f5ed8b133c122872
37,994,043,637,135,990,000,000,000,000,000,000,000
77
Merge pull request from GHSA-8hcp-hm38-mfph * Check hostname during TLS transport selection * revision based on feedback * remove the code in create_request that has been moved
static int cp2112_gpio_direction_input(struct gpio_chip *chip, unsigned offset) { struct cp2112_device *dev = gpiochip_get_data(chip); struct hid_device *hdev = dev->hdev; u8 *buf = dev->in_out_buffer; int ret; mutex_lock(&dev->lock); ret = hid_hw_raw_request(hdev, CP2112_GPIO_CONFIG, buf, CP2112_GPIO_CONF...
1
[ "CWE-388" ]
linux
8e9faa15469ed7c7467423db4c62aeed3ff4cae3
325,917,631,455,741,970,000,000,000,000,000,000,000
34
HID: cp2112: fix gpio-callback error handling In case of a zero-length report, the gpio direction_input callback would currently return success instead of an errno. Fixes: 1ffb3c40ffb5 ("HID: cp2112: make transfer buffers DMA capable") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Johan Hovold <johan@k...
static int nfc_llcp_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk); u32 opt; int err = 0; pr_debug("%p optname %d\n", sk, optname); if (level != SOL_NFC) return -ENOPR...
0
[ "CWE-276" ]
linux
3a359798b176183ef09efb7a3dc59abad1cc7104
214,630,000,904,363,460,000,000,000,000,000,000,000
72
nfc: enforce CAP_NET_RAW for raw sockets When creating a raw AF_NFC socket, CAP_NET_RAW needs to be checked first. Signed-off-by: Ori Nimron <orinimron123@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
void Commissioner::HandleCoapsConnected(bool aConnected) { otCommissionerJoinerEvent event; Mac::ExtAddress joinerId; event = aConnected ? OT_COMMISSIONER_JOINER_CONNECTED : OT_COMMISSIONER_JOINER_END; joinerId.Set(mJoinerIid); joinerId.ToggleLocal(); SignalJoinerEvent(event, joiner...
0
[ "CWE-787" ]
openthread
c3a3a0c424322009fec3ab735fb20ce8f6e19e70
197,142,243,502,276,100,000,000,000,000,000,000,000
12
[commissioner] use strnlen instead of strlen (#4404)
static void tg3_hwclock_to_timestamp(struct tg3 *tp, u64 hwclock, struct skb_shared_hwtstamps *timestamp) { memset(timestamp, 0, sizeof(struct skb_shared_hwtstamps)); timestamp->hwtstamp = ns_to_ktime((hwclock & TG3_TSTAMP_MASK) + tp->ptp_adjust); }
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
240,194,837,251,312,050,000,000,000,000,000,000,000
7
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static void xhci_child_detach(USBPort *uport, USBDevice *child) { USBBus *bus = usb_bus_from_device(child); XHCIState *xhci = container_of(bus, XHCIState, bus); xhci_detach_slot(xhci, child->port); }
0
[ "CWE-835" ]
qemu
96d87bdda3919bb16f754b3d3fd1227e1f38f13c
146,693,507,982,306,790,000,000,000,000,000,000,000
7
xhci: guard xhci_kick_epctx against recursive calls Track xhci_kick_epctx processing being active in a variable. Check the variable before calling xhci_kick_epctx from xhci_kick_ep. Add an assert to make sure we don't call recursively into xhci_kick_epctx. Cc: 1653384@bugs.launchpad.net Fixes: 94b037f2a451b3dc855f9...
static int writeout(struct address_space *mapping, struct page *page) { struct writeback_control wbc = { .sync_mode = WB_SYNC_NONE, .nr_to_write = 1, .range_start = 0, .range_end = LLONG_MAX, .nonblocking = 1, .for_reclaim = 1 }; int rc; if (!mapping->a_ops->writepage) /* No write method for the addr...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
171,809,630,880,581,670,000,000,000,000,000,000,000
41
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
static int invoke_bpf_mod_ret(const struct btf_func_model *m, u8 **pprog, struct bpf_tramp_progs *tp, int stack_size, u8 **branches) { u8 *prog = *pprog; int i, cnt = 0; /* The first fmod_ret program will receive a garbage return value. * Set this to 0 to avoid confusing the program. */ emit_...
0
[ "CWE-77" ]
linux
e4d4d456436bfb2fe412ee2cd489f7658449b098
120,292,819,847,681,630,000,000,000,000,000,000,000
35
bpf, x86: Validate computation of branch displacements for x86-64 The branch displacement logic in the BPF JIT compilers for x86 assumes that, for any generated branch instruction, the distance cannot increase between optimization passes. But this assumption can be violated due to how the distances are computed. Spec...