func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int __must_check xen_allocate_irq_gsi(unsigned gsi) { int irq; /* * A PV guest has no concept of a GSI (since it has no ACPI * nor access to/knowledge of the physical APICs). Therefore * all IRQs are dynamically allocated from the entire IRQ * space. */ if (xen_pv_domain() && !xen_initial_domain())...
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
287,195,735,617,965,840,000,000,000,000,000,000,000
23
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
struct module *__module_address(unsigned long addr) { struct module *mod; if (addr < module_addr_min || addr > module_addr_max) return NULL; module_assert_mutex_or_preempt(); mod = mod_find(addr); if (mod) { BUG_ON(!within_module(addr, mod)); if (mod->state == MODULE_STATE_UNFORMED) mod = NULL; } ret...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
326,261,444,699,694,460,000,000,000,000,000,000,000
17
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
bool PlayerGeneric::isPlaying() const { if (mixer) return mixer->isPlaying(); return false; }
0
[ "CWE-416" ]
MilkyTracker
7afd55c42ad80d01a339197a2d8b5461d214edaf
67,037,812,261,047,680,000,000,000,000,000,000,000
7
Fix use-after-free in PlayerGeneric destructor
char *am_htmlencode(request_rec *r, const char *str) { const char *cp; char *output; apr_size_t outputlen; int i; outputlen = 0; for (cp = str; *cp; cp++) { switch (*cp) { case '&': outputlen += 5; break; case '"': outputlen += 6; ...
0
[ "CWE-200" ]
mod_auth_mellon
47a767d5f37d1d3a1c004abbf8bb80d1b7eab328
327,240,820,571,969,100,000,000,000,000,000,000,000
44
Ensure that all generated session IDs are cryptographically strong. We used to call RAND_pseudo_bytes, which will generate cryptographically strong random bytes in most cases. Under memory pressure or other error conditions, it can return weak random bytes. It is unlikely that there is a way for an attacker to set up...
void ElectronRenderFrameObserver::DidInstallConditionalFeatures( v8::Handle<v8::Context> context, int world_id) { // When a child window is created with window.open, its WebPreferences will // be copied from its parent, and Chromium will intialize JS context in it // immediately. // Normally the WebPref...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
190,055,769,265,738,470,000,000,000,000,000,000,000
58
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
init_spellfile(void) { char_u *buf; int l; char_u *fname; char_u *rtp; char_u *lend; int aspath = FALSE; char_u *lstart = curbuf->b_s.b_p_spl; if (*curwin->w_s->b_p_spl != NUL && curwin->w_s->b_langp.ga_len > 0) { buf = alloc(MAXPATHL); if (buf == NULL) return; // Find th...
0
[ "CWE-787" ]
vim
7c824682d2028432ee082703ef0ab399867a089b
153,816,551,063,353,640,000,000,000,000,000,000,000
75
patch 8.2.4919: can add invalid bytes with :spellgood Problem: Can add invalid bytes with :spellgood. Solution: Check for a valid word string.
smp_fetch_hdr_ip(struct proxy *px, struct session *l4, void *l7, unsigned int opt, const struct arg *args, struct sample *smp) { int ret; while ((ret = smp_fetch_hdr(px, l4, l7, opt, args, smp)) > 0) { if (url2ipv4((char *)smp->data.str.str, &smp->data.ipv4)) { smp->type = SMP_T_IPV4; break;...
0
[]
haproxy
aae75e3279c6c9bd136413a72dafdcd4986bb89a
159,227,376,899,585,590,000,000,000,000,000,000,000
27
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
int auth_spa_client(auth_instance *ablock, void * sx, int timeout, uschar *buffer, int buffsize) {return 0;}
0
[ "CWE-125" ]
exim
57aa14b216432be381b6295c312065b2fd034f86
67,291,311,065,469,090,000,000,000,000,000,000,000
2
Fix SPA authenticator, checking client-supplied data before using it. Bug 2571
is_touch_device (XIAnyClassInfo **classes, guint n_classes, ClutterInputDeviceType *device_type, guint *n_touch_points) { #ifdef HAVE_XINPUT_2_2 guint i; for (i = 0; i < n_classes; i++) { XITouchClassInfo *cl...
0
[ "CWE-264" ]
clutter
e310c68d7b38d521e341f4e8a36f54303079d74e
170,182,408,516,472,420,000,000,000,000,000,000,000
33
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
setup_server_realm(krb5_principal sprinc) { krb5_error_code kret; kdc_realm_t *newrealm; kret = 0; if (kdc_numrealms > 1) { if (!(newrealm = find_realm_data(sprinc->realm.data, (krb5_ui_4) sprinc->realm.length))) kret = ENOENT; ...
1
[ "CWE-703" ]
krb5
c2ccf4197f697c4ff143b8a786acdd875e70a89d
57,157,307,408,789,820,000,000,000,000,000,000,000
17
Multi-realm KDC null deref [CVE-2013-1418] If a KDC serves multiple realms, certain requests can cause setup_server_realm() to dereference a null pointer, crashing the KDC. CVSSv2: AV:N/AC:M/Au:N/C:N/I:N/A:P/E:POC/RL:OF/RC:C A related but more minor vulnerability requires authentication to exploit, and is only prese...
quote_word_break_chars (text) char *text; { char *ret, *r, *s; int l; l = strlen (text); ret = (char *)xmalloc ((2 * l) + 1); for (s = text, r = ret; *s; s++) { /* Pass backslash-quoted characters through, including the backslash. */ if (*s == '\\') { *r++ = '\\'; *r++ = *++s; ...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
246,187,242,141,007,150,000,000,000,000,000,000,000
31
Bash-4.4 patch 7
int apply_to_page_range(struct mm_struct *mm, unsigned long addr, unsigned long size, pte_fn_t fn, void *data) { pgd_t *pgd; unsigned long next; unsigned long end = addr + size; int err; BUG_ON(addr >= end); pgd = pgd_offset(mm, addr); do { next = pgd_addr_end(addr, end); err = apply_to_pud_range(mm, pgd...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
327,655,975,622,239,160,000,000,000,000,000,000,000
18
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 void l2cap_conn_ready(struct l2cap_conn *conn) { struct l2cap_chan_list *l = &conn->chan_list; struct sock *sk; BT_DBG("conn %p", conn); read_lock(&l->lock); for (sk = l->head; sk; sk = l2cap_pi(sk)->next_c) { bh_lock_sock(sk); if (sk->sk_type != SOCK_SEQPACKET) { l2cap_sock_clear_timer(sk); s...
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
186,710,984,415,285,200,000,000,000,000,000,000,000
24
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
dcgetstr() { char *ret; ret = dcstr; dcstr=NULL; strmaxsize=0; return ret; }
0
[ "CWE-119", "CWE-125" ]
libming
da9d86eab55cbf608d5c916b8b690f5b76bca462
282,115,498,684,349,350,000,000,000,000,000,000,000
8
decompileAction: Prevent heap buffer overflow and underflow with using OpCode
window_count_panes(struct window *w) { struct window_pane *wp; u_int n; n = 0; TAILQ_FOREACH(wp, &w->panes, entry) n++; return (n); }
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
168,779,490,977,585,550,000,000,000,000,000,000,000
10
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
rfbBool rfbSendRectEncodingZRLE(rfbClientPtr cl, int x, int y, int w, int h) { zrleOutStream* zos; rfbFramebufferUpdateRectHeader rect; rfbZRLEHeader hdr; int i; if (cl->preferredEncoding == rfbEncodingZYWRLE) { if (cl->tightQualityLevel < 0) { cl->zywrleLevel = 1; } else if (cl->tightQualityLevel ...
1
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
189,661,180,382,415,030,000,000,000,000,000,000,000
128
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
static struct rt6_info *rt6_select(struct fib6_node *fn, int oif, int strict) { struct rt6_info *match, *rt0; struct net *net; bool do_rr = false; rt0 = fn->rr_ptr; if (!rt0) fn->rr_ptr = rt0 = fn->leaf; match = find_rr_leaf(fn, rt0, rt0->rt6i_metric, oif, strict, &do_rr); if (do_rr) { struct rt6_...
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
73,888,497,817,786,770,000,000,000,000,000,000,000
27
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
trust_value_to_string (unsigned int value) { switch ((value & TRUST_MASK)) { case TRUST_UNKNOWN: return _("unknown"); case TRUST_EXPIRED: return _("expired"); case TRUST_UNDEFINED: return _("undefined"); case TRUST_NEVER: return _("never"); case TRUST_MARGINAL: return _("marginal"); ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
306,113,565,779,697,130,000,000,000,000,000,000,000
14
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 ...
gx_dc_pattern2_clip_with_bbox(const gx_device_color * pdevc, gx_device * pdev, gx_clip_path *cpath_local, const gx_clip_path **ppcpath1) { if (gx_dc_is_pattern2_color(pdevc) && gx_dc_pattern2_color_has_bbox(pdevc) && (*dev_proc(pdev, dev_spec_op))(pdev, gxdso_pattern_shadin...
0
[ "CWE-704" ]
ghostpdl
693baf02152119af6e6afd30bb8ec76d14f84bbf
125,089,380,628,835,160,000,000,000,000,000,000,000
28
PS interpreter - check the Implementation of a Pattern before use Bug #700141 "Type confusion in setpattern" As the bug thread says, we were not checking that the Implementation of a pattern dictionary was a structure type, leading to a crash when we tried to treat it as one. Here we make the st_pattern1_instance an...
void ext4_ext_truncate(struct inode *inode) { struct address_space *mapping = inode->i_mapping; struct super_block *sb = inode->i_sb; ext4_lblk_t last_block; handle_t *handle; int err = 0; /* * probably first extent we're gonna free will be last in block */ err = ext4_writepage_trans_blocks(inode); handle ...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
71,568,999,390,045,230,000,000,000,000,000,000,000
63
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
PHP_FUNCTION(filter_var_array) { zval *array_input = NULL, **op = NULL; zend_bool add_empty = 1; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a|Zb", &array_input, &op, &add_empty) == FAILURE) { return; } if (op && (Z_TYPE_PP(op) != IS_ARRAY) && (Z_TYPE_PP(op) == IS_LONG && !PHP_FILTER_ID_EXISTS(Z...
0
[ "CWE-190" ]
php-src
da3886de6dc8edab3da14331227816d6ca8e9b96
327,996,043,465,410,280,000,000,000,000,000,000,000
18
Wrong value for FILTER_SANITIZE_FULL_SPECIAL_CHARS in REGISTER_LONG_CONSTANT
int ip_send_skb(struct net *net, struct sk_buff *skb) { int err; err = ip_local_out(skb); if (err) { if (err > 0) err = net_xmit_errno(err); if (err) IP_INC_STATS(net, IPSTATS_MIB_OUTDISCARDS); } return err; }
0
[ "CWE-284", "CWE-264" ]
linux
e93b7d748be887cd7639b113ba7d7ef792a7efb9
72,499,011,662,291,470,000,000,000,000,000,000,000
14
ip_output: do skb ufo init for peeked non ufo skb as well Now, if user application does: sendto len<mtu flag MSG_MORE sendto len>mtu flag 0 The skb is not treated as fragmented one because it is not initialized that way. So move the initialization to fix this. introduced by: commit e89e9cf539a28df7d0eb1d0a545368e9920...
lyp_check_circmod_add(struct lys_module *module) { struct ly_modules_list *models = &module->ctx->models; /* storing - enlarge the list of modules being currently parsed */ ++models->parsing_sub_modules_count; models->parsing_sub_modules = ly_realloc(models->parsing_sub_modules, ...
0
[ "CWE-787" ]
libyang
f6d684ade99dd37b21babaa8a856f64faa1e2e0d
323,064,010,565,840,100,000,000,000,000,000,000,000
13
parser BUGFIX long identity name buffer overflow STRING_OVERFLOW (CWE-120)
calc_delta_fair(unsigned long delta_exec, struct load_weight *lw) { return calc_delta_mine(delta_exec, NICE_0_LOAD, lw); }
1
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
275,354,062,946,871,070,000,000,000,000,000,000,000
4
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 ...
static int req_emerg(lua_State *L) { return req_log_at(L, APLOG_EMERG); }
0
[ "CWE-20" ]
httpd
78eb3b9235515652ed141353d98c239237030410
90,484,908,978,811,900,000,000,000,000,000,000,000
4
*) SECURITY: CVE-2015-0228 (cve.mitre.org) mod_lua: A maliciously crafted websockets PING after a script calls r:wsupgrade() can cause a child process crash. [Edward Lu <Chaosed0 gmail.com>] Discovered by Guido Vranken <guidovranken gmail.com> Submitted by: Edward Lu Committed by: covener git-svn-id...
my_decimal *Item_sp_variable::val_decimal(my_decimal *decimal_value) { DBUG_ASSERT(fixed); Item *it= this_item(); my_decimal *val= it->val_decimal(decimal_value); null_value= it->null_value; return val; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
286,013,854,607,940,640,000,000,000,000,000,000,000
8
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
ConnStateData::stopPinnedConnectionMonitoring() { if (pinning.readHandler != NULL) { Comm::ReadCancel(pinning.serverConnection->fd, pinning.readHandler); pinning.readHandler = NULL; } }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
202,913,281,943,267,800,000,000,000,000,000,000,000
7
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
GF_Err gf_node_list_insert_child(GF_ChildNodeItem **list, GF_Node *n, u32 pos) { GF_ChildNodeItem *child, *cur, *prev; u32 cur_pos = 0; assert(pos != (u32) -1); child = *list; cur = (GF_ChildNodeItem*) gf_malloc(sizeof(GF_ChildNodeItem)); if (!cur) return GF_OUT_OF_MEM; cur->node = n; cur->next = NULL; prev...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
49,930,906,657,610,620,000,000,000,000,000,000,000
30
fixed #2109
void LanLinkProvider::tcpSocketConnected() { QSslSocket* socket = qobject_cast<QSslSocket*>(sender()); if (!socket) return; // TODO Delete me? #if QT_VERSION < QT_VERSION_CHECK(5,15,0) disconnect(socket, QOverload<QAbstractSocket::SocketError>::of(&QAbstractSocket::error), this, &LanLinkProvider::conne...
0
[ "CWE-400", "CWE-703" ]
kdeconnect-kde
4fbd01a3d44a0bcca888c49a77ec7cfd10e113d7
328,501,247,133,160,560,000,000,000,000,000,000,000
61
Limit identity packets to 8KiB Healthy identity packages shouldn't be that big and we don't want to allow systems around us to send us ever humongous packages that will just leave us without any memory. Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
int SN_Client_Subscribe(MqttClient *client, SN_Subscribe *subscribe) { int rc = -1, len; /* Validate required arguments */ if (client == NULL || subscribe == NULL) { return MQTT_CODE_ERROR_BAD_ARG; } if (subscribe->stat == MQTT_MSG_BEGIN) { #ifdef WOLFMQTT_MULTITHREAD /* Lock s...
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
190,245,799,202,446,100,000,000,000,000,000,000,000
87
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
FILE *fopen_safe(const char *path, const char *mode) { int fd; FILE *file; int flags = O_NOFOLLOW | O_CREAT; int sav_errno; if (mode[0] == 'r') return fopen(path, mode); if ((mode[0] != 'a' && mode[0] != 'w') || (mode[1] && (mode[1] != '+' || mode[2]))) { errno = EINVAL; return NULL; } if (m...
1
[ "CWE-200" ]
keepalived
17f944144b3d9c5131569b1cc988cc90fd676671
313,492,640,581,864,700,000,000,000,000,000,000,000
80
Make sure a non privileged user cannot read keepalived file output Ensure that when a file such as /tmp/keepalived.data is wriiten, no non privileged can have a previous version of that file already open, thereby allowing them to read the data. This should fully resolve CVE-2018-19046. Signed-off-by: Quentin Armitag...
static int bnep_sock_create(struct net *net, struct socket *sock, int protocol, int kern) { struct sock *sk; BT_DBG("sock %p", sock); if (sock->type != SOCK_RAW) return -ESOCKTNOSUPPORT; sk = sk_alloc(net, PF_BLUETOOTH, GFP_ATOMIC, &bnep_proto); if (!sk) return -ENOMEM; sock_init_data(sock, sk); ...
0
[ "CWE-20", "CWE-787" ]
linux
43629f8f5ea32a998d06d1bb41eefa0e821ff573
83,812,466,574,515,690,000,000,000,000,000,000,000
27
Bluetooth: bnep: fix buffer overflow Struct ca is copied from userspace. It is not checked whether the "device" field is NULL terminated. This potentially leads to BUG() inside of alloc_netdev_mqs() and/or information leak by creating a device with a name made of contents of kernel stack. Signed-off-by: Vasiliy Kul...
char *strdup(const char *s1) { char *s2 = 0; if (s1) { size_t len = strlen(s1) + 1; s2 = malloc(len); memcpy(s2, s1, len); } return s2; }
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
182,071,162,861,681,800,000,000,000,000,000,000,000
10
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static int ZEND_FASTCALL ZEND_MUL_SPEC_CONST_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; mul_function(&EX_T(opline->result.u.var).tmp_var, &opline->op1.u.constant, _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC) TSRMLS_CC); if (free_op2.var) {zval...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
309,483,828,168,911,550,000,000,000,000,000,000,000
12
- 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
GF_Box *udta_New() { ISOM_DECL_BOX_ALLOC(GF_UserDataBox, GF_ISOM_BOX_TYPE_UDTA); tmp->recordList = gf_list_new(); if (!tmp->recordList) { gf_free(tmp); return NULL; } return (GF_Box *)tmp;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
296,421,160,787,039,960,000,000,000,000,000,000,000
10
prevent dref memleak on invalid input (#1183)
TPMS_TIME_INFO_Unmarshal(TPMS_TIME_INFO *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; if (rc == TPM_RC_SUCCESS) { rc = UINT64_Unmarshal(&target->time, buffer, size); } if (rc == TPM_RC_SUCCESS) { rc = TPMS_CLOCK_INFO_Unmarshal(&target->clockInfo, buffer, size); } retu...
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
185,574,324,615,774,420,000,000,000,000,000,000,000
12
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
ptirq_build_physical_rte(struct acrn_vm *vm, struct ptirq_remapping_info *entry) { union ioapic_rte rte; uint32_t phys_irq = entry->allocated_pirq; union source_id *virt_sid = &entry->virt_sid; union irte_index ir_index; union dmar_ir_entry irte; struct intr_source intr_src; int32_t ret; if (virt_sid->intx_id....
0
[ "CWE-120", "CWE-787" ]
acrn-hypervisor
25c0e3817eb332660dd63d1d4522e63dcc94e79a
206,816,950,834,694,100,000,000,000,000,000,000,000
105
hv: validate input for dmar_free_irte function Malicious input 'index' may trigger buffer overflow on array 'irte_alloc_bitmap[]'. This patch validate that 'index' shall be less than 'CONFIG_MAX_IR_ENTRIES' and also remove unnecessary check on 'index' in 'ptirq_free_irte()' function with this fix. Tracked-On: ...
void jswrap_graphics_drawString(JsVar *parent, JsVar *var, int x, int y) { JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return; JsVar *customBitmap = 0, *customWidth = 0; int customHeight = 0, customFirstChar = 0; if (gfx.data.fontSize>0) { customHeight = gfx.data.fontSize; } else if (gfx.data....
0
[ "CWE-125" ]
Espruino
8a44b04b584b3d3ab1cb68fed410f7ecb165e50e
137,603,713,328,061,360,000,000,000,000,000,000,000
112
Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421)
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* start = GetInput(context, node, kStartTensor); const TfLiteTensor* limit = GetInput(context, node, kLimitTensor); const TfLiteT...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
314,739,855,165,081,860,000,000,000,000,000,000,000
35
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
ZEND_VM_COLD_CONSTCONST_HANDLER(189, ZEND_IN_ARRAY, CONST|TMP|VAR|CV, CONST, NUM) { USE_OPLINE zend_free_op free_op1; zval *op1; HashTable *ht = Z_ARRVAL_P(RT_CONSTANT(opline, opline->op2)); zval *result; SAVE_OPLINE(); op1 = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); if (EXPECTED(Z_TYPE_P(op1) == IS_STRING)) { resul...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
313,990,724,323,871,120,000,000,000,000,000,000,000
39
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
virtual ~OptimizeBase() {}
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
282,620,456,776,613,070,000,000,000,000,000,000,000
1
SERVER-38070 fix infinite loop in agg expression
void UpdateDownloader::CleanLeftovers() { // Note: this is called at startup. Do not use wxWidgets from this code! std::wstring tmpdir; if ( !Settings::ReadConfigValue("UpdateTempDir", tmpdir) ) return; tmpdir.append(1, '\0'); // double NULL-terminate for SHFileOperation SHFILEOPSTRUCT fo...
1
[ "CWE-426", "CWE-401" ]
winsparkle
bb454857348245a7397f9e4fbb3a902f4ac25913
204,433,040,730,686,100,000,000,000,000,000,000,000
24
Verify UpdateTempDir isn't maliciously modified Don't just delete the stored updates temporary directory on launch, but validate the registry key to ensure it is in an expected location and follows WinSparkle's naming convention. This is to prevent malicious users from modifying this registry key and forcing the host ...
ftrace_snapshot_free(struct ftrace_probe_ops *ops, struct trace_array *tr, unsigned long ip, void *data) { struct ftrace_func_mapper *mapper = data; if (!ip) { if (!mapper) return; free_ftrace_func_mapper(mapper, NULL); return; } ftrace_func_mapper_remove_ip(mapper, ip); }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
148,576,941,762,639,600,000,000,000,000,000,000,000
14
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
flow_hash_5tuple(const struct flow *flow, uint32_t basis) { BUILD_ASSERT_DECL(FLOW_WC_SEQ == 42); uint32_t hash = basis; if (flow) { if (flow->dl_type == htons(ETH_TYPE_IPV6)) { const uint64_t *flow_u64 = (const uint64_t *)flow; int ofs = offsetof(struct flow, ipv6_src) / 8...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
18,355,067,679,688,018,000,000,000,000,000,000,000
38
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
enum Derivation derivation(void) const { return DERIVATION_NUMERIC; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
288,492,503,519,202,530,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
bus_acquired_handler (GDBusConnection *connection, const gchar *name, gpointer user_data) { g_dbus_connection_call (connection, IBUS_SERVICE_PORTAL, IBUS_PATH_IBUS, "org.freede...
1
[ "CWE-862" ]
ibus
3d442dbf936d197aa11ca0a71663c2bc61696151
147,048,309,565,957,400,000,000,000,000,000,000,000
18
bus: Implement GDBusAuthObserver callback ibus uses a GDBusServer with G_DBUS_SERVER_FLAGS_AUTHENTICATION_ALLOW_ANONYMOUS, and doesn't set a GDBusAuthObserver, which allows anyone who can connect to its AF_UNIX socket to authenticate and be authorized to send method calls. It also seems to use an abstract AF_UNIX sock...
PHP_METHOD(Phar, setAlias) { char *alias, *error, *oldalias; phar_archive_data *fd_ptr; size_t alias_len, oldalias_len; int old_temp, readd = 0; PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->archive->is_data) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0, "Cannot write out phar a...
0
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
186,706,263,983,624,550,000,000,000,000,000,000,000
99
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { const char *filename; /* Support filename */ ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs, "job-cancel-after", IPP_TAG_INTEGER); /* job-cancel-after attribute...
0
[]
cups
d47f6aec436e0e9df6554436e391471097686ecc
102,841,892,529,971,350,000,000,000,000,000,000,000
198
Fix local privilege escalation to root and sandbox bypasses in scheduler (rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581)
void EncryptedPreMasterSecret::read(SSL& ssl, input_buffer& input) { if (input.get_error()) { ssl.SetError(bad_input); return; } const CertManager& cert = ssl.getCrypto().get_certManager(); RSA rsa(cert.get_privateKey(), cert.get_privateKeyLength(), false); uint16 cipherLen = rsa.ge...
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
273,572,540,491,590,300,000,000,000,000,000,000,000
35
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
GF_Err apply_edits(GF_ISOFile *dest, u32 track, char *edits) { GF_Err e = GF_OK; u32 movie_ts = gf_isom_get_timescale(dest); u32 media_ts = gf_isom_get_media_timescale(dest, track); u64 media_dur = gf_isom_get_media_duration(dest, track); while (edits) { char c=0; char *sep = strchr(edits+1, 'r'); if (!sep)...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
138,677,102,471,964,780,000,000,000,000,000,000,000
106
fixed crashes for very long path - cf #1908
xmlExpParse(xmlExpCtxtPtr ctxt, const char *expr) { xmlExpNodePtr ret; ctxt->expr = expr; ctxt->cur = expr; ret = xmlExpParseExpr(ctxt); SKIP_BLANKS if (*ctxt->cur != 0) { xmlExpFree(ctxt, ret); return(NULL); } return(ret); }
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
144,134,387,213,422,410,000,000,000,000,000,000,000
14
Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711> * xmlregexp.c: (xmlFAParseCharRange): Only advance to the next character if there is no error. Advancing to the next character in case of an error while parsing regexp leads to an out of bounds access.
int git_smart__negotiate_fetch(git_transport *transport, git_repository *repo, const git_remote_head * const *wants, size_t count) { transport_smart *t = (transport_smart *)transport; gitno_buffer *buf = &t->buffer; git_buf data = GIT_BUF_INIT; git_revwalk *walk = NULL; int error = -1, pkt_type; unsigned int i; ...
0
[ "CWE-476", "CWE-119" ]
libgit2
2fdef641fd0dd2828bd948234ae86de75221a11a
327,504,106,334,043,560,000,000,000,000,000,000,000
150
smart_pkt: treat empty packet lines as error The Git protocol does not specify what should happen in the case of an empty packet line (that is a packet line "0004"). We currently indicate success, but do not return a packet in the case where we hit an empty line. The smart protocol was not prepared to handle such pack...
int set_xattr(const char *fname, const struct file_struct *file, const char *fnamecmp, stat_x *sxp) { rsync_xa_list *glst = rsync_xal_l.items; item_list *lst; int ndx; if (dry_run) return 1; /* FIXME: --dry-run needs to compute this value */ if (read_only || list_only) { errno = EROFS; return -1; }...
0
[ "CWE-125" ]
rsync
47a63d90e71d3e19e0e96052bb8c6b9cb140ecc1
283,374,904,132,975,860,000,000,000,000,000,000,000
39
Enforce trailing \0 when receiving xattr name values. Fixes bug 13112.
static curl_off_t vms_realfilesize(const char * name, const struct_stat * stat_buf) { char buffer[8192]; curl_off_t count; int ret_stat; FILE * file; file = fopen(name, "r"); /* VMS */ if(file == NULL) { return 0; } count = 0; ret_stat = 1; while(ret_stat > 0)...
0
[ "CWE-125" ]
curl
481e0de00a9003b9c5220b120e3fc302d9b0932d
252,617,022,968,238,570,000,000,000,000,000,000,000
23
curl: point out unnecessary uses of -X in verbose mode It uses 'Note:' as a prefix as opposed to the common 'Warning:' to take down the tone a bit. It adds a warning for using -XHEAD on other methods becasue that may lead to a hanging connection.
static int ReadDCMByte(DCMStreamInfo *stream_info,Image *image) { if (image->compression != RLECompression) return(ReadBlobByte(image)); if (stream_info->count == 0) { int byte; ssize_t count; if (stream_info->remaining <= 2) stream_info->remaining=0; else ...
0
[ "CWE-20", "CWE-476", "CWE-369" ]
ImageMagick
5511ef530576ed18fd636baa3bb4eda3d667665d
16,021,714,627,950,516,000,000,000,000,000,000,000
47
Add additional checks to DCM reader to prevent data-driven faults (bug report from Hanno Böck
static int jpc_pi_nextrlcp(register jpc_pi_t *pi) { jpc_pchg_t *pchg; int *prclyrno; pchg = pi->pchg; if (!pi->prgvolfirst) { assert(pi->prcno < pi->pirlvl->numprcs); prclyrno = &pi->pirlvl->prclyrnos[pi->prcno]; goto skip; } else { pi->prgvolfirst = 0; } for (pi->rlvlno = pchg->rlvlnostart; pi->rlvlno...
1
[ "CWE-125" ]
jasper
aa0b0f79ade5eef8b0e7a214c03f5af54b36ba7d
62,179,343,287,574,230,000,000,000,000,000,000,000
40
Fixed numerous integer overflow problems in the code for packet iterators in the JPC decoder.
void *umm_info( void *ptr, int force ) { unsigned short int blockNo = 0; /* Protect the critical section... */ UMM_CRITICAL_ENTRY(); /* * Clear out all of the entries in the ummHeapInfo structure before doing * any calculations.. */ memset( &ummHeapInfo, 0, sizeof( ummHeapInfo ) ); ummHeapInfo....
0
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
316,342,981,866,327,140,000,000,000,000,000,000,000
107
Fix umm_malloc()
__u32 ext4_free_inodes_count(struct super_block *sb, struct ext4_group_desc *bg) { return le16_to_cpu(bg->bg_free_inodes_count_lo) | (EXT4_DESC_SIZE(sb) >= EXT4_MIN_DESC_SIZE_64BIT ? (__u32)le16_to_cpu(bg->bg_free_inodes_count_hi) << 16 : 0); }
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
127,601,221,133,542,220,000,000,000,000,000,000,000
7
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
static int snd_pcm_dev_register(struct snd_device *device) { int cidx, err; struct snd_pcm_substream *substream; struct snd_pcm *pcm; if (snd_BUG_ON(!device || !device->device_data)) return -ENXIO; pcm = device->device_data; mutex_lock(&register_mutex); err = snd_pcm_add(pcm); if (err) goto unlock; for (...
0
[ "CWE-416" ]
linux
362bca57f5d78220f8b5907b875961af9436e229
291,369,003,710,259,950,000,000,000,000,000,000,000
45
ALSA: pcm: prevent UAF in snd_pcm_info When the device descriptor is closed, the `substream->runtime` pointer is freed. But another thread may be in the ioctl handler, case SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which calls snd_pcm_info() which accesses the now freed `substream->runtime`. Note:...
static inline struct inode *isofs_iget(struct super_block *sb, unsigned long block, unsigned long offset) { return __isofs_iget(sb, block, offset, 0); }
0
[ "CWE-20", "CWE-399" ]
linux
410dd3cf4c9b36f27ed4542ee18b1af5e68645a4
335,522,231,011,023,300,000,000,000,000,000,000,000
6
isofs: Fix unbounded recursion when processing relocated directories We did not check relocated directory in any way when processing Rock Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL entry pointing to another CL entry leading to possibly unbounded recursion in kernel code and thus stack overflow...
struct task_struct *wq_worker_sleeping(struct task_struct *task) { struct worker *worker = kthread_data(task), *to_wakeup = NULL; struct worker_pool *pool; /* * Rescuers, which may not have all the fields set up like normal * workers, also reach here, let's not access anything before * checking NOT_RUNNING. ...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
170,655,295,987,017,100,000,000,000,000,000,000,000
35
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
DECLAREContigPutFunc(putcontig8bitYCbCr22tile) { uint32* cp2; int32 incr = 2*toskew+w; (void) y; fromskew = (fromskew / 2) * (2*2+2); cp2 = cp+w+toskew; while (h>=2) { x = w; while (x>=2) { uint32 Cb = pp[4]; uint32 Cr = pp[5]; YCbCrtoRGB(cp[0], pp[0]); YCbCrtoRGB(cp[1], pp[1]); YCbCrtoRGB(cp2[...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
144,521,037,411,830,580,000,000,000,000,000,000,000
54
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
wc_char_conv_from_iso2022(wc_uchar c, wc_status *st) { static Str os; static wc_uchar buf[4]; static size_t nbuf; wc_uchar *p; wc_ccs gl_ccs, gr_ccs; if (st->state == -1) { st->state = WC_ISO_NOSTATE; os = Strnew_size(8); nbuf = 0; } gl_ccs = st->ss ? st->design[st->ss] : st->design...
0
[ "CWE-125" ]
w3m
9cf6926c5d947371dc9e44f32bc7a2fbfca5d469
88,784,944,083,953,730,000,000,000,000,000,000,000
217
Prevent segfault when iso2022 parsing Bug-Debian: https://github.com/tats/w3m/issues/14
static void fuse_readahead(struct readahead_control *rac) { struct inode *inode = rac->mapping->host; struct fuse_conn *fc = get_fuse_conn(inode); unsigned int i, max_pages, nr_pages = 0; if (is_bad_inode(inode)) return; max_pages = min_t(unsigned int, fc->max_pages, fc->max_read / PAGE_SIZE); for (;;) { ...
1
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
126,591,078,256,035,480,000,000,000,000,000,000,000
35
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
bool mg_http_match_uri(const struct mg_http_message *hm, const char *glob) { return mg_globmatch(glob, strlen(glob), hm->uri.ptr, hm->uri.len); }
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
203,008,127,917,004,700,000,000,000,000,000,000,000
3
Protect against the directory traversal in mg_upload()
TPM2B_MAX_BUFFER_Marshal(TPM2B_MAX_BUFFER *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM2B_Marshal(&source->b, sizeof(source->t.buffer), buffer, size); // libtpms changed return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
2,263,857,232,535,353,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
ModResult OnUserRegister(LocalUser *user) { SaslAuthenticator *sasl_ = authExt.get(user); if (sasl_) { sasl_->Abort(); authExt.unset(user); } return MOD_RES_PASSTHRU; }
0
[ "CWE-284", "CWE-264" ]
inspircd
74fafb7f11b06747f69f182ad5e3769b665eea7a
325,634,422,606,982,860,000,000,000,000,000,000,000
11
m_sasl: don't allow AUTHENTICATE with mechanisms with a space
int bt_sock_stream_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; int err = 0; size_t target, copied = 0; long timeo; if (flags & MSG_OOB) return -EOPNOTSUPP; BT_DBG("sk %p size %zu", sk, size); lock_sock(sk); target = s...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
267,996,264,875,813,020,000,000,000,000,000,000,000
103
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static int do_change_type(struct path *path, int flag) { struct mount *m; struct mount *mnt = real_mount(path->mnt); int recurse = flag & MS_REC; int type; int err = 0; if (path->dentry != path->mnt->mnt_root) return -EINVAL; type = flags_to_propagation_type(flag); if (!type) return -EINVAL; down_write(...
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
237,706,416,133,056,370,000,000,000,000,000,000,000
31
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
void CiffDirectory::doDecode(Image& image, ByteOrder byteOrder) const { Components::const_iterator b = components_.begin(); Components::const_iterator e = components_.end(); for (Components::const_iterator i = b; i != e; ++i) { (*i)->decode(image, byteOrder); } } ...
0
[ "CWE-400" ]
exiv2
b3d077dcaefb6747fff8204490f33eba5a144edb
21,719,472,855,714,165,000,000,000,000,000,000,000
8
Fix #460 by adding more checks in CiffDirectory::readDirectory
TEST_F(DocumentSourceMatchTest, ShouldAddWholeDocumentAsDependencyOfClausesWithinInternalSchemaAllowedProperties) { auto query = fromjson( "{$_internalSchemaAllowedProperties: {properties: ['a', 'b']," "namePlaceholder: 'i', patternProperties: [], otherwise: {i: 0}}}"); auto match = Docum...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
31,690,529,048,129,595,000,000,000,000,000,000,000
12
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
uchar *pack_int16(uchar *to, const uchar *from) { return pack_int(to, from, 2); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
40,414,974,778,114,767,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static ssize_t attr_store_maxopeners(struct device *cd, struct device_attribute *attr, const char *buf, size_t len) { struct v4l2_loopback_device *dev = NULL; unsigned long curr = 0; if (kstrtoul(buf, 0, &curr)) return -EINVAL; dev = v4l2loopback_cd2dev(cd); if (dev->max_openers == curr) return len; if ...
0
[ "CWE-787" ]
v4l2loopback
64a216af4c09c9ba9326057d7e78994271827eff
325,750,004,375,134,400,000,000,000,000,000,000,000
23
add explicit format specifier to printf() invocations CWE-134
_PyAST_GetDocString(asdl_seq *body) { if (!asdl_seq_LEN(body)) { return NULL; } stmt_ty st = (stmt_ty)asdl_seq_GET(body, 0); if (st->kind != Expr_kind) { return NULL; } expr_ty e = st->v.Expr.value; if (e->kind == Constant_kind && PyUnicode_CheckExact(e->v.Constant.value)) { ...
0
[ "CWE-125" ]
cpython
a4d78362397fc3bced6ea80fbc7b5f4827aec55e
83,259,913,033,379,990,000,000,000,000,000,000,000
15
bpo-36495: Fix two out-of-bounds array reads (GH-12641) Research and fix by @bradlarsen.
static int fuse_do_getattr(struct inode *inode, struct kstat *stat, struct file *file) { int err; struct fuse_getattr_in inarg; struct fuse_attr_out outarg; struct fuse_mount *fm = get_fuse_mount(inode); FUSE_ARGS(args); u64 attr_version; attr_version = fuse_get_attr_version(fm->fc); memset(&inarg, 0, s...
1
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
66,305,836,614,615,400,000,000,000,000,000,000,000
45
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
static void set_local_name_complete(uint8_t status, uint16_t length, const void *param, void *user_data) { struct btd_adapter *adapter = user_data; if (status != MGMT_STATUS_SUCCESS) { btd_error(adapter->dev_id, "Failed to set local name: %s (0x%02x)", mgmt_errstr(status), status); return; } /*...
0
[ "CWE-862", "CWE-863" ]
bluez
b497b5942a8beb8f89ca1c359c54ad67ec843055
195,342,990,335,819,920,000,000,000,000,000,000,000
19
adapter: Fix storing discoverable setting discoverable setting shall only be store when changed via Discoverable property and not when discovery client set it as that be considered temporary just for the lifetime of the discovery.
static void git_pack_config(void) { int indexversion_value; unsigned long packsizelimit_value; if (!git_config_get_ulong("pack.depth", &max_depth)) { if (max_depth > MAX_DEPTH) max_depth = MAX_DEPTH; } if (!git_config_get_int("pack.compression", &pack_compression_level)) { if (pack_compression_level == -1)...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
6,844,419,111,529,631,000,000,000,000,000,000,000
29
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
void do_bad_area(unsigned long addr, unsigned int esr, struct pt_regs *regs) { struct task_struct *tsk = current; struct mm_struct *mm = tsk->active_mm; /* * If we are in kernel mode at this point, we have no context to * handle this fault with. */ if (user_mode(regs)) __do_user_fault(tsk, addr, esr, SIGSE...
0
[]
linux
1d18c47c735e8adfe531fc41fae31e98f86b68fe
274,696,409,606,331,840,000,000,000,000,000,000,000
14
arm64: MMU fault handling and page table management This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch) and page table management. The user translation table is pointed to by TTBR0 and the kernel one (swapper_pg_dir) by TTBR1. There is no translation inform...
Setup_AF_UNIX(char *sock_path) { /* * Fix socket ownership/permission if requested. Note we must do this * before we listen() to avoid a window where unwanted connections could * get accepted. */ Assert(Unix_socket_group); if (Unix_socket_group[0] != '\0') { #ifdef WIN32 elog(WARNING, "configuration item...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
86,596,696,226,859,830,000,000,000,000,000,000,000
57
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
HandleUltraZipBPP (rfbClient* client, int rx, int ry, int rw, int rh) { rfbZlibHeader hdr; int i=0; int toRead=0; int inflateResult=0; unsigned char *ptr=NULL; lzo_uint uncompressedBytes = ry + (rw * 65535); unsigned int numCacheRects = rx; if (!ReadFromRFBServer(client, (char *)&hdr, sz_rfbZlibHeader)...
0
[ "CWE-119" ]
libvncserver
5fff4353f66427b467eb29e5fdc1da4f2be028bb
104,979,672,865,597,380,000,000,000,000,000,000,000
94
Fix heap overflow in the ultra.c decoder The Ultra type tile decoder does not use the _safe variant of the LZO decompress function, which allows a maliciuous server to overwrite parts of the heap by sending a larger-than-specified LZO data stream.
static int inet6_fill_ifmcaddr(struct sk_buff *skb, struct ifmcaddr6 *ifmca, u32 pid, u32 seq, int event, u16 flags) { struct ifaddrmsg *ifm; struct nlmsghdr *nlh; struct ifa_cacheinfo ci; unsigned char *b = skb->tail; nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*ifm), flags); ifm = NLMSG_DATA(nlh); ifm-...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
199,250,262,311,476,900,000,000,000,000,000,000,000
35
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
const char * STDCALL symver16_mysql_get_ssl_cipher(MYSQL *mysql __attribute__((unused))) { return mysql_get_ssl_cipher(mysql);
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
98,092,448,788,290,100,000,000,000,000,000,000,000
4
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
write_event(SCREEN *sp, int down, int button, int x, int y) { char buf[6]; unsigned long ignore; _nc_STRCPY(buf, "\033[M", sizeof(buf)); /* should be the same as key_mouse */ buf[3] = ' ' + (button - 1) + (down ? 0 : 0x40); buf[4] = ' ' + x - LEFT_COL + 1; buf[5] = ' ' + y - TOP_ROW + 1; Do...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
271,870,732,853,187,800,000,000,000,000,000,000,000
11
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
int ath6kl_wmi_get_challenge_resp_cmd(struct wmi *wmi, u32 cookie, u32 source) { struct sk_buff *skb; struct wmix_hb_challenge_resp_cmd *cmd; int ret; skb = ath6kl_wmi_get_new_buf(sizeof(*cmd)); if (!skb) return -ENOMEM; cmd = (struct wmix_hb_challenge_resp_cmd *) skb->data; cmd->cookie = cpu_to_le32(cookie)...
0
[ "CWE-125" ]
linux
5d6751eaff672ea77642e74e92e6c0ac7f9709ab
121,561,720,006,798,140,000,000,000,000,000,000,000
18
ath6kl: add some bounds checking The "ev->traffic_class" and "reply->ac" variables come from the network and they're used as an offset into the wmi->stream_exist_for_ac[] array. Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[] array only has WMM_NUM_AC (4) elements. We need to add a couple bo...
static void rbd_free_disk(struct rbd_device *rbd_dev) { blk_cleanup_queue(rbd_dev->disk->queue); blk_mq_free_tag_set(&rbd_dev->tag_set); put_disk(rbd_dev->disk); rbd_dev->disk = NULL; }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
23,943,699,364,739,640,000,000,000,000,000,000,000
7
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
bit_write_MS (Bit_Chain *dat, BITCODE_MS value) { if (value > 0x7fff) { bit_write_RS (dat, (value & 0xffff8000) >> 15); bit_write_RS (dat, value & 0x7fff); } else { bit_write_RS (dat, value); } }
0
[ "CWE-703", "CWE-125" ]
libredwg
95cc9300430d35feb05b06a9badf678419463dbe
332,161,250,730,895,520,000,000,000,000,000,000,000
12
encode: protect from stack under-flow From GH #178 fuzzing
static int __kprobes do_translation_fault(unsigned long addr, unsigned int esr, struct pt_regs *regs) { if (addr < TASK_SIZE) return do_page_fault(addr, esr, regs); do_bad_area(addr, esr, regs); return 0; }
0
[]
linux
1d18c47c735e8adfe531fc41fae31e98f86b68fe
279,207,604,605,203,420,000,000,000,000,000,000,000
10
arm64: MMU fault handling and page table management This patch adds support for the handling of the MMU faults (exception entry code introduced by a previous patch) and page table management. The user translation table is pointed to by TTBR0 and the kernel one (swapper_pg_dir) by TTBR1. There is no translation inform...
int mnt_fs_set_comment(struct libmnt_fs *fs, const char *comm) { return strdup_to_struct_member(fs, comment, comm); }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
320,479,438,758,496,880,000,000,000,000,000,000,000
4
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
brcmf_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *ndev) { struct brcmf_if *ifp = netdev_priv(ndev); brcmf_dbg(TRACE, "Enter\n"); if (!check_vif_up(ifp->vif)) { /* When driver is being unloaded, it can end up here. If an * error is returned then later on a debug trace in the wireless * core m...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
326,092,661,740,779,000,000,000,000,000,000,000,000
20
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...
_rsvg_cairo_set_text_antialias (cairo_t * cr, TextRenderingProperty aa) { if (TEXT_RENDERING_AUTO == aa) cairo_set_antialias (cr, CAIRO_ANTIALIAS_DEFAULT); else if (TEXT_RENDERING_OPTIMIZE_SPEED == aa) cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE); else if (TEXT_RENDERING_OPTIMIZE_LEGIBILIT...
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
255,157,254,672,716,550,000,000,000,000,000,000,000
11
Store node type separately in RsvgNode The node name (formerly RsvgNode:type) cannot be used to infer the sub-type of RsvgNode that we're dealing with, since for unknown elements we put type = node-name. This lead to a (potentially exploitable) crash e.g. when the element name started with "fe" which tricked the old c...
jbig2_decode_symbol_dict(Jbig2Ctx *ctx, Jbig2Segment *segment, const Jbig2SymbolDictParams *params, const byte *data, size_t size, Jbig2ArithCx *GB_stats, Jbig2ArithCx *GR_stats) { Jbig2SymbolDict *SDNEWSYMS = NULL; Jbig2SymbolDict *SDEXSYMS = NULL; uint32_t...
0
[ "CWE-476" ]
ghostpdl
3ebffb1d96ba0cacec23016eccb4047dab365853
56,277,218,514,994,070,000,000,000,000,000,000,000
570
Bug 697934: Fix SEGV due to error code being ignored. The return code from jbig2_decode_text_region was being ignored so the code continued to try and parse the invalid file using incomplete/empty structures.
static struct xfrm_dst *xfrm_create_dummy_bundle(struct net *net, struct xfrm_flo *xflo, const struct flowi *fl, int num_xfrms, u16 family) { int err; struct net_device *dev; struct dst_entry *dst; struct dst_entry *dst1; struct xfrm_dst *xdst; xdst = xfrm_alloc_dst(net, family); if ...
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
291,172,387,550,974,350,000,000,000,000,000,000,000
58
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
static int handle_halt(struct kvm_vcpu *vcpu) { skip_emulated_instruction(vcpu); return kvm_emulate_halt(vcpu); }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
271,550,706,941,639,400,000,000,000,000,000,000,000
5
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
cmsBool GetVal(cmsIT8* it8, char* Buffer, cmsUInt32Number max, const char* ErrorTitle) { switch (it8->sy) { case SIDENT: strncpy(Buffer, it8->id, max); Buffer[max-1]=0; break; case SINUM: snprintf(Buffer, max, "%d", it8 -> inum); break; case SDNUM: snprintf(Buff...
0
[]
Little-CMS
65e2f1df3495edc984f7e0d7b7b24e29d851e240
67,083,659,412,193,900,000,000,000,000,000,000,000
21
Fix some warnings from static analysis
kadm5_modify_principal(void *server_handle, kadm5_principal_ent_t entry, long mask) { int ret, ret2, i; kadm5_policy_ent_rec npol, opol; int have_npol = 0, have_opol = 0; krb5_db_entry *kdb; krb5_tl_data *tl_data_...
0
[ "CWE-703" ]
krb5
c5be6209311d4a8f10fda37d0d3f876c1b33b77b
96,302,015,898,090,840,000,000,000,000,000,000,000
210
Null pointer deref in kadmind [CVE-2012-1013] The fix for #6626 could cause kadmind to dereference a null pointer if a create-principal request contains no password but does contain the KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix name"). Only clients authorized to create principals can trigger ...
static CURLcode file_connect(struct connectdata *conn, bool *done) { struct Curl_easy *data = conn->data; char *real_path; struct FILEPROTO *file = data->req.protop; int fd = -1; #ifdef DOS_FILESYSTEM size_t i; char *actual_path; #endif size_t real_path_len; CURLcode result = Curl_urldecode(data, data-...
0
[]
curl
1b71bc532bde8621fd3260843f8197182a467ff2
35,711,566,446,213,064,000,000,000,000,000,000,000
76
file: on Windows, refuse paths that start with \\ ... as that might cause an unexpected SMB connection to a given host name. Reported-by: Fernando Muñoz CVE-2019-15601 Bug: https://curl.haxx.se/docs/CVE-2019-15601.html
TEST_F(QueryPlannerTest, ContainedOrPathLevelMultikeyCannotCombineTrailingFields) { MultikeyPaths multikeyPaths{{}, {0U}}; addIndex(BSON("b" << 1 << "a" << 1), multikeyPaths); addIndex(BSON("c" << 1)); runQuery( fromjson("{$and: [{a: {$gte: 0}}, {$or: [{$and: [{a: {$lte: 10}}, {b: 6}]}, {c: 7}]...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
318,338,111,642,482,570,000,000,000,000,000,000,000
24
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static char * remove_upattern (param, pattern, op) char *param, *pattern; int op; { register size_t len; register char *end; register char *p, *ret, c; len = STRLEN (param); end = param + len; switch (op) { case RP_LONG_LEFT: /* remove longest match at start */ for (p = end; p >= para...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
68,883,391,019,530,810,000,000,000,000,000,000,000
69
Bash-4.4 patch 7
static void qxl_init_ramsize(PCIQXLDevice *qxl) { /* vga mode framebuffer / primary surface (bar 0, first part) */ if (qxl->vgamem_size_mb < 8) { qxl->vgamem_size_mb = 8; } /* XXX: we round vgamem_size_mb up to a nearest power of two and it must be * less than vga_common_init()'s maximum on...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
206,666,089,459,375,980,000,000,000,000,000,000,000
47
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...
bool cfg80211_rx_control_port(struct net_device *dev, struct sk_buff *skb, bool unencrypted) { int ret; trace_cfg80211_rx_control_port(dev, skb, unencrypted); ret = __nl80211_rx_control_port(dev, skb, unencrypted, GFP_ATOMIC); trace_cfg80211_return_bool(ret == 0); return ret == 0; }
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
7,432,178,530,834,389,000,000,000,000,000,000,000
10
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...