func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
NO_INLINE int getRadix(const char **s, int forceRadix, bool *hasError) {
int radix = 10;
if (forceRadix > 36) {
if (hasError) *hasError = true;
return 0;
}
if (**s == '0') {
radix = 8;
(*s)++;
// OctalIntegerLiteral: 0o01, 0O01
if (**s == 'o' || **s == 'O') {
radix = 8;
if... | 0 | [
"CWE-119",
"CWE-787"
] | Espruino | 0a7619875bf79877907205f6bee08465b89ff10b | 82,385,644,382,472,285,000,000,000,000,000,000,000 | 45 | Fix strncat/cpy bounding issues (fix #1425) |
void t_cpp_generator::generate_deserialize_list_element(ofstream& out,
t_list* tlist,
string prefix,
bool use_push,
... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 198,274,664,361,117,560,000,000,000,000,000,000,000 | 16 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
double_unlock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2)
{
spin_unlock(&hb1->lock);
if (hb1 != hb2)
spin_unlock(&hb2->lock);
} | 0 | [] | linux-2.6 | 5ecb01cfdf96c5f465192bdb2a4fd4a61a24c6cc | 170,182,949,102,844,300,000,000,000,000,000,000,000 | 6 | futex_lock_pi() key refcnt fix
This fixes a futex key reference count bug in futex_lock_pi(),
where a key's reference count is incremented twice but decremented
only once, causing the backing object to not be released.
If the futex is created in a temporary file in an ext3 file system,
this bug causes the file's inod... |
JBIG2Bitmap::JBIG2Bitmap(unsigned int segNumA, int wA, int hA) : JBIG2Segment(segNumA)
{
w = wA;
h = hA;
int auxW;
if (unlikely(checkedAdd(wA, 7, &auxW))) {
error(errSyntaxError, -1, "invalid width");
data = nullptr;
return;
}
line = auxW >> 3;
if (w <= 0 || h <= 0 |... | 0 | [
"CWE-476",
"CWE-190"
] | poppler | 27354e9d9696ee2bc063910a6c9a6b27c5184a52 | 334,549,171,783,152,450,000,000,000,000,000,000,000 | 23 | JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up |
static void *hi_calloc_fail(size_t nmemb, size_t size) {
(void)nmemb;
(void)size;
return NULL;
} | 0 | [
"CWE-190",
"CWE-680"
] | redis | 0215324a66af949be39b34be2d55143232c1cb71 | 241,741,600,139,907,330,000,000,000,000,000,000,000 | 5 | Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587)
The redis-cli command line tool and redis-sentinel service may be vulnerable
to integer overflow when parsing specially crafted large multi-bulk network
replies. This is a result of a vulnerability in the underlying hiredis
library wh... |
static int remove_cgroup(struct cgroup_mount_point *mp,
const char *path, bool recurse)
{
return create_or_remove_cgroup(true, mp, path, recurse);
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 284,485,755,512,056,500,000,000,000,000,000,000,000 | 5 | 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... |
int crypt_keyslot_area(struct crypt_device *cd,
int keyslot,
uint64_t *offset,
uint64_t *length)
{
if (_onlyLUKS(cd, CRYPT_CD_QUIET | CRYPT_CD_UNRESTRICTED) || !offset || !length)
return -EINVAL;
if (isLUKS2(cd->type))
return LUKS2_keyslot_area(&cd->u.luks2.hdr, keyslot, offset, length);
return LUKS_keyslot... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 63,229,921,689,068,510,000,000,000,000,000,000,000 | 13 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
default_interface_handler(vector_t *strvec)
{
if (vector_size(strvec) < 2) {
report_config_error(CONFIG_GENERAL_ERROR, "default_interface requires interface name");
return;
}
FREE_PTR(global_data->default_ifname);
global_data->default_ifname = set_value(strvec);
/* On a reload, the VRRP process needs the defa... | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 169,609,129,240,129,910,000,000,000,000,000,000,000 | 19 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
static bool work_is_canceling(struct work_struct *work)
{
unsigned long data = atomic_long_read(&work->data);
return !(data & WORK_STRUCT_PWQ) && (data & WORK_OFFQ_CANCELING);
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 129,984,981,045,536,900,000,000,000,000,000,000,000 | 6 | 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... |
f_ch_setoptions(typval_T *argvars, typval_T *rettv UNUSED)
{
channel_T *channel;
jobopt_T opt;
channel = get_channel_arg(&argvars[0], FALSE, FALSE, 0);
if (channel == NULL)
return;
clear_job_options(&opt);
if (get_job_options(&argvars[1], &opt,
JO_CB_ALL + JO_TIMEOUT_ALL + JO_MODE_ALL, ... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 146,397,072,813,614,110,000,000,000,000,000,000,000 | 14 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int dissect_CPMGetNotify(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, gboolean in _U_, void *data _U_)
{
col_append_str(pinfo->cinfo, COL_INFO, "GetNotify");
return tvb_reported_length(tvb);
} | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 224,107,743,032,095,920,000,000,000,000,000,000,000 | 5 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
static int FIPS_hmac_sha1_test()
{
unsigned char key[] = "etaonrishd";
unsigned char iv[] = "Sample text";
unsigned char kaval[EVP_MAX_MD_SIZE] =
{0x73, 0xf7, 0xa0, 0x48, 0xf8, 0x94, 0xed, 0xdd, 0x0a, 0xea, 0xea, 0x56, 0x1b, 0x61, 0x2e, 0x70,
0xb2, 0xfb, 0xec, 0xc6};
unsigned char out[EVP_MAX_MD... | 0 | [] | openssl | 200f249b8c3b6439e0200d01caadc24806f1a983 | 43,788,219,771,523,490,000,000,000,000,000,000,000 | 17 | Remove Dual EC DRBG from FIPS module. |
void Magick::Image::quantizeColors(const size_t colors_)
{
modifyImage();
options()->quantizeColors(colors_);
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 325,042,077,892,120,450,000,000,000,000,000,000,000 | 5 | Added missing return to avoid use after free. |
static bool manager_get_show_status(Manager *m) {
assert(m);
if (m->running_as != SYSTEMD_SYSTEM)
return false;
if (m->no_console_output)
return false;
if (m->show_status > 0)
return true;
/* If Plymouth is running make sure we ... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 103,114,869,006,910,070,000,000,000,000,000,000,000 | 17 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
void HeaderMapImpl::remove(const LowerCaseString& key) {
EntryCb cb = ConstSingleton<StaticLookupTable>::get().find(key.get());
if (cb) {
StaticLookupResponse ref_lookup_response = cb(*this);
removeInline(ref_lookup_response.entry_);
} else {
for (auto i = headers_.begin(); i != headers_.end();) {
... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 76,904,088,685,435,090,000,000,000,000,000,000,000 | 16 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
find_method (MonoClass *in_class, MonoClass *ic, const char* name, MonoMethodSignature *sig, MonoClass *from_class)
{
int i;
char *qname, *fqname, *class_name;
gboolean is_interface;
MonoMethod *result = NULL;
is_interface = MONO_CLASS_IS_INTERFACE (in_class);
if (ic) {
class_name = mono_type_get_name_full (&... | 0 | [] | mono | 8e890a3bf80a4620e417814dc14886b1bbd17625 | 258,256,107,898,645,300,000,000,000,000,000,000,000 | 64 | Search for dllimported shared libs in the base directory, not cwd.
* loader.c: we don't search the current directory anymore for shared
libraries referenced in DllImport attributes, as it has a slight
security risk. We search in the same directory where the referencing
image was loaded from, instead. Fixes bug# 641915... |
static void fix_rmode_seg(int seg, struct kvm_save_segment *save)
{
struct kvm_vmx_segment_field *sf = &kvm_vmx_segment_fields[seg];
save->selector = vmcs_read16(sf->selector);
save->base = vmcs_readl(sf->base);
save->limit = vmcs_read32(sf->limit);
save->ar = vmcs_read32(sf->ar_bytes);
vmcs_write16(sf->selector... | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 330,228,898,353,448,940,000,000,000,000,000,000,000 | 13 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
GuestFsfreezeStatus qmp_guest_fsfreeze_status(Error **errp)
{
if (!vss_initialized()) {
error_setg(errp, QERR_UNSUPPORTED);
return 0;
}
if (ga_is_frozen(ga_state)) {
return GUEST_FSFREEZE_STATUS_FROZEN;
}
return GUEST_FSFREEZE_STATUS_THAWED;
} | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 332,926,590,283,207,030,000,000,000,000,000,000,000 | 13 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
sraRgnEmpty(const sraRegion *rgn) {
return sraSpanListEmpty((sraSpanList*)rgn);
} | 0 | [
"CWE-476"
] | libvncserver | 38e98ee61d74f5f5ab4aa4c77146faad1962d6d0 | 61,629,359,696,956,705,000,000,000,000,000,000,000 | 3 | libvncserver: add missing NULL pointer checks |
static int set_map_elem_callback_state(struct bpf_verifier_env *env,
struct bpf_func_state *caller,
struct bpf_func_state *callee,
int insn_idx)
{
struct bpf_insn_aux_data *insn_aux = &env->insn_aux_data[insn_idx];
struct bpf_map *map;
int err;
if (bpf_map_ptr_poisoned(insn_aux)) {... | 0 | [
"CWE-125"
] | bpf | 049c4e13714ecbca567b4d5f6d563f05d431c80e | 339,571,914,807,823,350,000,000,000,000,000,000,000 | 28 | bpf: Fix alu32 const subreg bound tracking on bitwise operations
Fix a bug in the verifier's scalar32_min_max_*() functions which leads to
incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops.
When both the src & dst subreg is a known constant, then the assumption is
that scalar_min_max_*() will... |
zfont_mark_glyph_name(const gs_memory_t *mem, gs_glyph glyph, void *ignore_data)
{
return (glyph >= gs_c_min_std_encoding_glyph || glyph == GS_NO_GLYPH ? false :
name_mark_index(mem, (uint) glyph));
} | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 60,964,562,478,748,540,000,000,000,000,000,000,000 | 5 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
megasas_mgmt_compat_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
switch (cmd) {
case MEGASAS_IOC_FIRMWARE32:
return megasas_mgmt_compat_ioctl_fw(file, arg);
case MEGASAS_IOC_GET_AEN:
return megasas_mgmt_ioctl_aen(file, arg);
}
return -ENOTTY;
} | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 336,300,313,460,074,780,000,000,000,000,000,000,000 | 12 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
void run() {
intrusive_ptr<ExpressionContextForTest> expCtx(new ExpressionContextForTest());
const Document spec = getSpec();
const Value args = spec["input"];
if (!spec["expected"].missing()) {
FieldIterator fields(spec["expected"].getDocument());
while (fiel... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 52,231,415,577,690,690,000,000,000,000,000,000,000 | 46 | SERVER-38070 fix infinite loop in agg expression |
xmlXPtrGetStartPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
if ((obj == NULL) || (node == NULL) || (indx == NULL))
return(-1);
switch (obj->type) {
case XPATH_POINT:
*node = obj->user;
if (obj->index <= 0)
*indx = 0;
else
*indx = obj->index;
return(0);
ca... | 0 | [
"CWE-415"
] | libxml2 | f5048b3e71fc30ad096970b8df6e7af073bae4cb | 167,389,323,034,567,480,000,000,000,000,000,000,000 | 24 | Hardening of XPath evaluation
Add a mechanism of frame for XPath evaluation when entering a function
or a scoped evaluation, also fix a potential problem in predicate
evaluation. |
static int __bmc_get_device_id(struct ipmi_smi *intf, struct bmc_device *bmc,
struct ipmi_device_id *id,
bool *guid_set, guid_t *guid, int intf_num)
{
int rv = 0;
int prev_dyn_id_set, prev_guid_set;
bool intf_set = intf != NULL;
if (!intf) {
mutex_lock(&bmc->dyn_mutex);
retry_bmc_lock:
if (... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 176,041,155,505,042,640,000,000,000,000,000,000,000 | 132 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
int vrend_renderer_resource_create(struct vrend_renderer_resource_create_args *args,
struct iovec *iov, uint32_t num_iovs, void *image_oes)
{
struct vrend_resource *gr;
int ret;
char error_string[256];
ret = check_resource_valid(args, error_string);
if (ret) {
vr... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 2,001,250,916,882,477,000,000,000,000,000,000,000 | 95 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
cl_error_t cli_egg_bzip2_decompress(char* compressed, size_t compressed_size, char** decompressed, size_t* decompressed_size)
{
cl_error_t status = CL_EPARSE;
char* decoded_tmp;
char* decoded = NULL;
uint32_t declen = 0, capacity = 0;
bz_stream stream;
int bzstat;
if (NULL == compressed... | 0 | [
"CWE-476"
] | clamav-devel | 8bb3716be9c7ab7c6a3a1889267b1072f48af87b | 71,721,506,159,610,930,000,000,000,000,000,000,000 | 113 | fuzz-22348 null deref in egg utf8 conversion
Corrected memory leaks and a null dereference in the egg utf8 conversion. |
int flush_master_info(Master_info* mi, bool force)
{
DBUG_ENTER("flush_master_info");
DBUG_ASSERT(mi != NULL && mi->rli != NULL);
/*
The previous implementation was not acquiring locks.
We do the same here. However, this is quite strange.
*/
/*
With the appropriate recovery process, we will not ne... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 243,647,344,528,423,630,000,000,000,000,000,000,000 | 35 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
unsigned int flags)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *ptep, pte;
spinlock_t *ptl;
struct page *page;
struct mm_struct *mm = vma->vm_mm;
page = follow_huge_addr(mm, address, flags & FOLL_WRITE);
if (!IS_ERR(page)) {
BUG... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 147,759,488,797,181,010,000,000,000,000,000,000,000 | 144 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
build_privkey_template (app_t app, int keyno,
const unsigned char *rsa_n, size_t rsa_n_len,
const unsigned char *rsa_e, size_t rsa_e_len,
const unsigned char *rsa_p, size_t rsa_p_len,
const unsigned char *rsa_q, size_t rsa_q... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 160,755,338,427,340,200,000,000,000,000,000,000,000 | 144 | 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 void nested_svm_set_tdp_cr3(struct kvm_vcpu *vcpu,
unsigned long root)
{
struct vcpu_svm *svm = to_svm(vcpu);
svm->vmcb->control.nested_cr3 = __sme_set(root);
mark_dirty(svm->vmcb, VMCB_NPT);
} | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 302,250,471,134,694,960,000,000,000,000,000,000,000 | 8 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
multiply_ms(tmsize_t m1, tmsize_t m2)
{
tmsize_t bytes = m1 * m2;
if (m1 && bytes / m1 != m2)
bytes = 0;
return bytes;
} | 0 | [
"CWE-787"
] | libtiff | aaab5c3c9d2a2c6984f23ccbc79702610439bc65 | 324,082,009,763,283,140,000,000,000,000,000,000,000 | 9 | * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
functions in non debug builds by replacing assert()s by regular if
checks (bugzilla #2522).
Fix potential out-of-bound reads in case of short input data. |
static void set_cr4_guest_host_mask(struct vcpu_vmx *vmx)
{
vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS;
if (enable_ept)
vmx->vcpu.arch.cr4_guest_owned_bits |= X86_CR4_PGE;
if (is_guest_mode(&vmx->vcpu))
vmx->vcpu.arch.cr4_guest_owned_bits &=
~get_vmcs12(&vmx->vcpu)->cr4_guest_host_mask;
v... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 14,218,512,350,142,852,000,000,000,000,000,000,000 | 10 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
static void assign_masked(ulong *dest, ulong src, ulong mask)
{
*dest = (*dest & ~mask) | (src & mask);
} | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 149,699,183,334,669,420,000,000,000,000,000,000,000 | 4 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
unsigned long ring_buffer_entries_cpu(struct trace_buffer *buffer, int cpu)
{
struct ring_buffer_per_cpu *cpu_buffer;
if (!cpumask_test_cpu(cpu, buffer->cpumask))
return 0;
cpu_buffer = buffer->buffers[cpu];
return rb_num_of_entries(cpu_buffer);
} | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 93,619,797,898,609,250,000,000,000,000,000,000,000 | 11 | 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_... |
size_t RemoteIo::Impl::populateBlocks(size_t lowBlock, size_t highBlock)
{
assert(isMalloced_);
// optimize: ignore all true blocks on left & right sides.
while(!blocksMap_[lowBlock].isNone() && lowBlock < highBlock) lowBlock++;
while(!blocksMap_[highBlock].isNone() && highBlo... | 0 | [
"CWE-190"
] | exiv2 | c73d1e27198a389ce7caf52ac30f8e2120acdafd | 119,627,411,693,728,990,000,000,000,000,000,000,000 | 32 | Avoid negative integer overflow when `filesize < io_->tell()`.
This fixes #791. |
snd_compr_tstamp(struct snd_compr_stream *stream, unsigned long arg)
{
struct snd_compr_tstamp tstamp = {0};
int ret;
ret = snd_compr_update_tstamp(stream, &tstamp);
if (ret == 0)
ret = copy_to_user((struct snd_compr_tstamp __user *)arg,
&tstamp, sizeof(tstamp)) ? -EFAULT : 0;
return ret;
} | 0 | [
"CWE-703"
] | linux | 6217e5ede23285ddfee10d2e4ba0cc2d4c046205 | 262,551,229,256,275,280,000,000,000,000,000,000,000 | 11 | ALSA: compress: fix an integer overflow check
I previously added an integer overflow check here but looking at it now,
it's still buggy.
The bug happens in snd_compr_allocate_buffer(). We multiply
".fragments" and ".fragment_size" and that doesn't overflow but then we
save it in an unsigned int so it truncates the h... |
agoo_con_http_events(agooCon c) {
short events = 0;
agooRes res = agoo_con_res_peek(c);
if (NULL != res && NULL != res->message) {
events = POLLIN | POLLOUT;
} else if (!c->closing) {
events = POLLIN;
}
return events;
} | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 123,436,309,665,908,310,000,000,000,000,000,000,000 | 11 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
swab_rect (guint32 *rect)
{
rect[0] = GUINT32_FROM_LE (rect[0]);
rect[1] = GUINT32_FROM_LE (rect[1]);
rect[2] = GUINT32_FROM_LE (rect[2]);
rect[3] = GUINT32_FROM_LE (rect[3]);
} | 0 | [
"CWE-787"
] | gimp | 48ec15890e1751dede061f6d1f469b6508c13439 | 289,248,889,209,183,500,000,000,000,000,000,000,000 | 7 | file-psp: fix for bogus input data. Fixes bug #639203 |
GF_Err gf_isom_remove_track(GF_ISOFile *movie, u32 trackNumber)
{
GF_Err e;
GF_TrackBox *the_trak, *trak;
GF_TrackReferenceTypeBox *tref;
u32 i, j, k, descIndex;
GF_ISOTrackID *newRefs;
u8 found;
GF_ISOSample *samp;
the_trak = gf_isom_get_track_from_file(movie, trackNumber);
if (!the_trak) return GF_BAD_PARAM;... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 251,582,272,212,355,130,000,000,000,000,000,000,000 | 129 | fixed #1706 |
zip_dealloc(zipobject *lz)
{
PyObject_GC_UnTrack(lz);
Py_XDECREF(lz->ittuple);
Py_XDECREF(lz->result);
Py_TYPE(lz)->tp_free(lz);
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 316,677,155,375,377,780,000,000,000,000,000,000,000 | 7 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
}
static inline void f2fs_clear_page_private(struct page *page)
{
if (!PagePrivate(page))
return;
set_page_private(page, 0);
ClearPagePrivate(page); | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 79,087,012,986,812,640,000,000,000,000,000,000,000 | 9 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
read_region_section(FILE *fd, slang_T *lp, int len)
{
int i;
if (len > 16)
return SP_FORMERROR;
for (i = 0; i < len; ++i)
lp->sl_regions[i] = getc(fd); /* <regionname> */
lp->sl_regions[len] = NUL;
return 0;
} | 0 | [
"CWE-190"
] | vim | 399c297aa93afe2c0a39e2a1b3f972aebba44c9d | 178,604,726,536,465,460,000,000,000,000,000,000,000 | 11 | patch 8.0.0322: possible overflow with corrupted spell file
Problem: Possible overflow with spell file where the tree length is
corrupted.
Solution: Check for an invalid length (suggested by shqking) |
void cpudef_init(void)
{
#if defined(cpudef_setup)
cpudef_setup(); /* parse cpu definitions in target config file */
#endif
} | 0 | [
"CWE-20"
] | qemu | 0be839a2701369f669532ea5884c15bead1c6e08 | 79,596,106,876,103,325,000,000,000,000,000,000,000 | 6 | migration: fix parameter validation on ram load
During migration, the values read from migration stream during ram load
are not validated. Especially offset in host_from_stream_offset() and
also the length of the writes in the callers of said function.
To fix this, we need to make sure that the [offset, offset + leng... |
httpErrorNocloseStreamHandler(int status,
FdEventHandlerPtr event,
StreamRequestPtr srequest)
{
HTTPConnectionPtr connection = srequest->data;
if(status == 0 && !streamRequestDone(srequest))
return 0;
httpClientFinish(connection, 0);
... | 0 | [
"CWE-617"
] | polipo | 0e2b44af619e46e365971ea52b97457bc0778cd3 | 104,724,337,001,946,960,000,000,000,000,000,000,000 | 12 | Try to read POST requests to local configuration interface correctly. |
applet_is_any_device_activating (NMApplet *applet)
{
const GPtrArray *devices;
int i;
/* Check for activating devices */
devices = nm_client_get_devices (applet->nm_client);
for (i = 0; devices && (i < devices->len); i++) {
NMDevice *candidate = NM_DEVICE (g_ptr_array_index (devices, i));
NMDeviceState state;... | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 277,291,753,049,184,800,000,000,000,000,000,000,000 | 17 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
static void write_response(ESPState *s)
{
trace_esp_write_response(s->status);
s->ti_buf[0] = s->status;
s->ti_buf[1] = 0;
if (s->dma) {
s->dma_memory_write(s->dma_opaque, s->ti_buf, 2);
s->rregs[ESP_RSTAT] = STAT_TC | STAT_ST;
s->rregs[ESP_RINTR] = INTR_BS | INTR_FC;
s->... | 0 | [
"CWE-787"
] | qemu | 926cde5f3e4d2504ed161ed0cb771ac7cad6fd11 | 330,770,673,743,199,770,000,000,000,000,000,000,000 | 18 | scsi: esp: make cmdbuf big enough for maximum CDB size
While doing DMA read into ESP command buffer 's->cmdbuf', it could
write past the 's->cmdbuf' area, if it was transferring more than 16
bytes. Increase the command buffer size to 32, which is maximum when
's->do_cmd' is set, and add a check on 'len' to avoid OOB ... |
static int do_setvfinfo(struct net_device *dev, struct nlattr **tb)
{
const struct net_device_ops *ops = dev->netdev_ops;
int err = -EINVAL;
if (tb[IFLA_VF_MAC]) {
struct ifla_vf_mac *ivm = nla_data(tb[IFLA_VF_MAC]);
err = -EOPNOTSUPP;
if (ops->ndo_set_vf_mac)
err = ops->ndo_set_vf_mac(dev, ivm->vf,
... | 0 | [
"CWE-200"
] | net | 5f8e44741f9f216e33736ea4ec65ca9ac03036e6 | 284,749,509,871,030,100,000,000,000,000,000,000,000 | 122 | net: fix infoleak in rtnetlink
The stack object “map” has a total size of 32 bytes. Its last 4
bytes are padding generated by compiler. These padding bytes are
not initialized and sent out via “nla_put”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int __init sched_domain_debug_setup(char *str)
{
sched_domain_debug_enabled = 1;
return 0;
} | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 79,763,215,576,022,550,000,000,000,000,000,000,000 | 6 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
GF_Err stbl_AppendPadding(GF_SampleTableBox *stbl, u8 padding)
{
if (!stbl->PaddingBits) {
stbl->PaddingBits = (GF_PaddingBitsBox *) gf_isom_box_new_parent(&stbl->child_boxes, GF_ISOM_BOX_TYPE_PADB);
if (!stbl->PaddingBits) return GF_OUT_OF_MEM;
}
stbl->PaddingBits->padbits = (u8*)gf_realloc(stbl->PaddingBits->p... | 0 | [
"CWE-120",
"CWE-787"
] | gpac | 77ed81c069e10b3861d88f72e1c6be1277ee7eae | 21,685,779,084,877,400,000,000,000,000,000,000,000 | 12 | fixed #1774 (fuzz) |
static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
{
int res = 0;
struct inode *inode = file_inode(filp);
p9_debug(P9_DEBUG_VFS, "filp: %p lock: %p\n", filp, fl);
/* No mandatory locks */
if (__mandatory_lock(inode) && fl->fl_type != F_UNLCK)
return -ENOLCK;
if ((IS_SETLK(cmd) || IS_... | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 53,017,603,056,706,380,000,000,000,000,000,000,000 | 18 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
RZ_API void rz_analysis_extract_vars(RzAnalysis *analysis, RzAnalysisFunction *fcn, RzAnalysisOp *op) {
rz_return_if_fail(analysis && fcn && op);
const char *BP = analysis->reg->name[RZ_REG_NAME_BP];
const char *SP = analysis->reg->name[RZ_REG_NAME_SP];
if (BP) {
extract_arg(analysis, fcn, op, BP, "+", RZ_ANALYS... | 1 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 339,889,037,033,291,400,000,000,000,000,000,000,000 | 11 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static int file_read(struct tcmu_device *dev, struct tcmulib_cmd *cmd,
struct iovec *iov, size_t iov_cnt, size_t length,
off_t offset)
{
struct file_state *state = tcmu_get_dev_private(dev);
size_t remaining = length;
ssize_t ret;
while (remaining) {
ret = preadv(state->fd, iov, iov_cnt, offset);
... | 0 | [
"CWE-200"
] | tcmu-runner | 8cf8208775022301adaa59c240bb7f93742d1329 | 236,164,176,344,928,250,000,000,000,000,000,000,000 | 32 | removed all check_config callback implementations to avoid security issues
see github issue #194
qcow.c contained an information leak, could test for existance of any
file in the system
file_example.c and file_optical.c allow also to test for existance of
any file, plus to temporarily create empty new files anywhere... |
int CLASS parse_tiff_ifd(int base)
{
unsigned entries, tag, type, len, plen = 16, save;
int ifd, use_cm = 0, cfa, i, j, c, ima_len = 0;
char *cbuf, *cp;
uchar cfa_pat[16], cfa_pc[] = {0, 1, 2, 3}, tab[256];
double fm[3][4], cc[4][4], cm[4][3], cam_xyz[4][3], num;
double ab[] = {1, 1, 1, 1}, asn[] = {0, 0, 0... | 0 | [
"CWE-400"
] | LibRaw | e67a9862d10ebaa97712f532eca1eb5e2e410a22 | 209,446,621,080,287,430,000,000,000,000,000,000,000 | 1,323 | Fixed Secunia Advisory SA86384
- possible infinite loop in unpacked_load_raw()
- possible infinite loop in parse_rollei()
- possible infinite loop in parse_sinar_ia()
Credits: Laurent Delosieres, Secunia Research at Flexera |
oop MemberNameTable::find_or_add_member_name(jweak mem_name_wref) {
assert_locked_or_safepoint(MemberNameTable_lock);
oop new_mem_name = JNIHandles::resolve(mem_name_wref);
// Find matching member name in the list.
// This is linear because these are short lists.
int len = this->length();
int new_index = l... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 246,958,200,344,295,240,000,000,000,000,000,000,000 | 30 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
uint32_t GetPayloadTime(size_t handle, uint32_t index, float *in, float *out)
{
mp4object *mp4 = (mp4object *)handle;
if (mp4 == NULL) return 0;
if (mp4->metaoffsets == 0 || mp4->basemetadataduration == 0 || mp4->meta_clockdemon == 0 || in == NULL || out == NULL) return 1;
*in = (float)((double)index * (double)mp... | 1 | [
"CWE-125",
"CWE-369",
"CWE-787"
] | gpmf-parser | 341f12cd5b97ab419e53853ca00176457c9f1681 | 240,146,925,824,367,840,000,000,000,000,000,000,000 | 11 | fixed many security issues with the too crude mp4 reader |
static void svm_cpuid_update(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
vcpu->arch.xsaves_enabled = guest_cpuid_has(vcpu, X86_FEATURE_XSAVE) &&
boot_cpu_has(X86_FEATURE_XSAVE) &&
boot_cpu_has(X86_FEATURE_XSAVES);
/* Update nrips enabled cache */
svm->nrips_enabled = kvm_cpu_cap_... | 0 | [
"CWE-835"
] | linux | e72436bc3a5206f95bb384e741154166ddb3202e | 243,815,664,031,038,430,000,000,000,000,000,000,000 | 31 | KVM: SVM: avoid infinite loop on NPF from bad address
When a nested page fault is taken from an address that does not have
a memslot associated to it, kvm_mmu_do_page_fault returns RET_PF_EMULATE
(via mmu_set_spte) and kvm_mmu_page_fault then invokes svm_need_emulation_on_page_fault.
The default answer there is to re... |
_pwgPageSizeForMedia(
pwg_media_t *media, /* I - Media */
char *name, /* I - PageSize name buffer */
size_t namesize) /* I - Size of name buffer */
{
const char *sizeptr, /* Pointer to size in PWG name */
*dimptr; /* Pointer to dimensions in PWG name */
/*
* Range check input...... | 0 | [
"CWE-93"
] | cups | 07428f6a640ff93aa0b4cc69ca372e2cf8490e41 | 207,256,358,210,138,300,000,000,000,000,000,000,000 | 52 | Only list supported PDLs (Issue #4923) |
DEFUN(goLine, GOTO_LINE, "Go to the specified line")
{
char *str = searchKeyData();
if (prec_num)
_goLine("^");
else if (str)
_goLine(str);
else
/* FIXME: gettextize? */
_goLine(inputStr("Goto line: ", ""));
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 177,540,319,452,349,500,000,000,000,000,000,000,000 | 12 | Make temporary directory safely when ~/.w3m is unwritable |
httpConnect2(
const char *host, /* I - Host to connect to */
int port, /* I - Port number */
http_addrlist_t *addrlist, /* I - List of addresses or @code NULL@ to lookup */
int family, /* I - Address family to use or @code AF_UNSPEC@ for any */
http_encryption... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 133,358,182,385,651,760,000,000,000,000,000,000,000 | 38 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
Node() : camera(-1), skin(-1), mesh(-1) {} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 250,291,158,486,867,930,000,000,000,000,000,000,000 | 1 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
PackLinuxElf64::invert_pt_dynamic(Elf64_Dyn const *dynp)
{
if (dt_table[Elf64_Dyn::DT_NULL]) {
return; // not 1st time; do not change upx_dt_init
}
Elf64_Dyn const *const dynp0 = dynp;
unsigned ndx = 1+ 0;
if (dynp)
for (; ; ++ndx, ++dynp) {
upx_uint64_t const d_tag = get_te64(&... | 1 | [
"CWE-703",
"CWE-369"
] | upx | eb90eab6325d009004ffb155e3e33f22d4d3ca26 | 37,378,469,729,196,886,000,000,000,000,000,000,000 | 131 | Detect bogus DT_SYMENT.
https://github.com/upx/upx/issues/331
modified: p_lx_elf.cpp |
void NumberFormatTest::TestSurrogateSupport(void) {
UErrorCode status = U_ZERO_ERROR;
DecimalFormatSymbols custom(Locale::getUS(), status);
CHECK(status, "DecimalFormatSymbols constructor");
custom.setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, "decimal");
custom.setSymbol(DecimalFormatSy... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 250,716,003,459,174,050,000,000,000,000,000,000,000 | 68 | ICU-20246 Fixing another integer overflow in number parsing. |
static uint8_t next_transaction_id(uint8_t id)
{
return (((id + 1) & XACT_ID_MAX) | (id & (XACT_ID_MAX+1)));
} | 0 | [
"CWE-787"
] | zephyr | 6ec31c852049641095f2cdf25591f2e1bff86774 | 330,290,631,414,290,870,000,000,000,000,000,000,000 | 4 | Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU
When receiving Transaction Start PDU, assure that number of segments
needed to send a Provisioning PDU with TotalLength size is equal to SegN
value provided in the Transaction Start PDU.
Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no>
(cher... |
**/
CImg<T>& cumulate(const char axis=0) {
switch (cimg::lowercase(axis)) {
case 'x' :
cimg_pragma_openmp(parallel for collapse(3) cimg_openmp_if(_width>=512 && _height*_depth*_spectrum>=16))
cimg_forYZC(*this,y,z,c) {
T *ptrd = data(0,y,z,c);
Tlong cumul = (Tlong... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 279,542,860,993,466,800,000,000,000,000,000,000,000 | 44 | Fix other issues in 'CImg<T>::load_bmp()'. |
string_get_localpart(address_item * addr, gstring * yield)
{
uschar * s;
s = addr->prefix;
if (testflag(addr, af_include_affixes) && s)
{
#ifdef SUPPORT_I18N
if (testflag(addr, af_utf8_downcvt))
s = string_localpart_utf8_to_alabel(s, NULL);
#endif
yield = string_cat(yield, s);
}
s = addr->local_part;
#ifd... | 0 | [
"CWE-78"
] | exim | d740d2111f189760593a303124ff6b9b1f83453d | 249,042,750,905,022,400,000,000,000,000,000,000,000 | 33 | Fix CVE-2019-10149 |
void jas_matrix_asl(jas_matrix_t *matrix, int n)
{
int i;
int j;
jas_seqent_t *rowstart;
int rowstep;
jas_seqent_t *data;
rowstep = jas_matrix_rowstep(matrix);
for (i = matrix->numrows_, rowstart = matrix->rows_[0]; i > 0; --i,
rowstart += rowstep) {
for (j = matrix->numcols_, data = rowstart; j > 0; --j,
... | 1 | [
"CWE-20"
] | jasper | c87ad330a8b8d6e5eb0065675601fdfae08ebaab | 174,502,462,739,640,650,000,000,000,000,000,000,000 | 17 | Added fix for CVE-2016-2089. |
static ssize_t aio_setup_single_vector(struct kiocb *kiocb,
int rw, char __user *buf,
unsigned long *nr_segs,
size_t len,
struct iovec *iovec)
{
if (unlikely(!access_ok(!rw, buf, len)))
return -EFAULT;
iovec->iov_base = buf;
iovec->iov_len = len;
*nr_segs = 1;
return ... | 1 | [
"CWE-703"
] | linux | 4c185ce06dca14f5cea192f5a2c981ef50663f2b | 17,685,527,957,282,691,000,000,000,000,000,000,000 | 14 | aio: lift iov_iter_init() into aio_setup_..._rw()
the only non-trivial detail is that we do it before rw_verify_area(),
so we'd better cap the length ourselves in aio_setup_single_rw()
case (for vectored case rw_copy_check_uvector() will do that for us).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static void dump_vmcs(void)
{
u32 vmentry_ctl = vmcs_read32(VM_ENTRY_CONTROLS);
u32 vmexit_ctl = vmcs_read32(VM_EXIT_CONTROLS);
u32 cpu_based_exec_ctrl = vmcs_read32(CPU_BASED_VM_EXEC_CONTROL);
u32 pin_based_exec_ctrl = vmcs_read32(PIN_BASED_VM_EXEC_CONTROL);
u32 secondary_exec_control = 0;
unsigned long cr4 = vm... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 145,841,155,056,638,860,000,000,000,000,000,000,000 | 139 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
_outA_ArrayExpr(StringInfo str, const A_ArrayExpr *node)
{
WRITE_NODE_TYPE("A_ARRAYEXPR");
WRITE_NODE_FIELD(elements);
WRITE_LOCATION_FIELD(location);
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 126,729,650,289,411,130,000,000,000,000,000,000,000 | 7 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
xmlSplitQName2(const xmlChar *name, xmlChar **prefix) {
int len = 0;
xmlChar *ret = NULL;
if (prefix == NULL) return(NULL);
*prefix = NULL;
if (name == NULL) return(NULL);
#ifndef XML_XML_NAMESPACE
/* xml: prefix is not really a namespace */
if ((name[0] == 'x') && (name[1] == 'm') &&
... | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 219,283,350,116,160,200,000,000,000,000,000,000,000 | 46 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
pgp_seek_blob(sc_card_t *card, pgp_blob_t *root, unsigned int id,
pgp_blob_t **ret)
{
pgp_blob_t *child;
int r;
if ((r = pgp_get_blob(card, root, id, ret)) == 0)
/* the sought blob is right under root */
return r;
/* not found, seek deeper */
for (child = root->files; child; child = child->next) {
/* T... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 64,989,735,226,979,880,000,000,000,000,000,000,000 | 23 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
void lcdSetPixel_ArrayBuffer_flat(JsGraphics *gfx, short x, short y, unsigned int col) {
lcdSetPixels_ArrayBuffer_flat(gfx, x, y, 1, col);
} | 0 | [
"CWE-125"
] | Espruino | 8a44b04b584b3d3ab1cb68fed410f7ecb165e50e | 69,830,592,577,072,350,000,000,000,000,000,000,000 | 3 | Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421) |
xmlTreeErrMemory(const char *extra)
{
__xmlSimpleError(XML_FROM_TREE, XML_ERR_NO_MEMORY, NULL, NULL, extra);
} | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 204,932,373,661,070,700,000,000,000,000,000,000,000 | 4 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
static int path_parentat(struct nameidata *nd, unsigned flags,
struct path *parent)
{
const char *s = path_init(nd, flags);
int err = link_path_walk(s, nd);
if (!err)
err = complete_walk(nd);
if (!err) {
*parent = nd->path;
nd->path.mnt = NULL;
nd->path.dentry = NULL;
}
terminate_walk(nd);
return err... | 0 | [
"CWE-416",
"CWE-284"
] | linux | d0cb50185ae942b03c4327be322055d622dc79f6 | 85,063,775,780,821,235,000,000,000,000,000,000,000 | 15 | 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> |
int main()
{
gdImagePtr im;
FILE *fp;
fp = gdTestFileOpen2("gif", "php_bug_75571.gif");
gdTestAssert(fp != NULL);
im = gdImageCreateFromGif(fp);
gdTestAssert(im == NULL);
fclose(fp);
return gdNumFailures();
} | 0 | [
"CWE-681"
] | libgd | a11f47475e6443b7f32d21f2271f28f417e2ac04 | 254,922,445,461,762,960,000,000,000,000,000,000,000 | 13 | Fix #420: Potential infinite loop in gdImageCreateFromGifCtx
Due to a signedness confusion in `GetCode_` a corrupt GIF file can
trigger an infinite loop. Furthermore we make sure that a GIF without
any palette entries is treated as invalid *after* open palette entries
have been removed.
CVE-2018-5711
See also https... |
void sqlite3VdbeResetStepResult(Vdbe *p){
p->rc = SQLITE_OK;
} | 0 | [
"CWE-755"
] | sqlite | 8654186b0236d556aa85528c2573ee0b6ab71be3 | 100,281,965,441,700,010,000,000,000,000,000,000,000 | 3 | When an error occurs while rewriting the parser tree for window functions
in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set,
and make sure that this shuts down any subsequent code generation that might
depend on the transformations that were implemented. This fixes a problem
discovered by the Y... |
PHP_METHOD(snmp, close)
{
php_snmp_object *snmp_object;
zval *object = getThis();
snmp_object = Z_SNMP_P(object);
if (zend_parse_parameters_none() == FAILURE) {
RETURN_FALSE;
}
netsnmp_session_free(&(snmp_object->session));
RETURN_TRUE;
} | 0 | [
"CWE-20"
] | php-src | 6e25966544fb1d2f3d7596e060ce9c9269bbdcf8 | 165,175,824,228,993,320,000,000,000,000,000,000,000 | 15 | Fixed bug #71704 php_snmp_error() Format String Vulnerability |
static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
{
AVStream *st;
MOVStreamContext *sc;
enum AVCodecID id;
int ret;
switch (type) {
case 0xd: id = AV_CODEC_ID_MJPEG; break;
case 0xe: id = AV_CODEC_ID_PNG; break;
case 0x1b: id = AV_CODEC_ID_BMP; break;
... | 0 | [
"CWE-703"
] | FFmpeg | c953baa084607dd1d84c3bfcce3cf6a87c3e6e05 | 158,991,819,911,914,570,000,000,000,000,000,000,000 | 39 | avformat/mov: Check count sums in build_open_gop_key_points()
Fixes: ffmpeg.md
Fixes: Out of array access
Fixes: CVE-2022-2566
Found-by: Andy Nguyen <theflow@google.com>
Found-by: 3pvd <3pvd@google.com>
Reviewed-by: Andy Nguyen <theflow@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
vte_sequence_handler_sr (VteTerminal *terminal, GValueArray *params)
{
long start, end;
VteScreen *screen;
screen = terminal->pvt->screen;
if (screen->scrolling_restricted) {
start = screen->scrolling_region.start + screen->insert_delta;
end = screen->scrolling_region.end + screen->insert_delta;
} else {
s... | 0 | [] | vte | 8b971a7b2c59902914ecbbc3915c45dd21530a91 | 134,261,939,098,117,740,000,000,000,000,000,000,000 | 34 | Fix terminal title reporting
Fixed CVE-2003-0070 again.
See also http://marc.info/?l=bugtraq&m=104612710031920&w=2 .
(cherry picked from commit 6042c75b5a6daa0e499e61c8e07242d890d38ff1) |
writeTarData(
#ifdef HAVE_LIBZ
gzFile ztarfile,
#endif
FILE *tarfile, char *buf, int r, char *current_file)
{
#ifdef HAVE_LIBZ
if (ztarfile != NULL)
{
if (gzwrite(ztarfile, buf, r) != r)
{
fprintf(stderr,
_("%s: could not write to compressed file \"%s\": %s\n"),
progname, current_file, get_gz... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 40,939,404,534,089,156,000,000,000,000,000,000,000 | 28 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
WriteAdtsHeader(AP4_ByteStream& output,
unsigned int frame_size,
unsigned int sampling_frequency_index,
unsigned int channel_configuration)
{
unsigned char bits[7];
bits[0] = 0xFF;
bits[1] = 0xF1; // 0xF9 (MPEG2)
bits[2] = 0x40 | (sampling_frequency_index... | 0 | [
"CWE-703"
] | Bento4 | 33331ce2d35d45d855af7441db6116b4a9e2b70f | 204,665,149,348,748,440,000,000,000,000,000,000,000 | 40 | fix #691 |
static double percentage(i64 num, i64 den)
{
double d_num, d_den;
if (den < 100) {
d_num = num * 100;
d_den = den;
if (!d_den)
d_den = 1;
} else {
d_num = num;
d_den = den / 100;
}
return d_num / d_den;
} | 0 | [
"CWE-703"
] | lrzip | 4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4 | 47,426,215,030,812,590,000,000,000,000,000,000,000 | 15 | Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. |
static int query_get_string_answer(cmd_request_t cmd)
{
struct booth_site *site;
struct boothc_hdr_msg reply;
struct boothc_header *header;
char *data;
int data_len;
int rv;
struct booth_transport const *tpt;
int (*test_reply_f) (cmd_result_t reply_code, cmd_request_t cmd);
size_t msg_size;
void *request;
i... | 0 | [
"CWE-287",
"CWE-284"
] | booth | 35bf0b7b048d715f671eb68974fb6b4af6528c67 | 74,273,591,707,448,065,000,000,000,000,000,000,000 | 79 | Revert "Refactor: main: substitute is_auth_req macro"
This reverts commit da79b8ba28ad4837a0fee13e5f8fb6f89fe0e24c.
authfile != authkey
Signed-off-by: Jan Friesse <jfriesse@redhat.com> |
PyString_FromFormat(const char *format, ...)
{
PyObject* ret;
va_list vargs;
#ifdef HAVE_STDARG_PROTOTYPES
va_start(vargs, format);
#else
va_start(vargs);
#endif
ret = PyString_FromFormatV(format, vargs);
va_end(vargs);
return ret;
} | 0 | [
"CWE-190"
] | cpython | c3c9db89273fabc62ea1b48389d9a3000c1c03ae | 182,346,414,360,560,330,000,000,000,000,000,000,000 | 14 | [2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174) |
const SlicePtr& back() const { return ring_[internalIndex(size_ - 1)]; } | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 7,403,347,792,809,913,000,000,000,000,000,000,000 | 1 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
const AsyncTransportCertificate* AsyncSSLSocket::getPeerCertificate() const {
if (peerCertData_) {
return peerCertData_.get();
}
if (ssl_ != nullptr) {
auto peerX509 = SSL_get_peer_certificate(ssl_.get());
if (peerX509) {
// already up ref'd
folly::ssl::X509UniquePtr peer(peerX509);
... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 90,035,018,196,985,250,000,000,000,000,000,000,000 | 16 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
Network::DrainDecision& ListenerFactoryContextBaseImpl::drainDecision() { return *this; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 179,754,034,720,924,350,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon) {
const char *quotestr = "`";
const char *tick = NULL;
char *ptr, *ptr2, *str;
char *arroba = NULL;
int i, ret = 0, pipefd;
bool usemyblock = false;
int scr_html = -1;
int scr_color = -1;
bool eos = false;
bool haveQuote = false;
if (!cmd) {... | 1 | [
"CWE-119",
"CWE-787"
] | radare2 | 00e8f205475332d7842d0f0d1481eeab4e83017c | 28,499,214,244,404,140,000,000,000,000,000,000,000 | 758 | Fix #7727 - undefined pointers and out of band string access fixes |
static void sctp_v4_pf_init(void)
{
/* Initialize the SCTP specific PF functions. */
sctp_register_pf(&sctp_pf_inet, PF_INET);
sctp_register_af(&sctp_af_inet);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 8e2d61e0aed2b7c4ecb35844fe07e0b2b762dee4 | 266,455,749,680,068,670,000,000,000,000,000,000,000 | 6 | sctp: fix race on protocol/netns initialization
Consider sctp module is unloaded and is being requested because an user
is creating a sctp socket.
During initialization, sctp will add the new protocol type and then
initialize pernet subsys:
status = sctp_v4_protosw_init();
if (status)
... |
e_book_backend_ldap_notify_online_cb (EBookBackend *backend,
GParamSpec *pspec)
{
EBookBackendLDAP *bl = E_BOOK_BACKEND_LDAP (backend);
/* Cancel all running operations */
ldap_cancel_all_operations (backend);
if (!e_backend_get_online (E_BACKEND (backend))) {
/* Go offline... | 0 | [] | evolution-data-server | 34bad61738e2127736947ac50e0c7969cc944972 | 17,387,984,750,384,192,000,000,000,000,000,000,000 | 33 | Bug 796174 - strcat() considered unsafe for buffer overflow |
static void fix_hostname(struct SessionHandle *data,
struct connectdata *conn, struct hostname *host)
{
size_t len;
#ifndef USE_LIBIDN
(void)data;
(void)conn;
#elif defined(CURL_DISABLE_VERBOSE_STRINGS)
(void)conn;
#endif
/* set the name we use to display the host name */
host->di... | 0 | [
"CWE-119"
] | curl | 0583e87ada7a3cfb10904ae4ab61b339582c5bd3 | 327,923,086,832,638,570,000,000,000,000,000,000,000 | 63 | fix_hostname: zero length host name caused -1 index offset
If a URL is given with a zero-length host name, like in "http://:80" or
just ":80", `fix_hostname()` will index the host name pointer with a -1
offset (as it blindly assumes a non-zero length) and both read and
assign that address.
CVE-2015-3144
Bug: http://... |
static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s)
{
BlockDriverState *source = s->mirror_top_bs->backing->bs;
MirrorOp *pseudo_op;
int64_t offset;
uint64_t delay_ns = 0, ret = 0;
/* At least the first dirty chunk is mirrored in one iteration. */
int nb_chunks = 1;
bool write_z... | 0 | [
"CWE-476"
] | qemu | 66fed30c9cd11854fc878a4eceb507e915d7c9cd | 264,131,357,542,127,500,000,000,000,000,000,000,000 | 137 | block/mirror: fix NULL pointer dereference in mirror_wait_on_conflicts()
In mirror_iteration() we call mirror_wait_on_conflicts() with
`self` parameter set to NULL.
Starting from commit d44dae1a7c we dereference `self` pointer in
mirror_wait_on_conflicts() without checks if it is not NULL.
Backtrace:
Program termi... |
static void __exit rbd_exit(void)
{
ida_destroy(&rbd_dev_id_ida);
rbd_sysfs_cleanup();
if (single_major)
unregister_blkdev(rbd_major, RBD_DRV_NAME);
destroy_workqueue(rbd_wq);
rbd_slab_exit();
} | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 15,145,220,578,523,788,000,000,000,000,000,000,000 | 9 | 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... |
static int proc_sys_delete(const struct dentry *dentry)
{
return !!PROC_I(d_inode(dentry))->sysctl->unregistering;
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 206,176,564,509,294,300,000,000,000,000,000,000,000 | 4 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
_copyBitmapAnd(const BitmapAnd *from)
{
BitmapAnd *newnode = makeNode(BitmapAnd);
/*
* copy node superclass fields
*/
CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
*/
COPY_NODE_FIELD(bitmapplans);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 317,718,714,495,884,420,000,000,000,000,000,000,000 | 16 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
void udp_set_csum(bool nocheck, struct sk_buff *skb,
__be32 saddr, __be32 daddr, int len)
{
struct udphdr *uh = udp_hdr(skb);
if (nocheck) {
uh->check = 0;
} else if (skb_is_gso(skb)) {
uh->check = ~udp_v4_check(len, saddr, daddr, 0);
} else if (skb->ip_summed == CHECKSUM_PARTIAL) {
uh->check = 0;
uh->... | 0 | [] | linux | a612769774a30e4fc143c4cb6395c12573415660 | 215,594,302,923,327,200,000,000,000,000,000,000,000 | 21 | udp: prevent bugcheck if filter truncates packet too much
If socket filter truncates an udp packet below the length of UDP header
in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a
BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if
kernel is configured that way) can be easily enfo... |
static int piv_get_key(sc_card_t *card, unsigned int alg_id, u8 **key, size_t *len)
{
int r;
size_t fsize;
FILE *f = NULL;
char * keyfilename = NULL;
size_t expected_keylen;
size_t keylen;
u8 * keybuf = NULL;
u8 * tkey = NULL;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
keyfilename = (char *)getenv("P... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 246,526,814,575,912,270,000,000,000,000,000,000,000 | 103 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
struct inode *inode_insert5(struct inode *inode, unsigned long hashval,
int (*test)(struct inode *, void *),
int (*set)(struct inode *, void *), void *data)
{
struct hlist_head *head = inode_hashtable + hash(inode->i_sb, hashval);
struct inode *old;
bool creating = inode->i_state & I_CREATING;
again:
... | 0 | [
"CWE-416"
] | tip | 8019ad13ef7f64be44d4f892af9c840179009254 | 240,957,848,943,769,520,000,000,000,000,000,000,000 | 47 | futex: Fix inode life-time issue
As reported by Jann, ihold() does not in fact guarantee inode
persistence. And instead of making it so, replace the usage of inode
pointers with a per boot, machine wide, unique inode identifier.
This sequence number is global, but shared (file backed) futexes are
rare enough that thi... |
longlong Field_timestamp::val_int(void)
{
MYSQL_TIME ltime;
if (get_date(<ime, TIME_NO_ZERO_DATE))
return 0;
return ltime.year * 10000000000LL + ltime.month * 100000000LL +
ltime.day * 1000000L + ltime.hour * 10000L +
ltime.minute * 100 + ltime.second;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 188,689,395,264,212,400,000,000,000,000,000,000,000 | 10 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.