func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ib_ucm_path_get(struct ib_sa_path_rec **path, u64 src) { struct ib_user_path_rec upath; struct ib_sa_path_rec *sa_path; *path = NULL; if (!src) return 0; sa_path = kmalloc(sizeof(*sa_path), GFP_KERNEL); if (!sa_path) return -ENOMEM; if (copy_from_user(&upath, (void __user *)(unsigned long)src...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
314,683,188,147,695,180,000,000,000,000,000,000,000
25
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
static unsigned long deferred_split_scan(struct shrinker *shrink, struct shrink_control *sc) { struct pglist_data *pgdata = NODE_DATA(sc->nid); unsigned long flags; LIST_HEAD(list), *pos, *next; struct page *page; int split = 0; spin_lock_irqsave(&pgdata->split_queue_lock, flags); /* Take pin on all head page...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
7,933,693,467,810,406,000,000,000,000,000,000,000
48
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
void drep_del(GF_Box *s) { gf_free((GF_DREPBox *)s); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
30,559,572,197,021,760,000,000,000,000,000,000,000
4
prevent dref memleak on invalid input (#1183)
String *Item_func_encode::val_str(String *str) { String *res; DBUG_ASSERT(fixed == 1); if (!(res=args[0]->val_str(str))) { null_value= 1; return NULL; } if (!seeded && seed()) { null_value= 1; return NULL; } null_value= 0; if (res->uses_buffer_owned_by(str)) { if (tmp_value_...
0
[]
mysql-server
475dcde2c7856dd0050b967099a86c087d94f32f
107,276,124,423,787,600,000,000,000,000,000,000,000
35
Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD Description: my_crypt_genhash depends on the length of plaintext password. Longer the password, more is the time required to produce the transformation. An unusually large password may consume considerable amount of time...
static int get_server_hello(SSL *s) { unsigned char *buf; unsigned char *p; int i,j; unsigned long len; STACK_OF(SSL_CIPHER) *sk=NULL,*cl, *prio, *allow; buf=(unsigned char *)s->init_buf->data; p=buf; if (s->state == SSL2_ST_GET_SERVER_HELLO_A) { i=ssl2_read(s,(char *)&(buf[s->init_num]),11-s->init_num); ...
0
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
146,477,528,635,115,640,000,000,000,000,000,000,000
212
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
static void binder_free_transaction(struct binder_transaction *t) { if (t->buffer) t->buffer->transaction = NULL; binder_free_txn_fixups(t); kfree(t); binder_stats_deleted(BINDER_STAT_TRANSACTION); }
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
322,735,150,999,801,730,000,000,000,000,000,000,000
8
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
my_decimal *Item_cache_str::val_decimal(my_decimal *decimal_val) { DBUG_ASSERT(fixed == 1); if (!has_value()) return NULL; if (value) string2my_decimal(E_DEC_FATAL_ERROR, value, decimal_val); else decimal_val= 0; return decimal_val; }
0
[]
server
b000e169562697aa072600695d4f0c0412f94f4f
272,224,654,433,279,400,000,000,000,000,000,000,000
11
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) based on: commit f7316aa0c9a Author: Ajo Robert <ajo.robert@oracle.com> Date: Thu Aug 24 17:03:21 2017 +0530 Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME'...
void sctp_data_ready(struct sock *sk) { struct socket_wq *wq; rcu_read_lock(); wq = rcu_dereference(sk->sk_wq); if (wq_has_sleeper(wq)) wake_up_interruptible_sync_poll(&wq->wait, POLLIN | POLLRDNORM | POLLRDBAND); sk_wake_async(sk, SOCK_WAKE_WAITD, POLL_IN); rcu_read_unlock(); }
0
[ "CWE-362", "CWE-703" ]
linux
2d45a02d0166caf2627fe91897c6ffc3b19514c4
303,217,588,419,319,420,000,000,000,000,000,000,000
12
sctp: fix ASCONF list handling ->auto_asconf_splist is per namespace and mangled by functions like sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization. Also, the call to inet_sk_copy_descendant() was backuping ->auto_asconf_list through the copy but was not honoring ->do_auto_asconf, which could l...
static ssize_t pm_qos_resume_latency_us_show(struct device *dev, struct device_attribute *attr, char *buf) { s32 value = dev_pm_qos_requested_resume_latency(dev); if (value == 0) return sysfs_emit(buf, "n/a\n"); if (value == PM_QOS_RESUME_LATENCY_NO_CONSTRAINT) value = 0; return sysfs_emit...
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
217,283,293,575,596,100,000,000,000,000,000,000,000
13
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...
BaseType_t xQueueGiveFromISR( QueueHandle_t xQueue, BaseType_t * const pxHigherPriorityTaskWoken ) { BaseType_t xReturn; UBaseType_t uxSavedInterruptStatus; Queue_t * const pxQueue = xQueue; /* Similar to xQueueGenericSendFromISR() but used with semaphores where the...
0
[ "CWE-200", "CWE-190" ]
FreeRTOS-Kernel
47338393f1f79558f6144213409f09f81d7c4837
52,526,480,055,233,130,000,000,000,000,000,000,000
166
add assert for addition overflow on queue creation (#225)
dns_message_puttemprdataset(dns_message_t *msg, dns_rdataset_t **item) { REQUIRE(DNS_MESSAGE_VALID(msg)); REQUIRE(item != NULL && *item != NULL); REQUIRE(!dns_rdataset_isassociated(*item)); isc_mempool_put(msg->rdspool, *item); *item = NULL; }
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
287,939,729,493,248,260,000,000,000,000,000,000,000
8
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
evdns_server_request_add_a_reply(struct evdns_server_request *req, const char *name, int n, const void *addrs, int ttl) { return evdns_server_request_add_reply( req, EVDNS_ANSWER_SECTION, name, TYPE_A, CLASS_INET, ttl, n*4, 0, addrs); }
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
62,445,067,829,671,030,000,000,000,000,000,000,000
6
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
static void *ptype_seq_next(struct seq_file *seq, void *v, loff_t *pos) { struct packet_type *pt; struct list_head *nxt; int hash; ++*pos; if (v == SEQ_START_TOKEN) return ptype_get_idx(0); pt = v; nxt = pt->list.next; if (pt->type == htons(ETH_P_ALL)) { if (nxt != &ptype_all) goto found; hash = 0; ...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
187,071,343,819,900,900,000,000,000,000,000,000,000
28
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static sector_t udf_scan_anchors(struct super_block *sb, sector_t lastblock, struct kernel_lb_addr *fileset) { sector_t last[6]; int i; struct udf_sb_info *sbi = UDF_SB(sb); int last_count = 0; /* First try user provided anchor */ if (sbi->s_anchor) { if (udf_check_anchor_block(sb, sbi->s_anchor, fileset)...
0
[ "CWE-119", "CWE-787" ]
linux
1df2ae31c724e57be9d7ac00d78db8a5dabdd050
171,804,120,377,592,080,000,000,000,000,000,000,000
54
udf: Fortify loading of sparing table Add sanity checks when loading sparing table from disk to avoid accessing unallocated memory or writing to it. Signed-off-by: Jan Kara <jack@suse.cz>
ZEND_API void zend_destroy_file_handle(zend_file_handle *file_handle TSRMLS_DC) { zend_llist_del_element(&CG(open_files), file_handle, (int (*)(void *, void *)) zend_compare_file_handles); /* zend_file_handle_dtor() operates on the copy, so we have to NULLify the original here */ file_handle->opened_path = NULL; if...
0
[ "CWE-20" ]
php-src
fb58e69a84f4fde603a630d2c9df2fa3be16d846
202,718,344,227,424,850,000,000,000,000,000,000,000
9
fix bug #64660 - yyparse can return 2, not only 1
GF_Err srpp_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_SRTPProcessBox *ptr = (GF_SRTPProcessBox *)s; if (ptr == NULL) return GF_BAD_PARAM; e = gf_isom_full_box_write(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->encryption_algorithm_rtp); gf_bs_write_u32(bs, ptr->encryption_algorithm_rtcp); gf_bs_wr...
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
324,031,321,650,394,360,000,000,000,000,000,000,000
22
prevent dref memleak on invalid input (#1183)
static void cm_format_rej(struct cm_rej_msg *rej_msg, struct cm_id_private *cm_id_priv, enum ib_cm_rej_reason reason, void *ari, u8 ari_length, const void *private_data, u8 private_data_len) { cm_format_mad_hdr(&rej_msg->hdr, CM_REJ_ATTR_ID, cm_id_priv->tid); rej_msg->remote_comm_id = cm...
0
[ "CWE-20" ]
linux
b2853fd6c2d0f383dbdf7427e263eb576a633867
214,038,805,481,918,240,000,000,000,000,000,000,000
40
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...
static char * getFunctionName (RCore *core, ut64 off, const char *name, bool prefix) { const char *fcnpfx = ""; if (prefix) { if (fcnNeedsPrefix (name) && (!fcnpfx || !*fcnpfx)) { fcnpfx = "fcn"; } else { fcnpfx = r_config_get (core->config, "anal.fcnprefix"); } } if (r_reg_get (core->anal->reg, name, -...
0
[ "CWE-703", "CWE-908" ]
radare2
4d3811681a80f92a53e795f6a64c4b0fc2c8dd22
138,979,350,027,946,980,000,000,000,000,000,000,000
14
Fix segfault in adf (#16230)
l2tp_print(netdissect_options *ndo, const u_char *dat, u_int length) { const u_char *ptr = dat; u_int cnt = 0; /* total octets consumed */ uint16_t pad; int flag_t, flag_l, flag_s, flag_o; uint16_t l2tp_len; flag_t = flag_l = flag_s = flag_o = FALSE; ND_TCHECK2(*ptr, 2); /* Flags & Version */ if ((EXTRACT_1...
0
[ "CWE-125", "CWE-787" ]
tcpdump
cc4a7391c616be7a64ed65742ef9ed3f106eb165
2,033,657,041,961,638,800,000,000,000,000,000,000
113
CVE-2017-13006/L2TP: Check whether an AVP's content exceeds the AVP length. It's not good enough to check whether all the data specified by the AVP length was captured - you also have to check whether that length is large enough for all the required data in the AVP. This fixes a buffer over-read discovered by Yannick...
static int selinux_socket_sendmsg(struct socket *sock, struct msghdr *msg, int size) { return sock_has_perm(current, sock->sk, SOCKET__WRITE); }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
230,462,146,629,863,600,000,000,000,000,000,000,000
5
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) { int idx, q_idx; int s_idx, s_q_idx; struct net_device *dev; struct Qdisc *q; s_idx = cb->args[0]; s_q_idx = q_idx = cb->args[1]; read_lock(&dev_base_lock); for (dev=dev_base, idx=0; dev; dev = dev->next, idx++) { if (idx < s_idx) ...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
73,214,799,837,761,400,000,000,000,000,000,000,000
40
[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>
sf_flac_write_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC__Frame *frame, const int32_t * const buffer [], void *client_data) { SF_PRIVATE *psf = (SF_PRIVATE*) client_data ; FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ; pflac->frame = frame ; pflac->bufferpos = 0 ; pflac->wbuffer =...
0
[ "CWE-119", "CWE-369" ]
libsndfile
60b234301adf258786d8b90be5c1d437fc8799e0
68,103,571,499,489,520,000,000,000,000,000,000,000
13
src/flac.c: Improve error handling Especially when dealing with corrupt or malicious files.
entry_guard_set_filtered_flags(const or_options_t *options, guard_selection_t *gs, entry_guard_t *guard) { unsigned was_filtered = guard->is_filtered_guard; guard->is_filtered_guard = 0; guard->is_usable_filtered_guard = 0; if (entry_guard_passes_fi...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
167,704,943,261,339,900,000,000,000,000,000,000,000
25
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static int __migrate_task_irq(struct task_struct *p, int src_cpu, int dest_cpu) { int ret; local_irq_disable(); ret = __migrate_task(p, src_cpu, dest_cpu); local_irq_enable(); return ret; }
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
186,856,546,761,457,050,000,000,000,000,000,000,000
9
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 ...
static void pp_init(void) { hash_init(&FileHash, HASH_MEDIUM); }
0
[ "CWE-125" ]
nasm
3144e84add8b152cc7a71e44617ce6f21daa4ba3
266,459,334,170,018,670,000,000,000,000,000,000,000
4
preproc: Don't access offsting byte on unterminated strings https://bugzilla.nasm.us/show_bug.cgi?id=3392446 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
void mnt_release_group_id(struct mount *mnt) { int id = mnt->mnt_group_id; ida_remove(&mnt_group_ida, id); if (mnt_group_start > id) mnt_group_start = id; mnt->mnt_group_id = 0; }
0
[ "CWE-269" ]
user-namespace
a6138db815df5ee542d848318e5dae681590fccd
107,978,426,943,041,150,000,000,000,000,000,000,000
8
mnt: Only change user settable mount flags in remount Kenton Varda <kenton@sandstorm.io> discovered that by remounting a read-only bind mount read-only in a user namespace the MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user to the remount a read-only mount read-write. Correct this by replacing t...
client_keyblock(krb5_context context, krb5_kdcpreauth_rock rock) { return rock->client_keyblock; }
0
[ "CWE-617" ]
krb5
94e5eda5bb94d1d44733a49c3d9b6d1e42c74def
132,918,130,135,883,250,000,000,000,000,000,000,000
4
Remove incorrect KDC assertion The assertion in return_enc_padata() is reachable because kdc_make_s4u2self_rep() may have previously added encrypted padata. It is no longer necessary because the code uses add_pa_data_element() instead of allocating a new list. CVE-2018-20217: In MIT krb5 1.8 or later, an authenticat...
static int bus_write_message(sd_bus *bus, sd_bus_message *m, size_t *idx) { int r; assert(bus); assert(m); r = bus_socket_write_message(bus, m, idx); if (r <= 0) return r; if (*idx >= BUS_MESSAGE_SIZE(m)) log_debug("Sent message type=%s ...
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
284,076,726,982,299,100,000,000,000,000,000,000,000
26
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
evdev_scroll_get_default_method(struct libinput_device *device) { struct evdev_device *evdev = evdev_device(device); if (evdev->tags & EVDEV_TAG_TRACKPOINT) return LIBINPUT_CONFIG_SCROLL_ON_BUTTON_DOWN; /* Mice without a scroll wheel but with middle button have on-button * scrolling by default */ if (!libevde...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
100,383,911,536,938,620,000,000,000,000,000,000,000
16
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
multi_ifconfig_pool_persist(struct multi_context *m, bool force) { /* write pool data to file */ if (m->ifconfig_pool && m->top.c1.ifconfig_pool_persist && (force || ifconfig_pool_write_trigger(m->top.c1.ifconfig_pool_persist))) { ifconfig_pool_write(m->top.c1.ifconfig_pool_persist, ...
0
[ "CWE-362", "CWE-476" ]
openvpn
37bc691e7d26ea4eb61a8a434ebd7a9ae76225ab
33,795,857,736,307,584,000,000,000,000,000,000,000
10
Fix illegal client float (CVE-2020-11810) There is a time frame between allocating peer-id and initializing data channel key (which is performed on receiving push request or on async push-reply) in which the existing peer-id float checks do not work right. If a "rogue" data channel packet arrives during that time fra...
static double mp_vmaxabs(_cimg_math_parser& mp) { _cimg_mp_vfunc(res = vec.maxabs()); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
244,505,006,510,503,700,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int prepare_func_exit(struct bpf_verifier_env *env, int *insn_idx) { struct bpf_verifier_state *state = env->cur_state; struct bpf_func_state *caller, *callee; struct bpf_reg_state *r0; int err; callee = state->frame[state->curframe]; r0 = &callee->regs[BPF_REG_0]; if (r0->type == PTR_TO_STACK) { /* te...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
286,444,155,304,803,750,000,000,000,000,000,000,000
42
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static inline void alarmtimer_rtc_timer_init(void) { rtc_timer_init(&rtctimer, NULL, NULL); }
0
[ "CWE-190" ]
linux
5f936e19cc0ef97dbe3a56e9498922ad5ba1edef
136,265,516,765,481,660,000,000,000,000,000,000,000
4
alarmtimer: Prevent overflow for relative nanosleep Air Icy reported: UBSAN: Undefined behaviour in kernel/time/alarmtimer.c:811:7 signed integer overflow: 1529859276030040771 + 9223372036854775807 cannot be represented in type 'long long int' Call Trace: alarm_timer_nsleep+0x44c/0x510 kernel/time/alarmtim...
void vrend_set_sample_mask(UNUSED struct vrend_context *ctx, unsigned sample_mask) { if (has_feature(feat_sample_mask)) glSampleMaski(0, sample_mask); }
0
[ "CWE-787" ]
virglrenderer
cbc8d8b75be360236cada63784046688aeb6d921
95,149,502,223,276,130,000,000,000,000,000,000,000
5
vrend: check transfer bounds for negative values too and report error Closes #138 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
static void wrap_free(void *ptr) { free_blocks_check(); umm_free(ptr); free_blocks_check(); }
0
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
34,187,444,993,141,090,000,000,000,000,000,000,000
5
Fix umm_malloc()
xfs_inode_item_format_attr_fork( struct xfs_inode_log_item *iip, struct xfs_inode_log_format *ilf, struct xfs_log_vec *lv, struct xfs_log_iovec **vecp) { struct xfs_inode *ip = iip->ili_inode; size_t data_bytes; switch (ip->i_d.di_aformat) { case XFS_DINODE_FMT_EXTENTS: iip->ili_fields &= ~(XFS_ILOG_ADA...
0
[ "CWE-19" ]
linux
fc0561cefc04e7803c0f6501ca4f310a502f65b8
322,301,234,824,068,380,000,000,000,000,000,000,000
79
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...
ZEND_API int zend_shutdown_strtod(void) /* {{{ */ { destroy_freelist(); #ifdef ZTS tsrm_mutex_free(dtoa_mutex); dtoa_mutex = NULL; tsrm_mutex_free(pow5mult_mutex); pow5mult_mutex = NULL; #endif return 1; }
0
[ "CWE-119" ]
php-src
37da90248deb2188e8ee50e4753ad6340679b425
56,846,283,803,871,710,000,000,000,000,000,000,000
12
Added missing allocation checks
static int request_inlink(AVFilterContext *ctx, int lid) { int ret = 0; FieldMatchContext *fm = ctx->priv; if (!fm->got_frame[lid]) { AVFilterLink *inlink = ctx->inputs[lid]; ret = ff_request_frame(inlink); if (ret == AVERROR_EOF) { // flushing fm->eof |= 1 << lid; ...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
e43a0a232dbf6d3c161823c2e07c52e76227a1bc
263,901,384,133,854,200,000,000,000,000,000,000,000
15
avfilter: fix plane validity checks Fixes out of array accesses Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
virDomainNetDefClear(virDomainNetDefPtr def) { if (!def) return; VIR_FREE(def->modelstr); def->model = VIR_DOMAIN_NET_MODEL_UNKNOWN; switch (def->type) { case VIR_DOMAIN_NET_TYPE_VHOSTUSER: virObjectUnref(def->data.vhostuser); def->data.vhostuser = NULL; break; ...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
229,414,031,659,323,620,000,000,000,000,000,000,000
75
conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410 (v6.1.0-122-g3b076391be) we support http cookies. Since they may contain somewhat sensitive information we should not format them into the XML unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert...
static ssize_t srpt_tpg_enable_show(struct config_item *item, char *page) { struct se_portal_group *se_tpg = to_tpg(item); struct srpt_port *sport = container_of(se_tpg, struct srpt_port, port_tpg_1); return snprintf(page, PAGE_SIZE, "%d\n", (sport->enabled) ? 1: 0); }
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
21,005,523,481,963,027,000,000,000,000,000,000,000
7
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp) { int k, m, new_interface, blen, usg; Sg_request *srp; Sg_fd *fp; const sg_io_hdr_t *hp; const char * cp; unsigned int ms; k = 0; list_for_each_entry(fp, &sdp->sfds, sfd_siblings) { k++; read_lock(&fp->rq_list_lock); /* irqs already disa...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
286,981,354,788,536,530,000,000,000,000,000,000,000
64
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
void gf_propalloc_del(void *it) { GF_PropertyEntry *pe = (GF_PropertyEntry *)it; if (pe->prop.value.data.ptr) gf_free(pe->prop.value.data.ptr); gf_free(pe); }
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
128,576,820,427,318,830,000,000,000,000,000,000,000
6
fixed crashes for very long path - cf #1908
inline WordCount SegmentReader::getSize() { return ptr.size() * WORDS; }
0
[ "CWE-400", "CWE-703" ]
capnproto
104870608fde3c698483fdef6b97f093fc15685d
142,640,044,975,836,130,000,000,000,000,000,000,000
1
SECURITY: CPU usage amplification attack. Details: https://github.com/sandstorm-io/capnproto/tree/master/security-advisories/2014-03-02-0-all-cpu-amplification.md
void GTextFieldReplace(GGadget *g,const unichar_t *txt) { GTextField *gt = (GTextField *) g; GTextField_Replace(gt,txt); _ggadget_redraw(g); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
17,327,077,618,182,080,000,000,000,000,000,000,000
6
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static ssize_t sock_read_iter(struct kiocb *iocb, struct iov_iter *to) { struct file *file = iocb->ki_filp; struct socket *sock = file->private_data; struct msghdr msg = {.msg_iter = *to, .msg_iocb = iocb}; ssize_t res; if (file->f_flags & O_NONBLOCK) msg.msg_flags = MSG_DONTWAIT; if (iocb->ki_pos != ...
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
97,840,772,891,450,800,000,000,000,000,000,000,000
21
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static void l2cap_sock_kill(struct sock *sk) { if (!sock_flag(sk, SOCK_ZAPPED) || sk->sk_socket) return; BT_DBG("sk %p state %d", sk, sk->sk_state); /* Kill poor orphan */ bt_sock_unlink(&l2cap_sk_list, sk); sock_set_flag(sk, SOCK_DEAD); sock_put(sk); }
0
[ "CWE-200", "CWE-119", "CWE-787" ]
linux
f2fcfcd670257236ebf2088bbdf26f6a8ef459fe
109,464,995,646,479,800,000,000,000,000,000,000,000
12
Bluetooth: Add configuration support for ERTM and Streaming mode Add support to config_req and config_rsp to configure ERTM and Streaming mode. If the remote device specifies ERTM or Streaming mode, then the same mode is proposed. Otherwise ERTM or Basic mode is used. And in case of a state 2 device, the remote device...
cliprdr_server_file_contents_response(CliprdrServerContext* context, const CLIPRDR_FILE_CONTENTS_RESPONSE* fileContentsResponse) { wStream* s; CliprdrServerPrivate* cliprdr = (CliprdrServerPrivate*)context->handle; if (fileContentsResponse->msgType != CB_FILECONTENTS_RESPONSE) ...
0
[]
FreeRDP
8e1a1b407565eb0a48923c796f5b1f69167b3c48
195,388,232,314,271,230,000,000,000,000,000,000,000
21
Fixed cliprdr_server_receive_capabilities Thanks to hac425 CVE-2020-11017, CVE-2020-11018
static bool glfs_check_config(const char *cfgstring, char **reason) { char *path; glfs_t *fs = NULL; glfs_fd_t *gfd = NULL; gluster_server *hosts = NULL; /* gluster server defination */ bool result = true; path = strchr(cfgstring, '/'); if (!path) { if (asprintf(reason, "No path found") == -1) *reason = NU...
1
[ "CWE-200", "CWE-119" ]
tcmu-runner
61bd03e600d2abf309173e9186f4d465bb1b7157
130,765,451,180,932,350,000,000,000,000,000,000,000
50
glfs: discard glfs_check_config Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
static char *SocketAddress_to_str(const char *prefix, SocketAddress *addr, bool is_listen, bool is_telnet) { switch (addr->type) { case SOCKET_ADDRESS_KIND_INET: return g_strdup_printf("%s%s:%s:%s%s", prefix, is_telnet ? "telnet" : "tcp", ...
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
35,962,169,119,267,830,000,000,000,000,000,000,000
24
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...
ARN(Partition partition, Service service, std::string region, std::string account, std::string resource) : partition(partition), service(service), region(std::move(region)), account(std::move(account)), resource(std::move(resource)) {}
0
[ "CWE-617" ]
ceph
b3118cabb8060a8cc6a01c4e8264cb18e7b1745a
243,082,397,489,354,500,000,000,000,000,000,000,000
4
rgw: Remove assertions in IAM Policy A couple of them could be triggered by user input. Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
static int mov_read_sdtp(MOVContext *c, AVIOContext *pb, MOVAtom atom) { AVStream *st; MOVStreamContext *sc; int64_t i, entries; if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams - 1]; sc = st->priv_data; avio_r8(pb); /* version */ avio_rb24(pb); /* fla...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
152,345,387,534,341,850,000,000,000,000,000,000,000
33
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
save_none(PicklerObject *self, PyObject *obj) { const char none_op = NONE; if (_Pickler_Write(self, &none_op, 1) < 0) return -1; return 0; }
0
[ "CWE-190", "CWE-369" ]
cpython
a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd
329,853,887,534,349,580,000,000,000,000,000,000,000
8
closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261)
sds sdsnewlen(const void *init, size_t initlen) { void *sh; sds s; char type = sdsReqType(initlen); /* Empty strings are usually created in order to append. Use type 8 * since type 5 is not good at this. */ if (type == SDS_TYPE_5 && initlen == 0) type = SDS_TYPE_8; int hdrlen = sdsHdrSize(t...
0
[ "CWE-190" ]
redis
c992857618db99776917f10bf4f2345a5fdc78b0
55,843,075,808,570,680,000,000,000,000,000,000,000
58
Fix integer overflow (CVE-2021-21309). (#8522) On 32-bit systems, setting the proto-max-bulk-len config parameter to a high value may result with integer overflow and a subsequent heap overflow when parsing an input bulk (CVE-2021-21309). This fix has two parts: Set a reasonable limit to the config parameter. Add ad...
static Image *ReadPANGOImage(const ImageInfo *image_info, ExceptionInfo *exception) { cairo_font_options_t *font_options; cairo_surface_t *surface; char *caption, *property; cairo_t *cairo_image; const char *option; DrawInfo *draw_info; Image *image; MagickBoolea...
0
[ "CWE-476" ]
ImageMagick
b4dd4d266f2d450a2996abf5294671d888991132
278,368,195,994,047,760,000,000,000,000,000,000,000
379
https://github.com/ImageMagick/ImageMagick/issues/1515
static void v4l_print_hw_freq_seek(const void *arg, bool write_only) { const struct v4l2_hw_freq_seek *p = arg; pr_cont("tuner=%u, type=%u, seek_upward=%u, wrap_around=%u, spacing=%u, rangelow=%u, rangehigh=%u\n", p->tuner, p->type, p->seek_upward, p->wrap_around, p->spacing, p->rangelow, p->rangehigh); }
0
[ "CWE-401" ]
linux
fb18802a338b36f675a388fc03d2aa504a0d0899
309,118,810,884,890,400,000,000,000,000,000,000,000
8
media: v4l: ioctl: Fix memory leak in video_usercopy When an IOCTL with argument size larger than 128 that also used array arguments were handled, two memory allocations were made but alas, only the latter one of them was released. This happened because there was only a single local variable to hold such a temporary a...
static point cvtPt(pointf p, int rankdir) { pointf q = { 0, 0 }; point Q; switch (rankdir) { case RANKDIR_TB: q = p; break; case RANKDIR_BT: q.x = p.x; q.y = -p.y; break; case RANKDIR_LR: q.y = p.x; q.x = -p.y; break; case RANKDIR_RL: q.y = p.x; q.x = p.y; break; } PF2P(q...
0
[ "CWE-120" ]
graphviz
784411ca3655c80da0f6025ab20634b2a6ff696b
117,170,972,878,816,580,000,000,000,000,000,000,000
25
fix: out-of-bounds write on invalid label When the label for a node cannot be parsed (due to it being malformed), it falls back on the symbol name of the node itself. I.e. the default label the node would have had if it had no label attribute at all. However, this is applied by dynamically altering the node's label to...
AP4_AtomSampleTable::GetChunkForSample(AP4_Ordinal sample_index, AP4_Ordinal& chunk_index, AP4_Ordinal& position_in_chunk, AP4_Ordinal& sample_description_index) { // default values chunk_index ...
0
[ "CWE-476", "CWE-703" ]
Bento4
4d3f0bebd5f8518fd775f671c12bea58c68e814e
11,837,729,038,027,187,000,000,000,000,000,000,000
27
fixed possible crashes on malformed inputs.
CIFSPOSIXDelFile(const int xid, struct cifs_tcon *tcon, const char *fileName, __u16 type, const struct nls_table *nls_codepage, int remap) { TRANSACTION2_SPI_REQ *pSMB = NULL; TRANSACTION2_SPI_RSP *pSMBr = NULL; struct unlink_psx_rq *pRqD; int name_len; int rc = 0; int bytes_returned = 0; __u16 params, param_...
0
[ "CWE-362", "CWE-119", "CWE-189" ]
linux
9438fabb73eb48055b58b89fc51e0bc4db22fabd
111,837,121,145,281,720,000,000,000,000,000,000,000
73
cifs: fix possible memory corruption in CIFSFindNext The name_len variable in CIFSFindNext is a signed int that gets set to the resume_name_len in the cifs_search_info. The resume_name_len however is unsigned and for some infolevels is populated directly from a 32 bit value sent by the server. If the server sends a v...
static MAIN_WINDOW_REC *mainwindows_find_lower_right(MAIN_WINDOW_REC *window) { MAIN_WINDOW_REC *best; best = mainwindows_find_right(window, FALSE); if (best == NULL) best = mainwindows_find_lower(window); return best; }
0
[ "CWE-476" ]
irssi
5b5bfef03596d95079c728f65f523570dd7b03aa
103,284,169,800,834,900,000,000,000,000,000,000,000
10
check the error condition of mainwindow_create
R_API int r_core_bin_info(RCore *core, int action, int mode, int va, RCoreBinFilter *filter, const char *chksum) { int ret = true; const char *name = NULL; ut64 at = 0, loadaddr = r_bin_get_laddr (core->bin); if (filter && filter->offset) { at = filter->offset; } if (filter && filter->name) { name = filter->n...
0
[ "CWE-125" ]
radare2
1f37c04f2a762500222dda2459e6a04646feeedf
222,575,272,688,415,670,000,000,000,000,000,000,000
58
Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923)
rfbClientIteratorNext(rfbClientIteratorPtr i) { if(i->next == 0) { LOCK(rfbClientListMutex); i->next = i->screen->clientHead; UNLOCK(rfbClientListMutex); } else { IF_PTHREADS(rfbClientPtr cl = i->next); i->next = i->next->next; IF_PTHREADS(rfbDecrClientRef(cl)); } #ifdef LIBVNCSERVER_HAVE...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
101,233,728,978,456,490,000,000,000,000,000,000,000
22
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
static u32 mp4box_cleanup(u32 ret_code) { if (mpd_base_urls) { gf_free(mpd_base_urls); mpd_base_urls = NULL; } if (sdp_lines) { gf_free(sdp_lines); sdp_lines = NULL; } if (metas) { u32 i; for (i=0; i<nb_meta_act; i++) { if (metas[i].enc_type) gf_free(metas[i].enc_type); if (metas[i].mime_type) gf...
1
[ "CWE-401", "CWE-787" ]
gpac
a51f951b878c2b73c1d8e2f1518c7cdc5fb82c3f
126,590,748,491,658,280,000,000,000,000,000,000,000
105
fixed #1782 (fuzz)
static void ffs_attr_release(struct config_item *item) { struct f_fs_opts *opts = to_ffs_opts(item); usb_put_function_instance(&opts->func_inst); }
0
[ "CWE-416", "CWE-362" ]
linux
38740a5b87d53ceb89eb2c970150f6e94e00373a
71,915,950,101,651,795,000,000,000,000,000,000,000
6
usb: gadget: f_fs: Fix use-after-free When using asynchronous read or write operations on the USB endpoints the issuer of the IO request is notified by calling the ki_complete() callback of the submitted kiocb when the URB has been completed. Calling this ki_complete() callback will free kiocb. Make sure that the str...
uint32_t CompactProtocolWriter::writeI64(int64_t i64) { return apache::thrift::util::writeVarint( out_, apache::thrift::util::i64ToZigzag(i64)); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
333,248,443,542,118,200,000,000,000,000,000,000,000
4
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
void hsetnxCommand(client *c) { robj *o; if ((o = hashTypeLookupWriteOrCreate(c,c->argv[1])) == NULL) return; hashTypeTryConversion(o,c->argv,2,3); if (hashTypeExists(o, c->argv[2]->ptr)) { addReply(c, shared.czero); } else { hashTypeSet(o,c->argv[2]->ptr,c->argv[3]->ptr,HASH_SET_CO...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
250,120,020,960,978,800,000,000,000,000,000,000,000
15
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
opaque* Data::set_buffer() { return buffer_; }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
260,063,893,327,807,770,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
dtls1_reset_seq_numbers(SSL *s, int rw) { unsigned char *seq; unsigned int seq_bytes = sizeof(s->s3->read_sequence); if ( rw & SSL3_CC_READ) { seq = s->s3->read_sequence; s->d1->r_epoch++; pq_64bit_assign(&(s->d1->bitmap.map), &(s->d1->next_bitmap.map)); s->d1->bitmap.length = s->d1->next_bitmap.length;...
0
[ "CWE-310" ]
openssl
270881316664396326c461ec7a124aec2c6cc081
107,187,447,442,309,180,000,000,000,000,000,000,000
30
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
maybe_make_export_env () { register char **temp_array; int new_size; VAR_CONTEXT *tcxt; if (array_needs_making) { if (export_env) strvec_flush (export_env); /* Make a guess based on how many shell variables and functions we have. Since there will always be array variables, and array vari...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
85,568,548,473,618,570,000,000,000,000,000,000,000
57
commit bash-20120224 snapshot
static void do_refine_retval_range(struct bpf_reg_state *regs, int ret_type, int func_id, struct bpf_call_arg_meta *meta) { struct bpf_reg_state *ret_reg = &regs[BPF_REG_0]; if (ret_type != RET_INTEGER || (func_id != BPF_FUNC_get_stack && func_id != BPF_FUNC_get_task_stack && func_id !...
0
[ "CWE-125" ]
bpf
049c4e13714ecbca567b4d5f6d563f05d431c80e
20,471,425,950,429,390,000,000,000,000,000,000,000
22
bpf: Fix alu32 const subreg bound tracking on bitwise operations Fix a bug in the verifier's scalar32_min_max_*() functions which leads to incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops. When both the src & dst subreg is a known constant, then the assumption is that scalar_min_max_*() will...
int udpv6_queue_rcv_skb(struct sock * sk, struct sk_buff *skb) { struct udp_sock *up = udp_sk(sk); int rc; int is_udplite = IS_UDPLITE(sk); if (!xfrm6_policy_check(sk, XFRM_POLICY_IN, skb)) goto drop; /* * UDP-Lite specific tests, ignored on UDP sockets (see net/ipv4/udp.c). */ if ((is_udplite & UDPLITE_R...
0
[ "CWE-400" ]
linux-2.6
c377411f2494a931ff7facdbb3a6839b1266bcf6
132,724,640,538,291,070,000,000,000,000,000,000,000
49
net: sk_add_backlog() take rmem_alloc into account Current socket backlog limit is not enough to really stop DDOS attacks, because user thread spend many time to process a full backlog each round, and user might crazy spin on socket lock. We should add backlog size and receive_queue size (aka rmem_alloc) to pace writ...
int __init qib_dev_init(void) { int ret; ret = alloc_chrdev_region(&qib_dev, 0, QIB_NMINORS, QIB_DRV_NAME); if (ret < 0) { pr_err("Could not allocate chrdev region (err %d)\n", -ret); goto done; } qib_class = class_create(THIS_MODULE, "ipath"); if (IS_ERR(qib_class)) { ret = PTR_ERR(qib_class); pr_err("...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
320,334,424,778,173,260,000,000,000,000,000,000,000
20
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
int luaRaiseError(lua_State *lua) { lua_pushstring(lua,"err"); lua_gettable(lua,-2); return lua_error(lua); }
0
[ "CWE-703", "CWE-125" ]
redis
6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd
113,052,696,550,703,340,000,000,000,000,000,000,000
5
Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672) The protocol parsing on 'ldbReplParseCommand' (LUA debugging) Assumed protocol correctness. This means that if the following is given: *1 $100 test The parser will try to read additional 94 unallocated bytes after the client buffer. This commit fixes this ...
static MagickBooleanType WriteTGAImage(const ImageInfo *image_info,Image *image, ExceptionInfo *exception) { CompressionType compression; const char *comment, *value; const double midpoint = QuantumRange/2.0; MagickBooleanType status; QuantumAny range; register const Quantum ...
0
[ "CWE-772" ]
ImageMagick
fbb5e1c8211c4e88ecc367e784b79d457c300d6d
279,308,591,518,528,140,000,000,000,000,000,000,000
287
...
static DH *load_dh_param(const char *dhfile) { DH *ret = NULL; BIO *bio; if ((bio = BIO_new_file(dhfile, "r")) == NULL) goto err; ret = PEM_read_bio_DHparams(bio, NULL, NULL, NULL); err: BIO_free(bio); return (ret); }
0
[ "CWE-399" ]
openssl
380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e
32,439,550,455,536,370,000,000,000,000,000,000,000
12
CVE-2016-0798: avoid memory leak in SRP The SRP user database lookup method SRP_VBASE_get_by_user had confusing memory management semantics; the returned pointer was sometimes newly allocated, and sometimes owned by the callee. The calling code has no way of distinguishing these two cases. Specifically, SRP servers t...
static int cirrus_bitblt_solidfill(CirrusVGAState *s, int blt_rop) { cirrus_fill_t rop_func; if (BLTUNSAFE(s)) return 0; rop_func = cirrus_fill[rop_to_index[blt_rop]][s->cirrus_blt_pixelwidth - 1]; rop_func(s, s->vram_ptr + (s->cirrus_blt_dstaddr & s->cirrus_addr_mask), s->cirrus_b...
0
[ "CWE-787" ]
qemu
b2eb849d4b1fdb6f35d5c46958c7f703cf64cfef
100,462,643,454,757,230,000,000,000,000,000,000,000
16
CVE-2007-1320 - Cirrus LGD-54XX "bitblt" heap overflow I have just noticed that patch for CVE-2007-1320 has never been applied to the QEMU CVS. Please find it below. | Multiple heap-based buffer overflows in the cirrus_invalidate_region | function in the Cirrus VGA extension in QEMU 0.8.2, as used in Xen and | possib...
int btrfs_open_devices(struct btrfs_fs_devices *fs_devices, fmode_t flags, void *holder) { int ret; lockdep_assert_held(&uuid_mutex); /* * The device_list_mutex cannot be taken here in case opening the * underlying device takes further locks like open_mutex. * * We also don't need the lock here as ...
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
54,329,608,787,692,470,000,000,000,000,000,000,000
24
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
void ext4_evict_inode(struct inode *inode) { handle_t *handle; int err; trace_ext4_evict_inode(inode); if (inode->i_nlink) { /* * When journalling data dirty buffers are tracked only in the * journal. So although mm thinks everything is clean and * ready for reaping the inode might still have some page...
0
[ "CWE-200" ]
linux
06bd3c36a733ac27962fea7d6f47168841376824
118,146,275,943,072,820,000,000,000,000,000,000,000
129
ext4: fix data exposure after a crash Huang has reported that in his powerfail testing he is seeing stale block contents in some of recently allocated blocks although he mounts ext4 in data=ordered mode. After some investigation I have found out that indeed when delayed allocation is used, we don't add inode to transa...
execlists_schedule_out(struct i915_request *rq) { struct intel_context * const ce = rq->hw_context; struct intel_engine_cs *cur, *old; trace_i915_request_out(rq); old = READ_ONCE(ce->inflight); do cur = ptr_unmask_bits(old, 2) ? ptr_dec(old) : NULL; while (!try_cmpxchg(&ce->inflight, &old, cur)); if (!cur) ...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
93,952,199,870,277,440,000,000,000,000,000,000,000
16
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
register_precedence_second_symbol (symgraphlink **first, graphid sym) { if (!*first || sym < (*first)->id) *first = symgraphlink_new (sym, *first); else { symgraphlink *slist = *first; while (slist->next && slist->next->id <= sym) slist = slist->next; if (slist->id == sym) ...
0
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
30,807,876,156,089,488,000,000,000,000,000,000,000
19
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
void Server::handleCommand_ModChannelJoin(NetworkPacket *pkt) { std::string channel_name; *pkt >> channel_name; session_t peer_id = pkt->getPeerId(); NetworkPacket resp_pkt(TOCLIENT_MODCHANNEL_SIGNAL, 1 + 2 + channel_name.size(), peer_id); // Send signal to client to notify join succeed or not if (g_settings-...
0
[ "CWE-276" ]
minetest
3693b6871eba268ecc79b3f52d00d3cefe761131
68,827,097,102,986,490,000,000,000,000,000,000,000
24
Prevent players accessing inventories of other players (#10341)
static bool str2num(const SQChar *s,SQObjectPtr &res,SQInteger base) { SQChar *end; const SQChar *e = s; bool iseintbase = base > 13; //to fix error converting hexadecimals with e like 56f0791e bool isfloat = false; SQChar c; while((c = *e) != _SC('\0')) { if (c == _SC('.') || (!isei...
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
92,669,819,158,565,410,000,000,000,000,000,000,000
27
fix in thread.call
static void bnx2x_period_task(struct work_struct *work) { struct bnx2x *bp = container_of(work, struct bnx2x, period_task.work); if (!netif_running(bp->dev)) goto period_task_exit; if (CHIP_REV_IS_SLOW(bp)) { BNX2X_ERR("period task called on emulation, ignoring\n"); goto period_task_exit; } bnx2x_acquire_...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
129,921,673,501,460,260,000,000,000,000,000,000,000
30
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
bit_write_MC (Bit_Chain *dat, BITCODE_MC val) { int i, j; int negative = 0; unsigned char byte[5]; BITCODE_UMC mask = 0x0000007f; BITCODE_UMC value = (BITCODE_UMC)val; if (val < 0) { negative = 1; value = (BITCODE_UMC)-val; } for (i = 4, j = 0; i >= 0; i--, j += 7) { byte[i]...
1
[ "CWE-703", "CWE-125" ]
libredwg
95cc9300430d35feb05b06a9badf678419463dbe
319,504,494,838,733,500,000,000,000,000,000,000,000
31
encode: protect from stack under-flow From GH #178 fuzzing
static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { struct inode * inode = file_inode(file); void *page; ssize_t length; struct task_struct *task = get_proc_task(inode); length = -ESRCH; if (!task) goto out_no_task; /* A task may only write its...
0
[ "CWE-119" ]
linux
7f7ccc2ccc2e70c6054685f5e3522efa81556830
13,047,849,292,228,435,000,000,000,000,000,000,000
46
proc: do not access cmdline nor environ from file-backed areas proc_pid_cmdline_read() and environ_read() directly access the target process' VM to retrieve the command line and environment. If this process remaps these areas onto a file via mmap(), the requesting process may experience various issues such as extra de...
UsbHubCtrlSetPortFeature ( IN USB_DEVICE *HubDev, IN UINT8 Port, IN UINT8 Feature ) { EFI_STATUS Status; // // In USB bus, all the port index starts from 0. But HUB // indexes its port from 1. So, port number is added one. // Status =...
0
[ "CWE-787" ]
edk2
acebdf14c985c5c9f50b37ece0b15ada87767359
186,972,134,709,826,320,000,000,000,000,000,000,000
26
MdeModulePkg UsbBusDxe: Fix wrong buffer length used to read hub desc REF: https://bugzilla.tianocore.org/show_bug.cgi?id=973 HUB descriptor has variable length. But the code uses stack (HubDesc in UsbHubInit) with fixed length sizeof(EFI_USB_HUB_DESCRIPTOR) to hold HUB descriptor data. It uses hard code length value...
TEST(HttpUtility, ValidateStreamErrors) { // Both false, the result should be false. envoy::config::core::v3::Http2ProtocolOptions http2_options; EXPECT_FALSE(Envoy::Http2::Utility::initializeAndValidateOptions(http2_options) .override_stream_error_on_invalid_http_message() ....
0
[]
envoy
3b5acb2f43548862dadb243de7cf3994986a8e04
331,171,247,132,119,300,000,000,000,000,000,000,000
27
http, url: Bring back chromium_url and http_parser_parse_url (#198) * Revert GURL as HTTP URL parser utility This reverts: 1. commit c9c4709c844b90b9bb2935d784a428d667c9df7d 2. commit d828958b591a6d79f4b5fa608ece9962b7afbe32 3. commit 2d69e30c51f2418faf267aaa6c1126fce9948c62 Signed-off-by: Dhi Aurrahman <dio@tetrat...
static void spl_dllist_it_helper_rewind(spl_ptr_llist_element **traverse_pointer_ptr, int *traverse_position_ptr, spl_ptr_llist *llist, int flags) /* {{{ */ { SPL_LLIST_CHECK_DELREF(*traverse_pointer_ptr); if (flags & SPL_DLLIST_IT_LIFO) { *traverse_position_ptr = llist->count-1; *traverse_pointer_ptr = llist->...
0
[ "CWE-415" ]
php-src
28a6ed9f9a36b9c517e4a8a429baf4dd382fc5d5
332,059,853,692,566,400,000,000,000,000,000,000,000
14
Fix bug #71735: Double-free in SplDoublyLinkedList::offsetSet
inline void Logistic(const LogisticParams& params, const RuntimeShape& input_shape, const uint8* input_data, const RuntimeShape& output_shape, uint8* output_data) { const int32 input_zero_point = params.input_zero_point; const int32 input_range_radius = params.input_range_r...
0
[ "CWE-703", "CWE-835" ]
tensorflow
dfa22b348b70bb89d6d6ec0ff53973bacb4f4695
236,031,690,480,123,120,000,000,000,000,000,000,000
40
Prevent a division by 0 in average ops. PiperOrigin-RevId: 385184660 Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3
static struct net_bridge_mdb_entry *br_mdb_ip6_get( struct net_bridge_mdb_htable *mdb, const struct in6_addr *dst, __u16 vid) { struct br_ip br_dst; br_dst.u.ip6 = *dst; br_dst.proto = htons(ETH_P_IPV6); br_dst.vid = vid; return br_mdb_ip_get(mdb, &br_dst); }
0
[ "CWE-20" ]
linux
c7e8e8a8f7a70b343ca1e0f90a31e35ab2d16de1
52,064,511,335,908,170,000,000,000,000,000,000,000
12
bridge: fix some kernel warning in multicast timer Several people reported the warning: "kernel BUG at kernel/timer.c:729!" and the stack trace is: #7 [ffff880214d25c10] mod_timer+501 at ffffffff8106d905 #8 [ffff880214d25c50] br_multicast_del_pg.isra.20+261 at ffffffffa0731d25 [bridge] #9 [ffff880214d25c80] br_mul...
static void PrintHelp(char *arg_name, Bool search_desc, Bool no_match) { GF_FilterSession *fs; Bool res; fs = gf_fs_new_defaults(0); if (arg_name[0]=='-') arg_name++; if (search_desc) { char *_arg_name = gf_strdup(arg_name); strlwr(_arg_name); GF_LOG(GF_LOG_INFO, GF_LOG_APP, ("Possible options mentionni...
0
[ "CWE-476" ]
gpac
87afe070cd6866df7fe80f11b26ef75161de85e0
210,944,693,864,809,630,000,000,000,000,000,000,000
28
fixed #1734
sctp_disposition_t sctp_sf_do_asconf_ack(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *asconf_ack = arg; struct sctp_chunk *last_asconf = asoc->addip_last_asconf; struct sctp_chunk *abort; ...
0
[]
linux-2.6
7c3ceb4fb9667f34f1599a062efecf4cdc4a4ce5
97,298,734,192,598,880,000,000,000,000,000,000,000
88
[SCTP]: Allow spillover of receive buffer to avoid deadlock. This patch fixes a deadlock situation in the receive path by allowing temporary spillover of the receive buffer. - If the chunk we receive has a tsn that immediately follows the ctsn, accept it even if we run out of receive buffer space and renege data wi...
struct nfs_client *nfs_find_client(const struct sockaddr_in *addr, int nfsversion) { struct nfs_client *clp; spin_lock(&nfs_client_lock); clp = __nfs_find_client(addr, nfsversion, 0); spin_unlock(&nfs_client_lock); if (clp != NULL && clp->cl_cons_state != NFS_CS_READY) { nfs_put_client(clp); clp = NULL; } r...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
150,510,113,458,698,880,000,000,000,000,000,000,000
13
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
static int uvc_parse_format(struct uvc_device *dev, struct uvc_streaming *streaming, struct uvc_format *format, __u32 **intervals, unsigned char *buffer, int buflen) { struct usb_interface *intf = streaming->intf; struct usb_host_interface *alts = intf->cur_altsetting; struct uvc_format_desc *fmtdesc; struct uvc_...
0
[ "CWE-120" ]
linux-2.6
233548a2fd934a0220db8b1521c0bc88c82e5e53
150,119,088,002,575,820,000,000,000,000,000,000,000
234
V4L/DVB (8207): uvcvideo: Fix a buffer overflow in format descriptor parsing Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
convert_sig_counter_value (const unsigned char *value, size_t valuelen) { unsigned long ul; if (valuelen == 3 ) ul = (value[0] << 16) | (value[1] << 8) | value[2]; else { log_error (_("invalid structure of OpenPGP card (DO 0x93)\n")); ul = 0; } return ul; }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
105,448,504,244,734,680,000,000,000,000,000,000,000
13
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 void FVMenuMATHInfo(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); SFMathDlg(fv->b.sf,fv->b.active_layer); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
290,320,532,360,096,350,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
i40e_aqc_broadcast_filter(struct i40e_vsi *vsi, const char *vsi_name, struct i40e_mac_filter *f) { bool enable = f->state == I40E_FILTER_NEW; struct i40e_hw *hw = &vsi->back->hw; i40e_status aq_ret; if (f->vlan == I40E_VLAN_ANY) { aq_ret = i40e_aq_set_vsi_broadcast(hw, vsi->seid, enable, ...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
146,191,131,197,365,070,000,000,000,000,000,000,000
30
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
void PreventDefault(gin_helper::Arguments* args) { Dictionary self; if (args->GetHolder(&self)) self.Set("defaultPrevented", true); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
174,677,702,774,792,650,000,000,000,000,000,000,000
5
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 ...
static void nasm_verror_vc(int severity, const char *fmt, va_list ap) { const char *currentfile = NULL; int32_t lineno = 0; if (is_suppressed_warning(severity)) return; if (!(severity & ERR_NOFILE)) src_get(&lineno, &currentfile); if (!skip_this_pass(severity)) { if (curre...
0
[ "CWE-476" ]
nasm
e996d28c70d45008085322b442b44a9224308548
155,829,824,160,768,540,000,000,000,000,000,000,000
21
labels: Don't nil dereference if no label provided An equ without label may cause nil dereference | equ 0x100 Fixes 98578071b9d71ecaa2344dd9c185237c1765041e Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
process_memblt(STREAM s, MEMBLT_ORDER * os, uint32 present, RD_BOOL delta) { RD_HBITMAP bitmap; if (present & 0x0001) { in_uint8(s, os->cache_id); in_uint8(s, os->colour_table); } if (present & 0x0002) rdp_in_coord(s, &os->x, delta); if (present & 0x0004) rdp_in_coord(s, &os->y, delta); if (present &...
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
113,973,612,577,086,710,000,000,000,000,000,000,000
43
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
void mutt_expand_file_fmt (char *dest, size_t destlen, const char *fmt, const char *src) { char tmp[LONG_STRING]; mutt_quote_filename (tmp, sizeof (tmp), src); mutt_expand_fmt (dest, destlen, fmt, tmp); }
0
[ "CWE-668" ]
mutt
6d0624411a979e2e1d76af4dd97d03f47679ea4a
326,115,499,705,621,360,000,000,000,000,000,000,000
7
use a 64-bit random value in temporary filenames. closes #3158