func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
ves_icall_type_is_subtype_of (MonoReflectionType *type, MonoReflectionType *c, MonoBoolean check_interfaces)
{
MonoDomain *domain;
MonoClass *klass;
MonoClass *klassc;
MONO_ARCH_SAVE_REGS;
g_assert (type != NULL);
domain = ((MonoObject *)type)->vtable->domain;
if (!c) /* FIXME: dont know what do do here */... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 144,265,261,620,730,450,000,000,000,000,000,000,000 | 23 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
static int shash_no_setkey(struct crypto_shash *tfm, const u8 *key,
unsigned int keylen)
{
return -ENOSYS;
} | 1 | [
"CWE-787"
] | linux | af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1 | 43,426,817,240,046,090,000,000,000,000,000,000,000 | 5 | crypto: hmac - require that the underlying hash algorithm is unkeyed
Because the HMAC template didn't check that its underlying hash
algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))"
through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC
being used without having been keyed, resulting ... |
DECLAREcpFunc(cpContigTiles2ContigTiles)
{
return cpImage(in, out,
readContigTilesIntoBuffer,
writeBufferToContigTiles,
imagelength, imagewidth, spp);
} | 0 | [
"CWE-190"
] | libtiff | 43c0b81a818640429317c80fea1e66771e85024b | 171,513,415,473,238,070,000,000,000,000,000,000,000 | 7 | * tools/tiffcp.c: fix read of undefined variable in case of missing
required tags. Found on test case of MSVR 35100.
* tools/tiffcrop.c: fix read of undefined buffer in
readContigStripsIntoBuffer() due to uint16 overflow. Probably not a
security issue but I can be wrong. Reported as MSVR 35100 by Axel
Souchet from the ... |
bool ciEnv::is_in_vm() {
return JavaThread::current()->thread_state() == _thread_in_vm;
} | 0 | [] | jdk17u | 8be0fc09f0ba2dd1dbfd6627456fa929d5574b04 | 94,699,627,445,736,820,000,000,000,000,000,000,000 | 3 | 8281859: Improve class compilation
Reviewed-by: mbaesken
Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f |
gr_uint32 gr_str_to_tag(const char *str)
{
uint32 res = 0;
int i = strlen(str);
if (i > 4) i = 4;
while (--i >= 0)
res = (res >> 8) + (str[i] << 24);
return res;
} | 0 | [
"CWE-476"
] | graphite | db132b4731a9b4c9534144ba3a18e65b390e9ff6 | 173,169,674,826,802,070,000,000,000,000,000,000,000 | 9 | Deprecate and make ineffective gr_face_dumbRendering |
static __always_inline int handle_external_interrupt(struct kvm_vcpu *vcpu)
{
++vcpu->stat.irq_exits;
return 1;
} | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 69,076,206,222,907,410,000,000,000,000,000,000,000 | 5 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
static bool is_power_of_2(size_t n)
{
return (n != 0 && ((n & (n - 1)) == 0));
} | 0 | [
"CWE-476"
] | tcpreplay | 46cf964a7db636da76abeebf10482acf6f682a87 | 288,799,698,449,016,850,000,000,000,000,000,000,000 | 4 | Bug #677 - fixes for tcpprep tree |
changed_common(
linenr_T lnum,
colnr_T col,
linenr_T lnume,
long xtra)
{
win_T *wp;
tabpage_T *tp;
int i;
int cols;
pos_T *p;
int add;
// mark the buffer as modified
changed();
#ifdef FEAT_EVAL
may_record_change(lnum, col, lnume, xtra);
#endif
#ifdef FEAT_DIFF
... | 1 | [
"CWE-120"
] | vim | 7ce5b2b590256ce53d6af28c1d203fb3bc1d2d97 | 264,038,016,859,028,270,000,000,000,000,000,000,000 | 215 | 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. |
int ha_partition::rnd_init(bool scan)
{
int error;
uint i= 0;
uint32 part_id;
DBUG_ENTER("ha_partition::rnd_init");
/*
For operations that may need to change data, we may need to extend
read_set.
*/
if (m_lock_type == F_WRLCK)
{
/*
If write_set contains any of the fields used in parti... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 336,532,653,895,572,700,000,000,000,000,000,000,000 | 91 | 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 ... |
comparetup_index_hash(const SortTuple *a, const SortTuple *b,
Tuplesortstate *state)
{
uint32 hash1;
uint32 hash2;
IndexTuple tuple1;
IndexTuple tuple2;
/*
* Fetch hash keys and mask off bits we don't want to sort by. We know
* that the first column of the index tuple is the hash key.
*/
Assert(!a... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 27,587,187,590,943,327,000,000,000,000,000,000,000 | 47 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
vhost_scsi_alloc_fabric_acl(struct se_portal_group *se_tpg)
{
struct vhost_scsi_nacl *nacl;
nacl = kzalloc(sizeof(struct vhost_scsi_nacl), GFP_KERNEL);
if (!nacl) {
pr_err("Unable to allocate struct vhost_scsi_nacl\n");
return NULL;
}
return &nacl->se_node_acl;
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 59c816c1f24df0204e01851431d3bab3eb76719c | 237,589,916,951,097,620,000,000,000,000,000,000,000 | 12 | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... |
__acquires(fi->lock)
{
struct fuse_writepage_args *aux, *next;
struct fuse_inode *fi = get_fuse_inode(wpa->inode);
struct fuse_write_in *inarg = &wpa->ia.write.in;
struct fuse_args *args = &wpa->ia.ap.args;
__u64 data_size = wpa->ia.ap.num_pages * PAGE_SIZE;
int err;
fi->writectr++;
if (inarg->offset + data_si... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 106,087,093,290,398,850,000,000,000,000,000,000,000 | 52 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
static trio_pointer_t TrioArrayGetter(trio_pointer_t context, int index, int type)
{
/* Utility function for the printfv family */
trio_pointer_t* argarray = (trio_pointer_t*)context;
return argarray[index];
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 85,973,054,141,392,100,000,000,000,000,000,000,000 | 6 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int lock_params(struct snd_pcm_runtime *runtime)
{
if (mutex_lock_interruptible(&runtime->oss.params_lock))
return -ERESTARTSYS;
if (atomic_read(&runtime->oss.rw_ref)) {
mutex_unlock(&runtime->oss.params_lock);
return -EBUSY;
}
return 0;
} | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 83,842,265,033,311,030,000,000,000,000,000,000,000 | 10 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
str_gsub(argc, argv, str, bang)
int argc;
VALUE *argv;
VALUE str;
int bang;
{
VALUE pat, val, repl, match, dest;
struct re_registers *regs;
long beg, n;
long offset, blen, slen, len;
int iter = 0;
char *buf, *bp, *sp, *cp;
int tainted = 0;
if (argc == 1) {
RETURN... | 0 | [
"CWE-20"
] | ruby | e926ef5233cc9f1035d3d51068abe9df8b5429da | 174,725,365,115,594,000,000,000,000,000,000,000,000 | 125 | * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
f_assert_notmatch(typval_T *argvars, typval_T *rettv)
{
rettv->vval.v_number = assert_match_common(argvars, ASSERT_NOTMATCH);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 115,579,633,835,160,650,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
int ZEXPORT inflateSyncPoint(strm)
z_streamp strm;
{
struct inflate_state FAR *state;
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
return state->mode == STORED && state->bits == 0;
} | 0 | [
"CWE-703",
"CWE-189"
] | zlib | e54e1299404101a5a9d0cf5e45512b543967f958 | 300,395,983,594,679,470,000,000,000,000,000,000,000 | 9 | Avoid shifts of negative values inflateMark().
The C standard says that bit shifts of negative integers is
undefined. This casts to unsigned values to assure a known
result. |
int _gnutls_copy_data(gnutls_datum_t* str, uint8_t *out, size_t *out_size)
{
if ((unsigned) str->size > *out_size) {
gnutls_assert();
(*out_size) = str->size;
return GNUTLS_E_SHORT_MEMORY_BUFFER;
}
if (out != NULL && str->data != NULL) {
memcpy(out, str->data, str->size);
}
*out_size = str->size;
return... | 0 | [] | gnutls | 272854367efc130fbd4f1a51840d80c630214e12 | 264,572,350,610,632,060,000,000,000,000,000,000,000 | 15 | Reset the output value on error in _gnutls_x509_dn_to_string()
Reported by Kurt Roeckx. |
tree_mod_log_eb_copy(struct btrfs_fs_info *fs_info, struct extent_buffer *dst,
struct extent_buffer *src, unsigned long dst_offset,
unsigned long src_offset, int nr_items)
{
int ret = 0;
struct tree_mod_elem **tm_list = NULL;
struct tree_mod_elem **tm_list_add, **tm_list_rem;
int i;
int locked = 0;
... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339 | 316,823,154,844,238,300,000,000,000,000,000,000,000 | 69 | Btrfs: make xattr replace operations atomic
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the x... |
static int dav_move_collection(struct transaction_t *txn,
struct request_target_t *dest_tgt,
int overwrite)
{
int r = 0, recursive = 1, rights;
int omlen, nmlen;
char *oldmailboxname = txn->req_tgt.mbentry->name;
char *newmailboxname = dest_t... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 10,034,650,474,906,255,000,000,000,000,000,000,000 | 153 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
clear_nochange_fflags(struct archive_write_disk *a)
{
int nochange_flags;
mode_t mode = archive_entry_mode(a->entry);
/* Hopefully, the compiler will optimize this mess into a constant. */
nochange_flags = 0;
#ifdef SF_IMMUTABLE
nochange_flags |= SF_IMMUTABLE;
#endif
#ifdef UF_IMMUTABLE
nochange_flags |= UF_IM... | 0 | [
"CWE-20",
"CWE-476"
] | libarchive | dfd6b54ce33960e420fb206d8872fb759b577ad9 | 423,745,073,535,937,500,000,000,000,000,000,000 | 28 | Fixes for Issue #745 and Issue #746 from Doran Moppert. |
CNF_GetInitSources(void)
{
return ARR_GetSize(init_sources);
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 48,427,750,084,111,380,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
list_del_event(struct perf_event *event, struct perf_event_context *ctx)
{
WARN_ON_ONCE(event->ctx != ctx);
lockdep_assert_held(&ctx->lock);
/*
* We can have double detach due to exit/hot-unplug + close.
*/
if (!(event->attach_state & PERF_ATTACH_CONTEXT))
return;
event->attach_state &= ~PERF_ATTACH_CONTEX... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 203,263,772,226,964,280,000,000,000,000,000,000,000 | 36 | 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... |
bit_write_DD (Bit_Chain *dat, double value, double default_value)
{
unsigned char *uchar_value;
unsigned int *uint_value;
unsigned int *uint_default;
if (value == default_value)
bit_write_BB (dat, 0);
else
{
uchar_value = (unsigned char *)&value;
uint_value = (unsigned int *)&value;
... | 0 | [
"CWE-703",
"CWE-125"
] | libredwg | 95cc9300430d35feb05b06a9badf678419463dbe | 54,781,195,288,597,770,000,000,000,000,000,000,000 | 42 | encode: protect from stack under-flow
From GH #178 fuzzing |
SYSCALL_DEFINE2(getrusage, int, who, struct rusage __user *, ru)
{
if (who != RUSAGE_SELF && who != RUSAGE_CHILDREN &&
who != RUSAGE_THREAD)
return -EINVAL;
return getrusage(current, who, ru);
} | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 103,921,621,719,845,960,000,000,000,000,000,000,000 | 7 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static int nested_svm_exit_handled(struct vcpu_svm *svm)
{
int vmexit;
vmexit = nested_svm_intercept(svm);
if (vmexit == NESTED_EXIT_DONE)
nested_svm_vmexit(svm);
return vmexit;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 181,522,421,398,033,450,000,000,000,000,000,000,000 | 11 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
static void dynamic_debug_remove(struct module *mod, struct _ddebug *debug)
{
if (debug)
ddebug_remove_module(mod->name);
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 118,255,580,477,893,680,000,000,000,000,000,000,000 | 5 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static void fwnet_receive_broadcast(struct fw_iso_context *context,
u32 cycle, size_t header_length, void *header, void *data)
{
struct fwnet_device *dev;
struct fw_iso_packet packet;
__be16 *hdr_ptr;
__be32 *buf_ptr;
int retval;
u32 length;
unsigned long offset;
unsigned long flags;
dev = data;
hdr_ptr = ... | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 179,898,455,148,774,940,000,000,000,000,000,000,000 | 56 | firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment wi... |
int ftrace_set_filter(struct ftrace_ops *ops, unsigned char *buf,
int len, int reset)
{
return ftrace_set_regex(ops, buf, len, reset, 1);
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 201,285,185,831,345,400,000,000,000,000,000,000,000 | 5 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
static char *InterpretDelegateProperties(ImageInfo *image_info,
Image *image,const char *embed_text,ExceptionInfo *exception)
{
#define ExtendInterpretText(string_length) \
DisableMSCWarning(4127) \
{ \
size_t length=(string_length); \
if ((size_t) (q-interpret_text+length+1) >= extent) \
{ \
extent+=le... | 0 | [
"CWE-476"
] | ImageMagick | 2c75f301d9ac84f91071393b02d8c88c8341c91c | 224,927,032,226,939,570,000,000,000,000,000,000,000 | 205 | https://github.com/ImageMagick/ImageMagick/issues/1225 |
static int ec_asn1_group2curve(const EC_GROUP *group, X9_62_CURVE *curve)
{
int ok = 0, nid;
BIGNUM *tmp_1 = NULL, *tmp_2 = NULL;
unsigned char *buffer_1 = NULL, *buffer_2 = NULL,
*a_buf = NULL, *b_buf = NULL;
size_t len_1, len_2;
unsigned char char_zero = 0;
if (!group || !curve || !cu... | 0 | [] | openssl | 18029a3d0739284cadb309ea0fd498379b0bcfdb | 4,614,049,445,120,078,000,000,000,000,000,000,000 | 110 | Fix a failure to NULL a pointer freed on error.
Reported by the LibreSSL project as a follow on to CVE-2015-0209
Reviewed-by: Richard Levitte <levitte@openssl.org> |
void RGWInfo_ObjStore_SWIFT::execute()
{
bool is_admin_info_enabled = false;
const string& swiftinfo_sig = s->info.args.get("swiftinfo_sig");
const string& swiftinfo_expires = s->info.args.get("swiftinfo_expires");
if (!swiftinfo_sig.empty() &&
!swiftinfo_expires.empty() &&
!is_expired(swiftinfo_e... | 0 | [
"CWE-617"
] | ceph | f44a8ae8aa27ecef69528db9aec220f12492810e | 255,618,319,823,841,940,000,000,000,000,000,000,000 | 30 | rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b... |
static void attach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
{
u32 divider = LOAD_AVG_MAX - 1024 + cfs_rq->avg.period_contrib;
/*
* When we attach the @se to the @cfs_rq, we must align the decay
* window because without that, really weird and wonderful things can
* happen.
*
... | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 150,027,365,442,211,980,000,000,000,000,000,000,000 | 40 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
static int mov_write_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
MOVMuxContext *mov = s->priv_data;
AVDictionaryEntry *t, *global_tcr = av_dict_get(s->metadata, "timecode", NULL, 0);
int i, ret, hint_track = 0, tmcd_track = 0, nb_tracks = s->nb_streams;
if (mov->mode & (MODE_MP4|MODE_MOV|... | 0 | [
"CWE-125"
] | FFmpeg | 95556e27e2c1d56d9e18f5db34d6f756f3011148 | 38,117,021,734,390,290,000,000,000,000,000,000,000 | 139 | avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample
Fixes: out of array read
Fixes: ffmpeg_crash_8.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
void isis_notif_adj_state_change(const struct isis_adjacency *adj,
int new_state, const char *reason)
{
const char *xpath = "/frr-isisd:adjacency-state-change";
struct list *arguments = yang_data_list_new();
char xpath_arg[XPATH_MAXLEN];
struct yang_data *data;
struct isis_circuit *circuit = adj->circuit;
st... | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 228,445,308,318,022,600,000,000,000,000,000,000,000 | 35 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
max3421_urb_done(struct usb_hcd *hcd)
{
struct max3421_hcd *max3421_hcd = hcd_to_max3421(hcd);
unsigned long flags;
struct urb *urb;
int status;
status = max3421_hcd->urb_done;
max3421_hcd->urb_done = 0;
if (status > 0)
status = 0;
urb = max3421_hcd->curr_urb;
if (urb) {
/* save the old end-points toggles... | 0 | [
"CWE-416"
] | linux | b5fdf5c6e6bee35837e160c00ac89327bdad031b | 22,956,646,873,520,430,000,000,000,000,000,000,000 | 33 | usb: max-3421: Prevent corruption of freed memory
The MAX-3421 USB driver remembers the state of the USB toggles for a
device/endpoint. To save SPI writes, this was only done when a new
device/endpoint was being used. Unfortunately, if the old device was
removed, this would cause writes to freed memory.
To fix this, ... |
template<typename tz, typename tp, typename tf, typename tc, typename to>
CImg<T>& _draw_object3d(void *const pboard, CImg<tz>& zbuffer,
const float X, const float Y, const float Z,
const CImg<tp>& vertices,
const CImgList<tf>& ... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 268,937,441,168,474,930,000,000,000,000,000,000,000 | 1,167 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void arcmsr_hbaA_postqueue_isr(struct AdapterControlBlock *acb)
{
uint32_t flag_ccb;
struct MessageUnit_A __iomem *reg = acb->pmuA;
struct ARCMSR_CDB *pARCMSR_CDB;
struct CommandControlBlock *pCCB;
bool error;
while ((flag_ccb = readl(®->outbound_queueport)) != 0xFFFFFFFF) {
pARCMSR_CDB = (struct ARCM... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 89,356,942,246,669,900,000,000,000,000,000,000,000 | 14 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... |
**/
const CImg<T>& save_tiff(const char *const filename, const unsigned int compression_type=0,
const float *const voxel_size=0, const char *const description=0,
const bool use_bigtiff=true) const {
if (!filename)
throw CImgArgumentExcepti... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 76,675,491,629,564,090,000,000,000,000,000,000,000 | 26 | Fix other issues in 'CImg<T>::load_bmp()'. |
gcry_mpi_powm (gcry_mpi_t res,
gcry_mpi_t base, gcry_mpi_t expo, gcry_mpi_t mod)
{
/* Pointer to the limbs of the arguments, their size and signs. */
mpi_ptr_t rp, ep, mp, bp;
mpi_size_t esize, msize, bsize, rsize;
int msign, bsign, rsign;
/* Flags telling the secure allocation s... | 0 | [
"CWE-200"
] | libgcrypt | 62e8e1283268f1d3b6d0cfb2fc4e7835bbcdaab6 | 227,793,011,530,302,000,000,000,000,000,000,000,000 | 394 | mpi: mpi-pow improvement.
* mpi/mpi-pow.c (gcry_mpi_powm): New implementation of left-to-right
k-ary exponentiation.
--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
For the Yarom/Falkner flush+reload cache side-channel attack, we
changed the code so that it always calls the multiplication routine
(even if we can sk... |
static void unlink_lockfile(int fd)
{
unlink(cl.lockfile);
close(fd);
} | 0 | [
"CWE-287",
"CWE-284"
] | booth | 35bf0b7b048d715f671eb68974fb6b4af6528c67 | 294,659,697,711,804,080,000,000,000,000,000,000,000 | 5 | Revert "Refactor: main: substitute is_auth_req macro"
This reverts commit da79b8ba28ad4837a0fee13e5f8fb6f89fe0e24c.
authfile != authkey
Signed-off-by: Jan Friesse <jfriesse@redhat.com> |
bio_to_buffer( BIO *bio, char **buffer, size_t *buffer_len )
{
if ( bio == NULL ) {
return FALSE;
}
*buffer_len = BIO_pending( bio );
*buffer = (char *)malloc( *buffer_len );
if ( *buffer == NULL ) {
return FALSE;
}
if ( BIO_read( bio, *buffer, *buffer_len ) < (int)*buffer_len ) {
free( *buffer );
ret... | 0 | [
"CWE-20"
] | htcondor | 2f3c393feb819cf6c6d06fb0a2e9c4e171f3c26d | 137,995,033,495,309,180,000,000,000,000,000,000,000 | 20 | (#6455) Fix issue validating VOMS proxies |
_PUBLIC_ codepoint_t next_codepoint_handle(struct smb_iconv_handle *ic,
const char *str, size_t *size)
{
return next_codepoint_handle_ext(ic, str, CH_UNIX, size);
} | 1 | [
"CWE-200"
] | samba | ba5dbda6d0174a59d221c45cca52ecd232820d48 | 93,533,775,164,055,950,000,000,000,000,000,000,000 | 5 | CVE-2015-5330: Fix handling of unicode near string endings
Until now next_codepoint_ext() and next_codepoint_handle_ext() were
using strnlen(str, 5) to determine how much string they should try to
decode. This ended up looking past the end of the string when it was not
null terminated and the final character looked li... |
static int satsub64be(const unsigned char *v1, const unsigned char *v2)
{
int ret, i;
if (sizeof(long) == 8)
do {
const union {
long one;
char little;
} is_endian = {
1
};
long l;
if (is_endian.... | 0 | [
"CWE-200",
"CWE-203"
] | openssl | e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e | 239,986,364,635,035,560,000,000,000,000,000,000,000 | 80 | Go into the error state if a fatal alert is sent or received
If an application calls SSL_shutdown after a fatal alert has occured and
then behaves different based on error codes from that function then the
application may be vulnerable to a padding oracle.
CVE-2019-1559
Reviewed-by: Richard Levitte <levitte@openssl.... |
TiledInputFile::readTile (int dx, int dy, int lx, int ly)
{
readTiles (dx, dx, dy, dy, lx, ly);
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 153,863,339,679,556,400,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int init_strtab(ELFOBJ *bin) {
if (bin->strtab || !bin->shdr) {
return false;
}
if (bin->ehdr.e_shstrndx != SHN_UNDEF &&
(bin->ehdr.e_shstrndx >= bin->ehdr.e_shnum ||
(bin->ehdr.e_shstrndx >= SHN_LORESERVE &&
bin->ehdr.e_shstrndx < SHN_HIRESERVE)))
return false;
/* sh_size must be lower than UT32_... | 0 | [
"CWE-125"
] | radare2 | c6d0076c924891ad9948a62d89d0bcdaf965f0cd | 274,820,820,325,875,900,000,000,000,000,000,000,000 | 51 | Fix #8731 - Crash in ELF parser with negative 32bit number |
void reds_handle_channel_event(RedsState *reds, int event, SpiceChannelEventInfo *info)
{
reds->core.channel_event(&reds->core, event, info);
if (event == SPICE_CHANNEL_EVENT_DISCONNECTED) {
g_free(info);
}
} | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 153,681,723,975,072,410,000,000,000,000,000,000,000 | 8 | With OpenSSL 1.1: Disable client-initiated renegotiation.
Fixes issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
R_API RList *U(r_bin_java_get_args_from_bin)(RBinJavaObj * bin_obj, ut64 addr) {
RBinJavaField *fm_type = r_bin_java_get_method_code_attribute_with_addr (bin_obj, addr);
return fm_type ? r_bin_java_get_args (fm_type) : NULL;
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 242,582,027,452,120,340,000,000,000,000,000,000,000 | 4 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
ast_for_trailer(struct compiling *c, const node *n, expr_ty left_expr)
{
/* trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
subscriptlist: subscript (',' subscript)* [',']
subscript: '.' '.' '.' | test | [test] ':' [test] [sliceop]
*/
const node *n_copy = n;
REQ(n, trailer);... | 0 | [
"CWE-125"
] | cpython | a4d78362397fc3bced6ea80fbc7b5f4827aec55e | 176,476,340,277,892,260,000,000,000,000,000,000,000 | 80 | bpo-36495: Fix two out-of-bounds array reads (GH-12641)
Research and fix by @bradlarsen. |
static int convertCompoundSelectToSubquery(Walker *pWalker, Select *p){
int i;
Select *pNew;
Select *pX;
sqlite3 *db;
struct ExprList_item *a;
SrcList *pNewSrc;
Parse *pParse;
Token dummy;
if( p->pPrior==0 ) return WRC_Continue;
if( p->pOrderBy==0 ) return WRC_Continue;
for(pX=p; pX && (pX->op==T... | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 39,571,810,302,303,916,000,000,000,000,000,000,000 | 48 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
TEST_F(RouterTest, RetryUpstreamGrpcCancelled) {
NiceMock<Http::MockRequestEncoder> encoder1;
Http::ResponseDecoder* response_decoder = nullptr;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](Http::ResponseDecoder& decoder,
Http::ConnectionPo... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 177,391,733,993,030,360,000,000,000,000,000,000,000 | 57 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
_gcry_ecc_gost_sign (gcry_mpi_t input, ECC_secret_key *skey,
gcry_mpi_t r, gcry_mpi_t s)
{
gpg_err_code_t rc = 0;
gcry_mpi_t k, dr, sum, ke, x, e;
mpi_point_struct I;
gcry_mpi_t hash;
const void *abuf;
unsigned int abits, qbits;
mpi_ec_t ctx;
if (DBG_CIPHER)
log_mpidump ("gost ... | 0 | [
"CWE-203"
] | libgcrypt | 7c2943309d14407b51c8166c4dcecb56a3628567 | 142,893,428,541,798,940,000,000,000,000,000,000,000 | 96 | dsa,ecdsa: Fix use of nonce, use larger one.
* cipher/dsa-common.c (_gcry_dsa_modify_k): New.
* cipher/pubkey-internal.h (_gcry_dsa_modify_k): New.
* cipher/dsa.c (sign): Use _gcry_dsa_modify_k.
* cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise.
* cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise.
CVE-id: CVE-201... |
mm_answer_term(int sock, Buffer *req)
{
extern struct monitor *pmonitor;
int res, status;
debug3("%s: tearing down sessions", __func__);
/* The child is terminating */
session_destroy_all(&mm_session_close);
#ifdef USE_PAM
if (options.use_pam)
sshpam_cleanup();
#endif
while (waitpid(pmonitor->m_pid, &statu... | 0 | [
"CWE-20",
"CWE-200"
] | openssh-portable | d4697fe9a28dab7255c60433e4dd23cf7fce8a8b | 140,069,103,048,343,870,000,000,000,000,000,000,000 | 24 | Don't resend username to PAM; it already has it.
Pointed out by Moritz Jodeit; ok dtucker@ |
gss_name_to_string(gss_name_t gss_name, gss_buffer_desc *str)
{
OM_uint32 status, minor_stat;
gss_OID gss_type;
const char pref[] = KRB5_WELLKNOWN_NAMESTR "/" KRB5_ANONYMOUS_PRINCSTR "@";
const size_t preflen = sizeof(pref) - 1;
status = gss_display_name(&minor_stat, gss_name, str, &gss_type);
... | 0 | [
"CWE-119",
"CWE-772",
"CWE-401"
] | krb5 | 83ed75feba32e46f736fcce0d96a0445f29b96c2 | 210,130,549,492,943,960,000,000,000,000,000,000,000 | 19 | Fix leaks in kadmin server stubs [CVE-2015-8631]
In each kadmind server stub, initialize the client_name and
server_name variables, and release them in the cleanup handler. Many
of the stubs will otherwise leak the client and server name if
krb5_unparse_name() fails. Also make sure to free the prime_arg
variables in... |
void CModule::OnNickMessage(CNickMessage& Message,
const vector<CChan*>& vChans) {
OnNick(Message.GetNick(), Message.GetNewNick(), vChans);
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 177,872,397,425,271,380,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 |
struct sctp_chunk *sctp_make_abort(const struct sctp_association *asoc,
const struct sctp_chunk *chunk,
const size_t hint)
{
struct sctp_chunk *retval;
__u8 flags = 0;
/* Set the T-bit if we have no association and 'chunk' is not
* an INIT (vtag will be reflected).
*/
if (!asoc) {
if (chunk... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 9de7922bc709eee2f609cd01d98aaedc4cf5ea74 | 228,574,003,748,026,150,000,000,000,000,000,000,000 | 34 | net: sctp: fix skb_over_panic when receiving malformed ASCONF chunks
Commit 6f4c618ddb0 ("SCTP : Add paramters validity check for
ASCONF chunk") added basic verification of ASCONF chunks, however,
it is still possible to remotely crash a server by sending a
special crafted ASCONF chunk, even up to pre 2.6.12 kernels:
... |
xmlHashQLookup2(xmlHashTablePtr table, const xmlChar *prefix,
const xmlChar *name, const xmlChar *prefix2,
const xmlChar *name2) {
return(xmlHashQLookup3(table, prefix, name, prefix2, name2, NULL, NULL));
} | 0 | [
"CWE-399"
] | libxml2 | 8973d58b7498fa5100a876815476b81fd1a2412a | 165,476,351,692,096,710,000,000,000,000,000,000,000 | 5 | Add hash randomization to hash and dict structures
Following http://www.ocert.org/advisories/ocert-2011-003.html
it seems that having hash randomization might be a good idea
when using XML with untrusted data
* configure.in: lookup for rand, srand and time
* dict.c: add randomization to dictionaries hash tables
* hash... |
SetKeyTypes(XkbDescPtr xkb,
xkbSetMapReq * req,
xkbKeyTypeWireDesc * wire, XkbChangesPtr changes)
{
register unsigned i;
unsigned first, last;
CARD8 *map;
if ((unsigned) (req->firstType + req->nTypes) > xkb->map->size_types) {
i = req->firstType + req->nTypes;
if... | 0 | [
"CWE-119"
] | xserver | f7cd1276bbd4fe3a9700096dec33b52b8440788d | 86,449,445,969,608,170,000,000,000,000,000,000,000 | 86 | Correct bounds checking in XkbSetNames()
CVE-2020-14345 / ZDI 11428
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
int handler_init(void)
{
return tcmur_register_handler(&fbo_handler);
} | 0 | [
"CWE-200"
] | tcmu-runner | 8cf8208775022301adaa59c240bb7f93742d1329 | 227,649,791,679,405,000,000,000,000,000,000,000,000 | 4 | removed all check_config callback implementations to avoid security issues
see github issue #194
qcow.c contained an information leak, could test for existance of any
file in the system
file_example.c and file_optical.c allow also to test for existance of
any file, plus to temporarily create empty new files anywhere... |
CImg<T>& matchpatch(const CImg<T>& patch_image,
const unsigned int patch_width,
const unsigned int patch_height,
const unsigned int patch_depth,
const unsigned int nb_iterations=5,
const unsigned ... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 175,815,888,886,361,050,000,000,000,000,000,000,000 | 11 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void gs_lib_ctx_deregister_callout(gs_memory_t *mem, gs_callout_fn fn, void *arg)
{
gs_lib_ctx_core_t *core;
gs_callout_list_t **entry;
if (mem == NULL || mem->gs_lib_ctx == NULL ||
mem->gs_lib_ctx->core == NULL || fn == NULL)
return;
core = mem->gs_lib_ctx->core;
entry = &core->call... | 0 | [
"CWE-20"
] | ghostpdl | a9bd3dec9fde03327a4a2c69dad1036bf9632e20 | 236,757,080,603,389,200,000,000,000,000,000,000,000 | 21 | Bug 704342: Include device specifier strings in access validation
for the "%pipe%", %handle%" and %printer% io devices.
We previously validated only the part after the "%pipe%" Postscript device
specifier, but this proved insufficient.
This rebuilds the original file name string, and validates it complete. The
sligh... |
static gps_mask_t json_pass_packet(struct gps_device_t *session UNUSED)
{
gpsd_report(LOG_IO, "<= GPS: %s\n", (char *)session->packet.outbuffer);
/*@-nullpass@*/ /* required only because splint is buggy */
/* devices and paths need to be edited to */
if (strstr((char *)session->packet.outbuffer, "DEVIC... | 0 | [] | gpsd | 08edc49d8f63c75bfdfb480b083b0d960310f94f | 325,499,913,942,198,480,000,000,000,000,000,000,000 | 30 | Address Savannah bug #38511:
ais_context->bitlen <= sizeof(ais_context->bits)/8 is not checked |
static int arc_emac_poll(struct napi_struct *napi, int budget)
{
struct net_device *ndev = napi->dev;
struct arc_emac_priv *priv = netdev_priv(ndev);
unsigned int work_done;
arc_emac_tx_clean(ndev);
work_done = arc_emac_rx(ndev, budget);
if (work_done < budget) {
napi_complete(napi);
arc_reg_or(priv, R_ENAB... | 0 | [
"CWE-362"
] | linux | c278c253f3d992c6994d08aa0efb2b6806ca396f | 318,942,371,747,135,900,000,000,000,000,000,000,000 | 16 | net: arc_emac: fix koops caused by sk_buff free
There is a race between arc_emac_tx() and arc_emac_tx_clean().
sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx()
submitting sk_buff.
In order to free sk_buff arc_emac_tx_clean() checks:
if ((info & FOR_EMAC) || !txbd->data)
break;
...
dev_... |
parse_http_response(const char *headers, int *code, time_t *date,
compress_method_t *compression, char **reason)
{
unsigned n1, n2;
char datestr[RFC1123_TIME_LEN+1];
smartlist_t *parsed_headers;
tor_assert(headers);
tor_assert(code);
while (TOR_ISSPACE(*headers)) headers++; /* tolerate ... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 211,287,774,765,324,670,000,000,000,000,000,000,000 | 71 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static void context_release(struct context *ctx)
{
struct fw_card *card = &ctx->ohci->card;
struct descriptor_buffer *desc, *tmp;
list_for_each_entry_safe(desc, tmp, &ctx->buffer_list, list)
dma_free_coherent(card->device, PAGE_SIZE, desc,
desc->buffer_bus -
((void *)&desc->buffer - (void *)desc));
} | 0 | [
"CWE-399"
] | linux-2.6 | 8c0c0cc2d9f4c523fde04bdfe41e4380dec8ee54 | 333,260,341,819,343,040,000,000,000,000,000,000,000 | 10 | firewire: ohci: handle receive packets with a data length of zero
Queueing to receive an ISO packet with a payload length of zero
silently does nothing in dualbuffer mode, and crashes the kernel in
packet-per-buffer mode. Return an error in dualbuffer mode, because
the DMA controller won't let us do what we want, and... |
zfs_fuid_node_add(zfs_fuid_info_t **fuidpp, const char *domain, uint32_t rid,
uint64_t idx, uint64_t id, zfs_fuid_type_t type)
{
zfs_fuid_t *fuid;
zfs_fuid_domain_t *fuid_domain;
zfs_fuid_info_t *fuidp;
uint64_t fuididx;
boolean_t found = B_FALSE;
if (*fuidpp == NULL)
*fuidpp = zfs_fuid_info_alloc();
fui... | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 189,924,718,669,325,700,000,000,000,000,000,000,000 | 57 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
rename_get_info_callback (GObject *source_object,
GAsyncResult *res,
gpointer callback_data)
{
NautilusFileOperation *op;
NautilusDirectory *directory;
NautilusFile *existing_file;
char *old_name;
char *old_uri;
char *new_uri;
const char *new_name;
GFileInfo *new_info;
GError *error;
op = callback... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 229,558,396,010,632,900,000,000,000,000,000,000,000 | 70 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
tdbio_read_model(void)
{
TRUSTREC vr;
int rc;
rc = tdbio_read_record( 0, &vr, RECTYPE_VER );
if( rc )
log_fatal( _("%s: error reading version record: %s\n"),
db_name, gpg_strerror (rc) );
return vr.r.ver.trust_model;
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 37,271,609,288,888,610,000,000,000,000,000,000,000 | 11 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
delay_set_stat (char const *file_name, struct stat *st,
mode_t invert_permissions)
{
struct cpio_file_stat fs;
stat_to_cpio (&fs, st);
fs.c_name = (char*) file_name;
delay_cpio_set_stat (&fs, invert_permissions);
} | 0 | [
"CWE-190"
] | cpio | dd96882877721703e19272fe25034560b794061b | 9,970,625,613,083,196,000,000,000,000,000,000,000 | 9 | Rewrite dynamic string support.
* src/dstring.c (ds_init): Take a single argument.
(ds_free): New function.
(ds_resize): Take a single argument. Use x2nrealloc to expand
the storage.
(ds_reset,ds_append,ds_concat,ds_endswith): New function.
(ds_fgetstr): Rewrite. In particular, this fixes integer overflow.
* src/dst... |
static NOINLINE char *xmalloc_optname_optval(uint8_t *option, const struct dhcp_optflag *optflag, const char *opt_name)
{
unsigned upper_length;
int len, type, optlen;
char *dest, *ret;
/* option points to OPT_DATA, need to go back to get OPT_LEN */
len = option[-OPT_DATA + OPT_LEN];
type = optflag->flags & OPT... | 0 | [
"CWE-125"
] | busybox | 6d3b4bb24da9a07c263f3c1acf8df85382ff562c | 298,661,289,405,346,120,000,000,000,000,000,000,000 | 210 | udhcpc: check that 4-byte options are indeed 4-byte, closes 11506
function old new delta
udhcp_get_option32 - 27 +27
udhcp_get_option 231 248 +17
----------------------------------... |
static void free_Style_className(void)
{
FREE(Style_className);
} | 0 | [
"CWE-416"
] | lynx-snapshots | 280a61b300a1614f6037efc0902ff7ecf17146e9 | 4,365,246,644,144,129,500,000,000,000,000,000,000 | 4 | snapshot of project "lynx", label v2-8-9dev_15b |
static void cap_xfrm_policy_free_security(struct xfrm_sec_ctx *ctx)
{
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 328,438,636,108,701,420,000,000,000,000,000,000,000 | 3 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static int rtecp_create_file(sc_card_t *card, sc_file_t *file)
{
int r;
assert(card && card->ctx && file);
if (file->sec_attr_len == 0)
{
r = set_sec_attr_from_acl(card, file);
SC_TEST_RET(card->ctx, SC_LOG_DEBUG_NORMAL, r, "Set sec_attr from ACL failed");
}
assert(iso_ops && iso_ops->create_file);
r = iso_... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 116,036,037,170,895,600,000,000,000,000,000,000,000 | 14 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void unix_sock_destructor(struct sock *sk)
{
struct unix_sock *u = unix_sk(sk);
skb_queue_purge(&sk->sk_receive_queue);
WARN_ON(atomic_read(&sk->sk_wmem_alloc));
WARN_ON(!sk_unhashed(sk));
WARN_ON(sk->sk_socket);
if (!sock_flag(sk, SOCK_DEAD)) {
pr_info("Attempt to release alive unix socket: %p\n", sk)... | 0 | [] | net | 7d267278a9ece963d77eefec61630223fce08c6c | 24,219,676,612,986,857,000,000,000,000,000,000,000 | 26 | unix: avoid use-after-free in ep_remove_wait_queue
Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
An AF_UNIX datagram socket being the client in an n:1 association with
some server socket is only allowed to send messages to the server if the
receive queue of this socket contains at most sk_max_ack_backlog... |
copy_ze_off(regsub_T *to, regsub_T *from)
{
if (rex.nfa_has_zend)
{
if (REG_MULTI)
{
if (from->list.multi[0].end_lnum >= 0)
{
to->list.multi[0].end_lnum = from->list.multi[0].end_lnum;
to->list.multi[0].end_col = from->list.multi[0].end_col;
}
}
else
{
if (from->list.line[0].end != ... | 0 | [
"CWE-122"
] | vim | 65b605665997fad54ef39a93199e305af2fe4d7f | 16,690,395,828,861,106,000,000,000,000,000,000,000 | 19 | patch 8.2.3409: reading beyond end of line with invalid utf-8 character
Problem: Reading beyond end of line with invalid utf-8 character.
Solution: Check for NUL when advancing. |
void __qdisc_run(struct net_device *dev)
{
do {
if (!qdisc_restart(dev))
break;
} while (!netif_queue_stopped(dev));
clear_bit(__LINK_STATE_QDISC_RUNNING, &dev->state);
} | 1 | [
"CWE-399"
] | linux-2.6 | 2ba2506ca7ca62c56edaa334b0fe61eb5eab6ab0 | 288,784,763,751,991,200,000,000,000,000,000,000,000 | 9 | [NET]: Add preemption point in qdisc_run
The qdisc_run loop is currently unbounded and runs entirely in a
softirq. This is bad as it may create an unbounded softirq run.
This patch fixes this by calling need_resched and breaking out if
necessary.
It also adds a break out if the jiffies value changes since that woul... |
LIBOPENMPT_MODPLUG_API int ModPlug_GetCurrentOrder(ModPlugFile* file)
{
if(!file) return 0;
return openmpt_module_get_current_order(file->mod);
} | 0 | [
"CWE-120",
"CWE-295"
] | openmpt | 927688ddab43c2b203569de79407a899e734fabe | 242,650,144,581,986,680,000,000,000,000,000,000,000 | 5 | [Fix] libmodplug: C API: Limit the length of strings copied to the output buffer of ModPlug_InstrumentName() and ModPlug_SampleName() to 32 bytes (including terminating null) as is done by original libmodplug. This avoids potential buffer overflows in software relying on this limit instead of querying the required buff... |
static int test_move(struct libmnt_test *ts, int argc, char *argv[])
{
struct libmnt_fs *fs = mnt_new_fs();
int rc;
if (argc < 3)
return -1;
mnt_fs_set_source(fs, argv[1]);
mnt_fs_set_target(fs, argv[2]);
rc = update(NULL, fs, MS_MOVE);
mnt_free_fs(fs);
return rc;
} | 0 | [
"CWE-399"
] | util-linux | 84ed14022e7d3d121bbcab60ebad11ed38d691b0 | 179,201,411,798,668,900,000,000,000,000,000,000,000 | 15 | libmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- always use temporary file
- use fflush() for the temporary file
- check fprintf() return value
Signed-off-by: Karel Zak <kzak@redhat.com> |
static int originates_from_local_iface(AvahiServer *s, AvahiIfIndex iface, const AvahiAddress *a, uint16_t port) {
assert(s);
assert(iface != AVAHI_IF_UNSPEC);
assert(a);
/* If it isn't the MDNS port it can't be generated by us */
if (port != AVAHI_MDNS_PORT)
return 0;
return avahi_int... | 0 | [
"CWE-399"
] | avahi | 3093047f1aa36bed8a37fa79004bf0ee287929f4 | 9,176,148,039,214,322,000,000,000,000,000,000,000 | 11 | Don't get confused by UDP packets with a source port that is zero
This is a fix for rhbz 475394.
Problem identified by Hugo Dias. |
static int cms_kari_set1_pkey(CMS_ContentInfo *cms, CMS_RecipientInfo *ri,
EVP_PKEY *pk, X509 *cert)
{
int i;
STACK_OF(CMS_RecipientEncryptedKey) *reks;
CMS_RecipientEncryptedKey *rek;
reks = CMS_RecipientInfo_kari_get0_reks(ri);
if (!cert)
return 0;
for (i = 0; i < sk_CMS_RecipientEncryptedKey_num(reks)... | 0 | [
"CWE-399",
"CWE-703"
] | openssl | cd30f03ac5bf2962f44bd02ae8d88245dff2f12c | 36,202,890,096,089,780,000,000,000,000,000,000,000 | 24 | Canonicalise input in CMS_verify.
If content is detached and not binary mode translate the input to
CRLF format. Before this change the input was verified verbatim
which lead to a discrepancy between sign and verify. |
asn1_der_decoding_startEnd (asn1_node element, const void *ider, int len,
const char *name_element, int *start, int *end)
{
asn1_node node, node_to_find, p, p2;
int counter, len2, len3, len4, move, ris;
unsigned char class;
unsigned long tag;
int indefinite;
const unsigned char *der = ider;
node =... | 0 | [] | libtasn1 | ff3b5c68cc32e30d19edbbc3a962b2266029f3cc | 320,752,524,261,735,960,000,000,000,000,000,000,000 | 303 | Corrected an off-by-one error.
The issue was discovered using the codenomicon TLS suite. |
HRESULT Http::HrGetPass(std::wstring *strPass)
{
if (m_strPass.empty())
return MAPI_E_NOT_FOUND;
return X2W(m_strPass, strPass);
} | 0 | [
"CWE-770"
] | kopano-core | 512457466b87039c6a8d25887fdaca6173619546 | 194,561,487,586,241,400,000,000,000,000,000,000,000 | 6 | Set limit on header size to prevent bad alloc
This sets a hard limit of 64 KiB to the header to prevent a memory
allocation exception from being thrown during the parsing of the request
headers. |
int rtl_usb_suspend(struct usb_interface *pusb_intf, pm_message_t message)
{
return 0;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 3f93616951138a598d930dcaec40f2bfd9ce43bb | 302,793,580,457,489,640,000,000,000,000,000,000,000 | 4 | rtlwifi: prevent memory leak in rtl_usb_probe
In rtl_usb_probe if allocation for usb_data fails the allocated hw
should be released. In addition the allocated rtlpriv->usb_data should
be released on error handling path.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeau... |
DEFUN (no_bgp_multiple_instance,
no_bgp_multiple_instance_cmd,
"no bgp multiple-instance",
NO_STR
BGP_STR
"BGP multiple instance\n")
{
int ret;
ret = bgp_option_unset (BGP_OPT_MULTIPLE_INSTANCE);
if (ret < 0)
{
vty_out (vty, "%% There are more than two BGP instances%s... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 102,586,072,575,805,890,000,000,000,000,000,000,000 | 17 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static int handle_external_interrupt(struct kvm_vcpu *vcpu,
struct kvm_run *kvm_run)
{
return 1;
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 25,585,554,755,164,725,000,000,000,000,000,000,000 | 5 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
pch_swap (void)
{
char **tp_line; /* the text of the hunk */
size_t *tp_len; /* length of each line */
char *tp_char; /* +, -, and ! */
lin i;
lin n;
bool blankline = false;
char *s;
i = p_first;
p_first = p_newfirst;
p_newfirst = i;
/* make a scratch copy */
tp_lin... | 1 | [
"CWE-415"
] | patch | 9c986353e420ead6e706262bf204d6e03322c300 | 302,170,608,865,194,630,000,000,000,000,000,000,000 | 92 | Fix swapping fake lines in pch_swap
* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a
blank line in the middle of a context-diff hunk: that empty line stays
in the middle of the hunk and isn't swapped.
Fixes: https://savannah.gnu.org/bugs/index.php?53133 |
void sc_pkcs15_free_prkey_info(sc_pkcs15_prkey_info_t *key)
{
if (key->subject.value)
free(key->subject.value);
sc_pkcs15_free_key_params(&key->params);
sc_aux_data_free(&key->aux_data);
free(key);
} | 0 | [
"CWE-672"
] | OpenSC | 6ce6152284c47ba9b1d4fe8ff9d2e6a3f5ee02c7 | 276,263,687,649,842,470,000,000,000,000,000,000,000 | 11 | pkcs15-prkey: Simplify cleaning memory after failure
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=18478 |
set_sys_flag(
sockaddr_u *srcadr,
endpt *inter,
struct req_pkt *inpkt
)
{
setclr_flags(srcadr, inter, inpkt, 1);
} | 0 | [
"CWE-190"
] | ntp | c04c3d3d940dfe1a53132925c4f51aef017d2e0f | 265,631,617,857,058,300,000,000,000,000,000,000,000 | 8 | [TALOS-CAN-0052] crash by loop counter underrun. |
static unsigned int hfi1_poll(struct file *fp, struct poll_table_struct *pt)
{
struct hfi1_ctxtdata *uctxt;
unsigned pollflag;
uctxt = ((struct hfi1_filedata *)fp->private_data)->uctxt;
if (!uctxt)
pollflag = POLLERR;
else if (uctxt->poll_type == HFI1_POLL_TYPE_URGENT)
pollflag = poll_urgent(fp, pt);
else i... | 0 | [
"CWE-284",
"CWE-264"
] | linux | e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3 | 11,587,280,259,243,343,000,000,000,000,000,000,000 | 17 | IB/security: Restrict use of the write() interface
The drivers/infiniband stack uses write() as a replacement for
bi-directional ioctl(). This is not safe. There are ways to
trigger write calls that result in the return structure that
is normally written to user space being shunted off to user
specified kernel memory... |
uint32 pack_length() const { return sizeof(double); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 162,508,566,160,996,940,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static void ImportGrayQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const unsigned char *magick_restrict p,
Quantum *magick_restrict q,ExceptionInfo *exception)
{
QuantumAny
range;
register ssize_t
x;
ssize_t
bit;
unsigned int
pixel;
assert(im... | 1 | [
"CWE-284"
] | ImageMagick | 134463b926fa965571aa4febd61b810be5e7da05 | 113,814,105,535,290,230,000,000,000,000,000,000,000 | 313 | https://github.com/ImageMagick/ImageMagick/issues/129 |
enum nss_status _nss_mymachines_getgrnam_r(
const char *name,
struct group *gr,
char *buffer, size_t buflen,
int *errnop) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message* reply ... | 1 | [
"CWE-415",
"CWE-119"
] | systemd | cb31827d62066a04b02111df3052949fda4b6888 | 35,467,285,493,376,764,000,000,000,000,000,000,000 | 83 | nss-mymachines: do not allow overlong machine names
https://github.com/systemd/systemd/issues/2002 |
resp_print_simple_string(netdissect_options *ndo, register const u_char *bp, int length) {
return resp_print_string_error_integer(ndo, bp, length);
} | 0 | [
"CWE-399",
"CWE-835"
] | tcpdump | db24063b01cba8e9d4d88b7d8ac70c9000c104e4 | 177,871,179,828,674,000,000,000,000,000,000,000,000 | 3 | CVE-2017-12989/RESP: Make sure resp_get_length() advances the pointer for invalid lengths.
Make sure that it always sends *endp before returning and that, for
invalid lengths where we don't like a character in the length string,
what it sets *endp to is past the character in question, so we don't
run the risk of infin... |
static void error_close_writer(struct Curl_easy *data,
struct contenc_writer *writer)
{
(void) data;
(void) writer;
} | 0 | [] | curl | 3a09fbb7f264c67c438d01a30669ce325aa508e2 | 172,243,082,590,292,070,000,000,000,000,000,000,000 | 6 | content_encoding: return error on too many compression steps
The max allowed steps is arbitrarily set to 5.
Bug: https://curl.se/docs/CVE-2022-32206.html
CVE-2022-32206
Reported-by: Harry Sintonen
Closes #9049 |
struct crypto_instance *aead_geniv_alloc(struct crypto_template *tmpl,
struct rtattr **tb, u32 type,
u32 mask)
{
const char *name;
struct crypto_aead_spawn *spawn;
struct crypto_attr_type *algt;
struct crypto_instance *inst;
struct crypto_alg *alg;
int err;
algt = crypto_get_attr_type(tb);
if (IS_E... | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 165,940,452,142,514,950,000,000,000,000,000,000,000 | 93 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
delete_port(struct seq_oss_devinfo *dp)
{
if (dp->port < 0)
return 0;
debug_printk(("delete_port %i\n", dp->port));
return snd_seq_event_port_detach(dp->cseq, dp->port);
} | 1 | [
"CWE-415"
] | linux-2.6 | 27f7ad53829f79e799a253285318bff79ece15bd | 197,983,924,405,975,260,000,000,000,000,000,000,000 | 8 | ALSA: seq/oss - Fix double-free at error path of snd_seq_oss_open()
The error handling in snd_seq_oss_open() has several bad codes that
do dereferecing released pointers and double-free of kmalloc'ed data.
The object dp is release in free_devinfo() that is called via
private_free callback. The rest shouldn't touch th... |
png_text_compress(png_structrp png_ptr, png_uint_32 chunk_name,
compression_state *comp, png_uint_32 prefix_len)
{
int ret;
/* To find the length of the output it is necessary to first compress the
* input. The result is buffered rather than using the two-pass algorithm
* that is used on the inflate s... | 0 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 234,971,482,354,188,750,000,000,000,000,000,000,000 | 146 | [libpng16] Reject attempt to write over-length PLTE chunk |
bool isValid() const {
// 160bit -> 20octets -> * 4/3 -> 26.667 -> padded to 28
const size_t kEncodedSHA1Length = 28;
// 128bit -> 16octets -> * 4/3 -> 21.333 -> padded to 24
const size_t kEncodedSaltLength = 24;
return (salt.size() == kEncodedSaltLen... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 288,148,092,594,876,750,000,000,000,000,000,000,000 | 10 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static int has_utab_entry(struct libmnt_context *cxt, const char *target)
{
struct libmnt_cache *cache = NULL;
struct libmnt_fs *fs;
struct libmnt_iter itr;
char *cn = NULL;
int rc = 0;
assert(cxt);
if (!cxt->utab) {
const char *path = mnt_get_utab_path();
if (!path || is_file_empty(path))
return 0;
... | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 57202f5713afa2af20ffbb6ab5331481d0396f8d | 296,737,102,618,458,400,000,000,000,000,000,000,000 | 39 | libmount: fix UID check for FUSE umount [CVE-2021-3995]
Improper UID check allows an unprivileged user to unmount FUSE
filesystems of users with similar UID.
Signed-off-by: Karel Zak <kzak@redhat.com> |
static int read_channel_identities (WavpackContext *wpc, WavpackMetadata *wpmd)
{
if (!wpc->channel_identities) {
wpc->channel_identities = (unsigned char *)malloc (wpmd->byte_length + 1);
memcpy (wpc->channel_identities, wpmd->data, wpmd->byte_length);
wpc->channel_identities [wpmd->byte_le... | 0 | [
"CWE-125"
] | WavPack | bba5389dc598a92bdf2b297c3ea34620b6679b5b | 69,357,508,188,927,750,000,000,000,000,000,000,000 | 10 | issue #54: fix potential out-of-bounds heap read |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.