func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void RunJob() override {
CZNC::Get().SetConfigState(CZNC::ECONFIG_NEED_WRITE);
CZNC::Get().DisableConfigTimer();
} | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 28,449,271,963,441,715,000,000,000,000,000,000,000 | 5 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
void bn_sqr_comba8(BN_ULONG *r, const BN_ULONG *a)
{
BN_ULONG t1,t2;
BN_ULONG c1,c2,c3;
c1=0;
c2=0;
c3=0;
sqr_add_c(a,0,c1,c2,c3);
r[0]=c1;
c1=0;
sqr_add_c2(a,1,0,c2,c3,c1);
r[1]=c2;
c2=0;
sqr_add_c(a,1,c3,c1,c2);
sqr_add_c2(a,2,0,c3,c1,c2);
r[2]=c3;
c3=0;
sqr_add_c2(a,3,0,c1,c2,c3);
sqr_add_c2(a,2,1... | 1 | [
"CWE-310"
] | openssl | a7a44ba55cb4f884c6bc9ceac90072dea38e66d0 | 220,277,934,796,661,460,000,000,000,000,000,000,000 | 75 | Fix for CVE-2014-3570 (with minor bn_asm.c revamp).
Reviewed-by: Emilia Kasper <emilia@openssl.org> |
static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
{
int idx, ok;
X509_REVOKED rtmp;
STACK_OF(X509_EXTENSION) *exts;
X509_EXTENSION *ext;
/* Look for serial number of certificate in CRL */
rtmp.serialNumber = X509_get_serialNumber(x);
/*
* Sort revoked into serial number o... | 0 | [
"CWE-119"
] | openssl | fa57f74a3941db6b2efb2f43c6add914ec83db20 | 142,031,913,200,440,910,000,000,000,000,000,000,000 | 53 | Fix length checks in X509_cmp_time to avoid out-of-bounds reads.
Also tighten X509_cmp_time to reject more than three fractional
seconds in the time; and to reject trailing garbage after the offset.
CVE-2015-1789
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
static int write_boot_mem(struct edgeport_serial *serial,
int start_address, int length, __u8 *buffer)
{
int status = 0;
int i;
u8 *temp;
/* Must do a read before write */
if (!serial->TiReadI2C) {
temp = kmalloc(1, GFP_KERNEL);
if (!temp)
return -ENOMEM;
status = read_boot_mem(serial, 0, 1, temp);
... | 0 | [
"CWE-191"
] | linux | 654b404f2a222f918af9b0cd18ad469d0c941a8e | 149,560,450,068,640,260,000,000,000,000,000,000,000 | 32 | USB: serial: io_ti: fix information leak in completion handler
Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that can be triggered by a malicious device.
This avoids leaking 128 kB of memory content from after the URB transfer
buffer to user space.
Fixes: 8c209e6782ca ("USB... |
static STACK_OF(X509) * php_array_to_X509_sk(zval ** zcerts TSRMLS_DC) /* {{{ */
{
HashPosition hpos;
zval ** zcertval;
STACK_OF(X509) * sk = NULL;
X509 * cert;
long certresource;
sk = sk_X509_new_null();
/* get certs */
if (Z_TYPE_PP(zcerts) == IS_ARRAY) {
zend_hash_internal_pointer_reset_ex(HASH_OF(... | 0 | [
"CWE-200"
] | php-src | 270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e | 38,912,330,931,790,705,000,000,000,000,000,000,000 | 52 | Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only |
should_filter_name_owner_changed (FlatpakProxyClient *client, Buffer *buffer)
{
GDBusMessage *message = g_dbus_message_new_from_blob (buffer->data, buffer->size, 0, NULL);
GVariant *body, *arg0, *arg1, *arg2;
const gchar *name, *old, *new;
gboolean filter = TRUE;
if (message == NULL ||
(body = g_dbus_m... | 0 | [
"CWE-284",
"CWE-436"
] | flatpak | 52346bf187b5a7f1c0fe9075b328b7ad6abe78f6 | 207,274,088,002,965,400,000,000,000,000,000,000,000 | 40 | Fix vulnerability in dbus proxy
During the authentication all client data is directly forwarded
to the dbus daemon as is, until we detect the BEGIN command after
which we start filtering the binary dbus protocol.
Unfortunately the detection of the BEGIN command in the proxy
did not exactly match the detection in the ... |
LPTSTR nla_make_spn(const char* ServiceClass, const char* hostname)
{
DWORD status = ERROR_INTERNAL_ERROR;
DWORD SpnLength;
LPTSTR hostnameX = NULL;
LPTSTR ServiceClassX = NULL;
LPTSTR ServicePrincipalName = NULL;
#ifdef UNICODE
ConvertToUnicode(CP_UTF8, 0, hostname, -1, &hostnameX, 0);
ConvertToUnicode(CP_UTF8,... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 339,022,425,135,934,930,000,000,000,000,000,000,000 | 51 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
SV* dbd_db_quote(SV *dbh, SV *str, SV *type)
{
dTHX;
SV *result;
if (SvGMAGICAL(str))
mg_get(str);
if (!SvOK(str))
result= newSVpvn("NULL", 4);
else
{
char *ptr, *sptr;
STRLEN len;
D_imp_dbh(dbh);
if (type && SvMAGICAL(type))
mg_get(type);
if (type && SvOK(type))
... | 0 | [
"CWE-125"
] | DBD-mysql | 793b72b1a0baa5070adacaac0e12fd995a6fbabe | 185,491,920,459,768,200,000,000,000,000,000,000,000 | 54 | Added Pali's fix for CVE-2016-1249 |
static ssize_t oom_adj_write(struct file *file, const char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task;
char buffer[PROC_NUMBUF];
int oom_adj;
unsigned long flags;
int err;
memset(buffer, 0, sizeof(buffer));
if (count > sizeof(buffer) - 1)
count = sizeof(buffer) - 1;
if (copy_... | 0 | [
"CWE-362"
] | linux | 8148a73c9901a8794a50f950083c00ccf97d43b3 | 190,567,867,133,056,640,000,000,000,000,000,000,000 | 76 | proc: prevent accessing /proc/<PID>/environ until it's ready
If /proc/<PID>/environ gets read before the envp[] array is fully set up
in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
read more bytes than are actually written, as env_start will already be
set but env_end will still be zero, makin... |
long keyctl_revoke_key(key_serial_t id)
{
key_ref_t key_ref;
long ret;
key_ref = lookup_user_key(id, 0, KEY_WRITE);
if (IS_ERR(key_ref)) {
ret = PTR_ERR(key_ref);
if (ret != -EACCES)
goto error;
key_ref = lookup_user_key(id, 0, KEY_SETATTR);
if (IS_ERR(key_ref)) {
ret = PTR_ERR(key_ref);
goto erro... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 293,751,527,662,550,600,000,000,000,000,000,000,000 | 25 | 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... |
int __init create_extent_cache(void)
{
extent_tree_slab = f2fs_kmem_cache_create("f2fs_extent_tree",
sizeof(struct extent_tree));
if (!extent_tree_slab)
return -ENOMEM;
extent_node_slab = f2fs_kmem_cache_create("f2fs_extent_node",
sizeof(struct extent_node));
if (!extent_node_slab) {
kmem_cache_destroy(ex... | 0 | [
"CWE-119",
"CWE-787"
] | linux | dad48e73127ba10279ea33e6dbc8d3905c4d31c0 | 192,362,665,846,072,500,000,000,000,000,000,000,000 | 14 | f2fs: fix a bug caused by NULL extent tree
Thread A: Thread B:
-f2fs_remount
-sbi->mount_opt.opt = 0;
<--- -f2fs_iget
-do_read_inode
-f2fs_init_extent_tree
-F2FS_I(inode)->extent_tree is NULL
-default_options && parse_options
-remount return
... |
HIDDEN void *zlib_init() { return NULL; } | 0 | [] | cyrus-imapd | 602f12ed2af0a49ac4a58affbfea57d0fc23dea5 | 66,305,492,738,008,820,000,000,000,000,000,000,000 | 1 | httpd.c: only allow reuse of auth creds on a persistent connection against a backend server in a Murder |
checkMultiply64(uint64 first, uint64 second, T2P* t2p)
{
uint64 bytes = first * second;
if (second && bytes / second != first) {
TIFFError(TIFF2PDF_MODULE, "Integer overflow");
t2p->t2p_error = T2P_ERR_ERROR;
bytes = 0;
}
return bytes;
} | 0 | [
"CWE-787"
] | libtiff | 7be2e452ddcf6d7abca88f41d3761e6edab72b22 | 138,527,136,406,216,300,000,000,000,000,000,000,000 | 12 | tiff2pdf.c: properly calculate datasize when saving to JPEG YCbCr
fixes #220 |
binlog_cache_mngr(my_off_t param_max_binlog_stmt_cache_size,
my_off_t param_max_binlog_cache_size,
ulong *param_ptr_binlog_stmt_cache_use,
ulong *param_ptr_binlog_stmt_cache_disk_use,
ulong *param_ptr_binlog_cache_use,
... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 165,343,536,078,812,930,000,000,000,000,000,000,000 | 14 | 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... |
//! Access to a pixel value at a specified offset, using Neumann boundary conditions \const.
const T& at(const int offset) const {
if (is_empty())
throw CImgInstanceException(_cimg_instance
"at(): Empty instance.",
cimg_instan... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 225,511,535,774,217,470,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
SelectionDone(Widget w GCC_UNUSED,
Atom *selection GCC_UNUSED,
Atom *target GCC_UNUSED)
{
/* empty proc so Intrinsics know we want to keep storage */
TRACE(("SelectionDone\n"));
} | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 319,500,902,306,614,500,000,000,000,000,000,000,000 | 7 | snapshot of project "xterm", label xterm-365d |
static void vrend_renderer_use_threaded_sync(void)
{
struct virgl_gl_ctx_param ctx_params;
if (getenv("VIRGL_DISABLE_MT"))
return;
ctx_params.shared = true;
ctx_params.major_ver = vrend_state.gl_major_ver;
ctx_params.minor_ver = vrend_state.gl_minor_ver;
vrend_state.stop_sync_thread = false;
... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 114,524,972,853,429,300,000,000,000,000,000,000,000 | 38 | vrend: check transfer bounds for negative values too and report error
Closes #138
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com> |
static long region_add(struct resv_map *resv, long f, long t,
long in_regions_needed, struct hstate *h,
struct hugetlb_cgroup *h_cg)
{
long add = 0, actual_regions_needed = 0;
spin_lock(&resv->lock);
retry:
/* Count how many regions are actually needed to execute this add. */
add_reservation_in_... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 199,776,575,189,404,900,000,000,000,000,000,000,000 | 46 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
static void
MYSQLND_METHOD(mysqlnd_protocol, init_greet_packet)(struct st_mysqlnd_packet_greet *packet)
{
DBG_ENTER("mysqlnd_protocol::init_greet_packet");
memset(packet, 0, sizeof(*packet));
packet->header.m = &packet_methods[PROT_GREET_PACKET];
DBG_VOID_RETURN; | 0 | [
"CWE-120"
] | php-src | 58006537fc5f133ae8549efe5118cde418b3ace9 | 337,923,086,885,410,950,000,000,000,000,000,000,000 | 7 | Fix bug #81719: mysqlnd/pdo password buffer overflow |
ex_delfunction(exarg_T *eap)
{
ufunc_T *fp = NULL;
char_u *p;
char_u *name;
funcdict_T fudi;
int is_global = FALSE;
p = eap->arg;
name = trans_function_name(&p, &is_global, eap->skip, 0, &fudi,
NULL, NULL);
vim_free(fudi.fd_newkey);
if (name == NULL)
{
if (fudi.fd_d... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 276,104,934,137,448,070,000,000,000,000,000,000,000 | 83 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
static void persistent_usage(struct dm_exception_store *store,
sector_t *total_sectors,
sector_t *sectors_allocated,
sector_t *metadata_sectors)
{
struct pstore *ps = get_info(store);
*sectors_allocated = ps->next_free * store->chunk_size;
*total_sectors = get_dev_size(dm_snap_cow(store->sna... | 0 | [
"CWE-200",
"CWE-264"
] | linux | e9c6a182649f4259db704ae15a91ac820e63b0ca | 309,336,205,643,659,150,000,000,000,000,000,000,000 | 18 | dm snapshot: fix data corruption
This patch fixes a particular type of data corruption that has been
encountered when loading a snapshot's metadata from disk.
When we allocate a new chunk in persistent_prepare, we increment
ps->next_free and we make sure that it doesn't point to a metadata area
by further incrementin... |
Item_func_nullif::native_op(THD *thd, Native *to)
{
DBUG_ASSERT(fixed == 1);
if (!compare())
return (null_value= true);
return val_native_with_conversion_from_item(thd, args[2], to, type_handler());
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 36,439,518,851,134,140,000,000,000,000,000,000,000 | 7 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static ssize_t recovery_start_show(struct md_rdev *rdev, char *page)
{
unsigned long long recovery_start = rdev->recovery_offset;
if (test_bit(In_sync, &rdev->flags) ||
recovery_start == MaxSector)
return sprintf(page, "none\n");
return sprintf(page, "%llu\n", recovery_start);
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 77,604,576,857,979,640,000,000,000,000,000,000,000 | 10 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
query_info_parse(struct query_info* m, sldns_buffer* query)
{
uint8_t* q = sldns_buffer_begin(query);
/* minimum size: header + \0 + qtype + qclass */
if(sldns_buffer_limit(query) < LDNS_HEADER_SIZE + 5)
return 0;
if((LDNS_OPCODE_WIRE(q) != LDNS_PACKET_QUERY && LDNS_OPCODE_WIRE(q) !=
LDNS_PACKET_NOTIFY) || LDNS... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 59,528,990,130,607,970,000,000,000,000,000,000,000 | 21 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
static uint8_t gic_get_running_priority(GICState *s, int cpu, MemTxAttrs attrs)
{
if ((s->revision != REV_11MPCORE) && (s->running_priority[cpu] > 0xff)) {
/* Idle priority */
return 0xff;
}
if (gic_cpu_ns_access(s, cpu, attrs)) {
if (s->running_priority[cpu] & 0x80) {
/... | 0 | [
"CWE-787"
] | qemu | edfe2eb4360cde4ed5d95bda7777edcb3510f76a | 117,605,972,294,590,590,000,000,000,000,000,000,000 | 21 | hw/intc/arm_gic: Fix interrupt ID in GICD_SGIR register
Per the ARM Generic Interrupt Controller Architecture specification
(document "ARM IHI 0048B.b (ID072613)"), the SGIINTID field is 4 bit,
not 10:
- 4.3 Distributor register descriptions
- 4.3.15 Software Generated Interrupt Register, GICD_SG
- Table 4-2... |
repodata_merge_attrs(Repodata *data, Id dest, Id src)
{
Id *keyp;
if (dest == src || !data->attrs || !(keyp = data->attrs[src - data->start]))
return;
for (; *keyp; keyp += 2)
repodata_insert_keyid(data, dest, keyp[0], keyp[1], 0);
} | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 198,751,449,329,493,640,000,000,000,000,000,000,000 | 8 | repodata_schema2id: fix heap-buffer-overflow in memcmp
When the length of last schema in data->schemadata is
less than length of input schema, we got a read overflow
in asan test.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
get_constraint_index(Oid constraintId)
{
Oid indexId = InvalidOid;
Relation depRel;
ScanKeyData key[3];
SysScanDesc scan;
HeapTuple tup;
/* Search the dependency table for the dependent index */
depRel = heap_open(DependRelationId, AccessShareLock);
ScanKeyInit(&key[0],
Anum_pg_depend_refclassid,
BT... | 0 | [
"CWE-94"
] | postgres | f52d2fbd8c62f667191b61228acf9d8aa53607b9 | 266,149,704,063,179,600,000,000,000,000,000,000,000 | 59 | 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... |
static long btrfs_ioctl_quota_ctl(struct file *file, void __user *arg)
{
struct inode *inode = file_inode(file);
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
struct btrfs_ioctl_quota_ctl_args *sa;
int ret;
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
ret = mnt_want_write_file(file);
if (ret)
retur... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 116,965,532,252,673,360,000,000,000,000,000,000,000 | 40 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
conntrack_destroy(struct conntrack *ct)
{
struct conn *conn;
latch_set(&ct->clean_thread_exit);
pthread_join(ct->clean_thread, NULL);
latch_destroy(&ct->clean_thread_exit);
ovs_mutex_lock(&ct->ct_lock);
CMAP_FOR_EACH (conn, cm_node, &ct->conns) {
conn_clean_one(ct, conn);
}
cmap... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 186,314,240,967,098,650,000,000,000,000,000,000,000 | 41 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
gdImagePtr gdImageCreateFromWBMPCtx (gdIOCtx * infile)
{
/* FILE *wbmp_file; */
Wbmp *wbmp;
gdImagePtr im = NULL;
int black, white;
int col, row, pos;
if (readwbmp (&gd_getin, infile, &wbmp)) {
return NULL;
}
if (!(im = gdImageCreate (wbmp->width, wbmp->height))) {
freewbmp (wbmp);
return NULL;
}
/* ... | 0 | [
"CWE-415"
] | php-src | 089f7c0bc28d399b0420aa6ef058e4c1c120b2ae | 61,899,861,970,377,260,000,000,000,000,000,000,000 | 38 | Sync with upstream
Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
the binding doesn't use the `gdImage*Ptr()` functions at all, we're
porting the fix to stay in sync here. |
int RGWGetObj_ObjStore_S3::get_decrypt_filter(std::unique_ptr<RGWGetObj_Filter> *filter, RGWGetObj_Filter* cb, bufferlist* manifest_bl)
{
if (skip_decrypt) { // bypass decryption for multisite sync requests
return 0;
}
int res = 0;
std::unique_ptr<BlockCrypt> block_crypt;
res = rgw_s3_prepare_decrypt(s, ... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 267,929,365,973,564,760,000,000,000,000,000,000,000 | 22 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
void BM_EndOfStream(void *co)
{
((GF_BifsDecoder *) co)->LastError = GF_NON_COMPLIANT_BITSTREAM;
} | 0 | [
"CWE-416"
] | gpac | c535bad50d5812d27ee5b22b54371bddec411514 | 114,477,591,451,463,360,000,000,000,000,000,000,000 | 4 | fixed #2194 |
static Point_3 convert(Point_3 p){return p;} | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 229,075,255,892,204,730,000,000,000,000,000,000,000 | 1 | Fix Nef_3 |
static int server_sockets(int port, enum network_transport transport,
FILE *portnumber_file) {
if (settings.inter == NULL) {
return server_socket(settings.inter, port, transport, portnumber_file);
} else {
// tokenize them and bind to each one of them..
char *b;... | 0 | [
"CWE-189"
] | memcached | 6695ccbc525c36d693aaa3e8337b36aa0c784424 | 53,072,677,431,247,190,000,000,000,000,000,000,000 | 36 | Fix segfault on specially crafted packet. |
static int parse_unattach_list (BUFFER *buf, BUFFER *s, LIST **ldata, BUFFER *err)
{
ATTACH_MATCH *a;
LIST *lp, *lastp, *newlp;
char *tmp;
int major;
char *minor;
do
{
mutt_extract_token (buf, s, 0);
if (!ascii_strcasecmp(buf->data, "any"))
tmp = safe_strdup("*/.*");
else if (!ascii_st... | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 158,803,106,959,009,860,000,000,000,000,000,000,000 | 69 | use a 64-bit random value in temporary filenames.
closes #3158 |
static int ntop_get_interface_stats(lua_State* vm) {
NetworkInterfaceView *ntop_interface = getCurrentInterface(vm);
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_interface) ntop_interface->lua(vm);
return(CONST_LUA_OK);
} | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 161,162,806,888,580,430,000,000,000,000,000,000,000 | 8 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
e_util_generate_uid (void)
{
static volatile gint counter = 0;
gchar *uid;
GChecksum *checksum;
checksum = g_checksum_new (G_CHECKSUM_SHA1);
#define add_i64(_x) G_STMT_START { \
gint64 i64 = (_x); \
g_checksum_update (checksum, (const guchar *) &i64, sizeof (gint64)); \
} G_STMT_END
#define add_str(_x, _d... | 0 | [
"CWE-295"
] | evolution-data-server | 6672b8236139bd6ef41ecb915f4c72e2a052dba5 | 72,652,597,732,109,290,000,000,000,000,000,000,000 | 40 | Let child source with 'none' authentication method use collection source authentication
That might be the same as having set NULL authentication method.
Related to https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
int ssh_scp_init(ssh_scp scp)
{
int rc;
char execbuffer[1024] = {0};
if (scp == NULL) {
return SSH_ERROR;
}
if (scp->state != SSH_SCP_NEW) {
ssh_set_error(scp->session, SSH_FATAL,
"ssh_scp_init called under invalid state");
return SSH_ERROR;
}
... | 1 | [] | libssh | b0edec4e8d01ad73b0d26ad4070d7e1a1e86dfc8 | 26,168,110,938,517,700,000,000,000,000,000,000,000 | 63 | CVE-2019-14889: scp: Quote location to be used on shell
Single quote file paths to be used on commands to be executed on remote
shell.
Fixes T181
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 3830c7ae6eec751b7618d3fc159cb... |
pdf_filter_ri(fz_context *ctx, pdf_processor *proc, const char *intent)
{
pdf_filter_processor *p = (pdf_filter_processor*)proc;
filter_flush(ctx, p, 0);
if (p->chain->op_ri)
p->chain->op_ri(ctx, p->chain, intent);
} | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 217,610,427,825,598,970,000,000,000,000,000,000,000 | 7 | Bug 701292: Fix test for missing/empty string. |
static int atusb_get_and_show_build(struct atusb *atusb)
{
struct usb_device *usb_dev = atusb->usb_dev;
char build[ATUSB_BUILD_SIZE + 1];
int ret;
ret = atusb_control_msg(atusb, usb_rcvctrlpipe(usb_dev, 0),
ATUSB_BUILD, ATUSB_REQ_FROM_DEV, 0, 0,
build, ATUSB_BUILD_SIZE, 1000);
if (ret >= 0) {
build[ret]... | 1 | [
"CWE-399",
"CWE-119"
] | linux | 05a974efa4bdf6e2a150e3f27dc6fcf0a9ad5655 | 1,455,961,580,225,259,500,000,000,000,000,000,000 | 16 | ieee802154: atusb: do not use the stack for buffers to make them DMA able
From 4.9 we should really avoid using the stack here as this will not be DMA
able on various platforms. This changes the buffers already being present in
time of 4.9 being released. This should go into stable as well.
Reported-by: Dan Carpenter... |
static int rm_read_header_old(AVFormatContext *s)
{
RMDemuxContext *rm = s->priv_data;
AVStream *st;
rm->old_format = 1;
st = avformat_new_stream(s, NULL);
if (!st)
return -1;
st->priv_data = ff_rm_alloc_rmstream();
if (!st->priv_data)
return AVERROR(ENOMEM);
return rm_r... | 0 | [
"CWE-399",
"CWE-834"
] | FFmpeg | 124eb202e70678539544f6268efc98131f19fa49 | 112,223,117,968,167,470,000,000,000,000,000,000,000 | 14 | avformat/rmdec: Fix DoS due to lack of eof check
Fixes: loop.ivr
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
MagickExport MagickBooleanType FunctionImage(Image *image,
const MagickFunction function,const size_t number_parameters,
const double *parameters,ExceptionInfo *exception)
{
#define FunctionImageTag "Function/Image "
CacheView
*image_view;
MagickBooleanType
status;
MagickOffsetType
progress;
... | 0 | [] | ImageMagick | 4717744e4bb27de8ea978e51c6d5bcddf62ffe49 | 103,971,462,366,237,400,000,000,000,000,000,000,000 | 91 | https://github.com/ImageMagick/ImageMagick/issues/3332 |
static void zr364xx_fillbuff(struct zr364xx_camera *cam,
struct zr364xx_buffer *buf,
int jpgsize)
{
int pos = 0;
const char *tmpbuf;
char *vbuf = videobuf_to_vmalloc(&buf->vb);
unsigned long last_frame;
if (!vbuf)
return;
last_frame = cam->last_frame;
if (last_frame != -1) {
tmpbuf = (const... | 0 | [
"CWE-476"
] | linux | 5d2e73a5f80a5b5aff3caf1ec6d39b5b3f54b26e | 152,197,585,033,476,240,000,000,000,000,000,000,000 | 35 | media: usb:zr364xx:Fix KASAN:null-ptr-deref Read in zr364xx_vidioc_querycap
SyzKaller hit the null pointer deref while reading from uninitialized
udev->product in zr364xx_vidioc_querycap().
==================================================================
BUG: KASAN: null-ptr-deref in read_word_at_a_time+0xe/0x20
in... |
tiffsep_prn_open(gx_device * pdev)
{
gx_device_printer *ppdev = (gx_device_printer *)pdev;
tiffsep_device *pdev_sep = (tiffsep_device *) pdev;
int code, k;
bool force_pdf, force_ps;
cmm_dev_profile_t *profile_struct;
gsicc_rendering_param_t rendering_params;
/* Use our own warning and error... | 0 | [
"CWE-476"
] | ghostpdl | aadb53eb834b3def3ef68d78865ff87a68901804 | 157,992,967,140,486,640,000,000,000,000,000,000,000 | 144 | Tiffsep and Tiffsep1 - abort on multi-page input wtithout %d OutputFile
Bug #701821 "Segmentation fault at tiff//libtiff/tif_dirinfo.c:513 in TIFFFindField"
The tiffsep and tiffsep1 only set 'code' to an error when an attempt is
made to write a second output file without using %d in the OutputFile
specification.
Thi... |
file_referer(const char *referer) /* I - Referer URL */
{
if (referer)
strlcpy(referer_url, referer, sizeof(referer_url));
else
referer_url[0] = '\0';
} | 0 | [
"CWE-476",
"CWE-415",
"CWE-787"
] | htmldoc | 369b2ea1fd0d0537ba707f20a2f047b6afd2fbdc | 118,414,649,471,721,340,000,000,000,000,000,000,000 | 7 | Fix JPEG error handling (Issue #415) |
static bool clone3_args_valid(const struct kernel_clone_args *kargs)
{
/*
* All lower bits of the flag word are taken.
* Verify that no other unknown flags are passed along.
*/
if (kargs->flags & ~CLONE_LEGACY_FLAGS)
return false;
/*
* - make the CLONE_DETACHED bit reuseable for clone3
* - make the CSIG... | 0 | [
"CWE-416"
] | linux | 16d51a590a8ce3befb1308e0e7ab77f3b661af33 | 97,266,086,644,179,220,000,000,000,000,000,000,000 | 22 | sched/fair: Don't free p->numa_faults with concurrent readers
When going through execve(), zero out the NUMA fault statistics instead of
freeing them.
During execve, the task is reachable through procfs and the scheduler. A
concurrent /proc/*/sched reader can read data from a freed ->numa_faults
allocation (confirmed... |
bool client_proto(SBuf *sbuf, SBufEvent evtype, struct MBuf *data)
{
bool res = false;
PgSocket *client = container_of(sbuf, PgSocket, sbuf);
PktHdr pkt;
Assert(!is_server_socket(client));
Assert(client->sbuf.sock);
Assert(client->state != CL_FREE);
/* may happen if close failed */
if (client->state == CL_JU... | 0 | [
"CWE-476"
] | pgbouncer | edab5be6665b9e8de66c25ba527509b229468573 | 306,628,767,823,662,120,000,000,000,000,000,000,000 | 65 | Check if auth_user is set.
Fixes a crash if password packet appears before startup packet (#42). |
void WebContents::ContentsZoomChange(bool zoom_in) {
Emit("zoom-changed", zoom_in ? "in" : "out");
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 296,480,295,466,432,630,000,000,000,000,000,000,000 | 3 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
Item_ref(Name_resolution_context *context_arg,
const char *db_arg, const char *table_name_arg,
const char *field_name_arg)
:Item_ident(context_arg, db_arg, table_name_arg, field_name_arg),
result_field(0), ref(0) {} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 250,855,376,484,602,240,000,000,000,000,000,000,000 | 5 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
int inplace_cb_reply_cache_call(struct module_env* env,
struct query_info* qinfo, struct module_qstate* qstate,
struct reply_info* rep, int rcode, struct edns_data* edns,
struct comm_reply* repinfo, struct regional* region)
{
return inplace_cb_reply_call_generic(
env->inplace_cb_lists[inplace_cb_reply_cache], inp... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 157,551,278,562,682,630,000,000,000,000,000,000,000 | 9 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
bool create_table_precheck(THD *thd, TABLE_LIST *tables,
TABLE_LIST *create_table)
{
LEX *lex= thd->lex;
SELECT_LEX *select_lex= &lex->select_lex;
ulong want_priv;
bool error= TRUE; // Error message is given
DBUG_ENTER("create_table_precheck");
/*
... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 2,811,045,328,264,997,000,000,000,000,000,000,000 | 95 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
unpeer_name_resolved(
int rescode,
int gai_errno,
void * context,
const char * name,
const char * service,
const struct addrinfo * hints,
const struct addrinfo * res
)
{
sockaddr_u peeraddr;
struct peer * peer;
u_short af;
const char * fam_spec;
(void)context;
(void)hints;
DPRINTF(1, ("unpeer_n... | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 277,323,660,290,056,760,000,000,000,000,000,000,000 | 47 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
String Config::get_default(const KeyInfo * ki) const
{
bool in_replace = false;
String final_str;
String replace;
const char * i = ki->def;
if (*i == '!') { // special cases
++i;
if (strcmp(i, "lang") == 0) {
const Entry * entry;
if (entry = lookup("ac... | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 205,776,285,470,684,500,000,000,000,000,000,000,000 | 93 | Fix various bugs found by OSS-Fuze. |
create_int_node(
int val
)
{
int_node *i_n;
i_n = emalloc_zero(sizeof(*i_n));
i_n->i = val;
return i_n;
} | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 287,924,653,347,739,430,000,000,000,000,000,000,000 | 11 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
static ssize_t attr_store_format(struct device *cd,
struct device_attribute *attr, const char *buf, size_t len)
{
struct v4l2_loopback_device *dev = v4l2loopback_cd2dev(cd);
int fps_num = 0, fps_den = 1;
/* only fps changing is supported */
if (sscanf(buf, "@%d/%d", &fps_num, &fps_den) > 0) {
struct v4l2_fract... | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 273,506,890,313,791,130,000,000,000,000,000,000,000 | 19 | add explicit format specifier to printf() invocations
CWE-134 |
ui::ImageModel WebContents::GetDevToolsWindowIcon() {
return owner_window() ? owner_window()->GetWindowAppIcon() : ui::ImageModel{};
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 207,569,676,872,188,650,000,000,000,000,000,000,000 | 3 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
static void php_sqlite_fetch_column(struct php_sqlite_result *res, zval *which, zend_bool decode_binary, zval *return_value TSRMLS_DC)
{
int j;
const char **rowdata, **colnames;
/* check range of the row */
if (res->curr_row >= res->nrows) {
/* no more */
RETURN_FALSE;
}
colnames = (const char**)res->col_nam... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 46,110,229,866,450,910,000,000,000,000,000,000,000 | 52 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static void return_unused_surplus_pages(struct hstate *h,
unsigned long unused_resv_pages)
{
unsigned long nr_pages;
struct page *page;
LIST_HEAD(page_list);
lockdep_assert_held(&hugetlb_lock);
/* Uncommit the reservation */
h->resv_huge_pages -= unused_resv_pages;
/* Cannot return gigantic pages currentl... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 314,757,232,704,476,300,000,000,000,000,000,000,000 | 42 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
unsigned int ibytestream::read(unsigned char*output, unsigned int size) {
dev_assert(size);
if (size == 1) {
return read_byte(output) ? 1 : 0;
}
int retval = IOUtil::ReadFull(parent, output, size);
bytes_read += retval;
static_assert(sizeof(last_read) == 2, "Last read must hold full jpeg... | 0 | [
"CWE-1187"
] | lepton | 82167c144a322cc956da45407f6dce8d4303d346 | 176,148,988,813,988,170,000,000,000,000,000,000,000 | 16 | fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency |
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-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 185,721,985,645,114,330,000,000,000,000,000,000,000 | 59 | cumulated data checks patch |
is_valid_filename (GFile *file, GFile *destination)
{
g_autoptr (GFile) parent = NULL;
g_autoptr (GFileInfo) info = NULL;
if (g_file_equal (file, destination))
return TRUE;
if (!g_file_has_prefix (file, destination))
return FALSE;
/* Resolve symbolic link ancestors to confirm file is actually insid... | 0 | [
"CWE-22"
] | gnome-autoar | adb067e645732fdbe7103516e506d09eb6a54429 | 11,568,210,111,218,085,000,000,000,000,000,000,000 | 38 | AutoarExtractor: Do not extract files outside the destination dir
Currently, a malicious archive can cause that the files are extracted
outside of the destination dir. This can happen if the archive contains
a file whose parent is a symbolic link, which points outside of the
destination dir. This is potentially a secu... |
string_format_size(int size, uschar *buffer)
{
if (size == 0) Ustrcpy(CS buffer, " ");
else if (size < 1024) sprintf(CS buffer, "%5d", size);
else if (size < 10*1024)
sprintf(CS buffer, "%4.1fK", (double)size / 1024.0);
else if (size < 1024*1024)
sprintf(CS buffer, "%4dK", (size + 512)/1024);
else if (size < 10... | 0 | [] | exim | 24c929a27415c7cfc7126c47e4cad39acf3efa6b | 110,893,408,479,610,580,000,000,000,000,000,000,000 | 14 | Buffer overrun fix. fixes: bug #787 |
static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs)
{
struct rt_sigframe __user *frame;
int err = 0;
int signal;
frame = get_sigframe(ka, regs->regs[REG_SP], sizeof(*frame));
if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame)))
goto give_sigsegv... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 40,268,257,268,143,517,000,000,000,000,000,000,000 | 102 | 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 u32 avc_emulation_bytes_add_count(char *buffer, u32 nal_size)
{
u32 i = 0, emulation_bytes_count = 0;
u8 num_zero = 0;
while (i < nal_size) {
/*ISO 14496-10: "Within the NAL unit, any four-byte sequence that starts with 0x000003
other than the following sequences shall not occur at any byte-aligned posit... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 195,923,828,055,508,160,000,000,000,000,000,000,000 | 29 | fix some exploitable overflows (#994, #997) |
static void storm_memset_eq_prod(struct bnx2x *bp, u16 eq_prod,
u16 pfid)
{
u32 addr = BAR_CSTRORM_INTMEM + CSTORM_EVENT_RING_PROD_OFFSET(pfid);
REG_WR16(bp, addr, eq_prod);
} | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 2,225,379,700,495,183,600,000,000,000,000,000,000 | 6 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
dissect_kafka_offset_commit_request_topic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int offset, kafka_api_version_t api_version)
{
proto_item *subti;
proto_tree *subtree;
int topic_start, topic_len;
subtree = proto_tree_add_subtree(tree, tvb, offset,... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 333,613,767,065,346,460,000,000,000,000,000,000,000 | 27 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
on_set_session_name (GdmSessionWorker *worker,
DBusMessage *message)
{
DBusError error;
const char *session_name;
dbus_bool_t res;
dbus_error_init (&error);
res = dbus_message_get_args (message,
&error,
... | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 115,279,312,489,644,950,000,000,000,000,000,000,000 | 20 | Store the face and dmrc files in a cache. Refer to bug #565151. |
static int sixaxis_set_operational_usb(struct hid_device *hdev)
{
struct sony_sc *sc = hid_get_drvdata(hdev);
const int buf_size =
max(SIXAXIS_REPORT_0xF2_SIZE, SIXAXIS_REPORT_0xF5_SIZE);
u8 *buf;
int ret;
buf = kmalloc(buf_size, GFP_KERNEL);
if (!buf)
return -ENOMEM;
ret = hid_hw_raw_request(hdev, 0xf2, b... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 33,005,486,696,769,425,000,000,000,000,000,000,000 | 48 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
std::list<HeaderEntryImpl>::iterator end() { return headers_.end(); } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 86,246,253,146,647,050,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
alias(identifier name, identifier asname, PyArena *arena)
{
alias_ty p;
if (!name) {
PyErr_SetString(PyExc_ValueError,
"field name is required for alias");
return NULL;
}
p = (alias_ty)PyArena_Malloc(arena, sizeof(*p));
if (!p)
return NULL;
p->name... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 186,752,692,712,689,200,000,000,000,000,000,000,000 | 15 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static int kdb_exec_defcmd(int argc, const char **argv)
{
int ret;
kdbtab_t *kp;
struct kdb_macro *kmp;
struct kdb_macro_statement *kms;
if (argc != 0)
return KDB_ARGCOUNT;
list_for_each_entry(kp, &kdb_cmds_head, list_node) {
if (strcmp(kp->name, argv[0]) == 0)
break;
}
if (list_entry_is_head(kp, &kdb_... | 0 | [
"CWE-787"
] | linux | eadb2f47a3ced5c64b23b90fd2a3463f63726066 | 274,823,957,020,920,350,000,000,000,000,000,000,000 | 32 | lockdown: also lock down previous kgdb use
KGDB and KDB allow read and write access to kernel memory, and thus
should be restricted during lockdown. An attacker with access to a
serial port (for example, via a hypervisor console, which some cloud
vendors provide over the network) could trigger the debugger so it is
i... |
static inline char *getSeverityStr(msg_t *pM)
{
char *name = NULL;
if(pM == NULL)
return "";
if(pM->iSeverity < 0 || pM->iSeverity > 7) {
name = "invld";
} else {
name = syslog_severity_names[pM->iSeverity];
}
return name;
} | 0 | [
"CWE-772"
] | rsyslog | 8083bd1433449fd2b1b79bf759f782e0f64c0cd2 | 167,566,375,914,340,090,000,000,000,000,000,000,000 | 15 | backporting abort condition fix from 5.7.7 |
JSRuntime *gf_js_get_rt()
{
if (!js_rt) return NULL;
return js_rt->js_runtime;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 300,694,217,284,893,420,000,000,000,000,000,000,000 | 5 | fixed #2138 |
static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *prev, *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
unsigned long flags;
spin_lock_irqsave(&ctx->completion_lock, flags);
prev... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 34,919,014,455,775,953,000,000,000,000,000,000,000 | 32 | 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... |
miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
{
/* Add code to this function (or its callees) to extract new fields. */
BUILD_ASSERT_DECL(FLOW_WC_SEQ == 41);
const struct pkt_metadata *md = &packet->md;
const void *data = dp_packet_data(packet);
size_t size = dp_packet_size(packe... | 0 | [
"CWE-400"
] | ovs | 53c1b8b166f3dd217bc391d707885f789e9ecc49 | 23,599,567,451,053,850,000,000,000,000,000,000,000 | 347 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static inline int security_file_set_fowner(struct file *file)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 75,875,461,949,489,420,000,000,000,000,000,000,000 | 4 | 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... |
int prepare_binprm(struct linux_binprm *bprm)
{
umode_t mode;
struct inode * inode = bprm->file->f_path.dentry->d_inode;
int retval;
mode = inode->i_mode;
if (bprm->file->f_op == NULL)
return -EACCES;
/* clear any previous set[ug]id data from a previous binary */
bprm->cred->euid = current_euid();
bprm->cre... | 1 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 287,755,060,041,700,370,000,000,000,000,000,000,000 | 42 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static int inotify_fasync(int fd, struct file *file, int on)
{
struct inotify_device *dev = file->private_data;
return fasync_helper(fd, file, on, &dev->fa) >= 0 ? 0 : -EIO;
} | 0 | [
"CWE-399"
] | linux-2.6 | 3632dee2f8b8a9720329f29eeaa4ec4669a3aff8 | 100,665,788,069,984,370,000,000,000,000,000,000,000 | 6 | inotify: clean up inotify_read and fix locking problems
If userspace supplies an invalid pointer to a read() of an inotify
instance, the inotify device's event list mutex is unlocked twice.
This causes an unbalance which effectively leaves the data structure
unprotected, and we can trigger oopses by accessing the inot... |
sethalftone_cleanup(i_ctx_t *i_ctx_p)
{
gx_device_halftone *pdht = r_ptr(&esp[4], gx_device_halftone);
gs_halftone *pht = r_ptr(&esp[3], gs_halftone);
gs_free_object(pdht->rc.memory, pdht,
"sethalftone_cleanup(device halftone)");
gs_free_object(pht->rc.memory, pht,
... | 0 | [] | ghostpdl | f5c7555c30393e64ec1f5ab0dfae5b55b3b3fc78 | 285,245,313,768,496,520,000,000,000,000,000,000,000 | 11 | Bug 697203: check for sufficient params in .sethalftone5
and param types |
MagickExport void SetStringInfoName(StringInfo *string_info,const char *name)
{
assert(string_info != (StringInfo *) NULL);
assert(string_info->signature == MagickCoreSignature);
assert(name != (const char *) NULL);
string_info->name=ConstantString(name);
} | 0 | [
"CWE-190"
] | ImageMagick | be90a5395695f0d19479a5d46b06c678be7f7927 | 253,292,864,683,841,720,000,000,000,000,000,000,000 | 7 | https://github.com/ImageMagick/ImageMagick/issues/1721 |
static int load_elf_binary(struct linux_binprm *bprm)
{
struct file *interpreter = NULL; /* to shut gcc up */
unsigned long load_addr = 0, load_bias = 0;
int load_addr_set = 0;
char * elf_interpreter = NULL;
unsigned long error;
struct elf_phdr *elf_ppnt, *elf_phdata, *interp_elf_phdata = NULL;
unsigned long el... | 0 | [] | linux | eab09532d40090698b05a07c1c87f39fdbc5fab5 | 170,259,930,486,323,370,000,000,000,000,000,000,000 | 488 | binfmt_elf: use ELF_ET_DYN_BASE only for PIE
The ELF_ET_DYN_BASE position was originally intended to keep loaders
away from ET_EXEC binaries. (For example, running "/lib/ld-linux.so.2
/bin/cat" might cause the subsequent load of /bin/cat into where the
loader had been loaded.)
With the advent of PIE (ET_DYN binaries... |
const CImg<T>& _save_inr(std::FILE *const file, const char *const filename, const float *const voxel_size) const {
if (!file && !filename)
throw CImgArgumentException(_cimg_instance
"save_inr(): Specified filename is (null).",
ci... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 199,522,468,529,460,150,000,000,000,000,000,000,000 | 53 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
{
struct ip_esp_hdr *esph;
struct esp_data *esp = x->data;
struct crypto_aead *aead = esp->aead;
struct aead_request *req;
struct sk_buff *trailer;
int elen = skb->len - sizeof(*esph) - crypto_aead_ivsize(aead);
int nfrags;
void *tmp;
u8 *iv;
str... | 1 | [
"CWE-16"
] | linux-2.6 | 920fc941a9617f95ccb283037fe6f8a38d95bb69 | 261,859,902,457,785,360,000,000,000,000,000,000,000 | 60 | [ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access
ESP does not account for the IV size when calling pskb_may_pull() to
ensure everything it accesses directly is within the linear part of a
potential fragment. This results in a BUG() being triggered when the
both the IPv4 and IPv6 ESP stack... |
md_mark_chain_append(MD_CTX* ctx, MD_MARKCHAIN* chain, int mark_index)
{
if(chain->tail >= 0)
ctx->marks[chain->tail].next = mark_index;
else
chain->head = mark_index;
ctx->marks[mark_index].prev = chain->tail;
ctx->marks[mark_index].next = -1;
chain->tail = mark_index;
} | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 71,661,681,477,900,890,000,000,000,000,000,000,000 | 11 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr range;
const xmlChar *cur;
xmlXPathObjectPtr res, obj;
xmlXPathObjectPtr tmp;
xmlLocationSetPtr newset = NULL;
xmlNodeSetPtr oldset;
int i;
if (ctxt == NULL) return;
CHECK_ARITY(1);
/*
* Sa... | 0 | [
"CWE-415"
] | libxml2 | f5048b3e71fc30ad096970b8df6e7af073bae4cb | 83,069,426,856,685,280,000,000,000,000,000,000,000 | 69 | Hardening of XPath evaluation
Add a mechanism of frame for XPath evaluation when entering a function
or a scoped evaluation, also fix a potential problem in predicate
evaluation. |
ves_icall_System_Threading_Thread_SetName_internal (MonoInternalThread *this_obj, MonoString *name)
{
ensure_synch_cs_set (this_obj);
EnterCriticalSection (this_obj->synch_cs);
if (this_obj->name) {
LeaveCriticalSection (this_obj->synch_cs);
mono_raise_exception (mono_get_exception_invalid_operation ("Thr... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 51,793,082,630,837,070,000,000,000,000,000,000,000 | 27 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
CModule::EModRet CModule::OnUserAction(CString& sTarget, CString& sMessage) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 154,445,767,252,217,660,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
static void ppp_destroy_channel(struct channel *pch)
{
atomic_dec(&channel_count);
if (!pch->file.dead) {
/* "can't happen" */
pr_err("ppp: destroying undead channel %p !\n", pch);
return;
}
skb_queue_purge(&pch->file.xq);
skb_queue_purge(&pch->file.rq);
kfree(pch);
} | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 236,183,844,301,058,670,000,000,000,000,000,000,000 | 13 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
static int nl80211_join_mesh(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
struct net_device *dev = info->user_ptr[1];
struct mesh_config cfg;
struct mesh_setup setup;
int err;
/* start with default */
memcpy(&cfg, &default_mesh_config, sizeof(cfg))... | 0 | [
"CWE-362",
"CWE-119"
] | linux | 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 | 259,469,459,493,108,900,000,000,000,000,000,000,000 | 35 | nl80211: fix check for valid SSID size in scan operations
In both trigger_scan and sched_scan operations, we were checking for
the SSID length before assigning the value correctly. Since the
memory was just kzalloc'ed, the check was always failing and SSID with
over 32 characters were allowed to go through.
This was... |
get_filter(
Operation *op,
BerElement *ber,
Filter **filt,
const char **text )
{
ber_tag_t tag;
ber_len_t len;
int err;
Filter f;
Debug( LDAP_DEBUG_FILTER, "begin get_filter\n", 0, 0, 0 );
/*
* A filter looks like this coming in:
* Filter ::= CHOICE {
* and [0] SET OF Filter,
* or [1] SET OF Fi... | 1 | [
"CWE-674"
] | openldap | 98464c11df8247d6a11b52e294ba5dd4f0380440 | 103,245,631,484,426,320,000,000,000,000,000,000,000 | 229 | ITS#9202 limit depth of nested filters
Using a hardcoded limit for now; no reasonable apps
should ever run into it. |
hook_search_fd (int fd)
{
struct t_hook *ptr_hook;
for (ptr_hook = weechat_hooks[HOOK_TYPE_FD]; ptr_hook;
ptr_hook = ptr_hook->next_hook)
{
if (!ptr_hook->deleted && (HOOK_FD(ptr_hook, fd) == fd))
return ptr_hook;
}
/* fd hook not found */
return NULL;
} | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 84,526,796,492,751,480,000,000,000,000,000,000,000 | 14 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
ProcessRepliesIfAny(void)
{
unsigned char firstchar;
int r;
bool received = false;
for (;;)
{
r = pq_getbyte_if_available(&firstchar);
if (r < 0)
{
/* unexpected error or EOF */
ereport(COMMERROR,
(errcode(ERRCODE_PROTOCOL_VIOLATION),
errmsg("unexpected EOF on standby connection")));
... | 1 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 195,571,480,910,666,000,000,000,000,000,000,000,000 | 95 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
ldns_rdf2buffer_str_nsap(ldns_buffer *output, const ldns_rdf *rdf)
{
ldns_buffer_printf(output, "0x");
return ldns_rdf2buffer_str_hex(output, rdf);
} | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 86,697,829,641,334,350,000,000,000,000,000,000,000 | 5 | CAA and URI |
Item_subselect *TABLE_LIST::containing_subselect()
{
return (select_lex ? select_lex->master_unit()->item : 0);
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 15,355,692,961,732,907,000,000,000,000,000,000,000 | 4 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static inline struct ist htx_sl_res_vsn(const struct htx_sl *sl)
{
return htx_sl_p1(sl);
} | 0 | [
"CWE-190"
] | haproxy | 3b69886f7dcc3cfb3d166309018e6cfec9ce2c95 | 259,983,143,174,943,400,000,000,000,000,000,000,000 | 4 | BUG/MAJOR: htx: fix missing header name length check in htx_add_header/trailer
Ori Hollander of JFrog Security reported that htx_add_header() and
htx_add_trailer() were missing a length check on the header name. While
this does not allow to overwrite any memory area, it results in bits of
the header name length to sli... |
void dwgCompressor::decompSet(const duint8 value)
{
decompGood = (decompPos < decompSize);
if (decompGood) {
decompBuffer[decompPos] = value;
++decompPos;
}
} | 0 | [
"CWE-191"
] | libdxfrw | ba3fa95648bef948e008dfbdd31a4d21badd71f0 | 193,940,458,916,516,500,000,000,000,000,000,000,000 | 8 | fixed out-of-bounds write vulnerability CVE-2021-21898
as reported in TALOS-2021-1349 / CVE-2021-21898,
dwgCompressor::decompress18() could be abused with a malformed DWG file
to force out-of-bounds write and possibly lead to malicious code
execution. |
static inline bool con_is_fg(const struct vc_data *vc)
{
return vc->vc_num == fg_console;
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 290,606,929,871,117,200,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->... |
static PHP_FUNCTION(xmlwriter_start_element)
{
php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAM_PASSTHRU, xmlTextWriterStartElement, "Invalid Element Name");
} | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 56,104,449,116,553,560,000,000,000,000,000,000,000 | 4 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
newSWFInput_stream(FILE* f)
{
SWFInput input = (SWFInput)malloc(sizeof(struct SWFInput_s));
struct SWFInputStreamData *data;
/* If malloc failed, return NULL to signify this */
if (NULL == input)
return NULL;
data = (struct SWFInputStreamData *)malloc(sizeof(struct SWFInputStreamData));
/* If malloc failed, ... | 0 | [
"CWE-190",
"CWE-703"
] | libming | a009a38dce1d9316cad1ab522b813b1d5ba4c62a | 297,340,302,543,424,820,000,000,000,000,000,000,000 | 40 | Fix left shift of a negative value in SWFInput_readSBits. Check for number before before left-shifting by (number-1). |
Item *get_copy(THD *thd)
{ return get_item_copy<Item_ref_null_helper>(thd, this); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 86,259,296,923,829,420,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.