func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void ServerItem::init() {
// Without this, columncount is wrong.
setData(0, Qt::DisplayRole, QVariant());
setData(1, Qt::DisplayRole, QVariant());
setData(2, Qt::DisplayRole, QVariant());
emitDataChanged();
} | 0 | [
"CWE-59",
"CWE-61"
] | mumble | e59ee87abe249f345908c7d568f6879d16bfd648 | 316,400,608,269,547,830,000,000,000,000,000,000,000 | 7 | FIX(client): Only allow "http"/"https" for URLs in ConnectDialog
Our public server list registration script doesn't have an URL scheme
whitelist for the website field.
Turns out a malicious server can register itself with a dangerous URL in
an attempt to attack a user's machine.
User interaction is required, as the ... |
static int abort_rpl(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
{
struct iwch_ep *ep = ctx;
unsigned long flags;
int release = 0;
PDBG("%s ep %p\n", __func__, ep);
BUG_ON(!ep);
/*
* We get 2 abort replies from the HW. The first one must
* be ignored except for scribbling that we need one more.
... | 0 | [
"CWE-703"
] | linux | 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 | 310,007,943,175,624,740,000,000,000,000,000,000,000 | 35 | iw_cxgb3: Fix incorrectly returning error on success
The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off... |
int ConnectionImpl::onBeforeFrameSend(const nghttp2_frame* frame) {
ENVOY_CONN_LOG(trace, "about to send frame type={}, flags={}", connection_,
static_cast<uint64_t>(frame->hd.type), static_cast<uint64_t>(frame->hd.flags));
ASSERT(!is_outbound_flood_monitored_control_frame_);
// Flag flood monito... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 315,818,286,063,504,680,000,000,000,000,000,000,000 | 11 | 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... |
ves_icall_Type_IsArrayImpl (MonoReflectionType *t)
{
MonoType *type;
MonoBoolean res;
MONO_ARCH_SAVE_REGS;
type = t->type;
res = !type->byref && (type->type == MONO_TYPE_ARRAY || type->type == MONO_TYPE_SZARRAY);
return res;
} | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 16,486,289,234,675,349,000,000,000,000,000,000,000 | 12 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
BGD_DECLARE(gdImagePtr) gdImageCreateFromPngPtr (int size, void *data)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx (size, data, 0);
if(!in)
return 0;
im = gdImageCreateFromPngCtx (in);
in->gd_free (in);
return im;
} | 0 | [
"CWE-415"
] | libgd | 56ce6ef068b954ad28379e83cca04feefc51320c | 213,491,323,188,227,500,000,000,000,000,000,000,000 | 10 | Fix #381: libgd double-free vulnerability
The issue is that `gdImagePngCtxEx` (which is called by `gdImagePngPtr`
and the other PNG output functions to do the real work) does not return
whether it succeeded or failed, so this is not checked in
`gdImagePngPtr` and the function wrongly assumes everything is okay,
which ... |
void gdi_graphics_pipeline_uninit(rdpGdi* gdi, RdpgfxClientContext* gfx)
{
if (gdi)
gdi->gfx = NULL;
if (!gfx)
return;
gfx->custom = NULL;
DeleteCriticalSection(&gfx->mux);
PROFILER_PRINT_HEADER
PROFILER_PRINT(gfx->SurfaceProfiler)
PROFILER_PRINT_FOOTER
PROFILER_FREE(gfx->SurfaceProfiler)
} | 0 | [
"CWE-190"
] | FreeRDP | e08a23f93136f59a52651f66d064b8d4303872e1 | 137,982,561,875,870,200,000,000,000,000,000,000,000 | 15 | Fixed missing input sanitation for GFX surfaces.
Thanks to Sunglin and HuanGMz of the Knownsec 404 security team and pangzi of pwnzen |
std::string ZRtp::getPeerHelloHash() {
std::ostringstream stm;
if (peerHelloVersion[0] == 0)
return std::string();
uint8_t* hp = peerHelloHash;
stm << peerHelloVersion;
stm << " ";
stm.fill('0');
stm << hex;
for (int i = 0; i < hashLengthImpl; i++) {
stm.width(2);
... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 145,132,818,877,567,770,000,000,000,000,000,000,000 | 18 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
userauth_pubkey(struct ssh *ssh)
{
Authctxt *authctxt = ssh->authctxt;
struct passwd *pw = authctxt->pw;
struct sshbuf *b;
struct sshkey *key = NULL;
char *pkalg, *userstyle = NULL, *key_s = NULL, *ca_s = NULL;
u_char *pkblob, *sig, have_sig;
size_t blen, slen;
int r, pktype;
int authenticated = 0;
struct ssh... | 1 | [
"CWE-200",
"CWE-362",
"CWE-703"
] | src | 779974d35b4859c07bc3cb8a12c74b43b0a7d1e0 | 76,284,155,674,402,210,000,000,000,000,000,000,000 | 155 | delay bailout for invalid authenticating user until after the packet
containing the request has been fully parsed. Reported by Dariusz Tytko
and Michał Sajdak; ok deraadt |
static int apparmor_cred_alloc_blank(struct cred *cred, gfp_t gfp)
{
/* freed by apparmor_cred_free */
struct aa_task_cxt *cxt = aa_alloc_task_context(gfp);
if (!cxt)
return -ENOMEM;
cred->security = cxt;
return 0;
} | 0 | [
"CWE-20"
] | linux | a5b2c5b2ad5853591a6cac6134cd0f599a720865 | 132,296,152,196,183,680,000,000,000,000,000,000,000 | 10 | AppArmor: fix oops in apparmor_setprocattr
When invalid parameters are passed to apparmor_setprocattr a NULL deref
oops occurs when it tries to record an audit message. This is because
it is passing NULL for the profile parameter for aa_audit. But aa_audit
now requires that the profile passed is not NULL.
Fix this by... |
int jas_image_addfmt(int id, char *name, char *ext, char *desc,
jas_image_fmtops_t *ops)
{
jas_image_fmtinfo_t *fmtinfo;
assert(id >= 0 && name && ext && ops);
if (jas_image_numfmts >= JAS_IMAGE_MAXFMTS) {
return -1;
}
fmtinfo = &jas_image_fmtinfos[jas_image_numfmts];
fmtinfo->id = id;
if (!(fmtinfo->name = ... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 6,016,339,438,507,192,000,000,000,000,000,000,000 | 26 | 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... |
glob(const char *pattern, int flags, int (*errfunc) (const char *, int),
glob_t * pglob)
{
return glob_(pattern, flags, errfunc, pglob, (unsigned long) -1, 0);
} | 0 | [] | pure-ftpd | 0627004e23a24108785dc1506c5767392b90f807 | 284,985,137,895,641,970,000,000,000,000,000,000,000 | 5 | BSD glob(): check max pattern length after having initialized pglob |
static void release_thread_cb(void)
{
unsigned i = 0;
#if OPENSSL_VERSION_NUMBER >= 0x10000000
CRYPTO_THREADID_set_callback(NULL);
#else
CRYPTO_set_id_callback(NULL);
#endif
CRYPTO_set_locking_callback(NULL);
for (; i < ossl_num_locks; ++i) {
if (ossl_locks[i]) {
pj_lock_de... | 0 | [
"CWE-362",
"CWE-703"
] | pjproject | d5f95aa066f878b0aef6a64e60b61e8626e664cd | 91,382,344,683,113,370,000,000,000,000,000,000,000 | 25 | Merge pull request from GHSA-cv8x-p47p-99wr
* - Avoid SSL socket parent/listener getting destroyed during handshake by increasing parent's reference count.
- Add missing SSL socket close when the newly accepted SSL socket is discarded in SIP TLS transport.
* - Fix silly mistake: accepted active socket created without... |
void addViaMove(HeaderString&& key, HeaderString&& value) override {
header_map_->addViaMove(std::move(key), std::move(value));
header_map_->verifyByteSizeInternalForTest();
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 227,489,574,912,156,660,000,000,000,000,000,000,000 | 4 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static int cgroup_subtree_control_show(struct seq_file *seq, void *v)
{
struct cgroup *cgrp = seq_css(seq)->cgroup;
cgroup_print_ss_mask(seq, cgrp->subtree_control);
return 0;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 179,161,518,187,284,800,000,000,000,000,000,000,000 | 7 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
static int _nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4_stateid *stateid, int issync)
{
struct nfs4_delegreturndata *data;
struct nfs_server *server = NFS_SERVER(inode);
struct rpc_task *task;
struct rpc_message msg = {
.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_DELEGRETURN],
.r... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 283,719,251,072,932,770,000,000,000,000,000,000,000 | 50 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
int git_path_diriter_stat(struct stat *out, git_path_diriter *diriter)
{
assert(out && diriter);
return git_path_lstat(diriter->path.ptr, out);
} | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 3f7851eadca36a99627ad78cbe56a40d3776ed01 | 6,888,305,809,675,630,000,000,000,000,000,000,000 | 6 | Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS
A little-known feature of NTFS is that it offers to store metadata in
so-called "Alternate Data Streams" (inspired by Apple's "resource
forks") that are copied together with the file they are associated with.
These Alternate Data Streams can be accessed ... |
String_Schema_Obj Parser::parse_value_schema(const char* stop)
{
// initialize the string schema object to add tokens
String_Schema_Obj schema = SASS_MEMORY_NEW(String_Schema, pstate);
if (peek<exactly<'}'>>()) {
css_error("Invalid CSS", " after ", ": expected expression (e.g. 1px, bold), was ");... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 272,868,901,473,940,520,000,000,000,000,000,000,000 | 106 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
int unsafe_symlink(const char *dest, const char *src)
{
const char *name, *slash;
int depth = 0;
/* all absolute and null symlinks are unsafe */
if (!dest || !*dest || *dest == '/')
return 1;
/* find out what our safety margin is */
for (name = src; (slash = strchr(name, '/')) != 0; name = slash+1) {
/* "..... | 0 | [
"CWE-59"
] | rsync | 4cad402ea8a91031f86c53961d78bb7f4f174790 | 174,856,778,167,105,100,000,000,000,000,000,000,000 | 39 | Receiver now rejects invalid filenames in filelist.
If the receiver gets a filename with a leading slash (w/o --relative)
and/or a filename with an embedded ".." dir in the path, it dies with
an error (rather than continuing). Those invalid paths should never
happen in reality, so just reject someone trying to pull a ... |
eb_add_vma(struct i915_execbuffer *eb,
unsigned int i, unsigned batch_idx,
struct i915_vma *vma)
{
struct drm_i915_gem_exec_object2 *entry = &eb->exec[i];
int err;
GEM_BUG_ON(i915_vma_is_closed(vma));
if (!(eb->args->flags & __EXEC_VALIDATED)) {
err = eb_validate_vma(eb, entry, vma);
if (unlikely(err)... | 0 | [
"CWE-20"
] | linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | 183,574,098,178,254,260,000,000,000,000,000,000,000 | 71 | make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being i... |
bool skipFilter() const { return filter_match_state_ && filter_match_state_->skipFilter(); } | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 215,396,593,697,511,400,000,000,000,000,000,000,000 | 1 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static unsigned zlib_decompress(unsigned char** out, size_t* outsize, const unsigned char* in,
size_t insize, const LodePNGDecompressSettings* settings)
{
if(settings->custom_zlib)
{
return settings->custom_zlib(out, outsize, in, insize, settings);
}
else
{
return lodep... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 232,659,631,389,971,800,000,000,000,000,000,000,000 | 12 | Fixed #5645: realloc return handling |
struct ion_handle *ion_handle_get_by_id(struct ion_client *client,
int id)
{
struct ion_handle *handle;
mutex_lock(&client->lock);
handle = ion_handle_get_by_id_nolock(client, id);
mutex_unlock(&client->lock);
return handle;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 172,373,309,050,722,250,000,000,000,000,000,000,000 | 11 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
int uncompress_gzip(void* uncompressed, size_t *uncompressed_len,
const void* compressed, size_t compressed_len)
{
z_stream stream;
memset(&stream, 0, sizeof stream);
stream.total_in = compressed_len;
stream.avail_in = compressed_len;
stream.total_out = *uncompressed_len;
stream.avail_out = *uncompressed_len;
... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 33,103,678,213,541,520,000,000,000,000,000,000,000 | 23 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
void setDeferredPushLen(client *c, void *node, long length) {
serverAssert(c->resp >= 3);
setDeferredAggregateLen(c,node,length,'>');
} | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 224,856,823,623,898,800,000,000,000,000,000,000,000 | 4 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
bool IsNumericSupportedType(const TfLiteType type) {
return type == kTfLiteFloat32;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 324,508,218,680,402,980,000,000,000,000,000,000,000 | 3 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static void SVGStartElement(void *context,const xmlChar *name,
const xmlChar **attributes)
{
#define PushGraphicContext(id) \
{ \
if (*id == '\0') \
(void) FormatLocaleFile(svg_info->file,"push graphic-context\n"); \
else \
(void) FormatLocaleFile(svg_info->file,"push graphic-context \"%s\"\n", \
id... | 0 | [
"CWE-125"
] | ImageMagick | 5d71e23b853461dd3628cd1218834fcf13938365 | 148,467,705,740,257,900,000,000,000,000,000,000,000 | 1,337 | https://github.com/ImageMagick/ImageMagick/issues/1336 |
stf_status ikev2_decrypt_msg(struct msg_digest *md,
enum phase1_role init)
{
struct state *st = md->st;
unsigned char *encend;
pb_stream *e_pbs;
unsigned int np;
unsigned char *iv;
chunk_t *cipherkey, *authkey;
unsigned char *authstart;
struct state *pst = st;
if (st->st_clonedfrom != 0)
p... | 0 | [
"CWE-20"
] | libreswan | 2899351224fe2940aec37d7656e1e392c0fe07f0 | 23,858,095,920,543,575,000,000,000,000,000,000,000 | 107 | SECURITY: Properly handle IKEv2 I1 notification packet without KE payload |
static apr_status_t gset_encode_next(gset_encoder *encoder, apr_uint64_t pval)
{
apr_uint64_t delta, flex_bits;
apr_status_t status = APR_SUCCESS;
int i;
delta = pval - encoder->last;
encoder->last = pval;
flex_bits = (delta >> encoder->fixed_bits);
/* Intentional no APLOGNO */
ap_l... | 0 | [
"CWE-444"
] | mod_h2 | b8a8c5061eada0ce3339b24ba1d587134552bc0c | 105,256,136,087,608,800,000,000,000,000,000,000,000 | 34 | * Removing support for abandoned draft of http-wg regarding cache-digests. |
static int bnx2x_init_bp(struct bnx2x *bp)
{
int func;
int rc;
mutex_init(&bp->port.phy_mutex);
mutex_init(&bp->fw_mb_mutex);
mutex_init(&bp->drv_info_mutex);
sema_init(&bp->stats_lock, 1);
bp->drv_info_mng_owner = false;
INIT_LIST_HEAD(&bp->vlan_reg);
INIT_DELAYED_WORK(&bp->sp_task, bnx2x_sp_task);
INIT_DE... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 168,485,560,205,122,350,000,000,000,000,000,000,000 | 136 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
__be32 inet_current_timestamp(void)
{
u32 secs;
u32 msecs;
struct timespec64 ts;
ktime_get_real_ts64(&ts);
/* Get secs since midnight. */
(void)div_u64_rem(ts.tv_sec, SECONDS_PER_DAY, &secs);
/* Convert to msecs. */
msecs = secs * MSEC_PER_SEC;
/* Convert nsec to msec. */
msecs += (u32)ts.tv_nsec / NSEC_PER... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 84,364,283,375,207,120,000,000,000,000,000,000,000 | 18 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
static int selinux_inode_notifysecctx(struct inode *inode, void *ctx, u32 ctxlen)
{
return selinux_inode_setsecurity(inode, XATTR_SELINUX_SUFFIX, ctx, ctxlen, 0);
} | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 77,105,147,349,451,900,000,000,000,000,000,000,000 | 4 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
int32_t cli_bcapi_inflate_process(struct cli_bc_ctx *ctx , int32_t id)
{
int ret;
unsigned avail_in_orig, avail_out_orig;
struct bc_inflate *b = get_inflate(ctx, id);
if (!b || b->from == -1 || b->to == -1)
return -1;
b->stream.avail_in = avail_in_orig =
cli_bcapi_buffer_pipe_read_avail(ctx, b->f... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 24,808,708,106,878,413,000,000,000,000,000,000,000 | 59 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
HttpTransact::handle_response_keep_alive_headers(State* s, HTTPVersion ver, HTTPHdr* heads)
{
enum KA_Action_t
{ KA_UNKNOWN, KA_DISABLED, KA_CLOSE, KA_CONNECTION };
KA_Action_t ka_action = KA_UNKNOWN;
ink_assert(heads->type_get() == HTTP_TYPE_RESPONSE);
// Since connection headers are hop-to-hop, strip the
... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 243,962,823,109,581,000,000,000,000,000,000,000,000 | 132 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
void lodepng_state_cleanup(LodePNGState* state)
{
lodepng_color_mode_cleanup(&state->info_raw);
lodepng_info_cleanup(&state->info_png);
} | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 252,579,765,009,992,200,000,000,000,000,000,000,000 | 5 | Fixed #5645: realloc return handling |
bool CIRCSock::OnNoticeMessage(CNoticeMessage& Message) {
CString sTarget = Message.GetTarget();
bool bResult = false;
if (sTarget.Equals(GetNick())) {
IRCSOCKMODULECALL(OnPrivNoticeMessage(Message), &bResult);
if (bResult) return true;
if (!m_pNetwork->IsUserOnline()) {
... | 0 | [
"CWE-20",
"CWE-284"
] | znc | d22fef8620cdd87490754f607e7153979731c69d | 46,680,979,684,753,630,000,000,000,000,000,000,000 | 41 | Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
static int search_chunk(struct mschmd_header *chm,
const unsigned char *chunk,
const char *filename,
const unsigned char **result,
const unsigned char **result_end)
{
const unsigned char *start, *end, *p;
unsigned in... | 0 | [
"CWE-119",
"CWE-787"
] | libmspack | 2f084136cfe0d05e5bf5703f3e83c6d955234b4d | 170,832,940,715,364,250,000,000,000,000,000,000,000 | 139 | length checks when looking for control files |
static void spotcheck_subframe_estimate_(
FLAC__StreamEncoder *encoder,
unsigned blocksize,
unsigned subframe_bps,
const FLAC__Subframe *subframe,
unsigned estimate
)
{
FLAC__bool ret;
FLAC__BitWriter *frame = FLAC__bitwriter_new();
if(frame == 0) {
fprintf(stderr, "EST: can't allocate frame\n");
return;
}... | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 206,511,783,073,245,600,000,000,000,000,000,000,000 | 27 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ |
static int dmg_open(BlockDriverState *bs, QDict *options, int flags,
Error **errp)
{
BDRVDMGState *s = bs->opaque;
uint64_t info_begin, info_end, last_in_offset, last_out_offset;
uint32_t count, tmp;
uint32_t max_compressed_size = 1, max_sectors_per_chunk = 1, i;
int64_t offset;
... | 1 | [
"CWE-119"
] | qemu | c165f7758009a4f793c1fc19ebb69cf55313450b | 30,678,368,268,608,270,000,000,000,000,000,000,000 | 163 | dmg: sanitize chunk length and sectorcount (CVE-2014-0145)
Chunk length and sectorcount are used for decompression buffers as well
as the bdrv_pread() count argument. Ensure that they have reasonable
values so neither memory allocation nor conversion from uint64_t to int
will cause problems.
Signed-off-by: Stefan Ha... |
mkstr(size_t n)
{
struct string *str;
str = xmalloc(sizeof(*str) + n + 1);
str->n = n;
return str;
} | 0 | [
"CWE-476",
"CWE-284"
] | samurai | e84b6d99c85043fa1ba54851ee500540ec206918 | 121,151,750,993,528,460,000,000,000,000,000,000,000 | 9 | util: Check for NULL string in writefile
This check was there previously, but was removed in f549b757 with
the addition of a check during parse that every rule has rspfile
if and only if it has rspfile_content. However, this fails to
consider the possibility of those variables coming from the edge
or global environmen... |
static ssize_t yurex_read(struct file *file, char __user *buffer, size_t count,
loff_t *ppos)
{
struct usb_yurex *dev;
int len = 0;
char in_buffer[20];
unsigned long flags;
dev = file->private_data;
mutex_lock(&dev->io_mutex);
if (!dev->interface) { /* already disconnected */
mutex_unlock(&dev->io_mute... | 0 | [
"CWE-20",
"CWE-200"
] | linux | f1e255d60ae66a9f672ff9a207ee6cd8e33d2679 | 325,654,010,953,730,850,000,000,000,000,000,000,000 | 23 | USB: yurex: fix out-of-bounds uaccess in read handler
In general, accessing userspace memory beyond the length of the supplied
buffer in VFS read/write handlers can lead to both kernel memory corruption
(via kernel_read()/kernel_write(), which can e.g. be triggered via
sys_splice()) and privilege escalation inside use... |
static const char *skip(const char *s, const char *e, const char *d,
struct mg_str *v) {
v->ptr = s;
while (s < e && *s != '\n' && strchr(d, *s) == NULL) s++;
v->len = (size_t) (s - v->ptr);
while (s < e && strchr(d, *s) != NULL) s++;
return s;
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 71,819,565,769,319,630,000,000,000,000,000,000,000 | 8 | Protect against the directory traversal in mg_upload() |
static CURLcode main_init(void)
{
#ifdef DJGPP
/* stop stat() wasting time */
_djstat_flags |= _STAT_INODE | _STAT_EXEC_MAGIC | _STAT_DIRSIZE;
#endif
return curl_global_init(CURL_GLOBAL_DEFAULT);
} | 0 | [
"CWE-125"
] | curl | 70b1900dd13d16f2e83f571407a614541d5ac9ba | 158,782,472,037,998,640,000,000,000,000,000,000,000 | 8 | 'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
pointed out that the warnf() function in the curl tool didn't properly deal
with the cases when excessively long words were used in the string to chop
up. |
static int selinux_bpf_prog(struct bpf_prog *prog)
{
u32 sid = current_sid();
struct bpf_security_struct *bpfsec;
bpfsec = prog->aux->security;
return avc_has_perm(&selinux_state,
sid, bpfsec->sid, SECCLASS_BPF,
BPF__PROG_RUN, NULL);
} | 0 | [
"CWE-349"
] | linux | fb73974172ffaaf57a7c42f35424d9aece1a5af6 | 253,111,816,584,845,300,000,000,000,000,000,000,000 | 10 | selinux: properly handle multiple messages in selinux_netlink_send()
Fix the SELinux netlink_send hook to properly handle multiple netlink
messages in a single sk_buff; each message is parsed and subject to
SELinux access control. Prior to this patch, SELinux only inspected
the first message in the sk_buff.
Cc: stab... |
void __init udp_table_init(struct udp_table *table, const char *name)
{
unsigned int i;
if (!CONFIG_BASE_SMALL)
table->hash = alloc_large_system_hash(name,
2 * sizeof(struct udp_hslot),
uhash_entries,
21, /* one slot per 2 MB */
0,
&table->log,
&table->mask,
64 * 1024);
/*
* Make sure hash ... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 169,487,138,073,097,340,000,000,000,000,000,000,000 | 36 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static int entersafe_write_small_rsa_key(sc_card_t *card,u8 key_id,struct sc_pkcs15_prkey_rsa *rsa)
{
sc_apdu_t apdu;
u8 sbuff[SC_MAX_APDU_BUFFER_SIZE];
int r;
u8 *p=sbuff;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
{/* write prkey */
*p++=0x00; /* EC */
*p++=0x00; /* ver */
entersafe... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 298,540,601,140,249,600,000,000,000,000,000,000,000 | 44 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
{
mm_segment_t old_fs = get_fs();
struct mtget get;
struct mtget32 __user *umget32;
struct mtpos pos;
struct mtpos32 __user *upos32;
unsigned long kcmd;
void *karg;
int err = 0;
switch(cmd) {
case MTIOCPOS32:
kcmd = MTIOCPOS;
... | 0 | [] | linux-2.6 | 188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7 | 58,698,381,982,449,190,000,000,000,000,000,000,000 | 53 | [PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6]
Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos
driver so that the msdos header file doesn't need to be included.
Signed-Off-By: David Howells <dhowells@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel... |
static ut64 boffset(RBinFile *bf) {
return Elf_(r_bin_elf_get_boffset) (bf->o->bin_obj);
} | 0 | [
"CWE-125"
] | radare2 | 1f37c04f2a762500222dda2459e6a04646feeedf | 163,209,058,141,664,820,000,000,000,000,000,000,000 | 3 | Fix #9904 - crash in r2_hoobr_r_read_le32 (over 9000 entrypoints) and read_le oobread (#9923) |
static int buffer_needs_copy(PadContext *s, AVFrame *frame, AVBufferRef *buf)
{
int planes[4] = { -1, -1, -1, -1}, *p = planes;
int i, j;
/* get all planes in this buffer */
for (i = 0; i < FF_ARRAY_ELEMS(planes) && frame->data[i]; i++) {
if (av_frame_get_plane_buffer(frame, i) == buf)
... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | e43a0a232dbf6d3c161823c2e07c52e76227a1bc | 26,601,825,567,284,740,000,000,000,000,000,000,000 | 51 | avfilter: fix plane validity checks
Fixes out of array accesses
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
dns_zone_getexpiretime(dns_zone_t *zone, isc_time_t *expiretime) {
REQUIRE(DNS_ZONE_VALID(zone));
REQUIRE(expiretime != NULL);
LOCK_ZONE(zone);
*expiretime = zone->expiretime;
UNLOCK_ZONE(zone);
return (ISC_R_SUCCESS);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 60,601,287,234,527,950,000,000,000,000,000,000,000 | 9 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
bool run(OperationContext* opCtx,
const string& dbname,
const BSONObj& cmdObj,
BSONObjBuilder& result) {
Status status = auth::parseAndValidateDropAllUsersFromDatabaseCommand(cmdObj, dbname);
if (!status.isOK()) {
return appendCommandStatus(result, ... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 141,247,293,386,607,870,000,000,000,000,000,000,000 | 31 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
void LogSoftmaxFree(TfLiteContext* context, void* buffer) {
delete reinterpret_cast<LogSoftmaxOpData*>(buffer);
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 63,359,988,790,885,270,000,000,000,000,000,000,000 | 3 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
int socket_connect_unix(const char *filename)
{
struct sockaddr_un name;
int sfd = -1;
size_t size;
struct stat fst;
// check if socket file exists...
if (stat(filename, &fst) != 0) {
if (verbose >= 2)
fprintf(stderr, "%s: stat '%s': %s\n", __func__, filename,
strerror(errno));
return -1;
}
// ... ... | 0 | [
"CWE-284"
] | libimobiledevice | df1f5c4d70d0c19ad40072f5246ca457e7f9849e | 254,640,271,645,697,740,000,000,000,000,000,000,000 | 45 | common: [security fix] Make sure sockets only listen locally |
static void kvm_vcpu_ioctl_x86_get_vcpu_events(struct kvm_vcpu *vcpu,
struct kvm_vcpu_events *events)
{
events->exception.injected =
vcpu->arch.exception.pending &&
!kvm_exception_is_soft(vcpu->arch.exception.nr);
events->exception.nr = vcpu->arch.exception.nr;
events->exception.has_error_code = vcpu... | 1 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 171,594,829,116,740,970,000,000,000,000,000,000,000 | 28 | KVM: x86: fix information leak to userland
Structures kvm_vcpu_events, kvm_debugregs, kvm_pit_state2 and
kvm_clock_data are copied to userland with some padding and reserved
fields unitialized. It leads to leaking of contents of kernel stack
memory. We have to initialize them to zero.
In patch v1 Jan Kiszka suggest... |
**/
CImg<T>& resize(const CImgDisplay& disp,
const int interpolation_type=1, const unsigned int boundary_conditions=0,
const float centering_x = 0, const float centering_y = 0,
const float centering_z = 0, const float centering_c = 0) {
return r... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 221,350,330,980,706,350,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
JVM_RawRealloc(void * ptr, size_t size, const char * callsite)
{
return j9portLibrary.omrPortLibrary.mem_reallocate_memory(&j9portLibrary.omrPortLibrary, ptr, (UDATA) size, callsite, J9MEM_CATEGORY_SUN_JCL);
} | 0 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 324,855,173,609,260,950,000,000,000,000,000,000,000 | 4 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
static void FVSelectByScript(FontView *fv,int merge) {
int j, gid;
SplineChar *sc;
EncMap *map = fv->b.map;
SplineFont *sf = fv->b.sf;
extern GTextInfo scripts[];
GRect pos;
GWindow gw;
GWindowAttrs wattrs;
GGadgetCreateData gcd[10], *hvarray[21][2], *barray[8], boxes[3];
GTextIn... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 94,576,331,730,573,860,000,000,000,000,000,000,000 | 204 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
xmlNodePtr xml_add_prop(long status, xmlNsPtr davns,
struct propstat *propstat,
const xmlChar *name, xmlNsPtr ns,
xmlChar *content,
unsigned precond)
{
xmlNodePtr newprop = NULL;
if (!propstat->root) {
props... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 329,122,363,886,372,820,000,000,000,000,000,000,000 | 20 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
struct qtm_stream *qtm_init(int fd, int ofd,
int window_bits, int input_buffer_size,
struct cab_file *file,
int (*read_cb)(struct cab_file *, unsigned char *, int))
{
unsigned int window_size = 1 << window_bits;
struct qtm_stream *qtm;
unsigned offset;
int i;
/* Quantum supports wi... | 0 | [] | clamav-devel | 158c35e81a25ea5fda55a2a7f62ea9fec2e883d9 | 177,142,625,835,787,170,000,000,000,000,000,000,000 | 88 | libclamav/mspack.c: improve unpacking of malformed cabinets (bb#1826) |
invoke_NPN_Status(PluginInstance *plugin, const char *message)
{
npw_return_if_fail(rpc_method_invoke_possible(g_rpc_connection));
int error = rpc_method_invoke(g_rpc_connection,
RPC_METHOD_NPN_STATUS,
RPC_TYPE_NPW_PLUGIN_INSTANCE, plugin,
RPC_TYPE_STRING, message,
RPC_TYPE_INVALID)... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 60,874,970,451,568,490,000,000,000,000,000,000,000 | 22 | Support all the new variables added |
void stsg_del(GF_Box *s)
{
GF_SubTrackSampleGroupBox *ptr = (GF_SubTrackSampleGroupBox *)s;
if (ptr == NULL) return;
if (ptr->group_description_index) gf_free(ptr->group_description_index);
gf_free(ptr);
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 124,661,083,191,474,850,000,000,000,000,000,000,000 | 7 | fixed 2 possible heap overflows (inc. #1088) |
int git_tree_entry_icmp(const git_tree_entry *e1, const git_tree_entry *e2)
{
return git_path_cmp(
e1->filename, e1->filename_len, git_tree_entry__is_tree(e1),
e2->filename, e2->filename_len, git_tree_entry__is_tree(e2),
git__strncasecmp);
} | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 77,882,142,441,730,670,000,000,000,000,000,000,000 | 7 | tree: Check for `.git` with case insensitivy |
display_get_params(gx_device * dev, gs_param_list * plist)
{
gx_device_display *ddev = (gx_device_display *) dev;
int code;
gs_param_string dhandle;
int idx;
int val;
int i = 0;
size_t dptr;
char buf[64];
idx = ((int)sizeof(size_t)) * 8 - 4;
buf[i++] = '1';
buf[i++] = '6';
... | 0 | [] | ghostpdl | 1ef5f08f2c2e27efa978f0010669ff22355c385f | 200,975,884,697,738,900,000,000,000,000,000,000,000 | 42 | Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829
The ICC profile checking needs to be told that the device supports_devn, so
add a spec_op proc to return true when in separation mode, and add a proc for
fill_rectangle_hl_color so that fillpage will work in Separation mode.
This was fixed... |
ssize_t enc_untrusted_recvfrom(int sockfd, void *buf, size_t len, int flags,
struct sockaddr *src_addr, socklen_t *addrlen) {
int klinux_flags = TokLinuxRecvSendFlag(flags);
if (klinux_flags == 0 && flags != 0) {
errno = EINVAL;
return -1;
}
MessageWriter input;
input.P... | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 14,397,589,406,695,664,000,000,000,000,000,000,000 | 47 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
check_SET_MPLS_TC(const struct ofpact_mpls_tc *a OVS_UNUSED,
struct ofpact_check_params *cp)
{
return check_set_mpls(cp);
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 101,872,759,823,663,170,000,000,000,000,000,000,000 | 5 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
void Magick::Image::distort(const DistortMethod method_,
const size_t numberArguments_,const double *arguments_,const bool bestfit_)
{
MagickCore::Image
*newImage;
GetPPException;
newImage=DistortImage(constImage(), method_,numberArguments_,arguments_,
bestfit_ == true ? MagickTrue : MagickFalse,except... | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 56,059,222,027,298,630,000,000,000,000,000,000,000 | 12 | Added missing return to avoid use after free. |
HeaderLookupTable_t::lookup (const char *buf, const std::size_t len) const {
const HeaderTableRecord *r = HttpHeaderHashTable::lookup(buf, len);
if (!r || r->id == Http::HdrType::OTHER)
return BadHdr;
return *r;
} | 0 | [
"CWE-116",
"CWE-79"
] | squid | 051824924c709bd6162a378f746fb859454c674e | 43,860,048,861,657,270,000,000,000,000,000,000,000 | 6 | Merge pull request from GHSA-jjq6-mh2h-g39h |
PHP_FUNCTION(openssl_pkcs12_export)
{
X509 * cert = NULL;
BIO * bio_out;
PKCS12 * p12 = NULL;
zval * zcert = NULL, *zout = NULL, *zpkey, *args = NULL;
EVP_PKEY *priv_key = NULL;
long certresource, keyresource;
char * pass;
int pass_len;
char * friendly_name = NULL;
zval ** item;
STACK_OF(X509) *ca = NULL;
... | 0 | [
"CWE-310"
] | php-src | 16023f3e3b9c06cf677c3c980e8d574e4c162827 | 275,465,755,199,493,300,000,000,000,000,000,000,000 | 68 | Fix bug #70014 - use RAND_bytes instead of deprecated RAND_pseudo_bytes |
SetComp(expr_ty elt, asdl_seq * generators, int lineno, int col_offset, int
end_lineno, int end_col_offset, PyArena *arena)
{
expr_ty p;
if (!elt) {
PyErr_SetString(PyExc_ValueError,
"field elt is required for SetComp");
return NULL;
}
p = (expr_ty)PyArena... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 49,288,474,551,447,695,000,000,000,000,000,000,000 | 21 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static int blk_fill_sghdr_rq(struct request_queue *q, struct request *rq,
struct sg_io_hdr *hdr, fmode_t mode)
{
if (copy_from_user(rq->cmd, hdr->cmdp, hdr->cmd_len))
return -EFAULT;
if (blk_verify_command(&q->cmd_filter, rq->cmd, mode & FMODE_WRITE))
return -EPERM;
/*
* fill in request structure
*/... | 1 | [
"CWE-399"
] | linux-2.6 | f2f1fa78a155524b849edf359e42a3001ea652c0 | 259,037,141,837,650,080,000,000,000,000,000,000,000 | 22 | Enforce a minimum SG_IO timeout
There's no point in having too short SG_IO timeouts, since if the
command does end up timing out, we'll end up through the reset sequence
that is several seconds long in order to abort the command that timed
out.
As a result, shorter timeouts than a few seconds simply do not make
sense... |
bool may_expand_vm(struct mm_struct *mm, vm_flags_t flags, unsigned long npages)
{
if (mm->total_vm + npages > rlimit(RLIMIT_AS) >> PAGE_SHIFT)
return false;
if (is_data_mapping(flags) &&
mm->data_vm + npages > rlimit(RLIMIT_DATA) >> PAGE_SHIFT) {
/* Workaround for Valgrind */
if (rlimit(RLIMIT_DATA) == 0... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 3,212,220,927,181,865,000,000,000,000,000,000,000 | 22 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
ModuleExport void UnregisterICONImage(void)
{
(void) UnregisterMagickInfo("CUR");
(void) UnregisterMagickInfo("ICO");
(void) UnregisterMagickInfo("ICON");
} | 0 | [
"CWE-190",
"CWE-189",
"CWE-703"
] | ImageMagick | 0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734 | 102,060,207,765,316,060,000,000,000,000,000,000,000 | 6 | |
static int linked_attr_modify(struct ldb_module *module,
const struct ldb_message *message,
struct ldb_request *parent)
{
struct ldb_request *mod_req;
int ret;
struct ldb_context *ldb = ldb_module_get_ctx(module);
TALLOC_CTX *tmp_ctx = talloc_new(module);
struct ldb_result *res;
res = talloc_ze... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 173,944,382,863,517,920,000,000,000,000,000,000,000 | 44 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
psg_json_value_set_ngx_str_ne(PsgJsonValue *doc, const char *name,
ngx_str_t *value)
{
return psg_json_value_set_str_ne(doc, name,
(const char *) value->data, value->len);
} | 0 | [
"CWE-362"
] | passenger | 207870f5b7f5cc240587ab0977d6046782ae1d86 | 315,331,086,897,937,040,000,000,000,000,000,000,000 | 6 | Fix privilege escalation in the Nginx module
The vulnerability is exploitable with a non-standard
passenger_instance_registry_dir, via a race condition where after a file
was created, it was chowned via the path not the file descriptor.
The chown entered the code in 2010, so Passenger 4 + 5 all affected. |
RGWPutObj_CB(RGWPutObj *_op) : op(_op) {} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 87,138,711,606,058,430,000,000,000,000,000,000,000 | 1 | 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 <... |
do_ascii(exarg_T *eap UNUSED)
{
int c;
int cval;
char buf1[20];
char buf2[20];
char_u buf3[7];
#ifdef FEAT_DIGRAPHS
char_u *dig;
#endif
int cc[MAX_MCO];
int ci = 0;
int len;
if (enc_utf8)
c = utfc_ptr2char(ml_get_cursor(), cc);
else
c = gchar_cursor();
if (c ... | 0 | [
"CWE-787"
] | vim | e2bd8600b873d2cd1f9d667c28cba8b1dba18839 | 64,124,856,812,511,265,000,000,000,000,000,000,000 | 100 | patch 8.2.4977: memory access error when substitute expression changes window
Problem: Memory access error when substitute expression changes window.
Solution: Disallow changing window in substitute expression. |
template<typename tp, typename tf, typename tc, typename to, typename tz>
CImg<T>& draw_object3d(const float x0, const float y0, const float z0,
const CImg<tp>& vertices, const CImgList<tf>& primitives,
const CImgList<tc>& colors, const CImg<to>& opacities,
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 111,725,881,193,244,390,000,000,000,000,000,000,000 | 12 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void gmc1_c(uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder)
{
const int A=(16-x16)*(16-y16);
const int B=( x16)*(16-y16);
const int C=(16-x16)*( y16);
const int D=( x16)*( y16);
int i;
for(i=0; i<h; i++)
{
dst[0]= (A*src[0] + B*src[1] + C... | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 127,544,586,752,269,630,000,000,000,000,000,000,000 | 22 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static int do_ip_getsockopt(struct sock *sk, int level, int optname,
char __user *optval, int __user *optlen)
{
struct inet_sock *inet = inet_sk(sk);
int val;
int len;
if (level != SOL_IP)
return -EOPNOTSUPP;
if (ip_mroute_opt(optname))
return ip_mroute_getsockopt(sk, optname, optval, optlen);
if (g... | 1 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 330,087,616,203,362,950,000,000,000,000,000,000,000 | 218 | 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... |
explicit MaxPoolingGradOp(OpKernelConstruction* context) : OpKernel(context) {
string data_format;
OP_REQUIRES_OK(context, context->GetAttr("data_format", &data_format));
OP_REQUIRES(context, FormatFromString(data_format, &data_format_),
errors::InvalidArgument("Invalid data format"));
... | 0 | [
"CWE-125"
] | tensorflow | dcd7867de0fea4b72a2b34bd41eb74548dc23886 | 314,441,776,110,409,520,000,000,000,000,000,000,000 | 30 | Fix heap buffer overflow
PiperOrigin-RevId: 372132844
Change-Id: Idef9895efaf145f2b1c23d31983601ec980cd5e4 |
static int exif_file_sections_realloc(image_info_type *ImageInfo, int section_index, size_t size)
{
void *tmp;
/* This is not a malloc/realloc check. It is a plausibility check for the
* function parameters (requirements engineering).
*/
if (section_index >= ImageInfo->file.count) {
EXIF_ERRLOG_FSREALLOC(Imag... | 0 | [
"CWE-416"
] | php-src | 3fdde65617e9f954e2c964768aac8831005497e5 | 194,737,685,091,792,100,000,000,000,000,000,000,000 | 16 | Fix #76409: heap use after free in _php_stream_free
We must not close the stream in exif_read_from_impl(), since it is the
responsibility of the (caller's) caller to do so, if it actually opened
the stream.
We simplify the reproduce script, which is actually about supplying a
path to a directory (opposed to a regular... |
NSC_MESSAGE* nsc_encode_messages(NSC_CONTEXT* context, const BYTE* data,
UINT32 x, UINT32 y, UINT32 width, UINT32 height,
UINT32 scanline, UINT32* numMessages,
UINT32 maxDataSize)
{
UINT32 i, j, k;
UINT32 dataOffset;
U... | 0 | [
"CWE-200",
"CWE-787"
] | FreeRDP | d1112c279bd1a327e8e4d0b5f371458bf2579659 | 194,934,541,681,659,650,000,000,000,000,000,000,000 | 118 | Fixed CVE-2018-8788
Thanks to Eyal Itkin from Check Point Software Technologies. |
static struct nlattr *reserve_sfa_size(struct sw_flow_actions **sfa,
int attr_len, bool log)
{
struct sw_flow_actions *acts;
int new_acts_size;
size_t req_size = NLA_ALIGN(attr_len);
int next_offset = offsetof(struct sw_flow_actions, actions) +
(*sfa)->actions_len;
if (req_size <= (ksize(*sfa) - ... | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 171,924,850,423,883,400,000,000,000,000,000,000,000 | 38 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
int wolfSSH_SFTP_read(WOLFSSH* ssh)
{
int maxSz, ret = WS_SUCCESS;
WS_SFTP_RECV_STATE* state = NULL;
WLOG(WS_LOG_SFTP, "Entering wolfSSH_SFTP_read()");
if (ssh == NULL)
return WS_BAD_ARGUMENT;
if (ssh->error == WS_WANT_READ || ssh->error == WS_WANT_WRITE)
ssh->error = WS_SUCCESS;
... | 0 | [
"CWE-190"
] | wolfssh | edb272e35ee57e7b89f3e127222c6981b6a1e730 | 150,189,903,248,984,930,000,000,000,000,000,000,000 | 238 | ASAN SFTP Fixes
When decoding SFTP messages, fix the size checks so they don't wrap. (ZD12766) |
char const * caca_get_dither_charset(caca_dither_t const *d)
{
return d->glyph_name;
} | 0 | [
"CWE-369"
] | libcaca | 84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c | 240,810,177,009,997,720,000,000,000,000,000,000,000 | 4 | dither: fix integer overflows that were causing a division by zero.
Fixes: #36 (CVE-2018-20544) |
void KrecipesView::categorizeCurrentRecipe()
{
QWidget * vis_panel = rightPanel->visiblePanel();
if ( vis_panel == selectPanel ) {
selectPanel->getActionsHandler()->categorize();
}
else if (vis_panel == inputPanel ) {
inputPanel->addCategory();
}
} | 0 | [] | krecipes | cd1490fb5fe82cbe9172a43be13298001b446ecd | 312,127,613,497,676,700,000,000,000,000,000,000,000 | 10 | Use WebKit instead of KHTML for printing recipes, fixes sourceforge #2990118 and
#2960140.
svn path=/trunk/extragear/utils/krecipes/; revision=1137824 |
SYSCALL_DEFINE2(osf_getitimer, int, which, struct itimerval32 __user *, it)
{
struct itimerval kit;
int error;
error = do_getitimer(which, &kit);
if (!error && put_it32(it, &kit))
error = -EFAULT;
return error;
} | 0 | [
"CWE-703",
"CWE-264",
"CWE-189"
] | linux | 21c5977a836e399fc710ff2c5367845ed5c2527f | 147,127,100,263,243,300,000,000,000,000,000,000,000 | 11 | alpha: fix several security issues
Fix several security issues in Alpha-specific syscalls. Untested, but
mostly trivial.
1. Signedness issue in osf_getdomainname allows copying out-of-bounds
kernel memory to userland.
2. Signedness issue in osf_sysinfo allows copying large amounts of
kernel memory to userland.
3. ... |
parse_import_options(char *str,unsigned int *options,int noisy)
{
struct parse_options import_opts[]=
{
{"import-local-sigs",IMPORT_LOCAL_SIGS,NULL,
N_("import signatures that are marked as local-only")},
{"repair-pks-subkey-bug",IMPORT_REPAIR_PKS_SUBKEY_BUG,NULL,
N_("repair damage from ... | 0 | [
"CWE-20"
] | gnupg | f0b33b6fb8e0586e9584a7a409dcc31263776a67 | 259,692,594,442,473,500,000,000,000,000,000,000,000 | 30 | gpg: Import only packets which are allowed in a keyblock.
* g10/import.c (valid_keyblock_packet): New.
(read_block): Store only valid packets.
--
A corrupted key, which for example included a mangled public key
encrypted packet, used to corrupt the keyring. This change skips all
packets which are not allowed in a ke... |
void sctp_transport_update_pmtu(struct sock *sk, struct sctp_transport *t, u32 pmtu)
{
struct dst_entry *dst;
if (unlikely(pmtu < SCTP_DEFAULT_MINSEGMENT)) {
pr_warn("%s: Reported pmtu %d too low, using default minimum of %d\n",
__func__, pmtu,
SCTP_DEFAULT_MINSEGMENT);
/* Use default minimum segment size ... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 28,764,674,618,399,150,000,000,000,000,000,000,000 | 28 | 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 struct sc_card_driver *sc_get_driver(void)
{
struct sc_card_driver *iso_drv = sc_get_iso7816_driver();
if (iso_ops == NULL)
iso_ops = iso_drv->ops;
epass2003_ops = *iso_ops;
epass2003_ops.match_card = epass2003_match_card;
epass2003_ops.init = epass2003_init;
epass2003_ops.finish = epass2003_finish;
... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 136,397,504,794,785,830,000,000,000,000,000,000,000 | 31 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
perf_event_parse_addr_filter(struct perf_event *event, char *fstr,
struct list_head *filters)
{
struct perf_addr_filter *filter = NULL;
char *start, *orig, *filename = NULL;
struct path path;
substring_t args[MAX_OPT_ARGS];
int state = IF_STATE_ACTION, token;
unsigned int kernel = 0;
int ret = -EINVAL;
... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 95,218,986,692,665,840,000,000,000,000,000,000,000 | 133 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
mz_bool mz_zip_writer_add_mem(mz_zip_archive *pZip, const char *pArchive_name,
const void *pBuf, size_t buf_size,
mz_uint level_and_flags) {
return mz_zip_writer_add_mem_ex(pZip, pArchive_name, pBuf, buf_size, NULL, 0,
level... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 336,555,532,993,038,930,000,000,000,000,000,000,000 | 6 | Make line_no with too large value(2**20) invalid. Fixes #124 |
authentic_set_current_files(struct sc_card *card, struct sc_path *path,
unsigned char *resp, size_t resplen, struct sc_file **file_out)
{
struct sc_context *ctx = card->ctx;
struct sc_file *file = NULL;
int rv;
LOG_FUNC_CALLED(ctx);
if (resplen) {
switch (resp[0]) {
case 0x62:
case 0x6F:
file = sc_fi... | 1 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 78,410,577,155,919,610,000,000,000,000,000,000,000 | 64 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
write_ruleset_details(int s)
{
int proto = 0;
unsigned short eport, iport;
char desc[64];
char iaddr[32];
char rhost[32];
unsigned int timestamp;
u_int64_t packets;
u_int64_t bytes;
int i = 0;
char buffer[256];
int n;
write(s, "Ruleset :\n", 10);
while(get_redirect_rule_by_index(i, 0/*ifname*/, &eport, ia... | 0 | [
"CWE-476"
] | miniupnp | f321c2066b96d18afa5158dfa2d2873a2957ef38 | 230,246,772,030,373,260,000,000,000,000,000,000,000 | 31 | upnp_redirect(): accept NULL desc argument |
static double mp_gte(_cimg_math_parser& mp) {
return (double)(_mp_arg(2)>=_mp_arg(3)); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 218,995,238,826,606,670,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static const char **get_handler_errmsgs(int nr)
{
return handler_errmsgs;
} | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 246,643,044,436,719,800,000,000,000,000,000,000,000 | 4 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
static inline int select_idle_smt(struct task_struct *p, int target)
{
return -1;
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 296,936,490,862,005,600,000,000,000,000,000,000,000 | 4 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
static void do_clip(void)
{
struct SYMBOL *s, *s2;
struct SYSTEM *sy;
struct VOICE_S *p_voice;
int voice;
/* remove the beginning of the tune */
s = tsfirst;
if (clip_start.bar > 0
|| clip_start.time > 0) {
s = go_global_time(s, &clip_start);
if (!s) {
tsfirst = NULL;
return;
}
/* update the st... | 0 | [
"CWE-787"
] | abcm2ps | dc0372993674d0b50fedfbf7b9fad1239b8efc5f | 57,198,165,715,343,580,000,000,000,000,000,000,000 | 77 | fix: crash when too many accidentals in K: (signature + explicit)
Issue #17. |
networkstatus_compute_bw_weights_v9(smartlist_t *chunks, int64_t G, int64_t M,
int64_t E, int64_t D, int64_t T,
int64_t weight_scale)
{
int64_t Wgg = -1, Wgd = -1;
int64_t Wmg = -1, Wme = -1, Wmd = -1;
int64_t Wed = -1, Wee = -1;
const char *casename;
... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 118,000,785,672,084,840,000,000,000,000,000,000,000 | 295 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static int channel_wait_eof(LIBSSH2_CHANNEL *channel)
{
LIBSSH2_SESSION *session = channel->session;
int rc;
if(channel->wait_eof_state == libssh2_NB_state_idle) {
_libssh2_debug(session, LIBSSH2_TRACE_CONN,
"Awaiting EOF for channel %lu/%lu", channel->local.id,
... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 6,757,862,307,331,965,000,000,000,000,000,000,000 | 42 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
const std::string& name() const override { return name_; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 213,085,046,386,306,330,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> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.