func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static size_t ZSTD_resetCStream_internal(ZSTD_CStream* cctx,
const void* const dict, size_t const dictSize, ZSTD_dictContentType_e const dictContentType,
const ZSTD_CDict* const cdict,
ZSTD_CCtx_params params, unsigned long long const pledgedSrcSize)
{
DEB... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 3,028,520,159,916,267,500,000,000,000,000,000,000 | 27 | fixed T36302429 |
static int decode_frame(AVCodecContext *avctx,
void *data, int *got_frame,
AVPacket *avpkt)
{
PicContext *s = avctx->priv_data;
AVFrame *frame = data;
uint32_t *palette;
int bits_per_plane, bpp, etype, esize, npal, pos_after_pal;
int i, x, y, plane, tm... | 0 | [
"CWE-787"
] | FFmpeg | 8c2ea3030af7b40a3c4275696fb5c76cdb80950a | 235,794,551,594,569,300,000,000,000,000,000,000,000 | 158 | avcodec/pictordec: Fix logic error
Fixes: 559/clusterfuzz-testcase-6424225917173760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
__releases(fiq->waitq.lock)
{
int err;
unsigned max_forgets;
unsigned count;
struct fuse_forget_link *head;
struct fuse_batch_forget_in arg = { .count = 0 };
struct fuse_in_header ih = {
.opcode = FUSE_BATCH_FORGET,
.unique = fuse_get_unique(fiq),
.len = sizeof(ih) + sizeof(arg),
};
if (nbytes < ih.len) ... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 237,479,812,792,298,900,000,000,000,000,000,000,000 | 46 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
void EvalAdd(TfLiteContext* context, TfLiteNode* node, TfLiteAddParams* params,
const OpData* data, const TfLiteTensor* input1,
const TfLiteTensor* input2, TfLiteTensor* output) {
tflite::ArithmeticParams op_params;
const bool need_broadcast = optimized_ops::ProcessBroadcastShapes(
G... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 223,516,928,240,523,140,000,000,000,000,000,000,000 | 47 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static int __init kvm_spinlock_debugfs(void)
{
struct dentry *d_kvm;
d_kvm = kvm_init_debugfs();
if (d_kvm == NULL)
return -ENOMEM;
d_spin_debug = debugfs_create_dir("spinlocks", d_kvm);
debugfs_create_u8("zero_stats", 0644, d_spin_debug, &zero_stats);
debugfs_create_u32("taken_slow", 0444, d_spin_debug,
... | 0 | [] | kvm | 29fa6825463c97e5157284db80107d1bfac5d77b | 44,492,197,671,256,580,000,000,000,000,000,000,000 | 30 | x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit
paravirt_enabled has the following effects:
- Disables the F00F bug workaround warning. There is no F00F bug
workaround any more because Linux's standard IDT handling already
works around the F00F bug, but the warning still exists. This
... |
gdm_user_get_num_sessions (GdmUser *user)
{
return g_list_length (user->sessions);
} | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 200,616,800,902,335,030,000,000,000,000,000,000,000 | 4 | Store the face and dmrc files in a cache. Refer to bug #565151. |
dns_resolver_preparse(struct key_preparsed_payload *prep)
{
struct user_key_payload *upayload;
unsigned long derrno;
int ret;
int datalen = prep->datalen, result_len = 0;
const char *data = prep->data, *end, *opt;
kenter("'%*.*s',%u", datalen, datalen, data, datalen);
if (datalen <= 1 || !data || data[datalen ... | 0 | [
"CWE-476"
] | linux | c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81 | 171,636,176,970,192,830,000,000,000,000,000,000,000 | 101 | KEYS: Remove key_type::match in favour of overriding default by match_preparse
A previous patch added a ->match_preparse() method to the key type. This is
allowed to override the function called by the iteration algorithm.
Therefore, we can just set a default that simply checks for an exact match of
the key descripti... |
static int show_slave_retried_trans(THD *thd, SHOW_VAR *var, char *buff)
{
/*
TODO: with multimaster, have one such counter per line in
SHOW SLAVE STATUS, and have the sum over all lines here.
*/
mysql_mutex_lock(&LOCK_active_mi);
if (active_mi)
{
var->type= SHOW_LONG;
var->value= buff;
my... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 20,219,643,050,116,115,000,000,000,000,000,000,000 | 20 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
vte_sequence_handler_reset_mode (VteTerminal *terminal, GValueArray *params)
{
guint i;
long setting;
GValue *value;
if ((params == NULL) || (params->n_values == 0)) {
return;
}
for (i = 0; i < params->n_values; i++) {
value = g_value_array_get_nth(params, i);
if (!G_VALUE_HOLDS_LONG(value)) {
continue;
... | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 181,749,816,634,591,900,000,000,000,000,000,000,000 | 17 | fix bug #548272
svn path=/trunk/; revision=2365 |
home_replace_save(
buf_T *buf, // when not NULL, check for help files
char_u *src) // input file name
{
char_u *dst;
unsigned len;
len = 3; // space for "~/" and trailing NUL
if (src != NULL) // just in case
len += (unsigned)STRLEN(src);
dst = alloc(len);
if (dst != NULL)
home_repl... | 0 | [
"CWE-823",
"CWE-703"
] | vim | 5921aeb5741fc6e84c870d68c7c35b93ad0c9f87 | 280,486,887,102,988,230,000,000,000,000,000,000,000 | 15 | patch 8.2.4418: crash when using special multi-byte character
Problem: Crash when using special multi-byte character.
Solution: Don't use isalpha() for an arbitrary character. |
void uprobe_copy_process(struct task_struct *t, unsigned long flags)
{
struct uprobe_task *utask = current->utask;
struct mm_struct *mm = current->mm;
struct xol_area *area;
t->utask = NULL;
if (!utask || !utask->return_instances)
return;
if (mm == t->mm && !(flags & CLONE_VFORK))
return;
if (dup_utask(t... | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 25,252,309,251,911,035,000,000,000,000,000,000,000 | 29 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
static int parseFunctionHeader(struct cli_bc *bc, unsigned fn, unsigned char *buffer)
{
char ok=1;
unsigned offset, len, all_locals=0, i;
struct cli_bc_func *func;
if (fn >= bc->num_func) {
cli_errmsg("Found more functions than declared: %u >= %u\n", fn,
bc->num_func);
return CL_EMALFDB;
}
... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 308,476,450,162,353,700,000,000,000,000,000,000,000 | 80 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
u32 gf_mp3_get_next_header_mem(const char *buffer, u32 size, u32 *pos)
{
u32 cur;
u8 b, state = 0;
u32 dropped = 0;
unsigned char bytes[4];
bytes[0] = bytes[1] = bytes[2] = bytes[3] = 0;
cur = 0;
*pos = 0;
while (cur<size) {
b = (u8) buffer[cur];
cur++;
if (state==3) {
u32 val;
bytes[state] = b;
... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 90,953,305,950,241,500,000,000,000,000,000,000,000 | 60 | fix some exploitable overflows (#994, #997) |
static void bnx2x__link_reset(struct bnx2x *bp)
{
if (!BP_NOMCP(bp)) {
bnx2x_acquire_phy_lock(bp);
bnx2x_lfa_reset(&bp->link_params, &bp->link_vars);
bnx2x_release_phy_lock(bp);
} else
BNX2X_ERR("Bootcode is missing - can not reset link\n");
} | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 111,289,451,251,266,450,000,000,000,000,000,000,000 | 9 | 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... |
SRC_ReportSourcestats(int index, RPT_SourcestatsReport *report, struct timespec *now)
{
SRC_Instance src;
if ((index >= n_sources) || (index < 0)) {
return 0;
} else {
src = sources[index];
report->ref_id = src->ref_id;
if (src->ip_addr)
report->ip_addr = *src->ip_addr;
else
repo... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 109,751,340,963,132,390,000,000,000,000,000,000,000 | 17 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
save_to_outpacketq(int userid, char *data, int datalen)
/* Find space in outpacket-queue and store data (expected compressed already).
Returns: 1 = okay, 0 = no space. */
{
int fill;
if (users[userid].outpacketq_filled >= OUTPACKETQ_LEN)
/* no space */
return 0;
fill = users[userid].outpacketq_nexttouse +
... | 0 | [] | iodine | b715be5cf3978fbe589b03b09c9398d0d791f850 | 81,292,585,368,530,240,000,000,000,000,000,000,000 | 27 | Fix authentication bypass bug
The client could bypass the password check by continuing after getting error
from the server and guessing the network parameters. The server would still
accept the rest of the setup and also network traffic.
Add checks for normal and raw mode that user has authenticated before allowing
a... |
process_remove_all_identities(SocketEntry *e)
{
Identity *id;
debug2_f("entering");
/* Loop over all identities and clear the keys. */
for (id = TAILQ_FIRST(&idtab->idlist); id;
id = TAILQ_FIRST(&idtab->idlist)) {
TAILQ_REMOVE(&idtab->idlist, id, next);
free_identity(id);
}
/* Mark that there are no id... | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 275,837,520,665,930,500,000,000,000,000,000,000,000 | 18 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
int kvm_emulate_wrmsr(struct kvm_vcpu *vcpu)
{
u32 ecx = kvm_rcx_read(vcpu);
u64 data = kvm_read_edx_eax(vcpu);
int r;
r = kvm_set_msr_with_filter(vcpu, ecx, data);
if (!r) {
trace_kvm_msr_write(ecx, data);
} else {
/* MSR write failed? See if we should ask user space */
if (kvm_msr_user_space(vcpu, ecx, ... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 209,063,920,915,292,980,000,000,000,000,000,000,000 | 23 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
static int vif_add(struct vifctl *vifc, int mrtsock)
{
int vifi = vifc->vifc_vifi;
struct vif_device *v = &vif_table[vifi];
struct net_device *dev;
struct in_device *in_dev;
/* Is vif busy ? */
if (VIF_EXISTS(vifi))
return -EADDRINUSE;
switch (vifc->vifc_flags) {
#ifdef CONFIG_IP_PIMSM
case VIFF_REGISTER:
... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 324,085,673,846,508,370,000,000,000,000,000,000,000 | 77 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
future<utils::chunked_vector<client_data>> cql_server::get_client_data() {
utils::chunked_vector<client_data> ret;
co_await for_each_gently([&ret] (const generic_server::connection& c) {
const connection& conn = dynamic_cast<const connection&>(c);
ret.emplace_back(conn.make_client_data());
}... | 0 | [] | scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | 173,229,793,847,599,400,000,000,000,000,000,000,000 | 8 | transport/server.cc: Return correct size of decompressed lz4 buffer
An incorrect size is returned from the function, which could lead to
crashes or undefined behavior. Fix by erroring out in these cases.
Fixes #11476 |
Curves16Data* CurvesAlloc(cmsContext ContextID, int nCurves, int nElements, cmsToneCurve** G)
{
int i, j;
Curves16Data* c16;
c16 = (Curves16Data*)_cmsMallocZero(ContextID, sizeof(Curves16Data));
if (c16 == NULL) return NULL;
c16 ->nCurves = nCurves;
c16 ->nElements = nElements;
c16->Curve... | 1 | [
"CWE-125"
] | Little-CMS | d41071eb8cfea7aa10a9262c12bd95d5d9d81c8f | 59,978,559,576,336,170,000,000,000,000,000,000,000 | 45 | Contributed fixes from Oracle
Two minor glitches |
static void __kthread_parkme(struct kthread *self)
{
__set_current_state(TASK_PARKED);
while (test_bit(KTHREAD_SHOULD_PARK, &self->flags)) {
if (!test_and_set_bit(KTHREAD_IS_PARKED, &self->flags))
complete(&self->parked);
schedule();
__set_current_state(TASK_PARKED);
}
clear_bit(KTHREAD_IS_PARKED, &self->f... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 239,526,675,808,653,600,000,000,000,000,000,000,000 | 12 | 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... |
uint64_t ram_bytes_total(void)
{
RAMBlock *block;
uint64_t total = 0;
QTAILQ_FOREACH(block, &ram_list.blocks, next)
total += block->length;
return total;
} | 0 | [
"CWE-20"
] | qemu | 0be839a2701369f669532ea5884c15bead1c6e08 | 325,188,675,018,092,560,000,000,000,000,000,000,000 | 10 | 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... |
fmgr_sql_validator(PG_FUNCTION_ARGS)
{
Oid funcoid = PG_GETARG_OID(0);
HeapTuple tuple;
Form_pg_proc proc;
List *raw_parsetree_list;
List *querytree_list;
ListCell *lc;
bool isnull;
Datum tmp;
char *prosrc;
parse_error_callback_arg callback_arg;
ErrorContextCallback sqlerrcontext;
bool haspo... | 0 | [
"CWE-264"
] | postgres | 537cbd35c893e67a63c59bc636c3e888bd228bc7 | 248,651,872,626,278,350,000,000,000,000,000,000,000 | 120 | Prevent privilege escalation in explicit calls to PL validators.
The primary role of PL validators is to be called implicitly during
CREATE FUNCTION, but they are also normal functions that a user can call
explicitly. Add a permissions check to each validator to ensure that a
user cannot use explicit validator calls ... |
static void con_throttle(struct tty_struct *tty)
{
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 177,520,829,222,529,170,000,000,000,000,000,000,000 | 3 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
*/
void bfq_put_queue(struct bfq_queue *bfqq)
{
struct bfq_queue *item;
struct hlist_node *n;
struct bfq_group *bfqg = bfqq_group(bfqq);
if (bfqq->bfqd)
bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: %p %d",
bfqq, bfqq->ref);
bfqq->ref--;
if (bfqq->ref)
return;
if (!hlist_unhashed(&bfqq->burst_list_n... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 318,247,294,754,096,360,000,000,000,000,000,000,000 | 79 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
TEST_F(QueryPlannerTest, CompoundIndexBoundsRangeAndEquality) {
addIndex(BSON("a" << 1 << "b" << 1));
runQuery(fromjson("{a: {$gt: 8}, b: 6}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {node: {ixscan: {pattern: {a: 1, b: 1}, bounds: ... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 303,913,323,491,822,080,000,000,000,000,000,000,000 | 10 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
//! Load a list from a .cimg file.
/**
\param filename Filename to read data from. | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 281,848,935,748,040,030,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
dict_threshold2_params(const ref * pdict, gs_threshold2_halftone * ptp,
ref * ptproc, gs_memory_t *mem)
{
ref *tstring;
int code =
dict_threshold_common_params(pdict,
(gs_threshold_halftone_common *)ptp,
&ts... | 0 | [] | ghostpdl | f5c7555c30393e64ec1f5ab0dfae5b55b3b3fc78 | 264,990,827,275,176,020,000,000,000,000,000,000,000 | 47 | Bug 697203: check for sufficient params in .sethalftone5
and param types |
parse_DEC_TTL(char *arg, const struct ofpact_parse_params *pp)
{
if (*arg == '\0') {
parse_noargs_dec_ttl(pp);
} else {
struct ofpact_cnt_ids *ids;
char *cntr;
ids = ofpact_put_DEC_TTL(pp->ofpacts);
ids->ofpact.raw = NXAST_RAW_DEC_TTL_CNT_IDS;
for (cntr = strtok_... | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 183,131,831,399,900,500,000,000,000,000,000,000,000 | 31 | 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... |
boost::optional<uint256> SaplingNote::cm() const {
uint256 result;
if (!librustzcash_sapling_compute_cm(
d.data(),
pk_d.begin(),
value(),
r.begin(),
result.begin()
))
{
return boost::none;
}
return result;
} | 0 | [
"CWE-755",
"CWE-787"
] | zcash | c1fbf8ab5d73cff5e1f45236995857c75ba4128d | 206,837,943,304,481,700,000,000,000,000,000,000,000 | 15 | Ignore exceptions when deserializing note plaintexts |
file_default(struct magic_set *ms, size_t nb)
{
if (ms->flags & MAGIC_MIME) {
if ((ms->flags & MAGIC_MIME_TYPE) &&
file_printf(ms, "application/%s",
nb ? "octet-stream" : "x-empty") == -1)
return -1;
return 1;
}
if (ms->flags & MAGIC_APPLE) {
if (file_printf(ms, "UNKNUNKN") == -1)
return -1;
r... | 0 | [
"CWE-787"
] | file | d65781527c8134a1202b2649695d48d5701ac60b | 136,932,476,459,349,860,000,000,000,000,000,000,000 | 21 | PR/62: spinpx: limit size of file_printable. |
int gg_ping(struct gg_session *sess)
{
gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_ping(%p);\n", sess);
if (!sess) {
errno = EFAULT;
return -1;
}
if (sess->state != GG_STATE_CONNECTED) {
errno = ENOTCONN;
return -1;
}
return gg_send_packet(sess, GG_PING, NULL);
} | 0 | [
"CWE-310"
] | libgadu | 23644f1fb8219031b3cac93289a588b05f90226b | 62,959,044,884,645,020,000,000,000,000,000,000,000 | 16 | Poprawka ograniczania długości opisu. |
static inline int nla_get_flag(struct nlattr *nla)
{
return !!nla;
} | 0 | [] | linux-2.6 | 1045b03e07d85f3545118510a587035536030c1c | 202,873,191,219,805,600,000,000,000,000,000,000,000 | 4 | netlink: fix overrun in attribute iteration
kmemcheck reported this:
kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
0500110001508abf050010000500000002017300140000006f72672e66726565
i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
^
Pid: 3... |
evbuffer_defer_callbacks(struct evbuffer *buffer, struct event_base *base)
{
EVBUFFER_LOCK(buffer);
buffer->cb_queue = base;
buffer->deferred_cbs = 1;
event_deferred_cb_init_(&buffer->deferred,
event_base_get_npriorities(base) / 2,
evbuffer_deferred_callback, buffer);
EVBUFFER_UNLOCK(buffer);
return 0;
... | 0 | [
"CWE-189"
] | libevent | 841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4 | 90,908,706,632,028,220,000,000,000,000,000,000,000 | 11 | Fix CVE-2014-6272 in Libevent 2.1
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 ... |
void HeaderMapImpl::appendCopy(const LowerCaseString& key, absl::string_view value) {
// TODO(#9221): converge on and document a policy for coalescing multiple headers.
auto* entry = getExisting(key);
if (entry) {
const uint64_t added_size = appendToHeader(entry->value(), value);
addSize(added_size);
} ... | 1 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 329,519,531,141,360,200,000,000,000,000,000,000,000 | 10 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
firewall_is_fascist_impl(void)
{
const or_options_t *options = get_options();
/* Assume every non-bridge relay has an IPv4 address.
* Clients which use bridges may only know the IPv6 address of their
* bridge. */
return (options->ClientUseIPv4 == 0
|| (!fascist_firewall_use_ipv6(options)
... | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 251,835,303,107,393,430,000,000,000,000,000,000,000 | 10 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
start_printer(cupsd_client_t *con, /* I - Client connection */
ipp_attribute_t *uri) /* I - Printer URI */
{
int i; /* Temporary variable */
http_status_t status; /* Policy status */
cups_ptype_t dtype; /* Destination type (printer/class) */
cupsd_printer_t *printer; /* Printer data */
... | 0 | [
"CWE-20"
] | cups | 49fa4983f25b64ec29d548ffa3b9782426007df3 | 144,167,841,772,641,850,000,000,000,000,000,000,000 | 75 | DBUS notifications could crash the scheduler (Issue #5143)
- scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8. |
g_sigterm(int pid)
{
#if defined(_WIN32)
return 0;
#else
return kill(pid, SIGTERM);
#endif
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 22,470,018,646,723,820,000,000,000,000,000,000,000 | 8 | move temp files from /tmp to /tmp/.xrdp |
void Inspect::operator()(Custom_Warning_Ptr w)
{
append_token(w->message(), w);
} | 0 | [
"CWE-476"
] | libsass | 38f4c3699d06b64128bebc7cf1e8b3125be74dc4 | 258,760,833,978,580,370,000,000,000,000,000,000,000 | 4 | Fix possible bug with handling empty reference combinators
Fixes #2665 |
static struct geneve_sock *geneve_find_sock(struct geneve_net *gn,
sa_family_t family,
__be16 dst_port)
{
struct geneve_sock *gs;
list_for_each_entry(gs, &gn->sock_list, list) {
if (inet_sk(gs->sock->sk)->inet_sport == dst_port &&
geneve_get_sk_family(gs) == family) {
return gs;
}
}
... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 12,120,802,885,995,644,000,000,000,000,000,000,000 | 14 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
QPDFWriter::setObjectStreamMode(qpdf_object_stream_e mode)
{
this->m->object_stream_mode = mode;
} | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 220,813,852,736,296,460,000,000,000,000,000,000,000 | 4 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
int llhttp__internal__c_update_status_code(
llhttp__internal_t* state,
const unsigned char* p,
const unsigned char* endp) {
state->status_code = 0;
return 0;
} | 0 | [
"CWE-444"
] | node | 641f786bb1a1f6eb1ff8750782ed939780f2b31a | 325,990,664,077,066,000,000,000,000,000,000,000,000 | 7 | http: unset `F_CHUNKED` on new `Transfer-Encoding`
Duplicate `Transfer-Encoding` header should be a treated as a single,
but with original header values concatenated with a comma separator. In
the light of this, even if the past `Transfer-Encoding` ended with
`chunked`, we should be not let the `F_CHUNKED` to leak int... |
MagickExport Image *BlobToImage(const ImageInfo *image_info,const void *blob,
const size_t length,ExceptionInfo *exception)
{
const MagickInfo
*magick_info;
Image
*image;
ImageInfo
*blob_info,
*clone_info;
MagickBooleanType
status;
assert(image_info != (ImageInfo *) NULL);
assert(i... | 0 | [
"CWE-416",
"CWE-399"
] | ImageMagick | c5d012a46ae22be9444326aa37969a3f75daa3ba | 302,944,126,370,663,640,000,000,000,000,000,000,000 | 100 | https://github.com/ImageMagick/ImageMagick6/issues/43 |
ZEND_API int add_assoc_stringl_ex(zval *arg, const char *key, uint key_len, char *str, uint length, int duplicate) /* {{{ */
{
zval *tmp;
if (UNEXPECTED(length > INT_MAX)) {
zend_error_noreturn(E_ERROR, "String overflow, max size is %d", INT_MAX);
}
MAKE_STD_ZVAL(tmp);
ZVAL_STRINGL(tmp, str, length, duplicate)... | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 25,824,795,051,447,080,000,000,000,000,000,000,000 | 13 | Fix bug #73147: Use After Free in PHP7 unserialize() |
static void rb_inc_iter(struct ring_buffer_iter *iter)
{
struct ring_buffer_per_cpu *cpu_buffer = iter->cpu_buffer;
/*
* The iterator could be on the reader page (it starts there).
* But the head could have moved, since the reader was
* found. Check for this case and assign the iterator
* to the head page in... | 0 | [
"CWE-835"
] | linux | 67f0d6d9883c13174669f88adac4f0ee656cc16a | 100,958,400,396,874,750,000,000,000,000,000,000,000 | 19 | tracing: Fix bug in rb_per_cpu_empty() that might cause deadloop.
The "rb_per_cpu_empty()" misinterpret the condition (as not-empty) when
"head_page" and "commit_page" of "struct ring_buffer_per_cpu" points to
the same buffer page, whose "buffer_data_page" is empty and "read" field
is non-zero.
An error scenario coul... |
static inline struct timer_base *get_timer_cpu_base(u32 tflags, u32 cpu)
{
struct timer_base *base = per_cpu_ptr(&timer_bases[BASE_STD], cpu);
/*
* If the timer is deferrable and nohz is active then we need to use
* the deferrable base.
*/
if (IS_ENABLED(CONFIG_NO_HZ_COMMON) && base->nohz_active &&
(tfla... | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 196,157,855,154,420,400,000,000,000,000,000,000,000 | 13 | 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... |
struct cgroup_root *cgroup_root_from_kf(struct kernfs_root *kf_root)
{
struct cgroup *root_cgrp = kf_root->kn->priv;
return root_cgrp->root;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 308,912,193,447,779,650,000,000,000,000,000,000,000 | 6 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
ConnStateData::storeTlsContextToCache(const SBuf &cacheKey, Security::ContextPointer &ctx)
{
Ssl::LocalContextStorage *ssl_ctx_cache = Ssl::TheGlobalContextStorage.getLocalStorage(port->s);
if (!ssl_ctx_cache || !ssl_ctx_cache->add(cacheKey, ctx)) {
// If it is not in storage delete after using. Else st... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 248,916,381,387,268,000,000,000,000,000,000,000,000 | 8 | Handle more Range requests (#790)
Also removed some effectively unused code. |
void CModule::OnOp2(const CNick* pOpNick, const CNick& Nick, CChan& Channel,
bool bNoChange) {
if (pOpNick) OnOp(*pOpNick, Nick, Channel, bNoChange);
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 105,300,514,645,696,070,000,000,000,000,000,000,000 | 4 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static int xfrm_exp_policy_notify(struct xfrm_policy *xp, int dir, const struct km_event *c)
{
struct net *net = xp_net(xp);
struct sk_buff *skb;
int err;
skb = nlmsg_new(xfrm_polexpire_msgsize(xp), GFP_ATOMIC);
if (skb == NULL)
return -ENOMEM;
err = build_polexpire(skb, xp, dir, c);
BUG_ON(err < 0);
retur... | 0 | [
"CWE-125"
] | linux | b805d78d300bcf2c83d6df7da0c818b0fee41427 | 195,196,409,356,313,150,000,000,000,000,000,000,000 | 15 | xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink
UBSAN report this:
UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24
index 6 is out of range for type 'unsigned int [6]'
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13
Hardware name: QEMU Standard PC (i440FX + P... |
GF_Box *gnrm_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_GenericSampleEntryBox, GF_ISOM_BOX_TYPE_GNRM);
gf_isom_sample_entry_init((GF_SampleEntryBox*)tmp);
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 308,658,787,789,963,970,000,000,000,000,000,000,000 | 7 | fixed #1587 |
Expression::ComputedPaths ExpressionMap::getComputedPaths(const std::string& exprFieldPath,
Variables::Id renamingVar) const {
auto inputFieldPath = dynamic_cast<ExpressionFieldPath*>(_input.get());
if (!inputFieldPath) {
return {{exprFieldPath},... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 28,889,902,104,045,950,000,000,000,000,000,000,000 | 28 | SERVER-38070 fix infinite loop in agg expression |
reserveSpaceInTable(FileInfo *nested, int count, TranslationTableHeader **table) {
return (allocateSpaceInTable(nested, NULL, count, table));
} | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 256,252,728,216,970,500,000,000,000,000,000,000,000 | 3 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
xfs_ioc_getbmapx(
struct xfs_inode *ip,
void __user *arg)
{
struct getbmapx bmx;
int error;
if (copy_from_user(&bmx, arg, sizeof(bmx)))
return -XFS_ERROR(EFAULT);
if (bmx.bmv_count < 2)
return -XFS_ERROR(EINVAL);
if (bmx.bmv_iflags & (~BMV_IF_VALID))
return -XFS_ERROR(EINVAL);
error = xfs_getbmap... | 0 | [
"CWE-200"
] | linux-2.6 | af24ee9ea8d532e16883251a6684dfa1be8eec29 | 251,165,389,652,572,480,000,000,000,000,000,000,000 | 27 | xfs: zero proper structure size for geometry calls
Commit 493f3358cb289ccf716c5a14fa5bb52ab75943e5 added this call to
xfs_fs_geometry() in order to avoid passing kernel stack data back
to user space:
+ memset(geo, 0, sizeof(*geo));
Unfortunately, one of the callers of that function passes the
address of a smal... |
static int php_get_wbmp(php_stream *stream, struct gfxinfo **result, int check TSRMLS_DC)
{
int i, width = 0, height = 0;
if (php_stream_rewind(stream)) {
return 0;
}
/* get type */
if (php_stream_getc(stream) != 0) {
return 0;
}
/* skip header */
do {
i = php_stream_getc(stream);
if (i < 0) {
ret... | 1 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 138,201,051,374,486,120,000,000,000,000,000,000,000 | 51 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
my_decimal *val_decimal(my_decimal *val) { return &decimal_value; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 248,432,429,619,520,800,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... |
inline void PadImageStyle(const tflite::PadParams& op_params,
const RuntimeShape& input_shape, const T* input_data,
const P* pad_value_ptr,
const RuntimeShape& output_shape, T* output_data) {
reference_ops::PadImageStyle(op_params, input_sh... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 2,505,423,642,642,575,000,000,000,000,000,000,000 | 7 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
clock_getres(clockid_t clock_id, struct timespec *res)
{
if (! res)
return -1;
/* hardcode ms resolution */
res->tv_sec = 0;
res->tv_nsec = 1000;
return 0;
} | 0 | [
"CWE-416"
] | owntone-server | 246d8ae0cef27377e5dfe9ee3ad87e864d6b6266 | 266,196,187,676,795,830,000,000,000,000,000,000,000 | 11 | [misc] Fix use-after-free in net_bind()
Thanks to Ba Jinsheng for reporting this bug |
void blk_rq_unprep_clone(struct request *rq)
{
struct bio *bio;
while ((bio = rq->bio) != NULL) {
rq->bio = bio->bi_next;
bio_put(bio);
}
} | 0 | [
"CWE-416",
"CWE-703"
] | linux | 54648cf1ec2d7f4b6a71767799c45676a138ca24 | 38,615,624,228,050,410,000,000,000,000,000,000,000 | 10 | block: blk_init_allocated_queue() set q->fq as NULL in the fail case
We find the memory use-after-free issue in __blk_drain_queue()
on the kernel 4.14. After read the latest kernel 4.18-rc6 we
think it has the same problem.
Memory is allocated for q->fq in the blk_init_allocated_queue().
If the elevator init function... |
static bool ok_inflater_inflate_huffman_tree(ok_inflater *inflater, ok_inflater_huffman_tree *tree,
ok_inflater_huffman_tree *code_length_huffman,
int num_codes) {
if (num_codes < 0 || num_codes >= MAX_NUM_CODES) {
ok_... | 0 | [
"CWE-787"
] | ok-file-formats | e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e | 23,231,979,216,295,977,000,000,000,000,000,000,000 | 68 | ok_png: Disallow multiple IHDR chunks (#15) |
int usb_authorize_device(struct usb_device *usb_dev)
{
int result = 0, c;
usb_lock_device(usb_dev);
if (usb_dev->authorized == 1)
goto out_authorized;
result = usb_autoresume_device(usb_dev);
if (result < 0) {
dev_err(&usb_dev->dev,
"can't autoresume for authorization: %d\n", result);
goto error_autores... | 0 | [
"CWE-703"
] | linux | e50293ef9775c5f1cf3fcc093037dd6a8c5684ea | 136,978,845,812,406,700,000,000,000,000,000,000,000 | 47 | USB: fix invalid memory access in hub_activate()
Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue. However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so. ... |
const HttpServer *get_server() const { return sv_; } | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 240,864,410,536,861,800,000,000,000,000,000,000,000 | 1 | Don't read too greedily |
static void ext4_destroy_lazyinit_thread(void)
{
/*
* If thread exited earlier
* there's nothing to be done.
*/
if (!ext4_li_info || !ext4_lazyinit_task)
return;
kthread_stop(ext4_lazyinit_task);
} | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 200,539,245,953,731,500,000,000,000,000,000,000,000 | 11 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
R_API const char *r_str_sysbits(const int v) {
switch (v) {
case R_SYS_BITS_8: return "8";
case R_SYS_BITS_16: return "16";
case R_SYS_BITS_32: return "32";
case R_SYS_BITS_64: return "64";
case R_SYS_BITS_16 | R_SYS_BITS_32: return "16,32";
case R_SYS_BITS_16 | R_SYS_BITS_32 | R_SYS_BITS_64: return "16,32,64";
... | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 293,897,541,751,532,130,000,000,000,000,000,000,000 | 12 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
static void SFDDumpRefs(FILE *sfd,RefChar *refs, int *newgids) {
RefChar *ref;
for ( ref=refs; ref!=NULL; ref=ref->next ) if ( ref->sc!=NULL ) {
fprintf(sfd, "Refer: %d %d %c %g %g %g %g %g %g %d",
newgids!=NULL ? newgids[ref->sc->orig_pos]:ref->sc->orig_pos,
ref->sc->unicodeenc,
ref->select... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 287,256,942,770,679,770,000,000,000,000,000,000,000 | 20 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
int64_t qmp_guest_set_vcpus(GuestLogicalProcessorList *vcpus, Error **errp)
{
error_set(errp, QERR_UNSUPPORTED);
return -1;
} | 0 | [
"CWE-264"
] | qemu | c689b4f1bac352dcfd6ecb9a1d45337de0f1de67 | 141,841,094,112,014,080,000,000,000,000,000,000,000 | 5 | qga: set umask 0077 when daemonizing (CVE-2013-2007)
The qemu guest agent creates a bunch of files with insecure permissions
when started in daemon mode. For example:
-rw-rw-rw- 1 root root /var/log/qemu-ga.log
-rw-rw-rw- 1 root root /var/run/qga.state
-rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log
In a... |
static inline void r_write_ble24(void *dest, ut32 val, bool big_endian) {
big_endian? r_write_be24 (dest, val): r_write_le24 (dest, val);
} | 0 | [
"CWE-476"
] | radare2 | 1ea23bd6040441a21fbcfba69dce9a01af03f989 | 94,918,459,600,604,260,000,000,000,000,000,000,000 | 3 | Fix #6816 - null deref in r_read_* |
int Field_timestamp::store_decimal(const my_decimal *d)
{
ulonglong nr;
ulong sec_part;
int error;
MYSQL_TIME ltime;
longlong tmp;
THD *thd= get_thd();
ErrConvDecimal str(d);
if (my_decimal2seconds(d, &nr, &sec_part))
{
tmp= -1;
error= 2;
}
else
tmp= number_to_datetime(nr, sec_part, &... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 96,993,669,922,020,860,000,000,000,000,000,000,000 | 22 | 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 void check_query_changes(IRC_SERVER_REC *server, const char *nick,
const char *address, const char *target)
{
QUERY_REC *query;
if (server_ischannel(SERVER(server), target))
return;
query = irc_query_find(server, nick);
if (query == NULL)
return;
if (g_strcmp0(query->name, nick) != 0) {
/* uppe... | 0 | [
"CWE-476"
] | irssi | 6c6c42e3d1b49d90aacc0b67f8540471cae02a1d | 209,647,767,885,235,040,000,000,000,000,000,000,000 | 23 | Merge branch 'security' into 'master'
See merge request !7 |
HBasicBlock::HBasicBlock(HGraph* graph)
: block_id_(graph->GetNextBlockID()),
graph_(graph),
phis_(4, graph->zone()),
first_(NULL),
last_(NULL),
end_(NULL),
loop_information_(NULL),
predecessors_(2, graph->zone()),
dominator_(NULL),
dominated_blocks_(4, graph->z... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 69,107,058,546,185,960,000,000,000,000,000,000,000 | 20 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
void i40e_irq_dynamic_disable_icr0(struct i40e_pf *pf)
{
struct i40e_hw *hw = &pf->hw;
wr32(hw, I40E_PFINT_DYN_CTL0,
I40E_ITR_NONE << I40E_PFINT_DYN_CTLN_ITR_INDX_SHIFT);
i40e_flush(hw);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 113,116,154,768,812,670,000,000,000,000,000,000,000 | 8 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
ssize_t pcnet_receive(NetClientState *nc, const uint8_t *buf, size_t size_)
{
PCNetState *s = qemu_get_nic_opaque(nc);
int is_padr = 0, is_bcast = 0, is_ladr = 0;
uint8_t buf1[60];
int remaining;
int crc_err = 0;
int size = size_;
if (CSR_DRX(s) || CSR_STOP(s) || CSR_SPND(s) || !size ||
... | 0 | [
"CWE-119"
] | qemu | 8b98a2f07175d46c3f7217639bd5e03f2ec56343 | 183,838,957,105,751,170,000,000,000,000,000,000,000 | 187 | pcnet: fix rx buffer overflow(CVE-2015-7512)
Backends could provide a packet whose length is greater than buffer
size. Check for this and truncate the packet to avoid rx buffer
overflow in this case.
Cc: Prasad J Pandit <pjp@fedoraproject.org>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com... |
void ActiveStreamDecoderFilter::addDownstreamWatermarkCallbacks(
DownstreamWatermarkCallbacks& watermark_callbacks) {
// This is called exactly once per upstream-stream, by the router filter. Therefore, we
// expect the same callbacks to not be registered twice.
ASSERT(std::find(parent_.watermark_callbacks_.b... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 114,425,370,656,013,880,000,000,000,000,000,000,000 | 11 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void serveconnection(CLIENT *client) {
if(do_run(client->server->prerun, client->exportname)) {
exit(EXIT_FAILURE);
}
setupexport(client);
if (client->server->flags & F_COPYONWRITE) {
copyonwrite_prepare(client);
}
setmysockopt(client->net);
mainloop(client);
do_run(client->server->postrun, client->expor... | 0 | [
"CWE-119",
"CWE-787"
] | nbd | 3ef52043861ab16352d49af89e048ba6339d6df8 | 249,041,200,347,921,730,000,000,000,000,000,000,000 | 15 | Fix buffer size checking
Yes, this means we've re-introduced CVE-2005-3534. Sigh. |
check_file_permissions_reduced(i_ctx_t *i_ctx_p, const char *fname, int len,
const char *permitgroup)
{
long i;
ref *permitlist = NULL;
/* an empty string (first character == 0) if '\' character is */
/* recognized as a file name separator as on DOS & Windows */
const char... | 0 | [] | ghostpdl | 407cc61e87b0fd9d44d72ca740af7d3c85dee78d | 290,248,192,686,695,800,000,000,000,000,000,000,000 | 62 | "starting_arg_file" should only apply once.
The "starting_arg_file == true" setting should apply to the *first* call to
lib_file_open() in the context of a given call to runarg(). Previously, it
remained set for the entire duration of the runarg() call, resulting in the
current directory being searched for any resourc... |
SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
struct __kernel_timespec __user *, tp)
{
const struct k_clock *kc = clockid_to_kclock(which_clock);
struct timespec64 kernel_tp;
int error;
if (!kc)
return -EINVAL;
error = kc->clock_get(which_clock, &kernel_tp);
if (!error && put_timespec64(&ker... | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 9,404,129,785,255,101,000,000,000,000,000,000,000 | 17 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
MOBI_RET mobi_xml_write_opfmeta(xmlTextWriterPtr writer, const OPFmeta **meta) {
if (meta) {
size_t i = 0;
while (i < OPF_META_MAX_TAGS) {
if (meta[i] == NULL) {
break;
}
MOBI_RET ret = mobi_xml_write_meta(writer, meta[i]->name, meta[i]->content);
... | 0 | [
"CWE-476"
] | libmobi | c0699c8693c47f14a2e57dec7292e862ac7adf9c | 80,944,728,218,776,230,000,000,000,000,000,000,000 | 16 | Fix undefined behavior when passing null to strdup |
static int l2cap_parse_conf_rsp(struct sock *sk, void *rsp, int len, void *data, u16 *result)
{
struct l2cap_pinfo *pi = l2cap_pi(sk);
struct l2cap_conf_req *req = data;
void *ptr = req->data;
int type, olen;
unsigned long val;
struct l2cap_conf_rfc rfc;
BT_DBG("sk %p, rsp %p, len %d, req %p", sk, rsp, len, dat... | 0 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | linux | f2fcfcd670257236ebf2088bbdf26f6a8ef459fe | 248,749,478,191,971,000,000,000,000,000,000,000,000 | 66 | Bluetooth: Add configuration support for ERTM and Streaming mode
Add support to config_req and config_rsp to configure ERTM and Streaming
mode. If the remote device specifies ERTM or Streaming mode, then the
same mode is proposed. Otherwise ERTM or Basic mode is used. And in case
of a state 2 device, the remote device... |
PerListenerFactoryContextImpl::getServerFactoryContext() const {
return listener_factory_context_base_->getServerFactoryContext();
} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 225,292,152,299,671,600,000,000,000,000,000,000,000 | 3 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
{
struct bcm_tarang_data *pTarang = filp->private_data;
void __user *argp = (void __user *)arg;
struct bcm_mini_adapter *Adapter = pTarang->Adapter;
INT Status = STATUS_FAILURE;
int timeout = 0;
struct bcm_ioctl_buffer IoBuffer;
int bytes;
BCM_... | 1 | [
"CWE-200"
] | linux | 8d1e72250c847fa96498ec029891de4dc638a5ba | 333,797,321,142,491,230,000,000,000,000,000,000,000 | 1,853 | Staging: bcm: info leak in ioctl
The DevInfo.u32Reserved[] array isn't initialized so it leaks kernel
information to user space.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus To... |
TEST_F(QueryPlannerTest, CantUseHashedIndexToProvideSort) {
addIndex(BSON("x"
<< "hashed"));
runQuerySortProj(BSONObj(), BSON("x" << 1), BSONObj());
ASSERT_EQUALS(getNumSolutions(), 1U);
assertSolutionExists(
"{sort: {pattern: {x: 1}, limit: 0, node: {sortKeyGen:"
"{no... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 80,397,399,340,831,780,000,000,000,000,000,000,000 | 10 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
dns_transmit_get (struct dns_transmit *d, const iopause_fd *x,
const struct taia *when)
{
char udpbuf[4097];
int r = 0, fd = 0;
unsigned char ch = 0;
fd = d->s1 - 1;
errno = error_io;
if (!x->revents)
{
if (taia_less (when, &d->deadline))
... | 1 | [
"CWE-362"
] | ndjbdns | 177b5522e9b3d25778001c8cebfddd4d2973fcfd | 55,650,316,955,616,470,000,000,000,000,000,000,000 | 173 | Merge identical outgoing requests - patch 2.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. The merges operation takes place in the
dns_transmit layer, rather than between query and dns_transmit layers,
as don... |
choose_kex(struct kex *k, char *client, char *server)
{
const struct kexalg *kexalg;
k->name = match_list(client, server, NULL);
debug("kex: algorithm: %s", k->name ? k->name : "(no match)");
if (k->name == NULL)
return SSH_ERR_NO_KEX_ALG_MATCH;
if ((kexalg = kex_alg_by_name(k->name)) == NULL)
return SSH_ERR... | 0 | [
"CWE-522",
"CWE-399"
] | openssh-portable | ec165c392ca54317dbe3064a8c200de6531e89ad | 120,734,955,729,154,070,000,000,000,000,000,000,000 | 16 | upstream commit
Unregister the KEXINIT handler after message has been
received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause
allocation of up to 128MB -- until the connection is closed. Reported by
shilei-c at 360.cn
Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05 |
ZEND_VM_HANDLER(70, ZEND_FREE, TMPVAR, ANY)
{
USE_OPLINE
SAVE_OPLINE();
zval_ptr_dtor_nogc(EX_VAR(opline->op1.var));
ZEND_VM_NEXT_OPCODE_CHECK_EXCEPTION();
} | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 218,888,764,881,043,580,000,000,000,000,000,000,000 | 8 | 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. |
flowGetBDMeanandVariance(struct ndpi_flow_info* flow) {
FILE *out = results_file ? results_file : stdout;
const uint32_t *array = NULL;
uint32_t tmp[256], i;
unsigned int num_bytes;
double mean = 0.0, variance = 0.0;
struct ndpi_entropy last_entropy = flow->last_entropy;
fflush(out);
/*
* Sum up th... | 0 | [
"CWE-125"
] | nDPI | b7e666e465f138ae48ab81976726e67deed12701 | 192,017,594,401,243,450,000,000,000,000,000,000,000 | 84 | Added fix to avoid potential heap buffer overflow in H.323 dissector
Modified HTTP report information to make it closer to the HTTP field names |
static void fdc_register_types(void)
{
type_register_static(&isa_fdc_info);
type_register_static(&sysbus_fdc_type_info);
type_register_static(&sysbus_fdc_info);
type_register_static(&sun4m_fdc_info);
} | 0 | [
"CWE-119"
] | qemu | e907746266721f305d67bc0718795fedee2e824c | 153,987,644,144,505,720,000,000,000,000,000,000,000 | 7 | fdc: force the fifo access to be in bounds of the allocated buffer
During processing of certain commands such as FD_CMD_READ_ID and
FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could
get out of bounds leading to memory corruption with values coming
from the guest.
Fix this by making sure that the index i... |
static int exec_relay_log_event(THD* thd, Relay_log_info* rli)
{
DBUG_ENTER("exec_relay_log_event");
/*
We acquire this mutex since we need it for all operations except
event execution. But we will release it in places where we will
wait for something for example inside of next_event().
*/
mysq... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 61,097,226,287,983,250,000,000,000,000,000,000,000 | 242 | 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... |
f_getfsize(typval_T *argvars, typval_T *rettv)
{
char_u *fname;
stat_T st;
if (in_vim9script() && check_for_string_arg(argvars, 0) == FAIL)
return;
fname = tv_get_string(&argvars[0]);
if (mch_stat((char *)fname, &st) >= 0)
{
if (mch_isdir(fname))
rettv->vval.v_number = 0;
else
{
... | 0 | [
"CWE-823",
"CWE-703"
] | vim | 5921aeb5741fc6e84c870d68c7c35b93ad0c9f87 | 150,663,496,953,500,820,000,000,000,000,000,000,000 | 25 | patch 8.2.4418: crash when using special multi-byte character
Problem: Crash when using special multi-byte character.
Solution: Don't use isalpha() for an arbitrary character. |
bool is_expensive_processor(void *arg)
{ return orig_item->is_expensive_processor(arg); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 46,173,143,878,469,320,000,000,000,000,000,000,000 | 2 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
SECURITY_STATUS ntlm_write_NegotiateMessage(NTLM_CONTEXT* context, PSecBuffer buffer)
{
wStream* s;
size_t length;
NTLM_NEGOTIATE_MESSAGE* message;
message = &context->NEGOTIATE_MESSAGE;
ZeroMemory(message, sizeof(NTLM_NEGOTIATE_MESSAGE));
s = Stream_New((BYTE*)buffer->pvBuffer, buffer->cbBuffer);
if (!s)
ret... | 0 | [
"CWE-125"
] | FreeRDP | 48361c411e50826cb602c7aab773a8a20e1da6bc | 11,147,954,760,492,882,000,000,000,000,000,000,000 | 77 | Fixed GHSL-2020-100: oob read in ntlm_read_ChallengeMessage
* Added length checks for data read from stream
* Unified function resource cleanup
(cherry picked from commit 8357dedbbf7213b7d0d18f1026145b9a5b92235a) |
static int set_geometry(unsigned int cmd, struct floppy_struct *g,
int drive, int type, struct block_device *bdev)
{
int cnt;
/* sanity checking for parameters. */
if (g->sect <= 0 ||
g->head <= 0 ||
g->track <= 0 || g->track > UDP->tracks >> STRETCH(g) ||
/* check if reserved bits are set ... | 1 | [
"CWE-362"
] | linux | a0c80efe5956ccce9fe7ae5c78542578c07bc20a | 13,301,677,052,263,129,000,000,000,000,000,000,000 | 69 | floppy: fix lock_fdc() signal handling
floppy_revalidate() doesn't perform any error handling on lock_fdc()
result. lock_fdc() might actually be interrupted by a signal (it waits for
fdc becoming non-busy interruptibly). In such case, floppy_revalidate()
proceeds as if it had claimed the lock, but it fact it doesn't.
... |
cmsBool Write16bitTables(cmsContext ContextID, cmsIOHANDLER* io, _cmsStageToneCurvesData* Tables)
{
int j;
cmsUInt32Number i;
cmsUInt16Number val;
int nEntries = 256;
nEntries = Tables->TheCurves[0]->nEntries;
for (i=0; i < Tables ->nCurves; i++) {
for (j=0; j < nEntries; j++) {
... | 1 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 65,194,354,365,389,040,000,000,000,000,000,000,000 | 25 | Fixes from coverity check |
static void xsr_exec_command_list(GF_Node *node, void *par, Bool is_destroy)
{
GF_DOMUpdates *up = (GF_DOMUpdates *)node;
if (is_destroy || !up || (up->sgprivate->tag!=TAG_DOMUpdates)) return;
gf_sg_command_apply_list(up->sgprivate->scenegraph, up->updates, 0);
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 284,720,430,643,901,000,000,000,000,000,000,000,000 | 6 | fixed #2138 |
int hw_atl_utils_initfw(struct aq_hw_s *self, const struct aq_fw_ops **fw_ops)
{
int err = 0;
hw_atl_utils_hw_chip_features_init(self,
&self->chip_features);
self->fw_ver_actual = hw_atl_utils_get_fw_version(self);
if (hw_atl_utils_ver_match(HW_ATL_FW_VER_1X, self->fw_ver_actual)) {
*fw_ops = &aq_fw_1x... | 0 | [
"CWE-787"
] | net | b922f622592af76b57cbc566eaeccda0b31a3496 | 46,834,749,943,306,790,000,000,000,000,000,000,000 | 27 | atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait
This bug report shows up when running our research tools. The
reports is SOOB read, but it seems SOOB write is also possible
a few lines below.
In details, fw.len and sw.len are inputs coming from io. A len
over the size of self->rpc triggers SOOB. The patc... |
bool ptlock_alloc(struct page *page)
{
spinlock_t *ptl;
ptl = kmem_cache_alloc(page_ptl_cachep, GFP_KERNEL);
if (!ptl)
return false;
page->ptl = ptl;
return true;
} | 0 | [
"CWE-20"
] | linux | 6b7339f4c31ad69c8e9c0b2859276e22cf72176d | 184,770,633,636,807,630,000,000,000,000,000,000,000 | 10 | mm: avoid setting up anonymous pages into file mapping
Reading page fault handler code I've noticed that under right
circumstances kernel would map anonymous pages into file mappings: if
the VMA doesn't have vm_ops->fault() and the VMA wasn't fully populated
on ->mmap(), kernel would handle page fault to not populated... |
HttpTransact::StartRemapRequest(State* s)
{
if (s->api_skip_all_remapping) {
Debug ("http_trans", "API request to skip remapping");
if (s->is_upgrade_request && s->post_remap_upgrade_return_point) {
TRANSACT_RETURN(SM_ACTION_POST_REMAP_SKIP, s->post_remap_upgrade_return_point);
}
TRANSACT_RETU... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 28,506,850,365,309,257,000,000,000,000,000,000,000 | 70 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
static void fork_once_func(void)
{
pthread_atfork(OPENSSL_fork_prepare,
OPENSSL_fork_parent, OPENSSL_fork_child);
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 71,411,087,934,021,710,000,000,000,000,000,000,000 | 5 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
static char *concat_url(const char *base, const char *relurl)
{
/***
TRY to append this new path to the old URL
to the right of the host part. Oh crap, this is doomed to cause
problems in the future...
*/
char *newest;
char *protsep;
char *pathsep;
size_t newlen;
bool host_changed = FALSE;
con... | 0 | [] | curl | 914aaab9153764ef8fa4178215b8ad89d3ac263a | 37,138,648,542,972,720,000,000,000,000,000,000,000 | 152 | urlapi: reject percent-decoding host name into separator bytes
CVE-2022-27780
Reported-by: Axel Chong
Bug: https://curl.se/docs/CVE-2022-27780.html
Closes #8826 |
passInsertAttributes(CharsString *passLine, int *passLinepos, int *passPrevLinepos,
CharsString *passHoldString, TranslationTableCharacterAttributes *passAttributes,
FileInfo *passNested, widechar *passInstructions, int *passIC,
TranslationTableHeader *table) {
passInstructions[(*passIC)++] = pass_attributes;
p... | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 273,298,114,900,244,140,000,000,000,000,000,000,000 | 12 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.