func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
iperf_get_test_reverse(struct iperf_test *ipt)
{
return ipt->reverse;
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 273,219,009,924,859,580,000,000,000,000,000,000,000 | 4 | 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... |
gst_matroska_demux_seek_block (GstMatroskaDemux * demux)
{
if (G_UNLIKELY (demux->seek_block)) {
if (!(--demux->seek_block)) {
return TRUE;
} else {
GST_LOG_OBJECT (demux, "should skip block due to seek");
return FALSE;
}
} else {
return TRUE;
}
} | 0 | [] | gst-plugins-good | 9181191511f9c0be6a89c98b311f49d66bd46dc3 | 304,642,727,464,831,700,000,000,000,000,000,000,000 | 13 | matroskademux: Fix extraction of multichannel WavPack
The old code had a couple of issues that all lead to potential memory
safety bugs.
- Use a constant for the Wavpack4Header size instead of using sizeof.
It's written out into the data and not from the struct and who knows
what special alignment/padding r... |
for(inst = pModConf->root ; inst != NULL ; ) {
if (inst->ratelimiter) {
ratelimitDestruct(inst->ratelimiter);
}
if (inst->pInputName) {
prop.Destruct(&inst->pInputName);
}
free(inst->pszEndpoint);
free(inst->pszBasicAuthFile);
free(inst->pszBindRuleset);
free(inst->pszInputName);
del = inst;
... | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 36,463,556,365,490,160,000,000,000,000,000,000,000 | 16 | net bugfix: potential buffer overrun |
onigenc_ascii_is_mbc_ambiguous(OnigCaseFoldType flag ARG_UNUSED,
const UChar** pp, const UChar* end ARG_UNUSED)
{
const UChar* p = *pp;
(*pp)++;
return ONIGENC_IS_ASCII_CODE_CASE_AMBIG(*p);
} | 0 | [
"CWE-125"
] | Onigmo | d4cf99d30bd5f6a8a4ababd0b9d7b06f3a479a24 | 126,383,765,755,247,000,000,000,000,000,000,000,000 | 8 | Fix out-of-bounds read in parse_char_class() (Close #139)
/[\x{111111}]/ causes out-of-bounds read when encoding is a single byte
encoding. \x{111111} is an invalid codepoint for a single byte encoding.
Check if it is a valid codepoint. |
verify_tcp_window_scaling(gboolean is_synack, struct tcp_analysis *tcpd)
{
if( tcpd->fwd->win_scale==-1 ) {
/* We know window scaling will not be used as:
* a) this is the SYN and it does not have the WS option
* (we set the reverse win_scale also in case we miss
* the SYN/A... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 88,995,766,800,657,100,000,000,000,000,000,000,000 | 25 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
int ext4_ext_insert_extent(handle_t *handle, struct inode *inode,
struct ext4_ext_path *path,
struct ext4_extent *newext, int flag)
{
struct ext4_extent_header *eh;
struct ext4_extent *ex, *fex;
struct ext4_extent *nearex; /* nearest extent */
struct ext4_ext_path *npath = NULL;
int depth, len, err;
ext4_... | 0 | [
"CWE-703"
] | linux | 667eff35a1f56fa74ce98a0c7c29a40adc1ba4e3 | 305,217,329,643,705,900,000,000,000,000,000,000,000 | 166 | ext4: reimplement convert and split_unwritten
Reimplement ext4_ext_convert_to_initialized() and
ext4_split_unwritten_extents() using ext4_split_extent()
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Tested-by: Allison Henderson <achender@linux.vnet.ibm.com> |
static int snd_line6_impulse_period_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_line6_pcm *line6pcm = snd_kcontrol_chip(kcontrol);
ucontrol->value.integer.value[0] = line6pcm->impulse_period;
return 0;
} | 0 | [
"CWE-476"
] | linux | 3450121997ce872eb7f1248417225827ea249710 | 198,658,398,739,544,200,000,000,000,000,000,000,000 | 8 | ALSA: line6: Fix write on zero-sized buffer
LINE6 drivers allocate the buffers based on the value returned from
usb_maxpacket() calls. The manipulated device may return zero for
this, and this results in the kmalloc() with zero size (and it may
succeed) while the other part of the driver code writes the packet
data w... |
gst_matroska_track_encryption_algorithm_name (gint val)
{
GEnumValue *en;
GEnumClass *enum_class =
g_type_class_ref (MATROSKA_TRACK_ENCRYPTION_ALGORITHM_TYPE);
en = g_enum_get_value (G_ENUM_CLASS (enum_class), val);
return en ? en->value_nick : NULL;
} | 0 | [] | gst-plugins-good | 9181191511f9c0be6a89c98b311f49d66bd46dc3 | 202,244,860,163,228,600,000,000,000,000,000,000,000 | 8 | matroskademux: Fix extraction of multichannel WavPack
The old code had a couple of issues that all lead to potential memory
safety bugs.
- Use a constant for the Wavpack4Header size instead of using sizeof.
It's written out into the data and not from the struct and who knows
what special alignment/padding r... |
int ha_partition::preload_keys(THD *thd, HA_CHECK_OPT *check_opt)
{
DBUG_ENTER("ha_partition::preload_keys");
DBUG_RETURN(handle_opt_partitions(thd, check_opt, PRELOAD_KEYS_PARTS));
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 339,109,102,290,216,600,000,000,000,000,000,000,000 | 6 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
rsRetVal MsgSetProperty(msg_t *pThis, var_t *pProp)
{
prop_t *myProp;
prop_t *propRcvFrom = NULL;
prop_t *propRcvFromIP = NULL;
DEFiRet;
ISOBJ_TYPE_assert(pThis, msg);
assert(pProp != NULL);
if(isProp("iProtocolVersion")) {
setProtocolVersion(pThis, pProp->val.num);
} else if(isProp("iSeverity")) {
pThi... | 0 | [
"CWE-772"
] | rsyslog | 8083bd1433449fd2b1b79bf759f782e0f64c0cd2 | 191,541,710,859,771,330,000,000,000,000,000,000,000 | 67 | backporting abort condition fix from 5.7.7 |
R_API void r_egg_syscall(REgg *egg, const char *arg, ...) {
RSyscallItem *item = r_syscall_get (egg->syscall,
r_syscall_get_num (egg->syscall, arg), -1);
if (!strcmp (arg, "close")) {
//egg->remit->syscall_args ();
}
if (!item) {
return;
}
egg->remit->syscall (egg, item->num);
} | 0 | [
"CWE-125"
] | radare2 | e710401ebb4a892a87b0c709d709af8b5dcbbb01 | 253,812,291,583,769,200,000,000,000,000,000,000,000 | 11 | patch #14211 heap buffer overflow in large ragg2
inputs. this should be refactored to use an RBuffer to enable dynamic
resizing, but for now just patching it to bail out if we are about to
overwrite the allocated statically sized buffer |
xmlRelaxNGFree(xmlRelaxNGPtr schema)
{
if (schema == NULL)
return;
if (schema->topgrammar != NULL)
xmlRelaxNGFreeGrammar(schema->topgrammar);
if (schema->doc != NULL)
xmlFreeDoc(schema->doc);
if (schema->documents != NULL)
xmlRelaxNGFreeDocumentList(schema->documents);
... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 287,321,335,176,035,830,000,000,000,000,000,000,000 | 23 | 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 |
TEST_F(HttpConnectionManagerImplTest, PreserveUpstreamDateEnabledDateSet) {
TestScopedRuntime scoped_runtime;
Runtime::LoaderSingleton::getExisting()->mergeValues(
{{"envoy.reloadable_features.preserve_upstream_date", "true"}});
setup(false, "");
setUpEncoderAndDecoder(false, false);
sendRequestHeadersA... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 226,033,583,617,664,000,000,000,000,000,000,000,000 | 15 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
void kvm_inject_page_fault(struct kvm_vcpu *vcpu, struct x86_exception *fault)
{
++vcpu->stat.pf_guest;
vcpu->arch.exception.nested_apf =
is_guest_mode(vcpu) && fault->async_page_fault;
if (vcpu->arch.exception.nested_apf) {
vcpu->arch.apf.nested_apf_token = fault->address;
kvm_queue_exception_e(vcpu, PF_VECTO... | 0 | [
"CWE-476"
] | linux | e97f852fd4561e77721bb9a4e0ea9d98305b1e93 | 9,522,955,940,097,268,000,000,000,000,000,000,000 | 13 | KVM: X86: Fix scan ioapic use-before-initialization
Reported by syzkaller:
BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8
PGD 80000003ec4da067 P4D 80000003ec4da067 PUD 3f7bfa067 PMD 0
Oops: 0000 [#1] PREEMPT SMP PTI
CPU: 7 PID: 5059 Comm: debug Tainted: G OE 4.19.0-rc5 #16... |
template<typename tp>
CImg<T>& object3dtoCImg3d(const CImgList<tp>& primitives,
const bool full_check=true) {
return get_object3dtoCImg3d(primitives,full_check).move_to(*this); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 65,186,207,330,998,480,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
word_split (w, ifs_chars)
WORD_DESC *w;
char *ifs_chars;
{
WORD_LIST *result;
if (w)
{
char *xifs;
xifs = ((w->flags & W_QUOTED) || ifs_chars == 0) ? "" : ifs_chars;
result = list_string (w->word, xifs, w->flags & W_QUOTED);
}
else
result = (WORD_LIST *)NULL;
return (r... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 97,018,774,825,248,860,000,000,000,000,000,000,000 | 18 | bash-4.4-rc2 release |
static int sql_delay_event(Log_event *ev, THD *thd, Relay_log_info *rli)
{
long sql_delay= rli->get_sql_delay();
DBUG_ENTER("sql_delay_event");
mysql_mutex_assert_owner(&rli->data_lock);
DBUG_ASSERT(!rli->belongs_to_client());
int type= ev->get_type_code();
if (sql_delay && type != ROTATE_EVENT &&
t... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 65,774,635,691,812,200,000,000,000,000,000,000,000 | 46 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static void cgw_remove_all_jobs(struct net *net)
{
struct cgw_job *gwj = NULL;
struct hlist_node *nx;
ASSERT_RTNL();
hlist_for_each_entry_safe(gwj, nx, &net->can.cgw_list, list) {
hlist_del(&gwj->list);
cgw_unregister_filter(net, gwj);
kmem_cache_free(cgw_cache, gwj);
}
} | 0 | [
"CWE-787"
] | linux | 0aaa81377c5a01f686bcdb8c7a6929a7bf330c68 | 309,521,164,403,356,460,000,000,000,000,000,000,000 | 13 | can: gw: ensure DLC boundaries after CAN frame modification
Muyu Yu provided a POC where user root with CAP_NET_ADMIN can create a CAN
frame modification rule that makes the data length code a higher value than
the available CAN frame data size. In combination with a configured checksum
calculation where the result is... |
exif_data_ref (ExifData *data)
{
if (!data)
return;
data->priv->ref_count++;
} | 0 | [
"CWE-400",
"CWE-703"
] | libexif | 6aa11df549114ebda520dde4cdaea2f9357b2c89 | 134,454,575,681,297,950,000,000,000,000,000,000,000 | 7 | Improve deep recursion detection in exif_data_load_data_content.
The existing detection was still vulnerable to pathological cases
causing DoS by wasting CPU. The new algorithm takes the number of tags
into account to make it harder to abuse by cases using shallow recursion
but with a very large number of tags. This ... |
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);
const TensorShape& input_shape = input.shape();
const Tensor& out_backprop = context->input(2);
const TensorShape& out_backprop_shape = out_backprop.shape();
TensorShape filter_shape;
if (takes_shape_)... | 0 | [
"CWE-369"
] | tensorflow | 311403edbc9816df80274bd1ea8b3c0c0f22c3fa | 697,360,937,988,189,000,000,000,000,000,000,000 | 234 | Eliminate a division by 0 in 3D convolutions.
Also prevent a CHECK failed introduced in the most recent change.
PiperOrigin-RevId: 369322073
Change-Id: I4f609c028f89565fb2b49c3fdd20b63496582bae |
static int perf_event_ksymbol_match(struct perf_event *event)
{
return event->attr.ksymbol;
} | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 75,649,725,699,332,820,000,000,000,000,000,000,000 | 4 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
int InstanceKlass::mark_dependent_nmethods(KlassDepChange& changes) {
return dependencies().mark_dependent_nmethods(changes);
} | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 307,738,590,068,563,800,000,000,000,000,000,000,000 | 3 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
void kvm_propagate_fault(struct kvm_vcpu *vcpu, struct x86_exception *fault)
{
if (mmu_is_nested(vcpu) && !fault->nested_page_fault)
vcpu->arch.nested_mmu.inject_page_fault(vcpu, fault);
else
vcpu->arch.mmu.inject_page_fault(vcpu, fault);
} | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 231,008,977,120,999,650,000,000,000,000,000,000,000 | 7 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
getproxy (struct url *u)
{
char *proxy = NULL;
char *rewritten_url;
if (!opt.use_proxy)
return NULL;
if (no_proxy_match (u->host, (const char **)opt.no_proxy))
return NULL;
switch (u->scheme)
{
case SCHEME_HTTP:
proxy = opt.http_proxy ? opt.http_proxy : getenv ("http_proxy");
bre... | 0 | [
"CWE-119"
] | wget | ba6b44f6745b14dce414761a8e4b35d31b176bba | 52,226,737,517,530,330,000,000,000,000,000,000,000 | 40 | Fix heap overflow in HTTP protocol handling (CVE-2017-13090)
* src/retr.c (fd_read_body): Stop processing on negative chunk size
Reported-by: Antti Levomäki, Christian Jalio, Joonas Pihlaja from Forcepoint
Reported-by: Juhani Eronen from Finnish National Cyber Security Centre |
static int snd_rawmidi_release(struct inode *inode, struct file *file)
{
struct snd_rawmidi_file *rfile;
struct snd_rawmidi *rmidi;
struct module *module;
rfile = file->private_data;
rmidi = rfile->rmidi;
rawmidi_release_priv(rfile);
kfree(rfile);
module = rmidi->card->module;
snd_card_file_remove(rmidi->card... | 0 | [
"CWE-415"
] | linux | 39675f7a7c7e7702f7d5341f1e0d01db746543a0 | 134,852,179,016,350,380,000,000,000,000,000,000,000 | 15 | ALSA: rawmidi: Change resized buffers atomically
The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the
current code is racy. For example, the sequencer client may write to
buffer while it being resized.
As a simple workaround, let's switch to the resized buffer inside the
stream runtime lock.
Reported... |
int ParseDsdiffHeaderConfig (FILE *infile, char *infilename, char *fourcc, WavpackContext *wpc, WavpackConfig *config)
{
int64_t infilesize, total_samples;
DFFFileHeader dff_file_header;
DFFChunkHeader dff_chunk_header;
uint32_t bcount;
infilesize = DoGetFileSize (infile);
memcpy (&dff_file_hea... | 1 | [
"CWE-369"
] | WavPack | 4c0faba32fddbd0745cbfaf1e1aeb3da5d35b9fc | 244,248,178,154,897,020,000,000,000,000,000,000,000 | 245 | issue #65: make sure DSDIFF files have a valid channel count |
static enum test_return test_binary_pipeline_hickup(void)
{
size_t buffersize = 65 * 1024;
void *buffer = malloc(buffersize);
int ii;
pthread_t tid;
int ret;
allow_closed_read = true;
hickup_thread_running = true;
if ((ret = pthread_create(&tid, NULL,
binar... | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 291,452,044,383,702,960,000,000,000,000,000,000,000 | 33 | Issue 102: Piping null to the server will crash it |
fill_record(THD *thd, TABLE *table, Field **ptr, List<Item> &values,
bool ignore_errors, bool use_value)
{
List_iterator_fast<Item> v(values);
List<TABLE> tbl_list;
Item *value;
Field *field;
bool abort_on_warning_saved= thd->abort_on_warning;
uint autoinc_index= table->next_number_field
... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 43,855,091,530,310,360,000,000,000,000,000,000,000 | 80 | 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. |
read_string(FILE *fd, int cnt)
{
char_u *str;
int i;
int c;
// allocate memory
str = alloc(cnt + 1);
if (str != NULL)
{
// Read the string. Quit when running into the EOF.
for (i = 0; i < cnt; ++i)
{
c = getc(fd);
if (c == EOF)
{
vim_free(str);
return NULL;
}
... | 0 | [
"CWE-120"
] | vim | 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 | 74,604,445,785,299,400,000,000,000,000,000,000,000 | 25 | patch 8.2.4969: changing text in Visual mode may cause invalid memory access
Problem: Changing text in Visual mode may cause invalid memory access.
Solution: Check the Visual position after making a change. |
static int vrend_finish_shader(struct vrend_context *ctx,
struct vrend_shader_selector *sel,
const struct tgsi_token *tokens)
{
int r;
sel->tokens = tgsi_dup_tokens(tokens);
r = vrend_shader_select(ctx, sel, NULL);
if (r) {
return EINVAL;... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 101,932,050,426,634,510,000,000,000,000,000,000,000 | 14 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static inline bool has_pending_signals(sigset_t *signal, sigset_t *blocked)
{
unsigned long ready;
long i;
switch (_NSIG_WORDS) {
default:
for (i = _NSIG_WORDS, ready = 0; --i >= 0 ;)
ready |= signal->sig[i] &~ blocked->sig[i];
break;
case 4: ready = signal->sig[3] &~ blocked->sig[3];
ready |= signal->... | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 215,563,971,024,967,900,000,000,000,000,000,000,000 | 25 | signal: Extend exec_id to 64bits
Replace the 32bit exec_id with a 64bit exec_id to make it impossible
to wrap the exec_id counter. With care an attacker can cause exec_id
wrap and send arbitrary signals to a newly exec'd parent. This
bypasses the signal sending checks if the parent changes their
credentials during e... |
static int vbg_misc_device_close(struct inode *inode, struct file *filp)
{
vbg_core_close_session(filp->private_data);
filp->private_data = NULL;
return 0;
} | 0 | [
"CWE-362"
] | linux | bd23a7269834dc7c1f93e83535d16ebc44b75eba | 194,181,926,880,806,160,000,000,000,000,000,000,000 | 6 | virt: vbox: Only copy_from_user the request-header once
In vbg_misc_device_ioctl(), the header of the ioctl argument is copied from
the userspace pointer 'arg' and saved to the kernel object 'hdr'. Then the
'version', 'size_in', and 'size_out' fields of 'hdr' are verified.
Before this commit, after the checks a buffe... |
_gcry_pk_ecc_get_sexp (gcry_sexp_t *r_sexp, int mode, mpi_ec_t ec)
{
gpg_err_code_t rc;
gcry_mpi_t mpi_G = NULL;
gcry_mpi_t mpi_Q = NULL;
if (!ec->p || !ec->a || !ec->b || !ec->G || !ec->n || !ec->h)
return GPG_ERR_BAD_CRYPT_CTX;
if (mode == GCRY_PK_GET_SECKEY && !ec->d)
return GPG_ERR_NO_SECKEY;
... | 0 | [
"CWE-200"
] | libgcrypt | bf76acbf0da6b0f245e491bec12c0f0a1b5be7c9 | 90,523,993,099,928,220,000,000,000,000,000,000,000 | 76 | ecc: Add input validation for X25519.
* cipher/ecc.c (ecc_decrypt_raw): Add input validation.
* mpi/ec.c (ec_p_init): Use scratch buffer for bad points.
(_gcry_mpi_ec_bad_point): New.
--
Following is the paper describing the attack:
May the Fourth Be With You: A Microarchitectural Side Channel Attack
on Rea... |
static ExecRuntime* exec_runtime_free(ExecRuntime *rt, bool destroy) {
int r;
if (!rt)
return NULL;
if (rt->manager)
(void) hashmap_remove(rt->manager->exec_runtime_by_id, rt->id);
/* When destroy is true, then rm_rf tmp_dir and var_tmp_dir. */
... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 120,069,120,774,514,440,000,000,000,000,000,000,000 | 40 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
parse_mpls(const void **datap, size_t *sizep)
{
const struct mpls_hdr *mh;
int count = 0;
while ((mh = data_try_pull(datap, sizep, sizeof *mh))) {
count++;
if (mh->mpls_lse.lo & htons(1 << MPLS_BOS_SHIFT)) {
break;
}
}
return MIN(count, FLOW_MAX_MPLS_LABELS);
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 92,844,010,534,193,710,000,000,000,000,000,000,000 | 13 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
void Magick::Image::size(const Geometry &geometry_)
{
modifyImage();
options()->size(geometry_);
image()->rows=geometry_.height();
image()->columns=geometry_.width();
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 7,850,781,642,163,873,000,000,000,000,000,000,000 | 7 | Added missing return to avoid use after free. |
void __update_idle_core(struct rq *rq)
{
int core = cpu_of(rq);
int cpu;
rcu_read_lock();
if (test_idle_cores(core, true))
goto unlock;
for_each_cpu(cpu, cpu_smt_mask(core)) {
if (cpu == core)
continue;
if (!available_idle_cpu(cpu))
goto unlock;
}
set_idle_cores(core, 1);
unlock:
rcu_read_unlock... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 24,469,366,037,694,314,000,000,000,000,000,000,000 | 21 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
gst_rtsp_connection_set_tls_database (GstRTSPConnection * conn,
GTlsDatabase * database)
{
GTlsDatabase *old_db;
g_return_if_fail (conn != NULL);
if (database)
g_object_ref (database);
old_db = conn->tls_database;
conn->tls_database = database;
if (old_db)
g_object_unref (old_db);
} | 0 | [] | gst-plugins-base | f672277509705c4034bc92a141eefee4524d15aa | 118,833,693,231,680,940,000,000,000,000,000,000,000 | 16 | gstrtspconnection: Security loophole making heap overflow
The former code allowed an attacker to create a heap overflow by
sending a longer than allowed session id in a response and including a
semicolon to change the maximum length. With this change, the parser
will never go beyond 512 bytes. |
int mingw_shutdown(int sockfd, int how)
{
SOCKET s = (SOCKET)_get_osfhandle(sockfd);
return shutdown(s, how);
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 146,881,195,247,105,340,000,000,000,000,000,000,000 | 5 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
static inline struct anon_vma_chain *anon_vma_chain_alloc(gfp_t gfp)
{
return kmem_cache_alloc(anon_vma_chain_cachep, gfp);
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-264"
] | linux | 57e68e9cd65b4b8eb4045a1e0d0746458502554c | 217,517,667,366,348,000,000,000,000,000,000,000,000 | 4 | mm: try_to_unmap_cluster() should lock_page() before mlocking
A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
fuzzing with trinity. The call site try_to_unmap_cluster() does not lock
the pages other than its check_page parameter (which is already locked).
The BUG_ON in mlock_vma_page() is not ... |
static void XBZRLE_cache_lock(void)
{
if (migrate_use_xbzrle())
qemu_mutex_lock(&XBZRLE.lock);
} | 0 | [
"CWE-20"
] | qemu | 0be839a2701369f669532ea5884c15bead1c6e08 | 203,965,030,925,210,400,000,000,000,000,000,000,000 | 5 | migration: fix parameter validation on ram load
During migration, the values read from migration stream during ram load
are not validated. Especially offset in host_from_stream_offset() and
also the length of the writes in the callers of said function.
To fix this, we need to make sure that the [offset, offset + leng... |
pkinit_init_kdc_profile(krb5_context context, pkinit_kdc_context plgctx)
{
krb5_error_code retval;
char *eku_string = NULL;
pkiDebug("%s: entered for realm %s\n", __FUNCTION__, plgctx->realmname);
retval = pkinit_kdcdefault_string(context, plgctx->realmname,
KRB5_C... | 0 | [
"CWE-476"
] | krb5 | db64ca25d661a47b996b4e2645998b5d7f0eb52c | 224,941,705,375,358,760,000,000,000,000,000,000,000 | 89 | PKINIT (draft9) null ptr deref [CVE-2012-1016]
Don't check for an agility KDF identifier in the non-draft9 reply
structure when we're building a draft9 reply, because it'll be NULL.
The KDC plugin for PKINIT can dereference a null pointer when handling
a draft9 request, leading to a crash of the KDC process. An atta... |
static int jpc_cox_getcompparms(jpc_ms_t *ms, jpc_cstate_t *cstate,
jas_stream_t *in, int prtflag, jpc_coxcp_t *compparms)
{
uint_fast8_t tmp;
int i;
/* Eliminate compiler warning about unused variables. */
ms = 0;
cstate = 0;
if (jpc_getuint8(in, &compparms->numdlvls) ||
jpc_getuint8(in, &compparms->cblkw... | 1 | [] | jasper | a10536d5f7f3164b0a1f1ae3e533f4a12ca6f543 | 12,489,607,884,150,417,000,000,000,000,000,000,000 | 46 | jpc_cs: reject all but JPC_COX_INS and JPC_COX_RFT
Fixes assertion failure JPC_NOMINALGAIN() which can be caused by a
crafted JP2 file.
Closes #50, #142 |
static void zero_bvecs(struct ceph_bvec_iter *bvec_pos, u32 off, u32 bytes)
{
struct ceph_bvec_iter it = *bvec_pos;
ceph_bvec_iter_advance(&it, off);
ceph_bvec_iter_advance_step(&it, bytes, ({
zero_bvec(&bv);
}));
} | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 244,900,806,920,113,900,000,000,000,000,000,000,000 | 9 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
psf_fwrite (const void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf)
{ sf_count_t total = 0 ;
ssize_t count ;
if (bytes == 0 || items == 0)
return 0 ;
if (psf->virtual_io)
return psf->vio.write (ptr, bytes*items, psf->vio_user_data) / bytes ;
items *= bytes ;
/* Do this check after the multipl... | 0 | [
"CWE-369",
"CWE-189"
] | libsndfile | 725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6 | 62,743,615,380,191,520,000,000,000,000,000,000,000 | 42 | src/file_io.c : Prevent potential divide-by-zero.
Closes: https://github.com/erikd/libsndfile/issues/92 |
static void blk_mq_do_dispatch_ctx(struct blk_mq_hw_ctx *hctx)
{
struct request_queue *q = hctx->queue;
LIST_HEAD(rq_list);
struct blk_mq_ctx *ctx = READ_ONCE(hctx->dispatch_from);
do {
struct request *rq;
if (!sbitmap_any_bit_set(&hctx->ctx_map))
break;
if (!blk_mq_get_dispatch_budget(hctx))
break;
... | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 226,328,250,989,745,200,000,000,000,000,000,000,000 | 35 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
static const char *cmd_conn_write_state_limit(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
long int limit;
if (dcfg == NULL) return NULL;
limit = strtol(p1, NULL, 10);
if ((limit == LONG_MAX)||(limit == LONG_MIN)||(limit <= 0)) {
... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 332,435,680,247,227,770,000,000,000,000,000,000,000 | 17 | Added SecXmlExternalEntity |
ZEND_VM_HANDLER(159, ZEND_DISCARD_EXCEPTION, ANY, ANY)
{
USE_OPLINE
zval *fast_call = EX_VAR(opline->op1.var);
SAVE_OPLINE();
/* cleanup incomplete RETURN statement */
if (Z_OPLINE_NUM_P(fast_call) != (uint32_t)-1
&& (EX(func)->op_array.opcodes[Z_OPLINE_NUM_P(fast_call)].op2_type & (IS_TMP_VAR | IS_VAR))) {
z... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 193,656,840,006,964,040,000,000,000,000,000,000,000 | 23 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
static void spl_ptr_heap_destroy(spl_ptr_heap *heap TSRMLS_DC) { /* {{{ */
int i;
for (i=0; i < heap->count; ++i) {
heap->dtor(heap->elements[i] TSRMLS_CC);
}
efree(heap->elements);
efree(heap);
} | 0 | [] | php-src | 1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1 | 253,914,982,407,575,500,000,000,000,000,000,000,000 | 10 | Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error |
static void emitnumber(JF, double num)
{
if (num == 0) {
emit(J, F, OP_INTEGER);
emitarg(J, F, 32768);
if (signbit(num))
emit(J, F, OP_NEG);
} else if (num >= SHRT_MIN && num <= SHRT_MAX && num == (int)num) {
emit(J, F, OP_INTEGER);
emitarg(J, F, num + 32768);
} else {
#define N (sizeof(num) / sizeof(js... | 0 | [
"CWE-703",
"CWE-787"
] | mujs | df8559e7bdbc6065276e786217eeee70f28fce66 | 8,875,372,210,607,386,000,000,000,000,000,000,000 | 21 | 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. |
evbuffer_drain(struct evbuffer *buf, size_t len)
{
struct evbuffer_chain *chain, *next;
size_t remaining, old_len;
int result = 0;
EVBUFFER_LOCK(buf);
old_len = buf->total_len;
if (old_len == 0)
goto done;
if (buf->freeze_start) {
result = -1;
goto done;
}
if (len >= old_len && !HAS_PINNED_R(buf)) {
... | 1 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 12,675,575,375,540,445,000,000,000,000,000,000,000 | 67 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
backward_search(regex_t* reg, const UChar* str, const UChar* end, UChar* s,
const UChar* range, UChar* adjrange, UChar** low, UChar** high)
{
UChar *p;
if (range == 0) goto fail;
range += reg->dist_min;
p = s;
retry:
switch (reg->optimize) {
case OPTIMIZE_STR:
exact_method:
p = slo... | 1 | [
"CWE-125"
] | oniguruma | bfc36d3d8139b8be4d3df630d625c58687b0c7d4 | 259,719,448,161,847,060,000,000,000,000,000,000,000 | 93 | fix #164: Integer overflow related to reg->dmax in search_in_range() |
void CLASS process_Sony_0x9403(uchar *buf, ushort len)
{
if (len < 6)
return;
short bufx = SonySubstitution[buf[4]];
if ((bufx == 0x00) || (bufx == 0x94))
return;
imgdata.other.SensorTemperature = (float)((short)SonySubstitution[buf[5]]);
return;
} | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 77,648,325,953,351,050,000,000,000,000,000,000,000 | 12 | parse_qt: possible integer overflow |
template<typename T>
static void screenshot(const int x0, const int y0, const int x1, const int y1, CImg<T>& img) {
cimg::unused(x0,y0,x1,y1,&img);
_no_display_exception(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 302,976,397,719,255,760,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
int EC_GROUP_get_order(const EC_GROUP *group, BIGNUM *order, BN_CTX *ctx)
{
if (group->order == NULL)
return 0;
if (!BN_copy(order, group->order))
return 0;
return !BN_is_zero(order);
} | 0 | [] | openssl | 30c22fa8b1d840036b8e203585738df62a03cec8 | 129,699,120,496,720,550,000,000,000,000,000,000,000 | 9 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
static int vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
{
/*
* Pass through host's Machine Check Enable value to hw_cr4, which
* is in force while we are in guest mode. Do not let guests control
* this bit, even if host CR4.MCE == 0.
*/
unsigned long hw_cr4 =
(cr4_read_shadow() & X86_CR4_MCE) |
... | 0 | [
"CWE-399"
] | linux | 54a20552e1eae07aa240fa370a0293e006b5faed | 207,846,986,562,854,200,000,000,000,000,000,000,000 | 51 | KVM: x86: work around infinite loop in microcode when #AC is delivered
It was found that a guest can DoS a host by triggering an infinite
stream of "alignment check" (#AC) exceptions. This causes the
microcode to enter an infinite loop where the core never receives
another interrupt. The host kernel panics pretty qu... |
check_SET_FIELD(struct ofpact_set_field *a,
const struct ofpact_check_params *cp)
{
const struct mf_field *mf = a->field;
struct flow *flow = &cp->match->flow;
ovs_be16 *tci = &flow->vlans[0].tci;
/* Require OXM_OF_VLAN_VID to have an existing VLAN header. */
if (!mf_are_prereqs_ok(... | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 190,504,999,043,517,530,000,000,000,000,000,000,000 | 26 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
PHPAPI void var_destroy(php_unserialize_data_t *var_hashx)
{
void *next;
zend_long i;
var_entries *var_hash = (*var_hashx)->first;
var_dtor_entries *var_dtor_hash = (*var_hashx)->first_dtor;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_destroy(%ld)\n", var_hash?var_hash->used_slots:-1L);
#endif
while (var_hash) {
... | 0 | [] | php-src | d76b293ac71aa5bd4e9a433192afef6e0dd5a4ee | 51,581,615,774,723,530,000,000,000,000,000,000,000 | 25 | forgot to commit this one |
int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) {
assert(message);
assert(u);
u->machine = NULL;
return sd_bus_message_read(
message,
"(ssssssouso)",
&u->id,
&u->description,
... | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 50,789,467,652,441,250,000,000,000,000,000,000,000 | 20 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
GF_Err vwid_box_read(GF_Box *s,GF_BitStream *bs)
{
u32 i;
GF_ViewIdentifierBox *ptr = (GF_ViewIdentifierBox *) s;
ISOM_DECREASE_SIZE(s, 3)
gf_bs_read_int(bs, 2);
ptr->min_temporal_id = gf_bs_read_int(bs, 3);
ptr->max_temporal_id = gf_bs_read_int(bs, 3);
ptr->num_views = gf_bs_read_u16(bs);
if (ptr->num_views > ... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 1,558,607,306,945,419,700,000,000,000,000,000,000 | 42 | fixed #2255 |
static int nf_tables_delflowtable(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const nla[])
{
struct netlink_ext_ack *extack = info->extack;
u8 genmask = nft_genmask_next(info->net);
u8 family = info->nfmsg->nfgen_family;
struct nft_flowtable *flowtable;
struct net *net = in... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 26,089,324,982,699,580,000,000,000,000,000,000,000 | 50 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
inline void Expand::append_block(Block_Ptr b)
{
if (b->is_root()) call_stack.push_back(b);
for (size_t i = 0, L = b->length(); i < L; ++i) {
Statement_Ptr stm = b->at(i);
Statement_Obj ith = stm->perform(this);
if (ith) block_stack.back()->append(ith);
}
if (b->is_root()) call_stac... | 0 | [
"CWE-476"
] | libsass | 0bc35e3d26922229d5a3e3308860cf0fcee5d1cf | 50,140,680,517,889,990,000,000,000,000,000,000,000 | 10 | Fix segfault on empty custom properties
Originally reported in sass/sassc#225
Fixes sass/sassc#225
Spec sass/sass-spec#1249 |
int zslParseLexRangeItem(robj *item, sds *dest, int *ex) {
char *c = item->ptr;
switch(c[0]) {
case '+':
if (c[1] != '\0') return C_ERR;
*ex = 1;
*dest = shared.maxstring;
return C_OK;
case '-':
if (c[1] != '\0') return C_ERR;
*ex = 1;
*dest = sha... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 35,179,810,663,975,800,000,000,000,000,000,000,000 | 26 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
void slap_free_ctrls(
Operation *op,
LDAPControl **ctrls )
{
int i;
if( ctrls == op->o_ctrls ) {
if( op->o_assertion != NULL ) {
filter_free_x( op, op->o_assertion, 1 );
op->o_assertion = NULL;
}
if( op->o_vrFilter != NULL) {
vrFilter_free( op, op->o_vrFilter );
op->o_vrFilter = NULL;
}
if( o... | 0 | [
"CWE-125"
] | openldap | 21981053a1195ae1555e23df4d9ac68d34ede9dd | 208,224,556,882,543,130,000,000,000,000,000,000,000 | 34 | ITS#9408 fix vrfilter double-free |
void Display::start() {
// check flag
if (m_started)
return;
// start display server
if (!m_displayServer->start()) {
qFatal("Display server failed to start. Exiting");
}
} | 0 | [
"CWE-613",
"CWE-287",
"CWE-284"
] | sddm | 147cec383892d143b5e02daa70f1e7def50f5d98 | 173,467,255,020,694,400,000,000,000,000,000,000,000 | 10 | Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service |
LEX_CSTRING Lex_input_stream::get_token(uint skip, uint length)
{
LEX_CSTRING tmp;
yyUnget(); // ptr points now after last token char
tmp.length= length;
tmp.str= m_thd->strmake(m_tok_start + skip, tmp.length);
m_cpp_text_start= m_cpp_tok_start + skip;
m_cpp_text_end= m_cpp_text_start... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 80,246,174,551,024,880,000,000,000,000,000,000,000 | 12 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
std::vector<std::string> keys() const
{
std::vector<std::string> ret;
for (auto element : key_value_pairs_)
{
std::string str_element(element);
ret.emplace_back(str_element.substr(0, str_element.find('=')));
}
re... | 0 | [
"CWE-703"
] | Crow | 79eec91f00b5fb7df890d4e84b2f048b0841e044 | 1,601,103,950,144,422,400,000,000,000,000,000,000 | 10 | Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value |
pg_has_role_id(PG_FUNCTION_ARGS)
{
Oid roleoid = PG_GETARG_OID(0);
text *priv_type_text = PG_GETARG_TEXT_P(1);
Oid roleid;
AclMode mode;
AclResult aclresult;
roleid = GetUserId();
mode = convert_role_priv_string(priv_type_text);
aclresult = pg_role_aclcheck(roleoid, roleid, mode);
PG_RETURN_BOOL(acl... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 226,658,991,605,759,100,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... |
Does a self test of the module "module" */
PHP_FUNCTION(mcrypt_module_self_test)
{
MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir);
if (mcrypt_module_self_test(module, dir) == 0) {
RETURN_TRUE;
} else {
RETURN_FALSE;
} | 0 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 280,588,363,957,455,950,000,000,000,000,000,000,000 | 10 | Fix bug #72455: Heap Overflow due to integer overflows |
void OpenConnectionTask::perform()
{
// nothing should happen here
} | 0 | [
"CWE-200"
] | trojita | 25fffa3e25cbad85bbca804193ad336b090a9ce1 | 43,006,630,573,102,430,000,000,000,000,000,000,000 | 4 | IMAP: refuse to work when STARTTLS is required but server sends PREAUTH
Oops, we cannot send STARTTLS when the connection is already authenticated.
This is serious enough to warrant an error; an attacker might be going after a
plaintext of a message we're going to APPEND, etc.
Thanks to Arnt Gulbrandsen on the imap-p... |
imapx_copy_move_message_cache (CamelFolder *source_folder,
CamelFolder *destination_folder,
gboolean delete_originals,
const gchar *source_uid,
const gchar *destination_uid,
GCancellable *cancellable)
{
CamelIMAPXFolder *imapx_source_folder, *imapx_destination_folder;
... | 0 | [
"CWE-476"
] | evolution-data-server | 2cc39592b532cf0dc994fd3694b8e6bf924c9ab5 | 254,148,421,413,126,800,000,000,000,000,000,000,000 | 64 | I#189 - Crash on malformed server response with minimal capabilities
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189 |
kssl_krb5_auth_con_setrcache(krb5_context con, krb5_auth_context acon,
krb5_rcache rcache)
{
if ( p_krb5_auth_con_setrcache )
return(p_krb5_auth_con_setrcache(con,acon,rcache));
else
return KRB5KRB_ERR_GENERIC;
} | 0 | [
"CWE-20"
] | openssl | cca1cd9a3447dd067503e4a85ebd1679ee78a48e | 218,265,870,520,765,700,000,000,000,000,000,000,000 | 8 | Submitted by: Tomas Hoger <thoger@redhat.com>
Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL
could be crashed if the relevant tables were not present (e.g. chrooted). |
dissect_usb_ms_reset(packet_info *pinfo _U_, proto_tree *tree, tvbuff_t *tvb, int offset, gboolean is_request, usb_trans_info_t *usb_trans_info _U_, usb_conv_info_t *usb_conv_info _U_)
{
if(is_request){
proto_tree_add_item(tree, hf_usb_ms_value, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
... | 0 | [
"CWE-476"
] | wireshark | 2cb5985bf47bdc8bea78d28483ed224abdd33dc6 | 17,516,773,813,034,983,000,000,000,000,000,000,000 | 15 | Make class "type" for USB conversations.
USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match.
Bug: 12356
Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e338... |
int mp_sqr(fp_int *A, fp_int *B)
{
return fp_sqr(A, B);
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 79,738,440,462,106,780,000,000,000,000,000,000,000 | 4 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
static ssize_t mem_write(struct file * file, const char __user *buf,
size_t count, loff_t *ppos)
{
int copied;
char *page;
struct task_struct *task = get_proc_task(file->f_path.dentry->d_inode);
unsigned long dst = *ppos;
copied = -ESRCH;
if (!task)
goto out_no_task;
if (check_mem_permission(task))
got... | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 237,572,650,400,878,150,000,000,000,000,000,000,000 | 47 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
sync_force_parallel_show(struct mddev *mddev, char *page)
{
return sprintf(page, "%d\n", mddev->parallel_resync);
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 194,311,404,666,633,800,000,000,000,000,000,000,000 | 4 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
**/
inline bool strpare(char *const str, const char delimiter,
const bool is_symmetric, const bool is_iterative) {
if (!str) return false;
const int l = (int)std::strlen(str);
int p, q;
if (is_symmetric) for (p = 0, q = l - 1; p<q && str[p]==delimiter && str[q]==de... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 334,062,183,267,001,540,000,000,000,000,000,000,000 | 15 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline bool skb_defer_rx_timestamp(struct sk_buff *skb)
{
return false; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 46,558,433,247,769,470,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static long ioctl_start(struct fsl_hv_ioctl_start __user *p)
{
struct fsl_hv_ioctl_start param;
/* Get the parameters from the user */
if (copy_from_user(¶m, p, sizeof(struct fsl_hv_ioctl_start)))
return -EFAULT;
param.ret = fh_partition_start(param.partition, param.entry_point,
param.load);
if... | 0 | [
"CWE-190"
] | linux | 6a024330650e24556b8a18cc654ad00cfecf6c6c | 207,033,593,187,442,730,000,000,000,000,000,000,000 | 16 | drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
The "param.count" value is a u64 thatcomes from the user. The code
later in the function assumes that param.count is at least one and if
it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR.
Also the addition can have an integer over... |
print_prefix(netdissect_options *ndo, const u_char *prefix, u_int max_length)
{
int plenbytes;
char buf[sizeof("xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx::/128")];
if (prefix[0] >= 96 && max_length >= IPV4_MAPPED_HEADING_LEN + 1 &&
is_ipv4_mapped_address(&prefix[1])) {
struct in_addr addr;
... | 0 | [
"CWE-125"
] | tcpdump | 83a412a5275cac973c5841eca3511c766bed778d | 199,208,961,681,309,360,000,000,000,000,000,000,000 | 35 | (for 4.9.3) CVE-2018-16228/HNCP: make buffer access safer
print_prefix() has a buffer and does not initialize it. It may call
decode_prefix6(), which also does not initialize the buffer on invalid
input. When that happens, make sure to return from print_prefix() before
trying to print the [still uninitialized] buffer.... |
outOfMemory ()
{
fprintf (stderr,
"liblouis: Insufficient memory\n");
exit (3);
} | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 75,529,541,691,266,580,000,000,000,000,000,000,000 | 6 | Merge branch 'table_resolver' |
nfsd4_encode_secinfo_no_name(struct nfsd4_compoundres *resp, __be32 nfserr,
struct nfsd4_secinfo_no_name *secinfo)
{
struct xdr_stream *xdr = &resp->xdr;
return nfsd4_do_encode_secinfo(xdr, nfserr, secinfo->sin_exp);
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 193,241,250,189,061,600,000,000,000,000,000,000,000 | 7 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
TEST_F(Http1ServerConnectionImplTest, HeaderOnlyResponseWith204) {
initialize();
NiceMock<MockRequestDecoder> decoder;
Http::ResponseEncoder* response_encoder = nullptr;
EXPECT_CALL(callbacks_, newStream(_, _))
.WillOnce(Invoke([&](ResponseEncoder& encoder, bool) -> RequestDecoder& {
response_enc... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 228,105,991,355,650,500,000,000,000,000,000,000,000 | 23 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static inline void nested_release_vmcs12(struct vcpu_vmx *vmx)
{
if (vmx->nested.current_vmptr == -1ull)
return;
if (enable_shadow_vmcs) {
/* copy to memory all shadowed fields in case
they were modified */
copy_shadow_to_vmcs12(vmx);
vmx->nested.sync_shadow_vmcs = false;
vmx_disable_shadow_vmcs(vmx);... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 326,264,481,849,429,240,000,000,000,000,000,000,000 | 21 | 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... |
dissect_kafka_regular_array(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, int offset,
kafka_api_version_t api_version,
int(*func)(tvbuff_t*, packet_info*, proto_tree*, int, kafka_api_version_t),
int *p_count)
{
gint32 count;
count = (gint32) tv... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 296,926,331,116,011,600,000,000,000,000,000,000,000 | 21 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
bool CoreNetwork::setAutoWhoDone(const QString &channel)
{
QString chan = channel.toLower();
if (_autoWhoPending.value(chan, 0) <= 0)
return false;
if (--_autoWhoPending[chan] <= 0)
_autoWhoPending.remove(chan);
return true;
} | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 242,413,207,434,424,670,000,000,000,000,000,000,000 | 9 | Improve the message-splitting algorithm for PRIVMSG and CTCP
This introduces a new message splitting algorithm based on
QTextBoundaryFinder. It works by first starting with the entire
message to be sent, encoding it, and checking to see if it is over
the maximum message length. If it is, it uses QTBF to find the
wor... |
long kvm_arch_vcpu_ioctl(struct file *filp,
unsigned int ioctl, unsigned long arg)
{
struct kvm_vcpu *vcpu = filp->private_data;
void __user *argp = (void __user *)arg;
int r;
union {
struct kvm_lapic_state *lapic;
struct kvm_xsave *xsave;
struct kvm_xcrs *xcrs;
void *buffer;
} u;
u.buffer = NULL;
s... | 0 | [
"CWE-119",
"CWE-703",
"CWE-120"
] | linux | a08d3b3b99efd509133946056531cdf8f3a0c09b | 337,084,832,774,468,300,000,000,000,000,000,000,000 | 267 | kvm: x86: fix emulator buffer overflow (CVE-2014-0049)
The problem occurs when the guest performs a pusha with the stack
address pointing to an mmio address (or an invalid guest physical
address) to start with, but then extending into an ordinary guest
physical address. When doing repeated emulated pushes
emulator_re... |
get_compflags(
afffile_T *affile,
char_u *afflist,
char_u *store_afflist)
{
char_u *p;
char_u *prevp;
int cnt = 0;
char_u key[AH_KEY_LEN];
hashitem_T *hi;
for (p = afflist; *p != NUL; )
{
prevp = p;
if (get_affitem(affile->af_flagtype, &p) != 0)
{
/* A flag is a compoun... | 0 | [
"CWE-190"
] | vim | 399c297aa93afe2c0a39e2a1b3f972aebba44c9d | 291,967,483,402,117,730,000,000,000,000,000,000,000 | 28 | patch 8.0.0322: possible overflow with corrupted spell file
Problem: Possible overflow with spell file where the tree length is
corrupted.
Solution: Check for an invalid length (suggested by shqking) |
Bool rfbOptRfbAuth(void)
{
SecTypeData *s;
for (s = secTypes; s->name != NULL; s++) {
if (!strcmp(&s->name[strlen(s->name) - 3], "vnc") && s->enabled)
return TRUE;
}
return FALSE;
} | 0 | [
"CWE-787"
] | turbovnc | cea98166008301e614e0d36776bf9435a536136e | 9,394,096,090,552,143,000,000,000,000,000,000,000 | 11 | Server: Fix two issues identified by ASan
1. If the TLSPlain and X509Plain security types were both disabled, then
rfbOptPamAuth() would overflow the name field in the secTypes
structure when testing the "none" security type, since the name of
that security type has less than five characters. This issue was
... |
int EC_POINT_add(const EC_GROUP *group, EC_POINT *r, const EC_POINT *a,
const EC_POINT *b, BN_CTX *ctx)
{
if (group->meth->add == 0) {
ECerr(EC_F_EC_POINT_ADD, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return 0;
}
if (!ec_point_is_compat(r, group) || !ec_point_is_compat(a, group)
... | 0 | [] | openssl | 30c22fa8b1d840036b8e203585738df62a03cec8 | 76,848,360,107,331,030,000,000,000,000,000,000,000 | 14 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
void mnt_unpin(struct vfsmount *mnt)
{
spin_lock(&vfsmount_lock);
if (mnt->mnt_pinned) {
atomic_inc(&mnt->mnt_count);
mnt->mnt_pinned--;
}
spin_unlock(&vfsmount_lock);
} | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 250,256,666,827,153,200,000,000,000,000,000,000,000 | 9 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
eap_send_nak(esp, id, type)
eap_state *esp;
u_char id;
u_char type;
{
u_char *outp;
int msglen;
outp = outpacket_buf;
MAKEHEADER(outp, PPP_EAP);
PUTCHAR(EAP_RESPONSE, outp);
PUTCHAR(id, outp);
esp->es_client.ea_id = id;
msglen = EAP_HEADERLEN + 2 * sizeof (u_char);
PUTSHORT(msglen, outp);
PUTCHAR(EAPT_NAK,... | 0 | [
"CWE-120",
"CWE-787"
] | ppp | 8d7970b8f3db727fe798b65f3377fe6787575426 | 91,832,243,557,345,420,000,000,000,000,000,000,000 | 22 | pppd: Fix bounds check in EAP code
Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname). This fixes the check so we
actually avoid overflowing the rhostname array.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Paul Mackerras <paulus... |
START_TEST(virgl_test_transfer_read_unbound_res)
{
int ret;
struct virgl_box box;
ret = virgl_renderer_transfer_read_iov(1, 1, 0, 1, 1, &box, 0, NULL, 0);
ck_assert_int_eq(ret, EINVAL);
} | 0 | [
"CWE-909"
] | virglrenderer | b05bb61f454eeb8a85164c8a31510aeb9d79129c | 309,042,739,201,412,350,000,000,000,000,000,000,000 | 8 | vrend: clear memory when allocating a host-backed memory resource
Closes: #249
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
gnutls_x509_crt_get_authority_key_gn_serial(gnutls_x509_crt_t cert,
unsigned int seq, void *alt,
size_t * alt_size,
unsigned int *alt_type,
void *serial,
size_t * serial_size,
unsigned int *critical)
{
int ret;
gnutls_datum_t der, san, iserial;
gnutls_x509_aki_t ... | 0 | [
"CWE-295"
] | gnutls | 6e76e9b9fa845b76b0b9a45f05f4b54a052578ff | 44,595,362,901,008,270,000,000,000,000,000,000,000 | 72 | on certificate import check whether the two signature algorithms match |
dsa_verify_sig (const gnutls_datum_t * text,
const gnutls_datum_t * signature, bigint_t * params,
int params_len)
{
int ret;
opaque _digest[MAX_HASH_SIZE];
gnutls_datum_t digest;
digest_hd_st hd;
ret = _gnutls_hash_init (&hd, GNUTLS_MAC_SHA1);
if (ret < 0)
{
gnutls_assert ();
return ret... | 0 | [
"CWE-264"
] | gnutls | c8dcbedd1fdc312f5b1a70fcfbc1afe235d800cd | 56,385,225,968,132,180,000,000,000,000,000,000,000 | 26 | Corrected bit disable (was flipping instead).
Initialy reported by Daniel Kahn Gillmor on 9/1/2008. Many thanks to
moog@sysdev.oucs.ox.ac.uk for bringing this into my attention. |
Status writeAuthSchemaVersionIfNeeded(OperationContext* opCtx,
AuthorizationManager* authzManager,
int foundSchemaVersion) {
Status status = updateOneAuthzDocument(
opCtx,
AuthorizationManager::versionCollectionNamespace,
... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 242,719,029,113,638,300,000,000,000,000,000,000,000 | 16 | SERVER-38984 Validate unique User ID on UserCache hit |
int crypt_resume_by_volume_key(struct crypt_device *cd,
const char *name,
const char *volume_key,
size_t volume_key_size)
{
struct volume_key *vk = NULL;
int r;
if (!name || !volume_key)
return -EINVAL;
log_dbg(cd, "Resuming volume %s by volume key.", name);
if ((r = onlyLUKS(cd)))
return r;
r = dm_sta... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 118,565,877,639,999,780,000,000,000,000,000,000,000 | 44 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
static void usb_bus_class_init(ObjectClass *klass, void *data)
{
BusClass *k = BUS_CLASS(klass);
k->print_dev = usb_bus_dev_print;
k->get_dev_path = usb_get_dev_path;
k->get_fw_dev_path = usb_get_fw_dev_path;
} | 0 | [
"CWE-119"
] | qemu | 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a | 325,601,735,359,483,050,000,000,000,000,000,000,000 | 8 | usb: sanity check setup_index+setup_len in post_load
CVE-2013-4541
s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.
setup_len and setup_index should be checked to make sure
they are not negative.
Cc:... |
static int cbtls_verify(int ok, X509_STORE_CTX *ctx)
{
char subject[1024]; /* Used for the subject name */
char issuer[1024]; /* Used for the issuer name */
char common_name[1024];
char cn_str[1024];
char buf[64];
EAP_HANDLER *handler = NULL;
X509 *client_cert;
X509 *issuer_cert;
SSL *ssl;
int err, depth, loo... | 0 | [
"CWE-119"
] | freeradius-server | 78e5aed56c36a9231bc91ea5f55b3edf88a9d2a4 | 313,070,768,102,201,260,000,000,000,000,000,000,000 | 300 | Fix CVE-2012-3547. Found by Timo Warns |
SampleEncrypter(AP4_CbcStreamCipher* stream_cipher, const AP4_UI08* iv):
m_StreamCipher(stream_cipher) {
AP4_CopyMemory(m_IV, iv, 16);
} | 0 | [
"CWE-703"
] | Bento4 | 33331ce2d35d45d855af7441db6116b4a9e2b70f | 66,773,732,416,269,020,000,000,000,000,000,000,000 | 4 | fix #691 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.