func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ext4_quota_off(struct super_block *sb, int type) { struct inode *inode = sb_dqopt(sb)->files[type]; handle_t *handle; /* Force all delayed allocation blocks to be allocated. * Caller already holds s_umount sem */ if (test_opt(sb, DELALLOC)) sync_filesystem(sb); if (!inode) goto out; /* Update ...
0
[ "CWE-125" ]
linux
3a4b77cd47bb837b8557595ec7425f281f2ca1fe
70,119,840,991,923,020,000,000,000,000,000,000,000
25
ext4: validate s_first_meta_bg at mount time Ralf Spenneberg reported that he hit a kernel crash when mounting a modified ext4 image. And it turns out that kernel crashed when calculating fs overhead (ext4_calculate_overhead()), this is because the image has very large s_first_meta_bg (debug code shows it's 842150400)...
static int samldb_schema_ldapdisplayname_valid_check(struct samldb_ctx *ac) { int ret = samldb_unique_attr_check(ac, "lDAPDisplayName", NULL, ldb_get_schema_basedn( ldb_module_get_ctx(ac->module))); if (ret == LDB_ERR_ENTRY_ALREADY_EXISTS) { ret = LDB_ERR_UNWILLING_TO_PERFORM; } return ret; }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
317,642,372,189,581,800,000,000,000,000,000,000,000
10
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static void xgmac_enet_send(XgmacState *s) { struct desc bd; int frame_size; int len; uint8_t frame[8192]; uint8_t *ptr; ptr = frame; frame_size = 0; while (1) { xgmac_read_desc(s, &bd, 0); if ((bd.ctl_stat & 0x80000000) == 0) { /* Run out of descriptors to t...
1
[ "CWE-787" ]
qemu
5519724a13664b43e225ca05351c60b4468e4555
211,664,816,188,813,070,000,000,000,000,000,000,000
50
hw/net/xgmac: Fix buffer overflow in xgmac_enet_send() A buffer overflow issue was reported by Mr. Ziming Zhang, CC'd here. It occurs while sending an Ethernet frame due to missing break statements and improper checking of the buffer size. Reported-by: Ziming Zhang <ezrakiez@gmail.com> Signed-off-by: Mauro Matteo Cas...
static ssize_t pages_sharing_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { return sprintf(buf, "%lu\n", ksm_pages_sharing); }
0
[ "CWE-362", "CWE-125" ]
linux
2b472611a32a72f4a118c069c2d62a1a3f087afd
58,675,524,895,158,120,000,000,000,000,000,000,000
5
ksm: fix NULL pointer dereference in scan_get_next_rmap_item() Andrea Righi reported a case where an exiting task can race against ksmd::scan_get_next_rmap_item (http://lkml.org/lkml/2011/6/1/742) easily triggering a NULL pointer dereference in ksmd. ksm_scan.mm_slot == &ksm_mm_head with only one registered mm CPU 1...
static void skb_drop_list(struct sk_buff **listp) { kfree_skb_list(*listp); *listp = NULL; }
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
82,505,223,571,541,700,000,000,000,000,000,000,000
5
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
void ar6000_TxDataCleanup(struct ar6_softc *ar) { /* flush all the data (non-control) streams * we only flush packets that are tagged as data, we leave any control packets that * were in the TX queues alone */ HTCFlushEndpoint(ar->arHtcTarget, arAc2EndpointID(ar, WMM_A...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
109,066,382,801,557,080,000,000,000,000,000,000,000
18
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
int asn1_ber_decoder(const struct asn1_decoder *decoder, void *context, const unsigned char *data, size_t datalen) { const unsigned char *machine = decoder->machine; const asn1_action_t *actions = decoder->actions; size_t machlen = decoder->machlen; enum asn1_opcode op; unsigned char tag = 0, ...
0
[ "CWE-310" ]
linux
0d62e9dd6da45bbf0f33a8617afc5fe774c8f45f
172,302,505,898,544,740,000,000,000,000,000,000,000
334
ASN.1: Fix non-match detection failure on data overrun If the ASN.1 decoder is asked to parse a sequence of objects, non-optional matches get skipped if there's no more data to be had rather than a data-overrun error being reported. This is due to the code segment that decides whether to skip optional matches (ie. ma...
have_header(isc_httpd_t *httpd, const char *header, const char *value, const char *eov, const char **fvalue) { char *cr, *nl, *h; size_t hlen, vlen = 0; h = httpd->headers; hlen = strlen(header); if (value != NULL) { INSIST(eov != NULL); vlen = strlen(value); } for (;;) { if (strncasecmp(h, header, ...
0
[]
bind9
d4c5d1c650ae0e97a083b0ce7a705c20fc001f07
29,013,855,163,284,923,000,000,000,000,000,000,000
81
Fix statistics channel multiple request processing with non-empty bodies When the HTTP request has a body part after the HTTP headers, it is not getting processed and is being prepended to the next request's data, which results in an error when trying to parse it. Improve the httpd.c:process_request() function with t...
static void register_sched_domain_sysctl(void) { int i, cpu_num = num_possible_cpus(); struct ctl_table *entry = sd_alloc_ctl_entry(cpu_num + 1); char buf[32]; WARN_ON(sd_ctl_dir[0].child); sd_ctl_dir[0].child = entry; if (entry == NULL) return; for_each_possible_cpu(i) { snprintf(buf, 32, "cpu%d", i); ...
0
[ "CWE-200" ]
linux
4efbc454ba68def5ef285b26ebfcfdb605b52755
30,111,703,816,368,573,000,000,000,000,000,000,000
23
sched: Fix information leak in sys_sched_getattr() We're copying the on-stack structure to userspace, but forgot to give the right number of bytes to copy. This allows the calling process to obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent kernel memory). This fix copies only as much as we actually ...
static int usb_chmap_ctl_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct snd_pcm_chmap *info = snd_kcontrol_chip(kcontrol); struct snd_usb_substream *subs = info->private_data; uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; uinfo->count = subs->channels_max; uinfo->value.integer...
0
[]
linux
836b34a935abc91e13e63053d0a83b24dfb5ea78
255,857,994,477,639,220,000,000,000,000,000,000,000
12
ALSA: usb-audio: Fix double-free in error paths after snd_usb_add_audio_stream() call create_fixed_stream_quirk(), snd_usb_parse_audio_interface() and create_uaxx_quirk() functions allocate the audioformat object by themselves and free it upon error before returning. However, once the object is linked to a stream, it'...
bool TABLE_LIST::prepare_view_security_context(THD *thd) { DBUG_ENTER("TABLE_LIST::prepare_view_security_context"); DBUG_PRINT("enter", ("table: %s", alias.str)); DBUG_ASSERT(!prelocking_placeholder && view); if (view_suid) { DBUG_PRINT("info", ("This table is suid view => load contest")); DBUG_ASSER...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
247,323,611,387,525,760,000,000,000,000,000,000,000
48
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
un_nat_packet(struct dp_packet *pkt, const struct conn *conn, bool related) { if (conn->nat_info->nat_action & NAT_ACTION_SRC) { pkt->md.ct_state |= CS_DST_NAT; if (conn->key.dl_type == htons(ETH_TYPE_IP)) { struct ip_header *nh = dp_packet_l3(pkt); packet_set_i...
0
[ "CWE-400" ]
ovs
abd7a457652e6734902720fe6a5dddb3fc0d1e3b
214,566,989,832,436,360,000,000,000,000,000,000,000
41
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
tracing_entries_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) { struct inode *inode = file_inode(filp); struct trace_array *tr = inode->i_private; unsigned long val; int ret; ret = kstrtoul_from_user(ubuf, cnt, 10, &val); if (ret) return ret; /* must have at least 1 entr...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
327,920,997,241,732,500,000,000,000,000,000,000,000
26
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
doris::ColumnPtrWrapper* FunctionContext::get_constant_col(int i) const { if (i < 0 || i >= _impl->_constant_cols.size()) { return nullptr; } return _impl->_constant_cols[i]; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
327,644,433,807,605,560,000,000,000,000,000,000,000
6
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
void HGraphBuilder::GenerateRegExpExec(CallRuntime* call) { ASSERT_EQ(4, call->arguments()->length()); CHECK_ALIVE(VisitArgumentList(call->arguments())); HValue* context = environment()->LookupContext(); HCallStub* result = new(zone()) HCallStub(context, CodeStub::RegExpExec, 4); Drop(4); return ast_context...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
180,054,862,878,528,970,000,000,000,000,000,000,000
8
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
static void bnx2x_wr_fp_sb_data(struct bnx2x *bp, int fw_sb_id, u32 *sb_data_p, u32 data_size) { int index; for (index = 0; index < data_size; index++) REG_WR(bp, BAR_CSTRORM_INTMEM + CSTORM_STATUS_BLOCK_DATA_OFFSET(fw_sb_id) + sizeof(u32)*index, *(sb_data_p + index)); }
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
39,176,197,103,010,710,000,000,000,000,000,000,000
12
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static void get_nb10(ut8* dbg_data, SCV_NB10_HEADER* res) { const int nb10sz = 16; // memcpy (res, dbg_data, nb10sz); // res->file_name = (ut8*) strdup ((const char*) dbg_data + nb10sz); }
0
[ "CWE-125" ]
radare2
4e1cf0d3e6f6fe2552a269def0af1cd2403e266c
261,595,261,714,860,960,000,000,000,000,000,000,000
5
Fix crash in pe
int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type) { int j,ret=0; BIO *in; EVP_PKEY *pkey=NULL; in=BIO_new(BIO_s_file_internal()); if (in == NULL) { SSLerr(SSL_F_SSL_USE_PRIVATEKEY_FILE,ERR_R_BUF_LIB); goto end; } if (BIO_read_filename(in,file) <= 0) { SSLerr(SSL_F_SSL_USE_PRIVATEKEY...
0
[]
openssl
0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c
1,488,006,332,807,768,600,000,000,000,000,000,000
45
Backport support for fixed DH ciphersuites (from HEAD)
blabel_print(netdissect_options *ndo, const u_char *cp) { int bitlen, slen, b; const u_char *bitp, *lim; char tc; if (!ND_TTEST2(*cp, 1)) return(NULL); if ((bitlen = *cp) == 0) bitlen = 256; slen = (bitlen + 3) / 4; lim = cp + 1 + slen; /* print the bit string as a hex string */ ND_PRINT((nd...
0
[ "CWE-399", "CWE-835" ]
tcpdump
3a76fd7c95fced2c2f8c8148a9055c3a542eff29
123,229,248,117,515,650,000,000,000,000,000,000,000
35
CVE-2017-12995/Check for DNS compression pointers that don't point backwards. This is what BIND 9.11.0-P2 does; it not only detects pointers that loop, as "point backwards" means "point before anything we've processed so far, including what we're processing right now", so the pointer can't point to itself (as that's w...
int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) { int r; sigset_t sigsaved; if (!tsk_used_math(current) && init_fpu(current)) return -ENOMEM; if (vcpu->sigset_active) sigprocmask(SIG_SETMASK, &vcpu->sigset, &sigsaved); if (unlikely(vcpu->arch.mp_state == KVM_MP_STATE_UNINITIALIZE...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
2,666,615,948,404,283,000,000,000,000,000,000,000
39
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...
template<typename t> CImgList<T>& assign(const CImg<t>& img, const bool is_shared=false) { assign(1); _data[0].assign(img,is_shared); return *this;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
279,617,378,195,261,070,000,000,000,000,000,000,000
5
Fix other issues in 'CImg<T>::load_bmp()'.
cpu_idle (void) { void (*mark_idle)(int) = ia64_mark_idle; int cpu = smp_processor_id(); /* endless idle loop with no priority at all */ while (1) { if (can_do_pal_halt) { current_thread_info()->status &= ~TS_POLLING; /* * TS_POLLING-cleared state must be visible before we * test NEED_RESCHED: ...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
241,251,734,899,639,300,000,000,000,000,000,000,000
45
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...
int vrend_renderer_export_query(struct pipe_resource *pres, struct virgl_renderer_export_query *export_query) { struct vrend_resource *res = (struct vrend_resource *)pres; #ifdef ENABLE_MINIGBM_ALLOCATION if (res->gbm_bo) return virgl_gbm_export_query(res->gbm_bo, export_que...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
293,222,881,660,872,170,000,000,000,000,000,000,000
24
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
qb_rb_write_to_file(struct qb_ringbuffer_s * rb, int32_t fd) { ssize_t result; ssize_t written_size = 0; uint32_t hash = 0; uint32_t version = QB_RB_FILE_HEADER_VERSION; if (rb == NULL) { return -EINVAL; } print_header(rb); /* * 1. word_size */ result = write(fd, &rb->shared_hdr->word_size, sizeof(ui...
0
[ "CWE-59" ]
libqb
e322e98dc264bc5911d6fe1d371e55ac9f95a71e
97,436,406,122,372,870,000,000,000,000,000,000,000
65
ipc: use O_EXCL on SHM files, and randomize the names Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
TEST_F(HttpConnectionManagerImplTest, TestDownstreamProtocolErrorAfterHeadersAccessLog) { setup(false, ""); std::shared_ptr<MockStreamDecoderFilter> filter(new NiceMock<MockStreamDecoderFilter>()); std::shared_ptr<AccessLog::MockInstance> handler(new NiceMock<AccessLog::MockInstance>()); EXPECT_CALL(filter_fa...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
298,974,477,345,483,200,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...
void VP8ComponentDecoder::SendToVirtualThread::send(ResizableByteBufferListNode *data) { always_assert(data); always_assert(data->stream_id < sizeof(vbuffers) / sizeof(vbuffers[0]) && "INVALID SEND STREAM ID"); if (!g_threaded || NUM_THREADS == 1) { /* fprintf(stderr, "VSending...
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
90,215,171,788,505,940,000,000,000,000,000,000,000
25
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
static struct loaded_vmcs *nested_get_current_vmcs02(struct vcpu_vmx *vmx) { struct vmcs02_list *item; list_for_each_entry(item, &vmx->nested.vmcs02_pool, list) if (item->vmptr == vmx->nested.current_vmptr) { list_move(&item->list, &vmx->nested.vmcs02_pool); return &item->vmcs02; } if (vmx->nested.vmcs02_...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
258,541,598,932,131,000,000,000,000,000,000,000,000
33
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
const opaque* ServerHello::get_random() const { return random_; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
110,508,635,555,689,300,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
gs_grab_keyboard_reset (GSGrab *grab) { grab->priv->keyboard_grab_window = NULL; grab->priv->keyboard_grab_screen = NULL; }
1
[]
gnome-screensaver
f93a22c175090cf02e80bc3ee676b53f1251f685
157,438,576,911,378,710,000,000,000,000,000,000,000
5
Nullify grab window variables when windows are destroyed If we don't do this then there is a time period where the grab window variables contain dangling pointers which can cause crashes. Part of fix for https://bugzilla.gnome.org/show_bug.cgi?id=609789
short * CLASS foveon_make_curve (double max, double mul, double filt) { short *t_curve; unsigned i, size; double x; if (!filt) filt = 0.8; size = 4*M_PI*max / filt; if (size == UINT_MAX) size--; t_curve = (short *) calloc (size+1, sizeof *t_curve); merror (t_curve, "foveon_make_curve()"); t_curve[0] ...
0
[ "CWE-119", "CWE-787", "CWE-190" ]
LibRaw-demosaic-pack-GPL2
194f592e205990ea8fce72b6c571c14350aca716
42,869,097,249,855,060,000,000,000,000,000,000,000
18
Fixed possible foveon buffer overrun (Secunia SA750000)
static bool __io_poll_remove_one(struct io_kiocb *req, struct io_poll_iocb *poll) { bool do_complete = false; spin_lock(&poll->head->lock); WRITE_ONCE(poll->canceled, true); if (!list_empty(&poll->wait.entry)) { list_del_init(&poll->wait.entry); do_complete = true; } spin_unlock(&poll->head->lock); ha...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
181,616,750,086,519,730,000,000,000,000,000,000,000
15
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
virtual ~KeyStore() {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
140,261,379,322,388,460,000,000,000,000,000,000,000
1
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
getNumber(widechar *source, widechar *dest) { /* Convert a string of wide character digits to an integer */ int k = 0; *dest = 0; while (source[k] >= '0' && source[k] <= '9') *dest = 10 * *dest + (source[k++] - '0'); return k; }
0
[ "CWE-787" ]
liblouis
fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde
163,964,444,643,803,160,000,000,000,000,000,000,000
7
Fix yet another buffer overflow in the braille table parser Reported by Henri Salo Fixes #592
static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num) { BDRVBochsState *s = bs->opaque; int64_t offset = sector_num * 512; int64_t extent_index, extent_offset, bitmap_offset; char bitmap_entry; // seek to sector extent_index = offset / s->extent_size; extent_offset = (offs...
1
[ "CWE-190" ]
qemu
246f65838d19db6db55bfb41117c35645a2c4789
195,876,039,555,861,350,000,000,000,000,000,000,000
30
bochs: Use unsigned variables for offsets and sizes (CVE-2014-0147) Gets us rid of integer overflows resulting in negative sizes which aren't correctly checked. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Ste...
static void in_intr(struct virtqueue *vq) { struct port *port; unsigned long flags; port = find_port_by_vq(vq->vdev->priv, vq); if (!port) return; spin_lock_irqsave(&port->inbuf_lock, flags); port->inbuf = get_inbuf(port); /* * Normally the port should not accept data when the port is * closed. For gene...
0
[ "CWE-119", "CWE-787" ]
linux
c4baad50297d84bde1a7ad45e50c73adae4a2192
178,459,405,900,584,140,000,000,000,000,000,000,000
42
virtio-console: avoid DMA from stack put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Michael S. Tsirkin <mst@redhat...
R_API void r_bin_java_utf8_info_free(void /* RBinJavaCPTypeObj*/ *o) { RBinJavaCPTypeObj *obj = o; if (obj) { free (obj->name); free (obj->metas); free (obj->info.cp_utf8.bytes); free (obj); } }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
150,032,201,844,334,190,000,000,000,000,000,000,000
9
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
static void port_outl(const struct si_sm_io *io, unsigned int offset, unsigned char b) { unsigned int addr = io->addr_data; outl(b << io->regshift, addr+(offset * io->regspacing)); }
0
[ "CWE-416" ]
linux
401e7e88d4ef80188ffa07095ac00456f901b8c4
238,913,691,833,056,000,000,000,000,000,000,000,000
7
ipmi_si: fix use-after-free of resource->name When we excute the following commands, we got oops rmmod ipmi_si cat /proc/ioports [ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478 [ 1623.482382] Mem abort info: [ 1623.482383] ESR = 0x96000007 [ 1623.482385] Exception class =...
void isis_notif_lsp_too_large(const struct isis_circuit *circuit, uint32_t pdu_size, const uint8_t *lsp_id) { const char *xpath = "/frr-isisd:lsp-too-large"; struct list *arguments = yang_data_list_new(); char xpath_arg[XPATH_MAXLEN]; struct yang_data *data; struct isis_area *area = circuit->area; notif...
0
[ "CWE-119", "CWE-787" ]
frr
ac3133450de12ba86c051265fc0f1b12bc57b40c
302,505,466,702,698,640,000,000,000,000,000,000,000
22
isisd: fix #10505 using base64 encoding Using base64 instead of the raw string to encode the binary data. Signed-off-by: whichbug <whichbug@github.com>
int group_balance_cpu(struct sched_group *sg) { return cpumask_first_and(sched_group_cpus(sg), sched_group_mask(sg)); }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
74,925,786,964,442,420,000,000,000,000,000,000,000
4
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static inline int register_fuseblk(void) { return register_filesystem(&fuseblk_fs_type); }
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
285,518,910,498,352,620,000,000,000,000,000,000,000
4
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
archive_test_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { FrWindow *window = user_data; GError *error = NULL; fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error); _archive_operation_completed (window, FR_ACTION_TESTING_ARCHIVE, err...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
26,993,399,417,665,355,000,000,000,000,000,000,000
12
libarchive: sanitize filenames before extracting
const char *session_info_get_active_session(struct session_info *info) { DBusError error; DBusMessage *message = NULL; DBusMessage *reply = NULL; char *session = NULL; if (!info) return NULL; if (info->active_session) return console_kit_check_active_session_change(info); m...
0
[ "CWE-362" ]
spice-vd_agent
5c50131797e985d0a5654c1fd7000ae945ed29a7
100,977,381,749,547,220,000,000,000,000,000,000,000
65
Better check for sessions Do not allow other users to hijack a session checking that the process is launched by the owner of the session. Signed-off-by: Frediano Ziglio <freddy77@gmail.com> Acked-by: Uri Lublin <uril@redhat.com>
netsnmp_sprint_realloc_objid_tree(u_char ** buf, size_t * buf_len, size_t * out_len, int allow_realloc, int *buf_overflow, const oid * objid, size_t objidlen) { u_char *tbuf = NULL, *cp = NULL; size_t ...
0
[ "CWE-59", "CWE-61" ]
net-snmp
4fd9a450444a434a993bc72f7c3486ccce41f602
225,078,411,031,208,100,000,000,000,000,000,000,000
123
CHANGES: snmpd: Stop reading and writing the mib_indexes/* files Caching directory contents is something the operating system should do and is not something Net-SNMP should do. Instead of storing a copy of the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a MIB directory.
#ifndef GPAC_DISABLE_ISOM_WRITE GF_Err dvcC_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_DOVIConfigurationBox *ptr = (GF_DOVIConfigurationBox *) s; if (!s) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; //GF_DOVIDecoderConfigurationRecord gf_bs_write_u8(bs, ptr->DOVIConfig...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
299,824,939,235,459,000,000,000,000,000,000,000,000
25
fixed #1587
Vers_parse_info &vers_get_info() { return create_info.vers_info; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
31,656,290,945,621,333,000,000,000,000,000,000,000
4
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static bool check_row_equality(THD *thd, const Arg_comparator *comparators, Item *left_row, Item_row *right_row, COND_EQUAL *cond_equal, List<Item>* eq_list) { uint n= left_row->cols(); for (uint i= 0 ; i < n; i++) { bool is_converted; Item *l...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
205,418,749,535,743,050,000,000,000,000,000,000,000
50
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
int mp_rand_prime(mp_int* N, int len, WC_RNG* rng, void* heap) { int err; err = fp_randprime(N, len, rng, heap); switch(err) { case FP_VAL: return MP_VAL; case FP_MEM: return MP_MEM; default: break; } return MP_OKAY; }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
230,156,206,080,170,360,000,000,000,000,000,000,000
16
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.
static int megasas_set_crash_dump_params_ioctl(struct megasas_cmd *cmd) { struct megasas_instance *local_instance; int i, error = 0; int crash_support; crash_support = cmd->frame->dcmd.mbox.w[0]; for (i = 0; i < megasas_mgmt_info.max_index; i++) { local_instance = megasas_mgmt_info.instance[i]; if (local_ins...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
85,515,020,419,001,950,000,000,000,000,000,000,000
31
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
DEFUN (no_neighbor_disable_connected_check, no_neighbor_disable_connected_check_cmd, NO_NEIGHBOR_CMD2 "disable-connected-check", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR2 "one-hop away EBGP peer using loopback address\n") { return peer_flag_unset_vty (vty, argv[0], PEER_FLAG_DIS...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
279,418,912,218,492,670,000,000,000,000,000,000,000
10
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
static Token *expand_smacro(Token *tline) { smacro_deadman.total = nasm_limit[LIMIT_MACRO_TOKENS]; smacro_deadman.levels = nasm_limit[LIMIT_MACRO_LEVELS]; smacro_deadman.triggered = false; return expand_smacro_noreset(tline); }
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
261,707,845,855,987,770,000,000,000,000,000,000,000
7
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
void iov_iter_pipe(struct iov_iter *i, int direction, struct pipe_inode_info *pipe, size_t count) { BUG_ON(direction != ITER_PIPE); i->type = direction; i->pipe = pipe; i->idx = (pipe->curbuf + pipe->nrbufs) & (pipe->buffers - 1); i->iov_offset = 0; i->count = count; }
1
[ "CWE-200" ]
linux
b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb
339,265,591,867,351,970,000,000,000,000,000,000,000
11
fix a fencepost error in pipe_advance() The logics in pipe_advance() used to release all buffers past the new position failed in cases when the number of buffers to release was equal to pipe->buffers. If that happened, none of them had been released, leaving pipe full. Worse, it was trivial to trigger and we end up ...
static u32 adjust_tsc_khz(u32 khz, s32 ppm) { u64 v = (u64)khz * (1000000 + ppm); do_div(v, 1000000); return v; }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
134,524,459,639,054,870,000,000,000,000,000,000,000
6
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 ...
static CImg<T> get_load_yuv(const char *const filename, const unsigned int size_x, const unsigned int size_y=1, const unsigned int chroma_subsampling=444, const unsigned int first_frame=0, const unsigned int last_frame=~...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
330,375,964,337,219,070,000,000,000,000,000,000,000
8
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int wc_RsaSSL_Sign(const byte* in, word32 inLen, byte* out, word32 outLen, RsaKey* key, WC_RNG* rng) { return RsaPublicEncryptEx(in, inLen, out, outLen, key, RSA_PRIVATE_ENCRYPT, RSA_BLOCK_TYPE_1, WC_RSA_PKCSV15_PAD, WC_HASH_TYPE_NONE, WC_MGF1NONE, ...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
325,994,203,757,724,400,000,000,000,000,000,000,000
7
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
static int bnx2x_vlan_configure_vid_list(struct bnx2x *bp) { struct bnx2x_vlan_entry *vlan; int rc = 0; /* Configure all non-configured entries */ list_for_each_entry(vlan, &bp->vlan_reg, link) { if (vlan->hw) continue; if (bp->vlan_cnt >= bp->vlan_credit) return -ENOBUFS; rc = __bnx2x_vlan_configure...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
25,629,241,693,606,734,000,000,000,000,000,000,000
26
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
static UChar32 escLeftBracket0Routine(UChar32 c) { return escFailureRoutine(c); }
0
[ "CWE-200" ]
mongo
035cf2afc04988b22cb67f4ebfd77e9b344cb6e0
254,648,238,905,152,240,000,000,000,000,000,000,000
3
SERVER-25335 avoid group and other permissions when creating .dbshell history file
policy_write_item(char *buf, size_t buflen, addr_policy_t *policy, int format_for_desc) { size_t written = 0; char addrbuf[TOR_ADDR_BUF_LEN]; const char *addrpart; int result; const int is_accept = policy->policy_type == ADDR_POLICY_ACCEPT; const int is_ip6 = tor_addr_family(&policy->addr)...
0
[ "CWE-119" ]
tor
43414eb98821d3b5c6c65181d7545ce938f82c8e
319,376,492,809,989,500,000,000,000,000,000,000,000
62
Fix bounds-checking in policy_summarize Found by piebeer.
uint64_t HELPER(autib)(CPUARMState *env, uint64_t x, uint64_t y) { int el = arm_current_el(env); if (!pauth_key_enabled(env, el, SCTLR_EnIB)) { return x; } pauth_check_trap(env, el, GETPC()); return pauth_auth(env, x, y, &env->keys.apib, false, 1); }
0
[]
qemu
de0b1bae6461f67243282555475f88b2384a1eb9
310,670,567,125,418,100,000,000,000,000,000,000,000
9
target/arm: Fix PAuth sbox functions In the PAC computation, sbox was applied over wrong bits. As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16. Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was used to verify one computation of the pauth_computepac() function which us...
f_test_null_partial(typval_T *argvars UNUSED, typval_T *rettv) { rettv->v_type = VAR_PARTIAL; rettv->vval.v_partial = NULL; }
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
56,522,042,099,938,120,000,000,000,000,000,000,000
5
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
Status upgradeAuthSchemaStep(OperationContext* opCtx, AuthorizationManager* authzManager, bool* isDone) { int authzVersion; Status status = authzManager->getAuthorizationVersion(opCtx, &authzVersion); if (!status.isOK()) { return status; ...
0
[ "CWE-613" ]
mongo
db19e7ce84cfd702a4ba9983ee2ea5019f470f82
125,972,156,243,626,320,000,000,000,000,000,000,000
24
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
static struct vmcs *alloc_shadow_vmcs(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); struct loaded_vmcs *loaded_vmcs = vmx->loaded_vmcs; /* * We should allocate a shadow vmcs for vmcs01 only when L1 * executes VMXON and free it when L1 executes VMXOFF. * As it is invalid to execute VMXON twice,...
0
[ "CWE-863" ]
kvm
acff78477b9b4f26ecdf65733a4ed77fe837e9dc
171,602,229,442,774,500,000,000,000,000,000,000,000
20
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887) The nested_vmx_prepare_msr_bitmap() function doesn't directly guard the x2APIC MSR intercepts with the "virtualize x2APIC mode" MSR. As a result, we discovered the potential for a buggy or malicious L1 to get access to L0's x2APIC MSRs, via an L2, as follo...
clear_civil(union DateData *x) { if (simple_dat_p(x)) { x->s.year = 0; #ifndef USE_PACK x->s.mon = 0; x->s.mday = 0; #else x->s.pc = 0; #endif x->s.flags &= ~HAVE_CIVIL; } else { x->c.year = 0; #ifndef USE_PACK x->c.mon = 0; x->c.mday = 0; x->c.hour = 0; x->c.min = 0; x->c.sec = 0; #else x->c.pc...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
59,903,428,046,857,940,000,000,000,000,000,000,000
26
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
psutil_pids(PyObject *self, PyObject *args) { DWORD *proclist = NULL; DWORD numberOfReturnedPIDs; DWORD i; PyObject *py_pid = NULL; PyObject *py_retlist = PyList_New(0); if (py_retlist == NULL) return NULL; proclist = psutil_get_pids(&numberOfReturnedPIDs); if (proclist == NULL)...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
252,474,108,543,954,800,000,000,000,000,000,000,000
33
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
void Command::generateHelpResponse(OperationContext* opCtx, rpc::ReplyBuilderInterface* replyBuilder, const Command& command) { BSONObjBuilder helpBuilder; helpBuilder.append("help", str::stream() << "help for: " << com...
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
259,637,951,485,056,570,000,000,000,000,000,000,000
8
SERVER-38275 ban find explain with UUID
to_s(VALUE self) { volatile VALUE h = to_h(self); return rb_funcall(h, rb_intern("to_s"), 0); }
0
[ "CWE-444", "CWE-61" ]
agoo
23d03535cf7b50d679a60a953a0cae9519a4a130
275,908,229,507,674,450,000,000,000,000,000,000,000
5
Remote addr (#99) * REMOTE_ADDR added * Ready for merge
static void ieee80211_restart_sta_timer(struct ieee80211_sub_if_data *sdata) { if (sdata->vif.type == NL80211_IFTYPE_STATION) { __ieee80211_stop_poll(sdata); /* let's probe the connection once */ if (!ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR)) ieee80211_queue_work(&sdata->local->hw, ...
0
[]
linux
79c92ca42b5a3e0ea172ea2ce8df8e125af237da
280,283,061,771,645,230,000,000,000,000,000,000,000
11
mac80211: handle deauthentication/disassociation from TDLS peer When receiving a deauthentication/disassociation frame from a TDLS peer, a station should not disconnect the current AP, but only disable the current TDLS link if it's enabled. Without this change, a TDLS issue can be reproduced by following the steps as...
Status MaybePackInputTensor(EagerOperation* op) { if (op->is_function() || op->EagerContext().RunEagerOpAsFunction()) { // Functions could take packed TensorHandles as inputs. return Status::OK(); } EagerContext& ctx = op->EagerContext(); const absl::InlinedVector<TensorHandle*, 4>* inputs; TF_RETURN_...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
91,106,622,335,732,500,000,000,000,000,000,000,000
32
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
transformIndexConstraint(Constraint *constraint, CreateStmtContext *cxt) { IndexStmt *index; ListCell *lc; index = makeNode(IndexStmt); index->unique = (constraint->contype != CONSTR_EXCLUSION); index->primary = (constraint->contype == CONSTR_PRIMARY); if (index->primary) { if (cxt->pkey != NULL) erepo...
0
[ "CWE-94" ]
postgres
f52d2fbd8c62f667191b61228acf9d8aa53607b9
159,651,445,696,335,300,000,000,000,000,000,000,000
480
In extensions, don't replace objects not belonging to the extension. Previously, if an extension script did CREATE OR REPLACE and there was an existing object not belonging to the extension, it would overwrite the object and adopt it into the extension. This is problematic, first because the overwrite is probably uni...
static FontViewBase *FVAny(void) { return (FontViewBase *) fv_list; }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
240,631,960,548,644,100,000,000,000,000,000,000,000
1
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static inline bool gif_set(struct vcpu_svm *svm) { if (vgif_enabled(svm)) return !!(svm->vmcb->control.int_ctl & V_GIF_MASK); else return !!(svm->vcpu.arch.hflags & HF_GIF_MASK); }
0
[ "CWE-401" ]
linux
d80b64ff297e40c2b6f7d7abc1b3eba70d22a068
157,753,224,625,289,260,000,000,000,000,000,000,000
7
KVM: SVM: Fix potential memory leak in svm_cpu_init() When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually the only possible outcome here. Reviewed-by: Liran Alon <liran.alon@oracle.com> Reviewed-by: Vitaly Kuznetsov <vkuzne...
static int nl80211_parse_key(struct genl_info *info, struct key_parse *k) { int err; memset(k, 0, sizeof(*k)); k->idx = -1; k->type = -1; if (info->attrs[NL80211_ATTR_KEY]) err = nl80211_parse_key_new(info, info->attrs[NL80211_ATTR_KEY], k); else err = nl80211_parse_key_old(info, k); if (err) return err...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
276,700,483,990,136,000,000,000,000,000,000,000,000
50
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
static int pvc_getname(struct socket *sock, struct sockaddr *sockaddr, int *sockaddr_len, int peer) { struct sockaddr_atmpvc *addr; struct atm_vcc *vcc = ATM_SD(sock); if (!vcc->dev || !test_bit(ATM_VF_ADDR, &vcc->flags)) return -ENOTCONN; *sockaddr_len = sizeof(struct sockaddr_atmpvc); addr = (struct ...
1
[ "CWE-200" ]
linux
3c0c5cfdcd4d69ffc4b9c0907cec99039f30a50a
333,594,831,954,395,070,000,000,000,000,000,000,000
16
atm: fix info leak via getsockname() The ATM code fails to initialize the two padding bytes of struct sockaddr_atmpvc inserted for alignment. Add an explicit memset(0) before filling the structure to avoid the info leak. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: David S. Miller <davem@dave...
static int add_port(struct ports_device *portdev, u32 id) { char debugfs_name[16]; struct port *port; dev_t devt; int err; port = kmalloc(sizeof(*port), GFP_KERNEL); if (!port) { err = -ENOMEM; goto fail; } kref_init(&port->kref); port->portdev = portdev; port->id = id; port->name = NULL; port->inbuf...
0
[ "CWE-120" ]
linux
d00d8da5869a2608e97cfede094dfc5e11462a46
199,302,967,824,301,970,000,000,000,000,000,000,000
124
virtio_console: Assure used length from device is limited The buf->len might come from an untrusted device. This ensures the value would not exceed the size of the buffer to avoid data corruption or loss. Signed-off-by: Xie Yongji <xieyongji@bytedance.com> Acked-by: Jason Wang <jasowang@redhat.com> Link: https://lore...
static inline bool cpu_has_vmx_wbinvd_exit(void) { return vmcs_config.cpu_based_2nd_exec_ctrl & SECONDARY_EXEC_WBINVD_EXITING; }
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
332,749,939,548,646,100,000,000,000,000,000,000,000
5
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static void adv_timeout_expire(struct work_struct *work) { struct hci_dev *hdev = container_of(work, struct hci_dev, adv_instance_expire.work); struct hci_request req; u8 instance; bt_dev_dbg(hdev, ""); hci_dev_lock(hdev); hdev->adv_instance_timeout = 0; instance = hdev->cur_adv_instance; if (inst...
0
[ "CWE-362" ]
linux
e2cb6b891ad2b8caa9131e3be70f45243df82a80
62,026,407,106,328,160,000,000,000,000,000,000,000
30
bluetooth: eliminate the potential race condition when removing the HCI controller There is a possible race condition vulnerability between issuing a HCI command and removing the cont. Specifically, functions hci_req_sync() and hci_dev_do_close() can race each other like below: thread-A in hci_req_sync() | th...
send_self_update(struct interface *ifp) { struct xroute_stream *xroutes; if(ifp == NULL) { struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); struct interface *ifp_aux; FOR_ALL_INTERFACES(vrf, ifp_aux) { if(!if_up(ifp_aux)) continue; send_self_update(ifp_au...
0
[ "CWE-787" ]
frr
c3793352a8d76d2eee1edc38a9a16c1c8a6573f4
569,011,893,506,550,900,000,000,000,000,000,000
27
babeld: fix #10502 #10503 by repairing the checks on length This patch repairs the checking conditions on length in four functions: babel_packet_examin, parse_hello_subtlv, parse_ihu_subtlv, and parse_update_subtlv Signed-off-by: qingkaishi <qingkaishi@gmail.com>
static inline void tcp_segs_in(struct tcp_sock *tp, const struct sk_buff *skb) { u16 segs_in; segs_in = max_t(u16, 1, skb_shinfo(skb)->gso_segs); tp->segs_in += segs_in; if (skb->len > tcp_hdrlen(skb)) tp->data_segs_in += segs_in; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
126,866,808,576,235,330,000,000,000,000,000,000,000
9
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...
~Lex_input_stream() { }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
205,487,935,767,747,170,000,000,000,000,000,000,000
3
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static int getoptions(char *c, struct trusted_key_payload *pay, struct trusted_key_options *opt) { substring_t args[MAX_OPT_ARGS]; char *p = c; int token; int res; unsigned long handle; unsigned long lock; while ((p = strsep(&c, " \t"))) { if (*p == '\0' || *p == ' ' || *p == '\t') continue; toke...
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
096fe9eaea40a17e125569f9e657e34cdb6d73bd
274,952,701,534,364,400,000,000,000,000,000,000,000
66
KEYS: Fix handling of stored error in a negatively instantiated user key If a user key gets negatively instantiated, an error code is cached in the payload area. A negatively instantiated key may be then be positively instantiated by updating it with valid data. However, the ->update key type method must be aware th...
apr_status_t h2_proxy_session_process(h2_proxy_session *session) { apr_status_t status; int have_written = 0, have_read = 0; ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, session->c, "h2_proxy_session(%s): process", session->id); run_loop: switch (session->state) { c...
0
[ "CWE-770" ]
mod_h2
dd05d49abe0f67512ce9ed5ba422d7711effecfb
47,473,881,975,444,230,000,000,000,000,000,000,000
95
* fixes Timeout vs. KeepAliveTimeout behaviour, see PR 63534 (for trunk now, mpm event backport to 2.4.x up for vote). * Fixes stream cleanup when connection throttling is in place. * Counts stream resets by client on streams initiated by client as cause for connection throttling. * Header length checks are no...
bool CUser::PutAllUser(const CString& sLine, CClient* pClient, CClient* pSkipClient) { PutUser(sLine, pClient, pSkipClient); for (CIRCNetwork* pNetwork : m_vIRCNetworks) { if (pNetwork->PutUser(sLine, pClient, pSkipClient)) { return true; } } return (...
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
193,437,065,076,590,080,000,000,000,000,000,000,000
12
Don't crash if user specified invalid encoding. This is CVE-2019-9917
PHP_FUNCTION(imagescale) { zval *IM; gdImagePtr im; gdImagePtr im_scaled = NULL; int new_width, new_height; long tmp_w, tmp_h=-1, tmp_m = GD_BILINEAR_FIXED; gdInterpolationMethod method; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|ll", &IM, &tmp_w, &tmp_h, &tmp_m) == FAILURE) { return; } metho...
0
[ "CWE-787" ]
php-src
1bd103df00f49cf4d4ade2cfe3f456ac058a4eae
223,047,283,700,973,200,000,000,000,000,000,000,000
44
Fix bug #72730 - imagegammacorrect allows arbitrary write access
composite_line_22_4a4_mmx_stub (int *weights, int n_x, int n_y, guchar *dest, int dest_x, guchar *dest_end, int dest_channels, int dest_has_alpha, guchar **src, int src_channels, gboolean src_has_alpha, int x_init, int x_step, int src_width, int check_size, guint32 color1, guint32 color2) { gu...
0
[]
gdk-pixbuf
ffec86ed5010c5a2be14f47b33bcf4ed3169a199
313,068,922,421,878,260,000,000,000,000,000,000,000
26
pixops: Be more careful about integer overflow Our loader code is supposed to handle out-of-memory and overflow situations gracefully, reporting errors instead of aborting. But if you load an image at a specific size, we also execute our scaling code, which was not careful enough about overflow in some places. This c...
void rtas_call_unlocked(struct rtas_args *args, int token, int nargs, int nret, ...) { va_list list; va_start(list, nret); va_rtas_call_unlocked(args, token, nargs, nret, list); va_end(list); }
0
[ "CWE-862" ]
linux
bd59380c5ba4147dcbaad3e582b55ccfd120b764
198,271,830,041,870,600,000,000,000,000,000,000,000
8
powerpc/rtas: Restrict RTAS requests from userspace A number of userspace utilities depend on making calls to RTAS to retrieve information and update various things. The existing API through which we expose RTAS to userspace exposes more RTAS functionality than we actually need, through the sys_rtas syscall, which al...
push_args (list) WORD_LIST *list; { #if defined (ARRAY_VARS) && defined (DEBUGGER) SHELL_VAR *bash_argv_v, *bash_argc_v; ARRAY *bash_argv_a, *bash_argc_a; WORD_LIST *l; arrayind_t i; char *t; GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a); GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, ba...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
192,078,609,095,343,700,000,000,000,000,000,000,000
21
commit bash-20120224 snapshot
eat_whitespace_eos(const char *s, const char *eos) { tor_assert(s); tor_assert(eos && s <= eos); while (s < eos) { switch (*s) { case '\0': default: return s; case ' ': case '\t': case '\n': case '\r': ++s; break; case '#': ++s; while (s < eos && *s &...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
28,890,990,705,562,350,000,000,000,000,000,000,000
24
Fix assertion failure in tor_timegm. Fixes bug 6811.
int ff_h264_set_parameter_from_sps(H264Context *h) { if (h->flags & CODEC_FLAG_LOW_DELAY || (h->sps.bitstream_restriction_flag && !h->sps.num_reorder_frames)) { if (h->avctx->has_b_frames > 1 || h->delayed_pic[0]) av_log(h->avctx, AV_LOG_WARNING, "Delayed frames seen. " ...
0
[ "CWE-703" ]
FFmpeg
e8714f6f93d1a32f4e4655209960afcf4c185214
125,088,361,719,381,690,000,000,000,000,000,000,000
48
avcodec/h264: Clear delayed_pic on deallocation Fixes use of freed memory Fixes: case5_av_frame_copy_props.mp4 Found-by: Michal Zalewski <lcamtuf@coredump.cx> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
gnutls_compression_get_name (gnutls_compression_method_t algorithm) { const char *ret = NULL; /* avoid prefix */ GNUTLS_COMPRESSION_ALG_LOOP (ret = p->name + sizeof ("GNUTLS_COMP_") - 1); return ret; }
0
[ "CWE-310" ]
gnutls
34d87a7c3f12794a3ec2305cd2fdbae152bf2a76
311,112,914,018,211,280,000,000,000,000,000,000,000
9
(_gnutls_x509_oid2mac_algorithm): Don't crash trying to strcmp the NULL OID value in the hash_algorithms array, which happens when the input OID doesn't match our OIDs for SHA1, MD5, MD2 or RIPEMD160. Reported by satyakumar <satyam_kkd@hyd.hellosoft.com>.
sc_pkcs15emu_oberthur_add_data(struct sc_pkcs15_card *p15card, unsigned int file_id, unsigned int size, int private) { struct sc_context *ctx = p15card->card->ctx; struct sc_pkcs15_data_info dinfo; struct sc_pkcs15_object dobj; unsigned flags; unsigned char *info_blob = NULL, *label = NULL, *app = NULL, *oid = N...
1
[]
OpenSC
cae5c71f90cc5b364efe14040923fd5aa3b5dd90
106,353,834,855,475,820,000,000,000,000,000,000,000
104
oberthur: Handle 1B OIDs Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32807
nautilus_file_get_symbolic_link_target_path (NautilusFile *file) { if (!nautilus_file_is_symbolic_link (file)) { g_warning ("File has symlink target, but is not marked as symlink"); } return g_strdup (file->details->symlink_name); }
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
144,669,500,500,318,760,000,000,000,000,000,000,000
8
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
int ext4_convert_unwritten_extents(handle_t *handle, struct inode *inode, loff_t offset, ssize_t len) { unsigned int max_blocks; int ret = 0; int ret2 = 0; struct ext4_map_blocks map; unsigned int credits, blkbits = inode->i_blkbits; map.m_lblk = offset >> blkbits; /* * We can't just convert len to max...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
194,155,310,663,057,400,000,000,000,000,000,000,000
62
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static uint8_t msix_pending_mask(int vector) { return 1 << (vector % 8); }
0
[]
qemu
43b11a91dd861a946b231b89b7542856ade23d1b
135,504,191,577,822,450,000,000,000,000,000,000,000
4
msix: implement pba write (but read-only) qpci_msix_pending() writes on pba region, causing qemu to SEGV: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7ffff7fba8c0 (LWP 25882)] 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in () #1 0x00005555556556c5 in memor...
char *ssh_basename (const char *path) { char *new = NULL; const char *s; size_t len; if (path == NULL || *path == '\0') { return strdup("."); } len = strlen(path); /* Remove trailing slashes */ while(len > 0 && path[len - 1] == '/') --len; /* We have only slashes */ if (len == 0) { return...
0
[]
libssh
2ba1dea5493fb2f5a5be2dd263ce46ccb5f8ec76
273,936,934,086,992,940,000,000,000,000,000,000,000
39
CVE-2019-14889: misc: Add function to quote file names The added function quote file names strings to be used in a shell. Special cases are treated for the charactes '\'' and '!'. Fixes T181 Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org> (cherry pic...
mrb_f_block_given_p_m(mrb_state *mrb, mrb_value self) { mrb_callinfo *ci = &mrb->c->ci[-1]; mrb_callinfo *cibase = mrb->c->cibase; mrb_value *bp; struct RProc *p; if (ci <= cibase) { /* toplevel does not have block */ return mrb_false_value(); } p = ci->proc; /* search method/class/module proc ...
0
[ "CWE-824" ]
mruby
b64ce17852b180dfeea81cf458660be41a78974d
194,595,479,363,877,350,000,000,000,000,000,000,000
53
Should not call `initialize_copy` for `TT_ICLASS`; fix #4027 Since `TT_ICLASS` is a internal object that should never be revealed to Ruby world.
Value ExpressionDateFromString::evaluate(const Document& root, Variables* variables) const { const Value dateString = _dateString->evaluate(root, variables); Value formatValue; // Eagerly validate the format parameter, ignoring if nullish since the input string nullish // behavior takes precedence. ...
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
6,495,935,309,968,385,000,000,000,000,000,000,000
60
SERVER-49404 Enforce additional checks in $arrayToObject
static void tcp_event_data_recv(struct sock *sk, struct sk_buff *skb) { struct tcp_sock *tp = tcp_sk(sk); struct inet_connection_sock *icsk = inet_csk(sk); u32 now; inet_csk_schedule_ack(sk); tcp_measure_rcv_mss(sk, skb); tcp_rcv_rtt_measure(tp); now = tcp_jiffies32; if (!icsk->icsk_ack.ato) { /* The _fi...
0
[ "CWE-190" ]
net
3b4929f65b0d8249f19a50245cd88ed1a2f78cff
115,215,480,612,118,570,000,000,000,000,000,000,000
45
tcp: limit payload size of sacked skbs Jonathan Looney reported that TCP can trigger the following crash in tcp_shifted_skb() : BUG_ON(tcp_skb_pcount(skb) < pcount); This can happen if the remote peer has advertized the smallest MSS that linux TCP accepts : 48 An skb can hold 17 fragments, and each fragment can ho...
void LEX::restore_values_list_state() { many_values= current_select->save_many_values; insert_list= current_select->save_insert_list; }
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
68,091,318,723,627,050,000,000,000,000,000,000,000
5
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static void cap_file_free_security(struct file *file) { }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
334,893,617,906,354,900,000,000,000,000,000,000,000
3
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 compute_datarate(DataRateData *drd, int64_t count) { if (cur_time == drd->time1) return 0; return ((count - drd->count1) * 1000) / (cur_time - drd->time1); }
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
308,111,289,448,760,670,000,000,000,000,000,000,000
7
ffserver: Check chunk size Fixes out of array access Fixes: poc_ffserver.py Found-by: Paul Cher <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void subs_box_del(GF_Box *s) { GF_SubSampleInformationBox *ptr = (GF_SubSampleInformationBox *)s; if (ptr == NULL) return; while (gf_list_count(ptr->Samples)) { GF_SubSampleInfoEntry *pSamp; pSamp = (GF_SubSampleInfoEntry*)gf_list_get(ptr->Samples, 0); while (gf_list_count(pSamp->SubSamples)) { GF_SubSamp...
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
22,014,697,636,093,996,000,000,000,000,000,000,000
21
fixed #1587