func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
cmsColorSpaceSignature CMSEXPORT cmsGetPCS(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
return Icc -> PCS;
} | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 179,072,355,873,780,500,000,000,000,000,000,000,000 | 5 | >Changes from Richard Hughes |
GetFakeLSNForUnloggedRel(void)
{
XLogRecPtr nextUnloggedLSN;
/* use volatile pointer to prevent code rearrangement */
volatile XLogCtlData *xlogctl = XLogCtl;
/* increment the unloggedLSN counter, need SpinLock */
SpinLockAcquire(&xlogctl->ulsn_lck);
nextUnloggedLSN = xlogctl->unloggedLSN++;
SpinLockRelease(&x... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 62,067,757,045,727,805,000,000,000,000,000,000,000 | 14 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
void WebContents::StartDrag(const gin_helper::Dictionary& item,
gin::Arguments* args) {
base::FilePath file;
std::vector<base::FilePath> files;
if (!item.Get("files", &files) && item.Get("file", &file)) {
files.push_back(file);
}
gin::Handle<NativeImage> icon;
if (!item.Get(... | 0 | [
"CWE-200",
"CWE-668"
] | electron | 07a1c2a3e5845901f7e2eda9506695be58edc73c | 334,172,536,585,076,530,000,000,000,000,000,000,000 | 24 | fix: restrict sendToFrame to same-process frames by default (#26875) |
static int doAttachVolume(struct nc_state_t *nc, ncMetadata * pMeta, char *instanceId, char *volumeId, char *attachmentToken, char *localDev)
{
int ret = EUCA_OK;
int have_remote_device = 0;
char *xml = NULL;
char *tagBuf;
char *localDevName;
char localDevReal[32], localDevTag[256], remoteDevRea... | 0 | [] | eucalyptus | c252889a46f41b4c396b89e005ec89836f2524be | 260,667,978,981,103,000,000,000,000,000,000,000,000 | 253 | Input validation, shellout hardening on back-end
- validating bucketName and bucketPath in BundleInstance
- validating device name in Attach and DetachVolume
- removed some uses of system() and popen()
Fixes EUCA-7572, EUCA-7520 |
compat_get_entries(struct net *net, struct compat_ipt_get_entries __user *uptr,
int *len)
{
int ret;
struct compat_ipt_get_entries get;
struct xt_table *t;
if (*len < sizeof(get)) {
duprintf("compat_get_entries: %u < %zu\n", *len, sizeof(get));
return -EINVAL;
}
if (copy_from_user(&get, uptr, sizeof(ge... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6e94e0cfb0887e4013b3b930fa6ab1fe6bb6ba91 | 89,152,852,725,807,670,000,000,000,000,000,000,000 | 45 | netfilter: x_tables: make sure e->next_offset covers remaining blob size
Otherwise this function may read data beyond the ruleset blob.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
static int tls1_check_ec_key(SSL *s,
unsigned char *curve_id, unsigned char *comp_id)
{
const unsigned char *pformats, *pcurves;
size_t num_formats, num_curves, i;
int j;
/*
* If point formats extension present check it, otherwise everything is
* supported (see RFC... | 0 | [] | openssl | 76343947ada960b6269090638f5391068daee88d | 157,197,011,651,032,470,000,000,000,000,000,000,000 | 38 | Fix for CVE-2015-0291
If a client renegotiates using an invalid signature algorithms extension
it will crash a server with a NULL pointer dereference.
Thanks to David Ramos of Stanford University for reporting this bug.
CVE-2015-0291
Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
ssl/t1_lib.c |
void do_mkdir(struct st_command *command)
{
int error;
static DYNAMIC_STRING ds_dirname;
const struct command_arg mkdir_args[] = {
{"dirname", ARG_STRING, TRUE, &ds_dirname, "Directory to create"}
};
DBUG_ENTER("do_mkdir");
check_command_args(command, command->first_argument,
mkdir... | 0 | [] | server | 01b39b7b0730102b88d8ea43ec719a75e9316a1e | 100,398,564,588,780,580,000,000,000,000,000,000,000 | 19 | mysqltest: don't eat new lines in --exec
pass them through as is |
static inline u8 *skcipher_get_spot(u8 *start, unsigned int len)
{
u8 *end_page = (u8 *)(((unsigned long)(start + len - 1)) & PAGE_MASK);
return max(start, end_page);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 | 335,139,630,929,466,800,000,000,000,000,000,000,000 | 6 | crypto: skcipher - Add missing API setkey checks
The API setkey checks for key sizes and alignment went AWOL during the
skcipher conversion. This patch restores them.
Cc: <stable@vger.kernel.org>
Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...")
Reported-by: Baozeng <sploving1@gmail.com>
Signed-of... |
virSecuritySELinuxSetSocketLabel(virSecurityManager *mgr G_GNUC_UNUSED,
virDomainDef *vm)
{
virSecurityLabelDef *secdef;
int rc = -1;
secdef = virDomainDefGetSecurityLabelDef(vm, SECURITY_SELINUX_NAME);
if (!secdef || !secdef->label)
return 0;
if (STRNEQ(SE... | 0 | [
"CWE-732"
] | libvirt | 15073504dbb624d3f6c911e85557019d3620fdb2 | 47,657,685,980,560,310,000,000,000,000,000,000,000 | 36 | security: fix SELinux label generation logic
A process can access a file if the set of MCS categories
for the file is equal-to *or* a subset-of, the set of
MCS categories for the process.
If there are two VMs:
a) svirt_t:s0:c117
b) svirt_t:s0:c117,c720
Then VM (b) is able to access files labelled for VM (a).
I... |
OFCondition DcmSCP::handleFINDRequest(T_DIMSE_C_FindRQ &reqMessage,
const T_ASC_PresentationContextID presID,
DcmDataset *&reqDataset)
{
// Do some basic validity checks
if (m_assoc == NULL)
return DIMSE_ILLEGALASSOCIATION;
OFConditi... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 220,008,841,596,401,470,000,000,000,000,000,000,000 | 57 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
virtual void div(Hybrid_type *val, ulonglong u) const
{ val->integer/= (longlong) u; } | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 11,824,851,485,353,250,000,000,000,000,000,000,000 | 2 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
nm_gconf_get_bool_helper (GConfClient *client,
const char *path,
const char *key,
const char *setting,
gboolean *value)
{
char * gc_key;
GConfValue * gc_value;
gboolean success = FALSE;
g_return_val_if_fail (k... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 148,205,377,347,628,520,000,000,000,000,000,000,000 | 35 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
static void update_mtab_entry(int flags)
{
unsigned long fl;
struct libmnt_lock *lc;
if (!mtab_update)
return;
fl = mnt_update_get_mflags(mtab_update);
if ((flags & MS_RDONLY) != (fl & MS_RDONLY))
mnt_update_force_rdonly(mtab_update, flags & MS_RDONLY);
if (!nomtab) {
if (mtab_does_not_exist()) {
if ... | 0 | [
"CWE-399"
] | util-linux | 4b39b6aefd5dd8ac68a92adc650dc13d5d54d704 | 316,622,427,575,816,400,000,000,000,000,000,000,000 | 29 | mount: use fflush() and temporary file for mtab updates (CVE-2011-1089)
http://thread.gmane.org/gmane.comp.security.oss.general/4374
Changes:
- force mount(8) to use /etc/mtab.tmp file every time. The original
code used the tmp file for remount/move operations only.
- call and check fflush() return code for... |
static int __init xt_osf_init(void)
{
int err = -EINVAL;
int i;
for (i=0; i<ARRAY_SIZE(xt_osf_fingers); ++i)
INIT_LIST_HEAD(&xt_osf_fingers[i]);
err = nfnetlink_subsys_register(&xt_osf_nfnetlink);
if (err < 0) {
pr_err("Failed to register OSF nsfnetlink helper (%d)\n", err);
goto err_out_exit;
}
err = x... | 0 | [
"CWE-862"
] | linux | 916a27901de01446bcf57ecca4783f6cff493309 | 227,259,798,985,860,960,000,000,000,000,000,000,000 | 28 | netfilter: xt_osf: Add missing permission checks
The capability check in nfnetlink_rcv() verifies that the caller
has CAP_NET_ADMIN in the namespace that "owns" the netlink socket.
However, xt_osf_fingers is shared by all net namespaces on the
system. An unprivileged user can create user and net namespaces
in which h... |
static int dev_ifconf(struct net *net, struct compat_ifconf __user *uifc32)
{
struct compat_ifconf ifc32;
struct ifconf ifc;
struct ifconf __user *uifc;
struct compat_ifreq __user *ifr32;
struct ifreq __user *ifr;
unsigned int i, j;
int err;
if (copy_from_user(&ifc32, uifc32, sizeof(struct compat_ifconf)))
r... | 1 | [
"CWE-200"
] | linux | 43da5f2e0d0c69ded3d51907d9552310a6b545e8 | 13,938,774,490,098,030,000,000,000,000,000,000,000 | 68 | net: fix info leak in compat dev_ifconf()
The implementation of dev_ifconf() for the compat ioctl interface uses
an intermediate ifc structure allocated in userland for the duration of
the syscall. Though, it fails to initialize the padding bytes inserted
for alignment and that for leaks four bytes of kernel stack. Ad... |
mac_writereg(E1000State *s, int index, uint32_t val)
{
s->mac_reg[index] = val;
} | 0 | [
"CWE-120"
] | qemu | b0d9ffcd0251161c7c92f94804dcf599dfa3edeb | 25,960,701,062,311,140,000,000,000,000,000,000,000 | 4 | 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 boolean ReadIPTCProfile(j_decompress_ptr jpeg_info)
{
char
magick[MagickPathExtent];
ErrorManager
*error_manager;
ExceptionInfo
*exception;
Image
*image;
MagickBooleanType
status;
register ssize_t
i;
register unsigned char
*p;
size_t
length;
StringInfo
... | 1 | [
"CWE-416"
] | ImageMagick | 39f226a9c137f547e12afde972eeba7551124493 | 255,183,788,865,131,500,000,000,000,000,000,000,000 | 125 | https://github.com/ImageMagick/ImageMagick/issues/1641 |
int mwifiex_config_start_uap(struct mwifiex_private *priv,
struct mwifiex_uap_bss_param *bss_cfg)
{
if (mwifiex_send_cmd(priv, HostCmd_CMD_UAP_SYS_CONFIG,
HostCmd_ACT_GEN_SET,
UAP_BSS_PARAMS_I, bss_cfg, true)) {
mwifiex_dbg(priv->adapter, ERROR,
"Failed to set AP configuration\n");
r... | 0 | [
"CWE-120",
"CWE-787"
] | linux | 7caac62ed598a196d6ddf8d9c121e12e082cac3a | 151,441,000,858,670,330,000,000,000,000,000,000,000 | 30 | mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings
mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and
mwifiex_set_wmm_params() call memcpy() without checking
the destination size.Since the source is given from
user-space, this may trigger a heap buffer overflow.
Fix them by putting the length... |
static inline void writeit(int f, void *buf, size_t len) {
ssize_t res;
while (len > 0) {
DEBUG("+");
if ((res = write(f, buf, len)) <= 0)
err("Send failed: %m");
len -= res;
buf += res;
}
} | 0 | [
"CWE-399",
"CWE-310"
] | nbd | 741495cb08503fd32a9d22648e63b64390c601f4 | 296,972,012,090,953,620,000,000,000,000,000,000,000 | 10 | nbd-server: handle modern-style negotiation in a child process
Previously, the modern style negotiation was carried out in the root
server (listener) process before forking the actual client handler. This
made it possible for a malfunctioning or evil client to terminate the
root process simply by querying a non-existe... |
static inline void sem_rmid(struct ipc_namespace *ns, struct sem_array *s)
{
ipc_rmid(&sem_ids(ns), &s->sem_perm);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 191,069,295,250,032,160,000,000,000,000,000,000,000 | 4 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
int x509_get_sig( unsigned char **p, const unsigned char *end, x509_buf *sig )
{
int ret;
size_t len;
if( ( end - *p ) < 1 )
return( POLARSSL_ERR_X509_INVALID_SIGNATURE +
POLARSSL_ERR_ASN1_OUT_OF_DATA );
sig->tag = **p;
if( ( ret = asn1_get_bitstring_null( p, end, &len ) )... | 0 | [
"CWE-310"
] | polarssl | 5d8618539f8e186c1b2c1b5a548d6f85936fe41f | 158,748,257,811,261,400,000,000,000,000,000,000,000 | 21 | Fix memory leak while parsing some X.509 certs |
static bool bpf_prog_array_copy_core(struct bpf_prog **prog,
u32 *prog_ids,
u32 request_cnt)
{
int i = 0;
for (; *prog; prog++) {
if (*prog == &dummy_bpf_prog.prog)
continue;
prog_ids[i] = (*prog)->aux->id;
if (++i == request_cnt) {
prog++;
break;
}
}
return !!(*prog);
} | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 339,433,734,288,298,600,000,000,000,000,000,000,000 | 18 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
virtual void updateTextShift(GfxState * /*state*/, double /*shift*/) {} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 61,053,988,381,965,650,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static int ssl_write_split( ssl_context *ssl,
const unsigned char *buf, size_t len )
{
int ret;
if( ssl->split_done == SSL_CBC_RECORD_SPLITTING_DISABLED ||
len <= 1 ||
ssl->minor_ver > SSL_MINOR_VERSION_1 ||
cipher_get_cipher_mode( &ssl->transform_out->cipher... | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 136,634,470,126,615,970,000,000,000,000,000,000,000 | 27 | Added max length checking of hostname |
static void get_hmac_file(char *mac_file, size_t mac_file_size, const char* orig)
{
char* p;
p = strrchr(orig, '/');
if (p==NULL) {
snprintf(mac_file, mac_file_size, ".%s"HMAC_SUFFIX, orig);
return;
}
snprintf(mac_file, mac_file_size, "%.*s/.%s"HMAC_SUFFIX, (int)(p-orig), orig, p+1);
} | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 78,033,189,446,002,635,000,000,000,000,000,000,000 | 11 | env: use secure_getenv when reading environment variables |
static void ipgre_tunnel_unlink(struct ipgre_net *ign, struct ip_tunnel *t)
{
struct ip_tunnel **tp;
for (tp = ipgre_bucket(ign, t); *tp; tp = &(*tp)->next) {
if (t == *tp) {
spin_lock_bh(&ipgre_lock);
*tp = t->next;
spin_unlock_bh(&ipgre_lock);
break;
}
}
} | 0 | [] | linux-2.6 | c2892f02712e9516d72841d5c019ed6916329794 | 154,973,375,374,937,440,000,000,000,000,000,000,000 | 13 | gre: fix netns vs proto registration ordering
GRE protocol receive hook can be called right after protocol addition is done.
If netns stuff is not yet initialized, we're going to oops in
net_generic().
This is remotely oopsable if ip_gre is compiled as module and packet
comes at unfortunate moment of module loading.
... |
Frame_rows_current_row_top() :
Frame_n_rows_preceding(true /*top*/, 0 /* n_rows */)
{} | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 319,683,342,464,807,260,000,000,000,000,000,000,000 | 3 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static int pkcs7_encode_rinfo(PKCS7_RECIP_INFO *ri,
unsigned char *key, int keylen)
{
EVP_PKEY_CTX *pctx = NULL;
EVP_PKEY *pkey = NULL;
unsigned char *ek = NULL;
int ret = 0;
size_t eklen;
pkey = X509_get_pubkey(ri->cert);
if (!pkey)
return 0;
pct... | 0 | [
"CWE-703"
] | openssl | 59302b600e8d5b77ef144e447bb046fd7ab72686 | 211,099,856,337,496,160,000,000,000,000,000,000,000 | 52 | PKCS#7: Fix NULL dereference with missing EncryptedContent.
CVE-2015-1790
Reviewed-by: Rich Salz <rsalz@openssl.org> |
static int whereLoopAddOr(
WhereLoopBuilder *pBuilder,
Bitmask mPrereq,
Bitmask mUnusable
){
WhereInfo *pWInfo = pBuilder->pWInfo;
WhereClause *pWC;
WhereLoop *pNew;
WhereTerm *pTerm, *pWCEnd;
int rc = SQLITE_OK;
int iCur;
WhereClause tempWC;
WhereLoopBuilder sSubBuild;
WhereOrSet sSum, sCur;
... | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 13,139,442,407,906,580,000,000,000,000,000,000,000 | 125 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
EmitRange(NCURSES_SP_DCLx const NCURSES_CH_T *ntext, int num)
{
int i;
TR(TRACE_CHARPUT, ("EmitRange %d:%s", num, _nc_viscbuf(ntext, num)));
if (erase_chars || repeat_char) {
while (num > 0) {
int runcount;
NCURSES_CH_T ntext0;
while (num > 1 && !CharEq(ntext[0], ntext[1])) {
PutChar(NC... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 29,052,605,755,584,900,000,000,000,000,000,000,000 | 104 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
crypto_retieve_X509_key_usage(krb5_context context,
pkinit_plg_crypto_context plgcctx,
pkinit_req_crypto_context reqcctx,
X509 *x,
unsigned int *ret_ku_bits,
unsigned int... | 0 | [
"CWE-476"
] | krb5 | f249555301940c6df3a2cdda13b56b5674eebc2e | 140,345,444,235,518,750,000,000,000,000,000,000,000 | 73 | PKINIT null pointer deref [CVE-2013-1415]
Don't dereference a null pointer when cleaning up.
The KDC plugin for PKINIT can dereference a null pointer when a
malformed packet causes processing to terminate early, leading to
a crash of the KDC process. An attacker would need to have a valid
PKINIT certificate or have ... |
static uint kill_threads_for_user(THD *thd, LEX_USER *user,
killed_state kill_signal, ha_rows *rows)
{
kill_threads_callback_arg arg(thd, user);
DBUG_ENTER("kill_threads_for_user");
*rows= 0;
if (unlikely(thd->is_fatal_error)) // If we run out of memory
DBUG_RETURN... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 55,850,229,526,834,500,000,000,000,000,000,000,000 | 41 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
RxFilterInfoList *qmp_query_rx_filter(bool has_name, const char *name,
Error **errp)
{
NetClientState *nc;
RxFilterInfoList *filter_list = NULL, **tail = &filter_list;
QTAILQ_FOREACH(nc, &net_clients, next) {
RxFilterInfo *info;
if (has_name && strcmp(... | 0 | [
"CWE-835"
] | qemu | 705df5466c98f3efdd2b68d3b31dad86858acad7 | 143,683,015,038,159,170,000,000,000,000,000,000,000 | 50 | net: introduce qemu_receive_packet()
Some NIC supports loopback mode and this is done by calling
nc->info->receive() directly which in fact suppresses the effort of
reentrancy check that is done in qemu_net_queue_send().
Unfortunately we can't use qemu_net_queue_send() here since for
loopback there's no sender as pee... |
static rfbCursorPtr rfbDefaultGetCursorPtr(rfbClientPtr cl)
{
return(cl->screen->cursor);
} | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 277,567,130,953,206,300,000,000,000,000,000,000 | 4 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
flow_wildcards_init_for_packet(struct flow_wildcards *wc,
const struct flow *flow)
{
ovs_be16 dl_type = OVS_BE16_MAX;
memset(&wc->masks, 0x0, sizeof wc->masks);
/* Update this function whenever struct flow changes. */
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 40);
if (flow_t... | 0 | [
"CWE-400"
] | ovs | 48ceca0446b1c2c2c03e7551048c5b19ed23cc97 | 296,608,118,247,174,100,000,000,000,000,000,000,000 | 145 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
int unit_set_slice(Unit *u, Unit *slice) {
assert(u);
assert(slice);
/* Sets the unit slice if it has not been set before. Is extra
* careful, to only allow this for units that actually have a
* cgroup context. Also, we don't allow to set this for slices
* (since the ... | 0 | [
"CWE-269"
] | systemd | bf65b7e0c9fc215897b676ab9a7c9d1c688143ba | 122,029,288,147,698,870,000,000,000,000,000,000,000 | 36 | core: imply NNP and SUID/SGID restriction for DynamicUser=yes service
Let's be safe, rather than sorry. This way DynamicUser=yes services can
neither take benefit of, nor create SUID/SGID binaries.
Given that DynamicUser= is a recent addition only we should be able to
get away with turning this on, even though this i... |
STATIC void
S_change_engine_size(pTHX_ RExC_state_t *pRExC_state, const Ptrdiff_t size)
{
/* 'size' is the delta to add or subtract from the current memory allocated
* to the regex engine being constructed */
PERL_ARGS_ASSERT_CHANGE_ENGINE_SIZE;
RExC_size += size;
Renewc(RExC_rxi,
siz... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 228,313,316,034,190,720,000,000,000,000,000,000,000 | 31 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
evutil_socket_geterror(evutil_socket_t sock)
{
int optval, optvallen=sizeof(optval);
int err = WSAGetLastError();
if (err == WSAEWOULDBLOCK && sock >= 0) {
if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)&optval,
&optvallen))
return err;
if (optval)
return optval;
}
return err;
} | 0 | [
"CWE-119",
"CWE-787"
] | libevent | 329acc18a0768c21ba22522f01a5c7f46cacc4d5 | 80,545,083,125,513,340,000,000,000,000,000,000,000 | 13 | evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
Consequently, it will pass the check at line 1816. Segfault happens at line
1819.
... |
GF_Err gf_isom_add_sample_shadow(GF_ISOFile *movie, u32 trackNumber, GF_ISOSample *sample)
{
GF_Err e;
GF_TrackBox *trak;
GF_ISOSample *prev;
GF_SampleEntryBox *entry;
u32 dataRefIndex;
u64 data_offset;
u32 descIndex;
u32 sampleNum, prevSampleNum;
GF_DataEntryURLBox *Dentry;
Bool offset_times = GF_FALSE;
e ... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 2,320,039,993,952,254,000,000,000,000,000,000,000 | 74 | fixed #1706 |
grabData(rpm_tagtype_t type, rpm_constdata_t p, rpm_count_t c, int * lengthPtr)
{
rpm_data_t data = NULL;
int length;
length = dataLength(type, p, c, 0, NULL);
if (length > 0) {
data = xmalloc(length);
copyData(type, data, p, c, length);
}
if (lengthPtr)
*lengthPtr = length;
return data... | 0 | [
"CWE-125"
] | rpm | 8f4b3c3cab8922a2022b9e47c71f1ecf906077ef | 188,381,557,895,345,950,000,000,000,000,000,000,000 | 15 | hdrblobInit() needs bounds checks too
Users can pass untrusted data to hdrblobInit() and it must be robust
against this. |
R_API void r_io_bank_drain(RIO *io, const ut32 bankid) {
r_return_if_fail (io);
RIOBank *bank = r_io_bank_get (io, bankid);
if (!bank) {
return;
}
bank->last_used = NULL;
RRBNode *node = r_crbtree_first_node (bank->submaps);
RRBNode *next = NULL;
while (node) {
next = r_rbnode_next (node);
if (next) {
... | 0 | [
"CWE-416"
] | radare2 | b5cb90b28ec71fda3504da04e3cc94a362807f5e | 237,504,146,660,783,360,000,000,000,000,000,000,000 | 23 | Prefer memleak over usaf in io.bank's rbtree bug ##crash
* That's a workaround, proper fix will come later
* Reproducer: bins/fuzzed/iobank-crash
* Reported by Akyne Choi via huntr.dev |
aspath_print_vty (struct vty *vty, const char *format, struct aspath *as, const char * suffix)
{
assert (format);
vty_out (vty, format, as->str);
if (as->str_len && strlen (suffix))
vty_out (vty, "%s", suffix);
} | 0 | [
"CWE-20"
] | quagga | 7a42b78be9a4108d98833069a88e6fddb9285008 | 209,784,153,965,472,430,000,000,000,000,000,000,000 | 7 | bgpd: Fix AS_PATH size calculation for long paths
If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up. The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message. This patch addresses... |
static bool rdma_is_consumer_reject(struct rdma_cm_id *id, int reason)
{
if (rdma_ib_or_roce(id->device, id->port_num))
return reason == IB_CM_REJ_CONSUMER_DEFINED;
if (rdma_protocol_iwarp(id->device, id->port_num))
return reason == -ECONNREFUSED;
WARN_ON_ONCE(1);
return false;
} | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 216,314,662,596,715,040,000,000,000,000,000,000,000 | 11 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
ipmi_fru_read_to_bin(struct ipmi_intf * intf,
char * pFileName,
uint8_t fruId)
{
struct ipmi_rs * rsp;
struct ipmi_rq req;
struct fru_info fru;
uint8_t msg_data[4];
uint8_t * pFruBuf;
msg_data[0] = fruId;
memset(&req, 0, sizeof(req));
req.msg.netfn = IPMI_NETFN_STORAGE;
req.msg.cmd = GET_FRU_INFO;
req... | 0 | [
"CWE-120",
"CWE-787"
] | ipmitool | e824c23316ae50beb7f7488f2055ac65e8b341f2 | 46,861,317,970,088,350,000,000,000,000,000,000,000 | 62 | fru: Fix buffer overflow vulnerabilities
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `read_fru_area_section` function only performs size validation of
requested read size, and falsely assumes that the IPMI message will not
respond with more than ... |
void ProdNghttp2SessionFactory::init(nghttp2_session*, ConnectionImpl* connection,
const envoy::config::core::v3::Http2ProtocolOptions& options) {
connection->sendSettings(options, true);
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 111,110,861,431,326,700,000,000,000,000,000,000,000 | 4 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
GF_Err dOps_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_OpusSpecificBox *ptr = (GF_OpusSpecificBox *)s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u8(bs, ptr->version);
gf_bs_write_u8(bs, ptr->OutputChannelCount);
gf_bs_write_u16(bs, ptr->PreSkip);
... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 246,700,288,145,446,320,000,000,000,000,000,000,000 | 20 | fixed #1587 |
void HGraphBuilder::TraceInline(Handle<JSFunction> target,
Handle<JSFunction> caller,
const char* reason) {
if (FLAG_trace_inlining) {
SmartArrayPointer<char> target_name =
target->shared()->DebugName()->ToCString();
SmartArrayPointer<cha... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 145,136,154,516,742,880,000,000,000,000,000,000,000 | 16 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
launch_location_list_free (GList *list)
{
g_list_foreach (list, (GFunc) launch_location_free, NULL);
g_list_free (list);
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 300,594,114,569,031,170,000,000,000,000,000,000,000 | 5 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
int Field_timestamp::store_decimal(const my_decimal *d)
{
ulonglong nr;
ulong sec_part;
int error;
MYSQL_TIME ltime;
longlong tmp;
THD *thd= get_thd();
ErrConvDecimal str(d);
if (my_decimal2seconds(d, &nr, &sec_part))
{
tmp= -1;
error= 2;
}
else
tmp= number_to_datetime(nr, sec_part, &... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 3,553,867,574,794,817,600,000,000,000,000,000,000 | 20 | 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... |
static void ftrace_ops_list_func(unsigned long ip, unsigned long parent_ip,
struct ftrace_ops *op, struct pt_regs *regs)
{
__ftrace_ops_list_func(ip, parent_ip, NULL, regs);
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 277,111,429,130,748,130,000,000,000,000,000,000,000 | 5 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
ext2_listxattr(struct dentry *dentry, char *buffer, size_t size)
{
return ext2_xattr_list(dentry, buffer, size);
} | 0 | [
"CWE-241",
"CWE-19"
] | linux | be0726d33cb8f411945884664924bed3cb8c70ee | 107,621,802,909,981,000,000,000,000,000,000,000,000 | 4 | ext2: convert to mbcache2
The conversion is generally straightforward. We convert filesystem from
a global cache to per-fs one. Similarly to ext4 the tricky part is that
xattr block corresponding to found mbcache entry can get freed before we
get buffer lock for that block. So we have to check whether the entry is
sti... |
TEE_Result syscall_cryp_state_alloc(unsigned long algo, unsigned long mode,
unsigned long key1, unsigned long key2,
uint32_t *state)
{
TEE_Result res;
struct tee_cryp_state *cs;
struct tee_ta_session *sess;
struct tee_obj *o1 = NULL;
struct tee_obj *o2 = NULL;
struct user_ta_ctx *utc;
res = tee_ta_get_cur... | 0 | [
"CWE-327"
] | optee_os | 34a08bec755670ea0490cb53bbc68058cafc69b6 | 168,609,801,257,313,600,000,000,000,000,000,000,000 | 126 | cryp: prevent direct calls to update and final functions
With inconsistent or malformed data it has been possible to call
"update" and "final" crypto functions directly. Using a fuzzer tool [1]
we have seen that this results in asserts, i.e., a crash that
potentially could leak sensitive information.
By setting the s... |
pfm_smpl_buffer_alloc(struct task_struct *task, pfm_context_t *ctx, unsigned long rsize, void **user_vaddr)
{
struct mm_struct *mm = task->mm;
struct vm_area_struct *vma = NULL;
unsigned long size;
void *smpl_buf;
/*
* the fixed header + requested size and align to page boundary
*/
size = PAGE_ALIGN(rsize);... | 1 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 87,803,820,803,317,590,000,000,000,000,000,000,000 | 114 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
font_load_job (GTask *task,
gpointer source_object,
gpointer user_data,
GCancellable *cancellable)
{
FontLoadJob *job = user_data;
g_autoptr(GError) error = NULL;
font_load_job_do_load (job, &error);
if (error != NULL)
g_task_return_error (task, g_steal_pointer (&error));
... | 0 | [
"CWE-476"
] | gnome-font-viewer | 9661683379806e2bad6a52ce6dde776a33f4f981 | 122,743,395,925,319,300,000,000,000,000,000,000,000 | 15 | Fallback to basename when no family name (CVE-2019-19308)
Instead of possibly returning an empty string, which will cause
issues later on.
We store the GFile that was loaded to create the FT_Face into its
generic client data structure, and load the basename from it when
we don't have a family name.
https://gitlab.gn... |
void SplashOutputDev::updateMiterLimit(GfxState *state) {
splash->setMiterLimit(state->getMiterLimit());
} | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 313,394,377,750,767,130,000,000,000,000,000,000,000 | 3 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
static struct bio *bio_map_kern(struct request_queue *q, void *data,
unsigned int len, gfp_t gfp_mask)
{
unsigned long kaddr = (unsigned long)data;
unsigned long end = (kaddr + len + PAGE_SIZE - 1) >> PAGE_SHIFT;
unsigned long start = kaddr >> PAGE_SHIFT;
const int nr_pages = end - start;
bool is_vmalloc = is_vm... | 0 | [
"CWE-200"
] | linux | cc8f7fe1f5eab010191aa4570f27641876fa1267 | 311,258,247,185,287,040,000,000,000,000,000,000,000 | 50 | block-map: add __GFP_ZERO flag for alloc_page in function bio_copy_kern
Add __GFP_ZERO flag for alloc_page in function bio_copy_kern to initialize
the buffer of a bio.
Signed-off-by: Haimin Zhang <tcs.kernel@gmail.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: ... |
static bool io_run_ctx_fallback(struct io_ring_ctx *ctx)
{
struct callback_head *work, *next;
bool executed = false;
do {
work = xchg(&ctx->exit_task_work, NULL);
if (!work)
break;
do {
next = work->next;
work->func(work);
work = next;
cond_resched();
} while (work);
executed = true;
} w... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 169,879,929,519,601,090,000,000,000,000,000,000,000 | 21 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static void register_http_post_files_variable(char *strvar, char *val, zval *http_post_files, zend_bool override_protection) /* {{{ */
{
safe_php_register_variable(strvar, val, strlen(val), http_post_files, override_protection);
} | 0 | [
"CWE-190"
] | php-src | a3924ab6542a358a3099de992b63b932a9570add | 47,364,556,057,093,600,000,000,000,000,000,000,000 | 4 | Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78876: Long variables cause OOM and temp files are not cleaned
Fix #78875: Long filenames cause OOM and temp files are not cleaned
Update NEWS for 7.2.31
Update CREDITS for PHP 7.2.30
Update NEWS for PHP 7.2.30 |
void zuiInitIterator(zsetopsrc *op) {
if (op->subject == NULL)
return;
if (op->type == OBJ_SET) {
iterset *it = &op->iter.set;
if (op->encoding == OBJ_ENCODING_INTSET) {
it->is.is = op->subject->ptr;
it->is.ii = 0;
} else if (op->encoding == OBJ_ENCODING_... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 238,047,316,792,883,150,000,000,000,000,000,000,000 | 35 | 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 uint32_t latm_get_value(bitfile *ld)
{
uint32_t l, value;
uint8_t bytesForValue;
bytesForValue = (uint8_t)faad_getbits(ld, 2);
value = 0;
for(l=0; l<bytesForValue; l++)
value = (value << 8) | (uint8_t)faad_getbits(ld, 8);
return value;
} | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 101,296,590,025,915,920,000,000,000,000,000,000,000 | 12 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
dwarf_formudata(Dwarf_Attribute attr,
Dwarf_Unsigned * return_uval, Dwarf_Error * error)
{
Dwarf_Debug dbg = 0;
Dwarf_CU_Context cu_context = 0;
Dwarf_Byte_Ptr section_end = 0;
Dwarf_Unsigned bytes_read = 0;
Dwarf_Byte_Ptr data = attr->ar_debug_ptr;
unsigned form = 0;
int res = get_at... | 0 | [
"CWE-703",
"CWE-125"
] | libdwarf-code | 7ef09e1fc9ba07653dd078edb2408631c7969162 | 98,457,916,327,273,980,000,000,000,000,000,000,000 | 24 | Fixes old bug(which could result in Denial of Service)
due to a missing check before reading the 8 bytes of a DW_FORM_ref_sig8.
DW202206-001
modified: src/lib/libdwarf/dwarf_form.c |
static GF_Err ctxload_process(GF_Filter *filter)
{
GF_Err e = GF_OK;
GF_FilterPacket *pck;
u32 i, j, k, updates_pending, last_rap=0;
GF_AUContext *au;
Bool can_delete_com;
GF_StreamContext *sc;
Bool is_seek = GF_FALSE;
Bool is_start, is_end;
u32 min_next_time_ms = 0;
CTXLoadPriv *priv = gf_filter_get_udta(fil... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 244,791,628,817,717,150,000,000,000,000,000,000,000 | 417 | fixed #2061 |
txdesc_writeback(E1000State *s, dma_addr_t base, struct e1000_tx_desc *dp)
{
PCIDevice *d = PCI_DEVICE(s);
uint32_t txd_upper, txd_lower = le32_to_cpu(dp->lower.data);
if (!(txd_lower & (E1000_TXD_CMD_RS|E1000_TXD_CMD_RPS)))
return 0;
txd_upper = (le32_to_cpu(dp->upper.data) | E1000_TXD_STAT_DD... | 0 | [
"CWE-835"
] | qemu | 1caff0340f49c93d535c6558a5138d20d475315c | 298,569,158,901,385,400,000,000,000,000,000,000,000 | 14 | e1000: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>... |
make_url (char **url, const char *dn, const char *filter)
{
gpg_error_t err;
char *u_dn, *u_filter;
char const attrs[] = (USERCERTIFICATE ","
/* USERSMIMECERTIFICATE "," */
CACERTIFICATE ","
X509CACERT );
*url = NULL;
u_dn = escape4url ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 251,317,836,332,298,940,000,000,000,000,000,000,000 | 43 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
int vhost_poll_start(struct vhost_poll *poll, struct file *file)
{
unsigned long mask;
int ret = 0;
if (poll->wqh)
return 0;
mask = file->f_op->poll(file, &poll->table);
if (mask)
vhost_poll_wakeup(&poll->wait, 0, 0, (void *)mask);
if (mask & POLLERR) {
if (poll->wqh)
remove_wait_queue(poll->wqh, &poll... | 0 | [
"CWE-399"
] | linux | 7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5 | 264,540,461,904,207,960,000,000,000,000,000,000,000 | 19 | vhost: actually track log eventfd file
While reviewing vhost log code, I found out that log_file is never
set. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet).
Cc: stable@vger.kernel.org
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com> |
GF_Err fecr_dump(GF_Box *a, FILE * trace)
{
u32 i;
char *box_name;
FECReservoirBox *ptr = (FECReservoirBox *) a;
if (a->type==GF_ISOM_BOX_TYPE_FIRE) {
box_name = "FILEReservoirBox";
} else {
box_name = "FECReservoirBox";
}
gf_isom_box_dump_start(a, box_name, trace);
fprintf(trace, ">\n");
for (i=0; i<ptr... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 325,126,865,463,313,220,000,000,000,000,000,000,000 | 23 | fixed 2 possible heap overflows (inc. #1088) |
cmsBool Type_ProfileSequenceId_Write(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, void* Ptr, cmsUInt32Number nItems)
{
cmsSEQ* Seq = (cmsSEQ*) Ptr;
cmsUInt32Number BaseOffset;
// Keep the base offset
BaseOffset = io ->Tell(io) - sizeof(_cmsTagBase);
// This is the table count
if (!... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 47,364,551,823,188,540,000,000,000,000,000,000,000 | 18 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
static void liSleep(LARGE_INTEGER *li, int timeout)
{
HANDLE hTimer;
DWORD ret;
if (unlikely(timeout <= 0))
return;
hTimer = CreateWaitableTimer(NULL, TRUE, NULL);
if (unlikely(!hTimer))
quit(1, "Failed to create hTimer in liSleep");
ret = SetWaitableTimer(hTimer, li, 0, NULL, NULL, 0);
if (unlikely(!ret))... | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 123,923,051,115,679,660,000,000,000,000,000,000,000 | 21 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
GF_Err dvvC_box_read(GF_Box *s, GF_BitStream *bs)
{
return dvcC_box_read(s, bs);
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 4,791,172,644,784,532,000,000,000,000,000,000,000 | 4 | fixed #2255 |
globexp2(const Char *ptr, const Char *pattern, glob_t *pglob,
struct glob_lim *limitp, int recursion)
{
int i, rv;
Char *lm, *ls;
const Char *pe, *pm, *pl;
Char patbuf[PATH_MAX];
/* copy part up to the brace */
for (lm = patbuf, pm = pattern; pm != ptr; *lm++ = *pm... | 0 | [] | pure-ftpd | 0627004e23a24108785dc1506c5767392b90f807 | 315,762,447,280,429,800,000,000,000,000,000,000,000 | 97 | BSD glob(): check max pattern length after having initialized pglob |
static void delayed_put_task_struct(struct rcu_head *rhp)
{
struct task_struct *tsk = container_of(rhp, struct task_struct, rcu);
perf_event_delayed_put(tsk);
trace_sched_process_free(tsk);
put_task_struct(tsk);
} | 0 | [
"CWE-200",
"CWE-284"
] | linux | 6c85501f2fabcfc4fc6ed976543d252c4eaf4be9 | 212,451,008,321,078,430,000,000,000,000,000,000,000 | 8 | fix infoleak in waitid(2)
kernel_waitid() can return a PID, an error or 0. rusage is filled in the first
case and waitid(2) rusage should've been copied out exactly in that case, *not*
whenever kernel_waitid() has not returned an error. Compat variant shares that
braino; none of kernel_wait4() callers do, so the bel... |
bool compress_file(rzip_control *control)
{
const char *tmp, *tmpinfile; /* we're just using this as a proxy for control->infile.
* Spares a compiler warning
*/
int fd_in = -1, fd_out = -1;
char header[MAGIC_LEN];
control->flags |= FLAG_MD5;
if (ENCRYPT)
if (unlikely(!get_hash(control, 1)))
retu... | 0 | [
"CWE-703"
] | lrzip | 4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4 | 208,083,406,339,714,750,000,000,000,000,000,000,000 | 133 | Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. |
clump_splay_walk_bwd_init(clump_splay_walker *sw, const gs_ref_memory_t *mem)
{
clump_t *cp = mem->root;
if (cp)
{
SANITY_CHECK(cp);
sw->from = SPLAY_FROM_RIGHT;
while (cp->right)
{
cp = cp->right;
}
}
sw->cp = cp;
sw->end = NULL;
return ... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 330,938,783,271,624,440,000,000,000,000,000,000,000 | 18 | Bug 697985: bounds check the array allocations methods
The clump allocator has four allocation functions that use 'number of elements'
and 'size of elements' parameters (rather than a simple 'number of bytes').
Those need specific bounds checking. |
ServerSecurityFeature::ServerSecurityFeature(application_features::ApplicationServer& server)
: ApplicationFeature(server, "ServerSecurity"),
_enableFoxxApi(true),
_enableFoxxStore(true),
_hardenedRestApi(false) {
setOptional(false);
startsAfter<application_features::GreetingsFeaturePhase>();
... | 1 | [
"CWE-918"
] | arangodb | d9b7f019d2435f107b19a59190bf9cc27d5f34dd | 88,922,380,629,990,300,000,000,000,000,000,000,000 | 8 | [APM-78] Disable installation from remote URL (#15292) |
bool check_table_name(const char *name, size_t length, bool check_for_path_chars)
{
// name length in symbols
size_t name_length= 0;
const char *end= name+length;
if (!check_for_path_chars &&
(check_for_path_chars= check_mysql50_prefix(name)))
{
name+= MYSQL50_TABLE_NAME_PREFIX_LENGTH;
length-=... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 216,313,557,817,959,080,000,000,000,000,000,000,000 | 64 | 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. |
RGWPutMetadataAccount()
: new_quota_extracted(false),
has_policy(false) {
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 35,307,806,513,478,792,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static gpa_t translate_gpa(struct kvm_vcpu *vcpu, gpa_t gpa, u32 access)
{
return gpa;
} | 0 | [
"CWE-200"
] | kvm | 831d9d02f9522e739825a51a11e3bc5aa531a905 | 244,662,615,490,624,730,000,000,000,000,000,000,000 | 4 | 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... |
GF_Err gf_filter_push_caps(GF_Filter *filter, u32 code, GF_PropertyValue *value, const char *name, u32 flags, u8 priority)
{
u32 nb_caps;
GF_FilterCapability *caps;
if (! (filter->freg->flags & GF_FS_REG_CUSTOM)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_FILTER, ("Attempt to push cap on non custom filter %s\n", filter->freg->... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 275,158,582,302,154,050,000,000,000,000,000,000,000 | 21 | fixed crashes for very long path - cf #1908 |
static int asepcos_init(sc_card_t *card)
{
unsigned long flags;
card->name = "Athena ASEPCOS";
card->cla = 0x00;
/* in case of a Java card try to select the ASEPCOS applet */
if (card->type == SC_CARD_TYPE_ASEPCOS_JAVA) {
int r = asepcos_select_asepcos_applet(card);
if (r != SC_SUCCESS)
return SC_ERROR_I... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 45,589,597,555,734,450,000,000,000,000,000,000,000 | 30 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
lyd_validate_modules(struct lyd_node **node, const struct lys_module **modules, int mod_count, int options, ...)
{
struct ly_ctx *ctx;
struct lyd_difflist **diff = NULL;
va_list ap;
if (!node || !modules || !mod_count) {
LOGARG;
return EXIT_FAILURE;
}
ctx = modules[0]->ctx;
... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 110,828,117,343,628,270,000,000,000,000,000,000,000 | 41 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
verify_proc_self_fd (const char *proc_path,
GError **error)
{
char path_buffer[PATH_MAX + 1];
ssize_t symlink_size;
symlink_size = readlink (proc_path, path_buffer, PATH_MAX);
if (symlink_size < 0)
return glnx_null_throw_errno_prefix (error, "readlink");
path_buffer[symlink_size] = ... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 167,620,003,522,235,710,000,000,000,000,000,000,000 | 32 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static WERROR dns_process_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
DATA_BLOB *out)
{
struct dns_process_state *state = tevent_req_data(
req, struct dns_process_state);
enum ndr_err_code ndr_err;
WERROR ret;
if (tevent_req_is_werror(req, &ret)) {
return ret;
}
if (state->dns_err != DNS_RCOD... | 0 | [
"CWE-20"
] | samba | 392ec4d241eb19c812cd49ff73bd32b2b09d8533 | 298,126,228,457,710,270,000,000,000,000,000,000,000 | 49 | bug #10609: CVE-2014-0239 Don't reply to replies
Due to insufficient input checking, the DNS server will reply to a packet that
has the "reply" bit set. Over UDP, this allows to send a packet with a spoofed
sender address and have two servers DOS each other with circular replies.
This patch fixes bug #10609 and adds ... |
Status AuthorizationManager::_buildPrivilegeSetFromExtendedPrivilegeDocument(
const std::string& dbname,
const PrincipalName& principal,
const BSONObj& privilegeDocument,
PrivilegeSet* result) {
if (!privilegeDocument[READONLY_FIELD_NAME].eoo()) {
... | 0 | [
"CWE-264"
] | mongo | 23344f8b7506df694f66999693ee3c00dfd6afae | 76,333,955,251,731,590,000,000,000,000,000,000,000 | 52 | SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user.
Uncorrected, this can cause replica set heartbeats to stall behind operations
that hold the read lock for a long time. |
int gnutls_x509_aki_set_cert_issuer(gnutls_x509_aki_t aki,
unsigned int san_type,
const gnutls_datum_t * san,
const char *othername_oid,
const gnutls_datum_t * serial)
{
int ret;
gnutls_datum_t t_san, t_othername_oid = { NULL, 0 };
ret = _gnutls_set_datum(&aki->serial, serial->data, ... | 0 | [] | gnutls | d6972be33264ecc49a86cd0958209cd7363af1e9 | 25,854,872,270,239,974,000,000,000,000,000,000,000 | 39 | eliminated double-free in the parsing of dist points
Reported by Robert Święcki. |
static void vmx_save_host_state(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
int i;
if (vmx->host_state.loaded)
return;
vmx->host_state.loaded = 1;
/*
* Set host fs and gs selectors. Unfortunately, 22.2.3 does not
* allow segment selectors with cpl > 0 or ti == 1.
*/
vmx->host_state.ld... | 1 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 220,875,907,387,633,250,000,000,000,000,000,000,000 | 50 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
unsigned lodepng_inflate(unsigned char** out, size_t* outsize,
const unsigned char* in, size_t insize,
const LodePNGDecompressSettings* settings)
{
unsigned error;
ucvector v;
ucvector_init_buffer(&v, *out, *outsize);
error = lodepng_inflatev(&v, in, insize, set... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 274,109,824,794,090,600,000,000,000,000,000,000,000 | 12 | Fixed #5645: realloc return handling |
assert(ds->rep->dasher_ctx->init_seg);
assert(ds->rep->dasher_ctx->src_url);
assert(ds->rep->dasher_ctx->template_seg);
}
}
void dasher_context_update_period_start(GF_DasherCtx *ctx)
{
u32 i, j, count;
if (!ctx->mpd) return;
count = gf_list_count(ctx->current_period->streams);
for (i=0; i<count; i++) {
... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 105,783,294,440,741,820,000,000,000,000,000,000,000 | 56 | fixed #2138 |
struct snd_info_entry *snd_info_create_module_entry(struct module * module,
const char *name,
struct snd_info_entry *parent)
{
if (!parent)
parent = snd_proc_root;
return snd_info_create_entry(name, parent, module);
} | 0 | [
"CWE-416"
] | linux | 8c2f870890fd28e023b0fcf49dcee333f2c8bad7 | 208,934,764,339,587,720,000,000,000,000,000,000,000 | 8 | ALSA: info: Fix racy addition/deletion of nodes
The ALSA proc helper manages the child nodes in a linked list, but its
addition and deletion is done without any lock. This leads to a
corruption if they are operated concurrently. Usually this isn't a
problem because the proc entries are added sequentially in the driv... |
PHP_GSHUTDOWN_FUNCTION(openssl)
{
if (openssl_globals->errors) {
pefree(openssl_globals->errors, 1);
}
} | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 306,563,088,233,052,250,000,000,000,000,000,000,000 | 6 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
intrusive_ptr<Expression> ExpressionDateToParts::parse(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
BSONElement expr,
const VariablesParseState& vps) {
uassert(40524,
"$dateToParts only supports an object as its argument",
expr.type() == BSONType::Object);
BSONEl... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 190,714,538,404,524,800,000,000,000,000,000,000,000 | 38 | SERVER-43699 $mod should not overflow for large negative values |
static int sta_info_hash_del(struct ieee80211_local *local,
struct sta_info *sta)
{
struct sta_info *s;
s = rcu_dereference_protected(local->sta_hash[STA_HASH(sta->sta.addr)],
lockdep_is_held(&local->sta_mtx));
if (!s)
return -ENOENT;
if (s == sta) {
rcu_assign_pointer(local->sta_hash[STA_HAS... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 38,757,313,521,951,580,000,000,000,000,000,000,000 | 26 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
std::string getDeviceCacheFilename(cl_device_id & d, const size_t & inverseSize) {
const auto uniqueId = getUniqueDeviceIdentifier(d);
return "cache-opencl." + toString(inverseSize) + "." + toString(uniqueId);
} | 0 | [
"CWE-703"
] | profanity | 69ff010c14ff80ec14246772db6a245aa59e6689 | 282,526,918,690,439,200,000,000,000,000,000,000,000 | 4 | [FIX] pritive key seed . |
static void tulip_dump_rx_descriptor(TULIPState *s,
struct tulip_descriptor *desc)
{
trace_tulip_descriptor("RX ", s->current_rx_desc,
desc->status, desc->control >> 22,
desc->control & 0x7ff, (desc->control >> 11) & 0x7ff,
desc->buf_addr1, desc->buf_addr2);
} | 0 | [
"CWE-787"
] | qemu | 8ffb7265af64ec81748335ec8f20e7ab542c3850 | 279,332,550,325,195,700,000,000,000,000,000,000,000 | 8 | net: tulip: check frame size and r/w data length
Tulip network driver while copying tx/rx buffers does not check
frame size against r/w data length. This may lead to OOB buffer
access. Add check to avoid it.
Limit iterations over descriptors to avoid potential infinite
loop issue in tulip_xmit_list_update.
Reported-... |
poolGrow(STRING_POOL *pool) {
if (pool->freeBlocks) {
if (pool->start == 0) {
pool->blocks = pool->freeBlocks;
pool->freeBlocks = pool->freeBlocks->next;
pool->blocks->next = NULL;
pool->start = pool->blocks->s;
pool->end = pool->start + pool->blocks->size;
pool->ptr = pool->st... | 0 | [
"CWE-611",
"CWE-776",
"CWE-415",
"CWE-125"
] | libexpat | c20b758c332d9a13afbbb276d30db1d183a85d43 | 58,403,176,662,152,890,000,000,000,000,000,000,000 | 102 | xmlparse.c: Deny internal entities closing the doctype |
static void fib6_dump_end(struct netlink_callback *cb)
{
struct fib6_walker_t *w = (void*)cb->args[2];
if (w) {
if (cb->args[4]) {
cb->args[4] = 0;
fib6_walker_unlink(w);
}
cb->args[2] = 0;
kfree(w);
}
cb->done = (void*)cb->args[3];
cb->args[1] = 3;
} | 0 | [
"CWE-399"
] | linux | 307f2fb95e9b96b3577916e73d92e104f8f26494 | 162,761,785,229,251,380,000,000,000,000,000,000,000 | 15 | ipv6: only static routes qualify for equal cost multipathing
Static routes in this case are non-expiring routes which did not get
configured by autoconf or by icmpv6 redirects.
To make sure we actually get an ecmp route while searching for the first
one in this fib6_node's leafs, also make sure it matches the ecmp ro... |
void btrfs_add_dropped_root(struct btrfs_trans_handle *trans,
struct btrfs_root *root)
{
struct btrfs_fs_info *fs_info = root->fs_info;
struct btrfs_transaction *cur_trans = trans->transaction;
/* Add ourselves to the transaction dropped list */
spin_lock(&cur_trans->dropped_roots_lock);
list_add_tail(&roo... | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 50,863,561,011,276,190,000,000,000,000,000,000,000 | 18 | 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... |
MagickExport void DestroyImageProfiles(Image *image)
{
if (image->profiles != (SplayTreeInfo *) NULL)
image->profiles=DestroySplayTree((SplayTreeInfo *) image->profiles);
} | 0 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 261,848,948,908,798,630,000,000,000,000,000,000,000 | 5 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
bit_read_T (Bit_Chain *restrict dat)
{
if (dat->version >= R_2007)
return (BITCODE_T)bit_read_TU (dat);
else
return (BITCODE_T)bit_read_TV (dat);
} | 0 | [
"CWE-703",
"CWE-125"
] | libredwg | 95cc9300430d35feb05b06a9badf678419463dbe | 101,969,681,609,848,050,000,000,000,000,000,000,000 | 7 | encode: protect from stack under-flow
From GH #178 fuzzing |
static uint16_t nvme_finish_zone(NvmeNamespace *ns, NvmeZone *zone,
NvmeZoneState state, NvmeRequest *req)
{
return nvme_zrm_finish(ns, zone);
} | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 10,894,001,504,700,810,000,000,000,000,000,000,000 | 5 | hw/nvme: fix CVE-2021-3929
This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the
device itself. This still allows DMA to MMIO regions of other devices
(e.g. doing P2P DMA to the controller memory buffer of another NVMe
device).
Fixes: CVE-2021-3929
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Review... |
static void _remove_job_running_prolog(uint32_t job_id)
{
ListIterator iter;
uint32_t *job_running_prolog;
bool found = false;
slurm_mutex_lock(&conf->prolog_running_lock);
iter = list_iterator_create(conf->prolog_running_jobs);
while ((job_running_prolog = list_next(iter))) {
if (*job_running_prolog == job_... | 0 | [
"CWE-284"
] | slurm | 92362a92fffe60187df61f99ab11c249d44120ee | 288,659,683,783,478,800,000,000,000,000,000,000,000 | 24 | Fix security issue in _prolog_error().
Fix security issue caused by insecure file path handling triggered by
the failure of a Prolog script. To exploit this a user needs to
anticipate or cause the Prolog to fail for their job.
(This commit is slightly different from the fix to the 15.08 branch.)
CVE-2016-10030. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.