func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ZEND_FASTCALL ZEND_INSTANCEOF_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1; zval *expr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC); zend_bool result; if (Z_TYPE_P(expr) == IS_OBJECT && Z_OBJ_HT_P(expr)->get_class_entry) { result ...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
313,846,778,945,575,540,000,000,000,000,000,000,000
16
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static int task_switch_32(struct x86_emulate_ctxt *ctxt, u16 tss_selector, u16 old_tss_sel, ulong old_tss_base, struct desc_struct *new_desc) { const struct x86_emulate_ops *ops = ctxt->ops; struct tss_segment_32 tss_seg; int ret; u32 new_tss_base = get_desc_base(new_desc); u32 eip_offset = offsetof(stru...
0
[ "CWE-284" ]
linux
33ab91103b3415e12457e3104f0e4517ce12d0f3
311,844,335,550,516,800,000,000,000,000,000,000,000
42
KVM: x86: fix emulation of "MOV SS, null selector" This is CVE-2017-2583. On Intel this causes a failed vmentry because SS's type is neither 3 nor 7 (even though the manual says this check is only done for usable SS, and the dmesg splat says that SS is unusable!). On AMD it's worse: svm.c is confused and sets CPL to ...
void clear_ref_exclusion(struct string_list **ref_excludes_p) { if (*ref_excludes_p) { string_list_clear(*ref_excludes_p, 0); free(*ref_excludes_p); } *ref_excludes_p = NULL; }
0
[]
git
a937b37e766479c8e780b17cce9c4b252fd97e40
90,631,315,985,076,640,000,000,000,000,000,000,000
8
revision: quit pruning diff more quickly when possible When the revision traversal machinery is given a pathspec, we must compute the parent-diff for each commit to determine which ones are TREESAME. We set the QUICK diff flag to avoid looking at more entries than we need; we really just care whether there are any cha...
static bool blkcg_policy_enabled(struct request_queue *q, const struct blkcg_policy *pol) { return pol && test_bit(pol->plid, q->blkcg_pols); }
0
[ "CWE-415" ]
linux
9b54d816e00425c3a517514e0d677bb3cec49258
44,878,471,535,126,570,000,000,000,000,000,000,000
5
blkcg: fix double free of new_blkg in blkcg_init_queue If blkg_create fails, new_blkg passed as an argument will be freed by blkg_create, so there is no need to free it again. Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Jens Axboe <axboe@fb.com>
void kvm_vcpu_kick(struct kvm_vcpu *vcpu) { int me; int cpu = vcpu->cpu; if (waitqueue_active(&vcpu->wq)) { wake_up_interruptible(&vcpu->wq); ++vcpu->stat.halt_wakeup; } me = get_cpu(); if (cpu != me && (unsigned)cpu < nr_cpu_ids && cpu_online(cpu)) if (kvm_vcpu_exiting_guest_mode(vcpu) == IN_GUEST_MODE) ...
0
[]
kvm
0769c5de24621141c953fbe1f943582d37cb4244
140,558,565,402,031,250,000,000,000,000,000,000,000
16
KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid" In order to be able to proceed checks on CPU-specific properties within the emulator, function "get_cpuid" is introduced. With "get_cpuid" it is possible to virtually call the guests "cpuid"-opcode without changing the VM's context. [mtosatti: cleanup/beautif...
gs_main_init0(gs_main_instance * minst, FILE * in, FILE * out, FILE * err, int max_lib_paths) { ref *array; /* Do platform-dependent initialization. */ /* We have to do this as the very first thing, */ /* because it detects attempts to run 80N86 executables (N>0) */ /* on incompatible...
0
[]
ghostpdl
241d91112771a6104de10b3948c3f350d6690c1d
209,209,728,966,871,040,000,000,000,000,000,000,000
40
Bug 699664: Ensure the correct is in place before cleanup If the PS job replaces the device and leaves that graphics state in place, we wouldn't cleanup the default device in the normal way, but rely on the garbage collector. This works (but isn't ideal), *except* when the job replaces the device with the null device...
CudnnRnnSequenceTensorDescriptor(GpuExecutor* parent, int max_seq_length, int batch_size, int data_size, cudnnDataType_t data_type, RNNDataDescriptor data_handle, TensorDescripto...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
132,984,855,902,276,270,000,000,000,000,000,000,000
13
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
void MirrorJob::TransferStarted(CopyJob *cp) { if(transfer_count==0) root_mirror->transfer_start_ts=now; JobStarted(cp); }
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
332,981,066,786,158,100,000,000,000,000,000,000,000
6
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
resp_header_locate (const struct response *resp, const char *name, int start, const char **begptr, const char **endptr) { int i; const char **headers = resp->headers; int name_len; if (!headers || !headers[1]) return -1; name_len = strlen (name); if (start > 0) i = start; els...
0
[ "CWE-119" ]
wget
d892291fb8ace4c3b734ea5125770989c215df3f
52,771,426,453,750,260,000,000,000,000,000,000,000
36
Fix stack overflow in HTTP protocol handling (CVE-2017-13089) * src/http.c (skip_short_body): Return error on negative chunk size Reported-by: Antti Levomäki, Christian Jalio, Joonas Pihlaja from Forcepoint Reported-by: Juhani Eronen from Finnish National Cyber Security Centre
int LibRaw::adjust_sizes_info_only(void) { CHECK_ORDER_LOW(LIBRAW_PROGRESS_IDENTIFY); raw2image_start(); if (O.use_fuji_rotate) { if (IO.fuji_width) { // restore saved values if(IO.fheight) { ...
0
[ "CWE-399" ]
LibRaw
c14ae36d28e80139b2f31b5d9d7623db3b597a3a
14,431,756,062,382,860,000,000,000,000,000,000,000
40
fixed error handling for broken full-color images
static int load_plugin_data(char *plugin_name, char *config_file) { FILE *file_ptr; char path[FN_REFLEN]; char line[1024]; char *reason= 0; char *res; int i= -1; if (opt_plugin_ini == 0) { fn_format(path, config_file, opt_plugin_dir, "", MYF(0)); opt_plugin_ini= my_strdup(path, MYF(MY_FAE)); ...
0
[ "CWE-200" ]
mysql-server
0dbd5a8797ed4bd18e8b883988fb62177eb0f73f
190,762,632,003,308,850,000,000,000,000,000,000,000
83
Bug#21973610: BUFFER OVERFLOW ISSUES Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Rev...
processValidate(struct module_qstate* qstate, struct val_qstate* vq, struct val_env* ve, int id) { enum val_classification subtype; int rcode; if(!vq->key_entry) { verbose(VERB_ALGO, "validate: no key entry, failed"); return val_error(qstate, id); } /* This is the default next state. */ vq->state = VAL_FI...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
35,886,070,128,447,890,000,000,000,000,000,000,000
167
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
build_ecc_privkey_template (app_t app, int keyno, const unsigned char *ecc_d, size_t ecc_d_len, unsigned char **result, size_t *resultlen) { unsigned char privkey[2]; size_t privkey_len; unsigned char exthdr[2+2+1]; size_t exthdr_len; unsigned char suffi...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
287,972,976,605,798,550,000,000,000,000,000,000,000
68
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 ...
JVM_InitializeSocketLibrary(void) { Trc_SC_InitializeSocketLibrary(); return 0; }
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
82,787,664,221,381,660,000,000,000,000,000,000,000
5
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
static void FVMenuUndo(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FontView *fv = (FontView *) GDrawGetUserData(gw); FVUndo((FontViewBase *) fv); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
55,138,525,358,659,800,000,000,000,000,000,000,000
4
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void snd_seq_autoload_init(void) { atomic_dec(&snd_seq_in_init); #ifdef CONFIG_SND_SEQUENCER_MODULE /* initial autoload only when snd-seq is a module */ queue_autoload_drivers(); #endif }
0
[ "CWE-416", "CWE-401" ]
linux
fc27fe7e8deef2f37cba3f2be2d52b6ca5eb9d57
160,878,693,596,248,840,000,000,000,000,000,000,000
8
ALSA: seq: Cancel pending autoload work at unbinding device ALSA sequencer core has a mechanism to load the enumerated devices automatically, and it's performed in an off-load work. This seems causing some race when a sequencer is removed while the pending autoload work is running. As syzkaller spotted, it may lead ...
feed_table_tag(struct table *tbl, char *line, struct table_mode *mode, int width, struct parsed_tag *tag) { int cmd; #ifdef ID_EXT char *p; #endif struct table_cell *cell = &tbl->cell; int colspan, rowspan; int col, prev_col; int i, j, k, v, v0, w, id; Str tok, tmp, anchor; table...
0
[ "CWE-399", "CWE-835" ]
w3m
8354763b90490d4105695df52674d0fcef823e92
72,789,509,777,522,440,000,000,000,000,000,000,000
697
Prevent negative indent value in feed_table_block_tag() Bug-Debian: https://github.com/tats/w3m/issues/88
PS_SERIALIZER_DECODE_FUNC(wddx) { zval *retval; zval **ent; char *key; uint key_length; char tmp[128]; ulong idx; int hash_type; int ret; if (vallen == 0) { return SUCCESS; } MAKE_STD_ZVAL(retval); if ((ret = php_wddx_deserialize_ex((char *)val, vallen, retval)) == SUCCESS) { for (zend_hash_interna...
1
[]
php-src
1785d2b805f64eaaacf98c14c9e13107bf085ab1
303,752,914,649,427,200,000,000,000,000,000,000,000
40
Fixed bug #70741: Session WDDX Packet Deserialization Type Confusion Vulnerability
SYSCALL_DEFINE2(old_getrlimit, unsigned int, resource, struct rlimit __user *, rlim) { struct rlimit x; if (resource >= RLIM_NLIMITS) return -EINVAL; task_lock(current->group_leader); x = current->signal->rlim[resource]; task_unlock(current->group_leader); if (x.rlim_cur > 0x7FFFFFFF) x.rlim_cur = 0x7FFFFF...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
57,554,079,417,031,360,000,000,000,000,000,000,000
16
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static int smack_task_getsid(struct task_struct *p) { return smk_curacc_on_task(p, MAY_READ, __func__); }
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
52,291,036,313,141,245,000,000,000,000,000,000,000
4
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
bool PostgreSqlStorage::updateSchemaVersion(int newVersion) { QSqlQuery query(logDb()); query.prepare("UPDATE coreinfo SET value = :version WHERE key = 'schemaversion'"); query.bindValue(":version", newVersion); query.exec(); bool success = true; if (query.lastError().isValid()) { qCrit...
0
[ "CWE-89" ]
quassel
aa1008be162cb27da938cce93ba533f54d228869
88,538,203,297,098,280,000,000,000,000,000,000,000
14
Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL. Properly detects whether Qt performs slash escaping in SQL queries or not, and then configures PostgreSQL accordingly. This bug was a introduced due to a bugfix in Qt 4.8.5 disables slash escaping when binding queries: https://bugreports.qt-project.org/brows...
std::unique_ptr<IteratorBase> MakeIteratorInternal( const string& prefix) const override { return absl::make_unique<Iterator>(typename Iterator::Params{ this, strings::StrCat(prefix, "::SparseTensorSlice")}); }
0
[ "CWE-476" ]
tensorflow
02cc160e29d20631de3859c6653184e3f876b9d7
171,565,643,510,404,130,000,000,000,000,000,000,000
5
Prevent nullptr deref in SparseTensorSliceDataset The arguments must determine a valid sparse tensor. This means that when indices are empty then the values must be empty too (and the reverse). Also added test, by modifying existing test with empty sparse tensor to now run with an invalid sparse tensor input. PiperO...
/* use same locking rules as GIFHWADDR ioctl's */ static ssize_t address_show(struct device *dev, struct device_attribute *attr, char *buf) { struct net_device *ndev = to_net_dev(dev); ssize_t ret = -EINVAL; read_lock(&dev_base_lock); if (dev_isalive(ndev)) ret = sysfs_format_mac(buf, ndev->dev_addr, ndev...
0
[ "CWE-401" ]
linux
895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab
108,968,938,426,382,470,000,000,000,000,000,000,000
12
net-sysfs: Fix mem leak in netdev_register_kobject syzkaller report this: BUG: memory leak unreferenced object 0xffff88837a71a500 (size 256): comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s) hex dump (first 32 bytes): 00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N.......... ff ff ...
ex_open(exarg_T *eap) { regmatch_T regmatch; char_u *p; #ifdef FEAT_EVAL if (not_in_vim9(eap) == FAIL) return; #endif curwin->w_cursor.lnum = eap->line2; beginline(BL_SOL | BL_FIX); if (*eap->arg == '/') { // ":open /pattern/": put cursor in column found with pattern ++eap->arg; p = ski...
0
[ "CWE-125" ]
vim
d3a117814d6acbf0dca3eff1a7626843b9b3734a
250,659,570,608,126,730,000,000,000,000,000,000,000
40
patch 8.2.4009: reading one byte beyond the end of the line Problem: Reading one byte beyond the end of the line. Solution: Check for NUL byte first.
**/ const CImg<T>& save_pnm(const char *const filename, const unsigned int bytes_per_pixel=0) const { return _save_pnm(0,filename,bytes_per_pixel);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
54,014,247,487,468,380,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); vmx_vcpu_load_vmcs(vcpu, cpu, NULL); vmx_vcpu_pi_load(vcpu, cpu); vmx->host_debugctlmsr = get_debugctlmsr(); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
64,035,601,274,984,050,000,000,000,000,000,000,000
10
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
NOEXPORT void log_raw(SERVICE_OPTIONS *opt, int level, char *stamp, char *id, char *text) { char *line; /* NOTE: opt->log_level may have changed since s_log(). * It is important to use the new value and not the old one. */ /* build the line and log it to syslog/file if configured */ switc...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
5,198,076,609,423,865,600,000,000,000,000,000,000
51
stunnel-5.57
struct blkg_rwstat blkg_rwstat_recursive_sum(struct blkcg_gq *blkg, struct blkcg_policy *pol, int off) { struct blkcg_gq *pos_blkg; struct cgroup_subsys_state *pos_css; struct blkg_rwstat sum = { }; int i; lockdep_assert_held(blkg->q->queue_lock); rcu_read_lock(); blkg_for_each_descendant_pre(pos_blk...
0
[ "CWE-415" ]
linux
9b54d816e00425c3a517514e0d677bb3cec49258
186,650,313,365,916,830,000,000,000,000,000,000,000
31
blkcg: fix double free of new_blkg in blkcg_init_queue If blkg_create fails, new_blkg passed as an argument will be freed by blkg_create, so there is no need to free it again. Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Jens Axboe <axboe@fb.com>
static const char *cache_id(const char *id) { static char clean[SHORT_STRING]; strfcpy (clean, id, sizeof(clean)); mutt_sanitize_filename (clean, 1); return clean; }
0
[ "CWE-119" ]
mutt
6aed28b40a0410ec47d40c8c7296d8d10bae7576
302,134,844,118,637,420,000,000,000,000,000,000,000
9
Sanitize POP bcache paths. Protect against bcache directory path traversal for UID values. Thanks for Jeriko One for the bug report and patch, which this commit is based upon.
static int write_reuc_extension(git_index *index, git_filebuf *file) { git_buf reuc_buf = GIT_BUF_INIT; git_vector *out = &index->reuc; git_index_reuc_entry *reuc; struct index_extension extension; size_t i; int error = 0; git_vector_foreach(out, i, reuc) { if ((error = create_reuc_extension_data(&reuc_buf, r...
0
[ "CWE-415", "CWE-190" ]
libgit2
3db1af1f370295ad5355b8f64b865a2a357bcac0
264,885,587,593,283,680,000,000,000,000,000,000,000
25
index: error out on unreasonable prefix-compressed path lengths When computing the complete path length from the encoded prefix-compressed path, we end up just allocating the complete path without ever checking what the encoded path length actually is. This can easily lead to a denial of service by just encoding an un...
void *kthread_probe_data(struct task_struct *task) { struct kthread *kthread = to_kthread(task); void *data = NULL; probe_kernel_read(&data, &kthread->data, sizeof(data)); return data; }
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
290,485,855,884,760,130,000,000,000,000,000,000,000
8
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...
void DataWriterImpl::InnerDataWriterListener::on_offered_incompatible_qos( RTPSWriter* /*writer*/, fastdds::dds::PolicyMask qos) { data_writer_->update_offered_incompatible_qos(qos); DataWriterListener* listener = data_writer_->get_listener_for(StatusMask::offered_incompatible_qos()); if (li...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
334,333,787,023,019,560,000,000,000,000,000,000,000
15
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static int sb_permission(struct super_block *sb, struct inode *inode, int mask) { if (unlikely(mask & MAY_WRITE)) { umode_t mode = inode->i_mode; /* Nobody gets write access to a read-only fs. */ if (sb_rdonly(sb) && (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) return -EROFS; } return 0; }
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
98,542,976,747,902,060,000,000,000,000,000,000,000
11
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static void __cdecl kill_server(int sig_ptr) #define RETURN_FROM_KILL_SERVER return #endif { DBUG_ENTER("kill_server"); #ifndef EMBEDDED_LIBRARY int sig=(int) (long) sig_ptr; // This is passed a int // if there is a signal during the kill in progress, ignore the other if (kill_in_progress) // Safety { ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
326,025,408,511,822,000,000,000,000,000,000,000,000
59
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
XML_SetBase(XML_Parser parser, const XML_Char *p) { if (p) { p = poolCopyString(&_dtd->pool, p); if (!p) return XML_STATUS_ERROR; curBase = p; } else curBase = NULL; return XML_STATUS_OK; }
0
[ "CWE-119" ]
libexpat
ba0f9c3b40c264b8dd392e02a7a060a8fa54f032
256,601,382,850,077,180,000,000,000,000,000,000,000
12
CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings https://sourceforge.net/p/expat/bugs/528/
void AuthorizationManager::addAuthorizedPrincipal(Principal* principal) { // Log out any already-logged-in user on the same database as "principal". logoutDatabase(principal->getName().getDB().toString()); // See SERVER-8144. _authenticatedPrincipals.add(principal); if (!principal...
0
[ "CWE-264" ]
mongo
23344f8b7506df694f66999693ee3c00dfd6afae
51,989,897,068,632,400,000,000,000,000,000,000,000
26
SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user. Uncorrected, this can cause replica set heartbeats to stall behind operations that hold the read lock for a long time.
TEST_P(Http2IntegrationTest, GoAway) { config_helper_.addFilter(ConfigHelper::defaultHealthCheckFilter()); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); auto encoder_decoder = codec_client_->startRequest(Http::TestRequestHeaderMapImpl{ {":method", "GET"}, {":path", "/healthcheck"}...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
53,363,151,657,000,625,000,000,000,000,000,000,000
17
http/2: add stats and stream flush timeout (#139) This commit adds a new stream flush timeout to guard against a remote server that does not open window once an entire stream has been buffered for flushing. Additional stats have also been added to better understand the codecs view of active streams as well as amount o...
static int do_setlink(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg) { struct ifinfomsg *ifm = NLMSG_DATA(nlh); struct rtattr **ida = arg; struct net_device *dev; int err, send_addr_notify = 0; if (ifm->ifi_index >= 0) dev = dev_get_by_index(ifm->ifi_index); else if (ida[IFLA_IFNAME - 1]) { char i...
0
[ "CWE-200" ]
linux-2.6
9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8
101,526,516,298,844,730,000,000,000,000,000,000,000
129
[NETLINK]: Missing initializations in dumped data Mostly missing initialization of padding fields of 1 or 2 bytes length, two instances of uninitialized nlmsgerr->msg of 16 bytes length. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
port::StatusOr<DeviceMemory<uint8>> AllocateCudnnConvolutionForwardWorkspace( Stream* stream, const CudnnHandle& cudnn, const CudnnTensorDescriptor& input_nd, const CudnnFilterDescriptor& filter, const CudnnConvolutionDescriptor& conv, const CudnnTensorDescriptor& output_nd, const dnn::AlgorithmDesc...
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
41,193,248,060,121,140,000,000,000,000,000,000,000
42
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
void controller::save_feed(std::shared_ptr<rss_feed> feed, unsigned int pos) { if (!feed->is_empty()) { LOG(level::DEBUG, "controller::save_feed: feed is nonempty, saving"); rsscache->externalize_rssfeed(feed, ign.matches_resetunread(feed->rssurl())); LOG(level::DEBUG, "controller::save_feed: after externalize_r...
0
[ "CWE-943", "CWE-787" ]
newsbeuter
96e9506ae9e252c548665152d1b8968297128307
50,248,045,861,635,945,000,000,000,000,000,000,000
22
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...
pci_pirq_prt_entry(int bus, int slot, int pin, int pirq_pin, int ioapic_irq, void *arg) { char *name; name = lpc_pirq_name(pirq_pin); if (name == NULL) return; dsdt_line(" Package ()"); dsdt_line(" {"); dsdt_line(" 0x%X,", slot << 16 | 0xffff); dsdt_line(" 0x%02X,", pin - 1); dsdt_line(" %s,"...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
6199e653418eda58cd698d8769820904453e2535
218,315,822,353,214,700,000,000,000,000,000,000,000
17
dm: validate the input in 'pci_emul_mem_handler()' checking the inputs explicitly instead of using Assert. Tracked-On: #4003 Signed-off-by: Yonghua Huang <yonghua.huang@intel.com> Reviewed-by: Shuo Liu <shuo.a.liu@intel.com> Acked-by: Yu Wang <yu1.wang@intel.com>
static int acquire_home(const ExecContext *c, uid_t uid, const char** home, char **buf) { int r; assert(c); assert(home); assert(buf); /* If WorkingDirectory=~ is set, try to acquire a usable home directory. */ if (*home) return 0; if (!c->work...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
137,838,744,628,262,370,000,000,000,000,000,000,000
22
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
static int handle_xsetbv(struct kvm_vcpu *vcpu) { u64 new_bv = kvm_read_edx_eax(vcpu); u32 index = kvm_rcx_read(vcpu); int err = kvm_set_xcr(vcpu, index, new_bv); return kvm_complete_insn_gp(vcpu, err); }
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
131,891,135,943,346,400,000,000,000,000,000,000,000
8
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
int net_send(int s, int command, void *arg, int len) { struct net_hdr *pnh; char *pktbuf; size_t pktlen; pktlen = sizeof(struct net_hdr) + len; pktbuf = (char*)calloc(sizeof(char), pktlen); if (pktbuf == NULL) { perror("calloc"); goto net_send_error; } pnh = (struct net_hdr*)pktbuf; pnh->nh_type = comma...
0
[ "CWE-20", "CWE-787" ]
aircrack-ng
88702a3ce4c28a973bf69023cd0312f412f6193e
208,658,545,235,280,780,000,000,000,000,000,000,000
42
OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab
QPDF::addPage(QPDFObjectHandle newpage, bool first) { if (first) { insertPage(newpage, 0); } else { insertPage( newpage, getRoot().getKey("/Pages").getKey("/Count").getIntValueAsInt()); } }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
105,315,133,333,608,270,000,000,000,000,000,000,000
13
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
write_char (unsigned char * data, int offset, char value) { data [offset] = value ; } /* write_char */
0
[ "CWE-119", "CWE-787" ]
libsndfile
dbe14f00030af5d3577f4cabbf9861db59e9c378
166,218,310,965,201,400,000,000,000,000,000,000,000
3
src/sd2.c : Fix two potential buffer read overflows. Closes: https://github.com/erikd/libsndfile/issues/93
static inline void audit_free_rule(struct audit_entry *e) { int i; /* some rules don't have associated watches */ if (e->rule.watch) audit_put_watch(e->rule.watch); if (e->rule.fields) for (i = 0; i < e->rule.field_count; i++) { struct audit_field *f = &e->rule.fields[i]; kfree(f->lsm_str); security_a...
0
[ "CWE-362" ]
linux-2.6
8f7b0ba1c853919b85b54774775f567f30006107
38,378,573,385,406,790,000,000,000,000,000,000,000
17
Fix inotify watch removal/umount races Inotify watch removals suck violently. To kick the watch out we need (in this order) inode->inotify_mutex and ih->mutex. That's fine if we have a hold on inode; however, for all other cases we need to make damn sure we don't race with umount. We can *NOT* just grab a reference...
com_tee(String *buffer MY_ATTRIBUTE((unused)), char *line MY_ATTRIBUTE((unused))) { char file_name[FN_REFLEN], *end, *param; while (my_isspace(charset_info,*line)) line++; if (!(param = strchr(line, ' '))) // if outfile wasn't given, use the default { if (!strlen(outfile)) { printf("N...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
115,184,068,249,301,900,000,000,000,000,000,000,000
40
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
Item_time_literal(THD *thd, MYSQL_TIME *ltime, uint dec_arg): Item_temporal_literal(thd, ltime, dec_arg) { max_length= MIN_TIME_WIDTH + (decimals ? decimals + 1 : 0); fixed= 1; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
109,292,535,260,091,570,000,000,000,000,000,000,000
6
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
static int crypto_dump_report_done(struct netlink_callback *cb) { return 0; }
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
159,770,386,055,633,140,000,000,000,000,000,000,000
4
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 JSValue js_sys_get_ntp(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv) { u32 sec, frac; gf_net_get_ntp(&sec, &frac); JSValue ret = JS_NewObject(ctx); if (JS_IsException(ret)) return ret; JS_SetPropertyStr(ctx, ret, "n", JS_NewInt64(ctx, sec)); JS_SetPropertyStr(ctx, ret, "d", JS_NewInt...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
12,787,842,778,257,015,000,000,000,000,000,000,000
10
fixed #2138
krb5_decode_krbsecretkey(krb5_context context, krb5_db_entry *entries, struct berval **bvalues, krb5_tl_data *userinfo_tl_data, krb5_kvno *mkvno) { char *user=NULL; int i=0, j=0, noofkeys=0; krb5_key_data ...
0
[ "CWE-703" ]
krb5
04038bf3633c4b909b5ded3072dc88c8c419bf16
71,437,499,450,383,995,000,000,000,000,000,000,000
56
Support keyless principals in LDAP [CVE-2014-5354] Operations like "kadmin -q 'addprinc -nokey foo'" or "kadmin -q 'purgekeys -all foo'" result in principal entries with no keys present, so krb5_encode_krbsecretkey() would just return NULL, which then got unconditionally dereferenced in krb5_add_ber_mem_ldap_mod(). A...
bool operator<(const ChainLink& other) const { if (port_origin < other.port_origin) { return true; } else if (port_origin > other.port_origin) { return false; } else { return node->name() < other.node->name(); } }
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
107,037,709,313,387,420,000,000,000,000,000,000,000
9
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
TPML_CCA_Unmarshal(TPML_CCA *target, BYTE **buffer, INT32 *size) { TPM_RC rc = TPM_RC_SUCCESS; UINT32 i; if (rc == TPM_RC_SUCCESS) { rc = UINT32_Unmarshal(&target->count, buffer, size); } if (rc == TPM_RC_SUCCESS) { if (target->count > MAX_CAP_CC) { rc = TPM_RC_SIZE; target->count =...
0
[ "CWE-787" ]
libtpms
5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b
89,411,030,707,020,950,000,000,000,000,000,000,000
19
tpm2: Restore original value if unmarshalled value was illegal Restore the original value of the memory location where data from a stream was unmarshalled and the unmarshalled value was found to be illegal. The goal is to not keep illegal values in memory. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
ServerKeyExchange::~ServerKeyExchange() { ysDelete(server_key_); }
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
117,575,542,827,793,920,000,000,000,000,000,000,000
4
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
fr_window_is_batch_mode (FrWindow *window) { return window->priv->batch_mode; }
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
328,335,412,983,057,380,000,000,000,000,000,000,000
4
libarchive: sanitize filenames before extracting
static void gen_helper_fp_arith_STN_ST0(int op, int opreg) { TCGv_i32 tmp = tcg_const_i32(opreg); switch (op) { case 0: gen_helper_fadd_STN_ST0(cpu_env, tmp); break; case 1: gen_helper_fmul_STN_ST0(cpu_env, tmp); break; case 4: gen_helper_fsubr_STN_ST0(cpu_env...
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
280,857,786,641,397,100,000,000,000,000,000,000,000
24
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
parse_noargs_dec_ttl(const struct ofpact_parse_params *pp) { struct ofpact_cnt_ids *ids; uint16_t id = 0; ofpact_put_DEC_TTL(pp->ofpacts); ofpbuf_put(pp->ofpacts, &id, sizeof id); ids = pp->ofpacts->header; ids->n_controllers++; ofpact_finish_DEC_TTL(pp->ofpacts, &ids); }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
255,320,333,385,340,530,000,000,000,000,000,000,000
11
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...
sec_reset_state(void) { g_server_rdp_version = 0; g_sec_encrypt_use_count = 0; g_sec_decrypt_use_count = 0; g_licence_issued = 0; g_licence_error_result = 0; mcs_reset_state(); }
0
[ "CWE-787" ]
rdesktop
766ebcf6f23ccfe8323ac10242ae6e127d4505d2
129,402,795,321,605,310,000,000,000,000,000,000,000
9
Malicious RDP server security fixes This commit includes fixes for a set of 21 vulnerabilities in rdesktop when a malicious RDP server is used. All vulnerabilities was identified and reported by Eyal Itkin. * Add rdp_protocol_error function that is used in several fixes * Refactor of process_bitmap_updates * Fix pos...
static int l2tp_ip6_getname(struct socket *sock, struct sockaddr *uaddr, int *uaddr_len, int peer) { struct sockaddr_l2tpip6 *lsa = (struct sockaddr_l2tpip6 *)uaddr; struct sock *sk = sock->sk; struct ipv6_pinfo *np = inet6_sk(sk); struct l2tp_ip6_sock *lsk = l2tp_ip6_sk(sk); lsa->l2tp_family = AF_INET6; ...
1
[ "CWE-200" ]
linux
04d4fbca1017c11381e7d82acea21dd741e748bc
338,954,264,610,063,400,000,000,000,000,000,000,000
31
l2tp: fix info leak via getsockname() The L2TP code for IPv6 fails to initialize the l2tp_unused member of struct sockaddr_l2tpip6 and that for leaks two bytes kernel stack via the getsockname() syscall. Initialize l2tp_unused with 0 to avoid the info leak. Signed-off-by: Mathias Krause <minipli@googlemail.com> Cc: J...
static void dom_load_html(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ */ { zval *id; xmlDoc *docp = NULL, *newdoc; dom_object *intern; dom_doc_propsptr doc_prop; char *source; int source_len, refcount, ret; long options = 0; htmlParserCtxtPtr ctxt; id = getThis(); if (zend_parse_parameters(ZEND_NUM_ARGS(...
1
[ "CWE-20" ]
php-src
f7d7befae8bcc2db0093f8adaa9f72eeb7ad891e
99,973,663,694,588,360,000,000,000,000,000,000,000
78
Fix #69719 - more checks for nulls in paths
static void diffcore_apply_filter(const char *filter) { int i; struct diff_queue_struct *q = &diff_queued_diff; struct diff_queue_struct outq; outq.queue = NULL; outq.nr = outq.alloc = 0; if (!filter) return; if (strchr(filter, DIFF_STATUS_FILTER_AON)) { int found; for (i = found = 0; !found && i < q->nr...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
215,181,579,421,023,100,000,000,000,000,000,000,000
55
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
crypto_time() { l_fp tstamp; /* NTP time */ L_CLR(&tstamp); if (sys_leap != LEAP_NOTINSYNC) get_systime(&tstamp); return (tstamp.l_ui); }
0
[ "CWE-20" ]
ntp
c4cd4aaf418f57f7225708a93bf48afb2bc9c1da
289,043,895,028,774,270,000,000,000,000,000,000,000
9
CVE-2014-9297
static int atusb_probe(struct usb_interface *interface, const struct usb_device_id *id) { struct usb_device *usb_dev = interface_to_usbdev(interface); struct ieee802154_hw *hw; struct atusb *atusb = NULL; int ret = -ENOMEM; hw = ieee802154_alloc_hw(sizeof(struct atusb), &atusb_ops); if (!hw) return -E...
0
[ "CWE-416" ]
linux
7fd25e6fc035f4b04b75bca6d7e8daa069603a76
175,451,486,861,548,550,000,000,000,000,000,000,000
108
ieee802154: atusb: fix use-after-free at disconnect The disconnect callback was accessing the hardware-descriptor private data after having having freed it. Fixes: 7490b008d123 ("ieee802154: add support for atusb transceiver") Cc: stable <stable@vger.kernel.org> # 4.2 Cc: Alexander Aring <alex.aring@gmail.com> Re...
respip_data_answer(const struct resp_addr* raddr, enum respip_action action, uint16_t qtype, const struct reply_info* rep, size_t rrset_id, struct reply_info** new_repp, int tag, struct config_strlist** tag_datas, size_t tag_datas_size, char* const* tagname, int num_tags, struct ub_packed_rrset_key** redirect_rrse...
0
[ "CWE-190" ]
unbound
02080f6b180232f43b77f403d0c038e9360a460f
121,578,486,203,141,360,000,000,000,000,000,000,000
70
- Fix Integer Overflows in Size Calculations, reported by X41 D-Sec.
QPDFObjectHandle::getUTF8Value() { assertString(); return dynamic_cast<QPDF_String*>(obj.getPointer())->getUTF8Val(); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
105,653,446,074,658,140,000,000,000,000,000,000,000
5
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static int selinux_sb_statfs(struct dentry *dentry) { const struct cred *cred = current_cred(); struct common_audit_data ad; COMMON_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.path.dentry = dentry->d_sb->s_root; return superblock_has_perm(cred, dentry->d_sb, FILESYSTEM__GETATTR, &ad); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
249,845,519,287,043,000,000,000,000,000,000,000,000
9
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
void SSL_free(SSL *s) { int i; if(s == NULL) return; i=CRYPTO_add(&s->references,-1,CRYPTO_LOCK_SSL); #ifdef REF_PRINT REF_PRINT("SSL",s); #endif if (i > 0) return; #ifdef REF_CHECK if (i < 0) { fprintf(stderr,"SSL_free, bad reference count\n"); abort(); /* ok */ } #endif if (s->param) X509_VE...
0
[ "CWE-310" ]
openssl
c6a876473cbff0fd323c8abcaace98ee2d21863d
334,944,954,761,796,530,000,000,000,000,000,000,000
84
Support TLS_FALLBACK_SCSV. Reviewed-by: Stephen Henson <steve@openssl.org>
static int ndpi_search_tls_udp(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *packet = &flow->packet; // u_int8_t handshake_type; u_int32_t handshake_len; u_int16_t p_len; const u_int8_t *p; #ifdef DEBUG_TLS printf("[TLS] %s()\n", __F...
0
[ "CWE-190", "CWE-787" ]
nDPI
23594f036536468072198a57c59b6e9d63caf6ce
305,859,140,123,398,500,000,000,000,000,000,000,000
47
Fixed stack overflow caused by missing length check Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
ofputil_encode_flow_removed(const struct ofputil_flow_removed *fr, enum ofputil_protocol protocol) { struct ofpbuf *msg; enum ofp_flow_removed_reason reason = fr->reason; if (reason == OFPRR_METER_DELETE && !(protocol & OFPUTIL_P_OF14_UP)) { reason = OFPRR_DELETE; } ...
0
[ "CWE-772" ]
ovs
77ad4225d125030420d897c873e4734ac708c66b
98,298,714,299,983,950,000,000,000,000,000,000,000
87
ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod(). Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
static enum test_return test_binary_add(void) { return test_binary_add_impl("test_binary_add", PROTOCOL_BINARY_CMD_ADD); }
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
41,828,033,313,576,064,000,000,000,000,000,000,000
3
Issue 102: Piping null to the server will crash it
void js_stacktrace(js_State *J) { int n; printf("stack trace:\n"); for (n = J->tracetop; n >= 0; --n) { const char *name = J->trace[n].name; const char *file = J->trace[n].file; int line = J->trace[n].line; if (line > 0) { if (name[0]) printf("\tat %s (%s:%d)\n", name, file, line); else printf(...
0
[ "CWE-476" ]
mujs
77ab465f1c394bb77f00966cd950650f3f53cb24
106,043,019,057,721,200,000,000,000,000,000,000,000
17
Fix 697401: Error when dropping extra arguments to lightweight functions.
static uint64_t sm501_i2c_read(void *opaque, hwaddr addr, unsigned size) { SM501State *s = (SM501State *)opaque; uint8_t ret = 0; switch (addr) { case SM501_I2C_BYTE_COUNT: ret = s->i2c_byte_count; break; case SM501_I2C_STATUS: ret = s->i2c_status; break; case SM...
0
[ "CWE-190" ]
qemu
b15a22bbcbe6a78dc3d88fe3134985e4cdd87de4
172,224,119,457,966,450,000,000,000,000,000,000,000
27
sm501: Replace hand written implementation with pixman where possible Besides being faster this should also prevent malicious guests to abuse 2D engine to overwrite data or cause a crash. Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik...
packet_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct packet_sock *po = pkt_sk(sk); int ret; if (level != SOL_PACKET) return -ENOPROTOOPT; switch (optname) { case PACKET_ADD_MEMBERSHIP: case PACKET_DROP_MEMBERSHIP: { s...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
167,300,609,635,975,530,000,000,000,000,000,000,000
194
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
GF_Descriptor *gf_odf_create_descriptor(u8 tag) { GF_Descriptor *desc; switch (tag) { case GF_ODF_IOD_TAG: return gf_odf_new_iod(); case GF_ODF_OD_TAG: return gf_odf_new_od(); case GF_ODF_ESD_TAG: return gf_odf_new_esd(); case GF_ODF_DCD_TAG: return gf_odf_new_dcd(); case GF_ODF_SLC_TAG: //default : w...
0
[ "CWE-787" ]
gpac
4e56ad72ac1afb4e049a10f2d99e7512d7141f9d
140,533,877,177,069,740,000,000,000,000,000,000,000
129
fixed #2216
static int minor_to_rbd_dev_id(int minor) { return minor >> RBD_SINGLE_MAJOR_PART_SHIFT; }
0
[ "CWE-863" ]
linux
f44d04e696feaf13d192d942c4f14ad2e117065a
178,571,263,440,860,720,000,000,000,000,000,000,000
4
rbd: require global CAP_SYS_ADMIN for mapping and unmapping It turns out that currently we rely only on sysfs attribute permissions: $ ll /sys/bus/rbd/{add*,remove*} --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add --w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major --w------- 1 ro...
void inode_set_flags(struct inode *inode, unsigned int flags, unsigned int mask) { unsigned int old_flags, new_flags; WARN_ON_ONCE(flags & ~mask); do { old_flags = ACCESS_ONCE(inode->i_flags); new_flags = (old_flags & ~mask) | flags; } while (unlikely(cmpxchg(&inode->i_flags, old_flags, new_flags)...
0
[ "CWE-284", "CWE-264" ]
linux
23adbe12ef7d3d4195e80800ab36b37bee28cd03
86,109,859,611,400,030,000,000,000,000,000,000,000
12
fs,userns: Change inode_capable to capable_wrt_inode_uidgid The kernel has no concept of capabilities with respect to inodes; inodes exist independently of namespaces. For example, inode_capable(inode, CAP_LINUX_IMMUTABLE) would be nonsense. This patch changes inode_capable to check for uid and gid mappings and rena...
static int iucv_sock_listen(struct socket *sock, int backlog) { struct sock *sk = sock->sk; int err; lock_sock(sk); err = -EINVAL; if (sk->sk_state != IUCV_BOUND) goto done; if (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET) goto done; sk->sk_max_ack_backlog = backlog; sk->sk_ack_backlog = 0...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
175,673,771,140,349,450,000,000,000,000,000,000,000
23
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
static int smack_dentry_create_files_as(struct dentry *dentry, int mode, struct qstr *name, const struct cred *old, struct cred *new) { struct task_smack *otsp = smack_cred(old); struct task_smack *ntsp = smack_cred(new); struct inode_smack *isp; int may; /* * Use the process credential unless al...
0
[ "CWE-416" ]
linux
a3727a8bac0a9e77c70820655fd8715523ba3db7
142,391,490,194,361,100,000,000,000,000,000,000,000
38
selinux,smack: fix subjective/objective credential use mixups Jann Horn reported a problem with commit eb1231f73c4d ("selinux: clarify task subjective and objective credentials") where some LSM hooks were attempting to access the subjective credentials of a task other than the current task. Generally speaking, it is ...
WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info, const int argc,const char **argv,ExceptionInfo *exception) { const char *option; GeometryInfo geometry_info; ssize_t count; register ssize_t i; /* Initialize method variables. */ assert(image_info != (ImageInfo ...
0
[ "CWE-399", "CWE-401" ]
ImageMagick
4a334bbf5584de37c6f5a47c380a531c8c4b140a
224,012,410,277,244,260,000,000,000,000,000,000,000
1,077
https://github.com/ImageMagick/ImageMagick/issues/1623
void qpdf_set_info_key(qpdf_data qpdf, char const* key, char const* value) { if ((key == 0) || (std::strlen(key) == 0) || (key[0] != '/')) { return; } QPDFObjectHandle value_object; if (value) { QTC::TC("qpdf", "qpdf-c set_info_key to value"); value_object = QPDFObjectHandle::newString(value)...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
216,568,224,140,647,640,000,000,000,000,000,000,000
34
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
Curl_ssl_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn, bool isproxy, int sockindex, bool *done) { CURLcode result; #ifndef CURL_DISABLE_PROXY if(conn->bits.proxy_ssl_connected[sockindex]) { result = ssl_connect_init_proxy(conn, sockindex); if(result) ...
0
[]
curl
852aa5ad351ea53e5f01d2f44b5b4370c2bf5425
49,021,892,761,300,660,000,000,000,000,000,000,000
24
url: check sasl additional parameters for connection reuse. Also move static function safecmp() as non-static Curl_safecmp() since its purpose is needed at several places. Bug: https://curl.se/docs/CVE-2022-22576.html CVE-2022-22576 Closes #8746
sctp_disposition_t sctp_sf_t1_init_timer_expire(const struct sctp_endpoint *ep, const struct sctp_association *asoc, const sctp_subtype_t type, void *arg, sctp_cmd_seq_t *commands) { struct sctp_chunk *repl = NULL; struct sctp_bind_addr *bp; int attempts = asoc->init_err_counter + 1; ...
0
[ "CWE-20" ]
linux-2.6
ba0166708ef4da7eeb61dd92bbba4d5a749d6561
326,290,411,239,296,170,000,000,000,000,000,000,000
41
sctp: Fix kernel panic while process protocol violation parameter Since call to function sctp_sf_abort_violation() need paramter 'arg' with 'struct sctp_chunk' type, it will read the chunk type and chunk length from the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen() always with 'struct sctp_paramh...
CJSON_PUBLIC(cJSON*) cJSON_AddObjectToObject(cJSON * const object, const char * const name) { cJSON *object_item = cJSON_CreateObject(); if (add_item_to_object(object, name, object_item, &global_hooks, false)) { return object_item; } cJSON_Delete(object_item); return NULL; }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
278,727,155,436,378,200,000,000,000,000,000,000,000
11
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
static int fuse_ioctl_copy_user(struct page **pages, struct iovec *iov, unsigned int nr_segs, size_t bytes, bool to_user) { struct iov_iter ii; int page_idx = 0; if (!bytes) return 0; iov_iter_init(&ii, iov, nr_segs, bytes, 0); while (iov_iter_count(&ii)) { struct page *page = pages[page_idx++]; size_t...
0
[ "CWE-119", "CWE-787" ]
linux
7572777eef78ebdee1ecb7c258c0ef94d35bad16
91,455,619,691,919,220,000,000,000,000,000,000,000
42
fuse: verify ioctl retries Verify that the total length of the iovec returned in FUSE_IOCTL_RETRY doesn't overflow iov_length(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> CC: Tejun Heo <tj@kernel.org> CC: <stable@kernel.org> [2.6.31+]
static u32 esp4_get_mtu(struct xfrm_state *x, int mtu) { struct esp_data *esp = x->data; u32 blksize = ALIGN(crypto_aead_blocksize(esp->aead), 4); u32 align = max_t(u32, blksize, esp->padlen); u32 rem; mtu -= x->props.header_len + crypto_aead_authsize(esp->aead); rem = mtu & (align - 1); mtu &= ~(align - 1); ...
0
[ "CWE-16" ]
linux-2.6
920fc941a9617f95ccb283037fe6f8a38d95bb69
202,193,602,287,432,030,000,000,000,000,000,000,000
28
[ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access ESP does not account for the IV size when calling pskb_may_pull() to ensure everything it accesses directly is within the linear part of a potential fragment. This results in a BUG() being triggered when the both the IPv4 and IPv6 ESP stack...
static void rpc_async_release(struct work_struct *work) { rpc_free_task(container_of(work, struct rpc_task, u.tk_work)); }
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
62,775,408,681,394,990,000,000,000,000,000,000,000
4
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
static void GetNonpeakPixelList(PixelList *pixel_list,MagickPixelPacket *pixel) { register SkipList *list; register ssize_t channel; size_t color, next, previous; ssize_t count; unsigned short channels[5]; /* Finds the non peak value for each of the colors. */ for (c...
0
[ "CWE-119", "CWE-787" ]
ImageMagick6
91e58d967a92250439ede038ccfb0913a81e59fe
131,739,247,615,415,720,000,000,000,000,000,000,000
48
https://github.com/ImageMagick/ImageMagick/issues/1615
static bool ad_entry_check_size(uint32_t eid, size_t bufsize, uint32_t off, uint32_t got_len) { struct { off_t expected_len; bool fixed_size; bool minimum_size; } ad_checks[] = { [ADEID_DFORK] = {-1, false, false}, /* not applicable */ [ADEID_RFORK] = {-1, false, false}, /* no limit */ [ADEID_...
0
[ "CWE-787" ]
samba
0e2b3fb982d1f53d111e10d9197ed2ec2e13712c
293,967,545,325,578,750,000,000,000,000,000,000,000
80
CVE-2021-44142: libadouble: harden parsing code BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static void write_date(bytearray_t * bplist, double val) { uint8_t buff[9]; buff[0] = BPLIST_DATE | 3; *(uint64_t*)(buff+1) = float_bswap64(*(uint64_t*)&val); byte_array_append(bplist, buff, sizeof(buff)); }
0
[ "CWE-125" ]
libplist
4765d9a60ca4248a8f89289271ac69cbffcc29bc
34,391,704,239,147,026,000,000,000,000,000,000,000
7
bplist: Fix possible out-of-bounds read in parse_array_node() with proper bounds checking
bool BrotliDecompressorImpl::process(Common::BrotliContext& ctx, Buffer::Instance& output_buffer) { BrotliDecoderResult result; result = BrotliDecoderDecompressStream(state_.get(), &ctx.avail_in_, &ctx.next_in_, &ctx.avail_out_, &ctx.next_out_, nullptr); if (result == BROT...
0
[]
envoy
cb4ef0b09200c720dfdb07e097092dd105450343
211,371,710,560,402,260,000,000,000,000,000,000,000
22
decompressors: stop decompressing upon excessive compression ratio (#733) Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com> Co-authored-by: Ryan Hamilton <rch@google.com> Signed-off-by: Matt Klein <mklein@lyft.com> Signed-off-by: Pradeep Rao <pcrao@google.com>
static void fib_replace_table(struct net *net, struct fib_table *old, struct fib_table *new) { #ifdef CONFIG_IP_MULTIPLE_TABLES switch (new->tb_id) { case RT_TABLE_LOCAL: rcu_assign_pointer(net->ipv4.fib_local, new); break; case RT_TABLE_MAIN: rcu_assign_pointer(net->ipv4.fib_main, new); break; cas...
0
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
279,183,991,494,680,600,000,000,000,000,000,000,000
22
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
static int tm_cgpr_get(struct task_struct *target, const struct user_regset *regset, unsigned int pos, unsigned int count, void *kbuf, void __user *ubuf) { int ret; if (!cpu_has_feature(CPU_FTR_TM)) return -ENODEV; if (!MSR_TM_ACTIVE(target->thread.regs->msr)) return -ENODATA; flush_tmregs_to_thread...
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
142,021,420,925,550,430,000,000,000,000,000,000,000
43
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
ModuleExport void UnregisterWPGImage(void) { (void) UnregisterMagickInfo("WPG"); }
0
[ "CWE-119", "CWE-787" ]
ImageMagick
fc43974d34318c834fbf78570ca1a3764ed8c7d7
82,599,541,584,416,010,000,000,000,000,000,000,000
4
Ensure image extent does not exceed maximum
m4_pushdef (struct obstack *obs, int argc, token_data **argv) { define_macro (argc, argv, SYMBOL_PUSHDEF); }
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
49,643,228,606,914,270,000,000,000,000,000,000,000
4
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)
_XimGetInputStyle( XIMArg *arg, XIMStyle *input_style) { register XIMArg *p; for (p = arg; p && p->name; p++) { if (!(strcmp(p->name, XNInputStyle))) { *input_style = (XIMStyle)p->value; return True; } } return False; }
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
162,854,805,366,679,140,000,000,000,000,000,000,000
14
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
std_term_source(j_decompress_ptr cinfo) { /* No work necessary here */ (void) cinfo; }
0
[ "CWE-369" ]
libtiff
47f2fb61a3a64667bce1a8398a8fcb1b348ff122
187,114,566,039,931,480,000,000,000,000,000,000,000
5
* libtiff/tif_jpeg.c: avoid integer division by zero in JPEGSetupEncode() when horizontal or vertical sampling is set to 0. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653
yaffsfs_istat(TSK_FS_INFO *fs, TSK_FS_ISTAT_FLAG_ENUM flags, FILE * hFile, TSK_INUM_T inum, TSK_DADDR_T numblock, int32_t sec_skew) { TSK_FS_META *fs_meta; TSK_FS_FILE *fs_file; YAFFSFS_INFO *yfs = (YAFFSFS_INFO *)fs; char ls[12]; YAFFSFS_PRINT_ADDR print; char timeBuf[128]; YaffsCac...
0
[ "CWE-125", "CWE-787" ]
sleuthkit
459ae818fc8dae717549810150de4d191ce158f1
172,760,896,741,279,160,000,000,000,000,000,000,000
116
Fix stack buffer overflow in yaffsfs_istat Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str.
void OSD::dispatch_session_waiting(Session *session, OSDMapRef osdmap) { assert(session->session_dispatch_lock.is_locked()); auto i = session->waiting_on_map.begin(); while (i != session->waiting_on_map.end()) { OpRequestRef op = &(*i); assert(ms_can_fast_dispatch(op->get_req())); const MOSDFastDispa...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
211,714,128,909,502,300,000,000,000,000,000,000,000
35
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 ...
int __init acpi_boot_table_init(void) { int error; #ifdef __i386__ dmi_check_system(acpi_dmi_table); #endif /* * If acpi_disabled, bail out * One exception: acpi=ht continues far enough to enumerate LAPICs */ if (acpi_disabled && !acpi_ht) return 1; /* * Initialize the ACPI boot-time table parser. ...
0
[]
linux-2.6
f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff
81,136,725,570,076,040,000,000,000,000,000,000,000
42
[PATCH] i386: add HPET(s) into resource map Add HPET(s) into resource map. This will allow for the HPET(s) to be visibile within /proc/iomem. Signed-off-by: Aaron Durbin <adurbin@google.com> Signed-off-by: Andi Kleen <ak@suse.de>