func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void EC_GROUP_set_curve_name(EC_GROUP *group, int nid)
{
group->curve_name = nid;
} | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 292,864,156,239,238,960,000,000,000,000,000,000,000 | 4 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
g_file_real_create_async (GFile *file,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer ... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 56,659,299,513,757,630,000,000,000,000,000,000,000 | 21 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
var2fpos(
typval_T *varp,
int dollar_lnum, // TRUE when $ is last line
int *fnum, // set to fnum for '0, 'A, etc.
int charcol) // return character column
{
char_u *name;
static pos_T pos;
pos_T *pp;
// Argument can be [lnum, col, coladd].
if (varp->v_type == VAR_LIST)
{
l... | 0 | [
"CWE-786",
"CWE-119",
"CWE-787"
] | vim | fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d | 304,660,533,722,653,550,000,000,000,000,000,000,000 | 138 | patch 8.2.4206: condition with many "(" causes a crash
Problem: Condition with many "(" causes a crash.
Solution: Limit recursion to 1000. |
static void dd_unlock(struct dump_dir *dd)
{
if (dd->locked)
{
dd->locked = 0;
xunlinkat(dd->dd_fd, ".lock", /*only files*/0);
log_info("Unlocked '%s/.lock'", dd->dd_dirname);
}
} | 0 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 206,524,901,741,589,860,000,000,000,000,000,000,000 | 11 | lib: fix races in dump directory handling code
Florian Weimer <fweimer@redhat.com>:
dd_opendir() should keep a file handle (opened with O_DIRECTORY) and
use openat() and similar functions to access files in it.
...
The file system manipulation functions should guard against hard
links (check tha... |
TEST(IndexBoundsBuilderTest, TranslateGtObject) {
auto testIndex = buildSimpleIndexEntry();
BSONObj obj = fromjson("{a: {$gt: {b: 1}}}");
auto expr = parseMatchExpression(obj);
BSONElement elt = obj.firstElement();
OrderedIntervalList oil;
IndexBoundsBuilder::BoundsTightness tightness;
Index... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 81,603,880,036,071,460,000,000,000,000,000,000,000 | 15 | SERVER-44377 generate correct plan for indexed inequalities to null |
void pfdebugCommand(client *c) {
char *cmd = c->argv[1]->ptr;
struct hllhdr *hdr;
robj *o;
int j;
o = lookupKeyWrite(c->db,c->argv[2]);
if (o == NULL) {
addReplyError(c,"The specified key does not exist");
return;
}
if (isHLLObjectOrReply(c,o) != C_OK) return;
o = db... | 0 | [
"CWE-787"
] | redis | e216ceaf0e099536fe3658a29dcb725d812364e0 | 34,133,910,641,181,176,000,000,000,000,000,000,000 | 101 | HyperLogLog: handle wrong offset in the base case. |
static struct inode *ext4_alloc_inode(struct super_block *sb)
{
struct ext4_inode_info *ei;
ei = kmem_cache_alloc(ext4_inode_cachep, GFP_NOFS);
if (!ei)
return NULL;
ei->vfs_inode.i_version = 1;
ei->vfs_inode.i_data.writeback_index = 0;
memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
INIT_LIS... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 244,530,738,183,266,400,000,000,000,000,000,000,000 | 36 | 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... |
path_in(PG_FUNCTION_ARGS)
{
char *str = PG_GETARG_CSTRING(0);
PATH *path;
int isopen;
char *s;
int npts;
int size;
int base_size;
int depth = 0;
if ((npts = pair_count(str, ',')) <= 0)
ereport(ERROR,
(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
errmsg("invalid input syntax for ... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 54,147,527,106,929,440,000,000,000,000,000,000,000 | 53 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
static unsigned int StringToTimeCode(const char *key)
{
char
buffer[2];
register ssize_t
i;
unsigned int
shift,
value;
value=0;
shift=28;
buffer[1]='\0';
for (i=0; (*key != 0) && (i < 11); i++)
{
if (isxdigit((int) ((unsigned char) *key)) == 0)
{
key++;
conti... | 0 | [
"CWE-834"
] | ImageMagick | e9728345edd0141b4724e54832103055a94708b8 | 85,353,010,790,478,220,000,000,000,000,000,000,000 | 28 | https://github.com/ImageMagick/ImageMagick/issues/509 |
int git_treebuilder_insert(
const git_tree_entry **entry_out,
git_treebuilder *bld,
const char *filename,
const git_oid *id,
git_filemode_t filemode)
{
git_tree_entry *entry;
size_t pos;
assert(bld && id && filename);
if (!valid_filemode(filemode))
return tree_error("Failed to insert entry. Invalid filemod... | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 302,892,874,061,312,640,000,000,000,000,000,000,000 | 47 | tree: Check for `.git` with case insensitivy |
mysql_get_client_info(void)
{
return (char*) MARIADB_CLIENT_VERSION_STR;
} | 0 | [] | mariadb-connector-c | 27b2f3d1f1550dfaee0f63a331a406ab31c1b37e | 246,205,362,633,380,060,000,000,000,000,000,000,000 | 4 | various checks for corrupted packets in the protocol
also: check the return value of unpack_fields() |
static const char *cmd_disable_backend_compression(cmd_parms *cmd, void *_dcfg, int flag)
{
directory_config *dcfg = (directory_config *)_dcfg;
if (dcfg == NULL) return NULL;
dcfg->disable_backend_compression = flag;
return NULL;
} | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 231,280,615,572,869,720,000,000,000,000,000,000,000 | 7 | Added SecXmlExternalEntity |
void WillReleaseScriptContext(v8::Local<v8::Context> context,
int32_t world_id) override {
if (weak_context_.IsEmpty() ||
weak_context_.Get(context->GetIsolate()) == context)
electron_ipc_remote_.reset();
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 66,019,568,839,654,300,000,000,000,000,000,000,000 | 6 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
void launch_new_connection(PgPool *pool)
{
PgSocket *server;
int total;
/* allow only small number of connection attempts at a time */
if (!statlist_empty(&pool->new_server_list)) {
log_debug("launch_new_connection: already progress");
return;
}
/* if server bounces, don't retry too fast */
if (pool->last_... | 0 | [] | pgbouncer | 4b92112b820830b30cd7bc91bef3dd8f35305525 | 243,475,731,542,859,330,000,000,000,000,000,000,000 | 56 | add_database: fail gracefully if too long db name
Truncating & adding can lead to fatal() later.
It was not an issue before, but with audodb (* in [databases] section)
the database name can some from network, thus allowing remote shutdown.. |
static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg)
{
struct fib6_result *res = arg->result;
struct rt6_info *rt = res->rt6;
struct net_device *dev = NULL;
if (!rt)
return false;
if (rt->rt6i_idev)
dev = rt->rt6i_idev->dev;
/* do not accept result if the route does
* not mee... | 1 | [
"CWE-772",
"CWE-401"
] | linux | ca7a03c4175366a92cee0ccc4fec0038c3266e26 | 82,839,925,481,316,730,000,000,000,000,000,000,000 | 30 | ipv6: do not free rt if FIB_LOOKUP_NOREF is set on suppress rule
Commit 7d9e5f422150 removed references from certain dsts, but accounting
for this never translated down into the fib6 suppression code. This bug
was triggered by WireGuard users who use wg-quick(8), which uses the
"suppress-prefix" directive to ip-rule(8... |
SYSCALL_DEFINE3(sigaction, int, sig,
const struct old_sigaction __user *, act,
struct old_sigaction __user *, oact)
{
struct k_sigaction new_ka, old_ka;
int ret;
if (act) {
old_sigset_t mask;
if (!access_ok(VERIFY_READ, act, sizeof(*act)) ||
__get_user(new_ka.sa.sa_handler, &act->sa_handler) ||... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 4ea77014af0d6205b05503d1c7aac6eace11d473 | 134,390,535,783,040,100,000,000,000,000,000,000,000 | 34 | 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 ... |
static int lxc_get_unused_loop_dev_legacy(char *loop_name)
{
struct dirent *dp;
struct loop_info64 lo64;
DIR *dir;
int dfd = -1, fd = -1, ret = -1;
dir = opendir("/dev");
if (!dir)
return -1;
while ((dp = readdir(dir))) {
if (strncmp(dp->d_name, "loop", 4) != 0)
continue;
dfd = dirfd(dir);
if (dfd ... | 0 | [
"CWE-417"
] | lxc | c1cf54ebf251fdbad1e971679614e81649f1c032 | 325,928,383,429,348,830,000,000,000,000,000,000,000 | 50 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
static void __init find_usable_zone_for_movable(void)
{
int zone_index;
for (zone_index = MAX_NR_ZONES - 1; zone_index >= 0; zone_index--) {
if (zone_index == ZONE_MOVABLE)
continue;
if (arch_zone_highest_possible_pfn[zone_index] >
arch_zone_lowest_possible_pfn[zone_index])
break;
}
VM_BUG_ON(zone_i... | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 53,385,503,236,049,880,000,000,000,000,000,000,000 | 15 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
DataChecksumsEnabled(void)
{
Assert(ControlFile != NULL);
return (ControlFile->data_checksum_version > 0);
} | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 55,868,434,033,167,620,000,000,000,000,000,000,000 | 5 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
connection_ap_get_original_destination(entry_connection_t *conn,
socks_request_t *req)
{
#ifdef TRANS_NETFILTER
return destination_from_socket(conn, req);
#elif defined(TRANS_PF)
const or_options_t *options = get_options();
if (options->TransProxyType_parsed == TPT_PF_DIVER... | 0 | [
"CWE-20",
"CWE-617"
] | tor | 79b59a2dfcb68897ee89d98587d09e55f07e68d7 | 75,070,935,511,732,800,000,000,000,000,000,000,000 | 28 | TROVE-2017-004: Fix assertion failure in relay_send_end_cell_from_edge_
This fixes an assertion failure in relay_send_end_cell_from_edge_() when an
origin circuit and a cpath_layer = NULL were passed.
A service rendezvous circuit could do such a thing when a malformed BEGIN cell
is received but shouldn't in the first... |
static int compat_set_geometry(struct block_device *bdev, fmode_t mode, unsigned int cmd,
struct compat_floppy_struct __user *arg)
{
struct floppy_struct v;
int drive, type;
int err;
BUILD_BUG_ON(offsetof(struct floppy_struct, name) !=
offsetof(struct compat_floppy_struct, name));
if (!(mode & (FMOD... | 0 | [
"CWE-190",
"CWE-125"
] | linux | da99466ac243f15fbba65bd261bfc75ffa1532b6 | 215,208,095,952,495,000,000,000,000,000,000,000,000 | 25 | floppy: fix out-of-bounds read in copy_buffer
This fixes a global out-of-bounds read access in the copy_buffer
function of the floppy driver.
The FDDEFPRM ioctl allows one to set the geometry of a disk. The sect
and head fields (unsigned int) of the floppy_drive structure are used to
compute the max_sector (int) in ... |
njs_string_slice_prop(njs_vm_t *vm, njs_string_prop_t *string,
njs_slice_prop_t *slice, njs_value_t *args, njs_uint_t nargs)
{
slice->string_length = njs_string_prop(string, &args[0]);
return njs_string_slice_args(vm, slice, args, nargs);
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 263,157,803,409,043,960,000,000,000,000,000,000,000 | 7 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
static WSGIServerConfig *newWSGIServerConfig(apr_pool_t *p)
{
WSGIServerConfig *object = NULL;
object = (WSGIServerConfig *)apr_pcalloc(p, sizeof(WSGIServerConfig));
object->pool = p;
object->alias_list = NULL;
object->socket_prefix = NULL;
#if defined(MOD_WSGI_WITH_DAEMONS)
object->socket_... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 189,835,926,733,800,650,000,000,000,000,000,000,000 | 61 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
static void dce120_destroy_resource_pool(struct resource_pool **pool)
{
struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool);
destruct(dce110_pool);
kfree(dce110_pool);
*pool = NULL;
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 36,325,032,712,551,320,000,000,000,000,000,000,000 | 8 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
tsize_t written=0;
ttile_t i2=0;
tsize_t streamlen=0;
uint16 i=0;
t2p_read_tiff_init(t2p, input);
if(t2p->t2p_error!=T2P_ERR_OK){return(0);}
t2p->pdf_xrefoffsets= (uint32*) _TIFFmalloc(TIFFSafeMultiply(tmsize_t,t2p->pdf_xrefcount,sizeof(uint32)) );
i... | 0 | [
"CWE-119"
] | libtiff | b5d6803f0898e931cf772d3d0755704ab8488e63 | 279,602,217,282,779,640,000,000,000,000,000,000,000 | 162 | * tools/tiff2pdf.c: fix write buffer overflow of 2 bytes on JPEG
compressed images. Reported by Tyler Bohan of Cisco Talos as
TALOS-CAN-0187 / CVE-2016-5652.
Also prevents writing 2 extra uninitialized bytes to the file stream. |
static void unit_gc_mark_good(Unit *u, unsigned gc_marker) {
Iterator i;
Unit *other;
u->gc_marker = gc_marker + GC_OFFSET_GOOD;
/* Recursively mark referenced units as GOOD as well */
SET_FOREACH(other, u->dependencies[UNIT_REFERENCES], i)
if (other->gc_marker ... | 0 | [
"CWE-20"
] | systemd | 531ac2b2349da02acc9c382849758e07eb92b020 | 119,582,874,570,642,670,000,000,000,000,000,000,000 | 11 | If the notification message length is 0, ignore the message (#4237)
Fixes #4234.
Signed-off-by: Jorge Niedbalski <jnr@metaklass.org> |
static int nfnl_cthelper_get(struct net *net, struct sock *nfnl,
struct sk_buff *skb, const struct nlmsghdr *nlh,
const struct nlattr * const tb[],
struct netlink_ext_ack *extack)
{
int ret = -ENOENT;
struct nf_conntrack_helper *cur;
struct sk_buff *skb2;
char *helper_name = NULL;
struct nf... | 1 | [
"CWE-862"
] | linux | 4b380c42f7d00a395feede754f0bc2292eebe6e5 | 66,067,778,135,638,960,000,000,000,000,000,000,000 | 67 | netfilter: nfnetlink_cthelper: Add missing permission checks
The capability check in nfnetlink_rcv() verifies that the caller
has CAP_NET_ADMIN in the namespace that "owns" the netlink socket.
However, nfnl_cthelper_list is shared by all net namespaces on the
system. An unprivileged user can create user and net names... |
after_poll(struct pollfd *pfd, size_t npfd, u_int maxfds)
{
size_t i;
u_int socknum, activefds = npfd;
for (i = 0; i < npfd; i++) {
if (pfd[i].revents == 0)
continue;
/* Find sockets entry */
for (socknum = 0; socknum < sockets_alloc; socknum++) {
if (sockets[socknum].type != AUTH_SOCKET &&
socke... | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 336,011,031,946,001,270,000,000,000,000,000,000,000 | 53 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
static int tcm_loop_driver_remove(struct device *dev)
{
struct tcm_loop_hba *tl_hba;
struct Scsi_Host *sh;
tl_hba = to_tcm_loop_hba(dev);
sh = tl_hba->sh;
scsi_remove_host(sh);
scsi_host_put(sh);
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 42,417,088,411,516,106,000,000,000,000,000,000,000 | 12 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
randombind (struct dns_transmit *d)
{
int j = 0;
for (j = 0; j < 10; ++j)
if (!socket_bind4 (d->s1 - 1, d->localip, 1025 + dns_random (64510)))
return 0;
if (!socket_bind4 (d->s1 - 1, d->localip, 0))
return 0;
return -1;
} | 0 | [
"CWE-362"
] | ndjbdns | 177b5522e9b3d25778001c8cebfddd4d2973fcfd | 166,041,358,451,447,320,000,000,000,000,000,000,000 | 13 | Merge identical outgoing requests - patch 2.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. The merges operation takes place in the
dns_transmit layer, rather than between query and dns_transmit layers,
as don... |
bool __weak kvm_arch_dy_runnable(struct kvm_vcpu *vcpu)
{
return kvm_arch_vcpu_runnable(vcpu);
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 80,672,736,991,277,020,000,000,000,000,000,000,000 | 4 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static int process_kernel(int argc, char* argv[]) {
char* context[_CONTEXT_MAX] = {};
struct iovec iovec[29 + SUBMIT_COREDUMP_FIELDS];
size_t i, n_iovec, n_to_free = 0;
int r;
log_debug("Processing coredump received from the kernel...");
if (argc < CONTEXT_COMM + 1)
... | 0 | [
"CWE-770"
] | systemd | 084eeb865ca63887098e0945fb4e93c852b91b0f | 329,182,449,232,498,900,000,000,000,000,000,000,000 | 53 | journald: do not store the iovec entry for process commandline on stack
This fixes a crash where we would read the commandline, whose length is under
control of the sending program, and then crash when trying to create a stack
allocation for it.
CVE-2018-16864
https://bugzilla.redhat.com/show_bug.cgi?id=1653855
The ... |
MagickExport Image *SketchImage(const Image *image,const double radius,
const double sigma,const double angle,ExceptionInfo *exception)
{
CacheView
*random_view;
Image
*blend_image,
*blur_image,
*dodge_image,
*random_image,
*sketch_image;
MagickBooleanType
status;
MagickPixelPac... | 0 | [
"CWE-369"
] | ImageMagick6 | f1e68d22d1b35459421710587a0dcbab6900b51f | 203,266,483,687,913,900,000,000,000,000,000,000,000 | 131 | https://github.com/ImageMagick/ImageMagick/issues/3296 |
static CURLcode gzip_init_writer(struct Curl_easy *data,
struct contenc_writer *writer)
{
struct zlib_params *zp = (struct zlib_params *) &writer->params;
z_stream *z = &zp->z; /* zlib state structure */
if(!writer->downstream)
return CURLE_WRITE_ERROR;
/* Initialize z... | 0 | [] | curl | 3a09fbb7f264c67c438d01a30669ce325aa508e2 | 191,718,209,323,506,840,000,000,000,000,000,000,000 | 31 | content_encoding: return error on too many compression steps
The max allowed steps is arbitrarily set to 5.
Bug: https://curl.se/docs/CVE-2022-32206.html
CVE-2022-32206
Reported-by: Harry Sintonen
Closes #9049 |
static void xfrm_policy_flo_delete(struct flow_cache_object *flo)
{
xfrm_pol_put(container_of(flo, struct xfrm_policy, flo));
} | 0 | [
"CWE-125"
] | ipsec | 7bab09631c2a303f87a7eb7e3d69e888673b9b7e | 241,200,512,156,574,220,000,000,000,000,000,000,000 | 4 | xfrm: policy: check policy direction value
The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used
as an array index. This can lead to an out-of-bound access, kernel lockup and
DoS. Add a check for the 'dir' value.
This fixes CVE-2017-11600.
References: https://bugzilla.redhat.com/show_bug.cgi?... |
int LibRaw::set_rawspeed_camerafile(char *filename)
{
#ifdef USE_RAWSPEED
try
{
CameraMetaDataLR *camerameta = new CameraMetaDataLR(filename);
if(_rawspeed_camerameta)
{
CameraMetaDataLR *d = static_cast<CameraMetaDataLR*>(_rawspeed_camerameta);
delete d;
}
_r... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 5,132,776,228,542,145,000,000,000,000,000,000,000 | 21 | fixed two more problems found by fuzzer |
static bool is_ctx_reg(struct bpf_verifier_env *env, int regno)
{
const struct bpf_reg_state *reg = reg_state(env, regno);
return reg->type == PTR_TO_CTX;
} | 0 | [
"CWE-119",
"CWE-681",
"CWE-787"
] | linux | 5b9fbeb75b6a98955f628e205ac26689bcb1383e | 67,770,661,603,408,460,000,000,000,000,000,000,000 | 6 | bpf: Fix scalar32_min_max_or bounds tracking
Simon reported an issue with the current scalar32_min_max_or() implementation.
That is, compared to the other 32 bit subreg tracking functions, the code in
scalar32_min_max_or() stands out that it's using the 64 bit registers instead
of 32 bit ones. This leads to bounds tra... |
string readMessageLine(Details &details) {
TRACE_POINT();
while (true) {
string result = details.io.readLine(1024 * 16, &details.timeout);
string line = result;
if (!line.empty() && line[line.size() - 1] == '\n') {
line.erase(line.size() - 1, 1);
}
if (result.empty()) {
// EOF
return re... | 0 | [
"CWE-200",
"CWE-61"
] | passenger | 4043718264095cde6623c2cbe8c644541036d7bf | 234,860,549,511,751,600,000,000,000,000,000,000,000 | 24 | Disable unused feature. |
static void vmx_leave_nested(struct kvm_vcpu *vcpu)
{
if (is_guest_mode(vcpu)) {
to_vmx(vcpu)->nested.nested_run_pending = 0;
nested_vmx_vmexit(vcpu, -1, 0, 0);
}
free_nested(to_vmx(vcpu));
} | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 91,279,341,871,677,390,000,000,000,000,000,000,000 | 8 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
dup_identities_check(const char *id, struct lys_module *module)
{
struct lys_module *mainmod;
int i;
if (dup_identity_check(id, module->ident, module->ident_size)) {
LOGVAL(module->ctx, LYE_DUPID, LY_VLOG_NONE, NULL, "identity", id);
return EXIT_FAILURE;
}
/* check identity in subm... | 0 | [
"CWE-787"
] | libyang | f6d684ade99dd37b21babaa8a856f64faa1e2e0d | 129,891,700,286,853,940,000,000,000,000,000,000,000 | 21 | parser BUGFIX long identity name buffer overflow
STRING_OVERFLOW (CWE-120) |
static void smi_send(struct ipmi_smi *intf,
const struct ipmi_smi_handlers *handlers,
struct ipmi_smi_msg *smi_msg, int priority)
{
int run_to_completion = intf->run_to_completion;
unsigned long flags = 0;
if (!run_to_completion)
spin_lock_irqsave(&intf->xmit_msgs_lock, flags);
smi_msg = smi_add_se... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab | 59,709,917,470,649,590,000,000,000,000,000,000,000 | 17 | ipmi: Fix memory leak in __ipmi_bmc_register
In the impelementation of __ipmi_bmc_register() the allocated memory for
bmc should be released in case ida_simple_get() fails.
Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Message-Id... |
static char *multipart_buffer_read_body(multipart_buffer *self, size_t *len)
{
char buf[FILLUNIT], *out=NULL;
int total_bytes=0, read_bytes=0;
while((read_bytes = multipart_buffer_read(self, buf, sizeof(buf), NULL))) {
out = erealloc(out, total_bytes + read_bytes + 1);
memcpy(out + total_bytes, buf, read_bytes)... | 1 | [
"CWE-190"
] | php-src | a3924ab6542a358a3099de992b63b932a9570add | 305,104,239,844,440,700,000,000,000,000,000,000,000 | 18 | Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78876: Long variables cause OOM and temp files are not cleaned
Fix #78875: Long filenames cause OOM and temp files are not cleaned
Update NEWS for 7.2.31
Update CREDITS for PHP 7.2.30
Update NEWS for PHP 7.2.30 |
Item_default_specification(THD *thd)
:Item_contextually_typed_value_specification(thd)
{ } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 227,289,153,442,137,700,000,000,000,000,000,000,000 | 3 | 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 ... |
_ppdCacheGetPageSize(
_ppd_cache_t *pc, /* I - PPD cache and mapping data */
ipp_t *job, /* I - Job attributes or NULL */
const char *keyword, /* I - Keyword string or NULL */
int *exact) /* O - 1 if exact match, 0 otherwise */
{
int i; /* Looping var */
pwg_size_t *size, ... | 0 | [
"CWE-93"
] | cups | 07428f6a640ff93aa0b4cc69ca372e2cf8490e41 | 57,143,372,131,814,490,000,000,000,000,000,000,000 | 232 | Only list supported PDLs (Issue #4923) |
void test_nghttp2_submit_window_update(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
my_user_data ud;
nghttp2_outbound_item *item;
nghttp2_stream *stream;
memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
callbacks.send_callback = null_send_callback;
nghttp2_session_cl... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 32,285,854,945,360,830,000,000,000,000,000,000,000 | 47 | Add nghttp2_option_set_max_outbound_ack |
static inline void update_load_sub(struct load_weight *lw, unsigned long dec)
{
lw->weight -= dec;
lw->inv_weight = 0;
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 270,001,029,683,577,880,000,000,000,000,000,000,000 | 5 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
ofpacts_parse_instructions(const char *s, struct ofpbuf *ofpacts,
enum ofputil_protocol *usable_protocols)
{
return ofpacts_parse_copy(s, ofpacts, usable_protocols, true, 0);
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 28,251,260,356,808,540,000,000,000,000,000,000,000 | 5 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void Magick::Image::levelizeChannel(const ChannelType channel_,
const double blackPoint_,const double whitePoint_,const double gamma_)
{
modifyImage();
GetPPException;
GetAndSetPPChannelMask(channel_);
(void) LevelizeImage(image(),blackPoint_,whitePoint_,gamma_,exceptionInfo);
RestorePPChannelMask;
ThrowI... | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 71,126,751,279,383,490,000,000,000,000,000,000,000 | 10 | Added missing return to avoid use after free. |
static void xen_load_tls(struct thread_struct *t, unsigned int cpu)
{
/*
* XXX sleazy hack: If we're being called in a lazy-cpu zone
* and lazy gs handling is enabled, it means we're in a
* context switch, and %gs has just been saved. This means we
* can zero it out to prevent faults on exit from the
* hype... | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 26,533,390,112,722,400,000,000,000,000,000,000,000 | 36 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static void rng_egd_request_entropy(RngBackend *b, RngRequest *req)
{
RngEgd *s = RNG_EGD(b);
size_t size = req->size;
while (size > 0) {
uint8_t header[2];
uint8_t len = MIN(size, 255);
/* synchronous entropy request */
header[0] = 0x02;
header[1] = len;
q... | 0 | [
"CWE-119"
] | qemu | 60253ed1e6ec6d8e5ef2efe7bf755f475dce9956 | 250,945,133,313,865,200,000,000,000,000,000,000,000 | 18 | rng: add request queue support to rng-random
Requests are now created in the RngBackend parent class and the
code path is shared by both rng-egd and rng-random.
This commit fixes the rng-random implementation which processed
only one request at a time and simply discarded all but the most
recent one. In the guest thi... |
void Save() {
url_.Save();
status_message_.Save();
for (size_t i = 0; i < num_fields_; i++) {
fields_[i].Save();
}
for (size_t i = 0; i < num_values_; i++) {
values_[i].Save();
}
} | 0 | [
"CWE-400"
] | node | 753f3b247ae2d24fee0b3f48b9ec3a5c308f0650 | 238,761,969,243,515,130,000,000,000,000,000,000,000 | 12 | http: add requestTimeout
This commits introduces a new http.Server option called requestTimeout
with a default value in milliseconds of 0.
If requestTimeout is set to a positive value, the server will start a new
timer set to expire in requestTimeout milliseconds when a new connection
is established. The timer is als... |
MagickExport Image *PolynomialImageChannel(const Image *images,
const ChannelType channel,const size_t number_terms,const double *terms,
ExceptionInfo *exception)
{
#define PolynomialImageTag "Polynomial/Image"
CacheView
*polynomial_view;
Image
*image;
MagickBooleanType
status;
MagickOffset... | 0 | [
"CWE-399",
"CWE-190"
] | ImageMagick6 | 3e21bc8a58b4ae38d24c7e283837cc279f35b6a5 | 154,671,885,069,106,470,000,000,000,000,000,000,000 | 182 | https://github.com/ImageMagick/ImageMagick/issues/1735 |
XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start,
XML_EndElementHandler end) {
if (parser == NULL)
return;
parser->m_startElementHandler = start;
parser->m_endElementHandler = end;
} | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 106,528,286,549,489,840,000,000,000,000,000,000,000 | 7 | xmlparse.c: Deny internal entities closing the doctype |
int btrfs_scrub_progress(struct btrfs_fs_info *fs_info, u64 devid,
struct btrfs_scrub_progress *progress)
{
struct btrfs_device *dev;
struct scrub_ctx *sctx = NULL;
mutex_lock(&fs_info->fs_devices->device_list_mutex);
dev = btrfs_find_device(fs_info->fs_devices, devid, NULL, NULL);
if (dev)
sctx = dev->scru... | 1 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 27,006,073,400,283,540,000,000,000,000,000,000,000 | 16 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
jpc_pchg_t *jpc_pchg_copy(jpc_pchg_t *pchg)
{
jpc_pchg_t *newpchg;
if (!(newpchg = jas_malloc(sizeof(jpc_pchg_t)))) {
return 0;
}
*newpchg = *pchg;
return newpchg;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 68,431,926,799,307,230,000,000,000,000,000,000,000 | 9 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
bool skipXffAppend() const override { return false; } | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 240,105,804,972,225,760,000,000,000,000,000,000,000 | 1 | 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 void i40e_vsi_setup_queue_map(struct i40e_vsi *vsi,
struct i40e_vsi_context *ctxt,
u8 enabled_tc,
bool is_add)
{
struct i40e_pf *pf = vsi->back;
u16 sections = 0;
u8 netdev_tc = 0;
u16 numtc = 1;
u16 qcount;
u8 offset;
u16 qmap;
int i;
u16 num_tc_qps = 0;
sections = I40E_AQ_... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 14,548,105,410,722,466,000,000,000,000,000,000,000 | 126 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
int RGWPostObj::verify_permission()
{
return 0;
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 284,887,746,671,141,570,000,000,000,000,000,000,000 | 4 | 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 struct task_struct *copy_process(unsigned long clone_flags,
unsigned long stack_start,
struct pt_regs *regs,
unsigned long stack_size,
int __user *child_tidptr,
struct pid *pid,
int trace)
{
int retval;
struct task_struct *p;
int cgroup_callbacks_done = 0;
if ((clone_flags & (C... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 213,987,961,854,736,140,000,000,000,000,000,000,000 | 382 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
static void vnc_png_free(png_structp png_ptr, png_voidp ptr)
{
g_free(ptr);
} | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 125,285,096,884,236,900,000,000,000,000,000,000,000 | 4 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
int ndpi_ptree_insert(ndpi_ptree_t *tree, const ndpi_ip_addr_t *addr,
u_int8_t bits, uint user_data) {
u_int8_t is_v6 = ndpi_is_ipv6(addr);
patricia_tree_t *ptree = is_v6 ? tree->v6 : tree->v4;
prefix_t prefix;
patricia_node_t *node;
if(bits > ptree->maxbits)
return(-1);
if(is_v6)
fill_pre... | 0 | [
"CWE-416",
"CWE-787"
] | nDPI | 6a9f5e4f7c3fd5ddab3e6727b071904d76773952 | 59,749,139,105,046,470,000,000,000,000,000,000,000 | 31 | Fixed use after free caused by dangling pointer
* This fix also improved RCE Injection detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com> |
TEST_F(Http1ServerConnectionImplTest, LargeTrailerFieldRejectedIgnored) {
// Default limit of 60 KiB
std::string long_string = "bigfield" + std::string(60 * 1024, 'q') + ": value\r\n\r\n\r\n";
testTrailersExceedLimit(long_string, false);
} | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 188,437,388,717,804,200,000,000,000,000,000,000,000 | 5 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
std::unique_ptr<cql_server::response> cql_server::connection::make_unavailable_error(int16_t stream, exceptions::exception_code err, sstring msg, db::consistency_level cl, int32_t required, int32_t alive, const tracing::trace_state_ptr& tr_state) const
{
auto response = std::make_unique<cql_server::response>(stream... | 0 | [] | scylladb | 1c2eef384da439b0457b6d71c7e37d7268e471cb | 134,397,704,446,787,840,000,000,000,000,000,000,000 | 10 | transport/server.cc: Return correct size of decompressed lz4 buffer
An incorrect size is returned from the function, which could lead to
crashes or undefined behavior. Fix by erroring out in these cases.
Fixes #11476 |
static int free_debug_processing(struct kmem_cache *s, struct page *page,
void *object, void *addr)
{
if (!check_slab(s, page))
goto fail;
if (!check_valid_pointer(s, page, object)) {
slab_err(s, page, "Invalid object pointer 0x%p", object);
goto fail;
}
if (on_freelist(s, page, object)) {
object_er... | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 158,558,503,566,000,070,000,000,000,000,000,000,000 | 47 | 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 void write_cachehdr(const char *name, const char *contents,
const char *raw __attribute__((unused)), void *rock)
{
struct transaction_t *txn = (struct transaction_t *) rock;
const char **hdr, *hop_by_hop[] =
{ "connection", "content-length", "content-type", "date", "for... | 0 | [] | cyrus-imapd | 602f12ed2af0a49ac4a58affbfea57d0fc23dea5 | 296,926,532,029,557,200,000,000,000,000,000,000,000 | 18 | httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder |
lexer_scan_private_identifier (parser_context_t *context_p) /**< context */
{
context_p->token.keyword_type = LEXER_EOS;
context_p->token.line = context_p->line;
context_p->token.column = context_p->column;
return (context_p->source_p < context_p->source_end_p && lexer_parse_identifier (context_p, LEXER_PARSE_... | 0 | [
"CWE-288"
] | jerryscript | f3a420b672927037beb4508d7bdd68fb25d2caf6 | 78,958,160,336,618,320,000,000,000,000,000,000,000 | 8 | Fix class static block opening brace parsing (#4942)
The next character should not be consumed after finding the static block opening brace.
This patch fixes #4916.
JerryScript-DCO-1.0-Signed-off-by: Martin Negyokru negyokru@inf.u-szeged.hu |
void Compute(OpKernelContext* context) override {
// Get the stamp token.
const Tensor* stamp_token_t;
OP_REQUIRES_OK(context, context->input("stamp_token", &stamp_token_t));
int64_t stamp_token = stamp_token_t->scalar<int64>()();
// Get the tree ensemble proto.
const Tensor* tree_ensemble_se... | 1 | [
"CWE-416"
] | tensorflow | 5ecec9c6fbdbc6be03295685190a45e7eee726ab | 201,044,185,104,134,600,000,000,000,000,000,000,000 | 28 | Prevent use after free.
A very old version of the code used `result` as a simple pointer to a resource. Two years later, the pointer got changed to a `unique_ptr` but author forgot to remove the call to `Unref`. Three years after that, we finally uncover the UAF.
PiperOrigin-RevId: 387924872
Change-Id: I70fb6f199164d... |
void LogRecordingSink::flush() { previous_delegate()->flush(); } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 79,291,744,920,067,920,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static int cipso_v4_map_cat_rbm_valid(const struct cipso_v4_doi *doi_def,
const unsigned char *bitmap,
u32 bitmap_len)
{
int cat = -1;
u32 bitmap_len_bits = bitmap_len * 8;
u32 cipso_cat_size;
u32 *cipso_array;
switch (doi_def->type) {
case CIPSO_V4_MAP_PASS:
return 0;
case CIPSO_V4_MAP_TR... | 0 | [
"CWE-835"
] | linux | 40413955ee265a5e42f710940ec78f5450d49149 | 15,691,079,821,255,448,000,000,000,000,000,000,000 | 34 | Cipso: cipso_v4_optptr enter infinite loop
in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop.
Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue
Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-o... |
router_pick_trusteddirserver(authority_type_t type, int flags)
{
routerstatus_t *choice;
int busy = 0;
if (get_options()->PreferTunneledDirConns)
flags |= _PDS_PREFER_TUNNELED_DIR_CONNS;
choice = router_pick_trusteddirserver_impl(type, flags, &busy);
if (choice || !(flags & PDS_RETRY_IF_NO_SERVERS))
... | 0 | [
"CWE-399"
] | tor | 308f6dad20675c42b29862f4269ad1fbfb00dc9a | 78,178,453,649,012,360,000,000,000,000,000,000,000 | 23 | Mitigate a side-channel leak of which relays Tor chooses for a circuit
Tor's and OpenSSL's current design guarantee that there are other leaks,
but this one is likely to be more easily exploitable, and is easy to fix. |
static void theme_read_module(THEME_REC *theme, const char *module)
{
CONFIG_REC *config;
config = config_open(theme->path, -1);
if (config != NULL)
config_parse(config);
theme_init_module(theme, module, config);
if (config != NULL) config_close(config);
} | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 219,442,819,038,157,560,000,000,000,000,000,000,000 | 12 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
static struct dst_entry *inet_csk_rebuild_route(struct sock *sk, struct flowi *fl)
{
const struct inet_sock *inet = inet_sk(sk);
const struct ip_options_rcu *inet_opt;
__be32 daddr = inet->inet_daddr;
struct flowi4 *fl4;
struct rtable *rt;
rcu_read_lock();
inet_opt = rcu_dereference(inet->inet_opt);
if (inet_o... | 0 | [
"CWE-200",
"CWE-415"
] | linux | 657831ffc38e30092a2d5f03d385d710eb88b09a | 292,775,340,999,266,750,000,000,000,000,000,000,000 | 25 | dccp/tcp: do not inherit mc_list from parent
syzkaller found a way to trigger double frees from ip_mc_drop_socket()
It turns out that leave a copy of parent mc_list at accept() time,
which is very bad.
Very similar to commit 8b485ce69876 ("tcp: do not inherit
fastopen_req from parent")
Initial report from Pray3r, c... |
static void iucv_callback_shutdown(struct iucv_path *path, u8 ipuser[16])
{
struct sock *sk = path->private;
bh_lock_sock(sk);
if (sk->sk_state != IUCV_CLOSED) {
sk->sk_shutdown |= SEND_SHUTDOWN;
sk->sk_state_change(sk);
}
bh_unlock_sock(sk);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 179,543,548,408,902,250,000,000,000,000,000,000,000 | 11 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static void check_user_password(struct pdf_struct *pdf, int R, const char *O,
const char *U, int32_t P, int EM,
unsigned length, unsigned oulen)
{
unsigned i;
uint8_t result[16];
char data[32];
cli_md5_ctx md5;
struct arc4_state arc4;
unsigned password_empty = 0;
dbg_printhex("U: ",... | 1 | [
"CWE-119",
"CWE-189",
"CWE-79"
] | clamav-devel | 24ff855c82d3f5c62bc5788a5776cefbffce2971 | 256,264,027,056,176,070,000,000,000,000,000,000,000 | 104 | pdf: bb #7053 |
on_process_timeout (gpointer data)
{
CockpitAuth *self = COCKPIT_AUTH (data);
self->timeout_tag = 0;
if (g_hash_table_size (self->sessions) == 0)
{
g_debug ("auth is idle");
g_signal_emit (self, sig__idling, 0);
}
return FALSE;
} | 0 | [
"CWE-1021"
] | cockpit | 46f6839d1af4e662648a85f3e54bba2d57f39f0e | 191,112,380,862,130,500,000,000,000,000,000,000,000 | 13 | ws: Restrict our cookie to the login host only
Mark our cookie as `SameSite: Strict` [1]. The current `None` default
will soon be moved to `Lax` by Firefox and Chromium, and recent versions
started to throw a warning about it.
[1] https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
https://... |
void LibuvStreamWrap::OnUvRead(ssize_t nread, const uv_buf_t* buf) {
HandleScope scope(env()->isolate());
Context::Scope context_scope(env()->context());
uv_handle_type type = UV_UNKNOWN_HANDLE;
if (is_named_pipe_ipc() &&
uv_pipe_pending_count(reinterpret_cast<uv_pipe_t*>(stream())) > 0) {
type = uv_... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 98,578,074,367,365,160,000,000,000,000,000,000,000 | 42 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
static SQInteger thread_getstatus(HSQUIRRELVM v)
{
SQObjectPtr &o = stack_get(v,1);
switch(sq_getvmstate(_thread(o))) {
case SQ_VMSTATE_IDLE:
sq_pushstring(v,_SC("idle"),-1);
break;
case SQ_VMSTATE_RUNNING:
sq_pushstring(v,_SC("running"),-1);
break;
... | 0 | [
"CWE-703",
"CWE-787"
] | squirrel | a6413aa690e0bdfef648c68693349a7b878fe60d | 234,420,424,438,485,300,000,000,000,000,000,000,000 | 18 | fix in thread.call |
pki_encrypt_session_key(struct ecryptfs_auth_tok *auth_tok,
struct ecryptfs_crypt_stat *crypt_stat,
struct ecryptfs_key_record *key_rec)
{
struct ecryptfs_msg_ctx *msg_ctx = NULL;
char *payload = NULL;
size_t payload_len;
struct ecryptfs_message *msg;
int rc;
rc = write_tag_66_packet(auth_tok->token.privat... | 0 | [
"CWE-119"
] | linux-2.6 | 6352a29305373ae6196491e6d4669f301e26492e | 207,469,411,370,081,530,000,000,000,000,000,000,000 | 40 | eCryptfs: Check Tag 11 literal data buffer size
Tag 11 packets are stored in the metadata section of an eCryptfs file to
store the key signature(s) used to encrypt the file encryption key.
After extracting the packet length field to determine the key signature
length, a check is not performed to see if the length woul... |
GF_Err stbl_Read(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
//we need to parse DegPrior in a special way
GF_SampleTableBox *ptr = (GF_SampleTableBox *)s;
e = gf_isom_box_array_read(s, bs, stbl_AddBox);
if (e) return e;
if (!ptr->SyncSample)
ptr->no_sync_found = 1;
ptr->nb_sgpd_in_stbl = gf_list_count(ptr->sam... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 32,358,075,481,788,416,000,000,000,000,000,000,000 | 17 | prevent dref memleak on invalid input (#1183) |
CreateStatistics(CreateStatsStmt *stmt)
{
int16 attnums[STATS_MAX_DIMENSIONS];
int nattnums = 0;
int numcols;
char *namestr;
NameData stxname;
Oid statoid;
Oid namespaceId;
Oid stxowner = GetUserId();
HeapTuple htup;
Datum values[Natts_pg_statistic_ext];
bool nulls[Natts_pg_statistic_ext];
i... | 1 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 15,989,273,286,351,800,000,000,000,000,000,000,000 | 528 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
TEST(IndexBoundsBuilderTest, TranslateExprEqualHashedIndex) {
BSONObj keyPattern = fromjson("{a: 'hashed'}");
BSONElement elt = keyPattern.firstElement();
auto testIndex = buildSimpleIndexEntry(keyPattern);
BSONObj obj = BSON("a" << BSON("$_internalExprEq" << 4));
auto expr = parseMatchExpression(ob... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 278,351,276,125,807,630,000,000,000,000,000,000,000 | 22 | SERVER-44377 generate correct plan for indexed inequalities to null |
static int __init ucma_init(void)
{
int ret;
ret = misc_register(&ucma_misc);
if (ret)
return ret;
ret = device_create_file(ucma_misc.this_device, &dev_attr_abi_version);
if (ret) {
pr_err("rdma_ucm: couldn't create abi_version attr\n");
goto err1;
}
ucma_ctl_table_hdr = register_net_sysctl(&init_net, "... | 0 | [
"CWE-416",
"CWE-703"
] | linux | cb2595c1393b4a5211534e6f0a0fbad369e21ad8 | 252,218,774,176,660,380,000,000,000,000,000,000,000 | 27 | infiniband: fix a possible use-after-free bug
ucma_process_join() will free the new allocated "mc" struct,
if there is any error after that, especially the copy_to_user().
But in parallel, ucma_leave_multicast() could find this "mc"
through idr_find() before ucma_process_join() frees it, since it
is already published... |
void CClient::ServerInfoRequest()
{
mem_zero(&m_CurrentServerInfo, sizeof(m_CurrentServerInfo));
m_CurrentServerInfoRequestTime = 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 82,186,807,358,088,130,000,000,000,000,000,000,000 | 5 | added some checks to snap handling |
static int checkCalMatrix(i_ctx_t * i_ctx_p, ref *CIEdict)
{
int code;
float value[9];
ref *tempref;
code = dict_find_string(CIEdict, "Matrix", &tempref);
if (code > 0 && !r_has_type(tempref, t_null)) {
if (!r_is_array(tempref))
return_error(gs_error_typecheck);
if (r_si... | 0 | [] | ghostpdl | b326a71659b7837d3acde954b18bda1a6f5e9498 | 60,443,669,938,324,760,000,000,000,000,000,000,000 | 18 | Bug 699655: Properly check the return value....
...when getting a value from a dictionary |
SWTPM_NVRAM_LoadData(unsigned char **data, /* freed by caller */
uint32_t *length,
uint32_t tpm_number,
const char *name)
{
TPM_RESULT rc = 0;
int irc;
unsigned char *decrypt_data = NULL;
uint32_t decrypt_length;
ui... | 0 | [
"CWE-125"
] | swtpm | 9f740868fc36761de27df3935513bdebf8852d19 | 138,119,632,855,428,340,000,000,000,000,000,000,000 | 69 | swtpm: Check header size indicator against expected size (CID 375869)
This fix addresses Coverity issue CID 375869.
Check the header size indicated in the header of the state against the
expected size and return an error code in case the header size indicator
is different. There was only one header size so far since ... |
static int tbf_dump(struct Qdisc *sch, struct sk_buff *skb)
{
struct tbf_sched_data *q = qdisc_priv(sch);
struct nlattr *nest;
struct tc_tbf_qopt opt;
sch->qstats.backlog = q->qdisc->qstats.backlog;
nest = nla_nest_start(skb, TCA_OPTIONS);
if (nest == NULL)
goto nla_put_failure;
opt.limit = q->limit;
psched... | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 1,089,935,415,683,503,300,000,000,000,000,000,000 | 37 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
static void dump_qt_prores(GF_ISOFile *file, GF_ISOTrackID trackID, FILE *dump, Bool dump_crc);
void dump_isom_nal(GF_ISOFile *file, GF_ISOTrackID trackID, char *inName, Bool is_final_name, u32 dump_flags)
{
Bool is_av1 = GF_FALSE;
Bool is_prores = GF_FALSE;
FILE *dump;
if (inName) {
GF_ESD* esd;
char szBuf[G... | 0 | [
"CWE-476"
] | gpac | ce01bd15f711d4575b7424b54b3a395ec64c1784 | 185,412,755,620,315,850,000,000,000,000,000,000,000 | 54 | fixed #1566 |
int nfs4_open_delegation_recall(struct nfs_open_context *ctx,
struct nfs4_state *state, const nfs4_stateid *stateid)
{
struct nfs_server *server = NFS_SERVER(state->inode);
struct nfs4_opendata *opendata;
int err = 0;
opendata = nfs4_open_recoverdata_alloc(ctx, state,
NFS4_OPEN_CLAIM_DELEG_CUR_FH);
if (IS_ER... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 98,643,037,940,508,560,000,000,000,000,000,000,000 | 32 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static void hci_cc_read_link_policy(struct hci_dev *hdev, struct sk_buff *skb)
{
struct hci_rp_read_link_policy *rp = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
if (rp->status)
return;
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_handle(hdev, __le16_to... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 264,285,871,933,005,970,000,000,000,000,000,000,000 | 18 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
void CL_StartDemoLoop( void ) {
// start the demo loop again
Cbuf_AddText ("d1\n");
Key_SetCatcher( 0 );
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 329,457,673,406,720,960,000,000,000,000,000,000,000 | 5 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
static int ebcdic_free(BIO *a)
{
if (a == NULL) return(0);
if (a->ptr != NULL)
OPENSSL_free(a->ptr);
a->ptr=NULL;
a->init=0;
a->flags=0;
return(1);
} | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 289,584,546,366,462,650,000,000,000,000,000,000,000 | 10 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
Status DatasetIteratorShape(shape_inference::InferenceContext* c) {
shape_inference::ShapeHandle unused;
TF_RETURN_IF_ERROR(c->WithRank(c->input(0), 0, &unused));
std::vector<PartialTensorShape> output_shapes;
TF_RETURN_IF_ERROR(c->GetAttr("output_shapes", &output_shapes));
const int output_shapes_size = outp... | 0 | [
"CWE-369"
] | tensorflow | 8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4 | 202,194,402,090,610,000,000,000,000,000,000,000,000 | 19 | Prevent division by 0 in common shape functions.
PiperOrigin-RevId: 387712197
Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149 |
nautilus_directory_check_if_ready_internal (NautilusDirectory *directory,
NautilusFile *file,
NautilusFileAttributes file_attributes)
{
Request request;
g_assert (NAUTILUS_IS_DIRECTORY (directory));
request = nautilus_directory_set_up_request (file_attributes);
return request_is_satisfied (direc... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 117,079,713,542,235,880,000,000,000,000,000,000,000 | 11 | 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-... |
static int apparmor_inode_getattr(const struct path *path)
{
return common_perm_path(OP_GETATTR, path, AA_MAY_META_READ);
} | 0 | [
"CWE-119",
"CWE-264",
"CWE-369"
] | linux | 30a46a4647fd1df9cf52e43bf467f0d9265096ca | 229,561,662,851,110,140,000,000,000,000,000,000,000 | 4 | apparmor: fix oops, validate buffer size in apparmor_setprocattr()
When proc_pid_attr_write() was changed to use memdup_user apparmor's
(interface violating) assumption that the setprocattr buffer was always
a single page was violated.
The size test is not strictly speaking needed as proc_pid_attr_write()
will reject... |
static inline void *adjust(void *const p)
{
return(align_to_cache(reserve_space_for_actual_base_address(p)));
} | 0 | [
"CWE-369"
] | ImageMagick | 70aa86f5d5d8aa605a918ed51f7574f433a18482 | 234,484,949,696,663,050,000,000,000,000,000,000,000 | 4 | possible divide by zero + clear buffers |
static int set_rcvarray_entry(struct hfi1_filedata *fd,
struct tid_user_buf *tbuf,
u32 rcventry, struct tid_group *grp,
u16 pageidx, unsigned int npages)
{
int ret;
struct hfi1_ctxtdata *uctxt = fd->uctxt;
struct tid_rb_node *node;
struct hfi1_devdata *dd = uctxt->dd;
dma_addr_t phys;
s... | 1 | [
"CWE-416"
] | linux | 3d2a9d642512c21a12d19b9250e7a835dcb41a79 | 23,517,125,701,385,390,000,000,000,000,000,000,000 | 70 | IB/hfi1: Ensure correct mm is used at all times
Two earlier bug fixes have created a security problem in the hfi1
driver. One fix aimed to solve an issue where current->mm was not valid
when closing the hfi1 cdev. It attempted to do this by saving a cached
value of the current->mm pointer at file open time. This is a ... |
int i2d_PKCS8_bio(BIO *bp, X509_SIG *p8)
{
return ASN1_i2d_bio_of(X509_SIG,i2d_X509_SIG,bp,p8);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 227,197,979,778,227,920,000,000,000,000,000,000,000 | 4 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
static int r_cmd_java_handle_replace_cp_value_long (RCore *core, RBinJavaObj *obj, const char *cmd, ut16 idx, ut64 addr) {
ut64 value = r_cmd_java_get_input_num_value (core, cmd);
int res = false;
res = r_cmd_java_get_cp_bytes_and_write (core, obj, idx, addr, (ut8 *) &value, 8);
return res;
} | 0 | [
"CWE-703",
"CWE-193"
] | radare2 | ced0223c7a1b3b5344af315715cd28fe7c0d9ebc | 20,136,928,926,797,076,000,000,000,000,000,000,000 | 6 | Fix unmatched array length in core_java.c (issue #16304) (#16313) |
gdk_pixbuf__bmp_image_save_to_callback (GdkPixbufSaveFunc save_func,
gpointer user_data,
GdkPixbuf *pixbuf,
gchar **keys,
gchar **values,
GError **error)
{
guint width, height, channel, size, stride, src_stride, x, y;
guchar BFH_BIH[54... | 0 | [] | gdk-pixbuf | 779429ce34e439c01d257444fe9d6739e72a2024 | 186,873,956,197,668,050,000,000,000,000,000,000,000 | 68 | bmp: Detect integer overflow of the line width
Instead of risking crashes or OOM, return an error if
we detect integer overflow.
The commit also includes a test image that triggers
this overflow when used with pixbuf-read.
https://bugzilla.gnome.org/show_bug.cgi?id=768738 |
void* LZ4_createStream()
{
void* lz4s = ALLOCATOR(4, LZ4_STREAMSIZE_U32);
MEM_INIT(lz4s, 0, LZ4_STREAMSIZE);
return lz4s;
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 279,790,108,226,492,530,000,000,000,000,000,000,000 | 6 | Fixed : issue 52 (reported by Ludwig Strigeus) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.