func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
njs_block_type(njs_generator_block_type_t type) { switch (type) { case NJS_GENERATOR_LOOP: return "LOOP "; case NJS_GENERATOR_SWITCH: return "SWITCH"; case NJS_GENERATOR_BLOCK: return "BLOCK "; default: return "TRY "; } }
0
[ "CWE-703", "CWE-754" ]
njs
404553896792b8f5f429dc8852d15784a59d8d3e
79,628,358,480,669,690,000,000,000,000,000,000,000
13
Fixed break instruction in a try-catch block. Previously, JUMP offset for a break instruction inside a try-catch block was not set to a correct offset during code generation when a return instruction was present in inner try-catch block. The fix is to update the JUMP offset appropriately. This closes #553 issue on G...
static int do_rt_sigqueueinfo(pid_t pid, int sig, siginfo_t *info) { /* Not even root can pretend to send signals from the kernel. * Nor can they impersonate a kill()/tgkill(), which adds source info. */ if ((info->si_code >= 0 || info->si_code == SI_TKILL) && (task_pid_vnr(current) != pid)) { /* We used t...
0
[ "CWE-399" ]
linux
b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f
279,826,248,916,580,000,000,000,000,000,000,000,000
16
kernel/signal.c: stop info leak via the tkill and the tgkill syscalls This fixes a kernel memory contents leak via the tkill and tgkill syscalls for compat processes. This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field when handling signals delivered from tkill. The place of the infoleak: int ...
dissect_usb_video_colorformat(proto_tree *tree, tvbuff_t *tvb, int offset) { proto_tree_add_item(tree, hf_usb_vid_color_primaries, tvb, offset, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item(tree, hf_usb_vid_transfer_characteristics, tvb, offset+1, 1, ENC_LITTLE_ENDIAN); proto_tree_add_item(tree, hf_...
0
[ "CWE-476" ]
wireshark
2cb5985bf47bdc8bea78d28483ed224abdd33dc6
27,096,917,785,980,833,000,000,000,000,000,000,000
9
Make class "type" for USB conversations. USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match. Bug: 12356 Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e338...
static int apparmor_file_alloc_security(struct file *file) { /* freed by apparmor_file_free_security */ file->f_security = aa_alloc_file_context(GFP_KERNEL); if (!file->f_security) return -ENOMEM; return 0; }
0
[ "CWE-119", "CWE-264", "CWE-369" ]
linux
30a46a4647fd1df9cf52e43bf467f0d9265096ca
137,182,360,817,983,510,000,000,000,000,000,000,000
9
apparmor: fix oops, validate buffer size in apparmor_setprocattr() When proc_pid_attr_write() was changed to use memdup_user apparmor's (interface violating) assumption that the setprocattr buffer was always a single page was violated. The size test is not strictly speaking needed as proc_pid_attr_write() will reject...
static bool freelist_state_initialize(union freelist_init_state *state, struct kmem_cache *cachep, unsigned int count) { bool ret; unsigned int rand; /* Use best entropy available to define a random shift */ rand = get_random_int(); /* Use a random state if the pre-computed list is not available */ if (...
1
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
65,539,602,228,336,130,000,000,000,000,000,000,000
23
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
static int __ext4_get_inode_loc(struct inode *inode, struct ext4_iloc *iloc, int in_mem) { struct ext4_group_desc *gdp; struct buffer_head *bh; struct super_block *sb = inode->i_sb; ext4_fsblk_t block; int inodes_per_block, inode_offset; iloc->bh = NULL; if (!ext4_valid_inum(sb, inode->i_ino)) return -...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
268,196,574,071,773,230,000,000,000,000,000,000,000
138
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
gnutls_cipher_algorithm_t gnutls_cipher_get(gnutls_session_t session) { record_parameters_st *record_params; int ret; ret = _gnutls_epoch_get(session, EPOCH_READ_CURRENT, &record_params); if (ret < 0) return gnutls_assert_val(GNUTLS_CIPHER_NULL); return record_params->cipher->id; }
0
[ "CWE-400" ]
gnutls
1ffb827e45721ef56982d0ffd5c5de52376c428e
25,478,415,437,483,343,000,000,000,000,000,000,000
12
handshake: set a maximum number of warning messages that can be received per handshake That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost of processing.
static inline RPVector *parse_vec(RBinWasmObj *bin, ut64 bound, ParseEntryFcn parse_entry, RPVectorFree free_entry) { RBuffer *buf = bin->buf; ut32 count; if (!consume_u32_r (buf, bound, &count)) { return NULL; } RPVector *vec = r_pvector_new (free_entry); if (vec) { r_pvector_reserve (vec, count); ut32 i...
0
[ "CWE-787" ]
radare2
b4ca66f5d4363d68a6379e5706353b3bde5104a4
328,531,736,830,511,800,000,000,000,000,000,000,000
24
Fix #20336 - wasm bin parser ##crash
static gboolean io_watch_poll_prepare(GSource *source, gint *timeout_) { IOWatchPoll *iwp = io_watch_poll_from_source(source); bool now_active = iwp->fd_can_read(iwp->opaque) > 0; bool was_active = iwp->src != NULL; if (was_active == now_active) { return FAL...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
292,740,653,713,610,170,000,000,000,000,000,000,000
22
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
add_selected_from_list_view (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data) { GList **list = data; FileData *fdata; gtk_tree_model_get (model, iter, COLUMN_FILE_DATA, &fdata, -1); *list = g_list_prepend (*list, fdata); }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
158,201,848,940,248,940,000,000,000,000,000,000,000
13
libarchive: sanitize filenames before extracting
static inline void l2cap_le_sig_channel(struct l2cap_conn *conn, struct sk_buff *skb) { struct hci_conn *hcon = conn->hcon; struct l2cap_cmd_hdr *cmd; u16 len; int err; if (hcon->type != LE_LINK) goto drop; if (skb->len < L2CAP_CMD_HDR_SIZE) goto drop; cmd = (void *) skb->data; skb_pull(skb, L2CAP_C...
0
[ "CWE-787" ]
linux
e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3
202,991,656,146,654,070,000,000,000,000,000,000,000
40
Bluetooth: Properly check L2CAP config option output buffer length Validate the output buffer length for L2CAP config requests and responses to avoid overflowing the stack buffer used for building the option blocks. Cc: stable@vger.kernel.org Signed-off-by: Ben Seri <ben@armis.com> Signed-off-by: Marcel Holtmann <mar...
TEST_P(Security, BuiltinAuthenticationAndAccessAndCryptoPlugin_PermissionsEnableDiscoveryEnableAccessNone_validation_ok_enable_discovery_disable_access_none) // *INDENT-ON* { PubSubReader<HelloWorldType> reader(TEST_TOPIC_NAME); PubSubWriter<HelloWorldType> writer(TEST_TOPIC_NAME); std::string governance_fi...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
93,434,255,811,533,420,000,000,000,000,000,000,000
9
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static ssize_t auto_remove_on_show(struct device *dev, struct device_attribute *attr, char *buf) { struct device_link *link = to_devlink(dev); char *str; if (link->flags & DL_FLAG_AUTOREMOVE_SUPPLIER) str = "supplier unbind"; else if (link->flags & DL_FLAG_AUTOREMOVE_CONSUMER) str = "consumer unbind"; ...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
333,192,211,870,556,750,000,000,000,000,000,000,000
15
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static Item_cache* get_cache(THD *thd, const Item *item) { return get_cache(thd, item, item->cmp_type()); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
193,968,543,518,614,700,000,000,000,000,000,000,000
4
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
inline void Pow(const T* input1_data, const Dims<4>& input1_dims, const T* input2_data, const Dims<4>& input2_dims, T* output_data, const Dims<4>& output_dims) { Pow(DimsToShape(input1_dims), input1_data, DimsToShape(input2_dims), input2_data, DimsToShape(output_dims), output_dat...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
43,157,301,744,481,530,000,000,000,000,000,000,000
6
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
void TfLiteTensorRealloc(size_t num_bytes, TfLiteTensor* tensor) { if (tensor->allocation_type != kTfLiteDynamic && tensor->allocation_type != kTfLitePersistentRo) { return; } // TODO(b/145340303): Tensor data should be aligned. if (!tensor->data.raw) { tensor->data.raw = malloc(num_bytes); } el...
0
[ "CWE-190" ]
tensorflow
7c8cc4ec69cd348e44ad6a2699057ca88faad3e5
116,072,997,571,063,430,000,000,000,000,000,000,000
13
Fix a dangerous integer overflow and a malloc of negative size. PiperOrigin-RevId: 371254154 Change-Id: I250a98a3df26328770167025670235a963a72da0
static inline int ieee802154_match_sock(u8 *hw_addr, u16 pan_id, u16 short_addr, struct dgram_sock *ro) { if (!ro->bound) return 1; if (ro->src_addr.addr_type == IEEE802154_ADDR_LONG && !memcmp(ro->src_addr.hwaddr, hw_addr, IEEE802154_ADDR_LEN)) return 1; if (ro->src_addr.addr_type == IEEE802154_ADDR_SH...
0
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
118,085,248,869,919,540,000,000,000,000,000,000,000
17
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
long kvm_arch_dev_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg) { void __user *argp = (void __user *)arg; long r; switch (ioctl) { case KVM_GET_MSR_INDEX_LIST: { struct kvm_msr_list __user *user_msr_list = argp; struct kvm_msr_list msr_list; unsigned n; r = -EFAULT; if (copy_from_us...
0
[ "CWE-119", "CWE-703", "CWE-120" ]
linux
a08d3b3b99efd509133946056531cdf8f3a0c09b
14,202,587,724,531,713,000,000,000,000,000,000,000
69
kvm: x86: fix emulator buffer overflow (CVE-2014-0049) The problem occurs when the guest performs a pusha with the stack address pointing to an mmio address (or an invalid guest physical address) to start with, but then extending into an ordinary guest physical address. When doing repeated emulated pushes emulator_re...
Bool rfbOptOtpAuth(void) { SecTypeData *s; for (s = secTypes; s->name != NULL; s++) { if (!strcmp(&s->name[strlen(s->name) - 3], "otp") && s->enabled) return TRUE; } return FALSE; }
0
[ "CWE-787" ]
turbovnc
cea98166008301e614e0d36776bf9435a536136e
300,916,413,642,148,400,000,000,000,000,000,000,000
11
Server: Fix two issues identified by ASan 1. If the TLSPlain and X509Plain security types were both disabled, then rfbOptPamAuth() would overflow the name field in the secTypes structure when testing the "none" security type, since the name of that security type has less than five characters. This issue was ...
static void perf_event_switch(struct task_struct *task, struct task_struct *next_prev, bool sched_in) { struct perf_switch_event switch_event; /* N.B. caller checks nr_switch_events != 0 */ switch_event = (struct perf_switch_event){ .task = task, .next_prev = next_prev, .event_id = { .header = {...
0
[ "CWE-416", "CWE-362" ]
linux
12ca6ad2e3a896256f086497a7c7406a547ee373
57,754,481,850,397,830,000,000,000,000,000,000,000
25
perf: Fix race in swevent hash There's a race on CPU unplug where we free the swevent hash array while it can still have events on. This will result in a use-after-free which is BAD. Simply do not free the hash array on unplug. This leaves the thing around and no use-after-free takes place. When the last swevent die...
static inline bool nested_vmx_merge_msr_bitmap(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) { int msr; struct page *page; unsigned long *msr_bitmap_l1; unsigned long *msr_bitmap_l0 = to_vmx(vcpu)->nested.msr_bitmap; /* This shortcut is ok because we support only x2APIC MSRs so far. */ if (!nested_cp...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
29,768,296,439,688,285,000,000,000,000,000,000,000
47
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
static int k_comp(int e, int alpha, int gamma) { return ceil((alpha-e+63) * D_1_LOG2_10); }
0
[ "CWE-190" ]
mujs
25821e6d74fab5fcc200fe5e818362e03e114428
284,291,426,081,212,400,000,000,000,000,000,000,000
3
Fix 698920: Guard jsdtoa from integer overflow wreaking havoc.
xfs_itruncate_extents( struct xfs_trans **tpp, struct xfs_inode *ip, int whichfork, xfs_fsize_t new_size) { struct xfs_mount *mp = ip->i_mount; struct xfs_trans *tp = *tpp; xfs_bmap_free_t free_list; xfs_fsblock_t first_block; xfs_fileoff_t first_unmap_block; xfs_fileoff_t last_block; xfs_filblks_t u...
0
[ "CWE-19" ]
linux
fc0561cefc04e7803c0f6501ca4f310a502f65b8
230,604,154,541,378,300,000,000,000,000,000,000,000
90
xfs: optimise away log forces on timestamp updates for fdatasync xfs: timestamp updates cause excessive fdatasync log traffic Sage Weil reported that a ceph test workload was writing to the log on every fdatasync during an overwrite workload. Event tracing showed that the only metadata modification being made was the...
static double Hann(const double x, const ResizeFilter *magick_unused(resize_filter)) { /* Cosine window function: 0.5+0.5*cos(pi*x). */ const double cosine=cos((double) (MagickPI*x)); magick_unreferenced(resize_filter); return(0.5+0.5*cosine); }
0
[ "CWE-125" ]
ImageMagick
c5402b6e0fcf8b694ae2af6a6652ebb8ce0ccf46
153,968,314,379,065,940,000,000,000,000,000,000,000
11
https://github.com/ImageMagick/ImageMagick/issues/717
static ThreadId Invalid() { return ThreadId(kInvalidId); }
0
[ "CWE-20", "CWE-119" ]
node
530af9cb8e700e7596b3ec812bad123c9fa06356
275,098,090,009,089,760,000,000,000,000,000,000,000
1
v8: Interrupts must not mask stack overflow. Backport of https://codereview.chromium.org/339883002
NTSTATUS tstream_tls_params_server(TALLOC_CTX *mem_ctx, const char *dns_host_name, bool enabled, const char *key_file, const char *cert_file, const char *ca_file, const char *crl_file, const char *dhp_file, struct tstream_tls_params **_tlsp) { struct tstream_tls_...
1
[]
samba
22af043d2f20760f27150d7d469c7c7b944c6b55
306,906,282,743,807,170,000,000,000,000,000,000,000
135
CVE-2013-4476: s4:libtls: check for safe permissions of tls private key file (key.pem) If the tls key is not owned by root or has not mode 0600 samba will not start up. Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Signed-off-by: Björn Baumbach <bb@s...
flow_hash_symmetric_l3l4(const struct flow *flow, uint32_t basis, bool inc_udp_ports) { uint32_t hash = basis; /* UDP source and destination port are also taken into account. */ if (flow->dl_type == htons(ETH_TYPE_IP)) { hash = hash_add(hash, (OVS_FO...
0
[ "CWE-400" ]
ovs
48ceca0446b1c2c2c03e7551048c5b19ed23cc97
204,561,420,925,707,660,000,000,000,000,000,000,000
31
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...
static int alloc_fresh_huge_page(struct hstate *h, nodemask_t *nodes_allowed) { struct page *page; int nr_nodes, node; int ret = 0; for_each_node_mask_to_alloc(h, nr_nodes, node, nodes_allowed) { page = alloc_fresh_huge_page_node(h, node); if (page) { ret = 1; break; } } if (ret) count_vm_event(HT...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
132,652,623,102,748,870,000,000,000,000,000,000,000
21
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
ves_icall_System_Array_SetValueImpl (MonoArray *this, MonoObject *value, guint32 pos) { MonoClass *ac, *vc, *ec; gint32 esize, vsize; gpointer *ea, *va; int et, vt; guint64 u64 = 0; gint64 i64 = 0; gdouble r64 = 0; MONO_ARCH_SAVE_REGS; if (value) vc = value->vtable->klass; else vc = NULL; ac = this->...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
57,798,510,170,109,800,000,000,000,000,000,000,000
275
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
void RtmpProtocol::check_C1_Digest(const string &digest,const string &data){ auto sha256 = openssl_HMACsha256(FPKey, C1_FPKEY_SIZE, data.data(), data.size()); if (sha256 != digest) { throw std::runtime_error("digest mismatched"); } else { InfoL << "check rtmp complex handshark success!"; ...
0
[ "CWE-703" ]
ZLMediaKit
7d8b212a3c3368bc2f6507cb74664fc419eb9327
179,615,557,000,239,060,000,000,000,000,000,000,000
8
修复rtmp汇报窗口太小导致循环递归的bug:#1839
sixel_allocator_free( sixel_allocator_t /* in */ *allocator, /* allocator object */ void /* in */ *p) /* existing buffer to be freed */ { /* precondition */ assert(allocator); assert(allocator->fn_free); allocator->fn_free(p); }
0
[ "CWE-125" ]
libsixel
0b1e0b3f7b44233f84e5c9f512f8c90d6bbbe33d
138,919,985,224,302,780,000,000,000,000,000,000,000
10
Introduce SIXEL_ALLOCATE_BYTES_MAX macro and limit allocation size to 128MB(#74)
void __blkg_release_rcu(struct rcu_head *rcu_head) { struct blkcg_gq *blkg = container_of(rcu_head, struct blkcg_gq, rcu_head); /* release the blkcg and parent blkg refs this blkg has been holding */ css_put(&blkg->blkcg->css); if (blkg->parent) blkg_put(blkg->parent); wb_congested_put(blkg->wb_congested); b...
0
[ "CWE-415" ]
linux
9b54d816e00425c3a517514e0d677bb3cec49258
97,297,487,189,412,030,000,000,000,000,000,000,000
13
blkcg: fix double free of new_blkg in blkcg_init_queue If blkg_create fails, new_blkg passed as an argument will be freed by blkg_create, so there is no need to free it again. Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Jens Axboe <axboe@fb.com>
TEST_F(HttpConnectionManagerImplTest, RequestTimeoutIsDisarmedOnCompleteRequestWithData) { request_timeout_ = std::chrono::milliseconds(10); setup(false, ""); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance& data) -> Http::Status { Event::MockTimer* request_timer = setUpTimer(); EX...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
206,499,704,500,522,300,000,000,000,000,000,000,000
23
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...
inline int PacketCopyDataOffset(Packet *p, uint32_t offset, uint8_t *data, uint32_t datalen) { if (unlikely(offset + datalen > MAX_PAYLOAD_SIZE)) { /* too big */ return -1; } /* Do we have already an packet with allocated data */ if (! p->ext_pkt) { uint32_t newsize = offset + d...
0
[ "CWE-20" ]
suricata
11f3659f64a4e42e90cb3c09fcef66894205aefe
262,499,756,358,856,720,000,000,000,000,000,000,000
33
teredo: be stricter on what to consider valid teredo Invalid Teredo can lead to valid DNS traffic (or other UDP traffic) being misdetected as Teredo. This leads to false negatives in the UDP payload inspection. Make the teredo code only consider a packet teredo if the encapsulated data was decoded without any 'invali...
if (key->handle != -1) { return sp_dsp_ecc_verify_256(key->handle, hash, hashlen, key->pubkey.x, key->pubkey.y, key->pubkey.z, r, s, res, key->heap); }
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
243,154,859,634,717,440,000,000,000,000,000,000,000
4
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.
int exec_command_append(ExecCommand *c, const char *path, ...) { _cleanup_strv_free_ char **l = NULL; va_list ap; int r; assert(c); assert(path); va_start(ap, path); l = strv_new_ap(path, ap); va_end(ap); if (!l) return -ENOMEM; ...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
269,663,270,549,324,830,000,000,000,000,000,000,000
21
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
ldap_error_to_response (gint ldap_error) { if (ldap_error == LDAP_SUCCESS) return EDB_ERROR (SUCCESS); else if (ldap_error == LDAP_INVALID_DN_SYNTAX) return e_data_book_create_error (E_DATA_BOOK_STATUS_OTHER_ERROR, _("Invalid DN syntax")); else if (LDAP_NAME_ERROR (ldap_error)) return EDB_ERROR (CONTACT_NOT_FO...
0
[]
evolution-data-server
34bad61738e2127736947ac50e0c7969cc944972
295,611,928,647,182,250,000,000,000,000,000,000,000
26
Bug 796174 - strcat() considered unsafe for buffer overflow
rsvg_filter_primitive_displacement_map_free (gpointer impl) { RsvgFilterPrimitiveDisplacementMap *dmap = impl; g_string_free (dmap->in2, TRUE); rsvg_filter_primitive_free (impl); }
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
24,803,910,131,062,315,000,000,000,000,000,000,000
8
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
drill_parse_header_is_inch(gerb_file_t *fd, drill_state_t *state, gerbv_image_t *image, ssize_t file_line) { gerbv_drill_stats_t *stats = image->drill_stats; char c; dprintf(" %s(): entering\n", __FUNCTION__); if (DRILL_HEADER != state->curr_section) return 0; switch (file_check_str(fd, "...
0
[ "CWE-787" ]
gerbv
672214abb47a802fc000125996e6e0a46c623a4e
203,945,269,297,079,800,000,000,000,000,000,000,000
72
Add test to demonstrate buffer overrun
int SSL_get_fd(const SSL *s) { return (SSL_get_rfd(s)); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
71,631,560,030,828,135,000,000,000,000,000,000,000
4
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
static int usbredirparser_verify_bulk_recv_cap( struct usbredirparser *parser_pub, int send) { struct usbredirparser_priv *parser = (struct usbredirparser_priv *)parser_pub; if ((send && !usbredirparser_peer_has_cap(parser_pub, usb_redir_cap_bulk_receiv...
0
[]
usbredir
03c519ff5831ba75120e00ebebbf1d5a1f7220ab
70,623,237,537,864,040,000,000,000,000,000,000,000
15
Avoid use-after-free in serialization Serializing parsers with large amounts of buffered write data (e.g. in case of a slow or blocked write destination) would cause "serialize_data" to reallocate the state buffer whose default size is 64kB (USBREDIRPARSER_SERIALIZE_BUF_SIZE). The pointer to the position for the write...
static int selinux_sb_clone_mnt_opts(const struct super_block *oldsb, struct super_block *newsb, unsigned long kern_flags, unsigned long *set_kern_flags) { int rc = 0; const struct superblock_security_struct *oldsbsec = selinux_superblock(oldsb); struct superblock_security_struct *newsbsec = sel...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
257,323,809,014,435,240,000,000,000,000,000,000,000
81
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
static int make_callable_ex(pdo_stmt_t *stmt, zval *callable, zend_fcall_info * fci, zend_fcall_info_cache * fcc, int num_args TSRMLS_DC) /* {{{ */ { char *is_callable_error = NULL; if (zend_fcall_info_init(callable, 0, fci, fcc, NULL, &is_callable_error TSRMLS_CC) == FAILURE) { if (is_callable_error) { pdo_ra...
0
[ "CWE-476" ]
php-src
6045de69c7dedcba3eadf7c4bba424b19c81d00d
167,063,689,166,217,800,000,000,000,000,000,000,000
23
Fix bug #73331 - do not try to serialize/unserialize objects wddx can not handle Proper soltion would be to call serialize/unserialize and deal with the result, but this requires more work that should be done by wddx maintainer (not me).
int cil_resolve_selinuxuser(struct cil_tree_node *current, void *extra_args) { struct cil_selinuxuser *selinuxuser = current->data; struct cil_symtab_datum *user_datum = NULL; struct cil_symtab_datum *lvlrange_datum = NULL; struct cil_tree_node *user_node = NULL; int rc = SEPOL_ERR; rc = cil_resolve_name(current...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
58,658,542,505,265,140,000,000,000,000,000,000,000
48
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
init_root_domain_thread (MonoInternalThread *thread, MonoThread *candidate) { MonoDomain *domain = mono_get_root_domain (); if (!candidate || candidate->obj.vtable->domain != domain) candidate = new_thread_with_internal (domain, thread); set_current_thread_for_domain (domain, thread, candidate); g_assert (!threa...
0
[ "CWE-399", "CWE-264" ]
mono
722f9890f09aadfc37ae479e7d946d5fc5ef7b91
90,784,278,367,558,920,000,000,000,000,000,000,000
10
Fix access to freed members of a dead thread * threads.c: Fix access to freed members of a dead thread. Found and fixed by Rodrigo Kumpera <rkumpera@novell.com> Ref: CVE-2011-0992
static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); unsigned long debugctlmsr, cr4; /* Record the guest's net vcpu time for enforced NMI injections. */ if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked)) vmx->entry_time = ktime_get(); /* Don't enter VMX...
0
[ "CWE-399" ]
linux
54a20552e1eae07aa240fa370a0293e006b5faed
196,690,700,571,569,830,000,000,000,000,000,000,000
197
KVM: x86: work around infinite loop in microcode when #AC is delivered It was found that a guest can DoS a host by triggering an infinite stream of "alignment check" (#AC) exceptions. This causes the microcode to enter an infinite loop where the core never receives another interrupt. The host kernel panics pretty qu...
hrtimer_start(struct hrtimer *timer, ktime_t tim, const enum hrtimer_mode mode) { struct hrtimer_clock_base *base, *new_base; unsigned long flags; int ret; base = lock_hrtimer_base(timer, &flags); /* Remove an active timer from the queue: */ ret = remove_hrtimer(timer, base); /* Switch the timer base, if nece...
0
[ "CWE-189" ]
linux-2.6
13788ccc41ceea5893f9c747c59bc0b28f2416c2
71,188,575,773,950,225,000,000,000,000,000,000,000
37
[PATCH] hrtimer: prevent overrun DoS in hrtimer_forward() hrtimer_forward() does not check for the possible overflow of timer->expires. This can happen on 64 bit machines with large interval values and results currently in an endless loop in the softirq because the expiry value becomes negative and therefor the timer...
static inline int u24(byte *p) { return (p[0] << 16) | (p[1] << 8) | p[2]; }
0
[ "CWE-125" ]
ghostpdl
d2ab84732936b6e7e5a461dc94344902965e9a06
306,388,473,170,239,500,000,000,000,000,000,000,000
4
Bug 698025: validate offsets reading TTF name table in xps
span_renderer_fini (cairo_abstract_span_renderer_t *_r, cairo_int_status_t status) { cairo_image_span_renderer_t *r = (cairo_image_span_renderer_t *) _r; TRACE ((stderr, "%s\n", __FUNCTION__)); if (likely (status == CAIRO_INT_STATUS_SUCCESS && r->bpp == 0)) { const cairo_composite_rectangles_t *com...
0
[ "CWE-787" ]
cairo
c986a7310bb06582b7d8a566d5f007ba4e5e75bf
78,607,634,416,812,080,000,000,000,000,000,000,000
29
image: Enable inplace compositing with opacities for general routines On a SNB i5-2500: Speedups ======== firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup ocitysmap 485.64 -> 431.94: 1.12x speedup Slowdowns ===...
char *full_fname(const char *fn) { static char *result = NULL; char *m1, *m2, *m3; char *p1, *p2; if (result) free(result); if (*fn == '/') p1 = p2 = ""; else { p1 = curr_dir + module_dirlen; for (p2 = p1; *p2 == '/'; p2++) {} if (*p2) p2 = "/"; } if (module_id >= 0) { m1 = " (in "; m2 = lp_n...
0
[ "CWE-59" ]
rsync
4cad402ea8a91031f86c53961d78bb7f4f174790
38,145,224,569,791,200,000,000,000,000,000,000,000
29
Receiver now rejects invalid filenames in filelist. If the receiver gets a filename with a leading slash (w/o --relative) and/or a filename with an embedded ".." dir in the path, it dies with an error (rather than continuing). Those invalid paths should never happen in reality, so just reject someone trying to pull a ...
TiledInputFile::dataWindowForTile (int dx, int dy, int lx, int ly) const { try { if (!isValidTile (dx, dy, lx, ly)) throw IEX_NAMESPACE::ArgExc ("Arguments not in valid range."); return OPENEXR_IMF_INTERNAL_NAMESPACE::dataWindowForTile ( _data->tileDesc, _data->min...
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
217,417,403,483,073,220,000,000,000,000,000,000,000
20
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
build_object (GoaProvider *provider, GoaObjectSkeleton *object, GKeyFile *key_file, const gchar *group, GDBusConnection *connection, gboolean just_added, GError **error) { GoaAc...
0
[ "CWE-310" ]
gnome-online-accounts
ecad8142e9ac519b9fc74b96dcb5531052bbffe1
195,398,530,000,458,860,000,000,000,000,000,000,000
158
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
TEST(ExpressionStrLenCP, ComputesLengthOfStringWithNullAtEnd) { assertExpectedResults("$strLenCP", {{{Value("abc\0"_sd)}, Value(4)}}); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
28,905,127,228,935,250,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static int ntop_get_interface_hosts(lua_State* vm, LocationPolicy location) { NetworkInterface *ntop_interface = getCurrentInterface(vm); bool show_details = true; char *sortColumn = (char*)"column_ip", *country = NULL, *os_filter = NULL, *mac_filter = NULL; bool a2zSortOrder = true; u_int16_t vlan_filter, *...
0
[ "CWE-284", "CWE-352" ]
ntopng
f91fbe3d94c8346884271838ae3406ae633f6f15
128,977,288,932,476,500,000,000,000,000,000,000,000
35
Check for presence of crsf in admin scripts
test_if_cheaper_ordering(const JOIN_TAB *tab, ORDER *order, TABLE *table, key_map usable_keys, int ref_key, ha_rows select_limit_arg, int *new_key, int *new_key_direction, ha_rows *new_select_limit, uint *new_used_key_p...
0
[ "CWE-89" ]
server
5ba77222e9fe7af8ff403816b5338b18b342053c
253,031,158,977,151,000,000,000,000,000,000,000,000
280
MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view if the view has algorithm=temptable it is not updatable, so DEFAULT() for its fields is meaningless, and thus it's NULL or 0/'' for NOT NULL columns.
TEST(LengthFieldFrameDecoder, StripPrePostHeaderFrameInclHeader) { auto pipeline = Pipeline<IOBufQueue&, std::unique_ptr<IOBuf>>::create(); int called = 0; (*pipeline) .addBack(LengthFieldBasedFrameDecoder(2, 10, 2, -2, 4)) .addBack(test::FrameTester([&](std::unique_ptr<IOBuf> buf) { auto sz = bu...
0
[ "CWE-119", "CWE-787" ]
wangle
5b3bceca875e4ea4ed9d14c20b20ce46c92c13c6
65,627,431,402,929,340,000,000,000,000,000,000,000
30
Peek for \n in LineBasedFrameDecoder. Summary: Previously this could underflow if there was not a following \n. CVE-2019-3563 Reviewed By: siyengar Differential Revision: D14935715 fbshipit-source-id: 25c3eecf373f89efa1232456aeeb092f13b7fa06
aclitemout(PG_FUNCTION_ARGS) { AclItem *aip = PG_GETARG_ACLITEM_P(0); char *p; char *out; HeapTuple htup; unsigned i; out = palloc(strlen("=/") + 2 * N_ACL_RIGHTS + 2 * (2 * NAMEDATALEN + 2) + 1); p = out; *p = '\0'; if (aip->ai_grantee != ACL_ID_PUBLIC) { htup = SearchSysCache1(A...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
91,401,396,458,183,210,000,000,000,000,000,000,000
60
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...
TEST_F(QuicUnencryptedServerTransportTest, FirstPacketProcessedCallback) { getFakeHandshakeLayer()->allowZeroRttKeys(); EXPECT_CALL(connCallback, onFirstPeerPacketProcessed()).Times(1); recvClientHello(); loopForWrites(); AckBlocks acks; acks.insert(0); auto aead = getInitialCipher(); auto headerCipher ...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
298,846,480,881,963,170,000,000,000,000,000,000,000
21
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
rend_parse_introduction_points(rend_service_descriptor_t *parsed, const char *intro_points_encoded, size_t intro_points_encoded_size) { const char *current_ipo, *end_of_intro_points; smartlist_t *tokens; directory_token_t *tok; rend_intro_point_t *in...
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
295,348,384,027,096,900,000,000,000,000,000,000,000
126
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
Config::WeightedClusterEntry::WeightedClusterEntry( const Config& parent, const envoy::extensions::filters::network::tcp_proxy::v3::TcpProxy:: WeightedCluster::ClusterWeight& config) : parent_(parent), cluster_name_(config.name()), cluster_weight_(config.weight()) { if (config.ha...
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
66,606,675,178,624,890,000,000,000,000,000,000,000
18
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
nfs4_find_client_sessionid(struct net *net, const struct sockaddr *addr, struct nfs4_sessionid *sid, u32 minorversion) { struct nfs_client *clp; struct nfs_net *nn = net_generic(net, nfs_net_id); spin_lock(&nn->nfs_client_lock); list_for_each_entry(clp, &nn->nfs_client_list, cl_share_link) { if (!nfs4_cb_m...
0
[ "CWE-703" ]
linux
dd99e9f98fbf423ff6d365b37a98e8879170f17c
62,295,332,169,746,670,000,000,000,000,000,000,000
26
NFSv4: Initialise connection to the server in nfs4_alloc_client() Set up the connection to the NFSv4 server in nfs4_alloc_client(), before we've added the struct nfs_client to the net-namespace's nfs_client_list so that a downed server won't cause other mounts to hang in the trunking detection code. Reported-by: Mich...
_asn1_get_time_der (const unsigned char *der, int der_len, int *ret_len, char *str, int str_size) { int len_len, str_len; if (der_len <= 0 || str == NULL) return ASN1_DER_ERROR; str_len = asn1_get_length_der (der, der_len, &len_len); if (str_len <= 0 || str_size < str_len) return ASN1_DER_ERROR;...
0
[]
libtasn1
51612fca32dda445056ca9a7533bae258acd3ecb
68,277,054,056,425,725,000,000,000,000,000,000,000
18
check for zero size in time and object ids.
static inline bool is_base64(unsigned char c) { return (isalnum(c) || (c == '+') || (c == '/')); }
0
[ "CWE-20" ]
tinygltf
52ff00a38447f06a17eab1caa2cf0730a119c751
238,297,595,809,150,340,000,000,000,000,000,000,000
3
Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`).
int vp8_post_proc_frame(VP8_COMMON *oci, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *ppflags) { int q = oci->filter_level * 10 / 6; int flags = ppflags->post_proc_flag; int deblock_level = ppflags->deblocking_level; int noise_level = ppflags->noise_level; if (!oci->frame_to_show) return ...
0
[ "CWE-20" ]
libvpx
52add5896661d186dec284ed646a4b33b607d2c7
171,906,525,104,444,400,000,000,000,000,000,000,000
117
VP8: Fix use-after-free in postproc. The pointer in vp8 postproc refers to show_frame_mi which is only updated on show frame. However, when there is a no-show frame which also changes the size (thus new frame buffers allocated), show_frame_mi is not updated with new frame buffer memory. Change the pointer in postproc...
GF_Err gf_isom_truehd_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 StreamDescriptionIndex, u32 *format_info, u32 *peak_data_rate) { GF_TrackBox *trak; GF_MPEGAudioSampleEntryBox *entry; trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !StreamDescriptionIndex) return GF_BAD_PARAM; e...
0
[ "CWE-476", "CWE-401" ]
gpac
328c6d682698fdb9878dbb4f282963d42c538c01
138,494,702,351,549,150,000,000,000,000,000,000,000
16
fixed #1756
static void __unix_remove_socket(struct sock *sk) { sk_del_node_init(sk); }
0
[]
linux-2.6
6209344f5a3795d34b7f2c0061f49802283b6bdd
175,771,693,388,606,060,000,000,000,000,000,000,000
4
net: unix: fix inflight counting bug in garbage collector Previously I assumed that the receive queues of candidates don't change during the GC. This is only half true, nothing can be received from the queues (see comment in unix_gc()), but buffers could be added through the other half of the socket pair, which may s...
pipe_write(struct kiocb *iocb, struct iov_iter *from) { struct file *filp = iocb->ki_filp; struct pipe_inode_info *pipe = filp->private_data; ssize_t ret = 0; int do_wakeup = 0; size_t total_len = iov_iter_count(from); ssize_t chars; /* Null write succeeds. */ if (unlikely(total_len == 0)) return 0; __pipe...
0
[ "CWE-399" ]
linux
759c01142a5d0f364a462346168a56de28a80f52
169,063,989,323,754,050,000,000,000,000,000,000,000
136
pipe: limit the per-user amount of pages allocated in pipes On no-so-small systems, it is possible for a single process to cause an OOM condition by filling large pipes with data that are never read. A typical process filling 4000 pipes with 1 MB of data will use 4 GB of memory. On small systems it may be tricky to se...
static int cpia2_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f) { struct camera_data *cam = video_drvdata(file); f->fmt.pix.width = cam->width; f->fmt.pix.height = cam->height; f->fmt.pix.pixelformat = cam->pixelformat; f->fmt.pix.field = V4L2_FIELD_NONE; f->fmt.pix.bytesperline = 0; f->...
0
[ "CWE-416" ]
linux
dea37a97265588da604c6ba80160a287b72c7bfd
212,911,909,860,948,000,000,000,000,000,000,000,000
16
media: cpia2: Fix use-after-free in cpia2_exit Syzkaller report this: BUG: KASAN: use-after-free in sysfs_remove_file_ns+0x5f/0x70 fs/sysfs/file.c:468 Read of size 8 at addr ffff8881f59a6b70 by task syz-executor.0/8363 CPU: 0 PID: 8363 Comm: syz-executor.0 Not tainted 5.0.0-rc8+ #3 Hardware name: QEMU Standard PC (i...
static int ext4_ext_fiemap_cb(struct inode *inode, struct ext4_ext_path *path, struct ext4_ext_cache *newex, struct ext4_extent *ex, void *data) { struct fiemap_extent_info *fieinfo = data; unsigned char blksize_bits = inode->i_sb->s_blocksize_bits; __u64 logical; __u64 physical; __u64 length; _...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
92,520,414,816,126,780,000,000,000,000,000,000,000
72
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
gc_mark_gray_list(mrb_state *mrb, mrb_gc *gc) { while (gc->gray_list) { if (is_gray(gc->gray_list)) gc_mark_children(mrb, gc, gc->gray_list); else gc->gray_list = gc->gray_list->gcnext; } }
0
[ "CWE-415" ]
mruby
97319697c8f9f6ff27b32589947e1918e3015503
141,060,422,086,697,430,000,000,000,000,000,000,000
8
Cancel 9cdf439 Should not free the pointer in `realloc` since it can cause use-after-free problem.
is_window_local_option(int opt_idx) { return options[opt_idx].var == VAR_WIN; }
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
2,869,457,340,712,041,400,000,000,000,000,000,000
4
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
static int get_target_version(struct file *filp, struct dm_ioctl *param, size_t param_size) { return __list_versions(param, param_size, param->name); }
0
[ "CWE-787" ]
linux
4edbe1d7bcffcd6269f3b5eb63f710393ff2ec7a
37,356,517,143,544,630,000,000,000,000,000,000,000
4
dm ioctl: fix out of bounds array access when no devices If there are not any dm devices, we need to zero the "dev" argument in the first structure dm_name_list. However, this can cause out of bounds write, because the "needed" variable is zero and len may be less than eight. Fix this bug by reporting DM_BUFFER_FULL_...
void HeaderMapImpl::addViaMove(HeaderString&& key, HeaderString&& value) { // If this is an inline header, we can't addViaMove, because we'll overwrite // the existing value. auto* entry = getExistingInline(key.getStringView()); if (entry != nullptr) { const uint64_t added_size = appendToHeader(entry->value...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
191,477,461,308,138,420,000,000,000,000,000,000,000
13
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
Item_cache_temporal::Item_cache_temporal(THD *thd, enum_field_types field_type_arg): Item_cache_int(thd, field_type_arg) { if (mysql_type_to_time_type(Item_cache_temporal::field_type()) == MYSQL_TIMESTAMP_ERROR) set_handler_by_field_type(MYS...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
117,441,376,727,051,970,000,000,000,000,000,000,000
8
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
static bool disconnected_whitelist_entries(struct hci_dev *hdev) { struct bdaddr_list *b; list_for_each_entry(b, &hdev->whitelist, list) { struct hci_conn *conn; conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &b->bdaddr); if (!conn) return true; if (conn->state != BT_CONNECTED && conn->state != BT_CONFI...
0
[ "CWE-362" ]
linux
e2cb6b891ad2b8caa9131e3be70f45243df82a80
258,985,222,302,500,880,000,000,000,000,000,000,000
17
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...
static BROTLI_INLINE void BrotliUnalignedWrite64(void* p, uint64_t v) { memcpy(p, &v, sizeof v); }
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
315,112,362,131,508,620,000,000,000,000,000,000,000
3
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
static void cli_full_connection_done(struct tevent_req *subreq) { struct tevent_req *req = tevent_req_callback_data( subreq, struct tevent_req); NTSTATUS status; status = cli_tree_connect_recv(subreq); TALLOC_FREE(subreq); if (tevent_req_nterror(req, status)) { return; } tevent_req_done(req); }
0
[ "CWE-94" ]
samba
94295b7aa22d2544af5323bca70d3dcb97fd7c64
102,932,507,166,658,630,000,000,000,000,000,000,000
14
CVE-2016-2019: s3:libsmb: add comment regarding smbXcli_session_is_guest() with mandatory signing BUG: https://bugzilla.samba.org/show_bug.cgi?id=11860 Signed-off-by: Stefan Metzmacher <metze@samba.org>
extension_info_cancel (NautilusDirectory *directory) { if (directory->details->extension_info_in_progress != NULL) { if (directory->details->extension_info_idle) { g_source_remove (directory->details->extension_info_idle); } else { nautilus_info_provider_cancel_update (directory->details->extension_info...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
274,803,958,388,699,400,000,000,000,000,000,000,000
19
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static void VirtIONetRelease(PARANDIS_ADAPTER *pContext) { BOOLEAN b; ULONG i; DEBUG_ENTRY(0); /* list NetReceiveBuffersWaiting must be free */ for (i = 0; i < ARRAYSIZE(pContext->ReceiveQueues); i++) { pRxNetDescriptor pBufferDescriptor; while (NULL != (pBufferDescriptor = Re...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
309,661,723,128,044,000,000,000,000,000,000,000,000
55
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static void nf_ct_frag6_expire(unsigned long data) { struct frag_queue *fq; struct net *net; fq = container_of((struct inet_frag_queue *)data, struct frag_queue, q); net = container_of(fq->q.net, struct net, nf_frag.frags); ip6_expire_frag_queue(net, fq, &nf_frags); }
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
205,876,914,341,535,330,000,000,000,000,000,000,000
10
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...
R_API char *r_bin_java_get_item_desc_from_cp_item_list(RList *cp_list, RBinJavaCPTypeObj *obj, int depth) { /* Given a constant pool object FieldRef, MethodRef, or InterfaceMethodRef return the actual descriptor string. @rvalue ut8* (user frees) or NULL */ if (!obj || !cp_list || depth < 0) { return NULL; } s...
0
[ "CWE-125" ]
radare2
0927ed3ae99444e7b47b84e43118deb10fe37529
227,265,448,365,020,700,000,000,000,000,000,000,000
26
Fix oobread crash in java parser ##crash * Reported by @bet4it via @huntrdev * BountyID: 229a2e0d-9e5c-402f-9a24-57fa2eb1aaa7 * Reproducer: poc4java
void AV1_RewriteESDescriptorEx(GF_MPEGVisualSampleEntryBox *av1, GF_MediaBox *mdia) { GF_BitRateBox *btrt = gf_isom_sample_entry_get_bitrate((GF_SampleEntryBox *)av1, GF_FALSE); if (av1->emul_esd) gf_odf_desc_del((GF_Descriptor *)av1->emul_esd); av1->emul_esd = gf_odf_desc_esd_new(2); av1->emul_esd->decoderConfig-...
1
[ "CWE-476" ]
gpac
b2eab95e07cb5819375a50358d4806a8813b6e50
26,677,708,125,559,030,000,000,000,000,000,000,000
22
fixed #1738
static int cm_rtu_handler(struct cm_work *work) { struct cm_id_private *cm_id_priv; struct cm_rtu_msg *rtu_msg; int ret; rtu_msg = (struct cm_rtu_msg *)work->mad_recv_wc->recv_buf.mad; cm_id_priv = cm_acquire_id(rtu_msg->remote_comm_id, rtu_msg->local_comm_id); if (!cm_id_priv) return -EINVAL; work->c...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
118,879,586,598,905,470,000,000,000,000,000,000,000
39
IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler The code that resolves the passive side source MAC within the rdma_cm connection request handler was both redundant and buggy, so remove it. It was redundant since later, when an RC QP is modified to RTR state, the resolution will take place in th...
ExprMatchTest() : _expCtx(new ExpressionContextForTest()) {}
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
288,706,472,175,858,620,000,000,000,000,000,000,000
1
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
static int selinux_task_getscheduler(struct task_struct *p) { return current_has_perm(p, PROCESS__GETSCHED); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
287,859,421,750,704,100,000,000,000,000,000,000,000
4
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...
PHPAPI ZEND_COLD void php_error_docref0(const char *docref, int type, const char *format, ...) { va_list args; va_start(args, format); php_verror(docref, "", type, format, args); va_end(args); }
0
[]
php-src
9a07245b728714de09361ea16b9c6fcf70cb5685
274,978,220,526,900,130,000,000,000,000,000,000,000
8
Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash
StreamListener::~StreamListener() { if (stream_ != nullptr) stream_->RemoveStreamListener(this); }
0
[ "CWE-416" ]
node
4f8772f9b731118628256189b73cd202149bbd97
193,940,499,036,447,670,000,000,000,000,000,000,000
4
src: retain pointers to WriteWrap/ShutdownWrap Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/...
virtual void ms_fast_preprocess(Message *m) {}
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
147,208,992,118,580,110,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 ...
static int do_cgroup_get(const char *cgroup_path, const char *sub_filename, char *value, size_t len) { const char *parts[3] = { cgroup_path, sub_filename, NULL }; char *filename; int ret, saved_errno; filename = lxc_string_join("/", parts, false); if (!filename) return -1; ret = lxc_read_from_file(...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
57,765,451,055,290,030,000,000,000,000,000,000,000
21
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static int rfcomm_get_dev_list(void __user *arg) { struct rfcomm_dev *dev; struct rfcomm_dev_list_req *dl; struct rfcomm_dev_info *di; int n = 0, size, err; u16 dev_num; BT_DBG(""); if (get_user(dev_num, (u16 __user *) arg)) return -EFAULT; if (!dev_num || dev_num > (PAGE_SIZE * 4) / sizeof(*di)) return ...
0
[ "CWE-200" ]
linux
f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a
168,980,827,765,376,610,000,000,000,000,000,000,000
49
Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST) The RFCOMM code fails to initialize the two padding bytes of struct rfcomm_dev_list_req inserted for alignment before copying it to userland. Additionally there are two padding bytes in each instance of struct rfcomm_dev_info. The ioctl() that for disclosure...
ciConstant ciEnv::get_constant_by_index_impl(constantPoolHandle cpool, int pool_index, int cache_index, ciInstanceKlass* accessor) { EXCEPTION_CONTEXT; int index = pool_index; if (cache_index >= 0) { assert(index < 0, "o...
0
[]
jdk8u
1dafef08cc922ee85a8e216387100dc681a5484d
212,562,859,574,027,000,000,000,000,000,000,000,000
80
8281859: Improve class compilation Reviewed-by: andrew Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
has_column_privilege_name_id_attnum(PG_FUNCTION_ARGS) { Name username = PG_GETARG_NAME(0); Oid tableoid = PG_GETARG_OID(1); AttrNumber colattnum = PG_GETARG_INT16(2); text *priv_type_text = PG_GETARG_TEXT_P(3); Oid roleid; AclMode mode; int privresult; roleid = get_role_oid_or_public(NameStr(*userna...
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
56,945,794,360,422,900,000,000,000,000,000,000,000
18
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...
SWFShape_setLineStyle_internal(SWFShape shape, unsigned short width, byte r, byte g, byte b, byte a) { int line; if ( shape->isEnded ) return; for ( line=0; line<shape->nLines; ++line ) { if ( SWFLineStyle_equals(shape->lines[line], width, r, g, b, a, 0) ) break; } if ( line == ...
0
[ "CWE-20", "CWE-476" ]
libming
6e76e8c71cb51c8ba0aa9737a636b9ac3029887f
203,614,836,395,317,360,000,000,000,000,000,000,000
21
SWFShape_setLeftFillStyle: prevent fill overflow
static void __update_rq_clock(struct rq *rq) { u64 prev_raw = rq->prev_clock_raw; u64 now = sched_clock(); s64 delta = now - prev_raw; u64 clock = rq->clock; #ifdef CONFIG_SCHED_DEBUG WARN_ON_ONCE(cpu_of(rq) != smp_processor_id()); #endif /* * Protect against sched_clock() occasionally going backwards: */ i...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
254,862,540,538,729,000,000,000,000,000,000,000,000
39
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
gdm_session_worker_watch_child (GdmSessionWorker *worker) { g_debug ("GdmSession worker: watching pid %d", worker->priv->child_pid); worker->priv->child_watch_id = g_child_watch_add (worker->priv->child_pid, (GChildWatchFunc)session_worker_child_...
0
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
184,168,643,116,661,420,000,000,000,000,000,000,000
8
session-worker: Don't switch back VTs until session is fully exited There's a race condition on shutdown where the session worker is switching VTs back to the initial VT at the same time as the session exit is being processed. This means that manager may try to start a login screen (because of the VT switch) when aut...
static int execute(struct sockaddr *addr) { static char line[1000]; int pktlen, len, i; if (addr) { char addrbuf[256] = ""; int port = -1; if (addr->sa_family == AF_INET) { struct sockaddr_in *sin_addr = (void *) addr; inet_ntop(addr->sa_family, &sin_addr->sin_addr, addrbuf, sizeof(addrbuf)); port =...
1
[]
git
73bb33a94ec67a53e7d805b12ad9264fa25f4f8d
167,556,915,230,880,960,000,000,000,000,000,000,000
72
daemon: Strictly parse the "extra arg" part of the command Since 1.4.4.5 (49ba83fb67 "Add virtualization support to git-daemon") git daemon enters an infinite loop and never terminates if a client hides any extra arguments in the initial request line which is not exactly "\0host=blah\0". Since that change, a client m...
size_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect) { return _get_chars(screen, 1, str, len, rect); }
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
319,029,035,588,556,330,000,000,000,000,000,000,000
4
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static int uvesafb_probe(struct platform_device *dev) { struct fb_info *info; struct vbe_mode_ib *mode = NULL; struct uvesafb_par *par; int err = 0, i; info = framebuffer_alloc(sizeof(*par) + sizeof(u32) * 256, &dev->dev); if (!info) return -ENOMEM; par = info->par; err = uvesafb_vbe_init(info); if (err) ...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
208,064,175,202,548,530,000,000,000,000,000,000,000
96
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
static int sev_receive_finish(struct kvm *kvm, struct kvm_sev_cmd *argp) { struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info; struct sev_data_receive_finish data; if (!sev_guest(kvm)) return -ENOTTY; data.handle = sev->handle; return sev_issue_cmd(kvm, SEV_CMD_RECEIVE_FINISH, &data, &argp->error); }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
31,599,833,030,237,940,000,000,000,000,000,000,000
11
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...
void SdamServerSelector::_getCandidateServers(std::vector<ServerDescriptionPtr>* result, const TopologyDescriptionPtr topologyDescription, const ReadPreferenceSetting& criteria) { // when querying the primary we don't need t...
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
239,670,115,127,374,400,000,000,000,000,000,000,000
91
SERVER-50170 fix max staleness read preference parameter for server selection