func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
utf16le_mbc_to_code(const UChar* p, const UChar* end ARG_UNUSED)
{
OnigCodePoint code;
UChar c0 = *p;
UChar c1 = *(p+1);
if (UTF16_IS_SURROGATE_FIRST(c1)) {
code = ((((c1 - 0xd8) << 2) + ((c0 & 0xc0) >> 6) + 1) << 16)
+ ((((c0 & 0x3f) << 2) + (p[3] - 0xdc)) << 8)
+ p[2];
}
else {
... | 1 | [
"CWE-125"
] | php-src | 9d6c59eeea88a3e9d7039cb4fed5126ef704593a | 89,396,009,701,612,820,000,000,000,000,000,000,000 | 16 | Fix bug #77418 - Heap overflow in utf32be_mbc_to_code |
int kvm_lapic_reg_read(struct kvm_lapic *apic, u32 offset, int len,
void *data)
{
unsigned char alignment = offset & 0xf;
u32 result;
/* this bitmask has a bit cleared for each reserved register */
u64 valid_reg_mask =
APIC_REG_MASK(APIC_ID) |
APIC_REG_MASK(APIC_LVR) |
APIC_REG_MASK(APIC_TASKPRI) |
APIC_R... | 0 | [
"CWE-703",
"CWE-459"
] | linux | f7d8a19f9a056a05c5c509fa65af472a322abfee | 340,264,662,784,022,100,000,000,000,000,000,000,000 | 57 | Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
Revert a change to open code bits of kvm_lapic_set_base() when emulating
APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base
and apic_hw_disabled being unsyncrhonized when the APIC is created. If
kvm_arch_vcpu_crea... |
static int is_branch_taken(struct bpf_reg_state *reg, u64 val, u8 opcode,
bool is_jmp32)
{
struct bpf_reg_state reg_lo;
s64 sval;
if (__is_pointer_value(false, reg))
return -1;
if (is_jmp32) {
reg_lo = *reg;
reg = ®_lo;
/* For JMP32, only low 32 bits are compared, coerce_reg_to_size
* could tr... | 0 | [] | linux | 294f2fc6da27620a506e6c050241655459ccd6bd | 69,284,623,599,222,450,000,000,000,000,000,000,000 | 111 | bpf: Verifer, adjust_scalar_min_max_vals to always call update_reg_bounds()
Currently, for all op verification we call __red_deduce_bounds() and
__red_bound_offset() but we only call __update_reg_bounds() in bitwise
ops. However, we could benefit from calling __update_reg_bounds() in
BPF_ADD, BPF_SUB, and BPF_MUL case... |
static __be32 nfsd4_decode_cb_sec(struct nfsd4_compoundargs *argp, struct nfsd4_cb_sec *cbs)
{
DECODE_HEAD;
u32 dummy, uid, gid;
char *machine_name;
int i;
int nr_secflavs;
/* callback_sec_params4 */
READ_BUF(4);
nr_secflavs = be32_to_cpup(p++);
if (nr_secflavs)
cbs->flavor = (u32)(-1);
else
/* Is this l... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 210,489,572,920,461,950,000,000,000,000,000,000,000 | 79 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
f_setfperm(typval_T *argvars, typval_T *rettv)
{
char_u *fname;
char_u modebuf[NUMBUFLEN];
char_u *mode_str;
int i;
int mask;
int mode = 0;
rettv->vval.v_number = 0;
fname = tv_get_string_chk(&argvars[0]);
if (fname == NULL)
return;
mode_str = tv_get_string_buf_chk(&argvars[... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 32,505,076,987,196,110,000,000,000,000,000,000,000 | 31 | 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. |
xml_unload_external_entity(const char *URI, xmlCharEncoding enc) {
return NULL;
} | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 260,988,033,907,954,870,000,000,000,000,000,000,000 | 3 | Added SecXmlExternalEntity |
count_to_stopped(i_ctx_t *i_ctx_p, long mask)
{
ref_stack_enum_t rsenum;
uint scanned = 0;
ref_stack_enum_begin(&rsenum, &e_stack);
do {
uint used = rsenum.size;
es_ptr ep = rsenum.ptr + used - 1;
uint count = used;
for (; count; count--, ep--) {
if (r_is_es... | 0 | [
"CWE-200"
] | ghostpdl | 34cc326eb2c5695833361887fe0b32e8d987741c | 258,733,427,536,862,100,000,000,000,000,000,000,000 | 22 | Bug 699927: don't include operator arrays in execstack output
When we transfer the contents of the execution stack into the array, take the
extra step of replacing any operator arrays on the stack with the operator
that reference them.
This prevents the contents of Postscript defined, internal only operators (those
c... |
handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka,
sigset_t *oldset, struct pt_regs *regs, int in_syscall)
{
DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n",
sig, ka, info, oldset, regs);
/* Set up the stack frame */
if (!setup_rt_frame(sig, ka, info, oldset, r... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 193,075,562,874,882,900,000,000,000,000,000,000,000 | 18 | 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... |
Settable_routine_parameter() {} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 153,770,137,555,995,560,000,000,000,000,000,000,000 | 1 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
void handshakeErr(
AsyncSSLSocket* /* sock */,
const AsyncSocketException& ex) noexcept override {
std::lock_guard<std::mutex> g(mutex_);
cv_.notify_all();
std::cerr << "HandshakeCallback::handshakeError " << ex.what() << std::endl;
state = (expect_ == EXPECT_ERROR) ? STATE_SUCCEEDED : STA... | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 242,818,167,942,926,520,000,000,000,000,000,000,000 | 13 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
optval_default(struct vimoption *p, char_u *varp, int compatible)
{
int dvi;
if (varp == NULL)
return TRUE; // hidden option is always at default
dvi = ((p->flags & P_VI_DEF) || compatible) ? VI_DEFAULT : VIM_DEFAULT;
if (p->flags & P_NUM)
return (*(long *)varp == (long)(long_i)p->def_val[dvi]);... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 8,530,070,602,991,339,000,000,000,000,000,000,000 | 16 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
ldns_rr_new_frm_fp_l(ldns_rr **newrr, FILE *fp, uint32_t *default_ttl, ldns_rdf **origin, ldns_rdf **prev, int *line_nr)
{
char *line;
const char *endptr; /* unused */
ldns_rr *rr;
uint32_t ttl;
ldns_rdf *tmp;
ldns_status s;
ssize_t size;
int offset = 0;
if (default_ttl) {
ttl = *default_ttl;
} else {
t... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 187,911,187,622,159,800,000,000,000,000,000,000,000 | 86 | CAA and URI |
int ha_myisam::index_prev(uchar *buf)
{
MYSQL_INDEX_READ_ROW_START(table_share->db.str, table_share->table_name.str);
DBUG_ASSERT(inited==INDEX);
ha_statistic_increment(&SSV::ha_read_prev_count);
int error=mi_rprev(file,buf, active_index);
table->status=error ? STATUS_NOT_FOUND: 0;
MYSQL_INDEX_READ_ROW_DONE... | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 195,092,211,766,220,900,000,000,000,000,000,000,000 | 10 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
int mbedtls_ssl_send_fatal_handshake_failure( mbedtls_ssl_context *ssl )
{
return( mbedtls_ssl_send_alert_message( ssl,
MBEDTLS_SSL_ALERT_LEVEL_FATAL,
MBEDTLS_SSL_ALERT_MSG_HANDSHAKE_FAILURE ) );
} | 0 | [
"CWE-787"
] | mbedtls | f333dfab4a6c2d8a604a61558a8f783145161de4 | 216,307,064,949,958,280,000,000,000,000,000,000,000 | 6 | More SSL debug messages for ClientHello parsing
In particular, be verbose when checking the ClientHello cookie in a possible
DTLS reconnection.
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com> |
static int nested_svm_intercept(struct vcpu_svm *svm)
{
u32 exit_code = svm->vmcb->control.exit_code;
int vmexit = NESTED_EXIT_HOST;
switch (exit_code) {
case SVM_EXIT_MSR:
vmexit = nested_svm_exit_handled_msr(svm);
break;
case SVM_EXIT_IOIO:
vmexit = nested_svm_intercept_ioio(svm);
break;
case SVM_EXIT_... | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 152,329,118,641,346,160,000,000,000,000,000,000,000 | 47 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
static void snap_vcsa_rawfb(void) {
int n;
char *dst;
char buf[32];
int i, len, del;
unsigned char rows, cols, xpos, ypos;
static int prev_rows = -1, prev_cols = -1;
static unsigned char prev_xpos = -1, prev_ypos = -1;
static char *vcsabuf = NULL;
static char *vcsabuf0 = NULL;
static unsigned int color_tab[1... | 0 | [
"CWE-862",
"CWE-284",
"CWE-732"
] | x11vnc | 69eeb9f7baa14ca03b16c9de821f9876def7a36a | 112,576,021,905,253,000,000,000,000,000,000,000,000 | 190 | scan: limit access to shared memory segments to current user |
static int slab_unmergeable(struct kmem_cache *s)
{
if (slub_nomerge || (s->flags & SLUB_NEVER_MERGE))
return 1;
if (s->ctor)
return 1;
/*
* We may have set a slab to be unmergeable during bootstrap.
*/
if (s->refcount < 0)
return 1;
return 0;
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 295,561,595,667,113,200,000,000,000,000,000,000,000 | 16 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
static int io_grab_files(struct io_kiocb *req)
{
int ret = -EBADF;
struct io_ring_ctx *ctx = req->ctx;
if (req->work.files)
return 0;
if (!ctx->ring_file)
return -EBADF;
rcu_read_lock();
spin_lock_irq(&ctx->inflight_lock);
/*
* We use the f_ops->flush() handler to ensure that we can flush
* out work ac... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 40,848,233,943,026,205,000,000,000,000,000,000,000 | 29 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
static bool checkExtract() {
#if __WINDOWS__
if (r_sys_cmd ("expand -? >nul") != 0) {
return false;
}
#else
if (r_sys_cmd ("cabextract -v > /dev/null") != 0) {
return false;
}
#endif
return true;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 284,833,997,981,454,500,000,000,000,000,000,000,000 | 12 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
static UINT gdi_StartFrame(RdpgfxClientContext* context, const RDPGFX_START_FRAME_PDU* startFrame)
{
rdpGdi* gdi = (rdpGdi*)context->custom;
gdi->inGfxFrame = TRUE;
return CHANNEL_RC_OK;
} | 0 | [
"CWE-190"
] | FreeRDP | e08a23f93136f59a52651f66d064b8d4303872e1 | 250,666,601,451,092,230,000,000,000,000,000,000,000 | 6 | Fixed missing input sanitation for GFX surfaces.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen |
load_image (GFile *file,
GError **error)
{
GInputStream *input;
gchar *name;
BrushHeader bh;
guchar *brush_buf = NULL;
gint32 image_ID;
gint32 layer_ID;
GimpParasite *parasite;
GeglBuffer *buffer;
const Babl *f... | 1 | [
"CWE-125"
] | gimp | 06d24a79af94837d615d0024916bb95a01bf3c59 | 217,079,224,456,059,400,000,000,000,000,000,000,000 | 303 | Bug 790784 - (CVE-2017-17784) heap overread in gbr parser / load_image.
We were assuming the input name was well formed, hence was
nul-terminated. As any data coming from external input, this has to be
thorougly checked. |
libxlDomainObjPrivateXMLFormat(virBuffer *buf,
virDomainObj *vm)
{
libxlDomainObjPrivate *priv = vm->privateData;
if (priv->lockState)
virBufferAsprintf(buf, "<lockstate>%s</lockstate>\n", priv->lockState);
return 0;
} | 0 | [
"CWE-667"
] | libvirt | 23b51d7b8ec885e97a9277cf0a6c2833db4636e8 | 209,378,679,866,172,640,000,000,000,000,000,000,000 | 10 | libxl: Disable death events after receiving a shutdown event
The libxl driver will handle all domain destruction and cleanup
when receiving a domain shutdown event from libxl. Commit fa30ee04a2a
introduced the ignoreDeathEvent boolean in the DomainObjPrivate struct
to ignore subsequent death events from libxl. But lib... |
hwaddr virtio_queue_get_avail_size(VirtIODevice *vdev, int n)
{
return offsetof(VRingAvail, ring) +
sizeof(uint64_t) * vdev->vq[n].vring.num;
} | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 294,577,640,948,961,750,000,000,000,000,000,000,000 | 5 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
static bool bin_strings(RCore *r, int mode, int va) {
RList *list;
RBinFile *binfile = r_core_bin_cur (r);
RBinPlugin *plugin = r_bin_file_cur_plugin (binfile);
int rawstr = r_config_get_i (r->config, "bin.rawstr");
if (!binfile) {
return false;
}
if (!r_config_get_i (r->config, "bin.strings")) {
return fals... | 0 | [
"CWE-125"
] | radare2 | 1f37c04f2a762500222dda2459e6a04646feeedf | 85,906,840,220,949,170,000,000,000,000,000,000,000 | 29 | Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923) |
void Magick::Image::posterize(const size_t levels_,const DitherMethod method_)
{
modifyImage();
GetPPException;
PosterizeImage(image(),levels_,method_,exceptionInfo);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 105,219,068,990,295,820,000,000,000,000,000,000,000 | 7 | Added missing return to avoid use after free. |
l_init(void)
{
int i, n_locks;
n_locks = CRYPTO_num_locks();
if((l_array = (pthread_mutex_t *)calloc(n_locks, sizeof(pthread_mutex_t))) == NULL) {
logmsg(LOG_ERR, "lock init: out of memory - aborted...");
exit(1);
}
for(i = 0; i < n_locks; i++)
/* pthread_mutex_init() always... | 0 | [] | pound | a0c52c542ca9620a96750f9877b26bf4c84aef1b | 167,153,188,907,511,730,000,000,000,000,000,000,000 | 14 | SSL Compression Disable patch for 2.6f
This patch disables SSL/TLS compression entirely. There is no config option.
This prevents CRIME attacks against SSL. Note that HTTP compression is still
an option.
Test your server at https://www.ssllabs.com/ssldb/
Original patch by Hereward Cooper <coops@fawk.eu>
Openssl 0... |
AcpiNsBuildInternalName (
ACPI_NAMESTRING_INFO *Info)
{
UINT32 NumSegments = Info->NumSegments;
char *InternalName = Info->InternalName;
const char *ExternalName = Info->NextExternalChar;
char *Result = NULL;
UINT32 ... | 0 | [
"CWE-200",
"CWE-755"
] | acpica | a23325b2e583556eae88ed3f764e457786bf4df6 | 131,961,157,871,028,510,000,000,000,000,000,000,000 | 120 | Namespace: fix operand cache leak
I found some ACPI operand cache leaks in ACPI early abort cases.
Boot log of ACPI operand cache leak is as follows:
>[ 0.174332] ACPI: Added _OSI(Module Device)
>[ 0.175504] ACPI: Added _OSI(Processor Device)
>[ 0.176010] ACPI: Added _OSI(3.0 _SCP Extensions)
>[ 0.177032]... |
void mcryptd_free_ahash(struct mcryptd_ahash *tfm)
{
crypto_free_ahash(&tfm->base);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 48a992727d82cb7db076fa15d372178743b1f4cd | 270,240,569,055,552,040,000,000,000,000,000,000,000 | 4 | crypto: mcryptd - Check mcryptd algorithm compatibility
Algorithms not compatible with mcryptd could be spawned by mcryptd
with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name
construct. This causes mcryptd to crash the kernel if an arbitrary
"alg" is incompatible and not intended to be used with mcr... |
static OPJ_BOOL opj_j2k_mct_validation ( opj_j2k_t * p_j2k,
opj_stream_private_t *p_stream,
opj_event_mgr_t * p_manager )
{
OPJ_BOOL l_is_valid = OPJ_TRUE;
OPJ_UINT32 i,j... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 160,874,394,257,703,640,000,000,000,000,000,000,000 | 32 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
static BOOLEAN GetAdapterResources(PNDIS_RESOURCE_LIST RList, tAdapterResources *pResources)
{
UINT i;
NdisZeroMemory(pResources, sizeof(*pResources));
for (i = 0; i < RList->Count; ++i)
{
ULONG type = RList->PartialDescriptors[i].Type;
if (type == CmResourceTypePort)
{
... | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 162,485,234,280,151,660,000,000,000,000,000,000,000 | 27 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
flatpak_dir_finalize (GObject *object)
{
FlatpakDir *self = FLATPAK_DIR (object);
g_clear_object (&self->repo);
g_clear_object (&self->basedir);
g_clear_pointer (&self->extra_data, dir_extra_data_free);
if (self->system_helper_bus != (gpointer)1)
g_clear_object (&self->system_helper_bus);
g_clear_obj... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 250,587,737,610,438,140,000,000,000,000,000,000,000 | 16 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
static void handle_tx(struct vhost_net *net)
{
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned out, in;
int head;
struct msghdr msg = {
.msg_name = NULL,
.msg_namelen = 0,
.msg_control = NULL,
.msg_controllen = 0,
.msg_flags = MSG_DONTWAIT,
}... | 0 | [
"CWE-787"
] | linux | e2b3b35eb9896f26c98b9a2c047d9111638059a2 | 42,784,049,301,536,280,000,000,000,000,000,000,000 | 134 | vhost_net: batch used ring update in rx
This patch tries to batched used ring update during RX. This is pretty
fit for the case when guest is much faster (e.g dpdk based
backend). In this case, used ring is almost empty:
- we may get serious cache line misses/contending on both used ring
and used idx.
- at most 1 p... |
static GF_Err DumpNodeInsert(GF_SceneDumper *sdump, GF_Command *com)
{
GF_CommandField *inf;
char posname[20];
if (!gf_list_count(com->command_fields)) return GF_OK;
inf = (GF_CommandField *) gf_list_get(com->command_fields, 0);
switch (inf->pos) {
case 0:
strcpy(posname, "BEGIN");
break;
case -1:
strcpy(... | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 202,080,740,521,543,300,000,000,000,000,000,000,000 | 40 | fixed #2232 |
Binary::it_const_imported_symbols Binary::imported_symbols() const {
return {symbols_, [] (const std::unique_ptr<Symbol>& symbol) {
return is_imported(*symbol); }
};
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 62,649,720,383,033,280,000,000,000,000,000,000,000 | 5 | Resolve #764 |
pw_error(char *name, int err, int eval)
{
if (err) {
if (name)
warn("%s: ", name);
else
warn(NULL);
}
warnx(_("%s unchanged"), orig_file);
unlink(tmp_file);
ulckpwdf();
exit(eval);
} | 0 | [
"CWE-264"
] | util-linux | bde91c85bdc77975155058276f99d2e0f5eab5a9 | 26,486,387,058,008,600,000,000,000,000,000,000,000 | 13 | chsh, chfn, vipw: fix filenames collision
The utils when compiled WITHOUT libuser then mkostemp()ing
"/etc/%s.XXXXXX" where the filename prefix is argv[0] basename.
An attacker could repeatedly execute the util with modified argv[0]
and after many many attempts mkostemp() may generate suffix which
makes sense. The re... |
zend_class_entry *zend_fetch_class(zend_string *class_name, int fetch_type) /* {{{ */
{
zend_class_entry *ce;
int fetch_sub_type = fetch_type & ZEND_FETCH_CLASS_MASK;
check_fetch_type:
switch (fetch_sub_type) {
case ZEND_FETCH_CLASS_SELF:
if (UNEXPECTED(!EG(scope))) {
zend_throw_or_error(fetch_type, NULL, ... | 0 | [
"CWE-134"
] | php-src | b101a6bbd4f2181c360bd38e7683df4a03cba83e | 95,569,848,789,297,130,000,000,000,000,000,000,000 | 53 | Use format string |
static void nfs4_release_lockowner_done(struct rpc_task *task, void *calldata)
{
struct nfs_release_lockowner_data *data = calldata;
struct nfs_server *server = data->server;
nfs40_sequence_done(task, &data->res.seq_res);
switch (task->tk_status) {
case 0:
renew_lease(server, data->timestamp);
break;
case -... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 197,076,016,209,839,150,000,000,000,000,000,000,000 | 22 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
int asn1_ber_decoder(const struct asn1_decoder *decoder,
void *context,
const unsigned char *data,
size_t datalen)
{
const unsigned char *machine = decoder->machine;
const asn1_action_t *actions = decoder->actions;
size_t machlen = decoder->machlen;
enum asn1_opcode op;
unsigned char tag = 0, ... | 0 | [
"CWE-787"
] | linux | 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa | 182,034,649,325,970,930,000,000,000,000,000,000,000 | 338 | KEYS: Fix ASN.1 indefinite length object parsing
This fixes CVE-2016-0758.
In the ASN.1 decoder, when the length field of an ASN.1 value is extracted,
it isn't validated against the remaining amount of data before being added
to the cursor. With a sufficiently large size indicated, the check:
datalen - dp < 2
may... |
static BOOL recurse_check_bit(compiler_common *common, sljit_sw bit_index)
{
uint8_t *byte;
uint8_t mask;
SLJIT_ASSERT((bit_index & (sizeof(sljit_sw) - 1)) == 0);
bit_index >>= SLJIT_WORD_SHIFT;
mask = 1 << (bit_index & 0x7);
byte = common->recurse_bitset + (bit_index >> 3);
if (*byte & mask)
return FALSE;
*byte... | 0 | [
"CWE-703",
"CWE-125"
] | pcre2 | 03654e751e7f0700693526b67dfcadda6b42c9d0 | 132,409,030,367,967,210,000,000,000,000,000,000,000 | 18 | Fixed an issue affecting recursions in JIT |
MagickExport QuantumInfo *DestroyQuantumInfo(QuantumInfo *quantum_info)
{
assert(quantum_info != (QuantumInfo *) NULL);
assert(quantum_info->signature == MagickCoreSignature);
if (quantum_info->pixels != (unsigned char **) NULL)
DestroyQuantumPixels(quantum_info);
if (quantum_info->semaphore != (SemaphoreIn... | 0 | [
"CWE-369"
] | ImageMagick | c4e63ad30bc42da691f2b5f82a24516dd6b4dc70 | 7,441,592,429,323,174,000,000,000,000,000,000,000 | 12 | https://github.com/ImageMagick/ImageMagick/issues/105 |
DEFUN (clear_ip_bgp_instance_all_ipv4_soft_out,
clear_ip_bgp_instance_all_ipv4_soft_out_cmd,
"clear ip bgp view WORD * ipv4 (unicast|multicast) soft out",
CLEAR_STR
IP_STR
BGP_STR
"BGP view\n"
"view name\n"
"Clear all peers\n"
"Address family\n"
"Add... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 209,261,462,154,445,070,000,000,000,000,000,000,000 | 21 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
void Aggregator_distinct::clear()
{
endup_done= FALSE;
item_sum->clear();
if (tree)
tree->reset();
/* tree and table can be both null only if always_null */
if (item_sum->sum_func() == Item_sum::COUNT_FUNC ||
item_sum->sum_func() == Item_sum::COUNT_DISTINCT_FUNC)
{
if (!tree && table)
{
... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 288,554,209,101,456,230,000,000,000,000,000,000,000 | 22 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
errdetail_internal(const char *fmt,...)
{
ErrorData *edata = &errordata[errordata_stack_depth];
MemoryContext oldcontext;
recursion_depth++;
CHECK_STACK_DEPTH();
oldcontext = MemoryContextSwitchTo(edata->assoc_context);
EVALUATE_MESSAGE(edata->domain, detail, false, false);
MemoryContextSwitchTo(oldcontext);... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 103,324,385,538,650,230,000,000,000,000,000,000,000 | 15 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
int report_acl_prin_prop(struct transaction_t *txn __attribute__((unused)),
struct meth_params *rparams __attribute__((unused)),
xmlNodePtr inroot __attribute__((unused)),
struct propfind_ctx *fctx)
{
int ret = 0;
struct request_target_t... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 327,979,749,207,985,960,000,000,000,000,000,000,000 | 49 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
inline void Softmax(const uint8* input_data, const RuntimeShape& input_shape,
int32 input_beta_multiplier, int32 input_beta_left_shift,
int diff_min, uint8* output_data,
const RuntimeShape& output_shape) {
SoftmaxParams params;
params.input_multiplier = in... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 305,314,084,681,141,430,000,000,000,000,000,000,000 | 10 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
static void t1_flush_cs(boolean is_subr)
{
char *p;
byte *r, *return_cs = NULL;
cs_entry *tab, *end_tab, *ptr;
char *start_line, *line_end;
int count, size_pos;
unsigned short cr, cs_len = 0; /* to avoid warning about uninitialized use of cs_len */
if (is_subr) {
start_line = su... | 0 | [
"CWE-119"
] | texlive-source | 6ed0077520e2b0da1fd060c7f88db7b2e6068e4c | 217,747,495,903,238,600,000,000,000,000,000,000,000 | 84 | writet1 protection against buffer overflow
git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751 |
set_bmh_search_skip_table(UChar* s, UChar* end, OnigEncoding enc ARG_UNUSED,
UChar skip[])
{
int i, len;
len = (int )(end - s);
if (len < ONIG_CHAR_TABLE_SIZE) {
for (i = 0; i < ONIG_CHAR_TABLE_SIZE; i++) skip[i] = len;
for (i = 0; i < len - 1; i++)
skip[s[i]] = len - 1 -... | 0 | [
"CWE-125"
] | oniguruma | 4d461376bd85e7994835677b2ff453a43c49cd28 | 301,001,012,116,313,870,000,000,000,000,000,000,000 | 18 | don't expand string case folds to alternatives if code length == 1 and byte length is same |
virtual void addRequiredPrivileges(const std::string& dbname,
const BSONObj& cmdObj,
std::vector<Privilege>* out) {} // No auth required | 0 | [] | mongo | f85ceb17b37210eef71e8113162c41368bfd5c12 | 78,675,730,795,854,000,000,000,000,000,000,000,000 | 3 | SERVER-9476 Redact some potentially sensitive information when logging authentications. |
private int
magiccheck(struct magic_set *ms, struct magic *m)
{
uint64_t l = m->value.q;
uint64_t v;
float fl, fv;
double dl, dv;
int matched;
union VALUETYPE *p = &ms->ms_value;
switch (m->type) {
case FILE_BYTE:
v = p->b;
break;
case FILE_SHORT:
case FILE_BESHORT:
case FILE_LESHORT:
v = p->h;
br... | 0 | [
"CWE-755"
] | file | 3c081560c23f20b2985c285338b52c7aae9fdb0f | 58,592,718,841,084,740,000,000,000,000,000,000,000 | 318 | prevent infinite recursion. |
static void server_process_deferred_closes(Server *s) {
JournalFile *f;
Iterator i;
/* Perform any deferred closes which aren't still offlining. */
SET_FOREACH(f, s->deferred_closes, i) {
if (journal_file_is_offlining(f))
continue;
... | 0 | [
"CWE-770"
] | systemd | 084eeb865ca63887098e0945fb4e93c852b91b0f | 287,985,225,253,426,630,000,000,000,000,000,000,000 | 13 | journald: do not store the iovec entry for process commandline on stack
This fixes a crash where we would read the commandline, whose length is under
control of the sending program, and then crash when trying to create a stack
allocation for it.
CVE-2018-16864
https://bugzilla.redhat.com/show_bug.cgi?id=1653855
The ... |
static int __perf_event_overflow(struct perf_event *event,
int throttle, struct perf_sample_data *data,
struct pt_regs *regs)
{
int events = atomic_read(&event->event_limit);
struct hw_perf_event *hwc = &event->hw;
u64 seq;
int ret = 0;
/*
* Non-sampling counters might still use the PMI to fold sh... | 0 | [
"CWE-667"
] | linux | 79c9ce57eb2d5f1497546a3946b4ae21b6fdc438 | 241,468,557,249,217,240,000,000,000,000,000,000,000 | 67 | perf/core: Fix perf_event_open() vs. execve() race
Jann reported that the ptrace_may_access() check in
find_lively_task_by_vpid() is racy against exec().
Specifically:
perf_event_open() execve()
ptrace_may_access()
commit_creds()
... if (get_dumpable() != SUID_DUMP_USER)
perf_event_exit_task();
... |
parse_ct_state(const char *state_str, uint32_t default_state,
uint32_t *ct_state, struct ds *ds)
{
uint32_t state = default_state;
char *state_s = xstrdup(state_str);
char *save_ptr = NULL;
for (char *cs = strtok_r(state_s, ", ", &save_ptr); cs;
cs = strtok_r(NULL, ", ", &save_p... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 105,514,505,661,410,620,000,000,000,000,000,000,000 | 24 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
Get status info from a mailbox */
PHP_FUNCTION(imap_status)
{
zval *streamind;
zend_string *mbx;
zend_long flags;
pils *imap_le_struct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rSl", &streamind, &mbx, &flags) == FAILURE) {
return;
}
if ((imap_le_struct = (pils *)zend_fetch_resource(Z_RES_P(streamind), ... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 95,376,441,354,414,020,000,000,000,000,000,000,000 | 38 | Disable rsh/ssh functionality in imap by default (bug #77153) |
void crypto_unregister_rng(struct rng_alg *alg)
{
crypto_unregister_alg(&alg->base);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 94f1bb15bed84ad6c893916b7e7b9db6f1d7eec6 | 339,164,293,506,485,100,000,000,000,000,000,000,000 | 4 | crypto: rng - Remove old low-level rng interface
Now that all rng implementations have switched over to the new
interface, we can remove the old low-level interface.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> |
static int mwifiex_update_vs_ie(const u8 *ies, int ies_len,
struct mwifiex_ie **ie_ptr, u16 mask,
unsigned int oui, u8 oui_type)
{
struct ieee_types_header *vs_ie;
struct mwifiex_ie *ie = *ie_ptr;
const u8 *vendor_ie;
vendor_ie = cfg80211_find_vendor_ie(oui, oui_type, ies, ies_len);
if (vendor_ie) {
if ... | 1 | [
"CWE-120",
"CWE-787"
] | linux | 7caac62ed598a196d6ddf8d9c121e12e082cac3a | 113,288,722,613,379,030,000,000,000,000,000,000,000 | 29 | mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and
mwifiex_set_wmm_params() call memcpy() without checking
the destination size.Since the source is given from
user-space, this may trigger a heap buffer overflow.
Fix them by putting the length... |
pixOctreeQuantByPopulation(PIX *pixs,
l_int32 level,
l_int32 ditherflag)
{
l_int32 w, h, wpls, wpld, i, j, depth, size, ncolors, index;
l_int32 rval, gval, bval;
l_int32 *rarray, *garray, *barray, *narray, *iarray;
l_uint32 octind... | 0 | [
"CWE-125"
] | leptonica | 5ee24b398bb67666f6d173763eaaedd9c36fb1e5 | 262,567,086,962,861,400,000,000,000,000,000,000,000 | 256 | Fixed issue 22140 in oss-fuzz: Heap-buffer-overflow
* color quantized pix must be 8 bpp before extra colors are added. |
xmlXPathNodeSetAddUnique(xmlNodeSetPtr cur, xmlNodePtr val) {
if ((cur == NULL) || (val == NULL)) return;
#if 0
if ((val->type == XML_ELEMENT_NODE) && (val->name[0] == ' '))
return; /* an XSLT fake node */
#endif
/* @@ with_ns to check whether namespace nodes should be looked at @@ */
/*
* grow ... | 0 | [
"CWE-189"
] | libxml2 | d7958b21e7f8c447a26bb2436f08402b2c308be4 | 198,997,664,983,006,600,000,000,000,000,000,000,000 | 42 | Fix some potential problems on reallocation failures
The count was incremented before the allocation
and not fixed in case of failure
* xpath.c: corrects a few instances where the available count of some
structure is updated before we know the allocation actually
succeeds |
static int putint(jas_stream_t *out, int sgnd, int prec, long val)
{
int n;
int c;
if (sgnd) {
/* XXX - Do something here. */
abort();
}
val &= (1 << prec) - 1;
n = (prec + 7) / 8;
while (--n >= 0) {
c = (val >> (n * 8)) & 0xff;
if (jas_stream_putc(out, c) != c)
return -1;
}
return 0;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 247,586,360,605,138,970,000,000,000,000,000,000,000 | 17 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
void ConnectDialog::startDns(ServerItem *si) {
if (!bAllowHostLookup) {
return;
}
QString hostname = si->qsHostname.toLower();
unsigned short port = si->usPort;
UnresolvedServerAddress unresolved(hostname, port);
if (si->qlAddresses.isEmpty()) {
// Determine if qsHostname is an IP address
// or a hostname... | 0 | [
"CWE-59",
"CWE-61"
] | mumble | e59ee87abe249f345908c7d568f6879d16bfd648 | 8,464,354,255,088,690,000,000,000,000,000,000,000 | 50 | FIX(client): Only allow "http"/"https" for URLs in ConnectDialog
Our public server list registration script doesn't have an URL scheme
whitelist for the website field.
Turns out a malicious server can register itself with a dangerous URL in
an attempt to attack a user's machine.
User interaction is required, as the ... |
free_auth_node(
config_tree *ptree
)
{
if (ptree->auth.keys) {
free(ptree->auth.keys);
ptree->auth.keys = NULL;
}
if (ptree->auth.keysdir) {
free(ptree->auth.keysdir);
ptree->auth.keysdir = NULL;
}
if (ptree->auth.ntp_signd_socket) {
free(ptree->auth.ntp_signd_socket);
ptree->auth.ntp_signd_socket ... | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 265,671,945,554,598,950,000,000,000,000,000,000,000 | 19 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
int gnutls_x509_crt_get_dn(gnutls_x509_crt_t cert, char *buf,
size_t * sizeof_buf)
{
if (cert == NULL) {
gnutls_assert();
return GNUTLS_E_INVALID_REQUEST;
}
return _gnutls_x509_parse_dn(cert->cert,
"tbsCertificate.subject.rdnSequence", buf,
sizeof_buf);
} | 0 | [] | gnutls | 112d537da5f3500f14316db26d18c37d678a5e0e | 299,762,342,640,109,730,000,000,000,000,000,000,000 | 12 | some changes for 64bit machines. |
static void hid_dump_input_mapping(struct hid_device *hid, struct seq_file *f)
{
int i, j, k;
struct hid_report *report;
struct hid_usage *usage;
for (k = HID_INPUT_REPORT; k <= HID_OUTPUT_REPORT; k++) {
list_for_each_entry(report, &hid->report_enum[k].report_list, list) {
for (i = 0; i < report->maxfield; i+... | 0 | [
"CWE-835",
"CWE-787"
] | linux | 717adfdaf14704fd3ec7fa2c04520c0723247eac | 26,877,844,289,328,590,000,000,000,000,000,000,000 | 21 | HID: debug: check length before copy_to_user()
If our length is greater than the size of the buffer, we
overflow the buffer
Cc: stable@vger.kernel.org
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz> |
njs_typed_array_of(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t unused)
{
double num;
uint32_t length, i;
njs_int_t ret;
njs_value_t *this;
njs_value_t argument;
njs_typed_array_t *array;
this = njs_argument(args, 0);
... | 0 | [
"CWE-703"
] | njs | 5c6130a2a0b4c41ab415f6b8992aa323636338b9 | 28,767,309,716,523,490,000,000,000,000,000,000,000 | 41 | Fixed Array.prototype.fill() for typed-arrays.
This closes #478 issue on Github. |
static inline unsigned char *PopQuantumPixel(QuantumInfo *quantum_info,
const QuantumAny pixel,unsigned char *magick_restrict pixels)
{
ssize_t
i;
size_t
quantum_bits;
if (quantum_info->state.bits == 0UL)
quantum_info->state.bits=8U;
for (i=(ssize_t) quantum_info->depth; i > 0L; )
{
quantu... | 0 | [
"CWE-190"
] | ImageMagick | 5af1dffa4b6ab984b5f13d1e91c95760d75f12a6 | 320,362,127,898,727,900,000,000,000,000,000,000,000 | 32 | outside the range of representable values of type 'unsigned char' (#3083)
Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com> |
Field *create_field_for_create_select(TABLE *table)
{ return create_table_field_from_handler(table); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 325,604,780,560,774,140,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
{
struct inode *inode = NULL;
struct btrfs_trans_handle *trans;
struct btrfs_root *root = BTRFS_I(dir)->root;
int err = 0;
int drop_on_err = 0;
u64 objectid = 0;
u64 index = 0;
/*
* 2 items for inode and ref
* 2 items for dir it... | 0 | [
"CWE-200"
] | linux | 0305cd5f7fca85dae392b9ba85b116896eb7c1c7 | 271,110,216,003,810,850,000,000,000,000,000,000,000 | 72 | Btrfs: fix truncation of compressed and inlined extents
When truncating a file to a smaller size which consists of an inline
extent that is compressed, we did not discard (or made unusable) the
data between the new file size and the old file size, wasting metadata
space and allowing for the truncated data to be leaked... |
parse_truncate_subfield(struct ofpact_output_trunc *output_trunc,
const char *arg_)
{
char *key, *value;
char *arg = CONST_CAST(char *, arg_);
while (ofputil_parse_key_value(&arg, &key, &value)) {
if (!strcmp(key, "port")) {
if (!ofputil_port_from_string(value, &... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 36,094,757,862,271,314,000,000,000,000,000,000,000 | 32 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
int ha_maria::find_unique_row(uchar *record, uint constrain_no)
{
int rc;
register_handler(file);
if (file->s->state.header.uniques)
{
DBUG_ASSERT(file->s->state.header.uniques > constrain_no);
MARIA_UNIQUEDEF *def= file->s->uniqueinfo + constrain_no;
ha_checksum unique_hash= _ma_unique_hash(def, re... | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 240,914,464,196,767,700,000,000,000,000,000,000,000 | 37 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
static void init_ordered2_dither(int line)
{
static int const dither2x2[] =
{
0x00, 0x80,
0xc0, 0x40,
};
ordered2_table = dither2x2 + (line % 2) * 2;
ordered2_index = 0;
} | 0 | [
"CWE-369"
] | libcaca | 84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c | 108,518,734,049,093,790,000,000,000,000,000,000,000 | 11 | dither: fix integer overflows that were causing a division by zero.
Fixes: #36 (CVE-2018-20544) |
int Field_geom::store_decimal(const my_decimal *)
{
my_message(ER_CANT_CREATE_GEOMETRY_OBJECT,
ER_THD(get_thd(), ER_CANT_CREATE_GEOMETRY_OBJECT), MYF(0));
return -1;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 142,102,844,737,458,870,000,000,000,000,000,000,000 | 6 | 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... |
njs_promise_resolve(njs_vm_t *vm, njs_value_t *constructor, njs_value_t *x)
{
njs_int_t ret;
njs_value_t value;
njs_promise_capability_t *capability;
static const njs_value_t string_constructor = njs_string("constructor");
if (njs_is_promise(x)) {
ret = njs_... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 307,010,888,930,434,980,000,000,000,000,000,000,000 | 33 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
dtls1_process_out_of_seq_message(SSL *s, const struct hm_header_st *msg_hdr,
int *ok)
{
int i = -1;
hm_fragment *frag = NULL;
pitem *item = NULL;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len;
if ((msg_hdr->frag_off + frag_len) > msg_hdr->... | 0 | [
"CWE-399"
] | openssl | df6b5e29ffea2d5a3e08de92fb765fdb21c7a21e | 68,113,747,651,603,970,000,000,000,000,000,000,000 | 94 | Excessive allocation of memory in dtls1_preprocess_fragment()
This issue is very similar to CVE-2016-6307 described in the previous
commit. The underlying defect is different but the security analysis and
impacts are the same except that it impacts DTLS.
A DTLS message includes 3 bytes for its length in the header fo... |
evbuffer_remove(struct evbuffer *buf, void *data_out, size_t datlen)
{
ev_ssize_t n;
EVBUFFER_LOCK(buf);
n = evbuffer_copyout(buf, data_out, datlen);
if (n > 0) {
if (evbuffer_drain(buf, n)<0)
n = -1;
}
EVBUFFER_UNLOCK(buf);
return (int)n;
} | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 336,646,796,865,224,970,000,000,000,000,000,000,000 | 12 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
static u32 hw_atl_utils_rpc_state_get(struct aq_hw_s *self)
{
return aq_hw_read_reg(self, HW_ATL_RPC_STATE_ADR);
} | 0 | [
"CWE-787"
] | net | b922f622592af76b57cbc566eaeccda0b31a3496 | 137,565,221,207,298,570,000,000,000,000,000,000,000 | 4 | atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait
This bug report shows up when running our research tools. The
reports is SOOB read, but it seems SOOB write is also possible
a few lines below.
In details, fw.len and sw.len are inputs coming from io. A len
over the size of self->rpc triggers SOOB. The patc... |
void gdImageGd2 (gdImagePtr im, FILE * outFile, int cs, int fmt)
{
gdIOCtx *out = gdNewFileCtx(outFile);
_gdImageGd2(im, out, cs, fmt);
out->gd_free(out);
} | 0 | [
"CWE-190"
] | php-src | 7722455726bec8c53458a32851d2a87982cf0eac | 269,297,358,037,287,630,000,000,000,000,000,000,000 | 8 | Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow |
void init(FilterConfigSharedPtr config) {
// Set up the OAuth client.
oauth_client_ = new MockOAuth2Client();
std::unique_ptr<OAuth2Client> oauth_client_ptr{oauth_client_};
config_ = config;
filter_ = std::make_shared<OAuth2Filter>(config_, std::move(oauth_client_ptr), test_time_);
filter_->s... | 0 | [
"CWE-416"
] | envoy | 7ffda4e809dec74449ebc330cebb9d2f4ab61360 | 96,951,679,346,821,260,000,000,000,000,000,000,000 | 11 | oauth2: do not blindly accept requests with a token in the Authorization headera (781)
The logic was broken because it assumed an additional call would be
performed to the auth server, which isn't the case. Per the filter
documentation, a request is only considered subsequently authenticated
if there's valid cookie th... |
static void unlock_mutex(pthread_mutex_t *l)
{
int ret;
if ((ret = pthread_mutex_unlock(l)) != 0) {
fprintf(stderr, "pthread_mutex_unlock returned:%d %s\n", ret, strerror(ret));
dump_stacktrace();
exit(1);
}
} | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 72cf81f6a3404e35028567db2c99a90406e9c6e6 | 324,651,537,058,256,670,000,000,000,000,000,000,000 | 10 | CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc
This prevents an unprivileged user to use LXC to create arbitrary file
on the filesystem.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com> |
GF_Err iinf_box_write(GF_Box *s, GF_BitStream *bs)
{
u32 count;
GF_Err e;
GF_ItemInfoBox *ptr = (GF_ItemInfoBox *)s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
count = gf_list_count(ptr->item_infos);
if (ptr->version == 0)
gf_bs_write_u16(bs, count);
else
gf_bs_write_u... | 0 | [
"CWE-401",
"CWE-787"
] | gpac | ec64c7b8966d7e4642d12debb888be5acf18efb9 | 332,474,357,908,584,020,000,000,000,000,000,000,000 | 16 | fixed #1786 (fuzz) |
void BatchedNonMaxSuppressionOp(
OpKernelContext* context, const Tensor& inp_boxes, const Tensor& inp_scores,
int num_boxes, const int max_size_per_class, const int total_size_per_batch,
const float score_threshold, const float iou_threshold,
bool pad_per_class = false, bool clip_boxes = true) {
const... | 0 | [
"CWE-369",
"CWE-681"
] | tensorflow | b5cdbf12ffcaaffecf98f22a6be5a64bb96e4f58 | 65,926,164,218,367,120,000,000,000,000,000,000,000 | 132 | Prevent overflow due to integer conversion to unsigned.
PiperOrigin-RevId: 387738045
Change-Id: Id7e95bc07e02df1c66b72bd09f389608c87bdebe |
xps_clip(xps_document *doc, const fz_matrix *ctm, xps_resource *dict, char *clip_att, fz_xml *clip_tag)
{
fz_path *path;
int fill_rule = 0;
if (clip_att)
path = xps_parse_abbreviated_geometry(doc, clip_att, &fill_rule);
else if (clip_tag)
path = xps_parse_path_geometry(doc, dict, clip_tag, 0, &fill_rule);
els... | 0 | [
"CWE-119"
] | mupdf | 60dabde18d7fe12b19da8b509bdfee9cc886aafc | 69,850,768,853,801,740,000,000,000,000,000,000,000 | 14 | Bug 694957: fix stack buffer overflow in xps_parse_color
xps_parse_color happily reads more than FZ_MAX_COLORS values out of a
ContextColor array which overflows the passed in samples array.
Limiting the number of allowed samples to FZ_MAX_COLORS and make sure
to use that constant for all callers fixes the problem.
T... |
static void hugetlbfs_evict_inode(struct inode *inode)
{
struct resv_map *resv_map;
remove_inode_hugepages(inode, 0, LLONG_MAX);
resv_map = (struct resv_map *)inode->i_mapping->private_data;
/* root inode doesn't have the resv_map, so we should check it */
if (resv_map)
resv_map_release(&resv_map->refs);
clear... | 0 | [] | linux | 9aacdd354d197ad64685941b36d28ea20ab88757 | 192,805,489,861,403,200,000,000,000,000,000,000,000 | 11 | fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list()
Hillf Danton noticed bugs in the hugetlb_vmtruncate_list routine. The
argument end is of type pgoff_t. It was being converted to a vaddr
offset and passed to unmap_hugepage_range. However, end was also being
used as an argument to the vma_interval_tree_for... |
int _yr_emit_inst_arg_uint16(
RE_EMIT_CONTEXT* emit_context,
uint8_t opcode,
uint16_t argument,
uint8_t** instruction_addr,
uint16_t** argument_addr,
int* code_size)
{
FAIL_ON_ERROR(yr_arena_write_data(
emit_context->arena,
&opcode,
sizeof(uint8_t),
(void**) instruction... | 0 | [
"CWE-125"
] | yara | 83d799804648c2a0895d40a19835d9b757c6fa4e | 252,201,967,725,743,800,000,000,000,000,000,000,000 | 24 | Fix issue #646 (#648)
* Fix issue #646 and some edge cases with wide regexps using \b and \B
* Rename function IS_WORD_CHAR to _yr_re_is_word_char |
int set_anon_super(struct super_block *s, void *data)
{
int error = get_anon_bdev(&s->s_dev);
if (!error)
s->s_bdi = &noop_backing_dev_info;
return error;
} | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 272,910,707,893,137,800,000,000,000,000,000,000,000 | 7 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static const struct genl_ops *genl_get_cmd(u8 cmd,
const struct genl_family *family)
{
int i;
for (i = 0; i < family->n_ops; i++)
if (family->ops[i].cmd == cmd)
return &family->ops[i];
return NULL;
} | 0 | [
"CWE-399",
"CWE-401"
] | linux | ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2 | 33,706,796,677,277,840,000,000,000,000,000,000,000 | 11 | genetlink: Fix a memory leak on error path
In genl_register_family(), when idr_alloc() fails,
we forget to free the memory we possibly allocate for
family->attrbuf.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 2ae0f17df1cd ("genetlink: use idr to track families")
Signed-off-by: YueHaibing <yuehaibing@huawei.com... |
static void tcp_chr_telnet_init(CharDriverState *chr)
{
TCPCharDriver *s = chr->opaque;
TCPCharDriverTelnetInit *init =
g_new0(TCPCharDriverTelnetInit, 1);
size_t n = 0;
init->chr = chr;
init->buflen = 12;
#define IACSET(x, a, b, c) \
do { ... | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 32,261,184,694,488,067,000,000,000,000,000,000,000 | 31 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
CString CUser::AddTimestamp(time_t tm, const CString& sStr) const {
timeval tv;
tv.tv_sec = tm;
tv.tv_usec = 0;
return AddTimestamp(tv, sStr);
} | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 229,154,869,814,118,570,000,000,000,000,000,000,000 | 6 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
R_API int r_egg_padding(REgg *egg, const char *pad) {
int number;
ut8 *buf, padding_byte;
char *p, *o = strdup (pad);
for (p = o; *p;) { // parse pad string
const char f = *p++;
number = strtol (p, NULL, 10);
if (number < 1) {
eprintf ("Invalid padding length at %d\n", number);
free (o);
return fal... | 0 | [
"CWE-125"
] | radare2 | e710401ebb4a892a87b0c709d709af8b5dcbbb01 | 41,354,457,762,369,210,000,000,000,000,000,000,000 | 51 | patch #14211 heap buffer overflow in large ragg2
inputs. this should be refactored to use an RBuffer to enable dynamic
resizing, but for now just patching it to bail out if we are about to
overwrite the allocated statically sized buffer |
EVP_MD_CTX *EVP_MD_CTX_create(void)
{
EVP_MD_CTX *ctx=OPENSSL_malloc(sizeof *ctx);
if (ctx)
EVP_MD_CTX_init(ctx);
return ctx;
} | 0 | [] | openssl | a6c62f0c25a756c263a80ce52afbae888028e986 | 277,701,893,111,278,480,000,000,000,000,000,000,000 | 9 | Ignore NULL parameter in EVP_MD_CTX_destroy. |
static void free_nested(struct vcpu_vmx *vmx)
{
if (!vmx->nested.vmxon)
return;
vmx->nested.vmxon = false;
nested_release_vmcs12(vmx);
if (enable_shadow_vmcs)
free_vmcs(vmx->nested.current_shadow_vmcs);
/* Unpin physical memory we referred to in current vmcs02 */
if (vmx->nested.apic_access_page) {
nested_... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 122,430,559,480,259,120,000,000,000,000,000,000,000 | 21 | 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 ... |
aiff_write_tailer (SF_PRIVATE *psf)
{ int k ;
/* Reset the current header length to zero. */
psf->header.ptr [0] = 0 ;
psf->header.indx = 0 ;
psf->dataend = psf_fseek (psf, 0, SEEK_END) ;
/* Make sure tailer data starts at even byte offset. Pad if necessary. */
if (psf->dataend % 2 == 1)
{ psf_fwrite (psf->h... | 0 | [
"CWE-476"
] | libsndfile | 6f3266277bed16525f0ac2f0f03ff4626f1923e5 | 99,254,675,482,696,960,000,000,000,000,000,000,000 | 31 | Fix max channel count bug
The code was allowing files to be written with a channel count of exactly
`SF_MAX_CHANNELS` but was failing to read some file formats with the same
channel count. |
static int copy_parameter_set(void **to, void **from, int count, int size)
{
int i;
for (i = 0; i < count; i++) {
if (to[i] && !from[i]) {
av_freep(&to[i]);
} else if (from[i] && !to[i]) {
to[i] = av_malloc(size);
if (!to[i])
return AVERROR(EN... | 0 | [
"CWE-703"
] | FFmpeg | 8a3b85f3a7952c54a2c36ba1797f7e0cde9f85aa | 155,181,824,594,494,500,000,000,000,000,000,000,000 | 19 | avcodec/h264: update current_sps & sps->new only after the whole slice header decoder and init code finished
This avoids them being cleared before the full initialization finished
Fixes out of array read
Fixes: asan_heap-oob_f0c5e6_7071_cov_1605985132_mov_h264_aac__Demo_FlagOfOurFathers.mov
Found-by: Mateusz "j00ru" ... |
static EC_GROUP *ec_asn1_parameters2group(const ECPARAMETERS *params)
{
int ok = 0, tmp;
EC_GROUP *ret = NULL;
BIGNUM *p = NULL, *a = NULL, *b = NULL;
EC_POINT *point = NULL;
long field_bits;
if (!params->fieldID || !params->fieldID->fieldType ||
!params->fieldID->p.ptr) {
ECerr... | 0 | [] | openssl | 1b4a8df38fc9ab3c089ca5765075ee53ec5bd66a | 255,399,537,689,341,400,000,000,000,000,000,000,000 | 232 | Fix a failure to NULL a pointer freed on error.
Inspired by BoringSSL commit 517073cd4b by Eric Roman <eroman@chromium.org>
CVE-2015-0209
Reviewed-by: Emilia Käsper <emilia@openssl.org> |
uint32_t BinaryProtocolWriter::serializedSizeBinary(
std::unique_ptr<folly::IOBuf> const& v) const {
return v ? serializedSizeBinary(*v) : 0;
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 291,400,445,238,100,700,000,000,000,000,000,000,000 | 4 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
static void test_bug15510()
{
MYSQL_STMT *stmt;
int rc;
const char *query= "select 1 from dual where 1/0";
myheader("test_bug15510");
rc= mysql_query(mysql, "set @@sql_mode='ERROR_FOR_DIVISION_BY_ZERO'");
myquery(rc);
stmt= mysql_stmt_init(mysql);
rc= mysql_stmt_prepare(stmt, query, strlen(query));
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 304,344,277,671,398,200,000,000,000,000,000,000,000 | 27 | 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... |
static char *get_modinfo(const struct load_info *info, const char *tag)
{
return get_next_modinfo(info, tag, NULL);
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 20,031,397,965,864,627,000,000,000,000,000,000,000 | 4 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
void HttpConnection::sendRequest(std::unique_ptr<HttpRequest> httpRequest,
std::string request)
{
A2_LOG_INFO(
fmt(MSG_SENDING_REQUEST, cuid_, eraseConfidentialInfo(request).c_str()));
socketBuffer_.pushStr(std::move(request));
socketBuffer_.send();
outstandingHttpRequests... | 0 | [
"CWE-532"
] | aria2 | 37368130ca7de5491a75fd18a20c5c5cc641824a | 219,895,823,349,544,100,000,000,000,000,000,000,000 | 10 | Mask headers |
static int rtps_util_add_bitmap(proto_tree *tree,
tvbuff_t *tvb,
gint offset,
const guint encoding,
const char *label,
gboolean show_analysis) {
gint32 num_bits;
guint32 data;
wmem_strbuf_... | 0 | [
"CWE-401"
] | wireshark | 33e63d19e5496c151bad69f65cdbc7cba2b4c211 | 266,012,523,677,127,980,000,000,000,000,000,000,000 | 91 | RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.
Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating ... |
static void *ion_handle_kmap_get(struct ion_handle *handle)
{
struct ion_buffer *buffer = handle->buffer;
void *vaddr;
if (handle->kmap_cnt) {
handle->kmap_cnt++;
return buffer->vaddr;
}
vaddr = ion_buffer_kmap_get(buffer);
if (IS_ERR(vaddr))
return vaddr;
handle->kmap_cnt++;
return vaddr;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 122,697,411,725,557,360,000,000,000,000,000,000,000 | 15 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
static int _pgsql_rollback_txn(void *conn, const sasl_utils_t *utils)
{
return _pgsql_exec(conn, "ROLLBACK;", NULL, 0, NULL, utils);
} | 0 | [
"CWE-89"
] | cyrus-sasl | 9eff746c9daecbcc0041b09a5a51ba30738cdcbc | 260,555,801,193,329,760,000,000,000,000,000,000,000 | 4 | CVE-2022-24407 Escape password for SQL insert/update commands.
Signed-off-by: Klaus Espenlaub <klaus@espenlaub.com> |
set_ref_in_func_args(int copyID)
{
int i;
for (i = 0; i < funcargs.ga_len; ++i)
if (set_ref_in_item(((typval_T **)funcargs.ga_data)[i],
copyID, NULL, NULL))
return TRUE;
return FALSE;
} | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 250,129,350,218,355,540,000,000,000,000,000,000,000 | 10 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.