func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int snd_ctl_elem_info_user(struct snd_ctl_file *ctl,
struct snd_ctl_elem_info __user *_info)
{
struct snd_ctl_elem_info info;
int result;
if (copy_from_user(&info, _info, sizeof(info)))
return -EFAULT;
snd_power_lock(ctl->card);
result = snd_power_wait(ctl->card, SNDRV_CTL_POWER_D0);
if (result >=... | 0 | [
"CWE-190",
"CWE-189"
] | linux | ac902c112d90a89e59916f751c2745f4dbdbb4bd | 310,158,382,520,390,600,000,000,000,000,000,000,000 | 18 | ALSA: control: Handle numid overflow
Each control gets automatically assigned its numids when the control is created.
The allocation is done by incrementing the numid by the amount of allocated
numids per allocation. This means that excessive creation and destruction of
controls (e.g. via SNDRV_CTL_IOCTL_ELEM_ADD/REMO... |
static void autocomplete_flags(RCore *core, RLineCompletion *completion, const char* str) {
r_return_if_fail (str);
int n = strlen (str);
r_flag_foreach_prefix (core->flags, str, n, add_argv, completion);
} | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 50,104,332,735,116,860,000,000,000,000,000,000,000 | 5 | Fix #16303 - c->table_query double free (#16318) |
static int handle_pause(struct kvm_vcpu *vcpu)
{
if (ple_gap)
grow_ple_window(vcpu);
kvm_vcpu_on_spin(vcpu);
return kvm_skip_emulated_instruction(vcpu);
} | 0 | [
"CWE-388"
] | linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | 302,413,750,861,297,670,000,000,000,000,000,000,000 | 8 | kvm: nVMX: Allow L1 to intercept software exceptions (#BP and #OF)
When L2 exits to L0 due to "exception or NMI", software exceptions
(#BP and #OF) for which L1 has requested an intercept should be
handled by L1 rather than L0. Previously, only hardware exceptions
were forwarded to L1.
Signed-off-by: Jim Mattson <jma... |
query_info_hash(struct query_info *q, uint16_t flags)
{
hashvalue_type h = 0xab;
h = hashlittle(&q->qtype, sizeof(q->qtype), h);
if(q->qtype == LDNS_RR_TYPE_AAAA && (flags&BIT_CD))
h++;
h = hashlittle(&q->qclass, sizeof(q->qclass), h);
h = dname_query_hash(q->qname, h);
return h;
} | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 198,170,442,583,989,230,000,000,000,000,000,000,000 | 10 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
static void controller_init(struct avrcp *session)
{
struct avrcp_player *player;
struct btd_service *service;
struct avrcp_data *controller;
if (session->controller != NULL)
return;
controller = data_init(session, AVRCP_TARGET_UUID);
session->controller = controller;
DBG("%p version 0x%04x", controller, co... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 169,412,381,995,158,590,000,000,000,000,000,000,000 | 37 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
void _SaveDebugBeatPos(const char *name, const std::vector<BEAT> &beats)
{
printf("\nWriting beat detections data into file %s\n", name);
FILE *fptr = fopen(name, "wt");
if (fptr)
{
for (uint i = 0; i < beats.size(); i++)
{
BEAT b... | 0 | [
"CWE-617"
] | soundtouch | a1c400eb2cff849c0e5f9d6916d69ffea3ad2c85 | 319,961,564,429,720,630,000,000,000,000,000,000,000 | 15 | Fix issue CVE-2018-17096: Replace assert with runtime exception |
static int udf_sync_inode(struct inode *inode)
{
return udf_update_inode(inode, 1);
} | 0 | [
"CWE-476"
] | linux | 7fc3b7c2981bbd1047916ade327beccb90994eee | 316,735,078,804,596,900,000,000,000,000,000,000,000 | 4 | udf: Fix NULL ptr deref when converting from inline format
udf_expand_file_adinicb() calls directly ->writepage to write data
expanded into a page. This however misses to setup inode for writeback
properly and so we can crash on inode->i_wb dereference when submitting
page for IO like:
BUG: kernel NULL pointer dere... |
bool is_ready_for_join(const pid_t pid) {
EUID_ASSERT();
// check if a file /run/firejail/mnt/join exists
char *fname;
if (asprintf(&fname, "/proc/%d/root%s", pid, RUN_JOIN_FILE) == -1)
errExit("asprintf");
EUID_ROOT();
int fd = open(fname, O_RDONLY|O_CLOEXEC);
EUID_USER();
free(fname);
if (fd == -1)
retur... | 1 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 87,001,211,811,835,610,000,000,000,000,000,000,000 | 27 | fixing CVE-2022-31214 |
int dsdb_load_udv_v1(struct ldb_context *samdb, struct ldb_dn *dn, TALLOC_CTX *mem_ctx,
struct drsuapi_DsReplicaCursor **cursors, uint32_t *count)
{
struct drsuapi_DsReplicaCursor2 *v2 = NULL;
uint32_t i;
int ret;
ret = dsdb_load_udv_v2(samdb, dn, mem_ctx, &v2, count);
if (ret != LDB_SUCCESS) {
return re... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 218,678,891,128,079,170,000,000,000,000,000,000,000 | 31 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static void tcp_ack_tstamp(struct sock *sk, struct sk_buff *skb,
u32 prior_snd_una)
{
const struct skb_shared_info *shinfo;
/* Avoid cache line misses to get skb_shinfo() and shinfo->tx_flags */
if (likely(!TCP_SKB_CB(skb)->txstamp_ack))
return;
shinfo = skb_shinfo(skb);
if (!before(shinfo->tskey, prior_... | 0 | [
"CWE-200"
] | net | 75ff39ccc1bd5d3c455b6822ab09e533c551f758 | 269,894,174,190,080,430,000,000,000,000,000,000,000 | 14 | tcp: make challenge acks less predictable
Yue Cao claims that current host rate limiting of challenge ACKS
(RFC 5961) could leak enough information to allow a patient attacker
to hijack TCP sessions. He will soon provide details in an academic
paper.
This patch increases the default limit from 100 to 1000, and adds
s... |
private void
restore_cont(struct magic_set *ms, struct cont *c)
{
efree(ms->c.li); | 0 | [
"CWE-787"
] | php-src | ca6d511fa54b34d5b75bf120a86482a1b9e1e686 | 125,754,971,230,259,340,000,000,000,000,000,000,000 | 5 | Fix #81723: Memory corruption in finfo_buffer()
We need to use the same memory allocator throughout. |
ClientHttpRequest::httpStart()
{
PROF_start(httpStart);
// XXX: Re-initializes rather than updates. Should not be needed at all.
logType.update(LOG_TAG_NONE);
debugs(85, 4, logType.c_str() << " for '" << uri << "'");
/* no one should have touched this */
assert(out.offset == 0);
/* Use the ... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 306,803,009,182,629,970,000,000,000,000,000,000,000 | 14 | Handle more Range requests (#790)
Also removed some effectively unused code. |
void netns_nsid_socket_init(void)
{
if (rtnsh.fd > -1 || !ipnetns_have_nsid())
return;
if (rtnl_open(&rtnsh, 0) < 0) {
fprintf(stderr, "Cannot open rtnetlink\n");
exit(1);
}
} | 0 | [
"CWE-416"
] | iproute2 | 9bf2c538a0eb10d66e2365a655bf6c52f5ba3d10 | 6,024,020,038,811,242,000,000,000,000,000,000,000 | 11 | ipnetns: use-after-free problem in get_netnsid_from_name func
Follow the following steps:
# ip netns add net1
# export MALLOC_MMAP_THRESHOLD_=0
# ip netns list
then Segmentation fault (core dumped) will occur.
In get_netnsid_from_name func, answer is freed before
rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers... |
int RGWPostObj_ObjStore_S3::get_data(ceph::bufferlist& bl, bool& again)
{
bool boundary;
bool done;
const uint64_t chunk_size = s->cct->_conf->rgw_max_chunk_size;
int r = read_data(bl, chunk_size, boundary, done);
if (r < 0) {
return r;
}
if (boundary) {
if (!done) {
/* Reached end of data... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 80,323,153,682,462,200,000,000,000,000,000,000,000 | 24 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
virDomainHostdevDefNew(void)
{
virDomainHostdevDefPtr def;
if (VIR_ALLOC(def) < 0)
return NULL;
if (VIR_ALLOC(def->info) < 0)
goto error;
return def;
error:
VIR_FREE(def->info);
VIR_FREE(def);
return NULL;
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 120,810,719,198,801,720,000,000,000,000,000,000,000 | 17 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
void ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps)
{
if (pr != NULL)
*pr = sig->r;
if (ps != NULL)
*ps = sig->s;
} | 0 | [
"CWE-125"
] | openssl | 94d23fcff9b2a7a8368dfe52214d5c2569882c11 | 286,482,547,794,684,280,000,000,000,000,000,000,000 | 7 | Fix EC_GROUP_new_from_ecparameters to check the base length
Check that there's at least one byte in params->base before trying to
read it.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
static void peek_char_back(compiler_common *common, sljit_u32 max, jump_list **backtracks)
{
/* Reads one character back without moving STR_PTR. TMP2 must
contain the start of the subject buffer. Affects TMP1, TMP2, and RETURN_ADDR. */
DEFINE_COMPILER;
#if defined SUPPORT_UNICODE && PCRE2_CODE_UNIT_WIDTH != 32
struct ... | 0 | [
"CWE-125"
] | pcre2 | 50a51cb7e67268e6ad417eb07c9de9bfea5cc55a | 300,557,519,957,892,700,000,000,000,000,000,000,000 | 67 | Fixed a unicode properrty matching issue in JIT |
promptexpand(char *s, int ns, char *rs, char *Rs, zattr *txtchangep)
{
struct buf_vars new_vars;
if(!s)
return ztrdup("");
if ((termflags & TERM_UNKNOWN) && (unset(INTERACTIVE)))
init_term();
if (isset(PROMPTSUBST)) {
int olderr = errflag;
int oldval = lastval;
s = dupstring(s);
if (!pa... | 0 | [
"CWE-476"
] | zsh | c187154f47697cdbf822c2f9d714d570ed4a0fd1 | 180,815,405,929,320,470,000,000,000,000,000,000,000 | 66 | security/41: Don't perform PROMPT_SUBST evaluation on %F/%K arguments
Mitigates CVE-2021-45444 |
dlmmap_locked (void *start, size_t length, int prot, int flags, off_t offset)
{
void *ptr;
if (execfd == -1)
{
open_temp_exec_file_opts_idx = 0;
retry_open:
execfd = open_temp_exec_file ();
if (execfd == -1)
return MFAIL;
}
offset = execsize;
if (allocate_space (execfd, offset,... | 0 | [
"CWE-787"
] | libffi | 44a6c28545186d78642487927952844156fc7ab5 | 306,111,487,220,256,260,000,000,000,000,000,000,000 | 52 | aarch64: Flush code mapping in addition to data mapping (#471)
This needs a new function, ffi_data_to_code_pointer, to translate
from data pointers to code pointers.
Fixes issue #470. |
BSONObj spec() {
return BSON("$or" << BSON_ARRAY("$a" << 1));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 31,145,524,158,505,124,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
bad_argc (token_data *name, int argc, int min, int max)
{
bool isbad = false;
if (min > 0 && argc < min)
{
if (!suppress_warnings)
M4ERROR ((warning_status, 0,
"Warning: too few arguments to builtin `%s'",
TOKEN_DATA_TEXT (name)));
isbad = true;
}
else if (max > 0 && argc > max && !s... | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 306,143,719,751,827,250,000,000,000,000,000,000,000 | 19 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
void testTypesExpected(std::string query, TypeMap expectedTypes) {
auto dbc = getTestDBC();
QueryDataTyped typedResults;
queryInternal(query, typedResults, dbc);
for (const auto& row : typedResults) {
for (const auto& col : row) {
if (expectedTypes.count(col.first)) {
EXPECT_EQ(boost::apply_vi... | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 72,048,624,693,810,770,000,000,000,000,000,000,000 | 19 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
ipcp_vr_lattice::set_to_bottom ()
{
if (m_vr.varying_p ())
return false;
/* ?? We create all sorts of VARYING ranges for floats, structures,
and other types which we cannot handle as ranges. We should
probably avoid handling them throughout the pass, but it's easier
to create a sensible VARYING ... | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 52,030,880,515,699,080,000,000,000,000,000,000,000 | 12 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
static void test_bug12925()
{
myheader("test_bug12925");
if (opt_getopt_ll_test)
DIE_UNLESS(opt_getopt_ll_test == LL(25600*1024*1024));
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 120,793,688,119,314,160,000,000,000,000,000,000,000 | 6 | 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... |
njs_generate_node_index_release(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
if (node != NULL && node->temporary) {
return njs_generate_index_release(vm, generator, node->index);
}
return NJS_OK;
} | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 213,716,949,991,633,500,000,000,000,000,000,000,000 | 9 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
node_linebreak(Node** np, ScanEnv* env)
{
/* same as (?>\x0D\x0A|[\x0A-\x0D\x{85}\x{2028}\x{2029}]) */
Node* left = NULL;
Node* right = NULL;
Node* target1 = NULL;
Node* target2 = NULL;
CClassNode* cc;
int num1, num2, r;
UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN * 2];
/* \x0D\x0A */
num1 = ONIGENC_CODE_... | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 35,587,870,322,622,320,000,000,000,000,000,000,000 | 62 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
void __weak bpf_jit_free(struct bpf_prog *fp)
{
if (fp->jited) {
struct bpf_binary_header *hdr = bpf_jit_binary_hdr(fp);
bpf_jit_binary_unlock_ro(hdr);
bpf_jit_binary_free(hdr);
WARN_ON_ONCE(!bpf_prog_kallsyms_verify_off(fp));
}
bpf_prog_unlock_free(fp);
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 140,105,730,736,276,910,000,000,000,000,000,000,000 | 13 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
virDomainGetName(virDomainPtr domain)
{
VIR_DEBUG("domain=%p", domain);
virResetLastError();
virCheckDomainReturn(domain, NULL);
return domain->name;
} | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 319,189,043,691,753,000,000,000,000,000,000,000,000 | 10 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
int ssl_parse_finished( ssl_context *ssl )
{
int ret;
unsigned int hash_len;
unsigned char buf[36];
SSL_DEBUG_MSG( 2, ( "=> parse finished" ) );
ssl->handshake->calc_finished( ssl, buf, ssl->endpoint ^ 1 );
/*
* Switch to our negotiated transform and session parameters for inbound data.
... | 0 | [
"CWE-310"
] | polarssl | 4582999be608c9794d4518ae336b265084db9f93 | 259,405,006,826,467,240,000,000,000,000,000,000,000 | 64 | Fixed timing difference resulting from badly formatted padding. |
int may_open(struct path *path, int acc_mode, int flag)
{
struct dentry *dentry = path->dentry;
struct inode *inode = dentry->d_inode;
int error;
if (!inode)
return -ENOENT;
switch (inode->i_mode & S_IFMT) {
case S_IFLNK:
return -ELOOP;
case S_IFDIR:
if (acc_mode & MAY_WRITE)
return -EISDIR;
break;
... | 0 | [
"CWE-20",
"CWE-362",
"CWE-416"
] | linux | 86acdca1b63e6890540fa19495cfc708beff3d8b | 300,885,143,910,973,680,000,000,000,000,000,000,000 | 50 | fix autofs/afs/etc. magic mountpoint breakage
We end up trying to kfree() nd.last.name on open("/mnt/tmp", O_CREAT)
if /mnt/tmp is an autofs direct mount. The reason is that nd.last_type
is bogus here; we want LAST_BIND for everything of that kind and we
get LAST_NORM left over from finding parent directory.
So make... |
int kvm_arch_prepare_memory_region(struct kvm *kvm,
struct kvm_memory_slot *memslot,
struct kvm_memory_slot old,
struct kvm_userspace_memory_region *mem,
int user_alloc)
{
int npages = memslot->npages;
int map_flags = MAP_PRIVATE | MAP_ANONYMOUS;
/* Prevent internal slot pages from being moved by fo... | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 329,391,136,990,192,100,000,000,000,000,000,000,000 | 38 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
relpTcpWaitWriteable(relpTcp_t *const pThis, struct timespec *const tTimeout)
{
int r;
struct timespec tCurr; /* current time */
struct pollfd pfd;
clock_gettime(CLOCK_REALTIME, &tCurr);
const int timeout = (tTimeout->tv_sec - tCurr.tv_sec) * 1000
+ (tTimeout->tv_nsec - tCurr.tv_nsec) / 1000000000;
if(t... | 0 | [
"CWE-787"
] | librelp | 2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf | 338,666,438,960,548,600,000,000,000,000,000,000,000 | 21 | unify error message generation |
static bool ikev2_get_dcookie(u_char *dcookie, chunk_t st_ni,
ip_address *addr, u_int8_t *spiI)
{
size_t addr_length;
SHA1_CTX ctx_sha1;
unsigned char addr_buff[
sizeof(union { struct in_addr A;
struct in6_addr B;
})];
addr_length = addrbytesof(addr, addr_buff, sizeof(addr_buff));
S... | 0 | [
"CWE-20"
] | libreswan | 2899351224fe2940aec37d7656e1e392c0fe07f0 | 265,383,689,843,879,200,000,000,000,000,000,000,000 | 38 | SECURITY: Properly handle IKEv2 I1 notification packet without KE payload |
xmlXPathGetSign(double val) {
return(trio_signbit(val));
} | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 157,534,836,977,459,260,000,000,000,000,000,000,000 | 3 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static unsigned php_ifd_get32s(void *value, int motorola_intel)
{
return (int) php_ifd_get32u(value, motorola_intel);
} | 0 | [
"CWE-125"
] | php-src | 0c77b4307df73217283a4aaf9313e1a33a0967ff | 1,627,063,292,034,595,400,000,000,000,000,000,000 | 4 | Fixed bug #79282 |
do_one_cmd(
char_u **cmdlinep,
int sourcing,
#ifdef FEAT_EVAL
struct condstack *cstack,
#endif
char_u *(*fgetline)(int, void *, int),
void *cookie) /* argument for fgetline() */
{
char_u *p;
linenr_T lnum;
long n;
char *errormsg = NULL; /* error message */
char_u *afte... | 1 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 245,460,505,322,276,500,000,000,000,000,000,000,000 | 926 | 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. |
void CSoundFile::HandlePatternTransitionEvents()
{
// MPT sequence override
if(m_PlayState.m_nSeqOverride != ORDERINDEX_INVALID && m_PlayState.m_nSeqOverride < Order().size())
{
if(m_SongFlags[SONG_PATTERNLOOP])
{
m_PlayState.m_nPattern = Order()[m_PlayState.m_nSeqOverride];
}
m_PlayState.m_nCurrentOrder ... | 0 | [
"CWE-125"
] | openmpt | 7ebf02af2e90f03e0dbd0e18b8b3164f372fb97c | 103,397,306,736,373,830,000,000,000,000,000,000,000 | 26 | [Fix] Possible out-of-bounds read when computing length of some IT files with pattern loops (OpenMPT: formats that are converted to IT, libopenmpt: IT/ITP/MO3), caught with afl-fuzz.
git-svn-id: https://source.openmpt.org/svn/openmpt/trunk/OpenMPT@10027 56274372-70c3-4bfc-bfc3-4c3a0b034d27 |
file_read_publickey(LIBSSH2_SESSION * session, unsigned char **method,
size_t *method_len,
unsigned char **pubkeydata,
size_t *pubkeydata_len,
const char *pubkeyfile)
{
FILE *fd;
char c;
unsigned char *pubkey = NULL, *sp1, *sp2,... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 265,243,345,162,938,660,000,000,000,000,000,000,000 | 91 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
TRIO_PUBLIC_STRING int trio_xstring_equal_max TRIO_ARGS3((self, max, other), trio_string_t* self,
size_t max, TRIO_CONST char* other)
{
assert(self);
assert(other);
return trio_equal_max(self->content, max, other);
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 112,278,429,541,828,250,000,000,000,000,000,000,000 | 8 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static struct sctp_association *__sctp_rcv_auth_lookup(struct sk_buff *skb,
const union sctp_addr *paddr,
const union sctp_addr *laddr,
struct sctp_transport **transportp)
{
/* XXX - walk through the chunks looking for something that can
* help us find the association. INIT, and INIT-A... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 24,537,314,655,138,226,000,000,000,000,000,000,000 | 11 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
int vt_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct vc_data *vc = tty->driver_data;
struct console_font_op op; /* used in multiple places here */
unsigned int console = vc->vc_num;
unsigned char ucval;
unsigned int uival;
void __user *up = (void __user *)arg;
int i, perm;
in... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 72,552,578,102,473,410,000,000,000,000,000,000,000 | 692 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
static ssize_t fuse_dev_read(struct kiocb *iocb, struct iov_iter *to)
{
struct fuse_copy_state cs;
struct file *file = iocb->ki_filp;
struct fuse_dev *fud = fuse_get_dev(file);
if (!fud)
return -EPERM;
if (!iter_is_iovec(to))
return -EINVAL;
fuse_copy_init(&cs, 1, to);
return fuse_dev_do_read(fud, file, ... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 161,925,383,372,690,740,000,000,000,000,000,000,000 | 16 | 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 __percpu *__alloc_percpu(size_t size, size_t align)
{
return pcpu_alloc(size, align, false, GFP_KERNEL);
} | 0 | [] | linux | 4f996e234dad488e5d9ba0858bc1bae12eff82c3 | 262,454,515,443,968,100,000,000,000,000,000,000,000 | 4 | percpu: fix synchronization between chunk->map_extend_work and chunk destruction
Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work. pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end u... |
static void netlink_rcv_wake(struct sock *sk)
{
struct netlink_sock *nlk = nlk_sk(sk);
if (skb_queue_empty(&sk->sk_receive_queue))
clear_bit(NETLINK_S_CONGESTED, &nlk->state);
if (!test_bit(NETLINK_S_CONGESTED, &nlk->state))
wake_up_interruptible(&nlk->wait);
} | 0 | [
"CWE-362",
"CWE-415"
] | linux | 92964c79b357efd980812c4de5c1fd2ec8bb5520 | 123,371,522,584,651,920,000,000,000,000,000,000,000 | 9 | netlink: Fix dump skb leak/double free
When we free cb->skb after a dump, we do it after releasing the
lock. This means that a new dump could have started in the time
being and we'll end up freeing their skb instead of ours.
This patch saves the skb and module before we unlock so we free
the right memory.
Fixes: 16... |
static void arcmsr_free_mu(struct AdapterControlBlock *acb)
{
switch (acb->adapter_type) {
case ACB_ADAPTER_TYPE_B:
case ACB_ADAPTER_TYPE_D: {
dma_free_coherent(&acb->pdev->dev, acb->roundup_ccbsize,
acb->dma_coherent2, acb->dma_coherent_handle2);
break;
}
}
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 168,334,796,543,675,200,000,000,000,000,000,000,000 | 11 | 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... |
static int clear_refs_pte_range(pmd_t *pmd, unsigned long addr,
unsigned long end, struct mm_walk *walk)
{
struct vm_area_struct *vma = walk->private;
pte_t *pte, ptent;
spinlock_t *ptl;
struct page *page;
split_huge_page_pmd(walk->mm, pmd);
pte = pte_offset_map_lock(vma->vm_mm, pmd, addr, &ptl);
for (; ad... | 0 | [
"CWE-20",
"CWE-476",
"CWE-416"
] | linux | 76597cd31470fa130784c78fadb4dab2e624a723 | 219,998,532,698,241,150,000,000,000,000,000,000,000 | 28 | proc: fix oops on invalid /proc/<pid>/maps access
When m_start returns an error, the seq_file logic will still call m_stop
with that error entry, so we'd better make sure that we check it before
using it as a vma.
Introduced by commit ec6fd8a4355c ("report errors in /proc/*/*map*
sanely"), which replaced NULL with va... |
void test_checkout_nasty__dot_git_colon(void)
{
#ifdef GIT_WIN32
test_checkout_fails("refs/heads/dot_git_colon", ".git/foobar");
#endif
} | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 3f7851eadca36a99627ad78cbe56a40d3776ed01 | 206,038,885,426,975,550,000,000,000,000,000,000,000 | 6 | Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS
A little-known feature of NTFS is that it offers to store metadata in
so-called "Alternate Data Streams" (inspired by Apple's "resource
forks") that are copied together with the file they are associated with.
These Alternate Data Streams can be accessed ... |
static int snd_xonar_u1_switch_update(struct usb_mixer_interface *mixer,
unsigned char status)
{
struct snd_usb_audio *chip = mixer->chip;
int err;
err = snd_usb_lock_shutdown(chip);
if (err < 0)
return err;
err = snd_usb_ctl_msg(chip->dev,
usb_sndctrlpipe(chip->dev, 0), 0x08,
USB_DI... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 274,154,249,283,791,200,000,000,000,000,000,000,000 | 16 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
void set_url(JSObject *obj, Value url) {
MOZ_ASSERT(is_instance(obj));
MOZ_ASSERT(url.isString());
JS::SetReservedSlot(obj, Slots::URL, url);
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 45,774,271,023,689,990,000,000,000,000,000,000,000 | 5 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
_outHash(StringInfo str, const Hash *node)
{
WRITE_NODE_TYPE("HASH");
_outPlanInfo(str, (const Plan *) node);
WRITE_OID_FIELD(skewTable);
WRITE_INT_FIELD(skewColumn);
WRITE_BOOL_FIELD(skewInherit);
WRITE_OID_FIELD(skewColType);
WRITE_INT_FIELD(skewColTypmod);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 13,324,654,127,072,164,000,000,000,000,000,000,000 | 12 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static void gf_dump_vrml_dyn_field(GF_SceneDumper *sdump, GF_Node *node, GF_FieldInfo field, Bool has_sublist)
{
u32 i, sf_type;
void *slot_ptr;
if (gf_sg_vrml_is_sf_field(field.fieldType)) {
DUMP_IND(sdump);
if (sdump->XMLDump) {
if (sdump->X3DDump) {
gf_fprintf(sdump->trace, "<field name=\"%s\" type=\"... | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 238,822,381,404,298,950,000,000,000,000,000,000,000 | 145 | fixed #2232 |
int perf_pmu_register(struct pmu *pmu, const char *name, int type)
{
int cpu, ret, max = PERF_TYPE_MAX;
mutex_lock(&pmus_lock);
ret = -ENOMEM;
pmu->pmu_disable_count = alloc_percpu(int);
if (!pmu->pmu_disable_count)
goto unlock;
pmu->type = -1;
if (!name)
goto skip_type;
pmu->name = name;
if (type != PE... | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 265,229,600,228,401,400,000,000,000,000,000,000,000 | 134 | 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... |
void setup_sysctl_set(struct ctl_table_set *set,
struct ctl_table_root *root,
int (*is_seen)(struct ctl_table_set *))
{
memset(set, 0, sizeof(*set));
set->is_seen = is_seen;
init_header(&set->dir.header, root, set, NULL, root_table);
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 164,512,260,974,457,800,000,000,000,000,000,000,000 | 8 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
static int em_in(struct x86_emulate_ctxt *ctxt)
{
if (!pio_in_emulated(ctxt, ctxt->dst.bytes, ctxt->src.val,
&ctxt->dst.val))
return X86EMUL_IO_NEEDED;
return X86EMUL_CONTINUE;
} | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 219,524,281,988,608,940,000,000,000,000,000,000,000 | 8 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
void Field_long::sort_string(uchar *to,uint length __attribute__((unused)))
{
if (unsigned_flag)
to[0] = ptr[3];
else
to[0] = (char) (ptr[3] ^ 128); /* Revers signbit */
to[1] = ptr[2];
to[2] = ptr[1];
to[3] = ptr[0];
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 217,354,818,416,285,800,000,000,000,000,000,000,000 | 10 | 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... |
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);
const Tensor& filter = context->input(1);
const Tensor& out_backprop = context->input(2);
// Determine relevant sizes from input and filters.
int stride_rows = 0, stride_cols = 0;
int rate_rows = 0, rat... | 0 | [
"CWE-787"
] | tensorflow | 3f6fe4dfef6f57e768260b48166c27d148f3015f | 134,467,430,651,826,320,000,000,000,000,000,000,000 | 43 | Add missing validations in dillation ops.
PiperOrigin-RevId: 372037158
Change-Id: I4ee304c84a02550c030288a6534000b934fc1599 |
TRIO_PUBLIC int trio_snprintfv TRIO_ARGS4((buffer, max, format, args), char* buffer, size_t max,
TRIO_CONST char* format, trio_pointer_t* args)
{
static va_list unused;
int status;
assert(VALID(buffer) || (max == 0));
assert(VALID(format));
status = TrioFormat(&buffer, m... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 176,998,982,318,636,830,000,000,000,000,000,000,000 | 15 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int sock_read_ready(SSL *ssl, uint32_t ms)
{
int r = 0;
fd_set fds;
struct timeval tv;
FD_ZERO(&fds);
FD_SET(SSL_get_fd(ssl), &fds);
tv.tv_sec = ms / 1000;
tv.tv_usec = (ms % 1000) * 1000;
r = select (SSL_get_fd(ssl) + 1, &fds, NULL, NULL, &tv);
return r;
} | 0 | [
"CWE-476"
] | libvncserver | 33441d90a506d5f3ae9388f2752901227e430553 | 232,893,819,891,786,250,000,000,000,000,000,000,000 | 17 | libvncclient/tls_openssl: do not deref a NULL pointer
Happens in anonTLS mode where cred is NULL.
re #347 |
//! Blur image using Van Vliet recursive Gaussian filter. \newinstance.
CImg<Tfloat> get_vanvliet(const float sigma, const unsigned int order, const char axis='x',
const bool boundary_conditions=true) const {
return CImg<Tfloat>(*this,false).vanvliet(sigma,order,axis,boundary... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 78,658,888,638,957,160,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
PJ_DEF(pj_status_t) pjsip_auth_srv_challenge( pjsip_auth_srv *auth_srv,
const pj_str_t *qop,
const pj_str_t *nonce,
const pj_str_t *opaque,
pj_bool_t stale,
pjsip_tx_data *tdata)
{
pjsip_www_authenticate_hdr *hdr;
char nonce_buf[16];
pj_str_t rand... | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | d27f79da11df7bc8bb56c2f291d71e54df8d2c47 | 92,326,772,760,647,300,000,000,000,000,000,000,000 | 51 | Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009)
* Use PJ_ASSERT_RETURN on pjsip_auth_create_digest
* Use PJ_ASSERT_RETURN on pjsua_init_tpselector()
* Fix incorrect check.
* Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256()
* Modifi... |
static inline void f2fs_i_xnid_write(struct inode *inode, nid_t xnid)
{
F2FS_I(inode)->i_xattr_nid = xnid;
f2fs_mark_inode_dirty_sync(inode, true);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 234,519,511,342,537,180,000,000,000,000,000,000,000 | 5 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
krb5_ldap_delete_password_policy(krb5_context context, char *policy)
{
int mask = 0;
char *policy_dn = NULL, *class[] = {"krbpwdpolicy", NULL};
krb5_error_code st=0;
LDAP *ld=NULL;
kdb5_dal_handle *dal_hand... | 0 | [
"CWE-476"
] | krb5 | d1f707024f1d0af6e54a18885322d70fa15ec4d3 | 144,796,657,750,446,400,000,000,000,000,000,000,000 | 44 | Fix LDAP misused policy name crash [CVE-2014-5353]
In krb5_ldap_get_password_policy_from_dn, if LDAP_SEARCH returns
successfully with no results, return KRB5_KDB_NOENTRY instead of
returning success with a zeroed-out policy object. This fixes a null
dereference when an admin attempts to use an LDAP ticket policy name... |
bool st_select_lex::add_window_spec(THD *thd,
LEX_STRING *win_ref,
SQL_I_List<ORDER> win_partition_list,
SQL_I_List<ORDER> win_order_list,
Window_frame *win_frame)
{
SQL_I_L... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 101,893,484,466,676,000,000,000,000,000,000,000,000 | 27 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
isofs_hashi(const struct dentry *dentry, struct qstr *qstr)
{
return isofs_hashi_common(qstr, 0);
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 | 24,986,030,222,594,450,000,000,000,000,000,000,000 | 4 | isofs: Fix unbounded recursion when processing relocated directories
We did not check relocated directory in any way when processing Rock
Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL
entry pointing to another CL entry leading to possibly unbounded
recursion in kernel code and thus stack overflow... |
int unit_set_exec_params(Unit *u, ExecParameters *p) {
int r;
assert(u);
assert(p);
/* Copy parameters from manager */
r = manager_get_effective_environment(u->manager, &p->environment);
if (r < 0)
return r;
p->confirm_spawn = manager_get_confir... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 131,226,644,069,670,470,000,000,000,000,000,000,000 | 22 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
static int _display_module_info_def(zend_module_entry *module TSRMLS_DC) /* {{{ */
{
if (!module->info_func && !module->version) {
php_info_print_module(module TSRMLS_CC);
}
return ZEND_HASH_APPLY_KEEP; | 0 | [
"CWE-200"
] | php-src | 3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9 | 60,167,223,039,099,600,000,000,000,000,000,000,000 | 7 | Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability |
iperf_on_test_start(struct iperf_test *test)
{
if (test->json_output) {
cJSON_AddItemToObject(test->json_start, "test_start", iperf_json_printf("protocol: %s num_streams: %d blksize: %d omit: %d duration: %d bytes: %d blocks: %d reverse: %d", test->protocol->name, (int64_t) test->num_streams, (int64_t) test... | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 23,514,763,740,410,262,000,000,000,000,000,000,000 | 15 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
virtual int prepare(List<Item> &list, SELECT_LEX_UNIT *u)
{
unit= u;
return 0;
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 112,436,736,038,081,490,000,000,000,000,000,000,000 | 5 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
GF_Err stco_Read(GF_Box *s, GF_BitStream *bs)
{
u32 entries;
GF_ChunkOffsetBox *ptr = (GF_ChunkOffsetBox *)s;
ptr->nb_entries = gf_bs_read_u32(bs);
ISOM_DECREASE_SIZE(ptr, 4);
if (ptr->nb_entries > ptr->size / 4) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("[iso file] Invalid number of entries %d in stco\n", ptr-... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 268,249,093,681,243,040,000,000,000,000,000,000,000 | 23 | prevent dref memleak on invalid input (#1183) |
static void ath_send_bar(struct ath_atx_tid *tid, u16 seqno)
{
if (!tid->an->sta)
return;
ieee80211_send_bar(tid->an->vif, tid->an->sta->addr, tid->tidno,
seqno << IEEE80211_SEQ_SEQ_SHIFT);
} | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 243,178,347,074,707,400,000,000,000,000,000,000,000 | 8 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
static int do_ssl_write(SSL *s, const unsigned char *buf, unsigned int len)
{
unsigned int j,k,olen,p,mac_size,bs;
register unsigned char *pp;
olen=len;
/* first check if there is data from an encryption waiting to
* be sent - it must be sent because the other end is waiting.
* This will happen with non-bloc... | 0 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 275,481,508,952,335,200,000,000,000,000,000,000,000 | 135 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
static int kvm_set_memslot(struct kvm *kvm,
struct kvm_memory_slot *old,
struct kvm_memory_slot *new,
enum kvm_mr_change change)
{
struct kvm_memory_slot *invalid_slot;
int r;
/*
* Released in kvm_swap_active_memslots.
*
* Must be held from before the current memslots are copied until
* a... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 138,117,968,614,893,400,000,000,000,000,000,000,000 | 94 | 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... |
get_options(int *argc,char ***argv)
{
int ho_error;
char *tmp_string;
MY_STAT sbuf; /* Stat information for the data file */
DBUG_ENTER("get_options");
if ((ho_error= handle_options(argc, argv, my_long_options, get_one_option)))
exit(ho_error);
if (debug_info_flag)
my_end_arg= MY_CHECK_ERROR | MY_... | 1 | [] | mysql-server | 044e3b1d07c0854c39178d3054ab0cd0a3188436 | 315,289,872,701,316,600,000,000,000,000,000,000,000 | 345 | Bug #20605441 : BUFFER OVERFLOW IN MYSQLSLAP
Description:- mysqlslap is a diagnostic utility designed to
emulate client load for a MySQL server and to report the
timing of each stage. This utility crashes when invalid
values are passed to the options 'num_int_cols_opt' or
'num_chars_cols_opt' or 'engine'.
Analysis:- ... |
static void SEQ_printf(struct seq_file *m, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
if (m)
seq_vprintf(m, fmt, args);
else
vprintk(fmt, args);
va_end(args);
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 337,791,588,112,437,800,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... |
reg_getline(linenr_T lnum)
{
// when looking behind for a match/no-match lnum is negative. But we
// can't go before line 1
if (rex.reg_firstlnum + lnum < 1)
return NULL;
if (lnum > rex.reg_maxline)
// Must have matched the "\n" in the last line.
return (char_u *)"";
return ml_get_buf(rex.reg_bu... | 0 | [
"CWE-416"
] | vim | 4c13e5e6763c6eb36a343a2b8235ea227202e952 | 194,832,630,372,395,520,000,000,000,000,000,000,000 | 11 | patch 8.2.3949: using freed memory with /\%V
Problem: Using freed memory with /\%V.
Solution: Get the line again after getvvcol(). |
static int i740fb_open(struct fb_info *info, int user)
{
struct i740fb_par *par = info->par;
mutex_lock(&(par->open_lock));
par->ref_count++;
mutex_unlock(&(par->open_lock));
return 0;
} | 0 | [
"CWE-369"
] | linux-fbdev | 15cf0b82271b1823fb02ab8c377badba614d95d5 | 181,117,079,048,101,100,000,000,000,000,000,000,000 | 10 | video: fbdev: i740fb: Error out if 'pixclock' equals zero
The userspace program could pass any values to the driver through
ioctl() interface. If the driver doesn't check the value of 'pixclock',
it may cause divide error.
Fix this by checking whether 'pixclock' is zero in the function
i740fb_check_var().
The follow... |
static void init_trace_flags_index(struct trace_array *tr)
{
int i;
/* Used by the trace options files */
for (i = 0; i < TRACE_FLAGS_MAX_SIZE; i++)
tr->trace_flags_index[i] = i;
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 296,587,036,644,950,200,000,000,000,000,000,000,000 | 8 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static inline void add_echo_byte(unsigned char c, struct n_tty_data *ldata)
{
*echo_buf_addr(ldata, ldata->echo_head++) = c;
} | 0 | [
"CWE-362"
] | tty | 4291086b1f081b869c6d79e5b7441633dc3ace00 | 180,324,512,985,038,870,000,000,000,000,000,000,000 | 4 | n_tty: Fix n_tty_write crash when echoing in raw mode
The tty atomic_write_lock does not provide an exclusion guarantee for
the tty driver if the termios settings are LECHO & !OPOST. And since
it is unexpected and not allowed to call TTY buffer helpers like
tty_insert_flip_string concurrently, this may lead to crashe... |
f_setcmdpos(typval_T *argvars, typval_T *rettv)
{
int pos;
if (in_vim9script() && check_for_number_arg(argvars, 0) == FAIL)
return;
pos = (int)tv_get_number(&argvars[0]) - 1;
if (pos >= 0)
rettv->vval.v_number = set_cmdline_pos(pos);
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | 85b6747abc15a7a81086db31289cf1b8b17e6cb1 | 132,900,319,651,070,130,000,000,000,000,000,000,000 | 11 | patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode
Problem: Illegal memory access with large 'tabstop' in Ex mode.
Solution: Allocate enough memory. |
void DoFFT(OpKernelContext* ctx, const Tensor& in, uint64* fft_shape,
Tensor* out) override {
auto* stream = ctx->op_device_context()->stream();
OP_REQUIRES(ctx, stream, errors::Internal("No GPU stream available."));
const TensorShape& input_shape = in.shape();
const TensorShape& output_... | 0 | [
"CWE-617",
"CWE-703"
] | tensorflow | 31bd5026304677faa8a0b77602c6154171b9aec1 | 28,743,419,216,521,067,000,000,000,000,000,000,000 | 90 | Prevent check fail in FFT
PiperOrigin-RevId: 372031044
Change-Id: I50994e3e8a5d1342d01bde80256f6bf2730ca299 |
void ff_jpeg2000_cleanup(Jpeg2000Component *comp, Jpeg2000CodingStyle *codsty)
{
int reslevelno, bandno, precno;
for (reslevelno = 0;
comp->reslevel && reslevelno < codsty->nreslevels;
reslevelno++) {
Jpeg2000ResLevel *reslevel = comp->reslevel + reslevelno;
for (bandno = 0; b... | 0 | [
"CWE-703"
] | FFmpeg | 912ce9dd2080c5837285a471d750fa311e09b555 | 257,693,140,530,429,600,000,000,000,000,000,000,000 | 29 | jpeg2000: fix dereferencing invalid pointers
Found-by: Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
void mlx5_fpga_conn_device_cleanup(struct mlx5_fpga_device *fdev)
{
mlx5_core_destroy_mkey(fdev->mdev, &fdev->conn_res.mkey);
mlx5_core_dealloc_pd(fdev->mdev, fdev->conn_res.pdn);
mlx5_put_uars_page(fdev->mdev, fdev->conn_res.uar);
mlx5_nic_vport_disable_roce(fdev->mdev);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | c8c2a057fdc7de1cd16f4baa51425b932a42eb39 | 310,955,379,354,613,700,000,000,000,000,000,000,000 | 7 | net/mlx5: prevent memory leak in mlx5_fpga_conn_create_cq
In mlx5_fpga_conn_create_cq if mlx5_vector2eqn fails the allocated
memory should be released.
Fixes: 537a50574175 ("net/mlx5: FPGA, Add high-speed connection routines")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Saeed Mahameed <s... |
e_mail_part_get_converted_to_utf8 (EMailPart *part)
{
g_return_val_if_fail (E_IS_MAIL_PART (part), FALSE);
return part->priv->converted_to_utf8;
} | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 217,946,953,998,837,150,000,000,000,000,000,000,000 | 6 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
static int ntop_generate_csrf_value(lua_State* vm) {
char random_a[32], random_b[32], csrf[33];
Redis *redis = ntop->getRedis();
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
#ifdef __OpenBSD__
snprintf(random_a, sizeof(random_a), "%d", arc4random());
snprintf(random_b, sizeof(rando... | 1 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 216,745,588,025,664,880,000,000,000,000,000,000,000 | 20 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
static bool i915_gem_check_execbuffer(struct drm_i915_gem_execbuffer2 *exec)
{
if (exec->flags & __I915_EXEC_ILLEGAL_FLAGS)
return false;
/* Kernel clipping was a DRI1 misfeature */
if (!(exec->flags & I915_EXEC_FENCE_ARRAY)) {
if (exec->num_cliprects || exec->cliprects_ptr)
return false;
}
if (exec->DR4 ... | 0 | [
"CWE-20"
] | linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | 48,341,770,713,680,410,000,000,000,000,000,000,000 | 23 | make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being i... |
static ossl_inline void put_digit52(uint8_t *pStr, int strLen, uint64_t digit)
{
assert(pStr != NULL);
for (; strLen > 0; strLen--) {
*pStr++ = (uint8_t)(digit & 0xFF);
digit >>= 8;
}
} | 0 | [
"CWE-787"
] | openssl | a1f7034bbd8f0730d360211f5ba0feeaef0b7b2c | 152,273,625,700,109,930,000,000,000,000,000,000,000 | 9 | rsa: fix bn_reduce_once_in_place call for rsaz_mod_exp_avx512_x2
bn_reduce_once_in_place expects the number of BN_ULONG, but factor_size
is moduli bit size.
Fixes #18625.
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from... |
static int glob_item(Item *i, action_t action, bool recursive) {
_cleanup_globfree_ glob_t g = {
.gl_opendir = (void *(*)(const char *)) opendir_nomod,
};
int r = 0, k;
char **fn;
k = safe_glob(i->path, GLOB_NOSORT|GLOB_BRACE, &g);
if (k < 0 && k != -ENOE... | 0 | [
"CWE-59"
] | systemd | 5579f85663d10269e7ac7464be6548c99cea4ada | 16,847,089,011,378,767,000,000,000,000,000,000,000 | 25 | tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on
Let's add some extra safety.
Fixes: #7736 |
find_index_in_table (MonoDynamicImage *assembly, int table_idx, int col, guint32 token)
{
int i;
MonoDynamicTable *table;
guint32 *values;
table = &assembly->tables [table_idx];
g_assert (col < table->columns);
values = table->values + table->columns;
for (i = 1; i <= table->rows; ++i) {
if (values [col] =... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 234,753,517,820,937,800,000,000,000,000,000,000,000 | 18 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
rt6_print(netdissect_options *ndo, register const u_char *bp, const u_char *bp2 _U_)
{
register const struct ip6_rthdr *dp;
register const struct ip6_rthdr0 *dp0;
register const u_char *ep;
int i, len;
register const struct in6_addr *addr;
dp = (const struct ip6_rthdr *)bp;
len = dp->ip6r_len;
/* 'ep' points ... | 1 | [
"CWE-125"
] | tcpdump | 3c4d7c0ee30a30e5abff3d6d9586a3753101faf5 | 202,950,006,224,852,740,000,000,000,000,000,000,000 | 55 | CVE-2017-13725/IPv6 R.H.: Check for the existence of all fields before fetching them.
Don't fetch the length field from the header until after we've checked
for the existence of a field at or after that field.
(Found by code inspection, not by a capture.) |
rsvg_node_group_pack (RsvgNode * self, RsvgNode * child)
{
g_ptr_array_add (self->children, child);
child->parent = self;
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 251,611,767,648,535,830,000,000,000,000,000,000,000 | 5 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
XML_GetCurrentColumnNumber(XML_Parser parser)
{
if (parser == NULL)
return 0;
if (eventPtr && eventPtr >= positionPtr) {
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
positionPtr = eventPtr;
}
return position.columnNumber;
} | 0 | [
"CWE-611"
] | libexpat | c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f | 68,497,496,030,484,510,000,000,000,000,000,000,000 | 10 | xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) |
GF_Err moov_on_child_box(GF_Box *s, GF_Box *a)
{
GF_MovieBox *ptr = (GF_MovieBox *)s;
switch (a->type) {
case GF_ISOM_BOX_TYPE_IODS:
if (ptr->iods) ERROR_ON_DUPLICATED_BOX(a, ptr)
ptr->iods = (GF_ObjectDescriptorBox *)a;
//if no IOD, delete the box
if (!ptr->iods->descriptor) {
ptr->iods = NULL;
gf_iso... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 213,484,225,993,320,500,000,000,000,000,000,000,000 | 44 | fixed #1587 |
main (int argc, char **argv)
{
char *keys;
size_t keycc, oldcc, keyalloc;
int with_filenames;
int opt, cc, status, prepended;
int prev_optind, last_recursive;
int default_context;
FILE *fp;
exit_failure = EXIT_TROUBLE;
initialize_main (&argc, &argv);
set_program_name (argv[0]);
program_name = arg... | 1 | [
"CWE-189"
] | grep | 8fcf61523644df42e1905c81bed26838e0b04f91 | 184,846,890,490,532,230,000,000,000,000,000,000,000 | 467 | grep: fix integer-overflow issues in main program
* NEWS: Document this.
* bootstrap.conf (gnulib_modules): Add inttypes, xstrtoimax.
Remove xstrtoumax.
* src/main.c: Include <inttypes.h>, for INTMAX_MAX, PRIdMAX.
(context_length_arg, prtext, grepbuf, grep, grepfile)
(get_nondigit_option, main):
Use intmax_t, not int,... |
GooString* HtmlOutputDev::getLinkDest(AnnotLink *link){
if (!link->getAction())
return new GooString();
switch(link->getAction()->getKind())
{
case actionGoTo:
{
GooString* file = new GooString(gbasename(Docname->c_str()));
int page=1;
LinkGoTo *ha=(LinkGoTo *)link->getAction();
LinkDest... | 0 | [
"CWE-824"
] | poppler | 30c731b487190c02afff3f036736a392eb60cd9a | 128,304,846,859,624,380,000,000,000,000,000,000,000 | 118 | Properly initialize HtmlOutputDev::page to avoid SIGSEGV upon error exit.
Closes #742 |
extern int slurm_fail_job(uint32_t job_id, uint32_t job_state)
{
int error_code;
DEF_TIMERS;
/* Locks: Write job and node */
slurmctld_lock_t job_write_lock = {
NO_LOCK, WRITE_LOCK, WRITE_LOCK, NO_LOCK, NO_LOCK };
START_TIMER;
lock_slurmctld(job_write_lock);
error_code = job_fail(job_id, job_state);
unlock_s... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 159,494,551,331,547,940,000,000,000,000,000,000,000 | 16 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
static uint32_t get_requirement_by_name(const char *requirement)
{
int i;
for (i = 0; requirements_flags[i].description; i++)
if (!strcmp(requirement, requirements_flags[i].description))
return requirements_flags[i].flag;
return CRYPT_REQUIREMENT_UNKNOWN;
} | 1 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 281,369,415,984,300,100,000,000,000,000,000,000,000 | 10 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
_signal_jobstep(uint32_t jobid, uint32_t stepid, uid_t req_uid,
uint32_t signal)
{
int fd, rc = SLURM_SUCCESS;
uid_t uid;
uint16_t protocol_version;
/* There will be no stepd if the prolog is still running
* Return failure so caller can retry.
*/
if (_prolog_is_running (jobid)) {
info ("s... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 99,510,379,075,068,830,000,000,000,000,000,000,000 | 46 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
global_State *g = G(L);
l_uint32 oldnCcalls = g->Cstacklimit - (L->nCcalls + L->nci);
struct lua_longjmp lj;
lj.status = LUA_OK;
lj.previous = L->errorJmp; /* chain new error handler */
L->errorJmp = &lj;
LUAI_TRY(L, &lj,
(*f)(L, ud);
);
... | 0 | [
"CWE-416",
"CWE-125",
"CWE-787"
] | lua | 6298903e35217ab69c279056f925fb72900ce0b7 | 277,711,838,749,480,800,000,000,000,000,000,000,000 | 14 | Keep minimum size when shrinking a stack
When shrinking a stack (during GC), do not make it smaller than the
initial stack size. |
void TTF_GetHarfBuzzVersion(int *major, int *minor, int *patch)
{
unsigned int hb_major = 0;
unsigned int hb_minor = 0;
unsigned int hb_micro = 0;
#if TTF_USE_HARFBUZZ
hb_version(&hb_major, &hb_minor, &hb_micro);
#endif
if (major) {
*major = (int)hb_major;
}
if (minor) {
*m... | 0 | [
"CWE-190",
"CWE-787"
] | SDL_ttf | db1b41ab8bde6723c24b866e466cad78c2fa0448 | 261,036,914,719,027,850,000,000,000,000,000,000,000 | 19 | More integer overflow (see bug #187)
Make sure that 'width + alignment' doesn't overflow, otherwise
it could create a SDL_Surface of 'width' but with wrong 'pitch' |
static void pb_release_single_field(const pb_field_iter_t *iter)
{
pb_type_t type;
type = iter->pos->type;
if (PB_HTYPE(type) == PB_HTYPE_ONEOF)
{
if (*(pb_size_t*)iter->pSize != iter->pos->tag)
return; /* This is not the current field in the union */
}
/* Release anything ... | 0 | [
"CWE-20",
"CWE-119"
] | nanopb | 4fe23595732b6f1254cfc11a9b8d6da900b55b0c | 189,444,846,113,522,670,000,000,000,000,000,000,000 | 90 | Fix memory leak with oneofs and PB_ENABLE_MALLOC (#615)
Nanopb would leak memory when all of the following conditions were true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definitions contains an oneof field,
the oneof contains a static submessage, and
the static submessage contains a pointer fiel... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.