func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
*/ void xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs) { xmlXPathObjectPtr str, start, len; double le=0, in; int i, l, m; xmlChar *ret; if (nargs < 2) { CHECK_ARITY(2); } if (nargs > 3) { CHECK_ARITY(3); } /* * take care of possible last (position) argum...
0
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
327,418,580,722,386,530,000,000,000,000,000,000,000
94
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
void writeComment(const char* comment, bool eol_comment) { FStructData& current_struct = fs->getCurrentStruct(); int len; int multiline; const char* eol; char* ptr; if( !comment ) CV_Error( CV_StsNullPtr, "Null comment" ); if( strstr(comment,...
0
[ "CWE-787" ]
opencv
f42d5399aac80d371b17d689851406669c9b9111
186,225,852,001,256,330,000,000,000,000,000,000,000
67
core(persistence): add more checks for implementation limitations
static void kvm_guest_cpu_offline(void *dummy) { kvm_disable_steal_time(); if (kvm_para_has_feature(KVM_FEATURE_PV_EOI)) wrmsrl(MSR_KVM_PV_EOI_EN, 0); kvm_pv_disable_apf(); apf_task_wake_all(); }
0
[]
kvm
29fa6825463c97e5157284db80107d1bfac5d77b
26,437,760,587,990,910,000,000,000,000,000,000,000
8
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 ...
PHP_NAMED_FUNCTION(zif_locale_set_default) { char* locale_name = NULL; int len=0; if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s", &locale_name ,&len ) == FAILURE) { intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "locale_set_default: unable to parse input params", 0 TSRMLS_CC ); RETURN_FAL...
0
[ "CWE-125" ]
php-src
97eff7eb57fc2320c267a949cffd622c38712484
224,489,726,127,709,870,000,000,000,000,000,000,000
23
Fix bug #72241: get_icu_value_internal out-of-bounds read
fastd_handshake_timeout_t *unknown_hash_entry(int64_t base, size_t i, const fastd_peer_address_t *addr) { int64_t slice = base - i; uint32_t hash = ctx.unknown_handshake_seed; fastd_hash(&hash, &slice, sizeof(slice)); fastd_peer_address_hash(&hash, addr); fastd_hash_final(&hash); return &ctx.unknown_handshakes[(...
0
[ "CWE-617", "CWE-119", "CWE-284" ]
fastd
737925113363b6130879729cdff9ccc46c33eaea
338,801,279,673,161,900,000,000,000,000,000,000,000
9
receive: fix buffer leak when receiving invalid packets For fastd versions before v20, this was just a memory leak (which could still be used for DoS, as it's remotely triggerable). With the new buffer management of fastd v20, this will trigger an assertion failure instead as soon as the buffer pool is empty.
struct vmcs *alloc_vmcs_cpu(bool shadow, int cpu, gfp_t flags) { int node = cpu_to_node(cpu); struct page *pages; struct vmcs *vmcs; pages = __alloc_pages_node(node, flags, 0); if (!pages) return NULL; vmcs = page_address(pages); memset(vmcs, 0, vmcs_config.size); /* KVM supports Enlightened VMCS v1 only */...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
267,531,318,119,676,600,000,000,000,000,000,000,000
22
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
int tracing_is_enabled(void) { /* * For quick access (irqsoff uses this in fast path), just * return the mirror variable of the state of the ring buffer. * It's a little racy, but we don't really care. */ smp_rmb(); return !global_trace.buffer_disabled; }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
309,096,692,251,888,730,000,000,000,000,000,000,000
10
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
MagickExport MemoryInfo *RelinquishVirtualMemory(MemoryInfo *memory_info) { assert(memory_info != (MemoryInfo *) NULL); assert(memory_info->signature == MagickCoreSignature); if (memory_info->blob != (void *) NULL) switch (memory_info->type) { case AlignedVirtualMemory: { memory_info->...
0
[ "CWE-369" ]
ImageMagick
70aa86f5d5d8aa605a918ed51f7574f433a18482
113,761,906,716,922,760,000,000,000,000,000,000,000
31
possible divide by zero + clear buffers
static void sg_complete(struct urb *urb) { unsigned long flags; struct usb_sg_request *io = urb->context; int status = urb->status; spin_lock_irqsave(&io->lock, flags); /* In 2.5 we require hcds' endpoint queues not to progress after fault * reports, until the completion callback (this!) returns. That lets ...
0
[ "CWE-416" ]
linux
056ad39ee9253873522f6469c3364964a322912b
307,008,518,589,465,050,000,000,000,000,000,000,000
68
USB: core: Fix free-while-in-use bug in the USB S-Glibrary FuzzUSB (a variant of syzkaller) found a free-while-still-in-use bug in the USB scatter-gather library: BUG: KASAN: use-after-free in atomic_read include/asm-generic/atomic-instrumented.h:26 [inline] BUG: KASAN: use-after-free in usb_hcd_unlink_urb+0x5f/0x170...
void gd_putout(int i, void *out) { gdPutC(i, (gdIOCtx *)out); }
0
[ "CWE-415" ]
libgd
553702980ae89c83f2d6e254d62cf82e204956d0
294,195,112,780,955,600,000,000,000,000,000,000,000
4
Fix #492: Potential double-free in gdImage*Ptr() Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we must not call `gdDPExtractData()`; otherwise a double-free would happen. Since `gdImage*Ctx()` are void functions, and we can't change that for BC reasons, we're introducing static helpers which ar...
sctp_disposition_t sctp_sf_do_asconf_ack(struct net *net, const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *asconf_ack = arg; struct sctp_chunk *last_asconf = asoc->addip_last_asconf; struc...
1
[ "CWE-20", "CWE-399" ]
linux
9de7922bc709eee2f609cd01d98aaedc4cf5ea74
200,974,972,626,172,660,000,000,000,000,000,000,000
117
net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for ASCONF chunk") added basic verification of ASCONF chunks, however, it is still possible to remotely crash a server by sending a special crafted ASCONF chunk, even up to pre 2.6.12 kernels: ...
tsize_t t2p_readwrite_pdf_image(T2P* t2p, TIFF* input, TIFF* output){ tsize_t written=0; unsigned char* buffer=NULL; unsigned char* samplebuffer=NULL; tsize_t bufferoffset=0; tsize_t samplebufferoffset=0; tsize_t read=0; tstrip_t i=0; tstrip_t j=0; tstrip_t stripcount=0; tsize_t stripsize=0; tsize_t sepstri...
0
[ "CWE-119" ]
libtiff
b5d6803f0898e931cf772d3d0755704ab8488e63
230,066,797,823,251,500,000,000,000,000,000,000,000
591
* tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG compressed images. Reported by Tyler Bohan of Cisco Talos as TALOS-CAN-0187 / CVE-2016-5652. Also prevents writing 2 extra uninitialized bytes to the file stream.
static void slot_put(struct gfs2_quota_data *qd) { struct gfs2_sbd *sdp = qd->qd_gl->gl_sbd; spin_lock(&qd_lru_lock); gfs2_assert(sdp, qd->qd_slot_count); if (!--qd->qd_slot_count) { gfs2_icbit_munge(sdp, sdp->sd_quota_bitmap, qd->qd_slot, 0); qd->qd_slot = -1; } spin_unlock(&qd_lru_lock); }
0
[ "CWE-399" ]
linux-2.6
7e619bc3e6252dc746f64ac3b486e784822e9533
322,317,919,460,504,740,000,000,000,000,000,000,000
12
GFS2: Fix writing to non-page aligned gfs2_quota structures This is the upstream fix for this bug. This patch differs from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte value field of the quota. In upstream quota code, we're required to write the entire quota (88 bytes) which can be split across...
static auto makeServerDescriptionList() { return std::vector<ServerDescriptionPtr>{ make_with_latency(Milliseconds(1), HostAndPort("s1"), ServerType::kRSSecondary, {{"dc", "east"}, {"usage", "production"}})...
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
77,316,393,406,491,700,000,000,000,000,000,000,000
23
SERVER-50170 fix max staleness read preference parameter for server selection
CtPtr ProtocolV2::finish_auth() { ceph_assert(auth_meta); // TODO: having a possibility to check whether we're server or client could // allow reusing finish_auth(). session_stream_handlers = \ ceph::crypto::onwire::rxtx_t::create_handler_pair(cct, *auth_meta, true); const auto sig = auth_meta->session_k...
0
[ "CWE-323" ]
ceph
20b7bb685c5ea74c651ca1ea547ac66b0fee7035
41,611,921,659,426,500,000,000,000,000,000,000,000
15
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
PHP_FUNCTION(mb_eregi) { _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); }
0
[ "CWE-415" ]
php-src
5b597a2e5b28e2d5a52fc1be13f425f08f47cb62
8,903,933,569,651,264,000,000,000,000,000,000,000
4
Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free
bool CTransaction::AddToMemoryPoolUnchecked() { printf("AcceptToMemoryPoolUnchecked(): size %lu\n", mapTransactions.size()); // Add to memory pool without checking anything. Don't call this directly, // call AcceptToMemoryPool to properly check the transaction first. CRITICAL_BLOCK(cs_mapTransactions)...
0
[ "CWE-16", "CWE-787" ]
bitcoin
a206b0ea12eb4606b93323268fc81a4f1f952531
140,095,037,105,042,700,000,000,000,000,000,000,000
16
Do not allow overwriting unspent transactions (BIP 30) Introduce the following network rule: * a block is not valid if it contains a transaction whose hash already exists in the block chain, unless all that transaction's outputs were already spent before said block. Warning: this is effectively a network rule ...
onig_set_callout_of_name(OnigEncoding enc, OnigCalloutType callout_type, UChar* name, UChar* name_end, int in, OnigCalloutFunc start_func, OnigCalloutFunc end_func, int arg_num, unsigned int arg_types[], ...
0
[ "CWE-476" ]
oniguruma
850bd9b0d8186eb1637722b46b12656814ab4ad2
88,774,107,347,915,580,000,000,000,000,000,000,000
99
fix #87: Read unknown address in onig_error_code_to_str()
int register_inet6addr_notifier(struct notifier_block *nb) { return notifier_chain_register(&inet6addr_chain, nb); }
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
202,028,330,552,753,000,000,000,000,000,000,000,000
4
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
InterfaceLuid(const char *iface_name, PNET_LUID luid) { NETIO_STATUS status; LPWSTR wide_name = utf8to16(iface_name); if (wide_name) { status = ConvertInterfaceAliasToLuid(wide_name, luid); free(wide_name); } else { status = ERROR_OUTOFMEMORY; } return status...
0
[ "CWE-415" ]
openvpn
1394192b210cb3c6624a7419bcf3ff966742e79b
172,860,253,244,777,520,000,000,000,000,000,000,000
16
Fix potential double-free() in Interactive Service (CVE-2018-9336) Malformed input data on the service pipe towards the OpenVPN interactive service (normally used by the OpenVPN GUI to request openvpn instances from the service) can result in a double free() in the error handling code. This usually only leads to a pr...
static void tg3_phy_toggle_automdix(struct tg3 *tp, int enable) { u32 phy; if (!tg3_flag(tp, 5705_PLUS) || (tp->phy_flags & TG3_PHYFLG_ANY_SERDES)) return; if (tp->phy_flags & TG3_PHYFLG_IS_FET) { u32 ephy; if (!tg3_readphy(tp, MII_TG3_FET_TEST, &ephy)) { u32 reg = MII_TG3_FET_SHDW_MISCCTRL; tg3...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
123,165,205,338,819,600,000,000,000,000,000,000,000
40
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
static int gp_interception(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); u32 error_code = svm->vmcb->control.exit_info_1; int opcode; /* Both #GP cases have zero error_code */ if (error_code) goto reinject; /* Decode the instruction for usage later */ if (x86_decode_emulated_instruction(vcpu,...
0
[ "CWE-703" ]
linux
6cd88243c7e03845a450795e134b488fc2afb736
320,515,364,512,391,260,000,000,000,000,000,000,000
39
KVM: x86: do not report a vCPU as preempted outside instruction boundaries If a vCPU is outside guest mode and is scheduled out, it might be in the process of making a memory access. A problem occurs if another vCPU uses the PV TLB flush feature during the period when the vCPU is scheduled out, and a virtual address ...
static void xfrm_policy_kill(struct xfrm_policy *policy) { write_lock_bh(&policy->lock); policy->walk.dead = 1; write_unlock_bh(&policy->lock); atomic_inc(&policy->genid); if (del_timer(&policy->polq.hold_timer)) xfrm_pol_put(policy); skb_queue_purge(&policy->polq.hold_queue); if (del_timer(&policy->timer))...
0
[ "CWE-703" ]
linux
f85daf0e725358be78dfd208dea5fd665d8cb901
240,460,962,696,423,500,000,000,000,000,000,000,000
17
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 double mp_solve(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; const double *ptr1 = &_mp_arg(2) + 1, *ptr2 = &_mp_arg(3) + 1; const unsigned int k = (unsigned int)mp.opcode[4], l = (unsigned int)mp.opcode[5], m = (unsigned ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
79,964,447,972,688,455,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ReadBMP (const gchar *name, GError **error) { FILE *fd; guchar buffer[64]; gint ColormapSize, rowbytes, Maps; gboolean Grey = FALSE; guchar ColorMap[256][3]; gint32 image_ID; gchar magick[2]; Bitmap_Channel masks[4]; filename = name; fd = g_fopen (filename, "rb...
1
[ "CWE-190" ]
gimp
e3afc99b2fa7aeddf0dba4778663160a5bc682d3
89,349,128,805,997,680,000,000,000,000,000,000,000
381
Harden the BMP plugin against integer overflows. Issues discovered by Stefan Cornelius, Secunia Research, advisory SA37232 and CVE identifier CVE-2009-1570. Fixes bug #600484.
static int apparmor_task_setrlimit(struct task_struct *task, unsigned int resource, struct rlimit *new_rlim) { struct aa_profile *profile = aa_current_profile(); int error = 0; if (!unconfined(profile)) error = aa_task_setrlimit(profile, task, resource, new_rlim); return error; }
0
[ "CWE-20" ]
linux
a5b2c5b2ad5853591a6cac6134cd0f599a720865
24,776,362,245,947,185,000,000,000,000,000,000,000
11
AppArmor: fix oops in apparmor_setprocattr When invalid parameters are passed to apparmor_setprocattr a NULL deref oops occurs when it tries to record an audit message. This is because it is passing NULL for the profile parameter for aa_audit. But aa_audit now requires that the profile passed is not NULL. Fix this by...
opt_flag(const char *opt, int allow_negate, const char **optsp) { size_t opt_len = strlen(opt); const char *opts = *optsp; int negate = 0; if (allow_negate && strncasecmp(opts, "no-", 3) == 0) { opts += 3; negate = 1; } if (strncasecmp(opts, opt, opt_len) == 0) { *optsp = opts + opt_len; return negate ? ...
0
[]
openssh-portable
f3cbe43e28fe71427d41cfe3a17125b972710455
317,059,948,051,652,970,000,000,000,000,000,000,000
16
upstream: need initgroups() before setresgid(); reported by anton@, ok deraadt@ OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce
static struct sched_group *find_busiest_group(struct lb_env *env) { struct sg_lb_stats *local, *busiest; struct sd_lb_stats sds; init_sd_lb_stats(&sds); /* * Compute the various statistics relavent for load balancing at * this level. */ update_sd_lb_stats(env, &sds); if (static_branch_unlikely(&sched_ene...
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
85,946,247,003,111,160,000,000,000,000,000,000,000
100
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static struct btrfs_fs_devices *open_seed_devices(struct btrfs_fs_info *fs_info, u8 *fsid) { struct btrfs_fs_devices *fs_devices; int ret; lockdep_assert_held(&uuid_mutex); ASSERT(fsid); /* This will match only for multi-device seed fs */ list_for_each_entry(fs_devices, &fs_info->fs_devices->seed_list, ...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
57,124,786,475,932,440,000,000,000,000,000,000,000
53
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 /...
static void copy_valid_id_string(struct snd_card *card, const char *src, const char *nid) { char *id = card->id; while (*nid && !isalnum(*nid)) nid++; if (isdigit(*nid)) *id++ = isalpha(*src) ? *src : 'D'; while (*nid && (size_t)(id - card->id) < sizeof(card->id) - 1) { if (isalnum(*nid)) *id++ = *ni...
0
[ "CWE-416" ]
linux
2a3f7221acddfe1caa9ff09b3a8158c39b2fdeac
305,293,388,872,845,200,000,000,000,000,000,000,000
16
ALSA: core: Fix card races between register and disconnect There is a small race window in the card disconnection code that allows the registration of another card with the very same card id. This leads to a warning in procfs creation as caught by syzkaller. The problem is that we delete snd_cards and snd_cards_lock ...
TEST(UriSuite, TestToStringBug1950126) { UriParserStateW state; UriUriW uriOne; UriUriW uriTwo; const wchar_t * const uriOneString = L"http://e.com/"; const wchar_t * const uriTwoString = L"http://e.com"; state.uri = &uriOne; ASSERT_TRUE(URI_SUCCESS == uriParseUriW(&state, uriOneString)); state.uri = &u...
0
[ "CWE-125" ]
uriparser
cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4
23,214,101,473,627,507,000,000,000,000,000,000,000
17
Fix uriParse*Ex* out-of-bounds read
static int bdrv_check_byte_request(BlockDriverState *bs, int64_t offset, size_t size) { int64_t len; if (!bdrv_is_inserted(bs)) return -ENOMEDIUM; if (bs->growable) return 0; len = bdrv_getlength(bs); if (offset < 0) return -EIO; if...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
312,281,802,529,720,900,000,000,000,000,000,000,000
21
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
int ntfs_attr_map_whole_runlist(ntfs_attr *na) { VCN next_vcn, last_vcn, highest_vcn; ntfs_attr_search_ctx *ctx; ntfs_volume *vol = na->ni->vol; ATTR_RECORD *a; int ret = -1; int not_mapped; ntfs_log_enter("Entering for inode %llu, attr 0x%x.\n", (unsigned long long)na->ni->mft_no, le32_to_cpu(na->type...
0
[ "CWE-703" ]
ntfs-3g
60717a846deaaea47e50ce58872869f7bd1103b5
3,255,716,422,731,543,000,000,000,000,000,000,000
106
Avoided allocating and reading an attribute beyond its full size Before reading a full attribute value for internal use, its expected length has been checked to be < 0x40000. However the allocated size in the runlist may be much bigger as a consequence of a bug or malice. To prevent malloc'ing excessive size, restrict...
TEST_P(SslCertficateIntegrationTest, ServerEcdsa) { server_rsa_cert_ = false; server_ecdsa_cert_ = true; ConnectionCreationFunction creator = [&]() -> Network::ClientConnectionPtr { return makeSslClientConnection({}); }; testRouterRequestAndResponseWithBody(1024, 512, false, false, &creator); checkStats...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
76,958,335,842,510,020,000,000,000,000,000,000,000
9
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...
void rfbInitServer(rfbScreenInfoPtr screen) { #ifdef WIN32 WSADATA trash; WSAStartup(MAKEWORD(2,2),&trash); #endif rfbInitSockets(screen); rfbHttpInitSockets(screen); #ifndef __MINGW32__ if(screen->ignoreSIGPIPE) signal(SIGPIPE,SIG_IGN); #endif }
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
307,857,544,660,432,570,000,000,000,000,000,000,000
13
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned int optlen) { struct sctp_assoc_value params; struct sctp_association *asoc; struct sctp_sock *sp = sctp_sk(sk); int val; if (optlen == sizeof(int)) { pr_warn_ratelimited(DEPRECATED "%s (pid %d) " "Use of int in max...
0
[ "CWE-617", "CWE-362" ]
linux
2dcab598484185dea7ec22219c76dcdd59e3cb90
112,650,043,432,774,800,000,000,000,000,000,000,000
45
sctp: avoid BUG_ON on sctp_wait_for_sndbuf Alexander Popov reported that an application may trigger a BUG_ON in sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is waiting on it to queue more data and meanwhile another thread peels off the association being used by the first thread. This patch replaces ...
PHP_FUNCTION(xmlrpc_encode) { XMLRPC_VALUE xOut = NULL; zval *arg1; char *outBuf; if (zend_parse_parameters(ZEND_NUM_ARGS(), "z", &arg1) == FAILURE) { return; } if (USED_RET()) { /* convert native php type to xmlrpc type */ xOut = PHP_to_XMLRPC(arg1); /* generate raw xml from xmlrpc data */ outBuf = ...
0
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
148,330,345,768,976,080,000,000,000,000,000,000,000
27
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c
static my_bool sql_connect(MYSQL *mysql, uint wait) { my_bool info=0; for (;;) { if (mysql_real_connect(mysql,host,user,opt_password,NullS,tcp_port, unix_port, CLIENT_REMEMBER_OPTIONS)) { mysql->reconnect= 1; if (info) { fputs("\n",stderr); (void) fflush(stderr); } r...
1
[ "CWE-295" ]
mysql-server
b3e9211e48a3fb586e88b0270a175d2348935424
103,891,601,276,542,130,000,000,000,000,000,000,000
77
WL#9072: Backport WL#8785 to 5.5
TfLiteStatus CalculateShapeForBroadcast(TfLiteContext* context, const TfLiteTensor* input1, const TfLiteTensor* input2, TfLiteIntArray** output_shape) { const int dims1 = NumDimensions(input1); co...
0
[ "CWE-476", "CWE-369" ]
tensorflow
5b048e87e4e55990dae6b547add4dae59f4e1c76
80,650,444,671,175,580,000,000,000,000,000,000,000
30
Fix a null pointer exception in SVDF This is due to not checking that `GetVariableInput` returns non-null tensor. Also fix a potential null pointer exception in `GetVariableInput`. PiperOrigin-RevId: 385160147 Change-Id: Iadf3f0705b036a9014d27caa5a8bbd91f4c4c401
mrb_mod_const_missing(mrb_state *mrb, mrb_value mod) { mrb_sym sym; mrb_get_args(mrb, "n", &sym); if (mrb_class_real(mrb_class_ptr(mod)) != mrb->object_class) { mrb_name_error(mrb, sym, "uninitialized constant %S::%S", mod, mrb_sym2str(mrb, sym)); } else { mrb_n...
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
27,326,286,650,380,170,000,000,000,000,000,000,000
18
`mrb_class_real()` did not work for `BasicObject`; fix #4037
uint ha_myisam::checksum() const { return (uint)file->state->checksum; }
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
161,062,350,326,788,500,000,000,000,000,000,000,000
4
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...
static errno_t handle_missing_pvt(TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct sdap_options *opts, const char *orig_dn, int timeout, const c...
0
[ "CWE-264" ]
sssd
191d7f7ce3de10d9e19eaa0a6ab3319bcd4ca95d
39,972,932,607,115,760,000,000,000,000,000,000,000
35
AD: process non-posix nested groups using tokenGroups When initgr is performed for AD supporting tokenGroups, do not skip non-posix groups. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit 4932db6258ccfb612a3a28eb6a618c2f042b9d58)
BOOL transport_set_blocking_mode(rdpTransport* transport, BOOL blocking) { BOOL status; status = TRUE; transport->blocking = blocking; if (transport->SplitInputOutput) { status &= tcp_set_blocking_mode(transport->TcpIn, blocking); status &= tcp_set_blocking_mode(transport->TcpOut, blocking); } else { st...
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
128,261,937,024,806,100,000,000,000,000,000,000,000
24
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
pixBlockconvGrayUnnormalized(PIX *pixs, l_int32 wc, l_int32 hc) { l_int32 i, j, w, h, d, wpla, wpld, jmax; l_uint32 *linemina, *linemaxa, *lined, *dataa, *datad; PIX *pixsb, *pixacc, *pixd; PROCNAME("pixBlockconvGrayUnnormalized"); if (...
0
[]
leptonica
480f5e74c24fdc2003c42a4e15d1f24c9e6ea469
69,585,571,770,598,440,000,000,000,000,000,000,000
55
Fixed issue 21972 (oss-fuzz) Divide by zero in pixBlockconvGray().
static int blkcipher_walk_next(struct blkcipher_desc *desc, struct blkcipher_walk *walk) { struct crypto_blkcipher *tfm = desc->tfm; unsigned int alignmask = crypto_blkcipher_alignmask(tfm); unsigned int bsize; unsigned int n; int err; n = walk->total; if (unlikely(n < crypto_blkcipher_blocksize(tfm))...
0
[ "CWE-310" ]
linux
9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6
290,036,210,425,734,020,000,000,000,000,000,000,000
53
crypto: user - fix info leaks in report API Three errors resulting in kernel memory disclosure: 1/ The structures used for the netlink based crypto algorithm report API are located on the stack. As snprintf() does not fill the remainder of the buffer with null bytes, those stack bytes will be disclosed to users of th...
c_valid_ordinal_p(int y, int d, double sg, int *rd, int *rjd, int *ns) { int ry2, rd2; if (d < 0) { int rjd2, ns2; if (!c_find_ldoy(y, sg, &rjd2, &ns2)) return 0; c_jd_to_ordinal(rjd2 + d + 1, sg, &ry2, &rd2); if (ry2 != y) return 0; d = rd2; } c_ordinal_to_jd(y, d, sg, rjd, ns); ...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
244,557,535,550,571,030,000,000,000,000,000,000,000
21
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static GList *completion_joinlist(GList *list1, GList *list2) { GList *old; old = list2; while (list2 != NULL) { if (!glist_find_icase_string(list1, list2->data)) list1 = g_list_append(list1, list2->data); else g_free(list2->data); list2 = list2->next; } g_list_free(old); return list1; }
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
239,424,920,544,595,060,000,000,000,000,000,000,000
17
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
void RGWCopyObj_ObjStore_S3::send_partial_response(off_t ofs) { if (! sent_header) { if (op_ret) set_req_state_err(s, op_ret); dump_errno(s); // Explicitly use chunked transfer encoding so that we can stream the result // to the user without having to wait for the full length of it. end_heade...
0
[ "CWE-79" ]
ceph
8f90658c731499722d5f4393c8ad70b971d05f77
261,242,800,114,669,200,000,000,000,000,000,000,000
23
rgw: reject unauthenticated response-header actions Signed-off-by: Matt Benjamin <mbenjamin@redhat.com> Reviewed-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400)
int sqlite3ShadowTableName(sqlite3 *db, const char *zName){ char *zTail; /* Pointer to the last "_" in zName */ Table *pTab; /* Table that zName is a shadow of */ Module *pMod; /* Module for the virtual table */ zTail = strrchr(zName, '_'); if( zTail==0 ) ret...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
128,272,767,840,325,170,000,000,000,000,000,000,000
18
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
xfs_fill_fsxattr( struct xfs_inode *ip, int whichfork, struct fileattr *fa) { struct xfs_mount *mp = ip->i_mount; struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork); fileattr_fill_xflags(fa, xfs_ip2xflags(ip)); if (ip->i_diflags & XFS_DIFLAG_EXTSIZE) { fa->fsx_extsize = XFS_FSB_TO_B(mp, ip->i_extsize); ...
0
[ "CWE-125" ]
linux
983d8e60f50806f90534cc5373d0ce867e5aaf79
170,323,768,505,187,900,000,000,000,000,000,000,000
36
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...
of2str(int of) { int s, h, m; decode_offset(of, s, h, m); return rb_enc_sprintf(rb_usascii_encoding(), "%c%02d:%02d", s, h, m); }
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
249,105,258,804,678,630,000,000,000,000,000,000,000
7
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static int do_show_master_status(MYSQL *mysql_con, int consistent_binlog_pos) { MYSQL_ROW row; MYSQL_RES *UNINIT_VAR(master); char binlog_pos_file[FN_REFLEN]; char binlog_pos_offset[LONGLONG_LEN+1]; char *file, *offset; const char *comment_prefix= (opt_master_data == MYSQL_OPT_MASTER_DATA_COMMENTED_SQL)...
0
[]
server
5a43a31ee81bc181eeb5ef2bf0704befa6e0594d
241,528,946,561,725,100,000,000,000,000,000,000,000
60
mysqldump: comments and identifiers with new lines don't let identifiers with new lines to break a comment
MagickExport MagickBooleanType IsOptionMember(const char *option, const char *options) { char **option_list, *string; int number_options; MagickBooleanType member; register ssize_t i; /* Is option a member of the options list? */ if (options == (const char *) NULL) return...
0
[ "CWE-399" ]
ImageMagick
6790815c75bdea0357df5564345847856e995d6b
327,436,979,432,365,880,000,000,000,000,000,000,000
46
Fixed memory leak in IsOptionMember.
static void ape_unpack_stereo(APEContext *ctx, int count) { int32_t left, right; int32_t *decoded0 = ctx->decoded[0]; int32_t *decoded1 = ctx->decoded[1]; if ((ctx->frameflags & APE_FRAMECODE_STEREO_SILENCE) == APE_FRAMECODE_STEREO_SILENCE) { /* We are pure silence, so we're done. */ av...
0
[ "CWE-125" ]
FFmpeg
ba4beaf6149f7241c8bd85fe853318c2f6837ad0
110,684,308,783,143,660,000,000,000,000,000,000,000
26
avcodec/apedec: Fix integer overflow Fixes: out of array access Fixes: PoC.ape and others Found-by: Bingchang, Liu@VARAS of IIE Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
bool Item_field::collect_item_field_processor(void *arg) { DBUG_ENTER("Item_field::collect_item_field_processor"); DBUG_PRINT("info", ("%s", field->field_name ? field->field_name : "noname")); List<Item_field> *item_list= (List<Item_field>*) arg; List_iterator<Item_field> item_list_it(*item_list); Item_field ...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
290,728,146,390,896,500,000,000,000,000,000,000,000
15
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
void proxyToQuanX(std::vector<Proxy> &nodes, INIReader &ini, std::vector<RulesetContent> &ruleset_content_array, const ProxyGroupConfigs &extra_proxy_group, extra_settings &ext) { std::string type; std::string remark, hostname, port, method; std::string password, plugin, pluginopts; std::string id, tran...
0
[ "CWE-434", "CWE-94" ]
subconverter
ce8d2bd0f13f05fcbd2ed90755d097f402393dd3
125,721,630,267,152,230,000,000,000,000,000,000,000
273
Enhancements Add authorization check before loading scripts. Add detailed logs when loading preference settings.
size_t writeFile(const DataBuf& buf, const std::string& path) { FileIo file(path); if (file.open("wb") != 0) { throw Error(kerFileOpenFailed, path, "wb", strError()); } return file.write(buf.pData_, buf.size_); }
0
[ "CWE-125" ]
exiv2
bd0afe0390439b2c424d881c8c6eb0c5624e31d9
337,338,579,654,006,680,000,000,000,000,000,000,000
8
Add bounds check to MemIo::seek(). (#944) - Regression test for missing bounds check in MemIo::seek() - Add bounds check to MemIo::seek(), this fixes CVE-2019-13504
RQueueItem(SQLQuery* Q, MySQLresult* R) : q(Q), r(R) {}
0
[ "CWE-476" ]
inspircd
2cc35d8625b7ea5cbd1d1ebb116aff86c5280162
323,525,576,707,577,100,000,000,000,000,000,000,000
1
Initialise and deallocate the MySQL library correctly.
vc4_reset(struct drm_device *dev) { struct vc4_dev *vc4 = to_vc4_dev(dev); DRM_INFO("Resetting GPU.\n"); mutex_lock(&vc4->power_lock); if (vc4->power_refcount) { /* Power the device off and back on the by dropping the * reference on runtime PM. */ pm_runtime_put_sync_suspend(&vc4->v3d->pdev->dev); pm_...
0
[ "CWE-190", "CWE-703" ]
linux
0f2ff82e11c86c05d051cae32b58226392d33bbf
53,607,064,452,253,440,000,000,000,000,000,000,000
24
drm/vc4: Fix an integer overflow in temporary allocation layout. We copy the unvalidated ioctl arguments from the user into kernel temporary memory to run the validation from, to avoid a race where the user updates the unvalidate contents in between validating them and copying them into the validated BO. However, in ...
void net_check_clients(void) { NetClientState *nc; int i; net_hub_check_clients(); QTAILQ_FOREACH(nc, &net_clients, next) { if (!nc->peer) { warn_report("%s %s has no peer", nc->info->type == NET_CLIENT_DRIVER_NIC ? "nic" : "netdev", ...
0
[ "CWE-190" ]
qemu
25c01bd19d0e4b66f357618aeefda1ef7a41e21a
173,814,260,786,750,940,000,000,000,000,000,000,000
30
net: drop too large packet early We try to detect and drop too large packet (>INT_MAX) in 1592a9947036 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_...
static int post_copy_siginfo_from_user32(kernel_siginfo_t *to, const struct compat_siginfo *from) { clear_siginfo(to); to->si_signo = from->si_signo; to->si_errno = from->si_errno; to->si_code = from->si_code; switch(siginfo_layout(from->si_signo, from->si_code)) { case SIL_KILL: to->si_pid = from->si_pi...
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
254,289,020,798,927,830,000,000,000,000,000,000,000
77
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
de265_error decoder_context::decode_some(bool* did_work) { de265_error err = DE265_OK; *did_work = false; if (image_units.empty()) { return DE265_OK; } // nothing to do // decode something if there is work to do if ( ! image_units.empty() ) { // && ! image_units[0]->slice_units.empty() ) { image_un...
0
[ "CWE-416" ]
libde265
f538254e4658ef5ea4e233c2185dcbfd165e8911
303,673,555,649,840,760,000,000,000,000,000,000,000
90
fix streams where SPS image size changes without refreshing PPS (#299)
static int mctp_serial_open(struct tty_struct *tty) { struct mctp_serial *dev; struct net_device *ndev; char name[32]; int idx, rc; if (!capable(CAP_NET_ADMIN)) return -EPERM; if (!tty->ops->write) return -EOPNOTSUPP; idx = ida_alloc(&mctp_serial_ida, GFP_KERNEL); if (idx < 0) return idx; snprintf(na...
0
[]
linux
6c342ce2239c182c2428ce5a44cb32330434ae6e
194,518,310,080,049,700,000,000,000,000,000,000,000
50
mctp: serial: Cancel pending work from ndo_uninit handler We cannot do the cancel_work_sync from after the unregister_netdev, as the dev pointer is no longer valid, causing a uaf on ldisc unregister (or device close). Instead, do the cancel_work_sync from the ndo_uninit op, where the dev still exists, but the queue h...
bool testToStringCharsRequiredHelper(const wchar_t * text) { // Parse UriParserStateW state; UriUriW uri; state.uri = &uri; int res = uriParseUriW(&state, text); if (res != 0) { uriFreeUriMembersW(&uri); return false; } // Required space? int charsRequired; if (uriToStringCharsRequiredW(&uri...
0
[ "CWE-787" ]
uriparser
864f5d4c127def386dd5cc926ad96934b297f04e
193,205,957,190,229,100,000,000,000,000,000,000,000
37
UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex Reported by Google Autofuzz team
PHP_MINIT_FUNCTION(http_url) { zend_class_entry ce = {0}; INIT_NS_CLASS_ENTRY(ce, "http", "Url", php_http_url_methods); php_http_url_class_entry = zend_register_internal_class(&ce TSRMLS_CC); zend_declare_property_null(php_http_url_class_entry, ZEND_STRL("scheme"), ZEND_ACC_PUBLIC TSRMLS_CC); zend_declare_proper...
0
[ "CWE-119" ]
ext-http
3724cd76a28be1d6049b5537232e97ac567ae1f5
316,607,491,946,066,460,000,000,000,000,000,000,000
41
fix bug #71719 (Buffer overflow in HTTP url parsing functions) The parser's offset was not reset when we softfail in scheme parsing and continue to parse a path. Thanks to hlt99 at blinkenshell dot org for the report.
XML_GetErrorCode(XML_Parser parser) { if (parser == NULL) return XML_ERROR_INVALID_ARGUMENT; return parser->m_errorCode; }
0
[ "CWE-611", "CWE-776", "CWE-415", "CWE-125" ]
libexpat
c20b758c332d9a13afbbb276d30db1d183a85d43
75,490,996,230,561,620,000,000,000,000,000,000,000
5
xmlparse.c: Deny internal entities closing the doctype
static ssize_t ims_pcu_ofn_bit_show(struct device *dev, struct device_attribute *dattr, char *buf) { struct usb_interface *intf = to_usb_interface(dev); struct ims_pcu *pcu = usb_get_intfdata(intf); struct ims_pcu_ofn_bit_attribute *attr = container_of(dattr, struct ims_pcu_ofn_bit_attribute, datt...
0
[ "CWE-703" ]
linux
a0ad220c96692eda76b2e3fd7279f3dcd1d8a8ff
14,109,866,079,787,031,000,000,000,000,000,000,000
20
Input: ims-pcu - sanity check against missing interfaces A malicious device missing interface can make the driver oops. Add sanity checking. Signed-off-by: Oliver Neukum <ONeukum@suse.com> CC: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
int cli_stmt_execute(MYSQL_STMT *stmt) { DBUG_ENTER("cli_stmt_execute"); if (stmt->param_count) { MYSQL *mysql= stmt->mysql; NET *net= &mysql->net; MYSQL_BIND *param, *param_end; char *param_data; ulong length; uint null_count; my_bool result; if (!stmt->bind_para...
0
[]
mysql-server
3d8134d2c9b74bc8883ffe2ef59c168361223837
22,244,735,513,238,014,000,000,000,000,000,000,000
84
Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE() Description: If mysql_stmt_close() encountered error, it recorded error in prepared statement but then frees memory assigned to prepared statement. If mysql_stmt_error() is used to get error information, it will resu...
lyp_mand_check_ext(struct lys_ext_instance_complex *ext, const char *ext_name) { void *p; int i; struct ly_ctx *ctx = ext->module->ctx; /* check for mandatory substatements */ for (i = 0; ext->substmt[i].stmt; i++) { if (ext->substmt[i].cardinality == LY_STMT_CARD_OPT || ext->substmt[i].car...
0
[ "CWE-787" ]
libyang
f6d684ade99dd37b21babaa8a856f64faa1e2e0d
131,004,402,639,884,560,000,000,000,000,000,000,000
71
parser BUGFIX long identity name buffer overflow STRING_OVERFLOW (CWE-120)
find_split(const char *src, int step, int size) { int result = size; int n; if (size > 0) { /* check if that would split a backslash-sequence */ int mark = size; for (n = size - 1; n > 0; --n) { int ch = UChar(src[step + n]); if (ch == '\\') { if (n > 0 && src[step + n - 1] == ch) --n; ...
0
[ "CWE-125" ]
ncurses
b025434573f466efe27862656a6a9d41dd2bd609
300,995,229,118,462,500,000,000,000,000,000,000,000
39
ncurses 6.1 - patch 20191012 + amend recent changes to ncurses*-config and pc-files to filter out Debian linker-flags (report by Sven Joachim, cf: 20150516). + clarify relationship between tic, infocmp and captoinfo in manpage. + check for invalid hashcode in _nc_find_type_entry and _nc_find_name_entry. > fix seve...
usage (int status) { if (status != 0) { fprintf (stderr, _("Usage: %s [OPTION]... PATTERN [FILE]...\n"), program_name); fprintf (stderr, _("Try '%s --help' for more information.\n"), program_name); } else { printf (_("Usage: %s [OPTION]... PATTERN [FILE].....
0
[ "CWE-189" ]
grep
8fcf61523644df42e1905c81bed26838e0b04f91
134,785,270,345,340,720,000,000,000,000,000,000,000
110
grep: fix integer-overflow issues in main program * NEWS: Document this. * bootstrap.conf (gnulib_modules): Add inttypes, xstrtoimax. Remove xstrtoumax. * src/main.c: Include <inttypes.h>, for INTMAX_MAX, PRIdMAX. (context_length_arg, prtext, grepbuf, grep, grepfile) (get_nondigit_option, main): Use intmax_t, not int,...
static inline struct xfrm_algo_auth *xfrm_algo_auth_clone(struct xfrm_algo_auth *orig) { return kmemdup(orig, xfrm_alg_auth_len(orig), GFP_KERNEL); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
173,368,915,782,152,930,000,000,000,000,000,000,000
4
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...
void mk_vhost_free_all() { struct host *host; struct host_alias *host_alias; struct error_page *ep; struct mk_list *head_host; struct mk_list *head_alias; struct mk_list *head_error; struct mk_list *tmp1, *tmp2; mk_list_foreach_safe(head_host, tmp1, &config->hosts) { host = mk_l...
0
[ "CWE-20" ]
monkey
b2d0e6f92310bb14a15aa2f8e96e1fb5379776dd
331,923,544,028,588,270,000,000,000,000,000,000,000
42
Request: new request session flag to mark those files opened by FDT This patch aims to fix a potential DDoS problem that can be caused in the server quering repetitive non-existent resources. When serving a static file, the core use Vhost FDT mechanism, but if it sends a static error page it does a direct open(2). Wh...
wrong_priority(dns_rdataset_t *rds, int pass, dns_rdatatype_t preferred_glue) { int pass_needed; /* * If we are not rendering class IN, this ordering is bogus. */ if (rds->rdclass != dns_rdataclass_in) return (false); switch (rds->type) { case dns_rdatatype_a: case dns_rdatatype_aaaa: if (preferred_glue...
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
242,158,861,853,611,100,000,000,000,000,000,000,000
30
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
PHPAPI void php_info_print_table_end(void) /* {{{ */ { if (!sapi_module.phpinfo_as_text) { php_info_print("</table>\n"); }
0
[ "CWE-200" ]
php-src
3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9
56,443,051,893,955,510,000,000,000,000,000,000,000
7
Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff *skb, const struct net_device *in, const struct net_device *out, int (*okfn)(struct sk_buff *)) { struct nf_bridge_info *nf_bridge; struct net_device *parent; u_int8_t pf; if (!skb->nf_bridge) return NF_ACCEPT; /*...
0
[]
linux-2.6
f8e9881c2aef1e982e5abc25c046820cd0b7cf64
273,055,919,454,914,360,000,000,000,000,000,000,000
54
bridge: reset IPCB in br_parse_ip_options Commit 462fb2af9788a82 (bridge : Sanitize skb before it enters the IP stack), missed one IPCB init before calling ip_options_compile() Thanks to Scot Doyle for his tests and bug reports. Reported-by: Scot Doyle <lkml@scotdoyle.com> Signed-off-by: Eric Dumazet <eric.dumazet@g...
static int follow_managed(struct path *path, struct nameidata *nd) { struct vfsmount *mnt = path->mnt; /* held by caller, must be left alone */ unsigned managed; bool need_mntput = false; int ret = 0; /* Given that we're not holding a lock here, we retain the value in a * local variable for each dentry as we lo...
0
[ "CWE-254" ]
linux
397d425dc26da728396e66d392d5dcb8dac30c37
2,356,060,094,305,639,400,000,000,000,000,000,000
64
vfs: Test for and handle paths that are unreachable from their mnt_root In rare cases a directory can be renamed out from under a bind mount. In those cases without special handling it becomes possible to walk up the directory tree to the root dentry of the filesystem and down from the root dentry to every other file ...
static inline struct sock *l2tp_ip6_bind_lookup(struct net *net, struct in6_addr *laddr, int dif, u32 tunnel_id) { struct sock *sk = __l2tp_ip6_bind_lookup(net, laddr, dif, tunnel_id); if (sk) sock_hold(sk); return sk; }
0
[ "CWE-20" ]
net
85fbaa75037d0b6b786ff18658ddf0b4014ce2a4
91,524,553,984,917,910,000,000,000,000,000,000,000
10
inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage of uninitialized memory to user in recv syscalls") conditionally updated addr_len if the msg_name is written to. The recv_error and rxpmtu functions relied on the re...
evalvars_init(void) { int i; struct vimvar *p; init_var_dict(&globvardict, &globvars_var, VAR_DEF_SCOPE); init_var_dict(&vimvardict, &vimvars_var, VAR_SCOPE); vimvardict.dv_lock = VAR_FIXED; hash_init(&compat_hashtab); for (i = 0; i < VV_LEN; ++i) { p = &vimvars[i]; if (STRLEN...
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
247,395,542,538,012,940,000,000,000,000,000,000,000
75
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.
add_mlist(struct mlist *mlp, struct magic_map *map, size_t idx) { struct mlist *ml; mlp->map = idx == 0 ? map : NULL; if ((ml = CAST(struct mlist *, malloc(sizeof(*ml)))) == NULL) return -1; ml->map = NULL; ml->magic = map->magic[idx]; ml->nmagic = map->nmagic[idx]; mlp->prev->next = ml; ml->prev = mlp->pr...
0
[ "CWE-399" ]
file
90018fe22ff8b74a22fcd142225b0a00f3f12677
44,142,282,365,134,310,000,000,000,000,000,000,000
18
bump recursion to 15, and allow it to be set from the command line.
mod_init(struct module *const restrict m) { if (! (saslsvs = service_add("saslserv", &saslserv_message_handler))) { (void) slog(LG_ERROR, "%s: service_add() failed", m->name); m->mflags |= MODFLAG_FAIL; return; } (void) hook_add_sasl_input(&sasl_input); (void) hook_add_user_add(&sasl_user_add); (void) hook...
0
[ "CWE-287", "CWE-288" ]
atheme
4e664c75d0b280a052eb8b5e81aa41944e593c52
201,934,566,036,018,640,000,000,000,000,000,000,000
18
saslserv/main: Track EID we're pending login to The existing model does not remember that we've sent a SVSLOGIN for a given SASL session, and simply assumes that if a client is introduced with a SASL session open, that session must have succeeded. The security of this approach requires ircd to implicitly abort SASL se...
rfbSendNewFBSize(rfbClientPtr cl, int w, int h) { rfbFramebufferUpdateRectHeader rect; if (cl->ublen + sz_rfbFramebufferUpdateRectHeader > UPDATE_BUF_SIZE) { if (!rfbSendUpdateBuf(cl)) return FALSE; } if (cl->PalmVNC==TRUE) rfbLog("Sending rfbEncodingNew...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
266,637,540,349,595,300,000,000,000,000,000,000,000
30
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
TEST(IndexBoundsBuilderTest, CanUseCoveredMatchingForEqualityPredicate) { auto testIndex = buildSimpleIndexEntry(); BSONObj obj = fromjson("{a: {$eq: 3}}"); auto expr = parseMatchExpression(obj); ASSERT_TRUE(IndexBoundsBuilder::canUseCoveredMatching(expr.get(), testIndex)); }
0
[ "CWE-754" ]
mongo
f8f55e1825ee5c7bdb3208fc7c5b54321d172732
24,497,609,487,423,560,000,000,000,000,000,000,000
6
SERVER-44377 generate correct plan for indexed inequalities to null
int FS_FindVM(void **startSearch, char *found, int foundlen, const char *name, int enableDll) { searchpath_t *search, *lastSearch; directory_t *dir; pack_t *pack; char dllName[MAX_OSPATH], qvmName[MAX_OSPATH]; char *netpath; if(!fs_searchpaths) Com_Error(ERR_FATAL, "Filesystem call made without initialization"...
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
337,849,067,189,791,180,000,000,000,000,000,000,000
76
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
PosibErr<bool> Config::read_in_settings(const Config * other) { if (settings_read_in_) return false; bool was_committed = committed_; set_committed_state(false); if (other && other->settings_read_in_) { assert(empty()); del(); // to clean up any notifiers and similar stuff copy(...
0
[ "CWE-125" ]
aspell
80fa26c74279fced8d778351cff19d1d8f44fe4e
85,122,093,606,760,010,000,000,000,000,000,000,000
43
Fix various bugs found by OSS-Fuze.
void *htp_tx_get_user_data(const htp_tx_t *tx) { if (tx == NULL) return NULL; return tx->user_data; }
0
[]
libhtp
c7c03843cd6b1cbf44eb435d160ba53aec948828
323,821,434,659,182,170,000,000,000,000,000,000,000
4
Harden decompress code against memory stress Under severe memory pressure the decompress code can fail to setup properly. Add checks before dereferencing pointers.
static int cdrom_ioctl_reset(struct cdrom_device_info *cdi, struct block_device *bdev) { cd_dbg(CD_DO_IOCTL, "entering CDROM_RESET\n"); if (!capable(CAP_SYS_ADMIN)) return -EACCES; if (!CDROM_CAN(CDC_RESET)) return -ENOSYS; invalidate_bdev(bdev); return cdi->ops->reset(cdi); }
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
244,987,434,201,063,970,000,000,000,000,000,000,000
12
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
vhost_scsi_make_nodeacl(struct se_portal_group *se_tpg, struct config_group *group, const char *name) { struct se_node_acl *se_nacl, *se_nacl_new; struct vhost_scsi_nacl *nacl; u64 wwpn = 0; u32 nexus_depth; /* vhost_scsi_parse_wwn(name, &wwpn, 1) < 0) return ERR_PTR(-EINVAL); */ se_nacl_new ...
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
202,398,884,648,501,120,000,000,000,000,000,000,000
34
vhost/scsi: potential memory corruption This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt" to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16. I looked at the context and it turns out that in vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into the vs_tpg[] arr...
GF_SceneEngine *gf_seng_init_from_string(void *calling_object, char * inputContext, u32 load_type, u32 width, u32 height, Bool usePixelMetrics, char *dump_path) { GF_SceneEngine *seng; GF_Err e = GF_OK; if (!inputContext) return NULL; GF_SAFEALLOC(seng, GF_SceneEngine) if (!seng) return NULL; seng->calling_obj...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
325,238,246,263,715,400,000,000,000,000,000,000,000
55
fixed #2138
chvt_rndsetup(const void *bp, size_t sz) { register uint32_t h; /* use LCG as seed but try to get them to deviate immediately */ h = lcg_state; (void)rndget(); BAFHFinish_reg(h); /* variation through pid, ppid, and the works */ BAFHUpdateMem_reg(h, &rndsetupstate, sizeof(rndsetupstate)); /* some variation, som...
0
[]
mksh
de53d2df1c3b812c262cc1bddbfe0b3bfc25c14b
240,628,156,088,321,930,000,000,000,000,000,000,000
17
SECURITY: do not permit += from environment either this makes our environment filter/sanitisation complete
explicit CImgList(const unsigned int n):_width(n) { if (n) _data = new CImg<T>[_allocated_width = std::max(16U,(unsigned int)cimg::nearest_pow2(n))]; else { _allocated_width = 0; _data = 0; } }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
267,362,621,134,107,830,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
CGroupContext *unit_get_cgroup_context(Unit *u) { size_t offset; offset = UNIT_VTABLE(u)->cgroup_context_offset; if (offset <= 0) return NULL; return (CGroupContext*) ((uint8_t*) u + offset); }
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
205,844,715,201,769,700,000,000,000,000,000,000,000
9
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static size_t ssl_get_reassembly_buffer_size( size_t msg_len, unsigned add_bitmap ) { size_t alloc_len; alloc_len = 12; /* Handshake header */ alloc_len += msg_len; /* Content buffer */ if( add_...
0
[ "CWE-787" ]
mbedtls
f333dfab4a6c2d8a604a61558a8f783145161de4
102,819,428,700,320,150,000,000,000,000,000,000,000
13
More SSL debug messages for ClientHello parsing In particular, be verbose when checking the ClientHello cookie in a possible DTLS reconnection. Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
QPDF::readObject(PointerHolder<InputSource> input, std::string const& description, int objid, int generation, bool in_object_stream) { setLastObjectDescription(description, objid, generation); qpdf_offset_t offset = input->tell(); bool empty = false; PointerHolder<StringDecrypter> decrypter_ph; ...
0
[ "CWE-125" ]
qpdf
1868a10f8b06631362618bfc85ca8646da4b4b71
231,382,504,302,999,000,000,000,000,000,000,000,000
170
Replace all atoi calls with QUtil::string_to_int The latter catches underflow/overflow.
int bdrv_reopen(BlockDriverState *bs, int bdrv_flags, Error **errp) { int ret = -1; Error *local_err = NULL; BlockReopenQueue *queue = bdrv_reopen_queue(NULL, bs, bdrv_flags); ret = bdrv_reopen_multiple(queue, &local_err); if (local_err != NULL) { error_propagate(errp, local_err); } ...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
219,585,412,674,231,250,000,000,000,000,000,000,000
12
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
krb5_error_code kdb_samba_db_get_principal(krb5_context context, krb5_const_principal princ, unsigned int kflags, krb5_db_entry **kentry) { struct mit_samba_context *mit_ctx; krb5_error_code code; mit_ctx = ks_get_context(context); if (mit_ctx == NULL) { return KRB5_KDB_DBNOTINITED; } ...
0
[]
samba
4ef445a1f37e77df8016d240fcf22927165b8c03
203,313,802,235,584,100,000,000,000,000,000,000,000
42
CVE-2020-25719 mit-samba: Add ks_free_principal() BUG: https://bugzilla.samba.org/show_bug.cgi?id=14561 [abartlet@samba.org As submitted in patch to Samba bugzilla to address this issue as https://attachments.samba.org/attachment.cgi?id=16724 on overall bug https://bugzilla.samba.org/show_bug.cgi?id=14725] Signed-...
static int io_async_cancel_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { if (unlikely(req->ctx->flags & IORING_SETUP_IOPOLL)) return -EINVAL; if (unlikely(req->flags & (REQ_F_FIXED_FILE | REQ_F_BUFFER_SELECT))) return -EINVAL; if (sqe->ioprio || sqe->off || sqe->len || sqe->cancel_flags) ret...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
198,603,032,876,989,630,000,000,000,000,000,000,000
13
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
int sc_mutex_destroy(const sc_context_t *ctx, void *mutex) { if (ctx == NULL) return SC_ERROR_INVALID_ARGUMENTS; if (ctx->thread_ctx != NULL && ctx->thread_ctx->destroy_mutex != NULL) return ctx->thread_ctx->destroy_mutex(mutex); else return SC_SUCCESS; }
0
[ "CWE-415", "CWE-119" ]
OpenSC
360e95d45ac4123255a4c796db96337f332160ad
258,948,145,834,546,800,000,000,000,000,000,000,000
9
fixed out of bounds writes Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting the problems.
int propfind_aclrestrict(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr prop __attribute__((unused)), xmlNodePtr resp __attribute__((unused)), struct propstat propstat[], ...
0
[]
cyrus-imapd
6703ff881b6056e0c045a7b795ce8ba1bbb87027
134,205,953,063,066,100,000,000,000,000,000,000,000
14
http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication
int set_zval_xmlrpc_type(zval* value, XMLRPC_VALUE_TYPE newtype) /* {{{ */ { int bSuccess = FAILURE; /* we only really care about strings because they can represent * base64 and datetime. all other types have corresponding php types */ if (Z_TYPE_P(value) == IS_STRING) { if (newtype == xmlrpc_base64 || newty...
0
[]
php-src
f3c1863aa2721343245b63ac7bd68cfdc3dd41f3
125,778,513,291,655,640,000,000,000,000,000,000,000
43
Fixed #70728 Conflicts: ext/xmlrpc/xmlrpc-epi-php.c