func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
longlong Item_func_get_system_var::val_int()
{
THD *thd= current_thd;
DBUG_EXECUTE_IF("simulate_non_gtid_aware_master",
{
if (0 == strcmp("gtid_domain_id", var->name.str))
{
my_error(ER_VAR_CANT_BE_READ, MYF(0), var->name.str);
... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 118,353,952,192,212,750,000,000,000,000,000,000,000 | 44 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static inline int xfrm_policy_id2dir(u32 index)
{
return index & 7;
} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 71,242,971,740,788,710,000,000,000,000,000,000,000 | 4 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static int is_ipmb_addr(struct ipmi_addr *addr)
{
return addr->addr_type == IPMI_IPMB_ADDR_TYPE;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 296,915,514,871,085,200,000,000,000,000,000,000,000 | 4 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
bool ok_for_lower_case_names(const char *name)
{
if (!lower_case_table_names || !name)
return true;
char buf[SAFE_NAME_LEN];
strmake_buf(buf, name);
my_casedn_str(files_charset_info, buf);
return strcmp(name, buf) == 0;
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 197,761,462,346,136,300,000,000,000,000,000,000,000 | 10 | 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. |
static int ext4_bh_delay_or_unwritten(handle_t *handle, struct buffer_head *bh)
{
return (buffer_delay(bh) || buffer_unwritten(bh)) && buffer_dirty(bh);
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 9,114,162,141,330,958,000,000,000,000,000,000,000 | 4 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
dbus_send_reload_signal(void)
{
gchar *path;
if (global_connection == NULL)
return;
path = dbus_object_create_path_vrrp();
dbus_emit_signal(global_connection, path, DBUS_VRRP_INTERFACE, "VrrpReloaded", NULL);
g_free(path);
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 35,156,282,761,818,520,000,000,000,000,000,000,000 | 11 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
static int do_signal(struct pt_regs *regs, sigset_t *oldset)
{
siginfo_t info;
int signr;
struct k_sigaction ka;
/*
* We want the common case to go fast, which
* is why we may in certain cases get here from
* kernel mode. Just return without doing anything
* if so.
*/
if (!user_mode(regs))
return 1;
... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 211,537,181,391,387,000,000,000,000,000,000,000,000 | 70 | 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... |
is_valid_mbc_string(const UChar* s, const UChar* end)
{
return onigenc_length_check_is_valid_mbc_string(ONIG_ENCODING_UTF32_LE, s, end);
} | 0 | [
"CWE-125"
] | php-src | b6fe458ef9ac1372b60c3d3810b0358e2e20840d | 322,113,627,775,180,900,000,000,000,000,000,000,000 | 4 | Fix bug #77418 - Heap overflow in utf32be_mbc_to_code
(cherry picked from commit aeec40cb50eca6a97975765e2bacc28a5950cfa9) |
int ssl3_get_server_hello(SSL *s)
{
STACK_OF(SSL_CIPHER) *sk;
SSL_CIPHER *c;
unsigned char *p,*d;
int i,al,ok;
unsigned int j;
long n;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp;
#endif
n=s->method->ssl_get_message(s,
SSL3_ST_CR_SRVR_HELLO_A,
SSL3_ST_CR_SRVR_HELLO_B,
-1,
300, /* ?? */
&ok);
if (!ok) r... | 1 | [] | openssl | 36ca4ba63d083da6f9d4598f18f17a8c32c8eca2 | 7,657,660,053,917,599,000,000,000,000,000,000,000 | 198 | Implement the Supported Point Formats Extension for ECC ciphersuites
Submitted by: Douglas Stebila |
RGWDeleteLC() {
len = 0;
data = NULL;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 186,687,636,341,042,200,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static void add_pixels_clamped4_c(const int16_t *block, uint8_t *av_restrict pixels,
int line_size)
{
int i;
/* read the pixels */
for(i=0;i<4;i++) {
pixels[0] = av_clip_uint8(pixels[0] + block[0]);
pixels[1] = av_clip_uint8(pixels[1] + block[1]);
pixels[2]... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 303,881,408,324,433,300,000,000,000,000,000,000,000 | 15 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void extract_crng(__u8 out[CHACHA_BLOCK_SIZE])
{
struct crng_state *crng = NULL;
#ifdef CONFIG_NUMA
if (crng_node_pool)
crng = crng_node_pool[numa_node_id()];
if (crng == NULL)
#endif
crng = &primary_crng;
_extract_crng(crng, out);
} | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 179,107,496,694,768,400,000,000,000,000,000,000,000 | 12 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
pfm_context_create(pfm_context_t *ctx, void *arg, int count, struct pt_regs *regs)
{
pfarg_context_t *req = (pfarg_context_t *)arg;
struct file *filp;
int ctx_flags;
int ret;
/* let's check the arguments first */
ret = pfarg_is_sane(current, req);
if (ret < 0) return ret;
ctx_flags = req->ctx_flags;
ret = -... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 105,736,824,997,545,190,000,000,000,000,000,000,000 | 104 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
int rsa_pkcs1_sign( rsa_context *ctx,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng,
int mode,
int hash_id,
unsigned int hashlen,
const unsigned char *hash,
unsigned c... | 1 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 166,267,557,130,527,450,000,000,000,000,000,000,000 | 25 | RSA blinding on CRT operations to counter timing attacks |
convert_column_name(Oid tableoid, text *column)
{
AttrNumber attnum;
char *colname;
colname = text_to_cstring(column);
attnum = get_attnum(tableoid, colname);
if (attnum == InvalidAttrNumber)
ereport(ERROR,
(errcode(ERRCODE_UNDEFINED_COLUMN),
errmsg("column \"%s\" of relation \"%s\" does not exist",... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 62,853,891,937,631,010,000,000,000,000,000,000,000 | 15 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
void send_trans2_replies(connection_struct *conn,
struct smb_request *req,
const char *params,
int paramsize,
const char *pdata,
int datasize,
int max_data_bytes)
{
/* As we are using a protocol > LANMAN1 then the max_send
variable must have been set in the sessetupX call.
This takes precede... | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 25,515,228,945,387,567,000,000,000,000,000,000,000 | 207 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
*/
static void php_wddx_serialize_number(wddx_packet *packet, zval *var)
{
char tmp_buf[WDDX_BUF_LEN];
zval tmp;
tmp = *var;
zval_copy_ctor(&tmp);
convert_to_string(&tmp);
snprintf(tmp_buf, sizeof(tmp_buf), WDDX_NUMBER, Z_STRVAL(tmp));
zval_dtor(&tmp);
php_wddx_add_chunk(packet, tmp_buf); | 0 | [] | php-src | 1785d2b805f64eaaacf98c14c9e13107bf085ab1 | 69,686,492,432,166,950,000,000,000,000,000,000,000 | 13 | Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability |
iasecc_oberthur_match(struct sc_card *card)
{
struct sc_context *ctx = card->ctx;
unsigned char *hist = card->reader->atr_info.hist_bytes;
LOG_FUNC_CALLED(ctx);
if (*hist != 0x80 || ((*(hist+1)&0xF0) != 0xF0))
LOG_FUNC_RETURN(ctx, SC_ERROR_OBJECT_NOT_FOUND);
sc_log_hex(ctx, "AID in historical_bytes", hist + 2... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 163,712,996,260,215,260,000,000,000,000,000,000,000 | 25 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static int compat_copy_entry_to_user(struct ebt_entry *e, void __user **dstptr,
unsigned int *size)
{
struct ebt_entry_target *t;
struct ebt_entry __user *ce;
u32 watchers_offset, target_offset, next_offset;
compat_uint_t origsize;
int ret;
if (e->bitmask == 0) {
if (*size < sizeof(struct ebt_entries))
... | 0 | [
"CWE-787"
] | linux | b71812168571fa55e44cdd0254471331b9c4c4c6 | 7,128,746,941,431,271,000,000,000,000,000,000,000 | 55 | netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
We need to make sure the offsets are not out of range of the
total size.
Also check that they are in ascending order.
The WARN_ON triggered by syzkaller (it sets panic_on_warn) is
changed to also bail out, no point in continuing parsing.
Briefly tested... |
int gg_read(struct gg_session *sess, char *buf, int length)
{
int res;
#ifdef GG_CONFIG_HAVE_GNUTLS
if (sess->ssl != NULL) {
for (;;) {
res = gnutls_record_recv(GG_SESSION_GNUTLS(sess), buf, length);
if (res < 0) {
if (res == GNUTLS_E_AGAIN)
errno = EAGAIN;
else if (!gnutls_error_is_fatal(res) ... | 0 | [
"CWE-310"
] | libgadu | 23644f1fb8219031b3cac93289a588b05f90226b | 303,059,358,515,730,820,000,000,000,000,000,000,000 | 60 | Poprawka ograniczania długości opisu. |
static int do_net_open(char *iface)
{
int s, port;
char ip[16];
struct sockaddr_in s_in;
port = get_ip_port(iface, ip, sizeof(ip)-1);
if (port == -1)
return -1;
s_in.sin_family = PF_INET;
s_in.sin_port = htons(port);
if (!inet_aton(ip, &s_in.sin_addr))
return -1;
if ((s = socket(s_in.sin_family, SOCK_ST... | 0 | [
"CWE-20",
"CWE-787"
] | aircrack-ng | 88702a3ce4c28a973bf69023cd0312f412f6193e | 120,385,463,246,674,320,000,000,000,000,000,000,000 | 40 | OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab |
pipe_read (pp)
int *pp;
{
char ch;
if (pp[1] >= 0)
{
close (pp[1]);
pp[1] = -1;
}
if (pp[0] >= 0)
{
while (read (pp[0], &ch, 1) == -1 && errno == EINTR)
;
}
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 274,792,675,812,452,070,000,000,000,000,000,000,000 | 17 | bash-4.4-rc2 release |
bool DataWriterImpl::can_qos_be_updated(
const DataWriterQos& to,
const DataWriterQos& from)
{
bool updatable = true;
if (to.durability().kind != from.durability().kind)
{
updatable = false;
logWarning(RTPS_QOS_CHECK, "Durability kind cannot be changed after the creation of a... | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 5,876,287,946,171,127,000,000,000,000,000,000,000 | 46 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
static void addrconf_mod_dad_timer(struct inet6_ifaddr *ifp,
unsigned long when)
{
if (!timer_pending(&ifp->dad_timer))
in6_ifa_hold(ifp);
mod_timer(&ifp->dad_timer, jiffies + when);
} | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 270,969,323,206,132,670,000,000,000,000,000,000,000 | 7 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
int bson_ensure_space( bson *b, const size_t bytesNeeded ) {
int pos = b->cur - b->data;
char *orig = b->data;
int new_size;
if ( pos + bytesNeeded <= b->dataSize )
return BSON_OK;
new_size = 1.5 * ( b->dataSize + bytesNeeded );
if( new_size < b->dataSize ) {
if( ( b->dataSize... | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 214,871,671,697,601,870,000,000,000,000,000,000,000 | 28 | don't mix up int and size_t (first pass to fix that) |
int xfrm_init_state(struct xfrm_state *x)
{
int err;
err = __xfrm_init_state(x, true, false);
if (!err)
x->km.state = XFRM_STATE_VALID;
return err;
} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 83,215,543,863,753,110,000,000,000,000,000,000,000 | 10 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static void oidc_scrub_headers(request_rec *r) {
oidc_cfg *cfg = ap_get_module_config(r->server->module_config,
&auth_openidc_module);
if (cfg->scrub_request_headers != 0) {
/* scrub all headers starting with OIDC_ first */
oidc_scrub_request_headers(r, OIDC_DEFAULT_HEADER_PREFIX,
oidc_cfg_dir_authn_head... | 1 | [
"CWE-287"
] | mod_auth_openidc | 21e3728a825c41ab41efa75e664108051bb9665e | 163,472,806,286,771,120,000,000,000,000,000,000,000 | 20 | release 2.1.6 : security fix: scrub headers for "AuthType oauth20"
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
void clientsCron(void) {
/* Try to process at least numclients/server.hz of clients
* per call. Since normally (if there are no big latency events) this
* function is called server.hz times per second, in the average case we
* process all the clients in 1 second. */
int numclients = listLength(se... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 206,313,470,515,553,500,000,000,000,000,000,000,000 | 35 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
gst_aac_parse_start (GstBaseParse * parse)
{
GstAacParse *aacparse;
aacparse = GST_AAC_PARSE (parse);
GST_DEBUG ("start");
aacparse->frame_samples = 1024;
gst_base_parse_set_min_frame_size (GST_BASE_PARSE (aacparse), ADTS_MAX_SIZE);
aacparse->sent_codec_tag = FALSE;
aacparse->last_parsed_channels = 0;
... | 0 | [
"CWE-125"
] | gst-plugins-good | 87a2c140ca54c5128093377e9b25a5c24b346727 | 268,715,743,726,046,500,000,000,000,000,000,000,000 | 13 | aacparse: Make sure we have enough data in the codec_data to be able to parse it
Also error out cleanly if mapping the buffer failed.
https://bugzilla.gnome.org/show_bug.cgi?id=775450 |
evdns_set_option(const char *option, const char *val, int flags)
{
if (!current_base)
current_base = evdns_base_new(NULL, 0);
return evdns_base_set_option(current_base, option, val);
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 147,633,599,708,135,730,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 bool flush_workqueue_prep_pwqs(struct workqueue_struct *wq,
int flush_color, int work_color)
{
bool wait = false;
struct pool_workqueue *pwq;
if (flush_color >= 0) {
WARN_ON_ONCE(atomic_read(&wq->nr_pwqs_to_flush));
atomic_set(&wq->nr_pwqs_to_flush, 1);
}
for_each_pwq(pwq, wq) {
struct wor... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 302,675,785,341,706,430,000,000,000,000,000,000,000 | 39 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static int run_verify_callback(gnutls_session_t session, unsigned int side)
{
gnutls_certificate_credentials_t cred;
int ret, type;
cred =
(gnutls_certificate_credentials_t) _gnutls_get_cred(session,
GNUTLS_CRD_CERTIFICATE);
if (side == GNUTLS_CLIENT)
type = gnutls_auth_server_get_type(session);
e... | 0 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 119,174,788,335,637,820,000,000,000,000,000,000,000 | 29 | handshake: check for TLS_FALLBACK_SCSV
If TLS_FALLBACK_SCSV was sent by the client during the handshake, and
the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX,
send the "Inappropriate fallback" fatal alert and abort the handshake.
This mechanism was defined in RFC7507. |
build_cert_sequence (const unsigned char *buffer, size_t buflen,
const unsigned char *sha1hash, const char *keyidstr,
size_t *r_length)
{
size_t len[8], needed, n;
unsigned char *p, *certseq;
size_t certseqlen;
int i;
assert (strlen (keyidstr) == 8);
/* Walk 8 ste... | 0 | [] | gnupg | ed8383c618e124cfa708c9ee87563fcdf2f4649c | 275,377,505,356,455,660,000,000,000,000,000,000,000 | 113 | sm: Avoid double-free on iconv failure
* sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
double-free of pwbuf.
--
Observed by Joshua Rogers <honey@internot.info>, who proposed a
slightly different fix.
Debian-Bug-Id: 773472
Added fix at a second place - wk. |
flatpak_run_get_cups_server_name (void)
{
g_autofree char * cups_server = NULL;
g_autofree char * cups_config_path = NULL;
/* TODO
* we don't currently support cups servers located on the network, if such
* server is detected, we simply ignore it and in the worst case we fallback
* to the default socket... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6d1773d2a54dde9b099043f07a2094a4f1c2f486 | 124,837,981,632,374,600,000,000,000,000,000,000,000 | 28 | run: Convert all environment variables into bwrap arguments
This avoids some of them being filtered out by a setuid bwrap. It also
means that if they came from an untrusted source, they cannot be used
to inject arbitrary code into a non-setuid bwrap via mechanisms like
LD_PRELOAD.
Because they get bundled into a memf... |
cmsBool _cmsRegisterRenderingIntentPlugin(cmsContext id, cmsPluginBase* Data)
{
cmsPluginRenderingIntent* Plugin = (cmsPluginRenderingIntent*) Data;
cmsIntentsList* fl;
// Do we have to reset the intents?
if (Data == NULL) {
Intents = DefaultIntents;
return TRUE;
}
fl = SearchI... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 84,747,534,131,407,160,000,000,000,000,000,000,000 | 30 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
static void vmx_apicv_post_state_restore(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
pi_clear_on(&vmx->pi_desc);
memset(vmx->pi_desc.pir, 0, sizeof(vmx->pi_desc.pir));
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 119,553,792,180,402,300,000,000,000,000,000,000,000 | 7 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
static int getreg(const char *str) {
int i;
char *ep;
const char *aliases[] = { "sl", "fp", "ip", "sp", "lr", "pc", NULL };
if (!str || !*str) {
return -1;
}
if (*str == 'r') {
int reg = strtol (str + 1, &ep, 10);
if ((ep[0] != '\0') || (str[1] == '\0')) {
return -1;
}
if (reg < 16 && reg >= 0) {
... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7 | 57,357,665,486,639,390,000,000,000,000,000,000,000 | 23 | Fix #12417/#12418 (arm assembler heap overflows) |
static int is_smm_enabled(void)
{
return CONFIG(HAVE_SMI_HANDLER) && mp_state.do_smm;
} | 0 | [
"CWE-269"
] | coreboot | afb7a814783cda12f5b72167163b9109ee1d15a7 | 100,531,131,561,135,180,000,000,000,000,000,000,000 | 4 | cpu/x86/smm: Introduce SMM module loader version 2
Xeon-SP Skylake Scalable Processor can have 36 CPU threads (18 cores).
Current coreboot SMM is unable to handle more than ~32 CPU threads.
This patch introduces a version 2 of the SMM module loader which
addresses this problem. Having two versions of the SMM module lo... |
static inline int update_sits_in_cursum(struct f2fs_journal *journal, int i)
{
int before = sits_in_cursum(journal);
journal->n_sits = cpu_to_le16(before + i);
return before;
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 104,738,729,908,895,300,000,000,000,000,000,000,000 | 7 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
void enable_kernel_spe(void)
{
WARN_ON(preemptible());
#ifdef CONFIG_SMP
if (current->thread.regs && (current->thread.regs->msr & MSR_SPE))
giveup_spe(current);
else
giveup_spe(NULL); /* just enable SPE for kernel - force */
#else
giveup_spe(last_task_used_spe);
#endif /* __SMP __ */
} | 0 | [
"CWE-20"
] | linux | 621b5060e823301d0cba4cb52a7ee3491922d291 | 135,383,317,678,936,100,000,000,000,000,000,000,000 | 13 | powerpc/tm: Fix crash when forking inside a transaction
When we fork/clone we currently don't copy any of the TM state to the new
thread. This results in a TM bad thing (program check) when the new process is
switched in as the kernel does a tmrechkpt with TEXASR FS not set. Also, since
R1 is from userspace, we trig... |
static int binder_ioctl_get_node_info_for_ref(struct binder_proc *proc,
struct binder_node_info_for_ref *info)
{
struct binder_node *node;
struct binder_context *context = proc->context;
__u32 handle = info->handle;
if (info->strong_count || info->weak_count || info->reserved1 ||
info->reserved2 || info->re... | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 29,174,261,195,657,320,000,000,000,000,000,000,000 | 35 | 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... |
get_tty_state ()
{
int tty;
tty = input_tty ();
if (tty != -1)
{
ttgetattr (tty, &shell_tty_info);
got_tty_state = 1;
if (check_window_size)
get_new_window_size (0, (int *)0, (int *)0);
}
return 0;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 264,556,554,522,315,620,000,000,000,000,000,000,000 | 14 | bash-4.4-rc2 release |
ipmi_get_channel_info(struct ipmi_intf *intf, uint8_t channel)
{
struct channel_info_t channel_info = {0};
struct channel_access_t channel_access = {0};
int ccode = 0;
channel_info.channel = channel;
ccode = _ipmi_get_channel_info(intf, &channel_info);
if (eval_ccode(ccode) != 0) {
lprintf(LOG_ERR, "Unable to ... | 0 | [
"CWE-120"
] | ipmitool | 9452be87181a6e83cfcc768b3ed8321763db50e4 | 224,310,041,327,031,900,000,000,000,000,000,000,000 | 120 | channel: Fix buffer overflow
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `ipmi_get_channel_cipher_suites` function does not properly check
the final response’s `data_len`, which can lead to stack buffer overflow
on the final copy. |
int make_http_soap_request(zval *this_ptr,
char *buf,
int buf_size,
char *location,
char *soapaction,
int soap_version,
char **buffer,
... | 1 | [
"CWE-19"
] | php-src | 0c136a2abd49298b66acb0cad504f0f972f5bfe8 | 168,245,246,881,946,200,000,000,000,000,000,000,000 | 993 | Added type checks |
gst_qtdemux_do_push_seek (GstQTDemux * qtdemux, GstPad * pad, GstEvent * event)
{
gdouble rate;
GstFormat format;
GstSeekFlags flags;
GstSeekType cur_type, stop_type;
gint64 cur, stop, key_cur;
gboolean res;
gint64 byte_cur;
gint64 original_stop;
guint32 seqnum;
GST_DEBUG_OBJECT (qtdemux, "doing pu... | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 303,256,095,858,389,800,000,000,000,000,000,000,000 | 86 | 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 |
srtp_protect_aead (srtp_ctx_t *ctx, srtp_stream_ctx_t *stream,
void *rtp_hdr, unsigned int *pkt_octet_len)
{
srtp_hdr_t *hdr = (srtp_hdr_t*)rtp_hdr;
uint32_t *enc_start; /* pointer to start of encrypted portion */
int enc_octet_len = 0; /* number of octets in encrypted portion */
x... | 0 | [
"CWE-119"
] | libsrtp | be06686c8e98cc7bd934e10abb6f5e971d03f8ee | 66,558,242,205,525,880,000,000,000,000,000,000,000 | 121 | Allow zero payload packets to pass bounds check. |
static loff_t fuse_file_llseek(struct file *file, loff_t offset, int whence)
{
loff_t retval;
struct inode *inode = file_inode(file);
switch (whence) {
case SEEK_SET:
case SEEK_CUR:
/* No i_mutex protection necessary for SEEK_CUR and SEEK_SET */
retval = generic_file_llseek(file, offset, whence);
break;
c... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 3,823,351,057,166,685,000,000,000,000,000,000,000 | 30 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
static u64 pulse_width_count_to_ns(u16 count, u16 divider)
{
u64 n;
u32 rem;
/*
* The 2 lsb's of the pulse width timer count are not readable, hence
* the (count << 2) | 0x3
*/
n = (((u64) count << 2) | 0x3) * (divider + 1) * 1000; /* millicycles */
rem = do_div(n, CX23888_IR_REFCLK_FREQ / 1000000); /* ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a7b2df76b42bdd026e3106cf2ba97db41345a177 | 10,014,249,923,682,138,000,000,000,000,000,000,000 | 15 | media: rc: prevent memory leak in cx23888_ir_probe
In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
TEST_F(QueryPlannerTest, EmptyQueryWithProjectionDoesNotUseCoveredIxscanOnCompoundIndexIfDisabled) {
params.options &= ~QueryPlannerParams::GENERATE_COVERED_IXSCANS;
addIndex(BSON("a" << 1 << "b" << 1 << "c" << 1));
runQueryAsCommand(fromjson("{find: 'testns', projection: {_id: 0, a: 1, c: 1}}"));
asser... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 284,368,121,696,452,650,000,000,000,000,000,000,000 | 9 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int do_i2c_olen(struct cmd_tbl *cmdtp, int flag, int argc,
char *const argv[])
{
struct udevice *dev;
uint olen;
int chip;
int ret;
if (argc < 2)
return CMD_RET_USAGE;
chip = hextoul(argv[1], NULL);
ret = i2c_get_cur_bus_chip(chip, &dev);
if (ret)
return i2c_report_err(ret, I2C_ERR_READ);
... | 0 | [
"CWE-787"
] | u-boot | 8f8c04bf1ebbd2f72f1643e7ad9617dafa6e5409 | 44,540,288,987,884,580,000,000,000,000,000,000,000 | 31 | i2c: fix stack buffer overflow vulnerability in i2c md command
When running "i2c md 0 0 80000100", the function do_i2c_md parses the
length into an unsigned int variable named length. The value is then
moved to a signed variable:
int nbytes = length;
#define DISP_LINE_LEN 16
int linebytes = (nbytes > DISP... |
rsa_sec_decrypt(const struct rsa_public_key *pub,
const struct rsa_private_key *key,
void *random_ctx, nettle_random_func *random,
size_t length, uint8_t *message,
const mpz_t gibberish)
{
TMP_GMP_DECL (m, mp_limb_t);
TMP_GMP_DECL (em, uint8_t);
int res;
/* First check that ... | 0 | [
"CWE-20"
] | nettle | 0ad0b5df315665250dfdaa4a1e087f4799edaefe | 226,483,843,186,534,300,000,000,000,000,000,000,000 | 32 | Add input check to rsa_decrypt family of functions. |
static int l_open_channel (lua_State *L) {
ssh_userdata *state = (ssh_userdata *)lua_touserdata(L, 1);
LIBSSH2_CHANNEL **channel = (LIBSSH2_CHANNEL **)lua_newuserdata(L, sizeof(LIBSSH2_CHANNEL *));
while ((*channel = libssh2_channel_open_session(state->session)) == NULL
&& libssh2_session_last_errno(st... | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 79,528,616,434,971,330,000,000,000,000,000,000,000 | 13 | Avoid a crash (double-free) when SSH connection fails |
static int sr9700_set_mac_address(struct net_device *netdev, void *p)
{
struct usbnet *dev = netdev_priv(netdev);
struct sockaddr *addr = p;
if (!is_valid_ether_addr(addr->sa_data)) {
netdev_err(netdev, "not setting invalid mac address %pM\n",
addr->sa_data);
return -EINVAL;
}
eth_hw_addr_set(netdev, a... | 0 | [] | linux | e9da0b56fe27206b49f39805f7dcda8a89379062 | 28,163,302,030,361,010,000,000,000,000,000,000,000 | 16 | sr9700: sanity check for packet length
A malicious device can leak heap data to user space
providing bogus frame lengths. Introduce a sanity check.
Signed-off-by: Oliver Neukum <oneukum@suse.com>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net> |
char* xread_file(const char *path) {
FILE *fp;
char *result;
fp = fopen(path, "r");
result = xfread_file(fp);
fclose (fp);
return result;
} | 1 | [] | augeas | 1a66739c3fc14b3257af5d4a32d0a2a714a7b39d | 279,215,414,284,858,170,000,000,000,000,000,000,000 | 10 | * src/transform.c (xread_file): catch failed fopen, e.g. EACCES |
static void mxf_free_metadataset(MXFMetadataSet **ctx, int freectx)
{
MXFIndexTableSegment *seg;
switch ((*ctx)->type) {
case Descriptor:
av_freep(&((MXFDescriptor *)*ctx)->extradata);
break;
case MultipleDescriptor:
av_freep(&((MXFDescriptor *)*ctx)->sub_descriptors_refs);
... | 0 | [
"CWE-703",
"CWE-834"
] | FFmpeg | 900f39692ca0337a98a7cf047e4e2611071810c2 | 276,157,351,244,922,600,000,000,000,000,000,000,000 | 40 | avformat/mxfdec: Fix DoS issues in mxf_read_index_entry_array()
Fixes: 20170829A.mxf
Co-Author: 张洪亮(望初)" <wangchu.zhl@alibaba-inc.com>
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static inline bool io_should_wake(struct io_wait_queue *iowq)
{
struct io_ring_ctx *ctx = iowq->ctx;
int dist = ctx->cached_cq_tail - (int) iowq->cq_tail;
/*
* Wake up if we have enough events, or if a timeout occurred since we
* started waiting. For timeouts, we always want to return to userspace,
* regardl... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 2,510,375,103,401,844,400,000,000,000,000,000,000 | 12 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
static struct kobject *base_probe(dev_t devt, int *partno, void *data)
{
if (request_module("block-major-%d-%d", MAJOR(devt), MINOR(devt)) > 0)
/* Make old-style 2.4 aliases work */
request_module("block-major-%d", MAJOR(devt));
return NULL;
} | 0 | [
"CWE-416"
] | linux-stable | 77da160530dd1dc94f6ae15a981f24e5f0021e84 | 24,937,033,529,086,640,000,000,000,000,000,000,000 | 7 | block: fix use-after-free in seq file
I got a KASAN report of use-after-free:
==================================================================
BUG: KASAN: use-after-free in klist_iter_exit+0x61/0x70 at addr ffff8800b6581508
Read of size 8 by task trinity-c1/315
======================================... |
xmlHashLookup(xmlHashTablePtr table, const xmlChar *name) {
return(xmlHashLookup3(table, name, NULL, NULL));
} | 0 | [
"CWE-399"
] | libxml2 | 8973d58b7498fa5100a876815476b81fd1a2412a | 318,849,048,218,203,320,000,000,000,000,000,000,000 | 3 | Add hash randomization to hash and dict structures
Following http://www.ocert.org/advisories/ocert-2011-003.html
it seems that having hash randomization might be a good idea
when using XML with untrusted data
* configure.in: lookup for rand, srand and time
* dict.c: add randomization to dictionaries hash tables
* hash... |
int sctp_do_peeloff(struct sock *sk, sctp_assoc_t id, struct socket **sockp)
{
struct sctp_association *asoc = sctp_id2assoc(sk, id);
struct sctp_sock *sp = sctp_sk(sk);
struct socket *sock;
int err = 0;
/* Do not peel off from one netns to another one. */
if (!net_eq(current->nsproxy->net_ns, sock_net(sk)))
r... | 0 | [
"CWE-416"
] | linux | a0ff660058b88d12625a783ce9e5c1371c87951f | 231,970,494,097,506,800,000,000,000,000,000,000,000 | 41 | 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... |
void _error_print(modbus_t *ctx, const char *context)
{
if (ctx->debug) {
fprintf(stderr, "ERROR %s", modbus_strerror(errno));
if (context != NULL) {
fprintf(stderr, ": %s\n", context);
} else {
fprintf(stderr, "\n");
}
}
} | 0 | [
"CWE-125"
] | libmodbus | 5ccdf5ef79d742640355d1132fa9e2abc7fbaefc | 328,809,752,215,126,470,000,000,000,000,000,000,000 | 11 | Fix VD-1301 and VD-1302 vulnerabilities
This patch was contributed by Maor Vermucht and Or Peles from
VDOO Connected Trust. |
static void ehci_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
k->realize = usb_ehci_pci_realize;
k->exit = usb_ehci_pci_exit;
k->class_id = PCI_CLASS_SERIAL_USB;
k->config_write = usb_ehci_pci_write_config;
... | 0 | [
"CWE-772",
"CWE-401"
] | qemu | d710e1e7bd3d5bfc26b631f02ae87901ebe646b0 | 210,637,998,836,369,900,000,000,000,000,000,000,000 | 13 | usb: ehci: fix memory leak in ehci
In usb_ehci_init function, it initializes 's->ipacket', but there
is no corresponding function to free this. As the ehci can be hotplug
and unplug, this will leak host memory leak. In order to make the
hierarchy clean, we should add a ehci pci finalize function, then call
the clean f... |
psf_d2i_array (const double *src, int *dest, int count, int normalize)
{ double normfact ;
normfact = normalize ? (1.0 * 0x7FFFFFFF) : 1.0 ;
while (--count >= 0)
dest [count] = lrint (src [count] * normfact) ;
return ;
} /* psf_f2i_array */ | 0 | [
"CWE-119",
"CWE-787"
] | libsndfile | 708e996c87c5fae77b104ccfeb8f6db784c32074 | 296,382,629,408,037,970,000,000,000,000,000,000,000 | 9 | src/ : Move to a variable length header buffer
Previously, the `psf->header` buffer was a fixed length specified by
`SF_HEADER_LEN` which was set to `12292`. This was problematic for
two reasons; this value was un-necessarily large for the majority
of files and too small for some others.
Now the size of the header bu... |
char ssl3_cbc_record_digest_supported(const EVP_MD *digest)
{
switch (digest->type)
{
case NID_md5:
case NID_sha1:
case NID_sha224:
case NID_sha256:
case NID_sha384:
case NID_sha512:
return 1;
default:
return 0;
}
} | 1 | [
"CWE-310"
] | openssl | 924b11742296c13816a9f301e76fea023003920c | 105,847,311,652,607,080,000,000,000,000,000,000,000 | 15 | Timing fix mitigation for FIPS mode.
We have to use EVP in FIPS mode so we can only partially mitigate
timing differences.
Make an extra call to HMAC_Update to hash additonal blocks
to cover any timing differences caused by removal of padding. |
MagickExport MagickBooleanType GetImageChannelKurtosis(const Image *image,
const ChannelType channel,double *kurtosis,double *skewness,
ExceptionInfo *exception)
{
double
area,
mean,
standard_deviation,
sum_squares,
sum_cubes,
sum_fourth_power;
ssize_t
y;
assert(image != (Image *... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 156,469,869,149,735,000,000,000,000,000,000,000,000 | 120 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
void RGWListBuckets::execute()
{
bool done;
bool started = false;
uint64_t total_count = 0;
const uint64_t max_buckets = s->cct->_conf->rgw_list_buckets_max_chunk;
op_ret = get_params();
if (op_ret < 0) {
goto send_end;
}
if (supports_account_metadata()) {
op_ret = rgw_get_user_attrs_by_uid(s... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 90,705,884,639,566,780,000,000,000,000,000,000,000 | 90 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static void bnx2x_udp_tunnel_add(struct net_device *netdev,
struct udp_tunnel_info *ti)
{
struct bnx2x *bp = netdev_priv(netdev);
u16 t_port = ntohs(ti->port);
switch (ti->type) {
case UDP_TUNNEL_TYPE_VXLAN:
__bnx2x_add_udp_port(bp, t_port, BNX2X_UDP_PORT_VXLAN);
break;
case UDP_TUNNEL_TYPE_GENEVE:
__b... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 223,076,570,439,728,400,000,000,000,000,000,000,000 | 17 | 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... |
GF_Err audio_sample_entry_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_MPEGAudioSampleEntryBox *ptr;
char *data;
u8 a, b, c, d;
u32 i, size, v, nb_alnum;
GF_Err e;
u64 pos, start;
ptr = (GF_MPEGAudioSampleEntryBox *)s;
start = gf_bs_get_position(bs);
gf_bs_seek(bs, start + 8);
v = gf_bs_read_u16(bs);
if (v)
... | 0 | [
"CWE-476"
] | gpac | 586e817dcd531bb3e75438390f1f753cfe6e940a | 42,022,207,049,722,640,000,000,000,000,000,000,000 | 95 | fixed #2046 |
void gf_bs_reassign(GF_BitStream *bs, FILE *stream)
{
if (!bs) return;
switch (bs->bsmode) {
case GF_BITSTREAM_FILE_WRITE:
case GF_BITSTREAM_FILE_READ:
bs->stream = stream;
if (gf_ftell(stream) != bs->position)
gf_bs_seek(bs, bs->position);
break;
}
} | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 89,869,824,601,697,070,000,000,000,000,000,000,000 | 12 | fixed #2165 |
nv_mousescroll(cmdarg_T *cap)
{
win_T *old_curwin = curwin, *wp;
if (mouse_row >= 0 && mouse_col >= 0)
{
int row, col;
row = mouse_row;
col = mouse_col;
// find the window at the pointer coordinates
wp = mouse_find_win(&row, &col, FIND_POPUP);
if (wp == NULL)
return;
#ifdef FEAT_PROP_POPUP
if... | 0 | [
"CWE-476",
"CWE-703"
] | vim | 80525751c5ce9ed82c41d83faf9ef38667bf61b1 | 322,576,405,968,396,900,000,000,000,000,000,000,000 | 86 | patch 9.0.0259: crash with mouse click when not initialized
Problem: Crash with mouse click when not initialized.
Solution: Check TabPageIdxs[] is not NULL. |
static void qxl_dirty_one_surface(PCIQXLDevice *qxl, QXLPHYSICAL pqxl,
uint32_t height, int32_t stride)
{
uint64_t offset, size;
uint32_t slot;
bool rc;
rc = qxl_get_check_slot_offset(qxl, pqxl, &slot, &offset);
assert(rc == true);
size = (uint64_t)height * abs... | 0 | [
"CWE-476"
] | qemu | d52680fc932efb8a2f334cc6993e705ed1e31e99 | 315,258,351,477,334,650,000,000,000,000,000,000,000 | 15 | qxl: check release info object
When releasing spice resources in release_resource() routine,
if release info object 'ext.info' is null, it leads to null
pointer dereference. Add check to avoid it.
Reported-by: Bugs SysSec <bugs-syssec@rub.de>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 20190425... |
void fpm_request_finished() /* {{{ */
{
struct fpm_scoreboard_proc_s *proc;
struct timeval now;
fpm_clock_get(&now);
proc = fpm_scoreboard_proc_acquire(NULL, -1, 0);
if (proc == NULL) {
zlog(ZLOG_WARNING, "failed to acquire proc scoreboard");
return;
}
proc->request_stage = FPM_REQUEST_FINISHED;
proc->tv... | 0 | [
"CWE-787"
] | php-src | fadb1f8c1d08ae62b4f0a16917040fde57a3b93b | 134,362,206,264,468,280,000,000,000,000,000,000,000 | 17 | Fix bug #81026 (PHP-FPM oob R/W in root process leading to priv escalation)
The main change is to store scoreboard procs directly to the variable sized
array rather than indirectly through the pointer.
Signed-off-by: Stanislav Malyshev <stas@php.net> |
ZEND_METHOD(exception, __construct)
{
char *message = NULL;
long code = 0;
zval *object, *previous = NULL;
int argc = ZEND_NUM_ARGS(), message_len;
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc TSRMLS_CC, "|slO!", &message, &message_len, &code, &previous, default_exception_ce) == FAILURE) {
... | 0 | [] | php-src | a894a8155fab068d68a04bf181dbaddfa01ccbb0 | 102,402,922,758,454,500,000,000,000,000,000,000,000 | 25 | More fixes for bug #69152 |
Local<Array> CreateHeaders() {
// num_values_ is either -1 or the entry # of the last header
// so num_values_ == 0 means there's a single header
Local<Array> headers = Array::New(2 * num_values_);
for (int i = 0; i < num_values_; ++i) {
headers->Set(2 * i, fields_[i].ToString());
headers... | 0 | [] | node | 7b3fb22290c3b6acb497ca85cf2f1648d75c8154 | 262,803,068,702,351,400,000,000,000,000,000,000,000 | 12 | typo in node_http_parser |
static netdev_tx_t yam_send_packet(struct sk_buff *skb,
struct net_device *dev)
{
struct yam_port *yp = netdev_priv(dev);
skb_queue_tail(&yp->send_queue, skb);
dev->trans_start = jiffies;
return NETDEV_TX_OK;
} | 0 | [
"CWE-399"
] | linux | 8e3fbf870481eb53b2d3a322d1fc395ad8b367ed | 284,137,053,994,692,100,000,000,000,000,000,000,000 | 9 | hamradio/yam: fix info leak in ioctl
The yam_ioctl() code fails to initialise the cmd field
of the struct yamdrv_ioctl_cfg. Add an explicit memset(0)
before filling the structure to avoid the 4-byte info leak.
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: David S. Miller <davem@davemloft.net> |
R_API char *cmd_syscall_dostr(RCore *core, int n, ut64 addr) {
char *res = NULL;
int i;
char str[64];
int defVector = r_syscall_get_swi (core->anal->syscall);
if (defVector > 0) {
n = -1;
}
if (n == -1) {
n = (int)r_debug_reg_get (core->dbg, "oeax");
if (!n || n == -1) {
const char *a0 = r_reg_get_name ... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | a1bc65c3db593530775823d6d7506a457ed95267 | 318,406,152,729,865,840,000,000,000,000,000,000,000 | 76 | Fix #12375 - Crash in bd+ao (#12382) |
virDomainHostdevDefParseXMLCaps(xmlNodePtr node G_GNUC_UNUSED,
xmlXPathContextPtr ctxt,
const char *type,
virDomainHostdevDefPtr def)
{
xmlNodePtr sourcenode;
/* @type is passed in from the caller rather than read f... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 199,974,938,122,508,640,000,000,000,000,000,000,000 | 72 | 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 int x(regex_t* reg, unsigned char* pattern, unsigned char* str)
{
int r, i;
char buf[200];
regmatch_t pmatch[20];
r = regexec(reg, (char* )str, reg->re_nsub + 1, pmatch, 0);
if (r != 0 && r != REG_NOMATCH) {
regerror(r, reg, buf, sizeof(buf));
fprintf(stderr, "ERROR: %s\n", buf);
return -1... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 214,595,994,753,201,300,000,000,000,000,000,000,000 | 24 | onig-5.9.2 |
static json_bool validate_keyslots_array(struct crypt_device *cd,
json_object *jarr, json_object *jobj_keys)
{
json_object *jobj;
int i = 0, length = (int) json_object_array_length(jarr);
while (i < length) {
jobj = json_object_array_get_idx(jarr, i);
if (!json_object_is_type(jobj, json_type_string)) {
... | 0 | [
"CWE-787"
] | cryptsetup | 52f5cb8cedf22fb3e14c744814ec8af7614146c7 | 304,319,187,735,711,750,000,000,000,000,000,000,000 | 22 | Check segment gaps regardless of heap space.
Segments are validated in hdr_validate_segments. Gaps in segment keys
are detected when collecting offsets. But if an invalid segment is very
large, larger than count, it could happen that cryptsetup is unable to
allocate enough memory, not giving a clue about what actually... |
void SFS_CompoundExpression(ScriptParser *parser)
{
if (parser->codec->LastError) return;
SFS_Expression(parser);
if (! gf_bs_read_int(parser->bs, 1)) return;
if (parser->codec->LastError) return;
SFS_AddString(parser, ",");
SFS_CompoundExpression(parser);
} | 0 | [
"CWE-476"
] | gpac | 4e7736d7ec7bf64026daa611da951993bb42fdaf | 96,728,049,825,453,140,000,000,000,000,000,000,000 | 9 | fixed #2238 |
void f2fs_update_inode(struct inode *inode, struct page *node_page)
{
struct f2fs_inode *ri;
struct extent_tree *et = F2FS_I(inode)->extent_tree;
f2fs_wait_on_page_writeback(node_page, NODE, true);
set_page_dirty(node_page);
f2fs_inode_synced(inode);
ri = F2FS_INODE(node_page);
ri->i_mode = cpu_to_le16(inode... | 0 | [
"CWE-125"
] | linux | e34438c903b653daca2b2a7de95aed46226f8ed3 | 292,372,799,069,592,850,000,000,000,000,000,000,000 | 89 | f2fs: fix to do sanity check with node footer and iblocks
This patch adds to do sanity check with below fields of inode to
avoid reported panic.
- node footer
- iblocks
https://bugzilla.kernel.org/show_bug.cgi?id=200223
- Overview
BUG() triggered in f2fs_truncate_inode_blocks() when un-mounting a mounted f2fs image ... |
DoubleVal() : val(0.0) {} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 210,124,029,560,018,650,000,000,000,000,000,000,000 | 1 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static void ctrycatch(JF, js_Ast *trystm, js_Ast *catchvar, js_Ast *catchstm)
{
int L1, L2;
L1 = emitjump(J, F, OP_TRY);
{
/* if we get here, we have caught an exception in the try block */
checkfutureword(J, F, catchvar);
if (F->strict) {
if (!strcmp(catchvar->string, "arguments"))
jsC_error(J, catchva... | 0 | [
"CWE-703",
"CWE-787"
] | mujs | df8559e7bdbc6065276e786217eeee70f28fce66 | 266,553,922,730,982,560,000,000,000,000,000,000,000 | 24 | Bug 704749: Clear jump list after patching jump addresses.
Since we can emit a statement multiple times when compiling try/finally
we have to use a new patch list for each instance. |
static SECURITY_STATUS SEC_ENTRY negotiate_QueryCredentialsAttributesW(PCredHandle phCredential,
ULONG ulAttribute,
void* pBuffer)
{
WLog_ERR(TAG, "[%s]: TODO: Implement", __FUN... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 325,922,877,857,804,300,000,000,000,000,000,000,000 | 7 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
int ioat1_dma_probe(struct ioatdma_device *device, int dca)
{
struct pci_dev *pdev = device->pdev;
struct dma_device *dma;
int err;
device->intr_quirk = ioat1_intr_quirk;
device->enumerate_channels = ioat1_enumerate_channels;
device->self_test = ioat_dma_self_test;
device->timer_fn = ioat1_timer_event;
device-... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 330,792,479,647,905,870,000,000,000,000,000,000,000 | 31 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static void keyring_destroy(struct key *keyring)
{
struct keyring_list *klist;
int loop;
if (keyring->description) {
write_lock(&keyring_name_lock);
if (keyring->type_data.link.next != NULL &&
!list_empty(&keyring->type_data.link))
list_del(&keyring->type_data.link);
write_unlock(&keyring_name_lock... | 0 | [
"CWE-362"
] | linux-2.6 | cea7daa3589d6b550546a8c8963599f7c1a3ae5c | 2,128,494,895,914,624,000,000,000,000,000,000,000 | 25 | KEYS: find_keyring_by_name() can gain access to a freed keyring
find_keyring_by_name() can gain access to a keyring that has had its reference
count reduced to zero, and is thus ready to be freed. This then allows the
dead keyring to be brought back into use whilst it is being destroyed.
The following timeline illus... |
nwfilterDriverInstallDBusMatches(GDBusConnection *sysbus G_GNUC_UNUSED)
{
} | 0 | [
"CWE-667"
] | libvirt | a4947e8f63c3e6b7b067b444f3d6cf674c0d7f36 | 182,264,915,169,132,740,000,000,000,000,000,000,000 | 3 | nwfilter: fix crash when counting number of network filters
The virNWFilterObjListNumOfNWFilters method iterates over the
driver->nwfilters, accessing virNWFilterObj instances. As such
it needs to be protected against concurrent modification of
the driver->nwfilters object.
This API allows unprivileged users to conne... |
void storeAuth(AuthenticatorPtr&& auth) { auths_.emplace_back(std::move(auth)); } | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 66,022,539,419,987,820,000,000,000,000,000,000,000 | 1 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
static void cmd_oper_got_pass(const char *password, OPER_PASS_REC *rec)
{
SERVER_REC *server_rec = server_find_tag(rec->server_tag);
if (*password != '\0' && IS_IRC_SERVER(server_rec))
irc_send_cmdv((IRC_SERVER_REC *) server_rec, "OPER %s %s", rec->nick, password);
g_free(rec->nick);
g_free(rec->server_tag);
g_f... | 0 | [
"CWE-416"
] | irssi | 36564717c9f701e3a339da362ab46d220d27e0c1 | 56,494,119,891,127,400,000,000,000,000,000,000,000 | 9 | Merge branch 'security' into 'master'
Security
See merge request irssi/irssi!34
(cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) |
int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
struct sock *sk = sock->sk;
int err = 0;
struct net *net = sock_net(sk);
switch (cmd) {
case SIOCGSTAMP:
err = sock_get_timestamp(sk, (struct timeval __user *)arg);
break;
case SIOCGSTAMPNS:
err = sock_get_timestampns(sk, (struct ti... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 83,750,226,801,561,260,000,000,000,000,000,000,000 | 45 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
int STDCALL mysql_stmt_next_result(MYSQL_STMT *stmt)
{
MYSQL *mysql= stmt->mysql;
int rc;
DBUG_ENTER("mysql_stmt_next_result");
if (!mysql)
DBUG_RETURN(1);
if (stmt->last_errno)
DBUG_RETURN(stmt->last_errno);
if (mysql->server_status & SERVER_MORE_RESULTS_EXISTS)
{
if (reset_stmt_handle(stm... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 164,007,660,628,584,140,000,000,000,000,000,000,000 | 41 | 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... |
*virDomainConfigFile(const char *dir,
const char *name)
{
char *ret;
ret = g_strdup_printf("%s/%s.xml", dir, name);
return ret;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 299,647,229,959,092,330,000,000,000,000,000,000,000 | 8 | 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 int parse_CInGroupSortAggregSet_type(tvbuff_t *tvb, int offset, proto_tree *tree, enum CInGroupSortAggregSet_type *type)
{
guint8 tmp = tvb_get_guint8(tvb, offset);
switch(tmp) {
case GroupIdDefault:
*type = GroupIdDefault;
break;
case GroupIdMinValue:
*type = GroupIdMinValue;
break;
case Gro... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 250,441,020,258,456,030,000,000,000,000,000,000,000 | 23 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
int filemap_write_and_wait(struct address_space *mapping)
{
int err = 0;
if (mapping->nrpages) {
err = filemap_fdatawrite(mapping);
/*
* Even if the above returned error, the pages may be
* written partially (e.g. -ENOSPC), so we wait for it.
* But the -EIO is special case, it may indicate the worst
... | 0 | [
"CWE-193"
] | linux-2.6 | 94ad374a0751f40d25e22e036c37f7263569d24c | 99,481,310,929,163,440,000,000,000,000,000,000,000 | 20 | Fix off-by-one error in iov_iter_advance()
The iov_iter_advance() function would look at the iov->iov_len entry
even though it might have iterated over the whole array, and iov was
pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a
kernel page fault if the allocation was at the end of a page, and th... |
static void gic_dist_writeb(void *opaque, hwaddr offset,
uint32_t value, MemTxAttrs attrs)
{
GICState *s = (GICState *)opaque;
int irq;
int i;
int cpu;
cpu = gic_get_current_cpu(s);
if (offset < 0x100) {
if (offset == 0) {
if (s->security_extn && ... | 0 | [
"CWE-787"
] | qemu | edfe2eb4360cde4ed5d95bda7777edcb3510f76a | 16,297,296,383,178,956,000,000,000,000,000,000,000 | 284 | hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
Per the ARM Generic Interrupt Controller Architecture specification
(document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit,
not 10:
- 4.3 Distributor register descriptions
- 4.3.15 Software Generated Interrupt Register, GICD_SG
- Table 4-2... |
virtual Ref_Type ref_type() { return OUTER_REF; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 238,451,500,527,004,470,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
int nfs_flush_incompatible(struct file *file, struct page *page)
{
struct nfs_open_context *ctx = nfs_file_open_context(file);
struct nfs_lock_context *l_ctx;
struct nfs_page *req;
int do_flush, status;
/*
* Look for a request corresponding to this page. If there
* is one, and it belongs to another file, we fl... | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 207,498,349,156,536,200,000,000,000,000,000,000,000 | 31 | 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... |
static bool cmd_read_dma(IDEState *s, uint8_t cmd)
{
bool lba48 = (cmd == WIN_READDMA_EXT);
if (!s->bs) {
ide_abort_command(s);
return true;
}
ide_cmd_lba48_transform(s, lba48);
ide_sector_start_dma(s, IDE_DMA_READ);
return false;
} | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 24,327,700,254,693,995,000,000,000,000,000,000,000 | 14 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
Field *Field_enum::make_new_field(MEM_ROOT *root, TABLE *new_table,
bool keep_type)
{
Field_enum *res= (Field_enum*) Field::make_new_field(root, new_table,
keep_type);
if (res)
res->typelib= copy_typelib(root, typelib);
r... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 121,604,726,364,500,300,000,000,000,000,000,000,000 | 9 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
GF_EXPORT
u32 gf_isom_get_nalu_length_field(GF_ISOFile *file, u32 track, u32 StreamDescriptionIndex)
{
GF_TrackBox *trak;
GF_SampleEntryBox *entry;
GF_MPEGVisualSampleEntryBox *ve;
GF_SampleDescriptionBox *stsd;
trak = gf_isom_get_track_from_file(file, track);
if (!trak) {
file->LastError = GF_BAD_PARAM;
ret... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 48,679,197,726,160,860,000,000,000,000,000,000,000 | 33 | fixed #1706 |
QPDF::findHeader()
{
qpdf_offset_t global_offset = this->m->file->tell();
std::string line = this->m->file->readLine(1024);
char const* p = line.c_str();
if (strncmp(p, "%PDF-", 5) != 0)
{
throw std::logic_error("findHeader is not looking at %PDF-");
}
p += 5;
std::string version... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 13,451,950,388,784,932,000,000,000,000,000,000,000 | 50 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.