func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static void rtc_irq_eoi_tracking_reset(struct kvm_ioapic *ioapic) { ioapic->rtc_status.pending_eoi = 0; bitmap_zero(ioapic->rtc_status.dest_map, KVM_MAX_VCPUS); }
0
[ "CWE-20" ]
kvm
5678de3f15010b9022ee45673f33bcfc71d47b60
114,160,523,066,719,230,000,000,000,000,000,000,000
5
KVM: ioapic: fix assignment of ioapic->rtc_status.pending_eoi (CVE-2014-0155) QE reported that they got the BUG_ON in ioapic_service to trigger. I cannot reproduce it, but there are two reasons why this could happen. The less likely but also easiest one, is when kvm_irq_delivery_to_apic does not deliver to any APIC a...
PHP_FUNCTION(imagecolorallocatealpha) { zval *IM; long red, green, blue, alpha; gdImagePtr im; int ct = (-1); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rllll", &IM, &red, &green, &blue, &alpha) == FAILURE) { RETURN_FALSE; } ZEND_FETCH_RESOURCE(im, gdImagePtr, &IM, -1, "Image", le_gd); ct = gdIma...
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
187,146,327,128,409,530,000,000,000,000,000,000,000
18
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
static void CL_CompletePlayerName( char *args, int argNum ) { if( argNum == 2 ) { char names[MAX_CLIENTS][MAX_NAME_LENGTH]; const char *namesPtr[MAX_CLIENTS]; int i; int clientCount; int nameCount; const char *info; const char *name; //configstring info = cl.gameState.stringData + cl.gameSta...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
152,563,334,825,811,240,000,000,000,000,000,000,000
38
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
static void work_around_broken_dhclient(struct virtio_net_hdr *hdr, uint8_t *buf, size_t size) { if ((hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && /* missing csum */ (size > 27 && size < 1500) && /* normal sized MTU */ (buf[12] == 0x08 && buf[13] == 0x00) && /...
0
[ "CWE-119" ]
qemu
98f93ddd84800f207889491e0b5d851386b459cf
287,920,240,220,183,200,000,000,000,000,000,000,000
12
virtio-net: out-of-bounds buffer write on load CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in virtio_net_load()@hw/net/virtio-net.c > } else if (n->mac_table.in_use) { > uint8_t *buf = g_malloc0(n->mac_table.in_use); We are allocating buffer of size n->mac_table.in_use > qemu...
static void kvm_pv_guest_cpu_reboot(void *unused) { /* * We disable PV EOI before we load a new kernel by kexec, * since MSR_KVM_PV_EOI_EN stores a pointer into old kernel's memory. * New kernel can re-enable when it boots. */ if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) wrmsrl(MSR_KVM_PV_EOI_EN, 0); kvm_...
0
[]
kvm
29fa6825463c97e5157284db80107d1bfac5d77b
334,283,985,576,790,350,000,000,000,000,000,000,000
12
x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit paravirt_enabled has the following effects: - Disables the F00F bug workaround warning. There is no F00F bug workaround any more because Linux's standard IDT handling already works around the F00F bug, but the warning still exists. This ...
bool HGraph::CheckConstPhiUses() { int block_count = blocks_.length(); for (int i = 0; i < block_count; ++i) { for (int j = 0; j < blocks_[i]->phis()->length(); ++j) { HPhi* phi = blocks_[i]->phis()->at(j); // Check for the hole value (from an uninitialized const). for (int k = 0; k < phi->Ope...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
69,539,752,078,457,450,000,000,000,000,000,000,000
13
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
static GF_Err lsr_read_delete(GF_LASeRCodec *lsr, GF_List *com_list) { GF_FieldInfo info; s32 idx, att_type; u32 type, idref; att_type = lsr_get_attribute_name(lsr); idx = -2; GF_LSR_READ_INT(lsr, type, 1, "has_index"); if (type) idx = (s32) lsr_read_vluimsbf5(lsr, "index"); idref = lsr_read_codec_IDREF_comma...
0
[ "CWE-190" ]
gpac
faa75edde3dfeba1e2cf6ffa48e45a50f1042096
2,656,228,062,439,422,500,000,000,000,000,000,000
60
fixed #2213
static int fuse_symlink(struct inode *dir, struct dentry *entry, const char *link) { struct fuse_mount *fm = get_fuse_mount(dir); unsigned len = strlen(link) + 1; FUSE_ARGS(args); args.opcode = FUSE_SYMLINK; args.in_numargs = 2; args.in_args[0].size = entry->d_name.len + 1; args.in_args[0].value = entry->d_n...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
188,037,796,708,748,240,000,000,000,000,000,000,000
15
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
R_API char *r_str_escape_latin1(const char *buf, bool show_asciidot, bool esc_bslash, bool colors) { return r_str_escape_ (buf, false, colors, !colors, show_asciidot, esc_bslash); }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
252,536,422,894,197,260,000,000,000,000,000,000,000
3
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
struct mb2_cache_entry *mb2_cache_entry_find_next(struct mb2_cache *cache, struct mb2_cache_entry *entry) { return __entry_find(cache, entry, entry->e_key); }
0
[ "CWE-241", "CWE-19" ]
linux
f9a61eb4e2471c56a63cd804c7474128138c38ac
27,726,201,551,441,915,000,000,000,000,000,000,000
5
mbcache2: reimplement mbcache Original mbcache was designed to have more features than what ext? filesystems ended up using. It supported entry being in more hashes, it had a home-grown rwlocking of each entry, and one cache could cache entries from multiple filesystems. This genericity also resulted in more complex l...
void smtp_server_connection_clear(struct smtp_server_connection *conn) { e_debug(conn->event, "Connection clear"); i_free(conn->helo_domain); i_zero(&conn->helo); smtp_server_connection_reset_state(conn); }
0
[ "CWE-77" ]
core
321c339756f9b2b98fb7326359d1333adebb5295
74,739,036,468,711,215,000,000,000,000,000,000,000
8
lib-smtp: smtp-server-connection - Fix STARTTLS command injection vulnerability. The input handler kept reading more commands even though the input was locked by the STARTTLS command, thereby causing it to read the command pipelined beyond STARTTLS. This causes a STARTTLS command injection vulerability.
static uint32_t get_cmd(ESPState *s, uint8_t *buf, uint8_t buflen) { uint32_t dmalen; int target; target = s->wregs[ESP_WBUSID] & BUSID_DID; if (s->dma) { dmalen = s->rregs[ESP_TCLO]; dmalen |= s->rregs[ESP_TCMID] << 8; dmalen |= s->rregs[ESP_TCHI] << 16; if (dmalen > bu...
0
[ "CWE-787" ]
qemu
926cde5f3e4d2504ed161ed0cb771ac7cad6fd11
307,198,957,750,574,450,000,000,000,000,000,000,000
45
scsi: esp: make cmdbuf big enough for maximum CDB size While doing DMA read into ESP command buffer 's->cmdbuf', it could write past the 's->cmdbuf' area, if it was transferring more than 16 bytes. Increase the command buffer size to 32, which is maximum when 's->do_cmd' is set, and add a check on 'len' to avoid OOB ...
void IndexBoundsBuilder::allValuesBounds(const BSONObj& keyPattern, IndexBounds* bounds) { bounds->fields.resize(keyPattern.nFields()); BSONObjIterator it(keyPattern); int field = 0; while (it.more()) { IndexBoundsBuilder::allValuesForField(it.next(), &bounds->fields[field]); ++field; ...
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
15,059,245,973,026,310,000,000,000,000,000,000,000
12
SERVER-44377 generate correct plan for indexed inequalities to null
static swp_entry_t *shmem_swp_alloc(struct shmem_inode_info *info, unsigned long index, enum sgp_type sgp) { struct inode *inode = &info->vfs_inode; struct shmem_sb_info *sbinfo = SHMEM_SB(inode->i_sb); struct page *page = NULL; swp_entry_t *entry; if (sgp != SGP_WRITE && ((loff_t) index << PAGE_CACHE_SHIFT)...
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
216,026,834,289,041,100,000,000,000,000,000,000,000
57
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
static void save_quoted(const char *data, FILE *file) { const char *p; fputc('"', file); for (p = data; p && *p; p++) { if ((unsigned char) *p == 0x22 || /* " */ (unsigned char) *p == 0x5c) /* \ */ fputc('\\', file); fputc(*p, file); } fputc('"', file); }
0
[ "CWE-77" ]
util-linux
89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc
338,304,733,143,004,000,000,000,000,000,000,000,000
14
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...
static ssize_t uio_write(struct file *filep, const char __user *buf, size_t count, loff_t *ppos) { struct uio_listener *listener = filep->private_data; struct uio_device *idev = listener->dev; ssize_t retval; s32 irq_on; if (!idev->info->irq) return -EIO; if (count != sizeof(s32)) return -EINVAL; if (!...
0
[ "CWE-119", "CWE-189", "CWE-703" ]
linux
7314e613d5ff9f0934f7a0f74ed7973b903315d1
308,623,888,348,308,070,000,000,000,000,000,000,000
24
Fix a few incorrectly checked [io_]remap_pfn_range() calls Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that really should use the vm_iomap_memory() helper. This trivially converts two of them to the helper, and comments about why the third one really needs to continue to use remap_pfn_range(), ...
static MagickBooleanType SetGrayscaleImage(Image *image) { CacheView *image_view; ExceptionInfo *exception; MagickBooleanType status; PixelPacket *colormap; register ssize_t i; ssize_t *colormap_index, j, y; assert(image != (Image *) NULL); assert(image->signature =...
0
[ "CWE-125" ]
ImageMagick6
e2a21735e3a3f3930bd431585ec36334c4c2eb77
72,767,956,339,250,920,000,000,000,000,000,000,000
167
https://github.com/ImageMagick/ImageMagick/issues/1540
char *get_rundir() { char *rundir; const char *homedir; struct stat sb; if (stat(RUNTIME_PATH, &sb) < 0) { return NULL; } if (geteuid() == sb.st_uid || getegid() == sb.st_gid) { rundir = strdup(RUNTIME_PATH); return rundir; } rundir = getenv("XDG_RUNTIME_DIR"); if (rundir) { rundir = strdup(rundir);...
0
[ "CWE-417" ]
lxc
5eb45428b312e978fb9e294dde16efb14dd9fa4d
241,068,556,804,190,970,000,000,000,000,000,000,000
33
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
static ssize_t tun_show_owner(struct device *dev, struct device_attribute *attr, char *buf) { struct tun_struct *tun = netdev_priv(to_net_dev(dev)); return uid_valid(tun->owner)? sprintf(buf, "%u\n", from_kuid_munged(current_user_ns(), tun->owner)): sprintf(buf, "-1\n"); }
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
53,356,484,100,044,010,000,000,000,000,000,000,000
9
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
Variant c_SimpleXMLElement::t_addchild(const String& qname, const String& value /* = null_string */, const String& ns /* = null_string */) { if (qname.empty()) { raise_warning("Element name is required"); return uninit_null(); } ...
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
146,596,034,871,337,250,000,000,000,000,000,000,000
61
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
void MSG_WriteDeltaFloat( msg_t *msg, float oldV, float newV ) { floatint_t fi; if ( oldV == newV ) { MSG_WriteBits( msg, 0, 1 ); return; } fi.f = newV; MSG_WriteBits( msg, 1, 1 ); MSG_WriteBits( msg, fi.i, 32 ); }
0
[ "CWE-119" ]
ioq3
d2b1d124d4055c2fcbe5126863487c52fd58cca1
288,419,759,452,738,900,000,000,000,000,000,000,000
10
Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits Prevent reading past end of message in MSG_ReadBits. If read past end of msg->data buffer (16348 bytes) the engine could SEGFAULT. Make MSG_WriteBits use an exact buffer overflow check instead of possibly failing with a few bytes left.
libxlDomainDeathThread(void *opaque) { struct libxlEventHandlerThreadInfo *death_info = opaque; virDomainObj *vm = NULL; libxl_event *ev = death_info->event; libxlDriverPrivate *driver = death_info->driver; virObjectEvent *dom_event = NULL; g_autoptr(libxlDriverConfig) cfg = libxlDriverConfigGet...
0
[ "CWE-703", "CWE-667" ]
libvirt
5c5df5310f72be4878a71ace47074c54e0d1a27d
31,297,355,741,138,976,000,000,000,000,000,000,000
33
libxl: Search for virDomainObj in event handler threads libxl can deliver events and invoke callbacks on any application thread calling into libxl. This can cause deadlock in the libvirt libxl driver Thread 19 (Thread 0x7f31411ec700 (LWP 14068) "libvirtd"): #0 0x00007f318520cc7d in __lll_lock_wait () from /lib64/lib...
ClientRequestContext::ClientRequestContext(ClientHttpRequest *anHttp) : http(cbdataReference(anHttp)), acl_checklist(NULL), redirect_state(REDIRECT_NONE), store_id_state(REDIRECT_NONE), host_header_verify_done(false), http_access_done(false), adapted_http_access_done(false), #if USE_ADAPTATI...
0
[ "CWE-116" ]
squid
e7cf864f938f24eea8af0692c04d16790983c823
52,970,028,781,883,590,000,000,000,000,000,000,000
25
Handle more Range requests (#790) Also removed some effectively unused code.
static int xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, xmlXPathStepOpPtr op, xmlNodeSetPtr set, int contextSize, int minPos, int maxPos, int hasNsNodes) { if (op->ch1 != -1) { xmlXPathCompExprPtr comp = ctxt->comp; if (comp->ste...
1
[ "CWE-415" ]
libxml2
fec31bcd452e77c10579467ca87a785b41115de6
154,665,676,857,573,480,000,000,000,000,000,000,000
188
Small fix for previous commit
static int em_sysexit(struct x86_emulate_ctxt *ctxt) { const struct x86_emulate_ops *ops = ctxt->ops; struct desc_struct cs, ss; u64 msr_data, rcx, rdx; int usermode; u16 cs_sel = 0, ss_sel = 0; /* inject #GP if in real mode or Virtual 8086 mode */ if (ctxt->mode == X86EMUL_MODE_REAL || ctxt->mode == X86EM...
0
[ "CWE-362", "CWE-269" ]
linux
f3747379accba8e95d70cec0eae0582c8c182050
188,414,613,819,480,880,000,000,000,000,000,000,000
58
KVM: x86: SYSENTER emulation is broken SYSENTER emulation is broken in several ways: 1. It misses the case of 16-bit code segments completely (CVE-2015-0239). 2. MSR_IA32_SYSENTER_CS is checked in 64-bit mode incorrectly (bits 0 and 1 can still be set without causing #GP). 3. MSR_IA32_SYSENTER_EIP and MSR_IA32_SYSE...
AvahiSHostNameResolver *avahi_s_host_name_resolver_prepare( AvahiServer *server, AvahiIfIndex interface, AvahiProtocol protocol, const char *host_name, AvahiProtocol aprotocol, AvahiLookupFlags flags, AvahiSHostNameResolverCallback callback, void* userdata) { AvahiSHostNameResolver ...
0
[]
avahi
9d31939e55280a733d930b15ac9e4dda4497680c
78,740,473,310,284,080,000,000,000,000,000,000,000
73
Fix NULL pointer crashes from #175 avahi-daemon is crashing when running "ping .local". The crash is due to failing assertion from NULL pointer. Add missing NULL pointer checks to fix it. Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd
void setResultFlagsToOk() { _resultFlags() = ResultFlag_AwaitCapable; }
0
[ "CWE-20" ]
mongo
f9817a6cf64bdba8e1e1cef30a798110df746b58
38,792,547,839,710,223,000,000,000,000,000,000,000
3
SERVER-7769 - turn objcheck on by default and use new fast bson validate
bool OSD::scrub_random_backoff() { bool coin_flip = (rand() / (double)RAND_MAX >= cct->_conf->osd_scrub_backoff_ratio); if (!coin_flip) { dout(20) << "scrub_random_backoff lost coin flip, randomly backing off" << dendl; return true; } return false; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
214,740,311,570,963,980,000,000,000,000,000,000,000
10
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 ...
CmdResult HandleLocal(LocalUser* user, const Params& parameters) CXX11_OVERRIDE { // Check to make sure they haven't registered -- Fix by FCS if (user->registered == REG_ALL) { user->CommandFloodPenalty += 1000; user->WriteNumeric(ERR_ALREADYREGISTERED, "You may not reregister"); return CMD_FAILURE; ...
0
[ "CWE-200", "CWE-732" ]
inspircd
4350a11c663b0d75f8119743bffb7736d87abd4d
331,133,606,537,511,100,000,000,000,000,000,000,000
13
Fix sending malformed pong messages in some cases.
void CLASS kodak_jpeg_load_raw() { if(data_size < 1) throw LIBRAW_EXCEPTION_DECODE_JPEG; int row, col; jpegErrorManager jerr; struct jpeg_decompress_struct cinfo; cinfo.err = jpeg_std_error(&jerr.pub); jerr.pub.error_exit = jpegErrorExit; unsigned char *jpg_buf = (unsigned char *)malloc(data_size);...
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
219,953,863,346,067,900,000,000,000,000,000,000,000
66
fixed two more problems found by fuzzer
smtp_check_data(struct smtp_session *s, const char *args) { if (!smtp_check_noparam(s, args)) return 0; if (s->tx == NULL) { smtp_reply(s, "503 %s %s: Command not allowed at this point.", esc_code(ESC_STATUS_PERMFAIL, ESC_INVALID_COMMAND), esc_description(ESC_INVALID_COMMAND)); return 0; } if (s...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
249,317,998,376,426,260,000,000,000,000,000,000,000
21
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
abort_writing_to_file(open_file_t *file_data) { return finish_writing_to_file_impl(file_data, 1); }
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
32,985,685,632,774,194,000,000,000,000,000,000,000
4
Fix assertion failure in tor_timegm. Fixes bug 6811.
static inline int sk_unhashed(const struct sock *sk) { return hlist_unhashed(&sk->sk_node); }
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
270,491,037,609,554,200,000,000,000,000,000,000,000
4
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
md_is_closing_code_fence(MD_CTX* ctx, CHAR ch, OFF beg, OFF* p_end) { OFF off = beg; int ret = FALSE; /* Closing fence must have at least the same length and use same char as * opening one. */ while(off < ctx->size && CH(off) == ch) off++; if(off - beg < ctx->code_fence_length) ...
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
230,416,614,960,518,540,000,000,000,000,000,000,000
28
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
zzip_disk_entry_strdup_name(ZZIP_DISK * disk, struct zzip_disk_entry *entry) { if (! disk || ! entry) { errno=EINVAL; return 0; } ___ char *name = 0; zzip_size_t len = len = zzip_disk_entry_namlen(entry); if (len) { name = zzip_disk_entry_to_filename(entry); } ...
0
[]
zziplib
72ec933663f738d8e166979aa7fd5590b2104a07
179,716,702,921,842,800,000,000,000,000,000,000,000
39
need to check on endbuf for stored files #15
TEST_F(QueryPlannerTest, CacheDataFromTaggedTreeFailsOnBadInput) { // Null match expression. std::vector<IndexEntry> relevantIndices; ASSERT_NOT_OK(QueryPlanner::cacheDataFromTaggedTree(NULL, relevantIndices).getStatus()); // No relevant index matching the index tag. relevantIndices.push_back(Index...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
45,645,625,982,439,780,000,000,000,000,000,000,000
18
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
template<typename tp, typename tc> CImg<floatT> get_object3dtoCImg3d(const CImgList<tp>& primitives, const CImgList<tc>& colors, const bool full_check=true) const { CImgList<T> opacities; return get_object3dtoCImg3d(primitiv...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
140,898,703,405,547,340,000,000,000,000,000,000,000
6
Fix other issues in 'CImg<T>::load_bmp()'.
static int bnx2x_set_coherency_mask(struct bnx2x *bp) { struct device *dev = &bp->pdev->dev; if (dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64)) != 0 && dma_set_mask_and_coherent(dev, DMA_BIT_MASK(32)) != 0) { dev_err(dev, "System does not support DMA, aborting\n"); return -EIO; } return 0; }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
255,832,314,560,138,200,000,000,000,000,000,000,000
12
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work) codetype type; unsigned short FAR *lens; unsigned codes; code FAR * FAR *table; unsigned FAR *bits; unsigned short FAR *work; { unsigned len; /* a code's length in bits */ unsigned sym; /* index of code symbols */ ...
1
[ "CWE-703", "CWE-189" ]
zlib
6a043145ca6e9c55184013841a67b2fef87e44c0
22,105,826,737,743,350,000,000,000,000,000,000,000
275
Remove offset pointer optimization in inftrees.c. inftrees.c was subtracting an offset from a pointer to an array, in order to provide a pointer that allowed indexing starting at the offset. This is not compliant with the C standard, for which the behavior of a pointer decremented before its allocated memory is undefi...
int load_elf_as(const char *filename, uint64_t (*elf_note_fn)(void *, void *, bool), uint64_t (*translate_fn)(void *, uint64_t), void *translate_opaque, uint64_t *pentry, uint64_t *lowaddr, uint64_t *highaddr, int big_endian, int elf_machine, ...
0
[ "CWE-787" ]
qemu
e423455c4f23a1a828901c78fe6d03b7dde79319
218,289,538,169,479,340,000,000,000,000,000,000,000
11
hw/core/loader: Fix possible crash in rom_copy() Both, "rom->addr" and "addr" are derived from the binary image that can be loaded with the "-kernel" paramer. The code in rom_copy() then calculates: d = dest + (rom->addr - addr); and uses "d" as destination in a memcpy() some lines later. Now with bad kernel ima...
NOEXPORT void sni_free(SERVICE_OPTIONS *section) { SERVERNAME_LIST *curr=section->servername_list_head; while(curr) { SERVERNAME_LIST *next=curr->next; str_free(curr->servername); service_free(curr->opt); /* free the slave section */ str_free(curr); curr=next; } s...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
62,768,945,222,350,700,000,000,000,000,000,000,000
12
stunnel-5.57
int ha_change_key_cache(KEY_CACHE *old_key_cache, KEY_CACHE *new_key_cache) { mi_change_key_cache(old_key_cache, new_key_cache); return 0; }
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
172,055,068,489,430,160,000,000,000,000,000,000,000
6
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
nautilus_file_clear_info (NautilusFile *file) { file->details->got_file_info = FALSE; if (file->details->get_info_error) { g_error_free (file->details->get_info_error); file->details->get_info_error = NULL; } /* Reset to default type, which might be other than unknown for special kinds of files like the des...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
247,287,164,760,245,640,000,000,000,000,000,000,000
67
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-...
static void sctp_v4_pf_exit(void) { list_del(&sctp_af_inet.list); }
0
[ "CWE-119", "CWE-787" ]
linux
8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4
269,738,412,136,849,480,000,000,000,000,000,000,000
4
sctp: fix race on protocol/netns initialization Consider sctp module is unloaded and is being requested because an user is creating a sctp socket. During initialization, sctp will add the new protocol type and then initialize pernet subsys: status = sctp_v4_protosw_init(); if (status) ...
static void mux_chr_send_event(MuxDriver *d, int mux_nr, int event) { if (d->chr_event[mux_nr]) d->chr_event[mux_nr](d->ext_opaque[mux_nr], event); }
1
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
305,766,798,842,406,820,000,000,000,000,000,000,000
5
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
long kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { struct kvm *kvm = filp->private_data; void __user *argp = (void __user *)arg; int r = -ENOTTY; /* * This union makes it completely explicit to gcc-3.x * that these two variables' stack usage should be * combined, not a...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
108,338,324,802,184,670,000,000,000,000,000,000,000
271
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
cons_node_free_alone(Node* node) { NODE_CAR(node) = 0; NODE_CDR(node) = 0; onig_node_free(node); }
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
11,359,183,974,711,690,000,000,000,000,000,000,000
6
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
void onServerReadData( QuicServerConnectionState& conn, ServerEvents::ReadData& readData) { switch (conn.state) { case ServerState::Open: onServerReadDataFromOpen(conn, readData); return; case ServerState::Closed: onServerReadDataFromClosed(conn, readData); return; } }
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
55,533,289,940,274,270,000,000,000,000,000,000,000
12
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
static int llc_wait_data(struct sock *sk, long timeo) { int rc; while (1) { /* * POSIX 1003.1g mandates this order. */ rc = sock_error(sk); if (rc) break; rc = 0; if (sk->sk_shutdown & RCV_SHUTDOWN) break; rc = -EAGAIN; if (!timeo) break; rc = sock_intr_errno(timeo); if (signal_pendi...
0
[ "CWE-200" ]
linux-2.6
28e9fc592cb8c7a43e4d3147b38be6032a0e81bc
314,153,297,518,865,360,000,000,000,000,000,000,000
26
NET: llc, zero sockaddr_llc struct sllc_arphrd member of sockaddr_llc might not be changed. Zero sllc before copying to the above layer's structure. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int manager_dispatch_link_udev(sd_event_source *source, int fd, uint32_t revents, void *userdata) { Manager *m = userdata; struct udev_monitor *monitor = m->udev_monitor; _cleanup_udev_device_unref_ struct udev_device *device = NULL; device = udev_monitor_receive_device(monitor);...
0
[ "CWE-120" ]
systemd
f5a8c43f39937d97c9ed75e3fe8621945b42b0db
43,344,709,199,811,010,000,000,000,000,000,000,000
12
networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt= The previous behavior: When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was enabled only if the relevant flags were passed in the Router Advertisement message. Moreover, router discovery was performed even if AcceptRout...
blobCreate(void) { #ifdef CL_DEBUG blob *b = (blob *)cli_calloc(1, sizeof(blob)); if (b) b->magic = BLOBCLASS; cli_dbgmsg("blobCreate\n"); return b; #else return (blob *)cli_calloc(1, sizeof(blob)); #endif }
0
[ "CWE-476" ]
clamav-devel
8bb3716be9c7ab7c6a3a1889267b1072f48af87b
204,786,179,901,350,400,000,000,000,000,000,000,000
12
fuzz-22348 null deref in egg utf8 conversion Corrected memory leaks and a null dereference in the egg utf8 conversion.
has_foreign_data_wrapper_privilege_name(PG_FUNCTION_ARGS) { text *fdwname = PG_GETARG_TEXT_P(0); text *priv_type_text = PG_GETARG_TEXT_P(1); Oid roleid; Oid fdwid; AclMode mode; AclResult aclresult; roleid = GetUserId(); fdwid = convert_foreign_data_wrapper_name(fdwname); mode = convert_foreign_dat...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
45,898,677,729,090,860,000,000,000,000,000,000,000
17
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
bool shouldMergeSlashes() const override { return false; }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
120,516,636,969,509,200,000,000,000,000,000,000,000
1
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int may_context_mount_inode_relabel(u32 sid, struct superblock_security_struct *sbsec, const struct cred *cred) { const struct task_security_struct *tsec = selinux_cred(cred); int rc; rc = avc_has_perm(&selinux_state, tsec->sid, sbsec->sid, SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, NULL); ...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
161,621,963,709,786,140,000,000,000,000,000,000,000
17
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
int xt_find_revision(u8 af, const char *name, u8 revision, int target, int *err) { int have_rev, best = -1; mutex_lock(&xt[af].mutex); if (target == 1) have_rev = target_revfn(af, name, revision, &best); else have_rev = match_revfn(af, name, revision, &best); mutex_unlock(&xt[af].mutex); /* Nothing a...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
44,684,696,200,141,190,000,000,000,000,000,000,000
23
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static void vmx_handle_external_intr(struct kvm_vcpu *vcpu) { u32 exit_intr_info = vmcs_read32(VM_EXIT_INTR_INFO); if ((exit_intr_info & (INTR_INFO_VALID_MASK | INTR_INFO_INTR_TYPE_MASK)) == (INTR_INFO_VALID_MASK | INTR_TYPE_EXT_INTR)) { unsigned int vector; unsigned long entry; gate_desc *desc; struct vc...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
116,563,024,786,676,270,000,000,000,000,000,000,000
39
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...
static void add_metadata_from_renditions(AVFormatContext *s, struct playlist *pls, enum AVMediaType type) { int rend_idx = 0; int i; for (i = 0; i < pls->ctx->nb_streams; i++) { AVStream *st = s->streams[pls->stream_offset + i]; if (st->codec->codec...
0
[ "CWE-703" ]
FFmpeg
7ba100d3e6e8b1e5d5342feb960a7f081d6e15af
1,442,475,141,932,140,000,000,000,000,000,000,000
29
avformat/hls: Fix DoS due to infinite loop Fixes: loop.m3u The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome Found-by: Xiaohei and Wangchu from Alibaba Security Team Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com> Signed-off-by: Michael Niedermayer <...
static const char *dirsection(cmd_parms *cmd, void *mconfig, const char *arg) { const char *errmsg; const char *endp = ap_strrchr_c(arg, '>'); int old_overrides = cmd->override; char *old_path = cmd->path; core_dir_config *conf; ap_conf_vector_t *new_dir_conf = ap_create_per_dir_config(cmd->pool...
0
[]
httpd
ecebcc035ccd8d0e2984fe41420d9e944f456b3c
228,980,509,924,723,520,000,000,000,000,000,000,000
101
Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk: *) core: Split ap_create_request() from ap_read_request(). [Graham Leggett] *) core, h2: common ap_parse_request_line() and ap_check_request_header() code. [Yann Ylavic] ...
void userfaultfd_unmap_complete(struct mm_struct *mm, struct list_head *uf) { struct userfaultfd_unmap_ctx *ctx, *n; struct userfaultfd_wait_queue ewq; list_for_each_entry_safe(ctx, n, uf, list) { msg_init(&ewq.msg); ewq.msg.event = UFFD_EVENT_UNMAP; ewq.msg.arg.remove.start = ctx->start; ewq.msg.arg.remov...
0
[ "CWE-416" ]
linux
384632e67e0829deb8015ee6ad916b180049d252
325,728,616,961,682,970,000,000,000,000,000,000,000
18
userfaultfd: non-cooperative: fix fork use after free When reading the event from the uffd, we put it on a temporary fork_event list to detect if we can still access it after releasing and retaking the event_wqh.lock. If fork aborts and removes the event from the fork_event all is fine as long as we're still in the u...
TEST_F(HttpConnectionManagerImplTest, UnderlyingConnectionWatermarksUnwoundWithLazyCreation) { setup(false, ""); // Make sure codec_ is created. EXPECT_CALL(*codec_, dispatch(_)); Buffer::OwnedImpl fake_input(""); conn_manager_->onData(fake_input, false); // Mark the connection manger as backed up before ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
88,594,675,546,054,680,000,000,000,000,000,000,000
61
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static STACK_OF(X509) *php_openssl_load_all_certs_from_file(char *certfile) { STACK_OF(X509_INFO) *sk=NULL; STACK_OF(X509) *stack=NULL, *ret=NULL; BIO *in=NULL; X509_INFO *xi; if(!(stack = sk_X509_new_null())) { php_openssl_store_errors(); php_error_docref(NULL, E_ERROR, "memory allocation failure"); goto e...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
196,981,613,221,594,850,000,000,000,000,000,000,000
54
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
struct task_struct *kthread_create_on_cpu(int (*threadfn)(void *data), void *data, unsigned int cpu, const char *namefmt) { struct task_struct *p; p = kthread_create_on_node(threadfn, data, cpu_to_node(cpu), namefmt, cpu); if (IS_ERR(p)) return p; kthread_bind(p, cpu); /* CPU hotplug need t...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
319,455,927,195,224,430,000,000,000,000,000,000,000
16
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...
static inline int shmem_acct_size(unsigned long flags, loff_t size) { return (flags & VM_ACCOUNT)? security_vm_enough_memory(VM_ACCT(size)): 0; }
0
[ "CWE-200" ]
linux-2.6
e84e2e132c9c66d8498e7710d4ea532d1feaaac5
175,976,856,095,189,570,000,000,000,000,000,000,000
5
tmpfs: restore missing clear_highpage tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in which shmem_getpage receives the page from its caller instead of allocating. We must cover this case by clear_highpage before SetPageUptodate, as before. Signed-off-by: Hugh Dickins <hugh@veritas.com> Sig...
proto_reg_handoff_sysdig_event(void) { dissector_handle_t sysdig_event_handle; /* Use create_dissector_handle() to indicate that dissect_sysdig_event() * returns the number of bytes it dissected (or 0 if it thinks the packet * does not belong to PROTONAME). */ sysdig_event_handle = create_di...
0
[ "CWE-703" ]
wireshark
41bfc9112480c3d83331ed93470c7f675a9d5b1a
110,276,811,988,146,300,000,000,000,000,000,000,000
14
dissectors: re-generated sysdig events using provided tool. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd, uint16_t* c) { uint16_t c1 = *c, c2 = *c; int r1 = hints_next_root(hints, &c1); int r2 = forwards_next_root(fwd, &c2); if(!r1 && !r2) /* got none, end of list */ return 0; else if(!r1) /* got one, return that */ *c = c2; else if(!r2) *...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
139,779,559,064,698,000,000,000,000,000,000,000,000
17
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
int acpi_unmap_lsapic(int cpu) { int i; for_each_possible_cpu(i) { if (x86_acpiid_to_apicid[i] == x86_cpu_to_apicid[cpu]) { x86_acpiid_to_apicid[i] = -1; break; } } x86_cpu_to_apicid[cpu] = -1; cpu_clear(cpu, cpu_present_map); num_processors--; return (0); }
0
[]
linux-2.6
f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff
307,233,496,214,791,700,000,000,000,000,000,000,000
16
[PATCH] i386: add HPET(s) into resource map Add HPET(s) into resource map. This will allow for the HPET(s) to be visibile within /proc/iomem. Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Andi Kleen <ak@suse.de>
static int cmpsize(const void *a, const void *b) { ut64 as = r_anal_function_linear_size ((RAnalFunction *) a); ut64 bs = r_anal_function_linear_size ((RAnalFunction *) b); return (as> bs)? 1: (as< bs)? -1: 0; }
0
[ "CWE-416" ]
radare2
10517e3ff0e609697eb8cde60ec8dc999ee5ea24
155,518,301,953,859,380,000,000,000,000,000,000,000
5
aaef on arm/thumb switches causes uaf ##crash * Reported by peacock-doris via huntr.dev * Reproducer: poc_uaf_r_reg_get
httpPost(http_t *http, /* I - HTTP connection */ const char *uri) /* I - URI for post */ { return (http_send(http, HTTP_STATE_POST, uri)); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
109,413,281,355,676,600,000,000,000,000,000,000,000
5
Fix multiple security/disclosure issues: - CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251) - Fixed IPP buffer overflow (rdar://50035411) - Fixed memory disclosure issue in the scheduler (rdar://51373853) - Fixed DoS issues in the scheduler (rdar://51373929)
static void tcg_log_global_after_sync(MemoryListener *listener) { CPUAddressSpace *cpuas; /* Wait for the CPU to end the current TB. This avoids the following * incorrect race: * * vCPU migration * ---------------------- ------------------------- ...
0
[ "CWE-908" ]
qemu
418ade7849ce7641c0f7333718caf5091a02fd4c
240,447,389,527,651,050,000,000,000,000,000,000,000
33
softmmu: Always initialize xlat in address_space_translate_for_iotlb The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_M...
static enum test_return test_binary_version(void) { union { protocol_binary_request_no_extras request; protocol_binary_response_no_extras response; char bytes[1024]; } buffer; size_t len = raw_command(buffer.bytes, sizeof(buffer.bytes), PROTOCOL_BINARY_C...
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
16,363,777,642,718,972,000,000,000,000,000,000,000
18
Issue 102: Piping null to the server will crash it
struct net_device *geneve_dev_create_fb(struct net *net, const char *name, u8 name_assign_type, u16 dst_port) { struct nlattr *tb[IFLA_MAX + 1]; struct ip_tunnel_info info; struct net_device *dev; LIST_HEAD(list_kill); int err; memset(tb, 0, sizeof(tb)); dev = rtnl_create_link(net, name, name_assign_type, ...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
27,243,599,704,219,665,000,000,000,000,000,000,000
40
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static int output_to_inttgt(int output) { int i; for (i = 0; i < ARRAY_SIZE(inttgt_output); i++) { if (inttgt_output[i][1] == output) { return inttgt_output[i][0]; } } abort(); }
0
[ "CWE-119" ]
qemu
73d963c0a75cb99c6aaa3f6f25e427aa0b35a02e
176,682,307,748,434,870,000,000,000,000,000,000,000
12
openpic: avoid buffer overrun on incoming migration CVE-2013-4534 opp->nb_cpus is read from the wire and used to determine how many IRQDest elements to read into opp->dst[]. If the value exceeds the length of opp->dst[], MAX_CPU, opp->dst[] can be overrun with arbitrary data from the wire. Fix this by failing migrat...
void KrecipesView::switchToRecipe( void ) { slotSetPanel( RecipeEdit ); }
0
[]
krecipes
cd1490fb5fe82cbe9172a43be13298001b446ecd
122,444,449,786,471,940,000,000,000,000,000,000,000
4
Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and #2960140. svn path=/trunk/extragear/utils/krecipes/; revision=1137824
static void vmx_adjust_tsc_offset_guest(struct kvm_vcpu *vcpu, s64 adjustment) { u64 offset = vmcs_read64(TSC_OFFSET); vmcs_write64(TSC_OFFSET, offset + adjustment); if (is_guest_mode(vcpu)) { /* Even when running L2, the adjustment needs to apply to L1 */ to_vmx(vcpu)->nested.vmcs01_tsc_offset += adjustment; ...
0
[ "CWE-284", "CWE-264" ]
linux
3ce424e45411cf5a13105e0386b6ecf6eeb4f66f
268,210,237,097,267,930,000,000,000,000,000,000,000
12
kvm:vmx: more complete state update on APICv on/off The function to update APICv on/off state (in particular, to deactivate it when enabling Hyper-V SynIC) is incomplete: it doesn't adjust APICv-related fields among secondary processor-based VM-execution controls. As a result, Windows 2012 guests get stuck when SynIC...
_copyUnlistenStmt(const UnlistenStmt *from) { UnlistenStmt *newnode = makeNode(UnlistenStmt); COPY_STRING_FIELD(conditionname); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
42,942,863,705,124,650,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 struct page *linear_to_page(struct page *page, unsigned int *len, unsigned int *offset, struct sock *sk) { struct page_frag *pfrag = sk_page_frag(sk); if (!sk_page_frag_refill(sk, pfrag)) return NULL; *len = min_t(unsigned int, *len, pfrag->size - pfrag->offset); memcpy(page_address(pfrag...
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
318,660,999,782,505,660,000,000,000,000,000,000,000
18
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
GF_Err gf_isom_avc_config_new(GF_ISOFile *the_file, u32 trackNumber, GF_AVCConfig *cfg, const char *URLname, const char *URNname, u32 *outDescriptionIndex) { GF_TrackBox *trak; GF_Err e; GF_SampleDescriptionBox *stsd; u32 dataRefIndex; GF_MPEGVisualSampleEntryBox *entry; e = CanAccessMovie(the_file, GF_ISOM_OPEN...
0
[ "CWE-401" ]
gpac
0a85029d694f992f3631e2f249e4999daee15cbf
91,723,100,080,658,470,000,000,000,000,000,000,000
39
fixed #1785 (fuzz)
static void vvalue_strbuf_append_ui2(wmem_strbuf_t *strbuf, void *ptr) { guint16 ui2 = *(guint16*)ptr; wmem_strbuf_append_printf(strbuf, "%u", (unsigned)ui2); }
0
[ "CWE-770" ]
wireshark
b7a0650e061b5418ab4a8f72c6e4b00317aff623
310,404,688,098,875,170,000,000,000,000,000,000,000
5
MS-WSP: Don't allocate huge amounts of memory. Add a couple of memory allocation sanity checks, one of which fixes #17331.
static void ql_mac_cfg_full_dup(struct ql3_adapter *qdev, u32 enable) { struct ql3xxx_port_registers __iomem *port_regs = qdev->mem_map_registers; u32 value; if (enable) value = (MAC_CONFIG_REG_FD | (MAC_CONFIG_REG_FD << 16)); else value = (MAC_CONFIG_REG_FD << 16); if (qdev->mac_index) ql_write_page0_r...
0
[ "CWE-401" ]
linux
1acb8f2a7a9f10543868ddd737e37424d5c36cf4
309,269,089,475,425,300,000,000,000,000,000,000,000
16
net: qlogic: Fix memory leak in ql_alloc_large_buffers In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb. This skb should be released if pci_dma_mapping_error fails. Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue...
static int do_putenv(char **env, const char *name, int size, int free_old) { int i = bsearchenv(env, name, size - 1); /* optionally free removed / replaced entry */ if (i >= 0 && free_old) free(env[i]); if (strchr(name, '=')) { /* if new value ('key=value') is specified, insert or replace entry */ if (i < 0...
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
135,928,219,149,982,170,000,000,000,000,000,000,000
23
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
static ssize_t module_sect_read(struct file *file, struct kobject *kobj, struct bin_attribute *battr, char *buf, loff_t pos, size_t count) { struct module_sect_attr *sattr = container_of(battr, struct module_sect_attr, battr); char bounce[MODULE_SECT_READ_SIZE + 1]; size_t wrote; if (pos != 0) return -...
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
69,846,566,681,753,560,000,000,000,000,000,000,000
28
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
JsDeferredFromNodePersistent(v8impl::Persistent<v8::Value>* local) { return reinterpret_cast<napi_deferred>(local); }
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
55,703,188,236,657,640,000,000,000,000,000,000,000
3
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
void MYSQL_BIN_LOG::close(uint exiting) { // One can't set log_type here! DBUG_ENTER("MYSQL_BIN_LOG::close"); DBUG_PRINT("enter",("exiting: %d", (int) exiting)); if (log_state == LOG_OPENED) { #ifdef HAVE_REPLICATION if (log_type == LOG_BIN && !no_auto_events && (exiting & LOG_CLOSE_STOP_EVENT)) { ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
166,814,565,863,690,430,000,000,000,000,000,000,000
56
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...
int lxc_read_from_file(const char *filename, void *buf, size_t count) { int fd = -1, saved_errno; ssize_t ret; fd = open(filename, O_RDONLY | O_CLOEXEC); if (fd < 0) return -1; if (!buf || !count) { char buf2[100]; size_t count2 = 0; while ((ret = lxc_read_nointr(fd, buf2, 100)) > 0) count2 += ret; ...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
207,781,312,591,321,160,000,000,000,000,000,000,000
31
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
void initServer(void) { int j; signal(SIGHUP, SIG_IGN); signal(SIGPIPE, SIG_IGN); setupSignalHandlers(); makeThreadKillable(); if (server.syslog_enabled) { openlog(server.syslog_ident, LOG_PID | LOG_NDELAY | LOG_NOWAIT, server.syslog_facility); } /* Initialization ...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
194,872,317,260,628,200,000,000,000,000,000,000,000
211
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
ogganx_type_find (GstTypeFind * tf, gpointer private) { const gchar *media_type; DataScanCtx c = { 0, NULL, 0 }; guint ogg_syncs = 0; guint hdr_count[OGG_NUM] = { 0, }; static const struct { const gchar marker[10]; guint8 marker_size; GstOggStreamType stream_type; } markers[] = { { "\0...
0
[ "CWE-125" ]
gst-plugins-base
2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095
19,504,054,742,821,167,000,000,000,000,000,000,000
93
typefind: bounds check windows ico detection Fixes out of bounds read https://bugzilla.gnome.org/show_bug.cgi?id=774902
proto_register_blip(void) { static hf_register_info hf[] = { { &hf_blip_message_number, { "Message Number", "blip.messagenum", FT_UINT64, BASE_DEC, NULL, 0x0, NULL, HFILL } }, { &hf_blip_frame_flags, { "Frame Flags", "blip.frameflags", FT_UINT8, BASE_HEX | BASE_EXT_STRING, &flag_combos_ext, 0x0, NULL, HFI...
1
[ "CWE-476" ]
wireshark
4a948427100b6c109f4ec7b4361f0d2aec5e5c3f
213,440,993,048,464,370,000,000,000,000,000,000,000
45
BLIP: Fix decompression buffer bug Until now, mistakenly, the buffer for decompressing compressed BLIP messages has been statically allocated as 16 Kb, but that is not valid behavior. 16 Kb is the maximum size of a _compressed_ frame. In theory, due to the ability to zipbomb, there is virtually no upper bound on what...
static int selinux_kernel_module_from_file(struct file *file) { struct common_audit_data ad; struct inode_security_struct *isec; struct file_security_struct *fsec; u32 sid = current_sid(); int rc; /* init_module */ if (file == NULL) return avc_has_perm(&selinux_state, sid, sid, SECCLASS_SYSTEM, S...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
33,154,566,061,168,110,000,000,000,000,000,000,000
32
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
void ldb_parse_tree_attr_replace(struct ldb_parse_tree *tree, const char *attr, const char *replace) { struct parse_tree_attr_replace_ctx ctx; ctx.attr = attr; ctx.replace = replace; ldb_parse_tree_walk(tree, parse_tree_attr_replace, &ctx); }
0
[ "CWE-125" ]
samba
8d34d172092f71baad0d777567e49aebfa07313d
123,172,524,935,423,100,000,000,000,000,000,000,000
11
CVE-2019-3824 ldb: ldb_parse_tree use talloc_zero Initialise the created ldb_parse_tree with talloc_zero, this ensures that it is correctly initialised if inadvertently passed to a function expecting a different operation type. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13773 Signed-off-by: Gary Lockyer <gary@c...
sys_perfmonctl (int fd, int cmd, void __user *arg, int count) { struct file *file = NULL; pfm_context_t *ctx = NULL; unsigned long flags = 0UL; void *args_k = NULL; long ret; /* will expand int return types */ size_t base_sz, sz, xtra_sz = 0; int narg, completed_args = 0, call_made = 0, cmd_flags; int (*func)(p...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
174,121,314,843,693,400,000,000,000,000,000,000,000
148
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { OpData* op_data = reinterpret_cast<OpData*>(node->user_data); int num_inputs = node->inputs->size; // The number of outputs should be the same as number of inputs. TF_LITE_ENSURE_EQ(context, node->outputs->size, num_inputs); // Check subgraph i...
1
[ "CWE-703", "CWE-835" ]
tensorflow
c6173f5fe66cdbab74f4f869311fe6aae2ba35f4
289,464,015,359,408,420,000,000,000,000,000,000,000
85
TFLite: Error out when the graph has a recurion. Recursion is currently unsupported. PiperOrigin-RevId: 371708957 Change-Id: I8dfad0d85cbfe08e39ae8ea7bad21254ddee5003
static void spl_ptr_llist_push(spl_ptr_llist *llist, zval *data) /* {{{ */ { spl_ptr_llist_element *elem = emalloc(sizeof(spl_ptr_llist_element)); elem->rc = 1; elem->prev = llist->tail; elem->next = NULL; ZVAL_COPY_VALUE(&elem->data, data); if (llist->tail) { llist->tail->next = elem; } else { llist->he...
0
[ "CWE-415" ]
php-src
28a6ed9f9a36b9c517e4a8a429baf4dd382fc5d5
319,846,955,767,341,040,000,000,000,000,000,000,000
22
Fix bug #71735: Double-free in SplDoublyLinkedList::offsetSet
PostorderProcessor* PerformStep(Zone* zone, BitVector* visited, ZoneList<HBasicBlock*>* order) { PostorderProcessor* next = PerformNonBacktrackingStep(zone, visited, order); if (next != NULL) { return next; } else { re...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
250,318,510,069,291,250,000,000,000,000,000,000,000
11
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
static int anr_search_callback(struct ldb_request *req, struct ldb_reply *ares) { struct anr_context *ac; ac = talloc_get_type(req->context, struct anr_context); if (!ares) { return ldb_module_done(ac->req, NULL, NULL, LDB_ERR_OPERATIONS_ERROR); } if (ares->error != LDB_SUCCESS) { return ldb_module_done...
0
[ "CWE-703" ]
samba
3a4eb50cf74671de3442d179bd2d44afd5bc52c1
204,585,233,887,414,200,000,000,000,000,000,000,000
29
CVE-2021-3670 dsdb/anr: Do a copy of the potentially anr query before starting to modify it RN: Do not modify the caller-supplied memory in the anr=* handling to allow clear logging of the actual caller request after it has been processed. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14694 Signed-off-by: Andrew B...
int security_inode_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags) { if (unlikely(IS_PRIVATE(dentry->d_inode))) return 0; return security_ops->inode_setxattr(dentry, name, value, size, flags); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
113,644,552,678,307,250,000,000,000,000,000,000,000
7
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static SDL_INLINE void BG_Blended_Opaque_NEON(const TTF_Image *image, Uint32 *destination, Sint32 srcskip, Uint32 dstskip) { const Uint32 *src = (Uint32 *)image->buffer; Uint32 *dst = destination; Uint32 width = image->width / 16; Uint32 height = image->rows; uint32x4_t s...
0
[ "CWE-190", "CWE-787" ]
SDL_ttf
db1b41ab8bde6723c24b866e466cad78c2fa0448
337,497,110,251,194,900,000,000,000,000,000,000,000
45
More integer overflow (see bug #187) Make sure that 'width + alignment' doesn't overflow, otherwise it could create a SDL_Surface of 'width' but with wrong 'pitch'
DEFUN (no_bgp_deterministic_med, no_bgp_deterministic_med_cmd, "no bgp deterministic-med", NO_STR "BGP specific commands\n" "Pick the best-MED path among paths advertised from the neighboring AS\n") { struct bgp *bgp; bgp = vty->index; bgp_flag_unset (bgp, BGP_FLAG_DETERMINISTI...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
135,075,375,547,419,160,000,000,000,000,000,000,000
13
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
camel_pop3_store_init (CamelPOP3Store *pop3_store) { pop3_store->priv = camel_pop3_store_get_instance_private (pop3_store); g_mutex_init (&pop3_store->priv->property_lock); }
0
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
35,514,933,590,844,710,000,000,000,000,000,000,000
6
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
str_make_independent(str) VALUE str; { char *ptr; ptr = ALLOC_N(char, RSTRING(str)->len+1); if (RSTRING(str)->ptr) { memcpy(ptr, RSTRING(str)->ptr, RSTRING(str)->len); } ptr[RSTRING(str)->len] = 0; RSTRING(str)->ptr = ptr; RSTRING(str)->aux.capa = RSTRING(str)->len; FL_UNSET(str, S...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
97,501,393,736,626,970,000,000,000,000,000,000,000
14
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void showmem_json (RList *list, PJ *pj) { pj_a (pj); if (!r_list_empty (list)) { RListIter *iter; AeaMemItem *item; r_list_foreach (list, iter, item) { pj_n (pj, item->addr); } } pj_end (pj); }
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
51,743,495,274,093,090,000,000,000,000,000,000,000
12
Fix segfault in adf (#16230)