func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
ssize_t vhost_chr_read_iter(struct vhost_dev *dev, struct iov_iter *to, int noblock) { DEFINE_WAIT(wait); struct vhost_msg_node *node; ssize_t ret = 0; unsigned size = sizeof(struct vhost_msg); if (iov_iter_count(to) < size) return 0; while (1) { if (!noblock) prepare_to_wait(&dev->wait, &wait, ...
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
245,755,155,277,177,360,000,000,000,000,000,000,000
66
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
tty_cmd_linefeed(struct tty *tty, const struct tty_ctx *ctx) { struct window_pane *wp = ctx->wp; if (ctx->ocy != ctx->orlower) return; if (ctx->bigger || (!tty_pane_full_width(tty, ctx) && !tty_use_margin(tty)) || tty_fake_bce(tty, wp, 8) || !tty_term_has(tty->term, TTYC_CSR) || wp->sx == 1 |...
0
[]
src
b32e1d34e10a0da806823f57f02a4ae6e93d756e
78,350,892,613,986,610,000,000,000,000,000,000,000
39
evbuffer_new and bufferevent_new can both fail (when malloc fails) and return NULL. GitHub issue 1547.
_PUBLIC_ bool trim_string(char *s, const char *front, const char *back) { bool ret = false; size_t front_len; size_t back_len; size_t len; /* Ignore null or empty strings. */ if (!s || (s[0] == '\0')) return false; front_len = front? strlen(front) : 0; back_len = back? strlen(back) : 0; len = strlen(s); ...
0
[]
samba
8eae8d28bce2c3f6a323d3dc48ed10c2e6bb1ba5
283,372,084,500,840,100,000,000,000,000,000,000,000
35
CVE-2013-4476: lib-util: add file_check_permissions() Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
NTSTATUS TCCompleteIrp (PIRP irp, NTSTATUS status, ULONG_PTR information) { irp->IoStatus.Status = status; irp->IoStatus.Information = information; IoCompleteRequest (irp, IO_NO_INCREMENT); return status; }
0
[ "CWE-119", "CWE-787" ]
VeraCrypt
f30f9339c9a0b9bbcc6f5ad38804af39db1f479e
185,077,641,225,555,820,000,000,000,000,000,000,000
7
Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison.
static bool check_ftb_syntax(sys_var *self, THD *thd, set_var *var) { return ft_boolean_check_syntax_string((uchar*) (var->save_result.string_value.str)); }
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
157,109,509,814,520,940,000,000,000,000,000,000,000
5
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
v8::Local<v8::Value> FindFrameByRoutingId(v8::Isolate* isolate, int routing_id) { content::RenderFrame* render_frame = content::RenderFrame::FromRoutingID(routing_id); if (render_frame) return WebFrameRenderer::Create(isolate, render_frame).ToV8(); ...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
176,127,702,477,164,840,000,000,000,000,000,000,000
9
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
int main(int argc, char **argv) { unsigned int i; git_extract_argv0_path(argv[0]); git_setup_gettext(); if (argc == 2 && !strcmp(argv[1], "-h")) usage(fast_import_usage); setup_git_directory(); reset_pack_idx_option(&pack_idx_opts); git_pack_config(); if (!pack_compression_seen && core_compression_seen) ...
0
[ "CWE-119", "CWE-787" ]
git
34fa79a6cde56d6d428ab0d3160cb094ebad3305
84,942,446,975,962,900,000,000,000,000,000,000,000
113
prefer memcpy to strcpy When we already know the length of a string (e.g., because we just malloc'd to fit it), it's nicer to use memcpy than strcpy, as it makes it more obvious that we are not going to overflow the buffer (because the size we pass matches the size in the allocation). This also eliminates calls to st...
static u32 rxclk_rx_s_max_pulse_width(struct cx23885_dev *dev, u32 ns, u16 *divider) { u64 pulse_clocks; if (ns > IR_MAX_DURATION) ns = IR_MAX_DURATION; pulse_clocks = ns_to_pulse_clocks(ns); *divider = pulse_clocks_to_clock_divider(pulse_clocks); cx23888_ir_write4(dev, CX23888_IR_RXCLK_REG, *divider)...
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
162,463,036,201,029,660,000,000,000,000,000,000,000
12
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
bool add_key(Key::Keytype key_type, const LEX_CSTRING *key_name, ha_key_alg algorithm, DDL_options_st ddl) { if (check_add_key(ddl) || !(last_key= new Key(key_type, key_name, algorithm, false, ddl))) return true; alter_info.key_list.push_back(last_key); return false; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
274,632,849,005,610,020,000,000,000,000,000,000,000
9
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...
int r_jwe_set_full_unprotected_header_json_str(jwe_t * jwe, const char * str_unprotected_header) { int ret; json_t * j_unprotected_header = json_loads(str_unprotected_header, JSON_DECODE_ANY, NULL); ret = r_jwe_set_full_unprotected_header_json_t(jwe, j_unprotected_header); json_decref(j_unprotected_header); ...
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
251,913,217,541,793,700,000,000,000,000,000,000,000
9
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
static phys_addr_t pgd_pgtable_alloc(void) { void *ptr = (void *)__get_free_page(PGALLOC_GFP); if (!ptr || !pgtable_page_ctor(virt_to_page(ptr))) BUG(); /* Ensure the zeroed page is visible to the page table walker */ dsb(ishst); return __pa(ptr); }
0
[]
linux
15122ee2c515a253b0c66a3e618bc7ebe35105eb
9,787,432,075,830,255,000,000,000,000,000,000,000
10
arm64: Enforce BBM for huge IO/VMAP mappings ioremap_page_range doesn't honour break-before-make and attempts to put down huge mappings (using p*d_set_huge) over the top of pre-existing table entries. This leads to us leaking page table memory and also gives rise to TLB conflicts and spurious aborts, which have been s...
verify_substring_values (v, value, substr, vtype, e1p, e2p) SHELL_VAR *v; char *value, *substr; int vtype; intmax_t *e1p, *e2p; { char *t, *temp1, *temp2; arrayind_t len; int expok; #if defined (ARRAY_VARS) ARRAY *a; HASH_TABLE *h; #endif /* duplicate behavior of strchr(3) */ t = skipar...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
202,268,796,990,387,200,000,000,000,000,000,000,000
122
bash-4.4-rc2 release
sg_remove_device(struct device *cl_dev, struct class_interface *cl_intf) { struct scsi_device *scsidp = to_scsi_device(cl_dev->parent); Sg_device *sdp = dev_get_drvdata(cl_dev); unsigned long iflags; Sg_fd *sfp; int val; if (!sdp) return; /* want sdp->detaching non-zero as soon as possible */ val = atomic_in...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
106,160,273,077,868,630,000,000,000,000,000,000,000
33
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
void ide_sector_write(IDEState *s) { int64_t sector_num; int n; s->status = READY_STAT | SEEK_STAT | BUSY_STAT; sector_num = ide_get_sector(s); #if defined(DEBUG_IDE) printf("sector=%" PRId64 "\n", sector_num); #endif n = s->nsector; if (n > s->req_nb_sectors) { n = s->req_nb_sector...
0
[ "CWE-189" ]
qemu
940973ae0b45c9b6817bab8e4cf4df99a9ef83d7
272,557,220,141,543,850,000,000,000,000,000,000,000
23
ide: Correct improper smart self test counter reset in ide core. The SMART self test counter was incorrectly being reset to zero, not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE: * We would write off the beginning of a dynamically allocated buffer * We forgot the SMART history Fix this. Signed-o...
regexp (void) { branch(); while (tok == OR) { tok = lex(); branch(); addtok(OR); } }
0
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
121,729,251,659,025,750,000,000,000,000,000,000,000
10
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
merge_parse_objectid(struct node *np, FILE * fp, char *name) { struct node *nnp; /* * printf("merge defval --> %s\n",np->defaultValue); */ nnp = parse_objectid(fp, name); if (nnp) { /* * apply last OID sub-identifier data to the information */ /* ...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
166,848,878,251,070,400,000,000,000,000,000,000,000
44
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
void vrend_set_streamout_targets(struct vrend_context *ctx, UNUSED uint32_t append_bitmask, uint32_t num_targets, uint32_t *handles) { struct vrend_so_target *target; uint i; if (!has_feature(feat_transform_feed...
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
96,151,726,868,106,850,000,000,000,000,000,000,000
56
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
TIFFWriteDirectoryTagTransferfunction(TIFF* tif, uint32* ndir, TIFFDirEntry* dir) { static const char module[] = "TIFFWriteDirectoryTagTransferfunction"; uint32 m; uint16 n; uint16* o; int p; if (dir==NULL) { (*ndir)++; return(1); } m=(1<<tif->tif_dir.td_bitspersample); n=tif->tif_dir.td_samplesperpixel-t...
0
[ "CWE-617" ]
libtiff
de144fd228e4be8aa484c3caf3d814b6fa88c6d9
115,948,368,230,912,520,000,000,000,000,000,000,000
49
TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963
static Image *ReadICONImage(const ImageInfo *image_info, ExceptionInfo *exception) { IconFile icon_file; IconInfo icon_info; Image *image; MagickBooleanType status; MagickSizeType extent; register ssize_t i, x; register Quantum *q; register unsigned char *p; ...
1
[ "CWE-772" ]
ImageMagick
fbb14283450d3001403e7d9725566dd4fb2c3bb5
287,405,269,820,115,900,000,000,000,000,000,000,000
507
Fixed memory leak reported in #457.
u64 gf_sys_clock_high_res() { return OS_GetSysClockHR(); }
0
[ "CWE-787" ]
gpac
f3698bb1bce62402805c3fda96551a23101a32f9
109,584,420,288,678,690,000,000,000,000,000,000,000
4
fix buffer overrun in gf_bin128_parse closes #1204 closes #1205
static void vmx_set_interrupt_shadow(struct kvm_vcpu *vcpu, int mask) { u32 interruptibility_old = vmcs_read32(GUEST_INTERRUPTIBILITY_INFO); u32 interruptibility = interruptibility_old; interruptibility &= ~(GUEST_INTR_STATE_STI | GUEST_INTR_STATE_MOV_SS); if (mask & KVM_X86_SHADOW_INT_MOV_SS) interruptibility ...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
221,718,398,620,304,950,000,000,000,000,000,000,000
15
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
get_user_id_native (u32 * keyid) { size_t rn; char *p = get_user_id (keyid, &rn); char *p2 = utf8_to_native (p, rn, 0); xfree (p); return p2; }
0
[ "CWE-310" ]
gnupg
4bde12206c5bf199dc6e12a74af8da4558ba41bf
241,328,443,314,502,800,000,000,000,000,000,000,000
8
gpg: Distinguish between missing and cleared key flags. * include/cipher.h (PUBKEY_USAGE_NONE): New. * g10/getkey.c (parse_key_usage): Set new flag. -- We do not want to use the default capabilities (derived from the algorithm) if any key flags are given in a signature. Thus if key flags are used in any way, the def...
const VTermLineInfo *vterm_state_get_lineinfo(const VTermState *state, int row) { return state->lineinfo + row; }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
334,691,320,236,616,300,000,000,000,000,000,000
4
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static void cil_reset_rangetransition(struct cil_rangetransition *rangetrans) { if (rangetrans->range_str == NULL) { cil_reset_levelrange(rangetrans->range); } }
0
[ "CWE-416" ]
selinux
f34d3d30c8325e4847a6b696fe7a3936a8a361f3
197,782,370,229,658,770,000,000,000,000,000,000,000
6
libsepol/cil: Destroy classperms list when resetting classpermission Nicolas Iooss reports: A few months ago, OSS-Fuzz found a crash in the CIL compiler, which got reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title is misleading, or is caused by another issue that conflicts with...
del_menutrans_vars(void) { hashitem_T *hi; int todo; hash_lock(&globvarht); todo = (int)globvarht.ht_used; for (hi = globvarht.ht_array; todo > 0 && !got_int; ++hi) { if (!HASHITEM_EMPTY(hi)) { --todo; if (STRNCMP(HI2DI(hi)->di_key, "menutrans_", 10) == 0) delete_var(&globvarht, ...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
174,144,574,563,817,430,000,000,000,000,000,000,000
18
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
static void item_unlink_q(item *it) { pthread_mutex_lock(&lru_locks[it->slabs_clsid]); do_item_unlink_q(it); pthread_mutex_unlock(&lru_locks[it->slabs_clsid]); }
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
101,246,997,127,230,880,000,000,000,000,000,000,000
5
CVE reported by cisco talos
tiffcvt(TIFF* in, TIFF* out) { uint32 width, height; /* image width & height */ uint16 shortv; float floatv; char *stringv; uint32 longv; uint16 v[1]; TIFFGetField(in, TIFFTAG_IMAGEWIDTH, &width); TIFFGetField(in, TIFFTAG_IMAGELENGTH, &height); CopyField(TIFFTAG_SUBFILETYPE, longv); TIFFSetField(out...
0
[ "CWE-119" ]
libtiff
98a254f5b92cea22f5436555ff7fceb12afee84d
170,167,887,180,386,860,000,000,000,000,000,000,000
54
enforce (configurable) memory limit in tiff2rgba fixes #207 fixes #209
static void mariadb_get_charset_info(MYSQL *mysql, MY_CHARSET_INFO *cs) { if (!cs) return; cs->number= mysql->charset->nr; cs->csname= mysql->charset->csname; cs->name= mysql->charset->name; cs->state= 0; cs->comment= NULL; cs->dir= NULL; cs->mbminlen= mysql->charset->char_minlen; cs->mbmaxlen= ...
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
234,853,578,981,854,850,000,000,000,000,000,000,000
16
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
static void xdr_buf_tail_copy_left(const struct xdr_buf *buf, unsigned int base, unsigned int len, unsigned int shift) { const struct kvec *tail = buf->tail; if (base >= tail->iov_len) return; if (len > tail->iov_len - base) len = tail->iov_len - base; /* Shift data into head */ if (shift > buf->page_l...
0
[ "CWE-119", "CWE-787" ]
linux
6d1c0f3d28f98ea2736128ed3e46821496dc3a8c
165,365,942,419,942,170,000,000,000,000,000,000,000
43
sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() This seems to happen fairly easily during READ_PLUS testing on NFS v4.2. I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr greater than the number of pages in the array. So let's just return early if we're setting base to a poin...
static int check_tty_count(struct tty_struct *tty, const char *routine) { #ifdef CHECK_TTY_COUNT struct list_head *p; int count = 0; spin_lock(&tty_files_lock); list_for_each(p, &tty->tty_files) { count++; } spin_unlock(&tty_files_lock); if (tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subtyp...
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
53,308,435,656,836,810,000,000,000,000,000,000,000
23
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
static int rdn_modify_callback(struct ldb_request *req, struct ldb_reply *ares) { struct rename_context *ac; ac = talloc_get_type(req->context, struct rename_context); if (!ares) { return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } if (ares->type == LDB_REPLY_REFERRAL) { return ld...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
302,025,647,224,329,600,000,000,000,000,000,000,000
30
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
fill_evalarg_from_eap(evalarg_T *evalarg, exarg_T *eap, int skip) { init_evalarg(evalarg); evalarg->eval_flags = skip ? 0 : EVAL_EVALUATE; if (eap != NULL) { evalarg->eval_cstack = eap->cstack; if (getline_equal(eap->getline, eap->cookie, getsourceline)) { evalarg->eval_getline = eap->getline; ...
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
99,457,302,818,775,640,000,000,000,000,000,000,000
14
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
PHP_FUNCTION(fnmatch) { char *pattern, *filename; int pattern_len, filename_len; long flags = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &pattern, &pattern_len, &filename, &filename_len, &flags) == FAILURE) { return; } if (filename_len >= MAXPATHLEN) { php_error_docref(NULL TSRMLS_CC, E...
1
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
272,621,086,094,644,100,000,000,000,000,000,000,000
21
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int mymemwrite(RAnalEsil *esil, ut64 addr, const ut8 *buf, int len) { RListIter *iter; AeaMemItem *n; r_list_foreach (mymemxsw, iter, n) { if (addr == n->addr) { return len; } } if (!r_io_is_valid_offset (esil->anal->iob.io, addr, 0)) { return false; } n = R_NEW (AeaMemItem); if (n) { n->addr ...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
36,960,057,113,245,486,000,000,000,000,000,000,000
19
Fix #12375 - Crash in bd+ao (#12382)
void Server::handleCommand_Init2(NetworkPacket* pkt) { session_t peer_id = pkt->getPeerId(); verbosestream << "Server: Got TOSERVER_INIT2 from " << peer_id << std::endl; m_clients.event(peer_id, CSE_GotInit2); u16 protocol_version = m_clients.getProtocolVersion(peer_id); std::string lang; if (pkt->getSize() > 0...
0
[ "CWE-276" ]
minetest
3693b6871eba268ecc79b3f52d00d3cefe761131
306,482,839,987,909,970,000,000,000,000,000,000,000
62
Prevent players accessing inventories of other players (#10341)
static inline void arch_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm) { paravirt_arch_dup_mmap(oldmm, mm); }
0
[ "CWE-362" ]
linux
71b3c126e61177eb693423f2e18a1914205b165e
175,450,320,719,429,560,000,000,000,000,000,000,000
5
x86/mm: Add barriers and document switch_mm()-vs-flush synchronization When switch_mm() activates a new PGD, it also sets a bit that tells other CPUs that the PGD is in use so that TLB flush IPIs will be sent. In order for that to work correctly, the bit needs to be visible prior to loading the PGD and therefore star...
Pl_LZWDecoder::write(unsigned char* bytes, size_t len) { for (size_t i = 0; i < len; ++i) { this->buf[next++] = bytes[i]; if (this->next == 3) { this->next = 0; } this->bits_available += 8; if (this->bits_available >= this->code_size) { sendNextCode(); } } }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
275,606,982,036,743,500,000,000,000,000,000,000,000
16
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int decide_stripe_size(struct btrfs_fs_devices *fs_devices, struct alloc_chunk_ctl *ctl, struct btrfs_device_info *devices_info) { struct btrfs_fs_info *info = fs_devices->fs_info; /* * Round down to number of usable stripes, devs_increment can be any * number so we can't use round_down(...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
304,751,717,331,678,470,000,000,000,000,000,000,000
33
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
int snd_interval_ratnum(struct snd_interval *i, unsigned int rats_count, const struct snd_ratnum *rats, unsigned int *nump, unsigned int *denp) { unsigned int best_num, best_den; int best_diff; unsigned int k; struct snd_interval t; int err; unsigned int result_num, result_den; int result_diff; best_num ...
0
[ "CWE-416", "CWE-362" ]
linux
3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4
212,473,843,118,736,860,000,000,000,000,000,000,000
105
ALSA: pcm : Call kill_fasync() in stream lock Currently kill_fasync() is called outside the stream lock in snd_pcm_period_elapsed(). This is potentially racy, since the stream may get released even during the irq handler is running. Although snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't guarantee th...
collated_compare (const void *a, const void *b) { char *const *ps1 = a; char *s1 = *ps1; char *const *ps2 = b; char *s2 = *ps2; if (s1 == s2) return 0; if (s1 == NULL) return 1; if (s2 == NULL) return -1; return strcoll (s1, s2); }
0
[ "CWE-119" ]
gnulib
2d1bd71ec70a31b01d01b734faa66bb1ed28961f
18,861,264,397,592,540,000,000,000,000,000,000,000
13
glob: fix heap buffer overflow * lib/glob.c (glob): Fix off-by-one error introduced into glibc in commit dd7d45e838a42b0ed470c44b55901ea98d0c2bab dated 1997-10-29 20:33:40. Problem reported by Tim Rühsen in: https://sourceware.org/bugzilla/show_bug.cgi?id=22320 Fix suggested by Bruno Haible.
const char *h2_conn_mpm_name(void) { check_modules(0); return mpm_module? mpm_module->name : "unknown"; }
0
[ "CWE-444" ]
mod_h2
825de6a46027b2f4c30d7ff5a0c8b852d639c207
76,663,144,940,349,980,000,000,000,000,000,000,000
5
* Fixed keepalives counter on slave connections.
static inline int xfrm_decode_session_reverse(struct sk_buff *skb, struct flowi *fl, unsigned int family) { return __xfrm_decode_session(skb, fl, family, 1); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
197,257,128,769,891,700,000,000,000,000,000,000,000
6
xfrm: clean up xfrm protocol checks In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()") I introduced a check for xfrm protocol, but according to Herbert IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so it should be removed from validate_tmpl(). And, IPSEC_PROTO_ANY is expected to only m...
worker_handle_service_reply(struct comm_point* c, void* arg, int error, struct comm_reply* reply_info) { struct outbound_entry* e = (struct outbound_entry*)arg; struct worker* worker = e->qstate->env->worker; struct serviced_query *sq = e->qsent; verbose(VERB_ALGO, "worker svcd callback for qstate %p", e->qstate...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
85,289,851,692,409,970,000,000,000,000,000,000,000
30
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
static inline bool cpu_has_vmx_invvpid_individual_addr(void) { return vmx_capability.vpid & VMX_VPID_EXTENT_INDIVIDUAL_ADDR_BIT; }
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
212,064,345,823,001,150,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...
int usbnet_manage_power(struct usbnet *dev, int on) { dev->intf->needs_remote_wakeup = on; return 0; }
0
[ "CWE-703" ]
linux
1666984c8625b3db19a9abc298931d35ab7bc64b
212,930,104,058,748,000,000,000,000,000,000,000,000
5
usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of L...
int write_data_suffix(SORT_INFO *sort_info, my_bool fix_datafile) { MI_INFO *info=sort_info->info; if (info->s->options & HA_OPTION_COMPRESS_RECORD && fix_datafile) { uchar buff[MEMMAP_EXTRA_MARGIN]; bzero(buff,sizeof(buff)); if (my_b_write(&info->rec_cache,buff,sizeof(buff))) { mi_check_pr...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
52,196,584,319,734,530,000,000,000,000,000,000,000
18
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
MagickExport CacheType GetImagePixelCacheType(const Image *image) { CacheInfo *magick_restrict cache_info; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); assert(image->cache != (Cache) NULL); cache_info=(CacheInfo *) image->cache; assert(cache_info->signature == Magic...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
aecd0ada163a4d6c769cec178955d5f3e9316f2f
58,223,125,318,446,485,000,000,000,000,000,000,000
12
Set pixel cache to undefined if any resource limit is exceeded
config_monitor( config_tree *ptree ) { int_node *pfilegen_token; const char *filegen_string; const char *filegen_file; FILEGEN *filegen; filegen_node *my_node; attr_val *my_opts; int filegen_type; int filegen_flag; /* Set the statistics directory */ if (ptree->stats_dir) stats_config(STATS_STATSDIR, ptre...
1
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
195,872,773,758,886,800,000,000,000,000,000,000,000
137
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
static pack_t *FS_LoadZipFile(const char *zipfile, const char *basename) { fileInPack_t *buildBuffer; pack_t *pack; unzFile uf; int err; unz_global_info gi; char filename_inzip[MAX_ZPATH]; unz_file_info file_info; int i, len; long hash; int fs_numHeaderLongs; int *fs_headerLongs; char ...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
131,857,655,445,534,430,000,000,000,000,000,000,000
99
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static double y2scr_pos(ASS_Renderer *render_priv, double y) { return y * render_priv->orig_height / render_priv->track->PlayResY + render_priv->settings.top_margin; }
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
279,793,767,688,325,600,000,000,000,000,000,000,000
5
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
static st32 getnummemendbang (const char *input) { st32 res; err = false; if (!input || (strlen (input) < 2) || (input[strlen(input) - 2] != ']' || !r_str_endswith (input, "!"))) { err = true; return 0; } char *temp = r_str_ndup (input, strlen (input) - 2); if (!temp) { err = true; return 0; } res = get...
0
[ "CWE-125", "CWE-787" ]
radare2
e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7
321,250,880,244,037,620,000,000,000,000,000,000,000
16
Fix #12417/#12418 (arm assembler heap overflows)
static const char *server_hostname_port(cmd_parms *cmd, void *dummy, const char *arg) { const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE); const char *portstr, *part; char *scheme; int port; if (err != NULL) { return err; } if (apr_fnmatch_test(arg)) return a...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
35,917,552,559,870,385,000,000,000,000,000,000,000
46
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
void Item_allany_subselect::print(String *str, enum_query_type query_type) { if (test_strategy(SUBS_IN_TO_EXISTS)) str->append(STRING_WITH_LEN("<exists>")); else { left_expr->print(str, query_type); str->append(' '); str->append(func->symbol(all)); str->append(all ? " all " : " any ", 5); } ...
0
[ "CWE-89" ]
server
3c209bfc040ddfc41ece8357d772547432353fd2
23,807,505,486,623,910,000,000,000,000,000,000,000
13
MDEV-25994: Crash with union of my_decimal type in ORDER BY clause When single-row subquery fails with "Subquery reutrns more than 1 row" error, it will raise an error and return NULL. On the other hand, Item_singlerow_subselect sets item->maybe_null=0 for table-less subqueries like "(SELECT not_null_value)" (*) Th...
_copyCreateForeignTableStmt(const CreateForeignTableStmt *from) { CreateForeignTableStmt *newnode = makeNode(CreateForeignTableStmt); CopyCreateStmtFields((const CreateStmt *) from, (CreateStmt *) newnode); COPY_STRING_FIELD(servername); COPY_NODE_FIELD(options); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
18,424,477,631,395,629,000,000,000,000,000,000,000
11
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...
void HttpIntegrationTest::checkSimpleRequestSuccess(uint64_t expected_request_size, uint64_t expected_response_size, IntegrationStreamDecoder* response) { EXPECT_TRUE(upstream_request_->complete()); EXPECT_EQ(exp...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
127,278,987,846,285,380,000,000,000,000,000,000,000
10
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
int tls12_get_sigandhash(unsigned char *p, const EVP_PKEY *pk, const EVP_MD *md) { int sig_id, md_id; md_id = tls12_find_id(EVP_MD_type(md), tls12_md, sizeof(tls12_md)/sizeof(tls12_lookup)); if (md_id == -1) return 0; sig_id = tls12_get_sigid(pk); if (sig_id == -1) return 0; p[0] = (unsigned char)md_id; ...
0
[]
openssl
4817504d069b4c5082161b02a22116ad75f822b1
59,555,856,537,197,730,000,000,000,000,000,000,000
14
PR: 2658 Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Reviewed by: steve Support for TLS/DTLS heartbeats.
Compression_method *compression_method() const { return compression_method_ptr; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
187,386,118,023,146,900,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
_equalConst(const Const *a, const Const *b) { COMPARE_SCALAR_FIELD(consttype); COMPARE_SCALAR_FIELD(consttypmod); COMPARE_SCALAR_FIELD(constcollid); COMPARE_SCALAR_FIELD(constlen); COMPARE_SCALAR_FIELD(constisnull); COMPARE_SCALAR_FIELD(constbyval); COMPARE_LOCATION_FIELD(location); /* * We treat all NULL co...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
245,589,810,028,187,960,000,000,000,000,000,000,000
19
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 nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state *state) { int ret; /* memory barrier prior to reading state->n_* */ smp_rmb(); ret = nfs4_open_recover_helper(opendata, FMODE_READ|FMODE_WRITE); if (ret != 0) return ret; ret = nfs4_open_recover_helper(opendata, FMODE_WRITE); if (r...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
257,932,162,284,368,900,000,000,000,000,000,000,000
28
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
SYSCALL_DEFINE2(ftruncate, unsigned int, fd, unsigned long, length) { long ret = do_sys_ftruncate(fd, length, 1); /* avoid REGPARM breakage on x86: */ asmlinkage_protect(2, ret, fd, length); return ret; }
0
[ "CWE-732" ]
linux-stable
e57712ebebbb9db7d8dcef216437b3171ddcf115
42,782,614,012,321,600,000,000,000,000,000,000,000
7
merge fchmod() and fchmodat() guts, kill ancient broken kludge The kludge in question is undocumented and doesn't work for 32bit binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as mode had (since 0.99.14v and contrary to behaviour of any other Unix, prescriptions of POSIX, SuS and our own manpages) was kinda-...
nfp_abm_u32_knode_replace(struct nfp_abm_link *alink, struct tc_cls_u32_knode *knode, __be16 proto, struct netlink_ext_ack *extack) { struct nfp_abm_u32_match *match = NULL, *iter; unsigned int tos_off; u8 mask, val; int err; if (!nfp_abm_u32_check_knode(alink->abm, knode, proto, extack)) { err = -EOP...
0
[ "CWE-400", "CWE-401" ]
linux
78beef629fd95be4ed853b2d37b832f766bd96ca
192,338,825,862,744,060,000,000,000,000,000,000,000
62
nfp: abm: fix memory leak in nfp_abm_u32_knode_replace In nfp_abm_u32_knode_replace if the allocation for match fails it should go to the error handling instead of returning. Updated other gotos to have correct errno returned, too. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: David S. Mil...
install_sublevel(void) { sublevel++; }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
52,485,863,151,012,580,000,000,000,000,000,000,000
4
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 ...
int sldns_str2wire_loc_buf(const char* str, uint8_t* rd, size_t* len) { uint32_t latitude = 0; uint32_t longitude = 0; uint32_t altitude = 0; uint32_t equator = (uint32_t)1<<31; /* 2**31 */ /* only support version 0 */ uint32_t h = 0; uint32_t m = 0; uint8_t size_b = 1, size_e = 2; uint8_t horiz_pre_b = 1, h...
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
308,821,196,530,325,050,000,000,000,000,000,000,000
168
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
bool got_fatal_error() { return unhandled_errors > 0; }
0
[ "CWE-416" ]
server
0beed9b5e933f0ff79b3bb346524f7a451d14e38
12,862,045,268,914,671,000,000,000,000,000,000,000
4
MDEV-28097 use-after-free when WHERE has subquery with an outer reference in HAVING when resolving WHERE and ON clauses, do not look in SELECT list/aliases.
AP_CORE_DECLARE(const char *) ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *if_config) { void **new_space; core_dir_config *new = ap_get_module_config(if_config, &core_module); if (!conf->sec_if) { ...
0
[ "CWE-416", "CWE-284" ]
httpd
4cc27823899e070268b906ca677ee838d07cf67a
113,515,551,757,317,940,000,000,000,000,000,000,000
30
core: Disallow Methods' registration at run time (.htaccess), they may be used only if registered at init time (httpd.conf). Calling ap_method_register() in children processes is not the right scope since it won't be shared for all requests. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7...
static void discard_swap_cluster(struct swap_info_struct *si, pgoff_t start_page, pgoff_t nr_pages) { struct swap_extent *se = si->curr_swap_extent; int found_extent = 0; while (nr_pages) { struct list_head *lh; if (se->start_page <= start_page && start_page < se->start_page + se->nr_pages) { pgo...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
161,351,089,376,304,010,000,000,000,000,000,000,000
34
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(...
inline void Http2Session::RemoveStream(Http2Stream* stream) { if (streams_.empty() || stream == nullptr) return; // Nothing to remove, item was never added? streams_.erase(stream->id()); DecrementCurrentSessionMemory(sizeof(*stream)); }
0
[ "CWE-416" ]
node
7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed
337,559,811,940,118,030,000,000,000,000,000,000,000
6
src: use unique_ptr for WriteWrap This commit attempts to avoid a use-after-free error by using unqiue_ptr and passing a reference to it. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 PR-URL: https://github.com/nodejs-private/node-private/pull/238 Reviewed-By: Michael Dawson <...
ZEND_API int add_get_assoc_stringl_ex(zval *arg, const char *key, uint key_len, const char *str, uint length, void **dest, int duplicate) /* {{{ */ { zval *tmp; if (UNEXPECTED(length > INT_MAX)) { zend_error_noreturn(E_ERROR, "String overflow, max size is %d", INT_MAX); } MAKE_STD_ZVAL(tmp); ZVAL_STRINGL(tmp, ...
0
[ "CWE-416" ]
php-src
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
108,993,786,069,600,260,000,000,000,000,000,000,000
13
Fix bug #73147: Use After Free in PHP7 unserialize()
static void __loaded_vmcs_clear(void *arg) { struct loaded_vmcs *loaded_vmcs = arg; int cpu = raw_smp_processor_id(); if (loaded_vmcs->cpu != cpu) return; /* vcpu migration can race with cpu offline */ if (per_cpu(current_vmcs, cpu) == loaded_vmcs->vmcs) per_cpu(current_vmcs, cpu) = NULL; vmcs_clear(loaded_v...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
258,269,515,418,000,430,000,000,000,000,000,000,000
28
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static int micsetup(struct airo_info *ai) { int i; if (ai->tfm == NULL) ai->tfm = crypto_alloc_cipher("aes", 0, CRYPTO_ALG_ASYNC); if (IS_ERR(ai->tfm)) { airo_print_err(ai->dev->name, "failed to load transform for AES"); ai->tfm = NULL; return ERROR; ...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
238,978,875,534,468,530,000,000,000,000,000,000,000
18
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
qboolean FS_FileInPathExists(const char *testpath) { FILE *filep; filep = Sys_FOpen(testpath, "rb"); if(filep) { fclose(filep); return qtrue; } return qfalse; }
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
207,993,760,414,002,800,000,000,000,000,000,000,000
14
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static int hugetlb_sysctl_handler_common(bool obey_mempolicy, struct ctl_table *table, int write, void *buffer, size_t *length, loff_t *ppos) { struct hstate *h = &default_hstate; unsigned long tmp = h->max_huge_pages; int ret; if (!hugepages_supported()) return -EOPNOTSUPP; ret = proc_hugetlb_doulongv...
0
[ "CWE-362" ]
linux
17743798d81238ab13050e8e2833699b54e15467
25,281,200,662,477,140,000,000,000,000,000,000,000
22
mm/hugetlb: fix a race between hugetlb sysctl handlers There is a race between the assignment of `table->data` and write value to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on the other thread. CPU0: CPU1: proc_sys_write ...
static int __init early_acpi_parse_madt_lapic_addr_ovr(void) { int count; if (!boot_cpu_has(X86_FEATURE_APIC)) return -ENODEV; /* * Note that the LAPIC address is obtained from the MADT (32-bit value) * and (optionally) overridden by a LAPIC_ADDR_OVR entry (64-bit value). */ count = acpi_table_parse_madt...
0
[ "CWE-120" ]
linux
dad5ab0db8deac535d03e3fe3d8f2892173fa6a4
98,359,716,565,094,590,000,000,000,000,000,000,000
24
x86/acpi: Prevent out of bound access caused by broken ACPI tables The bus_irq argument of mp_override_legacy_irq() is used as the index into the isa_irq_to_gsi[] array. The bus_irq argument originates from ACPI_MADT_TYPE_IO_APIC and ACPI_MADT_TYPE_INTERRUPT items in the ACPI tables, but is nowhere sanity checked. Th...
static void ehci_set_fetch_addr(EHCIState *s, int async, uint32_t addr) { if (async) { s->a_fetch_addr = addr; } else { s->p_fetch_addr = addr; } }
0
[]
qemu
791f97758e223de3290592d169f8e6339c281714
258,881,888,343,717,100,000,000,000,000,000,000,000
8
usb: ehci: fix memory leak in ehci_init_transfer In ehci_init_transfer function, if the 'cpage' is bigger than 4, it doesn't free the 'p->sgl' once allocated previously thus leading a memory leak issue. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog...
static char* get_printer_config_path(const rdpSettings* settings, const WCHAR* name, size_t length) { char* dir = GetCombinedPath(settings->ConfigPath, "printers"); char* bname = crypto_base64_encode((const BYTE*)name, (int)length); char* config = GetCombinedPath(dir, bname); if (config && !PathFileExistsA(config)...
0
[ "CWE-125" ]
FreeRDP
6b485b146a1b9d6ce72dfd7b5f36456c166e7a16
58,361,929,982,522,140,000,000,000,000,000,000,000
19
Fixed oob read in irp_write and similar
int nla_server_recv(rdpNla* nla) { int status = -1; wStream* s; WINPR_ASSERT(nla); s = nla_server_recv_stream(nla); if (!s) goto fail; status = nla_decode_ts_request(nla, s); fail: Stream_Free(s, TRUE); return status; }
0
[]
FreeRDP
479e891545473f01c187daffdfa05fc752b54b72
239,969,367,875,449,400,000,000,000,000,000,000,000
16
check return values for SetCredentialsAttributes, throw warnings for unsupported attributes
TEST(ComparisonMatchExpression, StringMatchingWithNullCollatorUsesBinaryComparison) { BSONObj operand = BSON("a" << "string"); EqualityMatchExpression eq("a", operand["a"]); ASSERT(!eq.matchesBSON(BSON("a" << "string2"), N...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
260,578,883,203,634,800,000,000,000,000,000,000,000
8
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
static long _perf_ioctl(struct perf_event *event, unsigned int cmd, unsigned long arg) { void (*func)(struct perf_event *); u32 flags = arg; switch (cmd) { case PERF_EVENT_IOC_ENABLE: func = _perf_event_enable; break; case PERF_EVENT_IOC_DISABLE: func = _perf_event_disable; break; case PERF_EVENT_IOC_RES...
0
[ "CWE-284", "CWE-264" ]
linux
f63a8daa5812afef4f06c962351687e1ff9ccb2b
23,477,174,522,279,830,000,000,000,000,000,000,000
63
perf: Fix event->ctx locking There have been a few reported issues wrt. the lack of locking around changing event->ctx. This patch tries to address those. It avoids the whole rwsem thing; and while it appears to work, please give it some thought in review. What I did fail at is sensible runtime checks on the use of ...
static unsigned long set_max_huge_pages(struct hstate *h, unsigned long count, nodemask_t *nodes_allowed) { unsigned long min_count, ret; if (h->order >= MAX_ORDER) return h->max_huge_pages; /* * Increase the pool size * First take pages out of surplus state. Then make up the * remaining difference ...
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
76,561,286,071,227,450,000,000,000,000,000,000,000
73
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
static void print_tags(blkid_dev dev, char *show[], int output) { blkid_tag_iterate iter; const char *type, *value, *devname; int num = 1; static int first = 1; if (!dev) return; if (output & OUTPUT_PRETTY_LIST) { pretty_print_dev(dev); return; } devname = blkid_dev_devname(dev); if (output & OUT...
0
[ "CWE-77" ]
util-linux
89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc
198,675,926,795,647,580,000,000,000,000,000,000,000
43
libblkid: care about unsafe chars in cache The high-level libblkid API uses /run/blkid/blkid.tab cache to store probing results. The cache format is <device NAME="value" ...>devname</device> and unfortunately the cache code does not escape quotation marks: # mkfs.ext4 -L 'AAA"BBB' # cat /run/blkid/blkid.t...
main(int argc, char *argv[]) { int i, c; FILE *ifp = 0, *ofp = 0; const char *ifp_filename = "<stdin>"; const char *ofp_filename = "<stdout>"; const char *set_font_name = 0; struct font_reader fr; uint32_t rfork_len; int raw = 0, macbinary = 1, applesingle = 0, appledouble = 0, binhex = 0; Clp_Parser...
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
19,834,615,380,377,593,000,000,000,000,000,000,000
198
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
static void unregister_sched_domain_sysctl(void) { if (sd_sysctl_header) unregister_sysctl_table(sd_sysctl_header); sd_sysctl_header = NULL; if (sd_ctl_dir[0].child) sd_free_ctl_entry(&sd_ctl_dir[0].child); }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
231,818,791,789,479,600,000,000,000,000,000,000,000
8
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
static void __proc_set_tty(struct tty_struct *tty) { unsigned long flags; spin_lock_irqsave(&tty->ctrl_lock, flags); /* * The session and fg pgrp references will be non-NULL if * tiocsctty() is stealing the controlling tty */ put_pid(tty->session); put_pid(tty->pgrp); tty->pgrp = get_pid(task_pgrp(current)...
1
[ "CWE-416" ]
linux
c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9
148,065,517,577,564,860,000,000,000,000,000,000,000
23
tty: Fix ->session locking Currently, locking of ->session is very inconsistent; most places protect it using the legacy tty mutex, but disassociate_ctty(), __do_SAK(), tiocspgrp() and tiocgsid() don't. Two of the writers hold the ctrl_lock (because they already need it for ->pgrp), but __proc_set_tty() doesn't do tha...
static int xfrm_expand_policies(const struct flowi *fl, u16 family, struct xfrm_policy **pols, int *num_pols, int *num_xfrms) { int i; if (*num_pols == 0 || !pols[0]) { *num_pols = 0; *num_xfrms = 0; return 0; } if (IS_ERR(pols[0])) return PTR_ERR(pols[0]); *num_xfrms = pols[0]->xfrm_nr; #ifdef ...
1
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
160,505,295,107,260,790,000,000,000,000,000,000,000
44
xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup() xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of pols[0]. This refcount can be dropped in xfrm_expand_policies() when xfrm_expand_policies() return error. pols[0]'s refcount is balanced in here. But xfrm_bundle_look...
static ut64 va2pa(uint64_t addr, ut32 n_maps, cache_map_t *maps, RzBuffer *cache_buf, ut64 slide, ut32 *offset, ut32 *left) { ut64 res = UT64_MAX; ut32 i; addr -= slide; for (i = 0; i < n_maps; i++) { if (addr >= maps[i].address && addr < maps[i].address + maps[i].size) { res = maps[i].fileOffset + addr - ma...
0
[ "CWE-787" ]
rizin
556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810
66,824,782,201,858,095,000,000,000,000,000,000,000
21
Fix oob write in dyldcache When the individual n_slide_infos were too high, the sum would overflow and too few entries would be allocated.
static long get_nr_files(void) { return percpu_counter_read_positive(&nr_files); }
0
[ "CWE-17" ]
linux
eee5cc2702929fd41cce28058dc6d6717f723f87
128,556,034,979,285,020,000,000,000,000,000,000,000
4
get rid of s_files and files_lock The only thing we need it for is alt-sysrq-r (emergency remount r/o) and these days we can do just as well without going through the list of files. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
_equalCurrentOfExpr(const CurrentOfExpr *a, const CurrentOfExpr *b) { COMPARE_SCALAR_FIELD(cvarno); COMPARE_STRING_FIELD(cursor_name); COMPARE_SCALAR_FIELD(cursor_param); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
109,809,586,224,970,000,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...
void _xml_endNamespaceDeclHandler(void *userData, const XML_Char *prefix) { xml_parser *parser = (xml_parser *)userData; if (parser && parser->endNamespaceDeclHandler) { zval *retval, *args[2]; args[0] = _xml_resource_zval(parser->index); args[1] = _xml_xmlchar_zval(prefix, 0, parser->target_encoding); if (...
0
[ "CWE-787" ]
php-src
7d163e8a0880ae8af2dd869071393e5dc07ef271
231,262,317,723,537,400,000,000,000,000,000,000,000
14
truncate results at depth of 255 to prevent corruption
_dbus_auth_get_buffer (DBusAuth *auth, DBusString **buffer) { _dbus_assert (auth != NULL); _dbus_assert (!auth->buffer_outstanding); *buffer = &auth->incoming; auth->buffer_outstanding = TRUE; }
0
[ "CWE-59" ]
dbus
47b1a4c41004bf494b87370987b222c934b19016
34,506,079,189,498,280,000,000,000,000,000,000,000
10
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...
GF_Err gf_isom_set_y3d_info(GF_ISOFile *movie, u32 trackNumber, u32 sampleDescriptionIndex, GF_ISOM_Y3D_Info *info) { GF_Err e; u32 proj_type; GF_SampleEntryBox *ent; GF_TrackBox *trak; e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE); if (e) return e; trak = gf_isom_get_track_from_file(movie, trackNumber); if (...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
156,971,284,785,629,070,000,000,000,000,000,000,000
103
fixed #1706
static int print_media_desc(const pjmedia_sdp_media *m, char *buf, pj_size_t len) { char *p = buf; char *end = buf+len; unsigned i; int printed; /* check length for the "m=" line. */ if (len < (pj_size_t)m->desc.media.slen+m->desc.transport.slen+12+24) { return -1; } *p++ = 'm'; /*...
1
[ "CWE-121", "CWE-120", "CWE-787" ]
pjproject
560a1346f87aabe126509bb24930106dea292b00
133,454,390,800,145,620,000,000,000,000,000,000,000
63
Merge pull request from GHSA-f5qg-pqcg-765m
int ovl_open_maybe_copy_up(struct dentry *dentry, unsigned int file_flags) { int err = 0; struct path realpath; enum ovl_path_type type; type = ovl_path_real(dentry, &realpath); if (ovl_open_need_copy_up(file_flags, type, realpath.dentry)) { err = ovl_want_write(dentry); if (!err) { if (file_flags & O_TRUN...
0
[ "CWE-863" ]
linux
c0ca3d70e8d3cf81e2255a217f7ca402f5ed0862
173,645,383,564,731,200,000,000,000,000,000,000,000
20
ovl: modify ovl_permission() to do checks on two inodes Right now ovl_permission() calls __inode_permission(realinode), to do permission checks on real inode and no checks are done on overlay inode. Modify it to do checks both on overlay inode as well as underlying inode. Checks on overlay inode will be done with the...
gst_date_time_new_now_local_time (void) { return gst_date_time_new_from_g_date_time (g_date_time_new_now_local ()); }
0
[ "CWE-125" ]
gstreamer
9398b7f1a75b38844ae7050b5a7967e4cdebe24f
291,568,273,470,421,940,000,000,000,000,000,000,000
4
datetime: fix potential out-of-bound read on malformed datetime string https://bugzilla.gnome.org/show_bug.cgi?id=777263
ldbm_config_internal_set(struct ldbminfo *li, char *attrname, char *value) { char err_buf[SLAPI_DSE_RETURNTEXT_SIZE]; struct berval bval; bval.bv_val = value; bval.bv_len = strlen(value); if (ldbm_config_set((void *)li, attrname, ldbm_config, &bval, err_buf, CONFIG_PHASE_IN...
0
[ "CWE-399", "CWE-203" ]
389-ds-base
cc0f69283abc082488824702dae485b8eae938bc
53,530,010,728,837,190,000,000,000,000,000,000,000
17
Issue 4480 - Unexpected info returned to ldap request (#4491) Bug description: If the bind entry does not exist, the bind result info reports that 'No such entry'. It should not give any information if the target entry exists or not Fix description: Does not return any additional information d...
static int set_msr_hyperv_pw(struct kvm_vcpu *vcpu, u32 msr, u64 data) { struct kvm *kvm = vcpu->kvm; switch (msr) { case HV_X64_MSR_GUEST_OS_ID: kvm->arch.hv_guest_os_id = data; /* setting guest os id to zero disables hypercall page */ if (!kvm->arch.hv_guest_os_id) kvm->arch.hv_hypercall &= ~HV_X64_MSR_H...
0
[]
linux
6d1068b3a98519247d8ba4ec85cd40ac136dbdf9
134,747,890,191,313,390,000,000,000,000,000,000,000
41
KVM: x86: invalid opcode oops on SET_SREGS with OSXSAVE bit set (CVE-2012-4461) On hosts without the XSAVE support unprivileged local user can trigger oops similar to the one below by setting X86_CR4_OSXSAVE bit in guest cr4 register using KVM_SET_SREGS ioctl and later issuing KVM_RUN ioctl. invalid opcode: 0000 [#2]...
nautilus_file_update_name (NautilusFile *file, const char *name) { gboolean ret; ret = update_name_internal (file, name, TRUE); if (ret) { update_links_if_target (file); } return ret; }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
307,618,123,619,912,660,000,000,000,000,000,000,000
12
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-...
mailimf_unparsed_fields_parse(const char * message, size_t length, size_t * indx, struct mailimf_unparsed_fields ** result) { size_t cur_token; clist * list; struct mailimf_unparsed_fields * fields; int r; int res; cur_token = * indx; list = NULL; r = mailimf_struct_multiple_parse(m...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
310,426,217,844,780,740,000,000,000,000,000,000,000
64
Fixed crash #274
buf_add_chunk_with_capacity(buf_t *buf, size_t capacity, int capped) { chunk_t *chunk; struct timeval now; if (CHUNK_ALLOC_SIZE(capacity) < buf->default_chunk_size) { chunk = chunk_new_with_alloc_size(buf->default_chunk_size); } else if (capped && CHUNK_ALLOC_SIZE(capacity) > MAX_CHUNK_ALLOC) { chunk = ...
0
[]
tor
19df037e53331ae528b876f225be08f198e0f8b6
297,650,065,430,345,660,000,000,000,000,000,000,000
26
Log malformed hostnames in socks5 request respecting SafeLogging
static RAnalValue *anal_pcrel_disp_mov(RAnal* anal, RAnalOp* op, ut8 disp, int size){ RAnalValue *ret = r_anal_value_new (); if (size==2) { ret->base = op->addr+4; ret->delta = disp<<1; } else { ret->base = (op->addr+4) & ~0x03; ret->delta = disp<<2; } return ret; }
0
[ "CWE-125" ]
radare2
77c47cf873dd55b396da60baa2ca83bbd39e4add
145,413,884,877,270,960,000,000,000,000,000,000,000
12
Fix #9903 - oobread in RAnal.sh
xfs_bulkstat_fmt( struct xfs_ibulk *breq, const struct xfs_bulkstat *bstat) { if (copy_to_user(breq->ubuffer, bstat, sizeof(struct xfs_bulkstat))) return -EFAULT; return xfs_ibulk_advance(breq, sizeof(struct xfs_bulkstat)); }
0
[ "CWE-125" ]
linux
983d8e60f50806f90534cc5373d0ce867e5aaf79
315,944,173,172,825,240,000,000,000,000,000,000,000
8
xfs: map unwritten blocks in XFS_IOC_{ALLOC,FREE}SP just like fallocate The old ALLOCSP/FREESP ioctls in XFS can be used to preallocate space at the end of files, just like fallocate and RESVSP. Make the behavior consistent with the other ioctls. Reported-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Darric...