func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void sctp_endpoint_bh_rcv(struct work_struct *work)
{
struct sctp_endpoint *ep =
container_of(work, struct sctp_endpoint,
base.inqueue.immediate);
struct sctp_association *asoc;
struct sock *sk;
struct sctp_transport *transport;
struct sctp_chunk *chunk;
struct sctp_inq *inqueue;
sctp_subtype_t ... | 1 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 70,610,265,777,625,670,000,000,000,000,000,000,000 | 64 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
build_config(char *prefix, struct server *server)
{
char *path = NULL;
int path_size = strlen(prefix) + strlen(server->port) + 20;
path = ss_malloc(path_size);
snprintf(path, path_size, "%s/.shadowsocks_%s.conf", prefix, server->port);
FILE *f = fopen(path, "w+");
if (f == NULL) {
if... | 1 | [
"CWE-78",
"CWE-787"
] | shadowsocks-libev | c67d275803dc6ea22c558d06b1f7ba9f94cd8de3 | 209,512,446,467,534,370,000,000,000,000,000,000,000 | 27 | Fix #1734 |
print_server_response (const struct response *resp, const char *prefix)
{
int i;
if (!resp->headers)
return;
for (i = 0; resp->headers[i + 1]; i++)
{
const char *b = resp->headers[i];
const char *e = resp->headers[i + 1];
/* Skip CRLF */
if (b < e && e[-1] == '\n')
--e;
... | 0 | [
"CWE-119"
] | wget | d892291fb8ace4c3b734ea5125770989c215df3f | 241,875,826,570,371,160,000,000,000,000,000,000,000 | 17 | Fix stack overflow in HTTP protocol handling (CVE-2017-13089)
* src/http.c (skip_short_body): Return error on negative chunk size
Reported-by: Antti Levomäki, Christian Jalio, Joonas Pihlaja from Forcepoint
Reported-by: Juhani Eronen from Finnish National Cyber Security Centre |
static cimg_uint64 min() { return 0; } | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 183,903,667,764,367,000,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
RGWOp *RGWHandler_REST_Service_SWIFT::op_post()
{
if (s->info.args.exists("bulk-delete")) {
return new RGWBulkDelete_ObjStore_SWIFT;
}
return new RGWPutMetadataAccount_ObjStore_SWIFT;
} | 0 | [
"CWE-617"
] | ceph | f44a8ae8aa27ecef69528db9aec220f12492810e | 325,824,338,390,931,230,000,000,000,000,000,000,000 | 7 | rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name
checking for empty name avoids later assertion in RGWObjectCtx::set_atomic
Fixes: CVE-2021-3531
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b... |
static int format8BIM(Image *ifile, Image *ofile)
{
char
temp[MagickPathExtent];
unsigned int
foundOSType;
int
ID,
resCount,
i,
c;
ssize_t
count;
unsigned char
*PString,
*str;
resCount=0;
foundOSType=0; /* found the OSType */
(void) foundOSType;
c=ReadBlobByte(... | 1 | [
"CWE-399",
"CWE-119",
"CWE-193"
] | ImageMagick | cb1214c124e1bd61f7dd551b94a794864861592e | 5,243,688,929,220,404,000,000,000,000,000,000,000 | 144 | ... |
static u32 do_add_cat(int argc, char **argv)
{
GF_Err e;
u32 i, ipass, nb_pass = 1;
char *mux_args=NULL;
GF_FilterSession *fs = NULL;
if (nb_add) {
GF_ISOOpenMode open_mode = GF_ISOM_OPEN_EDIT;
if (force_new) {
open_mode = (do_flat || (force_new==2)) ? GF_ISOM_OPEN_WRITE : GF_ISOM_WRITE_EDIT;
} else {
... | 0 | [
"CWE-476"
] | gpac | 87afe070cd6866df7fe80f11b26ef75161de85e0 | 315,635,830,874,123,200,000,000,000,000,000,000,000 | 204 | fixed #1734 |
OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image)
{
OPJ_UINT32 i;
OPJ_UINT32 l_indix = 1;
opj_mct_data_t * l_mct_deco_data = 00,* l_mct_offset_data = 00;
opj_simple_mcc_decorrelation_data_t * l_mcc_data;
OPJ_UINT32 l_mct_size,l_nb_elem;
OPJ_FLO... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 324,757,190,723,038,480,000,000,000,000,000,000,000 | 152 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
**/
static const CImg<Tuchar>& HSV_LUT256() {
static CImg<Tuchar> colormap;
cimg::mutex(8);
if (!colormap) {
CImg<Tint> tmp(1,256,1,3,1);
tmp.get_shared_channel(0).sequence(0,359);
colormap = tmp.HSVtoRGB();
}
cimg::mutex(8,0);
return colormap; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 176,969,481,139,528,830,000,000,000,000,000,000,000 | 11 | Fix other issues in 'CImg<T>::load_bmp()'. |
void fp_div_2(fp_int * a, fp_int * b)
{
int x, oldused;
oldused = b->used;
b->used = a->used;
{
fp_digit r, rr, *tmpa, *tmpb;
/* source alias */
tmpa = a->dp + b->used - 1;
/* dest alias */
tmpb = b->dp + b->used - 1;
/* carry */
r = 0;
for (x = b->used - 1; x >= 0; x--) ... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 98,652,547,275,421,800,000,000,000,000,000,000,000 | 37 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
static int sev_launch_finish(struct kvm *kvm, struct kvm_sev_cmd *argp)
{
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_finish *data;
int ret;
if (!sev_guest(kvm))
return -ENOTTY;
data = kzalloc(sizeof(*data), GFP_KERNEL_ACCOUNT);
if (!data)
return -ENOMEM;
data->handle = s... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 230,517,921,809,587,960,000,000,000,000,000,000,000 | 19 | 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... |
static void mask2shift(uint32_t mask, int *right, int *left)
{
int rshift = 0, lshift = 0;
if(!mask)
{
*right = *left = 0;
return;
}
while(!(mask & 1))
{
mask >>= 1;
rshift++;
}
*right = rshift;
while(mask & 1)
{
mask >>= 1;
lshi... | 0 | [
"CWE-369"
] | libcaca | 84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c | 137,662,759,523,276,880,000,000,000,000,000,000,000 | 24 | dither: fix integer overflows that were causing a division by zero.
Fixes: #36 (CVE-2018-20544) |
GF_Box *tfra_New()
{
ISOM_DECL_BOX_ALLOC(GF_TrackFragmentRandomAccessBox, GF_ISOM_BOX_TYPE_TFRA);
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 165,602,668,804,523,340,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
recv_frame( struct net_device *dev )
{
struct net_local *nl = (struct net_local *) dev->priv;
unsigned long ioaddr = dev->base_addr;
u32 crc = CRC32_INITIAL;
unsigned framelen = 0, frameno, ack;
unsigned is_first, frame_ok = 0;
if( check_fhdr( ioaddr, &framelen, &frameno, &ack, &is_first, &crc ) ) {
... | 0 | [
"CWE-264"
] | linux-2.6 | f2455eb176ac87081bbfc9a44b21c7cd2bc1967e | 331,092,394,750,550,170,000,000,000,000,000,000,000 | 31 | wan: Missing capability checks in sbni_ioctl()
There are missing capability checks in the following code:
1300 static int
1301 sbni_ioctl( struct net_device *dev, struct ifreq *ifr, int cmd)
1302 {
[...]
1319 case SIOCDEVRESINSTATS :
1320 if( current->euid != 0 ) /* root only */
1321 ... |
void ZRtp::setRs2Valid() {
if (zidRec != NULL) {
zidRec->setRs2Valid();
getZidCacheInstance()->saveRecord(zidRec);
}
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 152,211,390,675,633,740,000,000,000,000,000,000,000 | 7 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
static void cbinary(JF, js_Ast *exp, int opcode)
{
cexp(J, F, exp->a);
cexp(J, F, exp->b);
emit(J, F, opcode);
} | 0 | [
"CWE-476"
] | mujs | 5008105780c0b0182ea6eda83ad5598f225be3ee | 76,934,434,337,332,040,000,000,000,000,000,000,000 | 6 | Fix 697172: degenerate labeled break/continue statement.
A labeled break statement will look for a matching label through
its chain of parent statements. We start looking at the break statement
though, so if the label is attached to the break, we'll return the break
statement itself as a break target.
Start looking f... |
server_port_free(struct evdns_server_port *port)
{
EVUTIL_ASSERT(port);
EVUTIL_ASSERT(!port->refcnt);
EVUTIL_ASSERT(!port->pending_replies);
if (port->socket > 0) {
evutil_closesocket(port->socket);
port->socket = -1;
}
(void) event_del(&port->event);
event_debug_unassign(&port->event);
EVTHREAD_FREE_LOCK(p... | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 265,843,818,406,776,900,000,000,000,000,000,000,000 | 14 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
PJ_DEF(pjmedia_sdp_attr*) pjmedia_sdp_attr_create( pj_pool_t *pool,
const char *name,
const pj_str_t *value)
{
pjmedia_sdp_attr *attr;
PJ_ASSERT_RETURN(pool && name, NULL);
attr = PJ_POOL_ALLOC_T(pool, pjmedia_sdp_attr);
pj_strdup2(pool, &attr->name, name);
if (value)
pj_strdup... | 0 | [
"CWE-121",
"CWE-120",
"CWE-787"
] | pjproject | 560a1346f87aabe126509bb24930106dea292b00 | 296,022,642,516,572,270,000,000,000,000,000,000,000 | 20 | Merge pull request from GHSA-f5qg-pqcg-765m |
static int get_part_id_linear_hash(partition_info *part_info,
uint num_parts,
Item *part_expr,
uint32 *part_id,
longlong *func_value)
{
DBUG_ENTER("get_part_id_linear_hash");
... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 168,900,785,817,199,950,000,000,000,000,000,000,000 | 16 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
COMPAT_SYSCALL_DEFINE4(rt_sigtimedwait_time64, compat_sigset_t __user *, uthese,
struct compat_siginfo __user *, uinfo,
struct __kernel_timespec __user *, uts, compat_size_t, sigsetsize)
{
sigset_t s;
struct timespec64 t;
kernel_siginfo_t info;
long ret;
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;
... | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 164,907,947,276,288,600,000,000,000,000,000,000,000 | 29 | signal: Extend exec_id to 64bits
Replace the 32bit exec_id with a 64bit exec_id to make it impossible
to wrap the exec_id counter. With care an attacker can cause exec_id
wrap and send arbitrary signals to a newly exec'd parent. This
bypasses the signal sending checks if the parent changes their
credentials during e... |
static __init int alloc_kvm_area(void)
{
int cpu;
for_each_possible_cpu(cpu) {
struct vmcs *vmcs;
vmcs = alloc_vmcs_cpu(false, cpu, GFP_KERNEL);
if (!vmcs) {
free_kvm_area();
return -ENOMEM;
}
/*
* When eVMCS is enabled, alloc_vmcs_cpu() sets
* vmcs->revision_id to KVM_EVMCS_VERSION instead o... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 295,178,725,744,261,600,000,000,000,000,000,000,000 | 30 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
int cgroup_path_ns(struct cgroup *cgrp, char *buf, size_t buflen,
struct cgroup_namespace *ns)
{
int ret;
mutex_lock(&cgroup_mutex);
spin_lock_irq(&css_set_lock);
ret = cgroup_path_ns_locked(cgrp, buf, buflen, ns);
spin_unlock_irq(&css_set_lock);
mutex_unlock(&cgroup_mutex);
return ret;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 268,478,277,896,530,500,000,000,000,000,000,000,000 | 15 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
service_info *FindServiceControlURLPath(
service_table *table, const char *controlURLPath)
{
service_info *finger = NULL;
uri_type parsed_url;
uri_type parsed_url_in;
if (!table || !controlURLPath) {
return NULL;
}
if (parse_uri(controlURLPath, strlen(controlURLPath), &parsed_url_in) ==
HTTP_SUCCESS) {
fi... | 0 | [
"CWE-476"
] | pupnp | c805c1de1141cb22f74c0d94dd5664bda37398e0 | 309,107,714,980,423,600,000,000,000,000,000,000,000 | 30 | Fixes #177: NULL pointer dereference in FindServiceControlURLPath
Also fixes its dual bug in FindServiceEventURLPath. |
void psi_trigger_destroy(struct psi_trigger *t)
{
struct psi_group *group;
struct task_struct *task_to_destroy = NULL;
/*
* We do not check psi_disabled since it might have been disabled after
* the trigger got created.
*/
if (!t)
return;
group = t->group;
/*
* Wakeup waiters to stop polling. Can happ... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 182,617,533,083,729,000,000,000,000,000,000,000,000 | 66 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
has_state_with_pos(
nfa_list_T *l, // runtime state list
nfa_state_T *state, // state to update
regsubs_T *subs, // pointers to subexpressions
nfa_pim_T *pim) // postponed match or NULL
{
nfa_thread_T *thread;
int i;
for (i = 0; i < l->n; ++i)
{
thread = &l->t[i];
if (thread->st... | 0 | [
"CWE-122"
] | vim | 65b605665997fad54ef39a93199e305af2fe4d7f | 163,096,662,128,765,160,000,000,000,000,000,000,000 | 23 | patch 8.2.3409: reading beyond end of line with invalid utf-8 character
Problem: Reading beyond end of line with invalid utf-8 character.
Solution: Check for NUL when advancing. |
static Image *ReadTGAImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status;
PixelInfo
pixel;
Quantum
index;
register Quantum
*q;
register ssize_t
i,
x;
size_t
base,
flag,
offset,
real,
skip;
ssize_t
... | 1 | [
"CWE-415"
] | ImageMagick | 4f68e9661518463fca523c9726bb5d940a2aa6d8 | 4,997,392,549,234,178,000,000,000,000,000,000,000 | 404 | https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1490362 |
static int walk_component(struct nameidata *nd, int flags)
{
struct path path;
struct inode *inode;
unsigned seq;
int err;
/*
* "." and ".." are special - ".." especially so because it has
* to be able to know about the current root directory and
* parent relationships.
*/
if (unlikely(nd->last_type != LA... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 85,057,328,957,630,260,000,000,000,000,000,000,000 | 42 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
void CWebServer::Cmd_VacuumDatabase(WebEmSession & session, const request& req, Json::Value &root)
{
if (session.rights != 2)
{
session.reply_status = reply::forbidden;
return; //Only admin user allowed
}
root["status"] = "OK";
root["title"] = "VacuumDatabase";
m_sql.VacuumDatabase();
} | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 139,886,897,923,310,340,000,000,000,000,000,000,000 | 12 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
fread_file_lim (FILE *stream, size_t max_len, size_t *length)
{
char *buf = NULL;
size_t alloc = 0;
size_t size = 0;
int save_errno;
for (;;) {
size_t count;
size_t requested;
if (size + BUFSIZ + 1 > alloc) {
char *new_buf;
alloc += alloc / 2;
... | 0 | [] | augeas | 1a66739c3fc14b3257af5d4a32d0a2a714a7b39d | 18,801,550,348,563,253,000,000,000,000,000,000,000 | 47 | * src/transform.c (xread_file): catch failed fopen, e.g. EACCES |
int wc_ecc_import_unsigned(ecc_key* key, byte* qx, byte* qy,
byte* d, int curve_id)
{
return wc_ecc_import_raw_private(key, (const char*)qx, (const char*)qy,
(const char*)d, curve_id, ECC_TYPE_UNSIGNED_BIN);
} | 0 | [
"CWE-200"
] | wolfssl | 9b9568d500f31f964af26ba8d01e542e1f27e5ca | 336,315,705,699,942,950,000,000,000,000,000,000,000 | 6 | Change ECDSA signing to use blinding. |
static struct clock_source *dce120_clock_source_create(
struct dc_context *ctx,
struct dc_bios *bios,
enum clock_source_id id,
const struct dce110_clk_src_regs *regs,
bool dp_clk_src)
{
struct dce110_clk_src *clk_src =
kzalloc(sizeof(*clk_src), GFP_KERNEL);
if (!clk_src)
return NULL;
if (dce112_clk_src_co... | 1 | [
"CWE-400",
"CWE-703",
"CWE-401"
] | linux | 055e547478a11a6360c7ce05e2afc3e366968a12 | 288,594,546,535,569,230,000,000,000,000,000,000,000 | 22 | drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
krb5_gss_inquire_context(minor_status, context_handle, initiator_name,
acceptor_name, lifetime_rec, mech_type, ret_flags,
locally_initiated, opened)
OM_uint32 *minor_status;
gss_ctx_id_t context_handle;
gss_name_t *initiator_name;
gss_name_t *acceptor_na... | 1 | [
"CWE-703"
] | krb5 | 82dc33da50338ac84c7b4102dc6513d897d0506a | 117,699,648,046,616,040,000,000,000,000,000,000,000 | 91 | Fix gss_process_context_token() [CVE-2014-5352]
[MITKRB5-SA-2015-001] The krb5 gss_process_context_token() should not
actually delete the context; that leaves the caller with a dangling
pointer and no way to know that it is invalid. Instead, mark the
context as terminated, and check for terminated contexts in the GSS... |
TEST_F(HttpHealthCheckerImplTest,
SuccessServiceCheckWithCustomHostValueOnTheHostThatOverridesConfigValue) {
const std::string host = "www.envoyproxy.io";
envoy::config::endpoint::v3::Endpoint::HealthCheckConfig health_check_config;
health_check_config.set_hostname(host);
auto test_host = std::make_share... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 259,597,031,500,070,770,000,000,000,000,000,000,000 | 42 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
mail_part_find_validity_pair (EMailPart *part,
EMailPartValidityFlags validity_type)
{
GList *head, *link;
head = g_queue_peek_head_link (&part->validities);
for (link = head; link != NULL; link = g_list_next (link)) {
EMailPartValidityPair *pair = link->data;
if (pair == NULL)
... | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 336,048,230,873,826,070,000,000,000,000,000,000,000 | 19 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
ecc_check_secret_key (gcry_sexp_t keyparms)
{
gcry_err_code_t rc;
gcry_sexp_t l1 = NULL;
int flags = 0;
char *curvename = NULL;
gcry_mpi_t mpi_g = NULL;
gcry_mpi_t mpi_q = NULL;
ECC_secret_key sk;
mpi_ec_t ec = NULL;
memset (&sk, 0, sizeof sk);
/* Look for flags. */
l1 = sexp_find_token (keyparm... | 0 | [
"CWE-200"
] | libgcrypt | bf76acbf0da6b0f245e491bec12c0f0a1b5be7c9 | 250,395,503,170,461,060,000,000,000,000,000,000,000 | 134 | ecc: Add input validation for X25519.
* cipher/ecc.c (ecc_decrypt_raw): Add input validation.
* mpi/ec.c (ec_p_init): Use scratch buffer for bad points.
(_gcry_mpi_ec_bad_point): New.
--
Following is the paper describing the attack:
May the Fourth Be With You: A Microarchitectural Side Channel Attack
on Rea... |
SYSCALL_DEFINE1(chdir, const char __user *, filename)
{
struct path path;
int error;
error = user_path_dir(filename, &path);
if (error)
goto out;
error = inode_permission(path.dentry->d_inode, MAY_EXEC | MAY_CHDIR);
if (error)
goto dput_and_out;
set_fs_pwd(current->fs, &path);
dput_and_out:
path_put(&pa... | 0 | [
"CWE-732"
] | linux-stable | e57712ebebbb9db7d8dcef216437b3171ddcf115 | 259,416,422,357,444,370,000,000,000,000,000,000,000 | 20 | merge fchmod() and fchmodat() guts, kill ancient broken kludge
The kludge in question is undocumented and doesn't work for 32bit
binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as
mode had (since 0.99.14v and contrary to behaviour of any
other Unix, prescriptions of POSIX, SuS and our own manpages)
was kinda-... |
_copyViewStmt(const ViewStmt *from)
{
ViewStmt *newnode = makeNode(ViewStmt);
COPY_NODE_FIELD(view);
COPY_NODE_FIELD(aliases);
COPY_NODE_FIELD(query);
COPY_SCALAR_FIELD(replace);
COPY_NODE_FIELD(options);
COPY_SCALAR_FIELD(withCheckOption);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 47,206,190,661,393,190,000,000,000,000,000,000,000 | 13 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static long __tun_chr_ioctl(struct file *file, unsigned int cmd,
unsigned long arg, int ifreq_len)
{
struct tun_file *tfile = file->private_data;
struct tun_struct *tun;
void __user* argp = (void __user*)arg;
struct sock_fprog fprog;
struct ifreq ifr;
int sndbuf;
int vnet_hdr_sz;
int ret;
if (cmd == TU... | 1 | [
"CWE-200"
] | linux | a117dacde0288f3ec60b6e5bcedae8fa37ee0dfc | 65,127,244,762,378,800,000,000,000,000,000,000,000 | 203 | net/tun: fix ioctl() based info leaks
The tun module leaks up to 36 bytes of memory by not fully initializing
a structure located on the stack that gets copied to user memory by the
TUNGETIFF and SIOCGIFHWADDR ioctl()s.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davem... |
xmlParseDTD(const xmlChar *ExternalID, const xmlChar *SystemID) {
return(xmlSAXParseDTD(NULL, ExternalID, SystemID));
} | 0 | [
"CWE-125"
] | libxml2 | 77404b8b69bc122d12231807abf1a837d121b551 | 90,486,140,608,237,930,000,000,000,000,000,000,000 | 3 | Make sure the parser returns when getting a Stop order
patch backported from chromiun bug fixes, assuming author is Chris |
lldp_tlv_put_u16(struct dp_packet *p, uint16_t x)
{
ovs_be16 nx = htons(x);
dp_packet_put(p, &nx, sizeof nx);
} | 0 | [
"CWE-400"
] | ovs | 78e712c0b1dacc2f12d2a03d98f083d8672867f0 | 24,661,605,765,460,376,000,000,000,000,000,000,000 | 5 | lldp: do not leak memory on multiple instances of TLVs
Upstream commit:
commit a8d3c90feca548fc0656d95b5d278713db86ff61
Date: Tue, 17 Nov 2020 09:28:17 -0500
lldp: avoid memory leak from bad packets
A packet that contains multiple instances of certain TLVs will cause
lldpd to continually allocate... |
uint32_t BinaryProtocolWriter::writeBinary(
const std::unique_ptr<folly::IOBuf>& str) {
DCHECK(str);
if (!str) {
return writeI32(0);
}
return writeBinary(*str);
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 250,667,497,865,991,670,000,000,000,000,000,000,000 | 8 | 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 my_bool acl_load(THD *thd, TABLE_LIST *tables)
{
TABLE *table;
READ_RECORD read_record_info;
my_bool return_val= TRUE;
bool check_no_resolve= specialflag & SPECIAL_NO_RESOLVE;
char tmp_name[NAME_LEN+1];
int password_length;
char *password;
uint password_len;
sql_mode_t old_sql_mode= thd->variab... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 239,901,457,719,059,240,000,000,000,000,000,000,000 | 434 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
char_link(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t offset, size_t size)
{
int is_img = (offset && data[-1] == '!'), level;
size_t i = 1, txt_e, link_b = 0, link_e = 0, title_b = 0, title_e = 0;
struct buf *content = 0;
struct buf *link = 0;
struct buf *title = 0;
struct buf *u_link = 0;
si... | 0 | [] | redcarpet | e5a10516d07114d582d13b9125b733008c61c242 | 169,108,657,294,608,960,000,000,000,000,000,000,000 | 269 | Avoid rewinding previous inline when auto-linking
When a bit like "_foo_1@bar.com" is processed, first the emphasis is
rendered, then the 1 is output verbatim. When the `@` is encountered,
Redcarpet tries to find the "local part" of the address and stops when
it encounters an invalid char (i.e. here the `!`).
The pro... |
amstar_support(
application_argument_t *argument)
{
(void)argument;
fprintf(stdout, "CONFIG YES\n");
fprintf(stdout, "HOST YES\n");
fprintf(stdout, "DISK YES\n");
fprintf(stdout, "MAX-LEVEL 9\n");
fprintf(stdout, "INDEX-LINE YES\n");
fprintf(stdout, "INDEX-XML NO\n");
fprintf(stdout,... | 0 | [
"CWE-77"
] | amanda | 29bae2e271093cd8d06ea98f73a474c685c5a314 | 203,102,603,889,074,000,000,000,000,000,000,000,000 | 22 | * application-src/ambsdtar.c, application-src/amgtar.c,
application-src/amstar.c: Filter option from COMMAND-OPTIONS
* common-src/ammessage.c: Add message.
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0 |
static void __init init_no_remapping_devices(void)
{
struct dmar_drhd_unit *drhd;
struct device *dev;
int i;
for_each_drhd_unit(drhd) {
if (!drhd->include_all) {
for_each_active_dev_scope(drhd->devices,
drhd->devices_cnt, i, dev)
break;
/* ignore DMAR unit if no devices exist */
if (i == drh... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 237,396,025,326,554,180,000,000,000,000,000,000,000 | 40 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
static inline struct ext4_sb_info *EXT4_SB(struct super_block *sb)
{
return sb->s_fs_info; | 0 | [
"CWE-787"
] | linux | c37e9e013469521d9adb932d17a1795c139b36db | 12,169,215,802,260,476,000,000,000,000,000,000,000 | 4 | ext4: add more inode number paranoia checks
If there is a directory entry pointing to a system inode (such as a
journal inode), complain and declare the file system to be corrupted.
Also, if the superblock's first inode number field is too small,
refuse to mount the file system.
This addresses CVE-2018-10882.
https... |
PHP_MINIT_FUNCTION(curl)
{
le_curl = zend_register_list_destructors_ex(_php_curl_close, NULL, "curl", module_number);
le_curl_multi_handle = zend_register_list_destructors_ex(_php_curl_multi_close, NULL, "curl_multi", module_number);
le_curl_share_handle = zend_register_list_destructors_ex(_php_curl_share_close, NUL... | 0 | [] | php-src | 5fdfab743d964bb13602effc9efcd6f747e2f58c | 297,696,795,815,857,300,000,000,000,000,000,000,000 | 631 | Fixed bug #71523 (Copied handle with new option CURLOPT_HTTPHEADER crashes while curl_multi_exec) |
void CallInfo::set_virtual(KlassHandle resolved_klass, KlassHandle selected_klass, methodHandle resolved_method, methodHandle selected_method, int vtable_index, TRAPS) {
assert(vtable_index >= 0 || vtable_index == Method::nonvirtual_vtable_index, "valid index");
assert(vtable_index < 0 || !resolved_method->has_vtab... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 145,584,012,882,428,270,000,000,000,000,000,000,000 | 7 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
irc_server_get_isupport_value (struct t_irc_server *server, const char *feature)
{
char feature2[64], *pos_feature, *pos_equal, *pos_space;
int length;
static char value[256];
if (!server || !server->isupport || !feature)
return NULL;
/* search feature with value */
snprintf (feature2,... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 279,748,845,595,627,070,000,000,000,000,000,000,000 | 41 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
void mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command)
{
int error __attribute__((unused));
DBUG_ENTER("mysql_parse");
DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on(););
/*
Warning.... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 269,594,981,833,505,030,000,000,000,000,000,000,000 | 127 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
gs_window_move_resize_window (GSWindow *window,
gboolean move,
gboolean resize)
{
GtkWidget *widget;
widget = GTK_WIDGET (window);
g_assert (GTK_WIDGET_REALIZED (widget));
gs_debug ("Move and/or resize window on monitor %d:... | 0 | [] | gnome-screensaver | a5f66339be6719c2b8fc478a1d5fc6545297d950 | 51,563,636,301,789,840,000,000,000,000,000,000,000 | 33 | Ensure keyboard grab and unlock dialog exist after monitor removal
gnome-screensaver currently doesn't deal with monitors getting
removed properly. If the unlock dialog is on the removed monitor
then the unlock dialog and its associated keyboard grab are not
moved to an existing monitor when the monitor removal is pr... |
ecma_string_get_chars (const ecma_string_t *string_p, /**< ecma-string */
lit_utf8_size_t *size_p, /**< [out] size of the ecma string */
lit_utf8_size_t *length_p, /**< [out] optional argument. If the pointer is not NULL the pointed
... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 156,494,212,306,491,840,000,000,000,000,000,000,000 | 155 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
parse_file_info(struct archive_read *a, struct file_info *parent,
const unsigned char *isodirrec, size_t reclen)
{
struct iso9660 *iso9660;
struct file_info *file, *filep;
size_t name_len;
const unsigned char *rr_start, *rr_end;
const unsigned char *p;
size_t dr_len;
uint64_t fsize, offset;
int32_t location... | 0 | [
"CWE-125"
] | libarchive | f9569c086ff29259c73790db9cbf39fe8fb9d862 | 202,470,521,725,698,200,000,000,000,000,000,000,000 | 347 | iso9660: validate directory record length |
static int curl_fnmatch(void *ctx, const char *pattern, const char *string)
{
php_curl *ch = (php_curl *) ctx;
php_curl_fnmatch *t = ch->handlers->fnmatch;
int rval = CURL_FNMATCHFUNC_FAIL;
switch (t->method) {
case PHP_CURL_USER: {
zval argv[3];
zval retval;
int error;
zend_fcall_info fci;
ZVAL_... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 72dbb7f416160f490c4e9987040989a10ad431c7 | 161,741,773,428,388,200,000,000,000,000,000,000,000 | 44 | Fix bug #72674 - check both curl_escape and curl_unescape |
bgp_capability_orf_not_support (struct peer *peer, afi_t afi, safi_t safi,
u_char type, u_char mode)
{
if (BGP_DEBUG (normal, NORMAL))
zlog_debug ("%s Addr-family %d/%d has ORF type/mode %d/%d not supported",
peer->host, afi, safi, type, mode);
} | 0 | [
"CWE-119"
] | quagga | 5861739f8c38bc36ea9955e5cb2be2bf2f482d70 | 334,434,099,876,949,960,000,000,000,000,000,000,000 | 7 | bgpd: Open option parse errors don't NOTIFY, resulting in abort & DoS
* bgp_packet.c: (bgp_open_receive) Errors from bgp_open_option_parse are
detected, and the code will stop processing the OPEN and return. However
it does so without calling bgp_notify_send to send a NOTIFY - which means
the peer FSM doesn't g... |
inline std::shared_ptr<Ope> tok(const std::shared_ptr<Ope> &ope) {
return std::make_shared<TokenBoundary>(ope);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 154,054,356,257,942,450,000,000,000,000,000,000,000 | 3 | Fix #122 |
rsvg_filter_primitive_erode_free (RsvgNode * self)
{
RsvgFilterPrimitiveErode *upself;
upself = (RsvgFilterPrimitiveErode *) self;
g_string_free (upself->super.result, TRUE);
g_string_free (upself->super.in, TRUE);
_rsvg_node_free (self);
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 192,210,956,953,547,900,000,000,000,000,000,000,000 | 9 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
void skb_orphan_partial(struct sk_buff *skb)
{
/* TCP stack sets skb->ooo_okay based on sk_wmem_alloc,
* so we do not completely orphan skb, but transfert all
* accounted bytes but one, to avoid unexpected reorders.
*/
if (skb->destructor == sock_wfree
#ifdef CONFIG_INET
|| skb->destructor == tcp_wfree
#en... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 29,085,108,080,536,323,000,000,000,000,000,000,000 | 17 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int tag_chunk(struct inode *inode, struct audit_tree *tree)
{
struct inotify_watch *watch;
struct audit_tree *owner;
struct audit_chunk *chunk, *old;
struct node *p;
int n;
if (inotify_find_watch(rtree_ih, inode, &watch) < 0)
return create_chunk(inode, tree);
old = container_of(watch, struct audit_chu... | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 219,500,673,631,879,860,000,000,000,000,000,000,000 | 71 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
ruby_brace_glob(const char *str, int flags, ruby_glob_func *func, VALUE arg)
{
return ruby_brace_glob0(str, flags & ~GLOB_VERBOSE, func, arg,
rb_ascii8bit_encoding());
} | 0 | [
"CWE-22"
] | ruby | 143eb22f1877815dd802f7928959c5f93d4c7bb3 | 102,921,790,795,991,820,000,000,000,000,000,000,000 | 5 | merge revision(s) 62989:
dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@63015 b2dd03c... |
xfs_reclaim_inode_grab(
struct xfs_inode *ip,
int flags)
{
ASSERT(rcu_read_lock_held());
/* quick check for stale RCU freed inode */
if (!ip->i_ino)
return 1;
/*
* If we are asked for non-blocking operation, do unlocked checks to
* see if the inode already is being flushed or in reclaim to avoid
* loc... | 0 | [
"CWE-476"
] | linux | afca6c5b2595fc44383919fba740c194b0b76aff | 151,488,423,707,581,930,000,000,000,000,000,000,000 | 40 | xfs: validate cached inodes are free when allocated
A recent fuzzed filesystem image cached random dcache corruption
when the reproducer was run. This often showed up as panics in
lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
BUG: unable to handle kernel NULL pointer dereference at 00000000000000... |
GF_Box *dec3_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_AC3ConfigBox, GF_ISOM_BOX_TYPE_DAC3);
tmp->cfg.is_ec3 = 1;
return (GF_Box *)tmp; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 132,882,558,837,760,700,000,000,000,000,000,000,000 | 6 | fixed #1587 |
static int ext4_insert_range(struct inode *inode, loff_t offset, loff_t len)
{
struct super_block *sb = inode->i_sb;
handle_t *handle;
struct ext4_ext_path *path;
struct ext4_extent *extent;
ext4_lblk_t offset_lblk, len_lblk, ee_start_lblk = 0;
unsigned int credits, ee_len;
int ret = 0, depth, split_flag = 0;
l... | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 120,562,361,456,848,080,000,000,000,000,000,000,000 | 165 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
static ssize_t hash_sendpage(struct socket *sock, struct page *page,
int offset, size_t size, int flags)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct hash_ctx *ctx = ask->private;
int err;
if (flags & MSG_SENDPAGE_NOTLAST)
flags |= MSG_MORE;
lock_sock(sk);
sg_init_table(ctx... | 0 | [
"CWE-476"
] | linux | 4afa5f9617927453ac04b24b584f6c718dfb4f45 | 150,797,268,703,759,940,000,000,000,000,000,000,000 | 43 | crypto: algif_hash - Only export and import on sockets with data
The hash_accept call fails to work on sockets that have not received
any data. For some algorithm implementations it may cause crashes.
This patch fixes this by ensuring that we only export and import on
sockets that have received data.
Cc: stable@vge... |
static void snd_usbmidi_out_urb_complete(struct urb *urb)
{
struct out_urb_context *context = urb->context;
struct snd_usb_midi_out_endpoint *ep = context->ep;
unsigned int urb_index;
spin_lock(&ep->buffer_lock);
urb_index = context - ep->urbs;
ep->active_urbs &= ~(1 << urb_index);
if (unlikely(ep->drain_urbs))... | 0 | [
"CWE-703"
] | linux | 07d86ca93db7e5cdf4743564d98292042ec21af7 | 205,307,845,167,768,720,000,000,000,000,000,000,000 | 25 | ALSA: usb-audio: avoid freeing umidi object twice
The 'umidi' object will be free'd on the error path by snd_usbmidi_free()
when tearing down the rawmidi interface. So we shouldn't try to free it
in snd_usbmidi_create() after having registered the rawmidi interface.
Found by KASAN.
Signed-off-by: Andrey Konovalov <a... |
PHP_FUNCTION(xsl_xsltprocessor_import_stylesheet)
{
zval *id, *docp = NULL;
xmlDoc *doc = NULL, *newdoc = NULL;
xsltStylesheetPtr sheetp, oldsheetp;
xsl_object *intern;
int prevSubstValue, prevExtDtdValue, clone_docu = 0;
xmlNode *nodep = NULL;
zend_object_handlers *std_hnd;
zval *cloneDocu, *member;
if (zend... | 0 | [] | php-src | 1744be2d17befc69bf00033993f4081852a747d6 | 137,570,480,442,986,050,000,000,000,000,000,000,000 | 81 | Fix for bug #69782 |
int vfs_parse_fs_param(struct fs_context *fc, struct fs_parameter *param)
{
int ret;
if (!param->key)
return invalf(fc, "Unnamed parameter\n");
ret = vfs_parse_sb_flag(fc, param->key);
if (ret != -ENOPARAM)
return ret;
ret = security_fs_context_parse_param(fc, param);
if (ret != -ENOPARAM)
/* Param belon... | 0 | [
"CWE-787"
] | linux | 722d94847de29310e8aa03fcbdb41fc92c521756 | 299,749,122,179,197,630,000,000,000,000,000,000,000 | 34 | vfs: fs_context: fix up param length parsing in legacy_parse_param
The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an
unsigned type so a large value of "size" results in a high positive
value instead of a negative value as expected. Fix this by getting rid
of the subtraction.
Signed-off-by: Jamie H... |
static int _store_item_copy_chunks(item *d_it, item *s_it, const int len) {
item_chunk *dch = (item_chunk *) ITEM_data(d_it);
/* Advance dch until we find free space */
while (dch->size == dch->used) {
if (dch->next) {
dch = dch->next;
} else {
break;
}
}
... | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | memcached | dbb7a8af90054bf4ef51f5814ef7ceb17d83d974 | 142,673,901,529,769,360,000,000,000,000,000,000,000 | 69 | disable UDP port by default
As reported, UDP amplification attacks have started to use insecure
internet-exposed memcached instances. UDP used to be a lot more popular as a
transport for memcached many years ago, but I'm not aware of many recent
users.
Ten years ago, the TCP connection overhead from many clients was ... |
HConstant* HGraph::GetConstant(SetOncePointer<HConstant>* pointer,
Handle<Object> value) {
if (!pointer->is_set()) {
HConstant* constant = new(zone()) HConstant(value,
Representation::Tagged());
constant->InsertAfter(GetConstantUnd... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 53,572,583,055,408,630,000,000,000,000,000,000,000 | 10 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
const EVP_CIPHER *EVP_aes_128_cbc_hmac_sha1(void)
{
return NULL;
} | 0 | [
"CWE-310"
] | openssl | 746c6f3a533b1eb50b909147b35fa1b0e5c61f59 | 199,077,394,774,498,000,000,000,000,000,000,000,000 | 4 | e_aes_cbc_hmac_sha1.c: align calculated MAC at cache line. |
static int dec_ttl_action_to_attr(const struct nlattr *attr,
struct sk_buff *skb)
{
struct nlattr *start, *action_start;
const struct nlattr *a;
int err = 0, rem;
start = nla_nest_start_noflag(skb, OVS_ACTION_ATTR_DEC_TTL);
if (!start)
return -EMSGSIZE;
nla_for_each_attr(a, nla_data(attr), nla_len(attr)... | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 213,469,415,039,456,840,000,000,000,000,000,000,000 | 41 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
ga_append(garray_T *gap, int c)
{
if (ga_grow(gap, 1) == OK)
{
*((char *)gap->ga_data + gap->ga_len) = c;
++gap->ga_len;
}
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 201,724,974,787,229,120,000,000,000,000,000,000,000 | 8 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
_dbus_listen_tcp_socket (const char *host,
const char *port,
const char *family,
DBusString *retport,
const char **retfamily,
DBusSocket **fds_p,
DB... | 0 | [
"CWE-404"
] | dbus | 872b085f12f56da25a2dbd9bd0b2dff31d5aea63 | 76,528,500,631,908,185,000,000,000,000,000,000,000 | 268 | sysdeps-unix: On MSG_CTRUNC, close the fds we did receive
MSG_CTRUNC indicates that we have received fewer fds that we should
have done because the buffer was too small, but we were treating it
as though it indicated that we received *no* fds. If we received any,
we still have to make sure we close them, otherwise the... |
build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
const char *class_name, reg_syntax_t syntax)
#endif /* not RE_ENABLE_I18N */
{
int i;
const char *name = class_name;
/* In case of REG_ICASE "upper" and "lower" match the both of
upper and lower cases. */
if ((syntax & RE_ICASE)
&& (strc... | 0 | [
"CWE-19"
] | gnulib | 5513b40999149090987a0341c018d05d3eea1272 | 174,567,612,613,243,130,000,000,000,000,000,000,000 | 76 | Diagnose ERE '()|\1'
Problem reported by Hanno Böck in: http://bugs.gnu.org/21513
* lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep
track of the set of previously-completed subexpressions available
before the first alternative, and restore this set just before
parsing each subsequent alternative. This... |
MagickExport MagickBooleanType EncipherImage(Image *image,
const char *passphrase,ExceptionInfo *exception)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(... | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 220,833,149,124,696,130,000,000,000,000,000,000,000 | 12 | possible divide by zero + clear buffers |
static int _send_slurmd_conf_lite (int fd, slurmd_conf_t *cf)
{
int len;
Buf buffer = init_buf(0);
slurm_mutex_lock(&cf->config_mutex);
pack_slurmd_conf_lite(cf, buffer);
slurm_mutex_unlock(&cf->config_mutex);
len = get_buf_offset(buffer);
safe_write(fd, &len, sizeof(int));
safe_write(fd, get_buf_data(buffer), ... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 187,568,792,126,297,700,000,000,000,000,000,000,000 | 15 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
virDomainHubDefParseXML(virDomainXMLOptionPtr xmlopt,
xmlNodePtr node,
unsigned int flags)
{
virDomainHubDefPtr def;
g_autofree char *type = NULL;
if (VIR_ALLOC(def) < 0)
return NULL;
type = virXMLPropString(node, "type");
if (!type) {
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 4,257,007,496,444,966,000,000,000,000,000,000,000 | 33 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
png_colorspace_check_xy(png_XYZ *XYZ, const png_xy *xy)
{
int result;
png_xy xy_test;
/* As a side-effect this routine also returns the XYZ endpoints. */
result = png_XYZ_from_xy(XYZ, xy);
if (result != 0)
return result;
result = png_xy_from_XYZ(&xy_test, XYZ);
if (result != 0)
return... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 246,228,379,303,070,840,000,000,000,000,000,000,000 | 21 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
static int packet_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{
struct sockaddr_ll *sll = (struct sockaddr_ll *)uaddr;
struct sock *sk = sock->sk;
/*
* Check legality
*/
if (addr_len < sizeof(struct sockaddr_ll))
return -EINVAL;
if (sll->sll_family != AF_PACKET)
return -EINVAL;
retu... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 84ac7260236a49c79eede91617700174c2c19b0c | 123,287,917,432,437,670,000,000,000,000,000,000,000 | 17 | packet: fix race condition in packet_set_ring
When packet_set_ring creates a ring buffer it will initialize a
struct timer_list if the packet version is TPACKET_V3. This value
can then be raced by a different thread calling setsockopt to
set the version to TPACKET_V1 before packet_set_ring has finished.
This leads to... |
_equalCopyStmt(const CopyStmt *a, const CopyStmt *b)
{
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(query);
COMPARE_NODE_FIELD(attlist);
COMPARE_SCALAR_FIELD(is_from);
COMPARE_SCALAR_FIELD(is_program);
COMPARE_STRING_FIELD(filename);
COMPARE_NODE_FIELD(options);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 257,545,448,555,248,670,000,000,000,000,000,000,000 | 12 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
MONGO_EXPORT int mongo_cmd_get_last_error( mongo *conn, const char *db, bson *out ) {
return mongo_cmd_get_error_helper( conn, db, out, "getlasterror" );
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 310,070,367,354,943,400,000,000,000,000,000,000,000 | 3 | don't mix up int and size_t (first pass to fix that) |
static void clear_field_flag(TABLE *table)
{
Field **ptr;
DBUG_ENTER("clear_field_flag");
for (ptr= table->field; *ptr; ptr++)
(*ptr)->flags&= (~GET_FIXED_FIELDS_FLAG);
DBUG_VOID_RETURN;
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 275,550,340,929,439,340,000,000,000,000,000,000,000 | 9 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
static const char *cmd_collection_timeout(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
dcfg->col_timeout = atoi(p1);
/* max 30 days */
if ((dcfg->col_timeout >= 0)&&(dcfg->col_timeout <= 2592000)) return NULL;
... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 277,226,756,647,785,160,000,000,000,000,000,000,000 | 11 | Added SecXmlExternalEntity |
static int send_jpeg_rect(VncState *vs, int x, int y, int w, int h, int quality)
{
struct jpeg_compress_struct cinfo;
struct jpeg_error_mgr jerr;
struct jpeg_destination_mgr manager;
JSAMPROW row[1];
uint8_t *buf;
int dy;
if (ds_get_bytes_per_pixel(vs->ds) == 1)
return send_full_col... | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 230,145,227,895,118,900,000,000,000,000,000,000,000 | 52 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
zopen_file(i_ctx_t *i_ctx_p, const gs_parsed_file_name_t *pfn,
const char *file_access, stream **ps, gs_memory_t *mem)
{
gx_io_device *const iodev = pfn->iodev;
int code = 0;
if (pfn->fname == NULL) { /* just a device */
iodev->state = i_ctx_p;
code = iodev->procs.open_device... | 0 | [] | ghostpdl | 0d3901189f245232f0161addf215d7268c4d05a3 | 174,106,320,372,542,370,000,000,000,000,000,000,000 | 29 | Bug 699657: properly apply file permissions to .tempfile |
void Compute(OpKernelContext* context) override {
const Tensor& input = context->input(0);
const TensorShape& input_shape = input.shape();
const int32_t input_dims = input_shape.dims();
const Tensor& segment_id = context->input(1);
const TensorShape& segment_id_shape = segment_id.shape();
con... | 1 | [
"CWE-20",
"CWE-703"
] | tensorflow | 13d38a07ce9143e044aa737cfd7bb759d0e9b400 | 252,786,649,868,539,100,000,000,000,000,000,000,000 | 70 | Fix tf.raw_ops.UnsortedSegmentJoin vulnerability with invalid num_segments.
Check that input is actually a scalar before treating it as such.
PiperOrigin-RevId: 445206880 |
MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
Image *image,const BlobMode mode,ExceptionInfo *exception)
{
BlobInfo
*magick_restrict blob_info;
char
extension[MagickPathExtent],
filename[MagickPathExtent];
const char
*type;
MagickBooleanType
status;
PolicyRight... | 0 | [
"CWE-416",
"CWE-399"
] | ImageMagick | c5d012a46ae22be9444326aa37969a3f75daa3ba | 216,314,255,203,155,300,000,000,000,000,000,000,000 | 327 | https://github.com/ImageMagick/ImageMagick6/issues/43 |
double val_real() { return (double)val_int(); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 169,307,693,031,914,260,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
void fib6_update_sernum(struct net *net, struct fib6_info *f6i)
{
struct fib6_node *fn;
fn = rcu_dereference_protected(f6i->fib6_node,
lockdep_is_held(&f6i->fib6_table->tb6_lock));
if (fn)
fn->fn_sernum = fib6_new_sernum(net);
} | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 58,009,288,362,650,360,000,000,000,000,000,000,000 | 9 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
int ssl3_get_cert_verify(SSL *s)
{
EVP_PKEY *pkey = NULL;
unsigned char *p;
int al, ok, ret = 0;
long n;
int type = 0, i, j;
X509 *peer;
const EVP_MD *md = NULL;
EVP_MD_CTX mctx;
EVP_MD_CTX_init(&mctx);
/*
* We should only process a CertificateVerify message if we have rece... | 0 | [] | openssl | d6be3124f22870f1888c532523b74ea5d89795eb | 34,657,214,465,268,897,000,000,000,000,000,000,000 | 209 | Fix PSK handling.
The PSK identity hint should be stored in the SSL_SESSION structure
and not in the parent context (which will overwrite values used
by other SSL structures with the same SSL_CTX).
Use BUF_strndup when copying identity as it may not be null terminated.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cher... |
const Track* Tracks::GetTrackByNumber(long tn) const {
if (tn < 0)
return NULL;
Track** i = m_trackEntries;
Track** const j = m_trackEntriesEnd;
while (i != j) {
Track* const pTrack = *i++;
if (pTrack == NULL)
continue;
if (tn == pTrack->GetNumber())
return pTrack;
}
return ... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 120,504,172,874,082,760,000,000,000,000,000,000,000 | 19 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
xmlTextReaderMoveToElement(xmlTextReaderPtr reader) {
if (reader == NULL)
return(-1);
if (reader->node == NULL)
return(-1);
if (reader->node->type != XML_ELEMENT_NODE)
return(0);
if (reader->curnode != NULL) {
reader->curnode = NULL;
return(1);
}
return(0);
} | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 24,537,788,792,835,295,000,000,000,000,000,000,000 | 13 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
int gdImageNegate(gdImagePtr src)
{
int x, y;
int r,g,b,a;
int new_pxl, pxl;
typedef int (*FuncPtr)(gdImagePtr, int, int);
FuncPtr f;
if (src==NULL) {
return 0;
}
f = GET_PIXEL_FUNCTION(src);
for (y=0; y<src->sy; ++y) {
for (x=0; x<src->sx; ++x) {
pxl = f (src, x, y);
r = gdImageRed(src, pxl);... | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 260,186,910,053,146,030,000,000,000,000,000,000,000 | 33 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). |
void blk_mq_requeue_request(struct request *rq)
{
__blk_mq_requeue_request(rq);
BUG_ON(blk_queued_rq(rq));
blk_mq_add_to_requeue_list(rq, true);
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 41,519,171,830,428,032,000,000,000,000,000,000,000 | 7 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
dbg_skip_some_packets (IOBUF inp, unsigned n, const char *dbg_f, int dbg_l)
{
int skip, rc = 0;
PACKET pkt;
for (; n && !rc; n--)
{
init_packet (&pkt);
rc = parse (inp, &pkt, 0, NULL, &skip, NULL, 1, "skip", dbg_f, dbg_l);
}
return rc;
} | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 78,442,840,341,057,340,000,000,000,000,000,000,000 | 12 | 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 ... |
void __audit_inode_child(struct inode *parent,
const struct dentry *dentry,
const unsigned char type)
{
struct audit_context *context = current->audit_context;
struct inode *inode = d_backing_inode(dentry);
const char *dname = dentry->d_name.name;
struct audit_names *n, *found_parent = NULL, *found_child = ... | 0 | [
"CWE-362"
] | linux | 43761473c254b45883a64441dd0bc85a42f3645c | 45,131,135,004,505,520,000,000,000,000,000,000,000 | 79 | audit: fix a double fetch in audit_log_single_execve_arg()
There is a double fetch problem in audit_log_single_execve_arg()
where we first check the execve(2) argumnets for any "bad" characters
which would require hex encoding and then re-fetch the arguments for
logging in the audit record[1]. Of course this leaves a... |
void FS_SV_Rename( const char *from, const char *to, qboolean safe ) {
char *from_ospath, *to_ospath;
if ( !fs_searchpaths ) {
Com_Error( ERR_FATAL, "Filesystem call made without initialization" );
}
// don't let sound stutter
S_ClearSoundBuffer();
from_ospath = FS_BuildOSPath( fs_homepath->string, from, "... | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 268,384,083,431,461,320,000,000,000,000,000,000,000 | 25 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
static char *ibpb_state(void)
{
if (boot_cpu_has(X86_FEATURE_IBPB)) {
if (static_key_enabled(&switch_mm_always_ibpb))
return ", IBPB: always-on";
if (static_key_enabled(&switch_mm_cond_ibpb))
return ", IBPB: conditional";
return ", IBPB: disabled";
}
return "";
} | 0 | [] | linux | a2059825986a1c8143fd6698774fa9d83733bb11 | 89,860,193,978,011,510,000,000,000,000,000,000,000 | 11 | x86/speculation: Enable Spectre v1 swapgs mitigations
The previous commit added macro calls in the entry code which mitigate the
Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are
enabled. Enable those features where applicable.
The mitigations may be disabled with "nospectre_v1" or "mitigations... |
sctp_disposition_t sctp_sf_eat_data_fast_4_4(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
int error;
if (!sctp_vtag_verify(chunk, as... | 0 | [
"CWE-125"
] | linux | bf911e985d6bbaa328c20c3e05f4eb03de11fdd6 | 45,284,187,198,108,460,000,000,000,000,000,000,000 | 57 | sctp: validate chunk len before actually using it
Andrey Konovalov reported that KASAN detected that SCTP was using a slab
beyond the boundaries. It was caused because when handling out of the
blue packets in function sctp_sf_ootb() it was checking the chunk len
only after already processing the first chunk, validatin... |
static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
{
struct net *net = sock_net(skb->sk);
struct netdev_queue *dev_queue;
struct tcmsg *tcm = NLMSG_DATA(n);
struct nlattr *tca[TCA_MAX + 1];
struct net_device *dev;
struct Qdisc *q = NULL;
const struct Qdisc_class_ops *cops;
unsigned lon... | 0 | [
"CWE-909"
] | linux-2.6 | 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b | 46,502,595,600,792,825,000,000,000,000,000,000,000 | 121 | tc: Fix unitialized kernel memory leak
Three bytes of uninitialized kernel memory are currently leaked to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.