func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void gnrm_box_del(GF_Box *s)
{
GF_GenericSampleEntryBox *ptr = (GF_GenericSampleEntryBox *)s;
gf_isom_sample_entry_predestroy((GF_SampleEntryBox *)ptr);
if (ptr->data) gf_free(ptr->data);
gf_free(ptr);
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 115,474,183,481,035,350,000,000,000,000,000,000,000 | 7 | fixed #1587 |
setup_call2(Node* node)
{
int r = 0;
switch (NODE_TYPE(node)) {
case NODE_LIST:
case NODE_ALT:
do {
r = setup_call2(NODE_CAR(node));
} while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
break;
case NODE_QUANT:
if (QUANT_(node)->upper != 0)
r = setup_call2(NODE_BODY(node));
... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 2,007,771,347,769,316,800,000,000,000,000,000,000 | 53 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
int main(int argc, char **argv)
{
int error;
my_bool first_argument_uses_wildcards=0;
char *wild;
MYSQL mysql;
MY_INIT(argv[0]);
if (load_defaults("my",load_default_groups,&argc,&argv))
exit(1);
get_options(&argc,&argv);
wild=0;
if (argc)
{
char *pos= argv[argc-1], *to;
for (to= pos ; ... | 0 | [
"CWE-319"
] | mysql-server | 060b1eadf4913f7066484ea34ec62feead1bca44 | 149,924,361,939,771,180,000,000,000,000,000,000,000 | 111 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99) |
bool PamBackend::openSession() {
if (!m_pam->setCred(PAM_ESTABLISH_CRED)) {
m_app->error(m_pam->errorString(), Auth::ERROR_AUTHENTICATION);
return false;
}
QProcessEnvironment sessionEnv = m_app->session()->processEnvironment();
if (sessionEnv.value(QStringLi... | 0 | [
"CWE-613",
"CWE-287",
"CWE-284"
] | sddm | 147cec383892d143b5e02daa70f1e7def50f5d98 | 111,984,428,506,067,060,000,000,000,000,000,000,000 | 32 | Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service |
static bool mysql_change_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
{
char path[FN_REFLEN+1];
int error;
handler *file= lpt->table->file;
THD *thd= lpt->thd;
DBUG_ENTER("mysql_change_partitions");
build_table_filename(path, sizeof(path) - 1, lpt->db, lpt->table_name, "", 0);
if(mysql_trans_prepare_alte... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 4,252,937,978,006,421,000,000,000,000,000,000,000 | 33 | 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_do_replace(struct net *net, void __user *user, unsigned int len)
{
int ret;
struct compat_ipt_replace tmp;
struct xt_table_info *newinfo;
void *loc_cpu_entry;
struct ipt_entry *iter;
if (copy_from_user(&tmp, user, sizeof(tmp)) != 0)
return -EFAULT;
/* overflow check */
if (tmp.size >= INT_MAX / num_p... | 1 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 330,729,358,214,913,970,000,000,000,000,000,000,000 | 51 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
MagickExport MagickBooleanType SetImageOpacity(Image *image,
const Quantum opacity)
{
CacheView
*image_view;
ExceptionInfo
*exception;
MagickBooleanType
status;
ssize_t
y;
assert(image != (Image *) NULL);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickMo... | 0 | [
"CWE-665"
] | ImageMagick6 | 27b1c74979ac473a430e266ff6c4b645664bc805 | 63,370,738,272,247,220,000,000,000,000,000,000,000 | 54 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
bool ikev1_ship_chain(chunk_t *chain, int n, pb_stream *outs,
uint8_t type)
{
for (int i = 0; i < n; i++) {
if (!ikev1_ship_CERT(type, chain[i], outs))
return false;
}
return true;
} | 0 | [
"CWE-125"
] | libreswan | 471a3e41a449d7c753bc4edbba4239501bb62ba8 | 148,611,414,248,582,280,000,000,000,000,000,000,000 | 10 | security: Fix for CVE-2020-1763
pluto will crash on a null pointer dereference when trying to log an error
for an IKEv1 packet containing bogus information and/or flags.
Signed-off-by: Paul Wouters <pwouters@redhat.com> |
GF_Err proj_type_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_ProjectionTypeBox *ptr = (GF_ProjectionTypeBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->type==GF_ISOM_BOX_TYPE_CBMP) {
gf_bs_write_u32(bs, ptr->layout);
gf_bs_write_u32(bs, ptr->padding);
}
else if (ptr->type==GF... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 60,370,450,254,164,000,000,000,000,000,000,000,000 | 22 | fixed #2255 |
microdescs_parse_from_string(const char *s, const char *eos,
int allow_annotations, int copy_body)
{
smartlist_t *tokens;
smartlist_t *result;
microdesc_t *md = NULL;
memarea_t *area;
const char *start = s;
const char *start_of_next_microdesc;
int flags = allow_annotations ? T... | 0 | [
"CWE-399"
] | tor | 57e35ad3d91724882c345ac709666a551a977f0f | 58,825,566,100,291,930,000,000,000,000,000,000,000 | 98 | Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha. |
PHP_FUNCTION(openssl_pkey_export)
{
struct php_x509_request req;
zval ** zpkey, * args = NULL, *out;
char * passphrase = NULL; int passphrase_len = 0;
long key_resource = -1;
EVP_PKEY * key;
BIO * bio_out = NULL;
const EVP_CIPHER * cipher;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zz|s!a!", &zpkey... | 0 | [
"CWE-200"
] | php-src | 270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e | 325,744,902,746,300,920,000,000,000,000,000,000,000 | 54 | Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only |
static int copy_strings(int argc, struct user_arg_ptr argv,
struct linux_binprm *bprm)
{
struct page *kmapped_page = NULL;
char *kaddr = NULL;
unsigned long kpos = 0;
int ret;
while (argc-- > 0) {
const char __user *str;
int len;
unsigned long pos;
ret = -EFAULT;
str = get_user_arg_ptr(argv, argc);
... | 0 | [
"CWE-401"
] | linux | f612acfae86af7ecad754ae6a46019be9da05b8e | 8,556,361,047,955,779,000,000,000,000,000,000,000 | 91 | exec: Fix mem leak in kernel_read_file
syzkaller report this:
BUG: memory leak
unreferenced object 0xffffc9000488d000 (size 9195520):
comm "syz-executor.0", pid 2752, jiffies 4294787496 (age 18.757s)
hex dump (first 32 bytes):
ff ff ff ff ff ff ff ff a8 00 00 00 01 00 00 00 ................
02 00 00 00 00... |
ex_abclear(exarg_T *eap)
{
map_clear(eap->cmd, eap->arg, TRUE, TRUE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 122,590,874,382,957,850,000,000,000,000,000,000,000 | 4 | 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. |
GF_Err abst_box_size(GF_Box *s)
{
GF_Err e;
u32 i;
GF_AdobeBootstrapInfoBox *ptr = (GF_AdobeBootstrapInfoBox *)s;
s->size += 25
+ (ptr->movie_identifier ? (strlen(ptr->movie_identifier) + 1) : 1)
+ 1;
for (i=0; i<ptr->server_entry_count; i++)
s->size += strlen(gf_list_get(ptr->server_en... | 0 | [
"CWE-125"
] | gpac | 093283e727f396130651280609e687cd4778e0d1 | 77,363,806,137,723,700,000,000,000,000,000,000,000 | 38 | fixed #1564 |
R_API RList *r_bin_java_get_args(RBinJavaField *fm_type) {
RList *the_list = r_bin_java_extract_type_values (fm_type->descriptor);
RList *arg_list = r_list_new ();
ut8 in_args = 0;
RListIter *desc_iter;
char *str;
r_list_foreach (the_list, desc_iter, str) {
if (str && *str == '(') {
in_args = 1;
continue;... | 0 | [
"CWE-125"
] | radare2 | e9ce0d64faf19fa4e9c260250fbdf25e3c11e152 | 155,542,788,123,306,800,000,000,000,000,000,000,000 | 21 | Fix #10498 - Fix crash in fuzzed java files (#10511) |
gs_lib_ctx_stash_exe(gs_lib_ctx_t *ctx, const char *arg)
{
gs_lib_ctx_core_t *core;
size_t len;
const char *p, *word;
const char *sep = gp_file_name_directory_separator();
size_t seplen = strlen(sep);
if (ctx == NULL || ctx->core == NULL || arg == NULL)
return 0;
/* Sanitize arg */... | 0 | [
"CWE-20"
] | ghostpdl | a9bd3dec9fde03327a4a2c69dad1036bf9632e20 | 238,470,842,747,190,900,000,000,000,000,000,000,000 | 59 | Bug 704342: Include device specifier strings in access validation
for the "%pipe%", %handle%" and %printer% io devices.
We previously validated only the part after the "%pipe%" Postscript device
specifier, but this proved insufficient.
This rebuilds the original file name string, and validates it complete. The
sligh... |
static inline int ext4_begin_ordered_truncate(struct inode *inode,
loff_t new_size)
{
return jbd2_journal_begin_ordered_truncate(
EXT4_SB(inode->i_sb)->s_journal,
&EXT4_I(inode)->jinode,
new_size);
} | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 154,798,217,425,673,890,000,000,000,000,000,000,000 | 8 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
int shmem_lock(struct file *file, int lock, struct user_struct *user)
{
struct inode *inode = file->f_path.dentry->d_inode;
struct shmem_inode_info *info = SHMEM_I(inode);
int retval = -ENOMEM;
spin_lock(&info->lock);
if (lock && !(info->flags & VM_LOCKED)) {
if (!user_shm_lock(inode->i_size, user))
goto out... | 0 | [
"CWE-200"
] | linux-2.6 | e84e2e132c9c66d8498e7710d4ea532d1feaaac5 | 270,082,320,202,635,000,000,000,000,000,000,000,000 | 21 | tmpfs: restore missing clear_highpage
tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in
which shmem_getpage receives the page from its caller instead of allocating.
We must cover this case by clear_highpage before SetPageUptodate, as before.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Sig... |
process_packet(
register struct peer *peer,
register struct pkt *pkt,
u_int len
)
{
double t34, t21;
double p_offset, p_del, p_disp;
l_fp p_rec, p_xmt, p_org, p_reftime, ci;
u_char pmode, pleap, pversion, pstratum;
char statstr[NTP_MAXSTRLEN];
#ifdef ASSYM
int itemp;
double etemp, ftemp, td;
#endif /* ASSYM ... | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 192,940,685,993,385,140,000,000,000,000,000,000,000 | 308 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
struct sk_buff *__cfg80211_alloc_event_skb(struct wiphy *wiphy,
struct wireless_dev *wdev,
enum nl80211_commands cmd,
enum nl80211_attrs attr,
unsigned int portid,
int vendor_event_idx,
int approxlen, gfp_t gfp)
{
struct cfg80211_registered_device *rdev = wiphy_to_rdev(w... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 61,329,599,431,797,830,000,000,000,000,000,000,000 | 31 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
int read_header_tga(gdIOCtx *ctx, oTga *tga)
{
unsigned char header[18];
if (gdGetBuf(header, sizeof(header), ctx) < 18) {
gd_error("fail to read header");
return -1;
}
tga->identsize = header[0];
tga->colormaptype = header[1];
tga->imagetype = header[2];
tga->colormapstart = header[3] + (header[4] << 8);... | 1 | [
"CWE-125"
] | libgd | 8b111b2b4a4842179be66db68d84dda91a246032 | 102,397,361,390,024,960,000,000,000,000,000,000,000 | 53 | fix read out-of-bands in reading tga header file |
static string CollectiveKey(OpKernelContext* ctx, int32_t group_key,
int32_t instance_key) {
return strings::StrCat(group_key, ":", instance_key, ":",
ctx->frame_iter().frame_id, ":",
ctx->frame_iter().iter_id);
} | 0 | [
"CWE-416"
] | tensorflow | ca38dab9d3ee66c5de06f11af9a4b1200da5ef75 | 2,026,107,981,228,010,400,000,000,000,000,000,000 | 6 | Fix undefined behavior in CollectiveReduceV2 and others
We should not call done after it's moved.
PiperOrigin-RevId: 400838185
Change-Id: Ifc979740054b8f8c6f4d50acc89472fe60c4fdb1 |
static SQInteger base_getroottable(HSQUIRRELVM v)
{
v->Push(v->_roottable);
return 1;
} | 0 | [
"CWE-703",
"CWE-787"
] | squirrel | a6413aa690e0bdfef648c68693349a7b878fe60d | 123,261,988,361,139,400,000,000,000,000,000,000,000 | 5 | fix in thread.call |
static int svc_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
int error, ep_ref;
struct sockaddr_atmsvc sa;
struct atm_vcc *vcc = ATM_SD(sock);
switch (cmd) {
case ATM_ADDPARTY:
if (!test_bit(ATM_VF_SESSION, &vcc->flags))
return -EINVAL;
if (copy_from_user(&sa, (void __user *) arg, s... | 0 | [
"CWE-399"
] | linux-2.6 | 17b24b3c97498935a2ef9777370b1151dfed3f6f | 314,415,910,600,576,600,000,000,000,000,000,000,000 | 27 | ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table
As reported by Hugo Dias that it is possible to cause a local denial
of service attack by calling the svc_listen function twice on the same
socket and reading /proc/net/atm/*vc
Signed-off-by: Chas Williams <chas@cmf.nrl.navy.mil>
Signed-off-by: D... |
static int ZEND_FASTCALL ZEND_FETCH_OBJ_FUNC_ARG_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_value)) {
/* Behave like FETCH_OBJ_W */
zend_free_op free_op1, free_op2;
zval *property = _get_zval_ptr_var(&opline->op2, EX(Ts... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 265,036,844,316,777,830,000,000,000,000,000,000,000 | 36 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
int MYSQLlex(YYSTYPE *yylval, THD *thd)
{
return thd->m_parser_state->m_lip.lex_token(yylval, thd);
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 248,397,985,831,594,270,000,000,000,000,000,000,000 | 4 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
get_interp_pixel (guchar * src, gdouble ox, gdouble oy, guchar ch, RsvgIRect boundarys,
guint rowstride)
{
double xmod, ymod;
double dist1, dist2, dist3, dist4;
double c, c1, c2, c3, c4;
double fox, foy, cox, coy;
xmod = fmod (ox, 1.0);
ymod = fmod (oy, 1.0);
d... | 0 | [] | librsvg | a51919f7e1ca9c535390a746fbf6e28c8402dc61 | 60,746,741,748,893,620,000,000,000,000,000,000,000 | 49 | rsvg: Add rsvg_acquire_node()
This function does proper recursion checks when looking up resources
from URLs and thereby helps avoiding infinite loops when cyclic
references span multiple types of elements. |
rb_str_aset_m(int argc, VALUE *argv, VALUE str)
{
if (argc == 3) {
if (TYPE(argv[0]) == T_REGEXP) {
rb_str_subpat_set(str, argv[0], argv[1], argv[2]);
}
else {
rb_str_splice(str, NUM2LONG(argv[0]), NUM2LONG(argv[1]), argv[2]);
}
return argv[2];
}
if (argc != 2) {
rb_raise(rb_eArgError, "wron... | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 38,721,548,886,939,320,000,000,000,000,000,000,000 | 16 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static int wc_ecc_shared_secret_gen_async(ecc_key* private_key,
ecc_point* point, byte* out, word32 *outlen,
ecc_curve_spec* curve)
{
int err;
#if defined(HAVE_CAVIUM_V) || defined(HAVE_INTEL_QA)
#ifdef HAVE_CAVIUM_V
/* verify the curve is supported by hardware */
if (NitroxEccIsCur... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 253,041,541,241,556,100,000,000,000,000,000,000,000 | 60 | 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 void sysfs_slab_remove_workfn(struct work_struct *work)
{
struct kmem_cache *s =
container_of(work, struct kmem_cache, kobj_remove_work);
if (!s->kobj.state_in_sysfs)
/*
* For a memcg cache, this may be called during
* deactivation and again on shutdown. Remove only once.
* A cache is never shu... | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 98,379,724,841,644,920,000,000,000,000,000,000,000 | 21 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
_XimEncodeSavedICATTRIBUTE(
Xic ic,
XIMResourceList res_list,
unsigned int res_num,
int *idx,
char *buf,
int size,
int *ret_len,
XPointer top,
unsigned long mode)
{
int i;
int num = ic->private.proto.num_saved_icvalues;
XrmQuark *quark_list = ic->pr... | 0 | [
"CWE-190"
] | libx11 | 1703b9f3435079d3c6021e1ee2ec34fd4978103d | 108,454,769,198,993,280,000,000,000,000,000,000,000 | 108 | Change the data_len parameter of _XimAttributeToValue() to CARD16
It's coming from a length in the protocol (unsigned) and passed
to functions that expect unsigned int parameters (_XCopyToArg()
and memcpy()).
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Todd Carson <toc@daybefore.net> |
__sk_dst_get(struct sock *sk)
{
return rcu_dereference_check(sk->sk_dst_cache, rcu_read_lock_held() ||
sock_owned_by_user(sk) ||
lockdep_is_held(&sk->sk_lock.slock));
} | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 285,744,066,587,068,260,000,000,000,000,000,000,000 | 6 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static inline int int_clamp(int val, int vmin, int vmax)
{
if (val < vmin) {
return vmin;
} else if (val > vmax) {
return vmax;
} else {
return val;
}
} | 0 | [
"CWE-772"
] | qemu | 51dbea77a29ea46173373a6dad4ebd95d4661f42 | 134,610,461,448,016,340,000,000,000,000,000,000,000 | 10 | hid: Reset kbd modifiers on reset
When resetting the keyboard, we need to reset not just the pending keystrokes,
but also any pending modifiers. Otherwise there's a race when we're getting
reset while running an escape sequence (modifier 0x100).
Cc: qemu-stable@nongnu.org
Signed-off-by: Alexander Graf <agraf@suse.de>... |
get_provider_type (GoaProvider *provider)
{
return "exchange";
} | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 130,702,955,760,024,820,000,000,000,000,000,000,000 | 4 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
struct ib_xrcd *mlx5_ib_alloc_xrcd(struct ib_device *ibdev,
struct ib_ucontext *context,
struct ib_udata *udata)
{
struct mlx5_ib_dev *dev = to_mdev(ibdev);
struct mlx5_ib_xrcd *xrcd;
int err;
if (!MLX5_CAP_GEN(dev->mdev, xrc))
return ERR_PTR(-ENOSYS);
xrcd = kmalloc(sizeof(*xrcd), GFP_KERNEL);
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 54,882,568,544,716,370,000,000,000,000,000,000,000 | 23 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
SECURITY_STATUS ntlm_read_AuthenticateMessage(NTLM_CONTEXT* context, PSecBuffer buffer)
{
SECURITY_STATUS status = SEC_E_INVALID_TOKEN;
wStream* s;
size_t length;
UINT32 flags = 0;
NTLM_AV_PAIR* AvFlags = NULL;
UINT32 PayloadBufferOffset;
NTLM_AUTHENTICATE_MESSAGE* message;
SSPI_CREDENTIALS* credentials = conte... | 0 | [
"CWE-125"
] | FreeRDP | 48361c411e50826cb602c7aab773a8a20e1da6bc | 202,852,554,487,909,900,000,000,000,000,000,000,000 | 205 | Fixed GHSL-2020-100: oob read in ntlm_read_ChallengeMessage
* Added length checks for data read from stream
* Unified function resource cleanup
(cherry picked from commit 8357dedbbf7213b7d0d18f1026145b9a5b92235a) |
zip_alloc_decryption_buffer(struct archive_read *a)
{
struct zip *zip = (struct zip *)(a->format->data);
size_t bs = 256 * 1024;
if (zip->decrypted_buffer == NULL) {
zip->decrypted_buffer_size = bs;
zip->decrypted_buffer = malloc(bs);
if (zip->decrypted_buffer == NULL) {
archive_set_error(&a->archive, ENOM... | 0 | [
"CWE-20"
] | libarchive | d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7 | 248,720,708,975,388,800,000,000,000,000,000,000,000 | 17 | Issue #656: Fix CVE-2016-1541, VU#862384
When reading OS X metadata entries in Zip archives that were stored
without compression, libarchive would use the uncompressed entry size
to allocate a buffer but would use the compressed entry size to limit
the amount of data copied into that buffer. Since the compressed
and... |
PHPAPI char * _php_math_longtobase(zval *arg, int base)
{
static char digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
char buf[(sizeof(unsigned long) << 3) + 1];
char *ptr, *end;
unsigned long value;
if (Z_TYPE_P(arg) != IS_LONG || base < 2 || base > 36) {
return STR_EMPTY_ALLOC();
}
value = Z_LVAL_P(arg)... | 0 | [] | php-src | 0d822f6df946764f3f0348b82efae2e1eaa83aa0 | 338,314,519,277,819,800,000,000,000,000,000,000,000 | 23 | Bug #71201 round() segfault on 64-bit builds |
dlz_closeversion(const char *zone, bool commit,
void *dbdata, void **versionp)
{
struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
if (!state->transaction_started) {
if (state->log != NULL)
state->log(ISC_LOG_INFO, "dlz_example: transaction not "
"started for zone %s", zone);
*vers... | 0 | [
"CWE-732"
] | bind9 | 34348d9ee4db15307c6c42db294419b4df569f76 | 278,484,305,982,291,370,000,000,000,000,000,000,000 | 48 | denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283) |
form_update_line(Line *line, char **str, int spos, int epos, int width,
int newline, int password)
{
int c_len = 1, c_width = 1, w, i, len, pos;
char *p, *buf;
Lineprop c_type, effect, *prop;
for (p = *str, w = 0, pos = 0; *p && w < width;) {
c_type = get_mctype((unsigned char *)p);
#ifdef USE_M17N... | 0 | [
"CWE-119"
] | w3m | 9f0bdcfdf061db3520bd1f112bdc5e83acdec4be | 171,541,512,310,002,150,000,000,000,000,000,000,000 | 137 | Prevent segfault for formUpdateBuffer
Bug-Debian: https://github.com/tats/w3m/issues/9
Bug-Debian: https://github.com/tats/w3m/issues/10 |
set_control_chars(TTY * tty_settings, int my_erase, int my_intr, int my_kill)
{
if (DISABLED(tty_settings->c_cc[VERASE]) || my_erase >= 0) {
tty_settings->c_cc[VERASE] = UChar((my_erase >= 0)
? my_erase
: default_erase());
}
if (DISABLED(tty_settings->c_cc[VINTR]) || my_intr >= 0) {
tty_s... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 172,847,070,980,572,630,000,000,000,000,000,000,000 | 20 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
void get_mqh(const char *user, const char *host, USER_CONN *uc)
{
ACL_USER *acl_user;
mysql_mutex_lock(&acl_cache->lock);
if (initialized && (acl_user= find_acl_user(host,user, FALSE)))
uc->user_resources= acl_user->user_resource;
else
memset(&uc->user_resources, 0, sizeof(uc->user_resources));
mys... | 0 | [] | mysql-server | 25d1b7e03b9b375a243fabdf0556c063c7282361 | 218,931,452,602,193,200,000,000,000,000,000,000,000 | 13 | Bug #22722946: integer overflow may lead to wrong results in get_56_lenc_string |
static const char *GetLocaleMonitorMessage(const char *text)
{
char
message[MaxTextExtent],
tag[MaxTextExtent];
const char
*locale_message;
register char
*p;
(void) CopyMagickString(tag,text,MaxTextExtent);
p=strrchr(tag,'/');
if (p != (char *) NULL)
*p='\0';
(void) FormatLocaleStri... | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 29,917,884,217,981,350,000,000,000,000,000,000,000 | 22 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
ExtractorImpl::ExtractorImpl(const JwtProvider& provider) { addProvider(provider); } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 187,945,229,272,522,000,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
bool IsSupported(const string& op_name, DataType dtype) const {
const auto it = supported_ops_.find(op_name);
return it != supported_ops_.end() && it->second.count(dtype) > 0;
} | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 5,901,013,582,637,869,000,000,000,000,000,000,000 | 4 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
Value *ESTreeIRGen::genHermesInternalCall(
StringRef name,
Value *thisValue,
ArrayRef<Value *> args) {
return Builder.createCallInst(
Builder.createLoadPropertyInst(
Builder.createTryLoadGlobalPropertyInst("HermesInternal"), name),
thisValue,
args);
} | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 264,831,067,694,960,030,000,000,000,000,000,000,000 | 10 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
Bool gf_isom_get_last_producer_time_box(GF_ISOFile *file, GF_ISOTrackID *refTrackID, u64 *ntp, u64 *timestamp, Bool reset_info)
{
if (!file) return GF_FALSE;
if (refTrackID) *refTrackID = 0;
if (ntp) *ntp = 0;
if (timestamp) *timestamp = 0;
if (file->last_producer_ref_time) {
if (refTrackID) *refTrackID = file-... | 0 | [
"CWE-787"
] | gpac | f0a41d178a2dc5ac185506d9fa0b0a58356b16f7 | 109,811,153,147,114,720,000,000,000,000,000,000,000 | 19 | fixed #2120 |
modify_policy_2_svc(mpol_arg *arg, struct svc_req *rqstp)
{
static generic_ret ret;
char *prime_arg;
gss_buffer_desc client_name,
service_name;
OM_uint32 minor_stat;
kadm5_server_handle_t handle;
cons... | 1 | [
"CWE-119",
"CWE-772",
"CWE-401"
] | krb5 | 83ed75feba32e46f736fcce0d96a0445f29b96c2 | 282,942,358,279,907,940,000,000,000,000,000,000,000 | 51 | Fix leaks in kadmin server stubs [CVE-2015-8631]
In each kadmind server stub, initialize the client_name and
server_name variables, and release them in the cleanup handler. Many
of the stubs will otherwise leak the client and server name if
krb5_unparse_name() fails. Also make sure to free the prime_arg
variables in... |
virtual void set_key_image(const uchar *buff,uint length)
{ set_image(buff,length, &my_charset_bin); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 89,357,683,806,076,240,000,000,000,000,000,000,000 | 2 | 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... |
const char *nghttp2_strerror(int error_code) {
switch (error_code) {
case 0:
return "Success";
case NGHTTP2_ERR_INVALID_ARGUMENT:
return "Invalid argument";
case NGHTTP2_ERR_BUFFER_ERROR:
return "Out of buffer space";
case NGHTTP2_ERR_UNSUPPORTED_VERSION:
return "Unsupported SPDY version";
c... | 0 | [
"CWE-707"
] | nghttp2 | 336a98feb0d56b9ac54e12736b18785c27f75090 | 107,716,334,765,394,050,000,000,000,000,000,000,000 | 90 | Implement max settings option |
static inline void TracePoint(PrimitiveInfo *primitive_info,
const PointInfo point)
{
primitive_info->coordinates=1;
primitive_info->point=point;
} | 0 | [
"CWE-399",
"CWE-119"
] | ImageMagick | 726812fa2fa7ce16bcf58f6e115f65427a1c0950 | 57,469,731,284,098,730,000,000,000,000,000,000,000 | 6 | Prevent buffer overflow in magick/draw.c |
longlong Item_func_equal::val_int()
{
DBUG_ASSERT(fixed == 1);
return cmp.compare();
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 44,837,838,399,354,260,000,000,000,000,000,000,000 | 5 | 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 inline u64 calc_delta_fair(u64 delta, struct sched_entity *se)
{
if (unlikely(se->load.weight != NICE_0_LOAD))
delta = __calc_delta(delta, NICE_0_LOAD, &se->load);
return delta;
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 22,493,458,381,840,906,000,000,000,000,000,000,000 | 7 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
AP4_Processor::Finalize(AP4_AtomParent& /* top_level */,
ProgressListener* /* listener */ )
{
// default implementation: do nothing
return AP4_SUCCESS;
} | 0 | [
"CWE-476",
"CWE-703"
] | Bento4 | 4d3f0bebd5f8518fd775f671c12bea58c68e814e | 77,484,814,355,465,180,000,000,000,000,000,000,000 | 6 | fixed possible crashes on malformed inputs. |
static struct object_entry *new_object(struct object_id *oid)
{
struct object_entry *e;
if (blocks->next_free == blocks->end)
alloc_objects(object_entry_alloc);
e = blocks->next_free++;
oidcpy(&e->idx.oid, oid);
return e;
} | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 209,659,539,321,118,970,000,000,000,000,000,000,000 | 11 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
xfs_attr_leaf_order(
struct xfs_buf *leaf1_bp,
struct xfs_buf *leaf2_bp)
{
struct xfs_attr3_icleaf_hdr ichdr1;
struct xfs_attr3_icleaf_hdr ichdr2;
struct xfs_mount *mp = leaf1_bp->b_mount;
xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichdr1, leaf1_bp->b_addr);
xfs_attr3_leaf_hdr_from_disk(mp->m_attr_geo, &ichd... | 0 | [
"CWE-131"
] | linux | f4020438fab05364018c91f7e02ebdd192085933 | 168,056,609,871,814,620,000,000,000,000,000,000,000 | 12 | xfs: fix boundary test in xfs_attr_shortform_verify
The boundary test for the fixed-offset parts of xfs_attr_sf_entry in
xfs_attr_shortform_verify is off by one, because the variable array
at the end is defined as nameval[1] not nameval[].
Hence we need to subtract 1 from the calculation.
This can be shown by:
# tou... |
static int init_ssl_connection(SSL *con)
{
int i;
const char *str;
X509 *peer;
long verify_error;
MS_STATIC char buf[BUFSIZ];
#ifndef OPENSSL_NO_KRB5
char *client_princ;
#endif
#if !defined(OPENSSL_NO_TLSEXT) && !defined(OPENSSL_NO_NEXTPROTONEG)
const unsigned char *next_proto_neg;
unsigned next_proto_neg_len;... | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 16,855,354,505,242,247,000,000,000,000,000,000,000 | 134 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
inline internal::Arg BasicFormatter<Char, AF>::get_arg(
BasicStringRef<Char> arg_name, const char *&error) {
if (check_no_auto_index(error)) {
map_.init(args());
const internal::Arg *arg = map_.find(arg_name);
if (arg)
return *arg;
error = "argument not found";
}
return internal::Arg();
... | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 215,557,590,753,419,400,000,000,000,000,000,000,000 | 11 | Fix segfault on complex pointer formatting (#642) |
static inline int ipv6_addr_loopback(const struct in6_addr *a)
{
return (a->s6_addr32[0] | a->s6_addr32[1] |
a->s6_addr32[2] | (a->s6_addr32[3] ^ htonl(1))) == 0;
} | 0 | [
"CWE-703"
] | linux | 87c48fa3b4630905f98268dde838ee43626a060c | 171,151,443,125,999,230,000,000,000,000,000,000,000 | 5 | ipv6: make fragment identifications less predictable
IPv6 fragment identification generation is way beyond what we use for
IPv4 : It uses a single generator. Its not scalable and allows DOS
attacks.
Now inetpeer is IPv6 aware, we can use it to provide a more secure and
scalable frag ident generator (per destination, ... |
static int vfswrap_set_quota(struct vfs_handle_struct *handle, enum SMB_QUOTA_TYPE qtype, unid_t id, SMB_DISK_QUOTA *qt)
{
#ifdef HAVE_SYS_QUOTAS
int result;
START_PROFILE(syscall_set_quota);
result = sys_set_quota(handle->conn->connectpath, qtype, id, qt);
END_PROFILE(syscall_set_quota);
return result;
#else
er... | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 293,306,721,688,248,320,000,000,000,000,000,000,000 | 14 | FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
Otherwise num_volumes and the end marker can return uninitialized data
to the client.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org> |
struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
const char *host, const char *path,
bool secure)
{
struct Cookie *newco;
struct Cookie *co;
time_t now = time(NULL);
struct Cookie *mainco=NULL;
size_t matches = 0;
bool is_ip;
i... | 0 | [
"CWE-119"
] | curl | b5f947b8ac0e282c61c75b69cd5b9d37dafc6959 | 295,275,390,598,031,180,000,000,000,000,000,000,000 | 105 | cookie: cookie parser out of boundary memory access
The internal libcurl function called sanitize_cookie_path() that cleans
up the path element as given to it from a remote site or when read from
a file, did not properly validate the input. If given a path that
consisted of a single double-quote, libcurl would index a... |
static int db_dict_iter_lookup_key_values(struct db_dict_value_iter *iter)
{
struct db_dict_iter_key *key;
string_t *path;
const char *error;
int ret;
/* sort the keys so that we'll first lookup the keys without
default value. if their lookup fails, the user doesn't exist. */
array_sort(&iter->keys, db_dict_... | 1 | [] | core | 000030feb7a30f193197f1aab8a7b04a26b42735 | 179,678,926,983,791,800,000,000,000,000,000,000,000 | 46 | auth: Do not double-expand key in passdb dict when authenticating
Broken by 79042f8c |
static __init int cgw_module_init(void)
{
int ret;
/* sanitize given module parameter */
max_hops = clamp_t(unsigned int, max_hops, CGW_MIN_HOPS, CGW_MAX_HOPS);
pr_info("can: netlink gateway (rev " CAN_GW_VERSION ") max_hops=%d\n",
max_hops);
register_pernet_subsys(&cangw_pernet_ops);
cgw_cache = kmem_cache_... | 0 | [
"CWE-787"
] | linux | 0aaa81377c5a01f686bcdb8c7a6929a7bf330c68 | 44,549,664,362,414,600,000,000,000,000,000,000,000 | 37 | can: gw: ensure DLC boundaries after CAN frame modification
Muyu Yu provided a POC where user root with CAP_NET_ADMIN can create a CAN
frame modification rule that makes the data length code a higher value than
the available CAN frame data size. In combination with a configured checksum
calculation where the result is... |
void Monitor::scrub_finish()
{
dout(10) << __func__ << dendl;
scrub_reset();
scrub_event_start();
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 99,268,068,425,643,560,000,000,000,000,000,000,000 | 6 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
mobility_opt_print(netdissect_options *ndo,
const u_char *bp, const unsigned len)
{
unsigned i, optlen;
for (i = 0; i < len; i += optlen) {
ND_TCHECK(bp[i]);
if (bp[i] == IP6MOPT_PAD1)
optlen = 1;
else {
if (i + 1 < len) {
ND_TCHECK(bp[i + 1]);
optlen = bp[i + 1] + 2;
}
e... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | b8e559afaeb8fe0604a1f8e3ad4dc1445de07a00 | 29,038,185,424,840,316,000,000,000,000,000,000,000 | 78 | CVE-2017-13023/IPv6 mobility: Add a bounds check before fetching data
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't cause 'tcpdump: pcap_loop: truncated dump file' |
struct torture_suite *torture_smb2_notify_inotify_init(TALLOC_CTX *ctx)
{
struct torture_suite *suite = torture_suite_create(ctx, "notify-inotify");
suite->description = talloc_strdup(suite, "SMB2-NOTIFY tests that use inotify");
torture_suite_add_2smb2_test(suite, "inotify-rename", torture_smb2_inotify_rename);
... | 0 | [
"CWE-266"
] | samba | 22528b76ed6eb6251fdf01875aaa955480e7663d | 244,899,360,837,233,750,000,000,000,000,000,000,000 | 10 | s4: torture: Add smb2.notify.handle-permissions test.
Add knownfail entry.
CVE-2020-14318
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434
Signed-off-by: Jeremy Allison <jra@samba.org> |
static void DrawPathLineToVertical(DrawingWand *wand,const PathMode mode,
const double y)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if ((wand->path_operation !=... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 102,253,989,933,010,880,000,000,000,000,000,000,000 | 18 | https://github.com/ImageMagick/ImageMagick/issues/716 |
static int update(const char *target, struct libmnt_fs *fs, unsigned long mountflags)
{
int rc;
struct libmnt_update *upd;
const char *filename;
DBG(UPDATE, mnt_debug("update test"));
upd = mnt_new_update();
if (!upd)
return -ENOMEM;
rc = mnt_update_set_fs(upd, mountflags, target, fs);
if (rc == 1) {
/* ... | 0 | [
"CWE-399"
] | util-linux | 84ed14022e7d3d121bbcab60ebad11ed38d691b0 | 86,132,877,257,027,330,000,000,000,000,000,000,000 | 29 | libmount: more robust mtab and utab update (CVE-2011-1676, CVE-2011-1677)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- always use temporary file
- use fflush() for the temporary file
- check fprintf() return value
Signed-off-by: Karel Zak <kzak@redhat.com> |
DECLAREreadFunc(readSeparateTilesIntoBuffer)
{
int status = 1;
uint32 imagew = TIFFRasterScanlineSize(in);
uint32 tilew = TIFFTileRowSize(in);
int iskew = imagew - tilew*spp;
tsize_t tilesize = TIFFTileSize(in);
tdata_t tilebuf;
uint8* bufp = (uint8*) buf;
uint32 tw, tl;
uint32 row;
uint16 bps = 0, bytes_per... | 0 | [
"CWE-119",
"CWE-787",
"CWE-190"
] | libtiff | 787c0ee906430b772f33ca50b97b8b5ca070faec | 261,250,469,509,998,330,000,000,000,000,000,000,000 | 78 | * tools/tiffcp.c: fix uint32 underflow/overflow that can cause heap-based
buffer overflow.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2610 |
CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon, __u16 fid,
struct cifs_ntsd **acl_inf, __u32 *pbuflen)
{
int rc = 0;
int buf_type = 0;
QUERY_SEC_DESC_REQ *pSMB;
struct kvec iov[1];
cFYI(1, "GetCifsACL");
*pbuflen = 0;
*acl_inf = NULL;
rc = smb_init_nttransact(NT_TRANSACT_QUERY_SECURITY_DESC, 0,
... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 181,076,946,823,802,350,000,000,000,000,000,000,000 | 90 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
void RGWStatBucket::execute()
{
if (!s->bucket_exists) {
op_ret = -ERR_NO_SUCH_BUCKET;
return;
}
RGWUserBuckets buckets;
bucket.bucket = s->bucket;
buckets.add(bucket);
map<string, RGWBucketEnt>& m = buckets.get_buckets();
op_ret = store->update_containers_stats(m);
if (! op_ret)
op_ret = -... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 202,946,813,728,844,140,000,000,000,000,000,000,000 | 24 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static int em28xx_usb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
{
struct usb_device *udev;
struct em28xx *dev = NULL;
int retval;
bool has_vendor_audio = false, has_video = false, has_dvb = false;
int i, nr, try_bulk;
const int ifnum = intf->altsetting[0].desc.bInterfaceNumber;
cha... | 0 | [
"CWE-416"
] | linux | c08eadca1bdfa099e20a32f8fa4b52b2f672236d | 190,015,651,383,014,050,000,000,000,000,000,000,000 | 297 | media: em28xx: initialize refcount before kref_get
The commit 47677e51e2a4("[media] em28xx: Only deallocate struct
em28xx after finishing all extensions") adds kref_get to many init
functions (e.g., em28xx_audio_init). However, kref_init is called too
late in em28xx_usb_probe, since em28xx_init_dev before will invoke
... |
static inline void __percpu *mod_percpu(struct module *mod)
{
return mod->percpu;
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 140,136,953,853,618,550,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... |
dvbs2_defragment_init(void)
{
reassembly_table_init(&dvbs2_reassembly_table,
&addresses_reassembly_table_functions);
} | 0 | [
"CWE-835"
] | wireshark | 0137c24d60934f131b25506a88c9464e4dc827de | 75,191,777,235,339,590,000,000,000,000,000,000,000 | 5 | DVB-S2-BB: Prevent infinite loop
Commit 4bf4ee88f0544727e7f89f3f288c6afd2f650a4c removed an else
statement that broke out of the BBFrame processing loop. Without
it, infinite loops might be possible if the GSE frames have bit errors
in the length field. |
bool CanOptimize(const NodeDef& node) const {
// TODO(ezhulenev): check if AccumulateNV2 can be supported too
if (!IsAdd(node) && !IsAddN(node)) {
return false;
}
if (IsInPreserveSet(node) || IsMarkedWithTag(node, kAddOpsRewriteTag)) {
return false;
}
// TODO(ezhulenev): relax this... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 263,411,536,663,013,880,000,000,000,000,000,000,000 | 12 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
ProcRecordDisableContext(ClientPtr client)
{
RecordContextPtr pContext;
REQUEST(xRecordDisableContextReq);
REQUEST_SIZE_MATCH(xRecordDisableContextReq);
VERIFY_CONTEXT(pContext, stuff->context, client);
RecordDisableContext(pContext);
return Success;
} /* ProcReco... | 0 | [
"CWE-191"
] | xserver | 2902b78535ecc6821cc027351818b28a5c7fdbdc | 274,907,639,967,419,380,000,000,000,000,000,000,000 | 11 | Fix XRecordRegisterClients() Integer underflow
CVE-2020-14362 ZDI-CAN-11574
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
void bgp_update_implicit_eors(struct peer *peer)
{
if (!bgp_update_delay_active(peer->bgp))
return; /* BGP update delay has ended */
if (peer->update_delay_over)
return; /* This peer has already been considered */
if (bgp_debug_neighbor_events(peer))
zlog_debug("Peer %s: Checking implicit EORs", peer->host);
... | 0 | [
"CWE-125"
] | frr | ff6db1027f8f36df657ff2e5ea167773752537ed | 267,226,784,301,779,670,000,000,000,000,000,000,000 | 16 | bgpd: Make sure hdr length is at a minimum of what is expected
Ensure that if the capability length specified is enough data.
Signed-off-by: Donald Sharp <sharpd@nvidia.com> |
pdf_writer_end_page(fz_context *ctx, fz_document_writer *wri_, fz_device *dev)
{
pdf_writer *wri = (pdf_writer*)wri_;
pdf_obj *obj = NULL;
fz_var(obj);
fz_try(ctx)
{
fz_close_device(ctx, dev);
obj = pdf_add_page(ctx, wri->pdf, &wri->mediabox, 0, wri->resources, wri->contents);
pdf_insert_page(ctx, wri->pdf... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 296,035,301,087,625,000,000,000,000,000,000,000,000 | 25 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
compute_U_value(std::string const& user_password,
QPDF::EncryptionData const& data)
{
if (data.getR() >= 3)
{
return compute_U_value_R3(user_password, data);
}
return compute_U_value_R2(user_password, data);
} | 0 | [
"CWE-125"
] | qpdf | dea704f0ab7f625e1e7b3f9a1110b45b63157317 | 120,906,801,147,430,790,000,000,000,000,000,000,000 | 10 | Pad keys to avoid memory errors (fixes #147) |
bool basic_const_item() const { return 1; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 169,042,395,377,061,620,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... |
_equalCaseWhen(const CaseWhen *a, const CaseWhen *b)
{
COMPARE_NODE_FIELD(expr);
COMPARE_NODE_FIELD(result);
COMPARE_LOCATION_FIELD(location);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 37,541,390,075,794,530,000,000,000,000,000,000,000 | 8 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
void __init sched_init_smp(void)
{
cpumask_var_t non_isolated_cpus;
alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);
alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
#if defined(CONFIG_NUMA)
sched_group_nodes_bycpu = kzalloc(nr_cpu_ids * sizeof(void **),
GFP_KERNEL);
BUG_ON(sched_group_nodes_bycpu == NUL... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 55,711,063,537,695,900,000,000,000,000,000,000,000 | 37 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
static inline struct wakeup_source *ep_wakeup_source(struct epitem *epi)
{
return rcu_dereference_check(epi->ws, lockdep_is_held(&epi->ep->mtx));
} | 0 | [
"CWE-416"
] | linux | a9ed4a6560b8562b7e2e2bed9527e88001f7b682 | 5,146,553,466,444,995,000,000,000,000,000,000,000 | 4 | epoll: Keep a reference on files added to the check list
When adding a new fd to an epoll, and that this new fd is an
epoll fd itself, we recursively scan the fds attached to it
to detect cycles, and add non-epool files to a "check list"
that gets subsequently parsed.
However, this check list isn't completely safe wh... |
static void n_tty_check_throttle(struct tty_struct *tty)
{
struct n_tty_data *ldata = tty->disc_data;
/*
* Check the remaining room for the input canonicalization
* mode. We don't want to throttle the driver if we're in
* canonical mode and don't have a newline yet!
*/
if (ldata->icanon && ldata->canon_hea... | 0 | [
"CWE-704"
] | linux | 966031f340185eddd05affcf72b740549f056348 | 288,048,742,902,376,950,000,000,000,000,000,000,000 | 23 | n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD)
We added support for EXTPROC back in 2010 in commit 26df6d13406d ("tty:
Add EXTPROC support for LINEMODE") and the intent was to allow it to
override some (all?) ICANON behavior. Quoting from that original commit
message:
There is a new bi... |
nautilus_mime_has_any_applications_for_file (NautilusFile *file)
{
GList *apps;
char *mime_type;
gboolean result;
char *uri_scheme;
GAppInfo *uri_handler;
mime_type = nautilus_file_get_mime_type (file);
apps = g_app_info_get_all_for_type (mime_type);
uri_scheme = nautilus_file_get_uri_scheme (file);
if (ur... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 218,547,046,860,244,600,000,000,000,000,000,000,000 | 38 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
void usb_remove_function(struct usb_configuration *c, struct usb_function *f)
{
if (f->disable)
f->disable(f);
bitmap_zero(f->endpoints, 32);
list_del(&f->list);
if (f->unbind)
f->unbind(c, f);
if (f->bind_deactivated)
usb_function_activate(f);
} | 0 | [
"CWE-476"
] | linux | 75e5b4849b81e19e9efe1654b30d7f3151c33c2c | 143,830,944,020,359,100,000,000,000,000,000,000,000 | 13 | USB: gadget: validate interface OS descriptor requests
Stall the control endpoint in case provided index exceeds array size of
MAX_CONFIG_INTERFACES or when the retrieved function pointer is null.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregk... |
static void svm_queue_exception(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
unsigned nr = vcpu->arch.exception.nr;
bool has_error_code = vcpu->arch.exception.has_error_code;
u32 error_code = vcpu->arch.exception.error_code;
kvm_deliver_exception_payload(vcpu);
if (nr == BP_VECTOR && !nrips) {
... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 123,071,158,121,430,520,000,000,000,000,000,000,000 | 31 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
static int msg_insert(struct msg_msg *msg, struct mqueue_inode_info *info)
{
struct rb_node **p, *parent = NULL;
struct posix_msg_tree_node *leaf;
p = &info->msg_tree.rb_node;
while (*p) {
parent = *p;
leaf = rb_entry(parent, struct posix_msg_tree_node, rb_node);
if (likely(leaf->priority == msg->m_type))
... | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 279,742,360,242,097,500,000,000,000,000,000,000,000 | 35 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
cr_input_set_cur_pos (CRInput * a_this, CRInputPos const * a_pos)
{
g_return_val_if_fail (a_this && PRIVATE (a_this) && a_pos,
CR_BAD_PARAM_ERROR);
cr_input_set_column_num (a_this, a_pos->col);
cr_input_set_line_num (a_this, a_pos->line);
cr_input_set_cur_i... | 0 | [
"CWE-125"
] | libcroco | 898e3a8c8c0314d2e6b106809a8e3e93cf9d4394 | 310,913,594,281,353,300,000,000,000,000,000,000,000 | 13 | input: check end of input before reading a byte
When reading bytes we weren't check that the index wasn't
out of bound and this could produce an invalid read which
could deal to a security bug. |
static void bypass_pg(struct multipath *m, struct priority_group *pg,
int bypassed)
{
unsigned long flags;
spin_lock_irqsave(&m->lock, flags);
pg->bypassed = bypassed;
m->current_pgpath = NULL;
m->current_pg = NULL;
spin_unlock_irqrestore(&m->lock, flags);
schedule_work(&m->trigger_event);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 272,203,529,823,931,280,000,000,000,000,000,000,000 | 15 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
ecma_compare_ecma_strings (const ecma_string_t *string1_p, /**< ecma-string */
const ecma_string_t *string2_p) /**< ecma-string */
{
JERRY_ASSERT (string1_p != NULL && string2_p != NULL);
/* Fast paths first. */
if (string1_p == string2_p)
{
return true;
}
/* Either string i... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 138,580,427,397,292,720,000,000,000,000,000,000,000 | 30 | 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 |
static int delta_cmp2(const void *a, const void *b) {
const RAnalVar *va = a;
const RAnalVar *vb = b;
return va->delta - vb->delta;
} | 0 | [
"CWE-703",
"CWE-908"
] | radare2 | 4d3811681a80f92a53e795f6a64c4b0fc2c8dd22 | 237,914,800,214,161,240,000,000,000,000,000,000,000 | 5 | Fix segfault in adf (#16230) |
set_ref_in_term(int copyID)
{
int abort = FALSE;
term_T *term;
typval_T tv;
for (term = first_term; term != NULL; term = term->tl_next)
if (term->tl_job != NULL)
{
tv.v_type = VAR_JOB;
tv.vval.v_job = term->tl_job;
abort = abort || set_ref_in_item(&tv, copyID, NULL, NULL);
}
retu... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 118,133,623,681,048,040,000,000,000,000,000,000,000 | 15 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
void hid_dump_report(struct hid_device *hid, int type, u8 *data,
int size)
{
struct hid_report_enum *report_enum;
char *buf;
unsigned int i;
buf = kmalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC);
if (!buf)
return;
report_enum = hid->report_enum + type;
/* dump the report */
snprintf(buf, HID_DEBUG... | 0 | [
"CWE-835",
"CWE-787"
] | linux | 717adfdaf14704fd3ec7fa2c04520c0723247eac | 105,490,689,175,022,100,000,000,000,000,000,000,000 | 28 | 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> |
TEST_P(Http2CodecImplTest, PingFloodCounterReset) {
static const int kMaxOutboundControlFrames = 100;
max_outbound_control_frames_ = kMaxOutboundControlFrames;
initialize();
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
EXPECT_CALL(request_decoder_, decodeHeaders_(... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 292,615,830,388,617,150,000,000,000,000,000,000,000 | 40 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
Status AuthorizationManagerImpl::_initializeUserFromPrivilegeDocument(User* user,
const BSONObj& privDoc) {
V2UserDocumentParser parser;
std::string userName = parser.extractUserNameFromUserDocument(privDoc);
if (userName != user->getName... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 257,250,378,759,448,970,000,000,000,000,000,000,000 | 38 | SERVER-38984 Validate unique User ID on UserCache hit |
TEST(UriSuite, TestUriUserInfoHostPort23Bug3510198Four) {
// User info with ":", with port, with escaped chars in user name and password
UriParserStateA stateA;
UriUriA uriA;
stateA.uri = &uriA;
int res;
// 0 4 0 3 0 20 01 0 4 01
res = uriParseUriA(&st... | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 266,987,294,722,157,000,000,000,000,000,000,000,000 | 18 | Fix uriParse*Ex* out-of-bounds read |
cmsBool Read8bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels)
{
cmsStage* mpe;
cmsUInt8Number* Temp = NULL;
int i, j;
cmsToneCurve* Tables[cmsMAXCHANNELS];
if (nChannels > cmsMAXCHANNELS) return FALSE;
if (nChannels <= 0) return FALSE;
memset(Tables, 0, s... | 1 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 160,260,632,616,392,340,000,000,000,000,000,000,000 | 50 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
f_bufloaded(typval_T *argvars, typval_T *rettv)
{
buf_T *buf;
buf = find_buffer(&argvars[0]);
rettv->vval.v_number = (buf != NULL && buf->b_ml.ml_mfp != NULL);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 147,949,263,876,777,840,000,000,000,000,000,000,000 | 7 | 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. |
TProtocol::~TProtocol() {} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 231,062,591,689,091,370,000,000,000,000,000,000,000 | 1 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.