func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static PyObject *Adapter_start_response(AdapterObject *self, PyObject *args)
{
PyObject *result = NULL;
PyObject *status_line = NULL;
PyObject *headers = NULL;
PyObject *exc_info = Py_None;
PyObject *status_line_as_bytes = NULL;
PyObject *headers_as_bytes = NULL;
if (!self->r) {
P... | 0 | [
"CWE-254"
] | mod_wsgi | 545354a80b9cc20d8b6916ca30542eab36c3b8bd | 3,061,132,230,730,296,500,000,000,000,000,000,000 | 77 | When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state. |
char *X509_TRUST_get0_name(X509_TRUST *xp)
{
return xp->name;
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 267,087,499,524,007,400,000,000,000,000,000,000,000 | 4 | Backport OCSP fixes. |
static void xfm_error(struct tree *xfm, const char *msg) {
char *v = strdup(msg);
char *l = strdup("error");
if (l == NULL || v == NULL)
return;
tree_append(xfm, l, v);
} | 0 | [] | augeas | 051c73a9a7ffe9e525f6f0a1b8f5198ff8cc6752 | 294,860,764,382,698,680,000,000,000,000,000,000,000 | 8 | Fix regression in permissions of created files
Commit 16387744 changed temporary file creation to use mkstemp, resulting in
new files being created with 0600 permissions. For brand new files created
through Augeas, their permissions stayed at 0600 rather than being set by the
umask as before.
* src/transform.c (tr... |
uint64 EbmlElementSize(uint64 type, uint64 value) {
return EbmlElementSize(type, value, 0);
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 146,275,359,372,499,550,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
bash_event_hook ()
{
/* If we're going to longjmp to top_level, make sure we clean up readline.
check_signals will call QUIT, which will eventually longjmp to top_level,
calling run_interrupt_trap along the way. The check for sigalrm_seen is
to clean up the read builtin's state. */
if (terminating_s... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 160,879,460,893,384,000,000,000,000,000,000,000,000 | 12 | Bash-4.4 patch 7 |
iperf_get_test_get_server_output(struct iperf_test *ipt)
{
return ipt->get_server_output;
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 109,360,347,223,960,040,000,000,000,000,000,000,000 | 4 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
static Image *ReadJP2Image(const ImageInfo *image_info,ExceptionInfo *exception)
{
const char
*option;
Image
*image;
int
jp2_status;
MagickBooleanType
status;
opj_codec_t
*jp2_codec;
opj_dparameters_t
parameters;
opj_image_t
*jp2_image;
opj_stream_t
*jp2_stream;
... | 0 | [
"CWE-665"
] | ImageMagick | 90c4afcde1bf3ad5aead4477716161c350b049f8 | 178,609,751,982,075,100,000,000,000,000,000,000,000 | 282 | https://github.com/ImageMagick/ImageMagick/issues/1518 |
static void vhost_scsi_ctl_handle_kick(struct vhost_work *work)
{
pr_debug("%s: The handling func for control queue.\n", __func__);
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 59c816c1f24df0204e01851431d3bab3eb76719c | 93,097,050,143,580,470,000,000,000,000,000,000,000 | 4 | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... |
static int ssl_rsa_decrypt( void *ctx,
int (*f_rng)(void *, unsigned char *, size_t),
void *p_rng, int mode, size_t *olen,
const unsigned char *input, unsigned char *output,
size_t output_max_len )
{
return rsa_pkcs1_dec... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 58,833,855,150,109,940,000,000,000,000,000,000,000 | 9 | RSA blinding on CRT operations to counter timing attacks |
**/
Tfloat linear_atXYZC(const float fx, const float fy, const float fz, const float fc, const T& out_value) const {
const int
x = (int)fx - (fx>=0?0:1), nx = x + 1,
y = (int)fy - (fy>=0?0:1), ny = y + 1,
z = (int)fz - (fz>=0?0:1), nz = z + 1,
c = (int)fc - (fc>=0?0:1), nc ... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 37,655,790,581,854,157,000,000,000,000,000,000,000 | 38 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void bm_evict_inode(struct inode *inode)
{
clear_inode(inode);
kfree(inode->i_private);
} | 0 | [
"CWE-200"
] | linux-2.6 | b66c5984017533316fd1951770302649baf1aa33 | 42,175,784,199,791,713,000,000,000,000,000,000,000 | 5 | exec: do not leave bprm->interp on stack
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and... |
static int huft_build(const unsigned *b, const unsigned n,
const unsigned s, const unsigned short *d,
const unsigned char *e, huft_t **t, unsigned *m)
{
unsigned a; /* counter for codes of length k */
unsigned c[BMAX + 1]; /* bit length count table */
unsigned eob_len; /* length of end-of-b... | 1 | [
"CWE-476"
] | busybox | 1de25a6e87e0e627aa34298105a3d17c60a1f44e | 69,924,166,591,076,525,000,000,000,000,000,000,000 | 175 | unzip: test for bad archive SEGVing
function old new delta
huft_build 1296 1300 +4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> |
handle_update_in_thread_func (GTask *task,
gpointer source_object,
gpointer task_data,
GCancellable *cancellable)
{
PortalFlatpakUpdateMonitor *monitor = source_object;
UpdateMonitorData *m = update_monitor_get_data (monitor);... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 197,833,277,865,661,430,000,000,000,000,000,000,000 | 53 | 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 CImg<T> get_load_inr(const char *const filename, float *const voxel_size=0) {
return CImg<T>().load_inr(filename,voxel_size);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 84,980,554,923,391,390,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int determine_cipher_type(struct fscrypt_info *ci, struct inode *inode,
const char **cipher_str_ret, int *keysize_ret)
{
if (S_ISREG(inode->i_mode)) {
if (ci->ci_data_mode == FS_ENCRYPTION_MODE_AES_256_XTS) {
*cipher_str_ret = "xts(aes)";
*keysize_ret = FS_AES_256_XTS_KEY_SIZE;
return 0;
}
p... | 0 | [
"CWE-416",
"CWE-476"
] | linux | 1b53cf9815bb4744958d41f3795d5d5a1d365e2d | 56,436,063,930,936,180,000,000,000,000,000,000,000 | 31 | fscrypt: remove broken support for detecting keyring key revocation
Filesystem encryption ostensibly supported revoking a keyring key that
had been used to "unlock" encrypted files, causing those files to become
"locked" again. This was, however, buggy for several reasons, the most
severe of which was that when key r... |
xmlSchemaCheckElementDeclConsistent(xmlSchemaParserCtxtPtr pctxt,
xmlSchemaBasicItemPtr ctxtComponent,
xmlSchemaParticlePtr ctxtParticle,
xmlSchemaParticlePtr searchParticle,
xmlSchemaParticlePtr curParticle,
int search)
{
return(0);
int ret = 0;
xmlSchemaParticlePtr... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 222,630,376,885,481,540,000,000,000,000,000,000,000 | 104 | 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. |
int dtls1_dispatch_alert(SSL *s)
{
int i, j;
void (*cb) (const SSL *ssl, int type, int val) = NULL;
unsigned char buf[DTLS1_AL_HEADER_LENGTH];
unsigned char *ptr = &buf[0];
s->s3->alert_dispatch = 0;
memset(buf, 0x00, sizeof(buf));
*ptr++ = s->s3->send_alert[0];
*ptr++ = s->s3->send_al... | 0 | [
"CWE-189"
] | openssl | b77ab018b79a00f789b0fb85596b446b08be4c9d | 295,364,903,227,056,360,000,000,000,000,000,000,000 | 62 | Fix DTLS replay protection
The DTLS implementation provides some protection against replay attacks
in accordance with RFC6347 section 4.1.2.6.
A sliding "window" of valid record sequence numbers is maintained with
the "right" hand edge of the window set to the highest sequence number we
have received so far. Records ... |
static void test_bug6049()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[1];
MYSQL_RES *res;
MYSQL_ROW row;
const char *stmt_text;
char buffer[30];
ulong length;
int rc;
myheader("test_bug6049");
stmt_text= "SELECT MAKETIME(-25, 12, 12)";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
my... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 255,813,629,169,167,600,000,000,000,000,000,000,000 | 47 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
void MirrorJob::InitSets()
{
if(FlagSet(TARGET_FLAT) && !parent_mirror && target_set)
source_set->Sort(FileSet::BYNAME_FLAT);
source_set->Count(NULL,&stats.tot_files,&stats.tot_symlinks,&stats.tot_files);
to_rm=new FileSet(target_set);
to_rm->SubtractAny(source_set);
if(FlagSet(DELETE_EXCLUDED)... | 0 | [
"CWE-20",
"CWE-401"
] | lftp | a27e07d90a4608ceaf928b1babb27d4d803e1992 | 188,904,350,674,090,800,000,000,000,000,000,000,000 | 103 | mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452) |
static TEE_Result tee_svc_update_out_param(
struct tee_ta_param *param,
void *tmp_buf_va[TEE_NUM_PARAMS],
struct utee_params *usr_param)
{
size_t n;
uint64_t *vals = usr_param->vals;
for (n = 0; n < TEE_NUM_PARAMS; n++) {
switch (TEE_PARAM_TYPE_GET(param->types, n)) {
case TEE_PARAM_TYPE_MEMREF_OUTPUT:
... | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | d5c5b0b77b2b589666024d219a8007b3f5b6faeb | 152,180,582,829,434,460,000,000,000,000,000,000,000 | 46 | core: svc: always check ta parameters
Always check TA parameters from a user TA. This prevents a user TA from
passing invalid pointers to a pseudo TA.
Fixes: OP-TEE-2018-0007: "Buffer checks missing when calling pseudo
TAs".
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Tested-by: Joakim Bech <joakim.bec... |
main(int argc,char *argv[])
{
unsigned char fpr[20];
char *uri;
int i;
if (argc < 2)
{
fprintf (stderr, "usage: pka mail-addresses\n");
return 1;
}
argc--;
argv++;
for (; argc; argc--, argv++)
{
uri = get_pka_info ( *argv, fpr );
printf ("%s", *argv);
if (uri)
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 213,396,694,160,201,900,000,000,000,000,000,000,000 | 31 | 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 ... |
static void schedule_async_request(struct winbindd_child *child)
{
struct winbindd_async_request *request = child->requests;
if (request == NULL) {
return;
}
if (child->event.flags != 0) {
return; /* Busy */
}
if ((child->pid == 0) && (!fork_domain_child(child))) {
/* Cancel all outstanding requests */
... | 0 | [] | samba | c93d42969451949566327e7fdbf29bfcee2c8319 | 265,063,508,268,353,080,000,000,000,000,000,000,000 | 33 | Back-port of Volkers fix.
Fix a race condition in winbind leading to a crash
When SIGCHLD handling is delayed for some reason, sending a request to a child
can fail early because the child has died already. In this case
async_main_request_sent() directly called the continuation function without
pr... |
static struct socket *get_socket(int fd)
{
struct socket *sock;
/* special case to disable backend */
if (fd == -1)
return NULL;
sock = get_raw_socket(fd);
if (!IS_ERR(sock))
return sock;
sock = get_tap_socket(fd);
if (!IS_ERR(sock))
return sock;
return ERR_PTR(-ENOTSOCK);
} | 0 | [
"CWE-399"
] | linux | dd7633ecd553a5e304d349aa6f8eb8a0417098c5 | 240,773,782,291,057,300,000,000,000,000,000,000,000 | 15 | vhost-net: fix use-after-free in vhost_net_flush
vhost_net_ubuf_put_and_wait has a confusing name:
it will actually also free it's argument.
Thus since commit 1280c27f8e29acf4af2da914e80ec27c3dbd5c01
"vhost-net: flush outstanding DMAs on memory change"
vhost_net_flush tries to use the argument after passing it
to ... |
static int nfc_llcp_setsockopt(struct socket *sock, int level, int optname,
sockptr_t optval, unsigned int optlen)
{
struct sock *sk = sock->sk;
struct nfc_llcp_sock *llcp_sock = nfc_llcp_sock(sk);
u32 opt;
int err = 0;
pr_debug("%p optname %d\n", sk, optname);
if (level != SOL_NFC)
return -ENOPROTO... | 0 | [] | net | c61760e6940dd4039a7f5e84a6afc9cdbf4d82b6 | 41,461,758,266,238,230,000,000,000,000,000,000,000 | 72 | net/nfc: fix use-after-free llcp_sock_bind/connect
Commits 8a4cd82d ("nfc: fix refcount leak in llcp_sock_connect()")
and c33b1cc62 ("nfc: fix refcount leak in llcp_sock_bind()")
fixed a refcount leak bug in bind/connect but introduced a
use-after-free if the same local is assigned to 2 different sockets.
This can be... |
void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs)
{
ram_addr_t ram_addr;
MemoryRegion *mr;
hwaddr l = 1;
mr = address_space_translate(as, addr, &addr, &l, false, attrs);
if (!memory_region_is_ram(mr)) {
return;
}
ram_addr = memory_region_get_ram_addr(mr)... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 317,073,853,910,934,870,000,000,000,000,000,000,000 | 14 | Fix crash when mapping a big memory and calling uc_close |
static inline void authenticate_cookie(void)
{
/* If we don't have an auth_filter, consider all cookies valid, and thus return early. */
if (!ctx.cfg.auth_filter) {
ctx.env.authenticated = 1;
return;
}
/* If we're having something POST'd to /login, we're authenticating POST,
* instead of the cookie, so call ... | 0 | [] | cgit | 1c581a072651524f3b0d91f33e22a42c4166dd96 | 47,302,798,376,065,070,000,000,000,000,000,000,000 | 21 | ui-blob: Do not accept mimetype from user |
int check_srvr_ecc_cert_and_alg(X509 *x, SSL_CIPHER *cs)
{
unsigned long alg = cs->algorithms;
EVP_PKEY *pkey = NULL;
int keysize = 0;
int signature_nid = 0;
if (SSL_C_IS_EXPORT(cs))
{
/* ECDH key length in export ciphers must be <= 163 bits */
pkey = X509_get_pubkey(x);
if (pkey == NULL) return 0;
key... | 0 | [
"CWE-310"
] | openssl | c6a876473cbff0fd323c8abcaace98ee2d21863d | 121,099,664,026,781,300,000,000,000,000,000,000,000 | 58 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
make_libversion (const char *libname, const char *(*getfnc)(const char*))
{
const char *s;
char *result;
if (maybe_setuid)
{
gcry_control (GCRYCTL_INIT_SECMEM, 0, 0); /* Drop setuid. */
maybe_setuid = 0;
}
s = getfnc (NULL);
result = xmalloc (strlen (libname) + 1 + strlen (s) + 1);
str... | 0 | [] | gnupg | abd5f6752d693b7f313c19604f0723ecec4d39a6 | 60,779,458,361,618,480,000,000,000,000,000,000,000 | 15 | dirmngr,gpgsm: Return NULL on fail
* dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
* sm/gpgsm.c (parse_keyserver_line): Ditto.
--
Reported-by: Joshua Rogers <git@internot.info>
"If something inside the ldapserver_parse_one function failed,
'server' would be freed, then returned, leading to a
... |
theme_adium_constructed (GObject *object)
{
EmpathyThemeAdiumPriv *priv = GET_PRIV (object);
const gchar *font_family = NULL;
gint font_size = 0;
WebKitWebView *webkit_view = WEBKIT_WEB_VIEW (object);
WebKitWebInspector *webkit_inspector;
/* Set default settings */
font_fa... | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 273,147,691,853,130,380,000,000,000,000,000,000,000 | 40 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
static int nl80211_stop_p2p_device(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct wireless_dev *wdev = info->user_ptr[1];
if (wdev->iftype != NL80211_IFTYPE_P2P_DEVICE)
return -EOPNOTSUPP;
if (!rdev->ops->stop_p2p_device)
return -EOPNOTSUPP;
... | 0 | [
"CWE-120"
] | linux | f88eb7c0d002a67ef31aeb7850b42ff69abc46dc | 10,383,782,839,363,222,000,000,000,000,000,000,000 | 15 | nl80211: validate beacon head
We currently don't validate the beacon head, i.e. the header,
fixed part and elements that are to go in front of the TIM
element. This means that the variable elements there can be
malformed, e.g. have a length exceeding the buffer size, but
most downstream code from this assumes that thi... |
static int parse_picture_header_intra(davs2_t *h, davs2_bs_t *bs)
{
int time_code_flag;
int progressive_frame;
int predict;
int i;
h->i_frame_type = AVS2_I_SLICE;
/* skip start code */
bs->i_bit_pos += 32;
u_v(bs, 32, "bbv_delay");
time_code_flag = u_v(bs, 1, ... | 0 | [
"CWE-787"
] | davs2 | b41cf117452e2d73d827f02d3e30aa20f1c721ac | 269,162,153,793,372,370,000,000,000,000,000,000,000 | 181 | Add checking for `frame_rate_code`.
Signed-off-by: luofl <falei.luo@gmail.com> |
bool parse_vcol_defs(THD *thd, MEM_ROOT *mem_root, TABLE *table,
bool *error_reported, vcol_init_mode mode)
{
CHARSET_INFO *save_character_set_client= thd->variables.character_set_client;
CHARSET_INFO *save_collation= thd->variables.collation_connection;
Query_arena *backup_stmt_arena_ptr= t... | 1 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 318,989,147,833,268,280,000,000,000,000,000,000,000 | 170 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
static int vhost_scsi_register_configfs(void)
{
struct target_fabric_configfs *fabric;
int ret;
pr_debug("vhost-scsi fabric module %s on %s/%s"
" on "UTS_RELEASE"\n", VHOST_SCSI_VERSION, utsname()->sysname,
utsname()->machine);
/*
* Register the top level struct config_item_type with TCM core
*/
fabric = ... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 59c816c1f24df0204e01851431d3bab3eb76719c | 6,578,595,844,588,284,000,000,000,000,000,000,000 | 48 | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... |
zfs_acl_valid_ace_type(uint_t type, uint_t flags)
{
uint16_t entry_type;
switch (type) {
case ALLOW:
case DENY:
case ACE_SYSTEM_AUDIT_ACE_TYPE:
case ACE_SYSTEM_ALARM_ACE_TYPE:
entry_type = flags & ACE_TYPE_FLAGS;
return (entry_type == ACE_OWNER ||
entry_type == OWNING_GROUP ||
entry_type == ACE_E... | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 306,795,040,800,929,600,000,000,000,000,000,000,000 | 20 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
f_winbufnr(typval_T *argvars, typval_T *rettv)
{
win_T *wp;
wp = find_win_by_nr_or_id(&argvars[0]);
if (wp == NULL)
rettv->vval.v_number = -1;
else
rettv->vval.v_number = wp->w_buffer->b_fnum;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 66,856,774,708,242,000,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. |
static u32 *ipv4_rt_blackhole_cow_metrics(struct dst_entry *dst,
unsigned long old)
{
return NULL;
} | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 153,964,883,034,818,650,000,000,000,000,000,000,000 | 5 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
ssize_t iov_iter_get_pages_alloc(struct iov_iter *i,
struct page ***pages, size_t maxsize,
size_t *start)
{
size_t offset = i->iov_offset;
const struct iovec *iov = i->iov;
size_t len;
unsigned long addr;
void *p;
int n;
int res;
len = iov->iov_len - offset;
if (len > i->count)
len = i->count;
if... | 0 | [
"CWE-17"
] | linux | f0d1bec9d58d4c038d0ac958c9af82be6eb18045 | 159,784,485,532,743,760,000,000,000,000,000,000,000 | 36 | new helper: copy_page_from_iter()
parallel to copy_page_to_iter(). pipe_write() switched to it (and became
->write_iter()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static void sixpack_close(struct tty_struct *tty)
{
struct sixpack *sp;
write_lock_irq(&disc_data_lock);
sp = tty->disc_data;
tty->disc_data = NULL;
write_unlock_irq(&disc_data_lock);
if (!sp)
return;
/*
* We have now ensured that nobody can start using ap from now on, but
* we have to wait for all exist... | 1 | [
"CWE-416"
] | linux | 0b9111922b1f399aba6ed1e1b8f2079c3da1aed8 | 249,805,018,278,643,940,000,000,000,000,000,000,000 | 33 | hamradio: defer 6pack kfree after unregister_netdev
There is a possible race condition (use-after-free) like below
(USE) | (FREE)
dev_queue_xmit |
__dev_queue_xmit |
__dev_xmit_skb |
sch_direct_xmit | ...
xmit_one |
... |
static int rdn_name_modify(struct ldb_module *module, struct ldb_request *req)
{
struct ldb_context *ldb;
const struct ldb_val *rdn_val_p;
struct ldb_message_element *e = NULL;
struct ldb_control *recalculate_rdn_control = NULL;
ldb = ldb_module_get_ctx(module);
/* do not manipulate our control entries */
if (... | 1 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 213,884,585,609,644,800,000,000,000,000,000,000,000 | 182 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
get_display_and_details_for_bus_sender (GdmManager *self,
GDBusConnection *connection,
const char *sender,
GdmDisplay **out_display,
char ... | 0 | [] | gdm | ff98b2817014684ae1acec78ff06f0f461a56a9f | 293,650,949,844,519,300,000,000,000,000,000,000,000 | 121 | manager: if falling back to X11 retry autologin
Right now, we get one shot to autologin. If it fails, we fall back to
the greeter. We should give it another go if the reason for the failure
was wayland fallback to X.
https://bugzilla.gnome.org/show_bug.cgi?id=780520 |
ChkFileUploadWriteErr(rfbClientPtr cl, rfbTightClientPtr rtcp, char* pBuf)
{
FileTransferMsg ftm;
unsigned long numOfBytesWritten = 0;
memset(&ftm, 0, sizeof(FileTransferMsg));
numOfBytesWritten = write(rtcp->rcft.rcfu.uploadFD, pBuf, rtcp->rcft.rcfu.fSize);
if(numOfBytesWritten != rtcp->rcft.rcfu.fSize) {
... | 0 | [
"CWE-416"
] | libvncserver | 73cb96fec028a576a5a24417b57723b55854ad7b | 36,172,249,247,487,710,000,000,000,000,000,000,000 | 17 | tightvnc-filetransfer: wait for download thread end in CloseUndoneFileDownload()
...and use it when deregistering the file transfer extension.
Closes #242 |
void opj_j2k_tcp_data_destroy (opj_tcp_t *p_tcp)
{
if (p_tcp->m_data) {
opj_free(p_tcp->m_data);
p_tcp->m_data = NULL;
p_tcp->m_data_size = 0;
}
} | 0 | [] | openjpeg | 0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0 | 283,076,098,776,723,450,000,000,000,000,000,000,000 | 8 | [trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492) |
callbacks_layer_tree_key_press (GtkWidget *widget, GdkEventKey *event, gpointer user_data) {
/* if space is pressed while a color picker icon is in focus,
show the color picker dialog. */
if(event->keyval == GDK_space){
GtkTreeView *tree;
GtkTreePath *path;
GtkTreeViewColumn *col;
gint *indices;
gint idx;... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 10,618,619,373,579,909,000,000,000,000,000,000,000 | 27 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
config_tinker(
config_tree *ptree
)
{
attr_val * tinker;
int item;
item = -1; /* quiet warning */
tinker = HEAD_PFIFO(ptree->tinker);
for (; tinker != NULL; tinker = tinker->link) {
switch (tinker->attr) {
default:
NTP_INSIST(0);
break;
case T_Allan:
item = LOOP_ALLAN;
break;
case T_Disp... | 0 | [
"CWE-20"
] | ntp | 52e977d79a0c4ace997e5c74af429844da2f27be | 128,592,760,261,371,040,000,000,000,000,000,000,000 | 47 | [Bug 1773] openssl not detected during ./configure.
[Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL. |
k5_asn1_encode_bool(asn1buf *buf, intmax_t val)
{
insert_byte(buf, val ? 0xFF : 0x00);
} | 0 | [
"CWE-674",
"CWE-787"
] | krb5 | 57415dda6cf04e73ffc3723be518eddfae599bfd | 55,775,380,115,599,210,000,000,000,000,000,000,000 | 4 | 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... |
R_API void r_anal_extract_rarg(RAnal *anal, RAnalOp *op, RAnalFunction *fcn, int *reg_set, int *count) {
int i, argc = 0;
r_return_if_fail (anal && op && fcn);
const char *opsreg = op->src[0] ? get_regname (anal, op->src[0]) : NULL;
const char *opdreg = op->dst ? get_regname (anal, op->dst) : NULL;
const int size ... | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 271,019,581,937,604,200,000,000,000,000,000,000,000 | 196 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
ssize_t tcp_sendpage(struct socket *sock, struct page *page, int offset,
size_t size, int flags)
{
ssize_t res;
struct sock *sk = sock->sk;
if (!(sk->sk_route_caps & NETIF_F_SG) ||
!(sk->sk_route_caps & NETIF_F_ALL_CSUM))
return sock_no_sendpage(sock, page, offset, size, flags);
lock_sock(sk);
TCP_... | 0 | [
"CWE-400",
"CWE-119",
"CWE-703"
] | linux | baff42ab1494528907bf4d5870359e31711746ae | 29,005,486,307,753,690,000,000,000,000,000,000,000 | 17 | net: Fix oops from tcp_collapse() when using splice()
tcp_read_sock() can have a eat skbs without immediately advancing copied_seq.
This can cause a panic in tcp_collapse() if it is called as a result
of the recv_actor dropping the socket lock.
A userspace program that splices data from a socket to either another
soc... |
char *findFill(node_t * n)
{
return (findFillDflt(n, DEFAULT_FILL));
} | 0 | [
"CWE-120"
] | graphviz | 784411ca3655c80da0f6025ab20634b2a6ff696b | 234,947,337,491,924,400,000,000,000,000,000,000,000 | 4 | fix: out-of-bounds write on invalid label
When the label for a node cannot be parsed (due to it being malformed), it falls
back on the symbol name of the node itself. I.e. the default label the node
would have had if it had no label attribute at all. However, this is applied by
dynamically altering the node's label to... |
void session_set_recv_message_notify(Session *session,
RecvMsgNotify notify_func, gpointer data)
{
session->recv_msg_notify = notify_func;
session->recv_msg_notify_data = data;
} | 0 | [] | claws | fcc25329049b6f9bd8d890f1197ed61eb12e14d5 | 259,535,937,661,205,620,000,000,000,000,000,000,000 | 6 | fix STARTTLS protocol violation
with thanks to, and patch by Damian Poddebniak and Hanno Böck |
get_seckey_byname (PKT_public_key *pk, const char *name)
{
gpg_error_t err;
strlist_t namelist = NULL;
int include_unusable = 1;
/* If we have no name, try to use the default secret key. If we
have no default, we'll use the first usable one. */
if (!name && opt.def_secret_key && *opt.def_secret_key)
... | 0 | [
"CWE-310"
] | gnupg | 4bde12206c5bf199dc6e12a74af8da4558ba41bf | 142,549,320,884,069,300,000,000,000,000,000,000,000 | 22 | gpg: Distinguish between missing and cleared key flags.
* include/cipher.h (PUBKEY_USAGE_NONE): New.
* g10/getkey.c (parse_key_usage): Set new flag.
--
We do not want to use the default capabilities (derived from the
algorithm) if any key flags are given in a signature. Thus if key
flags are used in any way, the def... |
ZEND_API int zend_ts_hash_minmax(TsHashTable *ht, compare_func_t compar, int flag, void **pData TSRMLS_DC)
{
int retval;
begin_read(ht);
retval = zend_hash_minmax(TS_HASH(ht), compar, flag, pData TSRMLS_CC);
end_read(ht);
return retval;
} | 0 | [] | php-src | 24125f0f26f3787c006e4a51611ba33ee3b841cb | 202,238,979,758,836,780,000,000,000,000,000,000,000 | 10 | Fixed bug #68676 (Explicit Double Free) |
static void ZSTD_reduceIndex (ZSTD_CCtx* zc, const U32 reducerValue)
{
ZSTD_matchState_t* const ms = &zc->blockState.matchState;
{ U32 const hSize = (U32)1 << zc->appliedParams.cParams.hashLog;
ZSTD_reduceTable(ms->hashTable, hSize, reducerValue);
}
if (zc->appliedParams.cParams.strategy != Z... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 170,446,796,246,225,460,000,000,000,000,000,000,000 | 20 | fixed T36302429 |
kill_threads_callback_arg(THD *thd_arg, LEX_USER *user_arg):
thd(thd_arg), user(user_arg) {} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 263,662,701,829,637,800,000,000,000,000,000,000,000 | 2 | 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... |
theme_adium_clear (EmpathyChatView *view)
{
EmpathyThemeAdiumPriv *priv = GET_PRIV (view);
theme_adium_load_template (EMPATHY_THEME_ADIUM (view));
/* Clear last contact to avoid trying to add a 'joined'
* message when we don't have an insertion point. */
if (priv->last_contact) {
g_object_unref (priv->last_co... | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 178,398,110,314,333,700,000,000,000,000,000,000,000 | 13 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
static inline unsigned short ScaleQuantumToShort(const Quantum quantum)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
return((unsigned short) (257UL*quantum));
#else
if (quantum <= 0.0)
return(0);
if ((257.0*quantum) >= 65535.0)
return(65535);
return((unsigned short) (257.0*quantum+0.5));
#endif
} | 1 | [
"CWE-190"
] | ImageMagick | 95d4e94e0353e503b71a53f5e6fad173c7c70c90 | 131,056,311,891,151,100,000,000,000,000,000,000,000 | 12 | https://github.com/ImageMagick/ImageMagick/issues/1751 |
xmlXPathCacheNewFloat(xmlXPathContextPtr ctxt, double val)
{
if ((ctxt != NULL) && (ctxt->cache)) {
xmlXPathContextCachePtr cache = (xmlXPathContextCachePtr) ctxt->cache;
if ((cache->numberObjs != NULL) &&
(cache->numberObjs->number != 0))
{
xmlXPathObjectPtr ret;
ret = (xmlXPathObjectPtr)
ca... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 165,548,715,694,111,780,000,000,000,000,000,000,000 | 36 | 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 |
QueryParams::size_type QueryParams::paramcount(const std::string& name) const
{
size_type count = 0;
for (size_type nn = 0; nn < _values.size(); ++nn)
if (_values[nn].name == name)
++count;
return count;
} | 0 | [
"CWE-399"
] | cxxtools | 142bb2589dc184709857c08c1e10570947c444e3 | 146,546,586,358,244,790,000,000,000,000,000,000,000 | 10 | fix parsing double % in query parameters |
int dlpar_attach_node(struct device_node *dn, struct device_node *parent)
{
int rc;
dn->parent = parent;
rc = of_attach_node(dn);
if (rc) {
printk(KERN_ERR "Failed to add device node %pOF\n", dn);
return rc;
}
return 0;
} | 0 | [
"CWE-476"
] | linux | efa9ace68e487ddd29c2b4d6dd23242158f1f607 | 11,661,262,431,224,115,000,000,000,000,000,000,000 | 14 | powerpc/pseries/dlpar: Fix a missing check in dlpar_parse_cc_property()
In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup().
kstrdup() may return NULL, so it should be checked and handle error.
And prop should be freed if 'prop->name' is NULL.
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
Signe... |
plpgsql_validator(PG_FUNCTION_ARGS)
{
Oid funcoid = PG_GETARG_OID(0);
HeapTuple tuple;
Form_pg_proc proc;
char functyptype;
int numargs;
Oid *argtypes;
char **argnames;
char *argmodes;
bool is_dml_trigger = false;
bool is_event_trigger = false;
int i;
/* Get the new function's pg_proc ent... | 1 | [
"CWE-264"
] | postgres | 537cbd35c893e67a63c59bc636c3e888bd228bc7 | 330,594,102,185,345,200,000,000,000,000,000,000,000 | 108 | Prevent privilege escalation in explicit calls to PL validators.
The primary role of PL validators is to be called implicitly during
CREATE FUNCTION, but they are also normal functions that a user can call
explicitly. Add a permissions check to each validator to ensure that a
user cannot use explicit validator calls ... |
static int vrend_draw_bind_samplers_shader(struct vrend_context *ctx,
int shader_type,
int next_sampler_id)
{
int index = 0;
uint32_t dirty = ctx->sub->sampler_views_dirty[shader_type];
uint32_t mask = ctx->sub->prog->sampl... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 65,172,788,959,294,640,000,000,000,000,000,000,000 | 59 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
line_construct_pts(LINE *line, Point *pt1, Point *pt2)
{
if (FPeq(pt1->x, pt2->x))
{ /* vertical */
/* use "x = C" */
line->A = -1;
line->B = 0;
line->C = pt1->x;
#ifdef GEODEBUG
printf("line_construct_pts- line is vertical\n");
#endif
}
else if (FPeq(pt1->y, pt2->y))
{ /* horizontal */
/* ... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 197,448,199,279,544,660,000,000,000,000,000,000,000 | 37 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
get_buffer_info(buf_T *buf)
{
dict_T *dict;
tabpage_T *tp;
win_T *wp;
list_T *windows;
dict = dict_alloc();
if (dict == NULL)
return NULL;
dict_add_number(dict, "bufnr", buf->b_fnum);
dict_add_string(dict, "name", buf->b_ffname);
dict_add_number(dict, "lnum", buf == curbuf ? curwi... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 39,203,504,379,705,645,000,000,000,000,000,000,000 | 50 | 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. |
TEST_F(RouterTest, UpstreamPerTryTimeout) {
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](Http::ResponseDecoder& decoder,
Http::ConnectionPool::Ca... | 0 | [
"CWE-703"
] | envoy | 5bf9b0f1e7f247a4eee7180849cb0823926f7fff | 137,612,961,112,371,090,000,000,000,000,000,000,000 | 45 | [1.21] CVE-2022-21655
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
QPDFNameTreeObjectHelper::updateMap(QPDFObjectHandle oh)
{
if (this->m->seen.count(oh.getObjGen()))
{
return;
}
this->m->seen.insert(oh.getObjGen());
QPDFObjectHandle names = oh.getKey("/Names");
if (names.isArray())
{
size_t nitems = names.getArrayNItems();
size_t i ... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 87,623,462,360,968,880,000,000,000,000,000,000,000 | 34 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
int ssl_check_clienthello_tlsext(SSL *s)
{
int ret=SSL_TLSEXT_ERR_NOACK;
int al = SSL_AD_UNRECOGNIZED_NAME;
#ifndef OPENSSL_NO_EC
/* The handling of the ECPointFormats extension is done elsewhere, namely in
* ssl3_choose_cipher in s3_lib.c.
*/
/* The handling of the EllipticCurves extension is done elsewhere... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 152,076,046,890,099,000,000,000,000,000,000,000,000 | 124 | Add Next Protocol Negotiation. |
static void lo_fsyncdir(fuse_req_t req, fuse_ino_t ino, int datasync,
struct fuse_file_info *fi)
{
int res;
struct lo_dirp *d;
int fd;
(void)ino;
d = lo_dirp(req, fi);
if (!d) {
fuse_reply_err(req, EBADF);
return;
}
fd = dirfd(d->dp);
if (da... | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 246,144,895,411,297,730,000,000,000,000,000,000,000 | 26 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
krb5_ticket_get_endtime(krb5_context context,
const krb5_ticket *ticket)
{
return ticket->ticket.endtime;
} | 0 | [
"CWE-345"
] | heimdal | 6dd3eb836bbb80a00ffced4ad57077a1cdf227ea | 46,566,824,111,172,470,000,000,000,000,000,000,000 | 5 | CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted version
stored in 'ticket'. Use of the unecrypted version provides an
opportunity for successful server impersonation... |
zone_detachdb(dns_zone_t *zone) {
REQUIRE(zone->db != NULL);
dns_db_detach(&zone->db);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 212,707,107,205,259,970,000,000,000,000,000,000,000 | 5 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
ClientRequestContext::clientAccessCheckDone(const allow_t &answer)
{
acl_checklist = NULL;
err_type page_id;
Http::StatusCode status;
debugs(85, 2, "The request " << http->request->method << ' ' <<
http->uri << " is " << answer <<
"; last ACL checked: " << (AclMatchedName ? AclMatc... | 0 | [
"CWE-116"
] | squid | e7cf864f938f24eea8af0692c04d16790983c823 | 302,966,671,514,876,660,000,000,000,000,000,000,000 | 87 | Handle more Range requests (#790)
Also removed some effectively unused code. |
static int br_multicast_add_group(struct net_bridge *br,
struct net_bridge_port *port,
struct br_ip *group)
{
struct net_bridge_mdb_entry *mp;
struct net_bridge_port_group *p;
struct net_bridge_port_group __rcu **pp;
unsigned long now = jiffies;
int err;
spin_lock(&br->multicast_lock);
if (!netif_ru... | 0 | [
"CWE-399"
] | linux | 6b0d6a9b4296fa16a28d10d416db7a770fc03287 | 329,324,791,886,772,000,000,000,000,000,000,000,000 | 61 | bridge: Fix mglist corruption that leads to memory corruption
The list mp->mglist is used to indicate whether a multicast group
is active on the bridge interface itself as opposed to one of the
constituent interfaces in the bridge.
Unfortunately the operation that adds the mp->mglist node to the
list neglected to che... |
send_key_attr (ctrl_t ctrl, app_t app, const char *keyword, int number)
{
char buffer[200];
int n_bits;
const char *curve_oid;
assert (number >=0 && number < DIM(app->app_local->keyattr));
if (app->app_local->keyattr[number].key_type == KEY_TYPE_RSA)
snprintf (buffer, sizeof buffer, "%d 1 %u %u %d",
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 116,496,407,892,915,940,000,000,000,000,000,000,000 | 33 | 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 ... |
static int16 TIFFClampDoubleToInt16( double val )
{
if( val > 32767 )
return 32767;
if( val < -32768 || val != val )
return -32768;
return (int16)val;
} | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 169,055,782,740,343,500,000,000,000,000,000,000,000 | 8 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
void jswrap_graphics_setFontCustom(JsVar *parent, JsVar *bitmap, int firstChar, JsVar *width, int height) {
JsGraphics gfx; if (!graphicsGetFromVar(&gfx, parent)) return;
if (!jsvIsString(bitmap)) {
jsExceptionHere(JSET_ERROR, "Font bitmap must be a String");
return;
}
if (firstChar<0 || firstChar>255)... | 0 | [
"CWE-125"
] | Espruino | 8a44b04b584b3d3ab1cb68fed410f7ecb165e50e | 108,342,518,189,691,920,000,000,000,000,000,000,000 | 26 | Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421) |
static __cold int io_uring_create(unsigned entries, struct io_uring_params *p,
struct io_uring_params __user *params)
{
struct io_ring_ctx *ctx;
struct file *file;
int ret;
if (!entries)
return -EINVAL;
if (entries > IORING_MAX_ENTRIES) {
if (!(p->flags & IORING_SETUP_CLAMP))
return -EINVAL;
entri... | 0 | [
"CWE-909",
"CWE-94"
] | linux | 32452a3eb8b64e01e2be717f518c0be046975b9d | 100,017,018,615,125,420,000,000,000,000,000,000,000 | 127 | io_uring: fix uninitialized field in rw io_kiocb
io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll
reads kiocb->private it can contain uninitialized data.
Fixes: 3e08773c3841 ("block: switch polling to be bio based")
Signed-off-by: Joseph Ravichandran <jravi@mit.edu>
Signed-off-by: Jens Axbo... |
nfs4_xdr_dec_setacl(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
void *data)
{
struct nfs_setaclres *res = data;
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (status)
goto out;
status = decode_sequence(xdr, &res->seq_res, rqstp);
if (status)
goto out;
status = d... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 103,356,111,619,209,400,000,000,000,000,000,000,000 | 20 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
bool commit(const Reservation& reservation) {
if (static_cast<const uint8_t*>(reservation.mem_) != base_ + reservable_ ||
reservable_ + reservation.len_ > capacity_ || reservable_ >= capacity_) {
// The reservation is not from this OwnedSlice.
return false;
}
reservable_ += reservation... | 0 | [
"CWE-401"
] | envoy | 5eba69a1f375413fb93fab4173f9c393ac8c2818 | 129,235,414,828,192,570,000,000,000,000,000,000,000 | 9 | [buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144)
Signed-off-by: antonio <avd@google.com> |
static int xmit_one(struct sk_buff *skb, struct net_device *dev,
struct netdev_queue *txq, bool more)
{
unsigned int len;
int rc;
if (dev_nit_active(dev))
dev_queue_xmit_nit(skb, dev);
len = skb->len;
trace_net_dev_start_xmit(skb, dev);
rc = netdev_start_xmit(skb, dev, txq, more);
trace_net_dev_xmit(s... | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 99,947,091,517,078,960,000,000,000,000,000,000,000 | 16 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
static char *genstr(char *prefix, int i) {
static char result[64] = {0};
snprintf(result, sizeof(result), "%s%d", prefix, i);
return result;
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 171,164,520,511,438,430,000,000,000,000,000,000,000 | 5 | 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... |
int isFileInDir(char *dir, char *file){
size_t length, dirLength;
char *fullpath = NULL;
FILE *f = NULL;
int foundFile = 0;
dirLength = strlen(dir);
/* Constuct 'full' path */
if (dir[dirLength-1] == DIR_SEPARATOR) {
/* remove trailing '/' */
dir[dirLength-1] = '\0';
dirLength--;
}
length = dirLength +... | 0 | [
"CWE-119"
] | openj9 | 0971f22d88f42cf7332364ad7430e9bd8681c970 | 172,531,877,943,474,950,000,000,000,000,000,000,000 | 31 | Clean up jio_snprintf and jio_vfprintf
Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659
Signed-off-by: Peter Bain <peter_bain@ca.ibm.com> |
_g_filename_is_hidden (const gchar *name)
{
if (name[0] != '.') return FALSE;
if (name[1] == '\0') return FALSE;
if ((name[1] == '.') && (name[2] == '\0')) return FALSE;
return TRUE;
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 261,684,889,405,961,340,000,000,000,000,000,000,000 | 8 | libarchive: sanitize filenames before extracting |
HttpHeader::removeHopByHopEntries()
{
removeConnectionHeaderEntries();
const HttpHeaderEntry *e;
HttpHeaderPos pos = HttpHeaderInitPos;
int headers_deleted = 0;
while ((e = getEntry(&pos))) {
Http::HdrType id = e->id;
if (Http::HeaderLookupTable.lookup(id).hopbyhop) {
de... | 0 | [
"CWE-444"
] | squid | 9c8e2a71aa1d3c159a319d9365c346c48dc783a5 | 171,666,948,157,497,600,000,000,000,000,000,000,000 | 15 | Enforce token characters for field-name (#700)
RFC 7230 defines field-name as a token. Request splitting and cache
poisoning attacks have used non-token characters to fool broken HTTP
agents behind or in front of Squid for years. This change should
significantly reduce that abuse.
If we discover exceptional situatio... |
main(
int argc,
char ** argv)
{
char *line = NULL;
char *qdisk = NULL;
char *qamdevice = NULL;
char *optstr = NULL;
char *err_extra = NULL;
char *s, *fp;
int ch;
dle_t *dle;
int level;
GSList *errlist;
am_level_t *alevel;
if (argc > 1 && argv && argv[1] && g_str... | 0 | [
"CWE-264"
] | amanda | 4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7 | 187,308,718,710,823,250,000,000,000,000,000,000,000 | 290 | * Add a /etc/amanda-security.conf file
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0 |
echo_string_core(
typval_T *tv,
char_u **tofree,
char_u *numbuf,
int copyID,
int echo_style,
int restore_copyID,
int composite_val)
{
static int recurse = 0;
char_u *r = NULL;
if (recurse >= DICT_MAXNEST)
{
if (!did_echo_string_emsg)
{
// Only give this message on... | 0 | [
"CWE-122",
"CWE-787"
] | vim | 605ec91e5a7330d61be313637e495fa02a6dc264 | 113,953,533,567,533,610,000,000,000,000,000,000,000 | 211 | patch 8.2.3847: illegal memory access when using a lambda with an error
Problem: Illegal memory access when using a lambda with an error.
Solution: Avoid skipping over the NUL after a string. |
static int perf_parse_file(config_fn_t fn, void *data)
{
int comment = 0;
int baselen = 0;
static char var[MAXNAME];
/* U+FEFF Byte Order Mark in UTF8 */
static const unsigned char *utf8_bom = (unsigned char *) "\xef\xbb\xbf";
const unsigned char *bomptr = utf8_bom;
for (;;) {
int c = get_next_char();
if (... | 0 | [
"CWE-94"
] | linux | aba8d056078e47350d85b06a9cabd5afcc4b72ea | 113,726,379,403,788,550,000,000,000,000,000,000,000 | 55 | perf tools: do not look at ./config for configuration
In addition to /etc/perfconfig and $HOME/.perfconfig, perf looks for
configuration in the file ./config, imitating git which looks at
$GIT_DIR/config. If ./config is not a perf configuration file, it
fails, or worse, treats it as a configuration file and changes b... |
has_trash_files (GMount *mount)
{
GList *dirs, *l;
GFile *dir;
gboolean res;
dirs = get_trash_dirs_for_mount (mount);
res = FALSE;
for (l = dirs; l != NULL; l = l->next)
{
dir = l->data;
if (dir_has_files (dir))
{
res = TRUE;
break;
... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 26,574,806,076,724,130,000,000,000,000,000,000,000 | 25 | 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... |
static void _reset_coll_ring(pmixp_coll_ring_ctx_t *coll_ctx)
{
pmixp_coll_t *coll = _ctx_get_coll(coll_ctx);
#ifdef PMIXP_COLL_DEBUG
PMIXP_DEBUG("%p: called", coll_ctx);
#endif
pmixp_coll_ring_ctx_sanity_check(coll_ctx);
coll_ctx->in_use = false;
coll_ctx->state = PMIXP_COLL_RING_SYNC;
coll_ctx->contrib_local = ... | 0 | [
"CWE-120"
] | slurm | c3142dd87e06621ff148791c3d2f298b5c0b3a81 | 62,601,032,533,090,620,000,000,000,000,000,000,000 | 16 | PMIx - fix potential buffer overflows from use of unpackmem().
CVE-2020-27745. |
int proc_setattr(struct dentry *dentry, struct iattr *attr)
{
int error;
struct inode *inode = d_inode(dentry);
if (attr->ia_valid & ATTR_MODE)
return -EPERM;
error = setattr_prepare(dentry, attr);
if (error)
return error;
setattr_copy(inode, attr);
mark_inode_dirty(inode);
return 0;
} | 0 | [
"CWE-119"
] | linux | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | 290,138,732,140,709,700,000,000,000,000,000,000,000 | 16 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... |
int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
{
unsigned long old_cr0 = kvm_read_cr0(vcpu);
unsigned long update_bits = X86_CR0_PG | X86_CR0_WP |
X86_CR0_CD | X86_CR0_NW;
cr0 |= X86_CR0_ET;
#ifdef CONFIG_X86_64
if (cr0 & 0xffffffff00000000UL)
return 1;
#endif
cr0 &= ~CR0_RESERVED_BITS;
i... | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 272,132,524,705,528,900,000,000,000,000,000,000,000 | 49 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
static int bond_release_and_destroy(struct net_device *bond_dev,
struct net_device *slave_dev)
{
struct bonding *bond = netdev_priv(bond_dev);
int ret;
ret = bond_release(bond_dev, slave_dev);
if ((ret == 0) && (bond->slave_cnt == 0)) {
bond_dev->priv_flags |= IFF_DISABLE_NETPOLL;
pr_info("%s: destro... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 326,323,409,616,778,620,000,000,000,000,000,000,000 | 15 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
CBINDInstallDlg::CBINDInstallDlg(CWnd* pParent /*=NULL*/)
: CDialog(CBINDInstallDlg::IDD, pParent) {
char winsys[MAX_PATH];
//{{AFX_DATA_INIT(CBINDInstallDlg)
m_targetDir = _T("");
m_version = _T("");
m_toolsOnly = FALSE;
m_autoStart = FALSE;
m_keepFiles = FALSE;
m_current = _T("");
m_startOnInstall = FALSE;... | 0 | [
"CWE-284"
] | bind9 | 967a3b9419a3c12b8c0870c86d1ee3840bcbbad7 | 268,491,912,669,300,540,000,000,000,000,000,000,000 | 35 | [master] quote service registry paths
4532. [security] The BIND installer on Windows used an unquoted
service path, which can enable privilege escalation.
(CVE-2017-3141) [RT #45229] |
callbacks_screen2board(gdouble *X, gdouble *Y, gint x, gint y) {
/* make sure we don't divide by zero (which is possible if the gui
isn't displayed yet */
if ((screenRenderInfo.scaleFactorX > 0.001)||(screenRenderInfo.scaleFactorY > 0.001)) {
*X = screenRenderInfo.lowerLeftX + (x / screenRenderInfo.scaleFactor... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 92,009,855,270,123,420,000,000,000,000,000,000,000 | 13 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
const char *gnutls_alert_get_strname(gnutls_alert_description_t alert)
{
const gnutls_alert_entry *p;
for (p = sup_alerts; p->name != NULL; p++)
if (p->alert == alert)
return p->name;
return NULL;
} | 0 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 151,802,830,721,689,400,000,000,000,000,000,000,000 | 10 | handshake: check for TLS_FALLBACK_SCSV
If TLS_FALLBACK_SCSV was sent by the client during the handshake, and
the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX,
send the "Inappropriate fallback" fatal alert and abort the handshake.
This mechanism was defined in RFC7507. |
Supports_Condition_Obj Parser::parse_supports_negation()
{
if (!lex < kwd_not >()) return 0;
Supports_Condition_Obj cond = parse_supports_condition_in_parens();
return SASS_MEMORY_NEW(Supports_Negation, pstate, cond);
} | 0 | [
"CWE-125"
] | libsass | b3374e3fd1a0c3658644d2bad24e4a0ff2e0dcea | 174,723,620,695,925,440,000,000,000,000,000,000,000 | 6 | Fix handling of unclosed interpolant in url
Fixes #2661 |
static u32 rgb_48_to_32(char *val)
{
u32 res = 0x0;
u32 i;
for (i=0; i<3; i++) {
u32 v = val[2*i];
v<<=8;
v|=val[2*i + 1];
v/=0xFF;
res <<= 8;
res |= v;
}
return res;
} | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 27,647,456,885,427,606,000,000,000,000,000,000,000 | 16 | fixed #1768 |
PJ_DEF(void) pjmedia_rtcp_fini(pjmedia_rtcp_session *sess)
{
#if defined(PJMEDIA_HAS_RTCP_XR) && (PJMEDIA_HAS_RTCP_XR != 0)
pjmedia_rtcp_xr_fini(&sess->xr_session);
#else
/* Nothing to do. */
PJ_UNUSED_ARG(sess);
#endif
} | 0 | [
"CWE-125"
] | pjproject | 8b621f192cae14456ee0b0ade52ce6c6f258af1e | 218,010,322,374,271,800,000,000,000,000,000,000,000 | 9 | Merge pull request from GHSA-3qx3-cg72-wrh9 |
check_colorcolumn(win_T *wp)
{
char_u *s;
int col;
int count = 0;
int color_cols[256];
int i;
int j = 0;
if (wp->w_buffer == NULL)
return NULL; // buffer was closed
for (s = wp->w_p_cc; *s != NUL && count < 255;)
{
if (*s == '-' || *s == '+')
{
// -N and +N: add to 't... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 135,990,483,215,242,210,000,000,000,000,000,000,000 | 64 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
static bool encode_asq_control(void *mem_ctx, void *in, DATA_BLOB *out)
{
struct ldb_asq_control *lac = talloc_get_type(in, struct ldb_asq_control);
struct asn1_data *data = asn1_init(mem_ctx);
if (!data) return false;
if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) {
return false;
}
if (lac->request) {
if (!... | 0 | [
"CWE-399"
] | samba | 530d50a1abdcdf4d1775652d4c456c1274d83d8d | 55,340,229,872,896,740,000,000,000,000,000,000,000 | 34 | CVE-2015-7540: s4: libcli: ldap message - Ensure all asn1_XX returns are checked.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): F... |
static int nfs4_xdr_dec_commit(struct rpc_rqst *rqstp, struct xdr_stream *xdr,
struct nfs_writeres *res)
{
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (status)
goto out;
status = decode_sequence(xdr, &res->seq_res, rqstp);
if (status)
goto out;
status = decode_... | 0 | [
"CWE-703",
"CWE-189"
] | linux | bf118a342f10dafe44b14451a1392c3254629a1f | 242,287,751,696,439,200,000,000,000,000,000,000,000 | 24 | 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... |
String *Item::val_str(String *str, String *converter, CHARSET_INFO *cs)
{
String *res= val_str(str);
if (null_value)
return (String *) 0;
if (!cs)
return res;
uint errors;
if ((null_value= converter->copy(res->ptr(), res->length(),
collation.collation, cs, &errors... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 51,527,334,581,480,380,000,000,000,000,000,000,000 | 16 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
static int oidc_handle_discovery_response(request_rec *r, oidc_cfg *c) {
/* variables to hold the values returned in the response */
char *issuer = NULL, *target_link_uri = NULL, *login_hint = NULL,
*auth_request_params = NULL, *csrf_cookie, *csrf_query = NULL,
*user = NULL, *path_scopes;
oidc_provider_t *pro... | 1 | [
"CWE-601"
] | mod_auth_openidc | 03e6bfb446f4e3f27c003d30d6a433e5dd8e2b3d | 73,918,821,075,416,065,000,000,000,000,000,000,000 | 140 | apply OIDCRedirectURLsAllowed setting to target_link_uri
closes #672; thanks @Meheni
release 2.4.9.4
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.