func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static apr_byte_t oidc_validate_redirect_url(request_rec *r, oidc_cfg *c,
const char *url, apr_byte_t restrict_to_host, char **err_str,
char **err_desc) {
apr_uri_t uri;
const char *c_host = NULL;
apr_hash_index_t *hi = NULL;
if (apr_uri_parse(r->pool, url, &uri) != APR_SUCCESS) {
*err_str = apr_pstrdup(r->p... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 295,618,594,193,518,330,000,000,000,000,000,000,000 | 80 | Add a function to escape Javascript characters |
_encode_to_file(ImagingEncoderObject* encoder, PyObject* args)
{
UINT8* buf;
int status;
ImagingSectionCookie cookie;
/* Encode to a file handle */
int fh;
int bufsize = 16384;
if (!PyArg_ParseTuple(args, "i|i", &fh, &bufsize))
return NULL;
/* Allocate an encoder buffer */
buf =... | 0 | [
"CWE-119"
] | Pillow | a130c45990578a1bb0a6a000ed1b110e27324910 | 30,226,883,791,634,194,000,000,000,000,000,000,000 | 43 | add several TIFF decoders and encoders |
void Item_ident::print(String *str, enum_query_type query_type)
{
THD *thd= current_thd;
char d_name_buff[MAX_ALIAS_NAME], t_name_buff[MAX_ALIAS_NAME];
const char *d_name= db_name, *t_name= table_name;
if (lower_case_table_names== 1 ||
(lower_case_table_names == 2 && !alias_name_used))
{
if (table_n... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 229,281,505,897,551,960,000,000,000,000,000,000,000 | 53 | 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'... |
QPDF::findEndstream()
{
// Find endstream or endobj. Position the input at that token.
QPDFTokenizer::Token t = readToken(this->m->file, true, 20);
if ((t.getType() == QPDFTokenizer::tt_word) &&
((t.getValue() == "endobj") ||
(t.getValue() == "endstream")))
{
this->m->file->seek... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 279,706,701,688,640,760,000,000,000,000,000,000,000 | 13 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
static int cuse_channel_open(struct inode *inode, struct file *file)
{
struct fuse_dev *fud;
struct cuse_conn *cc;
int rc;
/* set up cuse_conn */
cc = kzalloc(sizeof(*cc), GFP_KERNEL);
if (!cc)
return -ENOMEM;
fuse_conn_init(&cc->fc);
fud = fuse_dev_alloc(&cc->fc);
if (!fud) {
kfree(cc);
return -ENOME... | 0 | [
"CWE-399"
] | linux | 2c5816b4beccc8ba709144539f6fdd764f8fa49c | 268,629,869,208,025,400,000,000,000,000,000,000,000 | 32 | cuse: fix memory leak
The problem is that fuse_dev_alloc() acquires an extra reference to cc.fc,
and the original ref count is never dropped.
Reported-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Fixes: cc080e9e9be1 ("fuse: introduce per-instance fuse_dev structure")... |
uint8_t get8BitInt()
{
const char* p = d_packet.c_str() + d_offset;
moveOffset(1);
return *p;
} | 0 | [
"CWE-399"
] | pdns | adb10be102ddd4d2baf7a8adbb5673946fe5e555 | 330,831,760,401,432,900,000,000,000,000,000,000,000 | 6 | fix forward reference-check in getLabelFromContent() |
void qemu_chr_fe_deinit(CharBackend *b)
{
assert(b);
if (b->chr) {
qemu_chr_fe_set_handlers(b, NULL, NULL, NULL, NULL, NULL);
b->chr->avail_connections++;
b->chr = NULL;
}
} | 1 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 199,042,261,511,023,770,000,000,000,000,000,000,000 | 10 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
ex_cwindow(exarg_T *eap)
{
qf_info_T *qi;
qf_list_T *qfl;
win_T *win;
if ((qi = qf_cmd_get_stack(eap, TRUE)) == NULL)
return;
qfl = qf_get_curlist(qi);
// Look for an existing quickfix window.
win = qf_find_win(qi);
// If a quickfix window is open but we have no errors to display,
... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 111,182,603,281,549,000,000,000,000,000,000,000,000 | 27 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static int fit_image_select(const void *fit, int rd_noffset, int verify)
{
fit_image_print(fit, rd_noffset, " ");
if (verify) {
puts(" Verifying Hash Integrity ... ");
if (!fit_image_verify(fit, rd_noffset)) {
puts("Bad Data Hash\n");
return -EACCES;
}
puts("OK\n");
}
return 0;
} | 0 | [] | u-boot | 6f3c2d8aa5e6cbd80b5e869bbbddecb66c329d01 | 101,501,058,563,935,620,000,000,000,000,000,000,000 | 15 | image: Add an option to do a full check of the FIT
Some strange modifications of the FIT can introduce security risks. Add an
option to check it thoroughly, using libfdt's fdt_check_full() function.
Enable this by default if signature verification is enabled.
CVE-2021-27097
Signed-off-by: Simon Glass <sjg@chromium.... |
static int proc_bulk_compat(struct usb_dev_state *ps,
struct usbdevfs_bulktransfer32 __user *p32)
{
struct usbdevfs_bulktransfer __user *p;
compat_uint_t n;
compat_caddr_t addr;
p = compat_alloc_user_space(sizeof(*p));
if (get_user(n, &p32->ep) || put_user(n, &p->ep) ||
get_user(n, &p32->len) || put_user... | 0 | [
"CWE-200"
] | linux | 681fef8380eb818c0b845fca5d2ab1dcbab114ee | 285,910,273,783,496,930,000,000,000,000,000,000,000 | 17 | USB: usbfs: fix potential infoleak in devio
The stack object “ci” has a total size of 8 bytes. Its last 3 bytes
are padding bytes which are not initialized and leaked to userland
via “copy_to_user”.
Signed-off-by: Kangjie Lu <kjlu@gatech.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
do_pg_start_backup(const char *backupidstr, bool fast, TimeLineID *starttli_p,
char **labelfile)
{
bool exclusive = (labelfile == NULL);
bool backup_started_in_recovery = false;
XLogRecPtr checkpointloc;
XLogRecPtr startpoint;
TimeLineID starttli;
pg_time_t stamp_time;
char strfbuf[128];
char xlogfil... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 24,604,425,379,563,500,000,000,000,000,000,000,000 | 282 | 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... |
tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip)
{
conv_hash_t *hash = (conv_hash_t*) pit;
const struct tcpheader *tcphdr=(const struct tcpheader *)vip;
/* Take two "add" passes per packet, adding for each direction, ensures that all
packets are counted pro... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 49,937,239,137,619,420,000,000,000,000,000,000,000 | 13 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_BIGNUM_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_FS_IO and/or POLARSSL_ENTROPY_C and/or "
"POLARSSL_CTR_DRBG_C not defined.\n");
return( 0 );
} | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 298,091,628,654,241,700,000,000,000,000,000,000,000 | 10 | RSA blinding on CRT operations to counter timing attacks |
static int dccp_feat_default_value(u8 feat_num)
{
int idx = dccp_feat_index(feat_num);
/*
* There are no default values for unknown features, so encountering a
* negative index here indicates a serious problem somewhere else.
*/
DCCP_BUG_ON(idx < 0);
return idx < 0 ? 0 : dccp_feat_table[idx].default_value;
} | 0 | [
"CWE-401"
] | linux | 1d3ff0950e2b40dc861b1739029649d03f591820 | 308,673,121,763,713,400,000,000,000,000,000,000,000 | 11 | dccp: Fix memleak in __feat_register_sp
If dccp_feat_push_change fails, we forget free the mem
which is alloced by kmemdup in dccp_feat_clone_sp_val.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values")
Reviewed-by: Mukesh Ojha <mojha@codeaurora.o... |
void Pipe::reader()
{
pipe_lock.Lock();
if (state == STATE_ACCEPTING) {
accept();
assert(pipe_lock.is_locked());
}
// loop.
while (state != STATE_CLOSED &&
state != STATE_CONNECTING) {
assert(pipe_lock.is_locked());
// sleep if (re)connecting
if (state == STATE_STANDBY) {
ldout(... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 205,156,553,370,406,220,000,000,000,000,000,000,000 | 198 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
TEST(BitTestMatchExpression, MatchBinaryWithLongBitMask) {
long long bitMask = 54;
BSONObj match = fromjson("{a: {$binary: 'NgAAAAAAAAAAAAAAAAAAAAAAAAAA', $type: '00'}}");
BitsAllSetMatchExpression balls;
BitsAllClearMatchExpression ballc;
BitsAnySetMatchExpression banys;
BitsAnyClearMatchExpr... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 195,462,153,290,477,230,000,000,000,000,000,000,000 | 20 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
ZEND_API void zend_activate_modules(TSRMLS_D) /* {{{ */
{
zend_module_entry **p = module_request_startup_handlers;
while (*p) {
zend_module_entry *module = *p;
if (module->request_startup_func(module->type, module->module_number TSRMLS_CC)==FAILURE) {
zend_error(E_WARNING, "request_startup() for %s module fa... | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 128,300,201,985,121,200,000,000,000,000,000,000,000 | 14 | Fix bug #73147: Use After Free in PHP7 unserialize() |
void RGWListBucket_ObjStore_S3v2::send_versioned_response()
{
s->formatter->open_object_section_in_ns("ListVersionsResult", XMLNS_AWS_S3);
RGWListBucket_ObjStore_S3v2::send_common_versioned_response();
s->formatter->dump_string("KeyContinuationToken", marker.name);
s->formatter->dump_string("VersionIdContinuati... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 220,385,630,272,856,930,000,000,000,000,000,000,000 | 93 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static int nvme_check_sqid(NvmeCtrl *n, uint16_t sqid)
{
return sqid < n->params.max_ioqpairs + 1 && n->sq[sqid] != NULL ? 0 : -1;
} | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 12,149,103,710,697,247,000,000,000,000,000,000,000 | 4 | 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... |
const T& operator()(const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int c,
const ulongT wh, const ulongT whd) const {
return _data[x + y*_width + z*wh + c*whd]; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 41,787,888,889,574,797,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
f_cos(typval_T *argvars, typval_T *rettv)
{
float_T f = 0.0;
rettv->v_type = VAR_FLOAT;
if (get_float_arg(argvars, &f) == OK)
rettv->vval.v_float = cos(f);
else
rettv->vval.v_float = 0.0;
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 111,241,298,386,175,600,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. |
int get_char(FILE * file) {
int ch;
ch = getc(file);
if (ch == '\n')
Set_LineNum(LineNumber + 1)
return (ch);
} | 0 | [
"CWE-476"
] | cronie | a6576769f01325303b11edc3e0cfb05ef382ce56 | 10,362,044,871,723,757,000,000,000,000,000,000,000 | 8 | Fix CVE-2019-9704 and CVE-2019-9705
The users can cause DoS of the crond by loading huge crontab files.
We now allow maximum 1000 environment variables and 1000 crontab entries.
Also the comments and whitespace between the entries and variables
are now limited to 32768 characters. |
void v9fs_evict_inode(struct inode *inode)
{
struct v9fs_inode *v9inode = V9FS_I(inode);
truncate_inode_pages_final(&inode->i_data);
clear_inode(inode);
filemap_fdatawrite(&inode->i_data);
v9fs_cache_inode_put_cookie(inode);
/* clunk the fid stashed in writeback_fid */
if (v9inode->writeback_fid) {
p9_client... | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 59,581,573,118,051,070,000,000,000,000,000,000,000 | 15 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
void StreamBase::GetExternal(const FunctionCallbackInfo<Value>& args) {
StreamBase* wrap = StreamBase::FromObject(args.This().As<Object>());
if (wrap == nullptr) return;
Local<External> ext = External::New(args.GetIsolate(), wrap);
args.GetReturnValue().Set(ext);
} | 0 | [
"CWE-416"
] | node | 4f8772f9b731118628256189b73cd202149bbd97 | 234,452,955,935,790,840,000,000,000,000,000,000,000 | 7 | src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously
destroyed.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103
PR-URL: https://github.com/nodejs-private/... |
MagickExport void *AcquireQuantumMemory(const size_t count,const size_t quantum)
{
size_t
extent;
if (HeapOverflowSanityCheck(count,quantum) != MagickFalse)
return((void *) NULL);
extent=count*quantum;
return(AcquireMagickMemory(extent));
} | 0 | [
"CWE-770"
] | ImageMagick | 061de02095a56d438409c63f723f340b2d9d36c7 | 227,819,470,081,436,620,000,000,000,000,000,000,000 | 10 | https://github.com/ImageMagick/ImageMagick/issues/536 |
DEFUN (clear_bgp_all_rsclient,
clear_bgp_all_rsclient_cmd,
"clear bgp * rsclient",
CLEAR_STR
BGP_STR
"Clear all peers\n"
"Soft reconfig for rsclient RIB\n")
{
if (argc == 1)
return bgp_clear_vty (vty, argv[0], AFI_IP6, SAFI_UNICAST, clear_all,
BG... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 204,361,818,121,107,200,000,000,000,000,000,000,000 | 15 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
get_var_with_binlog(THD *thd, enum_sql_command sql_command,
LEX_STRING &name, user_var_entry **out_entry)
{
BINLOG_USER_VAR_EVENT *user_var_event;
user_var_entry *var_entry;
var_entry= get_variable(&thd->user_vars, name, 0);
/*
Any reference to user-defined variable which is done from s... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 278,318,637,867,231,850,000,000,000,000,000,000,000 | 118 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
char *get_sa_devname(unsigned int major, unsigned int minor, unsigned long long wwn[],
unsigned int part_nr, uint64_t flags)
{
char *dev_name = NULL, *persist_dev_name = NULL;
static char sid[64];
char xsid[32] = "", pn[16] = "";
if (DISPLAY_PERSIST_NAME_S(flags)) {
persist_dev_name = get_persistent_name_... | 0 | [
"CWE-415"
] | sysstat | a5c8abd4a481ee6e27a3acf00e6d9b0f023e20ed | 4,331,301,174,481,081,500,000,000,000,000,000,000 | 37 | Fix #242: Double free in check_file_actlst()
Avoid freeing buffer() twice.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
HRESULT Http::HrGetUser(std::wstring *strUser)
{
if (m_strUser.empty())
return MAPI_E_NOT_FOUND;
return X2W(m_strUser, strUser);
} | 0 | [
"CWE-770"
] | kopano-core | 512457466b87039c6a8d25887fdaca6173619546 | 134,169,935,028,449,670,000,000,000,000,000,000,000 | 6 | Set limit on header size to prevent bad alloc
This sets a hard limit of 64 KiB to the header to prevent a memory
allocation exception from being thrown during the parsing of the request
headers. |
scavenge_low_free(gs_ref_memory_t *mem, unsigned request_size)
{
/* find 1st range of memory that can be glued back together to fill request */
scavenge_data sd;
uint request_size_rounded = obj_size_round(request_size);
sd.found_pre = 0;
sd.need_free = request_size_rounded + sizeof(obj_header_t); ... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 235,315,630,211,692,930,000,000,000,000,000,000,000 | 14 | 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. |
GF_Err stco_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 entries;
GF_ChunkOffsetBox *ptr = (GF_ChunkOffsetBox *)s;
ISOM_DECREASE_SIZE(ptr, 4);
ptr->nb_entries = gf_bs_read_u32(bs);
if (ptr->nb_entries > ptr->size / 4 || (u64)ptr->nb_entries > (u64)SIZE_MAX/sizeof(u32)) {
GF_LOG(GF_LOG_ERROR, GF_LOG_CONTAINER, ("... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 35,325,558,783,448,710,000,000,000,000,000,000,000 | 23 | fixed #2255 |
_send_slurmstepd_init(int fd, int type, void *req,
slurm_addr_t *cli, slurm_addr_t *self,
hostset_t step_hset, uint16_t protocol_version)
{
int len = 0;
Buf buffer = NULL;
slurm_msg_t msg;
gid_t gid = (uid_t)-1;
gids_t *gids = NULL;
int rank, proto;
int parent_rank, children, depth, max_depth;
... | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 321,609,046,622,638,400,000,000,000,000,000,000,000 | 191 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *param, int len)
{
struct adapter *padapter = rtw_netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int ie_len;
DBG_88E("%s, len =%d\n", __func__, len);
if (!check_fwstate(pmlmepriv, WIFI_AP_STATE))
return -EINVAL;
... | 0 | [
"CWE-787"
] | linux | 74b6b20df8cfe90ada777d621b54c32e69e27cd7 | 323,557,491,717,599,800,000,000,000,000,000,000,000 | 29 | staging: rtl8188eu: prevent ->ssid overflow in rtw_wx_set_scan()
This code has a check to prevent read overflow but it needs another
check to prevent writing beyond the end of the ->ssid[] array.
Fixes: a2c60d42d97c ("staging: r8188eu: Add files for new driver - part 16")
Signed-off-by: Dan Carpenter <dan.carpenter@o... |
static void incrAggFunctionDepth(Expr *pExpr, int N){
if( N>0 ){
Walker w;
memset(&w, 0, sizeof(w));
w.xExprCallback = incrAggDepth;
w.u.n = N;
sqlite3WalkExpr(&w, pExpr);
}
} | 0 | [
"CWE-416"
] | sqlite | 4ded26a53c4df312e9fd06facbbf70377e969983 | 246,753,884,549,627,640,000,000,000,000,000,000,000 | 9 | Prevent aliases of window functions expressions from being used as arguments to aggregate or other window functions.
FossilOrigin-Name: 1e16d3e8fc60d39ca3899759ff15d355fdd7d3e23b325d8d2b0f954e11ce8dce |
void sha256(const unsigned char *digest, int len, unsigned char *hash)
{
SHA256CTX c = sha256_init();
if (c != NULL) {
sha256_update(c, digest, len);
sha256_final(hash, c);
}
} | 0 | [
"CWE-476"
] | libssh | b36272eac1b36982598c10de7af0a501582de07a | 10,575,160,098,338,157,000,000,000,000,000,000,000 | 8 | CVE-2020-1730: Fix a possible segfault when zeroing AES-CTR key
Fixes T213
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> |
rsvg_new_filter_primitive_flood (void)
{
RsvgFilterPrimitive *filter;
filter = g_new (RsvgFilterPrimitive, 1);
_rsvg_node_init (&filter->super, RSVG_NODE_TYPE_FILTER_PRIMITIVE_FLOOD);
filter->in = g_string_new ("none");
filter->result = g_string_new ("none");
filter->x.factor = filter->y.factor ... | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 221,302,295,862,903,080,000,000,000,000,000,000,000 | 13 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
explicit CopyOp(OpKernelConstruction* ctx) : CopyOpBase(ctx) {} | 0 | [
"CWE-369"
] | tensorflow | e86605c0a336c088b638da02135ea6f9f6753618 | 292,585,516,432,633,650,000,000,000,000,000,000,000 | 1 | Fix FPE in inpace update ops.
PiperOrigin-RevId: 388303197
Change-Id: Ib48309b6213ffe53eba81004b00e889d653e4b83 |
adj_seqnum(ovs_16aligned_be32 *val, int32_t inc)
{
put_16aligned_be32(val, htonl(ntohl(get_16aligned_be32(val)) + inc));
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 194,776,872,103,315,920,000,000,000,000,000,000,000 | 4 | 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... |
xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
xmlAttrPtr xml_lang = NULL;
xmlAttrPtr lang = NULL;
xmlAttrPtr name = NULL;
xmlAttrPtr id = NULL;
xmlNodePtr parent;
xmlOutputBufferPtr buf;
if (cur == NULL) return;
buf = ctxt->buf;
parent = cur->parent;
while (cur ... | 0 | [
"CWE-502"
] | libxml2 | c97750d11bb8b6f3303e7131fe526a61ac65bcfd | 91,633,496,074,511,380,000,000,000,000,000,000,000 | 71 | Avoid an out of bound access when serializing malformed strings
For https://bugzilla.gnome.org/show_bug.cgi?id=766414
* xmlsave.c: xmlBufAttrSerializeTxtContent() if an attribute value
is not UTF-8 be more careful when serializing it as we may do an
out of bound access as a result. |
poly_contain_pt(PG_FUNCTION_ARGS)
{
POLYGON *poly = PG_GETARG_POLYGON_P(0);
Point *p = PG_GETARG_POINT_P(1);
PG_RETURN_BOOL(point_inside(p, poly->npts, poly->p) != 0);
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 165,412,700,163,555,390,000,000,000,000,000,000,000 | 7 | 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... |
std::string help() const override {
return "Grants roles to a user.";
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 87,178,885,000,351,040,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
perf_cgroup_defer_enabled(struct perf_event *event)
{
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8176cced706b5e5d15887584150764894e94e02f | 11,934,538,931,035,882,000,000,000,000,000,000,000 | 3 | perf: Treat attr.config as u64 in perf_swevent_init()
Trinity discovered that we fail to check all 64 bits of
attr.config passed by user space, resulting to out-of-bounds
access of the perf_swevent_enabled array in
sw_perf_event_destroy().
Introduced in commit b0a873ebb ("perf: Register PMU
implementations").
Signed... |
check_STRIP_VLAN(const struct ofpact_null *a OVS_UNUSED,
struct ofpact_check_params *cp)
{
if (!(cp->match->flow.vlans[0].tci & htons(VLAN_CFI))) {
inconsistent_match(&cp->usable_protocols);
}
flow_pop_vlan(&cp->match->flow, NULL);
return 0;
} | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 19,081,237,420,024,080,000,000,000,000,000,000,000 | 9 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
u64 btrfs_get_tree_mod_seq(struct btrfs_fs_info *fs_info,
struct seq_list *elem)
{
write_lock(&fs_info->tree_mod_log_lock);
if (!elem->seq) {
elem->seq = btrfs_inc_tree_mod_seq(fs_info);
list_add_tail(&elem->list, &fs_info->tree_mod_seq_list);
}
write_unlock(&fs_info->tree_mod_log_lock);
return elem->se... | 0 | [
"CWE-362"
] | linux | dbcc7d57bffc0c8cac9dac11bec548597d59a6a5 | 159,629,989,774,001,940,000,000,000,000,000,000,000 | 12 | btrfs: fix race when cloning extent buffer during rewind of an old root
While resolving backreferences, as part of a logical ino ioctl call or
fiemap, we can end up hitting a BUG_ON() when replaying tree mod log
operations of a root, triggering a stack trace like the following:
------------[ cut here ]------------
... |
bool ActiveStreamEncoderFilter::has1xxheaders() {
return parent_.state_.has_1xx_headers_ && !continued_1xx_headers_;
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 36,113,082,096,007,237,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static inline int security_path_symlink(struct path *dir, struct dentry *dentry,
const char *old_name)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 182,131,716,076,047,170,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {
const TValue *tm;
switch (ttypetag(rb)) {
case LUA_VTABLE: {
Table *h = hvalue(rb);
tm = fasttm(L, h->metatable, TM_LEN);
if (tm) break; /* metamethod? break switch to call it */
setivalue(s2v(ra), luaH_getn(h)); /* else pri... | 0 | [
"CWE-416",
"CWE-125",
"CWE-787"
] | lua | eb41999461b6f428186c55abd95f4ce1a76217d5 | 216,983,606,425,552,900,000,000,000,000,000,000,000 | 27 | Fixed bugs of stack reallocation x GC
Macro 'checkstackGC' was doing a GC step after resizing the stack;
the GC could shrink the stack and undo the resize. Moreover, macro
'checkstackp' also does a GC step, which could remove the preallocated
CallInfo when calling a function. (Its name has been changed to
'checkstackG... |
static u32 sock_filter_convert_ctx_access(enum bpf_access_type type,
const struct bpf_insn *si,
struct bpf_insn *insn_buf,
struct bpf_prog *prog, u32 *target_size)
{
struct bpf_insn *insn = insn_buf;
int off;
switch (si->off) {
case offsetof(struct bpf_sock, bound_dev_if):
BUILD_BUG_ON(FIELD... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 236,437,067,018,419,600,000,000,000,000,000,000,000 | 103 | 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... |
slow_search_ic(OnigEncoding enc, int case_fold_flag,
UChar* target, UChar* target_end,
const UChar* text, const UChar* text_end, UChar* text_range)
{
UChar *s, *end;
end = (UChar* )text_end;
end -= target_end - target - 1;
if (end > text_range)
end = text_range;
s = (UChar*... | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 35,752,175,156,280,700,000,000,000,000,000,000,000 | 23 | fix heap-buffer-overflow |
TRIO_PUBLIC int trio_sprintf TRIO_VARGS3((buffer, format, va_alist), char* buffer,
TRIO_CONST char* format, TRIO_VA_DECL)
{
int status;
va_list args;
assert(VALID(buffer));
assert(VALID(format));
TRIO_VA_START(args, format);
status = TrioFormat(&buffer, 0, TrioOutStreamS... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 34,098,594,473,142,726,000,000,000,000,000,000,000 | 15 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static u32 ath_pkt_duration(struct ath_softc *sc, u8 rix, int pktlen,
int width, int half_gi, bool shortPreamble)
{
u32 nbits, nsymbits, duration, nsymbols;
int streams;
/* find number of symbols: PLCP + data */
streams = HT_RC_2_STREAMS(rix);
nbits = (pktlen << 3) + OFDM_PLCP_BITS;
nsymbits = bits_per_sy... | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 93,569,341,019,302,080,000,000,000,000,000,000,000 | 22 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
{
struct scm_fp_list *new_fpl;
int i;
if (!fpl)
return NULL;
new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL);
if (new_fpl) {
for (i=fpl->count-1; i>=0; i--)
get_file(fpl->fp[i]);
memcpy(new_fpl, fpl, sizeof(*fpl));
}
return new_fpl;
} | 1 | [] | linux-2.6 | f8d570a4745835f2238a33b537218a1bb03fc671 | 98,295,612,003,832,760,000,000,000,000,000,000,000 | 16 | net: Fix recursive descent in __scm_destroy().
__scm_destroy() walks the list of file descriptors in the scm_fp_list
pointed to by the scm_cookie argument.
Those, in turn, can close sockets and invoke __scm_destroy() again.
There is nothing which limits how deeply this can occur.
The idea for how to fix this is fro... |
static void conncache_remove_bundle(struct conncache *connc,
struct connectbundle *bundle)
{
struct Curl_hash_iterator iter;
struct Curl_hash_element *he;
if(!connc)
return;
Curl_hash_start_iterate(&connc->hash, &iter);
he = Curl_hash_next_element(&iter);
while(he)... | 0 | [] | curl | 058f98dc3fe595f21dc26a5b9b1699e519ba5705 | 138,641,640,411,258,070,000,000,000,000,000,000,000 | 23 | conncache: include the zone id in the "bundle" hashkey
Make connections to two separate IPv6 zone ids create separate
connections.
Reported-by: Harry Sintonen
Bug: https://curl.se/docs/CVE-2022-27775.html
Closes #8747 |
TEST_F(ExpressionNaryTest, ValidateEmptyDependencies) {
assertDependencies(_notAssociativeNorCommutative, BSONArray());
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 92,481,698,507,369,440,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
char* oidc_util_http_form_encoded_data(request_rec *r,
const apr_table_t *params) {
char *data = NULL;
if ((params != NULL) && (apr_table_elts(params)->nelts > 0)) {
oidc_http_encode_t encode_data = { r, NULL };
apr_table_do(oidc_util_http_add_form_url_encoded_param, &encode_data,
params,
NULL);
data ... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 146,768,677,297,702,180,000,000,000,000,000,000,000 | 13 | Add a function to escape Javascript characters |
int dbd_describe(SV* sth, imp_sth_t* imp_sth)
{
dTHX;
D_imp_xxh(sth);
if (DBIc_TRACE_LEVEL(imp_xxh) >= 2)
PerlIO_printf(DBIc_LOGPIO(imp_xxh), "\t--> dbd_describe\n");
#if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
if (imp_sth->use_server_side_prepare)
{
int i;
int col_type;
int num_fields= ... | 0 | [
"CWE-416"
] | DBD-mysql | a56ae87a4c1c1fead7d09c3653905841ccccf1cc | 253,526,199,060,875,560,000,000,000,000,000,000,000 | 111 | fix use-after-free crash in RT #97625 |
static int path_parent_directory(struct path *path)
{
struct dentry *old = path->dentry;
/* rare case of legitimate dget_parent()... */
path->dentry = dget_parent(path->dentry);
dput(old);
if (unlikely(!path_connected(path)))
return -ENOENT;
return 0;
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 104,447,993,435,695,070,000,000,000,000,000,000,000 | 10 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
static void allocate_vpid(struct vcpu_vmx *vmx)
{
int vpid;
vmx->vpid = 0;
if (!enable_vpid)
return;
spin_lock(&vmx_vpid_lock);
vpid = find_first_zero_bit(vmx_vpid_bitmap, VMX_NR_VPIDS);
if (vpid < VMX_NR_VPIDS) {
vmx->vpid = vpid;
__set_bit(vpid, vmx_vpid_bitmap);
}
spin_unlock(&vmx_vpid_lock);
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 57,372,756,009,874,250,000,000,000,000,000,000,000 | 15 | 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-... |
bool InstanceKlass::is_dependent_nmethod(nmethod* nm) {
return dependencies().is_dependent_nmethod(nm);
} | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 128,358,262,681,965,950,000,000,000,000,000,000,000 | 3 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
virtual uint32 key_length() const { return pack_length(); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 5,659,582,724,434,691,000,000,000,000,000,000,000 | 1 | 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... |
Database::Database() {
QSqlDatabase db = QSqlDatabase::addDatabase(QLatin1String("QSQLITE"));
QSettings qs;
QStringList datapaths;
int i;
datapaths << g.qdBasePath.absolutePath();
datapaths << QDesktopServices::storageLocation(QDesktopServices::DataLocation);
#if defined(Q_OS_UNIX) && ! defined(Q_OS_MAC)
datapa... | 0 | [
"CWE-310"
] | mumble | 5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e | 174,856,544,603,992,640,000,000,000,000,000,000,000 | 112 | Explicitly remove file permissions for settings and DB |
mono_thread_destroy_tls (uint32_t tls_offset)
{
MonoTlsDataRecord *prev = NULL;
MonoTlsDataRecord *cur;
guint32 size = 0;
MonoDomain *domain = mono_domain_get ();
mono_domain_lock (domain);
cur = domain->tlsrec_list;
while (cur) {
if (cur->tls_offset == tls_offset) {
if (prev)
prev->next = cur->next;
... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 70,608,151,367,318,880,000,000,000,000,000,000,000 | 25 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
TEST_F(RouterTest, CanaryStatusFalse) {
EXPECT_CALL(callbacks_.route_->route_entry_, timeout())
.WillOnce(Return(std::chrono::milliseconds(0)));
EXPECT_CALL(callbacks_.dispatcher_, createTimer_(_)).Times(0);
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
... | 0 | [
"CWE-703"
] | envoy | 5bf9b0f1e7f247a4eee7180849cb0823926f7fff | 187,101,143,118,539,100,000,000,000,000,000,000,000 | 38 | [1.21] CVE-2022-21655
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
TEST_F(RouterTest, InternalRedirectRejectedByPredicate) {
enableRedirects();
sendRequest();
redirect_headers_->setLocation("http://www.foo.com/some/path");
auto mock_predicate = std::make_shared<NiceMock<MockInternalRedirectPredicate>>();
EXPECT_CALL(callbacks_, clearRouteCache());
EXPECT_CALL(callbacks_... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 197,520,479,704,393,170,000,000,000,000,000,000,000 | 27 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
ex_X(exarg_T *eap UNUSED)
{
crypt_check_current_method();
(void)crypt_get_key(TRUE, TRUE);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 1,979,405,294,585,633,200,000,000,000,000,000,000 | 5 | 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 int pidlist_array_load(struct cgroup *cgrp, enum cgroup_filetype type,
struct cgroup_pidlist **lp)
{
pid_t *array;
int length;
int pid, n = 0; /* used for populating the array */
struct css_task_iter it;
struct task_struct *tsk;
struct cgroup_pidlist *l;
lockdep_assert_held(&cgrp->pidlist_mutex)... | 0 | [
"CWE-416"
] | linux | 3b0462726e7ef281c35a7a4ae33e93ee2bc9975b | 113,628,846,020,944,550,000,000,000,000,000,000,000 | 55 | cgroup: verify that source is a string
The following sequence can be used to trigger a UAF:
int fscontext_fd = fsopen("cgroup");
int fd_null = open("/dev/null, O_RDONLY);
int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null);
close_range(3, ~0U, 0);
The cgroup v1 specific fs parser expects a... |
static void nfs4_clear_open_state(struct nfs4_state *state)
{
struct nfs4_lock_state *lock;
clear_bit(NFS_DELEGATED_STATE, &state->flags);
clear_bit(NFS_O_RDONLY_STATE, &state->flags);
clear_bit(NFS_O_WRONLY_STATE, &state->flags);
clear_bit(NFS_O_RDWR_STATE, &state->flags);
list_for_each_entry(lock, &state->lock... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 112,559,816,983,562,050,000,000,000,000,000,000,000 | 13 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
detached_get_signatures(ns_detached_signatures_t *sigs,
const char *flavor_name)
{
smartlist_t *sl = strmap_get(sigs->signatures, flavor_name);
if (!sl) {
sl = smartlist_create();
strmap_set(sigs->signatures, flavor_name, sl);
}
return sl;
} | 0 | [
"CWE-399"
] | tor | 57e35ad3d91724882c345ac709666a551a977f0f | 9,474,517,543,662,875,000,000,000,000,000,000,000 | 10 | Avoid possible segfault when handling networkstatus vote with bad flavor
Fix for 6530; fix on 0.2.2.6-alpha. |
static boolean cylinder_inside(inside_t * inside_context, pointf p)
{
return TRUE;
} | 0 | [
"CWE-120"
] | graphviz | 784411ca3655c80da0f6025ab20634b2a6ff696b | 147,516,542,111,466,180,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... |
Error HeifContext::decode_overlay_image(heif_item_id ID,
std::shared_ptr<HeifPixelImage>& img,
const std::vector<uint8_t>& overlay_data) const
{
// find the IDs this image is composed of
auto iref_box = m_heif_file->get_iref_box();
... | 0 | [
"CWE-416"
] | libheif | 995a4283d8ed2d0d2c1ceb1a577b993df2f0e014 | 313,430,129,709,085,330,000,000,000,000,000,000,000 | 100 | Detect non-existing referenced alpha images (fixes #123) |
Encode a string in modified UTF-7 */
PHP_FUNCTION(imap_utf7_encode)
{
/* author: Andrew Skalski <askalski@chek.com> */
char *arg;
const unsigned char *in, *inp, *endp;
unsigned char *out, *outp;
unsigned char c;
int arg_len, inlen;
size_t outlen;
enum {
ST_NORMAL, /* printable text */
ST_ENCODE0, /* enco... | 0 | [
"CWE-476"
] | php-src | 7edc639b9ff1c3576773d79d016abbeed1f93846 | 46,200,912,065,573,510,000,000,000,000,000,000,000 | 114 | Fix #77020: null pointer dereference in imap_mail
If an empty $message is passed to imap_mail(), we must not set message
to NULL, since _php_imap_mail() is not supposed to handle NULL pointers
(opposed to pointers to NUL). |
void Field_datetime_with_dec::make_field(Send_field *field)
{
Field::make_field(field);
field->decimals= dec;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 320,090,445,617,077,220,000,000,000,000,000,000,000 | 5 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static NTSTATUS dcesrv_lsa_EnumPrivsAccount(struct dcesrv_call_state *dce_call,
TALLOC_CTX *mem_ctx,
struct lsa_EnumPrivsAccount *r)
{
struct dcesrv_handle *h;
struct lsa_account_state *astate;
int ret;
unsigned int i, j;
struct ldb_message **res;
const char * const attrs[] = { "privilege", NULL... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 175,279,287,345,551,200,000,000,000,000,000,000,000 | 70 | 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... |
proto_get_id_by_filter_name(const gchar *filter_name)
{
const protocol_t *protocol = NULL;
DISSECTOR_ASSERT_HINT(filter_name, "No filter name present");
protocol = (const protocol_t *)g_hash_table_lookup(proto_filter_names, filter_name);
if (protocol == NULL)
return -1;
return protocol->proto_id;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 68,265,074,491,311,890,000,000,000,000,000,000,000 | 12 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
void CheckStatusAndParamCount(const asylo::primitives::PrimitiveStatus &status,
const MessageReader &output, const char *name,
int expected_params, bool match_exact_params) {
if (!status.ok()) {
std::string message = absl::StrCat("Host call '", name, "' ... | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 198,737,185,404,425,000,000,000,000,000,000,000,000 | 24 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
int __attribute_const__ kvm_target_cpu(void)
{
unsigned long implementor = read_cpuid_implementor();
unsigned long part_number = read_cpuid_part_number();
switch (implementor) {
case ARM_CPU_IMP_ARM:
switch (part_number) {
case ARM_CPU_PART_AEM_V8:
return KVM_ARM_TARGET_AEM_V8;
case ARM_CPU_PART_FOUNDATIO... | 0 | [
"CWE-20"
] | linux | d26c25a9d19b5976b319af528886f89cf455692d | 62,800,097,797,360,460,000,000,000,000,000,000,000 | 29 | arm64: KVM: Tighten guest core register access from userspace
We currently allow userspace to access the core register file
in about any possible way, including straddling multiple
registers and doing unaligned accesses.
This is not the expected use of the ABI, and nobody is actually
using it that way. Let's tighten ... |
PJ_DEF(char*) pjsip_tx_data_get_info( pjsip_tx_data *tdata )
{
PJ_ASSERT_RETURN(tdata, "NULL");
/* tdata->info may be assigned by application so if it exists
* just return it.
*/
if (tdata->info)
return tdata->info;
if (tdata->msg==NULL)
return "NULL";
pj_lock_acquire(tdata->lock);
... | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 332,804,930,680,193,430,000,000,000,000,000,000,000 | 19 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
void sock_prot_inuse_add(struct net *net, struct proto *prot, int val)
{
__get_cpu_var(prot_inuse).val[prot->inuse_idx] += val;
} | 0 | [
"CWE-264"
] | linux-2.6 | df0bca049d01c0ee94afb7cd5dfd959541e6c8da | 180,789,438,444,492,850,000,000,000,000,000,000 | 4 | net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.
This dummy code should trigger the bug:
int main(void)
{
unsigned char buf... |
NO_INLINE JsVar *jspeStatementFor() {
JSP_ASSERT_MATCH(LEX_R_FOR);
JSP_MATCH('(');
bool wasInLoop = (execInfo.execute&EXEC_IN_LOOP)!=0;
execInfo.execute |= EXEC_FOR_INIT;
// initialisation
JsVar *forStatement = 0;
// we could have 'for (;;)' - so don't munch up our semicolon if that's all we have
if (le... | 0 | [
"CWE-125",
"CWE-674"
] | Espruino | 51380baf17241728b6d48cdb84140b931e3e3cc5 | 210,235,706,670,932,540,000,000,000,000,000,000,000 | 204 | Fix stack overflow if interpreting a file full of '{' (fix #1448) |
static int check_modinfo_livepatch(struct module *mod, struct load_info *info)
{
if (get_modinfo(info, "livepatch")) {
pr_err("%s: module is marked as livepatch module, but livepatch support is disabled",
mod->name);
return -ENOEXEC;
}
return 0;
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 255,750,202,258,119,940,000,000,000,000,000,000,000 | 10 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
poly_overlap(PG_FUNCTION_ARGS)
{
POLYGON *polya = PG_GETARG_POLYGON_P(0);
POLYGON *polyb = PG_GETARG_POLYGON_P(1);
bool result;
/* Quick check by bounding box */
result = (polya->npts > 0 && polyb->npts > 0 &&
box_ov(&polya->boundbox, &polyb->boundbox)) ? true : false;
/*
* Brute-force algorithm -... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 158,736,819,514,341,620,000,000,000,000,000,000,000 | 63 | 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... |
png_write_IHDR(png_structrp png_ptr, png_uint_32 width, png_uint_32 height,
int bit_depth, int color_type, int compression_type, int filter_type,
int interlace_type)
{
png_byte buf[13]; /* Buffer to store the IHDR info */
png_debug(1, "in png_write_IHDR");
/* Check that we have valid input data from ... | 0 | [
"CWE-120"
] | libpng | 81f44665cce4cb1373f049a76f3904e981b7a766 | 55,132,876,672,001,820,000,000,000,000,000,000,000 | 159 | [libpng16] Reject attempt to write over-length PLTE chunk |
static void nfs4_open_prepare(struct rpc_task *task, void *calldata)
{
struct nfs4_opendata *data = calldata;
struct nfs4_state_owner *sp = data->owner;
if (nfs_wait_on_sequence(data->o_arg.seqid, task) != 0)
return;
/*
* Check if we still need to send an OPEN call, or if we can use
* a delegation instead.
... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 8,223,028,430,374,224,000,000,000,000,000,000,000 | 39 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
int sched_fork(unsigned long clone_flags, struct task_struct *p)
{
unsigned long flags;
int cpu = get_cpu();
__sched_fork(clone_flags, p);
/*
* We mark the process as running here. This guarantees that
* nobody will actually run it, and a signal or other external
* event cannot wake it up and insert it on th... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 182,786,287,587,469,470,000,000,000,000,000,000,000 | 78 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
AirPDcapValidateKey(
PAIRPDCAP_KEY_ITEM key)
{
size_t len;
UCHAR ret=TRUE;
AIRPDCAP_DEBUG_TRACE_START("AirPDcapValidateKey");
if (key==NULL) {
AIRPDCAP_DEBUG_PRINT_LINE("AirPDcapValidateKey", "NULL key", AIRPDCAP_DEBUG_LEVEL_5);
AIRPDCAP_DEBUG_TRACE_START("AirPDcapValidateKey");
... | 0 | [
"CWE-20"
] | wireshark | 9b0b20b8d5f8c9f7839d58ff6c5900f7e19283b4 | 119,372,263,892,324,810,000,000,000,000,000,000,000 | 64 | Make sure EAPOL body is big enough for a EAPOL_RSN_KEY.
A pointer to a EAPOL_RSN_KEY is set on the packet presuming the
whole EAPOL_RSN_KEY is there. That's not always the case for
fuzzed/malicious captures.
Bug: 11585
Change-Id: Ib94b8aceef444c7820e43b969596efdb8dbecccd
Reviewed-on: https://code.wireshark.org/revie... |
START_TEST(evdev_abs_parser)
{
struct test {
uint32_t which;
const char *prop;
int min, max, res, fuzz, flat;
} tests[] = {
{ .which = (ABS_MASK_MIN|ABS_MASK_MAX),
.prop = "1:2",
.min = 1, .max = 2 },
{ .which = (ABS_MASK_MIN|ABS_MASK_MAX),
.prop = "1:2:",
.min = 1, .max = 2 },
{ .which =... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 175,352,416,053,921,400,000,000,000,000,000,000,000 | 74 | evdev: strip the device name of format directives
This fixes a format string vulnerabilty.
evdev_log_message() composes a format string consisting of a fixed
prefix (including the rendered device name) and the passed-in format
buffer. This format string is then passed with the arguments to the
actual log handler, whi... |
authdir_policy_permits_address(uint32_t addr, uint16_t port)
{
if (! addr_policy_permits_address(addr, port, authdir_reject_policy))
return 0;
return !addr_is_in_cc_list(addr, get_options()->AuthDirRejectCCs);
} | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 194,956,234,151,206,030,000,000,000,000,000,000,000 | 6 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
Warn_filter_all() :Warn_filter(true, true) { } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 147,141,896,348,338,320,000,000,000,000,000,000,000 | 1 | 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 int audit_log_pid_context(struct audit_context *context, pid_t pid,
kuid_t auid, kuid_t uid, unsigned int sessionid,
u32 sid, char *comm)
{
struct audit_buffer *ab;
char *ctx = NULL;
u32 len;
int rc = 0;
ab = audit_log_start(context, GFP_KERNEL, AUDIT_OBJ_PID);
if (!ab)
return rc;
audit_log_... | 0 | [
"CWE-362"
] | linux | 43761473c254b45883a64441dd0bc85a42f3645c | 178,909,202,055,994,960,000,000,000,000,000,000,000 | 31 | audit: fix a double fetch in audit_log_single_execve_arg()
There is a double fetch problem in audit_log_single_execve_arg()
where we first check the execve(2) argumnets for any "bad" characters
which would require hex encoding and then re-fetch the arguments for
logging in the audit record[1]. Of course this leaves a... |
evbuffer_unfreeze(struct evbuffer *buffer, int start)
{
EVBUFFER_LOCK(buffer);
if (start)
buffer->freeze_start = 0;
else
buffer->freeze_end = 0;
EVBUFFER_UNLOCK(buffer);
return 0;
} | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 247,013,293,404,087,400,000,000,000,000,000,000,000 | 10 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
static void handle_tx(struct vhost_net *net)
{
struct vhost_net_virtqueue *nvq = &net->vqs[VHOST_NET_VQ_TX];
struct vhost_virtqueue *vq = &nvq->vq;
unsigned out, in, s;
int head;
struct msghdr msg = {
.msg_name = NULL,
.msg_namelen = 0,
.msg_control = NULL,
.msg_controllen = 0,
.msg_iov = vq->iov,
.msg... | 0 | [
"CWE-20",
"CWE-787"
] | linux | d8316f3991d207fe32881a9ac20241be8fa2bad0 | 284,832,861,642,963,630,000,000,000,000,000,000,000 | 127 | vhost: fix total length when packets are too short
When mergeable buffers are disabled, and the
incoming packet is too large for the rx buffer,
get_rx_bufs returns success.
This was intentional in order for make recvmsg
truncate the packet and then handle_rx would
detect err != sock_len and drop it.
Unfortunately we... |
static int rtc_dev_open(struct inode *inode, struct file *file)
{
int err;
struct rtc_device *rtc = container_of(inode->i_cdev,
struct rtc_device, char_dev);
const struct rtc_class_ops *ops = rtc->ops;
if (test_and_set_bit_lock(RTC_DEV_BUSY, &rtc->flags))
return -EBUSY;
file->private_data = rtc;
err = o... | 0 | [] | linux-2.6 | 2e4a75cdcb89ff53bb182dda3a6dcdc14befe007 | 249,321,727,564,346,460,000,000,000,000,000,000,000 | 25 | rtc: fix kernel panic on second use of SIGIO nofitication
When userspace uses SIGIO notification and forgets to disable it before
closing file descriptor, rtc->async_queue contains stale pointer to struct
file. When user space enables again SIGIO notification in different
process, kernel dereferences this (poisoned) ... |
dtls1_process_out_of_seq_message(SSL *s, struct hm_header_st* msg_hdr, int *ok)
{
int i=-1;
hm_fragment *frag = NULL;
pitem *item = NULL;
unsigned char seq64be[8];
unsigned long frag_len = msg_hdr->frag_len;
if ((msg_hdr->frag_off+frag_len) > msg_hdr->msg_len)
goto err;
/* Try to find item in queue, to preve... | 1 | [] | openssl | bff1ce4e6a1c57c3d0a5f9e4f85ba6385fccfe8b | 183,952,221,427,997,800,000,000,000,000,000,000,000 | 82 | Avoid double free when processing DTLS packets.
The |item| variable, in both of these cases, may contain a pointer to a
|pitem| structure within |s->d1->buffered_messages|. It was being freed
in the error case while still being in |buffered_messages|. When the
error later caused the |SSL*| to be destroyed, the item wo... |
static int insert_header(struct ctl_dir *dir, struct ctl_table_header *header)
{
struct ctl_table *entry;
int err;
/* Is this a permanently empty directory? */
if (is_empty_dir(&dir->header))
return -EROFS;
/* Am I creating a permanently empty directory? */
if (header->ctl_table == sysctl_mount_point) {
if ... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 312,016,211,218,009,700,000,000,000,000,000,000,000 | 37 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
flatpak_dir_ensure_path (FlatpakDir *self,
GCancellable *cancellable,
GError **error)
{
/* In the system case, we use default perms */
if (!self->user)
return flatpak_mkdir_p (self->basedir, cancellable, error);
else
{
/* First make the parent... | 0 | [
"CWE-668"
] | flatpak | cd2142888fc4c199723a0dfca1f15ea8788a5483 | 152,016,533,094,867,940,000,000,000,000,000,000,000 | 43 | Don't expose /proc when running apply_extra
As shown by CVE-2019-5736, it is sometimes possible for the sandbox
app to access outside files using /proc/self/exe. This is not
typically an issue for flatpak as the sandbox runs as the user which
has no permissions to e.g. modify the host files.
However, when installing ... |
archive_wstring_concat(struct archive_wstring *dest,
struct archive_wstring *src)
{
if (archive_wstring_append(dest, src->s, src->length) == NULL)
__archive_errx(1, "Out of memory");
} | 0 | [
"CWE-476"
] | libarchive | 42a3408ac7df1e69bea9ea12b72e14f59f7400c0 | 2,744,837,110,644,134,000,000,000,000,000,000,000 | 6 | archive_strncat_l(): allocate and do not convert if length == 0
This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set
aes_set = AES_SET_MBS with aes_mbs.s == NULL.
Resolves possible null-pointer dereference reported by OSS-Fuzz.
Reported-By: OSS-Fuzz issue 286 |
archive_wstrappend_wchar(struct archive_wstring *as, wchar_t c)
{
if ((as = archive_wstring_append(as, &c, 1)) == NULL)
__archive_errx(1, "Out of memory");
return (as);
} | 0 | [
"CWE-476"
] | libarchive | 42a3408ac7df1e69bea9ea12b72e14f59f7400c0 | 26,941,385,418,255,770,000,000,000,000,000,000,000 | 6 | archive_strncat_l(): allocate and do not convert if length == 0
This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set
aes_set = AES_SET_MBS with aes_mbs.s == NULL.
Resolves possible null-pointer dereference reported by OSS-Fuzz.
Reported-By: OSS-Fuzz issue 286 |
upnp_get_redirection_infos(unsigned short eport, const char * protocol,
unsigned short * iport,
char * iaddr, int iaddrlen,
char * desc, int desclen,
char * rhost, int rhostlen,
unsigne... | 0 | [
"CWE-476"
] | miniupnp | f321c2066b96d18afa5158dfa2d2873a2957ef38 | 193,360,329,622,212,370,000,000,000,000,000,000,000 | 28 | upnp_redirect(): accept NULL desc argument |
rc_pdf14_maskbuf_free(gs_memory_t * mem, void *ptr_in, client_name_t cname)
{
/* Ending the mask buffer. */
pdf14_rcmask_t *rcmask = (pdf14_rcmask_t * ) ptr_in;
/* free the pdf14 buffer. */
if ( rcmask->mask_buf != NULL ){
pdf14_buf_free(rcmask->mask_buf);
}
gs_free_object(mem, rcmask, "... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 335,513,052,167,262,200,000,000,000,000,000,000,000 | 10 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
void CoreUserInputHandler::defaultHandler(QString cmd, const BufferInfo &bufferInfo, const QString &msg)
{
Q_UNUSED(bufferInfo);
emit putCmd(serverEncode(cmd.toUpper()), serverEncode(msg.split(" ")));
} | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 321,672,169,461,577,950,000,000,000,000,000,000,000 | 5 | Improve the message-splitting algorithm for PRIVMSG and CTCP
This introduces a new message splitting algorithm based on
QTextBoundaryFinder. It works by first starting with the entire
message to be sent, encoding it, and checking to see if it is over
the maximum message length. If it is, it uses QTBF to find the
wor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.