func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt)
{
MYSQL *mysql= stmt->mysql;
MYSQL_DATA *result= &stmt->result;
DBUG_ENTER("mysql_stmt_store_result");
if (!mysql)
{
/* mysql can be reset in mysql_close called from mysql_reconnect */
set_stmt_error(stmt, CR_SERVER_LOST, unknown_sqlstate, NULL);
... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 93,999,481,503,327,160,000,000,000,000,000,000,000 | 110 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
static int mnt_optstr_locate_option(char *optstr, const char *name,
struct libmnt_optloc *ol)
{
char *n;
size_t namesz, nsz;
int rc;
if (!optstr)
return 1;
assert(name);
namesz = strlen(name);
do {
rc = mnt_optstr_parse_next(&optstr, &n, &nsz,
&ol->value, &ol->valsz);
if (rc)
break;
if ... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 57202f5713afa2af20ffbb6ab5331481d0396f8d | 235,280,143,139,768,200,000,000,000,000,000,000,000 | 30 | libmount: fix UID check for FUSE umount [CVE-2021-3995]
Improper UID check allows an unprivileged user to unmount FUSE
filesystems of users with similar UID.
Signed-off-by: Karel Zak <kzak@redhat.com> |
cleanup_tang_keys_info(struct tang_keys_info** tki)
{
if (!tki || !*tki) {
return;
}
free_tang_keys_info(*tki);
*tki = NULL;
} | 0 | [
"CWE-200"
] | tang | e82459fda10f0630c3414ed2afbc6320bb9ea7c9 | 11,117,142,439,680,152,000,000,000,000,000,000,000 | 8 | keys: move signing part out of find_by_thp() and to find_jws() (#81)
Handle just signing keys in find_jws(), to make sure we are
responding only to proper queries.
Tests were also failing to detect this issue and were updated
accordingly.
Issue discovered by Twitter Kernel and OS team during a source
code aud... |
static const ut8 *r_bin_dwarf_parse_attr_value(const ut8 *obuf, int obuf_len,
RBinDwarfAttrSpec *spec, RBinDwarfAttrValue *value,
const RBinDwarfCompUnitHdr *hdr,
const ut8 *debug_str, size_t debug_str_len) {
const ut8 *buf = obuf;
const ut8 *buf_end = obuf + obuf_len;
size_t j;
if (!spec || !value || !hdr |... | 0 | [
"CWE-119",
"CWE-125"
] | radare2 | d37d2b858ac47f2f108034be0bcecadaddfbc8b3 | 228,185,248,678,718,570,000,000,000,000,000,000,000 | 146 | Fix #10465 - Avoid string on low addresses (workaround) for corrupted dwarf (#10478) |
static int php_openssl_parse_config(struct php_x509_request * req, zval * optional_args TSRMLS_DC) /* {{{ */
{
char * str;
zval ** item;
SET_OPTIONAL_STRING_ARG("config", req->config_filename, default_ssl_conf_filename);
SET_OPTIONAL_STRING_ARG("config_section_name", req->section_name, "req");
req->global_config ... | 0 | [
"CWE-20"
] | php-src | 2874696a5a8d46639d261571f915c493cd875897 | 32,386,466,397,133,280,000,000,000,000,000,000,000 | 90 | Fix CVE-2013-4073 - handling of certs with null bytes |
ext4_force_split_extent_at(handle_t *handle, struct inode *inode,
struct ext4_ext_path **ppath, ext4_lblk_t lblk,
int nofail)
{
struct ext4_ext_path *path = *ppath;
int unwritten = ext4_ext_is_unwritten(path[path->p_depth].p_ext);
return ext4_split_extent_at(handle, inode, ppath, lblk, unwritten ?
EX... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 17,086,558,869,227,006,000,000,000,000,000,000,000 | 12 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
void update_rlimit_cpu(struct task_struct *task, unsigned long rlim_new)
{
u64 nsecs = rlim_new * NSEC_PER_SEC;
spin_lock_irq(&task->sighand->siglock);
set_process_cpu_timer(task, CPUCLOCK_PROF, &nsecs, NULL);
spin_unlock_irq(&task->sighand->siglock);
} | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 168,894,845,593,170,200,000,000,000,000,000,000,000 | 8 | 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... |
static void control_connect_cb(GIOChannel *chan, GError *conn_err,
gpointer user_data)
{
struct input_device *idev = user_data;
GIOCondition cond = G_IO_HUP | G_IO_ERR | G_IO_NVAL;
GIOChannel *io;
GError *err = NULL;
if (conn_err) {
error("%s", conn_err->message);
goto failed;
}
/* Connect to the HI... | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 71,985,906,108,476,530,000,000,000,000,000,000,000 | 42 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
static u32 create_new_track_action(char *string, TrackAction **actions, u32 *nb_track_act, u32 dump_type)
{
*actions = (TrackAction *)gf_realloc(*actions, sizeof(TrackAction) * (*nb_track_act+1));
memset(&(*actions)[*nb_track_act], 0, sizeof(TrackAction) );
(*actions)[*nb_track_act].act_type = TRAC_ACTION_RAW_EXTRAC... | 0 | [
"CWE-476"
] | gpac | 9eeac00b38348c664dfeae2525bba0cf1bc32349 | 67,915,822,707,117,540,000,000,000,000,000,000,000 | 10 | fixed #1565 |
compress_worker_thread_func(void *arg)
{
comp_thread_ctxt_t *thd = (comp_thread_ctxt_t *) arg;
pthread_mutex_lock(&thd->ctrl_mutex);
pthread_mutex_lock(&thd->data_mutex);
thd->started = TRUE;
pthread_cond_signal(&thd->ctrl_cond);
pthread_mutex_unlock(&thd->ctrl_mutex);
while (1) {
thd->data_avail = FALSE;... | 0 | [
"CWE-404",
"CWE-703"
] | server | e1eb39a446c30b8459c39fd7f2ee1c55a36e97d2 | 276,558,419,659,804,720,000,000,000,000,000,000,000 | 44 | MDEV-26561 Fix a bug due to unreleased lock
Fix a bug of unreleased lock ctrl_mutex in the method create_worker_threads |
catch_handler_find(mrb_state *mrb, mrb_callinfo *ci, const mrb_code *pc, uint32_t filter)
{
const mrb_irep *irep;
ptrdiff_t xpc;
size_t cnt;
const struct mrb_irep_catch_handler *e;
/* The comparison operators use `>` and `<=` because pc already points to the next instruction */
#define catch_cover_p(pc, beg, e... | 0 | [
"CWE-122",
"CWE-787"
] | mruby | 47068ae07a5fa3aa9a1879cdfe98a9ce0f339299 | 254,469,589,937,699,040,000,000,000,000,000,000,000 | 32 | vm.c: packed arguments length may be zero for `send` method. |
static void store_tree(struct tree_entry *root)
{
struct tree_content *t;
unsigned int i, j, del;
struct last_object lo = { STRBUF_INIT, 0, 0, /* no_swap */ 1 };
struct object_entry *le = NULL;
if (!is_null_oid(&root->versions[1].oid))
return;
if (!root->tree)
load_tree(root);
t = root->tree;
for (i = 0;... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 42,287,703,238,983,510,000,000,000,000,000,000,000 | 45 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
static void virtio_net_vhost_status(VirtIONet *n, uint8_t status)
{
VirtIODevice *vdev = VIRTIO_DEVICE(n);
NetClientState *nc = qemu_get_queue(n->nic);
int queue_pairs = n->multiqueue ? n->max_queue_pairs : 1;
int cvq = n->max_ncs - n->max_queue_pairs;
if (!get_vhost_net(nc->peer)) {
return... | 0 | [
"CWE-703"
] | qemu | abe300d9d894f7138e1af7c8e9c88c04bfe98b37 | 89,778,285,294,281,370,000,000,000,000,000,000,000 | 58 | virtio-net: fix map leaking on error during receive
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
tries to fix the use after free of the sg by caching the virtqueue
elements in an array and unmap them at once after receiving the
packets, But it forgot to unmap the cached elements on error which
... |
inline void format_decimal(Char *buffer, UInt value, unsigned num_digits) {
format_decimal(buffer, value, num_digits, NoThousandsSep());
return;
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 294,598,023,984,226,630,000,000,000,000,000,000,000 | 4 | Fix segfault on complex pointer formatting (#642) |
void set_transfer_characteristics(uint64_t transfer_characteristics) {
transfer_characteristics_ = transfer_characteristics;
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 298,987,158,617,973,100,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static enum hrtimer_restart kvmppc_decrementer_wakeup(struct hrtimer *timer)
{
struct kvm_vcpu *vcpu;
vcpu = container_of(timer, struct kvm_vcpu, arch.dec_timer);
kvmppc_decrementer_func(vcpu);
return HRTIMER_NORESTART;
} | 0 | [
"CWE-476"
] | linux | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 | 90,541,396,684,684,280,000,000,000,000,000,000,000 | 9 | KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
The following program causes a kernel oops:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kvm.h>
main()
{
int fd = open("/dev/kvm", O_RDWR);
ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
}
This happe... |
list_add_event(struct perf_event *event, struct perf_event_context *ctx)
{
lockdep_assert_held(&ctx->lock);
WARN_ON_ONCE(event->attach_state & PERF_ATTACH_CONTEXT);
event->attach_state |= PERF_ATTACH_CONTEXT;
/*
* If we're a stand alone event or group leader, we go to the context
* list, group events are kep... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 214,147,864,104,298,500,000,000,000,000,000,000,000 | 31 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
static int x509_get_dates( unsigned char **p,
const unsigned char *end,
x509_time *from,
x509_time *to )
{
int ret;
size_t len;
if( ( ret = asn1_get_tag( p, end, &len,
ASN1_CONSTRUCTED | ASN1_SEQUENCE ) ) != 0 )
... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 2,510,234,978,336,281,500,000,000,000,000,000,000 | 26 | RSA blinding on CRT operations to counter timing attacks |
int __init cgroup_init_early(void)
{
static struct cgroup_fs_context __initdata ctx;
struct cgroup_subsys *ss;
int i;
ctx.root = &cgrp_dfl_root;
init_cgroup_root(&ctx);
cgrp_dfl_root.cgrp.self.flags |= CSS_NO_REF;
RCU_INIT_POINTER(init_task.cgroups, &init_css_set);
for_each_subsys(ss, i) {
WARN(!ss->css_al... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 178,728,729,715,521,200,000,000,000,000,000,000,000 | 30 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
my_wc_mb_item_name(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end)
{
if (wc == 0 || wc >= MY_NAME_BINARY_VALUE)
{
if (str + 4 >= end)
return MY_CS_TOOSMALL3;
str[0]= '\\';
str[1]= 'x';
str[2]= _dig_vec_upper[(uchar) (wc >> 4)];
str[3]= _dig_vec_upper[(uchar) wc & 0x0F];
return 4;... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 225,170,084,559,511,070,000,000,000,000,000,000,000 | 14 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
int boot_get_fdt_fit(bootm_headers_t *images, ulong addr,
const char **fit_unamep, const char **fit_uname_configp,
int arch, ulong *datap, ulong *lenp)
{
int fdt_noffset, cfg_noffset, count;
const void *fit;
const char *fit_uname = NULL;
const char *fit_uname_config = NULL;
char *fit_uname_config_copy = ... | 0 | [] | u-boot | 6f3c2d8aa5e6cbd80b5e869bbbddecb66c329d01 | 253,276,316,630,250,830,000,000,000,000,000,000,000 | 150 | image: Add an option to do a full check of the FIT
Some strange modifications of the FIT can introduce security risks. Add an
option to check it thoroughly, using libfdt's fdt_check_full() function.
Enable this by default if signature verification is enabled.
CVE-2021-27097
Signed-off-by: Simon Glass <sjg@chromium.... |
void CL_SendPureChecksums( void ) {
char cMsg[MAX_INFO_VALUE];
// if we are pure we need to send back a command with our referenced pk3 checksums
Com_sprintf(cMsg, sizeof(cMsg), "cp %d %s", cl.serverId, FS_ReferencedPakPureChecksums());
CL_AddReliableCommand(cMsg, qfalse);
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 229,082,582,242,852,870,000,000,000,000,000,000,000 | 8 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
data_timeout_handler(int sig)
{
uschar *msg = NULL;
sig = sig; /* Keep picky compilers happy */
if (smtp_input)
{
msg = US"SMTP incoming data timeout";
log_write(L_lost_incoming_connection,
LOG_MAIN, "SMTP data timeout (message abandoned) on connection "
"from %s F=<%s>",
... | 0 | [
"CWE-416"
] | exim | 4e6ae6235c68de243b1c2419027472d7659aa2b4 | 50,399,051,484,973,140,000,000,000,000,000,000,000 | 24 | Avoid release of store if there have been later allocations. Bug 2199 |
int hclge_pfc_tx_stats_get(struct hclge_dev *hdev, u64 *stats)
{
return hclge_pfc_stats_get(hdev, HCLGE_OPC_QUERY_PFC_TX_PKT_CNT, stats);
} | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 231,342,577,541,202,950,000,000,000,000,000,000,000 | 4 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
operator std::shared_ptr<Ope>() {
return std::make_shared<WeakHolder>(holder_);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 257,506,575,208,300,060,000,000,000,000,000,000,000 | 3 | Fix #122 |
R_API char *r_str_sanitize_sdb_key(const char *s) {
if (!s || !*s) {
return NULL;
}
size_t len = strlen (s);
char *ret = malloc (len + 1);
if (!ret) {
return NULL;
}
char *cur = ret;
while (len > 0) {
char c = *s;
if (!(c >= 'a' && c <= 'z') && !(c >= 'A' && c <= 'Z') && !(c >= '0' && c <= '9')
&& c ... | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 252,188,718,175,966,630,000,000,000,000,000,000,000 | 24 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
int EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size)
{
int ret;
ret = EVP_DigestFinal_ex(ctx, md, size);
EVP_MD_CTX_cleanup(ctx);
return ret;
} | 0 | [] | openssl | a6c62f0c25a756c263a80ce52afbae888028e986 | 297,250,126,736,056,600,000,000,000,000,000,000,000 | 7 | Ignore NULL parameter in EVP_MD_CTX_destroy. |
void cgit_print_layout_end(void)
{
cgit_print_docend();
} | 0 | [] | cgit | 513b3863d999f91b47d7e9f26710390db55f9463 | 35,937,882,866,873,815,000,000,000,000,000,000,000 | 4 | ui-shared: prevent malicious filename from injecting headers |
connection_handle_read_post_chunked_crlf (chunkqueue * const cq)
{
/* caller might check chunkqueue_length(cq) >= 2 before calling here
* to limit return value to either 1 for good or -1 for error */
chunk *c;
buffer *b;
char *p;
size_t len;
/* caller must have called chunkqueue_remove_fin... | 0 | [
"CWE-703"
] | lighttpd1.4 | b03b86f47b0d5a553137f081fadc482b4af1372d | 328,929,452,905,217,140,000,000,000,000,000,000,000 | 30 | [core] fix merging large headers across mult reads (fixes #3059)
(thx mitd)
x-ref:
"Connections stuck in Close_Wait causing 100% cpu usage"
https://redmine.lighttpd.net/issues/3059 |
void test_nghttp2_session_cancel_reserved_remote(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
nghttp2_stream *stream;
nghttp2_frame frame;
nghttp2_nv *nva;
size_t nvlen;
nghttp2_hd_deflater deflater;
nghttp2_mem *mem;
nghttp2_bufs bufs;
ssize_t rv;
mem = nghttp2_mem_defa... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 92,871,351,266,442,370,000,000,000,000,000,000,000 | 79 | Add nghttp2_option_set_max_outbound_ack |
MODRET set_allowchrootsymlinks(cmd_rec *cmd) {
int allow_chroot_symlinks = -1;
config_rec *c = NULL;
CHECK_ARGS(cmd, 1);
CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL);
allow_chroot_symlinks = get_boolean(cmd, 1);
if (allow_chroot_symlinks == -1) {
CONF_ERROR(cmd, "expected Boolean parameter");
... | 0 | [
"CWE-59",
"CWE-295"
] | proftpd | 349addc3be4fcdad9bd4ec01ad1ccd916c898ed8 | 89,138,274,227,594,020,000,000,000,000,000,000,000 | 18 | Walk the entire DefaultRoot path, checking for symlinks of any component,
when AllowChrootSymlinks is disabled. |
virDomainHostdevSubsysPCIDefParseXML(xmlNodePtr node,
virDomainHostdevDefPtr def,
unsigned int flags)
{
xmlNodePtr cur;
cur = node->children;
while (cur != NULL) {
if (cur->type == XML_ELEMENT_NODE) {
if (virXMLNo... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 52,114,499,931,520,160,000,000,000,000,000,000,000 | 32 | 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 void add_missing(struct chfn_control *ctl)
{
ctl->newf.full_name = find_field(ctl->newf.full_name, ctl->oldf.full_name);
ctl->newf.office = find_field(ctl->newf.office, ctl->oldf.office);
ctl->newf.office_phone = find_field(ctl->newf.office_phone, ctl->oldf.office_phone);
ctl->newf.home_phone = find_field(ct... | 0 | [
"CWE-209"
] | util-linux | faa5a3a83ad0cb5e2c303edbfd8cd823c9d94c17 | 239,329,642,493,530,600,000,000,000,000,000,000,000 | 9 | chsh, chfn: remove readline support [CVE-2022-0563]
The readline library uses INPUTRC= environment variable to get a path
to the library config file. When the library cannot parse the
specified file, it prints an error message containing data from the
file.
Unfortunately, the library does not use secure_getenv() (or ... |
createFile(const string &filename, const StaticString &contents, mode_t permissions, uid_t owner,
gid_t group, bool overwrite)
{
FileDescriptor fd;
int ret, e, options;
options = O_WRONLY | O_CREAT | O_TRUNC;
if (!overwrite) {
options |= O_EXCL;
}
do {
fd = open(filename.c_str(), options, permissions);
} ... | 0 | [
"CWE-401"
] | passenger | 94428057c602da3d6d34ef75c78091066ecac5c0 | 139,620,250,135,469,100,000,000,000,000,000,000,000 | 60 | Fix a symlink-related security vulnerability.
The fix in commit 34b10878 and contained a small attack time window in
between two filesystem operations. This has been fixed. |
void GENERAL_NAME_set0_value(GENERAL_NAME *a, int type, void *value)
{
switch (type) {
case GEN_X400:
a->d.x400Address = value;
break;
case GEN_EDIPARTY:
a->d.ediPartyName = value;
break;
case GEN_OTHERNAME:
a->d.otherName = value;
break;
case GEN_E... | 0 | [
"CWE-476"
] | openssl | b33c48b75aaf33c93aeda42d7138616b9e6a64cb | 327,183,059,934,576,000,000,000,000,000,000,000,000 | 35 | Correctly compare EdiPartyName in GENERAL_NAME_cmp()
If a GENERAL_NAME field contained EdiPartyName data then it was
incorrectly being handled as type "other". This could lead to a
segmentation fault.
Many thanks to David Benjamin from Google for reporting this issue.
CVE-2020-1971
Reviewed-by: Tomas Mraz <tmraz@fe... |
static int nested_svm_load_cr3(struct kvm_vcpu *vcpu, unsigned long cr3,
bool nested_npt)
{
if (cr3 & rsvd_bits(cpuid_maxphyaddr(vcpu), 63))
return -EINVAL;
if (!nested_npt && is_pae_paging(vcpu) &&
(cr3 != kvm_read_cr3(vcpu) || pdptrs_changed(vcpu))) {
if (!load_pdptrs(vcpu, vcpu->arch.walk_mmu, ... | 0 | [
"CWE-416"
] | linux | a58d9166a756a0f4a6618e4f593232593d6df134 | 91,771,019,354,296,900,000,000,000,000,000,000,000 | 26 | KVM: SVM: load control fields from VMCB12 before checking them
Avoid races between check and use of the nested VMCB controls. This
for example ensures that the VMRUN intercept is always reflected to the
nested hypervisor, instead of being processed by the host. Without this
patch, it is possible to end up with svm->... |
void Item_in_optimizer::fix_after_pullout(st_select_lex *new_parent,
Item **ref, bool merge)
{
DBUG_ASSERT(fixed);
/* This will re-calculate attributes of our Item_in_subselect: */
Item_bool_func::fix_after_pullout(new_parent, ref, merge);
/* Then, re-calculate not_nul... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 52,725,860,411,927,070,000,000,000,000,000,000,000 | 10 | 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 ... |
static const char *parse_path(struct parse_state *state)
{
size_t mb;
const char *tmp;
TSRMLS_FETCH_FROM_CTX(state->ts);
/* is there actually a path to parse? */
if (!*state->ptr) {
return state->ptr;
}
tmp = state->ptr;
state->url.path = &state->buffer[state->offset];
do {
switch (*state->ptr) {
case ... | 0 | [
"CWE-119"
] | ext-http | 3724cd76a28be1d6049b5537232e97ac567ae1f5 | 279,062,431,061,093,300,000,000,000,000,000,000,000 | 67 | fix bug #71719 (Buffer overflow in HTTP url parsing functions)
The parser's offset was not reset when we softfail in scheme
parsing and continue to parse a path.
Thanks to hlt99 at blinkenshell dot org for the report. |
static unsigned int ipv6_defrag(void *priv,
struct sk_buff *skb,
const struct nf_hook_state *state)
{
int err;
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
/* Previously seen (loopback)? */
if (skb->nfct && !nf_ct_is_template((struct nf_conn *)skb->nfct))
return NF_ACCEPT;
#endif
err = nf_ct_frag6_gather(state->... | 0 | [
"CWE-787"
] | linux | 9b57da0630c9fd36ed7a20fc0f98dc82cc0777fa | 11,993,741,266,857,054,000,000,000,000,000,000,000 | 20 | netfilter: ipv6: nf_defrag: drop mangled skb on ream error
Dmitry Vyukov reported GPF in network stack that Andrey traced down to
negative nh offset in nf_ct_frag6_queue().
Problem is that all network headers before fragment header are pulled.
Normal ipv6 reassembly will drop the skb when errors occur further down
th... |
int ar6000_remove_ap_interface(struct ar6_softc *ar)
{
if (arApNetDev) {
ar6000_stop_ap_interface(ar);
unregister_netdev(arApNetDev);
free_netdev(apApNetDev);
A_PRINTF("Remove AP interface\n");
}
ar->arApDev = NULL;
arApNetDev = NULL;
return 0;
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 213,008,679,597,324,200,000,000,000,000,000,000,000 | 16 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
_outArrayCoerceExpr(StringInfo str, const ArrayCoerceExpr *node)
{
WRITE_NODE_TYPE("ARRAYCOERCEEXPR");
WRITE_NODE_FIELD(arg);
WRITE_OID_FIELD(elemfuncid);
WRITE_OID_FIELD(resulttype);
WRITE_INT_FIELD(resulttypmod);
WRITE_OID_FIELD(resultcollid);
WRITE_BOOL_FIELD(isExplicit);
WRITE_ENUM_FIELD(coerceformat, Coer... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 191,040,988,863,404,750,000,000,000,000,000,000,000 | 13 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static BOOL nsc_context_initialize(NSC_CONTEXT* context, wStream* s)
{
int i;
UINT32 length;
UINT32 tempWidth;
UINT32 tempHeight;
if (!nsc_stream_initialize(context, s))
return FALSE;
length = context->width * context->height * 4;
if (!context->BitmapData)
{
context->BitmapData = calloc(1, length + 16);
... | 0 | [
"CWE-200",
"CWE-787"
] | FreeRDP | d1112c279bd1a327e8e4d0b5f371458bf2579659 | 53,143,752,765,632,390,000,000,000,000,000,000,000 | 67 | Fixed CVE-2018-8788
Thanks to Eyal Itkin from Check Point Software Technologies. |
static int em_rdmsr(struct x86_emulate_ctxt *ctxt)
{
u64 msr_data;
if (ctxt->ops->get_msr(ctxt, ctxt->regs[VCPU_REGS_RCX], &msr_data))
return emulate_gp(ctxt, 0);
ctxt->regs[VCPU_REGS_RAX] = (u32)msr_data;
ctxt->regs[VCPU_REGS_RDX] = msr_data >> 32;
return X86EMUL_CONTINUE;
} | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 50,903,155,315,998,160,000,000,000,000,000,000,000 | 11 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
cdio_add_device_list(char **device_list[], const char *drive,
unsigned int *num_drives)
{
if (NULL != drive) {
unsigned int j;
char real_device_1[PATH_MAX];
char real_device_2[PATH_MAX];
cdio_realpath(drive, real_device_1);
/* Check if drive is already in list. */
for (j=0... | 0 | [
"CWE-415"
] | libcdio | dec2f876c2d7162da213429bce1a7140cdbdd734 | 293,789,250,877,261,220,000,000,000,000,000,000,000 | 33 | Removed wrong line |
static int io_fallocate(struct io_kiocb *req, unsigned int issue_flags)
{
int ret;
/* fallocate always requiring blocking context */
if (issue_flags & IO_URING_F_NONBLOCK)
return -EAGAIN;
ret = vfs_fallocate(req->file, req->sync.mode, req->sync.off,
req->sync.len);
if (ret < 0)
req_set_fail_links(req);
i... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 19,333,035,247,481,938,000,000,000,000,000,000,000 | 14 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static int xname_cmp(const X509_NAME * const *a, const X509_NAME * const *b)
{
return(X509_NAME_cmp(*a,*b));
} | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 159,227,457,722,032,480,000,000,000,000,000,000,000 | 4 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
static int arcmsr_hbaD_polling_ccbdone(struct AdapterControlBlock *acb,
struct CommandControlBlock *poll_ccb)
{
bool error;
uint32_t poll_ccb_done = 0, poll_count = 0, flag_ccb, ccb_cdb_phy;
int rtn, doneq_index, index_stripped, outbound_write_pointer, toggle;
unsigned long flags;
struct ARCMSR_CDB *arcmsr_cdb... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 203,542,765,841,617,700,000,000,000,000,000,000,000 | 73 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... |
BGD_DECLARE(int) gdImageColorResolveAlpha (gdImagePtr im, int r, int g, int b, int a)
{
int c;
int ct = -1;
int op = -1;
long rd, gd, bd, ad, dist;
long mindist = 4 * 255 * 255; /* init to max poss dist */
if (im->trueColor) {
return gdTrueColorAlpha (r, g, b, a);
}
for (c = 0; c < im->colorsTotal; c++) {
... | 0 | [
"CWE-119",
"CWE-787"
] | libgd | 77f619d48259383628c3ec4654b1ad578e9eb40e | 328,491,625,013,425,900,000,000,000,000,000,000,000 | 50 | fix #215 gdImageFillToBorder stack-overflow when invalid color is used |
static void restartcollection (global_State *g) {
g->gray = g->grayagain = NULL;
g->weak = g->allweak = g->ephemeron = NULL;
markobject(g, g->mainthread);
markvalue(g, &g->l_registry);
markmt(g);
markbeingfnz(g); /* mark any finalizing object left from previous cycle */
} | 0 | [
"CWE-125"
] | lua | 127e7a6c8942b362aa3c6627f44d660a4fb75312 | 164,659,534,691,769,030,000,000,000,000,000,000,000 | 8 | Fixed bug of old finalized objects in the GC
When an object aged OLD1 is finalized, it is moved from the list
'finobj' to the *beginning* of the list 'allgc'. So, this part of the
list (and not only the survival list) must be visited by 'markold'. |
static inline int nlmsg_unicast(struct sock *sk, struct sk_buff *skb, u32 pid)
{
int err;
err = netlink_unicast(sk, skb, pid, MSG_DONTWAIT);
if (err > 0)
err = 0;
return err;
} | 0 | [] | linux-2.6 | 1045b03e07d85f3545118510a587035536030c1c | 233,456,013,411,004,860,000,000,000,000,000,000,000 | 10 | netlink: fix overrun in attribute iteration
kmemcheck reported this:
kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
0500110001508abf050010000500000002017300140000006f72672e66726565
i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
^
Pid: 3... |
int next_slice(unsigned long long uptime_ref, unsigned long long uptime,
int reset, long interval)
{
unsigned long file_interval, entry;
static unsigned long long last_uptime = 0;
int min, max, pt1, pt2;
double f;
/* uptime is expressed in 1/100th of a second */
if (!last_uptime || reset) {
last_uptime... | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 277,235,236,976,360,220,000,000,000,000,000,000,000 | 48 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
ngx_mail_auth_external(ngx_mail_session_t *s, ngx_connection_t *c,
ngx_uint_t n)
{
ngx_str_t *arg, external;
arg = s->args.elts;
ngx_log_debug1(NGX_LOG_DEBUG_MAIL, c->log, 0,
"mail auth external: \"%V\"", &arg[n]);
external.data = ngx_pnalloc(c->pool, ngx_base64_decoded_length... | 0 | [
"CWE-284",
"CWE-295"
] | nginx | 173f16f736c10eae46cd15dd861b04b82d91a37a | 212,563,480,220,800,900,000,000,000,000,000,000,000 | 31 | Mail: max_errors directive.
Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands
in Exim, specifies the number of errors after which the connection is closed. |
static Renode *parsecat(struct cstate *g)
{
Renode *cat, *head, **tail;
if (g->lookahead && g->lookahead != '|' && g->lookahead != ')') {
/* Build a right-leaning tree by splicing in new 'cat' at the tail. */
head = parserep(g);
tail = &head;
while (g->lookahead && g->lookahead != '|' && g->lookahead != ')') ... | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | mujs | 00d4606c3baf813b7b1c176823b2729bf51002a2 | 136,354,298,988,824,800,000,000,000,000,000,000,000 | 18 | Bug 700937: Limit recursion in regexp matcher.
Also handle negative return code as an error in the JS bindings. |
static void snd_timer_user_copy_id(struct snd_timer_id *id, struct snd_timer *timer)
{
id->dev_class = timer->tmr_class;
id->dev_sclass = SNDRV_TIMER_SCLASS_NONE;
id->card = timer->card ? timer->card->number : -1;
id->device = timer->tmr_device;
id->subdevice = timer->tmr_subdevice;
} | 0 | [
"CWE-200",
"CWE-362"
] | linux | ee8413b01045c74340aa13ad5bdf905de32be736 | 33,182,664,376,873,320,000,000,000,000,000,000,000 | 8 | ALSA: timer: Fix double unlink of active_list
ALSA timer instance object has a couple of linked lists and they are
unlinked unconditionally at snd_timer_stop(). Meanwhile
snd_timer_interrupt() unlinks it, but it calls list_del() which leaves
the element list itself unchanged. This ends up with unlinking twice,
and i... |
static int compat_table_info(const struct xt_table_info *info,
struct xt_table_info *newinfo)
{
struct ipt_entry *iter;
void *loc_cpu_entry;
int ret;
if (!newinfo || !info)
return -EINVAL;
/* we dont care about newinfo->entries[] */
memcpy(newinfo, info, offsetof(struct xt_table_info, entries));
newi... | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 253,218,849,326,225,240,000,000,000,000,000,000,000 | 22 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
static void xen_free_irq(unsigned irq)
{
struct irq_info *info = info_for_irq(irq);
unsigned long flags;
if (WARN_ON(!info))
return;
write_lock_irqsave(&evtchn_rwlock, flags);
list_del(&info->list);
set_info_for_irq(irq, NULL);
WARN_ON(info->refcnt > 0);
write_unlock_irqrestore(&evtchn_rwlock, flags);
... | 1 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 150,691,550,679,738,530,000,000,000,000,000,000,000 | 26 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
void WebContents::DoGetZoomLevel(
electron::mojom::ElectronBrowser::DoGetZoomLevelCallback callback) {
std::move(callback).Run(GetZoomLevel());
} | 1 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 139,869,570,860,122,130,000,000,000,000,000,000,000 | 4 | 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
... |
void t_cpp_generator::generate_deserialize_field(ofstream& out,
t_field* tfield,
string prefix,
string suffix) {
t_type* type = get_true_type(tfield->get_type());
if (t... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 333,732,206,346,574,800,000,000,000,000,000,000,000 | 62 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
void HGraph::InitializeInferredTypes() {
HPhase phase("H_Inferring types", this);
InitializeInferredTypes(0, this->blocks_.length() - 1);
} | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 96,300,580,422,687,540,000,000,000,000,000,000,000 | 4 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
static int nfs_flush_multi(struct nfs_pageio_descriptor *desc,
struct nfs_pgio_header *hdr)
{
struct nfs_page *req = hdr->req;
struct page *page = req->wb_page;
struct nfs_write_data *data;
size_t wsize = desc->pg_bsize, nbytes;
unsigned int offset;
int requests = 0;
struct nfs_commit_info cinfo;
nfs_ini... | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 316,486,908,238,213,200,000,000,000,000,000,000,000 | 41 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
void server_connect_own_ip_save(SERVER_CONNECT_REC *conn,
IPADDR *ip4, IPADDR *ip6)
{
if (ip4 == NULL || ip4->family == 0)
g_free_and_null(conn->own_ip4);
if (ip6 == NULL || ip6->family == 0)
g_free_and_null(conn->own_ip6);
if (ip4 != NULL && ip4->family != 0) {
/* IPv4 address was found */
if (conn->ow... | 0 | [
"CWE-20"
] | irssi-proxy | 85bbc05b21678e80423815d2ef1dfe26208491ab | 182,105,252,347,726,730,000,000,000,000,000,000,000 | 22 | Check if an SSL certificate matches the hostname of the server we are connecting to
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@5104 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
void wc_ecc_del_point_h(ecc_point* p, void* heap)
{
/* prevents free'ing null arguments */
if (p != NULL) {
mp_clear(p->x);
mp_clear(p->y);
mp_clear(p->z);
XFREE(p, heap, DYNAMIC_TYPE_ECC);
}
(void)heap;
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 289,604,065,253,903,360,000,000,000,000,000,000,000 | 11 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
execute_function (var, words, flags, fds_to_close, async, subshell)
SHELL_VAR *var;
WORD_LIST *words;
int flags;
struct fd_bitmap *fds_to_close;
int async, subshell;
{
int return_val, result;
COMMAND *tc, *fc, *save_current;
char *debug_trap, *error_trap, *return_trap;
#if defined (ARRAY_... | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 171,656,446,926,499,820,000,000,000,000,000,000,000 | 214 | commit bash-20120224 snapshot |
smpl_t aubio_tempo_get_confidence(aubio_tempo_t *o) {
return aubio_beattracking_get_confidence(o->bt);
} | 0 | [] | aubio | b1559f4c9ce2b304d8d27ffdc7128b6795ca82e5 | 283,176,110,570,218,500,000,000,000,000,000,000,000 | 3 | [tempo] fix buffer overflow in method parser |
f_getpos(typval_T *argvars, typval_T *rettv)
{
getpos_both(argvars, rettv, FALSE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 27,700,172,491,237,270,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int piv_restore_security_env(sc_card_t *card, int se_num)
{
LOG_FUNC_CALLED(card->ctx);
LOG_FUNC_RETURN(card->ctx, SC_SUCCESS);
} | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 317,423,340,816,635,430,000,000,000,000,000,000,000 | 6 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
int yr_object_create(
int8_t type,
const char* identifier,
YR_OBJECT* parent,
YR_OBJECT** object)
{
YR_OBJECT* obj;
int i;
size_t object_size = 0;
assert(parent != NULL || object != NULL);
switch (type)
{
case OBJECT_TYPE_STRUCTURE:
object_size = sizeof(YR_OBJECT_STRUCTURE);
... | 0 | [
"CWE-416"
] | yara | 053e67e3ec81cc9268ce30eaf0d6663d8639ed1e | 108,569,188,222,561,630,000,000,000,000,000,000,000 | 124 | Fix issue #658 |
static int mystrcmp(char *s1, char *s2) {
if (s1 == NULL && s2 == NULL)
return 0;
if (s1 == NULL)
return -1;
if (s2 == NULL)
return 1;
return strcmp(s1, s2);
} | 0 | [
"CWE-476",
"CWE-787"
] | libmysofa | 2e6fac6ab6156dae8e8c6f417741388084b70d6f | 32,653,504,610,749,170,000,000,000,000,000,000,000 | 9 | Fixed recursive function calls |
static void FVMenuSelectAutohintable(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *e) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
int i, gid, doit;
EncMap *map = fv->b.map;
SplineFont *sf = fv->b.sf;
int merge = SelMergeType(e);
for ( i=0; i< map->enccount; ++i ) {
doit = (gid=map-... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 207,779,115,003,973,880,000,000,000,000,000,000,000 | 14 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
bool WebContents::GetBackgroundThrottling() const {
return background_throttling_;
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 299,986,057,962,547,640,000,000,000,000,000,000,000 | 3 | 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 int sctp_setsockopt_scheduler(struct sock *sk,
char __user *optval,
unsigned int optlen)
{
struct sctp_association *asoc;
struct sctp_assoc_value params;
int retval = -EINVAL;
if (optlen < sizeof(params))
goto out;
optlen = sizeof(params);
if (copy_from_user(¶ms, optval, optlen)) ... | 0 | [
"CWE-416"
] | linux | a0ff660058b88d12625a783ce9e5c1371c87951f | 234,942,197,885,946,900,000,000,000,000,000,000,000 | 29 | sctp: return error if the asoc has been peeled off in sctp_wait_for_sndbuf
After commit cea0cc80a677 ("sctp: use the right sk after waking up from
wait_buf sleep"), it may change to lock another sk if the asoc has been
peeled off in sctp_wait_for_sndbuf.
However, the asoc's new sk could be already closed elsewhere, a... |
static gint conv_utf8tojis(gchar *outbuf, gint outlen, const gchar *inbuf)
{
gchar *eucstr;
Xalloca(eucstr, outlen, return -1);
if (conv_utf8toeuc(eucstr, outlen, inbuf) < 0)
return -1;
if (conv_euctojis(outbuf, outlen, eucstr) < 0)
return -1;
return 0;
} | 0 | [
"CWE-119"
] | claws | d390fa07f5548f3173dd9cc13b233db5ce934c82 | 244,936,425,681,808,770,000,000,000,000,000,000,000 | 13 | Make sure we don't run out of the output buffer. Maybe fixes bug #3557 |
bool debugfs_initialized(void)
{
return debugfs_registered;
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 284,451,503,537,656,440,000,000,000,000,000,000,000 | 4 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
void testQueryList() {
testQueryListHelper(L"one=ONE&two=TWO", 2);
testQueryListHelper(L"one=ONE&two=&three=THREE", 3);
testQueryListHelper(L"one=ONE&two&three=THREE", 3);
testQueryListHelper(L"one=ONE", 1);
testQueryListHelper(L"one", 1);
testQueryListHelper(L"", 0);
} | 0 | [
"CWE-787"
] | uriparser | 864f5d4c127def386dd5cc926ad96934b297f04e | 98,343,857,970,812,560,000,000,000,000,000,000,000 | 8 | UriQuery.c: Fix out-of-bounds-write in ComposeQuery and ...Ex
Reported by Google Autofuzz team |
asmlinkage void do_notify_resume(struct pt_regs *regs, struct thread_info *ti)
{
int syscall = 0;
if ((sysreg_read(SR) & MODE_MASK) == MODE_SUPERVISOR)
syscall = 1;
if (ti->flags & (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK))
do_signal(regs, ¤t->blocked, syscall);
if (ti->flags & _TIF_NOTIFY_RESUME) {
c... | 1 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 145,972,088,325,164,220,000,000,000,000,000,000,000 | 15 | 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... |
void __f2fs_replace_block(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
block_t old_blkaddr, block_t new_blkaddr,
bool recover_curseg, bool recover_newaddr)
{
struct sit_info *sit_i = SIT_I(sbi);
struct curseg_info *curseg;
unsigned int segno, old_cursegno;
struct seg_entry *se;
int type;
unsigned s... | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 111,688,166,768,889,530,000,000,000,000,000,000,000 | 66 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
gst_qtdemux_stream_flush_samples_data (GstQTDemux * qtdemux,
QtDemuxStream * stream)
{
g_free (stream->samples);
stream->samples = NULL;
gst_qtdemux_stbl_free (stream);
/* fragments */
g_free (stream->ra_entries);
stream->ra_entries = NULL;
stream->n_ra_entries = 0;
stream->sample_index = -1;
st... | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 267,993,861,727,685,300,000,000,000,000,000,000,000 | 21 | 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 |
void cJSON_AddItemToObject( cJSON *object, const char *string, cJSON *item )
{
if ( ! item )
return;
if ( item->string )
cJSON_free( item->string );
item->string = cJSON_strdup( string );
cJSON_AddItemToArray( object, item );
} | 1 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 208,943,826,488,528,350,000,000,000,000,000,000,000 | 9 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
GF_Err lsr1_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_LASeRSampleEntryBox *ptr = (GF_LASeRSampleEntryBox *)s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_data(bs, ptr->reserved, 6);
gf_bs_write_u16(bs, ptr->dataReferenceIndex);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 125,385,900,267,029,390,000,000,000,000,000,000,000 | 11 | fixed #2255 |
nautilus_file_operations_link (GList *files,
GArray *relative_item_points,
GFile *target_dir,
GtkWindow *parent_window,
NautilusCopyCallback ... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 85,246,349,309,699,000,000,000,000,000,000,000,000 | 44 | 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... |
xfs_chain_bio(
struct xfs_ioend *ioend,
struct writeback_control *wbc,
struct buffer_head *bh)
{
struct bio *new;
new = bio_alloc(GFP_NOFS, BIO_MAX_PAGES);
xfs_init_bio_from_bh(new, bh);
bio_chain(ioend->io_bio, new);
bio_get(ioend->io_bio); /* for xfs_destroy_ioend */
bio_set_op_attrs(ioend->io_bio, REQ_OP... | 0 | [
"CWE-362"
] | linux | 04197b341f23b908193308b8d63d17ff23232598 | 218,666,477,644,818,000,000,000,000,000,000,000,000 | 17 | xfs: don't BUG() on mixed direct and mapped I/O
We've had reports of generic/095 causing XFS to BUG() in
__xfs_get_blocks() due to the existence of delalloc blocks on a
direct I/O read. generic/095 issues a mix of various types of I/O,
including direct and memory mapped I/O to a single file. This is
clearly not suppor... |
HandleRFBServerMessage(rfbClient* client)
{
rfbServerToClientMsg msg;
if (client->serverPort==-1)
client->vncRec->readTimestamp = TRUE;
if (!ReadFromRFBServer(client, (char *)&msg, 1))
return FALSE;
switch (msg.type) {
case rfbSetColourMapEntries:
{
/* TODO:
int i;
uint16_t rgb[3];
... | 1 | [
"CWE-703",
"CWE-770"
] | libvncserver | 8937203441ee241c4ace85da687b7d6633a12365 | 44,266,049,748,697,720,000,000,000,000,000,000,000 | 647 | libvncclient/rfbproto: limit max textchat size
Addresses GitHub Security Lab (GHSL) Vulnerability Report
`GHSL-2020-063`.
Re #275 |
static int handle_gso_type(struct sk_buff *skb, unsigned int gso_type,
int encap_len)
{
struct skb_shared_info *shinfo = skb_shinfo(skb);
gso_type |= SKB_GSO_DODGY;
shinfo->gso_type |= gso_type;
skb_decrease_gso_size(shinfo, encap_len);
shinfo->gso_segs = 0;
return 0;
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 217,909,634,434,295,800,000,000,000,000,000,000,000 | 11 | 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... |
absl::string_view HeaderString::getStringView() const {
if (type() == Type::Reference) {
return getStrView(buffer_);
}
ASSERT(type() == Type::Inline);
return {getInVec(buffer_).data(), getInVec(buffer_).size()};
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 2,187,892,200,248,346,000,000,000,000,000,000,000 | 7 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
kex_free_newkeys(struct newkeys *newkeys)
{
if (newkeys == NULL)
return;
if (newkeys->enc.key) {
explicit_bzero(newkeys->enc.key, newkeys->enc.key_len);
free(newkeys->enc.key);
newkeys->enc.key = NULL;
}
if (newkeys->enc.iv) {
explicit_bzero(newkeys->enc.iv, newkeys->enc.iv_len);
free(newkeys->enc.iv);
... | 0 | [
"CWE-522",
"CWE-399"
] | openssh-portable | ec165c392ca54317dbe3064a8c200de6531e89ad | 259,134,517,375,421,530,000,000,000,000,000,000,000 | 29 | upstream commit
Unregister the KEXINIT handler after message has been
received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed. Reported by
shilei-c at 360.cn
Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05 |
ar6000_lqThresholdEvent_rx(void *devt, WMI_LQ_THRESHOLD_VAL newThreshold, u8 lq)
{
AR_DEBUG_PRINTF(ATH_DEBUG_INFO,("lq threshold range %d, lq %d\n", newThreshold, lq));
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 74,228,133,072,970,670,000,000,000,000,000,000,000 | 4 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
void expectWriteNewSessionTicket() override {
std::string appParams("APP params");
server->setEarlyDataAppParamsFunctions(
[](const folly::Optional<std::string>&, const Buf&) { return false; },
[=]() -> Buf { return folly::IOBuf::copyBuffer(appParams); });
EXPECT_CALL(*getFakeHandshakeLaye... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 311,599,408,805,701,970,000,000,000,000,000,000,000 | 65 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
bool CiffComponent::doEmpty() const
{
return size_ == 0;
} | 0 | [
"CWE-400"
] | exiv2 | b3d077dcaefb6747fff8204490f33eba5a144edb | 62,816,310,346,336,720,000,000,000,000,000,000,000 | 4 | Fix #460 by adding more checks in CiffDirectory::readDirectory |
void Helper::error(const QString &message)
{
m_errorString = message;
emit newError(message);
} | 0 | [
"CWE-59",
"CWE-61"
] | deepin-clone | e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab | 3,773,002,178,074,802,000,000,000,000,000,000,000 | 6 | fix: Do not use the "/tmp" directory
https://github.com/linuxdeepin/deepin-clone/issues/16
https://bugzilla.opensuse.org/show_bug.cgi?id=1130388 |
ZEND_API void ZEND_FASTCALL _zend_hash_init(HashTable *ht, uint32_t nSize, dtor_func_t pDestructor, zend_bool persistent ZEND_FILE_LINE_DC)
{
GC_REFCOUNT(ht) = 1;
GC_TYPE_INFO(ht) = IS_ARRAY;
ht->u.flags = (persistent ? HASH_FLAG_PERSISTENT : 0) | HASH_FLAG_APPLY_PROTECTION | HASH_FLAG_STATIC_KEYS;
ht->nTableMask =... | 0 | [
"CWE-190"
] | php-src | 4cc0286f2f3780abc6084bcdae5dce595daa3c12 | 272,556,158,362,185,300,000,000,000,000,000,000,000 | 14 | Fix #73832 - leave the table in a safe state if the size is too big. |
absl::optional<base::TimeDelta> GetCursorBlinkInterval() {
#if defined(OS_MAC)
base::TimeDelta interval;
if (ui::TextInsertionCaretBlinkPeriod(&interval))
return interval;
#elif defined(OS_LINUX)
if (auto* linux_ui = views::LinuxUI::instance())
return linux_ui->GetCursorBlinkInterval();
#elif defined(OS_W... | 0 | [] | electron | 6b04cce91ad1563bd9555f2007a2ad5aa5487304 | 288,215,644,411,263,900,000,000,000,000,000,000,000 | 18 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33367)
* Make ElectronBrowser mojo interface frame associated. (#32815)
Co-authored-by: Marek Haranczyk <marek@openfin.co>
* fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33323) (#33350)
... |
inline DependencyContext InstanceKlass::dependencies() {
DependencyContext dep_context(&_dep_context);
return dep_context;
} | 0 | [] | jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 301,179,537,306,289,950,000,000,000,000,000,000,000 | 4 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
static void ParseImageResourceBlocks(Image *image,
const unsigned char *blocks,size_t length,
MagickBooleanType *has_merged_image,ExceptionInfo *exception)
{
const unsigned char
*p;
StringInfo
*profile;
unsigned int
count,
long_sans;
unsigned short
id,
short_sans;
if (length < ... | 0 | [
"CWE-787"
] | ImageMagick | d4ec73f866a7c42a2e7f301fcd696e5cb7a7d3ab | 172,812,173,082,688,170,000,000,000,000,000,000,000 | 82 | https://github.com/ImageMagick/ImageMagick/issues/350 |
void ElectronBrowserHandlerImpl::Message(bool internal,
const std::string& channel,
blink::CloneableMessage arguments) {
api::WebContents* api_web_contents = api::WebContents::From(web_contents());
if (api_web_contents) {
api_web_... | 1 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 279,319,966,793,314,400,000,000,000,000,000,000,000 | 9 | 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
... |
xmlSchemaSimpleTypeErr(xmlSchemaAbstractCtxtPtr actxt,
xmlParserErrors error,
xmlNodePtr node,
const xmlChar *value,
xmlSchemaTypePtr type,
int displayValue)
{
xmlChar *msg = NULL;
xmlSchemaFormatNodeForError(&msg, actxt, node);
if (displayValue || (xmlSchemaEv... | 1 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 69,397,264,060,365,150,000,000,000,000,000,000,000 | 51 | More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
adds a new xmlEscapeFormatString() function to escape composed format
strings |
static void set_load_weight(struct task_struct *p)
{
int prio = p->static_prio - MAX_RT_PRIO;
struct load_weight *load = &p->se.load;
/*
* SCHED_IDLE tasks get minimal weight:
*/
if (idle_policy(p->policy)) {
load->weight = scale_load(WEIGHT_IDLEPRIO);
load->inv_weight = WMULT_IDLEPRIO;
return;
}
load... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 337,202,421,399,742,450,000,000,000,000,000,000,000 | 17 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
asmlinkage long parisc_sync_file_range(int fd,
u32 hi_off, u32 lo_off, u32 hi_nbytes, u32 lo_nbytes,
unsigned int flags)
{
return sys_sync_file_range(fd, (loff_t)hi_off << 32 | lo_off,
(loff_t)hi_nbytes << 32 | lo_nbytes, flags);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 19,248,980,711,086,023,000,000,000,000,000,000,000 | 7 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static void free_request_key_auth(struct request_key_auth *rka)
{
if (!rka)
return;
key_put(rka->target_key);
key_put(rka->dest_keyring);
if (rka->cred)
put_cred(rka->cred);
kfree(rka->callout_info);
kfree(rka);
} | 0 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 209,430,056,047,270,800,000,000,000,000,000,000,000 | 11 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
TPM_CC_Marshal(TPM_CC *source, BYTE **buffer, INT32 *size)
{
UINT16 written = 0;
written += UINT32_Marshal(source, buffer, size);
return written;
} | 0 | [
"CWE-787"
] | libtpms | 3ef9b26cb9f28bd64d738bff9505a20d4eb56acd | 108,074,321,399,762,840,000,000,000,000,000,000,000 | 6 | tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks
Add maxSize parameter to TPM2B_Marshal and assert on it checking
the size of the data intended to be marshaled versus the maximum
buffer size.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
int cil_resolve_name_keep_aliases(struct cil_tree_node *ast_node, char *name, enum cil_sym_index sym_index, void *extra_args, struct cil_symtab_datum **datum)
{
int rc = SEPOL_ERR;
struct cil_args_resolve *args = extra_args;
struct cil_db *db = args->db;
struct cil_tree_node *node = NULL;
if (name == NULL) {
ci... | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 233,896,785,550,844,500,000,000,000,000,000,000,000 | 88 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.