func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
_binder_node_inner_unlock(struct binder_node *node, int line)
{
struct binder_proc *proc = node->proc;
binder_debug(BINDER_DEBUG_SPINLOCKS,
"%s: line=%d\n", __func__, line);
if (proc)
binder_inner_proc_unlock(proc);
spin_unlock(&node->lock);
} | 0 | [
"CWE-416"
] | linux | 7bada55ab50697861eee6bb7d60b41e68a961a9c | 310,272,206,304,631,100,000,000,000,000,000,000,000 | 10 | binder: fix race that allows malicious free of live buffer
Malicious code can attempt to free buffers using the BC_FREE_BUFFER
ioctl to binder. There are protections against a user freeing a buffer
while in use by the kernel, however there was a window where
BC_FREE_BUFFER could be used to free a recently allocated bu... |
Supports_Condition_Obj Parser::parse_supports_condition()
{
lex < css_whitespace >();
Supports_Condition_Obj cond;
if ((cond = parse_supports_negation())) return cond;
if ((cond = parse_supports_operator())) return cond;
if ((cond = parse_supports_interpolation())) return cond;
return cond;
... | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 326,861,699,878,517,700,000,000,000,000,000,000,000 | 9 | 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 |
_tiffSizeProc(thandle_t fd)
{
_TIFF_stat_s sb;
return (toff_t) (_TIFF_fstat_f((int) fd, &sb) < 0 ? 0 : sb.st_size);
} | 0 | [
"CWE-119"
] | libtiff | d60332057b9575ada4f264489582b13e30137be1 | 68,293,716,151,860,160,000,000,000,000,000,000,000 | 5 | * libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc()
* libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero
initialize tif_rawdata.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 |
void vb2_ops_wait_prepare(struct vb2_queue *vq)
{
mutex_unlock(vq->lock);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab | 179,852,008,732,189,960,000,000,000,000,000,000,000 | 4 | [media] videobuf2-v4l2: Verify planes array in buffer dequeueing
When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer
which will be dequeued is not known until the buffer has been removed from
the queue. The number of planes is specific to a buffer, not to the queue.
This does lead to the situat... |
static inline struct sctp_chunk *sctp_outq_dequeue_data(struct sctp_outq *q)
{
struct sctp_chunk *ch = NULL;
if (!list_empty(&q->out_chunk_list)) {
struct list_head *entry = q->out_chunk_list.next;
ch = list_entry(entry, struct sctp_chunk, list);
list_del_init(entry);
q->out_qlen -= ch->skb->len;
}
return... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 38,422,870,981,804,115,000,000,000,000,000,000,000 | 13 | 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.
... |
bool check_file(int fd_in, int fd_out, uint32_t max_file_size, bool force_zlib0,
bool is_embedded_jpeg, Sirikata::Array1d<uint8_t, 2> fileid, bool is_socket)
{
IOUtil::FileReader * reader = IOUtil::BindFdToReader(fd_in, max_file_size, is_socket);
if (!reader) {
custom_exit(ExitCode::FILE... | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 294,143,340,188,256,660,000,000,000,000,000,000,000 | 63 | fix #111 |
spnego_gss_display_status(
OM_uint32 *minor_status,
OM_uint32 status_value,
int status_type,
gss_OID mech_type,
OM_uint32 *message_context,
gss_buffer_t status_string)
{
OM_uint32 maj = GSS_S_COMPLETE;
int ret;
dsyslog("Entering display_status\n");
*message_context = 0;
switch (status_value) {
c... | 0 | [
"CWE-415"
] | krb5 | f18ddf5d82de0ab7591a36e465bc24225776940f | 152,728,559,874,541,880,000,000,000,000,000,000,000 | 67 | Fix double-free in SPNEGO [CVE-2014-4343]
In commit cd7d6b08 ("Verify acceptor's mech in SPNEGO initiator") the
pointer sc->internal_mech became an alias into sc->mech_set->elements,
which should be considered constant for the duration of the SPNEGO
context. So don't free it.
CVE-2014-4343:
In MIT krb5 releases 1.1... |
void imap_quote_string (char *dest, size_t dlen, const char *src)
{
_imap_quote_string (dest, dlen, src, "\"\\");
} | 0 | [
"CWE-78"
] | mutt | 185152818541f5cdc059cbff3f3e8b654fc27c1d | 31,217,761,434,436,030,000,000,000,000,000,000,000 | 4 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
co... |
recalc_width(double old, double swidth, int cwidth,
double sxx, double syy, double sxy, int is_inclusive)
{
double delta = swidth - (double)cwidth;
double rat = sxy / sxx,
coe = correlation_coefficient(sxx, syy, sxy), w, ww;
if (old < 0.)
old = 0.;
if (fabs(coe) < 1e-5)
return old;
w = rat ... | 0 | [
"CWE-119"
] | w3m | 67a3db378f5ee3047c158eae4342f7e3245a2ab1 | 98,282,213,130,701,700,000,000,000,000,000,000,000 | 39 | Fix table rowspan and colspan
Origin: https://github.com/tats/w3m/pull/19
Bug-Debian: https://github.com/tats/w3m/issues/8 |
static int hardware_enable(void *garbage)
{
int cpu = raw_smp_processor_id();
u64 phys_addr = __pa(per_cpu(vmxarea, cpu));
u64 old, test_bits;
if (read_cr4() & X86_CR4_VMXE)
return -EBUSY;
INIT_LIST_HEAD(&per_cpu(loaded_vmcss_on_cpu, cpu));
/*
* Now we can enable the vmclear operation in kdump
* since th... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 3,607,683,787,944,735,000,000,000,000,000,000,000 | 44 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
static bool __io_poll_remove_one(struct io_kiocb *req,
struct io_poll_iocb *poll)
{
bool do_complete = false;
spin_lock(&poll->head->lock);
WRITE_ONCE(poll->canceled, true);
if (!list_empty(&poll->wait.entry)) {
list_del_init(&poll->wait.entry);
do_complete = true;
}
spin_unlock(&poll->head->lock);
has... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 38,060,677,029,948,046,000,000,000,000,000,000,000 | 15 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
int llhttp__internal__c_and_flags(
llhttp__internal_t* state,
const unsigned char* p,
const unsigned char* endp) {
state->flags &= -9;
return 0;
} | 0 | [
"CWE-444"
] | node | 641f786bb1a1f6eb1ff8750782ed939780f2b31a | 300,995,504,979,750,870,000,000,000,000,000,000,000 | 7 | http: unset `F_CHUNKED` on new `Transfer-Encoding`
Duplicate `Transfer-Encoding` header should be a treated as a single,
but with original header values concatenated with a comma separator. In
the light of this, even if the past `Transfer-Encoding` ended with
`chunked`, we should be not let the `F_CHUNKED` to leak int... |
nfs4_layoutget_prepare(struct rpc_task *task, void *calldata)
{
struct nfs4_layoutget *lgp = calldata;
struct nfs_server *server = NFS_SERVER(lgp->args.inode);
dprintk("--> %s\n", __func__);
/* Note the is a race here, where a CB_LAYOUTRECALL can come in
* right now covering the LAYOUTGET we are about to send.
... | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 196,609,997,702,674,000,000,000,000,000,000,000,000 | 22 | NFSv4: include bitmap in nfsv4 get acl data
The NFSv4 bitmap size is unbounded: a server can return an arbitrary
sized bitmap in an FATTR4_WORD0_ACL request. Replace using the
nfs4_fattr_bitmap_maxsz as a guess to the maximum bitmask returned by a server
with the inclusion of the bitmap (xdr length plus bitmasks) and... |
GF_Err iSFM_box_dump(GF_Box *a, FILE * trace)
{
GF_ISMASampleFormatBox *p;
const char *name = (a->type==GF_ISOM_BOX_TYPE_ISFM) ? "ISMASampleFormat" : "OMADRMAUFormatBox";
p = (GF_ISMASampleFormatBox *)a;
gf_isom_box_dump_start(a, name, trace);
gf_fprintf(trace, "selective_encryption=\"%d\" key_indicator_length=\"%... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 261,182,894,445,739,230,000,000,000,000,000,000,000 | 10 | fixed #2138 |
static int is_valid_timerange(const struct icaltimetype start,
const struct icaltimetype end)
{
return (icaltime_is_valid_time(start) && icaltime_is_valid_time(end) &&
!icaltime_is_date(start) && !icaltime_is_date(end) &&
(icaltime_is_utc(start) || start.zone) &&
(icaltime_is_utc(end) || end... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 154,075,087,565,581,360,000,000,000,000,000,000,000 | 8 | HTTP: don't overrun buffer when parsing strings with sscanf() |
MagickExport Image *ComplexImages(const Image *images,const ComplexOperator op,
ExceptionInfo *exception)
{
#define ComplexImageTag "Complex/Image"
CacheView
*Ai_view,
*Ar_view,
*Bi_view,
*Br_view,
*Ci_view,
*Cr_view;
const char
*artifact;
const Image
*Ai_image,
*Ar_image... | 1 | [
"CWE-119",
"CWE-787"
] | ImageMagick6 | 19651f3db63fa1511ed83a348c4c82fa553f8d01 | 6,212,384,795,446,420,000,000,000,000,000,000,000 | 296 | https://github.com/ImageMagick/ImageMagick/issues/1595 |
directory_caches_dir_info(or_options_t *options)
{
if (options->BridgeRelay || options->DirPort)
return 1;
if (!server_mode(options) || !advertised_server_mode())
return 0;
/* We need an up-to-date view of network info if we're going to try to
* block exit attempts from unknown relays. */
return ! ro... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 15,656,803,109,256,046,000,000,000,000,000,000,000 | 11 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
static JSValue js_bs_get_u32_le(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
GET_JSBS
if (!bs) return GF_JS_EXCEPTION(ctx);
return JS_NewInt32(ctx, gf_bs_read_u32_le(bs) );
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 63,011,686,321,122,310,000,000,000,000,000,000,000 | 6 | fixed #2138 |
TPMT_PUBLIC_PARMS_Unmarshal(TPMT_PUBLIC_PARMS *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
if (rc == TPM_RC_SUCCESS) {
rc = TPMI_ALG_PUBLIC_Unmarshal(&target->type, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
rc = TPMU_PUBLIC_PARMS_Unmarshal(&target->parameters, buffer, size, t... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 259,510,294,539,621,900,000,000,000,000,000,000,000 | 12 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
receive_filter(E1000State *s, const uint8_t *buf, int size)
{
static const uint8_t bcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
static const int mta_shift[] = {4, 3, 2, 0};
uint32_t f, rctl = s->mac_reg[RCTL], ra[2], *rp;
if (is_vlan_packet(s, buf) && vlan_rx_filter_enabled(s)) {
uint16_t vi... | 0 | [
"CWE-120"
] | qemu | b0d9ffcd0251161c7c92f94804dcf599dfa3edeb | 1,329,289,422,941,440,000,000,000,000,000,000,000 | 51 | e1000: Discard packets that are too long if !SBP and !LPE
The e1000_receive function for the e1000 needs to discard packets longer than
1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
this behavior and allocates memory based on this assumption.
Signed-off-by: Michael Contreras <michael@inet... |
static void sst_reject_queries(bool close_conn) {
WSREP_INFO("Rejecting client queries for the duration of SST.");
if (true == close_conn) wsrep_close_client_connections(false, false);
} | 0 | [
"CWE-77"
] | percona-xtradb-cluster | 8a338477c9184dd0e03a5c661e9c3a79456de8a4 | 88,736,035,798,273,860,000,000,000,000,000,000,000 | 4 | PXC-3392: Donor uses invalid SST methods |
static int command_has_target(const char *cmd, const char *target)
{
const char *p;
int len;
/* just assume the command is in form "<command> <target> <data>" */
p = strchr(cmd, ' ');
if (p == NULL) return FALSE;
p++;
len = strlen(target);
return strncmp(p, target, len) == 0 && p[l... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 217,911,130,238,944,800,000,000,000,000,000,000,000 | 13 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
libssh2_session_method_pref(LIBSSH2_SESSION * session, int method_type,
const char *prefs)
{
char **prefvar, *s, *newprefs;
int prefs_len = strlen(prefs);
const LIBSSH2_COMMON_METHOD **mlist;
switch (method_type) {
case LIBSSH2_METHOD_KEX:
prefvar = &session->kex... | 0 | [
"CWE-200"
] | libssh2 | ca5222ea819cc5ed797860070b4c6c1aeeb28420 | 331,162,317,109,042,620,000,000,000,000,000,000,000 | 106 | diffie_hellman_sha256: convert bytes to bits
As otherwise we get far too small numbers.
Reported-by: Andreas Schneider
CVE-2016-0787 |
static int deliver(message_data_t *msg)
{
int n, r = 0, myrights;
char *rcpt = NULL, *local_rcpt = NULL, *server, *acl;
unsigned long uid;
struct body *body = NULL;
struct dest *dlist = NULL;
duplicate_key_t dkey = {msg->id, NULL, msg->date};
/* check ACLs of all mailboxes */
for (n = 0... | 0 | [
"CWE-287"
] | cyrus-imapd | 77903669e04c9788460561dd0560b9c916519594 | 208,470,245,579,369,040,000,000,000,000,000,000,000 | 96 | Secunia SA46093 - make sure nntp authentication completes
Discovered by Stefan Cornelius, Secunia Research
The vulnerability is caused due to the access restriction for certain
commands only checking whether or not variable "nntp_userid" is non-NULL,
without performing additional checks to verify that a complete, suc... |
static int rose_parse_ccitt(unsigned char *p, struct rose_facilities_struct *facilities, int len)
{
unsigned char l, n = 0;
char callsign[11];
do {
switch (*p & 0xC0) {
case 0x00:
if (len < 2)
return -1;
p += 2;
n += 2;
len -= 2;
break;
case 0x40:
if (len < 3)
return -1;
p ... | 0 | [
"CWE-20"
] | linux | e0bccd315db0c2f919e7fcf9cb60db21d9986f52 | 323,853,761,970,714,380,000,000,000,000,000,000,000 | 61 | rose: Add length checks to CALL_REQUEST parsing
Define some constant offsets for CALL_REQUEST based on the description
at <http://www.techfest.com/networking/wan/x25plp.htm> and the
definition of ROSE as using 10-digit (5-byte) addresses. Use them
consistently. Validate all implicit and explicit facilities lengths.
... |
addLstn(ptcpsrv_t *pSrv, int sock, int isIPv6)
{
DEFiRet;
ptcplstn_t *pLstn = NULL;
uchar statname[64];
CHKmalloc(pLstn = calloc(1, sizeof(ptcplstn_t)));
pLstn->pSrv = pSrv;
pLstn->bSuppOctetFram = pSrv->bSuppOctetFram;
pLstn->bSPFramingFix = pSrv->bSPFramingFix;
pLstn->sock = sock;
/* support statistics gath... | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 194,896,588,869,621,180,000,000,000,000,000,000,000 | 68 | net bugfix: potential buffer overrun |
static void *err_unwind(lua_State *L, void *stopcf, int errcode)
{
TValue *frame = L->base-1;
void *cf = L->cframe;
while (cf) {
int32_t nres = cframe_nres(cframe_raw(cf));
if (nres < 0) { /* C frame without Lua frame? */
TValue *top = restorestack(L, -nres);
if (frame < top) { /* Frame reac... | 0 | [
"CWE-125"
] | LuaJIT | 53f82e6e2e858a0a62fd1a2ff47e9866693382e6 | 333,252,479,154,921,660,000,000,000,000,000,000,000 | 96 | Fix frame traversal for __gc handler frames.
Reported by Changochen. |
static MagickBooleanType ExportLongPixel(const Image *image,
const RectangleInfo *roi,const char *magick_restrict map,
const QuantumType *quantum_map,void *pixels,ExceptionInfo *exception)
{
register const Quantum
*magick_restrict p;
register ssize_t
x;
register unsigned int
*magick_restrict q;
... | 0 | [
"CWE-190"
] | ImageMagick | 406da3af9e09649cda152663c179902edf5ab3ac | 137,435,285,267,040,600,000,000,000,000,000,000,000 | 206 | https://github.com/ImageMagick/ImageMagick/issues/1732 |
virtual bool check_table_name_processor(void *arg) { return false; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 251,782,971,379,206,800,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
xmlAutomataSetFlags(xmlAutomataPtr am, int flags) {
if (am == NULL)
return;
am->flags |= flags;
} | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 248,887,177,695,402,830,000,000,000,000,000,000,000 | 5 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
void pdin_box_del(GF_Box *s)
{
GF_ProgressiveDownloadBox *ptr = (GF_ProgressiveDownloadBox*)s;
if (ptr == NULL) return;
if (ptr->rates) gf_free(ptr->rates);
if (ptr->times) gf_free(ptr->times);
gf_free(ptr); | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 122,745,427,925,651,700,000,000,000,000,000,000,000 | 8 | fixed #1587 |
static void dense_rankValueFunc(sqlite3_context *pCtx){
struct CallCount *p;
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
if( p ){
if( p->nStep ){
p->nValue++;
p->nStep = 0;
}
sqlite3_result_int64(pCtx, p->nValue);
}
} | 0 | [
"CWE-476"
] | sqlite | 75e95e1fcd52d3ec8282edb75ac8cd0814095d54 | 337,317,856,358,125,500,000,000,000,000,000,000,000 | 11 | When processing constant integer values in ORDER BY clauses of window
definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable
the constant value to avoid an invalid pointer dereference if the expression
is ever duplicated. This fixes a crash report from Yongheng and Rui.
FossilOrigin-Name: 1ca0bd982ab11... |
int SSL_CTX_set_generate_session_id(SSL_CTX *ctx, GEN_SESSION_CB cb)
{
CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX);
ctx->generate_session_id = cb;
CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX);
return 1;
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 46,408,180,464,924,610,000,000,000,000,000,000,000 | 7 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
qf_open_new_file_win(qf_info_T *ll_ref)
{
int flags;
flags = WSP_ABOVE;
if (ll_ref != NULL)
flags |= WSP_NEWLOC;
if (win_split(0, flags) == FAIL)
return FAIL; // not enough room for window
p_swb = empty_option; // don't split again
swb_flags = 0;
RESET_BINDING(curwin);
if (ll_ref !=... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 125,957,231,157,737,770,000,000,000,000,000,000,000 | 18 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
int imap_read_literal (FILE* fp, IMAP_DATA* idata, unsigned int bytes, progress_t* pbar)
{
unsigned int pos;
char c;
int r = 0;
dprint (2, (debugfile, "imap_read_literal: reading %ld bytes\n", bytes));
for (pos = 0; pos < bytes; pos++)
{
if (mutt_socket_readchar (idata->conn, &c) != 1)
{
dp... | 0 | [
"CWE-287"
] | mutt | 04b06aaa3e0cc0022b9b01dbca2863756ebbf59a | 282,153,656,563,509,680,000,000,000,000,000,000,000 | 44 | Ensure IMAP connection is closed after a connection error.
During connection, if the server provided an illegal initial response,
Mutt "bailed", but did not actually close the connection. The calling
code unfortunately relied on the connection status to decide to
continue with authentication, instead of checking the ... |
void _paint(const bool wait_expose=true) {
if (_is_closed || !_image) return;
Display *const dpy = cimg::X11_attr().display;
if (wait_expose) { // Send an expose event sticked to display window to force repaint.
XEvent event;
event.xexpose.type = Expose;
event.xexpose.seri... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 274,903,193,181,654,400,000,000,000,000,000,000,000 | 26 | Fix other issues in 'CImg<T>::load_bmp()'. |
XML_GetBuffer(XML_Parser parser, int len) {
if (parser == NULL)
return NULL;
if (len < 0) {
parser->m_errorCode = XML_ERROR_NO_MEMORY;
return NULL;
}
switch (parser->m_parsingStatus.parsing) {
case XML_SUSPENDED:
parser->m_errorCode = XML_ERROR_SUSPENDED;
return NULL;
case XML_FINISHED:
... | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 207,221,731,587,242,100,000,000,000,000,000,000,000 | 116 | xmlparse.c: Deny internal entities closing the doctype |
static inline void eventpoll_init_file(struct file *file) {} | 1 | [] | linux-2.6 | 28d82dc1c4edbc352129f97f4ca22624d1fe61de | 75,050,134,598,910,120,000,000,000,000,000,000,000 | 1 | epoll: limit paths
The current epoll code can be tickled to run basically indefinitely in
both loop detection path check (on ep_insert()), and in the wakeup paths.
The programs that tickle this behavior set up deeply linked networks of
epoll file descriptors that cause the epoll algorithms to traverse them
indefinitel... |
parseUserInfo(DUL_USERINFO * userInfo,
unsigned char *buf,
unsigned long *itemLength,
unsigned char typeRQorAC,
unsigned long availData /* bytes left for in this PDU */)
{
unsigned short userLength;
unsigned long length;
OFCondition cond = EC_Normal;
... | 0 | [
"CWE-415",
"CWE-703",
"CWE-401"
] | dcmtk | a9697dfeb672b0b9412c00c7d36d801e27ec85cb | 84,206,911,718,087,830,000,000,000,000,000,000,000 | 149 | Fixed poss. NULL pointer dereference/double free.
Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches. |
static int list_addresses(void *rock, struct carddav_data *cdata)
{
smtp_envelope_t *sm_env = rock;
int i;
/* XXX Lookup up emails for vcard */
if (!cdata->emails) return 0;
for (i = 0; i < strarray_size(cdata->emails); i++) {
/* Find preferred address */
smtp_envelope_add_rcpt(sm_... | 0 | [
"CWE-269"
] | cyrus-imapd | 673ebd96e2efbb8895d08648983377262f35b3f7 | 204,142,057,042,042,020,000,000,000,000,000,000,000 | 14 | lmtp_sieve: don't create mailbox with admin for sieve autocreate |
int transform_save(struct augeas *aug, struct tree *xfm,
const char *path, struct tree *tree) {
int fd;
FILE *fp = NULL, *augorig_canon_fp = NULL;
char *augtemp = NULL, *augnew = NULL, *augorig = NULL, *augsave = NULL;
char *augorig_canon = NULL, *augdest = NULL;
int augorig_e... | 1 | [] | augeas | f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26 | 159,049,098,871,465,870,000,000,000,000,000,000,000 | 219 | Fix umask handling when creating new files
* src/transform.c (transform_save): faulty umask arithmetic would cause
overly-open file modes when the umask contains "7", as the umask was
incorrectly subtracted from the target file mode
Fixes CVE-2013-6412, RHBZ#1034261 |
static int async_set_registers(rtl8150_t *dev, u16 indx, u16 size, u16 reg)
{
int res = -ENOMEM;
struct urb *async_urb;
struct async_req *req;
req = kmalloc(sizeof(struct async_req), GFP_ATOMIC);
if (req == NULL)
return res;
async_urb = usb_alloc_urb(0, GFP_ATOMIC);
if (async_urb == NULL) {
kfree(req);
re... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7926aff5c57b577ab0f43364ff0c59d968f6a414 | 122,796,317,837,373,820,000,000,000,000,000,000,000 | 31 | rtl8150: Use heap buffers for all register access
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net... |
eexec_line(unsigned char *line, int line_len)
{
int cs_start_len = strlen(cs_start);
int pos;
int first_space;
int digits;
int cut_newline = 0;
/* append this data to the end of `save' if necessary */
if (save_len) {
append_save(line, line_len);
line = save;
line_len = save_len;
... | 0 | [
"CWE-119",
"CWE-787"
] | t1utils | 6b9d1aafcb61a3663c883663eb19ccdbfcde8d33 | 16,138,753,454,004,444,000,000,000,000,000,000,000 | 108 | Security fixes.
- Don't overflow the small cs_start buffer (reported by Niels
Thykier via the debian tracker (Jakub Wilk), found with a
fuzzer ("American fuzzy lop")).
- Cast arguments to <ctype.h> functions to unsigned char. |
static inline __maybe_unused int h2_get_frame_hdr(struct buffer *b, struct h2_fh *h)
{
int ret;
ret = h2_peek_frame_hdr(b, 0, h);
if (ret > 0)
h2_skip_frame_hdr(b);
return ret;
} | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 186,910,828,348,157,400,000,000,000,000,000,000,000 | 9 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
int sisusb_setidxregand(struct sisusb_usb_data *sisusb, int port,
u8 idx, u8 myand)
{
return sisusb_setidxregandor(sisusb, port, idx, myand, 0x00);
} | 0 | [
"CWE-476"
] | linux | 9a5729f68d3a82786aea110b1bfe610be318f80a | 248,629,612,200,970,540,000,000,000,000,000,000,000 | 5 | USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must
be set before the error is logged.
v2: fix that minor is not available before registration
Signed-off-by: oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail... |
int dataobjectRead(struct READER *reader, struct DATAOBJECT *dataobject,
char *name) {
uint64_t size_of_chunk, end_of_messages;
int err;
char buf[5];
memset(dataobject, 0, sizeof(*dataobject));
dataobject->address = ftell(reader->fhd);
dataobject->name = name;
/* read signature */
i... | 0 | [
"CWE-787"
] | libmysofa | 890400ebd092c574707d0c132124f8ff047e20e1 | 88,123,513,461,695,700,000,000,000,000,000,000,000 | 83 | Fix for issue 163 |
struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align)
{
unsigned long mask, offset, pfn, start = 0;
unsigned long bitmap_maxno, bitmap_no, bitmap_count;
struct page *page = NULL;
int ret;
if (!cma || !cma->count)
return NULL;
pr_debug("%s(cma %p, count %zu, align %d)\n", __func__, (void *)... | 0 | [
"CWE-682"
] | linux | 67a2e213e7e937c41c52ab5bc46bf3f4de469f6e | 43,235,683,666,384,010,000,000,000,000,000,000,000 | 62 | mm: cma: fix incorrect type conversion for size during dma allocation
This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.
show_stack+0x10/0x1c
dump_stack+0x74/0xc8
kasan_report_error+0x2b0/0x408
kasan_report+0x34/0x40
__asan_storeN... |
Status RoleGraph::addPrivilegesToRole(const RoleName& role,
const PrivilegeVector& privilegesToAdd) {
if (!roleExists(role)) {
return Status(ErrorCodes::RoleNotFound,
mongoutils::str::stream() << "Role: " << role.getFullName()
... | 0 | [
"CWE-863"
] | mongo | fb87cc88ecb5d300f14cda7bc238d7d5132118f5 | 191,728,137,679,484,300,000,000,000,000,000,000,000 | 19 | SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
(cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b)
(cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36) |
k5_asn1_decode_bytestring(const uint8_t *asn1, size_t len,
uint8_t **str_out, size_t *len_out)
{
uint8_t *str;
*str_out = NULL;
*len_out = 0;
if (len == 0)
return 0;
str = malloc(len);
if (str == NULL)
return ENOMEM;
memcpy(str, asn1, len);
*str... | 0 | [
"CWE-674",
"CWE-787"
] | krb5 | 57415dda6cf04e73ffc3723be518eddfae599bfd | 185,646,726,269,964,740,000,000,000,000,000,000,000 | 17 | Add recursion limit for ASN.1 indefinite lengths
The libkrb5 ASN.1 decoder supports BER indefinite lengths. It
computes the tag length using recursion; the lack of a recursion limit
allows an attacker to overrun the stack and cause the process to
crash. Reported by Demi Obenour.
CVE-2020-28196:
In MIT krb5 release... |
static inline void blkcipher_unmap_dst(struct blkcipher_walk *walk)
{
scatterwalk_unmap(walk->dst.virt.addr);
} | 0 | [
"CWE-310"
] | linux | 9a5467bf7b6e9e02ec9c3da4e23747c05faeaac6 | 300,337,938,928,219,670,000,000,000,000,000,000,000 | 4 | crypto: user - fix info leaks in report API
Three errors resulting in kernel memory disclosure:
1/ The structures used for the netlink based crypto algorithm report API
are located on the stack. As snprintf() does not fill the remainder of
the buffer with null bytes, those stack bytes will be disclosed to users
of th... |
int Field_real::store_time_dec(const MYSQL_TIME *ltime, uint dec_arg)
{
return store(TIME_to_double(ltime));
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 328,375,524,052,453,780,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
f_tan(typval_T *argvars, typval_T *rettv)
{
float_T f = 0.0;
rettv->v_type = VAR_FLOAT;
if (get_float_arg(argvars, &f) == OK)
rettv->vval.v_float = tan(f);
else
rettv->vval.v_float = 0.0;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 217,244,050,090,920,470,000,000,000,000,000,000,000 | 10 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
FLAC__bool FLAC__bitreader_read_raw_int32(FLAC__BitReader *br, FLAC__int32 *val, uint32_t bits)
{
FLAC__uint32 uval, mask;
/* OPT: inline raw uint32 code here, or make into a macro if possible in the .h file */
if (bits < 1 || ! FLAC__bitreader_read_raw_uint32(br, &uval, bits))
return false;
/* sign-extend *val a... | 0 | [
"CWE-125"
] | flac | 2e7931c27eb15e387da440a37f12437e35b22dd4 | 202,651,658,424,088,360,000,000,000,000,000,000,000 | 12 | libFLAC/bitreader.c: Fix out-of-bounds read
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069
Testcase: fuzzer_decoder-5670265022840832 |
int TABLE_SHARE::init_from_sql_statement_string(THD *thd, bool write,
const char *sql, size_t sql_length)
{
sql_mode_t saved_mode= thd->variables.sql_mode;
CHARSET_INFO *old_cs= thd->variables.character_set_client;
Parser_state parser_state;
bool error;
char *sql_copy;
... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 17,976,947,879,540,850,000,000,000,000,000,000,000 | 93 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
ZrtpPacketHello::~ZrtpPacketHello() {
DEBUGOUT((fprintf(stdout, "Deleting Hello packet: alloc: %x\n", allocated)));
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 94,580,682,285,546,890,000,000,000,000,000,000,000 | 3 | 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 |
void blockingGenericZpopCommand(client *c, int where) {
robj *o;
mstime_t timeout;
int j;
if (getTimeoutFromObjectOrReply(c,c->argv[c->argc-1],&timeout,UNIT_SECONDS)
!= C_OK) return;
for (j = 1; j < c->argc-1; j++) {
o = lookupKeyWrite(c->db,c->argv[j]);
if (o != NULL) {
... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 257,307,852,433,758,700,000,000,000,000,000,000,000 | 38 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
static inline int add_post_vars(zval *arr, post_var_data_t *vars, zend_bool eof)
{
uint64_t max_vars = PG(max_input_vars);
vars->ptr = ZSTR_VAL(vars->str.s);
vars->end = ZSTR_VAL(vars->str.s) + ZSTR_LEN(vars->str.s);
while (add_post_var(arr, vars, eof)) {
if (++vars->cnt > max_vars) {
php_error_docref(NULL, E... | 0 | [
"CWE-400",
"CWE-703"
] | php-src | a15bffd105ac28fd0dd9b596632dbf035238fda3 | 62,194,652,883,454,910,000,000,000,000,000,000,000 | 21 | Fix bug #73807 |
int main(int argc, char * * argv) {
// THIS LINE WILL LEAD TO A COMPILE ERROR. THIS TOOL SHOULD NOT BE USED, SEE README.
try {
ArgParser argp(argc, argv);
bool bHelp = false;
bool bModeBenchmark = false;
bool bModeZeros = false;
bool bModeLetters = false;
bool bModeNumbers = false;
std::string strModeL... | 0 | [
"CWE-703"
] | profanity | 69ff010c14ff80ec14246772db6a245aa59e6689 | 277,154,383,282,432,840,000,000,000,000,000,000,000 | 219 | [FIX] pritive key seed . |
static int l2cap_mode_supported(__u8 mode, __u32 feat_mask)
{
u32 local_feat_mask = l2cap_feat_mask;
if (enable_ertm)
local_feat_mask |= L2CAP_FEAT_ERTM;
switch (mode) {
case L2CAP_MODE_ERTM:
return L2CAP_FEAT_ERTM & feat_mask & local_feat_mask;
case L2CAP_MODE_STREAMING:
return L2CAP_FEAT_STREAMING & feat_... | 0 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | linux | f2fcfcd670257236ebf2088bbdf26f6a8ef459fe | 12,167,831,982,110,467,000,000,000,000,000,000,000 | 15 | Bluetooth: Add configuration support for ERTM and Streaming mode
Add support to config_req and config_rsp to configure ERTM and Streaming
mode. If the remote device specifies ERTM or Streaming mode, then the
same mode is proposed. Otherwise ERTM or Basic mode is used. And in case
of a state 2 device, the remote device... |
xmlSchemaCheckCOSDerivedOK(xmlSchemaAbstractCtxtPtr actxt,
xmlSchemaTypePtr type,
xmlSchemaTypePtr baseType,
int set)
{
if (WXS_IS_SIMPLE(type))
return (xmlSchemaCheckCOSSTDerivedOK(actxt, type, baseType, set));
else
return (xmlSchemaCheckCOSCTDerivedOK(actxt, type, baseType, set));
} | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 107,663,324,112,572,630,000,000,000,000,000,000,000 | 10 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
xmlXPathNodeSetFreeNs(xmlNsPtr ns) {
if ((ns == NULL) || (ns->type != XML_NAMESPACE_DECL))
return;
if ((ns->next != NULL) && (ns->next->type != XML_NAMESPACE_DECL)) {
if (ns->href != NULL)
xmlFree((xmlChar *)ns->href);
if (ns->prefix != NULL)
xmlFree((xmlChar *)ns->prefix);
xmlFree(ns);
}
} | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 155,602,094,981,241,740,000,000,000,000,000,000,000 | 12 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
void recv_additional_file_list(int f)
{
struct file_list *flist;
int ndx = read_ndx(f);
if (ndx == NDX_FLIST_EOF) {
flist_eof = 1;
if (DEBUG_GTE(FLIST, 3))
rprintf(FINFO, "[%s] flist_eof=1\n", who_am_i());
change_local_filter_dir(NULL, 0, 0);
} else {
ndx = NDX_FLIST_OFFSET - ndx;
if (ndx < 0 || ndx >=... | 1 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 173,820,219,483,450,200,000,000,000,000,000,000,000 | 27 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
TEST_F(OptimizePipeline, MetaMatchThenCountPushedDown) {
auto pipeline = Pipeline::parse(
makeVector(fromjson("{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: "
"'myMeta', bucketMaxSpanSeconds: 3600}}"),
fromjson("{$match: {myMeta: {$eq: '... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 311,129,068,157,349,540,000,000,000,000,000,000,000 | 22 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
flatpak_dir_check_parental_controls (FlatpakDir *self,
const char *ref,
GBytes *deploy_data,
GCancellable *cancellable,
GError **error)
{
#ifdef HAVE_LI... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 42,570,258,814,105,630,000,000,000,000,000,000,000 | 137 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
void lftp_ssl_gnutls::verify_last_cert(gnutls_x509_crt_t crt)
{
unsigned int crt_status;
int ret;
time_t now = SMTask::now;
size_t name_size;
char name[256];
/* Print information about the certificates to
* be checked.
*/
name_size = sizeof(name);
gnutls_x509_crt_get_dn(crt, name, &name... | 0 | [
"CWE-310"
] | lftp | 6357bed2583171b7515af6bb6585cf56d2117e3f | 31,539,707,044,369,980,000,000,000,000,000,000,000 | 52 | use hostmatch function from latest curl (addresses CVE-2014-0139) |
decode_bitmasks (guchar *buf,
struct bmp_progressive_state *State,
GError **error)
{
State->a_mask = State->a_shift = State->a_bits = 0;
State->r_mask = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
buf += 4;
State->g_mask = buf[0] | (buf[1] << 8) | (buf[2] << 16) | (buf[3] << 24);
buf +... | 0 | [] | gdk-pixbuf | 779429ce34e439c01d257444fe9d6739e72a2024 | 206,444,928,790,271,800,000,000,000,000,000,000,000 | 74 | 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 |
DEFUN(nextMk, NEXT_MARK, "Go to the next mark")
{
Line *l;
int i;
if (!use_mark)
return;
if (Currentbuf->firstLine == NULL)
return;
i = Currentbuf->pos + 1;
l = Currentbuf->currentLine;
if (i >= l->len) {
i = 0;
l = l->next;
}
while (l != NULL) {
for (; i < l->len; i++) {
... | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 141,684,082,555,476,770,000,000,000,000,000,000,000 | 31 | Make temporary directory safely when ~/.w3m is unwritable |
static int cdrom_get_next_writable(struct cdrom_device_info *cdi,
long *next_writable)
{
disc_information di;
track_information ti;
__u16 last_track;
int ret, ti_size;
if (!CDROM_CAN(CDC_GENERIC_PACKET))
goto use_last_written;
ret = cdrom_get_disc_info(cdi, &di);
if (ret < 0 || ret < offsetof(typeof(d... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 135,556,422,714,520,690,000,000,000,000,000,000,000 | 49 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
static DWORD WINAPI parallel_thread_func(LPVOID arg)
{
IRP* irp;
wMessage message;
PARALLEL_DEVICE* parallel = (PARALLEL_DEVICE*)arg;
UINT error = CHANNEL_RC_OK;
while (1)
{
if (!MessageQueue_Wait(parallel->queue))
{
WLog_ERR(TAG, "MessageQueue_Wait failed!");
error = ERROR_INTERNAL_ERROR;
break;
... | 0 | [
"CWE-415",
"CWE-125"
] | FreeRDP | 795842f4096501fcefc1a7f535ccc8132feb31d7 | 175,202,737,362,833,460,000,000,000,000,000,000,000 | 41 | Fixed oob read in parallel_process_irp_create |
static int dyldcache_io_read(RIO *io, RIODesc *fd, ut8 *buf, int count) {
r_return_val_if_fail (io, -1);
RCore *core = (RCore*) io->corebind.core;
if (!core || !core->bin || !core->bin->binfiles) {
return -1;
}
RDyldCache *cache = NULL;
RListIter *iter;
RBinFile *bf;
r_list_foreach (core->bin->binfiles, ite... | 0 | [
"CWE-787"
] | radare2 | c84b7232626badd075caf3ae29661b609164bac6 | 268,563,432,535,018,330,000,000,000,000,000,000,000 | 96 | Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf |
static void parse_prefix(IRC_SERVER_REC *server, const char *sptr)
{
const char *eptr;
if (*sptr++ != '(')
return; /* Unknown prefix format */
eptr = strchr(sptr, ')');
if (eptr == NULL)
return;
eptr++;
while (*sptr != '\0' && *eptr != '\0' && *sptr != ')' && *eptr != ' ') {
server->modes[(int)(unsigned ... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 57,017,108,761,479,800,000,000,000,000,000,000,000 | 20 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
int LibRaw_bigfile_datastream:: seek(INT64 o, int whence)
{
LR_BF_CHK();
#if defined (WIN32)
#ifdef WIN32SECURECALLS
return substream?substream->seek(o,whence):_fseeki64(f,o,whence);
#else
return substream?substream->seek(o,whence):fseek(f,(long)o,whence);
#endif
#else
return substream?substream-... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 39,001,088,327,380,175,000,000,000,000,000,000,000 | 13 | cumulated data checks patch |
static void _sync_messages_kill(kill_job_msg_t *req)
{
int host_cnt, host_inx;
char *host;
hostset_t hosts;
int epilog_msg_time;
hosts = hostset_create(req->nodes);
host_cnt = hostset_count(hosts);
if (host_cnt <= 64)
goto fini;
if (conf->hostname == NULL)
goto fini; /* should never happen */
for (host_i... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 202,024,715,818,134,000,000,000,000,000,000,000,000 | 29 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
convert_schema_priv_string(text *priv_type_text)
{
static const priv_map schema_priv_map[] = {
{"CREATE", ACL_CREATE},
{"CREATE WITH GRANT OPTION", ACL_GRANT_OPTION_FOR(ACL_CREATE)},
{"USAGE", ACL_USAGE},
{"USAGE WITH GRANT OPTION", ACL_GRANT_OPTION_FOR(ACL_USAGE)},
{NULL, 0}
};
return convert_any_priv_st... | 0 | [
"CWE-264"
] | postgres | fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0 | 29,329,000,435,064,740,000,000,000,000,000,000,000 | 12 | Shore up ADMIN OPTION restrictions.
Granting a role without ADMIN OPTION is supposed to prevent the grantee
from adding or removing members from the granted role. Issuing SET ROLE
before the GRANT bypassed that, because the role itself had an implicit
right to add or remove members. Plug that hole by recognizing tha... |
std::string get_save_index_file()
{
return get_user_data_dir() + "/save_index.gz";
} | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 110,285,614,355,640,120,000,000,000,000,000,000,000 | 4 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
static Principal wildcard() {
return Principal(Wildcard);
} | 0 | [
"CWE-617"
] | ceph | b3118cabb8060a8cc6a01c4e8264cb18e7b1745a | 203,635,165,687,025,150,000,000,000,000,000,000,000 | 3 | rgw: Remove assertions in IAM Policy
A couple of them could be triggered by user input.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com> |
static int hasharray(i_ctx_t * i_ctx_p, ref *m1, gs_md5_state_t *md5)
{
int i, code;
ref ref1;
for (i=0;i < r_size(m1);i++) {
code = array_get(imemory, m1, i, &ref1);
if (code < 0)
return 0;
code = r_type(&ref1);
if (code < 0)
return code;
sw... | 0 | [] | ghostpdl | b326a71659b7837d3acde954b18bda1a6f5e9498 | 171,783,193,384,403,900,000,000,000,000,000,000,000 | 62 | Bug 699655: Properly check the return value....
...when getting a value from a dictionary |
AllowFailedVerifierImpl(const AuthFactory& factory, const JwtProviderList& providers,
const BaseVerifierImpl* parent)
: BaseVerifierImpl(parent), auth_factory_(factory), extractor_(Extractor::create(providers)) {
} | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 75,228,825,248,137,000,000,000,000,000,000,000,000 | 4 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
static bool cgm_mount_cgroup(void *hdata, const char *root, int type)
{
if (dir_exists(CGMANAGER_LOWER_SOCK))
return cgm_bind_dir(root, CGMANAGER_LOWER_SOCK);
if (dir_exists(CGMANAGER_UPPER_SOCK))
return cgm_bind_dir(root, CGMANAGER_UPPER_SOCK);
// Host doesn't have cgmanager running? Then how did we get here?
... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 231,657,812,746,937,650,000,000,000,000,000,000,000 | 9 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
static CImg<floatT> torus3d(CImgList<tf>& primitives,
const float radius1=100, const float radius2=30,
const unsigned int subdivisions1=24, const unsigned int subdivisions2=12) {
primitives.assign();
if (!subdivisions1 || !subdivisions2) re... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 95,782,989,226,014,060,000,000,000,000,000,000,000 | 29 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static bool inherit_taint(struct module *mod, struct module *owner)
{
if (!owner || !test_bit(TAINT_PROPRIETARY_MODULE, &owner->taints))
return true;
if (mod->using_gplonly_symbols) {
pr_err("%s: module using GPL-only symbols uses symbols from proprietary module %s.\n",
mod->name, owner->name);
return false... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 98,390,202,763,230,320,000,000,000,000,000,000,000 | 18 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static int follow_automount(struct path *path, struct nameidata *nd,
bool *need_mntput)
{
struct vfsmount *mnt;
int err;
if (!path->dentry->d_op || !path->dentry->d_op->d_automount)
return -EREMOTE;
/* We don't want to mount if someone's just doing a stat -
* unless they're stat'ing a directory and app... | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 96,287,292,247,155,340,000,000,000,000,000,000,000 | 69 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
void touch_file_as_user(const char *fname, mode_t mode) {
pid_t child = fork();
if (child < 0)
errExit("fork");
if (child == 0) {
// drop privileges
drop_privs(0);
int fd = open(fname, O_RDONLY|O_CREAT|O_EXCL|O_CLOEXEC, S_IRUSR | S_IWUSR);
if (fd > -1) {
int err = fchmod(fd, mode);
(void) err;
cl... | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 298,055,791,365,091,900,000,000,000,000,000,000,000 | 24 | fixing CVE-2022-31214 |
if (clients_looked_up == 0) {
/* No more clients to do */
break;
} | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 338,026,267,710,261,860,000,000,000,000,000,000,000 | 4 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
check_match(struct ipt_entry_match *m,
const char *name,
const struct ipt_ip *ip,
unsigned int hookmask,
unsigned int *i)
{
struct ipt_match *match;
int ret;
match = try_then_request_module(xt_find_match(AF_INET, m->u.user.name,
m->u.user.revision),
"ipt_%s", m->u.user.name);
if (... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 157,037,976,462,485,260,000,000,000,000,000,000,000 | 39 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
static void virtio_blk_handle_scsi(VirtIOBlockReq *req)
{
virtio_blk_req_complete(req, VIRTIO_BLK_S_UNSUPP);
} | 0 | [
"CWE-119"
] | qemu-kvm | 52c050236eaa4f0b5e1d160cd66dc18106445c4d | 197,302,913,629,342,000,000,000,000,000,000,000,000 | 4 | virtio-blk: fail unaligned requests
Like all block drivers virtio-blk should not allow small than block size
granularity access. But given that the protocol specifies a
byte unit length field we currently accept such requests, which cause
qemu to abort() in lower layers. Add checks to the main read and
write handler... |
int wc_RsaPublicKeyDerSize(RsaKey* key, int with_header)
{
int idx = 0;
int nSz, eSz, seqSz, bitStringSz, algoSz;
if (key == NULL)
return BAD_FUNC_ARG;
/* n */
#ifdef HAVE_USER_RSA
nSz = SetASNIntRSA(key->n, NULL);
#else
nSz = SetASNIntMP(&key->n, MAX_RSA_INT_SZ, NULL);
#endif
if... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 278,006,348,311,847,100,000,000,000,000,000,000,000 | 52 | OCSP: improve handling of OCSP no check extension |
void comps_rtree_unite(COMPS_RTree *rt1, COMPS_RTree *rt2) {
COMPS_HSList *tmplist, *tmp_subnodes;
COMPS_HSListItem *it;
struct Pair {
COMPS_HSList * subnodes;
char * key;
char added;
} *pair, *parent_pair;
pair = malloc(sizeof(struct Pair));
pair->subnodes = rt2->subnod... | 1 | [
"CWE-416",
"CWE-862"
] | libcomps | e3a5d056633677959ad924a51758876d415e7046 | 246,023,021,440,934,370,000,000,000,000,000,000,000 | 61 | Fix UAF in comps_objmrtree_unite function
The added field is not used at all in many places and it is probably the
left-over of some copy-paste. |
static void nf_tables_chain_destroy(struct nft_chain *chain)
{
BUG_ON(chain->use > 0);
if (chain->flags & NFT_BASE_CHAIN) {
module_put(nft_base_chain(chain)->type->owner);
free_percpu(nft_base_chain(chain)->stats);
kfree(nft_base_chain(chain));
} else {
kfree(chain);
}
} | 0 | [
"CWE-19"
] | nf | a2f18db0c68fec96631c10cad9384c196e9008ac | 11,698,525,554,962,793,000,000,000,000,000,000,000 | 12 | netfilter: nf_tables: fix flush ruleset chain dependencies
Jumping between chains doesn't mix well with flush ruleset. Rules
from a different chain and set elements may still refer to us.
[ 353.373791] ------------[ cut here ]------------
[ 353.373845] kernel BUG at net/netfilter/nf_tables_api.c:1159!
[ 353.373896... |
static struct l2cap_chan *l2cap_connect(struct l2cap_conn *conn,
struct l2cap_cmd_hdr *cmd,
u8 *data, u8 rsp_code, u8 amp_id)
{
struct l2cap_conn_req *req = (struct l2cap_conn_req *) data;
struct l2cap_conn_rsp rsp;
struct l2cap_chan *chan = NULL, *pchan;
int result, status = L2CAP_CS_NO_INFO;
u16 dcid ... | 0 | [
"CWE-787"
] | linux | e860d2c904d1a9f38a24eb44c9f34b8f915a6ea3 | 155,134,220,803,763,900,000,000,000,000,000,000,000 | 134 | Bluetooth: Properly check L2CAP config option output buffer length
Validate the output buffer length for L2CAP config requests and responses
to avoid overflowing the stack buffer used for building the option blocks.
Cc: stable@vger.kernel.org
Signed-off-by: Ben Seri <ben@armis.com>
Signed-off-by: Marcel Holtmann <mar... |
TEST_F(QueryPlannerTest, OrWithExactAndInexact2) {
addIndex(BSON("name" << 1));
runQuery(
fromjson("{$or: [{name: {$in: ['thomas', /^alexand(er|ra)/]}},"
"{name: {$exists: false}}]}"));
assertNumSolutions(2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 54,825,404,466,061,055,000,000,000,000,000,000,000 | 13 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int btrfs_add_block_group_cache(struct btrfs_fs_info *info,
struct btrfs_block_group *block_group)
{
struct rb_node **p;
struct rb_node *parent = NULL;
struct btrfs_block_group *cache;
ASSERT(block_group->length != 0);
spin_lock(&info->block_group_cache_lock);
p = &info->block_group_cache_tree... | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 184,539,963,150,541,800,000,000,000,000,000,000,000 | 36 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
void FileIo::Impl::copyXattrFrom(const FileIo&)
#endif
{
#if defined(__APPLE__)
# if defined(EXV_UNICODE_PATH)
# error No xattr API for MacOS X with unicode support
# endif
ssize_t namebufSize = ::listxattr(src.p_->path_.c_str(), 0, 0, 0);
if (namebufSize < 0) {
throw Error(kerCallF... | 0 | [
"CWE-190"
] | exiv2 | c73d1e27198a389ce7caf52ac30f8e2120acdafd | 306,534,124,268,153,000,000,000,000,000,000,000,000 | 46 | Avoid negative integer overflow when `filesize < io_->tell()`.
This fixes #791. |
create_new_image (const gchar *filename,
guint width,
guint height,
GimpImageBaseType type,
GimpImageType gdtype,
gint32 *layer_ID,
GeglBuffer ... | 0 | [
"CWE-190"
] | gimp | 32ae0f83e5748299641cceaabe3f80f1b3afd03e | 309,769,913,404,510,780,000,000,000,000,000,000,000 | 21 | file-xwd: sanity check colormap size (CVE-2013-1913) |
void print_string(std::string& ret, char const* str, int len, bool single_line)
{
bool printable = true;
for (int i = 0; i < len; ++i)
{
char c = str[i];
if (c >= 32 && c < 127) continue;
printable = false;
break;
}
ret += "'";
if (printable)
{
if (single_line && len > 30)
{
ret.ap... | 0 | [
"CWE-125"
] | libtorrent | ec30a5e9ec703afb8abefba757c6d401303b53db | 130,354,650,449,959,510,000,000,000,000,000,000,000 | 36 | fix out-of-bounds read in bdecode
Fixes #2099 |
void sctp_assoc_update(struct sctp_association *asoc,
struct sctp_association *new)
{
struct sctp_transport *trans;
struct list_head *pos, *temp;
/* Copy in new parameters of peer. */
asoc->c = new->c;
asoc->peer.rwnd = new->peer.rwnd;
asoc->peer.sack_needed = new->peer.sack_needed;
asoc->peer.i = new-... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 205,773,062,281,015,240,000,000,000,000,000,000,000 | 96 | 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.
... |
bool __fastcall TOwnConsole::WantsProgress()
{
return false;
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 332,607,155,351,697,800,000,000,000,000,000,000,000 | 4 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
static pci_ers_result_t tg3_io_error_detected(struct pci_dev *pdev,
pci_channel_state_t state)
{
struct net_device *netdev = pci_get_drvdata(pdev);
struct tg3 *tp = netdev_priv(netdev);
pci_ers_result_t err = PCI_ERS_RESULT_NEED_RESET;
netdev_info(netdev, "PCI I/O error detected\n");
rtnl_lock();
if... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 26,350,762,633,860,843,000,000,000,000,000,000,000 | 40 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
ecma_property_to_string (ecma_property_t property, /**< property name type */
jmem_cpointer_t prop_name_cp) /**< property name compressed pointer */
{
uintptr_t property_string = ((uintptr_t) (property)) & (0x3 << ECMA_PROPERTY_NAME_TYPE_SHIFT);
property_string = (property_string >> ECMA_ST... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 161,687,466,881,306,480,000,000,000,000,000,000,000 | 7 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static int32 TIFFWritePixels(TIFF *tiff,TIFFInfo *tiff_info,ssize_t row,
tsample_t sample,Image *image)
{
int32
status;
register ssize_t
i;
register unsigned char
*p,
*q;
size_t
number_tiles,
tile_width;
ssize_t
bytes_per_pixel,
j,
k,
l;
if (TIFFIsTiled(tiff) =... | 0 | [
"CWE-125"
] | ImageMagick6 | d8d844c6f23f4d90d8fe893fe9225dd78fc1e6ef | 250,398,879,209,339,300,000,000,000,000,000,000,000 | 74 | https://github.com/ImageMagick/ImageMagick/issues/1532 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.