func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
ZEND_API int zend_startup_modules(TSRMLS_D) /* {{{ */
{
zend_hash_sort(&module_registry, zend_sort_modules, NULL, 0 TSRMLS_CC);
zend_hash_apply(&module_registry, (apply_func_t)zend_startup_module_int TSRMLS_CC);
return SUCCESS;
} | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 29,312,278,306,274,740,000,000,000,000,000,000,000 | 6 | Fix bug #73147: Use After Free in PHP7 unserialize() |
static char *guest_wctomb_dup(WCHAR *wstr)
{
char *str;
size_t i;
i = wcslen(wstr) + 1;
str = g_malloc(i);
WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK,
wstr, -1, str, i, NULL, NULL);
return str;
} | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 177,558,518,401,996,270,000,000,000,000,000,000,000 | 11 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
Compute(OpKernelContext* context, bool sorted, int k,
const typename TTypes<T, 2>::ConstTensor& input, const int64 num_rows,
const int64 num_cols, typename TTypes<T, 2>::Tensor values,
typename TTypes<int, 2>::Tensor indices) {
const CPUDevice& d = context->eigen_device<CPUDevice>();... | 1 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 332,104,350,948,913,940,000,000,000,000,000,000,000 | 125 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... |
ptp_unpack_OPL (PTPParams *params, unsigned char* data, MTPProperties **pprops, unsigned int len)
{
uint32_t prop_count;
MTPProperties *props = NULL;
unsigned int offset = 0, i;
if (len < sizeof(uint32_t)) {
ptp_debug (params ,"must have at least 4 bytes data, not %d", len);
return 0;
}
prop_count = dtoh32... | 0 | [
"CWE-190"
] | libgphoto2 | e25b3983489cd290edef693e78c0af694d3cd010 | 102,446,574,632,051,980,000,000,000,000,000,000,000 | 63 | Added some more size checks to ptp_unpack_OPL to avoid crashes on too short data (AFL) |
rtc_dev_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct rtc_device *rtc = file->private_data;
DECLARE_WAITQUEUE(wait, current);
unsigned long data;
ssize_t ret;
if (count != sizeof(unsigned int) && count < sizeof(unsigned long))
return -EINVAL;
add_wait_queue(&rtc->irq_queue, &... | 0 | [] | linux-2.6 | 2e4a75cdcb89ff53bb182dda3a6dcdc14befe007 | 225,982,826,311,428,260,000,000,000,000,000,000,000 | 53 | 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) ... |
void CClient::VersionUpdate()
{
if(m_VersionInfo.m_State == CVersionInfo::STATE_INIT)
{
Engine()->HostLookup(&m_VersionInfo.m_VersionServeraddr, g_Config.m_ClVersionServer, m_ContactClient.NetType());
m_VersionInfo.m_State = CVersionInfo::STATE_START;
}
else if(m_VersionInfo.m_State == CVersionInfo::STATE_START... | 0 | [
"CWE-119",
"CWE-787"
] | teeworlds | ff254722a2683867fcb3e67569ffd36226c4bc62 | 152,843,576,748,877,270,000,000,000,000,000,000,000 | 28 | added some checks to snap handling |
bool MYSQL_BIN_LOG::appendv(const char* buf, uint len,...)
{
bool error= 0;
DBUG_ENTER("MYSQL_BIN_LOG::appendv");
va_list(args);
va_start(args,len);
DBUG_ASSERT(log_file.type == SEQ_READ_APPEND);
mysql_mutex_assert_owner(&LOCK_log);
do
{
if (my_b_append(&log_file,(uchar*) buf,len))
{
err... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 165,534,628,508,621,900,000,000,000,000,000,000,000 | 29 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
EVP_PKEY *d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **a)
{
return ASN1_d2i_fp_of(EVP_PKEY,EVP_PKEY_new,d2i_PUBKEY,fp,a);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 32,599,351,620,829,207,000,000,000,000,000,000,000 | 4 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
address_space_write_cached_slow(MemoryRegionCache *cache, hwaddr addr,
const void *buf, hwaddr len)
{
hwaddr addr1, l;
MemoryRegion *mr;
l = len;
mr = address_space_translate_cached(cache, addr, &addr1, &l, true,
MEMTXATTRS_UNS... | 0 | [
"CWE-787"
] | qemu | 4bfb024bc76973d40a359476dc0291f46e435442 | 316,866,238,366,012,550,000,000,000,000,000,000,000 | 13 | memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:
/* MMIO registers can be expected to perform full-width accesses based onl... |
gdm_display_init (GdmDisplay *self)
{
GdmDisplayPrivate *priv;
priv = gdm_display_get_instance_private (self);
priv->creation_time = time (NULL);
} | 0 | [
"CWE-754"
] | gdm | 4e6e5335d29c039bed820c43bfd1c19cb62539ff | 211,507,840,569,226,060,000,000,000,000,000,000,000 | 8 | display: Use autoptr to handle errors in look for existing users
It will make things just cleaner |
int ext4_group_add(struct super_block *sb, struct ext4_new_group_data *input)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
struct ext4_super_block *es = sbi->s_es;
int reserved_gdb = ext4_bg_has_super(sb, input->group) ?
le16_to_cpu(es->s_reserved_gdt_blocks) : 0;
struct buffer_head *primary = NULL;
struct ext4_gro... | 0 | [
"CWE-20"
] | linux-2.6 | fdff73f094e7220602cc3f8959c7230517976412 | 193,067,835,456,666,800,000,000,000,000,000,000,000 | 226 | ext4: Initialize the new group descriptor when resizing the filesystem
Make sure all of the fields of the group descriptor are properly
initialized. Previously, we allowed bg_flags field to be contain
random garbage, which could trigger non-deterministic behavior,
including a kernel OOPS.
http://bugzilla.kernel.org/... |
_functor2d_expr(const char *const expr):mp(0) {
mp = new _cimg_math_parser(expr,0,CImg<T>::const_empty(),0);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 196,439,700,133,524,130,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 krb5_error_code hdb_samba4_firstkey(krb5_context context, HDB *db, unsigned flags,
hdb_entry *entry)
{
struct samba_kdc_db_context *kdc_db_ctx;
struct sdb_entry sentry = {};
krb5_error_code ret;
kdc_db_ctx = talloc_get_type_abort(db->hdb_db,
struct samba_kdc_db_context);
ret = samba_kdc_first... | 0 | [
"CWE-288"
] | samba | 484c6980befb86f7d81d708829ed4ceb819538eb | 187,422,812,069,290,970,000,000,000,000,000,000,000 | 28 | CVE-2022-32744 s4:kdc: Modify HDB plugin to only look up kpasswd principal
This plugin is now only used by the kpasswd service. Thus, ensuring we
only look up the kadmin/changepw principal means we can't be fooled into
accepting tickets for other service principals. We make sure not to
specify a specific kvno, to ensu... |
static long iowarrior_ioctl(struct file *file, unsigned int cmd,
unsigned long arg)
{
struct iowarrior *dev = NULL;
__u8 *buffer;
__u8 __user *user_buffer;
int retval;
int io_res; /* checks for bytes read/written and copy_to/from_user results */
dev = file->private_data;
if (!dev)
return -ENODEV;
bu... | 0 | [
"CWE-416"
] | linux | edc4746f253d907d048de680a621e121517f484b | 47,248,146,088,924,900,000,000,000,000,000,000,000 | 115 | USB: iowarrior: fix use-after-free on disconnect
A recent fix addressing a deadlock on disconnect introduced a new bug
by moving the present flag out of the critical section protected by the
driver-data mutex. This could lead to a racing release() freeing the
driver data before disconnect() is done with it.
Due to in... |
_g_clear_object (gpointer p)
{
g_clear_object ((GObject **) p);
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 328,363,080,419,591,570,000,000,000,000,000,000,000 | 4 | libarchive: sanitize filenames before extracting |
tv_get_bool_or_number_chk(typval_T *varp, int *denote, int want_bool)
{
varnumber_T n = 0L;
switch (varp->v_type)
{
case VAR_NUMBER:
if (in_vim9script() && want_bool && varp->vval.v_number != 0
&& varp->vval.v_number != 1)
{
semsg(_(e_using_number_as_bool_nr), varp->vval.v_number);
... | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 275,759,209,584,421,180,000,000,000,000,000,000,000 | 78 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
static void test_bug6046()
{
MYSQL_STMT *stmt;
const char *stmt_text;
int rc;
short b= 1;
MYSQL_BIND my_bind[1];
myheader("test_bug6046");
stmt_text= "DROP TABLE IF EXISTS t1";
rc= mysql_real_query(mysql, stmt_text, strlen(stmt_text));
myquery(rc);
stmt_text= "CREATE TABLE t1 (a int, b int)";
rc... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 245,692,106,890,270,770,000,000,000,000,000,000,000 | 44 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static void p_close(struct mg_fd *fd) {
if (fd != NULL) fclose((FILE *) fd->fd), free(fd);
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 170,370,840,802,157,230,000,000,000,000,000,000,000 | 3 | Protect against the directory traversal in mg_upload() |
static ssize_t random_write(struct file *file, const char __user *buffer,
size_t count, loff_t *ppos)
{
size_t ret;
ret = write_pool(&input_pool, buffer, count);
if (ret)
return ret;
return (ssize_t)count;
} | 0 | [
"CWE-200",
"CWE-330"
] | linux | f227e3ec3b5cad859ad15666874405e8c1bbc1d4 | 56,650,120,738,188,740,000,000,000,000,000,000,000 | 11 | random32: update the net random state on interrupt and activity
This modifies the first 32 bits out of the 128 bits of a random CPU's
net_rand_state on interrupt or CPU activity to complicate remote
observations that could lead to guessing the network RNG's internal
state.
Note that depending on some network devices'... |
lyd_insert_setinvalid(struct lyd_node *node)
{
struct lyd_node *next, *elem, *parent_list;
assert(node);
/* overall validity of the node itself */
node->validity = ly_new_node_validity(node->schema);
/* explore changed unique leaves */
/* first, get know if there is a list in parents chain */... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 313,122,684,124,091,800,000,000,000,000,000,000,000 | 78 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
static inline void sanitize_i387_state(struct task_struct *tsk)
{
if (!use_xsaveopt())
return;
__sanitize_i387_state(tsk);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 26bef1318adc1b3a530ecc807ef99346db2aa8b0 | 774,402,027,752,271,500,000,000,000,000,000,000 | 6 | x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
Before we do an EMMS in the AMD FXSAVE information leak workaround we
need to clear any pending exceptions, otherwise we trap with a
floating-point exception inside this code.
Reported-by: halfdog <me@halfdog.net>
Tested-by: Borislav Petkov <bp@suse.de>
Link: h... |
_equalCommonTableExpr(const CommonTableExpr *a, const CommonTableExpr *b)
{
COMPARE_STRING_FIELD(ctename);
COMPARE_NODE_FIELD(aliascolnames);
COMPARE_NODE_FIELD(ctequery);
COMPARE_LOCATION_FIELD(location);
COMPARE_SCALAR_FIELD(cterecursive);
COMPARE_SCALAR_FIELD(cterefcount);
COMPARE_NODE_FIELD(ctecolnames);
CO... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 196,080,815,928,393,200,000,000,000,000,000,000,000 | 15 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
void CLASS parse_ciff (int offset, int length, int depth)
{
int tboff, nrecs, c, type, len, save, wbi=-1;
ushort key[] = { 0x410, 0x45f3 };
fseek (ifp, offset+length-4, SEEK_SET);
tboff = get4() + offset;
fseek (ifp, tboff, SEEK_SET);
nrecs = get2();
if ((nrecs | depth) > 127) return;
while (nrecs--) {... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | LibRaw | d13e8f6d1e987b7491182040a188c16a395f1d21 | 134,025,629,678,157,160,000,000,000,000,000,000,000 | 157 | CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access |
Status removePrivilegeDocuments(OperationContext* txn,
const BSONObj& query,
long long* numRemoved) {
Status status = removeAuthzDocuments(
txn, AuthorizationManager::usersCollectionNamespace, query, numRemoved);
if (status.code() == ErrorC... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 249,210,406,790,754,860,000,000,000,000,000,000,000 | 10 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static int measure_breadcrumb_dw(struct intel_context *ce)
{
struct intel_engine_cs *engine = ce->engine;
struct measure_breadcrumb *frame;
int dw;
GEM_BUG_ON(!engine->gt->scratch);
frame = kzalloc(sizeof(*frame), GFP_KERNEL);
if (!frame)
return -ENOMEM;
frame->rq.engine = engine;
frame->rq.context = ce;
... | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 261,622,552,069,721,630,000,000,000,000,000,000,000 | 37 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
static const char *cmd_hash_key(cmd_parms *cmd, void *_dcfg, const char *_p1, const char *_p2)
{
directory_config *dcfg = (directory_config *)_dcfg;
char *p1 = NULL;
if (dcfg == NULL) return NULL;
if (_p1 == NULL) return NULL;
if (strcasecmp(_p1, "Rand") == 0) {
p1 = apr_pstrdup(cmd->po... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 223,861,630,864,312,160,000,000,000,000,000,000,000 | 30 | Added SecXmlExternalEntity |
static enum hrtimer_restart io_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
unsigned long flags;
spin_lock_irqsave(&ctx->completion_lock, flags);
list_del_init(&r... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 2,784,406,485,720,226,600,000,000,000,000,000,000 | 22 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
DECLAREContigPutFunc(putcontig8bitYCbCr12tile)
{
uint32* cp2;
int32 incr = 2*toskew+w;
(void) y;
fromskew = (fromskew / 1) * (1 * 2 + 2);
cp2 = cp+w+toskew;
while (h>=2) {
x = w;
do {
uint32 Cb = pp[2];
uint32 Cr = pp[3];
YCbCrtoRGB(cp[0], pp[0]);
YCbCrtoRGB(cp2[0], pp[1]);
cp ++;
cp2 ++;
... | 0 | [
"CWE-787"
] | libtiff | 4bb584a35f87af42d6cf09d15e9ce8909a839145 | 282,703,052,395,162,230,000,000,000,000,000,000,000 | 34 | RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz |
MagickExport int LocaleLowercase(const int c)
{
if (c < 0)
return(c);
#if defined(MAGICKCORE_LOCALE_SUPPORT)
if (c_locale != (locale_t) NULL)
return(tolower_l((int) ((unsigned char) c),c_locale));
#endif
return(tolower((int) ((unsigned char) c)));
} | 1 | [
"CWE-125"
] | ImageMagick | 58d9c46929ca0828edde34d263700c3a5fe8dc3c | 25,588,315,609,462,873,000,000,000,000,000,000,000 | 10 | ... |
int samdb_is_rodc(struct ldb_context *sam_ctx, const struct GUID *objectGUID, bool *is_rodc)
{
/* 1) find the DN for this servers NTDSDSA object
2) search for the msDS-isRODC attribute
3) if not present then not a RODC
4) if present and TRUE then is a RODC
*/
struct ldb_dn *config_dn;
const char *attrs[... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 184,461,660,294,609,280,000,000,000,000,000,000,000 | 42 | 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... |
static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
{
enum {
rrl_none, rrl_badmethod, rrl_badwhitespace, rrl_excesswhitespace,
rrl_missinguri, rrl_baduri, rrl_badprotocol, rrl_trailingtext,
rrl_badmethod09, rrl_reject09
} deferred_error = rrl_none;
char *ll;
char... | 1 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 310,589,004,987,591,700,000,000,000,000,000,000,000 | 329 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
static unsigned kvm_page_table_hashfn(gfn_t gfn)
{
return hash_64(gfn, KVM_MMU_HASH_SHIFT);
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 247,438,870,106,961,000,000,000,000,000,000,000,000 | 4 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
ldns_rdf_data(const ldns_rdf *rd)
{
assert(rd != NULL);
return rd->_data;
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 274,556,401,090,091,500,000,000,000,000,000,000,000 | 5 | CAA and URI |
int kvm_arch_hardware_setup(void *opaque)
{
struct kvm_x86_init_ops *ops = opaque;
int r;
rdmsrl_safe(MSR_EFER, &host_efer);
if (boot_cpu_has(X86_FEATURE_XSAVES))
rdmsrl(MSR_IA32_XSS, host_xss);
r = ops->hardware_setup();
if (r != 0)
return r;
kvm_ops_update(ops);
kvm_register_perf_callbacks(ops->handl... | 0 | [
"CWE-476"
] | linux | fee060cd52d69c114b62d1a2948ea9648b5131f9 | 219,386,186,669,488,470,000,000,000,000,000,000,000 | 40 | KVM: x86: avoid calling x86 emulator without a decoded instruction
Whenever x86_decode_emulated_instruction() detects a breakpoint, it
returns the value that kvm_vcpu_check_breakpoint() writes into its
pass-by-reference second argument. Unfortunately this is completely
bogus because the expected outcome of x86_decode... |
int wc_Ed25519PrivateKeyDecode(const byte* input, word32* inOutIdx,
ed25519_key* key, word32 inSz)
{
word32 oid;
int ret, version, length, endKeyIdx, privSz, pubSz;
const byte* priv;
const byte* pub;
if (input == NULL || inOutIdx == NULL || key == NULL ||... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 56,955,375,079,332,790,000,000,000,000,000,000,000 | 67 | OCSP: improve handling of OCSP no check extension |
gs_grab_release_keyboard (GSGrab *grab)
{
gs_debug ("Ungrabbing keyboard");
gdk_keyboard_ungrab (GDK_CURRENT_TIME);
gs_grab_keyboard_reset (grab);
return TRUE;
} | 0 | [] | gnome-screensaver | f93a22c175090cf02e80bc3ee676b53f1251f685 | 31,404,775,784,760,957,000,000,000,000,000,000,000 | 9 | Nullify grab window variables when windows are destroyed
If we don't do this then there is a time period where the
grab window variables contain dangling pointers which can
cause crashes.
Part of fix for
https://bugzilla.gnome.org/show_bug.cgi?id=609789 |
rl_bind_keyseq_in_map (keyseq, function, map)
const char *keyseq;
rl_command_func_t *function;
Keymap map;
{
return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 238,196,225,362,394,750,000,000,000,000,000,000,000 | 7 | bash-4.4-rc2 release |
int __vma_adjust(struct vm_area_struct *vma, unsigned long start,
unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert,
struct vm_area_struct *expand)
{
struct mm_struct *mm = vma->vm_mm;
struct vm_area_struct *next = vma->vm_next, *orig_vma = vma;
struct address_space *mapping = NULL;
struct rb_root_c... | 0 | [
"CWE-476"
] | linux | 27ae357fa82be5ab73b2ef8d39dcb8ca2563483a | 90,208,880,913,006,300,000,000,000,000,000,000,000 | 288 | mm, oom: fix concurrent munlock and oom reaper unmap, v3
Since exit_mmap() is done without the protection of mm->mmap_sem, it is
possible for the oom reaper to concurrently operate on an mm until
MMF_OOM_SKIP is set.
This allows munlock_vma_pages_all() to concurrently run while the oom
reaper is operating on a vma. ... |
add_mibdir(const char *dirname)
{
FILE *ip;
const char *oldFile = File;
char **filenames;
int count = 0;
int filename_count, i;
#if !(defined(WIN32) || defined(cygwin))
char *token;
char space;
char newline;
struct stat dir... | 1 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 128,405,117,099,319,300,000,000,000,000,000,000,000 | 75 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
decompileCALLFRAME(int n, SWF_ACTION *actions, int maxn)
{
INDENT
puts("callFrame(");
decompilePUSHPARAM(pop(),1);
println(");");
return 0;
} | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 242,419,667,724,161,730,000,000,000,000,000,000,000 | 8 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
hb_set_get_empty ()
{
return const_cast<hb_set_t *> (&Null (hb_set_t));
} | 0 | [
"CWE-787"
] | harfbuzz | d3e09bf4654fe5478b6dbf2b26ebab6271317d81 | 305,523,720,071,567,170,000,000,000,000,000,000,000 | 4 | [set] Make all operators null-safe again
Changed my mind.
Also for hb_map_clear().
Part of https://github.com/harfbuzz/harfbuzz/pull/3162 |
timeval_to_double(const timeval_t *t)
{
/* The casts are necessary to avoid conversion warnings */
return (double)t->tv_sec + (double)t->tv_usec / TIMER_HZ_FLOAT;
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 85,455,363,854,368,250,000,000,000,000,000,000,000 | 5 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
int oidc_oauth_check_userid(request_rec *r, oidc_cfg *c) {
/* check if this is a sub-request or an initial request */
if (!ap_is_initial_req(r)) {
if (r->main != NULL)
r->user = r->main->user;
else if (r->prev != NULL)
r->user = r->prev->user;
if (r->user != NULL) {
/* this is a sub-request and we ... | 0 | [
"CWE-287"
] | mod_auth_openidc | 21e3728a825c41ab41efa75e664108051bb9665e | 110,952,308,000,145,900,000,000,000,000,000,000,000 | 109 | release 2.1.6 : security fix: scrub headers for "AuthType oauth20"
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
int gx_device_subclass(gx_device *dev_to_subclass, gx_device *new_prototype, unsigned int private_data_size)
{
gx_device *child_dev;
void *psubclass_data;
gs_memory_struct_type_t *a_std, *b_std;
int dynamic = dev_to_subclass->stype_is_dynamic;
char *ptr, *ptr1;
/* If this happens we are stuffed... | 0 | [] | ghostpdl | c9b362ba908ca4b1d7c72663a33229588012d7d9 | 249,352,977,671,078,360,000,000,000,000,000,000,000 | 122 | Bug 699670: disallow copying of the epo device
The erasepage optimisation (epo) subclass device shouldn't be allowed to be
copied because the subclass private data, child and parent pointers end up
being shared between the original device and the copy.
Add an epo_finish_copydevice which NULLs the three offending poin... |
bool Parser::parse_number_prefix()
{
bool positive = true;
while(true) {
if (lex < block_comment >()) continue;
if (lex < number_prefix >()) continue;
if (lex < exactly < '-' > >()) {
positive = !positive;
continue;
}
break;
}
return positive;
} | 0 | [
"CWE-125"
] | libsass | eb15533b07773c30dc03c9d742865604f47120ef | 17,751,784,520,228,946,000,000,000,000,000,000,000 | 14 | Fix memory leak in `parse_ie_keyword_arg`
`kwd_arg` would never get freed when there was a parse error in
`parse_ie_keyword_arg`.
Closes #2656 |
nfsd4_decode_setclientid(struct nfsd4_compoundargs *argp, struct nfsd4_setclientid *setclientid)
{
DECODE_HEAD;
if (argp->minorversion >= 1)
return nfserr_notsupp;
READ_BUF(NFS4_VERIFIER_SIZE);
COPYMEM(setclientid->se_verf.data, NFS4_VERIFIER_SIZE);
status = nfsd4_decode_opaque(argp, &setclientid->se_name);
... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 231,940,333,184,921,500,000,000,000,000,000,000,000 | 28 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
FStructData startWriteStruct(const FStructData& parent, const char* key,
int struct_flags, const char* type_name=0)
{
std::vector<std::string> attrlist;
if( type_name && *type_name )
{
attrlist.push_back("type_id");
attrlist.push_b... | 0 | [
"CWE-787"
] | opencv | f42d5399aac80d371b17d689851406669c9b9111 | 78,621,040,286,120,380,000,000,000,000,000,000,000 | 19 | core(persistence): add more checks for implementation limitations |
static void ioapic_write_indirect(struct kvm_ioapic *ioapic, u32 val)
{
unsigned index;
bool mask_before, mask_after;
union kvm_ioapic_redirect_entry *e;
switch (ioapic->ioregsel) {
case IOAPIC_REG_VERSION:
/* Writes are ignored. */
break;
case IOAPIC_REG_APIC_ID:
ioapic->id = (val >> 24) & 0xf;
break;
... | 0 | [
"CWE-703",
"CWE-125"
] | linux | 81cdb259fb6d8c1c4ecfeea389ff5a73c07f5755 | 277,849,216,230,885,000,000,000,000,000,000,000,000 | 44 | KVM: x86: fix out-of-bounds accesses of rtc_eoi map
KVM was using arrays of size KVM_MAX_VCPUS with vcpu_id, but ID can be
bigger that the maximal number of VCPUs, resulting in out-of-bounds
access.
Found by syzkaller:
BUG: KASAN: slab-out-of-bounds in __apic_accept_irq+0xb33/0xb50 at addr [...]
Write of size 1 ... |
SPL_METHOD(SplFileInfo, getExtension)
{
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
char *fname = NULL;
const char *p;
size_t flen;
size_t path_len;
size_t idx;
zend_string *ret;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
spl_filesystem_object_get_path(intern, &path_len);
... | 0 | [
"CWE-74"
] | php-src | a5a15965da23c8e97657278fc8dfbf1dfb20c016 | 114,688,294,159,796,560,000,000,000,000,000,000,000 | 37 | Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings. |
static int visit_func_call_insn(int t, int insn_cnt,
struct bpf_insn *insns,
struct bpf_verifier_env *env,
bool visit_callee)
{
int ret;
ret = push_insn(t, t + 1, FALLTHROUGH, env, false);
if (ret)
return ret;
if (t + 1 < insn_cnt)
init_explored_state(env, t + 1);
if (visit_callee) {
init_explo... | 0 | [
"CWE-367"
] | bpf | 353050be4c19e102178ccc05988101887c25ae53 | 161,047,150,035,324,600,000,000,000,000,000,000,000 | 24 | bpf: Fix toctou on read-only map's constant scalar tracking
Commit a23740ec43ba ("bpf: Track contents of read-only maps as scalars") is
checking whether maps are read-only both from BPF program side and user space
side, and then, given their content is constant, reading out their data via
map->ops->map_direct_value_ad... |
static void ext_key_event(VncState *vs, int down,
uint32_t sym, uint16_t keycode)
{
/* if the user specifies a keyboard layout, always use it */
if (keyboard_layout) {
key_event(vs, down, sym);
} else {
trace_vnc_key_event_ext(down, sym, keycode, code2name(keycode))... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 118,661,989,936,804,920,000,000,000,000,000,000,000 | 11 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
int SSL_CTX_check_private_key(SSL_CTX* /*ctx*/)
{
// TODO: check private against public for RSA match
return SSL_NOT_IMPLEMENTED;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 36,666,624,924,910,660,000,000,000,000,000,000,000 | 5 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static void handle_binary_protocol_error(conn *c) {
write_bin_error(c, PROTOCOL_BINARY_RESPONSE_EINVAL, NULL, 0);
if (settings.verbose) {
fprintf(stderr, "Protocol error (opcode %02x), close connection %d\n",
c->binary_header.request.opcode, c->sfd);
}
c->close_after_write = true... | 0 | [] | memcached | f249724cedcab6605ca8a0769ac4b356a8124f63 | 122,874,199,070,835,370,000,000,000,000,000,000,000 | 8 | crash fix: errstr wasn't initialized in metaget
if meta_flag_preparse bailed out early it would try to read
uninitialized memory. |
static inline int cache_setup_of_node(unsigned int cpu) { return 0; } | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 103,882,515,791,003,250,000,000,000,000,000,000,000 | 1 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
char *ogs_nas_5gs_suci_from_mobile_identity(
ogs_nas_5gs_mobile_identity_t *mobile_identity)
{
ogs_nas_5gs_mobile_identity_suci_t *mobile_identity_suci = NULL;
ogs_plmn_id_t plmn_id;
char tmp[OGS_MAX_IMSI_BCD_LEN+1];
char routing_indicator[5];
char *suci = NULL;
ogs_assert(mobile_identi... | 1 | [
"CWE-787"
] | open5gs | c0f695525088486c509f37a02ff1fda211b141bb | 22,172,238,106,439,330,000,000,000,000,000,000,000 | 64 | [AMF] fix the crash when long MSIN length (#1206)
When the UE is in initially registered period,
if the length of MSIN(Part of SUPI) exceeds the normal length,
AMF stack smashing will be caused |
EXPORTED int annotate_state_commit(annotate_state_t **statep)
{
int r = 0;
if (*statep)
r = annotate_commit((*statep)->d);
annotate_state_free(statep);
return r;
} | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 210,889,470,032,126,000,000,000,000,000,000,000,000 | 9 | annotate: don't allow everyone to write shared server entries |
static int commit_quick_parse(
git_revwalk *walk,
git_commit_list_node *commit,
const uint8_t *buffer,
size_t buffer_len)
{
const size_t parent_len = strlen("parent ") + GIT_OID_HEXSZ + 1;
const uint8_t *buffer_end = buffer + buffer_len;
const uint8_t *parents_start, *committer_start;
int i, parents = 0;
int64... | 0 | [] | libgit2 | 3316f666566f768eb8aa8de521a5262524dc3424 | 57,645,754,930,563,910,000,000,000,000,000,000,000 | 75 | commit_list: fix possible buffer overflow in `commit_quick_parse`
The function `commit_quick_parse` provides a way to quickly parse
parts of a commit without storing or verifying most of its
metadata. The first thing it does is calculating the number of
parents by skipping "parent " lines until it finds the first
non-... |
processCompressOptions(char* opt)
{
char* cp = NULL;
if (strneq(opt, "none",4))
{
defcompression = COMPRESSION_NONE;
}
else if (streq(opt, "packbits"))
{
defcompression = COMPRESSION_PACKBITS;
}
else if (strneq(opt, "jpeg", 4))
{
cp = strchr(opt, ':');
defcompression = COM... | 0 | [
"CWE-125"
] | libtiff | 21d39de1002a5e69caa0574b2cc05d795d6fbfad | 274,821,872,389,194,900,000,000,000,000,000,000,000 | 58 | * tools/tiffcrop.c: fix multiple uint32 overflows in
writeBufferToSeparateStrips(), writeBufferToContigTiles() and
writeBufferToSeparateTiles() that could cause heap buffer overflows.
Reported by Henri Salo from Nixu Corporation.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 |
static int tsrm_realpath_r(char *path, int start, int len, int *ll, time_t *t, int use_realpath, int is_dir, int *link_is_dir TSRMLS_DC) /* {{{ */
{
int i, j, save;
int directory = 0;
#ifdef TSRM_WIN32
WIN32_FIND_DATA data;
HANDLE hFind;
TSRM_ALLOCA_FLAG(use_heap_large)
#else
struct stat st;
#endif
realpath_cach... | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 75,268,225,442,074,140,000,000,000,000,000,000,000 | 397 | Fix for bug #72513 |
bool tcp_schedule_loss_probe(struct sock *sk, bool advancing_rto)
{
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
u32 timeout, rto_delta_us;
int early_retrans;
/* Don't do any loss probe on a Fast Open connection before 3WHS
* finishes.
*/
if (tp->fastopen_rsk)
return ... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 126,010,032,474,547,300,000,000,000,000,000,000,000 | 48 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
mrb_module_new(mrb_state *mrb)
{
struct RClass *m = (struct RClass*)mrb_obj_alloc(mrb, MRB_TT_MODULE, mrb->module_class);
boot_initmod(mrb, m);
return m;
} | 0 | [
"CWE-476",
"CWE-415"
] | mruby | faa4eaf6803bd11669bc324b4c34e7162286bfa3 | 289,027,221,186,660,900,000,000,000,000,000,000,000 | 6 | `mrb_class_real()` did not work for `BasicObject`; fix #4037 |
static int h264_slice_header_init(H264Context *h, int reinit)
{
int nb_slices = (HAVE_THREADS &&
h->avctx->active_thread_type & FF_THREAD_SLICE) ?
h->avctx->thread_count : 1;
int i, ret;
h->avctx->sample_aspect_ratio = h->sps.sar;
av_assert0(h->avctx->sample_asp... | 0 | [
"CWE-787"
] | FFmpeg | 1f097d168d9cad473dd44010a337c1413a9cd198 | 44,303,129,965,846,890,000,000,000,000,000,000,000 | 102 | h264: reset data partitioning at the beginning of each decode call
Prevents using GetBitContexts with data from previous calls.
Fixes access to freed memory.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
static inline __le32 *blkaddr_in_node(struct f2fs_node *node)
{
return RAW_IS_INODE(node) ? node->i.i_addr : node->dn.addr;
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 31,105,290,766,150,122,000,000,000,000,000,000,000 | 4 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
static int cxusb_mygica_d689_tuner_attach(struct dvb_usb_adapter *adap)
{
struct dvb_frontend *fe;
fe = dvb_attach(max2165_attach, adap->fe_adap[0].fe,
&adap->dev->i2c_adap, &mygica_d689_max2165_cfg);
return (fe == NULL) ? -EIO : 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3f190e3aec212fc8c61e202c51400afa7384d4bc | 108,741,504,180,897,810,000,000,000,000,000,000,000 | 7 | [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.
As dvb_usb_generic_rw handles a re... |
GPMF_ERR IsValidSize(GPMF_stream *ms, uint32_t size) // size is in longs not bytes.
{
if (ms)
{
uint32_t nestsize = (uint32_t)ms->nest_size[ms->nest_level];
if (nestsize == 0 && ms->nest_level == 0)
nestsize = ms->buffer_size_longs;
if (size + 2 <= nestsize) return GPMF_OK;
}
return GPMF_ERROR_BAD_STRUCTU... | 0 | [
"CWE-125",
"CWE-369",
"CWE-787"
] | gpmf-parser | 341f12cd5b97ab419e53853ca00176457c9f1681 | 128,264,589,518,939,280,000,000,000,000,000,000,000 | 12 | fixed many security issues with the too crude mp4 reader |
void WavOutFile::fillInHeader(uint sampleRate, uint bits, uint channels)
{
// fill in the 'riff' part..
// copy string 'RIFF' to riff_char
memcpy(&(header.riff.riff_char), riffStr, 4);
// package_len unknown so far
header.riff.package_len = 0;
// copy string 'WAVE' to wave
memcpy(&... | 0 | [
"CWE-415"
] | soundtouch | 7f594f8b7d10bbc16a4a31de8ec5a279af9c7378 | 212,118,946,606,960,130,000,000,000,000,000,000,000 | 37 | New take on CVE-2018-17097 i.e. avoiding writing beyond end of buffer in case of 24-bit samples |
grub_password_get (char buf[], unsigned buf_size)
{
unsigned cur_len = 0;
int key;
while (1)
{
key = grub_getkey ();
if (key == '\n' || key == '\r')
break;
if (key == '\e')
{
cur_len = 0;
break;
}
if (key == '\b')
{
if (cur_len)
cur_len--;
continue;
}
i... | 0 | [
"CWE-264"
] | grub | 451d80e52d851432e109771bb8febafca7a5f1f2 | 39,285,414,147,406,233,000,000,000,000,000,000,000 | 38 | Fix security issue when reading username and password
This patch fixes two integer underflows at:
* grub-core/lib/crypto.c
* grub-core/normal/auth.c
CVE-2015-8370
Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es>
Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es>
Also-By: Andrey Borzenkov <arvidjaar@... |
static void nhmldump_send_header(GF_NHMLDumpCtx *ctx)
{
GF_FilterPacket *dst_pck;
char nhml[1024];
u32 size;
u8 *output;
const GF_PropertyValue *p;
ctx->szRootName = "NHNTStream";
if (ctx->dims) {
ctx->szRootName = "DIMSStream";
}
if (!ctx->filep) {
sprintf(nhml, "<?xml version=\"1.0\" encoding=\"UTF-8\"... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 11,009,406,219,767,206,000,000,000,000,000,000,000 | 158 | fixed #2138 |
SAPI_API SAPI_POST_HANDLER_FUNC(php_std_post_handler)
{
char *var, *val, *e, *s, *p;
zval *array_ptr = (zval *) arg;
long count = 0;
if (SG(request_info).post_data == NULL) {
return;
}
s = SG(request_info).post_data;
e = s + SG(request_info).post_data_length;
while (s < e && (p = memchr(s, '&', (e - s)))) ... | 0 | [
"CWE-601"
] | php-src | 98b9dfaec95e6f910f125ed172cdbd25abd006ec | 175,299,195,647,745,830,000,000,000,000,000,000,000 | 40 | Fix for HTTP_PROXY issue.
The following changes are made:
- _SERVER/_ENV only has HTTP_PROXY if the local environment has it,
and only one from the environment.
- getenv('HTTP_PROXY') only returns one from the local environment
- getenv has optional second parameter, telling it to only consider
local environment |
static int ntop_set_host_quota(lua_State* vm) {
NetworkInterface *ntop_interface = getCurrentInterface(vm);
char *host_ip;
u_int16_t vlan_id = 0;
char buf[64];
Host *h;
u_int32_t quota;
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_T... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 300,922,607,092,297,730,000,000,000,000,000,000,000 | 26 | Security fix: prevents empty host from being used |
window_lost_pane(struct window *w, struct window_pane *wp)
{
log_debug("%s: @%u pane %%%u", __func__, w->id, wp->id);
if (wp == marked_pane.wp)
server_clear_marked();
if (wp == w->active) {
w->active = w->last;
w->last = NULL;
if (w->active == NULL) {
w->active = TAILQ_PREV(wp, window_panes, entry);
... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 207,466,354,774,551,930,000,000,000,000,000,000,000 | 22 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
key_ref_t key_create_or_update(key_ref_t keyring_ref,
const char *type,
const char *description,
const void *payload,
size_t plen,
key_perm_t perm,
unsigned long flags)
{
struct keyring_index_key index_key = {
.description = description,
};
struct key_pre... | 0 | [
"CWE-703"
] | linux | 38327424b40bcebe2de92d07312c89360ac9229a | 142,512,087,297,688,790,000,000,000,000,000,000,000 | 147 | KEYS: potential uninitialized variable
If __key_link_begin() failed then "edit" would be uninitialized. I've
added a check to fix that.
This allows a random user to crash the kernel, though it's quite
difficult to achieve. There are three ways it can be done as the user
would have to cause an error to occur in __ke... |
int caca_set_dither_gamma(caca_dither_t *d, float gamma)
{
/* FIXME: we don't need 4096 calls to gammapow(), we could just compute
* a few of them and do linear interpolation for the rest. This will
* probably speed up things a lot. */
int i;
if(gamma < 0.0)
{
d->invert = 1;
g... | 0 | [
"CWE-369"
] | libcaca | 84bd155087b93ab2d8d7cb5b1ac94ecd4cf4f93c | 97,188,925,450,235,070,000,000,000,000,000,000,000 | 25 | dither: fix integer overflows that were causing a division by zero.
Fixes: #36 (CVE-2018-20544) |
static ssize_t pipe_get_pages_alloc(struct iov_iter *i,
struct page ***pages, size_t maxsize,
size_t *start)
{
struct page **p;
size_t n;
int idx;
int npages;
if (!maxsize)
return 0;
if (!sanity(i))
return -EFAULT;
data_start(i, &idx, start);
/* some of this one + all after this one */
npages ... | 0 | [
"CWE-200"
] | linux | b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb | 88,942,753,041,538,980,000,000,000,000,000,000,000 | 33 | fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buffers. If that happened, none of them had been released,
leaving pipe full. Worse, it was trivial to trigger and we end up ... |
int BIO_vprintf(BIO *bio, const char *format, va_list args)
{
int ret;
size_t retlen;
char hugebuf[1024 * 2]; /* Was previously 10k, which is unreasonable
* in small-stack environments, like threads
* or DOS programs. */
char *hugebuf... | 1 | [
"CWE-119"
] | openssl | 578b956fe741bf8e84055547b1e83c28dd902c73 | 182,740,019,491,375,800,000,000,000,000,000,000,000 | 24 | Fix memory issues in BIO_*printf functions
The internal |fmtstr| function used in processing a "%s" format string
in the BIO_*printf functions could overflow while calculating the length
of a string and cause an OOB read when printing very long strings.
Additionally the internal |doapr_outch| function can attempt to ... |
readDeepTile(T& in,bool reduceMemory , bool reduceTime)
{
bool threw = false;
try
{
const Header& fileHeader = in.header();
Array2D<unsigned int> localSampleCount;
Box2i dataWindow = fileHeader.dataWindow();
int height = dataWindow.size().y+1;
int width = dataWindo... | 0 | [
"CWE-787"
] | openexr | ae6d203892cc9311917a7f4f05354ef792b3e58e | 169,622,550,022,677,800,000,000,000,000,000,000,000 | 182 | Handle xsampling and bad seekg() calls in exrcheck (#872)
* fix exrcheck xsampling!=1
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
* fix handling bad seekg() calls in exrcheck
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
* fix deeptile detection in multipart files
Signed-off-by: Peter Hillma... |
process_tgs_req(krb5_kdc_req *request, krb5_data *pkt,
const krb5_fulladdr *from, kdc_realm_t *kdc_active_realm,
krb5_data **response)
{
krb5_keyblock * subkey = 0;
krb5_keyblock *header_key = NULL;
krb5_keyblock *stkt_server_key = NULL;
krb5_keyblock *subject_key;
kr... | 0 | [
"CWE-476"
] | krb5 | d775c95af7606a51bf79547a94fa52ddd1cb7f49 | 176,418,281,580,040,200,000,000,000,000,000,000,000 | 711 | Fix KDC null deref on TGS inner body null server
After the KDC decodes a FAST inner body, it does not check for a null
server. Prior to commit 39548a5b17bbda9eeb63625a201cfd19b9de1c5b this
would typically result in an error from krb5_unparse_name(), but with
the addition of get_local_tgt() it results in a null derefe... |
HttpConnectionManagerImplTest::~HttpConnectionManagerImplTest() {
filter_callbacks_.connection_.dispatcher_.clearDeferredDeleteList();
} | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 139,543,113,898,553,650,000,000,000,000,000,000,000 | 3 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
act_get_notify(struct net *net, u32 portid, struct nlmsghdr *n,
struct list_head *actions, int event)
{
struct sk_buff *skb;
skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
if (!skb)
return -ENOBUFS;
if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, 0, event, 0, 0) <= 0) {
kfree_skb(skb);
return -EIN... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 143,921,071,934,991,440,000,000,000,000,000,000,000 | 15 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
str_enc_copy(VALUE str1, VALUE str2)
{
rb_enc_set_index(str1, ENCODING_GET(str2));
} | 0 | [
"CWE-119"
] | ruby | 1c2ef610358af33f9ded3086aa2d70aac03dcac5 | 298,677,506,776,313,330,000,000,000,000,000,000,000 | 4 | * string.c (rb_str_justify): CVE-2009-4124.
Fixes a bug reported by
Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London;
Patch by nobu.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void ReplaceIRINode(GF_Node *FromNode, GF_Node *old_node, GF_Node *newNode)
{
GF_ChildNodeItem *prev = NULL;
GF_ChildNodeItem *child = ((SVG_Element *)FromNode)->children;
while (child) {
if (child->node != old_node) {
prev = child;
child = child->next;
continue;
}
if (newNode) {
child->node... | 0 | [
"CWE-416"
] | gpac | 9723dd0955894f2cb7be13b94cf7a47f2754b893 | 35,184,170,730,561,834,000,000,000,000,000,000,000 | 20 | fixed #2109 |
RZ_API const char *rz_bin_dwarf_get_attr_form_name(ut64 form_code) {
if (form_code < DW_FORM_addr || form_code > DW_FORM_addrx4) {
return NULL;
}
return dwarf_attr_form_encodings[form_code];
} | 0 | [
"CWE-787"
] | rizin | aa6917772d2f32e5a7daab25a46c72df0b5ea406 | 29,943,458,030,931,860,000,000,000,000,000,000,000 | 6 | Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086) |
int X509_TRUST_get_trust(X509_TRUST *xp)
{
return xp->trust;
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 214,731,872,249,606,200,000,000,000,000,000,000,000 | 4 | Backport OCSP fixes. |
ImportEPUB::ImportEPUB(const QString &fullfilepath)
: Importer(fullfilepath),
m_ExtractedFolderPath(m_TempFolder.GetPath()),
m_HasSpineItems(false),
m_NCXNotInManifest(false),
m_NavResource(NULL)
{
} | 0 | [
"CWE-22"
] | Sigil | 04e2f280cc4a0766bedcc7b9eb56449ceecc2ad4 | 198,260,631,125,398,400,000,000,000,000,000,000,000 | 8 | further harden against malicious epubs and produce error message |
GF_Err ihdr_box_size(GF_Box *s)
{
s->size += 14;
return GF_OK; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 97,804,922,896,516,550,000,000,000,000,000,000,000 | 5 | fixed #1587 |
static void read_conf(void)
{
FILE *fp = fopen(FUSE_CONF, "r");
if (fp != NULL) {
int linenum = 1;
char line[256];
int isnewline = 1;
while (fgets(line, sizeof(line), fp) != NULL) {
if (isnewline) {
if (line[strlen(line)-1] == '\n') {
strip_line(line);
parse_line(line, linenum);
} else {
... | 0 | [
"CWE-269"
] | libfuse | 5018a0c016495155ee598b7e0167b43d5d902414 | 226,928,656,811,016,060,000,000,000,000,000,000,000 | 42 | fusermount: refuse unknown options
Blacklists are notoriously fragile; especially if the kernel wishes to add
some security-critical mount option at a later date, all existing systems
with older versions of fusermount installed will suddenly have a security
problem.
Additionally, if the kernel's option parsing became ... |
static MagickBooleanType GetICCProperty(const Image *image,const char *property,
ExceptionInfo *exception)
{
const StringInfo
*profile;
/*
Return ICC profile property.
*/
magick_unreferenced(property);
profile=GetImageProfile(image,"icc");
if (profile == (StringInfo *) NULL)
profile=GetImageP... | 0 | [
"CWE-703",
"CWE-704"
] | ImageMagick | eac8ce4d873f28bb6a46aa3a662fb196b49b95d0 | 253,289,100,324,109,970,000,000,000,000,000,000,000 | 93 | fix #5033: runtime error: load of misaligned address (#5034)
* fix Division by zero in XMenuWidget() of MagickCore/widget.c
* Fix memory leak in AnimateImageCommand() of MagickWand/animate.c and DisplayImageCommand() of MagickWand/display.c
* fix Division by zero in ReadEnhMetaFile() of coders/emf.c
* Resolve... |
Status HoistChainForConcat(const int prefix_length, const ChainLinkSet& tails,
NodeDef* concat_node) {
const string& concat_name = concat_node->name();
const int first_input = concat_node->op() == "Concat" ? 1 : 0;
for (const auto& link : tails) {
NodeDef* tail = CHECK_N... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 101,932,526,788,864,860,000,000,000,000,000,000,000 | 26 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
xfs_inew_wait(
struct xfs_inode *ip)
{
wait_queue_head_t *wq = bit_waitqueue(&ip->i_flags, __XFS_INEW_BIT);
DEFINE_WAIT_BIT(wait, &ip->i_flags, __XFS_INEW_BIT);
do {
prepare_to_wait(wq, &wait.wq_entry, TASK_UNINTERRUPTIBLE);
if (!xfs_iflags_test(ip, XFS_INEW))
break;
schedule();
} while (true);
finish_w... | 0 | [
"CWE-476"
] | linux | afca6c5b2595fc44383919fba740c194b0b76aff | 4,641,896,637,413,768,000,000,000,000,000,000,000 | 14 | xfs: validate cached inodes are free when allocated
A recent fuzzed filesystem image cached random dcache corruption
when the reproducer was run. This often showed up as panics in
lookup_slow() on a null inode->i_ops pointer when doing pathwalks.
BUG: unable to handle kernel NULL pointer dereference at 00000000000000... |
change_logfile(
const char * fname,
int leave_crumbs
)
{
FILE * new_file;
const char * log_fname;
char * abs_fname;
#if !defined(SYS_WINNT) && !defined(SYS_VXWORKS) && !defined(VMS)
char curdir[512];
size_t cd_octets;
size_t octets;
#endif /* POSIX */
REQUIRE(fname != NULL);
log_fname = fname;
/*
... | 0 | [
"CWE-835"
] | ntp | bb928ef08eec020ef6008f3a140702ccc0536b8e | 290,646,647,961,568,000,000,000,000,000,000,000,000 | 94 | [TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same |
isdn_command(isdn_ctrl *cmd)
{
if (cmd->driver == -1) {
printk(KERN_WARNING "isdn_command command(%x) driver -1\n", cmd->command);
return(1);
}
if (!dev->drv[cmd->driver]) {
printk(KERN_WARNING "isdn_command command(%x) dev->drv[%d] NULL\n",
cmd->command, cmd->driver);
return(1);
}
if (!dev->drv[cmd->dr... | 0 | [
"CWE-119"
] | linux-2.6 | eafe1aa37e6ec2d56f14732b5240c4dd09f0613a | 187,177,169,992,872,280,000,000,000,000,000,000,000 | 42 | I4L: fix isdn_ioctl memory overrun vulnerability
Fix possible memory overrun issue in the isdn ioctl code.
Found by ADLAB <adlab@venustech.com.cn>
Signed-off-by: Karsten Keil <kkeil@suse.de>
Cc: ADLAB <adlab@venustech.com.cn>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off... |
void audit_log_untrustedstring(struct audit_buffer *ab, const char *string)
{
audit_log_n_untrustedstring(ab, string, strlen(string));
} | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 14,403,374,445,295,535,000,000,000,000,000,000,000 | 4 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static int complete_mmio(struct kvm_vcpu *vcpu)
{
struct kvm_run *run = vcpu->run;
int r;
if (!(vcpu->arch.pio.count || vcpu->mmio_needed))
return 1;
if (vcpu->mmio_needed) {
vcpu->mmio_needed = 0;
if (!vcpu->mmio_is_write)
memcpy(vcpu->mmio_data + vcpu->mmio_index,
run->mmio.data, 8);
vcpu->... | 1 | [] | linux | f78146b0f9230765c6315b2e14f56112513389ad | 127,977,908,086,087,300,000,000,000,000,000,000,000 | 34 | KVM: Fix page-crossing MMIO
MMIO that are split across a page boundary are currently broken - the
code does not expect to be aborted by the exit to userspace for the
first MMIO fragment.
This patch fixes the problem by generalizing the current code for handling
16-byte MMIOs to handle a number of "fragments", and cha... |
check_entry_size_and_hooks(struct ip6t_entry *e,
struct xt_table_info *newinfo,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
unsigned int valid_hooks)
{
unsigned int h;
int err;
if ((unsigned long)e % __a... | 0 | [
"CWE-119"
] | nf-next | d7591f0c41ce3e67600a982bab6989ef0f07b3ce | 38,238,872,056,702,960,000,000,000,000,000,000,000 | 55 | netfilter: x_tables: introduce and use xt_copy_counters_from_user
The three variants use same copy&pasted code, condense this into a
helper and use that.
Make sure info.name is 0-terminated.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
static u32 gfs2_orlov_skip(const struct gfs2_inode *ip)
{
const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
u32 skip;
get_random_bytes(&skip, sizeof(skip));
return skip % sdp->sd_rgrps;
} | 0 | [
"CWE-416"
] | linux | 36e4ad0316c017d5b271378ed9a1c9a4b77fab5f | 214,393,759,804,699,930,000,000,000,000,000,000,000 | 8 | GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
Before this patch, function read_rindex_entry would set a rgrp
glock's gl_object pointer to itself before inserting the rgrp into
the rgrp rbtree. The problem is: if another process was also reading
the rgrp in, and had already inserted its newly create... |
static void aperture_state_report (gerbv_net_t *net,
gerbv_image_t *img, gerbv_project_t *prj)
{
gerbv_layertype_t layer_type = img->layertype;
gboolean show_length = FALSE;
gboolean aperture_is_valid = FALSE;
double x, y, len = 0;
if (net->aperture > 0)
aperture_is_valid = TRUE;
switch (net->aperture_stat... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 179,434,036,876,674,300,000,000,000,000,000,000,000 | 163 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
PosibErr<int> Config::commit(Entry * entry, Conv * conv)
{
PosibErr<const KeyInfo *> pe = keyinfo(entry->key);
{
if (pe.has_err()) goto error;
const KeyInfo * ki = pe;
entry->key = ki->name;
// FIXME: This is the correct thing to do but it causes problems
// ... | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 320,544,722,083,675,350,000,000,000,000,000,000,000 | 92 | Fix various bugs found by OSS-Fuze. |
bool ContentSettingsObserver::AllowRunningInsecureContent(
bool allowed_per_settings,
const blink::WebSecurityOrigin& origin,
const blink::WebURL& resource_url) {
// TODO(bridiver) is origin different than web frame top origin?
bool allow = allowed_per_settings;
GURL secondary_url(resource_url);
if ... | 0 | [
"CWE-20",
"CWE-200"
] | muon | c18663aa171c6cdf03da3e8c70df8663645b97c4 | 31,315,035,133,903,360,000,000,000,000,000,000,000 | 23 | Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer |
static int replace_user_tlv(struct snd_kcontrol *kctl, unsigned int __user *buf,
unsigned int size)
{
struct user_element *ue = kctl->private_data;
unsigned int *container;
unsigned int mask = 0;
int i;
int change;
if (size > 1024 * 128) /* sane value */
return -EINVAL;
// does the TLV size change cau... | 0 | [
"CWE-416",
"CWE-125"
] | linux | 6ab55ec0a938c7f943a4edba3d6514f775983887 | 263,624,360,457,890,950,000,000,000,000,000,000,000 | 50 | ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
Since the user can control the arguments provided to the kernel by the
ioctl() system call, an out-of-bounds bug occurs when the 'id->name'
provided by the user does not end with '\0'.
The following log can reveal it:
[ 10.002313] BUG: KASAN: stack-out-... |
static int snd_rawmidi_info_user(struct snd_rawmidi_substream *substream,
struct snd_rawmidi_info __user *_info)
{
struct snd_rawmidi_info info;
int err;
err = snd_rawmidi_info(substream, &info);
if (err < 0)
return err;
if (copy_to_user(_info, &info, sizeof(struct snd_rawmidi_info)))
return -EFAULT;
re... | 0 | [
"CWE-416"
] | linux | c1f6e3c818dd734c30f6a7eeebf232ba2cf3181d | 14,339,435,743,400,093,000,000,000,000,000,000,000 | 13 | ALSA: rawmidi: Fix racy buffer resize under concurrent accesses
The rawmidi core allows user to resize the runtime buffer via ioctl,
and this may lead to UAF when performed during concurrent reads or
writes: the read/write functions unlock the runtime lock temporarily
during copying form/to user-space, and that's the ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.