func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static char* get_cwd(pid_t pid)
{
char buf[sizeof("/proc/%lu/cwd") + sizeof(long)*3];
sprintf(buf, "/proc/%lu/cwd", (long)pid);
return malloc_readlink(buf);
} | 0 | [
"CWE-59"
] | abrt | 80408e9e24a1c10f85fd969e1853e0f192157f92 | 65,674,455,825,041,210,000,000,000,000,000,000,000 | 6 | ccpp: fix symlink race conditions
Fix copy & chown race conditions
Related: #1211835
Signed-off-by: Jakub Filak <jfilak@redhat.com> |
static DH *get_dh1024dsa()
{
static unsigned char dh1024_p[]={
0xC8,0x00,0xF7,0x08,0x07,0x89,0x4D,0x90,0x53,0xF3,0xD5,0x00,
0x21,0x1B,0xF7,0x31,0xA6,0xA2,0xDA,0x23,0x9A,0xC7,0x87,0x19,
0x3B,0x47,0xB6,0x8C,0x04,0x6F,0xFF,0xC6,0x9B,0xB8,0x65,0xD2,
0xC2,0x5F,0x31,0x83,0x4A,0xA7,0x5F,0x2F,0x88,0x38,0xB6,0x55,
0... | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 175,350,961,933,628,620,000,000,000,000,000,000,000 | 38 | Add SRP support. |
ebb_ews_check_gal_changes (EBookBackendEws *bbews,
EBookCache *book_cache,
const gchar *filename,
GSList **out_created_objects, /*EBookMetaBackendInfo * */
GSList **out_modified_objects, /*EBookMetaBackendInfo * */
GSList **out_removed_objects, /*EBookMetaBackendInfo * */
GCancellabl... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 268,638,559,280,122,900,000,000,000,000,000,000,000 | 80 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x)
{
return(add_client_CA(&(ctx->client_CA),x));
} | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 274,440,635,433,470,840,000,000,000,000,000,000,000 | 4 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
absl::optional<absl::string_view> upstreamInterfaceName() const override {
return upstream_connection_interface_name_;
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 91,686,261,459,063,340,000,000,000,000,000,000,000 | 3 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static void tun_flow_uninit(struct tun_struct *tun)
{
del_timer_sync(&tun->flow_gc_timer);
tun_flow_flush(tun);
} | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 109,702,164,063,076,050,000,000,000,000,000,000,000 | 5 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
bool Hub::listen(int port, uS::TLS::Context sslContext, int options, Group<SERVER> *eh) {
if (!eh) {
eh = (Group<SERVER> *) this;
}
if (uS::Node::listen<onServerAccept>(port, sslContext, options, (uS::NodeData *) eh, nullptr)) {
eh->errorHandler(port);
return false;
}
return... | 0 | [
"CWE-20"
] | uWebSockets | 37deefd01f0875e133ea967122e3a5e421b8fcd9 | 236,740,236,838,192,300,000,000,000,000,000,000,000 | 11 | Don't inflate more than ~16mb, drop connection on inflate error |
StoreContext(DcmQueryRetrieveIndexDatabaseHandle *handle, DIC_US aStatus, const char *fname, DcmFileFormat *ff, OFBool correctUID)
: dbHandle(handle)
, status(aStatus)
, fileName(fname)
, dcmff(ff)
, opt_correctUIDPadding(correctUID)
{} | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 127,655,068,008,866,530,000,000,000,000,000,000,000 | 7 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
_dbus_read_socket_with_unix_fds (DBusSocket fd,
DBusString *buffer,
int count,
int *fds,
unsigned int *n_fds) {
#ifndef HAVE_UNIX_FD_PASSING
i... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 237,240,543,395,540,960,000,000,000,000,000,000,000 | 166 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
gboolean session_info_session_is_locked(G_GNUC_UNUSED struct session_info *si)
{
return FALSE;
} | 0 | [
"CWE-362"
] | spice-vd_agent | 5c50131797e985d0a5654c1fd7000ae945ed29a7 | 95,223,711,642,371,730,000,000,000,000,000,000,000 | 4 | Better check for sessions
Do not allow other users to hijack a session checking that
the process is launched by the owner of the session.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com> |
static char **convertToSds(int count, char** args) {
int j;
char **sds = zmalloc(sizeof(char*)*count);
for(j = 0; j < count; j++)
sds[j] = sdsnew(args[j]);
return sds;
} | 0 | [
"CWE-119",
"CWE-787"
] | redis | 9fdcc15962f9ff4baebe6fdd947816f43f730d50 | 119,898,263,844,665,270,000,000,000,000,000,000,000 | 9 | Security: fix redis-cli buffer overflow.
Thanks to Fakhri Zulkifli for reporting it.
The fix switched to dynamic allocation, copying the final prompt in the
static buffer only at the end. |
static int movw_pcdisp_reg(RAnal* anal, RAnalOp* op, ut16 code){
op->type = R_ANAL_OP_TYPE_LOAD;
op->dst = anal_fill_ai_rg (anal, GET_TARGET_REG(code));
//op->src[0] = anal_fill_reg_disp_mem(anal,PC_IDX,code&0xFF,WORD_SIZE); //XXX trash in 2 commits
op->src[0] = anal_pcrel_disp_mov (anal, op, code&0xFF, WORD_SIZE);... | 0 | [
"CWE-125"
] | radare2 | 77c47cf873dd55b396da60baa2ca83bbd39e4add | 224,437,132,245,878,400,000,000,000,000,000,000,000 | 7 | Fix #9903 - oobread in RAnal.sh |
set_if_not (name, value)
char *name, *value;
{
SHELL_VAR *v;
if (shell_variables == 0)
create_variable_tables ();
v = find_variable (name);
if (v == 0)
v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH, 0);
return (v);
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 141,590,963,802,160,720,000,000,000,000,000,000,000 | 13 | commit bash-20120224 snapshot |
PackLinuxElf64::~PackLinuxElf64()
{
} | 0 | [
"CWE-476",
"CWE-415"
] | upx | 90279abdfcd235172eab99651043051188938dcc | 98,263,194,986,055,550,000,000,000,000,000,000,000 | 3 | PackLinuxElf::canUnpack must checkEhdr() for ELF input
https://github.com/upx/upx/issues/485
modified: p_lx_elf.cpp |
static void i40e_get_oem_version(struct i40e_hw *hw)
{
u16 block_offset = 0xffff;
u16 block_length = 0;
u16 capabilities = 0;
u16 gen_snap = 0;
u16 release = 0;
#define I40E_SR_NVM_OEM_VERSION_PTR 0x1B
#define I40E_NVM_OEM_LENGTH_OFFSET 0x00
#define I40E_NVM_OEM_CAPABILITIES_OFFSET 0x01
#define I40E_NVM_OEM_GEN... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 168,024,359,618,582,770,000,000,000,000,000,000,000 | 40 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
static rfbBool SendCompressedData(rfbClientPtr cl,
int compressedLen)
{
int i, portionLen;
cl->updateBuf[cl->ublen++] = compressedLen & 0x7F;
rfbStatRecordEncodingSentAdd(cl, rfbEncodingTight, 1);
if (compressedLen > 0x7F) {
cl->updateBuf[cl->ublen-1] |= 0x80;
... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 51,793,176,240,510,800,000,000,000,000,000,000,000 | 34 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
inline SegmentBuilder::SegmentBuilder(
BuilderArena* arena, SegmentId id, kj::ArrayPtr<const word> ptr, ReadLimiter* readLimiter)
: SegmentReader(arena, id, ptr, readLimiter),
// const_cast is safe here because the member won't ever be dereferenced because it appears
// to point to the end of the se... | 0 | [
"CWE-400",
"CWE-703"
] | capnproto | 104870608fde3c698483fdef6b97f093fc15685d | 198,841,833,276,395,600,000,000,000,000,000,000,000 | 7 | SECURITY: CPU usage amplification attack.
Details: https://github.com/sandstorm-io/capnproto/tree/master/security-advisories/2014-03-02-0-all-cpu-amplification.md |
void Monitor::_quorum_status(Formatter *f, ostream& ss)
{
bool free_formatter = false;
if (!f) {
// louzy/lazy hack: default to json if no formatter has been defined
f = new JSONFormatter();
free_formatter = true;
}
f->open_object_section("quorum_status");
f->dump_int("election_epoch", get_epoch(... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 203,571,271,395,638,250,000,000,000,000,000,000,000 | 34 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static u32 AC3_FindSyncCode(u8 *buf, u32 buflen)
{
u32 end = buflen - 6;
u32 offset = 0;
while (offset <= end) {
if (buf[offset] == 0x0b && buf[offset + 1] == 0x77) {
return offset;
}
offset++;
}
return buflen;
} | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 96,620,085,215,525,020,000,000,000,000,000,000,000 | 12 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
TEST_F(QueryPlannerTest, ElemMatchObjectNegationEqArray) {
addIndex(BSON("i.j" << 1));
runQuery(fromjson("{i: {$elemMatch: {j: {$ne: [1]}}}}"));
assertHasOnlyCollscan();
} | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 300,827,346,379,378,330,000,000,000,000,000,000,000 | 5 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
NOEXPORT int matches_wildcard(const char *servername, const char *pattern) {
if(!servername || !pattern)
return 0;
if(*pattern=='*') { /* wildcard comparison */
ssize_t diff=(ssize_t)strlen(servername)-((ssize_t)strlen(pattern)-1);
if(diff<0) /* pattern longer than servername */
... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 139,484,422,667,251,350,000,000,000,000,000,000,000 | 12 | stunnel-5.57 |
QInt32(const int32_t v) : value(v) {} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 33,548,482,934,955,796,000,000,000,000,000,000,000 | 1 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12)
{
struct kvm_segment seg;
unsigned long entry_failure_code;
if (vmcs12->vm_exit_controls & VM_EXIT_LOAD_IA32_EFER)
vcpu->arch.efer = vmcs12->host_ia32_efer;
else if (vmcs12->vm_exit_controls & VM_EXIT_HOST_ADDR_SPACE_SIZE)
... | 0 | [
"CWE-388"
] | linux | ef85b67385436ddc1998f45f1d6a210f935b3388 | 256,410,172,504,975,650,000,000,000,000,000,000,000 | 136 | 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... |
void kvm_set_or_clear_apicv_inhibit(struct kvm *kvm,
enum kvm_apicv_inhibit reason, bool set)
{
if (!enable_apicv)
return;
down_write(&kvm->arch.apicv_update_lock);
__kvm_set_or_clear_apicv_inhibit(kvm, reason, set);
up_write(&kvm->arch.apicv_update_lock);
} | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 298,771,028,916,729,430,000,000,000,000,000,000,000 | 10 | 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... |
int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len)
{
int copied = 0;
while (len > 0) {
char buf[128];
int this_len, retval;
this_len = (len > sizeof(buf)) ? sizeof(buf) : len;
if (copy_from_user(buf, src, this_len))
return -EFAULT;
retval = ptrace_access_vm(tsk,... | 0 | [
"CWE-264",
"CWE-269"
] | linux | 6994eefb0053799d2e07cd140df6c2ea106c41ee | 8,116,996,096,737,109,000,000,000,000,000,000,000 | 25 | ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME
Fix two issues:
When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU
reference to the parent's objective credentials, then give that pointer
to get_cred(). However, the object lifetime rules for things like
struct cred do not permit unconditionally ... |
oldgnu_store_sparse_info (struct tar_sparse_file *file, size_t *pindex,
struct sparse *sp, size_t sparse_size)
{
for (; *pindex < file->stat_info->sparse_map_avail
&& sparse_size > 0; sparse_size--, sp++, ++*pindex)
{
OFF_TO_CHARS (file->stat_info->sparse_map[*pindex].offset,
sp->offset);
... | 0 | [] | tar | c15c42ccd1e2377945fd0414eca1a49294bff454 | 272,205,270,054,766,030,000,000,000,000,000,000,000 | 12 | Fix CVE-2018-20482
* NEWS: Update.
* src/sparse.c (sparse_dump_region): Handle short read condition.
(sparse_extract_region,check_data_region): Fix dumped_size calculation.
Handle short read condition.
(pax_decode_header): Fix dumped_size calculation.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likew... |
imapx_untagged_quotaroot (CamelIMAPXServer *is,
GInputStream *input_stream,
GCancellable *cancellable,
GError **error)
{
CamelIMAPXStore *imapx_store;
CamelIMAPXMailbox *mailbox;
gchar *mailbox_name = NULL;
gchar **quota_roots = NULL;
gb... | 0 | [] | evolution-data-server | f26a6f672096790d0bbd76903db4c9a2e44f116b | 331,274,629,416,898,400,000,000,000,000,000,000,000 | 42 | [IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failur... |
int seccomp_load_syscall_filter_set_raw(uint32_t default_action, Hashmap* set, uint32_t action, bool log_missing) {
uint32_t arch;
int r;
/* Similar to seccomp_load_syscall_filter_set(), but takes a raw Set* of syscalls, instead of a
* SyscallFilterSet* table. */
if (hashmap_i... | 0 | [
"CWE-269"
] | systemd | 3c27973b13724ede05a06a5d346a569794cda433 | 23,371,962,047,243,150,000,000,000,000,000,000,000 | 54 | seccomp: introduce seccomp_restrict_suid_sgid() for blocking chmod() for suid/sgid files |
service_info *FindServiceControlURLPath(
service_table *table, const char *controlURLPath)
{
service_info *finger = NULL;
uri_type parsed_url;
uri_type parsed_url_in;
if (table && parse_uri(controlURLPath,
strlen(controlURLPath),
&parsed_url_in) == HTTP_SUCCESS) {
finger = table->serviceList;
... | 1 | [
"CWE-476"
] | pupnp | c805c1de1141cb22f74c0d94dd5664bda37398e0 | 143,022,199,409,412,150,000,000,000,000,000,000,000 | 28 | Fixes #177: NULL pointer dereference in FindServiceControlURLPath
Also fixes its dual bug in FindServiceEventURLPath. |
FOR_EACH_MODULE_Type(std::pair<CUser*, CIRCNetwork*> arg) : CMuser(arg.first ? arg.first->GetModules() : CMtemp), CMnet(arg.second ? arg.second->GetModules() : CMtemp) {
where = AtGlobal;
} | 0 | [
"CWE-703"
] | znc | 2bd410ee5570cea127233f1133ea22f25174eb28 | 278,291,665,550,709,950,000,000,000,000,000,000,000 | 3 | Fix NULL pointer dereference in webadmin.
Triggerable by any non-admin, if webadmin is loaded.
The only affected version is 1.0
Thanks to ChauffeR (Simone Esposito) for reporting this. |
int qeth_get_elements_no(struct qeth_card *card,
struct sk_buff *skb, int elems)
{
int dlen = skb->len - skb->data_len;
int elements_needed = PFN_UP((unsigned long)skb->data + dlen - 1) -
PFN_DOWN((unsigned long)skb->data);
elements_needed += qeth_get_elements_for_frags(skb);
if ((elements_needed + elems... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 323,749,385,757,481,230,000,000,000,000,000,000,000 | 17 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static int ieee802154_dev_ioctl(struct sock *sk, struct ifreq __user *arg,
unsigned int cmd)
{
struct ifreq ifr;
int ret = -ENOIOCTLCMD;
struct net_device *dev;
if (copy_from_user(&ifr, arg, sizeof(struct ifreq)))
return -EFAULT;
ifr.ifr_name[IFNAMSIZ-1] = 0;
dev_load(sock_net(sk), ifr.ifr_name);
dev = ... | 0 | [
"CWE-276"
] | linux | e69dbd4619e7674c1679cba49afd9dd9ac347eef | 90,119,271,426,499,880,000,000,000,000,000,000,000 | 27 | ieee802154: enforce CAP_NET_RAW for raw sockets
When creating a raw AF_IEEE802154 socket, CAP_NET_RAW needs to be
checked first.
Signed-off-by: Ori Nimron <orinimron123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Stefan Schmidt <stefan@datenfreihafen.org>
Signed-off-by: David S... |
static void shmem_show_mpol(struct seq_file *seq, struct mempolicy *mpol)
{
char buffer[64];
if (!mpol || mpol->mode == MPOL_DEFAULT)
return; /* show nothing */
mpol_to_str(buffer, sizeof(buffer), mpol, 1);
seq_printf(seq, ",mpol=%s", buffer);
} | 0 | [
"CWE-400"
] | linux-2.6 | 14fcc23fdc78e9d32372553ccf21758a9bd56fa1 | 217,599,173,948,413,230,000,000,000,000,000,000,000 | 11 | tmpfs: fix kernel BUG in shmem_delete_inode
SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814
on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage
method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages
to a tmpfs directory, incrementing i_blocks ... |
change_refs_to_tmp_fields(THD *thd, Ref_ptr_array ref_pointer_array,
List<Item> &res_selected_fields,
List<Item> &res_all_fields, uint elements,
List<Item> &all_fields)
{
List_iterator_fast<Item> it(all_fields);
Item *item, *new_item;
res_selected_fields.empty();
res_all_fields.empty();
uint i... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 266,393,014,397,409,800,000,000,000,000,000,000,000 | 29 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
u64 ring_buffer_event_time_stamp(struct ring_buffer_event *event)
{
u64 ts;
ts = event->array[0];
ts <<= TS_SHIFT;
ts += event->time_delta;
return ts;
} | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 323,306,814,903,644,100,000,000,000,000,000,000,000 | 10 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
bool Smb4KMountJob::fillArgs(Smb4KShare *share, QMap<QString, QVariant>& map)
{
// Find the mount program.
QString mount;
QStringList paths;
paths << "/bin";
paths << "/sbin";
paths << "/usr/bin";
paths << "/usr/sbin";
paths << "/usr/local/bin";
paths << "/usr/local/sbin";
for (int i = 0; i < paths... | 1 | [
"CWE-20"
] | smb4k | 71554140bdaede27b95dbe4c9b5a028a83c83cce | 248,704,124,162,091,000,000,000,000,000,000,000,000 | 178 | Find the mount/umount commands in the helper
Instead of trusting what we get passed in
CVE-2017-8849 |
static void unaccount_event_cpu(struct perf_event *event, int cpu)
{
if (event->parent)
return;
if (has_branch_stack(event)) {
if (!(event->attach_state & PERF_ATTACH_TASK))
atomic_dec(&per_cpu(perf_branch_stack_events, cpu));
}
if (is_cgroup_event(event))
atomic_dec(&per_cpu(perf_cgroup_events, cpu));
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | f63a8daa5812afef4f06c962351687e1ff9ccb2b | 115,311,180,972,994,860,000,000,000,000,000,000,000 | 12 | perf: Fix event->ctx locking
There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.
It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.
What I did fail at is sensible runtime checks on the use of
... |
static int ctrl_fill_info(struct genl_family *family, u32 portid, u32 seq,
u32 flags, struct sk_buff *skb, u8 cmd)
{
void *hdr;
hdr = genlmsg_put(skb, portid, seq, &genl_ctrl, flags, cmd);
if (hdr == NULL)
return -1;
if (nla_put_string(skb, CTRL_ATTR_FAMILY_NAME, family->name) ||
nla_put_u16(skb, CTRL... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 159,468,352,424,603,300,000,000,000,000,000,000,000 | 85 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static char *mif_getline(jas_stream_t *stream, char *buf, int bufsize)
{
int c;
char *bufptr;
assert(bufsize > 0);
bufptr = buf;
while (bufsize > 1) {
if ((c = mif_getc(stream)) == EOF) {
break;
}
*bufptr++ = c;
--bufsize;
if (c == '\n') {
break;
}
}
*bufptr = '\0';
if (!(bufptr = strchr(buf,... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 222,172,123,449,565,640,000,000,000,000,000,000,000 | 24 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
void test_nghttp2_session_on_headers_received(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
my_user_data user_data;
nghttp2_frame frame;
nghttp2_stream *stream;
nghttp2_mem *mem;
mem = nghttp2_mem_default();
memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
callbacks.... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 104,054,178,826,720,900,000,000,000,000,000,000,000 | 64 | Add nghttp2_option_set_max_outbound_ack |
get_desktop_manager_selection (GdkDisplay *display, int screen)
{
char selection_name[32];
GdkAtom selection_atom;
Window selection_owner;
GtkWidget *selection_widget;
g_snprintf (selection_name, sizeof (selection_name), "_NET_DESKTOP_MANAGER_S%d", screen);
selection_atom = gdk_atom_intern (selection_name, FALSE... | 0 | [] | nautilus | 1e1c916f5537eb5e4144950f291f4a3962fc2395 | 310,116,387,344,867,430,000,000,000,000,000,000,000 | 35 | Add "interactive" argument to nautilus_file_mark_desktop_file_trusted.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
* libnautilus-private/nautilus-mime-actions.c:
Add "interactive" ... |
static int file_map_prot_check(struct file *file, unsigned long prot, int shared)
{
const struct cred *cred = current_cred();
int rc = 0;
if (default_noexec &&
(prot & PROT_EXEC) && (!file || (!shared && (prot & PROT_WRITE)))) {
/*
* We are making executable an anonymous mapping or a
* private file map... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 234,701,623,185,193,170,000,000,000,000,000,000,000 | 34 | 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 void compute_angular_endpoints_for_quant_levels(
unsigned int weight_count,
const float* dec_weight_quant_uvalue,
const float* dec_weight_quant_sig,
unsigned int max_quant_level,
float low_value[12],
float high_value[12]
) {
unsigned int max_quant_steps = quantization_steps_for_level[max_quant_level];
a... | 0 | [
"CWE-787"
] | astc-encoder | 6ffb3058bfbcc836108c25274e955e399481e2b4 | 164,788,115,860,813,930,000,000,000,000,000,000,000 | 98 | Provide a fallback for blocks which find no valid encoding |
hwaddr memory_region_section_get_iotlb(CPUState *cpu,
MemoryRegionSection *section,
target_ulong vaddr,
hwaddr paddr, hwaddr xlat,
int prot,
... | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 331,655,874,853,896,930,000,000,000,000,000,000,000 | 39 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
msg_write (int fd, struct msg *msg)
{
u_char buf[OSPF_API_MAX_MSG_SIZE];
int l;
int wlen;
assert (msg);
assert (msg->s);
/* Length of message including header */
l = sizeof (struct apimsghdr) + ntohs (msg->hdr.msglen);
/* Make contiguous memory buffer for message */
memcpy (buf, &msg->hdr, sizeof (... | 0 | [
"CWE-119"
] | quagga | 3f872fe60463a931c5c766dbf8c36870c0023e88 | 296,109,359,326,436,870,000,000,000,000,000,000,000 | 35 | ospfd: CVE-2013-2236, stack overrun in apiserver
the OSPF API-server (exporting the LSDB and allowing announcement of
Opaque-LSAs) writes past the end of fixed on-stack buffers. This leads
to an exploitable stack overflow.
For this condition to occur, the following two conditions must be true:
- Quagga is configured... |
static int GetInteger7Bit(const byte* input, word32* inOutIdx, word32 maxIdx)
{
word32 idx = *inOutIdx;
byte b;
if ((idx + 3) > maxIdx)
return BUFFER_E;
if (GetASNTag(input, &idx, &b, maxIdx) != 0)
return ASN_PARSE_E;
if (b != ASN_INTEGER)
return ASN_PARSE_E;
if (inpu... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 336,107,019,243,501,000,000,000,000,000,000,000,000 | 19 | OCSP: improve handling of OCSP no check extension |
HandleInsertSelectable(Widget w,
XEvent *event,
String *params, /* selections */
Cardinal *num_params)
{
XtermWidget xw;
if ((xw = getXtermWidget(w)) != 0) {
TRACE_EVENT("HandleInsertSelectable", event, params, num_params);
if (*num_params == 2) {
CELL start, finish;
cha... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 21,527,737,973,240,992,000,000,000,000,000,000,000 | 29 | snapshot of project "xterm", label xterm-365d |
int page_readlink(struct dentry *dentry, char __user *buffer, int buflen)
{
struct page *page = NULL;
char *s = page_getlink(dentry, &page);
int res = vfs_readlink(dentry,buffer,buflen,s);
if (page) {
kunmap(page);
page_cache_release(page);
}
return res;
} | 0 | [
"CWE-120"
] | linux-2.6 | d70b67c8bc72ee23b55381bd6a884f4796692f77 | 182,782,159,917,517,920,000,000,000,000,000,000,000 | 11 | [patch] vfs: fix lookup on deleted directory
Lookup can install a child dentry for a deleted directory. This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.
This isn't a big problem normally, since memory pressure or umount
will clea... |
static inline int search_dirblock(struct buffer_head *bh,
struct inode *dir,
const struct qstr *d_name,
unsigned int offset,
struct ext4_dir_entry_2 ** res_dir)
{
struct ext4_dir_entry_2 * de;
char * dlimit;
int de_len;
const char *name = d_name->name;
int namelen = d_name->len;
de = (str... | 0 | [
"CWE-20"
] | linux | c9b92530a723ac5ef8e352885a1862b18f31b2f5 | 88,622,911,468,952,340,000,000,000,000,000,000,000 | 36 | ext4: make orphan functions be no-op in no-journal mode
Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.
Signe... |
flac_write_d2flac (SF_PRIVATE *psf, const double *ptr, sf_count_t len)
{ FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
void (*convert) (const double *, int32_t *, int, int) ;
int bufferlen, writecount, thiswrite ;
sf_count_t total = 0 ;
int32_t* buffer = pflac->encbuffer ;
switch (SF_CODEC (psf->sf.form... | 0 | [
"CWE-119",
"CWE-369"
] | libsndfile | 60b234301adf258786d8b90be5c1d437fc8799e0 | 319,991,399,731,308,050,000,000,000,000,000,000,000 | 40 | src/flac.c: Improve error handling
Especially when dealing with corrupt or malicious files. |
void clipObjects(Size sz, std::vector<Rect>& objects,
std::vector<int>* a, std::vector<double>* b)
{
size_t i, j = 0, n = objects.size();
Rect win0 = Rect(0, 0, sz.width, sz.height);
if(a)
{
CV_Assert(a->size() == n);
}
if(b)
{
CV_Assert(b->size() == n);
... | 0 | [
"CWE-125"
] | opencv | 321c74ccd6077bdea1d47450ca4fe955cb5b6330 | 95,414,133,036,239,720,000,000,000,000,000,000,000 | 36 | objdetect: validate feature rectangle on reading |
void controller::edit_urls_file() {
const char * editor;
editor = getenv("VISUAL");
if (!editor)
editor = getenv("EDITOR");
if (!editor)
editor = "vi";
std::string cmdline = strprintf::fmt("%s \"%s\"", editor, utils::replace_all(url_file,"\"","\\\""));
v->push_empty_formaction();
stfl::reset();
utils::r... | 0 | [
"CWE-943",
"CWE-787"
] | newsbeuter | 96e9506ae9e252c548665152d1b8968297128307 | 6,645,960,265,500,135,000,000,000,000,000,000,000 | 20 | Sanitize inputs to bookmark-cmd (#591)
Newsbeuter didn't properly shell-escape the arguments passed to
bookmarking command, which allows a remote attacker to perform remote
code execution by crafting an RSS item whose title and/or URL contain
something interpretable by the shell (most notably subshell
invocations.)
T... |
sdap_ad_tokengroups_get_posix_members(TALLOC_CTX *mem_ctx,
struct sdap_ad_tokengroups_initgr_posix_state *state,
size_t num_sids,
char **sids,
size_t *_num_missing,
char ***_missing,
... | 1 | [
"CWE-264"
] | sssd | 191d7f7ce3de10d9e19eaa0a6ab3319bcd4ca95d | 253,248,825,947,836,370,000,000,000,000,000,000,000 | 125 | AD: process non-posix nested groups using tokenGroups
When initgr is performed for AD supporting tokenGroups, do not skip
non-posix groups.
Resolves:
https://fedorahosted.org/sssd/ticket/2343
Reviewed-by: Michal Židek <mzidek@redhat.com>
(cherry picked from commit 4932db6258ccfb612a3a28eb6a618c2f042b9d58) |
noConv(char *oval, char **str)
{
*str = oval;
return 1;
} | 0 | [
"CWE-20",
"CWE-476"
] | w3m | 33509cc81ec5f2ba44eb6fd98bd5c1b5873e46bd | 50,704,628,304,645,350,000,000,000,000,000,000,000 | 5 | Fix uninitialised values for <i> and <dd>
Bug-Debian: https://github.com/tats/w3m/issues/16 |
static void reds_mig_target_client_add(RedsState *reds, RedClient *client)
{
RedsMigTargetClient *mig_client;
g_return_if_fail(reds);
spice_debug("trace");
mig_client = g_new0(RedsMigTargetClient, 1);
mig_client->client = client;
reds->mig_target_clients = g_list_append(reds->mig_target_clients... | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 2,470,721,656,389,208,000,000,000,000,000,000,000 | 10 | 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> |
DEFUN (bgp_fast_external_failover,
bgp_fast_external_failover_cmd,
"bgp fast-external-failover",
BGP_STR
"Immediately reset session if a link to a directly connected external peer goes down\n")
{
struct bgp *bgp;
bgp = vty->index;
bgp_flag_unset (bgp, BGP_FLAG_NO_FAST_EXT_FAILOVER);
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 251,067,559,829,993,560,000,000,000,000,000,000,000 | 12 | [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... |
void TFE_CallDLManagedTensorDeleter(void* dlm_ptr) {
DLManagedTensor* dlMTensor = static_cast<DLManagedTensor*>(dlm_ptr);
if (dlMTensor->deleter != nullptr) {
dlMTensor->deleter(dlMTensor);
}
} | 0 | [
"CWE-20",
"CWE-476",
"CWE-908"
] | tensorflow | 22e07fb204386768e5bcbea563641ea11f96ceb8 | 325,285,656,624,506,900,000,000,000,000,000,000,000 | 6 | Fix multiple vulnerabilities in `tf.experimental.dlpack.to_dlpack`.
We have a use after free caused by memory coruption, a segmentation fault caused by memory corruption, several memory leaks and an undefined behavior when taking the reference of a nullptr.
PiperOrigin-RevId: 332568894
Change-Id: Ife0fc05e103b3532509... |
uint64_t ThreadCommand::pc() const {
uint64_t entry = 0;
switch(architecture_) {
case CPU_TYPES::CPU_TYPE_X86:
{
if (state_.size() < sizeof(details::x86_thread_state_t)) {
return entry;
}
entry = reinterpret_cast<const details::x86_thread_state_t*>(state_.data())->eip;
... | 0 | [
"CWE-787"
] | LIEF | 0033b6312fd311b2e45e379c04a83d77c1e58578 | 166,864,859,617,587,800,000,000,000,000,000,000,000 | 45 | Resolve #767 |
entry_guard_get_pathbias_state(entry_guard_t *guard)
{
return &guard->pb;
} | 0 | [
"CWE-200"
] | tor | 665baf5ed5c6186d973c46cdea165c0548027350 | 240,595,063,560,292,460,000,000,000,000,000,000,000 | 4 | Consider the exit family when applying guard restrictions.
When the new path selection logic went into place, I accidentally
dropped the code that considered the _family_ of the exit node when
deciding if the guard was usable, and we didn't catch that during
code review.
This patch makes the guard_restriction_t code ... |
int Field_blob::cmp(const uchar *a_ptr, const uchar *b_ptr)
{
uchar *blob1,*blob2;
memcpy(&blob1, a_ptr+packlength, sizeof(char*));
memcpy(&blob2, b_ptr+packlength, sizeof(char*));
size_t a_len= get_length(a_ptr), b_len= get_length(b_ptr);
return cmp(blob1, a_len, blob2, b_len);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 264,012,460,722,856,400,000,000,000,000,000,000,000 | 8 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
R_API bool r_socket_connect(RSocket *s, const char *host, const char *port, int proto, unsigned int timeout) {
r_return_val_if_fail (s, false);
#if __WINDOWS__
struct sockaddr_in sa;
struct hostent *he;
WSADATA wsadata;
TIMEVAL Timeout;
Timeout.tv_sec = timeout;
Timeout.tv_usec = 0;
if (WSAStartup (MAKEWORD (1... | 1 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 260,533,017,312,292,370,000,000,000,000,000,000,000 | 152 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
static void lxc_cgroup_hierarchy_free(struct cgroup_hierarchy *h)
{
if (!h)
return;
lxc_free_array((void **)h->subsystems, free);
free(h->all_mount_points);
free(h);
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 186,140,589,034,747,070,000,000,000,000,000,000,000 | 8 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
const UserName& getName() const {
return _name;
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 253,891,481,280,689,060,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
maybe_quote (const char *str)
{
if (need_quotes (str))
return g_shell_quote (str);
return g_strdup (str);
} | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 195,723,751,083,449,940,000,000,000,000,000,000,000 | 6 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
static int handle_eac3(MOVMuxContext *mov, AVPacket *pkt, MOVTrack *track)
{
AC3HeaderInfo *hdr = NULL;
struct eac3_info *info;
int num_blocks, ret;
if (!track->eac3_priv && !(track->eac3_priv = av_mallocz(sizeof(*info))))
return AVERROR(ENOMEM);
info = track->eac3_priv;
if (avpriv_ac3... | 1 | [
"CWE-241",
"CWE-129"
] | FFmpeg | ed22dc22216f74c75ee7901f82649e1ff725ba50 | 32,264,904,057,904,515,000,000,000,000,000,000,000 | 133 | avformat/movenc: Check that frame_types other than EAC3_FRAME_TYPE_INDEPENDENT have a supported substream id
Fixes: out of array access
Fixes: ffmpeg_bof_1.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
parse_path_predicate(const char *id, const char **prefix, int *pref_len, const char **name, int *nam_len,
const char **path_key_expr, int *pke_len, int *has_predicate)
{
const char *ptr;
int parsed = 0, ret;
assert(id);
if (prefix) {
*prefix = NULL;
}
if (pref_len) ... | 0 | [
"CWE-617"
] | libyang | 5ce30801f9ccc372bbe9b7c98bb5324b15fb010a | 270,230,319,964,001,500,000,000,000,000,000,000,000 | 99 | schema tree BUGFIX freeing nodes with no module set
Context must be passed explicitly for these cases.
Fixes #1452 |
static int rds_ib_laddr_check(__be32 addr)
{
int ret;
struct rdma_cm_id *cm_id;
struct sockaddr_in sin;
/* Create a CMA ID and try to bind it. This catches both
* IB and iWARP capable NICs.
*/
cm_id = rdma_create_id(NULL, NULL, RDMA_PS_TCP, IB_QPT_RC);
if (IS_ERR(cm_id))
return PTR_ERR(cm_id);
memset(&si... | 1 | [
"CWE-399",
"CWE-476"
] | linux | c2349758acf1874e4c2b93fe41d072336f1a31d0 | 108,298,099,928,647,140,000,000,000,000,000,000,000 | 32 | rds: prevent dereference of a NULL device
Binding might result in a NULL device, which is dereferenced
causing this BUG:
[ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097
4
[ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110
[ 1317.263315] PGD 418bcb067 PUD 3ceb... |
TEST_F(HttpConnectionManagerImplTest, PerStreamIdleTimeoutRouteOverride) {
stream_idle_timeout_ = std::chrono::milliseconds(10);
setup(false, "");
ON_CALL(route_config_provider_.route_config_->route_->route_entry_, idleTimeout())
.WillByDefault(Return(std::chrono::milliseconds(30)));
EXPECT_CALL(*codec_,... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 96,645,979,568,938,430,000,000,000,000,000,000,000 | 28 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void _convert_job_mem(slurm_msg_t *msg)
{
prolog_launch_msg_t *req = (prolog_launch_msg_t *)msg->data;
slurm_cred_arg_t arg;
hostset_t j_hset = NULL;
int rc, hi, host_index, job_cpus;
int i, i_first_bit = 0, i_last_bit = 0;
rc = slurm_cred_verify(conf->vctx, req->cred, &arg,
msg->protocol_versio... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 8,314,106,713,585,731,000,000,000,000,000,000,000 | 76 | 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. |
PJ_DEF(pj_status_t) pjmedia_sdp_neg_set_remote_offer( pj_pool_t *pool,
pjmedia_sdp_neg *neg,
const pjmedia_sdp_session *remote)
{
/* Check arguments are valid. */
PJ_ASSERT_RETURN(pool && neg && remote, PJ_EINVAL);
/* Can only do this in STATE_DONE.
* If we already provide local offer, the... | 0 | [
"CWE-400",
"CWE-200",
"CWE-754"
] | pjproject | 97b3d7addbaa720b7ddb0af9bf6f3e443e664365 | 197,722,992,564,468,220,000,000,000,000,000,000,000 | 20 | Merge pull request from GHSA-hvq6-f89p-frvp |
TfLiteRegistration* Register_EQUAL() {
static TfLiteRegistration r = {nullptr, nullptr,
comparisons::ComparisonPrepareStringAllowed,
comparisons::EqualEval};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 334,145,450,989,644,520,000,000,000,000,000,000,000 | 6 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void tcm_loop_release_cmd(struct se_cmd *se_cmd)
{
struct tcm_loop_cmd *tl_cmd = container_of(se_cmd,
struct tcm_loop_cmd, tl_se_cmd);
kmem_cache_free(tcm_loop_cmd_cache, tl_cmd);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 74,849,604,864,510,150,000,000,000,000,000,000,000 | 7 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
htmlCheckEncoding(htmlParserCtxtPtr ctxt, const xmlChar *attvalue) {
const xmlChar *encoding;
if (!attvalue)
return;
encoding = xmlStrcasestr(attvalue, BAD_CAST"charset");
if (encoding != NULL) {
encoding += 7;
}
/*
* skip blank
*/
if (encoding && IS_BLANK_CH(*encoding))
encod... | 0 | [
"CWE-399"
] | libxml2 | de0cc20c29cb3f056062925395e0f68d2250a46f | 63,856,933,375,918,070,000,000,000,000,000,000,000 | 20 | Fix some buffer conversion issues
https://bugzilla.gnome.org/show_bug.cgi?id=690202
Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0
The pointers from the context input were not properly reset after
that call which can do reallocations. |
figure_loop_size(struct loop_device *lo, loff_t offset, loff_t sizelimit)
{
loff_t size = get_size(offset, sizelimit, lo->lo_backing_file);
sector_t x = (sector_t)size;
struct block_device *bdev = lo->lo_device;
if (unlikely((loff_t)x != size))
return -EFBIG;
if (lo->lo_offset != offset)
lo->lo_offset = offse... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 247,627,665,435,507,200,000,000,000,000,000,000,000 | 18 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
static int nfs4_init_server(struct nfs_server *server,
const struct nfs4_mount_data *data, rpc_authflavor_t authflavour)
{
int error;
dprintk("--> nfs4_init_server()\n");
/* Initialise the client representation from the mount data */
server->flags = data->flags & NFS_MOUNT_FLAGMASK;
server->caps |= NFS_CAP_ATO... | 0 | [
"CWE-20"
] | linux-2.6 | 54af3bb543c071769141387a42deaaab5074da55 | 286,765,744,496,670,770,000,000,000,000,000,000,000 | 27 | NFS: Fix an Oops in encode_lookup()
It doesn't look as if the NFS file name limit is being initialised correctly
in the struct nfs_server. Make sure that we limit whatever is being set in
nfs_probe_fsinfo() and nfs_init_server().
Also ensure that readdirplus and nfs4_path_walk respect our file name
limits.
Signed-of... |
NTSTATUS vfs_chown_fsp(files_struct *fsp, uid_t uid, gid_t gid)
{
int ret;
bool as_root = false;
const char *path;
char *saved_dir = NULL;
char *parent_dir = NULL;
NTSTATUS status;
if (fsp->fh->fd != -1) {
/* Try fchown. */
ret = SMB_VFS_FCHOWN(fsp, uid, gid);
if (ret == 0) {
return NT_STATUS_OK;
}
... | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 105,354,434,309,928,820,000,000,000,000,000,000,000 | 99 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
remove_quoted_nulls (string)
char *string;
{
register size_t slen;
register int i, j, prev_i;
DECLARE_MBSTATE;
if (strchr (string, CTLNUL) == 0) /* XXX */
return string; /* XXX */
slen = strlen (string);
i = j = 0;
while (i < slen)
{
if (string[i] == CTLESC)
{
/* Old code had... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 204,937,841,724,544,470,000,000,000,000,000,000,000 | 44 | bash-4.4-rc2 release |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 0, &output));
TfLiteTensor* hits;
TF_LITE_ENSURE_OK(context, GetOutputSafe(context, node, 1, &hits));
const TfLiteTensor* lookup;
TF_LITE_ENSURE_OK(context, GetInputSaf... | 0 | [
"CWE-703",
"CWE-369"
] | tensorflow | 5117e0851348065ed59c991562c0ec80d9193db2 | 283,717,117,721,295,700,000,000,000,000,000,000,000 | 50 | Prevent a division by 0
PiperOrigin-RevId: 371007407
Change-Id: Iecf2718de48d6bf5a69b02a9df9deda8ec1b19d3 |
uECC_VLI_API void uECC_vli_bytesToNative(uECC_word_t *native,
const uint8_t *bytes,
int num_bytes) {
wordcount_t i;
uECC_vli_clear(native, (num_bytes + (uECC_WORD_SIZE - 1)) / uECC_WORD_SIZE);
for (i = 0; i < num_bytes; ++i) {... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 7,434,974,489,100,843,000,000,000,000,000,000,000 | 11 | Fix for #168 |
StrUtil_SafeDynBufPrintf(DynBuf *b, // IN/OUT
const char *fmt, // IN
...) // IN
{
va_list args;
Bool success;
va_start(args, fmt);
success = StrUtil_VDynBufPrintf(b, fmt, args);
va_end(args);
VERIFY(success);
} | 0 | [
"CWE-362"
] | open-vm-tools | c1304ce8bfd9c0c33999e496bf7049d5c3d45821 | 256,971,231,640,432,330,000,000,000,000,000,000,000 | 13 | randomly generate tmp directory name, and add StrUtil_ReplaceAll() function. |
static void GetModePixelList(PixelList *pixel_list,MagickPixelPacket *pixel)
{
register SkipList
*list;
register ssize_t
channel;
size_t
color,
max_count,
mode;
ssize_t
count;
unsigned short
channels[5];
/*
Make each pixel the 'predominant color' of the specified neighbo... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 91e58d967a92250439ede038ccfb0913a81e59fe | 316,157,674,060,957,200,000,000,000,000,000,000,000 | 47 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
int odbc_bindcols(odbc_result *result TSRMLS_DC)
{
RETCODE rc;
int i;
SQLSMALLINT colnamelen; /* Not used */
SQLLEN displaysize;
SQLUSMALLINT colfieldid;
int charextraalloc;
result->values = (odbc_result_value *) safe_emalloc(sizeof(odbc_result_value), result->numcols, 0);
result->longreadlen = ODBCG(... | 1 | [
"CWE-20"
] | php-src | 344ff5dd4c538eaebea075f7705321f8b86d0b47 | 86,733,147,957,210,980,000,000,000,000,000,000,000 | 90 | fixed fix #69975 wrt. ODBCVER < 0x0300 |
static void close_fs_devices(struct btrfs_fs_devices *fs_devices)
{
struct btrfs_device *device, *tmp;
lockdep_assert_held(&uuid_mutex);
if (--fs_devices->opened > 0)
return;
list_for_each_entry_safe(device, tmp, &fs_devices->devices, dev_list)
btrfs_close_one_device(device);
WARN_ON(fs_devices->open_devic... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 326,110,777,266,253,750,000,000,000,000,000,000,000 | 18 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
static ssize_t inbound_frame_compute_pad(nghttp2_inbound_frame *iframe) {
size_t padlen;
/* 1 for Pad Length field */
padlen = (size_t)(iframe->sbuf.pos[0] + 1);
DEBUGF("recv: padlen=%zu\n", padlen);
/* We cannot use iframe->frame.hd.length because of CONTINUATION */
if (padlen - 1 > iframe->payloadleft)... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 12,850,958,015,039,522,000,000,000,000,000,000,000 | 17 | Add nghttp2_option_set_max_outbound_ack |
static Image *ReadOneMNGImage(MngInfo* mng_info, const ImageInfo *image_info,
ExceptionInfo *exception)
{
char
page_geometry[MagickPathExtent];
Image
*image;
MagickBooleanType
logging;
volatile int
first_mng_object,
object_id,
term_chunk_found,
skip_to_iend;
volatile ssize... | 1 | [
"CWE-125"
] | ImageMagick | 307fa45d512641fcd105f0d57ca50c1437cd1b81 | 28,133,052,051,835,636,000,000,000,000,000,000,000 | 2,406 | https://github.com/ImageMagick/ImageMagick/issues/542 |
void * pvPortMalloc( size_t xWantedSize )
{
BlockLink_t * pxBlock, * pxPreviousBlock, * pxNewBlockLink;
void * pvReturn = NULL;
vTaskSuspendAll();
{
/* If this is the first call to malloc then the heap will require
* initialisation to setup the list of free blocks. */
... | 0 | [
"CWE-200",
"CWE-119"
] | FreeRTOS-Kernel | c7a9a01c94987082b223d3e59969ede64363da63 | 94,744,545,394,427,850,000,000,000,000,000,000,000 | 158 | Improve heap2 bounds checking (#224)
* Improve heap bounds checking in pvPortMalloc |
static int mfill_zeropage_pte(struct mm_struct *dst_mm,
pmd_t *dst_pmd,
struct vm_area_struct *dst_vma,
unsigned long dst_addr)
{
pte_t _dst_pte, *dst_pte;
spinlock_t *ptl;
int ret;
_dst_pte = pte_mkspecial(pfn_pte(my_zero_pfn(dst_addr),
dst_vma->vm_page_prot));
ret = -EEXIST;
ds... | 0 | [
"CWE-862",
"CWE-863"
] | linux | 29ec90660d68bbdd69507c1c8b4e33aa299278b1 | 2,058,960,792,218,697,000,000,000,000,000,000,000 | 23 | userfaultfd: shmem/hugetlbfs: only allow to register VM_MAYWRITE vmas
After the VMA to register the uffd onto is found, check that it has
VM_MAYWRITE set before allowing registration. This way we inherit all
common code checks before allowing to fill file holes in shmem and
hugetlbfs with UFFDIO_COPY.
The userfaultf... |
gpgsm_get_short_fingerprint (ksba_cert_t cert, unsigned long *r_high)
{
unsigned char digest[20];
gpgsm_get_fingerprint (cert, GCRY_MD_SHA1, digest, NULL);
if (r_high)
*r_high = (((unsigned long)digest[12]<<24)
|(digest[13]<<16)
|(digest[14]<< 8)
|digest[15]);
r... | 1 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 55,574,218,888,683,380,000,000,000,000,000,000,000 | 15 | 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 ... |
static int eligible_child(enum pid_type type, struct pid *pid, int options,
struct task_struct *p)
{
int err;
if (type < PIDTYPE_MAX) {
if (task_pid_type(p, type) != pid)
return 0;
}
/* Wait for all children (clone and not) if __WALL is set;
* otherwise, wait for clone children *only* if __WCLONE is
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 61,889,917,690,205,050,000,000,000,000,000,000,000 | 25 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
static RzList *maps(RzBinFile *bf) {
rz_return_val_if_fail(bf && bf->o, NULL);
QnxObj *qo = bf->o->bin_obj;
return rz_list_clone(qo->maps);
} | 0 | [
"CWE-415"
] | rizin | 58926dffbe819fe9ebf5062f7130e026351cae01 | 279,392,378,361,559,880,000,000,000,000,000,000,000 | 5 | fix #2964 - double-free in bin_qnx.c |
inline void AddElementwise(int size, const ArithmeticParams& params,
const uint8* input1_data, const uint8* input2_data,
uint8* output_data) {
ruy::profiler::ScopeLabel label("AddElementwise/8bit");
int i = 0;
TFLITE_DCHECK_GT(params.input1_offset, -256);
TF... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 156,588,744,360,418,410,000,000,000,000,000,000,000 | 88 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
const char** LibRaw::cameraList() { return static_camera_list;} | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 95,829,262,634,862,370,000,000,000,000,000,000,000 | 1 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef |
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image *image, *image2=NULL,
*rotated_image;
register Quantum *q;
unsigned int status;
MATHeader MATLAB_HDR;
size_t size;
size_t CellType;
QuantumInfo *quantum_info;
ImageInfo *clone_info;
int i;
ssize_t ldblk;
u... | 0 | [
"CWE-772"
] | ImageMagick | a43f4155ee916fbed080acd534232a9d2396b5b5 | 24,223,704,360,986,562,000,000,000,000,000,000,000 | 542 | https://github.com/ImageMagick/ImageMagick/issues/734 |
static int ssl_ticket_keys_init( ssl_context *ssl )
{
int ret;
ssl_ticket_keys *tkeys;
unsigned char buf[16];
if( ssl->ticket_keys != NULL )
return( 0 );
tkeys = polarssl_malloc( sizeof(ssl_ticket_keys) );
if( tkeys == NULL )
return( POLARSSL_ERR_SSL_MALLOC_FAILED );
aes_i... | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 105,268,665,467,892,260,000,000,000,000,000,000,000 | 43 | Added max length checking of hostname |
int ssl3_accept(SSL *s)
{
BUF_MEM *buf;
unsigned long alg_k,Time=(unsigned long)time(NULL);
void (*cb)(const SSL *ssl,int type,int val)=NULL;
int ret= -1;
int new_state,state,skip=0;
RAND_add(&Time,sizeof(Time),0);
ERR_clear_error();
clear_sys_error();
if (s->info_callback != NULL)
cb=s->info_callback;
e... | 1 | [] | openssl | 0ffa49970b9f8ea66b43ce2eb7f8fd523b65bc2c | 18,473,723,291,228,113,000,000,000,000,000,000,000 | 625 | Backport support for fixed DH ciphersuites (from HEAD) |
void mark_page_dirty(struct kvm *kvm, gfn_t gfn)
{
struct kvm_memory_slot *memslot;
memslot = gfn_to_memslot(kvm, gfn);
mark_page_dirty_in_slot(kvm, memslot, gfn); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 198,844,212,798,571,850,000,000,000,000,000,000,000 | 7 | 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... |
void sctp_assoc_del_nonprimary_peers(struct sctp_association *asoc,
struct sctp_transport *primary)
{
struct sctp_transport *temp;
struct sctp_transport *t;
list_for_each_entry_safe(t, temp, &asoc->peer.transport_addr_list,
transports) {
/* if the current transport is not the primary one, delete it ... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 124,687,912,895,607,540,000,000,000,000,000,000,000 | 13 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static irqreturn_t fsl_hv_shutdown_isr(int irq, void *data)
{
orderly_poweroff(false);
return IRQ_HANDLED;
} | 0 | [
"CWE-190"
] | linux | 6a024330650e24556b8a18cc654ad00cfecf6c6c | 81,440,447,452,206,080,000,000,000,000,000,000,000 | 6 | drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
The "param.count" value is a u64 thatcomes from the user. The code
later in the function assumes that param.count is at least one and if
it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR.
Also the addition can have an integer over... |
ofpacts_pull_openflow_instructions(struct ofpbuf *openflow,
unsigned int instructions_len,
enum ofp_version version,
const struct vl_mff_map *vl_mff_map,
uint64_t *ofpacts_tlv_bitm... | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 34,640,482,828,282,400,000,000,000,000,000,000,000 | 119 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
CURLcode Curl_http_connect(struct connectdata *conn, bool *done)
{
CURLcode result;
/* We default to persistent connections. We set this already in this connect
function to make the re-use checks properly be able to check this bit. */
connkeep(conn, "HTTP default");
/* the CONNECT procedure might not hav... | 0 | [
"CWE-284"
] | curl | 79b9d5f1a42578f807a6c94914bc65cbaa304b6d | 279,401,383,903,972,430,000,000,000,000,000,000,000 | 28 | http_done: close Negotiate connections when done
When doing HTTP requests Negotiate authenticated, the entire connnection
may become authenticated and not just the specific HTTP request which is
otherwise how HTTP works, as Negotiate can basically use NTLM under the
hood. curl was not adhering to this fact but would a... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.