func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static unsigned int pcie_aer_root_get_vector(PCIDevice *dev) { uint8_t *aer_cap = dev->config + dev->exp.aer_cap; uint32_t root_status = pci_get_long(aer_cap + PCI_ERR_ROOT_STATUS); return (root_status & PCI_ERR_ROOT_IRQ) >> PCI_ERR_ROOT_IRQ_SHIFT; }
0
[ "CWE-119" ]
qemu
5f691ff91d323b6f97c6600405a7f9dc115a0ad1
206,910,002,731,164,700,000,000,000,000,000,000,000
6
hw/pci/pcie_aer.c: fix buffer overruns on invalid state load 4) CVE-2013-4529 hw/pci/pcie_aer.c pcie aer log can overrun the buffer if log_num is too large There are two issues in this file: 1. log_max from remote can be larger than on local then buffer will overrun with data coming from state...
static inline struct kvm *kvm_arch_alloc_vm(void) { return kzalloc(sizeof(struct kvm), GFP_KERNEL); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
226,777,325,547,139,080,000,000,000,000,000,000,000
4
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
ConnectDialog::~ConnectDialog() { ServerItem::qmIcons.clear(); QList<FavoriteServer> ql; qmPingCache.clear(); foreach(ServerItem *si, qlItems) { if (si->uiPing) qmPingCache.insert(UnresolvedServerAddress(si->qsHostname, si->usPort), si->uiPing); if (si->itType != ServerItem::FavoriteType) continue; q...
0
[ "CWE-59", "CWE-61" ]
mumble
e59ee87abe249f345908c7d568f6879d16bfd648
181,545,459,847,739,240,000,000,000,000,000,000,000
20
FIX(client): Only allow "http"/"https" for URLs in ConnectDialog Our public server list registration script doesn't have an URL scheme whitelist for the website field. Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine. User interaction is required, as the ...
static noinline_for_stack int ethtool_set_rxnfc(struct net_device *dev, void __user *useraddr) { struct ethtool_rxnfc cmd; if (!dev->ethtool_ops->set_rxnfc) return -EOPNOTSUPP; if (copy_from_user(&cmd, useraddr, sizeof(cmd))) return -EFAULT; return dev->ethtool_ops->set_rxnfc(dev, &cmd); }
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
259,368,515,344,976,170,000,000,000,000,000,000,000
13
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
static void print_liveness(struct bpf_verifier_env *env, enum bpf_reg_liveness live) { if (live & (REG_LIVE_READ | REG_LIVE_WRITTEN | REG_LIVE_DONE)) verbose(env, "_"); if (live & REG_LIVE_READ) verbose(env, "r"); if (live & REG_LIVE_WRITTEN) verbose(env, "w"); if (live & REG_LIVE_DONE) verbose(env...
0
[ "CWE-703", "CWE-189" ]
linux
979d63d50c0c0f7bc537bf821e056cc9fe5abd38
216,981,385,040,269,900,000,000,000,000,000,000,000
12
bpf: prevent out of bounds speculation on pointer arithmetic Jann reported that the original commit back in b2157399cc98 ("bpf: prevent out-of-bounds speculation") was not sufficient to stop CPU from speculating out of bounds memory access: While b2157399cc98 only focussed on masking array map access for unprivileged ...
bool sk_busy_loop_end(void *p, unsigned long start_time) { struct sock *sk = p; return !skb_queue_empty_lockless(&sk->sk_receive_queue) || sk_busy_loop_timeout(sk, start_time); }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
180,441,691,061,903,860,000,000,000,000,000,000,000
7
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
update_system_term(term_T *term) { VTermPos pos; VTermScreen *screen; if (term->tl_vterm == NULL) return; screen = vterm_obtain_screen(term->tl_vterm); /* Scroll up to make more room for terminal lines if needed. */ while (term->tl_toprow > 0 && (Rows - term->tl_toprow) < term->t...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
269,491,786,514,544,620,000,000,000,000,000,000,000
41
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
dns_zone_markdirty(dns_zone_t *zone) { uint32_t serial; isc_result_t result = ISC_R_SUCCESS; dns_zone_t *secure = NULL; /* * Obtaining a lock on the zone->secure (see zone_send_secureserial) * could result in a deadlock due to a LOR so we will spin if we * can't obtain the both locks. */ again: LOCK_ZONE...
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
317,011,857,544,283,940,000,000,000,000,000,000,000
47
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
static bool states_equal(struct bpf_verifier_env *env, struct bpf_verifier_state *old, struct bpf_verifier_state *cur) { int i; if (old->curframe != cur->curframe) return false; /* Verification state from speculative execution simulation * must never prune a non-speculative execution one. */ if (old...
0
[ "CWE-843" ]
bpf
5b029a32cfe4600f5e10e36b41778506b90fd4de
326,312,411,214,975,100,000,000,000,000,000,000,000
29
bpf: Fix ringbuf helper function compatibility Commit 457f44363a88 ("bpf: Implement BPF ring buffer and verifier support for it") extended check_map_func_compatibility() by enforcing map -> helper function match, but not helper -> map type match. Due to this all of the bpf_ringbuf_*() helper functions could be used w...
bool CModules::GetModInfo(CModInfo& ModInfo, const CString& sModule, CString& sRetMsg) { if (!ValidateModuleName(sModule, sRetMsg)) { return false; } CString sModPath, sTmp; bool bSuccess; bool bHandled = false; GLOBALMODULECALL(OnGetModInfo(ModInfo, sModule, ...
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
260,894,215,512,614,750,000,000,000,000,000,000,000
21
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
Utility::parseHttp1Settings(const envoy::config::core::v3::Http1ProtocolOptions& config, const Protobuf::BoolValue& hcm_stream_error) { Http1Settings ret = parseHttp1Settings(config); if (config.has_override_stream_error_on_invalid_http_message()) { // override_stream_error_on_inval...
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
58,827,282,716,730,830,000,000,000,000,000,000,000
16
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
char *must_append_path(char *first, ...) { char *cur; size_t full_len; va_list args; char *dest = first; size_t buf_len; full_len = strlen(first); va_start(args, first); while ((cur = va_arg(args, char *)) != NULL) { full_len += strlen(cur); if (cur[0] != '/') full_len++; buf_len = full_len + 1; de...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
192,317,291,762,654,900,000,000,000,000,000,000,000
26
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
void t2p_read_tiff_size(T2P* t2p, TIFF* input){ uint64* sbc=NULL; #if defined(JPEG_SUPPORT) || defined (OJPEG_SUPPORT) unsigned char* jpt=NULL; tstrip_t i=0; tstrip_t stripcount=0; #endif uint64 k = 0; if(t2p->pdf_transcode == T2P_TRANSCODE_RAW){ #ifdef CCITT_SUPPORT if(t2p->pdf_compression == T2P_COMP...
1
[ "CWE-787" ]
libtiff
7be2e452ddcf6d7abca88f41d3761e6edab72b22
7,308,755,875,845,946,000,000,000,000,000,000,000
139
tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr fixes #220
static inline void xfrm_state_put(struct xfrm_state *x) { if (refcount_dec_and_test(&x->refcnt)) __xfrm_state_destroy(x, false); }
0
[ "CWE-416" ]
linux
dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399
79,763,043,768,871,380,000,000,000,000,000,000,000
5
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...
static void __tcp_ack_snd_check(struct sock *sk, int ofo_possible) { struct tcp_sock *tp = tcp_sk(sk); /* More than one full frame received... */ if (((tp->rcv_nxt - tp->rcv_wup) > inet_csk(sk)->icsk_ack.rcv_mss && /* ... and right edge of window advances far enough. * (tcp_recvmsg() will send ACK ...
0
[]
net-next
fdf5af0daf8019cec2396cdef8fb042d80fe71fa
168,964,049,464,538,850,000,000,000,000,000,000,000
21
tcp: drop SYN+FIN messages Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his linux machines to their limits. Dont call conn_request() if the TCP flags includes SYN flag Reported-by: Denys Fedoryshchenko <denys@visp.net.lb> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S...
soup_cookie_jar_request_unqueued (SoupSessionFeature *feature, SoupSession *session, SoupMessage *msg) { g_signal_handlers_disconnect_by_func (msg, process_set_cookie_header, feature); }
0
[ "CWE-125" ]
libsoup
db2b0d5809d5f8226d47312b40992cadbcde439f
319,486,624,162,828,000,000,000,000,000,000,000,000
6
cookie-jar: bail if hostname is an empty string There are several other ways to fix the problem with this function, but skipping over all of the code is probably the simplest. Fixes #3
get_next_pebs_record_by_bit(void *base, void *top, int bit) { struct cpu_hw_events *cpuc = this_cpu_ptr(&cpu_hw_events); void *at; u64 pebs_status; /* * fmt0 does not have a status bitfield (does not use * perf_record_nhm format) */ if (x86_pmu.intel_cap.pebs_format < 1) return base; if (base == NULL) ...
0
[ "CWE-755" ]
linux
d88d05a9e0b6d9356e97129d4ff9942d765f46ea
301,380,630,854,228,440,000,000,000,000,000,000,000
36
perf/x86/intel: Fix a crash caused by zero PEBS status A repeatable crash can be triggered by the perf_fuzzer on some Haswell system. https://lore.kernel.org/lkml/7170d3b-c17f-1ded-52aa-cc6d9ae999f4@maine.edu/ For some old CPUs (HSW and earlier), the PEBS status in a PEBS record may be mistakenly set to 0. To minimiz...
static void cil_reset_iomemcon(struct cil_iomemcon *iomemcon) { if (iomemcon->context_str == NULL) { cil_reset_context(iomemcon->context); } }
0
[ "CWE-416" ]
selinux
f34d3d30c8325e4847a6b696fe7a3936a8a361f3
17,294,379,785,361,725,000,000,000,000,000,000,000
6
libsepol/cil: Destroy classperms list when resetting classpermission Nicolas Iooss reports: A few months ago, OSS-Fuzz found a crash in the CIL compiler, which got reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title is misleading, or is caused by another issue that conflicts with...
crypto_cert_iteration_next(krb5_context context, pkinit_cert_iter_handle ih, pkinit_cert_handle *ch_ret) { struct _pkinit_cert_iter_data *id = (struct _pkinit_cert_iter_data *)ih; struct _pkinit_cert_data *cd; pkinit_identity_crypto_context id_cryptoctx;...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
209,088,373,051,115,770,000,000,000,000,000,000,000
34
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
PHP_FUNCTION(pcntl_wifexited) { #ifdef WIFEXITED long status_word; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &status_word) == FAILURE) { return; } if (WIFEXITED(status_word)) RETURN_TRUE; #endif RETURN_FALSE; }
0
[ "CWE-19" ]
php-src
be9b2a95adb504abd5acdc092d770444ad6f6854
177,288,363,781,294,500,000,000,000,000,000,000,000
14
Fixed bug #69418 - more s->p fixes for filenames
static int cac_read_binary(sc_card_t *card, unsigned int idx, unsigned char *buf, size_t count, unsigned long flags) { cac_private_data_t * priv = CAC_DATA(card); int r = 0; u8 *tl = NULL, *val = NULL; u8 *tl_ptr, *val_ptr, *tlv_ptr, *tl_start; u8 *cert_ptr; size_t tl_len, val_len, tlv_len; size_t len, tl_head...
1
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
283,454,050,984,692,440,000,000,000,000,000,000,000
161
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
AudioTrack::AudioTrack(unsigned int* seed) : Track(seed), bit_depth_(0), channels_(1), sample_rate_(0.0) {}
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
273,868,371,539,988,800,000,000,000,000,000,000,000
2
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
Nef_polyhedron_2(Forward_iterator it, Forward_iterator end, Boundary b = INCLUDED) : Base(Nef_rep()) /*{\Mcreate creates a Nef polyhedron |\Mvar| from the simple polygon |P| spanned by the list of points in the iterator range |[it,end)| and including its boundary if |b = INCLUDED| and excluding the boundary...
0
[ "CWE-269" ]
cgal
618b409b0fbcef7cb536a4134ae3a424ef5aae45
284,493,294,713,376,470,000,000,000,000,000,000,000
58
Fix Nef_2 and Nef_S2 IO
void cpu_watchpoint_remove_all(CPUState *cpu, int mask) { }
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
11,814,836,974,595,064,000,000,000,000,000,000,000
4
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
void AsyncSSLSocket::getSelectedNextProtocol( const unsigned char** protoName, unsigned* protoLen) const { if (!getSelectedNextProtocolNoThrow(protoName, protoLen)) { throw AsyncSocketException( AsyncSocketException::NOT_SUPPORTED, "ALPN not supported"); } }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
76,421,712,178,747,010,000,000,000,000,000,000,000
8
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
static void interface_update_area_complete(QXLInstance *sin, uint32_t surface_id, QXLRect *dirty, uint32_t num_updated_rects) { /* should never be called, used in qxl native mode only */ fprintf(stderr, "%s: abort()\n", __func__); abort(); }
0
[ "CWE-200" ]
qemu
ab9509cceabef28071e41bdfa073083859c949a7
30,427,385,853,911,670,000,000,000,000,000,000,000
8
spice: make sure we don't overflow ssd->buf Related spice-only bug. We have a fixed 16 MB buffer here, being presented to the spice-server as qxl video memory in case spice is used with a non-qxl card. It's also used with qxl in vga mode. When using display resolutions requiring more than 16 MB of memory we are goi...
void __init kvmclock_init(void) { if (!kvm_para_available()) return; if (kvmclock && kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE2)) { msr_kvm_system_time = MSR_KVM_SYSTEM_TIME_NEW; msr_kvm_wall_clock = MSR_KVM_WALL_CLOCK_NEW; } else if (!(kvmclock && kvm_para_has_feature(KVM_FEATURE_CLOCKSOURCE))) return; ...
0
[]
linux
95ef1e52922cf75b1ea2eae54ef886f2cc47eecb
125,340,059,731,020,290,000,000,000,000,000,000,000
36
KVM guest: prevent tracing recursion with kvmclock Prevent tracing of preempt_disable() in get_cpu_var() in kvm_clock_read(). When CONFIG_DEBUG_PREEMPT is enabled, preempt_disable/enable() are traced and this causes the function_graph tracer to go into an infinite recursion. By open coding the preempt_disable() around...
static void av1dmx_check_dur(GF_Filter *filter, GF_AV1DmxCtx *ctx) { FILE *stream; GF_Err e; GF_BitStream *bs; u64 duration, cur_dur, last_cdur, rate; AV1State av1state; const char *filepath=NULL; const GF_PropertyValue *p; if (!ctx->opid || ctx->timescale || ctx->file_loaded) return; p = gf_filter_pid_get_pr...
0
[ "CWE-476", "CWE-787" ]
gpac
13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec
66,527,526,371,699,850,000,000,000,000,000,000,000
130
fixed #1719
ext2_xattr_delete_inode(struct inode *inode) { struct buffer_head *bh = NULL; down_write(&EXT2_I(inode)->xattr_sem); if (!EXT2_I(inode)->i_file_acl) goto cleanup; bh = sb_bread(inode->i_sb, EXT2_I(inode)->i_file_acl); if (!bh) { ext2_error(inode->i_sb, "ext2_xattr_delete_inode", "inode %ld: block %d read e...
0
[ "CWE-241", "CWE-19" ]
linux
be0726d33cb8f411945884664924bed3cb8c70ee
20,481,094,228,543,375,000,000,000,000,000,000,000
52
ext2: convert to mbcache2 The conversion is generally straightforward. We convert filesystem from a global cache to per-fs one. Similarly to ext4 the tricky part is that xattr block corresponding to found mbcache entry can get freed before we get buffer lock for that block. So we have to check whether the entry is sti...
void printIFD(std::ostream& out, PrintStructureOption option, uint64_t dir_offset, int depth) { BasicIo& io = Image::io(); depth++; bool bFirst = true; // buffer bool bPrint = true; ...
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
142,898,158,643,522,280,000,000,000,000,000,000,000
204
Fix https://github.com/Exiv2/exiv2/issues/55
static int MP4_ReadBox_stdp( stream_t *p_stream, MP4_Box_t *p_box ) { MP4_READBOX_ENTER( MP4_Box_data_stdp_t ); MP4_GETVERSIONFLAGS( p_box->data.p_stdp ); p_box->data.p_stdp->i_priority = calloc( i_read / 2, sizeof(uint16_t) ); if( unlikely( !p_box->data.p_stdp->i_priority ) ) MP4_REA...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
49,936,845,432,323,950,000,000,000,000,000,000,000
24
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
static int nfs_flush_one(struct nfs_pageio_descriptor *desc, struct nfs_pgio_header *hdr) { struct nfs_page *req; struct page **pages; struct nfs_write_data *data; struct list_head *head = &desc->pg_list; struct nfs_commit_info cinfo; data = nfs_writedata_alloc(hdr, nfs_page_array_len(desc->pg_base, ...
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
156,065,547,328,517,640,000,000,000,000,000,000,000
35
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
void gf_sg_del(GF_SceneGraph *sg) { if (!sg) return; #ifndef GPAC_DISABLE_VRML if (sg->global_qp) { gf_node_unregister(sg->global_qp, NULL); sg->global_qp = NULL; } #endif gf_sg_reset(sg); #ifndef GPAC_DISABLE_SVG gf_dom_event_target_del(sg->dom_evt); gf_list_del(sg->xlink_hrefs); gf_list_del(sg->smil_ti...
0
[ "CWE-416" ]
gpac
9723dd0955894f2cb7be13b94cf7a47f2754b893
63,709,594,185,150,570,000,000,000,000,000,000,000
47
fixed #2109
static EVP_PKEY * php_openssl_evp_from_zval( zval * val, int public_key, char *passphrase, size_t passphrase_len, int makeresource, zend_resource **resourceval) { EVP_PKEY * key = NULL; X509 * cert = NULL; int free_cert = 0; zend_resource *cert_res = NULL; char * filename = NULL; zval tmp; ZVAL_NULL(&tmp); ...
0
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
284,047,308,518,175,400,000,000,000,000,000,000,000
174
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
list_script_vars(int *first) { if (SCRIPT_ID_VALID(current_sctx.sc_sid)) list_hashtable_vars(&SCRIPT_VARS(current_sctx.sc_sid), "s:", FALSE, first); }
0
[ "CWE-476" ]
vim
0f6e28f686dbb59ab3b562408ab9b2234797b9b1
93,011,966,070,211,190,000,000,000,000,000,000,000
6
patch 8.2.4428: crash when switching tabpage while in the cmdline window Problem: Crash when switching tabpage while in the cmdline window. Solution: Disallow switching tabpage when in the cmdline window.
STATIC bool S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode_offset * node_p, UV * code_point_p, int * cp_count, I32 * flagp, const bool strict, const U32 depth ) { /* This routine teases apart the various meani...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
161,674,357,007,629,850,000,000,000,000,000,000,000
466
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
static unsigned int calc_sb_csum(mdp_super_t *sb) { u64 newcsum = 0; u32 *sb32 = (u32*)sb; int i; unsigned int disk_csum, csum; disk_csum = sb->sb_csum; sb->sb_csum = 0; for (i = 0; i < MD_SB_BYTES/4 ; i++) newcsum += sb32[i]; csum = (newcsum & 0xffffffff) + (newcsum>>32); #ifdef CONFIG_ALPHA /* This used...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
237,798,893,273,588,360,000,000,000,000,000,000,000
29
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
static void ovs_nla_free_dec_ttl_action(const struct nlattr *action) { const struct nlattr *a = nla_data(action); switch (nla_type(a)) { case OVS_DEC_TTL_ATTR_ACTION: ovs_nla_free_nested_actions(nla_data(a), nla_len(a)); break; } }
0
[ "CWE-362", "CWE-787" ]
linux
cefa91b2332d7009bc0be5d951d6cbbf349f90f8
296,308,228,012,132,250,000,000,000,000,000,000,000
10
openvswitch: fix OOB access in reserve_sfa_size() Given a sufficiently large number of actions, while copying and reserving memory for a new action of a new flow, if next_offset is greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS...
bool commonio_present (const struct commonio_db *db) { return (access (db->filename, F_OK) == 0); }
0
[ "CWE-119", "CWE-787" ]
shadow
954e3d2e7113e9ac06632aee3c69b8d818cc8952
242,411,999,760,982,240,000,000,000,000,000,000,000
4
Fix buffer overflow if NULL line is present in db. If ptr->line == NULL for an entry, the first cycle will exit, but the second one will happily write past entries buffer. We actually do not want to exit the first cycle prematurely on ptr->line == NULL. Signed-off-by: Tomas Mraz <tmraz@fedoraproject.org>
TEST_P(Http2IntegrationTest, CodecStreamIdleTimeout) { config_helper_.setBufferLimits(1024, 1024); config_helper_.addConfigModifier( [&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager& hcm) -> void { hcm.mutable_stream_idle_timeout()->set_seconds(...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
139,493,510,268,976,660,000,000,000,000,000,000,000
20
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...
static void perf_cgroup_switch(struct task_struct *task, int mode) { struct perf_cpu_context *cpuctx; struct list_head *list; unsigned long flags; /* * Disable interrupts and preemption to avoid this CPU's * cgrp_cpuctx_entry to change under us. */ local_irq_save(flags); list = this_cpu_ptr(&cgrp_cpuctx_l...
0
[ "CWE-190" ]
linux
1572e45a924f254d9570093abde46430c3172e3d
71,846,246,568,494,830,000,000,000,000,000,000,000
47
perf/core: Fix the perf_cpu_time_max_percent check Use "proc_dointvec_minmax" instead of "proc_dointvec" to check the input value from user-space. If not, we can set a big value and some vars will overflow like "sysctl_perf_event_sample_rate" which will cause a lot of unexpected problems. Signed-off-by: Tan Xiaojun ...
mbochs_dmabuf_find_by_id(struct mdev_state *mdev_state, u32 id) { struct mbochs_dmabuf *dmabuf; WARN_ON(!mutex_is_locked(&mdev_state->ops_lock)); list_for_each_entry(dmabuf, &mdev_state->dmabufs, next) if (dmabuf->id == id) return dmabuf; return NULL; }
0
[ "CWE-200", "CWE-401" ]
linux
de5494af4815a4c9328536c72741229b7de88e7f
234,142,129,545,644,600,000,000,000,000,000,000,000
12
vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes Convert mbochs to use an atomic scheme for this like mtty was changed into. The atomic fixes various race conditions with probing. Add the missing error unwind. Also add the missing kfree of mdev_state->pages. Fixes: 681c1615f891 ("vfio/mbochs: Convert to us...
static inline unsigned int div_up(unsigned int a, unsigned int b) { unsigned int r; unsigned int q; if (b == 0) return UINT_MAX; q = div32(a, b, &r); if (r) ++q; return q; }
0
[ "CWE-416", "CWE-362" ]
linux
3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4
287,488,703,165,583,460,000,000,000,000,000,000,000
11
ALSA: pcm : Call kill_fasync() in stream lock Currently kill_fasync() is called outside the stream lock in snd_pcm_period_elapsed(). This is potentially racy, since the stream may get released even during the irq handler is running. Although snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't guarantee th...
static int i40e_set_features(struct net_device *netdev, netdev_features_t features) { struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_vsi *vsi = np->vsi; struct i40e_pf *pf = vsi->back; bool need_reset; if (features & NETIF_F_RXHASH && !(netdev->features & NETIF_F_RXHASH)) i40e_pf_config_...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
287,507,434,262,299,480,000,000,000,000,000,000,000
35
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
static ssize_t zr364xx_read(struct file *file, char __user *buf, size_t count, loff_t * ppos) { struct zr364xx_camera *cam = video_drvdata(file); int err = 0; _DBG("%s\n", __func__); if (!buf) return -EINVAL; if (!count) return -EINVAL; if (mutex_lock_interruptible(&cam->lock)) return -ERESTARTSY...
0
[ "CWE-476" ]
linux
5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e
295,314,643,296,173,040,000,000,000,000,000,000,000
30
media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap SyzKaller hit the null pointer deref while reading from uninitialized udev->product in zr364xx_vidioc_querycap(). ================================================================== BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20 in...
vrrp_track_if_handler(vector_t *strvec) { alloc_value_block(alloc_vrrp_track_if, vector_slot(strvec, 0)); }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
164,389,309,471,896,210,000,000,000,000,000,000,000
4
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
} void kvm_unregister_perf_callbacks(void) { perf_unregister_guest_info_callbacks(&kvm_guest_cbs);
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
91,461,326,719,292,710,000,000,000,000,000,000,000
4
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
static char *str_dup_safe_fixed(const ut8 *b, const ut8 *str, ut64 len, const ut8 *end) { if (str >= b && str + len < end) { char *result = calloc (1, len + 1); if (result) { r_str_ncpy (result, (const char *)str, len); return result; } } return NULL; }
0
[ "CWE-125", "CWE-787" ]
radare2
a35f89f86ed12161af09330e92e5a213014e46a1
13,353,508,935,237,517,000,000,000,000,000,000,000
10
Fix oobread in macho core symbolication ##crash * Reported by @cnitlrt via huntr.dev
tilde_replace( char_u *orig_pat, int num_files, char_u **files) { int i; char_u *p; if (orig_pat[0] == '~' && vim_ispathsep(orig_pat[1])) { for (i = 0; i < num_files; ++i) { p = home_replace_save(NULL, files[i]); if (p != NULL) { vim_free(files[i]); files[i] ...
0
[ "CWE-122", "CWE-787" ]
vim
85b6747abc15a7a81086db31289cf1b8b17e6cb1
30,369,361,232,520,640,000,000,000,000,000,000,000
21
patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode Problem: Illegal memory access with large 'tabstop' in Ex mode. Solution: Allocate enough memory.
TfLiteRegistration* Register_SKIP_GRAM() { static TfLiteRegistration r = {nullptr, nullptr, Prepare, Eval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
59,329,857,214,012,970,000,000,000,000,000,000,000
4
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
void SSL_CTX_flush_sessions(SSL_CTX *s, long t) { unsigned long i; TIMEOUT_PARAM tp; tp.ctx=s; tp.cache=s->sessions; if (tp.cache == NULL) return; tp.time=t; CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); i=tp.cache->down_load; tp.cache->down_load=0; lh_doall_arg(tp.cache, LHASH_DOALL_ARG_FN(timeout), &tp); tp.cache-...
0
[]
openssl
36ca4ba63d083da6f9d4598f18f17a8c32c8eca2
59,200,298,416,557,360,000,000,000,000,000,000,000
16
Implement the Supported Point Formats Extension for ECC ciphersuites Submitted by: Douglas Stebila
void proc_id_connector(struct task_struct *task, int which_id) { struct cn_msg *msg; struct proc_event *ev; __u8 buffer[CN_PROC_MSG_SIZE] __aligned(8); struct timespec ts; const struct cred *cred; if (atomic_read(&proc_event_num_listeners) < 1) return; msg = buffer_to_cn_msg(buffer); ev = (struct proc_event...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
32,818,422,401,916,147,000,000,000,000,000,000,000
40
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
virDomainLookupByUUIDString(virConnectPtr conn, const char *uuidstr) { unsigned char uuid[VIR_UUID_BUFLEN]; VIR_DEBUG("conn=%p, uuidstr=%s", conn, NULLSTR(uuidstr)); virResetLastError(); virCheckConnectReturn(conn, NULL); virCheckNonNullArgGoto(uuidstr, error); if (virUUIDParse(uuidstr, uuid)...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
317,894,893,302,564,550,000,000,000,000,000,000,000
21
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
static int rb_head_page_set_update(struct ring_buffer_per_cpu *cpu_buffer, struct buffer_page *head, struct buffer_page *prev, int old_flag) { return rb_head_page_set(cpu_buffer, head, prev, old_flag, RB_PAGE_UPDATE); }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
111,698,038,150,933,000,000,000,000,000,000,000,000
8
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
GF_Err fdsa_box_read(GF_Box *s, GF_BitStream *bs) { return gf_isom_box_array_read(s, bs); }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
55,442,157,359,175,100,000,000,000,000,000,000,000
4
fixed #2255
explicit Conv3DBackpropFilterOp(OpKernelConstruction* context) : OpKernel(context), data_format_(FORMAT_NHWC), takes_shape_(type_string().find("V2") != std::string::npos) { // data_format is only available in V2. if (takes_shape_) { string data_format; OP_REQUIRES_OK(context,...
0
[ "CWE-703", "CWE-787" ]
tensorflow
8f37b52e1320d8d72a9529b2468277791a261197
43,905,693,060,539,260,000,000,000,000,000,000,000
46
Validate some shape requirements for `Conv3DBackpropFilter*` and `Conv3DBackpropInput*` ops. Older versions of Eigen might otherwise crash / produce OOB read on specially crafted inputs. PiperOrigin-RevId: 369293977 Change-Id: I58f51445a93936d7cf8e616f75de17677df36718
offset2bytes(int nr, char_u *buf) { int rem; int b1, b2, b3, b4; /* Split the number in parts of base 255. We need to avoid NUL bytes. */ b1 = nr % 255 + 1; rem = nr / 255; b2 = rem % 255 + 1; rem = rem / 255; b3 = rem % 255 + 1; b4 = rem / 255 + 1; if (b4 > 1 || b3 > ...
0
[ "CWE-190" ]
vim
399c297aa93afe2c0a39e2a1b3f972aebba44c9d
75,263,502,520,598,670,000,000,000,000,000,000,000
38
patch 8.0.0322: possible overflow with corrupted spell file Problem: Possible overflow with spell file where the tree length is corrupted. Solution: Check for an invalid length (suggested by shqking)
const char *get_superproject_working_tree(void) { struct child_process cp = CHILD_PROCESS_INIT; struct strbuf sb = STRBUF_INIT; const char *one_up = real_path_if_valid("../"); const char *cwd = xgetcwd(); const char *ret = NULL; const char *subpath; int code; ssize_t len; if (!is_inside_work_tree()) /* *...
0
[]
git
a8dee3ca610f5a1d403634492136c887f83b59d2
38,485,474,411,737,095,000,000,000,000,000,000,000
81
Disallow dubiously-nested submodule git directories Currently it is technically possible to let a submodule's git directory point right into the git dir of a sibling submodule. Example: the git directories of two submodules with the names `hippo` and `hippo/hooks` would be `.git/modules/hippo/` and `.git/modules/hipp...
void CLASS canon_600_load_raw() { uchar data[1120], *dp; ushort pixel[896], *pix; int irow, row, col, val; static const short mul[4][2] = { { 1141,1145 }, { 1128,1109 }, { 1178,1149 }, { 1128,1109 } }; for (irow=row=0; irow < height; irow++) { if (fread (data, 1, raw_width*5/4, ifp) < raw_width*5/4) d...
0
[]
LibRaw
c4e374ea6c979a7d1d968f5082b7d0ea8cd27202
268,384,545,166,301,960,000,000,000,000,000,000,000
60
additional data checks backported from 0.15.4
accept_ice_connection (GIOChannel *source, GIOCondition condition, GsmIceConnectionData *data) { IceListenObj listener; IceConn ice_conn; IceAcceptStatus status; GsmClient *client; GsmXsmpServer *se...
1
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
271,760,046,865,831,070,000,000,000,000,000,000,000
30
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
void uwsgi_exec_command_with_args(char *cmdline) { char *argv[4]; argv[0] = uwsgi_binsh(); argv[1] = "-c"; argv[2] = cmdline; argv[3] = NULL; execvp(argv[0], argv); uwsgi_error("execvp()"); exit(1); }
0
[ "CWE-119", "CWE-703", "CWE-787" ]
uwsgi
cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe
303,714,682,743,337,880,000,000,000,000,000,000,000
10
improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue
GF_Err chpl_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 count, i; GF_ChapterListBox *ptr = (GF_ChapterListBox *) s; e = gf_isom_full_box_write(s, bs); if (e) return e; count = gf_list_count(ptr->list); gf_bs_write_u32(bs, 0); gf_bs_write_u8(bs, count); for (i=0; i<count; i++) { u32 len; GF_ChapterE...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
235,762,412,662,084,900,000,000,000,000,000,000,000
26
prevent dref memleak on invalid input (#1183)
static int x25_recvmsg(struct socket *sock, struct msghdr *msg, size_t size, int flags) { struct sock *sk = sock->sk; struct x25_sock *x25 = x25_sk(sk); DECLARE_SOCKADDR(struct sockaddr_x25 *, sx25, msg->msg_name); size_t copied; int qbit, header_len; struct sk_buff *skb; unsigned char *asmptr; int rc ...
0
[]
net
7781607938c8371d4c2b243527430241c62e39c2
307,921,331,182,350,300,000,000,000,000,000,000,000
100
net/x25: Fix null-ptr-deref caused by x25_disconnect When the link layer is terminating, x25->neighbour will be set to NULL in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is shown below. (Thread 1) | (Thread 2...
static UINT drdynvc_virtual_channel_event_disconnected(drdynvcPlugin* drdynvc) { UINT status; if (drdynvc->OpenHandle == 0) return CHANNEL_RC_OK; if (!drdynvc) return CHANNEL_RC_BAD_CHANNEL_HANDLE; if (!MessageQueue_PostQuit(drdynvc->queue, 0)) { status = GetLastError(); WLog_Print(drdynvc->log, WLOG_ER...
0
[ "CWE-125" ]
FreeRDP
baee520e3dd9be6511c45a14c5f5e77784de1471
6,167,549,042,986,783,000,000,000,000,000,000,000
53
Fix for #4866: Added additional length checks
static int vt_reldisp(struct vc_data *vc, unsigned int swtch) { int newvt, ret; if (vc->vt_mode.mode != VT_PROCESS) return -EINVAL; /* Switched-to response */ if (vc->vt_newvt < 0) { /* If it's just an ACK, ignore it */ return swtch == VT_ACKACQ ? 0 : -EINVAL; } /* Switching-from response */ if (swtch ...
0
[ "CWE-662" ]
linux
90bfdeef83f1d6c696039b6a917190dcbbad3220
228,631,623,559,933,350,000,000,000,000,000,000,000
35
tty: make FONTX ioctl use the tty pointer they were actually passed Some of the font tty ioctl's always used the current foreground VC for their operations. Don't do that then. This fixes a data race on fg_console. Side note: both Michael Ellerman and Jiri Slaby point out that all these ioctls are deprecated, and s...
int AVI_frame_size(avi_t *AVI, int frame) { if(AVI->mode==AVI_MODE_WRITE) { AVI_errno = AVI_ERR_NOT_PERM; return -1; } if(!AVI->video_index) { AVI_errno = AVI_ERR_NO_IDX; return -1; } if(frame < 0 || frame >= AVI->video_frames) return 0; return (u32) (AVI->video_index[frame].len); }
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
13,213,073,734,584,868,000,000,000,000,000,000,000
14
fixed #2159
void operator()(cudnnRNNDescriptor_t descriptor) const { CHECK_CUDNN_OK(cudnnDestroyRNNDescriptor(descriptor)); }
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
233,879,487,842,984,770,000,000,000,000,000,000,000
3
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
nfsd4_decode_test_stateid(struct nfsd4_compoundargs *argp, struct nfsd4_test_stateid *test_stateid) { int i; __be32 *p, status; struct nfsd4_test_stateid_id *stateid; READ_BUF(4); test_stateid->ts_num_ids = ntohl(*p++); INIT_LIST_HEAD(&test_stateid->ts_stateid_list); for (i = 0; i < test_stateid->ts_num_ids; ...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
68,291,230,068,455,100,000,000,000,000,000,000,000
34
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
void Smb4KMountDialog::slotChangeInputValue( const QString& _test) { enableButtonOk( !_test.isEmpty() ); }
0
[ "CWE-20" ]
smb4k
71554140bdaede27b95dbe4c9b5a028a83c83cce
10,434,473,940,546,230,000,000,000,000,000,000,000
4
Find the mount/umount commands in the helper Instead of trusting what we get passed in CVE-2017-8849
XLogFlush(XLogRecPtr record) { XLogRecPtr WriteRqstPtr; XLogwrtRqst WriteRqst; /* * During REDO, we are reading not writing WAL. Therefore, instead of * trying to flush the WAL, we should update minRecoveryPoint instead. We * test XLogInsertAllowed(), not InRecovery, because we need checkpointer * to act t...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
232,527,165,959,753,550,000,000,000,000,000,000,000
165
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
int ssl_set_peer_cert_type(SESS_CERT *sc,int type) { sc->peer_cert_type = type; return(1); }
0
[]
openssl
c70a1fee71119a9005b1f304a3bf47694b4a53ac
54,248,340,348,466,060,000,000,000,000,000,000,000
5
Reorganise supported signature algorithm extension processing. Only store encoded versions of peer and configured signature algorithms. Determine shared signature algorithms and cache the result along with NID equivalents of each algorithm. (backport from HEAD)
static void ma_field_extension_init_type_info(MA_MEM_ROOT *memroot, MA_FIELD_EXTENSION *ext, const char *ptr, size_t length) { const char *end= ptr + length; for ( ; ptr < end; ) { uint itype= (uchar) *ptr++; uint...
0
[ "CWE-20" ]
mariadb-connector-c
2759b87d72926b7c9b5426437a7c8dd15ff57945
97,689,641,240,826,100,000,000,000,000,000,000,000
16
sanity checks for client-supplied OK packet content reported by Matthias Kaiser, Apple Information Security
uint32_t sldns_wirerr_get_ttl(uint8_t* rr, size_t len, size_t dname_len) { if(len < dname_len+8) return 0; return sldns_read_uint32(rr+dname_len+4); }
0
[]
unbound
3f3cadd416d6efa92ff2d548ac090f42cd79fee9
234,315,168,498,172,650,000,000,000,000,000,000,000
6
- Fix Out of Bounds Write in sldns_str2wire_str_buf(), reported by X41 D-Sec.
static __latent_entropy void net_rx_action(struct softirq_action *h) { struct softnet_data *sd = this_cpu_ptr(&softnet_data); unsigned long time_limit = jiffies + usecs_to_jiffies(netdev_budget_usecs); int budget = netdev_budget; LIST_HEAD(list); LIST_HEAD(repoll); local_irq_disable(); list_splice_init(&sd->...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
62,687,257,576,194,770,000,000,000,000,000,000,000
48
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...
isoent_find_child(struct isoent *isoent, const char *child_name) { struct isoent *np; np = (struct isoent *)__archive_rb_tree_find_node( &(isoent->rbtree), child_name); return (np); }
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
153,144,653,921,791,610,000,000,000,000,000,000,000
8
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static void shm_add_rss_swap(struct shmid_kernel *shp, unsigned long *rss_add, unsigned long *swp_add) { struct inode *inode; inode = file_inode(shp->shm_file); if (is_file_hugepages(shp->shm_file)) { struct address_space *mapping = inode->i_mapping; struct hstate *h = hstate_file(shp->shm_file); *rss_add +...
0
[ "CWE-362" ]
linux
a399b29dfbaaaf91162b2dc5a5875dd51bbfa2a1
203,387,276,140,471,500,000,000,000,000,000,000,000
23
ipc,shm: fix shm_file deletion races When IPC_RMID races with other shm operations there's potential for use-after-free of the shm object's associated file (shm_file). Here's the race before this patch: TASK 1 TASK 2 ------ ------ shm_rmid() ipc_lock_object() ...
measured_bw_line_parse(measured_bw_line_t *out, const char *orig_line) { char *line = tor_strdup(orig_line); char *cp = line; int got_bw = 0; int got_node_id = 0; char *strtok_state; /* lame sauce d'jour */ cp = tor_strtok_r(cp, " \t", &strtok_state); if (!cp) { log_warn(LD_DIRSERV, "Invalid line in ...
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
281,400,979,851,651,230,000,000,000,000,000,000,000
75
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
static int parse_config(const char *var, const char *value, void *data) { struct parse_config_parameter *me = data; struct submodule *submodule; struct strbuf name = STRBUF_INIT, item = STRBUF_INIT; int ret = 0; /* this also ensures that we only parse submodule entries */ if (!name_and_item_from_var(var, &name, ...
1
[ "CWE-88" ]
git
f6adec4e329ef0e25e14c63b735a5956dc67b8bc
294,419,684,083,655,860,000,000,000,000,000,000,000
97
submodule-config: ban submodule urls that start with dash The previous commit taught the submodule code to invoke our "git clone $url $path" with a "--" separator so that we aren't confused by urls or paths that start with dashes. However, that's just one code path. It's not clear if there are others, and it would be...
DEFUN(deletePrevBuf, DELETE_PREVBUF, "Delete previous buffer (mainly for local CGI-scripts)") { Buffer *buf = Currentbuf->nextBuffer; if (buf) delBuffer(buf); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
138,362,767,563,631,270,000,000,000,000,000,000,000
6
Make temporary directory safely when ~/.w3m is unwritable
mprint(struct magic_set *ms, struct magic *m) { uint64_t v; float vf; double vd; int64_t t = 0; char buf[128], tbuf[26], sbuf[512], ebuf[512]; const char *desc; union VALUETYPE *p = &ms->ms_value; if (varexpand(ms, ebuf, sizeof(ebuf), m->desc) == -1) desc = m->desc; else desc = ebuf; switch (m->type)...
1
[ "CWE-787" ]
file
d65781527c8134a1202b2649695d48d5701ac60b
29,755,657,231,370,404,000,000,000,000,000,000,000
278
PR/62: spinpx: limit size of file_printable.
static int php_cli_server_send_event(php_cli_server *server, php_cli_server_client *client TSRMLS_DC) /* {{{ */ { if (client->content_sender_initialized) { if (client->file_fd >= 0 && !client->content_sender.buffer.first) { size_t nbytes_read; if (php_cli_server_content_sender_pull(&client->content_sender, cli...
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
7,033,500,790,140,486,000,000,000,000,000,000,000
28
slim post data
void addReplyDouble(redisClient *c, double d) { char dbuf[128], sbuf[128]; int dlen, slen; dlen = snprintf(dbuf,sizeof(dbuf),"%.17g",d); slen = snprintf(sbuf,sizeof(sbuf),"$%d\r\n%s\r\n",dlen,dbuf); addReplyString(c,sbuf,slen); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
207,181,704,809,647,000,000,000,000,000,000,000,000
7
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
static int usbdev_open(struct inode *inode, struct file *file) { struct usb_device *dev = NULL; struct usb_dev_state *ps; int ret; ret = -ENOMEM; ps = kzalloc(sizeof(struct usb_dev_state), GFP_KERNEL); if (!ps) goto out_free_ps; ret = -ENODEV; /* Protect against simultaneous removal or release */ mutex_lo...
0
[ "CWE-200" ]
linux
681fef8380eb818c0b845fca5d2ab1dcbab114ee
301,852,401,333,612,200,000,000,000,000,000,000,000
60
USB: usbfs: fix potential infoleak in devio The stack object “ci” has a total size of 8 bytes. Its last 3 bytes are padding bytes which are not initialized and leaked to userland via “copy_to_user”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
void topicName( const string_255& topicName) { topic_name_ = topicName; }
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
163,018,840,440,009,280,000,000,000,000,000,000,000
5
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static bool io_req_clean_work(struct io_kiocb *req) { if (!(req->flags & REQ_F_WORK_INITIALIZED)) return false; req->flags &= ~REQ_F_WORK_INITIALIZED; if (req->work.mm) { mmdrop(req->work.mm); req->work.mm = NULL; } if (req->work.creds) { put_cred(req->work.creds); req->work.creds = NULL; } if (req->...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
187,062,409,160,539,400,000,000,000,000,000,000,000
32
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 main(void) { mg_log_set("3"); test_get_header_var(); test_rewrites(); test_check_ip_acl(); test_udp(); test_pipe(); test_packed(); test_crc32(); test_multipart(); test_http_chunked(); test_http_parse(); test_util(); test_sntp(); test_dns(); test_str(); test_timer(); test_url(); t...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
69,022,467,309,187,815,000,000,000,000,000,000,000
35
Protect against the directory traversal in mg_upload()
get_optvalue_from_block_data(struct block_cursor *cursor, struct option_header *opthdr, char *errbuf) { size_t padded_option_len; void *optvalue; /* Pad option length to 4-byte boundary */ padded_option_len = opthdr->option_length; padded_option_len = ((padded_option_len + 3)/4)*4; optvalue = get_from_block...
0
[ "CWE-20", "CWE-703", "CWE-770" ]
libpcap
87d6bef033062f969e70fa40c43dfd945d5a20ab
202,861,494,379,338,060,000,000,000,000,000,000,000
20
do sanity checks on PHB header length before allocating memory. There was no fault; but doing the check results in a more consistent error
xmlErrValidNode(xmlValidCtxtPtr ctxt, xmlNodePtr node, xmlParserErrors error, const char *msg, const xmlChar * str1, const xmlChar * str2, const xmlChar * str3) { xmlStructuredErrorFunc schannel = NULL; xmlGenericErrorFunc channel = NULL; xmlParserCtxtPtr pctx...
0
[]
libxml2
932cc9896ab41475d4aa429c27d9afd175959d74
49,724,222,498,885,300,000,000,000,000,000,000,000
28
Fix buffer size checks in xmlSnprintfElementContent xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
show_pat_in_path( char_u *line, int type, int did_show, int action, FILE *fp, linenr_T *lnum, long count) { char_u *p; if (did_show) msg_putchar('\n'); // cursor below last one else if (!msg_silent) gotocmdline(TRUE); // cursor at status line if (got_in...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
309,759,339,791,016,840,000,000,000,000,000,000,000
60
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
PHP_METHOD(snmp, getError) { php_snmp_object *snmp_object; zval *object = getThis(); snmp_object = Z_SNMP_P(object); RETURN_STRING(snmp_object->snmp_errstr); }
0
[ "CWE-20" ]
php-src
6e25966544fb1d2f3d7596e060ce9c9269bbdcf8
234,576,653,401,993,470,000,000,000,000,000,000,000
9
Fixed bug #71704 php_snmp_error() Format String Vulnerability
static inline struct htx_blk *htx_get_tail_blk(const struct htx *htx) { int32_t tail = htx_get_tail(htx); return ((tail == -1) ? NULL : htx_get_blk(htx, tail)); }
0
[ "CWE-190" ]
haproxy
3b69886f7dcc3cfb3d166309018e6cfec9ce2c95
258,816,067,482,465,000,000,000,000,000,000,000,000
6
BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer Ori Hollander of JFrog Security reported that htx_add_header() and htx_add_trailer() were missing a length check on the header name. While this does not allow to overwrite any memory area, it results in bits of the header name length to sli...
void NumberFormatTest::TestBug9936() { UErrorCode status = U_ZERO_ERROR; Locale locale("en_US"); LocalPointer<DecimalFormat> numberFormat(static_cast<DecimalFormat*>( NumberFormat::createInstance(locale, status))); if (U_FAILURE(status)) { dataerrln("File %s, Line %d: status = %s.\n"...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
213,610,383,717,439,060,000,000,000,000,000,000,000
35
ICU-20246 Fixing another integer overflow in number parsing.
STACK_OF(OPENSSL_STRING) *X509_get1_ocsp(X509 *x) { AUTHORITY_INFO_ACCESS *info; STACK_OF(OPENSSL_STRING) *ret = NULL; int i; info = X509_get_ext_d2i(x, NID_info_access, NULL, NULL); if (!info) return NULL; for (i = 0; i < sk_ACCESS_DESCRIPTION_num(info); i++) { ACCESS_DESCRIPTI...
0
[ "CWE-125" ]
openssl
bb4d2ed4091408404e18b3326e3df67848ef63d0
268,671,958,273,897,660,000,000,000,000,000,000,000
22
Fix append_ia5 function to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
static void *expire_thread(void *p) { struct autofs_dev_ioctl param; _cleanup_(expire_data_freep) struct expire_data *data = (struct expire_data*)p; int r; assert(data->dev_autofs_fd >= 0); assert(data->ioctl_fd >= 0); init_autofs_dev_ioctl(&param); param.ioctlf...
0
[ "CWE-362" ]
systemd
e7d54bf58789545a9eb0b3964233defa0b007318
249,861,310,325,688,100,000,000,000,000,000,000,000
20
automount: ack automount requests even when already mounted (#5916) If a process accesses an autofs filesystem while systemd is in the middle of starting the mount unit on top of it, it is possible for the autofs_ptype_missing_direct request from the kernel to be received after the mount unit has been fully started...
bool LOGGER::activate_log_handler(THD* thd, uint log_type) { MYSQL_QUERY_LOG *file_log; bool res= FALSE; lock_exclusive(); switch (log_type) { case QUERY_LOG_SLOW: if (!opt_slow_log) { file_log= file_log_handler->get_mysql_slow_log(); file_log->open_slow_log(opt_slow_logname); if (t...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
230,347,421,883,116,100,000,000,000,000,000,000,000
50
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...
void htp_tx_res_set_status_code(htp_tx_t *tx, int status_code) { if (tx == NULL) return; tx->response_status_number = status_code; }
0
[]
libhtp
c7c03843cd6b1cbf44eb435d160ba53aec948828
122,565,237,370,770,550,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.
int ssl3_dispatch_alert(SSL *s) { int i,j; void (*cb)(const SSL *ssl,int type,int val)=NULL; s->s3->alert_dispatch=0; i = do_ssl3_write(s, SSL3_RT_ALERT, &s->s3->send_alert[0], 2, 0); if (i <= 0) { s->s3->alert_dispatch=1; } else { /* Alert sent to BIO. If it is important, flush it now. * If the m...
0
[ "CWE-310" ]
openssl
270881316664396326c461ec7a124aec2c6cc081
133,087,619,217,126,940,000,000,000,000,000,000,000
35
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
RawTile TileManager::getRegion( unsigned int res, int seq, int ang, int layers, unsigned int x, unsigned int y, unsigned int width, unsigned int height ){ // If our image type can directly handle region compositing, simply return that if( image->regionDecoding() ){ if( loglevel >= 3 ){ *logfile << "TileM...
1
[ "CWE-190" ]
iipsrv
882925b295a80ec992063deffc2a3b0d803c3195
54,785,144,199,130,020,000,000,000,000,000,000,000
203
- Modified TileManager.cc to verify that malloc() has correctly allocated memory. - Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve...
static int manager_watch_idle_pipe(Manager *m) { int r; assert(m); if (m->idle_pipe_event_source) return 0; if (m->idle_pipe[2] < 0) return 0; r = sd_event_add_io(m->event, m->idle_pipe[2], EPOLLIN, manager_dispatch_idle_pipe_fd, m, &m->idle_pi...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
152,742,619,511,657,940,000,000,000,000,000,000,000
19
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...
VOID ParaNdis_UpdateDeviceFilters(PARANDIS_ADAPTER *pContext) { if (pContext->bHasHardwareFilters) { ParaNdis_DeviceFiltersUpdateRxMode(pContext); ParaNdis_DeviceFiltersUpdateAddresses(pContext); ParaNdis_DeviceFiltersUpdateVlanId(pContext); } }
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
134,824,168,805,416,550,000,000,000,000,000,000,000
9
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>