func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
GF_Err mdia_dump(GF_Box *a, FILE * trace)
{
GF_MediaBox *p = (GF_MediaBox *)a;
gf_isom_box_dump_start(a, "MediaBox", trace);
fprintf(trace, ">\n");
if (p->size)
gf_isom_box_dump_ex(p->mediaHeader, trace, GF_ISOM_BOX_TYPE_MDHD);
if (p->size)
gf_isom_box_dump_ex(p->handler, trace,GF_ISOM_BOX_TYPE_HDLR);
if (p->... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 320,212,033,827,552,340,000,000,000,000,000,000,000 | 14 | fixed 2 possible heap overflows (inc. #1088) |
static inline int path_has_perm(const struct cred *cred,
const struct path *path,
u32 av)
{
struct inode *inode = d_backing_inode(path->dentry);
struct common_audit_data ad;
ad.type = LSM_AUDIT_DATA_PATH;
ad.u.path = *path;
__inode_security_revalidate(inode, path->dentry, true);
return inode_has_perm(cre... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 178,767,309,527,326,380,000,000,000,000,000,000,000 | 12 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
struct razer_report razer_chroma_misc_get_dock_brightness(void)
{
return get_razer_report(0x07, 0x82, 0x01);
} | 0 | [
"CWE-787"
] | openrazer | 7e8a04feb378a679f1bcdcae079a5100cc45663b | 24,802,327,193,352,720,000,000,000,000,000,000,000 | 5 | Fix oob memcpy in matrix_custom_frame methods
Adjust row_length if it exeeds the arguments array |
u32 gf_media_nalu_next_start_code(const u8 *data, u32 data_len, u32 *sc_size)
{
u32 avail = data_len;
const u8 *cur = data;
while (cur) {
u32 v, bpos;
u8 *next_zero = memchr(cur, 0, avail);
if (!next_zero) return data_len;
v = 0xffffff00;
bpos = (u32)(next_zero - data) + 1;
while (1) {
u8 cval;
i... | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 273,810,313,226,462,840,000,000,000,000,000,000,000 | 38 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
void slave_stop_workers(Relay_log_info *rli, bool *mts_inited)
{
int i;
THD *thd= rli->info_thd;
if (!*mts_inited)
return;
else if (rli->slave_parallel_workers == 0)
goto end;
/*
In case of the "soft" graceful stop Coordinator
guaranteed Workers were assigned with full groups so waiting
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 28,058,119,909,008,560,000,000,000,000,000,000,000 | 147 | 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 __exit dm_flakey_exit(void)
{
dm_unregister_target(&flakey_target);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 69,262,258,544,799,070,000,000,000,000,000,000,000 | 4 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt,
xmlRelaxNGDefinePtr define)
{
int ret = 0, i, nbgroups;
int errNr = ctxt->errNr;
int oldflags;
xmlRelaxNGValidStatePtr oldstate;
xmlRelaxNGPartitionPtr partitions;
xmlRelaxNGInterleaveGroupPtr group = NULL;
... | 0 | [
"CWE-134"
] | libxml2 | 502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b | 71,061,124,799,050,200,000,000,000,000,000,000,000 | 284 | More format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
adds a new xmlEscapeFormatString() function to escape composed format
strings |
static void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
int nr_exclusive, int wake_flags, void *key)
{
wait_queue_t *curr, *next;
list_for_each_entry_safe(curr, next, &q->task_list, task_list) {
unsigned flags = curr->flags;
if (curr->func(curr, mode, wake_flags, key) &&
(flags & WQ_FLAG_EX... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 142,671,661,761,806,680,000,000,000,000,000,000,000 | 13 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
static int ext4_check_descriptors(struct super_block *sb)
{
struct ext4_sb_info *sbi = EXT4_SB(sb);
ext4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);
ext4_fsblk_t last_block;
ext4_fsblk_t block_bitmap;
ext4_fsblk_t inode_bitmap;
ext4_fsblk_t inode_table;
int flexbg_flag = 0;
ext4_group_t i;... | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 294,656,788,340,939,950,000,000,000,000,000,000,000 | 67 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
st_parsing_options() { reset(); } | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 338,333,938,413,275,760,000,000,000,000,000,000,000 | 1 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
char* imap_get_qualifier (char* buf)
{
char *s = buf;
/* skip tag */
s = imap_next_word (s);
/* skip OK/NO/BAD response */
s = imap_next_word (s);
return s;
} | 0 | [
"CWE-78"
] | mutt | 185152818541f5cdc059cbff3f3e8b654fc27c1d | 41,589,108,163,790,140,000,000,000,000,000,000,000 | 11 | Properly quote IMAP mailbox names when (un)subscribing.
When handling automatic subscription (via $imap_check_subscribed), or
manual subscribe/unsubscribe commands, mutt generating a "mailboxes"
command but failed to properly escape backquotes.
Thanks to Jeriko One for the detailed bug report and patch, which this
co... |
ZEND_API void zend_objects_proxy_free_storage(zend_proxy_object *object TSRMLS_DC)
{
zval_ptr_dtor(&object->object);
zval_ptr_dtor(&object->property);
efree(object);
} | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43 | 184,602,625,413,517,300,000,000,000,000,000,000,000 | 6 | Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction |
SPL_METHOD(SplFileInfo, getPath)
{
spl_filesystem_object *intern = (spl_filesystem_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
char *path;
int path_len;
if (zend_parse_parameters_none() == FAILURE) {
return;
}
path = spl_filesystem_object_get_path(intern, &path_len TSRMLS_CC);
RETURN_STRING... | 1 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 236,750,197,312,388,580,000,000,000,000,000,000,000 | 13 | Fix bug #72262 - do not overflow int |
void NumberFormatTest::TestGetAffixes() {
UErrorCode status = U_ZERO_ERROR;
DecimalFormatSymbols sym("en_US", status);
UnicodeString pattern("\\u00a4\\u00a4\\u00a4 0.00 %\\u00a4\\u00a4");
pattern = pattern.unescape();
DecimalFormat fmt(pattern, sym, status);
if (U_FAILURE(status)) {
data... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 252,221,163,197,881,800,000,000,000,000,000,000,000 | 57 | ICU-20246 Fixing another integer overflow in number parsing. |
bool FeatureEvaluator::setWindow(Point, int) { return true; } | 0 | [
"CWE-125"
] | opencv | 321c74ccd6077bdea1d47450ca4fe955cb5b6330 | 27,434,661,827,152,686,000,000,000,000,000,000,000 | 1 | objdetect: validate feature rectangle on reading |
virNodeDeviceCapStorageDefFormat(virBufferPtr buf,
const virNodeDevCapData *data)
{
virBufferEscapeString(buf, "<block>%s</block>\n",
data->storage.block);
if (data->storage.bus)
virBufferEscapeString(buf, "<bus>%s</bus>\n",
... | 0 | [
"CWE-119"
] | libvirt | 4c4d0e2da07b5a035b26a0ff13ec27070f7c7b1a | 66,122,717,959,044,010,000,000,000,000,000,000,000 | 57 | conf: Fix segfault when parsing mdev types
Commit f1b0890 introduced a potential crash due to incorrect operator
precedence when accessing an element from a pointer to an array.
Backtrace below:
#0 virNodeDeviceGetMdevTypesCaps (sysfspath=0x7fff801661e0 "/sys/devices/pci0000:00/0000:00:02.0", mdev_types=0x7fff801... |
DECLAREContigPutFunc(putRGBUAcontig8bittile)
{
int samplesperpixel = img->samplesperpixel;
(void) y;
fromskew *= samplesperpixel;
while (h-- > 0) {
uint32 r, g, b, a;
uint8* m;
for (x = w; x-- > 0;) {
a = pp[3];
m = img->UaToAa+(a<<8);
r = m[pp[0]];
g = m[pp[1]];
b = m[pp[2]];
*cp++ = PACK4(... | 0 | [
"CWE-119"
] | libtiff | 40a5955cbf0df62b1f9e9bd7d9657b0070725d19 | 207,047,663,857,173,400,000,000,000,000,000,000,000 | 21 | * libtiff/tif_next.c: add new tests to check that we don't read outside of
the compressed input stream buffer.
* libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height |
int bus_socket_exec(sd_bus *b) {
int s[2], r;
assert(b);
assert(b->input_fd < 0);
assert(b->output_fd < 0);
assert(b->exec_path);
assert(b->busexec_pid == 0);
r = socketpair(AF_UNIX, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0, s);
if (r < 0)
... | 0 | [
"CWE-787"
] | systemd | 6d586a13717ae057aa1b4127400c3de61cd5b9e7 | 280,485,711,368,529,000,000,000,000,000,000,000,000 | 43 | sd-bus: if we receive an invalid dbus message, ignore and proceeed
dbus-daemon might have a slightly different idea of what a valid msg is
than us (for example regarding valid msg and field sizes). Let's hence
try to proceed if we can and thus drop messages rather than fail the
connection if we fail to validate a mess... |
static const char *cmd_request_intercept_on_error(cmd_parms *cmd, void *_dcfg,
const char *p1)
{
directory_config *dcfg = (directory_config *)_dcfg;
if (dcfg == NULL) return NULL;
if (strcasecmp(p1, "on") == 0) dcfg->reqintercept_oe = 1;
else
if (strcasecm... | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 229,388,398,921,580,370,000,000,000,000,000,000,000 | 14 | Added SecXmlExternalEntity |
GF_Err saio_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_SampleAuxiliaryInfoOffsetBox *ptr = (GF_SampleAuxiliaryInfoOffsetBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->flags & 1) {
gf_bs_write_u32(bs, ptr->aux_info_type);
gf_bs_write_u32(bs, ptr... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 241,850,185,000,424,480,000,000,000,000,000,000,000 | 37 | fixed #1587 |
ews_client_authenticate (SoupSession *session,
SoupMessage *msg,
SoupAuth *auth,
gboolean retrying,
gpointer user_data)
{
AutodiscoverAuthData *data = user_data;
if (retrying)
return;
soup_auth_authenticate (... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 338,484,854,695,890,930,000,000,000,000,000,000,000 | 13 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
cockpit_web_response_complete (CockpitWebResponse *self)
{
GBytes *bytes;
g_return_if_fail (COCKPIT_IS_WEB_RESPONSE (self));
g_return_if_fail (self->complete == FALSE);
if (self->failed)
return;
/* Hold a reference until cockpit_web_response_done() */
g_object_ref (self);
self->complete = TRUE;
... | 0 | [
"CWE-1021"
] | cockpit | 8d9bc10d8128aae03dfde62fd00075fe492ead10 | 328,534,338,910,106,000,000,000,000,000,000,000,000 | 32 | common: Restrict frame embedding to same origin
Declare `X-Frame-Options: sameorigin` [1] so that cockpit frames can
only be embedded into pages coming from the same origin. This is similar
to setting CORP in commit 2b38b8de92f9a (which applies to `<script>`,
`<img>`, etc.).
The main use case for embedding is to run ... |
pdf_filter_i(fz_context *ctx, pdf_processor *proc, float flatness)
{
pdf_filter_processor *p = (pdf_filter_processor*)proc;
filter_flush(ctx, p, 0);
if (p->chain->op_i)
p->chain->op_i(ctx, p->chain, flatness);
} | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 298,232,139,985,123,300,000,000,000,000,000,000,000 | 7 | Bug 701292: Fix test for missing/empty string. |
vgr_process_args(
exarg_T *eap,
vgr_args_T *args)
{
char_u *p;
vim_memset(args, 0, sizeof(*args));
args->regmatch.regprog = NULL;
args->qf_title = vim_strsave(qf_cmdtitle(*eap->cmdlinep));
if (eap->addr_count > 0)
args->tomatch = eap->line2;
else
args->tomatch = MAXLNUM;
// Get the ... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 101,707,485,375,308,000,000,000,000,000,000,000,000 | 45 | 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. |
void io_end_buffering_in(BOOL free_buffers)
{
if (msgs2stderr == 1 && DEBUG_GTE(IO, 2)) {
rprintf(FINFO, "[%s] io_end_buffering_in(IOBUF_%s_BUFS)\n",
who_am_i(), free_buffers ? "FREE" : "KEEP");
}
if (free_buffers)
free_xbuf(&iobuf.in);
else
iobuf.in.pos = iobuf.in.len = 0;
iobuf.in_fd = -1;
} | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 144,064,019,558,288,840,000,000,000,000,000,000,000 | 14 | Some extra file-list safety checks. |
void test_nghttp2_submit_response_without_data(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
accumulator acc;
nghttp2_data_provider data_prd = {{-1}, NULL};
nghttp2_outbound_item *item;
my_user_data ud;
nghttp2_frame frame;
nghttp2_hd_inflater inflater;
nva_out out;
nghttp2_... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 145,621,831,149,398,820,000,000,000,000,000,000,000 | 48 | Add nghttp2_option_set_max_outbound_ack |
static inline void php_register_server_variables(TSRMLS_D)
{
zval *array_ptr = NULL;
ALLOC_ZVAL(array_ptr);
array_init(array_ptr);
INIT_PZVAL(array_ptr);
if (PG(http_globals)[TRACK_VARS_SERVER]) {
zval_ptr_dtor(&PG(http_globals)[TRACK_VARS_SERVER]);
}
PG(http_globals)[TRACK_VARS_SERVER] = array_ptr;
/* Serv... | 0 | [] | php-src | 8d1099ac0574f3a42036085641c2df03a1d5f731 | 336,799,649,480,047,070,000,000,000,000,000,000,000 | 39 | duplicate value's string for the SAPI filter
reported by sesser; tyrael, do you take care of the bug/NEWS? |
TEST(QueryProjectionTest, SortKeyMetaAndElemMatch) {
auto proj = createFindProjection(
"{}", "{a: 1, foo: {$meta: 'sortKey'}, _id: 0, b: {$elemMatch: {a: 1}}}");
ASSERT_TRUE(proj.metadataDeps()[DocumentMetadataFields::kSortKey]);
ASSERT_TRUE(proj.requiresDocument());
ASSERT_FALSE(proj.requiresM... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 25,492,119,431,357,823,000,000,000,000,000,000,000 | 10 | SERVER-53929 Add stricter parser checks around positional projection |
static int sst_append_auth_env(wsp::env& env, const char* sst_auth)
{
int const sst_auth_size= strlen(WSREP_SST_AUTH_ENV) + 1 /* = */
+ (sst_auth ? strlen(sst_auth) : 0) + 1 /* \0 */;
wsp::string sst_auth_str(sst_auth_size); // for automatic cleanup on return
if (!sst_auth_str()) return -ENOMEM;
int ret= ... | 0 | [
"CWE-77"
] | mysql-wsrep | 4ea4b0c6a318209ac09b15aaa906c7b4a13b988c | 323,030,377,199,788,030,000,000,000,000,000,000,000 | 20 | codership/mysql-wsrep-bugs#758 Donor uses invalid SST methods |
bgp_attr_munge_as4_attrs (struct peer *const peer,
struct attr *const attr,
struct aspath *as4_path, as_t as4_aggregator,
struct in_addr *as4_aggregator_addr)
{
int ignore_as4_path = 0;
struct aspath *newpath;
struct attr_extra *attre =... | 0 | [] | quagga | 8794e8d229dc9fe29ea31424883433d4880ef408 | 143,457,781,250,058,940,000,000,000,000,000,000,000 | 94 | bgpd: Fix regression in args consolidation, total should be inited from args
* bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args. |
EIGEN_STRONG_INLINE bool operator>(const QInt8 a, const QInt8 b) {
return a.value > b.value;
} | 0 | [
"CWE-908",
"CWE-787"
] | tensorflow | ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2 | 55,985,135,274,861,330,000,000,000,000,000,000,000 | 3 | Default initialize fixed point Eigen types.
In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN.
PiperOrigin-RevId: 344101137
Change-Id: I14555fd... |
struct btd_device *btd_adapter_get_device(struct btd_adapter *adapter,
const bdaddr_t *addr,
uint8_t addr_type)
{
struct btd_device *device;
if (!adapter)
return NULL;
device = btd_adapter_find_device(adapter, addr, addr_type);
if (device)
return device;
return adapter_create_device(adapter, addr,... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 165,446,534,518,023,290,000,000,000,000,000,000,000 | 15 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
static void FVMenuMakeFromFont(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
(void) MakeEncoding(fv->b.sf,fv->b.map);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 206,375,506,874,682,230,000,000,000,000,000,000,000 | 4 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
int net_read_exact(int s, void *arg, int len)
{
ssize_t rc;
int rlen = 0;
char *buf = (char*)arg;
while (rlen < len) {
rc = recv(s, buf, (len - rlen), 0);
if (rc < 1) {
if (rc == -1 && (errno == EAGAIN || errno == EINTR)) {
usleep(100);
continue;
}
return -1;
}
buf += rc;
rlen += rc;
... | 0 | [
"CWE-20",
"CWE-787"
] | aircrack-ng | 88702a3ce4c28a973bf69023cd0312f412f6193e | 281,916,880,069,985,670,000,000,000,000,000,000,000 | 23 | OSdep: Fixed segmentation fault that happens with a malicious server sending a negative length (Closes #16 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2419 28c6078b-6c39-48e3-add9-af49d547ecab |
int take_etc_passwd_lock(const char *root) {
struct flock flock = {
.l_type = F_WRLCK,
.l_whence = SEEK_SET,
.l_start = 0,
.l_len = 0,
};
const char *path;
int fd, r;
/* This is roughly the same as lckpwdf(), but ... | 0 | [
"CWE-269"
] | systemd | 156a5fd297b61bce31630d7a52c15614bf784843 | 13,710,664,413,943,600,000,000,000,000,000,000,000 | 39 | basic/user-util: always use base 10 for user/group numbers
We would parse numbers with base prefixes as user identifiers. For example,
"0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be
interpreted as UID==1000. This parsing was used also in cases where either a
user/group name or number may be spe... |
g_strcat(char* dest, const char* src)
{
if (dest == 0 || src == 0)
{
return dest;
}
return strcat(dest, src);
} | 0 | [] | xrdp | d8f9e8310dac362bb9578763d1024178f94f4ecc | 284,714,178,535,138,340,000,000,000,000,000,000,000 | 8 | move temp files from /tmp to /tmp/.xrdp |
void CLASS bad_pixels (const char *cfname)
{
FILE *fp=NULL;
#ifndef LIBRAW_LIBRARY_BUILD
char *fname, *cp, line[128];
int len, time, row, col, r, c, rad, tot, n, fixed=0;
#else
char *cp, line[128];
int time, row, col, r, c, rad, tot, n;
#ifdef DCRAW_VERBOSE
int fixed = 0;
#endif
#endif
if (!filters) retu... | 1 | [
"CWE-189"
] | LibRaw | 4606c28f494a750892c5c1ac7903e62dd1c6fdb5 | 218,042,886,280,705,530,000,000,000,000,000,000,000 | 59 | 0.16.1: fix for dcraw ljpeg_start() vulnerability |
virDomainOpenGraphics(virDomainPtr dom,
unsigned int idx,
int fd,
unsigned int flags)
{
struct stat sb;
VIR_DOMAIN_DEBUG(dom, "idx=%u, fd=%d, flags=%x",
idx, fd, flags);
virResetLastError();
virCheckDomainReturn(dom... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 170,963,690,388,676,870,000,000,000,000,000,000,000 | 50 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
static void save_cur(struct vc_data *vc)
{
memcpy(&vc->saved_state, &vc->state, sizeof(vc->state));
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 259,151,300,379,433,870,000,000,000,000,000,000,000 | 4 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
getWflagChars(int x)
{
int c = 0;
x -= 1;
while (x > 0) {
c += 1;
x /= 10;
}
return c;
} | 0 | [
"CWE-120",
"CWE-787"
] | tcpdump | 9ba91381954ad325ea4fd26b9c65a8bd9a2a85b6 | 49,112,391,188,271,550,000,000,000,000,000,000,000 | 12 | (for 4.9.3) CVE-2018-14879/fix -V to fail invalid input safely
get_next_file() did not check the return value of strlen() and
underflowed an array index if the line read by fgets() from the file
started with \0. This caused an out-of-bounds read and could cause a
write. Add the missing check.
This vulnerability was d... |
_PG_init(void)
{
/* Be sure we do initialization only once (should be redundant now) */
static bool inited = false;
if (inited)
return;
pg_bindtextdomain(TEXTDOMAIN);
DefineCustomEnumVariable("plpgsql.variable_conflict",
gettext_noop("Sets handling of conflicts between PL/pgSQL variable names and tabl... | 0 | [
"CWE-264"
] | postgres | 537cbd35c893e67a63c59bc636c3e888bd228bc7 | 205,756,459,037,078,040,000,000,000,000,000,000,000 | 38 | Prevent privilege escalation in explicit calls to PL validators.
The primary role of PL validators is to be called implicitly during
CREATE FUNCTION, but they are also normal functions that a user can call
explicitly. Add a permissions check to each validator to ensure that a
user cannot use explicit validator calls ... |
sizeof(max_align_t)
: sizeof(void *) + sizeof(size_t);
#define ADD_TO_POINTER(p, d) ((void *)((uintptr_t)(p) + (d)))
void *
ffi_closure_alloc (size_t size, void **code)
{
static size_t page_size;
size_t rounded_size;
void *codeseg, *dataseg;
int prot;
/* Expect that PAX mprotect is active and a sep... | 0 | [
"CWE-787"
] | libffi | 44a6c28545186d78642487927952844156fc7ab5 | 27,451,533,077,192,890,000,000,000,000,000,000,000 | 48 | aarch64: Flush code mapping in addition to data mapping (#471)
This needs a new function, ffi_data_to_code_pointer, to translate
from data pointers to code pointers.
Fixes issue #470. |
struct Email *imap_hcache_get(struct ImapMboxData *mdata, unsigned int uid)
{
if (!mdata->hcache)
return NULL;
char key[16];
sprintf(key, "/%u", uid);
struct HCacheEntry hce =
mutt_hcache_fetch(mdata->hcache, key, mutt_str_len(key), mdata->uidvalidity);
if (!hce.email && hce.uidvalidity)
{
m... | 0 | [
"CWE-125"
] | neomutt | fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc | 162,649,659,268,382,560,000,000,000,000,000,000,000 | 17 | Fix seqset iterator when it ends in a comma
If the seqset ended with a comma, the substr_end marker would be just
before the trailing nul. In the next call, the loop to skip the
marker would iterate right past the end of string too.
The fix is simple: place the substr_end marker and skip past it
immediately. |
MagickExport void XDelay(Display *display,const size_t milliseconds)
{
assert(display != (Display *) NULL);
(void) XFlush(display);
MagickDelay(milliseconds);
} | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 15,521,222,993,732,962,000,000,000,000,000,000,000 | 6 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
static inline void init_operand(operand *op)
{
memset(op, 0, sizeof *op);
op->basereg = -1;
op->indexreg = -1;
op->segment = NO_SEG;
op->wrt = NO_SEG;
} | 0 | [
"CWE-416"
] | nasm | 6ac6ac57e3d01ea8ed4ea47706eb724b59176461 | 40,900,256,360,407,354,000,000,000,000,000,000,000 | 9 | parser: when flattening an eop, must preserve any data buffer
An eop may have a data buffer associated with it as part of the same
memory allocation. Therefore, we need to move "subexpr" up instead of
merging it into "eop".
This *partially* resolves BR 3392707, but that test case still
triggers a violation when using... |
void git_treebuilder_filter(
git_treebuilder *bld,
git_treebuilder_filter_cb filter,
void *payload)
{
size_t i;
git_tree_entry *entry;
assert(bld && filter);
git_vector_foreach(&bld->entries, i, entry) {
if (!entry->removed && filter(entry, payload)) {
entry->removed = 1;
bld->entrycount--;
}
}
} | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 102,589,316,849,959,520,000,000,000,000,000,000,000 | 17 | tree: Check for `.git` with case insensitivy |
nautilus_link_local_set_text (const char *uri,
const char *text)
{
return nautilus_link_local_set_key (uri, "Name", text, TRUE);
} | 0 | [] | nautilus | 6d1d33567cea0590ed1ad00506718f6d591ba95f | 13,368,219,873,948,213,000,000,000,000,000,000,000 | 5 | Bug 573991 – Nautilus does not recognize some .desktop files as
2009-03-04 Alexander Larsson <alexl@redhat.com>
Bug 573991 – Nautilus does not recognize some .desktop files as launchers
* libnautilus-private/nautilus-link.c:
(nautilus_link_get_link_info_given_file_contents):
Don't try to sniff th... |
smb2_query_info_compound(const unsigned int xid, struct cifs_tcon *tcon,
const char *path, u32 desired_access,
u32 class, u32 type, u32 output_len,
struct kvec *rsp, int *buftype,
struct cifs_sb_info *cifs_sb)
{
struct cifs_ses *ses = tcon->ses;
struct TCP_Server_Info *server = cifs_pick_channel(ses);... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 102,242,931,304,710,070,000,000,000,000,000,000,000 | 124 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
_XimValueToAttribute(
XIMResourceList res,
XPointer buf,
int buf_size,
XPointer value,
int *len,
unsigned long mode,
XPointer param)
{
int ret_len;
switch (res->resource_size) {
case XimType_SeparatorOfNestedList:
case XimType_NEST:
*len = 0;
break;
ca... | 0 | [
"CWE-190"
] | libx11 | 1703b9f3435079d3c6021e1ee2ec34fd4978103d | 81,388,853,915,008,160,000,000,000,000,000,000,000 | 206 | Change the data_len parameter of _XimAttributeToValue() to CARD16
It's coming from a length in the protocol (unsigned) and passed
to functions that expect unsigned int parameters (_XCopyToArg()
and memcpy()).
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Todd Carson <toc@daybefore.net> |
static int run_cert(X509 *crt, const char *nameincert,
const struct set_name_fn *fn)
{
const char *const *pname = names;
int failed = 0;
for (; *pname != NULL; ++pname) {
int samename = strcasecmp(nameincert, *pname) == 0;
size_t namelen = strlen(*pname);
char *... | 0 | [
"CWE-476"
] | openssl | 97ab3c4b538840037812c8d9164d09a1f4bf11a1 | 170,164,793,546,620,720,000,000,000,000,000,000,000 | 60 | Add a test for GENERAL_NAME_cmp
Based on a boringssl test contributed by David Benjamin
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> |
utils_mac_valid (const struct ether_addr *addr)
{
guint8 invalid1[ETH_ALEN] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
guint8 invalid2[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
guint8 invalid3[ETH_ALEN] = {0x44, 0x44, 0x44, 0x44, 0x44, 0x44};
guint8 invalid4[ETH_ALEN] = {0x00, 0x30, 0xb4, 0x00, 0x00, 0x00}; /*... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 37,315,057,953,858,902,000,000,000,000,000,000,000 | 27 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
cmsBool AllocArray(cmsContext ContextID, _cmsDICarray* a, cmsUInt32Number Count, cmsUInt32Number Length)
{
// Empty values
memset(a, 0, sizeof(_cmsDICarray));
// On depending on record size, create column arrays
if (!AllocElem(ContextID, &a ->Name, Count)) goto Error;
if (!AllocElem(ContextID, &a -... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 231,788,705,324,358,730,000,000,000,000,000,000,000 | 22 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
noinline int btrfs_cow_block(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct extent_buffer *buf,
struct extent_buffer *parent, int parent_slot,
struct extent_buffer **cow_ret,
enum btrfs_lock_nesting nest)
{
struct btrfs_fs_info *fs_info = root->fs_info;
u64 search_start;
in... | 0 | [
"CWE-362"
] | linux | dbcc7d57bffc0c8cac9dac11bec548597d59a6a5 | 165,847,811,402,102,700,000,000,000,000,000,000,000 | 45 | 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 ]------------
... |
parseuid(const char *s, uid_t *uid)
{
struct passwd *pw;
#if !defined(__linux__) && !defined(__NetBSD__)
const char *errstr = NULL;
#else
int status;
#endif
if ((pw = getpwnam(s)) != NULL) {
*uid = pw->pw_uid;
return 0;
}
#if !defined(__linux__) && !defined(__NetBSD__)
*uid = strtonu... | 0 | [
"CWE-1187",
"CWE-908"
] | doas | 2f83222829448e5bc4c9391d607ec265a1e06531 | 84,018,891,933,572,220,000,000,000,000,000,000,000 | 24 | Added optimization to Makefile (can be set/overruled using OPT).
Added flag to display all warnings during compiling.
Added status checks when parsing user/group IDs for Linux.
Make sure Linux drops original user's groups when running as another user. |
void Item_in_subselect::fix_after_pullout(st_select_lex *new_parent,
Item **ref, bool merge)
{
left_expr->fix_after_pullout(new_parent, &left_expr, merge);
Item_subselect::fix_after_pullout(new_parent, ref, merge);
used_tables_cache |= left_expr->used_tables();
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 304,465,782,831,379,730,000,000,000,000,000,000,000 | 7 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
void security_fixup_ops(struct security_operations *ops)
{
set_to_cap_if_null(ops, ptrace_access_check);
set_to_cap_if_null(ops, ptrace_traceme);
set_to_cap_if_null(ops, capget);
set_to_cap_if_null(ops, capset);
set_to_cap_if_null(ops, acct);
set_to_cap_if_null(ops, capable);
set_to_cap_if_null(ops, quotactl);
... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 287,561,322,501,236,970,000,000,000,000,000,000,000 | 201 | 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... |
static Token *make_tok_qstr(Token *next, const char *str)
{
return make_tok_qstr_len(next, str, strlen(str));
} | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 229,243,379,305,273,670,000,000,000,000,000,000,000 | 4 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
void CLASS xtrans_interpolate (int passes)
{
int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol;
#ifdef LIBRAW_LIBRARY_BUILD
int cstat[4]={0,0,0,0};
#endif
int val, ndir, pass, hm[8], avg[4], color[3][8];
static const short orth[12] = { 1,0,0,1,-1,0,0,-1,1,0,0,1 },
patt[2][16] = { { 0,1,0,-1,2,0,-1,... | 0 | [
"CWE-369",
"CWE-704"
] | LibRaw | 9f26ce37f5be86ea11bfc6831366558650b1f6ff | 18,274,258,674,872,884,000,000,000,000,000,000,000 | 277 | SA81000: LibRaw 0.18.8 |
out_str_cf(char_u *s)
{
if (s != NULL && *s)
{
#ifdef HAVE_TGETENT
char_u *p;
#endif
#ifdef FEAT_GUI
// Don't use tputs() when GUI is used, ncurses crashes.
if (gui.in_use)
{
out_str_nf(s);
return;
}
#endif
if (out_pos > OUT_SIZE - MAX_ESC_SEQ_LEN)
out_flush();
#ifdef HAVE_TGETENT
for (p ... | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 121,797,742,299,468,590,000,000,000,000,000,000,000 | 63 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
static bool set_nr_if_polling(struct task_struct *p)
{
return false;
} | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 40,625,826,734,737,867,000,000,000,000,000,000,000 | 4 | 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... |
bool all_tests () {
mu_run_test (test_r_str_newf);
mu_run_test (test_r_str_replace_char_once);
mu_run_test (test_r_str_replace_char);
mu_run_test (test_r_str_replace);
mu_run_test (test_r_str_bits64);
mu_run_test (test_r_str_rwx);
mu_run_test (test_r_str_rwx_i);
mu_run_test (test_r_str_bool);
mu_run_test (test... | 1 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 174,902,837,039,694,500,000,000,000,000,000,000,000 | 31 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
ZEND_VM_COLD_CONST_HANDLER(94, ZEND_FETCH_OBJ_FUNC_ARG, CONST|TMP|VAR|UNUSED|THIS|CV, CONST|TMPVAR|CV, FETCH_REF|CACHE_SLOT)
{
#if !ZEND_VM_SPEC
USE_OPLINE
#endif
if (UNEXPECTED(ZEND_CALL_INFO(EX(call)) & ZEND_CALL_SEND_ARG_BY_REF)) {
/* Behave like FETCH_OBJ_W */
if ((OP1_TYPE & (IS_CONST|IS_TMP_VAR))) {
ZEN... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 318,505,253,916,687,700,000,000,000,000,000,000,000 | 16 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
uint32_t op_mask() override { return RGW_OP_TYPE_DELETE; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 12,644,966,628,519,866,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static void bb_info_print(RzCore *core, RzAnalysisFunction *fcn, RzAnalysisBlock *bb,
ut64 addr, RzOutputMode mode, PJ *pj, RzTable *t) {
RzDebugTracepoint *tp = NULL;
RzListIter *iter;
RzAnalysisBlock *bb2;
int outputs = (bb->jump != UT64_MAX) + (bb->fail != UT64_MAX);
int inputs = 0;
rz_list_foreach (fcn->bbs,... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 333,511,208,053,424,500,000,000,000,000,000,000,000 | 108 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static int parse_features(struct dm_arg_set *as, struct flakey_c *fc,
struct dm_target *ti)
{
int r;
unsigned argc;
const char *arg_name;
static struct dm_arg _args[] = {
{0, 6, "Invalid number of feature args"},
{1, UINT_MAX, "Invalid corrupt bio byte"},
{0, 255, "Invalid corrupt value to write into bi... | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 43,017,978,453,355,050,000,000,000,000,000,000,000 | 96 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
quote_meta(char_u *dest, char_u *src, int len)
{
unsigned m = (unsigned)len + 1; // one extra for the NUL
for ( ; --len >= 0; src++)
{
switch (*src)
{
case '.':
case '*':
case '[':
if (ctrl_x_mode_dictionary() || ctrl_x_mode_thesaurus())
break;
// FALLTHROUGH
case '~':
if... | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 158,825,963,684,409,100,000,000,000,000,000,000,000 | 52 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
VP8ComponentDecoder::VP8ComponentDecoder(bool do_threading)
: VP8ComponentEncoder(do_threading),
mux_reader_(Sirikata::JpegAllocator<uint8_t>(),
8,
0) {
virtual_thread_id_ = -1;
} | 0 | [
"CWE-1187"
] | lepton | 82167c144a322cc956da45407f6dce8d4303d346 | 1,480,514,763,039,664,400,000,000,000,000,000,000 | 7 | fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency |
static void spi_gpio_chipselect(struct spi_device *spi, int is_active)
{
struct spi_gpio *spi_gpio = spi_to_spi_gpio(spi);
/* set initial clock line level */
if (is_active)
gpiod_set_value_cansleep(spi_gpio->sck, spi->mode & SPI_CPOL);
/* Drive chip select line, if we have one */
if (spi_gpio->cs_gpios) {
st... | 0 | [
"CWE-400",
"CWE-401"
] | linux | d3b0ffa1d75d5305ebe34735598993afbb8a869d | 147,186,272,092,209,910,000,000,000,000,000,000,000 | 16 | spi: gpio: prevent memory leak in spi_gpio_probe
In spi_gpio_probe an SPI master is allocated via spi_alloc_master, but
this controller should be released if devm_add_action_or_reset fails,
otherwise memory leaks. In order to avoid leak spi_contriller_put must
be called in case of failure for devm_add_action_or_reset.... |
changeDependenciesOn(Oid refClassId, Oid oldRefObjectId,
Oid newRefObjectId)
{
long count = 0;
Relation depRel;
ScanKeyData key[2];
SysScanDesc scan;
HeapTuple tup;
ObjectAddress objAddr;
bool newIsPinned;
depRel = table_open(DependRelationId, RowExclusiveLock);
/*
* If oldRefObjectId is pinned, th... | 0 | [
"CWE-94"
] | postgres | 7e92f78abe80e4b30e648a40073abb59057e21f8 | 180,843,875,039,295,300,000,000,000,000,000,000,000 | 78 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
comics_check_decompress_command (gchar *mime_type,
ComicsDocument *comics_document,
GError **error)
{
gboolean success;
gchar *std_out, *std_err;
gint retval;
GError *err = NULL;
/* FIXME, use proper cbr/cbz mime types once they're
* included in shared-mime-info */
if (g_content_... | 0 | [] | evince | 717df38fd8509bf883b70d680c9b1b3cf36732ee | 85,470,319,324,996,330,000,000,000,000,000,000,000 | 124 | comics: Remove support for tar and tar-like commands
When handling tar files, or using a command with tar-compatible syntax,
to open comic-book archives, both the archive name (the name of the
comics file) and the filename (the name of a page within the archive)
are quoted to not be interpreted by the shell.
But the ... |
static bool ieee80211_parse_tx_radiotap(struct sk_buff *skb)
{
struct ieee80211_radiotap_iterator iterator;
struct ieee80211_radiotap_header *rthdr =
(struct ieee80211_radiotap_header *) skb->data;
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
int ret = ieee80211_radiotap_iterator_init(&iterator, rthdr,... | 0 | [
"CWE-362"
] | linux | 1d147bfa64293b2723c4fec50922168658e613ba | 123,603,523,079,193,870,000,000,000,000,000,000,000 | 82 | mac80211: fix AP powersave TX vs. wakeup race
There is a race between the TX path and the STA wakeup: while
a station is sleeping, mac80211 buffers frames until it wakes
up, then the frames are transmitted. However, the RX and TX
path are concurrent, so the packet indicating wakeup can be
processed while a packet is b... |
static int audit_match_perm(struct audit_context *ctx, int mask)
{
unsigned n;
if (unlikely(!ctx))
return 0;
n = ctx->major;
switch (audit_classify_syscall(ctx->arch, n)) {
case 0: /* native */
if ((mask & AUDIT_PERM_WRITE) &&
audit_match_class(AUDIT_CLASS_WRITE, n))
return 1;
if ((mask & AUDIT_PE... | 0 | [
"CWE-362"
] | linux | 43761473c254b45883a64441dd0bc85a42f3645c | 198,151,237,989,677,700,000,000,000,000,000,000,000 | 42 | 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... |
lasso_saml20_login_must_authenticate(LassoLogin *login)
{
LassoSamlp2AuthnRequest *request;
gboolean matched = TRUE;
GList *assertions = NULL;
LassoProfile *profile = &login->parent;
if (! LASSO_IS_SAMLP2_AUTHN_REQUEST(profile->request))
return FALSE;
request = LASSO_SAMLP2_AUTHN_REQUEST(profile->request);
i... | 0 | [
"CWE-347"
] | lasso | ea7e5efe9741e1b1787a58af16cb15b40c23be5a | 332,039,493,979,323,760,000,000,000,000,000,000,000 | 107 | Fix signature checking on unsigned response with multiple assertions
CVE-2021-28091 : when AuthnResponse messages are not signed (which is
permitted by the specifiation), all assertion's signatures should be
checked, but currently after the first signed assertion is checked all
following assertions are accepted withou... |
BigIntVal(int64_t val) : val(val) {} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 205,274,094,626,101,000,000,000,000,000,000,000,000 | 1 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name)
{
lt_dlhandle handle = 0;
assert (iface); /* iface is a required argument */
while ((handle = lt_dlhandle_iterate (iface, handle)))
{
lt_dlhandle cur = handle;
if (cur && cur->info.name && streq (cur->info.name, module_name))
... | 0 | [] | libtool | e91f7b960032074a55fc91273c1917e3082b5338 | 108,103,909,478,423,540,000,000,000,000,000,000,000 | 15 | Don't load module.la from current directory by default.
* libltdl/ltdl.c (try_dlopen): Do not attempt to load an
unqualified module.la file from the current directory (by
default) since doing so is insecure and is not compliant with
the documentation.
* tests/testsuite.at: Qualify access to module.la file in
current d... |
XML_SetProcessingInstructionHandler(XML_Parser parser,
XML_ProcessingInstructionHandler handler)
{
if (parser != NULL)
processingInstructionHandler = handler;
} | 0 | [
"CWE-611"
] | libexpat | c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f | 287,301,717,067,115,960,000,000,000,000,000,000,000 | 6 | xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) |
void abort_not_supported_test(const char *fmt, ...)
{
va_list args;
DBUG_ENTER("abort_not_supported_test");
/* Print include filestack */
fflush(stdout);
fprintf(stderr, "The test '%s' is not supported by this installation\n",
file_stack->file_name);
fprintf(stderr, "Detected in file %s at line %... | 0 | [] | server | 01b39b7b0730102b88d8ea43ec719a75e9316a1e | 321,249,893,698,075,660,000,000,000,000,000,000,000 | 29 | mysqltest: don't eat new lines in --exec
pass them through as is |
static ssize_t store_int_with_restart(struct device *s,
struct device_attribute *attr,
const char *buf, size_t size)
{
ssize_t ret = device_store_int(s, attr, buf, size);
mce_restart();
return ret;
} | 1 | [
"CWE-362"
] | linux | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf | 313,082,735,672,538,400,000,000,000,000,000,000,000 | 8 | x86/MCE: Serialize sysfs changes
The check_interval file in
/sys/devices/system/machinecheck/machinecheck<cpu number>
directory is a global timer value for MCE polling. If it is changed by one
CPU, mce_restart() broadcasts the event to other CPUs to delete and restart
the MCE polling timer and __mcheck_cpu_init_ti... |
static int ssh_bind_poll_callback(ssh_poll_handle sshpoll,
socket_t fd, int revents, void *user){
ssh_bind sshbind=(ssh_bind)user;
(void)sshpoll;
(void)fd;
if(revents & POLLIN){
/* new incoming connection */
if(ssh_callbacks_exists(sshbind->bind_callbacks,incoming_connection)){
sshbind->bind_... | 0 | [
"CWE-310"
] | libssh | e99246246b4061f7e71463f8806b9dcad65affa0 | 61,736,214,807,987,940,000,000,000,000,000,000,000 | 15 | security: fix for vulnerability CVE-2014-0017
When accepting a new connection, a forking server based on libssh forks
and the child process handles the request. The RAND_bytes() function of
openssl doesn't reset its state after the fork, but simply adds the
current process id (getpid) to the PRNG state, which is not g... |
void precompute_partition_info_sums_(
const FLAC__int32 residual[],
FLAC__uint64 abs_residual_partition_sums[],
unsigned residual_samples,
unsigned predictor_order,
unsigned min_partition_order,
unsigned max_partition_order,
unsigned bps
)
{
const unsigned default_partition_samples = (residual_samples + predict... | 0 | [] | flac | c06a44969c1145242a22f75fc8fb2e8b54c55303 | 76,116,697,253,905,390,000,000,000,000,000,000,000 | 60 | flac : Fix for https://sourceforge.net/p/flac/bugs/425/
* flac/encode.c : Validate num_tracks field of cuesheet.
* libFLAC/stream_encoder.c : Add check for a NULL pointer.
* flac/encode.c : Improve bounds checking.
Closes: https://sourceforge.net/p/flac/bugs/425/ |
void Http2Stream::GetID(const FunctionCallbackInfo<Value>& args) {
Http2Stream* stream;
ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder());
args.GetReturnValue().Set(stream->id());
} | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 144,482,598,977,659,680,000,000,000,000,000,000,000 | 5 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
static inline int unix_writable(struct sock *sk)
{
return (atomic_read(&sk->sk_wmem_alloc) << 2) <= sk->sk_sndbuf;
} | 0 | [] | linux-2.6 | 6209344f5a3795d34b7f2c0061f49802283b6bdd | 68,172,198,931,340,770,000,000,000,000,000,000,000 | 4 | net: unix: fix inflight counting bug in garbage collector
Previously I assumed that the receive queues of candidates don't
change during the GC. This is only half true, nothing can be received
from the queues (see comment in unix_gc()), but buffers could be added
through the other half of the socket pair, which may s... |
AstBase(const char *a_path, size_t a_line, size_t a_column,
const char *a_name,
const std::vector<std::shared_ptr<AstBase>> &a_nodes,
size_t a_position = 0, size_t a_length = 0, size_t a_choice_count = 0,
size_t a_choice = 0)
: path(a_path ? a_path : ""), line(a_line), co... | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 230,201,558,522,737,580,000,000,000,000,000,000,000 | 11 | Fix #122 |
static void collect_signal(int sig, struct sigpending *list, siginfo_t *info)
{
struct sigqueue *q, *first = NULL;
/*
* Collect the siginfo appropriate to this signal. Check if
* there is another siginfo for the same signal.
*/
list_for_each_entry(q, &list->list, list) {
if (q->info.si_signo == sig) {
if... | 0 | [
"CWE-399"
] | linux | b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f | 276,039,828,020,276,200,000,000,000,000,000,000,000 | 36 | kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
This fixes a kernel memory contents leak via the tkill and tgkill syscalls
for compat processes.
This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field
when handling signals delivered from tkill.
The place of the infoleak:
int ... |
mono_image_build_metadata (MonoReflectionModuleBuilder *moduleb)
{
MonoDynamicTable *table;
MonoDynamicImage *assembly;
MonoReflectionAssemblyBuilder *assemblyb;
MonoDomain *domain;
MonoPtrArray types;
guint32 *values;
int i, j;
assemblyb = moduleb->assemblyb;
assembly = moduleb->dynamic_image;
domain = mono... | 0 | [
"CWE-20"
] | mono | 65292a69c837b8a5f7a392d34db63de592153358 | 301,062,259,868,307,200,000,000,000,000,000,000,000 | 141 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
nfnl_cthelper_fill_info(struct sk_buff *skb, u32 portid, u32 seq, u32 type,
int event, struct nf_conntrack_helper *helper)
{
struct nlmsghdr *nlh;
struct nfgenmsg *nfmsg;
unsigned int flags = portid ? NLM_F_MULTI : 0;
int status;
event = nfnl_msg_type(NFNL_SUBSYS_CTHELPER, event);
nlh = nlmsg_put(skb, portid,... | 0 | [
"CWE-862"
] | linux | 4b380c42f7d00a395feede754f0bc2292eebe6e5 | 299,165,387,731,391,000,000,000,000,000,000,000,000 | 49 | netfilter: nfnetlink_cthelper: Add missing permission checks
The capability check in nfnetlink_rcv() verifies that the caller
has CAP_NET_ADMIN in the namespace that "owns" the netlink socket.
However, nfnl_cthelper_list is shared by all net namespaces on the
system. An unprivileged user can create user and net names... |
add_data(
XOM om)
{
XOMGenericPart *gen = XOM_GENERIC(om);
OMData new;
int num;
if ((num = gen->data_num))
new = Xrealloc(gen->data, (num + 1) * sizeof(OMDataRec));
else
new = Xmalloc(sizeof(OMDataRec));
if (new == NULL)
return NULL;
gen->data_num = num + 1;
... | 0 | [
"CWE-190"
] | libx11 | acdaaadcb3d85c61fd43669fc5dddf0f8c3f911d | 104,913,765,811,645,040,000,000,000,000,000,000,000 | 23 | Fix an integer overflow in init_om()
CVE-2020-14363
This can lead to a double free later, as reported by Jayden Rivers.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
static NodeInfo *GetNodeInfo(CubeInfo *cube_info,const size_t id,
const size_t level,NodeInfo *parent)
{
NodeInfo
*node_info;
if (cube_info->free_nodes == 0)
{
Nodes
*nodes;
/*
Allocate a new queue of nodes.
*/
nodes=(Nodes *) AcquireMagickMemory(sizeof(*nodes));
... | 0 | [
"CWE-125"
] | ImageMagick | 5294966898532a6bd54699fbf04edf18902513ac | 220,876,205,749,341,840,000,000,000,000,000,000,000 | 35 | https://github.com/ImageMagick/ImageMagick/issues/1156 |
default_opaque_literal_attr(tvbuff_t *tvb, guint32 offset,
const char *token _U_, guint8 codepage _U_, guint32 *length)
{
guint32 data_len = tvb_get_guintvar(tvb, offset, length);
char *str = wmem_strdup_printf(wmem_packet_scope(), "(%d bytes of opaque data)", data_len);
*length += data_len;
return str;
} | 0 | [
"CWE-399",
"CWE-119",
"CWE-787"
] | wireshark | b8e0d416898bb975a02c1b55883342edc5b4c9c0 | 183,659,685,934,343,500,000,000,000,000,000,000,000 | 8 | WBXML: add a basic sanity check for offset overflow
This is a naive approach allowing to detact that something went wrong,
without the need to replace all proto_tree_add_text() calls as what was
done in master-2.0 branch.
Bug: 12408
Change-Id: Ia14905005e17ae322c2fc639ad5e491fa08b0108
Reviewed-on: https://code.wiresh... |
void ciEnv::register_method(ciMethod* target,
int entry_bci,
CodeOffsets* offsets,
int orig_pc_offset,
CodeBuffer* code_buffer,
int frame_words,
OopMapS... | 0 | [] | jdk17u | 8be0fc09f0ba2dd1dbfd6627456fa929d5574b04 | 275,588,784,530,206,000,000,000,000,000,000,000,000 | 171 | 8281859: Improve class compilation
Reviewed-by: mbaesken
Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f |
static void b43_do_interrupt_thread(struct b43_wldev *dev)
{
u32 reason;
u32 dma_reason[ARRAY_SIZE(dev->dma_reason)];
u32 merged_dma_reason = 0;
int i;
if (unlikely(b43_status(dev) != B43_STAT_STARTED))
return;
reason = dev->irq_reason;
for (i = 0; i < ARRAY_SIZE(dma_reason); i++) {
dma_reason[i] = dev->dm... | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 10,475,479,781,527,225,000,000,000,000,000,000,000 | 94 | b43: stop format string leaking into error msgs
The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with... |
static void ccc_cb_free(void *data)
{
struct ccc_cb_data *ccc_cb = data;
if (ccc_cb->destroy)
ccc_cb->destroy(ccc_cb->user_data);
free(ccc_cb);
} | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 196,599,247,088,350,100,000,000,000,000,000,000,000 | 9 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
ensure_credentials_sync (GoaProvider *provider,
GoaObject *object,
gint *out_expires_in,
GCancellable *cancellable,
GError **error)
{
GVariant *credentials;
GoaAcco... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 258,556,410,351,092,300,000,000,000,000,000,000,000 | 98 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) {
int status;
CallInfo *ci;
if (level < 0) return 0; /* invalid (negative) level */
lua_lock(L);
for (ci = L->ci; level > 0 && ci != &L->base_ci; ci = ci->previous)
level--;
if (level == 0 && ci != &L->base_ci) { /* level found? */
... | 0 | [
"CWE-703"
] | lua | a2195644d89812e5b157ce7bac35543e06db05e3 | 203,687,291,911,845,900,000,000,000,000,000,000,000 | 15 | Fixed bug: invalid 'oldpc' when returning to a function
The field 'L->oldpc' is not always updated when control returns to a
function; an invalid value can seg. fault when computing 'changedline'.
(One example is an error in a finalizer; control can return to
'luaV_execute' without executing 'luaD_poscall'.) Instead o... |
static XHCITransfer *xhci_ep_alloc_xfer(XHCIEPContext *epctx,
uint32_t length)
{
uint32_t limit = epctx->nr_pstreams + 16;
XHCITransfer *xfer;
if (epctx->xfer_count >= limit) {
return NULL;
}
xfer = g_new0(XHCITransfer, 1);
xfer->epctx = epctx;
... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 76,111,399,860,195,430,000,000,000,000,000,000,000 | 21 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
same_headers(header_line *one, header_line *two)
{
for (;; one = one->next, two = two->next)
{
if (one == two) return TRUE; /* Includes the case where both NULL */
if (!one || !two) return FALSE;
if (Ustrcmp(one->text, two->text) != 0) return FALSE;
}
} | 0 | [
"CWE-78"
] | exim | d740d2111f189760593a303124ff6b9b1f83453d | 205,168,077,381,637,330,000,000,000,000,000,000,000 | 9 | Fix CVE-2019-10149 |
NUM_cache_remove(NUMCacheEntry *ent)
{
#ifdef DEBUG_TO_FROM_CHAR
elog(DEBUG_elog_output, "REMOVING ENTRY (%s)", ent->str);
#endif
ent->str[0] = '\0';
ent->age = 0;
} | 0 | [
"CWE-120"
] | postgres | 0150ab567bcf5e5913e2b62a1678f84cc272441f | 229,670,280,933,214,940,000,000,000,000,000,000,000 | 8 | to_char(): prevent accesses beyond the allocated buffer
Previously very long field masks for floats could access memory
beyond the existing buffer allocated to hold the result.
Reported by Andres Freund and Peter Geoghegan. Backpatch to all
supported versions.
Security: CVE-2015-0241 |
static pyc_object *get_binary_complex_object(RBuffer *buffer) {
pyc_object *ret = NULL;
bool error = false;
double a, b;
//a + bj
a = get_float64 (buffer, &error);
b = get_float64 (buffer, &error);
if (error) {
return NULL;
}
ret = R_NEW0 (pyc_object);
if (!ret) {
return NULL;
}
ret->type = TYPE_BINARY... | 0 | [
"CWE-415"
] | radare2 | 049de62730f4954ef9a642f2eeebbca30a8eccdc | 225,079,532,426,691,100,000,000,000,000,000,000,000 | 23 | Fix #18679 - UAF when parsing corrupted pyc files ##bin |
static GF_Node *lsr_read_foreignObject(GF_LASeRCodec *lsr)
{
u32 flag;
GF_Node *elt = gf_node_new(lsr->sg, TAG_SVG_foreignObject);
lsr_read_id(lsr, elt);
lsr_read_rare_full(lsr, elt);
lsr_read_fill(lsr, elt);
lsr_read_stroke(lsr, elt);
lsr_read_eRR(lsr, elt);
lsr_read_coordinate_ptr(lsr, elt, TAG_SVG_ATT_height... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 281,561,419,894,961,670,000,000,000,000,000,000,000 | 27 | fixed #2213 |
UINT cliprdr_read_format_list(wStream* s, CLIPRDR_FORMAT_LIST* formatList, BOOL useLongFormatNames)
{
UINT32 index;
size_t position;
BOOL asciiNames;
int formatNameLength;
char* szFormatName;
WCHAR* wszFormatName;
UINT32 dataLen = formatList->dataLen;
CLIPRDR_FORMAT* formats = NULL;
UINT error = CHANNEL_RC_OK;... | 1 | [
"CWE-125"
] | FreeRDP | b73143cf7ee5fe4cdabcbf56908aa15d8a883821 | 291,591,512,452,233,200,000,000,000,000,000,000,000 | 174 | Fixed oob read in cliprdr_read_format_list |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.