func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void CSteamNetworkListenSocketDirectUDP::SendMsg( uint8 nMsgID, const google::protobuf::MessageLite &msg, const netadr_t &adrTo ) { if ( !m_pSock ) { Assert( false ); return; } uint8 pkt[ k_cbSteamNetworkingSocketsMaxUDPMsgLen ]; pkt[0] = nMsgID; int cbPkt = ProtoMsgByteSize( msg )+1; if ( cbPkt > sizeof(pk...
0
[ "CWE-703" ]
GameNetworkingSockets
d944a10808891d202bb1d5e1998de6e0423af678
56,442,304,845,885,990,000,000,000,000,000,000,000
22
Tweak pointer math to avoid possible integer overflow
nautilus_find_file_insensitive (GFile *parent, const gchar *name) { gchar **split_path; gchar *component; GFile *file, *next; gint i; split_path = g_strsplit (name, G_DIR_SEPARATOR_S, -1); file = g_object_ref (parent); for (i = 0; (component = split_path[i]) != NULL; i++) { if (!(next = nautilus_find_fil...
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
281,445,382,944,275,900,000,000,000,000,000,000,000
29
Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop 2009-02-25 Alexander Larsson <alexl@redhat.com> * src/nautilus-application.c: Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop file trust operation. * libnautilus-private/nautilus-file-utilities.[ch]: Ad...
inline bool abs(const bool a) { return a; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
248,381,506,204,814,640,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
close_all_tables_for_name(THD *thd, TABLE_SHARE *share, ha_extra_function extra, TABLE *skip_table) { DBUG_ASSERT(!share->tmp_table); char key[MAX_DBKEY_LENGTH]; uint key_length= share->table_cache_key.length; const char *db= key; const char *table_name= db...
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
223,472,250,899,209,460,000,000,000,000,000,000,000
53
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
static void setup_wait_parent_capabilities(void) { capng_setpid(syscall(SYS_gettid)); capng_clear(CAPNG_SELECT_BOTH); capng_apply(CAPNG_SELECT_BOTH); }
0
[]
qemu
6084633dff3a05d63176e06d7012c7e15aba15be
107,094,427,662,703,060,000,000,000,000,000,000,000
6
tools/virtiofsd: xattr name mappings: Add option Add an option to define mappings of xattr names so that the client and server filesystems see different views. This can be used to have different SELinux mappings as seen by the guest, to run the virtiofsd with less privileges (e.g. in a case where it can't set trusted/...
bool ValidateBoxes(const TfLiteTensor* decoded_boxes, const int num_boxes) { for (int i = 0; i < num_boxes; ++i) { // ymax>=ymin, xmax>=xmin auto& box = ReInterpretTensor<const BoxCornerEncoding*>(decoded_boxes)[i]; if (box.ymin >= box.ymax || box.xmin >= box.xmax) { return false; } } return...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
154,726,884,412,349,650,000,000,000,000,000,000,000
10
[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...
load_put(UnpicklerObject *self) { PyObject *key, *value; Py_ssize_t idx; Py_ssize_t len; char *s = NULL; if ((len = _Unpickler_Readline(self, &s)) < 0) return -1; if (len < 2) return bad_readline(); if (Py_SIZE(self->stack) <= self->stack->fence) return Pdata_stack_u...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
187,697,193,606,510,430,000,000,000,000,000,000,000
29
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
xsltLREInfoCreate(xsltCompilerCtxtPtr cctxt, xmlNodePtr elem, int isLRE) { xsltStyleItemLRElementInfoPtr item; if ((cctxt == NULL) || (cctxt->inode == NULL)) return(-1); item = (xsltStyleItemLRElementInfoPtr) xmlMalloc(sizeof(xsltStyleItemLRElementInfo)); if (item == NULL) { xsltTransformEr...
0
[]
libxslt
e03553605b45c88f0b4b2980adfbbb8f6fca2fd6
274,443,633,775,641,900,000,000,000,000,000,000,000
39
Fix security framework bypass xsltCheckRead and xsltCheckWrite return -1 in case of error but callers don't check for this condition and allow access. With a specially crafted URL, xsltCheckRead could be tricked into returning an error because of a supposedly invalid URL that would still be loaded succesfully later on...
res1 = cimg::eval("cos(x)^2 + sin(y)^2",2,2), // will return '1'. res2 = cimg::eval(0,1,1); // will return '1' too. \endcode **/
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
89,474,405,585,371,070,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
asmlinkage long sys32_sigreturn(struct pt_regs *regs) { struct sigframe __user *frame = (struct sigframe __user *)(regs->sp-8); sigset_t set; unsigned int ax; if (!access_ok(VERIFY_READ, frame, sizeof(*frame))) goto badframe; if (__get_user(set.sig[0], &frame->sc.oldmask) || (_COMPAT_NSIG_WORDS > 1 && __...
0
[ "CWE-399" ]
linux-2.6
e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
240,150,414,475,018,300,000,000,000,000,000,000,000
29
x86: clear DF before calling signal handler The Linux kernel currently does not clear the direction flag before calling a signal handler, whereas the x86/x86-64 ABI requires that. Linux had this behavior/bug forever, but this becomes a real problem with gcc version 4.3, which assumes that the direction flag is correc...
send_agree_unix_fd (DBusAuth *auth) { _dbus_assert(auth->unix_fd_possible); auth->unix_fd_negotiated = TRUE; _dbus_verbose("Agreed to UNIX FD passing\n"); if (!_dbus_string_append (&auth->outgoing, "AGREE_UNIX_FD\r\n")) return FALSE; goto_state (auth, &server_state_waiting_f...
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
41,244,741,600,673,354,000,000,000,000,000,000,000
14
auth: Reject DBUS_COOKIE_SHA1 for users other than the server owner The DBUS_COOKIE_SHA1 authentication mechanism aims to prove ownership of a shared home directory by having the server write a secret "cookie" into a .dbus-keyrings subdirectory of the desired identity's home directory with 0700 permissions, and having...
int kprobe_int3_handler(struct pt_regs *regs) { kprobe_opcode_t *addr; struct kprobe *p; struct kprobe_ctlblk *kcb; if (user_mode(regs)) return 0; addr = (kprobe_opcode_t *)(regs->ip - sizeof(kprobe_opcode_t)); /* * We don't want to be preempted for the entire * duration of kprobe processing. We condition...
0
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
69,426,317,640,498,660,000,000,000,000,000,000,000
66
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
ldns_bget_keyword_data(ldns_buffer *b, const char *keyword, const char *k_del, char *data, const char *d_del, size_t data_limit) { /* we assume: keyword|sep|data */ char *fkeyword; ssize_t i; if(strlen(keyword) >= LDNS_MAX_KEYWORDLEN) return -1; fkeyword = LDNS_XMALLOC...
0
[]
ldns
c8391790c96d4c8a2c10f9ab1460fda83b509fc2
313,786,729,964,036,500,000,000,000,000,000,000,000
31
Check parse limit before t increment Thanks Stephan Zeisberg
Status RoleGraph::getBSONForRole(RoleGraph* graph, const RoleName& roleName, mutablebson::Element result) try { if (!graph->roleExists(roleName)) { return Status(ErrorCodes::RoleNotFound, mongoutils::str::stream() << rol...
0
[ "CWE-863" ]
mongo
fb87cc88ecb5d300f14cda7bc238d7d5132118f5
170,933,332,931,042,560,000,000,000,000,000,000,000
47
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
static int sl_alloc_bufs(struct slip *sl, int mtu) { int err = -ENOBUFS; unsigned long len; char *rbuff = NULL; char *xbuff = NULL; #ifdef SL_INCLUDE_CSLIP char *cbuff = NULL; struct slcompress *slcomp = NULL; #endif /* * Allocate the SLIP frame buffers: * * rbuff Receive buffer. * xbuff Transmit buffer...
1
[]
linux
4ab42d78e37a294ac7bc56901d563c642e03c4ae
232,841,574,353,644,500,000,000,000,000,000,000,000
74
ppp, slip: Validate VJ compression slot parameters completely Currently slhc_init() treats out-of-range values of rslots and tslots as equivalent to 0, except that if tslots is too large it will dereference a null pointer (CVE-2015-7799). Add a range-check at the top of the function and make it return an ERR_PTR() on...
void Perl_reg_numbered_buff_fetch(pTHX_ REGEXP * const r, const I32 paren, SV * const sv) { struct regexp *const rx = ReANY(r); char *s = NULL; SSize_t i = 0; SSize_t s1, t1; I32 n = paren; PERL_ARGS_ASSERT_REG_NUMBERED_BUFF_FETCH; if ( n == RX_BUFF_IDX_CARET_PREMATCH ...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
323,603,427,169,139,970,000,000,000,000,000,000,000
103
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
static void tulip_idblock_crc(TULIPState *s, uint16_t *srom) { int word, n; int bit; unsigned char bitval, crc; const int len = 9; n = 0; crc = -1; for (word = 0; word < len; word++) { for (bit = 15; bit >= 0; bit--) { if ((word == (len - 1)) && (bit == 7)) { ...
0
[ "CWE-787" ]
qemu
8ffb7265af64ec81748335ec8f20e7ab542c3850
116,261,916,272,417,120,000,000,000,000,000,000,000
29
net: tulip: check frame size and r/w data length Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-...
Item_args(THD *thd, Item *a, Item *b, Item *c, Item *d) { arg_count= 0; if (likely((args= (Item**) thd_alloc(thd, sizeof(Item*) * 4)))) { arg_count= 4; args[0]= a; args[1]= b; args[2]= c; args[3]= d; } }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
46,481,648,496,608,020,000,000,000,000,000,000,000
9
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 ...
int proto_register(struct proto *prot, int alloc_slab) { if (alloc_slab) { prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, SLAB_HWCACHE_ALIGN | prot->slab_flags, NULL); if (prot->slab == NULL) { printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", prot->name); goto out; ...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
226,514,902,155,101,020,000,000,000,000,000,000,000
69
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
static int iwl_trans_pcie_d3_suspend(struct iwl_trans *trans, bool test, bool reset) { int ret; struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); /* * Family IWL_DEVICE_FAMILY_AX210 and above persist mode is set by FW. */ if (!reset && trans->trans_cfg->device_family < IWL_DEVICE_F...
0
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
333,449,422,249,936,000,000,000,000,000,000,000,000
35
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
static void SVGStartElement(void *context,const xmlChar *name, const xmlChar **attributes) { #define PushGraphicContext(id) \ { \ if (*id == '\0') \ (void) FormatLocaleFile(svg_info->file,"push graphic-context\n"); \ else \ (void) FormatLocaleFile(svg_info->file,"push graphic-context \"%s\"\n", \ id...
0
[ "CWE-401" ]
ImageMagick
d3ae9c19125c8704b4866381f7a064ca2cbdc006
339,187,440,551,814,100,000,000,000,000,000,000,000
1,337
https://github.com/ImageMagick/ImageMagick/issues/1533
PHP_FUNCTION(ldap_get_option) { zval *link, *retval; ldap_linkdata *ld; long option; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz", &link, &option, &retval) != SUCCESS) { return; } ZEND_FETCH_RESOURCE(ld, ldap_linkdata *, &link, -1, "ldap link", le_link); switch (option) { /* options with int ...
0
[ "CWE-476" ]
php-src
49782c54994ecca2ef2a061063bd5a7079c43527
301,811,320,276,358,400,000,000,000,000,000,000,000
119
Fix bug #76248 - Malicious LDAP-Server Response causes Crash
static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf) { int pinned; unsigned int npages; unsigned long vaddr = tidbuf->vaddr; struct page **pages = NULL; struct hfi1_devdata *dd = fd->uctxt->dd; /* Get the number of pages the user buffer spans */ npages = num_user_pages(vaddr, tidbuf->...
1
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
102,001,683,919,728,200,000,000,000,000,000,000,000
43
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
xmlCreateIntSubset(xmlDocPtr doc, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID) { xmlDtdPtr cur; if ((doc != NULL) && (xmlGetIntSubset(doc) != NULL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlCreateIntSubset(): document %s alread...
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
266,592,681,752,067,130,000,000,000,000,000,000,000
98
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
int __close_fd_get_file(unsigned int fd, struct file **res) { struct files_struct *files = current->files; struct file *file; struct fdtable *fdt; fdt = files_fdtable(files); if (fd >= fdt->max_fds) goto out_err; file = fdt->fd[fd]; if (!file) goto out_err; rcu_assign_pointer(fdt->fd[fd], NULL); __put_unu...
0
[]
linux
054aa8d439b9185d4f5eb9a90282d1ce74772969
166,736,889,672,292,140,000,000,000,000,000,000,000
21
fget: check that the fd still exists after getting a ref to it Jann Horn points out that there is another possible race wrt Unix domain socket garbage collection, somewhat reminiscent of the one fixed in commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK"). See the extended comment about the garbage colle...
void Downstream::set_addr(const DownstreamAddr *addr) { addr_ = addr; }
0
[]
nghttp2
319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c
303,165,510,491,441,450,000,000,000,000,000,000,000
1
nghttpx: Fix request stall Fix request stall if backend connection is reused and buffer is full.
bson_iter_value (bson_iter_t *iter) /* IN */ { bson_value_t *value; BSON_ASSERT (iter); value = &iter->value; value->value_type = ITER_TYPE (iter); switch (value->value_type) { case BSON_TYPE_DOUBLE: value->value.v_double = bson_iter_double (iter); break; case BSON_TYPE_UTF8: v...
0
[ "CWE-125" ]
libbson
42900956dc461dfe7fb91d93361d10737c1602b3
196,755,313,139,803,700,000,000,000,000,000,000,000
97
CDRIVER-2269 Check for zero string length in codewscope
int ovs_nla_put_tunnel_info(struct sk_buff *skb, struct ip_tunnel_info *tun_info) { return __ip_tun_to_nlattr(skb, &tun_info->key, ip_tunnel_info_opts(tun_info), tun_info->options_len, ip_tunnel_info_af(tun_info), tun_info->mode); }
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
307,938,068,443,115,160,000,000,000,000,000,000,000
8
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
should_skip_file (NautilusDirectory *directory, GFileInfo *info) { static gboolean show_hidden_files_changed_callback_installed = FALSE; static gboolean show_backup_files_changed_callback_installed = FALSE; /* Add the callback once for the life of our process */ if (!show_hidden_files_changed_callback_installed) {...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
253,498,121,633,050,760,000,000,000,000,000,000,000
41
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
htp_status_t htp_tx_state_request_line(htp_tx_t *tx) { if (tx == NULL) return HTP_ERROR; // Determine how to process the request URI. if (tx->request_method_number == HTP_M_CONNECT) { // When CONNECT is used, the request URI contains an authority string. if (htp_parse_uri_hostport(tx->conn...
0
[]
libhtp
c7c03843cd6b1cbf44eb435d160ba53aec948828
54,000,041,618,129,160,000,000,000,000,000,000,000
49
Harden decompress code against memory stress Under severe memory pressure the decompress code can fail to setup properly. Add checks before dereferencing pointers.
display_showcmd(void) { int len; cursor_off(); len = (int)STRLEN(showcmd_buf); if (len == 0) showcmd_is_clear = TRUE; else { screen_puts(showcmd_buf, (int)Rows - 1, sc_col, 0); showcmd_is_clear = FALSE; } /* * clear the rest of an old message by outputting up to SHOWCMD_CO...
0
[ "CWE-416" ]
vim
35a9a00afcb20897d462a766793ff45534810dc3
294,499,671,582,657,370,000,000,000,000,000,000,000
23
patch 8.2.3428: using freed memory when replacing Problem: Using freed memory when replacing. (Dhiraj Mishra) Solution: Get the line pointer after calling ins_copychar().
int security_inode_getattr(struct vfsmount *mnt, struct dentry *dentry) { if (unlikely(IS_PRIVATE(dentry->d_inode))) return 0; return security_ops->inode_getattr(mnt, dentry); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
155,026,187,775,587,550,000,000,000,000,000,000,000
6
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int atusb_read_subreg(struct atusb *lp, unsigned int addr, unsigned int mask, unsigned int shift) { int rc; rc = atusb_read_reg(lp, addr); rc = (rc & mask) >> shift; return rc; }
0
[ "CWE-416" ]
linux
7fd25e6fc035f4b04b75bca6d7e8daa069603a76
318,951,323,166,199,130,000,000,000,000,000,000,000
11
ieee802154: atusb: fix use-after-free at disconnect The disconnect callback was accessing the hardware-descriptor private data after having having freed it. Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver") Cc: stable <stable@vger.kernel.org> # 4.2 Cc: Alexander Aring <alex.aring@gmail.com> Re...
jas_image_t *jas_image_create0() { jas_image_t *image; if (!(image = jas_malloc(sizeof(jas_image_t)))) { return 0; } image->tlx_ = 0; image->tly_ = 0; image->brx_ = 0; image->bry_ = 0; image->clrspc_ = JAS_CLRSPC_UNKNOWN; image->numcmpts_ = 0; image->maxcmpts_ = 0; image->cmpts_ = 0; // image->inmem_ = t...
0
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
180,443,795,149,699,600,000,000,000,000,000,000,000
21
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
void ext4_journal_abort_handle(const char *caller, const char *err_fn, struct buffer_head *bh, handle_t *handle, int err) { char nbuf[16]; const char *errstr = ext4_decode_error(NULL, err, nbuf); BUG_ON(!ext4_handle_valid(handle)); if (bh) BUFFER_TRACE(bh, "abort"); if (!handle->h_err) handle->h_err = err...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
148,157,434,488,259,670,000,000,000,000,000,000,000
22
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...
Perl_reg_named_buff_fetch(pTHX_ REGEXP * const r, SV * const namesv, const U32 flags) { SV *ret; struct regexp *const rx = ReANY(r); PERL_ARGS_ASSERT_REG_NAMED_BUFF_FETCH; if (rx && RXp_PAREN_NAMES(rx)) { HE *he_str = hv_fetch_ent( RXp_PAREN_NAMES(rx), namesv, 0, 0 ); if (he_str) ...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
35,212,099,507,801,450,000,000,000,000,000,000,000
37
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
cmsToneCurve* ReadEmbeddedCurve(struct _cms_typehandler_struct* self, cmsIOHANDLER* io) { cmsTagTypeSignature BaseType; cmsUInt32Number nItems; BaseType = _cmsReadTypeBase(io); switch (BaseType) { case cmsSigCurveType: return (cmsToneCurve*) Type_Curve_Read(self, io, &nIte...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
12,686,521,589,502,423,000,000,000,000,000,000,000
24
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
static void read_dce_straps( struct dc_context *ctx, struct resource_straps *straps) { REG_GET_2(CC_DC_HDMI_STRAPS, HDMI_DISABLE, &straps->hdmi_disable, AUDIO_STREAM_NUMBER, &straps->audio_stream_number); REG_GET(DC_PINSTRAPS, DC_PINSTRAPS_AUDIO, &straps->dc_pinstraps_audio); }
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
114,240,256,915,784,400,000,000,000,000,000,000,000
10
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
int ext4_wait_block_bitmap(struct super_block *sb, ext4_group_t block_group, struct buffer_head *bh) { struct ext4_group_desc *desc; if (!buffer_new(bh)) return 0; desc = ext4_get_group_desc(sb, block_group, NULL); if (!desc) return -EFSCORRUPTED; wait_on_buffer(bh); if (!buffer_uptodate(bh)) { ext4_...
0
[]
linux
7dac4a1726a9c64a517d595c40e95e2d0d135f6f
175,834,774,097,528,400,000,000,000,000,000,000,000
21
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...
static inline unsigned nested_cpu_vmx_misc_cr3_count(struct kvm_vcpu *vcpu) { return vmx_misc_cr3_count(to_vmx(vcpu)->nested.msrs.misc_low); }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
294,054,786,722,828,760,000,000,000,000,000,000,000
4
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
cib_remote_free(cib_t * cib) { int rc = pcmk_ok; crm_warn("Freeing CIB"); if (cib->state != cib_disconnected) { rc = cib_remote_signoff(cib); if (rc == pcmk_ok) { cib_remote_opaque_t *private = cib->variant_opaque; free(private->server); free(private->us...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
287,527,034,279,235,700,000,000,000,000,000,000,000
21
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
virDomainDiskDefPostParse(virDomainDiskDefPtr disk, const virDomainDef *def, virDomainXMLOptionPtr xmlopt) { /* internal snapshots and config files are currently supported * only with rbd: */ if (virStorageSourceGetActualType(disk->src) != VIR_STORAGE_TYP...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
75,721,943,555,755,730,000,000,000,000,000,000,000
48
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
GF_Err gf_odf_delete_command(GF_ODCom *com) { switch (com->tag) { case GF_ODF_OD_UPDATE_TAG: return gf_odf_del_od_update((GF_ODUpdate *)com); case GF_ODF_OD_REMOVE_TAG: return gf_odf_del_od_remove((GF_ODRemove *)com); case GF_ODF_ESD_UPDATE_TAG: return gf_odf_del_esd_update((GF_ESDUpdate *)com); case GF_ODF...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
256,766,581,020,560,270,000,000,000,000,000,000,000
28
fixed #2216
TEST(MessageCompressorManager, MessageSizeTooSmall) { auto registry = buildRegistry(); MessageCompressorManager compManager(&registry); auto badMessageBuffer = SharedBuffer::allocate(128); MsgData::View badMessage(badMessageBuffer.get()); badMessage.setId(1); badMessage.setResponseToMsgId(0); ...
0
[ "CWE-697" ]
mongo
1411cf602a21e45a5ef42b6869c480eb420976ee
215,802,945,041,399,800,000,000,000,000,000,000,000
19
SERVER-43751 Recompute compressor manager message parameters
int i40e_free_virt_mem_d(struct i40e_hw *hw, struct i40e_virt_mem *mem) { /* it's ok to kfree a NULL pointer */ kfree(mem->va); mem->va = NULL; mem->size = 0; return 0; }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
2,117,515,854,631,201,800,000,000,000,000,000,000
9
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
bool st_select_lex::test_limit() { if (select_limit != 0) { my_error(ER_NOT_SUPPORTED_YET, MYF(0), "LIMIT & IN/ALL/ANY/SOME subquery"); return(1); } return(0); }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
275,532,722,449,001,560,000,000,000,000,000,000,000
10
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
may_prefix_autoload(char_u *name) { if (SCRIPT_ID_VALID(current_sctx.sc_sid)) { scriptitem_T *si = SCRIPT_ITEM(current_sctx.sc_sid); if (si->sn_autoload_prefix != NULL) { char_u *basename = name; size_t len; char_u *res; if (*name == K_SPECIAL) { char_u *p = vim_strchr(name, '...
0
[ "CWE-122" ]
vim
2bdad6126778f907c0b98002bfebf0e611a3f5db
299,740,063,066,893,060,000,000,000,000,000,000,000
33
patch 8.2.4647: "source" can read past end of copied line Problem: "source" can read past end of copied line. Solution: Add a terminating NUL.
static void lru_maintainer_crawler_check(struct crawler_expired_data *cdata) { int i; static rel_time_t next_crawls[MAX_NUMBER_OF_SLAB_CLASSES]; static rel_time_t next_crawl_wait[MAX_NUMBER_OF_SLAB_CLASSES]; uint8_t todo[MAX_NUMBER_OF_SLAB_CLASSES]; memset(todo, 0, sizeof(uint8_t) * MAX_NUMBER_OF_SL...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
108,387,065,814,781,470,000,000,000,000,000,000,000
68
CVE reported by cisco talos
Http::ForwardClientCertType forwardClientCert() const override { return Http::ForwardClientCertType::Sanitize; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
233,294,546,197,080,570,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 void test_bug56976() { MYSQL_STMT *stmt; MYSQL_BIND bind[1]; int rc; const char* query = "SELECT LENGTH(?)"; char *long_buffer; unsigned long i, packet_len = 256 * 1024L; unsigned long dos_len = 8 * 1024 * 1024L; DBUG_ENTER("test_bug56976"); myheader("test_bug56976"); st...
0
[ "CWE-416" ]
mysql-server
4797ea0b772d5f4c5889bc552424132806f46e93
154,154,400,544,338,970,000,000,000,000,000,000,000
45
BUG#17512527: LIST HANDLING INCORRECT IN MYSQL_PRUNE_STMT_LIST() Analysis: --------- Invalid memory access maybe observed when using prepared statements if: a) The mysql client connection is lost after statement preparation is complete and b) There is at least one statement which is in initialized state but not ...
static inline pte_t pte_mkold(pte_t pte) { return pte_clear_flags(pte, _PAGE_ACCESSED); }
0
[ "CWE-119", "CWE-787" ]
linux
027ef6c87853b0a9df53175063028edb4950d476
233,191,907,556,979,850,000,000,000,000,000,000,000
4
mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP In many places !pmd_present has been converted to pmd_none. For pmds that's equivalent and pmd_none is quicker so using pmd_none is better. However (unless we delete pmd_present) we should provide an accurate pmd_present too. This will avoid the ri...
char *lxc_string_replace(const char *needle, const char *replacement, const char *haystack) { ssize_t len = -1, saved_len = -1; char *result = NULL; size_t replacement_len = strlen(replacement); size_t needle_len = strlen(needle); /* should be executed exactly twice */ while (len == -1 || result == NULL) { cha...
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
59,335,194,262,083,740,000,000,000,000,000,000,000
54
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
static int pf_detect(void) { struct pf_unit *pf = units; int k, unit; printk("%s: %s version %s, major %d, cluster %d, nice %d\n", name, name, PF_VERSION, major, cluster, nice); par_drv = pi_register_driver(name); if (!par_drv) { pr_err("failed to register %s driver\n", name); return -1; } k = 0; ...
1
[ "CWE-476", "CWE-125" ]
linux
58ccd2d31e502c37e108b285bf3d343eb00c235b
24,477,384,682,871,660,000,000,000,000,000,000,000
52
paride/pf: Fix potential NULL pointer dereference Syzkaller report this: pf: pf version 1.04, major 47, cluster 64, nice 0 pf: No ATAPI disk detected kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NULL-ptr deref or user memory access general protection fault: 0000 [#1] SMP KASAN PTI CPU: 0 PID: 9887...
static int pxa3xx_gcu_open(struct inode *inode, struct file *file) { return 0; }
0
[ "CWE-190", "CWE-703" ]
linux
a09d2d00af53b43c6f11e6ab3cb58443c2cac8a7
156,132,745,627,799,280,000,000,000,000,000,000,000
4
video: fbdev: pxa3xx-gcu: Fix integer overflow in pxa3xx_gcu_write In pxa3xx_gcu_write, a count parameter of type size_t is passed to words of type int. Then, copy_from_user() may cause a heap overflow because it is used as the third argument of copy_from_user(). Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com> Signed...
static bool Equals(const std::vector<double> &one, const std::vector<double> &other) { if (one.size() != other.size()) return false; for (int i = 0; i < int(one.size()); ++i) { if (!TINYGLTF_DOUBLE_EQUAL(one[size_t(i)], other[size_t(i)])) return false; } return true; }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
188,535,042,234,339,140,000,000,000,000,000,000,000
8
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
scanner_pop_binding_list (scanner_context_t *scanner_context_p) /**< scanner context */ { scanner_binding_list_t *binding_list_p = scanner_context_p->active_binding_list_p; JERRY_ASSERT (binding_list_p != NULL); scanner_binding_item_t *item_p = binding_list_p->items_p; scanner_binding_list_t *prev_binding_list...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
294,047,805,967,138,560,000,000,000,000,000,000,000
38
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
MagickExport size_t GetQuantumExtent(const Image *image, const QuantumInfo *quantum_info,const QuantumType quantum_type) { size_t extent, packet_size; assert(quantum_info != (QuantumInfo *) NULL); assert(quantum_info->signature == MagickCoreSignature); packet_size=1; switch (quantum_type) { c...
0
[ "CWE-125" ]
ImageMagick
430403b0029b37decf216d57f810899cab2317dd
57,242,389,715,798,330,000,000,000,000,000,000,000
31
https://github.com/ImageMagick/ImageMagick/issues/126
RGWOp* RGWHandler_REST_Service_S3Website::get_obj_op(bool get_data) { /** If we are in website mode, then it is explicitly impossible to run GET or * HEAD on the actual directory. We must convert the request to run on the * suffix object instead! */ RGWGetObj_ObjStore_S3Website* op = new RGWGetObj_ObjStore...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
198,827,055,528,152,230,000,000,000,000,000,000,000
10
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
static inline void __pipe_lock(struct pipe_inode_info *pipe) { mutex_lock_nested(&pipe->mutex, I_MUTEX_PARENT); }
0
[ "CWE-17" ]
linux
f0d1bec9d58d4c038d0ac958c9af82be6eb18045
306,369,544,561,748,520,000,000,000,000,000,000,000
4
new helper: copy_page_from_iter() parallel to copy_page_to_iter(). pipe_write() switched to it (and became ->write_iter()). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
spell_read_aff(spellinfo_T *spin, char_u *fname) { FILE *fd; afffile_T *aff; char_u rline[MAXLINELEN]; char_u *line; char_u *pc = NULL; #define MAXITEMCNT 30 char_u *(items[MAXITEMCNT]); int itemcnt; char_u *p; int lnum = 0; affheader_T *cur_aff = NULL; int did_postpone_p...
0
[ "CWE-787" ]
vim
7c824682d2028432ee082703ef0ab399867a089b
278,598,451,212,993,380,000,000,000,000,000,000,000
922
patch 8.2.4919: can add invalid bytes with :spellgood Problem: Can add invalid bytes with :spellgood. Solution: Check for a valid word string.
has_column_privilege_id_name_name(PG_FUNCTION_ARGS) { Oid roleid = PG_GETARG_OID(0); text *tablename = PG_GETARG_TEXT_P(1); text *column = PG_GETARG_TEXT_P(2); text *priv_type_text = PG_GETARG_TEXT_P(3); Oid tableoid; AttrNumber colattnum; AclMode mode; int privresult; tableoid = convert_table...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
81,481,417,430,108,840,000,000,000,000,000,000,000
20
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
R_API RList *r_buf_nonempty_list(RBuffer *b) { return b->methods->nonempty_list? b->methods->nonempty_list (b): NULL; }
0
[ "CWE-400", "CWE-703" ]
radare2
634b886e84a5c568d243e744becc6b3223e089cf
48,221,939,246,517,920,000,000,000,000,000,000,000
3
Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash * Reported by lazymio * Reproducer: AAA4AAAAAB4=
static int handle_NPP_Print(rpc_connection_t *connection) { D(bug("handle_NPP_Print\n")); PluginInstance *plugin; NPPrint printInfo; uint32_t platform_print_id; int error = rpc_method_get_args(connection, RPC_TYPE_NPW_PLUGIN_INSTANCE, &plugin, RPC_TYPE_UINT32, &platform_print_id, ...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
244,477,791,854,920,400,000,000,000,000,000,000,000
78
Support all the new variables added
SSL_CIPHER *ssl3_get_cipher(unsigned int u) { if (u < SSL3_NUM_CIPHERS) return(&(ssl3_ciphers[SSL3_NUM_CIPHERS-1-u])); else return(NULL); }
0
[]
openssl
8671b898609777c95aedf33743419a523874e6e8
75,853,330,383,608,070,000,000,000,000,000,000,000
7
Memory saving patch.
static void svm_set_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg) { struct vcpu_svm *svm = to_svm(vcpu); struct vmcb_seg *s = svm_seg(vcpu, seg); s->base = var->base; s->limit = var->limit; s->selector = var->selector; if (var->unusable) s->attrib = 0; else { s->attrib = (var->type...
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
96,058,137,238,601,950,000,000,000,000,000,000,000
33
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
static int lang_run_file(RCore *core, RLang *lang, const char *file) { r_core_sysenv_begin (core, NULL); return r_lang_run_file (core->lang, file); }
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
289,083,185,711,954,130,000,000,000,000,000,000,000
4
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
static struct mount *clone_mnt(struct mount *old, struct dentry *root, int flag) { struct super_block *sb = old->mnt.mnt_sb; struct mount *mnt; int err; mnt = alloc_vfsmnt(old->mnt_devname); if (!mnt) return ERR_PTR(-ENOMEM); if (flag & (CL_SLAVE | CL_PRIVATE | CL_SHARED_TO_SLAVE)) mnt->mnt_group_id = ...
0
[ "CWE-269" ]
user-namespace
9566d6742852c527bf5af38af5cbb878dad75705
236,872,032,172,955,300,000,000,000,000,000,000,000
82
mnt: Correct permission checks in do_remount While invesgiating the issue where in "mount --bind -oremount,ro ..." would result in later "mount --bind -oremount,rw" succeeding even if the mount started off locked I realized that there are several additional mount flags that should be locked and are not. In particular...
static struct uvc_format_desc *uvc_format_by_guid(const __u8 guid[16]) { unsigned int len = ARRAY_SIZE(uvc_fmts); unsigned int i; for (i = 0; i < len; ++i) { if (memcmp(guid, uvc_fmts[i].guid, 16) == 0) return &uvc_fmts[i]; } return NULL; }
0
[ "CWE-120" ]
linux-2.6
233548a2fd934a0220db8b1521c0bc88c82e5e53
94,089,433,778,230,930,000,000,000,000,000,000,000
12
V4L/DVB (8207): uvcvideo: Fix a buffer overflow in format descriptor parsing Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
static int __net_init sock_inuse_init_net(struct net *net) { net->core.inuse = alloc_percpu(struct prot_inuse); return net->core.inuse ? 0 : -ENOMEM; }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
244,168,576,680,858,000,000,000,000,000,000,000,000
5
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
apply_colormap (guchar *dest, const guchar *src, guint width, const guchar *cmap, gboolean alpha, guint16 index) { guint x; if (alpha) { for (x = 0; x < width; x++) { *(dest++) = cma...
0
[ "CWE-125" ]
GIMP
674b62ad45b6579ec6d7923dc3cb1ef4e8b5498b
198,254,961,185,680,970,000,000,000,000,000,000,000
33
Bug 739134 - (CVE-2017-17786) Out of bounds read / heap overflow in... ... TGA importer. Be more thorough on valid TGA RGB and RGBA images. In particular current TGA plug-in can import RGBA as 32 bits (8 bits per channel) and 16 bits (5 bits per color channel and 1 bit for alpha), and RGB as 15 and 24 bits. Maybe the...
static void binder_vma_open(struct vm_area_struct *vma) { struct binder_proc *proc = vma->vm_private_data; binder_debug(BINDER_DEBUG_OPEN_CLOSE, "%d open vm area %lx-%lx (%ld K) vma %lx pagep %lx\n", proc->pid, vma->vm_start, vma->vm_end, (vma->vm_end - vma->vm_start) / SZ_1K, vma->vm_flags, ...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
314,152,498,563,245,800,000,000,000,000,000,000,000
10
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
static int io_arm_poll_handler(struct io_kiocb *req, unsigned issue_flags) { const struct io_op_def *def = &io_op_defs[req->opcode]; struct io_ring_ctx *ctx = req->ctx; struct async_poll *apoll; struct io_poll_table ipt; __poll_t mask = EPOLLONESHOT | POLLERR | POLLPRI; int ret; if (!def->pollin && !def->pollo...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
226,690,854,425,533,050,000,000,000,000,000,000,000
51
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
void SparseSlice<T>::Initialize( const typename SparseSlice<T>::ConstMatrixMap& mat, int col_offset) { const int mat_rows = Transpose ? mat.dimension(1) : mat.dimension(0); const int mat_cols = Transpose ? mat.dimension(0) : mat.dimension(1); DCHECK_LE(num_rows, mat_rows); DCHECK_LE(num_cols + col_offset, m...
0
[ "CWE-125" ]
tensorflow
e6cf28c72ba2eb949ca950d834dd6d66bb01cfae
310,103,051,188,565,900,000,000,000,000,000,000,000
85
Validate that matrix dimension sizes in SparseMatMul are positive. PiperOrigin-RevId: 401149683 Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d
int ssl_parse_clienthello_tlsext(SSL *s, unsigned char **p, unsigned char *limit, int *al) { unsigned short type; unsigned short size; unsigned short len; unsigned char *data = *p; int renegotiate_seen = 0; int sigalg_seen = 0; s->servername_done = 0; s-...
1
[ "CWE-399", "CWE-401" ]
openssl
2c0d295e26306e15a92eb23a84a1802005c1c137
67,819,194,235,838,110,000,000,000,000,000,000,000
437
Fix OCSP Status Request extension unbounded memory growth A malicious client can send an excessively large OCSP Status Request extension. If that client continually requests renegotiation, sending a large OCSP Status Request extension each time, then there will be unbounded memory growth on the server. This will event...
static char *make_output_option(struct output_struct *words, short *levels, uchar where) { char *str = words == info_words ? "--info=" : "--debug="; int j, counts[MAX_OUT_LEVEL+1], pos, skipped = 0, len = 0, max = 0, lev = 0; int word_count = words == info_words ? COUNT_INFO : COUNT_DEBUG; char *buf; memset(count...
0
[]
rsync
eac858085e3ac94ec0ab5061d11f52652c90a869
72,373,524,058,110,620,000,000,000,000,000,000,000
83
Add compat flag to allow proper seed checksum order. Fixes the equivalent of librsync's CVE-2014-8242 issue.
void btrfs_rm_dev_replace_remove_srcdev(struct btrfs_device *srcdev) { struct btrfs_fs_devices *fs_devices; lockdep_assert_held(&srcdev->fs_info->fs_devices->device_list_mutex); /* * in case of fs with no seed, srcdev->fs_devices will point * to fs_devices of fs_info. However when the dev being replaced is *...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
287,691,250,254,926,030,000,000,000,000,000,000,000
26
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
xps_finish_image_path(gx_device_vector *vdev) { gx_device_xps *xps = (gx_device_xps *)vdev; char line[300]; const char *fmt; gs_matrix matrix; /* If an error occurs during an image, we can get here after the enumerator * has been freed - if that's the case, just bail out immediately */ ...
0
[]
ghostpdl
94d8955cb7725eb5f3557ddc02310c76124fdd1a
106,732,982,458,717,800,000,000,000,000,000,000,000
35
Bug 701818: better handling of error during PS/PDF image In the xps device, if an error occurred after xps_begin_image() but before xps_image_end_image(), *if* the Postscript had called 'restore' as part of the error handling, the image enumerator would have been freed (by the restore) despite the xps device still hol...
static void update_write_refresh_rect(wStream* s, BYTE count, const RECTANGLE_16* areas) { int i; Stream_Write_UINT8(s, count); /* numberOfAreas (1 byte) */ Stream_Seek(s, 3); /* pad3Octets (3 bytes) */ for (i = 0; i < count; i++) { Stream_Write_UINT16(s, areas[i].left); /* left (2 bytes) */ Stre...
0
[ "CWE-125" ]
FreeRDP
f8890a645c221823ac133dbf991f8a65ae50d637
21,166,193,569,470,071,000,000,000,000,000,000,000
14
Fixed #6005: Bounds checks in update_read_bitmap_data
Ptr<FileStorageEmitter> createXMLEmitter(FileStorage_API* fs) { return makePtr<XMLEmitter>(fs); }
0
[ "CWE-787" ]
opencv
f42d5399aac80d371b17d689851406669c9b9111
163,064,821,390,916,200,000,000,000,000,000,000,000
4
core(persistence): add more checks for implementation limitations
const char* writing_app() const { return writing_app_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
171,039,804,410,124,560,000,000,000,000,000,000,000
1
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
void Drainer::onData(Buffer::Instance& data, bool) { if (data.length() > 0) { // There is no downstream connection to send any data to, but the upstream // sent some data. Try to behave similar to what the kernel would do // when it receives data on a connection where the application has closed // the...
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
76,079,197,219,969,440,000,000,000,000,000,000,000
9
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
int bn_mul_mont(BN_ULONG *rp, const BN_ULONG *ap, const BN_ULONG *bp, const BN_ULONG *np,const BN_ULONG *n0p, int num) { BN_ULONG c0,c1,ml,*tp,n0; #ifdef mul64 BN_ULONG mh; #endif volatile BN_ULONG *vp; int i=0,j; #if 0 /* template for platform-specific implementation */ if (ap==bp) return bn_sqr_mont(rp,ap,np,n...
0
[ "CWE-310" ]
openssl
a7a44ba55cb4f884c6bc9ceac90072dea38e66d0
33,055,952,717,757,355,000,000,000,000,000,000,000
88
Fix for CVE-2014-3570 (with minor bn_asm.c revamp). Reviewed-by: Emilia Kasper <emilia@openssl.org>
static void module_enable_ro(const struct module *mod, bool after_init) {}
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
336,478,244,355,197,350,000,000,000,000,000,000,000
1
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...
_outNestLoopParam(StringInfo str, const NestLoopParam *node) { WRITE_NODE_TYPE("NESTLOOPPARAM"); WRITE_INT_FIELD(paramno); WRITE_NODE_FIELD(paramval); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
178,655,874,100,546,780,000,000,000,000,000,000,000
7
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
size_t decompression_memory_bound() { if (ofiletype == UJG || filetype == UJG) { return 0; } size_t cumulative_buffer_size = 0; size_t streaming_buffer_size = 0; size_t current_run_size = 0; for (int i = 0; i < colldata.get_num_components(); ++i) { size_t streaming_size = ...
0
[ "CWE-399", "CWE-190" ]
lepton
6a5ceefac1162783fffd9506a3de39c85c725761
252,804,541,223,883,200,000,000,000,000,000,000,000
92
fix #111
void cil_destroy_policycap(struct cil_policycap *polcap) { if (polcap == NULL) { return; } cil_symtab_datum_destroy(&polcap->datum); free(polcap); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
233,116,909,806,747,630,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 ...
static void nci_target_auto_activated(struct nci_dev *ndev, struct nci_rf_intf_activated_ntf *ntf) { struct nfc_target *target; int rc; target = &ndev->targets[ndev->n_targets]; rc = nci_add_new_protocol(ndev, target, ntf->rf_protocol, ntf->activation_rf_tech_and_mode, &ntf->rf_tech_specific...
0
[ "CWE-119", "CWE-787" ]
linux
67de956ff5dc1d4f321e16cfbd63f5be3b691b43
158,374,803,234,567,110,000,000,000,000,000,000,000
22
NFC: Prevent multiple buffer overflows in NCI Fix multiple remotely-exploitable stack-based buffer overflows due to the NCI code pulling length fields directly from incoming frames and copying too much data into statically-sized arrays. Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Cc: stable@kernel.org Cc...
static void floppy_rb0_cb(struct bio *bio) { struct rb0_cbdata *cbdata = (struct rb0_cbdata *)bio->bi_private; int drive = cbdata->drive; if (bio->bi_status) { pr_info("floppy: error %d while reading block 0\n", bio->bi_status); set_bit(FD_OPEN_SHOULD_FAIL_BIT, &drive_state[drive].flags); } complete(&cbdat...
0
[ "CWE-416" ]
linux
233087ca063686964a53c829d547c7571e3f67bf
126,173,234,673,861,360,000,000,000,000,000,000,000
12
floppy: disable FDRAWCMD by default Minh Yuan reported a concurrency use-after-free issue in the floppy code between raw_cmd_ioctl and seek_interrupt. [ It turns out this has been around, and that others have reported the KASAN splats over the years, but Minh Yuan had a reproducer for it and so gets primary credi...
static void acm_read_bulk_callback(struct urb *urb) { struct acm_rb *rb = urb->context; struct acm *acm = rb->instance; unsigned long flags; int status = urb->status; dev_vdbg(&acm->data->dev, "%s - urb %d, len %d\n", __func__, rb->index, urb->actual_length); if (!acm->dev) { set_bit(rb->index, &acm->rea...
0
[ "CWE-703" ]
linux
8835ba4a39cf53f705417b3b3a94eb067673f2c9
33,980,916,340,029,845,000,000,000,000,000,000,000
44
USB: cdc-acm: more sanity checking An attack has become available which pretends to be a quirky device circumventing normal sanity checks and crashes the kernel by an insufficient number of interfaces. This patch adds a check to the code path for quirky devices. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: sta...
static int synchronize_sched_expedited_cpu_stop(void *data) { /* * There must be a full memory barrier on each affected CPU * between the time that try_stop_cpus() is called and the * time that it returns. * * In the current initial implementation of cpu_stop, the * above condition is already met when the ...
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
160,234,113,442,912,230,000,000,000,000,000,000,000
16
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
ZEND_API zval * zend_throw_exception(zend_class_entry *exception_ce, char *message, long code TSRMLS_DC) /* {{{ */ { zval *ex; MAKE_STD_ZVAL(ex); if (exception_ce) { if (!instanceof_function(exception_ce, default_exception_ce TSRMLS_CC)) { zend_error(E_NOTICE, "Exceptions must be derived from the Exception bas...
0
[]
php-src
a894a8155fab068d68a04bf181dbaddfa01ccbb0
61,832,353,851,167,110,000,000,000,000,000,000,000
26
More fixes for bug #69152
ExecFreeExprContext(PlanState *planstate) { /* * Per above discussion, don't actually delete the ExprContext. We do * unlink it from the plan node, though. */ planstate->ps_ExprContext = NULL; }
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
13,199,032,640,911,683,000,000,000,000,000,000,000
8
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
njs_typed_array_from(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs, njs_index_t unused) { double num; int64_t length, i; njs_int_t ret; njs_value_t *this, *source, *mapfn; njs_value_t arguments[3], retval; njs_function_t *function; nj...
0
[ "CWE-703" ]
njs
5c6130a2a0b4c41ab415f6b8992aa323636338b9
188,664,629,832,466,900,000,000,000,000,000,000,000
79
Fixed Array.prototype.fill() for typed-arrays. This closes #478 issue on Github.
static int ZEND_FASTCALL ZEND_ADD_ARRAY_ELEMENT_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *array_ptr = &EX_T(opline->result.u.var).tmp_var; zval *expr_ptr; zval *offset=_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC); #if 0 || IS_VAR == I...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
3,663,092,525,078,243,300,000,000,000,000,000,000
78
- 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
juniper_parse_header(netdissect_options *ndo, const u_char *p, const struct pcap_pkthdr *h, struct juniper_l2info_t *l2info) { const struct juniper_cookie_table_t *lp = juniper_cookie_table; u_int idx, jnx_ext_len, jnx_header_len = 0; uint8_t tlv_type,tlv_len; uint32_t control_word;...
0
[ "CWE-125" ]
tcpdump
42073d54c53a496be40ae84152bbfe2c923ac7bc
124,722,570,916,073,970,000,000,000,000,000,000,000
322
CVE-2017-13004/Juniper: Add a bounds check. This fixes a buffer over-read discovered by Forcepoint's security researchers Otto Airamo & Antti Levomäki. Add tests using the capture files supplied by the reporter(s).
qf_push_dir(char_u *dirbuf, struct dir_stack_T **stackptr, int is_file_stack) { struct dir_stack_T *ds_new; struct dir_stack_T *ds_ptr; // allocate new stack element and hook it in ds_new = ALLOC_ONE_ID(struct dir_stack_T, aid_qf_dirstack); if (ds_new == NULL) return NULL; ds_new->next = *s...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
88,698,906,390,216,850,000,000,000,000,000,000,000
63
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
void io_uring_cmd_done(struct io_uring_cmd *ioucmd, ssize_t ret, ssize_t res2) { struct io_kiocb *req = container_of(ioucmd, struct io_kiocb, uring_cmd); if (ret < 0) req_set_fail(req); if (req->ctx->flags & IORING_SETUP_CQE32) __io_req_complete32(req, 0, ret, 0, res2, 0); else io_req_complete(req, ret); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
197,360,743,752,634,130,000,000,000,000,000,000,000
11
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
TEST_P(Http2CodecImplTestAll, TestCodecHeaderCompression) { initialize(); TestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, true)); request_encoder_->encodeHeaders(request_headers, true); TestHeaderMapImpl response_heade...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
294,129,296,645,985,080,000,000,000,000,000,000,000
27
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
void AOClient::pktSelectChar(AreaData* area, int argc, QStringList argv, AOPacket packet) { bool argument_ok; int selected_char_id = argv[1].toInt(&argument_ok); if (!argument_ok) { selected_char_id = -1; return; } if (changeCharacter(selected_char_id)) char_id = selected_ch...
0
[ "CWE-703", "CWE-129" ]
akashi
5566cdfedddef1f219aee33477d9c9690bf2f78b
146,264,602,616,582,280,000,000,000,000,000,000,000
12
Fix out of bounds crash on evidence
static int do_move_mount(struct nameidata *nd, char *old_name) { struct nameidata old_nd, parent_nd; struct vfsmount *p; int err = 0; if (!capable(CAP_SYS_ADMIN)) return -EPERM; if (!old_name || !*old_name) return -EINVAL; err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd); if (err) return err; down_wri...
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
160,554,477,402,575,080,000,000,000,000,000,000,000
71
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...