func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
check_fmt(struct magic_set *ms, struct magic *m) { pcre *pce; int re_options; pcre_extra *re_extra; TSRMLS_FETCH(); if (strchr(m->desc, '%') == NULL) { return 0; } if ((pce = pcre_get_compiled_regex("~%[-0-9.]*s~", &re_extra, &re_options TSRMLS_CC)) == NULL) { return -1; } else { return !pcre_exec(pc...
0
[ "CWE-20" ]
php-src
74555e7c26b2c61bb8e67b7d6a6f4d2b8eb3a5f3
654,784,013,407,664,500,000,000,000,000,000,000
17
Fixed bug #64830 mimetype detection segfaults on mp3 file
static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb, int codec_tag, int format, int64_t size) { int video_codec_id = ff_codec_get_id(ff_codec_movvideo_tags, format); if (codec_tag && (codec_tag != format && // A...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
9cb4eb772839c5e1de2855d126bf74ff16d13382
71,476,639,376,515,990,000,000,000,000,000,000,000
27
avformat/mov: Fix DoS in read_tfra() Fixes: Missing EOF check in loop No testcase Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
close_transient_session (GdmManager *self, GdmSession *session) { GPid pid; pid = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (session), "caller-pid")); gdm_session_close (session); g_hash_table_remove (self->priv->transient_sessions, ...
0
[]
gdm
ff98b2817014684ae1acec78ff06f0f461a56a9f
300,979,474,162,012,700,000,000,000,000,000,000,000
9
manager: if falling back to X11 retry autologin Right now, we get one shot to autologin. If it fails, we fall back to the greeter. We should give it another go if the reason for the failure was wayland fallback to X. https://bugzilla.gnome.org/show_bug.cgi?id=780520
rdp_send_control(uint16 action) { STREAM s; s = rdp_init_data(8); out_uint16_le(s, action); out_uint16(s, 0); /* userid */ out_uint32(s, 0); /* control id */ s_mark_end(s); rdp_send_data(s, RDP_DATA_PDU_CONTROL); }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
10,564,921,798,192,526,000,000,000,000,000,000,000
13
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static inline ut32 r_read_at_le32(const void *src, size_t offset) { const ut8 *s = (const ut8*)src + offset; return r_read_le32 (s); }
1
[ "CWE-476" ]
radare2
1ea23bd6040441a21fbcfba69dce9a01af03f989
18,761,499,229,168,303,000,000,000,000,000,000,000
4
Fix #6816 - null deref in r_read_*
const T& _atXY(const int x, const int y, const int z=0, const int c=0) const { return (*this)(cimg::cut(x,0,width() - 1), cimg::cut(y,0,height() - 1),z,c); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
53,106,724,551,707,400,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.
static struct sock *udp6_lib_lookup2(struct net *net, const struct in6_addr *saddr, __be16 sport, const struct in6_addr *daddr, unsigned int hnum, int dif, struct udp_hslot *hslot2, unsigned int slot2) { struct sock *sk, *result; struct hlist_nulls_node *node; int score, badness, matches = 0, reuseport = 0; u...
0
[ "CWE-399", "CWE-703" ]
linux
8822b64a0fa64a5dd1dfcf837c5b0be83f8c05d1
39,267,816,809,914,405,000,000,000,000,000,000,000
53
ipv6: call udp_push_pending_frames when uncorking a socket with AF_INET pending data We accidentally call down to ip6_push_pending_frames when uncorking pending AF_INET data on a ipv6 socket. This results in the following splat (from Dave Jones): skbuff: skb_under_panic: text:ffffffff816765f6 len:48 put:40 head:ffff8...
TEST_F(AuthorizationManagerTest, testLocalX509AuthorizationInvalidUser) { ServiceContextNoop serviceContext; transport::TransportLayerMock transportLayer{}; transport::SessionHandle session = transportLayer.createSession(); setX509PeerInfo(session, SSLPeerInfo(buildX509Name(), ...
0
[ "CWE-863" ]
mongo
a93cfd354467981c9cf944a4ada748d0226fdfb0
184,855,794,315,660,940,000,000,000,000,000,000,000
15
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36) (cherry picked from commit fb87cc88ecb5d300f14cda7bc238d7d5132118f5)
int wc_ecc_make_key_ex(WC_RNG* rng, int keysize, ecc_key* key, int curve_id) { int err; #if !defined(WOLFSSL_ATECC508A) && !defined(WOLFSSL_CRYPTOCELL) #ifndef WOLFSSL_SP_MATH DECLARE_CURVE_SPECS(curve, ECC_CURVE_FIELD_COUNT); #endif #endif /* !WOLFSSL_ATECC508A */ #if defined(WOLFSSL_CRYPTOCELL) && !defined(WO...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
28,779,034,731,455,457,000,000,000,000,000,000,000
202
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
void setup(bool ssl, const std::string& server_name, bool tracing = true, bool use_srds = false) { use_srds_ = use_srds; if (ssl) { ssl_connection_ = std::make_shared<Ssl::MockConnectionInfo>(); } server_name_ = server_name; ON_CALL(filter_callbacks_.connection_, ssl()).WillByDefault(Return...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
101,820,783,244,286,100,000,000,000,000,000,000,000
34
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...
SSL *SSL_dup(SSL *s) { STACK_OF(X509_NAME) *sk; X509_NAME *xn; SSL *ret; int i; if ((ret=SSL_new(SSL_get_SSL_CTX(s))) == NULL) return(NULL); ret->version = s->version; ret->type = s->type; ret->method = s->method; if (s->session != NULL) { /* This copies session-id, SSL_METHOD, sid_ctx, and 'ce...
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
44,779,357,842,342,200,000,000,000,000,000,000,000
129
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
void gf_bs_write_float(GF_BitStream *bs, Float value) { u32 i; union { float f; char sz [4]; } float_value; float_value.f = value; for (i = 0; i < 32; i++) BS_WriteBit(bs, (float_value.sz [3 - i / 8] & 1 << (7 - i % 8)) != 0); }
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
199,675,253,393,277,800,000,000,000,000,000,000,000
13
fixed #2165
static uint16_t dummy_section(PhysPageMap *map, FlatView *fv, MemoryRegion *mr) { assert(fv); MemoryRegionSection section = { .fv = fv, .mr = mr, .offset_within_address_space = 0, .offset_within_region = 0, .size = int128_2_64(), }; return phys_section_add(map, &...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
300,733,772,097,769,400,000,000,000,000,000,000,000
13
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
GF_Err ssix_Size(GF_Box *s) { u32 i; GF_SubsegmentIndexBox *ptr = (GF_SubsegmentIndexBox*)s; ptr->size += 4; for (i = 0; i < ptr->subsegment_count; i++) { ptr->size += 4 + 4 * ptr->subsegments[i].range_count; } return GF_OK;
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
161,680,063,273,838,840,000,000,000,000,000,000,000
11
prevent dref memleak on invalid input (#1183)
void AddNetwork(const CString& sLine) { CString sUser = sLine.Token(1); CString sNetwork = sLine.Token(2); CUser* pUser = GetUser(); if (sNetwork.empty()) { sNetwork = sUser; } else { pUser = FindUser(sUser); if (!pUser) { ...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
42,007,512,201,726,770,000,000,000,000,000,000,000
44
Don't crash if user specified invalid encoding. This is CVE-2019-9917
SPL_METHOD(Array, seek) { long opos, position; zval *object = getThis(); spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); int result; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &position) =...
1
[]
php-src
b7fa67742cd8d2b0ca0c0273b157f6ffee9ad6e2
174,856,175,280,677,750,000,000,000,000,000,000,000
31
Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items)
static void de_run_pict(deark *c, de_module_params *mparams) { lctx *d = NULL; i64 pos = 0; i64 picsize; struct pict_rect framerect; d = de_malloc(c, sizeof(lctx)); do_detect_version(c, &d->dti, 1); if(d->dti.file_version>0) { de_declare_fmtf(c, "PICT v%d%s", d->dti.file_version, d->dti.has_fileheader?"":...
0
[ "CWE-476" ]
deark
287f5ac31dfdc074669182f51ece637706070eeb
206,877,671,251,070,700,000,000,000,000,000,000,000
32
pict: Fixed a bug with ICC profile extraction Could cause a NULL pointer dereference. Found by F. Çelik.
static int tun_xdp_set(struct net_device *dev, struct bpf_prog *prog, struct netlink_ext_ack *extack) { struct tun_struct *tun = netdev_priv(dev); struct bpf_prog *old_prog; old_prog = rtnl_dereference(tun->xdp_prog); rcu_assign_pointer(tun->xdp_prog, prog); if (old_prog) bpf_prog_put(old_prog); retu...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
194,136,306,987,698,800,000,000,000,000,000,000,000
13
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...
int kvm_arch_vcpu_runnable(struct kvm_vcpu *vcpu) { return (vcpu->arch.mp_state == KVM_MP_STATE_RUNNABLE && !vcpu->arch.apf.halted) || !list_empty_careful(&vcpu->async_pf.done) || vcpu->arch.mp_state == KVM_MP_STATE_SIPI_RECEIVED || atomic_read(&vcpu->arch.nmi_queued) || (kvm_arch_interrupt_allowed(vcpu) && ...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
56,772,414,448,442,700,000,000,000,000,000,000,000
10
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) { struct brcmf_bss_info_le *bi; const struct brcmf_tlv *tim; u16 beacon_interval; u8 dtim_period; size_t ie_len; u8 *ie; s32 err = 0; brcmf_dbg(TRACE, "Enter\n"); if (brcmf_is_ibssmode(ifp->vif)) return err; *(__l...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
131,174,160,848,841,670,000,000,000,000,000,000,000
54
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
static void BuildAndStoreBlockSplitCode(const uint8_t* types, const uint32_t* lengths, const size_t num_blocks, const size_t num_types, HuffmanTree* tree, ...
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
261,126,439,872,002,230,000,000,000,000,000,000,000
32
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
xmlRelaxNGValidatePopElement(xmlRelaxNGValidCtxtPtr ctxt, xmlDocPtr doc ATTRIBUTE_UNUSED, xmlNodePtr elem) { int ret; xmlRegExecCtxtPtr exec; if ((ctxt == NULL) || (ctxt->elem == NULL) || (elem == NULL)) return (-1); #ifdef DEBUG_PROGRESSIVE...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
115,530,971,474,686,350,000,000,000,000,000,000,000
36
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
TfLiteRegistration* Register_RNN() { static TfLiteRegistration r = {rnn::Init, rnn::Free, rnn::Prepare, rnn::Eval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
319,228,460,189,408,700,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...
vips_tracked_free( void *s ) { /* Keep the size of the alloc in the previous 16 bytes. Ensures * alignment rules are kept. */ void *start = (void *) ((char *) s - 16); size_t size = *((size_t *) start); g_mutex_lock( vips_tracked_mutex ); #ifdef DEBUG_VERBOSE printf( "vips_tracked_free: %p, %zd bytes\n", s, ...
0
[ "CWE-200", "CWE-908" ]
libvips
00622428bda8d7521db8d74260b519fa41d69d0a
175,531,391,602,005,800,000,000,000,000,000,000,000
28
zero memory on malloc to prevent write of uninit memory under some error conditions thanks Balint
int linuxOvercommitMemoryValue(void) { FILE *fp = fopen("/proc/sys/vm/overcommit_memory","r"); char buf[64]; if (!fp) return -1; if (fgets(buf,64,fp) == NULL) { fclose(fp); return -1; } fclose(fp); return atoi(buf); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
263,654,751,013,523,000,000,000,000,000,000,000,000
13
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
static int __vmx_handle_exit(struct kvm_vcpu *vcpu, fastpath_t exit_fastpath) { struct vcpu_vmx *vmx = to_vmx(vcpu); union vmx_exit_reason exit_reason = vmx->exit_reason; u32 vectoring_info = vmx->idt_vectoring_info; u16 exit_handler_index; /* * Flush logged GPAs PML buffer, this will make dirty_bitmap more *...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
135,200,381,689,706,430,000,000,000,000,000,000,000
160
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static int process_system_preds(struct trace_subsystem_dir *dir, struct trace_array *tr, struct filter_parse_error *pe, char *filter_string) { struct trace_event_file *file; struct filter_list *filter_item; struct event_filter *filter = NULL; struct filter_list *tmp; LIST_HEAD(filter_list); bool fail ...
0
[ "CWE-400", "CWE-284", "CWE-401" ]
linux
96c5c6e6a5b6db592acae039fed54b5c8844cd35
141,091,671,690,996,570,000,000,000,000,000,000,000
86
tracing: Have error path in predicate_parse() free its allocated memory In predicate_parse, there is an error path that is not going to out_free instead it returns directly which leads to a memory leak. Link: http://lkml.kernel.org/r/20190920225800.3870-1-navid.emamdoost@gmail.com Signed-off-by: Navid Emamdoost <nav...
format_DEC_MPLS_TTL(const struct ofpact_null *a OVS_UNUSED, struct ds *s) { ds_put_format(s, "%sdec_mpls_ttl%s", colors.value, colors.end); }
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
165,927,440,137,463,920,000,000,000,000,000,000,000
4
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static bool arg_type_is_alloc_mem_ptr(enum bpf_arg_type type) { return type == ARG_PTR_TO_ALLOC_MEM || type == ARG_PTR_TO_ALLOC_MEM_OR_NULL; }
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
235,621,210,262,888,050,000,000,000,000,000,000,000
5
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static void raw_sock_seq_show(struct seq_file *seq, struct sock *sp, int i) { struct inet_sock *inet = inet_sk(sp); __be32 dest = inet->inet_daddr, src = inet->inet_rcv_saddr; __u16 destp = 0, srcp = inet->inet_num; seq_printf(seq, "%4d: %08X:%04X %08X:%04X" " %02X %08X:%08X %02X:%08lX %08X %5d %...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
10,906,749,974,912,215,000,000,000,000,000,000,000
16
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static struct ns_common *get_net_ns(struct ns_common *ns) { return &get_net(container_of(ns, struct net, ns))->ns; }
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
39,412,717,404,203,620,000,000,000,000,000,000,000
4
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static int atalk_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *msg, int size, int flags) { struct sock *sk = sock->sk; struct sockaddr_at *sat = (struct sockaddr_at *)msg->msg_name; struct ddpehdr *ddp; int copied = 0; int err = 0; struct ddpebits ddphv; struct sk_buff *skb = skb_rec...
0
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
162,114,781,842,207,150,000,000,000,000,000,000,000
49
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
Field *Item::make_string_field(TABLE *table) { Field *field; DBUG_ASSERT(collation.collation); /* Note: the following check is repeated in subquery_types_allow_materialization(): */ if (too_big_for_varchar()) field= new Field_blob(max_length, maybe_null, name, collation...
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
230,635,845,533,857,700,000,000,000,000,000,000,000
23
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
void ldbInit(void) { ldb.conn = NULL; ldb.active = 0; ldb.logs = listCreate(); listSetFreeMethod(ldb.logs,(void (*)(void*))sdsfree); ldb.children = listCreate(); ldb.src = NULL; ldb.lines = 0; ldb.cbuf = sdsempty(); }
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
175,922,077,575,838,000,000,000,000,000,000,000,000
10
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
int pkey_ctrl_string(EVP_PKEY_CTX *ctx, char *value) { int rv; char *stmp, *vtmp = NULL; stmp = BUF_strdup(value); if (!stmp) return -1; vtmp = strchr(stmp, ':'); if (vtmp) { *vtmp = 0; vtmp++; } rv = EVP_PKEY_CTX_ctrl_str(ctx, stmp, vtmp); OPENSSL_free(stmp); return rv; }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
54,012,113,136,485,395,000,000,000,000,000,000,000
17
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
static void sas_unregister_devs_sas_addr(struct domain_device *parent, int phy_id, bool last) { struct expander_device *ex_dev = &parent->ex_dev; struct ex_phy *phy = &ex_dev->ex_phy[phy_id]; struct domain_device *child, *n, *found = NULL; if (last) { list_for_each_entry_safe(child, n, &ex_dev->children,...
1
[ "CWE-284" ]
linux
0558f33c06bb910e2879e355192227a8e8f0219d
112,811,908,323,419,610,000,000,000,000,000,000,000
32
scsi: libsas: direct call probe and destruct In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery competing with ata error handling") introduced disco mutex to prevent rediscovery competing with ata error handling and put the whole revalidation in the mutex. But the rphy add/remove needs to wait for the ...
get_number(int *numptr, int low, const char *names[], int ch, FILE * file, const char *terms) { char temp[MAX_TEMPSTR], *pc; int len, i; pc = temp; len = 0; /* first look for a number */ while (isdigit((unsigned char) ch)) { if (++len >= MAX_TEMPSTR) goto bad; *pc++ = (char)ch; ch = get_char(file); }...
0
[ "CWE-476" ]
cronie
a6576769f01325303b11edc3e0cfb05ef382ce56
243,595,978,605,829,140,000,000,000,000,000,000,000
49
Fix CVE-2019-9704 and CVE-2019-9705 The users can cause DoS of the crond by loading huge crontab files. We now allow maximum 1000 environment variables and 1000 crontab entries. Also the comments and whitespace between the entries and variables are now limited to 32768 characters.
static int nfs4_xdr_enc_rename(struct rpc_rqst *req, __be32 *p, const struct nfs4_rename_arg *args) { struct xdr_stream xdr; struct compound_hdr hdr = { .nops = 7, }; int status; xdr_init_encode(&xdr, &req->rq_snd_buf, p); encode_compound_hdr(&xdr, &hdr); if ((status = encode_putfh(&xdr, args->old_dir)) != 0)...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
106,254,837,113,129,600,000,000,000,000,000,000,000
26
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
static void init_qxl_rom(PCIQXLDevice *d) { QXLRom *rom = memory_region_get_ram_ptr(&d->rom_bar); QXLModes *modes = (QXLModes *)(rom + 1); uint32_t ram_header_size; uint32_t surface0_area_size; uint32_t num_pages; uint32_t fb; int i, n; memset(rom, 0, d->rom_size); rom->magic ...
0
[ "CWE-476" ]
qemu
d52680fc932efb8a2f334cc6993e705ed1e31e99
34,974,686,305,094,583,000,000,000,000,000,000,000
71
qxl: check release info object When releasing spice resources in release_resource() routine, if release info object 'ext.info' is null, it leads to null pointer dereference. Add check to avoid it. Reported-by: Bugs SysSec <bugs-syssec@rub.de> Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org> Message-id: 20190425...
int compat_tcp_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen) { if (level != SOL_TCP) return inet_csk_compat_getsockopt(sk, level, optname, optval, optlen); return do_tcp_getsockopt(sk, level, optname, optval, optlen); }
0
[ "CWE-399", "CWE-835" ]
linux
ccf7abb93af09ad0868ae9033d1ca8108bdaec82
315,280,350,685,908,560,000,000,000,000,000,000,000
8
tcp: avoid infinite loop in tcp_splice_read() Splicing from TCP socket is vulnerable when a packet with URG flag is received and stored into receive queue. __tcp_splice_read() returns 0, and sk_wait_data() immediately returns since there is the problematic skb in queue. This is a nice way to burn cpu (aka infinite l...
static int __init loop_init(void) { int i, nr; unsigned long range; struct loop_device *lo; int err; part_shift = 0; if (max_part > 0) { part_shift = fls(max_part); /* * Adjust max_part according to part_shift as it is exported * to user space so that user can decide correct minor number * if [s]he...
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
318,205,162,902,768,870,000,000,000,000,000,000,000
75
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
static unsigned int selinux_ip_output(struct sk_buff *skb, u16 family) { u32 sid; if (!netlbl_enabled()) return NF_ACCEPT; /* we do this in the LOCAL_OUT path and not the POST_ROUTING path * because we want to make sure we apply the necessary labeling * before IPsec is applied so we can leverage AH...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
74,074,056,862,139,260,000,000,000,000,000,000,000
21
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static int sctp_getsockopt_peer_addr_info(struct sock *sk, int len, char __user *optval, int __user *optlen) { struct sctp_paddrinfo pinfo; struct sctp_transport *transport; int retval = 0; if (len < sizeof(pinfo)) { retval = -EINVAL; goto out; } len = sizeof(pinfo); if (copy_from_user(&pinfo...
0
[ "CWE-20" ]
linux
726bc6b092da4c093eb74d13c07184b18c1af0f1
229,541,472,853,529,060,000,000,000,000,000,000,000
47
net/sctp: Validate parameter size for SCTP_GET_ASSOC_STATS Building sctp may fail with: In function ‘copy_from_user’, inlined from ‘sctp_getsockopt_assoc_stats’ at net/sctp/socket.c:5656:20: arch/x86/include/asm/uaccess_32.h:211:26: error: call to ‘copy_from_user_overflow’ declared with attribute error: c...
QUtil::uint_to_string(unsigned long long num, int length) { return int_to_string_base(num, 10, length); }
1
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
113,034,255,050,892,140,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int usb_host_handle_data(USBHostDevice *s, USBPacket *p) { struct usbdevfs_urb *urb; AsyncURB *aurb; int ret; aurb = async_alloc(); aurb->hdev = s; aurb->packet = p; urb = &aurb->urb; if (p->pid == USB_TOKEN_IN) urb->endpoint = p->devep | 0x80; else urb->endpoin...
0
[ "CWE-119" ]
qemu
babd03fde68093482528010a5435c14ce9128e3f
260,559,233,680,984,200,000,000,000,000,000,000,000
63
usb-linux.c: fix buffer overflow In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and length to the kernel. However, the length was provided by the caller of dev->handle_packet, and is not checked, so the kernel might provide too much data and overflow our buffer. For example, hw/usb-uhci.c could s...
inline void SoftmaxImpl(const SoftmaxParams& params, const RuntimeShape& input_shape, const float* input_data, const RuntimeShape& output_shape, float* output_data, int start_batch, int end_batch) { ruy::profiler::ScopeLab...
0
[ "CWE-476", "CWE-369" ]
tensorflow
15691e456c7dc9bd6be203b09765b063bf4a380c
202,161,155,281,028,170,000,000,000,000,000,000,000
24
Prevent dereferencing of null pointers in TFLite's `add.cc`. PiperOrigin-RevId: 387244946 Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9
tabpage_close_other(tabpage_T *tp, int forceit) { int done = 0; win_T *wp; int h = tabline_height(); // Limit to 1000 windows, autocommands may add a window while we close // one. OK, so I'm paranoid... while (++done < 1000) { wp = tp->tp_firstwin; ex_win_close(forceit, wp, tp); // A...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
187,323,049,726,467,170,000,000,000,000,000,000,000
25
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
gdk_pixbuf__tiff_image_load_increment (gpointer data, const guchar *buf, guint size, GError **error) { TiffContext *context = (TiffContext *) data; g_return_val_if_fail (data != NULL, FALSE); tiff_set_handlers (); if (!make_available_at_least (...
0
[]
gdk-pixbuf
31a6cff3dfc6944aad4612a9668b8ad39122e48b
116,273,658,511,003,670,000,000,000,000,000,000,000
21
tiff: Check for integer overflows in multiplication The checks currently in use are not sufficient, because they depend on undefined behaviour: rowstride = width * 4; if (rowstride / 4 != width) { /* overflow */ If the multiplication has already overflowed, the compiler may decide to optimize the if out and ...
int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start, int len, int write, int force, struct page **pages, struct vm_area_struct **vmas) { int i; unsigned int vm_flags; if (len <= 0) return 0; /* * Require read or write permissions. * If 'force' is set, we only require th...
1
[ "CWE-20" ]
linux-2.6
672ca28e300c17bf8d792a2a7a8631193e580c74
139,010,725,753,363,210,000,000,000,000,000,000,000
138
Fix ZERO_PAGE breakage with vmware Commit 89f5b7da2a6bad2e84670422ab8192382a5aeb9f ("Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP") broke vmware, as reported by Jeff Chua: "This broke vmware 6.0.4. Jun 22 14:53:03.845: vmx| NOT_IMPLEMENTED /build/mts/release/bora-93057/bora/vmx/main/vmmo...
start_job(cupsd_job_t *job, /* I - Job ID */ cupsd_printer_t *printer) /* I - Printer to print job */ { const char *filename; /* Support filename */ ipp_attribute_t *cancel_after = ippFindAttribute(job->attrs, "job-cancel-after", IPP_TAG_INTEGER); /* job-cancel-after attribute...
1
[]
cups
d47f6aec436e0e9df6554436e391471097686ecc
174,379,712,304,334,240,000,000,000,000,000,000,000
186
Fix local privilege escalation to root and sandbox bypasses in scheduler (rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581)
uchar *getMSG(msg_t *pM) { uchar *ret; if(pM == NULL) ret = UCHAR_CONSTANT(""); else { if(pM->iLenMSG == 0) ret = UCHAR_CONSTANT(""); else ret = pM->pszRawMsg + pM->offMSG; } return ret; }
0
[ "CWE-772" ]
rsyslog
8083bd1433449fd2b1b79bf759f782e0f64c0cd2
291,579,656,889,982,140,000,000,000,000,000,000,000
13
backporting abort condition fix from 5.7.7
static void vhost_scsi_flush_vq(struct vhost_scsi *vs, int index) { vhost_poll_flush(&vs->vqs[index].vq.poll); }
0
[ "CWE-200", "CWE-119" ]
linux
59c816c1f24df0204e01851431d3bab3eb76719c
232,279,204,207,595,920,000,000,000,000,000,000,000
4
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...
/* Must be called in process context */ void netif_napi_del(struct napi_struct *napi) { might_sleep(); if (napi_hash_del(napi)) synchronize_net(); list_del_init(&napi->dev_list); napi_free_frags(napi); kfree_skb_list(napi->gro_list); napi->gro_list = NULL; napi->gro_count = 0;
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
250,407,675,933,168,700,000,000,000,000,000,000,000
12
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
static struct task_struct *dup_task_struct(struct task_struct *orig) { struct task_struct *tsk; struct thread_info *ti; unsigned long *stackend; int err; prepare_to_copy(orig); tsk = alloc_task_struct(); if (!tsk) return NULL; ti = alloc_thread_info(tsk); if (!ti) { free_task_struct(tsk); return NULL...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
linux
b69f2292063d2caf37ca9aec7d63ded203701bf3
126,550,590,993,255,630,000,000,000,000,000,000,000
55
block: Fix io_context leak after failure of clone with CLONE_IO With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents exit_io_context() from calling IO schedulers exit functions. Give a task_struct to exit_io_context(), and call exi...
PHP_FUNCTION(utf8_decode) { char *arg; XML_Char *decoded; int arg_len, len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) { return; } decoded = xml_utf8_decode(arg, arg_len, &len, "ISO-8859-1"); if (decoded == NULL) { RETURN_FALSE; } RETVAL_STRINGL(decoded, len, 0)...
0
[ "CWE-787" ]
php-src
7d163e8a0880ae8af2dd869071393e5dc07ef271
301,234,475,340,056,500,000,000,000,000,000,000,000
16
truncate results at depth of 255 to prevent corruption
webSocketsEncode(rfbClientPtr cl, const char *src, int len, char **dst) { return ((ws_ctx_t *)cl->wsctx)->encode(cl, src, len, dst); }
0
[ "CWE-787" ]
libvncserver
aac95a9dcf4bbba87b76c72706c3221a842ca433
209,522,254,436,946,570,000,000,000,000,000,000,000
4
fix overflow and refactor websockets decode (Hybi) fix critical heap-based buffer overflow which allowed easy modification of a return address via an overwritten function pointer fix bug causing connections to fail due a "one websocket frame = one ws_read" assumption, which failed with LibVNCServer-0.9.11 refactor w...
static int af9005_pid_filter(struct dvb_usb_adapter *adap, int index, u16 pid, int onoff) { u8 cmd = index & 0x1f; int ret; deb_info("set pid filter, index %d, pid %x, onoff %d\n", index, pid, onoff); if (onoff) { /* cannot use it as pid_filter_ctrl since it has to be done before setting the first...
0
[ "CWE-400", "CWE-401" ]
linux
2289adbfa559050d2a38bcd9caac1c18b800e928
9,946,306,358,723,396,000,000,000,000,000,000,000
43
media: usb: fix memory leak in af9005_identify_state In af9005_identify_state when returning -EIO the allocated buffer should be released. Replace the "return -EIO" with assignment into ret and move deb_info() under a check. Fixes: af4e067e1dcf ("V4L/DVB (5625): Add support for the AF9005 demodulator from Afatech") S...
int iwl_sta_rx_agg_stop(struct iwl_priv *priv, struct ieee80211_sta *sta, int tid) { unsigned long flags; int sta_id; struct iwl_addsta_cmd sta_cmd; lockdep_assert_held(&priv->shrd->mutex); sta_id = iwl_sta_id(sta); if (sta_id == IWL_INVALID_STATION) { IWL_ERR(priv, "Invalid station for AGG tid %d\n", tid)...
0
[ "CWE-119", "CWE-787" ]
linux
2da424b0773cea3db47e1e81db71eeebde8269d4
216,617,917,280,097,760,000,000,000,000,000,000,000
25
iwlwifi: Sanity check for sta_id On my testing, I saw some strange behavior [ 421.739708] iwlwifi 0000:01:00.0: ACTIVATE a non DRIVER active station id 148 addr 00:00:00:00:00:00 [ 421.739719] iwlwifi 0000:01:00.0: iwl_sta_ucode_activate Added STA id 148 addr 00:00:00:00:00:00 to uCode not sure how it happen, but ...
static void complete_update_bin(conn *c) { protocol_binary_response_status eno = PROTOCOL_BINARY_RESPONSE_EINVAL; enum store_item_type ret = NOT_STORED; assert(c != NULL); item *it = c->item; pthread_mutex_lock(&c->thread->stats.mutex); c->thread->stats.slab_stats[ITEM_clsid(it)].set_cmds++; ...
0
[ "CWE-190" ]
memcached
bd578fc34b96abe0f8d99c1409814a09f51ee71c
267,468,753,293,904,760,000,000,000,000,000,000,000
89
CVE reported by cisco talos
unsigned int inet6_hash_frag(__be32 id, const struct in6_addr *saddr, const struct in6_addr *daddr, u32 rnd) { u32 c; c = jhash_3words((__force u32)saddr->s6_addr32[0], (__force u32)saddr->s6_addr32[1], (__force u32)saddr->s6_addr32[2], rnd); c = jhash_3words((__force u32)saddr->s6_addr32[3], ...
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
82,045,790,611,138,970,000,000,000,000,000,000,000
22
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
TEST(FloatPoolingOpTest, MaxPool) { FloatPoolingOpModel m(BuiltinOperator_MAX_POOL_2D, /*input=*/{TensorType_FLOAT32, {1, 2, 4, 1}}, /*filter_width=*/2, /*filter_height=*/2, /*output=*/{TensorType_FLOAT32, {}}); m.SetInput({ 0, 6, 2, 4, ...
0
[ "CWE-369" ]
tensorflow
5f7975d09eac0f10ed8a17dbb6f5964977725adc
67,807,156,795,252,740,000,000,000,000,000,000,000
12
Prevent another div by 0 in optimized pooling implementations TFLite PiperOrigin-RevId: 370800091 Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b
inline T_CALC MulOffset(T a, T b, T_SCALE c) { return (static_cast<T_CALC>(a) - static_cast<T_CALC>(b)) * static_cast<T_CALC>(c); }
0
[ "CWE-787" ]
tensorflow
f6c40f0c6cbf00d46c7717a26419f2062f2f8694
53,718,137,099,821,900,000,000,000,000,000,000,000
4
Validate min and max arguments to `QuantizedResizeBilinear`. PiperOrigin-RevId: 369765091 Change-Id: I33be8b78273ab7d08b97541692fe05cb7f94963a
wav_close (SF_PRIVATE *psf) { if (psf->file.mode == SFM_WRITE || psf->file.mode == SFM_RDWR) { wav_write_tailer (psf) ; if (psf->file.mode == SFM_RDWR) { sf_count_t current = psf_ftell (psf) ; /* ** If the mode is RDWR and the current position is less than the ** filelength, truncate the file. */ ...
0
[ "CWE-476" ]
libsndfile
6f3266277bed16525f0ac2f0f03ff4626f1923e5
213,602,587,683,351,960,000,000,000,000,000,000,000
24
Fix max channel count bug The code was allowing files to be written with a channel count of exactly `SF_MAX_CHANNELS` but was failing to read some file formats with the same channel count.
tape_buffered_read (char *in_buf, int in_des, off_t num_bytes) { off_t bytes_left = num_bytes; /* Bytes needing to be copied. */ off_t space_left; /* Bytes to copy from input buffer. */ while (bytes_left > 0) { if (input_size == 0) tape_fill_input_buffer (in_des, io_block_size); if (bytes_left...
0
[ "CWE-190" ]
cpio
dd96882877721703e19272fe25034560b794061b
24,835,193,342,354,740,000,000,000,000,000,000,000
20
Rewrite dynamic string support. * src/dstring.c (ds_init): Take a single argument. (ds_free): New function. (ds_resize): Take a single argument. Use x2nrealloc to expand the storage. (ds_reset,ds_append,ds_concat,ds_endswith): New function. (ds_fgetstr): Rewrite. In particular, this fixes integer overflow. * src/dst...
int snd_usb_init_sample_rate(struct snd_usb_audio *chip, int iface, struct usb_host_interface *alts, struct audioformat *fmt, int rate) { switch (fmt->protocol) { case UAC_VERSION_1: default: return set_sample_rate_v1(chip, iface, alts, fmt, rate); case UAC_VERSION_2: return set_sample_rate_v2(...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
264,298,893,021,198,640,000,000,000,000,000,000,000
13
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
GF_Err ilst_dump(GF_Box *a, FILE * trace) { u32 i; GF_Box *tag; GF_Err e; GF_ItemListBox *ptr; ptr = (GF_ItemListBox *)a; gf_isom_box_dump_start(a, "ItemListBox", trace); fprintf(trace, ">\n"); i=0; while ( (tag = (GF_Box*)gf_list_enum(ptr->other_boxes, &i))) { e = ilst_item_dump(tag, trace); if(e) return...
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
154,838,889,070,897,350,000,000,000,000,000,000,000
18
fixed 2 possible heap overflows (inc. #1088)
QPDF::addPageAt(QPDFObjectHandle newpage, bool before, QPDFObjectHandle refpage) { int refpos = findPage(refpage); if (! before) { ++refpos; } insertPage(newpage, refpos); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
269,007,090,546,389,200,000,000,000,000,000,000,000
10
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
HttpStateData::~HttpStateData() { /* * don't forget that ~Client() gets called automatically */ if (httpChunkDecoder) delete httpChunkDecoder; cbdataReferenceDone(_peer); debugs(11,5, HERE << "HttpStateData " << this << " destroyed; " << serverConnection); }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
205,898,878,641,670,400,000,000,000,000,000,000,000
13
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
static void sysctl_head_finish(struct ctl_table_header *head) { if (!head) return; spin_lock(&sysctl_lock); unuse_table(head); spin_unlock(&sysctl_lock); }
0
[ "CWE-20", "CWE-399" ]
linux
93362fa47fe98b62e4a34ab408c4a418432e7939
134,940,469,098,799,600,000,000,000,000,000,000,000
8
sysctl: Drop reference added by grab_header in proc_sys_readdir Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference added by grab_header when return from !dir_emit_dots path. It can cause any path called unregister_sysctl_table will wait forever. The calltrace of CVE-2016-9191: [ 5535.960522] Call Trace: [ ...
methodHandle LinkResolver::linktime_resolve_static_method(const LinkInfo& link_info, TRAPS) { Klass* resolved_klass = link_info.resolved_klass(); methodHandle resolved_method; if (!resolved_klass->is_interface()) { resolved_method = resolve_method(link_info, Bytecodes::_invokestatic, CHECK_NULL); } else { ...
0
[]
jdk11u
132745902a4601dc64b2c8ca112ca30292feccb4
250,851,980,832,086,000,000,000,000,000,000,000,000
22
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
static int vfio_pci_get_devs(struct pci_dev *pdev, void *data) { struct vfio_devices *devs = data; struct vfio_device *device; if (devs->cur_index == devs->max_index) return -ENOSPC; device = vfio_device_get_from_dev(&pdev->dev); if (!device) return -EINVAL; if (pci_dev_driver(pdev) != &vfio_pci_driver) { ...
0
[ "CWE-399", "CWE-190" ]
linux
05692d7005a364add85c6e25a6c4447ce08f913a
307,734,523,097,462,950,000,000,000,000,000,000,000
20
vfio/pci: Fix integer overflows, bitmask check The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize user-supplied integers, potentially allowing memory corruption. This patch adds appropriate integer overflow checks, checks the range bounds for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element...
static void kvm_resume(void) { if (kvm_usage_count) { lockdep_assert_not_held(&kvm_count_lock); hardware_enable_nolock(NULL); }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
121,231,861,138,254,350,000,000,000,000,000,000,000
7
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...
TTF_Font* TTF_OpenFontDPIRW( SDL_RWops *src, int freesrc, int ptsize, unsigned int hdpi, unsigned int vdpi ) { return TTF_OpenFontIndexDPIRW(src, freesrc, ptsize, 0, hdpi, vdpi);
0
[ "CWE-190", "CWE-787" ]
SDL_ttf
db1b41ab8bde6723c24b866e466cad78c2fa0448
160,811,257,330,060,600,000,000,000,000,000,000,000
4
More integer overflow (see bug #187) Make sure that 'width + alignment' doesn't overflow, otherwise it could create a SDL_Surface of 'width' but with wrong 'pitch'
static float expandFloats(unsigned char * dst, int tileWidth, int bytesps) { float max = 0.f; if (bytesps == 2) { uint16_t * dst16 = (ushort *) dst; uint32_t * dst32 = (unsigned int *) dst; float *f32 = (float*) dst; for (int index = tileWidth - 1; index >= 0; --index) { dst32[index] = __DNG_HalfToFloat(ds...
0
[ "CWE-787" ]
LibRaw
8682ad204392b914ab1cc6ebcca9c27c19c1a4b4
30,637,818,286,940,185,000,000,000,000,000,000,000
29
0.18.17
tiff_document_get_page_label (EvDocument *document, EvPage *page) { TiffDocument *tiff_document = TIFF_DOCUMENT (document); static gchar *label; if (TIFFGetField (tiff_document->tiff, TIFFTAG_PAGENAME, &label) && g_utf8_validate (label, -1, NULL)) { return g_strdup (label); } return NULL; }
0
[ "CWE-754" ]
evince
234f034a4d15cd46dd556f4945f99fbd57ef5f15
157,885,279,504,006,120,000,000,000,000,000,000,000
13
tiff: Handle failure from TIFFReadRGBAImageOriented The TIFFReadRGBAImageOriented function returns zero if it was unable to read the image. Return NULL in this case instead of displaying uninitialized memory. Fixes #1129
void ListenerImpl::debugLog(const std::string& message) { UNREFERENCED_PARAMETER(message); ENVOY_LOG(debug, "{}: name={}, hash={}, address={}", message, name_, hash_, address_->asString()); }
0
[ "CWE-400" ]
envoy
dfddb529e914d794ac552e906b13d71233609bf7
101,820,743,367,000,280,000,000,000,000,000,000,000
4
listener: Add configurable accepted connection limits (#153) Add support for per-listener limits on accepted connections. Signed-off-by: Tony Allen <tony@allen.gg>
int bind_evtchn_to_irqhandler_lateeoi(evtchn_port_t evtchn, irq_handler_t handler, unsigned long irqflags, const char *devname, void *dev_id) { return bind_evtchn_to_irqhandler_chip(evtchn, handler, irqflags, devname, dev_id, &xen_lateeoi_chip); }
0
[ "CWE-400", "CWE-703" ]
linux
e99502f76271d6bc4e374fe368c50c67a1fd3070
289,521,858,280,065,070,000,000,000,000,000,000,000
9
xen/events: defer eoi in case of excessive number of events In case rogue guests are sending events at high frequency it might happen that xen_evtchn_do_upcall() won't stop processing events in dom0. As this is done in irq handling a crash might be the result. In order to avoid that, delay further inter-domain events...
int luaV_tointegerns (const TValue *obj, lua_Integer *p, F2Imod mode) { if (ttisfloat(obj)) return luaV_flttointeger(fltvalue(obj), p, mode); else if (ttisinteger(obj)) { *p = ivalue(obj); return 1; } else return 0; }
0
[ "CWE-416", "CWE-125", "CWE-787" ]
lua
eb41999461b6f428186c55abd95f4ce1a76217d5
332,777,130,960,572,420,000,000,000,000,000,000,000
10
Fixed bugs of stack reallocation x GC Macro 'checkstackGC' was doing a GC step after resizing the stack; the GC could shrink the stack and undo the resize. Moreover, macro 'checkstackp' also does a GC step, which could remove the preallocated CallInfo when calling a function. (Its name has been changed to 'checkstackG...
static int have_same_root(const char *path1, const char *path2) { int is_abs1, is_abs2; is_abs1 = is_absolute_path(path1); is_abs2 = is_absolute_path(path2); return (is_abs1 && is_abs2 && tolower(path1[0]) == tolower(path2[0])) || (!is_abs1 && !is_abs2); }
0
[ "CWE-125" ]
git
11a9f4d807a0d71dc6eff51bb87baf4ca2cccf1d
155,962,297,001,394,540,000,000,000,000,000,000,000
9
is_ntfs_dotgit: use a size_t for traversing string We walk through the "name" string using an int, which can wrap to a negative value and cause us to read random memory before our array (e.g., by creating a tree with a name >2GB, since "int" is still 32 bits even on most 64-bit platforms). Worse, this is easy to trigg...
void quicklistPush(quicklist *quicklist, void *value, const size_t sz, int where) { if (where == QUICKLIST_HEAD) { quicklistPushHead(quicklist, value, sz); } else if (where == QUICKLIST_TAIL) { quicklistPushTail(quicklist, value, sz); } }
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
21,351,405,856,108,910,000,000,000,000,000,000,000
8
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
Continue(int lineno, int col_offset, int end_lineno, int end_col_offset, PyArena *arena) { stmt_ty p; p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p)); if (!p) return NULL; p->kind = Continue_kind; p->lineno = lineno; p->col_offset = col_offset; p->end_lineno = end_lineno; ...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
251,712,637,691,102,970,000,000,000,000,000,000,000
14
bpo-35766: Merge typed_ast back into CPython (GH-11645)
static inline void tcp_advance_send_head(struct sock *sk, const struct sk_buff *skb) { if (tcp_skb_is_last(sk, skb)) sk->sk_send_head = NULL; else sk->sk_send_head = tcp_write_queue_next(sk, skb); }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
116,061,665,956,012,600,000,000,000,000,000,000,000
7
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
PHP_FUNCTION(imagecreatefromjpeg) { _php_image_create_from(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_JPG, "JPEG", gdImageCreateFromJpeg, gdImageCreateFromJpegCtx); }
0
[ "CWE-703", "CWE-189" ]
php-src
2938329ce19cb8c4197dec146c3ec887c6f61d01
243,720,637,148,851,100,000,000,000,000,000,000,000
4
Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop()) And also fixed the bug: arguments are altered after some calls
static int upload_dsp_code(struct snd_card *card) { struct snd_msnd *chip = card->private_data; const struct firmware *init_fw = NULL, *perm_fw = NULL; int err; outb(HPBLKSEL_0, chip->io + HP_BLKS); err = request_firmware(&init_fw, INITCODEFILE, card->dev); if (err < 0) { printk(KERN_ERR LOGNAME ": Error load...
0
[ "CWE-125", "CWE-401" ]
linux
20e2b791796bd68816fa115f12be5320de2b8021
46,026,381,279,548,960,000,000,000,000,000,000,000
34
ALSA: msnd: Optimize / harden DSP and MIDI loops The ISA msnd drivers have loops fetching the ring-buffer head, tail and size values inside the loops. Such codes are inefficient and fragile. This patch optimizes it, and also adds the sanity check to avoid the endless loops. Bugzilla: https://bugzilla.kernel.org/sho...
parser_module_handle_module_specifier (parser_context_t *context_p, /**< parser context */ ecma_module_node_t **node_list_p) /**< target node list */ { if (context_p->token.type != LEXER_LITERAL || context_p->token.lit_location.type != LEXER_STRING_LITERAL || context...
1
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
263,449,273,218,103,500,000,000,000,000,000,000,000
101
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
cmd_boolean (const char *com, const char *val, void *place) { bool value; if (CMP2 (val, 'o', 'n') || CMP3 (val, 'y', 'e', 's') || CMP1 (val, '1')) /* "on", "yes" and "1" mean true. */ value = true; else if (CMP3 (val, 'o', 'f', 'f') || CMP2 (val, 'n', 'o') || CMP1 (val, '0')) /* "off", "no" and "0" ...
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
30,386,328,771,278,634,000,000,000,000,000,000,000
21
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
static struct qeth_reply *qeth_alloc_reply(struct qeth_card *card) { struct qeth_reply *reply; reply = kzalloc(sizeof(struct qeth_reply), GFP_ATOMIC); if (reply) { atomic_set(&reply->refcnt, 1); atomic_set(&reply->received, 0); reply->card = card; } return reply; }
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
66,853,545,494,725,320,000,000,000,000,000,000,000
12
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
static void malloc_printerr (const char *str) { __libc_message (do_abort, "%s\n", str); __builtin_unreachable ();
0
[ "CWE-787" ]
glibc
d6db68e66dff25d12c3bc5641b60cbd7fb6ab44f
32,750,919,066,381,863,000,000,000,000,000,000,000
5
malloc: Mitigate null-byte overflow attacks * malloc/malloc.c (_int_free): Check for corrupt prev_size vs size. (malloc_consolidate): Likewise.
e1000e_autoneg_timer(void *opaque) { E1000ECore *core = opaque; if (!qemu_get_queue(core->owner_nic)->link_down) { e1000x_update_regs_on_autoneg_done(core->mac, core->phy[0]); e1000e_start_recv(core); e1000e_update_flowctl_status(core); /* signal link status change to the guest ...
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
281,138,791,415,921,700,000,000,000,000,000,000,000
12
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
static void clear_atomic_switch_msr(struct vcpu_vmx *vmx, unsigned msr) { int i; struct msr_autoload *m = &vmx->msr_autoload; switch (msr) { case MSR_EFER: if (cpu_has_load_ia32_efer()) { clear_atomic_switch_msr_special(vmx, VM_ENTRY_LOAD_IA32_EFER, VM_EXIT_LOAD_IA32_EFER); return; } break; ...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
130,632,686,056,716,180,000,000,000,000,000,000,000
39
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static bool io_wq_for_each_worker(struct io_wqe *wqe, bool (*func)(struct io_worker *, void *), void *data) { struct io_worker *worker; bool ret = false; list_for_each_entry_rcu(worker, &wqe->all_list, all_list) { if (io_worker_get(worker)) { /* no task if node is/was offline */ if (worker->task...
0
[ "CWE-200" ]
linux
713b9825a4c47897f66ad69409581e7734a8728e
269,685,787,186,402,200,000,000,000,000,000,000,000
20
io-wq: fix cancellation on create-worker failure WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1151 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 req_ref_put_and_test fs/io_uring.c:1146 [inline] WARNING: CPU: 0 PID: 10392 at fs/io_uring.c:1151 io_req_complete_post+0xf5...
static void steal_suitable_fallback(struct zone *zone, struct page *page, int start_type, bool whole_block) { unsigned int current_order = page_order(page); struct free_area *area; int free_pages, movable_pages, alike_pages; int old_block_type; old_block_type = get_pageblock_migratetype(page); /* * This ...
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
286,115,125,533,527,540,000,000,000,000,000,000,000
69
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
CImg<T> get_mirror(const char axis) const { return (+*this).mirror(axis); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
158,136,766,676,729,580,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
check_acl(const Acl *acl) { if (ARR_ELEMTYPE(acl) != ACLITEMOID) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("ACL array contains wrong data type"))); if (ARR_NDIM(acl) != 1) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("ACL arrays must be one-dimensional"...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
203,441,149,427,818,570,000,000,000,000,000,000,000
15
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
static void whereLoopInit(WhereLoop *p){ p->aLTerm = p->aLTermSpace; p->nLTerm = 0; p->nLSlot = ArraySize(p->aLTermSpace); p->wsFlags = 0; }
0
[ "CWE-129" ]
sqlite
effc07ec9c6e08d3bd17665f8800054770f8c643
21,185,384,153,131,715,000,000,000,000,000,000,000
6
Fix the whereKeyStats() routine (part of STAT4 processing only) so that it is able to cope with row-value comparisons against the primary key index of a WITHOUT ROWID table. [forum:/forumpost/3607259d3c|Forum post 3607259d3c]. FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb
static int DecodeExtKeyUsage(const byte* input, int sz, DecodedCert* cert) { word32 idx = 0, oid; int length, ret; WOLFSSL_MSG("DecodeExtKeyUsage"); if (GetSequence(input, &idx, &length, sz) < 0) { WOLFSSL_MSG("\tfail: should be a SEQUENCE"); return ASN_PARSE_E; } #if defined(OPEN...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
169,492,903,258,489,750,000,000,000,000,000,000,000
57
OCSP: improve handling of OCSP no check extension
static __u8 *nci_extract_rf_params_nfca_passive_poll(struct nci_dev *ndev, struct rf_tech_specific_params_nfca_poll *nfca_poll, __u8 *data) { nfca_poll->sens_res = __le16_to_cpu(*((__u16 *)data)); data += 2; nfca_poll->nfcid1_len = *data++; pr_debug("sens_res 0x%x, nfcid1_len %d\n", nfca_poll->se...
1
[ "CWE-119", "CWE-787" ]
linux
67de956ff5dc1d4f321e16cfbd63f5be3b691b43
147,695,216,107,880,760,000,000,000,000,000,000,000
26
NFC: Prevent multiple buffer overflows in NCI Fix multiple remotely-exploitable stack-based buffer overflows due to the NCI code pulling length fields directly from incoming frames and copying too much data into statically-sized arrays. Signed-off-by: Dan Rosenberg <dan.j.rosenberg@gmail.com> Cc: stable@kernel.org Cc...
STATIC regnode * S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *source, U32 depth) { /* The Trie is constructed and compressed now so we can build a fail array if * it's needed This is basically the Aho-Corasick algorithm. Its from exercise 3.31 and 3.32 in the "Red Dragon" -- Co...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
308,349,771,926,812,440,000,000,000,000,000,000,000
126
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 void mod_wstunnel_merge_config(plugin_config * const pconf, const config_plugin_value_t *cpv) { do { mod_wstunnel_merge_config_cpv(pconf, cpv); } while ((++cpv)->k_id != -1); }
0
[ "CWE-476" ]
lighttpd1.4
971773f1fae600074b46ef64f3ca1f76c227985f
193,798,236,633,382,640,000,000,000,000,000,000,000
5
[mod_wstunnel] fix crash with bad hybivers (fixes #3165) (thx Michał Dardas) x-ref: "mod_wstunnel null pointer dereference" https://redmine.lighttpd.net/issues/3165
static int nfs4_open_recover(struct nfs4_opendata *opendata, struct nfs4_state *state) { struct nfs4_state *newstate; int ret; /* memory barrier prior to reading state->n_* */ clear_bit(NFS_DELEGATED_STATE, &state->flags); smp_rmb(); if (state->n_rdwr != 0) { clear_bit(NFS_O_RDWR_STATE, &state->flags); ret =...
0
[ "CWE-703", "CWE-189" ]
linux
bf118a342f10dafe44b14451a1392c3254629a1f
335,892,058,548,152,950,000,000,000,000,000,000,000
45
NFSv4: include bitmap in nfsv4 get acl data The NFSv4 bitmap size is unbounded: a server can return an arbitrary sized bitmap in an FATTR4_WORD0_ACL request. Replace using the nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server with the inclusion of the bitmap (xdr length plus bitmasks) and...