func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static inline void avg_tpel_pixels_mc00_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){ switch(width){ case 2: avg_pixels2_8_c (dst, src, stride, height); break; case 4: avg_pixels4_8_c (dst, src, stride, height); break; case 8: avg_pixels8_8_c (dst, src, stride, height); break; ...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
9,780,546,329,839,024,000,000,000,000,000,000,000
8
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
HTTPSession::dropConnection() { VLOG(4) << "dropping " << *this; if (!sock_ || (readsShutdown() && writesShutdown())) { VLOG(4) << *this << " already shutdown"; return; } setCloseReason(ConnectionCloseReason::SHUTDOWN); if (transactions_.empty() && !hasMoreWrites()) { DestructorGuard dg(this); ...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
62,589,018,872,368,340,000,000,000,000,000,000,000
21
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
void InstanceKlass::rewrite_class(TRAPS) { assert(is_loaded(), "must be loaded"); if (is_rewritten()) { assert(is_shared(), "rewriting an unshared class?"); return; } Rewriter::rewrite(this, CHECK); set_rewritten(); }
0
[]
jdk17u
f8eb9abe034f7c6bea4da05a9ea42017b3f80730
274,161,493,684,028,340,000,000,000,000,000,000,000
9
8270386: Better verification of scan methods Reviewed-by: coleenp Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4
static Indirect *ext4_get_branch(struct inode *inode, int depth, ext4_lblk_t *offsets, Indirect chain[4], int *err) { struct super_block *sb = inode->i_sb; Indirect *p = chain; struct buffer_head *bh; *err = 0; /* i_data is not going away, no lock needed */ add_chain(chain, NULL, EXT4_I(inode)->i_data...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
255,845,537,236,983,700,000,000,000,000,000,000,000
42
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...
static double mp_list_set_ioff(_cimg_math_parser& mp) { if (!mp.imglist.width()) return cimg::type<double>::nan(); const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); CImg<T> &img = mp.imglist[ind]; const longT off = (longT)_mp_arg(3), ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
153,484,425,487,868,120,000,000,000,000,000,000,000
11
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static const URI_CHAR * URI_FUNC(ParseOwnHost2)( URI_TYPE(ParserState) * state, const URI_CHAR * first, const URI_CHAR * afterLast, UriMemoryManager * memory) { if (first >= afterLast) { if (!URI_FUNC(OnExitOwnHost2)(state, first, memory)) { URI_FUNC(StopMalloc)(state, memory); return NULL; } return af...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
174,994,991,280,279,970,000,000,000,000,000,000,000
47
Fix uriParse*Ex* out-of-bounds read
static my_bool dump_all_views_in_db(char *database) { char *table; uint numrows; char table_buff[NAME_LEN*2+3]; char hash_key[2*NAME_LEN+2]; /* "db.tablename" */ char *afterdot; afterdot= strmov(hash_key, database); *afterdot++= '.'; if (init_dumping(database, init_dumping_views)) return 1; if ...
0
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
164,065,845,802,165,460,000,000,000,000,000,000,000
57
WL#9072: Backport WL#8785 to 5.5
bool LEX::sp_goto_statement(THD *thd, const LEX_CSTRING *label_name) { sp_label *lab= spcont->find_goto_label(label_name); if (!lab || lab->ip == 0) { sp_label *delayedlabel; if (!lab) { // Label not found --> add forward jump to an unknown label spcont->push_goto_label(thd, label_name, 0,...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
314,767,651,455,274,120,000,000,000,000,000,000,000
26
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int __init init_route4(void) { return register_tcf_proto_ops(&cls_route4_ops); }
0
[ "CWE-416", "CWE-200" ]
linux
ef299cc3fa1a9e1288665a9fdc8bff55629fd359
109,928,776,665,449,200,000,000,000,000,000,000,000
4
net_sched: cls_route: remove the right filter from hashtable route4_change() allocates a new filter and copies values from the old one. After the new filter is inserted into the hash table, the old filter should be removed and freed, as the final step of the update. However, the current code mistakenly removes the ne...
void _luac_build_info(LuaProto *proto, LuacBinInfo *info) { /* process proto header info */ char *section_name; char *symbol_name; char *proto_name; char **upvalue_names = NULL; RzListIter *iter; int i = 0; // iter ut64 current_offset; ut64 current_size; // 0. check if stripped (proto name is lost) if (pro...
1
[ "CWE-200", "CWE-787" ]
rizin
07b43bc8aa1ffebd9b68d60624c9610cf7e460c7
165,230,076,474,115,010,000,000,000,000,000,000,000
137
fix oob read on luac
static inline struct usb_request *hidg_alloc_ep_req(struct usb_ep *ep, unsigned length) { return alloc_ep_req(ep, length); }
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
072684e8c58d17e853f8e8b9f6d9ce2e58d2b036
322,524,861,023,724,970,000,000,000,000,000,000,000
5
USB: gadget: f_hid: fix deadlock in f_hidg_write() In f_hidg_write() the write_spinlock is acquired before calling usb_ep_queue() which causes a deadlock when dummy_hcd is being used. This is because dummy_queue() callbacks into f_hidg_req_complete() which tries to acquire the same spinlock. This is (part of) the back...
Key_part_spec(const char *name, const size_t name_len, uint len) : length(len) { field_name.str= (char *)name; field_name.length= name_len; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
147,847,262,606,816,340,000,000,000,000,000,000,000
3
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
static int dump_tablespaces_for_databases(char** databases) { DYNAMIC_STRING where; int r; int i; init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN (" "SELECT DISTINCT TABLESPACE_NAME FROM" " INFORMATION_SCHEMA.PARTITIONS" " WHERE" ...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
252,420,895,670,905,700,000,000,000,000,000,000,000
29
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
hfs_ext_compare_keys(HFS_INFO * hfs, uint32_t cnid, const hfs_btree_key_ext * key) { TSK_FS_INFO *fs = (TSK_FS_INFO *) & (hfs->fs_info); uint32_t key_cnid; key_cnid = tsk_getu32(fs->endian, key->file_id); if (key_cnid < cnid) return -1; if (key_cnid > cnid) return 1; /* ref...
0
[ "CWE-190", "CWE-284" ]
sleuthkit
114cd3d0aac8bd1aeaf4b33840feb0163d342d5b
122,688,631,294,174,770,000,000,000,000,000,000,000
27
hfs: fix keylen check in hfs_cat_traverse() If key->key_len is 65535, calculating "uint16_t keylen' would cause an overflow: uint16_t keylen; ... keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len) so the code bypasses the sanity check "if (keylen > nodesize)" which results in crash later: ./too...
void thr_info_cancel(struct thr_info *thr) { if (!thr) return; if (PTH(thr) != 0L) { pthread_cancel(thr->pth); PTH(thr) = 0L; } }
0
[ "CWE-119", "CWE-787" ]
bfgminer
c80ad8548251eb0e15329fc240c89070640c9d79
28,326,764,375,004,107,000,000,000,000,000,000,000
10
Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this!
int udf_expand_file_adinicb(struct inode *inode) { struct page *page; char *kaddr; struct udf_inode_info *iinfo = UDF_I(inode); int err; WARN_ON_ONCE(!inode_is_locked(inode)); if (!iinfo->i_lenAlloc) { if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_SHORT_AD)) iinfo->i_alloc_type = ICBTAG_FLAG_AD_SHORT; else...
1
[ "CWE-476" ]
linux
ea8569194b43f0f01f0a84c689388542c7254a1f
270,315,145,277,637,100,000,000,000,000,000,000,000
70
udf: Restore i_lenAlloc when inode expansion fails When we fail to expand inode from inline format to a normal format, we restore inode to contain the original inline formatting but we forgot to set i_lenAlloc back. The mismatch between i_lenAlloc and i_size was then causing further problems such as warnings and lost ...
dissect_ac_if_hdr_body(tvbuff_t *tvb, gint offset, packet_info *pinfo _U_, proto_tree *tree, usb_conv_info_t *usb_conv_info) { gint offset_start; guint16 bcdADC; guint8 ver_major; double ver; guint8 if_in_collection, i; audio_conv_info_t *audio_conv_info; offset_start = ...
0
[ "CWE-476" ]
wireshark
2cb5985bf47bdc8bea78d28483ed224abdd33dc6
190,679,500,353,767,570,000,000,000,000,000,000,000
53
Make class "type" for USB conversations. USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match. Bug: 12356 Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e338...
static int checkColorMap(n, r, g, b) int n; uint16 *r, *g, *b; { while (n-- > 0) if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256) return (16); return (8); }
0
[ "CWE-125" ]
libgd
4859d69e07504d4b0a4bdf9bcb4d9e3769ca35ae
2,168,540,900,914,156,300,000,000,000,000,000,000
9
Fix invalid read in gdImageCreateFromTiffPtr() tiff_invalid_read.tiff is corrupt, and causes an invalid read in gdImageCreateFromTiffPtr(), but not in gdImageCreateFromTiff(). The culprit is dynamicGetbuf(), which doesn't check for out-of-bound reads. In this case, dynamicGetbuf() is called with a negative dp->pos, bu...
void kvm_vcpu_block(struct kvm_vcpu *vcpu) { ktime_t start, cur, poll_end; bool waited = false; u64 block_ns; kvm_arch_vcpu_blocking(vcpu); start = cur = poll_end = ktime_get(); if (vcpu->halt_poll_ns && !kvm_arch_no_poll(vcpu)) { ktime_t stop = ktime_add_ns(ktime_get(), vcpu->halt_poll_ns); ++vcpu->stat.h...
0
[ "CWE-119" ]
linux
f8be156be163a052a067306417cd0ff679068c97
263,754,280,320,562,550,000,000,000,000,000,000,000
69
KVM: do not allow mapping valid but non-reference-counted pages It's possible to create a region which maps valid but non-refcounted pages (e.g., tail pages of non-compound higher order allocations). These host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family of APIs, which take a reference to the p...
static void sysbus_fdc_common_realize(DeviceState *dev, Error **errp) { FDCtrlSysBus *sys = SYSBUS_FDC(dev); FDCtrl *fdctrl = &sys->state; fdctrl_realize_common(fdctrl, errp); }
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
179,261,354,887,390,680,000,000,000,000,000,000,000
7
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
scroll_to_fraction(win_T *wp, int prev_height) { linenr_T lnum; int sline, line_size; int height = wp->w_height; // Don't change w_topline in any of these cases: // - window height is 0 // - 'scrollbind' is set and this isn't the current window // - window height is sufficient to display ...
0
[ "CWE-416" ]
vim
28d032cc688ccfda18c5bbcab8b50aba6e18cde5
322,302,690,913,978,340,000,000,000,000,000,000,000
121
patch 8.2.4979: accessing freed memory when line is flushed Problem: Accessing freed memory when line is flushed. Solution: Make a copy of the pattern to search for.
git_commit_list_node *git_commit_list_alloc_node(git_revwalk *walk) { return (git_commit_list_node *)git_pool_mallocz(&walk->commit_pool, 1); }
0
[]
libgit2
3316f666566f768eb8aa8de521a5262524dc3424
157,176,014,311,895,920,000,000,000,000,000,000,000
4
commit_list: fix possible buffer overflow in `commit_quick_parse` The function `commit_quick_parse` provides a way to quickly parse parts of a commit without storing or verifying most of its metadata. The first thing it does is calculating the number of parents by skipping "parent " lines until it finds the first non-...
void jpc_ft_fwdlift_colgrp(jpc_fix_t *a, int numrows, int stride, int parity) { jpc_fix_t *lptr; jpc_fix_t *hptr; register jpc_fix_t *lptr2; register jpc_fix_t *hptr2; register int n; register int i; int llen; llen = (numrows + 1 - parity) >> 1; if (numrows > 1) { /* Apply the first lifting step. */ lp...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
31,764,455,611,641,900,000,000,000,000,000,000,000
98
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static int mwifiex_pcie_delete_rxbd_ring(struct mwifiex_adapter *adapter) { struct pcie_service_card *card = adapter->card; const struct mwifiex_pcie_card_reg *reg = card->pcie.reg; mwifiex_cleanup_rxq_ring(adapter); if (card->rxbd_ring_vbase) pci_free_consistent(card->dev, card->rxbd_ring_size, card->r...
0
[ "CWE-400", "CWE-200", "CWE-401" ]
linux
d10dcb615c8e29d403a24d35f8310a7a53e3050c
303,813,525,127,964,160,000,000,000,000,000,000,000
19
mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be released if mwifiex_map_pci_memory() fails. The release for skb and card->evtbd_ring_vbase is added. Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines...
pid_t wait_process(pid_t pid, int *status_ptr, int flags) { pid_t waited_pid; do { waited_pid = waitpid(pid, status_ptr, flags); } while (waited_pid == -1 && errno == EINTR); if (waited_pid == -1 && errno == ECHILD) { /* Status of requested child no longer available: check to * see if it was processed by ...
0
[ "CWE-59" ]
rsync
962f8b90045ab331fc04c9e65f80f1a53e68243b
175,176,488,691,721,960,000,000,000,000,000,000,000
23
Complain if an inc-recursive path is not right for its dir. This ensures that a malicious sender can't use a just-sent symlink as a trasnfer path.
static int digi_startup(struct usb_serial *serial) { struct device *dev = &serial->interface->dev; struct digi_serial *serial_priv; int ret; int i; /* check whether the device has the expected number of endpoints */ if (serial->num_port_pointers < serial->type->num_ports + 1) { dev_err(dev, "OOB endpoints miss...
0
[ "CWE-703" ]
linux
5a07975ad0a36708c6b0a5b9fea1ff811d0b0c1f
324,823,557,602,248,780,000,000,000,000,000,000,000
43
USB: digi_acceleport: do sanity checking for the number of ports The driver can be crashed with devices that expose crafted descriptors with too few endpoints. See: http://seclists.org/bugtraq/2016/Mar/61 Signed-off-by: Oliver Neukum <ONeukum@suse.com> [johan: fix OOB endpoint check and add error messages ] Cc: stab...
int _yr_emit_inst_arg_uint32( RE_EMIT_CONTEXT* emit_context, uint8_t opcode, uint32_t argument, uint8_t** instruction_addr, uint32_t** argument_addr, size_t* code_size) { FAIL_ON_ERROR(yr_arena_write_data( emit_context->arena, &opcode, sizeof(uint8_t), (void**) instruct...
0
[ "CWE-674", "CWE-787" ]
yara
925bcf3c3b0a28b5b78e25d9efda5c0bf27ae699
190,736,154,277,605,940,000,000,000,000,000,000,000
24
Fix issue #674. Move regexp limits to limits.h.
Item *Item_func::get_tmp_table_item(THD *thd) { if (!with_sum_func && !const_item()) return new (thd->mem_root) Item_temptable_field(thd, result_field); return copy_or_same(thd); }
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
208,900,598,212,613,850,000,000,000,000,000,000,000
6
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static void handle_pdfname(struct pdf_struct *pdf, struct pdf_obj *obj, const char *pdfname, int escapes, enum objstate *state) { struct pdfname_action *act = NULL; unsigned j; for (j=0;j<sizeof(pdfname_actions)/sizeof(pdfname_actions[0]);j++) { if (!strcmp(pdfname, pdfname_actions[j].pdfname))...
0
[ "CWE-119", "CWE-189", "CWE-79" ]
clamav-devel
24ff855c82d3f5c62bc5788a5776cefbffce2971
222,903,511,988,823,670,000,000,000,000,000,000,000
51
pdf: bb #7053
TfLiteStatus copy_ledger(const TfLiteSparsity* sparsity, TfLiteTensor* ledger) { if (sparsity == nullptr) { return kTfLiteOk; } const auto* array_segments = sparsity->dim_metadata[1].array_segments; const auto* array_indices = sparsity->dim_metadata[1].array_indices; uint8_t* output_data = GetTensorData<...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
5,563,464,556,004,234,000,000,000,000,000,000,000
32
[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...
PHP_METHOD(Phar, extractTo) { char *error = NULL; php_stream *fp; php_stream_statbuf ssb; phar_entry_info *entry; char *pathto, *filename, *actual; int pathto_len, filename_len; int ret, i; int nelems; zval *zval_files = NULL; zend_bool overwrite = 0; PHAR_ARCHIVE_OBJECT(); if (zend_parse_parameters(ZEND_...
0
[ "CWE-416" ]
php-src
b2cf3f064b8f5efef89bb084521b61318c71781b
58,442,840,952,012,910,000,000,000,000,000,000,000
139
Fixed bug #68901 (use after free)
int __sys_listen(int fd, int backlog) { struct socket *sock; int err, fput_needed; int somaxconn; sock = sockfd_lookup_light(fd, &err, &fput_needed); if (sock) { somaxconn = sock_net(sock->sk)->core.sysctl_somaxconn; if ((unsigned int)backlog > somaxconn) backlog = somaxconn; err = security_socket_liste...
0
[ "CWE-362" ]
linux
6d8c50dcb029872b298eea68cc6209c866fd3e14
205,277,938,838,260,550,000,000,000,000,000,000,000
20
socket: close race condition between sock_close() and sockfs_setattr() fchownat() doesn't even hold refcnt of fd until it figures out fd is really needed (otherwise is ignored) and releases it after it resolves the path. This means sock_close() could race with sockfs_setattr(), which leads to a NULL pointer dereferenc...
initialize_mousetype(SCREEN *sp) { T((T_CALLED("initialize_mousetype()"))); /* Try gpm first, because gpm may be configured to run in xterm */ #if USE_GPM_SUPPORT if (allow_gpm_mouse(sp)) { if (!sp->_mouse_gpm_loaded) { #ifdef HAVE_LIBDL load_gpm_library(sp); #else /* !HAVE_LIBDL */ sp->_mouse_g...
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
89,704,001,594,462,130,000,000,000,000,000,000,000
155
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...
void gdImageCopyResized (gdImagePtr dst, gdImagePtr src, int dstX, int dstY, int srcX, int srcY, int dstW, int dstH, int srcW, int srcH) { int c; int x, y; int tox, toy; int ydest; int i; int colorMap[gdMaxColors]; /* Stretch vectors */ int *stx, *sty; if (overflow2(sizeof(int), srcW)) { return; } if (ov...
1
[ "CWE-190" ]
php-src
c395c6e5d7e8df37a21265ff76e48fe75ceb5ae6
144,098,409,742,488,710,000,000,000,000,000,000,000
104
iFixed bug #72446 - Integer Overflow in gdImagePaletteToTrueColor() resulting in heap overflow
static int sb1053a_get_interface(struct mp_port *mtpt, int port_num) { unsigned long option_base_addr = mtpt->option_base_addr; unsigned int interface = 0; switch (port_num) { case 0: case 1: /* set GPO[1:0] = 00 */ outb(0x00, option_base_addr + MP_OPTR_GPODR); break; case 2: case 3: /* set GP...
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
316,695,353,099,336,350,000,000,000,000,000,000,000
36
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
static int theme_search_equal(THEME_SEARCH_REC *r1, THEME_SEARCH_REC *r2) { return g_strcasecmp(r1->short_name, r2->short_name); }
0
[ "CWE-125" ]
irssi
e0c66e31224894674356ddaf6d46016c1abc994f
135,122,362,835,438,680,000,000,000,000,000,000,000
4
Previous theme patch fixes by c0ffee git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3058 dbcabf3a-b0e7-0310-adc4-f8d773084564
static int kvm_prepare_memory_region(struct kvm *kvm, const struct kvm_memory_slot *old, struct kvm_memory_slot *new, enum kvm_mr_change change) { int r; /* * If dirty logging is disabled, nullify the bitmap; the old bitmap * will be freed on "commit". If logging is enabled in both o...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
255,384,082,073,837,600,000,000,000,000,000,000,000
37
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
create_tmp_file (const char *template, char **r_bakfname, char **r_tmpfname, IOBUF *r_fp) { char *bakfname, *tmpfname; mode_t oldmask; *r_bakfname = NULL; *r_tmpfname = NULL; # ifdef USE_ONLY_8DOT3 /* Here is another Windoze bug?: * you cant rename("pubring.gpg.tmp", "pubring.gpg"); *...
0
[ "CWE-416" ]
gnupg
f0f71a721ccd7ab9e40b8b6b028b59632c0cc648
269,462,327,996,227,830,000,000,000,000,000,000,000
67
gpg: Prevent an invalid memory read using a garbled keyring. * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet types. * g10/keydb.c (parse_keyblock_image): Ditto. -- The keyring DB code did not reject packets which don't belong into a keyring. If for example the keyblock contains a literal data packet...
static void virtio_scsi_handle_cmd(VirtIODevice *vdev, VirtQueue *vq) { /* use non-QOM casts in the data path */ VirtIOSCSI *s = (VirtIOSCSI *)vdev; VirtIOSCSICommon *vs = &s->parent_obj; VirtIOSCSIReq *req; int n; while ((req = virtio_scsi_pop_req(s, vq))) { SCSIDevice *d; int...
0
[ "CWE-119" ]
qemu
3c3ce981423e0d6c18af82ee62f1850c2cda5976
203,376,486,691,571,300,000,000,000,000,000,000,000
56
virtio-scsi: fix buffer overrun on invalid state load CVE-2013-4542 hw/scsi/scsi-bus.c invokes load_request. virtio_scsi_load_request does: qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem)); this probably can make elem invalid, for example, make in_num or out_num huge, then: virtio_scsi_p...
ZEND_VM_HELPER(zend_pre_inc_helper, VAR|CV, ANY) { USE_OPLINE zend_free_op free_op1; zval *var_ptr; var_ptr = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_RW); if (OP1_TYPE == IS_VAR && UNEXPECTED(Z_ISERROR_P(var_ptr))) { if (UNEXPECTED(RETURN_VALUE_USED(opline))) { ZVAL_NULL(EX_VAR(opline->result.var)); } ZEND_VM...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
313,036,815,385,721,470,000,000,000,000,000,000,000
40
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.
free_parent_mallocs_startup(bool am_child) { if (am_child) { #if HAVE_DECL_CLONE_NEWNET free_dirname(); #endif #ifndef _MEM_CHECK_LOG_ FREE_PTR(syslog_ident); #else free(syslog_ident); #endif syslog_ident = NULL; FREE_PTR(orig_core_dump_pattern); } if (free_main_pidfile) { FREE_PTR(main_pidfile); fre...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
313,881,699,602,982,970,000,000,000,000,000,000,000
21
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
_outDistinctExpr(StringInfo str, const DistinctExpr *node) { WRITE_NODE_TYPE("DISTINCTEXPR"); WRITE_OID_FIELD(opno); WRITE_OID_FIELD(opfuncid); WRITE_OID_FIELD(opresulttype); WRITE_BOOL_FIELD(opretset); WRITE_OID_FIELD(opcollid); WRITE_OID_FIELD(inputcollid); WRITE_NODE_FIELD(args); WRITE_LOCATION_FIELD(locat...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
335,317,787,105,898,160,000,000,000,000,000,000,000
13
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...
static int rsi_send_beacon(struct rsi_common *common) { struct sk_buff *skb = NULL; u8 dword_align_bytes = 0; skb = dev_alloc_skb(MAX_MGMT_PKT_SIZE); if (!skb) return -ENOMEM; memset(skb->data, 0, MAX_MGMT_PKT_SIZE); dword_align_bytes = ((unsigned long)skb->data & 0x3f); if (dword_align_bytes) skb_pull(sk...
0
[ "CWE-400", "CWE-401" ]
linux
d563131ef23cbc756026f839a82598c8445bc45f
98,739,636,473,745,460,000,000,000,000,000,000,000
25
rsi: release skb if rsi_prepare_beacon fails In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
_copyDoStmt(const DoStmt *from) { DoStmt *newnode = makeNode(DoStmt); COPY_NODE_FIELD(args); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
135,695,108,184,475,950,000,000,000,000,000,000,000
8
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...
static Variant HHVM_METHOD(ZipArchive, getStream, const String& name) { auto zipDir = getResource<ZipDirectory>(this_, "zipDir"); FAIL_IF_INVALID_ZIPARCHIVE(getStream, zipDir); FAIL_IF_EMPTY_STRING_ZIPARCHIVE(getStream, name); auto zipStream = req::make<ZipStream>(zipDir->getZip(), name); if (zipStream->eof...
0
[ "CWE-22" ]
hhvm
65c95a01541dd2fbc9c978ac53bed235b5376686
220,420,222,658,611,940,000,000,000,000,000,000,000
12
ZipArchive::extractTo bug 70350 Summary:Don't allow upward directory traversal when extracting zip archive files. Files in zip files with `..` or starting at main root `/` should be normalized to something where the file being extracted winds up within the directory or a subdirectory where the actual extraction is ta...
net_connect(const char *addr, unsigned short port, int type, const char *log_service_name) { struct addrinfo hints = { 0 }; struct addrinfo *servinfo; struct addrinfo *ptr; char strport[8]; int fd; int ret; DPRINTF(E_DBG, L_MISC, "Connecting to '%s' at %s (port %u)\n", log_service_name, addr, port); h...
0
[ "CWE-416" ]
owntone-server
246d8ae0cef27377e5dfe9ee3ad87e864d6b6266
27,148,682,829,903,150,000,000,000,000,000,000,000
52
[misc] Fix use-after-free in net_bind() Thanks to Ba Jinsheng for reporting this bug
void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) { if (ignore||(complexMode && !xml)) { OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); return; } // d...
0
[ "CWE-824" ]
poppler
30c731b487190c02afff3f036736a392eb60cd9a
306,743,777,653,378,870,000,000,000,000,000,000,000
21
Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit. Closes #742
GF_Err gf_isom_set_visual_bit_depth(GF_ISOFile *movie, u32 trackNumber, u32 StreamDescriptionIndex, u16 bitDepth) { GF_Err e; GF_TrackBox *trak; GF_MPEGVisualSampleEntryBox *entry; GF_SampleDescriptionBox *stsd; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf_isom_get_track_from_file(m...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
117,148,036,442,592,430,000,000,000,000,000,000
34
fixed #1706
const CImg<T>& save_png(std::FILE *const file, const unsigned int bytes_per_pixel=0) const { return _save_png(file,0,bytes_per_pixel); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
284,680,055,979,445,460,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.
bool kthread_should_park(void) { return test_bit(KTHREAD_SHOULD_PARK, &to_kthread(current)->flags); }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
288,408,938,615,530,900,000,000,000,000,000,000,000
4
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...
bool kvm_test_age_gfn(struct kvm *kvm, struct kvm_gfn_range *range) { bool young = false; if (kvm_memslots_have_rmaps(kvm)) young = kvm_handle_gfn_range(kvm, range, kvm_test_age_rmapp); if (is_tdp_mmu_enabled(kvm)) young |= kvm_tdp_mmu_test_age_gfn(kvm, range); return young; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
42,960,854,817,780,760,000,000,000,000,000,000,000
12
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
static int shadow_copy2_chdir(vfs_handle_struct *handle, const char *fname) { time_t timestamp; char *stripped; int ret, saved_errno; char *conv; if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname, &timestamp, &stripped)) { return -1; } if (timestamp == 0) { return SMB_VFS_NEXT_CHDI...
0
[ "CWE-200" ]
samba
675fd8d771f9d43e354dba53ddd9b5483ae0a1d7
228,815,945,252,245,750,000,000,000,000,000,000,000
26
CVE-2015-5299: s3-shadow-copy2: fix missing access check on snapdir Fix originally from <partha@exablox.com> https://bugzilla.samba.org/show_bug.cgi?id=11529 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
static int __scan_channels(struct ipmi_smi *intf, struct ipmi_device_id *id) { int rv; if (ipmi_version_major(id) > 1 || (ipmi_version_major(id) == 1 && ipmi_version_minor(id) >= 5)) { unsigned int set; /* * Start scanning the channels to see what is * available. */ set = !intf->curr_workin...
0
[ "CWE-416", "CWE-284" ]
linux
77f8269606bf95fcb232ee86f6da80886f1dfae8
91,100,195,064,110,700,000,000,000,000,000,000,000
43
ipmi: fix use-after-free of user->release_barrier.rda When we do the following test, we got oops in ipmi_msghandler driver while((1)) do service ipmievd restart & service ipmievd restart done --------------------------------------------------------------- [ 294.230186] Unable to handle kernel paging request at virt...
decnet_print(netdissect_options *ndo, register const u_char *ap, register u_int length, register u_int caplen) { register const union routehdr *rhp; register int mflags; int dst, src, hops; u_int nsplen, pktlen; const u_char *nspp; if (length < sizeof(struct shorthdr)) { ND_PRINT((ndo...
1
[ "CWE-125" ]
tcpdump
c6e0531b5def26ecf912e8de6ade86cbdaed3751
340,164,921,372,952,050,000,000,000,000,000,000,000
110
CVE-2017-12899/DECnet: Fix bounds checking. If we're skipping over padding before the *real* flags, check whether the real flags are in the captured data before fetching it. This fixes a buffer over-read discovered by Kamil Frankowicz. Note one place where we don't need to do bounds checking as it's already been don...
rdpsnd_show_help(void) { struct audio_driver *pos; rdpsnd_register_drivers(NULL); pos = drivers; while (pos != NULL) { fprintf(stderr, " %s:\t%s\n", pos->name, pos->description); pos = pos->next; } }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
92,065,418,839,765,430,000,000,000,000,000,000,000
13
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
compat_get_entries(struct compat_ipt_get_entries __user *uptr, int *len) { int ret; struct compat_ipt_get_entries get; struct ipt_table *t; if (*len < sizeof(get)) { duprintf("compat_get_entries: %u < %u\n", *len, (unsigned int)sizeof(get)); return -EINVAL; } if (copy_from_user(&get, uptr, sizeof(get))...
0
[ "CWE-787" ]
linux
9fa492cdc160cd27ce1046cb36f47d3b2b1efa21
240,483,019,564,359,830,000,000,000,000,000,000,000
49
[NETFILTER]: x_tables: simplify compat API Split the xt_compat_match/xt_compat_target into smaller type-safe functions performing just one operation. Handle all alignment and size-related conversions centrally in these function instead of requiring each module to implement a full-blown conversion function. Replace ->c...
agg_replacements_to_vector (struct cgraph_node *node, int index, HOST_WIDE_INT offset) { struct ipa_agg_replacement_value *av; vec<ipa_agg_value> res = vNULL; for (av = ipa_get_agg_replacements_for_node (node); av; av = av->next) if (av->index == index && (av->offset - offset) >= 0) { struc...
0
[ "CWE-20" ]
gcc
a09ccc22459c565814f79f96586fe4ad083fe4eb
15,967,473,064,648,120,000,000,000,000,000,000,000
19
Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015) 2019-12-21 Martin Jambor <mjambor@suse.cz> PR ipa/93015 * ipa-cp.c (ipcp_store_vr_results): Check that info exists testsuite/ * gcc.dg/lto/pr93015_0.c: New test. From-SVN: r279695
static struct ib_ucontext *hns_roce_alloc_ucontext(struct ib_device *ib_dev, struct ib_udata *udata) { int ret = 0; struct hns_roce_ucontext *context; struct hns_roce_ib_alloc_ucontext_resp resp = {}; struct hns_roce_dev *hr_dev = to_hr_dev(ib_dev); resp.qp_tab_size = hr_dev->caps.num_qps; context = km...
0
[ "CWE-665" ]
kernel
72be029e947510dd6cbbbaf51879622af26e4200
238,496,612,107,520,060,000,000,000,000,000,000,000
37
RDMA/hns: Fix init resp when alloc ucontext (bsc#1104427 FATE#326416). suse-commit: 8e5436bc2806cbe952f043cc995804c188ce047a
VOID AnalyzeL4Proto( UCHAR l4Protocol, PNET_PACKET_INFO packetInfo) { packetInfo->isTCP = (l4Protocol == PROTOCOL_TCP); packetInfo->isUDP = (l4Protocol == PROTOCOL_UDP); }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
49,230,010,987,441,040,000,000,000,000,000,000,000
7
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static uint64_t pit_ioport_read(void *opaque, hwaddr addr, unsigned size) { PITCommonState *pit = opaque; int ret, count; PITChannelState *s; addr &= 3; if (addr == 3) { /* Mode/Command register is write only, read is ignored */ return 0; } ...
0
[ "CWE-119" ]
qemu
d4862a87e31a51de9eb260f25c9e99a75efe3235
54,952,428,365,511,330,000,000,000,000,000,000,000
59
i8254: fix out-of-bounds memory access in pit_ioport_read() Due converting PIO to the new memory read/write api we no longer provide separate I/O region lenghts for read and write operations. As a result, reading from PIT Mode/Command register will end with accessing pit->channels with invalid index. Fix this by igno...
match(uid_t uid, gid_t *groups, int ngroups, uid_t target, const char *cmd, const char **cmdargs, struct rule *r) { int i; if (r->ident[0] == ':') { gid_t rgid; if (parsegid(r->ident + 1, &rgid) == -1) return 0; for (i = 0; i < ngroups; i++) { if (rgid == groups[i]) break; } if (i == ngroups)...
0
[ "CWE-200", "CWE-909" ]
OpenDoas
d5acd52e2a15c36a8e06f9103d35622933aa422d
197,029,522,021,590,930,000,000,000,000,000,000,000
38
correctly reset path for rules without specific command This is a fixup for commit 01c658f8c45cb92a343be5f32aa6da70b2032168 where the behaviour was changed to not inherit the PATH variable by default.
static int rsi_usb_host_intf_write_pkt(struct rsi_hw *adapter, u8 *pkt, u32 len) { u32 queueno = ((pkt[1] >> 4) & 0x7); u8 endpoint; endpoint = ((queueno == RSI_WIFI_MGMT_Q || queueno == RSI_WIFI_DATA_Q || queueno == RSI_COEX_Q) ? WLAN_EP : BT_EP); return rsi_write_multiple(adapter, ...
0
[ "CWE-415" ]
wireless-drivers
8b51dc7291473093c821195c4b6af85fadedbc2f
255,011,266,364,797,600,000,000,000,000,000,000,000
15
rsi: fix a double free bug in rsi_91x_deinit() `dev` (struct rsi_91x_usbdev *) field of adapter (struct rsi_91x_usbdev *) is allocated and initialized in `rsi_init_usb_interface`. If any error is detected in information read from the device side, `rsi_init_usb_interface` will be freed. However, in the higher level e...
void OSD::set_disk_tp_priority() { dout(10) << __func__ << " class " << cct->_conf->osd_disk_thread_ioprio_class << " priority " << cct->_conf->osd_disk_thread_ioprio_priority << dendl; if (cct->_conf->osd_disk_thread_ioprio_class.empty() || cct->_conf->osd_disk_thread_ioprio_priority < 0) ret...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
139,208,677,777,326,480,000,000,000,000,000,000,000
18
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
AsyncSSLSocket::AsyncSSLSocket( const shared_ptr<SSLContext>& ctx, EventBase* evb, bool deferSecurityNegotiation) : AsyncSocket(evb), ctx_(ctx), handshakeTimeout_(this, evb), connectionTimeout_(this, evb) { init(); if (deferSecurityNegotiation) { sslState_ = STATE_UNENCRYPTED; ...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
269,267,887,826,136,570,000,000,000,000,000,000,000
13
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static inline struct nlattr *nla_nest_compat_start(struct sk_buff *skb, int attrtype, int attrlen, const void *data) { struct nlattr *start = (struct nlattr *)skb_tail_pointer(skb); if (nla_put(skb, attrtype, attrlen, data) < 0) return NULL; if (nla_nest_start(skb, attrtype) == NULL) { nlmsg_t...
0
[]
linux-2.6
1045b03e07d85f3545118510a587035536030c1c
234,288,185,771,463,000,000,000,000,000,000,000,000
14
netlink: fix overrun in attribute iteration kmemcheck reported this: kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30) 0500110001508abf050010000500000002017300140000006f72672e66726565 i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u ^ Pid: 3...
static int proxy_request(REQUEST *request) { struct timeval when; char buffer[128]; #ifdef WITH_COA if (request->coa) { RDEBUG("WARNING: Cannot proxy and originate CoA packets at the same time. Cancelling CoA request"); ev_request_free(&request->coa); } #endif if (request->home_server->server) { RDEBUG("E...
0
[ "CWE-399" ]
freeradius-server
ff94dd35673bba1476594299d31ce8293b8bd223
153,120,186,596,936,250,000,000,000,000,000,000,000
66
Do not delete "old" requests until they are free. If the request is in the queue for 30+ seconds, do NOT delete it. Instead, mark it as "STOP PROCESSING", and do "wait_for_child_to_die", which waits for a child thread to pick it up, and acknowledge that it's done. Once it's marked done, we can finally clean it up. T...
static int mark_chain_precision_stack(struct bpf_verifier_env *env, int spi) { return __mark_chain_precision(env, -1, spi); }
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
306,958,037,336,815,240,000,000,000,000,000,000,000
4
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static SLJIT_INLINE BOOL assert_needs_str_ptr_saving(PCRE2_SPTR cc) { while (TRUE) { switch (*cc) { case OP_CALLOUT_STR: cc += GET(cc, 1 + 2*LINK_SIZE); break; case OP_NOT_WORD_BOUNDARY: case OP_WORD_BOUNDARY: case OP_CIRC: case OP_CIRCM: case OP_DOLL: case OP_DOLLM: cas...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
182,841,292,603,260,260,000,000,000,000,000,000,000
29
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
\param align Alignment setting when images have not all the same size. \param exit_on_anykey Exit function when any key is pressed. \return A one-column vector containing the selected image indexes. **/ CImg<intT> get_select(CImgDisplay &disp, const bool feature_type=true,
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
127,952,458,858,393,620,000,000,000,000,000,000,000
5
Fix other issues in 'CImg<T>::load_bmp()'.
sort_hostpool (const void *xa, const void *xb) { int a = *(int *)xa; int b = *(int *)xb; assert (a >= 0 && a < hosttable_size); assert (b >= 0 && b < hosttable_size); assert (hosttable[a]); assert (hosttable[b]); return ascii_strcasecmp (hosttable[a]->name, hosttable[b]->name); }
0
[ "CWE-352" ]
gnupg
4a4bb874f63741026bd26264c43bb32b1099f060
40,287,415,512,123,696,000,000,000,000,000,000,000
12
dirmngr: Avoid possible CSRF attacks via http redirects. * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path. (http_redir_info_t): New. * dirmngr/http.c (do_parse_uri): Set new fields. (same_host_p): New. (http_prepare_redirect): New. * dirmngr/t-http-basic.c: New test. * dirmngr/ks-engine-hkp.c (send_re...
InlineImageTracker::handleToken(QPDFTokenizer::Token const& token) { if (state == st_bi) { if (token.getType() == QPDFTokenizer::tt_inline_image) { std::string image_data(token.getValue()); size_t len = image_data.length(); if (len >= this->min_size) ...
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
28,686,545,073,492,375,000,000,000,000,000,000,000
61
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
QPDFNumberTreeObjectHelper::hasIndex(numtree_number idx) { return this->m->entries.count(idx) != 0; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
277,559,601,267,744,670,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
bool RGWPostObj_ObjStore::part_bl(parts_collection_t& parts, const std::string& name, ceph::bufferlist* pbl) { const auto iter = parts.find(name); if (std::end(parts) == iter) { return false; } *pbl = iter->second.data; return true; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
23,828,418,072,727,840,000,000,000,000,000,000,000
12
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
static int htab_lru_map_update_elem(struct bpf_map *map, void *key, void *value, u64 map_flags) { struct bpf_htab *htab = container_of(map, struct bpf_htab, map); struct htab_elem *l_new, *l_old = NULL; struct hlist_nulls_head *head; unsigned long flags; struct bucket *b; u32 key_size, hash; int ret; i...
0
[ "CWE-787" ]
bpf
c4eb1f403243fc7bbb7de644db8587c03de36da6
100,036,110,757,696,570,000,000,000,000,000,000,000
65
bpf: Fix integer overflow involving bucket_size In __htab_map_lookup_and_delete_batch(), hash buckets are iterated over to count the number of elements in each bucket (bucket_size). If bucket_size is large enough, the multiplication to calculate kvmalloc() size could overflow, resulting in out-of-bounds write as repor...
static void *disk_seqf_next(struct seq_file *seqf, void *v, loff_t *pos) { struct device *dev; (*pos)++; dev = class_dev_iter_next(seqf->private); if (dev) return dev_to_disk(dev); return NULL; }
0
[ "CWE-416" ]
linux-stable
77da160530dd1dc94f6ae15a981f24e5f0021e84
139,303,817,285,603,760,000,000,000,000,000,000,000
11
block: fix use-after-free in seq file I got a KASAN report of use-after-free: ================================================================== BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508 Read of size 8 by task trinity-c1/315 ======================================...
e_util_utf8_strstrcase (const gchar *haystack, const gchar *needle) { gunichar *nuni, unival; gint nlen; const gchar *o, *p; if (haystack == NULL) return NULL; if (needle == NULL) return NULL; if (strlen (needle) == 0) return haystack; if (strlen (haystack) == 0) return NULL; ...
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
203,681,096,325,420,400,000,000,000,000,000,000,000
57
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
plugin_pread (struct backend *b, struct connection *conn, void *buf, uint32_t count, uint64_t offset, uint32_t flags, int *err) { struct backend_plugin *p = container_of (b, struct backend_plugin, backend); int r; assert (connection_get_handle (conn, 0)); assert (p->plugin.pread || ...
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
303,752,708,593,170,660,000,000,000,000,000,000,000
20
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
void rtnl_link_unregister(struct rtnl_link_ops *ops) { rtnl_lock(); __rtnl_link_unregister(ops); rtnl_unlock(); }
0
[ "CWE-399" ]
linux-2.6
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
298,158,859,673,294,160,000,000,000,000,000,000,000
6
rtnl: fix info leak on RTM_GETLINK request for VF devices Initialize the mac address buffer with 0 as the driver specific function will probably not fill the whole buffer. In fact, all in-kernel drivers fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible bytes. Therefore we currently leak 26 bytes ...
DoCopyTo(CopyState cstate) { bool pipe = (cstate->filename == NULL); bool fe_copy = (pipe && whereToSendOutput == DestRemote); uint64 processed; PG_TRY(); { if (fe_copy) SendCopyBegin(cstate); processed = CopyTo(cstate); if (fe_copy) SendCopyEnd(cstate); } PG_CATCH(); { /* * Make sure we ...
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
171,888,047,442,997,850,000,000,000,000,000,000,000
30
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...
initoptions_init() { #if defined(UNIX) || defined(VMS) char *opts; #endif int i; /* set up the command parsing */ reset_commands(TRUE); /* init */ /* initialize the random number generator */ setrandom(); /* for detection of configfile options specified multiple times */ iflags.opt_booldup = iflags.opt_comp...
0
[ "CWE-269" ]
NetHack
612755bfb5c412079795c68ba392df5d93874ed8
40,240,923,140,422,947,000,000,000,000,000,000,000
121
escapes() revamp Partial rewrite of escapes(), mostly changing its if-then-else logic so that end-of-string can be checked once instead for each case. The previous version had a bug if the input string ended with backslash and one decimal digit (due to being lumped together with the handling for trailing \X or \O...
evdns_base_count_nameservers(struct evdns_base *base) { const struct nameserver *server; int n = 0; EVDNS_LOCK(base); server = base->server_head; if (!server) goto done; do { ++n; server = server->next; } while (server != base->server_head); done: EVDNS_UNLOCK(base); return n; }
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
276,255,036,521,087,350,000,000,000,000,000,000,000
17
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
ZEND_VM_HANDLER(166, ZEND_YIELD_FROM, CONST|TMP|VAR|CV, ANY) { USE_OPLINE zend_generator *generator = zend_get_running_generator(EXECUTE_DATA_C); zval *val; zend_free_op free_op1; SAVE_OPLINE(); val = GET_OP1_ZVAL_PTR_DEREF(BP_VAR_R); if (UNEXPECTED(generator->flags & ZEND_GENERATOR_FORCED_CLOSE)) { zend_t...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
285,786,869,843,470,700,000,000,000,000,000,000,000
107
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.
GF_Box *name_New() { ISOM_DECL_BOX_ALLOC(GF_NameBox, GF_ISOM_BOX_TYPE_NAME); return (GF_Box *)tmp; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
40,130,146,740,650,520,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static int ntop_interface_make_room_alerts(lua_State* vm) { NetworkInterface *ntop_interface = getCurrentInterface(vm); int alert_entity; char *alert_entity_value, *table_name; AlertsManager *am; ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__); if(ntop_lua_check(vm, __FUNCTION__, 1,...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
137,519,588,540,605,260,000,000,000,000,000,000,000
25
Security fix: prevents empty host from being used
TEST_F(GroupVerifierTest, TestAnyInAllBothInRequireAnyIsOk) { TestUtility::loadFromYaml(AllWithAny, proto_config_); createAsyncMockAuthsAndVerifier( std::vector<std::string>{"provider_1", "provider_2", "provider_3"}); // AsyncMockVerifier doesn't set payload EXPECT_CALL(mock_cb_, setPayload(_)).Times(0);...
0
[ "CWE-303", "CWE-703" ]
envoy
ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a
195,695,989,558,337,470,000,000,000,000,000,000,000
15
jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194) [jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ...
flow_print(FILE *stream, const struct flow *flow) { char *s = flow_to_string(flow); fputs(s, stream); free(s); }
0
[ "CWE-400" ]
ovs
ad0d22f6435b43ecfc30c0e877d490d36721f200
298,905,905,682,152,820,000,000,000,000,000,000,000
6
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
_copyPrepareStmt(const PrepareStmt *from) { PrepareStmt *newnode = makeNode(PrepareStmt); COPY_STRING_FIELD(name); COPY_NODE_FIELD(argtypes); COPY_NODE_FIELD(query); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
159,630,670,135,684,800,000,000,000,000,000,000,000
10
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...
int blkid_partitions_get_flags(blkid_probe pr) { struct blkid_chain *chn = blkid_probe_get_chain(pr); return chn ? chn->flags : 0; }
0
[]
util-linux
50d1594c2e6142a3b51d2143c74027480df082e0
196,594,921,192,105,300,000,000,000,000,000,000,000
6
libblkid: avoid non-empty recursion in EBR This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f. We also need to detect non-empty recursion in the EBR chain. It's possible to create standard valid logical partitions and in the last one points back to the EBR chain. In this case all offsets will be ...
static void ccp_get_dm_area(struct ccp_dm_workarea *wa, unsigned int wa_offset, struct scatterlist *sg, unsigned int sg_offset, unsigned int len) { WARN_ON(!wa->address); scatterwalk_map_and_copy(wa->address + wa_offset, sg, sg_offset, len, 1); }
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
307,570,033,919,268,550,000,000,000,000,000,000,000
9
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
static void module_list_active(struct module_list *list) { int i; struct module_list active_modules = MODULE_LIST_INIT; gitmodules_config(); for (i = 0; i < list->nr; i++) { const struct cache_entry *ce = list->entries[i]; if (!is_submodule_active(the_repository, ce->name)) continue; ALLOC_GROW(active_...
0
[ "CWE-88" ]
git
98afac7a7cefdca0d2c4917dd8066a59f7088265
184,286,377,053,350,230,000,000,000,000,000,000,000
22
submodule--helper: use "--" to signal end of clone options When we clone a submodule, we call "git clone $url $path". But there's nothing to say that those components can't begin with a dash themselves, confusing git-clone into thinking they're options. Let's pass "--" to make it clear what we expect. There's no test...
std::chrono::milliseconds listenerFiltersTimeout() const override { return {}; }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
211,127,611,033,389,600,000,000,000,000,000,000,000
1
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
static int snd_timer_user_tselect(struct file *file, struct snd_timer_select __user *_tselect) { struct snd_timer_user *tu; struct snd_timer_select tselect; char str[32]; int err = 0; tu = file->private_data; if (tu->timeri) { snd_timer_close(tu->timeri); tu->timeri = NULL; } if (copy_from_user(&tsel...
0
[ "CWE-416", "CWE-703" ]
linux
e7af6307a8a54f0b873960b32b6a644f2d0fbd97
209,971,584,953,578,900,000,000,000,000,000,000,000
34
ALSA: timer: Fix incorrectly assigned timer instance The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()") unified the error handling code paths with the standard goto, but it introduced a subtle bug: the timer instance is stored in snd_timer_open() incorrectly even if it returns an...
otherfile(char_u *ffname) { return otherfile_buf(curbuf, ffname #ifdef UNIX , NULL #endif ); }
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
236,700,707,023,464,450,000,000,000,000,000,000,000
8
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
static int _server_handle_qTStatus(libgdbr_t *g) { int ret; // TODO Handle proper reporting of trace status const char *message = ""; if ((ret = send_ack (g)) < 0) { return -1; } return send_msg (g, message); }
0
[ "CWE-703", "CWE-787" ]
radare2
796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191
45,291,609,589,439,370,000,000,000,000,000,000,000
9
Fix ext2 buffer overflow in r2_sbu_grub_memmove
xmlSchemaFreeIDC(xmlSchemaIDCPtr idcDef) { xmlSchemaIDCSelectPtr cur, prev; if (idcDef == NULL) return; if (idcDef->annot != NULL) xmlSchemaFreeAnnot(idcDef->annot); /* Selector */ if (idcDef->selector != NULL) { if (idcDef->selector->xpathComp != NULL) xmlFreePattern((xmlPatternPtr)...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
129,297,052,921,652,930,000,000,000,000,000,000,000
27
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static inline pte_t __ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { /* * Get the current pte state, but zero it out to make it * non-present, preventing the hardware from asynchronously * updating it. */ return ptep_get_and_clear(mm, addr, ptep); }
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
248,990,155,570,855,500,000,000,000,000,000,000,000
11
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
void sigterm_handler(int s) { int parent=0; g_hash_table_foreach(children, killchild, &parent); if(parent) { unlink(pidfname); } exit(0); }
0
[ "CWE-119" ]
nbd
4ed24fe0d64c7cc9963c57b52cad1555ad7c6b60
323,625,255,960,201,650,000,000,000,000,000,000,000
11
r134: CVE-2005-3534
static unsigned int compute_response_length_from_request(modbus_t *ctx, uint8_t *req) { int length; const int offset = ctx->backend->header_length; switch (req[offset]) { case MODBUS_FC_READ_COILS: case MODBUS_FC_READ_DISCRETE_INPUTS: { /* Header + nb values (code from write_bits) */ ...
0
[ "CWE-125" ]
libmodbus
5ccdf5ef79d742640355d1132fa9e2abc7fbaefc
240,670,869,361,304,850,000,000,000,000,000,000,000
35
Fix VD-1301 and VD-1302 vulnerabilities This patch was contributed by Maor Vermucht and Or Peles from VDOO Connected Trust.
void CLASS process_Sony_0x9402(uchar *buf, ushort len) { if ((imgdata.makernotes.sony.SonyCameraType == LIBRAW_SONY_SLT) || (imgdata.makernotes.sony.SonyCameraType == LIBRAW_SONY_ILCA)) return; if (len < 5) return; short bufx = buf[0x00]; if ((bufx == 0x05) || (bufx == 0xff) || (buf[0x02] != 0x...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
267,330,439,173,245,130,000,000,000,000,000,000,000
18
parse_qt: possible integer overflow
inline t max(const t& a, const t& b, const t& c) { return std::max(std::max(a,b),c); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
191,205,022,296,732,200,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.