func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
CImg<T>& draw_triangle(int x0, int y0, const float z0, int x1, int y1, const float z1, int x2, int y2, const float z2, const CImg<tc>& texture, int tx0, int ty0, int tx1, int ty1, ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
281,613,566,137,060,360,000,000,000,000,000,000,000
88
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
std::string proxyToClash(std::vector<Proxy> &nodes, const std::string &base_conf, std::vector<RulesetContent> &ruleset_content_array, const ProxyGroupConfigs &extra_proxy_group, bool clashR, extra_settings &ext) { YAML::Node yamlnode; try { yamlnode = YAML::Load(base_conf); } catch (std::ex...
0
[ "CWE-434", "CWE-94" ]
subconverter
ce8d2bd0f13f05fcbd2ed90755d097f402393dd3
338,705,299,187,932,820,000,000,000,000,000,000,000
47
Enhancements Add authorization check before loading scripts. Add detailed logs when loading preference settings.
nfsd_open_verified(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int may_flags, struct file **filp) { __be32 err; validate_process_creds(); err = __nfsd_open(rqstp, fhp, type, may_flags, filp); validate_process_creds(); return err; }
0
[ "CWE-732" ]
linux
22cf8419f1319ff87ec759d0ebdff4cbafaee832
278,889,796,486,780,200,000,000,000,000,000,000,000
10
nfsd: apply umask on fs without ACL support The server is failing to apply the umask when creating new objects on filesystems without ACL support. To reproduce this, you need to use NFSv4.2 and a client and server recent enough to support umask, and you need to export a filesystem that lacks ACL support (for example,...
static inline void lock_doms_cur(void) { }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
316,568,432,526,863,600,000,000,000,000,000,000,000
1
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
int lxclock(struct lxc_lock *l, int timeout) { int ret = -1, saved_errno = errno; struct flock lk; switch(l->type) { case LXC_LOCK_ANON_SEM: if (!timeout) { ret = sem_wait(l->u.sem); if (ret == -1) saved_errno = errno; } else { struct timespec ts; if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {...
0
[ "CWE-59", "CWE-61" ]
lxc
72cf81f6a3404e35028567db2c99a90406e9c6e6
332,476,192,183,283,760,000,000,000,000,000,000,000
57
CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc This prevents an unprivileged user to use LXC to create arbitrary file on the filesystem. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
HInstruction* HGraphBuilder::AddInstruction(HInstruction* instr) { ASSERT(current_block() != NULL); current_block()->AddInstruction(instr); return instr; }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
143,271,320,525,413,870,000,000,000,000,000,000,000
5
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
Graph* GetConstantGraph( const Graph* orig_graph, const std::vector<Node*>& nodes, const std::unordered_map<const Node*, std::vector<Tensor>>& shape_replacement_map, std::map<NodeAndOutput, NodeAndOutput>* tensors_to_fetch, const ConstantFoldNameGenerator& generate_new_name) { Graph* constant_...
0
[ "CWE-824" ]
tensorflow
7731e8dfbe4a56773be5dc94d631611211156659
280,039,740,969,471,070,000,000,000,000,000,000,000
42
Don't constant-fold DT_RESOURCE constants. PiperOrigin-RevId: 391803952 Change-Id: I0ea3ec31d3e7dfda0f03b4027a237f08d00a3091
translate_hierarchy_event (ClutterBackendX11 *backend_x11, ClutterDeviceManagerXI2 *manager_xi2, XIHierarchyEvent *ev) { int i; for (i = 0; i < ev->num_info; i++) { if (ev->info[i].flags & XIDeviceEnabled) { XIDeviceInfo...
1
[ "CWE-264" ]
clutter
e310c68d7b38d521e341f4e8a36f54303079d74e
20,403,663,631,467,034,000,000,000,000,000,000,000
78
x11: trap errors when calling XIQueryDevice Devices can disappear at any time, causing XIQueryDevice to throw an error. At the same time, plug a memory leak. https://bugzilla.gnome.org/show_bug.cgi?id=701974
static llparse_state_t llhttp__internal__run( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { int match; switch ((llparse_state_t) (intptr_t) state->_current) { case s_n_llhttp__internal__n_closed: s_n_llhttp__internal__n_closed: { if (p == endp) { r...
1
[ "CWE-444" ]
node
af488f8dc82d69847992ea1cd2f53dc8082b3b91
295,800,287,313,821,800,000,000,000,000,000,000,000
6,548
deps: update llhttp to 6.0.4 Refs: https://hackerone.com/reports/1238099 Refs: https://hackerone.com/reports/1238709 Refs: https://github.com/nodejs-private/llhttp-private/pull/6 Refs: https://github.com/nodejs-private/llhttp-private/pull/5 CVE-ID: CVE-2021-22959 CVE-ID: CVE-2021-22960 PR-URL: https://github.com/node...
int VvcPpsUnit::deserialize() { int rez = VvcUnit::deserialize(); if (rez) return rez; try { pps_id = m_reader.getBits(6); sps_id = m_reader.getBits(4); // bool pps_mixed_nalu_types_in_pic_flag= m_reader.getBit(); // int pps_pic_width_in_luma_samples = extractUEG...
0
[ "CWE-22" ]
tsMuxer
3763dd34755a8944d903aa19578fa22cd3734165
268,536,310,960,192,300,000,000,000,000,000,000,000
21
Fix Buffer Overflow Fixes issue #509.
sctp_disposition_t sctp_sf_t5_timer_expire(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *reply = NULL; pr_debug("%s: timer T5 expired\n", __func__); S...
0
[ "CWE-20", "CWE-476" ]
linux
ec0223ec48a90cb605244b45f7c62de856403729
57,049,698,693,098,760,000,000,000,000,000,000,000
30
net: sctp: fix sctp_sf_do_5_1D_ce to verify if we/peer is AUTH capable RFC4895 introduced AUTH chunks for SCTP; during the SCTP handshake RANDOM; CHUNKS; HMAC-ALGO are negotiated (CHUNKS being optional though): ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ----------> <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---...
static int fexists(const char *fname, apr_pool_t *p) { return (*fname && APR_SUCCESS == md_util_is_file(fname, p)); }
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
271,088,249,572,427,540,000,000,000,000,000,000,000
4
v1.1.12, notifycmd improvements
TEST_F(QueryPlannerTest, AllElemMatchCompound) { // true means multikey addIndex(BSON("d" << 1 << "a.b" << 1 << "a.c" << 1), true); runQuery( fromjson("{d: 1, a: {$all: [{$elemMatch: {b: 2, c: 2}}," "{$elemMatch: {b: 3, c: 3}}]}}")); assertNumSolutions(2U); assertSolutionE...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
5,345,017,053,250,234,000,000,000,000,000,000,000
18
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
evdns_getaddrinfo_fromhosts(struct evdns_base *base, const char *nodename, struct evutil_addrinfo *hints, ev_uint16_t port, struct evutil_addrinfo **res) { int n_found = 0; struct hosts_entry *e; struct evutil_addrinfo *ai=NULL; int f = hints->ai_family; EVDNS_LOCK(base); for (e = find_hosts_entry(base, ...
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
172,361,175,919,799,300,000,000,000,000,000,000,000
38
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
static void qxl_pci_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); PCIDeviceClass *k = PCI_DEVICE_CLASS(klass); k->vendor_id = REDHAT_PCI_VENDOR_ID; k->device_id = QXL_DEVICE_ID_STABLE; set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); dc->reset = qxl_reset_...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
247,576,945,053,728,220,000,000,000,000,000,000,000
12
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
xdr_gpol_ret(XDR *xdrs, gpol_ret *objp) { if (!xdr_ui_4(xdrs, &objp->api_version)) { return (FALSE); } if (!xdr_kadm5_ret_t(xdrs, &objp->code)) { return (FALSE); } if(objp->code == KADM5_OK) { if (!_xdr_kadm5_policy_ent_rec(xdrs, &objp->rec, objp->api_version)) return (FALSE); } return (TRUE)...
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
28,469,865,290,073,237,000,000,000,000,000,000,000
16
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 php_curl_option_url(php_curl *ch, const char *url, const int len TSRMLS_DC) /* {{{ */ { CURLcode error = CURLE_OK; #if LIBCURL_VERSION_NUM < 0x071100 char *copystr = NULL; #endif if (strlen(url) != len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Curl option contains invalid characters (\\0)"); re...
0
[]
php-src
0ea75af9be8a40836951fc89f723dd5390b8b46f
7,971,506,064,527,110,000,000,000,000,000,000,000
43
Fixed bug #69316 (Use-after-free in php_curl related to CURLOPT_FILE/_INFILE/_WRITEHEADER)
static const wbxml_decoding *get_wbxml_decoding_from_public_id (guint32 public_id) { const wbxml_decoding *map = NULL; DebugLog(("get_wbxml_decoding_from_public_id: public_id = %u\n", public_id)); if (public_id >= 2) { const wbxml_integer_list *item = well_known_public_id_list; while (item && item->public_...
0
[ "CWE-399", "CWE-119", "CWE-787" ]
wireshark
b8e0d416898bb975a02c1b55883342edc5b4c9c0
195,014,734,268,399,550,000,000,000,000,000,000,000
19
WBXML: add a basic sanity check for offset overflow This is a naive approach allowing to detact that something went wrong, without the need to replace all proto_tree_add_text() calls as what was done in master-2.0 branch. Bug: 12408 Change-Id: Ia14905005e17ae322c2fc639ad5e491fa08b0108 Reviewed-on: https://code.wiresh...
static void tipc_sk_push_backlog(struct tipc_sock *tsk, bool nagle_ack) { struct sk_buff_head *txq = &tsk->sk.sk_write_queue; struct sk_buff *skb = skb_peek_tail(txq); struct net *net = sock_net(&tsk->sk); u32 dnode = tsk_peer_node(tsk); int rc; if (nagle_ack) { tsk->pkt_cnt += skb_queue_len(txq); if (!tsk->...
0
[ "CWE-200", "CWE-909" ]
linux
d6d86830705f173fca6087a3e67ceaf68db80523
59,564,235,994,465,040,000,000,000,000,000,000,000
46
net ticp:fix a kernel-infoleak in __tipc_sendmsg() struct tipc_socket_addr.ref has a 4-byte hole,and __tipc_getname() currently copying it to user space,causing kernel-infoleak. BUG: KMSAN: kernel-infoleak in instrument_copy_to_user include/linux/instrumented.h:121 [inline] BUG: KMSAN: kernel-infoleak in instrument_c...
void Item::print_value(String *str) { char buff[MAX_FIELD_WIDTH]; String *ptr, tmp(buff,sizeof(buff),str->charset()); ptr= val_str(&tmp); if (!ptr) str->append("NULL"); else { switch (cmp_type()) { case STRING_RESULT: case TIME_RESULT: append_unescaped(str, ptr->ptr(), ptr->length()); ...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
107,629,572,357,052,920,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.
explicit C_handle_write(AsyncConnectionRef c): conn(c) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
265,766,477,478,954,300,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
inline std::string to_string(const ARN& a) { return a.to_string(); }
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
242,292,619,436,395,840,000,000,000,000,000,000,000
3
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
archive_read_format_zip_read_data(struct archive_read *a, const void **buff, size_t *size, int64_t *offset) { int r; struct zip *zip = (struct zip *)(a->format->data); if (zip->has_encrypted_entries == ARCHIVE_READ_FORMAT_ENCRYPTION_DONT_KNOW) { zip->has_encrypted_entries = 0; } *offset = zip->entry_unc...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
70,046,114,851,469,560,000,000,000,000,000,000,000
102
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
static MagickBooleanType ExportCharPixel(const Image *image, const RectangleInfo *roi,const char *magick_restrict map, const QuantumType *quantum_map,void *pixels,ExceptionInfo *exception) { register const Quantum *magick_restrict p; register ssize_t x; register unsigned char *magick_restrict q;...
0
[ "CWE-190" ]
ImageMagick
406da3af9e09649cda152663c179902edf5ab3ac
205,824,648,062,247,830,000,000,000,000,000,000,000
206
https://github.com/ImageMagick/ImageMagick/issues/1732
template<typename t> CImg<T>& set_matrix_at(const CImg<t>& mat, const unsigned int x=0, const unsigned int y=0, const unsigned int z=0) { return set_vector_at(mat,x,y,z);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
41,721,970,138,529,160,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
assert_inrange(typval_T *argvars) { garray_T ga; int error = FALSE; char_u *tofree; char msg[200]; char_u numbuf[NUMBUFLEN]; #ifdef FEAT_FLOAT if (argvars[0].v_type == VAR_FLOAT || argvars[1].v_type == VAR_FLOAT || argvars[2].v_type == VAR_FLOAT) { float_T flower = tv_get_float(...
0
[ "CWE-121", "CWE-787" ]
vim
34f8117dec685ace52cd9e578e2729db278163fc
338,197,380,128,632,230,000,000,000,000,000,000,000
66
patch 8.2.4397: crash when using many composing characters in error message Problem: Crash when using many composing characters in error message. Solution: Use mb_cptr2char_adv() instead of mb_ptr2char_adv().
static inline int ipv6_addr_diff(const struct in6_addr *a1, const struct in6_addr *a2) { return __ipv6_addr_diff(a1, a2, sizeof(struct in6_addr)); }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
251,054,770,890,164,980,000,000,000,000,000,000,000
4
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
static bool reset_on_release(PgSocket *server) { bool res; Assert(server->state == SV_TESTED); slog_debug(server, "Resetting: %s", cf_server_reset_query); SEND_generic(res, server, 'Q', "s", cf_server_reset_query); if (!res) disconnect_server(server, false, "reset query failed"); return res; }
0
[]
pgbouncer
4b92112b820830b30cd7bc91bef3dd8f35305525
200,682,675,302,508,920,000,000,000,000,000,000,000
12
add_database: fail gracefully if too long db name Truncating & adding can lead to fatal() later. It was not an issue before, but with audodb (* in [databases] section) the database name can some from network, thus allowing remote shutdown..
static void ath6kl_usb_cleanup_pipe_resources(struct ath6kl_usb *ar_usb) { int i; for (i = 0; i < ATH6KL_USB_PIPE_MAX; i++) ath6kl_usb_free_pipe_resources(&ar_usb->pipes[i]); }
0
[ "CWE-476" ]
linux
39d170b3cb62ba98567f5c4f40c27b5864b304e5
254,169,948,812,503,850,000,000,000,000,000,000,000
7
ath6kl: fix a NULL-ptr-deref bug in ath6kl_usb_alloc_urb_from_pipe() The `ar_usb` field of `ath6kl_usb_pipe_usb_pipe` objects are initialized to point to the containing `ath6kl_usb` object according to endpoint descriptors read from the device side, as shown below in `ath6kl_usb_setup_pipe_resources`: for (i = 0; i <...
static void vsock_pending_work(struct work_struct *work) { struct sock *sk; struct sock *listener; struct vsock_sock *vsk; bool cleanup; vsk = container_of(work, struct vsock_sock, pending_work.work); sk = sk_vsock(vsk); listener = vsk->listener; cleanup = true; lock_sock(listener); lock_sock_nested(sk, SIN...
0
[ "CWE-667" ]
linux
c518adafa39f37858697ac9309c6cf1805581446
75,828,289,507,593,800,000,000,000,000,000,000,000
46
vsock: fix the race conditions in multi-transport support There are multiple similar bugs implicitly introduced by the commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading"). The bug pattern: [1] vsock_sock.transport pointer is copie...
Pluralise(string) /* returns a pointer to a plural */ register char *string; { register int length; static char area[STRINGSIZE]; length = strlen(string); strcpy(area, string); if (!Suffix(string, "ch") || !Suffix(string, "ex") || !Suffix(string, "ix") || !Suffix(string, "sh") || !Suffix(s...
0
[ "CWE-787" ]
cracklib
33d7fa4585247cd2247a1ffa032ad245836c6edb
308,143,498,388,172,970,000,000,000,000,000,000,000
39
Fix a buffer overflow processing long words A buffer overflow processing long words has been discovered. This commit applies the patch from https://build.opensuse.org/package/view_file/Base:System/cracklib/0004-overflow-processing-long-words.patch by Howard Guo. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=8...
static void digi_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { struct digi_port *priv = usb_get_serial_port_data(port); struct device *dev = &port->dev; unsigned int iflag = tty->termios.c_iflag; unsigned int cflag = tty->termios.c_cflag; unsigned int old_iflag...
0
[ "CWE-703" ]
linux
5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f
262,092,567,160,869,800,000,000,000,000,000,000,000
189
USB: digi_acceleport: do sanity checking for the number of ports The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <ONeukum@suse.com> [johan: fix OOB endpoint check and add error messages ] Cc: stab...
static void SFDDumpBaseLang(FILE *sfd,struct baselangextent *bl) { if ( bl->lang==0 ) fprintf( sfd, " { %d %d", bl->descent, bl->ascent ); else fprintf( sfd, " { '%c%c%c%c' %d %d", bl->lang>>24, bl->lang>>16, bl->lang>>8, bl->lang, bl->descent, bl->ascent ); for ( bl=bl->features; bl!=NULL; bl=bl->ne...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
135,206,914,491,911,950,000,000,000,000,000,000,000
12
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
void DepthwiseConv(const float* input_data, const Dims<4>& input_dims, const float* filter_data, const Dims<4>& filter_dims, const float* bias_data, const Dims<4>& bias_dims, int stride, int pad_width, int pad_height, int depth_multiplier, floa...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
256,317,622,212,159,040,000,000,000,000,000,000,000
9
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
void e2fsck_rehash_directories(e2fsck_t ctx) { struct problem_context pctx; #ifdef RESOURCE_TRACK struct resource_track rtrack; #endif struct dir_info *dir; ext2_u32_iterate iter; struct dir_info_iter * dirinfo_iter = 0; ext2_ino_t ino; errcode_t retval; int cur, max, all_dirs, first = 1; init_resource_...
1
[ "CWE-787" ]
e2fsprogs
71ba13755337e19c9a826dfc874562a36e1b24d3
138,214,947,648,068,330,000,000,000,000,000,000,000
77
e2fsck: don't try to rehash a deleted directory If directory has been deleted in pass1[bcd] processing, then we shouldn't try to rehash the directory in pass 3a when we try to rehash/reoptimize directories. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
static inline Quantum PerceptibleThreshold(const Quantum quantum, const double epsilon) { double sign; sign=(double) quantum < 0.0 ? -1.0 : 1.0; if ((sign*quantum) >= epsilon) return(quantum); return((Quantum) (sign*epsilon)); }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
331,658,912,952,750,100,000,000,000,000,000,000,000
11
int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) { int sig_id, md_id; if (!md) return 0; md_id = tls12_find_id(EVP_MD_type(md), tls12_md, OSSL_NELEM(tls12_md)); if (md_id == -1) return 0; sig_id = tls12_get_sigid(pk); if (sig_id == -1) retu...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
56,396,053,979,265,170,000,000,000,000,000,000,000
15
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
mp_sint32 PlayerGeneric::getCurrentSample(mp_sint32 position, mp_sint32 channel) { if (mixer) return mixer->getCurrentSample(position, channel); return 0; }
0
[ "CWE-416" ]
MilkyTracker
7afd55c42ad80d01a339197a2d8b5461d214edaf
278,052,854,462,497,460,000,000,000,000,000,000,000
7
Fix use-after-free in PlayerGeneric destructor
hook_timer_time_to_next (struct timeval *tv_timeout) { struct t_hook *ptr_hook; int found; struct timeval tv_now; long diff_usec; hook_timer_check_system_clock (); found = 0; tv_timeout->tv_sec = 0; tv_timeout->tv_usec = 0; for (ptr_hook = weechat_hooks[HOOK_TYPE_TIMER]; ptr_hook;...
0
[ "CWE-20" ]
weechat
efb795c74fe954b9544074aafcebb1be4452b03a
192,754,133,464,883,830,000,000,000,000,000,000,000
64
core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764)
static int read_authkey() { int fd; booth_conf->authkey[0] = '\0'; fd = open(booth_conf->authfile, O_RDONLY); if (fd < 0) { log_error("cannot open %s: %s", booth_conf->authfile, strerror(errno)); return -1; } if (fstat(fd, &booth_conf->authstat) < 0) { log_error("cannot stat authentication file %s (%d):...
0
[ "CWE-287", "CWE-284" ]
booth
35bf0b7b048d715f671eb68974fb6b4af6528c67
70,190,882,986,988,350,000,000,000,000,000,000,000
31
Revert "Refactor: main: substitute is_auth_req macro" This reverts commit da79b8ba28ad4837a0fee13e5f8fb6f89fe0e24c. authfile != authkey Signed-off-by: Jan Friesse <jfriesse@redhat.com>
rpl_print(netdissect_options *ndo, const struct icmp6_hdr *hdr, const u_char *bp, u_int length) { int secured = hdr->icmp6_code & 0x80; int basecode= hdr->icmp6_code & 0x7f; if(secured) { ND_PRINT((ndo, ", (SEC) [worktodo]")); /* XXX ...
0
[ "CWE-125" ]
tcpdump
d7505276842e85bfd067fa21cdb32b8a2dc3c5e4
8,595,854,171,750,971,000,000,000,000,000,000,000
55
(for 4.9.3) CVE-2018-14882/ICMP6 RPL: Add a missing bounds check Moreover: Add and use *_tstr[] strings. Update four tests outputs accordingly. Fix a space. Wang Junjie of 360 ESG Codesafe Team had independently identified this vulnerability in 2018 by means of fuzzing and provided the packet capture file for the tes...
static void add_coins(Coin* c1, const Coin* c2) { size_t i; for(i = 0; i < c2->symbols.size; i++) uivector_push_back(&c1->symbols, c2->symbols.data[i]); c1->weight += c2->weight; }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
261,136,294,090,756,670,000,000,000,000,000,000,000
6
Fixed #5645: realloc return handling
CImgDisplay& assign() { if (is_empty()) return flush(); Display *const dpy = cimg::X11_attr().display; cimg_lock_display(); // Remove display window from event thread list. unsigned int i; for (i = 0; i<cimg::X11_attr().nb_wins && cimg::X11_attr().wins[i]!=this; ++i) {} f...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
186,663,717,320,409,460,000,000,000,000,000,000,000
45
.
static unsigned int rgb_to_pixel15bgr_dup(unsigned int r, unsigned int g, unsigned int b) { unsigned int col; col = rgb_to_pixel15bgr(r, g, b); col |= col << 16; return col; }
0
[ "CWE-200" ]
qemu
c1b886c45dc70f247300f549dce9833f3fa2def5
18,853,086,647,863,783,000,000,000,000,000,000,000
8
vbe: rework sanity checks Plug a bunch of holes in the bochs dispi interface parameter checking. Add a function doing verification on all registers. Call that unconditionally on every register write. That way we should catch everything, even changing one register affecting the valid range of another register. Some ...
reduce_string_list(Node* node, OnigEncoding enc) { int r = 0; switch (NODE_TYPE(node)) { case NODE_LIST: { Node* prev; Node* curr; Node* prev_node; Node* next_node; prev = NULL_NODE; do { next_node = NODE_CDR(node); curr = NODE_CAR(node); if (NODE_...
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
226,991,563,482,842,300,000,000,000,000,000,000,000
107
#207: Out-of-bounds write
NTSTATUS copy_file(TALLOC_CTX *ctx, connection_struct *conn, struct smb_filename *smb_fname_src, struct smb_filename *smb_fname_dst, uint32_t new_create_disposition) { struct smb_filename *smb_fname_dst_tmp = NULL; off_t ret=-1; files_struct *fsp1,*fsp2; uint32_t dosattrs; NTSTATUS status; smb_fname...
0
[ "CWE-200" ]
samba
3ddc9344c2fa7461336899fbddb0bb80995e9170
200,716,877,853,930,600,000,000,000,000,000,000,000
127
CVE-2022-32742: s3: smbd: Harden the smbreq_bufrem() macro. Fixes the raw.write.bad-write test. NB. We need the two (==0) changes in source3/smbd/smb2_reply.c as the gcc optimizer now knows that the return from smbreq_bufrem() can never be less than zero. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085 Remove...
void ieee80211_recalc_ps_vif(struct ieee80211_sub_if_data *sdata) { bool ps_allowed = ieee80211_powersave_allowed(sdata); if (sdata->vif.bss_conf.ps != ps_allowed) { sdata->vif.bss_conf.ps = ps_allowed; ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_PS); } }
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
84,004,650,971,456,650,000,000,000,000,000,000,000
9
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
TEST_F(HttpConnectionManagerConfigTest, RemovePortDefault) { const std::string yaml_string = R"EOF( stat_prefix: ingress_http route_config: name: local_route http_filters: - name: envoy.filters.http.router )EOF"; HttpConnectionManagerConfig config(parseHttpConnectionManagerFromYaml(yaml_string), cont...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
309,231,416,664,408,440,000,000,000,000,000,000,000
15
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
void qpdf_set_suppress_original_object_IDs( qpdf_data qpdf, QPDF_BOOL value) { QTC::TC("qpdf", "qpdf-c called qpdf_set_suppress_original_object_IDs"); qpdf->qpdf_writer->setSuppressOriginalObjectIDs(value); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
172,939,137,925,067,700,000,000,000,000,000,000,000
6
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 ...
static void mon_text_read_head_t(struct mon_reader_text *rp, struct mon_text_ptr *p, const struct mon_event_text *ep) { char udir, utype; udir = (ep->is_in ? 'i' : 'o'); switch (ep->xfertype) { case USB_ENDPOINT_XFER_ISOC: utype = 'Z'; break; case USB_ENDPOINT_XFER_INT: utype = 'I'; break; case USB_ENDPOINT_XFE...
0
[ "CWE-787" ]
linux
a5f596830e27e15f7a0ecd6be55e433d776986d8
222,670,841,675,490,450,000,000,000,000,000,000,000
17
usb: usbmon: Read text within supplied buffer size This change fixes buffer overflows and silent data corruption with the usbmon device driver text file read operations. Signed-off-by: Fredrik Noring <noring@nocrew.org> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by...
PHP_MINFO_FUNCTION(gd) { php_info_print_table_start(); php_info_print_table_row(2, "GD Support", "enabled"); /* need to use a PHPAPI function here because it is external module in windows */ php_info_print_table_row(2, "GD Version", PHP_GD_VERSION_STRING); #ifdef ENABLE_GD_TTF php_info_print_table_row(2, "FreeT...
0
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
276,717,234,112,335,660,000,000,000,000,000,000,000
75
Fix #69719 - more checks for nulls in paths
static inline int is_digit(char ch) { return (ch >= '0') && (ch <= '9'); }
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
236,924,304,920,705,630,000,000,000,000,000,000,000
4
Fixed crash #274
mark_ok_sources(SRC_Status status) { int i; for (i = 0; i < n_sources; i++) { if (sources[i]->status != SRC_OK) continue; sources[i]->status = status; } }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
162,182,788,873,181,130,000,000,000,000,000,000,000
10
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
void ext4_free_inode(handle_t *handle, struct inode *inode) { struct super_block *sb = inode->i_sb; int is_directory; unsigned long ino; struct buffer_head *bitmap_bh = NULL; struct buffer_head *bh2; ext4_group_t block_group; unsigned long bit; struct ext4_group_desc *gdp; struct ext4_super_block *es; struct ...
0
[]
linux
7dac4a1726a9c64a517d595c40e95e2d0d135f6f
215,797,906,817,558,830,000,000,000,000,000,000,000
131
ext4: add validity checks for bitmap block numbers An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi...
int dev_set_allmulti(struct net_device *dev, int inc) { return __dev_set_allmulti(dev, inc, true);
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
286,573,137,348,428,600,000,000,000,000,000,000,000
4
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
TEST(HttpUtility, SendLocalReply) { MockStreamDecoderFilterCallbacks callbacks; bool is_reset = false; EXPECT_CALL(callbacks, encodeHeaders_(_, false)); EXPECT_CALL(callbacks, encodeData(_, true)); EXPECT_CALL(callbacks, streamInfo()); Utility::sendLocalReply( is_reset, callbacks, Utility::Loca...
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
237,569,210,794,775,270,000,000,000,000,000,000,000
11
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
static void GCC_FMT_ATTR(3, 4) report_unsupported(BlockDriverState *bs, Error **errp, const char *fmt, ...) { char msg[64]; va_list ap; va_start(ap, fmt); vsnprintf(msg, sizeof(msg), fmt, ap); va_end(ap); error_set(errp, QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, bs->device_name, "qcow2", ...
0
[ "CWE-476" ]
qemu
11b128f4062dd7f89b14abc8877ff20d41b28be9
213,048,677,978,660,760,000,000,000,000,000,000,000
13
qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146) The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots != 0. By having the initialisation of both fields separated in qcow2_open(), any error occuring in between would cause the error path to dereference NULL in qcow2_free_snapshot...
static __inline__ void scm_recv(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm, int flags) { if (!msg->msg_control) { if (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp) msg->msg_flags |= MSG_CTRUNC; scm_destroy(scm); return; } if (test_bit(SOCK_PASSCRED, &sock->flags)) put_cmsg(ms...
0
[]
linux-2.6
16e5726269611b71c930054ffe9b858c1cea88eb
225,188,613,149,385,030,000,000,000,000,000,000,000
22
af_unix: dont send SCM_CREDENTIALS by default Since commit 7361c36c5224 (af_unix: Allow credentials to work across user and pid namespaces) af_unix performance dropped a lot. This is because we now take a reference on pid and cred in each write(), and release them in read(), usually done from another process, eventua...
void cil_destroy_name(struct cil_name *name) { if (name == NULL) { return; } cil_symtab_datum_destroy(&name->datum); free(name); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
267,355,140,064,478,170,000,000,000,000,000,000,000
9
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
SYSCALL_DEFINE4(semctl, int, semid, int, semnum, int, cmd, unsigned long, arg) { int version; struct ipc_namespace *ns; void __user *p = (void __user *)arg; if (semid < 0) return -EINVAL; version = ipc_parse_version(&cmd); ns = current->nsproxy->ipc_ns; switch(cmd) { case IPC_INFO: case SEM_INFO: case IP...
0
[ "CWE-703", "CWE-189" ]
linux
6062a8dc0517bce23e3c2f7d2fea5e22411269a3
146,468,281,848,989,390,000,000,000,000,000,000,000
34
ipc,sem: fine grained locking for semtimedop Introduce finer grained locking for semtimedop, to handle the common case of a program wanting to manipulate one semaphore from an array with multiple semaphores. If the call is a semop manipulating just one semaphore in an array with multiple semaphores, only take the loc...
int ssl3_get_req_cert_type(SSL *s, unsigned char *p) { int ret=0; unsigned long alg; alg=s->s3->tmp.new_cipher->algorithms; #ifndef OPENSSL_NO_DH if (alg & (SSL_kDHr|SSL_kEDH)) { # ifndef OPENSSL_NO_RSA p[ret++]=SSL3_CT_RSA_FIXED_DH; # endif # ifndef OPENSSL_NO_DSA p[ret++]=SSL3_CT_DSS_FIXED_DH; # endi...
0
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
211,816,142,186,869,450,000,000,000,000,000,000,000
56
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
static Image *ReadWPGImage(const ImageInfo *image_info, ExceptionInfo *exception) { typedef struct { size_t FileId; MagickOffsetType DataOffset; unsigned int ProductType; unsigned int FileType; unsigned char MajorVersion; unsigned char MinorVersion; unsigned int EncryptKey; unsigne...
0
[ "CWE-400" ]
ImageMagick
06c8dd4de59e48d282d4f224faa64ab9012a711a
221,763,795,769,473,300,000,000,000,000,000,000,000
622
https://github.com/ImageMagick/ImageMagick/issues/870
static void pcrypt_aead_dec(struct padata_priv *padata) { struct pcrypt_request *preq = pcrypt_padata_request(padata); struct aead_request *req = pcrypt_request_ctx(preq); padata->info = crypto_aead_decrypt(req); if (padata->info == -EINPROGRESS) return; padata_do_serial(padata); }
0
[ "CWE-399", "CWE-763" ]
linux
d76c68109f37cb85b243a1cf0f40313afd2bae68
282,464,906,660,875,160,000,000,000,000,000,000,000
12
crypto: pcrypt - fix freeing pcrypt instances pcrypt is using the old way of freeing instances, where the ->free() method specified in the 'struct crypto_template' is passed a pointer to the 'struct crypto_instance'. But the crypto_instance is being kfree()'d directly, which is incorrect because the memory was actual...
bool does_server_permit_lookup; bool does_server_permit_storing; _CacheDirectives() : does_client_permit_lookup(true), does_client_permit_storing(true), does_client_permit_dns_storing(true),
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
209,153,725,197,977,000,000,000,000,000,000,000,000
7
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
TEST(LtOp, MatchesScalarEmptyKey) { BSONObj operand = BSON("$lt" << 5); LTMatchExpression lt("", operand["$lt"]); ASSERT(lt.matchesBSON(BSON("" << 4.5), NULL)); ASSERT(!lt.matchesBSON(BSON("" << 6), NULL)); }
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
271,440,008,255,132,330,000,000,000,000,000,000,000
6
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void onBeforeFinalizeUpstreamSpan(Envoy::Tracing::Span&, const Http::ResponseHeaderMap*) override {}
0
[ "CWE-416" ]
envoy
7ffda4e809dec74449ebc330cebb9d2f4ab61360
236,332,986,696,512,650,000,000,000,000,000,000,000
2
oauth2: do not blindly accept requests with a token in the Authorization headera (781) The logic was broken because it assumed an additional call would be performed to the auth server, which isn't the case. Per the filter documentation, a request is only considered subsequently authenticated if there's valid cookie th...
static int lsql_del_trans(struct ldb_module *module) { struct lsqlite3_private *lsqlite3; lsqlite3 = talloc_get_type(ldb_module_get_private(module), struct lsqlite3_private); if (lsqlite3->trans_count > 0) { lsqlite3->trans_count--; } else return -1; if (lsqlite3->trans_count == 0) { return lsqlite3_...
0
[ "CWE-20" ]
samba
3f95957d6de321c803a66f3ec67a8ff09befd16d
305,544,138,770,476,260,000,000,000,000,000,000,000
17
CVE-2018-1140 ldb: Check for ldb_dn_get_casefold() failure in ldb_sqlite Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374
plperl_spi_fetchrow(char *cursor) { SV *row; /* * Execute the FETCH inside a sub-transaction, so we can cope with errors * sanely */ MemoryContext oldcontext = CurrentMemoryContext; ResourceOwner oldowner = CurrentResourceOwner; check_spi_usage_allowed(); BeginInternalSubTransaction(NULL); /* Want t...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
336,499,075,302,640,000,000,000,000,000,000,000,000
83
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
bool Item_cond::excl_dep_on_grouping_fields(st_select_lex *sel) { if (has_rand_bit()) return false; List_iterator_fast<Item> li(list); Item *item; while ((item= li++)) { if (!item->excl_dep_on_grouping_fields(sel)) return false; } return true; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
247,830,465,452,578,600,000,000,000,000,000,000,000
13
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
static int ep_modify(struct eventpoll *ep, struct epitem *epi, const struct epoll_event *event) { int pwake = 0; poll_table pt; lockdep_assert_irqs_enabled(); init_poll_funcptr(&pt, NULL); /* * Set the new event interest mask before calling f_op->poll(); * otherwise we might miss an event that happen...
0
[ "CWE-416" ]
linux
a9ed4a6560b8562b7e2e2bed9527e88001f7b682
83,196,935,818,068,030,000,000,000,000,000,000,000
71
epoll: Keep a reference on files added to the check list When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe wh...
Singleton::Manager& PerListenerFactoryContextImpl::singletonManager() { return listener_factory_context_base_->singletonManager(); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
136,110,855,495,699,210,000,000,000,000,000,000,000
3
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int find_group_other(struct super_block *sb, struct inode *parent, ext4_group_t *group, umode_t mode) { ext4_group_t parent_group = EXT4_I(parent)->i_block_group; ext4_group_t i, last, ngroups = ext4_get_groups_count(sb); struct ext4_group_desc *desc; int flex_size = ext4_flex_bg_size(EXT4_SB(sb)); ...
0
[]
linux
7dac4a1726a9c64a517d595c40e95e2d0d135f6f
313,803,801,812,375,530,000,000,000,000,000,000,000
95
ext4: add validity checks for bitmap block numbers An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi...
MONGO_EXPORT bson_bool_t bson_iterator_bool( const bson_iterator *i ) { switch ( bson_iterator_type( i ) ) { case BSON_BOOL: return bson_iterator_bool_raw( i ); case BSON_INT: return bson_iterator_int_raw( i ) != 0; case BSON_LONG: return bson_iterator_long_raw( i ) != 0; cas...
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
40,458,369,677,671,810,000,000,000,000,000,000,000
17
don't mix up int and size_t (first pass to fix that)
PackLinuxElf64::buildLinuxLoader( upx_byte const *const proto, unsigned const szproto, upx_byte const *const fold, unsigned const szfold, Filter const *ft ) { initLoader(proto, szproto); if (0 < szfold) { struct b_info h; memset(&h, 0, sizeof(h)); unsigned fold_hdrlen = ...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
266,856,252,498,877,450,000,000,000,000,000,000,000
67
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
static double mp_da_insert_or_push(_cimg_math_parser& mp) { const char *const s_op = mp.opcode[3]==~0U?"da_push":"da_insert"; mp_check_list(mp,s_op); const unsigned int dim = (unsigned int)mp.opcode[4], _dim = std::max(1U,dim), nb_elts = (unsigned int)mp.opcod...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
193,124,225,178,334,480,000,000,000,000,000,000,000
44
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
brcmf_run_escan(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp, struct cfg80211_scan_request *request) { s32 params_size = BRCMF_SCAN_PARAMS_FIXED_SIZE + offsetof(struct brcmf_escan_params_le, params_le); struct brcmf_escan_params_le *params; s32 err = 0; brcmf_dbg(SCAN, "E-SCAN START\n"); if (requ...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
171,397,842,999,571,540,000,000,000,000,000,000,000
41
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
static void multi_stop_rx(struct sb_uart_port *port) { struct mp_port *mtpt = (struct mp_port *)port; mtpt->ier &= ~UART_IER_RLSI; mtpt->port.read_status_mask &= ~UART_LSR_DR; serial_out(mtpt, UART_IER, mtpt->ier); }
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
264,880,341,381,616,100,000,000,000,000,000,000,000
8
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
void my_set_error(MYSQL *mysql, unsigned int error_nr, const char *sqlstate, const char *format, ...) { va_list ap; mysql->net.last_errno= error_nr; ma_strmake(mysql->net.sqlstate, sqlstate, SQLSTATE_LENGTH); va_start(ap, format); vsnpri...
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
29,688,818,054,894,900,000,000,000,000,000,000,000
16
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
size_t RemoteIo::Impl::populateBlocks(size_t lowBlock, size_t highBlock) { assert(isMalloced_); // optimize: ignore all true blocks on left & right sides. while(!blocksMap_[lowBlock].isNone() && lowBlock < highBlock) lowBlock++; while(!blocksMap_[highBlock].isNone() && highBlo...
0
[ "CWE-125" ]
exiv2
bd0afe0390439b2c424d881c8c6eb0c5624e31d9
122,131,079,823,716,550,000,000,000,000,000,000,000
32
Add bounds check to MemIo::seek(). (#944) - Regression test for missing bounds check in MemIo::seek() - Add bounds check to MemIo::seek(), this fixes CVE-2019-13504
static void set_pixel_format(VncState *vs, int bits_per_pixel, int depth, int big_endian_flag, int true_color_flag, int red_max, int green_max, int blue_max, int red_shift, int green_shift, int blue_shift...
0
[]
qemu
4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3
98,211,384,367,942,620,000,000,000,000,000,000,000
43
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> ...
static int handle_bus_lock_vmexit(struct kvm_vcpu *vcpu) { /* * Hardware may or may not set the BUS_LOCK_DETECTED flag on BUS_LOCK * VM-Exits. Unconditionally set the flag here and leave the handling to * vmx_handle_exit(). */ to_vmx(vcpu)->exit_reason.bus_lock_detected = true; return 1; }
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
104,047,955,625,147,520,000,000,000,000,000,000,000
10
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 ...
int tls1_generate_master_secret(SSL *s, unsigned char *out, unsigned char *p, int len) { unsigned char buf[SSL3_RANDOM_SIZE*2+TLS_MD_MASTER_SECRET_CONST_SIZE]; unsigned char buff[SSL_MAX_MASTER_KEY_LENGTH]; #ifdef KSSL_DEBUG printf ("tls1_generate_master_secret(%p,%p, %p, %d)\n", (void *)s,out, p,len); #endi...
0
[ "CWE-310" ]
openssl
35a65e814beb899fa1c69a7673a8956c6059dce7
165,266,613,241,557,990,000,000,000,000,000,000,000
25
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...
static void tcp_ecn_send_synack(struct sock *sk, struct sk_buff *skb) { const struct tcp_sock *tp = tcp_sk(sk); TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_CWR; if (!(tp->ecn_flags & TCP_ECN_OK)) TCP_SKB_CB(skb)->tcp_flags &= ~TCPHDR_ECE; else if (tcp_ca_needs_ecn(sk) || tcp_bpf_ca_needs_ecn(sk)) INET_ECN_xmit(sk...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
147,958,769,396,851,500,000,000,000,000,000,000,000
11
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
static int ioctx_add_table(struct kioctx *ctx, struct mm_struct *mm) { unsigned i, new_nr; struct kioctx_table *table, *old; struct aio_ring *ring; spin_lock(&mm->ioctx_lock); rcu_read_lock(); table = rcu_dereference(mm->ioctx_table); while (1) { if (table) for (i = 0; i < table->nr; i++) if (!table->...
0
[ "CWE-200" ]
linux
edfbbf388f293d70bf4b7c0bc38774d05e6f711a
174,644,704,273,894,140,000,000,000,000,000,000,000
59
aio: fix kernel memory disclosure in io_getevents() introduced in v3.10 A kernel memory disclosure was introduced in aio_read_events_ring() in v3.10 by commit a31ad380bed817aa25f8830ad23e1a0480fef797. The changes made to aio_read_events_ring() failed to correctly limit the index into ctx->ring_pages[], allowing an at...
static void SVGStripString(const MagickBooleanType trim,char *message) { register char *p, *q; size_t length; assert(message != (char *) NULL); if (*message == '\0') return; /* Remove comment. */ q=message; for (p=message; *p != '\0'; p++) { if ((*p == '/') && (*(p+1) == '*')...
1
[ "CWE-125" ]
ImageMagick6
a5db4873626f702d2ddd8bc293573493e0a412c0
158,538,549,951,359,690,000,000,000,000,000,000,000
57
https://github.com/ImageMagick/ImageMagick/issues/1336
do_filter( linenr_T line1, linenr_T line2, exarg_T *eap, /* for forced 'ff' and 'fenc' */ char_u *cmd, int do_in, int do_out) { char_u *itmp = NULL; char_u *otmp = NULL; linenr_T linecount; linenr_T read_linecount; pos_T cursor_save; char_u *cmd_buf; buf_T *old_cur...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
105,975,399,164,576,230,000,000,000,000,000,000,000
260
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
PHP_FUNCTION(xml_set_object) { xml_parser *parser; zval *pind, *mythis; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ro", &pind, &mythis) == FAILURE) { return; } ZEND_FETCH_RESOURCE(parser,xml_parser *, &pind, -1, "XML Parser", le_xml_parser); /* please leave this commented - or ask thies@thieso.net...
0
[ "CWE-119" ]
php-src
1248079be837808da4c97364fb3b4c96c8015fbf
304,789,128,080,015,100,000,000,000,000,000,000,000
26
Fix bug #72099: xml_parse_into_struct segmentation fault
QPDF::recover_encryption_key_with_password( std::string const& password, EncryptionData const& data) { // Disregard whether Perms is valid. bool disregard; return recover_encryption_key_with_password(password, data, disregard); }
0
[ "CWE-125" ]
qpdf
dea704f0ab7f625e1e7b3f9a1110b45b63157317
192,064,322,174,211,600,000,000,000,000,000,000,000
7
Pad keys to avoid memory errors (fixes #147)
ServerConnectionImpl::checkHeaderNameForUnderscores(absl::string_view header_name) { if (headers_with_underscores_action_ != envoy::config::core::v3::HttpProtocolOptions::ALLOW && Http::HeaderUtility::headerNameContainsUnderscore(header_name)) { if (headers_with_underscores_action_ == envoy::config:...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
317,622,296,700,421,230,000,000,000,000,000,000,000
17
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
int bnxt_re_post_recv(struct ib_qp *ib_qp, const struct ib_recv_wr *wr, const struct ib_recv_wr **bad_wr) { struct bnxt_re_qp *qp = container_of(ib_qp, struct bnxt_re_qp, ib_qp); struct bnxt_qplib_swqe wqe; int rc = 0, payload_sz = 0; unsigned long flags; u32 count = 0; spin_lock_irqsave(&qp->rq_lock, fl...
0
[ "CWE-400", "CWE-401" ]
linux
4a9d46a9fe14401f21df69cea97c62396d5fb053
84,798,996,234,387,090,000,000,000,000,000,000,000
56
RDMA: Fix goto target to release the allocated memory In bnxt_re_create_srq(), when ib_copy_to_udata() fails allocated memory should be released by goto fail. Fixes: 37cb11acf1f7 ("RDMA/bnxt_re: Add SRQ support for Broadcom adapters") Link: https://lore.kernel.org/r/20190910222120.16517-1-navid.emamdoost@gmail.com Si...
static int sctp_getsockopt_maxseg(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_assoc_value params; struct sctp_association *asoc; if (len == sizeof(int)) { pr_warn_ratelimited(DEPRECATED "%s (pid %d) " "Use of int in maxseg socket option.\n" "Use s...
0
[ "CWE-416" ]
linux
a0ff660058b88d12625a783ce9e5c1371c87951f
137,607,400,197,646,130,000,000,000,000,000,000,000
41
sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf After commit cea0cc80a677 ("sctp: use the right sk after waking up from wait_buf sleep"), it may change to lock another sk if the asoc has been peeled off in sctp_wait_for_sndbuf. However, the asoc's new sk could be already closed elsewhere, a...
create_tmp_file (const char *template, char **r_bakfname, char **r_tmpfname, FILE **r_fp) { char *bakfname, *tmpfname; *r_bakfname = NULL; *r_tmpfname = NULL; # ifdef USE_ONLY_8DOT3 /* Here is another Windoze bug?: * you cant rename("pubring.kbx.tmp", "pubring.kbx"); * but rename("pubri...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
84,386,115,650,539,915,000,000,000,000,000,000,000
81
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
GF_Err traf_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TrackFragmentBox *ptr = (GF_TrackFragmentBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; //Header first if (ptr->tfhd) { e = gf_isom_box_write((GF_Box *) ptr->tfhd, bs); if (e) return e; } if (ptr->...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
225,013,894,121,172,700,000,000,000,000,000,000,000
56
prevent dref memleak on invalid input (#1183)
NameWatcher() : saw_bad(false) { }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
10,464,320,568,287,806,000,000,000,000,000,000,000
4
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 ...
Item_func_get_system_var:: Item_func_get_system_var(THD *thd, sys_var *var_arg, enum_var_type var_type_arg, LEX_STRING *component_arg, const char *name_arg, size_t name_len_arg): Item_func(thd), var(var_arg), var_type(var_type_arg), orig_var_type(var_type_arg), componen...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
248,106,978,801,431,420,000,000,000,000,000,000,000
10
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static void FontViewOpenKids(FontView *fv) { int k, i; SplineFont *sf = fv->b.sf, *_sf; #if defined(__Mac) int cnt= 0; #endif if ( sf->cidmaster!=NULL ) sf = sf->cidmaster; k=0; do { _sf = sf->subfontcnt==0 ? sf : sf->subfonts[k]; for ( i=0; i<_sf->glyphcnt; ++i ) if ( _sf->glyphs[i]!=...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
183,359,329,087,597,850,000,000,000,000,000,000,000
26
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void fb_append_extra_logo(const struct linux_logo *logo, unsigned int n) { if (!n || fb_logo_ex_num == FB_LOGO_EX_NUM_MAX) return; fb_logo_ex[fb_logo_ex_num].logo = logo; fb_logo_ex[fb_logo_ex_num].n = n; fb_logo_ex_num++; }
0
[ "CWE-703", "CWE-189" ]
linux
fc9bbca8f650e5f738af8806317c0a041a48ae4a
75,247,849,260,770,545,000,000,000,000,000,000,000
9
vm: convert fb_mmap to vm_iomap_memory() helper This is my example conversion of a few existing mmap users. The fb_mmap() case is a good example because it is a bit more complicated than some: fb_mmap() mmaps one of two different memory areas depending on the page offset of the mmap (but happily there is never any mi...
interp_canonicalize_mapping() { return &interp_canonicalize_mapping_; }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
327,885,520,335,576,830,000,000,000,000,000,000,000
3
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
static int ffs_func_eps_enable(struct ffs_function *func) { struct ffs_data *ffs = func->ffs; struct ffs_ep *ep = func->eps; struct ffs_epfile *epfile = ffs->epfiles; unsigned count = ffs->eps_count; unsigned long flags; int ret = 0; spin_lock_irqsave(&func->ffs->eps_lock, flags); do { ...
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
148,015,165,342,998,690,000,000,000,000,000,000,000
51
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
NOEXPORT void local_start(CLI *c) { SOCKADDR_UNION addr; socklen_t addr_len; /* check if local_rfd is a socket and get peer address */ addr_len=sizeof(SOCKADDR_UNION); c->local_rfd.is_socket=!getpeername(c->local_rfd.fd, &addr.sa, &addr_len); if(c->local_rfd.is_socket) { memcpy(&c->peer...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
293,507,671,330,317,240,000,000,000,000,000,000,000
61
stunnel-5.57