func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
BasicWriter &operator<<(char value) { buffer_.push_back(value); return *this; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
174,159,489,359,749,760,000,000,000,000,000,000,000
4
Fix segfault on complex pointer formatting (#642)
void rds_wake_sk_sleep(struct rds_sock *rs) { unsigned long flags; read_lock_irqsave(&rs->rs_recv_lock, flags); __rds_wake_sk_sleep(rds_rs_to_sk(rs)); read_unlock_irqrestore(&rs->rs_recv_lock, flags); }
0
[ "CWE-787" ]
linux
780e982905bef61d13496d9af5310bf4af3a64d3
117,980,289,796,542,200,000,000,000,000,000,000,000
8
RDS: validate the requested traces user input against max supported Larger than supported value can lead to array read/write overflow. Reported-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
xfs_inode_ag_walk_grab( struct xfs_inode *ip, int flags) { struct inode *inode = VFS_I(ip); bool newinos = !!(flags & XFS_AGITER_INEW_WAIT); ASSERT(rcu_read_lock_held()); /* * check for stale RCU freed inode * * If the inode has been reallocated, it doesn't matter if it's not in * the AG we are wal...
0
[ "CWE-476" ]
linux
afca6c5b2595fc44383919fba740c194b0b76aff
169,859,838,599,628,020,000,000,000,000,000,000,000
43
xfs: validate cached inodes are free when allocated A recent fuzzed filesystem image cached random dcache corruption when the reproducer was run. This often showed up as panics in lookup_slow() on a null inode->i_ops pointer when doing pathwalks. BUG: unable to handle kernel NULL pointer dereference at 00000000000000...
INST_HANDLER (spm) { // SPM Z+ ut64 spmcsr; // read SPM Control Register (SPMCR) r_anal_esil_reg_read (anal->esil, "spmcsr", &spmcsr, NULL); // clear SPMCSR ESIL_A ("0x7c,spmcsr,&=,"); // decide action depending on the old value of SPMCSR switch (spmcsr & 0x7f) { case 0x03: // PAGE ERASE // invoke SPM_CL...
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
155,326,726,084,858,460,000,000,000,000,000,000,000
40
Fix crash in anal.avr
void ha_partition::release_auto_increment() { DBUG_ENTER("ha_partition::release_auto_increment"); if (table->s->next_number_keypart) { for (uint i= 0; i < m_tot_parts; i++) m_file[i]->ha_release_auto_increment(); } else if (next_insert_id) { ulonglong next_auto_inc_val; lock_auto_incremen...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
334,086,517,636,375,900,000,000,000,000,000,000,000
44
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static OPJ_BOOL opj_j2k_write_sot(opj_j2k_t *p_j2k, OPJ_BYTE * p_data, OPJ_UINT32 * p_data_written, const opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
58,369,328,727,972,650,000,000,000,000,000,000,000
53
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static int posix_cpu_clock_get(const clockid_t which_clock, struct timespec64 *tp) { const pid_t pid = CPUCLOCK_PID(which_clock); int err = -EINVAL; if (pid == 0) { /* * Special case constant value for our own clocks. * We don't have to do any lookup to find ourselves. */ err = posix_cpu_clock_get_task...
0
[ "CWE-190" ]
linux
78c9c4dfbf8c04883941445a195276bb4bb92c76
71,290,548,450,087,510,000,000,000,000,000,000,000
26
posix-timers: Sanitize overrun handling The posix timer overrun handling is broken because the forwarding functions can return a huge number of overruns which does not fit in an int. As a consequence timer_getoverrun(2) and siginfo::si_overrun can turn into random number generators. The k_clock::timer_forward() callb...
void kvm_ioapic_reset(struct kvm_ioapic *ioapic) { int i; for (i = 0; i < IOAPIC_NUM_PINS; i++) ioapic->redirtbl[i].fields.mask = 1; ioapic->base_address = IOAPIC_DEFAULT_BASE_ADDRESS; ioapic->ioregsel = 0; ioapic->irr = 0; ioapic->id = 0; update_handled_vectors(ioapic); }
0
[ "CWE-20" ]
kvm
a2c118bfab8bc6b8bb213abfc35201e441693d55
160,620,087,376,532,980,000,000,000,000,000,000,000
12
KVM: Fix bounds checking in ioapic indirect register reads (CVE-2013-1798) If the guest specifies a IOAPIC_REG_SELECT with an invalid value and follows that with a read of the IOAPIC_REG_WINDOW KVM does not properly validate that request. ioapic_read_indirect contains an ASSERT(redir_index < IOAPIC_NUM_PINS), but the...
bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table, SQL_SELECT *select, SORT_INFO *filesort, int use_record_cache, bool print_error, bool disable_rr_cache) { IO_CACHE *tempfile; SORT_ADDON_FIELD *addon_field= filesort ? filesort->addon_field :...
0
[]
server
1b8bb44106f528f742faa19d23bd6e822be04f39
135,238,532,333,325,230,000,000,000,000,000,000,000
135
MDEV-26351 segfault - (MARIA_HA *) 0x0 in ha_maria::extra use the correct check. before invoking handler methods we need to know that the table was opened, not only created.
static void flat_print_str(WriterContext *wctx, const char *key, const char *value) { FlatContext *flat = wctx->priv; AVBPrint buf; printf("%s", wctx->section_pbuf[wctx->level].str); av_bprint_init(&buf, 1, AV_BPRINT_SIZE_UNLIMITED); printf("%s=", flat_escape_key_str(&buf, key, flat->sep)); av_...
0
[ "CWE-476" ]
FFmpeg
837cb4325b712ff1aab531bf41668933f61d75d2
181,545,842,968,407,170,000,000,000,000,000,000,000
12
ffprobe: Fix null pointer dereference with color primaries Found-by: AD-lab of venustech Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
int read_print_config_dir(void) { return 0; }
0
[ "CWE-787" ]
123elf
92738c435690ae467ecc1f99d2bcea56f198205a
328,455,766,165,197,540,000,000,000,000,000,000,000
4
Reimplementation of function at 0x80bb148 that prevents overflowing the destination buffer. - Adds symbol FUN_80bb148 using objcopy --add-symbol - Adds it to undefine.lst so it can be replaced - Replaces it with a function that stops copying if the destination buffer is full. The size is determined based on the calli...
static int alloc_identity_pagetable(struct kvm *kvm) { struct page *page; struct kvm_userspace_memory_region kvm_userspace_mem; int r = 0; mutex_lock(&kvm->slots_lock); if (kvm->arch.ept_identity_pagetable) goto out; kvm_userspace_mem.slot = IDENTITY_PAGETABLE_PRIVATE_MEMSLOT; kvm_userspace_mem.flags = 0; kv...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
332,314,985,567,021,060,000,000,000,000,000,000,000
29
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
static uint64_t enet_read(void *opaque, hwaddr addr, unsigned size) { XgmacState *s = opaque; uint64_t r = 0; addr >>= 2; switch (addr) { case XGMAC_VERSION: r = 0x1012; break; default: if (addr < ARRAY_SIZE(s->regs)) { r = s->regs[addr]; } br...
0
[ "CWE-787" ]
qemu
5519724a13664b43e225ca05351c60b4468e4555
152,204,616,326,757,900,000,000,000,000,000,000,000
18
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 inline int finish_nested_data(UNSERIALIZE_PARAMETER) { if (*p >= max || **p != '}') { return 0; } (*p)++; return 1; }
0
[ "CWE-416" ]
php-src
1a23ebc1fff59bf480ca92963b36eba5c1b904c4
165,566,961,263,101,950,000,000,000,000,000,000,000
9
Fixed bug #74103 and bug #75054 Directly fail unserialization when trying to acquire an r/R reference to an UNDEF HT slot. Previously this left an UNDEF and later deleted the index/key from the HT. What actually caused the issue here is a combination of two factors: First, the key deletion was performed using the has...
static void _slurm_rpc_shutdown_controller(slurm_msg_t * msg) { int error_code = SLURM_SUCCESS, i; uint16_t options = 0; shutdown_msg_t *shutdown_msg = (shutdown_msg_t *) msg->data; uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, slurmctld_config.auth_info); /* Locks: Read node */ slurmctld_lock_t node_rea...
0
[ "CWE-20" ]
slurm
033dc0d1d28b8d2ba1a5187f564a01c15187eb4e
230,909,536,534,606,900,000,000,000,000,000,000,000
81
Fix insecure handling of job requested gid. Only trust MUNGE signed values, unless the RPC was signed by SlurmUser or root. CVE-2018-10995.
static unsigned int dn_poll(struct file *file, struct socket *sock, poll_table *wait) { struct sock *sk = sock->sk; struct dn_scp *scp = DN_SK(sk); int mask = datagram_poll(file, sock, wait); if (!skb_queue_empty(&scp->other_receive_queue)) mask |= POLLRDBAND; return mask; }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
294,813,764,094,135,180,000,000,000,000,000,000,000
11
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
static int vxlan_open(struct net_device *dev) { struct vxlan_dev *vxlan = netdev_priv(dev); int ret; ret = vxlan_sock_add(vxlan); if (ret < 0) return ret; if (vxlan_addr_multicast(&vxlan->default_dst.remote_ip)) { ret = vxlan_igmp_join(vxlan); if (ret == -EADDRINUSE) ret = 0; if (ret) { vxlan_sock_...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
114,090,663,636,282,820,000,000,000,000,000,000,000
24
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
ConnStateData::handleChunkedRequestBody() { debugs(33, 7, "chunked from " << clientConnection << ": " << inBuf.length()); try { // the parser will throw on errors if (inBuf.isEmpty()) // nothing to do return ERR_NONE; BodyPipeCheckout bpc(*bodyPipe); bodyParser->setPayload...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
234,376,442,091,291,100,000,000,000,000,000,000,000
38
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
start_initial_timeout(NCR_Instance inst) { if (!inst->timer_running) { /* This will be the first transmission after mode change */ /* Mark source active */ SRC_SetActive(inst->source); } restart_timeout(inst, INITIAL_DELAY); }
0
[]
chrony
a78bf9725a7b481ebff0e0c321294ba767f2c1d8
203,319,319,912,351,200,000,000,000,000,000,000,000
11
ntp: restrict authentication of server/peer to specified key When a server/peer was specified with a key number to enable authentication with a symmetric key, packets received from the server/peer were accepted if they were authenticated with any of the keys contained in the key file and not just the specified key. T...
static int __maybe_unused i740fb_suspend(struct device *dev) { struct fb_info *info = dev_get_drvdata(dev); struct i740fb_par *par = info->par; console_lock(); mutex_lock(&(par->open_lock)); /* do nothing if framebuffer is not active */ if (par->ref_count == 0) { mutex_unlock(&(par->open_lock)); console_unl...
0
[ "CWE-369" ]
linux-fbdev
15cf0b82271b1823fb02ab8c377badba614d95d5
142,637,254,358,097,400,000,000,000,000,000,000,000
22
video: fbdev: i740fb: Error out if 'pixclock' equals zero The userspace program could pass any values to the driver through ioctl() interface. If the driver doesn't check the value of 'pixclock', it may cause divide error. Fix this by checking whether 'pixclock' is zero in the function i740fb_check_var(). The follow...
qtdemux_tag_add_uint32 (GstQTDemux * qtdemux, GstTagList * taglist, const char *tag1, const char *dummy, GNode * node) { GNode *data; int len; int type; guint32 num; data = qtdemux_tree_get_child_by_type (node, FOURCC_data); if (data) { len = QT_UINT32 (data->data); type = QT_UINT32 ((guint8 *)...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
45,536,681,746,660,110,000,000,000,000,000,000,000
24
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
static int alloc_kmem_cache_cpus(struct kmem_cache *s, gfp_t flags) { int cpu; for_each_online_cpu(cpu) { struct kmem_cache_cpu *c = get_cpu_slab(s, cpu); if (c) continue; c = alloc_kmem_cache_cpu(s, cpu, flags); if (!c) { free_kmem_cache_cpus(s); return 0; } s->cpu_slab[cpu] = c; } return 1...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
206,318,721,529,821,570,000,000,000,000,000,000,000
19
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
output_buffer& Finished::get(output_buffer& out) const { return out << *this; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
335,853,433,876,977,770,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
keystr (u32 *keyid) { static char keyid_str[KEYID_STR_SIZE]; switch (opt.keyid_format) { case KF_SHORT: snprintf (keyid_str, sizeof keyid_str, "%08lX", (ulong)keyid[1]); break; case KF_LONG: if (keyid[0]) snprintf (keyid_str, sizeof keyid_str, "%08lX%08lX", (ulong)...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
262,826,992,550,133,230,000,000,000,000,000,000,000
36
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
static int copy_verifier_state(struct bpf_verifier_state *dst, const struct bpf_verifier_state *src) { int err; err = realloc_verifier_state(dst, src->allocated_stack, false); if (err) return err; memcpy(dst, src, offsetof(struct bpf_verifier_state, allocated_stack)); return copy_stack_state(dst, src)...
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
111,433,643,106,887,540,000,000,000,000,000,000,000
11
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
void WebContents::DevToolsIndexPath( int request_id, const std::string& file_system_path, const std::string& excluded_folders_message) { if (!IsDevToolsFileSystemAdded(GetDevToolsWebContents(), file_system_path)) { OnDevToolsIndexingDone(request_id, file_system_path); return; } if (devtools_in...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
49,464,281,531,819,640,000,000,000,000,000,000,000
34
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
HttpTransact::did_forward_server_send_0_9_response(State* s) { if (s->hdr_info.server_response.version_get() == HTTPVersion(0, 9)) { s->current.server->http_version.set(0, 9); return true; } return false; }
0
[ "CWE-119" ]
trafficserver
8b5f0345dade6b2822d9b52c8ad12e63011a5c12
22,513,862,327,159,112,000,000,000,000,000,000,000
8
Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
cmp_item *cmp_item_datetime::make_same() { return new cmp_item_datetime(); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
294,172,693,288,117,430,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
e_util_free_object_slist (GSList *objects) { g_slist_free_full (objects, (GDestroyNotify) g_object_unref); }
0
[ "CWE-295" ]
evolution-data-server
6672b8236139bd6ef41ecb915f4c72e2a052dba5
215,006,933,046,875,230,000,000,000,000,000,000,000
4
Let child source with 'none' authentication method use collection source authentication That might be the same as having set NULL authentication method. Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
static struct cm_id_private * cm_get_id(__be32 local_id, __be32 remote_id) { struct cm_id_private *cm_id_priv; cm_id_priv = idr_find(&cm.local_id_table, (__force int) (local_id ^ cm.random_id_operand)); if (cm_id_priv) { if (cm_id_priv->id.remote_id == remote_id) atomic_inc(&cm_id_priv->refcount); e...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
210,804,856,012,840,930,000,000,000,000,000,000,000
15
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...
double GetZoomLevel(v8::Isolate* isolate) { double result = 0.0; content::RenderFrame* render_frame; if (!MaybeGetRenderFrame(isolate, "getZoomLevel", &render_frame)) return result; mojo::AssociatedRemote<mojom::ElectronWebContentsUtility> web_contents_utility_remote; render_frame->...
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
3,259,543,042,889,835,000,000,000,000,000,000,000
13
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
INST_HANDLER (cpi) { // CPI Rd, K int d = ((buf[0] >> 4) & 0xf) + 16; int k = (buf[0] & 0xf) | ((buf[1] & 0xf) << 4); ESIL_A ("%d,r%d,-,", k, d); // Rd - k __generic_sub_update_flags_rk (op, d, k, 0); // FLAGS (carry) }
0
[ "CWE-125" ]
radare2
041e53cab7ca33481ae45ecd65ad596976d78e68
247,359,219,611,248,660,000,000,000,000,000,000,000
6
Fix crash in anal.avr
node_extended_grapheme_cluster(Node** np, ScanEnv* env) { /* same as (?>\P{M}\p{M}*) */ Node* np1 = NULL; Node* np2 = NULL; Node* qn = NULL; Node* list1 = NULL; Node* list2 = NULL; int r = 0; #ifdef USE_UNICODE_PROPERTIES if (ONIGENC_IS_UNICODE(env->enc)) { /* UTF-8, UTF-16BE/LE, UTF-32BE/LE */ ...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
223,296,650,090,924,450,000,000,000,000,000,000,000
78
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
static int __init esp4_init(void) { if (xfrm_register_type(&esp_type, AF_INET) < 0) { pr_info("%s: can't add xfrm type\n", __func__); return -EAGAIN; } if (xfrm4_protocol_register(&esp4_protocol, IPPROTO_ESP) < 0) { pr_info("%s: can't add protocol\n", __func__); xfrm_unregister_type(&esp_type, AF_INET); re...
0
[ "CWE-787" ]
linux
ebe48d368e97d007bfeb76fcb065d6cfc4c96645
280,545,905,740,650,400,000,000,000,000,000,000,000
13
esp: Fix possible buffer overflow in ESP transformation The maximum message size that can be send is bigger than the maximum site that skb_page_frag_refill can allocate. So it is possible to write beyond the allocated buffer. Fix this by doing a fallback to COW in that case. v2: Avoid get get_order() costs as sugg...
static inline void security_sb_post_pivotroot(struct path *old_path, struct path *new_path) { }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
92,687,251,114,517,320,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 find_group_orlov(struct super_block *sb, struct inode *parent, ext4_group_t *group, umode_t mode, const struct qstr *qstr) { ext4_group_t parent_group = EXT4_I(parent)->i_block_group; struct ext4_sb_info *sbi = EXT4_SB(sb); ext4_group_t real_ngroups = ext4_get_groups_count(sb); int inodes_p...
0
[]
linux
7dac4a1726a9c64a517d595c40e95e2d0d135f6f
107,875,112,794,622,770,000,000,000,000,000,000,000
147
ext4: add validity checks for bitmap block numbers An privileged attacker can cause a crash by mounting a crafted ext4 image which triggers a out-of-bounds read in the function ext4_valid_block_bitmap() in fs/ext4/balloc.c. This issue has been assigned CVE-2018-1093. BugLink: https://bugzilla.kernel.org/show_bug.cgi...
static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); u64 phys_addr = __pa(per_cpu(vmxarea, cpu)); bool already_loaded = vmx->loaded_vmcs->cpu == cpu; if (!vmm_exclusive) kvm_cpu_vmxon(phys_addr); else if (!already_loaded) loaded_vmcs_clear(vmx->loaded_vmcs); if (!...
0
[ "CWE-388" ]
linux
ef85b67385436ddc1998f45f1d6a210f935b3388
244,638,910,458,362,020,000,000,000,000,000,000,000
60
kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF) When L2 exits to L0 due to "exception or NMI", software exceptions (#BP and #OF) for which L1 has requested an intercept should be handled by L1 rather than L0. Previously, only hardware exceptions were forwarded to L1. Signed-off-by: Jim Mattson <jma...
static void test_view_2where() { MYSQL_STMT *stmt; int rc, i; MYSQL_BIND my_bind[8]; char parms[8][100]; ulong length[8]; const char *query= "select relid, report, handle, log_group, username, variant, type, " "version, erfdat, erftime, erfname, aedat, aetime, aename, depen...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
96,001,402,788,749,140,000,000,000,000,000,000,000
81
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, void *data) { gc_each_objects(mrb, &mrb->gc, callback, data); }
0
[ "CWE-416" ]
mruby
5c114c91d4ff31859fcd84cf8bf349b737b90d99
32,029,417,403,882,955,000,000,000,000,000,000,000
4
Clear unused stack region that may refer freed objects; fix #3596
const git_tree_entry *git_tree_entry_byid( const git_tree *tree, const git_oid *id) { size_t i; const git_tree_entry *e; assert(tree); git_vector_foreach(&tree->entries, i, e) { if (memcmp(&e->oid.id, &id->id, sizeof(id->id)) == 0) return e; } return NULL; }
0
[ "CWE-20" ]
libgit2
928429c5c96a701bcbcafacb2421a82602b36915
295,355,269,792,520,750,000,000,000,000,000,000,000
15
tree: Check for `.git` with case insensitivy
static int online_pages_range(unsigned long start_pfn, unsigned long nr_pages, void *arg) { unsigned long i; unsigned long onlined_pages = *(unsigned long *)arg; struct page *page; if (PageReserved(pfn_to_page(start_pfn))) for (i = 0; i < nr_pages; i++) { page = pfn_to_page(start_pfn + i); (*online_page_...
0
[]
linux-2.6
08dff7b7d629807dbb1f398c68dd9cd58dd657a1
169,270,042,720,845,680,000,000,000,000,000,000,000
15
mm/hotplug: correctly add new zone to all other nodes' zone lists When online_pages() is called to add new memory to an empty zone, it rebuilds all zone lists by calling build_all_zonelists(). But there's a bug which prevents the new zone to be added to other nodes' zone lists. online_pages() { build_all_zonelists(...
static void ahci_cmd_done(IDEDMA *dma) { AHCIDevice *ad = DO_UPCAST(AHCIDevice, dma, dma); DPRINTF(ad->port_no, "cmd done\n"); /* update d2h status */ ahci_write_fis_d2h(ad); if (!ad->check_bh) { /* maybe we still have something to process, check later */ ad->check_bh = qemu_bh_ne...
0
[ "CWE-772", "CWE-401" ]
qemu
d68f0f778e7f4fbd674627274267f269e40f0b04
233,009,922,100,344,870,000,000,000,000,000,000,000
15
ide: ahci: call cleanup function in ahci unit This can avoid memory leak when hotunplug the ahci device. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Message-id: 1488449293-80280-4-git-send-email-liqiang6-s@360.cn Signed-off-by: John Snow <jsnow@redhat.com>
static int raw_getname(struct socket *sock, struct sockaddr *uaddr, int *len, int peer) { struct sockaddr_can *addr = (struct sockaddr_can *)uaddr; struct sock *sk = sock->sk; struct raw_sock *ro = raw_sk(sk); if (peer) return -EOPNOTSUPP; addr->can_family = AF_CAN; addr->can_ifindex = ro->ifindex; ...
1
[ "CWE-200" ]
linux-2.6
e84b90ae5eb3c112d1f208964df1d8156a538289
110,676,071,555,549,100,000,000,000,000,000,000,000
17
can: Fix raw_getname() leak raw_getname() can leak 10 bytes of kernel memory to user (two bytes hole between can_family and can_ifindex, 8 bytes at the end of sockaddr_can structure) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Oliver Hartkopp <oliver@hartkopp.net> Signed-off-by: David S. Miller <d...
TfLiteRegistration* Register_LOCAL_RESPONSE_NORMALIZATION() { return Register_LOCAL_RESPONSE_NORM_GENERIC_OPT(); }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
122,553,243,035,616,100,000,000,000,000,000,000,000
3
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
ews_backend_ref_connection_thread (GSimpleAsyncResult *simple, GObject *object, GCancellable *cancellable) { EEwsConnection *connection; GError *error = NULL; connection = e_ews_backend_ref_connection_sync (E_EWS_BACKEND (object), NULL, NULL, NUL...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
191,886,030,184,611,340,000,000,000,000,000,000,000
21
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
g_file_unmount_mountable_with_operation_finish (GFile *file, GAsyncResult *result, GError **error) { GFileIface *iface; g_return_val_if_fail (G_IS_FILE (file), FALSE); g_return_val_if_fail (G_IS_ASYNC_R...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
207,231,597,169,613,440,000,000,000,000,000,000,000
20
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
ClientRequestContext::clientAccessCheckDone(const Acl::Answer &answer) { acl_checklist = NULL; err_type page_id; Http::StatusCode status; debugs(85, 2, "The request " << http->request->method << ' ' << http->uri << " is " << answer << "; last ACL checked: " << (AclMatchedName ? Acl...
0
[ "CWE-116" ]
squid
7024fb734a59409889e53df2257b3fc817809fb4
221,569,862,419,161,940,000,000,000,000,000,000,000
81
Handle more Range requests (#790) Also removed some effectively unused code.
unsigned int vector_copy(const unsigned int arg) { const unsigned int siz = _cimg_mp_size(arg), pos = vector(siz); CImg<ulongT>::vector((ulongT)mp_vector_copy,pos,arg,siz).move_to(code); return pos; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
171,571,189,582,970,900,000,000,000,000,000,000,000
7
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
SetBackColor(new) int new; { if (!display) return; SetColor(rend_getfg(&D_rend), new); }
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
219,687,512,585,824,080,000,000,000,000,000,000,000
7
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
int jpc_tagtree_decode(jpc_tagtree_t *tree, jpc_tagtreenode_t *leaf, int threshold, jpc_bitstream_t *in) { jpc_tagtreenode_t *stk[JPC_TAGTREE_MAXDEPTH - 1]; jpc_tagtreenode_t **stkptr; jpc_tagtreenode_t *node; int low; int ret; /* Avoid compiler warnings about unused parameters. */ tree = 0; assert(threshol...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
233,191,178,549,445,800,000,000,000,000,000,000,000
48
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static int do_ip_getsockopt(struct sock *sk, int level, int optname, char __user *optval, int __user *optlen, unsigned int flags) { struct inet_sock *inet = inet_sk(sk); int val; int len; if (level != SOL_IP) return -EOPNOTSUPP; if (ip_mroute_opt(optname)) return ip_mroute_getsockopt(sk, optname, optv...
0
[ "CWE-20" ]
net
85fbaa75037d0b6b786ff18658ddf0b4014ce2a4
312,709,252,802,332,860,000,000,000,000,000,000,000
229
inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage of uninitialized memory to user in recv syscalls") conditionally updated addr_len if the msg_name is written to. The recv_error and rxpmtu functions relied on the re...
eval_expr_to_bool(typval_T *expr, int *error) { typval_T rettv; int res; if (eval_expr_typval(expr, NULL, 0, &rettv) == FAIL) { *error = TRUE; return FALSE; } res = (tv_get_bool_chk(&rettv, error) != 0); clear_tv(&rettv); return res; }
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
180,496,761,844,651,540,000,000,000,000,000,000,000
14
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) { struct hexline *hx; u8 reset; int ret,pos=0; hx = kmalloc(sizeof(*hx), GFP_KERNEL); if (!hx) return -ENOMEM; /* stop the CPU */ reset = 1; if ((ret = usb_cypress_writemem(udev,cypress[type].cpu_cs_register,&reset,1...
1
[ "CWE-119", "CWE-787" ]
linux
67b0503db9c29b04eadfeede6bebbfe5ddad94ef
256,557,976,954,160,700,000,000,000,000,000,000,000
46
[media] dvb-usb-firmware: don't do DMA on stack The buffer allocation for the firmware data was changed in commit 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") but the same applies for the reset value. Fixes: 43fab9793c1f ("[media] dvb-usb: don't use stack for firmware load") Cc: stable@vger.ker...
GF_Err stbl_AppendTrafMap(GF_SampleTableBox *stbl, Bool is_seg_start, u64 seg_start_offset, u64 frag_start_offset, u8 *moof_template, u32 moof_template_size, u64 sidx_start, u64 sidx_end) { GF_TrafToSampleMap *tmap; GF_TrafMapEntry *tmap_ent; if (!stbl->traf_map) { //nope, create one GF_SAFEALLOC(stbl->traf_map,...
0
[ "CWE-120", "CWE-787" ]
gpac
77ed81c069e10b3861d88f72e1c6be1277ee7eae
192,832,077,402,496,400,000,000,000,000,000,000,000
40
fixed #1774 (fuzz)
load_xwd_f2_d24_b32 (const gchar *filename, FILE *ifp, L_XWDFILEHEADER *xwdhdr, L_XWDCOLOR *xwdcolmap, GError **error) { register guchar *dest, lsbyte_first; gint width, height, linepad, ...
0
[ "CWE-190" ]
gimp
32ae0f83e5748299641cceaabe3f80f1b3afd03e
166,522,069,606,136,660,000,000,000,000,000,000,000
210
file-xwd: sanity check colormap size (CVE-2013-1913)
QPDF::showXRefTable() { for (std::map<QPDFObjGen, QPDFXRefEntry>::iterator iter = this->xref_table.begin(); iter != this->xref_table.end(); ++iter) { QPDFObjGen const& og = (*iter).first; QPDFXRefEntry const& entry = (*iter).second; *out_stream << og.getObj() << "/" << og.getGen() << ": "; switch (e...
0
[ "CWE-399", "CWE-835" ]
qpdf
701b518d5c56a1449825a3a37a716c58e05e1c3e
265,542,729,821,096,200,000,000,000,000,000,000,000
28
Detect recursion loops resolving objects (fixes #51) During parsing of an object, sometimes parts of the object have to be resolved. An example is stream lengths. If such an object directly or indirectly points to the object being parsed, it can cause an infinite loop. Guard against all cases of re-entrant resolution ...
lseg_length(PG_FUNCTION_ARGS) { LSEG *lseg = PG_GETARG_LSEG_P(0); PG_RETURN_FLOAT8(point_dt(&lseg->p[0], &lseg->p[1])); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
150,249,295,071,490,570,000,000,000,000,000,000,000
6
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
TEST_P(Security, BuiltinAuthenticationAndCryptoPlugin_reliable_submessage_data300kb) { PubSubReader<Data1mbType> reader(TEST_TOPIC_NAME); PubSubWriter<Data1mbType> writer(TEST_TOPIC_NAME); PropertyPolicy pub_part_property_policy, sub_part_property_policy, pub_property_policy, sub_property_polic...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
258,243,460,487,521,680,000,000,000,000,000,000,000
71
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 void JS_DebugSetFailAt(v8::FunctionCallbackInfo<v8::Value> const& args) { TRI_V8_TRY_CATCH_BEGIN(isolate); v8::HandleScope scope(isolate); TRI_GET_GLOBALS(); if (v8g->_vocbase == nullptr) { TRI_V8_THROW_EXCEPTION_MEMORY(); } std::string dbname(v8g->_vocbase->name()); // extract arguments i...
0
[ "CWE-918" ]
arangodb
d9b7f019d2435f107b19a59190bf9cc27d5f34dd
15,920,875,017,866,218,000,000,000,000,000,000,000
32
[APM-78] Disable installation from remote URL (#15292)
dns_zone_getxfrsource4dscp(dns_zone_t *zone) { REQUIRE(DNS_ZONE_VALID(zone)); return (zone->xfrsource4dscp); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
38,969,076,657,245,550,000,000,000,000,000,000,000
4
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
SAPI_API SAPI_TREAT_DATA_FUNC(php_default_treat_data) { char *res = NULL, *var, *val, *separator = NULL; const char *c_var; zval array; int free_buffer = 0; char *strtok_buf = NULL; zend_long count = 0; ZVAL_UNDEF(&array); switch (arg) { case PARSE_POST: case PARSE_GET: case PARSE_COOKIE: array_init(&...
1
[ "CWE-565" ]
php-src
6559fe912661ca5ce5f0eeeb591d928451428ed0
129,611,870,495,713,550,000,000,000,000,000,000,000
127
Do not decode cookie names anymore
SPL_METHOD(SplFileObject, fread) { spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC); long length = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &length) == FAILURE) { return; } if (length <= 0) { php_error_docref(NULL TSRMLS_CC, E_WARNI...
0
[ "CWE-190" ]
php-src
7245bff300d3fa8bacbef7897ff080a6f1c23eba
39,186,748,832,896,263,000,000,000,000,000,000,000
25
Fix bug #72262 - do not overflow int
xmlCtxtResetPush(xmlParserCtxtPtr ctxt, const char *chunk, int size, const char *filename, const char *encoding) { xmlParserInputPtr inputStream; xmlParserInputBufferPtr buf; xmlCharEncoding enc = XML_CHAR_ENCODING_NONE; if (ctxt == NULL) return(1); if ((encoding == NULL) ...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
208,703,729,129,275,170,000,000,000,000,000,000,000
96
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
void readYAMLConf(YAML::Node &node) { YAML::Node section = node["common"]; std::string strLine; string_array tempArray; section["api_mode"] >> global.APIMode; section["api_access_token"] >> global.accessToken; if(section["default_url"].IsSequence()) { section["default_url"] >> tempA...
1
[ "CWE-434", "CWE-94" ]
subconverter
ce8d2bd0f13f05fcbd2ed90755d097f402393dd3
215,023,881,635,728,620,000,000,000,000,000,000,000
279
Enhancements Add authorization check before loading scripts. Add detailed logs when loading preference settings.
BGD_DECLARE(int) gdAlphaBlend (int dst, int src) { int src_alpha = gdTrueColorGetAlpha(src); int dst_alpha, alpha, red, green, blue; int src_weight, dst_weight, tot_weight; /* -------------------------------------------------------------------- */ /* Simple cases we want to handle fast. ...
0
[ "CWE-119", "CWE-787" ]
libgd
77f619d48259383628c3ec4654b1ad578e9eb40e
47,143,068,322,639,710,000,000,000,000,000,000,000
44
fix #215 gdImageFillToBorder stack-overflow when invalid color is used
void _gnutls_session_client_cert_type_set(gnutls_session_t session, gnutls_certificate_type_t ct) { _gnutls_handshake_log ("HSK[%p]: Selected client certificate type %s (%d)\n", session, gnutls_certificate_type_get_name(ct), ct); session->security_parameters.client_ctype = ct; }
0
[]
gnutls
3d7fae761e65e9d0f16d7247ee8a464d4fe002da
74,469,231,642,592,420,000,000,000,000,000,000,000
8
valgrind: check if session ticket key is used without initialization This adds a valgrind client request for session->key.session_ticket_key to make sure that it is not used without initialization. Signed-off-by: Daiki Ueno <ueno@gnu.org>
void kvm_arch_hardware_unsetup(void) { kvm_unregister_perf_callbacks(); static_call(kvm_x86_hardware_unsetup)(); }
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
195,652,523,584,830,760,000,000,000,000,000,000,000
6
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...
_rl_callback_data_dispose (arg) _rl_callback_generic_arg *arg; { xfree (arg); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
254,179,623,958,938,400,000,000,000,000,000,000,000
5
bash-4.4-rc2 release
int ip_options_get(struct net *net, struct ip_options_rcu **optp, unsigned char *data, int optlen) { struct ip_options_rcu *opt = ip_options_get_alloc(optlen); if (!opt) return -ENOMEM; if (optlen) memcpy(opt->opt.__data, data, optlen); return ip_options_get_finish(net, optp, opt, optlen); }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
152,256,801,938,089,260,000,000,000,000,000,000,000
11
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
static void windowIfNewPeer( Parse *pParse, ExprList *pOrderBy, int regNew, /* First in array of new values */ int regOld, /* First in array of old values */ int addr /* Jump here */ ){ Vdbe *v = sqlite3GetVdbe(pParse); if( pOrderBy ){ int...
0
[ "CWE-476" ]
sqlite
75e95e1fcd52d3ec8282edb75ac8cd0814095d54
155,633,484,751,677,920,000,000,000,000,000,000,000
22
When processing constant integer values in ORDER BY clauses of window definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable the constant value to avoid an invalid pointer dereference if the expression is ever duplicated. This fixes a crash report from Yongheng and Rui. FossilOrigin-Name: 1ca0bd982ab11...
bool RWFunction::Validate(RandomNumberGenerator &rng, unsigned int level) const { bool pass = true; pass = pass && m_n > Integer::One() && m_n%8 == 5; return pass; }
0
[ "CWE-200", "CWE-399" ]
cryptopp
9425e16437439e68c7d96abef922167d68fafaff
200,925,029,368,727,770,000,000,000,000,000,000,000
6
Fix for CVE-2015-2141. Thanks to Evgeny Sidorov for reporting. Squaring to satisfy Jacobi requirements suggested by JPM.
void neigh_table_init(struct neigh_table *tbl) { unsigned long now = jiffies; unsigned long phsize; atomic_set(&tbl->parms.refcnt, 1); INIT_RCU_HEAD(&tbl->parms.rcu_head); tbl->parms.reachable_time = neigh_rand_reach_time(tbl->parms.base_reachable_time); if (!tbl->kmem_cachep) tbl->kmem_cachep = kmem_cac...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
20,430,728,187,028,306,000,000,000,000,000,000,000
63
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
lacks_deep_count (NautilusFile *file) { return file->details->deep_counts_status != NAUTILUS_REQUEST_DONE; }
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
48,091,846,732,075,770,000,000,000,000,000,000,000
4
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
DLLEXPORT int tjDecodeYUV(tjhandle handle, const unsigned char *srcBuf, int pad, int subsamp, unsigned char *dstBuf, int width, int pitch, int height, int pixelFormat, int flags) { const unsigned char *srcPlanes[3]; int pw0, ph0, strides[...
0
[ "CWE-787" ]
libjpeg-turbo
3d9c64e9f8aa1ee954d1d0bb3390fc894bb84da3
222,444,050,006,608,360,000,000,000,000,000,000,000
38
tjLoadImage(): Fix int overflow/segfault w/big BMP Fixes #304
static int genl_rcv_msg(struct sk_buff *skb, struct nlmsghdr *nlh, struct netlink_ext_ack *extack) { const struct genl_family *family; int err; family = genl_family_find_byid(nlh->nlmsg_type); if (family == NULL) return -ENOENT; if (!family->parallel_ops) genl_lock(); err = genl_family_rcv_msg(family, s...
0
[ "CWE-399", "CWE-401" ]
linux
ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2
56,017,898,878,448,580,000,000,000,000,000,000,000
20
genetlink: Fix a memory leak on error path In genl_register_family(), when idr_alloc() fails, we forget to free the memory we possibly allocate for family->attrbuf. Reported-by: Hulk Robot <hulkci@huawei.com> Fixes: 2ae0f17df1cd ("genetlink: use idr to track families") Signed-off-by: YueHaibing <yuehaibing@huawei.com...
STBIDEF int stbi_info(char const *filename, int *x, int *y, int *comp) { FILE *f = stbi__fopen(filename, "rb"); int result; if (!f) return stbi__err("can't fopen", "Unable to open file"); result = stbi_info_from_file(f, x, y, comp); fclose(f); return result; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
276,156,734,390,331,330,000,000,000,000,000,000,000
9
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
int copy_screen(void) { char *fbp; int i, y, block_size; if (! fs_factor) { return 0; } if (debug_tiles) fprintf(stderr, "copy_screen\n"); if (unixpw_in_progress) return 0; if (! main_fb) { return 0; } block_size = ((dpy_y/fs_factor) * main_bytes_per_line); fbp = main_fb; y = 0; X_LOCK; /* scre...
0
[ "CWE-862", "CWE-284", "CWE-732" ]
x11vnc
69eeb9f7baa14ca03b16c9de821f9876def7a36a
63,389,055,161,149,080,000,000,000,000,000,000,000
44
scan: limit access to shared memory segments to current user
static void io_free_file_tables(struct io_file_table *table, unsigned nr_files) { size_t size = nr_files * sizeof(struct io_fixed_file); io_free_page_table((void **)table->files, size); table->files = NULL;
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
263,970,551,028,217,560,000,000,000,000,000,000,000
7
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
static struct socket *get_raw_socket(int fd) { struct { struct sockaddr_ll sa; char buf[MAX_ADDR_LEN]; } uaddr; int uaddr_len = sizeof uaddr, r; struct socket *sock = sockfd_lookup(fd, &r); if (!sock) return ERR_PTR(-ENOTSOCK); /* Parameter checking */ if (sock->sk->sk_type != SOCK_RAW) { r = -ESOCKTN...
0
[ "CWE-399" ]
linux
dd7633ecd553a5e304d349aa6f8eb8a0417098c5
309,536,326,285,069,340,000,000,000,000,000,000,000
32
vhost-net: fix use-after-free in vhost_net_flush vhost_net_ubuf_put_and_wait has a confusing name: it will actually also free it's argument. Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01 "vhost-net: flush outstanding DMAs on memory change" vhost_net_flush tries to use the argument after passing it to ...
PyBytes_Size(PyObject *op) { if (!PyBytes_Check(op)) { PyErr_Format(PyExc_TypeError, "expected bytes, %.200s found", Py_TYPE(op)->tp_name); return -1; } return Py_SIZE(op); }
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
208,599,048,517,710,800,000,000,000,000,000,000,000
9
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
GF_Err tsro_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_TimeOffHintEntryBox *ptr = (GF_TimeOffHintEntryBox *)s; if (ptr == NULL) return GF_BAD_PARAM; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->TimeOffset); return GF_OK; }
0
[ "CWE-125" ]
gpac
bceb03fd2be95097a7b409ea59914f332fb6bc86
129,381,015,136,224,110,000,000,000,000,000,000,000
11
fixed 2 possible heap overflows (inc. #1088)
static noinline int btrfs_ioctl_subvol_setflags(struct file *file, void __user *arg) { struct inode *inode = file_inode(file); struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb); struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_trans_handle *trans; u64 root_flags; u64 flags; int ret = 0...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
279,827,574,986,158,050,000,000,000,000,000,000,000
93
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
int SN_Client_WillTopicUpdate(MqttClient *client, SN_Will *will) { int rc = 0, len = 0; /* Validate required arguments */ if (client == NULL) { return MQTT_CODE_ERROR_BAD_ARG; } if (will->stat == MQTT_MSG_BEGIN) { #ifdef WOLFMQTT_MULTITHREAD /* Lock send socket mutex */ ...
0
[ "CWE-787" ]
wolfMQTT
84d4b53122e0fa0280c7872350b89d5777dabbb2
299,161,248,120,408,300,000,000,000,000,000,000,000
83
Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free
static port::StatusOr<CudnnRnnDescriptor> Create( const CudnnHandle& cudnn, int num_layers, int hidden_size, int input_size, int cell_size, int batch_size, cudnnRNNInputMode_t input_mode, cudnnDirectionMode_t direction_mode, cudnnRNNMode_t rnn_mode, cudnnDataType_t data_type, cudnnDataType_t c...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
268,640,351,339,768,700,000,000,000,000,000,000,000
107
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
static UINT video_data_on_data_received(IWTSVirtualChannelCallback* pChannelCallback, wStream* s) { VIDEO_CHANNEL_CALLBACK* callback = (VIDEO_CHANNEL_CALLBACK*)pChannelCallback; VIDEO_PLUGIN* video; VideoClientContext* context; UINT32 cbSize, packetType; TSMM_VIDEO_DATA data; video = (VIDEO_PLUGIN*)callback->plu...
0
[ "CWE-190" ]
FreeRDP
06c32f170093a6ecde93e3bc07fed6a706bfbeb3
79,256,016,384,876,460,000,000,000,000,000,000,000
56
Fixed int overflow in PresentationContext_new Thanks to hac425 CVE-2020-11038
static double mp_set_Ixyz_v(_cimg_math_parser& mp) { CImg<T> &img = mp.imgout; const int x = (int)_mp_arg(2), y = (int)_mp_arg(3), z = (int)_mp_arg(4); const double *ptrs = &_mp_arg(1) + 1; if (x>=0 && x<img.width() && y>=0 && y<img.height() && z>=0 &&...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
333,346,554,653,431,270,000,000,000,000,000,000,000
15
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int FillBasicWEBPInfo(Image *image,const uint8_t *stream,size_t length, WebPDecoderConfig *configure) { WebPBitstreamFeatures *magick_restrict features = &configure->input; int webp_status; webp_status=WebPGetFeatures(stream,length,features); if (webp_status != VP8_STATUS_OK) return(webp...
0
[ "CWE-369" ]
ImageMagick6
a78d92dc0f468e79c3d761aae9707042952cdaca
88,954,484,969,752,500,000,000,000,000,000,000,000
21
https://github.com/ImageMagick/ImageMagick/issues/3176
int mnt_fs_set_target(struct libmnt_fs *fs, const char *tgt) { return strdup_to_struct_member(fs, target, tgt); }
0
[ "CWE-552", "CWE-703" ]
util-linux
166e87368ae88bf31112a30e078cceae637f4cdb
149,221,947,296,171,900,000,000,000,000,000,000,000
4
libmount: remove support for deleted mount table entries The "(deleted)" suffix has been originally used by kernel for deleted mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3 (Dec 2014) kernel does not use this suffix for mount stuff in /proc at all. Let's remove this support from libmount to...
xmlSchemaGetNextComponent(xmlSchemaBasicItemPtr item) { switch (item->type) { case XML_SCHEMA_TYPE_ELEMENT: return ((xmlSchemaBasicItemPtr) ((xmlSchemaElementPtr) item)->next); case XML_SCHEMA_TYPE_ATTRIBUTE: return ((xmlSchemaBasicItemPtr) ((xmlSchemaAttributePtr) item)->next); case XML_SCHEMA_TYPE_CO...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
175,359,828,951,788,340,000,000,000,000,000,000,000
31
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
char *my_memmem(char *haystack, size_t haystacklen, char *needle, size_t needlelen) { char *c; for (c = haystack; c <= haystack + haystacklen - needlelen; c++) if (!memcmp(c, needle, needlelen)) return c; return 0; }
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
322,000,658,541,269,180,000,000,000,000,000,000,000
8
Secunia SA75000 advisory: several buffer overruns
tracing_trace_options_write(struct file *filp, const char __user *ubuf, size_t cnt, loff_t *ppos) { struct seq_file *m = filp->private_data; struct trace_array *tr = m->private; char buf[64]; int ret; if (cnt >= sizeof(buf)) return -EINVAL; if (copy_from_user(buf, ubuf, cnt)) return -EFAULT; buf[cnt] =...
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
239,651,879,930,428,300,000,000,000,000,000,000,000
24
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...
static inline void xen_set_restricted_virtio_memory_access(void) { if (IS_ENABLED(CONFIG_XEN_VIRTIO) && xen_domain()) platform_set(PLATFORM_VIRTIO_RESTRICTED_MEM_ACCESS); }
0
[]
linux
fa1f57421e0b1c57843902c89728f823abc32f02
289,860,416,961,336,850,000,000,000,000,000,000,000
5
xen/virtio: Enable restricted memory access using Xen grant mappings In order to support virtio in Xen guests add a config option XEN_VIRTIO enabling the user to specify whether in all Xen guests virtio should be able to access memory via Xen grant mappings only on the host side. Also set PLATFORM_VIRTIO_RESTRICTED_M...
get_issuers_num (gnutls_session_t session, uint8_t * data, ssize_t data_size) { int issuers_dn_len = 0, result; unsigned size; /* Count the number of the given issuers; * This is used to allocate the issuers_dn without * using realloc(). */ if (data_size == 0 || data == NULL) return 0; if (dat...
0
[ "CWE-399" ]
gnutls
9c62f4feb2bdd6fbbb06eb0c60bfdea80d21bbb8
97,348,370,262,734,770,000,000,000,000,000,000,000
44
Deinitialize the correct number of certificates. Reported by Remi Gacogne.
bool unit_stop_pending(Unit *u) { assert(u); /* This call does check the current state of the unit. It's * hence useful to be called from state change calls of the * unit itself, where the state isn't updated yet. This is * different from unit_inactive_or_pending() which chec...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
25,102,928,019,009,906,000,000,000,000,000,000,000
11
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static MAIN_WINDOW_REC *mainwindows_find_left(MAIN_WINDOW_REC *window, int find_last) { int first_line, last_line, first_column; MAIN_WINDOW_REC *best; GSList *tmp; if (window != NULL) { first_line = window->first_line; last_line = window->last_line; first_column = window->first_column; } else { first_lin...
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
337,720,089,556,321,300,000,000,000,000,000,000,000
31
check the error condition of mainwindow_create
whichmodule(PyObject *global, PyObject *dotted_path) { PyObject *module_name; PyObject *module = NULL; Py_ssize_t i; PyObject *modules; _Py_IDENTIFIER(__module__); _Py_IDENTIFIER(modules); _Py_IDENTIFIER(__main__); if (_PyObject_LookupAttrId(global, &PyId___module__, &module_name) < 0) ...
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
259,377,905,945,003,300,000,000,000,000,000,000,000
73
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
static void sig_chatnet_saved(IRC_CHATNET_REC *rec, CONFIG_NODE *node) { if (!IS_IRC_CHATNET(rec)) return; if (rec->usermode != NULL) iconfig_node_set_str(node, "usermode", rec->usermode); if (rec->max_cmds_at_once > 0) iconfig_node_set_int(node, "cmdmax", rec->max_cmds_at_once); if (rec->cmd_...
0
[ "CWE-416" ]
irssi
b8d3301d34f383f039071214872570385de1bb59
288,351,219,471,545,050,000,000,000,000,000,000,000
24
SASL support The only supported methods are PLAIN and EXTERNAL, the latter is untested as of now. The code gets the values from the keys named sasl_{mechanism,username,password} specified for each chatnet.
PHP_FUNCTION(header_register_callback) { zval *callback_func; char *callback_name; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &callback_func) == FAILURE) { return; } if (!zend_is_callable(callback_func, 0, &callback_name TSRMLS_CC)) { efree(callback_name); RETURN_FALSE; } efree(callback_na...
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
110,459,272,630,786,650,000,000,000,000,000,000,000
25
slim post data
void HllVal::init(FunctionContext* ctx) { len = doris::HLL_COLUMN_DEFAULT_LEN; ptr = ctx->allocate(len); memset(ptr, 0, len); // the HLL type is HLL_DATA_FULL in UDF or UDAF ptr[0] = doris::HllDataType::HLL_DATA_FULL; is_null = false; }
0
[ "CWE-200" ]
incubator-doris
246ac4e37aa4da6836b7850cb990f02d1c3725a3
127,575,135,615,849,300,000,000,000,000,000,000,000
9
[fix] fix a bug of encryption function with iv may return wrong result (#8277)
static long native_ioctl(struct file *file, unsigned int cmd, unsigned long arg) { long ret = -ENOIOCTLCMD; if (file->f_op->unlocked_ioctl) ret = file->f_op->unlocked_ioctl(file, cmd, arg); return ret; }
0
[ "CWE-787" ]
linux
a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a
105,840,834,099,933,650,000,000,000,000,000,000,000
9
media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit ioctl in user space memory which is commonly allocated using compat...