func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void AVI_set_audio(avi_t *AVI, int channels, int rate, int bits, int format, int mp3rate)
{
/* may only be called if file is open for writing */
if(AVI->mode==AVI_MODE_READ) return;
//inc audio tracks
AVI->aptr=AVI->anum;
++AVI->anum;
if(AVI->anum > AVI_MAX_TRACKS) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("... | 0 | [
"CWE-835"
] | gpac | 7f060bbb72966cae80d6fee338d0b07fa3fc06e1 | 299,682,771,880,681,640,000,000,000,000,000,000,000 | 23 | fixed #2159 |
static void fsort_tmp(struct file_struct **fp, size_t num,
struct file_struct **tmp)
{
struct file_struct **f1, **f2, **t;
size_t n1, n2;
n1 = num / 2;
n2 = num - n1;
f1 = fp;
f2 = fp + n1;
if (n1 > 1)
fsort_tmp(f1, n1, tmp);
if (n2 > 1)
fsort_tmp(f2, n2, tmp);
while (f_name_cmp(*f1, *f2) <= 0) ... | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 171,395,391,464,605,600,000,000,000,000,000,000,000 | 37 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
bool sock_is_registered(int family)
{
return family < NPROTO && rcu_access_pointer(net_families[family]);
} | 0 | [
"CWE-362"
] | linux | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | 66,929,984,643,655,830,000,000,000,000,000,000,000 | 4 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereferenc... |
GF_Filter *gf_fs_load_filter(GF_FilterSession *fsess, const char *name, GF_Err *err_code)
{
const char *args=NULL;
const char *sep, *file_ext;
u32 i, len, count = gf_list_count(fsess->registry);
Bool quiet = (err_code && (*err_code == GF_EOS)) ? GF_TRUE : GF_FALSE;
assert(fsess);
assert(name);
if (err_code) *er... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 67,775,465,812,921,890,000,000,000,000,000,000,000 | 109 | fixed crashes for very long path - cf #1908 |
static char *
parameter_brace_patsub (varname, value, ind, patsub, quoted, pflags, flags)
char *varname, *value;
int ind;
char *patsub;
int quoted, pflags, flags;
{
int vtype, mflags, starsub, delim;
char *val, *temp, *pat, *rep, *p, *lpatsub, *tt;
SHELL_VAR *v;
if (value == 0)
return (... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 306,707,244,001,349,030,000,000,000,000,000,000,000 | 147 | Bash-4.4 patch 7 |
static long calc_group_shares(struct cfs_rq *cfs_rq)
{
long tg_weight, tg_shares, load, shares;
struct task_group *tg = cfs_rq->tg;
tg_shares = READ_ONCE(tg->shares);
load = max(scale_load_down(cfs_rq->load.weight), cfs_rq->avg.load_avg);
tg_weight = atomic_long_read(&tg->load_avg);
/* Ensure tg_weight >= loa... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 9,391,206,623,707,153,000,000,000,000,000,000,000 | 33 | 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... |
Linker* PackLinuxElf64ppcle::newLinker() const
{
return new ElfLinkerPpc64le;
} | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 85,354,498,496,027,130,000,000,000,000,000,000,000 | 4 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
void verifyComputedFieldsAllowed(const ProjectionPolicies& policies) {
uassert(51271,
"Bad projection specification, cannot use computed fields when parsing "
"a spec in kBanComputedFields mode",
policies.computedFieldsPolicy !=
ProjectionPolicies::ComputedFieldsP... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 20,100,625,164,559,903,000,000,000,000,000,000,000 | 7 | SERVER-53929 Add stricter parser checks around positional projection |
static BSONObj finishMinObj(const IndexEntry& indexEntry,
const BSONObj& minObj,
const BSONObj& maxObj) {
BSONObjBuilder bob;
bob.appendMinKey("");
BSONObj minKey = bob.obj();
if (minObj.isEmpty()) {
if (0 > minKey.woCompare(maxObj, indexE... | 0 | [
"CWE-755"
] | mongo | c8ced6df8f620daaa2e539f192f2eef356c63e9c | 2,052,286,878,869,308,300,000,000,000,000,000,000 | 21 | SERVER-47773 Error consistently when tailable cursors and $near are used together |
CImg<T> operator>(const char axis) const {
return get_append(axis,0);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 181,662,303,359,429,670,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int dtls1_process_buffered_records(SSL *s)
{
pitem *item;
SSL3_BUFFER *rb;
SSL3_RECORD *rr;
DTLS1_BITMAP *bitmap;
unsigned int is_next_epoch;
int replayok = 1;
item = pqueue_peek(s->rlayer.d->unprocessed_rcds.q);
if (item) {
/* Check if epoch is current. */
if (s->rlayer... | 0 | [
"CWE-400"
] | openssl | af58be768ebb690f78530f796e92b8ae5c9a4401 | 278,827,756,223,871,630,000,000,000,000,000,000,000 | 79 | Don't allow too many consecutive warning alerts
Certain warning alerts are ignored if they are received. This can mean that
no progress will be made if one peer continually sends those warning alerts.
Implement a count so that we abort the connection if we receive too many.
Issue reported by Shi Lei.
Reviewed-by: Ri... |
inline void Relu0To1(const RuntimeShape& input_shape, const T* input_data,
const RuntimeShape& output_shape, T* output_data) {
ruy::profiler::ScopeLabel label("Relu0To1 (not fused)");
const int flat_size = MatchingFlatSize(input_shape, output_shape);
for (int i = 0; i < flat_size; ++i) {
... | 0 | [
"CWE-125"
] | tensorflow | 595a65a3e224a0362d7e68c2213acfc2b499a196 | 163,845,912,434,977,700,000,000,000,000,000,000,000 | 12 | Return a TFLite error if gather_nd will result in reading invalid memory
PiperOrigin-RevId: 463054033 |
clutter_device_manager_xi2_get_device (ClutterDeviceManager *manager,
gint id)
{
ClutterDeviceManagerXI2 *manager_xi2 = CLUTTER_DEVICE_MANAGER_XI2 (manager);
return g_hash_table_lookup (manager_xi2->devices_by_id,
GINT_TO_POINTER... | 0 | [
"CWE-264"
] | clutter | e310c68d7b38d521e341f4e8a36f54303079d74e | 49,896,070,100,448,030,000,000,000,000,000,000,000 | 8 | x11: trap errors when calling XIQueryDevice
Devices can disappear at any time, causing XIQueryDevice
to throw an error. At the same time, plug a memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=701974 |
ATAddCheckConstraint(List **wqueue, AlteredTableInfo *tab, Relation rel,
Constraint *constr, bool recurse, bool recursing,
bool is_readd, LOCKMODE lockmode)
{
List *newcons;
ListCell *lcon;
List *children;
ListCell *child;
/* At top level, permission check was done in ATPrepCmd, else do it *... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 244,905,536,499,425,500,000,000,000,000,000,000,000 | 112 | 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 void sysbus_esp_gpio_demux(void *opaque, int irq, int level)
{
SysBusESPState *sysbus = ESP(opaque);
ESPState *s = &sysbus->esp;
switch (irq) {
case 0:
parent_esp_reset(s, irq, level);
break;
case 1:
esp_dma_enable(opaque, irq, level);
break;
}
} | 0 | [
"CWE-787"
] | qemu | 926cde5f3e4d2504ed161ed0cb771ac7cad6fd11 | 80,086,175,487,644,575,000,000,000,000,000,000,000 | 14 | scsi: esp: make cmdbuf big enough for maximum CDB size
While doing DMA read into ESP command buffer 's->cmdbuf', it could
write past the 's->cmdbuf' area, if it was transferring more than 16
bytes. Increase the command buffer size to 32, which is maximum when
's->do_cmd' is set, and add a check on 'len' to avoid OOB ... |
int RGWHandler_REST_S3::init_from_header(struct req_state* s,
int default_formatter,
bool configurable_format)
{
string req;
string first;
const char *req_name = s->relative_uri.c_str();
const char *p;
if (*req_name == '?') {
p = req_name;
} else {
p = s->info.request_params.c_str();
}... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 318,823,448,849,759,070,000,000,000,000,000,000,000 | 62 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static int do_remount(struct nameidata *nd, int flags, int mnt_flags,
void *data)
{
int err;
struct super_block *sb = nd->mnt->mnt_sb;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
if (!check_mnt(nd->mnt))
return -EINVAL;
if (nd->dentry != nd->mnt->mnt_root)
return -EINVAL;
down_write(&sb->s_umoun... | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 21,120,410,410,274,130,000,000,000,000,000,000,000 | 24 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
psutil_cpu_times(PyObject *self, PyObject *args) {
double idle, kernel, user, system;
FILETIME idle_time, kernel_time, user_time;
if (!GetSystemTimes(&idle_time, &kernel_time, &user_time))
return PyErr_SetFromWindowsErr(0);
idle = (double)((HI_T * idle_time.dwHighDateTime) + \
... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 165,719,702,662,479,970,000,000,000,000,000,000,000 | 20 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
validate_args(asdl_seq *args)
{
Py_ssize_t i;
for (i = 0; i < asdl_seq_LEN(args); i++) {
arg_ty arg = asdl_seq_GET(args, i);
if (arg->annotation && !validate_expr(arg->annotation, Load))
return 0;
}
return 1;
} | 0 | [
"CWE-125"
] | cpython | a4d78362397fc3bced6ea80fbc7b5f4827aec55e | 334,490,410,812,835,250,000,000,000,000,000,000,000 | 10 | bpo-36495: Fix two out-of-bounds array reads (GH-12641)
Research and fix by @bradlarsen. |
static int Get16m(const void * Short)
{
return (((uchar *)Short)[0] << 8) | ((uchar *)Short)[1];
}
| 0 | [
"CWE-787"
] | jhead | 5186ddcf9e35a7aa0ff0539489a930434a1325f4 | 224,505,929,614,412,100,000,000,000,000,000,000,000 | 4 | Just allocate 20 bytes extra at the end of a section. Otherwise, we end
up with a whole lot of little checks for structures that the file says
are there but are unexpectedly cut off in fuzz tests |
static int addrconf_ifdown(struct net_device *dev, int how)
{
struct inet6_dev *idev;
struct inet6_ifaddr *ifa, **bifa;
int i;
ASSERT_RTNL();
if (dev == &loopback_dev && how == 1)
how = 0;
rt6_ifdown(dev);
neigh_ifdown(&nd_tbl, dev);
idev = __in6_dev_get(dev);
if (idev == NULL)
return -ENODEV;
/* Ste... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 163,466,720,342,415,820,000,000,000,000,000,000,000 | 116 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
nm_utils_ipv6_addr_set_stable_privacy_impl(NMUtilsStableType stable_type,
struct in6_addr * addr,
const char * ifname,
const char * network_id,
... | 0 | [
"CWE-20"
] | NetworkManager | 420784e342da4883f6debdfe10cde68507b10d27 | 150,988,550,061,644,000,000,000,000,000,000,000,000 | 18 | core: fix crash in nm_wildcard_match_check()
It's not entirely clear how to treat %NULL.
Clearly "match.interface-name=eth0" should not
match with an interface %NULL. But what about
"match.interface-name=!eth0"? It's now implemented
that negative matches still succeed against %NULL.
What about "match.interface-name=*"... |
static unsigned int unix_skb_len(const struct sk_buff *skb)
{
return skb->len - UNIXCB(skb).consumed;
} | 0 | [] | net | 7d267278a9ece963d77eefec61630223fce08c6c | 137,229,050,364,272,580,000,000,000,000,000,000,000 | 4 | unix: avoid use-after-free in ep_remove_wait_queue
Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
An AF_UNIX datagram socket being the client in an n:1 association with
some server socket is only allowed to send messages to the server if the
receive queue of this socket contains at most sk_max_ack_backlog... |
void __fastcall TSCPFileSystem::UnlockFile(const UnicodeString & /*FileName*/, const TRemoteFile * /*File*/)
{
DebugFail();
}
| 0 | [
"CWE-20"
] | winscp | 49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54 | 48,027,322,587,918,630,000,000,000,000,000,000,000 | 4 | Bug 1675: Prevent SCP server sending files that were not requested
https://winscp.net/tracker/1675
Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55 |
PHP_METHOD(Phar, setSignatureAlgorithm)
{
zend_long algo;
char *error, *key = NULL;
size_t key_len = 0;
PHAR_ARCHIVE_OBJECT();
if (PHAR_G(readonly) && !phar_obj->archive->is_data) {
zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0,
"Cannot set signature algorithm, phar is read-only");
return;
}... | 0 | [
"CWE-20"
] | php-src | 1e9b175204e3286d64dfd6c9f09151c31b5e099a | 143,576,492,584,877,270,000,000,000,000,000,000,000 | 49 | Fix bug #71860: Require valid paths for phar filenames |
static void print_blob_as_hex(FILE *output_file, const char *str, ulong len)
{
/* sakaik got the idea to to provide blob's in hex notation. */
const char *ptr= str, *end= ptr + len;
for (; ptr < end ; ptr++)
fprintf(output_file, "%02X", *((uchar *)ptr));
check_io(output_file);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 335,465,536,939,627,230,000,000,000,000,000,000,000 | 8 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
get_option(const char *optname, const char *src, size_t *len)
{
char *opt, *end;
size_t sz;
if (!src)
return NULL;
opt = strstr(src, optname);
if (!opt)
return NULL;
end = strchr(opt, ',');
sz = end ? end - opt : strlen(opt);
if (len)
*len = sz;
if ((opt == src || *(opt - 1) == ',') &&
(*(opt +... | 0 | [
"CWE-399"
] | util-linux | 4b39b6aefd5dd8ac68a92adc650dc13d5d54d704 | 322,126,886,717,258,560,000,000,000,000,000,000,000 | 24 | mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- force mount(8) to use /etc/mtab.tmp file every time. The original
code used the tmp file for remount/move operations only.
- call and check fflush() return code for... |
TRIO_PUBLIC int trio_printfv TRIO_ARGS2((format, args), TRIO_CONST char* format,
trio_pointer_t* args)
{
static va_list unused;
assert(VALID(format));
return TrioFormat(stdout, 0, TrioOutStreamFile, format, unused, TrioArrayGetter, args);
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 81,383,693,312,273,000,000,000,000,000,000,000,000 | 9 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int _server_handle_vCont(libgdbr_t *g, int (*cmd_cb) (void*, const char*, char*, size_t), void *core_ptr) {
char *action = NULL;
if (send_ack (g) < 0) {
return -1;
}
g->data[g->data_len] = '\0';
if (g->data[5] == '?') {
// Query about everything we support
return send_msg (g, "vCont;c;s");
}
if (!(a... | 1 | [
"CWE-703",
"CWE-787"
] | radare2 | 796dd28aaa6b9fa76d99c42c4d5ff8b257cc2191 | 310,439,086,278,723,770,000,000,000,000,000,000,000 | 36 | Fix ext2 buffer overflow in r2_sbu_grub_memmove |
u64 jiffies_64_to_clock_t(u64 x)
{
#if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
# if HZ < USER_HZ
x = div_u64(x * USER_HZ, HZ);
# elif HZ > USER_HZ
x = div_u64(x, HZ / USER_HZ);
# else
/* Nothing to do */
# endif
#else
/*
* There are better ways that don't overflow early,
* but even this doesn't overflow in ... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 89,796,516,907,685,120,000,000,000,000,000,000,000 | 20 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
static int ZEND_FASTCALL ZEND_BOOL_XOR_SPEC_CONST_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
boolean_xor_function(&EX_T(opline->result.u.var).tmp_var,
&opline->op1.u.constant,
&opline->op2.u.constant TSRMLS_CC);
ZEND_VM_NEXT_OPCODE();
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 316,442,256,450,744,970,000,000,000,000,000,000,000 | 12 | - 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 |
void FunctionContext::set_function_state(FunctionStateScope scope, void* ptr) {
assert(!_impl->_closed);
switch (scope) {
case THREAD_LOCAL:
_impl->_thread_local_fn_state = ptr;
break;
case FRAGMENT_LOCAL:
_impl->_fragment_local_fn_state = ptr;
break;
default:
... | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 16,857,719,836,394,015,000,000,000,000,000,000,000 | 15 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static void update_sit_entry(struct f2fs_sb_info *sbi, block_t blkaddr, int del)
{
struct seg_entry *se;
unsigned int segno, offset;
long int new_vblocks;
bool exist;
#ifdef CONFIG_F2FS_CHECK_FS
bool mir_exist;
#endif
segno = GET_SEGNO(sbi, blkaddr);
se = get_seg_entry(sbi, segno);
new_vblocks = se->valid_blo... | 0 | [
"CWE-20"
] | linux | 638164a2718f337ea224b747cf5977ef143166a4 | 4,468,639,154,212,649,000,000,000,000,000,000,000 | 88 | f2fs: fix potential panic during fstrim
As Ju Hyung Park reported:
"When 'fstrim' is called for manual trim, a BUG() can be triggered
randomly with this patch.
I'm seeing this issue on both x86 Desktop and arm64 Android phone.
On x86 Desktop, this was caused during Ubuntu boot-up. I have a
cronjob installed which c... |
static int handle_to_path(int mountdirfd, struct file_handle __user *ufh,
struct path *path)
{
int retval = 0;
struct file_handle f_handle;
struct file_handle *handle = NULL;
/*
* With handle we don't look at the execute bit on the
* the directory. Ideally we would like CAP_DAC_SEARCH.
* But we don't ha... | 1 | [
"CWE-362"
] | linux | 161f873b89136eb1e69477c847d5a5033239d9ba | 36,236,072,742,401,835,000,000,000,000,000,000,000 | 46 | vfs: read file_handle only once in handle_to_path
We used to read file_handle twice. Once to get the amount of extra
bytes, and once to fetch the entire structure.
This may be problematic since we do size verifications only after the
first read, so if the number of extra bytes changes in userspace between
the first ... |
void LineCompositeTask::execute()
{
composite_line(_y,_start,_Data,*_names,*_pointers,*_total_sizes,*_num_sources);
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 213,310,343,843,402,300,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int __init key_proc_init(void)
{
struct proc_dir_entry *p;
p = proc_create("keys", 0, NULL, &proc_keys_fops);
if (!p)
panic("Cannot create /proc/keys\n");
p = proc_create("key-users", 0, NULL, &proc_key_users_fops);
if (!p)
panic("Cannot create /proc/key-users\n");
return 0;
} | 0 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 174,090,103,179,578,760,000,000,000,000,000,000,000 | 14 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
rsvg_filter_parse (const RsvgDefs * defs, const char *str)
{
char *name;
name = rsvg_get_url_string (str);
if (name) {
RsvgNode *val;
val = rsvg_defs_lookup (defs, name);
g_free (name);
if (val && (!strcmp (val->type->str, "filter")))
return (RsvgFilter *) val;
... | 1 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 198,388,650,806,214,430,000,000,000,000,000,000,000 | 15 | 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... |
static void option_date_format(const char *fmt)
{
if (!strcmp(fmt, "raw"))
whenspec = WHENSPEC_RAW;
else if (!strcmp(fmt, "rfc2822"))
whenspec = WHENSPEC_RFC2822;
else if (!strcmp(fmt, "now"))
whenspec = WHENSPEC_NOW;
else
die("unknown --date-format argument %s", fmt);
} | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 100,473,118,124,010,800,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)... |
static void sc_usage(void)
{
BIO_printf(bio_err,"usage: s_client args\n");
BIO_printf(bio_err,"\n");
BIO_printf(bio_err," -host host - use -connect instead\n");
BIO_printf(bio_err," -port port - use -connect instead\n");
BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL... | 0 | [
"CWE-310"
] | openssl | c6a876473cbff0fd323c8abcaace98ee2d21863d | 129,878,629,192,442,780,000,000,000,000,000,000,000 | 64 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
bool check_fsp_ntquota_handle(connection_struct *conn, struct smb_request *req,
files_struct *fsp)
{
if (!check_fsp_open(conn, req, fsp)) {
return false;
}
if (fsp->fsp_flags.is_directory) {
return false;
}
if (fsp->fake_file_handle == NULL) {
return false;
}
if (fsp->fake_file_handle->type != ... | 0 | [
"CWE-200"
] | samba | 3ddc9344c2fa7461336899fbddb0bb80995e9170 | 210,078,218,551,108,160,000,000,000,000,000,000,000 | 25 | CVE-2022-32742: s3: smbd: Harden the smbreq_bufrem() macro.
Fixes the raw.write.bad-write test.
NB. We need the two (==0) changes in source3/smbd/smb2_reply.c
as the gcc optimizer now knows that the return from
smbreq_bufrem() can never be less than zero.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15085
Remove... |
OPJ_BOOL opj_j2k_decode_tile ( opj_j2k_t * p_j2k,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
OPJ_UINT32 p_data_size,
... | 0 | [] | openjpeg | 0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0 | 202,831,526,604,322,350,000,000,000,000,000,000,000 | 82 | [trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492) |
static void *sctp_addto_param(struct sctp_chunk *chunk, int len,
const void *data)
{
void *target;
int chunklen = ntohs(chunk->chunk_hdr->length);
target = skb_put(chunk->skb, len);
if (data)
memcpy(target, data, len);
else
memset(target, 0, len);
/* Adjust the chunk length field. */
chunk->chun... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 265,516,409,671,429,570,000,000,000,000,000,000,000 | 19 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static int ntop_delete_dump_files(lua_State *vm) {
int ifid;
char pcap_path[MAX_PATH];
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TNUMBER)) return(CONST_LUA_ERROR);
ifid = lua_tointeger(vm, 1);
if(ifid < 0)
return(CONST_LUA_ERROR);... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 276,435,058,117,717,360,000,000,000,000,000,000,000 | 24 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
static inline __u32 tcp_acceptable_seq(const struct sock *sk)
{
const struct tcp_sock *tp = tcp_sk(sk);
if (!before(tcp_wnd_end(tp), tp->snd_nxt) ||
(tp->rx_opt.wscale_ok &&
((tp->snd_nxt - tcp_wnd_end(tp)) < (1 << tp->rx_opt.rcv_wscale))))
return tp->snd_nxt;
else
return tcp_wnd_end(tp);
} | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 12,390,512,920,128,960,000,000,000,000,000,000,000 | 11 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
gnuk_write_certificate(sc_card_t *card, const u8 *buf, size_t length)
{
size_t i = 0;
sc_apdu_t apdu;
int r = SC_SUCCESS;
LOG_FUNC_CALLED(card->ctx);
/* If null data is passed, delete certificate */
if (buf == NULL || length == 0) {
sc_format_apdu(card, &apdu, SC_APDU_CASE_1, 0xD6, 0x85, 0);
r = sc_transmit... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 325,813,008,080,554,720,000,000,000,000,000,000,000 | 52 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void sched_vpoll_reply(icalcomponent *poll, const char *voter)
{
icalcomponent *item, *next;
icalproperty *prop;
for (item = icalcomponent_get_first_component(poll, ICAL_ANY_COMPONENT);
item;
item = next) {
next = icalcomponent_get_next_component(poll, ICAL_ANY_COMPONENT);
prop = icalco... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 40,111,990,083,174,860,000,000,000,000,000,000,000 | 54 | HTTP: don't overrun buffer when parsing strings with sscanf() |
static int create_window(PluginInstance *plugin, NPWindow *window)
{
// XXX destroy previous window here?
if (plugin->is_windowless) {
destroy_window_attributes(plugin->window.ws_info);
plugin->window.ws_info = NULL;
}
assert(plugin->window.ws_info == NULL);
// cache new window information and reconstruct ... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 307,151,514,901,816,940,000,000,000,000,000,000,000 | 96 | Support all the new variables added |
bool RGWPostObj_ObjStore::part_str(parts_collection_t& parts,
const std::string& name,
std::string* val)
{
const auto iter = parts.find(name);
if (std::end(parts) == iter) {
return false;
}
ceph::bufferlist& data = iter->second.data;
s... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 203,360,852,678,918,640,000,000,000,000,000,000,000 | 14 | 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 void unescape(FILE *file,char *pos,uint length)
{
char *tmp;
DBUG_ENTER("unescape");
if (!(tmp=(char*) my_malloc(PSI_NOT_INSTRUMENTED,
length*2+1, MYF(MY_WME))))
die(EX_MYSQLERR, "Couldn't allocate memory");
mysql_real_escape_string(&mysql_connection, tmp, pos, length);... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 59,832,526,575,366,780,000,000,000,000,000,000,000 | 16 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
void Item_sum_sum::add_helper(bool perform_removal)
{
DBUG_ENTER("Item_sum_sum::add_helper");
if (Item_sum_sum::result_type() == DECIMAL_RESULT)
{
my_decimal value;
const my_decimal *val= aggr->arg_val_decimal(&value);
if (!aggr->arg_is_null(true))
{
if (perform_removal)
{
if ... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 76,889,378,854,143,630,000,000,000,000,000,000,000 | 54 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
int charsRequired = 0;
XML_Char *result;
/* First determine how long the string is */
while (s[charsRequired] != 0) {
charsRequired++;
}
/* Include the terminator */
charsRequired++;
/* Now allocate space for the copy */
... | 1 | [
"CWE-190",
"CWE-787"
] | libexpat | efcb347440ade24b9f1054671e6bd05e60b4cafd | 325,060,016,600,882,480,000,000,000,000,000,000,000 | 19 | Prevent integer overflow in copyString
The copyString function is only used for encoding string supplied by
the library user. |
static int parse_hdr_and_update_nc(request_rec *r)
{
digest_header_rec *resp;
int res;
if (!ap_is_initial_req(r)) {
return DECLINED;
}
resp = apr_pcalloc(r->pool, sizeof(digest_header_rec));
resp->raw_request_uri = r->unparsed_uri;
resp->psd_request_uri = &r->parsed_uri;
resp->... | 0 | [
"CWE-787"
] | httpd | 3b6431eb9c9dba603385f70a2131ab4a01bf0d3b | 246,557,532,459,458,980,000,000,000,000,000,000,000 | 24 | Merge r1885659 from trunk:
mod_auth_digest: Fast validation of the nonce's base64 to fail early if
the format can't match anyway.
Submitted by: ylavic
Reviewed by: ylavic, covener, jailletc36
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885666 13f79535-47bb-0310-9956-ffa... |
void GetChan(const CString& sLine) {
const CString sVar = sLine.Token(1).AsLower();
CString sUsername = sLine.Token(2);
CString sNetwork = sLine.Token(3);
CString sChan = sLine.Token(4, true);
if (sChan.empty()) {
PutModule(
t_s("Usage: GetChan <v... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 266,512,695,086,580,940,000,000,000,000,000,000,000 | 61 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
R_API void r_bin_symbol_free(void *_sym) {
RBinSymbol *sym = (RBinSymbol *)_sym;
free (sym->name);
free (sym->classname);
free (sym);
} | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 132,664,216,398,108,430,000,000,000,000,000,000,000 | 6 | Fix #8748 - Fix oobread on string search |
word32 CheckRunTimeFastMath(void)
{
return FP_SIZE;
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 133,658,153,530,691,600,000,000,000,000,000,000,000 | 4 | 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. |
__archive_read_close_filters(struct archive_read *a)
{
struct archive_read_filter *f = a->filter;
int r = ARCHIVE_OK;
/* Close each filter in the pipeline. */
while (f != NULL) {
struct archive_read_filter *t = f->upstream;
if (!f->closed && f->close != NULL) {
int r1 = (f->close)(f);
f->closed = 1;
if... | 0 | [
"CWE-125"
] | libarchive | e6c9668f3202215ddb71617b41c19b6f05acf008 | 334,261,444,661,008,900,000,000,000,000,000,000,000 | 19 | Add a check to archive_read_filter_consume to reject any
attempts to move the file pointer by a negative amount.
Note: Either this or commit 3865cf2 provides a fix for
Issue 394. |
static int dist_cache_touch(struct rar5* rar, int idx) {
int* q = rar->cstate.dist_cache;
int i, dist = q[idx];
for(i = idx; i > 0; i--)
q[i] = q[i - 1];
q[0] = dist;
return dist;
} | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 142,992,688,766,902,150,000,000,000,000,000,000,000 | 10 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
rx_cache_find(const struct rx_header *rxh, const struct ip *ip, int sport,
int32_t *opcode)
{
int i;
struct rx_cache_entry *rxent;
uint32_t clip;
uint32_t sip;
UNALIGNED_MEMCPY(&clip, &ip->ip_dst, sizeof(uint32_t));
UNALIGNED_MEMCPY(&sip, &ip->ip_src, sizeof(uint32_t));
/* Start the search where we last... | 0 | [
"CWE-125"
] | tcpdump | c24922e692a52121e853a84ead6b9337f4c08a94 | 327,091,554,781,303,000,000,000,000,000,000,000,000 | 35 | (for 4.9.3) CVE-2018-14466/Rx: fix an over-read bug
In rx_cache_insert() and rx_cache_find() properly read the serviceId
field of the rx_header structure as a 16-bit integer. When those
functions tried to read 32 bits the extra 16 bits could be outside of
the bounds checked in rx_print() for the rx_header structure, a... |
static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
{
struct super_block *sb = dentry->d_sb;
struct ext3_sb_info *sbi = EXT3_SB(sb);
struct ext3_super_block *es = sbi->s_es;
u64 fsid;
if (test_opt(sb, MINIX_DF)) {
sbi->s_overhead_last = 0;
} else if (sbi->s_blocks_last != le32_to_cpu(es->s_bl... | 0 | [
"CWE-20"
] | linux | 8d0c2d10dd72c5292eda7a06231056a4c972e4cc | 45,451,607,898,670,190,000,000,000,000,000,000,000 | 63 | ext3: Fix format string issues
ext3_msg() takes the printk prefix as the second parameter and the
format string as the third parameter. Two callers of ext3_msg omit the
prefix and pass the format string as the second parameter and the first
parameter to the format string as the third parameter. In both cases
this stri... |
DEFUN (neighbor_default_originate,
neighbor_default_originate_cmd,
NEIGHBOR_CMD2 "default-originate",
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Originate default route to this neighbor\n")
{
return peer_default_originate_set_vty (vty, argv[0], bgp_node_afi (vty),
bgp_node_safi (vty), N... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 171,073,186,167,947,560,000,000,000,000,000,000,000 | 10 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static int sev_get_attestation_report(struct kvm *kvm, struct kvm_sev_cmd *argp)
{
void __user *report = (void __user *)(uintptr_t)argp->data;
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_attestation_report data;
struct kvm_sev_attestation_report params;
void __user *p;
void *blob = NULL... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 295,527,785,011,352,460,000,000,000,000,000,000,000 | 60 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
TfLiteStatus Subgraph::RemoveAllDelegates() {
TF_LITE_ENSURE_STATUS(UndoAllDelegates());
delegates_applied_.clear();
delegates_undone_ = false;
TF_LITE_ENSURE_STATUS(EnsureMemoryAllocations());
return kTfLiteOk;
} | 0 | [
"CWE-20",
"CWE-787"
] | tensorflow | d58c96946b2880991d63d1dacacb32f0a4dfa453 | 57,081,849,380,829,680,000,000,000,000,000,000,000 | 7 | [tflite] Ensure inputs and outputs don't overlap.
If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen.
PiperOrigin-RevId: 332522916
Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a |
on_user_session_exited (GdmSession *session,
int code,
GdmManager *manager)
{
GPid pid;
g_debug ("GdmManager: session exited with status %d", code);
pid = gdm_session_get_pid (session);
if (pid > 0) {
add_session_r... | 0 | [] | gdm | ff98b2817014684ae1acec78ff06f0f461a56a9f | 49,816,578,995,156,670,000,000,000,000,000,000,000 | 15 | manager: if falling back to X11 retry autologin
Right now, we get one shot to autologin. If it fails, we fall back to
the greeter. We should give it another go if the reason for the failure
was wayland fallback to X.
https://bugzilla.gnome.org/show_bug.cgi?id=780520 |
QByteArray Server::getUserTexture(int id) {
QByteArray qba;
emit idToTextureSig(qba, id);
if (! qba.isNull()) {
return qba;
}
TransactionHolder th;
QSqlQuery &query = *th.qsqQuery;
SQLPREP("SELECT `texture` FROM `%1users` WHERE `server_id` = ? AND `user_id` = ?");
query.addBindValue(iServerNum);
query.addB... | 0 | [
"CWE-20"
] | mumble | 6b33dda344f89e5a039b7d79eb43925040654242 | 321,568,543,196,609,430,000,000,000,000,000,000,000 | 22 | Don't crash on long usernames |
move_files_prepare (CopyMoveJob *job,
const char *dest_fs_id,
char **dest_fs_type,
GList **fallbacks)
{
CommonJob *common;
GList *l;
GFile *src;
gboolean same_fs;
int i;
GdkPoint *point;
int total, left;
common = &job->common;
total = left = g_list_length (job->files);
report_move_progres... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 158,306,659,509,168,150,000,000,000,000,000,000,000 | 51 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
static int64_t seek_to_sector(BlockDriverState *bs, int64_t sector_num)
{
BDRVBochsState *s = bs->opaque;
uint64_t offset = sector_num * 512;
uint64_t extent_index, extent_offset, bitmap_offset;
char bitmap_entry;
// seek to sector
extent_index = offset / s->extent_size;
extent_offset = (of... | 0 | [
"CWE-369"
] | qemu | 8e53abbc20d08ae3ec30c2054e1161314ad9501d | 229,751,007,963,362,400,000,000,000,000,000,000,000 | 30 | bochs: Check extent_size header field (CVE-2014-0142)
This fixes two possible division by zero crashes: In bochs_open() and in
seek_to_sector().
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <st... |
GF_Box *co64_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_ChunkLargeOffsetBox, GF_ISOM_BOX_TYPE_CO64);
return (GF_Box *)tmp;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 324,974,026,650,291,880,000,000,000,000,000,000,000 | 5 | fixed #1587 |
static int op32_get_current_rxslot(struct b43_dmaring *ring)
{
u32 val;
val = b43_dma_read(ring, B43_DMA32_RXSTATUS);
val &= B43_DMA32_RXDPTR;
return (val / sizeof(struct b43_dmadesc32));
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c85ce65ecac078ab1a1835c87c4a6319cf74660a | 94,353,118,287,615,950,000,000,000,000,000,000,000 | 9 | b43: allocate receive buffers big enough for max frame len + offset
Otherwise, skb_put inside of dma_rx can fail...
https://bugzilla.kernel.org/show_bug.cgi?id=32042
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable@kernel.org |
virDomainStorageSourceParse(xmlNodePtr node,
xmlXPathContextPtr ctxt,
virStorageSourcePtr src,
unsigned int flags,
virDomainXMLOptionPtr xmlopt)
{
VIR_XPATH_NODE_AUTORESTORE(ctxt);
xmlNodePtr tmp;
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 188,838,413,259,048,130,000,000,000,000,000,000,000 | 76 | 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... |
static void check_enqueue_throttle(struct cfs_rq *cfs_rq) {} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 22,395,987,064,324,250,000,000,000,000,000,000,000 | 1 | 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... |
static double mp_list_set_Jxyz_v(_cimg_math_parser& mp) {
const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width());
CImg<T> &img = mp.listout[ind];
const double ox = mp.mem[_cimg_mp_slot_x], oy = mp.mem[_cimg_mp_slot_y], oz = mp.mem[_cimg_mp_slot_z];
con... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 124,330,337,427,840,020,000,000,000,000,000,000,000 | 17 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void dccp_v6_hash(struct sock *sk)
{
if (sk->sk_state != DCCP_CLOSED) {
if (inet_csk(sk)->icsk_af_ops == &dccp_ipv6_mapped) {
inet_hash(sk);
return;
}
local_bh_disable();
__inet6_hash(sk, NULL);
local_bh_enable();
}
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 205,698,568,126,315,600,000,000,000,000,000,000,000 | 12 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
static int kdb_check_regs(void)
{
if (!kdb_current_regs) {
kdb_printf("No current kdb registers."
" You may need to select another task\n");
return KDB_BADREG;
}
return 0;
} | 0 | [
"CWE-787"
] | linux | eadb2f47a3ced5c64b23b90fd2a3463f63726066 | 319,567,640,517,631,300,000,000,000,000,000,000,000 | 9 | lockdown: also lock down previous kgdb use
KGDB and KDB allow read and write access to kernel memory, and thus
should be restricted during lockdown. An attacker with access to a
serial port (for example, via a hypervisor console, which some cloud
vendors provide over the network) could trigger the debugger so it is
i... |
static inline void xen_evtchn_handle_events(unsigned cpu)
{
return evtchn_ops->handle_events(cpu);
} | 1 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 205,614,605,320,494,640,000,000,000,000,000,000,000 | 4 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
void Filter::onPerTryTimeout(UpstreamRequest& upstream_request) {
if (hedging_params_.hedge_on_per_try_timeout_) {
onSoftPerTryTimeout(upstream_request);
return;
}
cluster_->stats().upstream_rq_per_try_timeout_.inc();
if (upstream_request.upstream_host_) {
upstream_request.upstream_host_->stats().r... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 334,481,484,924,475,160,000,000,000,000,000,000,000 | 27 | 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... |
static ghobject_t get_inc_osdmap_pobject_name(epoch_t epoch) {
char foo[22];
snprintf(foo, sizeof(foo), "inc_osdmap.%d", epoch);
return ghobject_t(hobject_t(sobject_t(object_t(foo), 0)));
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 69,029,894,833,273,040,000,000,000,000,000,000,000 | 5 | 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 ... |
exif_mnote_data_olympus_set_byte_order (ExifMnoteData *d, ExifByteOrder o)
{
ExifByteOrder o_orig;
ExifMnoteDataOlympus *n = (ExifMnoteDataOlympus *) d;
unsigned int i;
if (!n) return;
o_orig = n->order;
n->order = o;
for (i = 0; i < n->count; i++) {
if (n->entries[i].components && (n->entries[i].size/n->ent... | 0 | [
"CWE-125"
] | libexif | 435e21f05001fb03f9f186fa7cbc69454afd00d1 | 218,648,488,235,998,860,000,000,000,000,000,000,000 | 18 | Fix MakerNote tag size overflow issues at read time.
Check for a size overflow while reading tags, which ensures that the
size is always consistent for the given components and type of the
entry, making checking further down superfluous.
This provides an alternate fix for
https://sourceforge.net/p/libexif/bugs/125/ C... |
fiber_transfer(mrb_state *mrb, mrb_value self)
{
struct mrb_context *c = fiber_check(mrb, self);
const mrb_value* a;
mrb_int len;
fiber_check_cfunc(mrb, mrb->c);
mrb_get_args(mrb, "*!", &a, &len);
if (c == mrb->root_c) {
mrb->c->status = MRB_FIBER_TRANSFERRED;
fiber_switch_context(mrb, c);
MAR... | 0 | [
"CWE-476",
"CWE-703"
] | mruby | da48e7dbb20024c198493b8724adae1b842083aa | 135,311,663,491,760,980,000,000,000,000,000,000,000 | 22 | fiber.c: should pack 15+ arguments in an array. |
NULL,
};
static umode_t iscsi_conn_attr_is_visible(struct kobject *kobj,
struct attribute *attr, int i)
{
struct device *cdev = container_of(kobj, struct device, kobj);
struct iscsi_cls_conn *conn = transport_class_to_conn(cdev);
struct iscsi_transport *t = conn->transport;
int param;
if (attr == &dev_att... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 260,732,200,946,276,570,000,000,000,000,000,000,000 | 77 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
static inline unsigned short snd_seq_file_flags(struct file *file)
{
switch (file->f_mode & (FMODE_READ | FMODE_WRITE)) {
case FMODE_WRITE:
return SNDRV_SEQ_LFLG_OUTPUT;
case FMODE_READ:
return SNDRV_SEQ_LFLG_INPUT;
default:
return SNDRV_SE... | 0 | [
"CWE-703"
] | linux | 030e2c78d3a91dd0d27fef37e91950dde333eba1 | 129,556,128,349,094,660,000,000,000,000,000,000,000 | 11 | ALSA: seq: Fix missing NULL check at remove_events ioctl
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
unconditionally even if there is no FIFO assigned, and this leads to
an Oops due to NULL dereference. The fix is just to add a proper NULL
check.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by... |
int may_umount_tree(struct vfsmount *mnt)
{
int actual_refs = 0;
int minimum_refs = 0;
struct vfsmount *p;
spin_lock(&vfsmount_lock);
for (p = mnt; p; p = next_mnt(p, mnt)) {
actual_refs += atomic_read(&p->mnt_count);
minimum_refs += 2;
}
spin_unlock(&vfsmount_lock);
if (actual_refs > minimum_refs)
retu... | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 339,356,874,297,603,080,000,000,000,000,000,000,000 | 18 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
CModule::EModRet CModule::OnPrivBufferPlayLine(CClient& Client,
CString& sLine) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 290,378,528,075,188,460,000,000,000,000,000,000,000 | 4 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
getcmdline_int(
int firstc,
long count UNUSED, // only used for incremental search
int indent, // indent for inside conditionals
int clear_ccline) // clear ccline first
{
static int depth = 0; // call depth
int c;
int i;
int j;
int gotesc = FALSE; // TRUE when <ESC> just... | 0 | [
"CWE-416"
] | vim | 1c3dd8ddcba63c1af5112e567215b3cec2de11d0 | 198,353,071,816,338,500,000,000,000,000,000,000,000 | 1,015 | patch 9.0.0490: using freed memory with cmdwin and BufEnter autocmd
Problem: Using freed memory with cmdwin and BufEnter autocmd.
Solution: Make sure pointer to b_p_iminsert is still valid. |
ri_ExtractValues(Relation rel, HeapTuple tup,
const RI_ConstraintInfo *riinfo, bool rel_is_pk,
Datum *vals, char *nulls)
{
TupleDesc tupdesc = rel->rd_att;
const int16 *attnums;
int i;
bool isnull;
if (rel_is_pk)
attnums = riinfo->pk_attnums;
else
attnums = riinfo->fk_attnums;
for (i = 0; i < ... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 122,335,760,185,101,080,000,000,000,000,000,000,000 | 21 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
LibRaw_windows_datastream::LibRaw_windows_datastream(HANDLE hFile)
: LibRaw_buffer_datastream(NULL, 0)
, hMap_(0)
, pView_(NULL)
{
Open(hFile);
reconstruct_base();
} | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 151,547,400,049,012,130,000,000,000,000,000,000,000 | 8 | cumulated data checks patch |
static int snd_usb_substream_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
struct snd_usb_substream *subs = substream->runtime->private_data;
switch (cmd) {
case SNDRV_PCM_TRIGGER_START:
subs->trigger_tstamp_pending_update = true;
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
subs->data_e... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 279,595,049,492,607,080,000,000,000,000,000,000,000 | 27 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
format_add_tv(struct format_tree *ft, const char *key, struct timeval *tv)
{
struct format_entry *fe;
struct format_entry *fe_now;
fe = xmalloc(sizeof *fe);
fe->key = xstrdup(key);
fe_now = RB_INSERT(format_entry_tree, &ft->tree, fe);
if (fe_now != NULL) {
free(fe->key);
free(fe);
free(fe_now->value);
f... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 157,763,959,595,613,620,000,000,000,000,000,000,000 | 21 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
SYSCALL_DEFINE2(rt_sigsuspend, sigset_t __user *, unewset, size_t, sigsetsize)
{
sigset_t newset;
/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
return -EINVAL;
if (copy_from_user(&newset, unewset, sizeof(newset)))
return -EFAULT;
return sigsuspend(&newset... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 253,925,152,409,744,660,000,000,000,000,000,000,000 | 12 | kernel/signal.c: avoid undefined behaviour in kill_something_info
When running kill(72057458746458112, 0) in userspace I hit the following
issue.
UBSAN: Undefined behaviour in kernel/signal.c:1462:11
negation of -2147483648 cannot be represented in type 'int':
CPU: 226 PID: 9849 Comm: test Tainted: G B ... |
uint64_t smb_vfs_call_get_alloc_size(struct vfs_handle_struct *handle,
struct files_struct *fsp,
const SMB_STRUCT_STAT *sbuf)
{
VFS_FIND(get_alloc_size);
return handle->fns->get_alloc_size_fn(handle, fsp, sbuf);
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 110,409,240,321,762,400,000,000,000,000,000,000,000 | 7 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
BOOL update_recv_play_sound(rdpUpdate* update, wStream* s)
{
PLAY_SOUND_UPDATE play_sound;
if (!update_read_play_sound(s, &play_sound))
return FALSE;
return IFCALLRESULT(FALSE, update->PlaySound, update->context, &play_sound);
} | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 65,153,977,059,976,480,000,000,000,000,000,000,000 | 9 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
static int lftp_ssl_connect(SSL *ssl,const char *h)
{
verify_callback_host=h;
int res=SSL_connect(ssl);
verify_callback_host=0;
return res;
} | 0 | [
"CWE-310"
] | lftp | 6357bed2583171b7515af6bb6585cf56d2117e3f | 164,142,372,584,576,060,000,000,000,000,000,000,000 | 7 | use hostmatch function from latest curl (addresses CVE-2014-0139) |
static void btrfs_double_inode_unlock(struct inode *inode1, struct inode *inode2)
{
mutex_unlock(&inode1->i_mutex);
mutex_unlock(&inode2->i_mutex);
} | 0 | [
"CWE-200"
] | linux | 8039d87d9e473aeb740d4fdbd59b9d2f89b2ced9 | 210,182,401,364,278,170,000,000,000,000,000,000,000 | 5 | Btrfs: fix file corruption and data loss after cloning inline extents
Currently the clone ioctl allows to clone an inline extent from one file
to another that already has other (non-inlined) extents. This is a problem
because btrfs is not designed to deal with files having inline and regular
extents, if a file has an ... |
pfm_unreserve_session(pfm_context_t *ctx, int is_syswide, unsigned int cpu)
{
unsigned long flags;
/*
* validy checks on cpu_mask have been done upstream
*/
LOCK_PFS(flags);
DPRINT(("in sys_sessions=%u task_sessions=%u dbregs=%u syswide=%d cpu=%u\n",
pfm_sessions.pfs_sys_sessions,
pfm_sessions.pfs_task_ses... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 192,890,507,037,808,460,000,000,000,000,000,000,000 | 49 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
static void mct_u232_close(struct usb_serial_port *port)
{
struct mct_u232_private *priv = usb_get_serial_port_data(port);
usb_kill_urb(priv->read_urb);
usb_kill_urb(port->interrupt_in_urb);
usb_serial_generic_close(port);
} /* mct_u232_close */ | 0 | [
"CWE-703"
] | linux | 4e9a0b05257f29cf4b75f3209243ed71614d062e | 139,304,730,255,157,480,000,000,000,000,000,000,000 | 9 | USB: mct_u232: add sanity checking in probe
An attack using the lack of sanity checking in probe is known. This
patch checks for the existence of a second port.
CVE-2016-3136
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: stable@vger.kernel.org
[johan: add error message ]
Signed-off-by: Johan Hovold <johan@kern... |
static int
match_upattern (string, pat, mtype, sp, ep)
char *string, *pat;
int mtype;
char **sp, **ep;
{
int c, mlen;
size_t len;
register char *p, *p1, *npat;
char *end;
int n1;
/* If the pattern doesn't match anywhere in the string, go ahead and
short-circuit right away. A minor opti... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 187,192,256,184,586,450,000,000,000,000,000,000,000 | 148 | Bash-4.4 patch 7 |
HAS_PINNED_R(struct evbuffer *buf)
{
return (buf->last && CHAIN_PINNED_R(buf->last));
} | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 145,283,170,534,018,640,000,000,000,000,000,000,000 | 4 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
if (svm->vmcb->control.next_rip != 0)
svm->next_rip = svm->vmcb->control.next_rip;
if (!svm->next_rip) {
if (emulate_instruction(vcpu, 0, 0, EMULTYPE_SKIP) !=
EMULATE_DONE)
printk(KERN_DEBUG "%s: NOP\n", ... | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 30,337,665,270,332,557,000,000,000,000,000,000,000 | 20 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
int ssl3_send_newsession_ticket(SSL *s)
{
unsigned char *senc = NULL;
EVP_CIPHER_CTX ctx;
HMAC_CTX hctx;
if (s->state == SSL3_ST_SW_SESSION_TICKET_A) {
unsigned char *p, *macstart;
const unsigned char *const_p;
int len, slen_full, slen;
SSL_SESSION *sess;
unsigne... | 0 | [
"CWE-362"
] | openssl | 3c66a669dfc7b3792f7af0758ea26fe8502ce70c | 215,886,179,630,525,060,000,000,000,000,000,000,000 | 148 | 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> |
TEST(FormatterTest, FormatSCharString) {
signed char str[] = "test";
EXPECT_EQ("test", format("{0:s}", str));
const signed char *const_str = str;
EXPECT_EQ("test", format("{0:s}", const_str));
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 167,689,674,615,316,740,000,000,000,000,000,000,000 | 6 | Fix segfault on complex pointer formatting (#642) |
method_builder_encode_signature (MonoDynamicImage *assembly, ReflectionMethodBuilder *mb)
{
/*
* FIXME: reuse code from method_encode_signature().
*/
SigBuffer buf;
int i;
guint32 nparams = mb->parameters ? mono_array_length (mb->parameters): 0;
guint32 ngparams = mb->generic_params ? mono_array_length (mb->g... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 328,621,502,097,409,750,000,000,000,000,000,000,000 | 53 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.