func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
rndr_strikethrough(struct buf *ob, const struct buf *text, void *opaque)
{
if (!text || !text->size)
return 0;
BUFPUTSL(ob, "<del>");
bufput(ob, text->data, text->size);
BUFPUTSL(ob, "</del>");
return 1;
} | 0 | [
"CWE-79",
"CWE-74"
] | redcarpet | a699c82292b17c8e6a62e1914d5eccc252272793 | 82,608,180,962,930,595,000,000,000,000,000,000,000 | 10 | Fix a security issue using `:quote` with `:escape_html`
Reported by @johan-smits. |
PHP_FUNCTION(sqlite_has_prev)
{
zval *zres;
struct php_sqlite_result *res;
zval *object = getThis();
if (object) {
if (zend_parse_parameters_none() == FAILURE) {
return;
}
RES_FROM_OBJECT(res, object);
} else {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &zres)) {
return;
... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 246,369,238,156,263,100,000,000,000,000,000,000,000 | 25 | - 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 update_const_equal_items(THD *thd, COND *cond, JOIN_TAB *tab,
bool const_key)
{
if (!(cond->used_tables() & tab->table->map))
return;
if (cond->type() == Item::COND_ITEM)
{
List<Item> *cond_list= ((Item_cond*) cond)->argument_list();
List_iterator_fas... | 0 | [] | server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | 193,236,919,850,300,230,000,000,000,000,000,000,000 | 55 | MDEV-28094 Window function in expression in ORDER BY
call item->split_sum_func() in setup_order() just as
it's done in setup_fields() |
static int sort_idmaps(struct uid_gid_map *map)
{
if (map->nr_extents <= UID_GID_MAP_MAX_BASE_EXTENTS)
return 0;
/* Sort forward array. */
sort(map->forward, map->nr_extents, sizeof(struct uid_gid_extent),
cmp_extents_forward, NULL);
/* Only copy the memory from forward we actually need. */
map->reverse ... | 0 | [
"CWE-20",
"CWE-862",
"CWE-863"
] | linux | d2f007dbe7e4c9583eea6eb04d60001e85c6f1bd | 13,723,689,117,891,693,000,000,000,000,000,000,000 | 22 | userns: also map extents in the reverse map to kernel IDs
The current logic first clones the extent array and sorts both copies, then
maps the lower IDs of the forward mapping into the lower namespace, but
doesn't map the lower IDs of the reverse mapping.
This means that code in a nested user namespace with >5 extent... |
static uint16_t tulip_srom_crc(TULIPState *s, uint8_t *eeprom, size_t len)
{
unsigned long crc = 0xffffffff;
unsigned long flippedcrc = 0;
unsigned char currentbyte;
unsigned int msb, bit, i;
for (i = 0; i < len; i++) {
currentbyte = eeprom[i];
for (bit = 0; bit < 8; bit++) {
... | 0 | [
"CWE-787"
] | qemu | 8ffb7265af64ec81748335ec8f20e7ab542c3850 | 148,195,801,121,503,040,000,000,000,000,000,000,000 | 28 | net: tulip: check frame size and r/w data length
Tulip network driver while copying tx/rx buffers does not check
frame size against r/w data length. This may lead to OOB buffer
access. Add check to avoid it.
Limit iterations over descriptors to avoid potential infinite
loop issue in tulip_xmit_list_update.
Reported-... |
bool self_set(JSContext *cx, unsigned argc, Value *vp) {
CallArgs args = CallArgsFromVp(argc, vp);
if (!args.requireAtLeast(cx, "globalThis.self setter", 1)) {
return false;
}
RootedObject global(cx, JS::CurrentGlobalOrNull(cx));
if (args.thisv() != ObjectValue(*global)) {
JS_ReportErrorLatin1(cx, "g... | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 129,546,980,830,876,900,000,000,000,000,000,000,000 | 19 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
static int pfkey_promisc(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs)
{
struct pfkey_sock *pfk = pfkey_sk(sk);
int satype = hdr->sadb_msg_satype;
bool reset_errno = false;
if (hdr->sadb_msg_len == (sizeof(*hdr) / sizeof(uint64_t))) {
reset_errno = true;
if (satype !... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 116,156,764,433,670,440,000,000,000,000,000,000,000 | 25 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static void __dma_free(struct device *dev, size_t size,
void *vaddr, dma_addr_t dma_handle,
struct dma_attrs *attrs)
{
void *swiotlb_addr = phys_to_virt(dma_to_phys(dev, dma_handle));
if (!is_device_dma_coherent(dev)) {
if (__free_from_pool(vaddr, size))
return;
vunmap(vaddr);
}
__dma_free... | 0 | [
"CWE-200"
] | linux | 6829e274a623187c24f7cfc0e3d35f25d087fcc5 | 302,713,566,987,038,670,000,000,000,000,000,000,000 | 13 | arm64: dma-mapping: always clear allocated buffers
Buffers allocated by dma_alloc_coherent() are always zeroed on Alpha,
ARM (32bit), MIPS, PowerPC, x86/x86_64 and probably other architectures.
It turned out that some drivers rely on this 'feature'. Allocated buffer
might be also exposed to userspace with dma_mmap() c... |
nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
loff_t offset, struct kvec *vec, int vlen,
unsigned long *cnt, int stable,
__be32 *verf)
{
struct file *file = nf->nf_file;
struct svc_export *exp;
struct iov_iter iter;
__be32 nfserr;
int host_err;
int use_wgathe... | 0 | [
"CWE-732"
] | linux | 22cf8419f1319ff87ec759d0ebdff4cbafaee832 | 260,678,864,876,888,100,000,000,000,000,000,000,000 | 81 | nfsd: apply umask on fs without ACL support
The server is failing to apply the umask when creating new objects on
filesystems without ACL support.
To reproduce this, you need to use NFSv4.2 and a client and server
recent enough to support umask, and you need to export a filesystem that
lacks ACL support (for example,... |
static int futex_lock_pi_atomic(u32 __user *uaddr, struct futex_hash_bucket *hb,
union futex_key *key,
struct futex_pi_state **ps,
struct task_struct *task, int set_waiters)
{
int lock_taken, ret, force_take = 0;
u32 uval, newval, curval, vpid = task_pid_vnr(task);
retry:
ret = lock_taken = 0;
/*
* ... | 0 | [
"CWE-269"
] | linux | 54a217887a7b658e2650c3feff22756ab80c7339 | 18,355,472,736,096,325,000,000,000,000,000,000,000 | 113 | futex: Make lookup_pi_state more robust
The current implementation of lookup_pi_state has ambigous handling of
the TID value 0 in the user space futex. We can get into the kernel
even if the TID value is 0, because either there is a stale waiters bit
or the owner died bit is set or we are called from the requeue_pi p... |
CImg<T>& draw_object3d(LibBoard::Board& board,
const float x0, const float y0, const float z0,
const CImg<tp>& vertices, const CImgList<tf>& primitives,
const CImgList<tc>& colors, const CImgList<to>& opacities,
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 182,711,582,988,410,900,000,000,000,000,000,000,000 | 13 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
GF_Err tfdt_box_dump(GF_Box *a, FILE * trace)
{
GF_TFBaseMediaDecodeTimeBox *ptr = (GF_TFBaseMediaDecodeTimeBox*) a;
if (!a) return GF_BAD_PARAM;
gf_isom_box_dump_start(a, "TrackFragmentBaseMediaDecodeTimeBox", trace);
gf_fprintf(trace, "baseMediaDecodeTime=\""LLD"\">\n", ptr->baseMediaDecodeTime);
gf_isom_box_du... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 166,635,314,548,792,030,000,000,000,000,000,000,000 | 10 | fixed #2138 |
STACK_OF(OPENSSL_STRING) *X509_REQ_get1_email(X509_REQ *x)
{
GENERAL_NAMES *gens;
STACK_OF(X509_EXTENSION) *exts;
STACK_OF(OPENSSL_STRING) *ret;
exts = X509_REQ_get_extensions(x);
gens = X509V3_get_d2i(exts, NID_subject_alt_name, NULL, NULL);
ret = get_email(X509_REQ_get_subject_name(x), gens);
sk_GENERAL_NAME_... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 314,993,979,269,181,400,000,000,000,000,000,000,000 | 13 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
utils_find_next_channel (guint32 channel, int direction, char *band)
{
size_t a_size = sizeof (a_table) / sizeof (struct cf_pair);
size_t bg_size = sizeof (bg_table) / sizeof (struct cf_pair);
struct cf_pair *pair = NULL;
if (!strcmp (band, "a")) {
if (channel < a_table[0].chan)
return a_table[0].chan;
if (... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 283,516,116,958,200,300,000,000,000,000,000,000,000 | 36 | 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... |
static int __init acpi_parse_madt_ioapic_entries(void)
{
int count;
/*
* ACPI interpreter is required to complete interrupt setup,
* so if it is off, don't enumerate the io-apics with ACPI.
* If MPS is present, it will handle them,
* otherwise the system will stay in PIC mode
*/
if (acpi_disabled || acpi_... | 0 | [] | linux-2.6 | f0f4c3432e5e1087b3a8c0e6bd4113d3c37497ff | 206,089,872,263,599,300,000,000,000,000,000,000,000 | 68 | [PATCH] i386: add HPET(s) into resource map
Add HPET(s) into resource map. This will allow for the HPET(s) to be
visibile within /proc/iomem.
Signed-off-by: Aaron Durbin <adurbin@google.com>
Signed-off-by: Andi Kleen <ak@suse.de> |
String *Field_decimal::val_str(String *val_buffer __attribute__((unused)),
String *val_ptr)
{
ASSERT_COLUMN_MARKED_FOR_READ;
uchar *str;
size_t tmp_length;
for (str=ptr ; *str == ' ' ; str++) ;
val_ptr->set_charset(&my_charset_numeric);
tmp_length= (size_t) (str-ptr);
if (field_length < tmp_len... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 204,978,875,919,737,060,000,000,000,000,000,000,000 | 16 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
std::shared_ptr<TProtocolFactory> getOutputProtocolFactory() override {
return outputFactory_;
} | 0 | [
"CWE-20",
"CWE-755"
] | fbthrift | 01686e15ec77ccb4d49a77d5bce3a01601e54d64 | 4,247,161,314,780,120,000,000,000,000,000,000,000 | 3 | Throw on skipping an invalid type.
Summary:
Certain values (e.g.) T_STOP should not appear as a skip type. Allowing them to
can cause thrift to loop unboundedly.
Reviewed By: spalamarchuk
Differential Revision: D15102451
fbshipit-source-id: c08d52f44f37e9c212d3480233ac217105586c9f |
ecma_string_get_utf8_size (const ecma_string_t *string_p) /**< ecma-string */
{
lit_utf8_size_t length = ecma_string_get_ascii_size (string_p);
if (length != ECMA_STRING_NO_ASCII_SIZE)
{
return length;
}
if (ECMA_IS_DIRECT_STRING (string_p))
{
JERRY_ASSERT (ECMA_GET_DIRECT_STRING_TYPE (string_p) =... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 288,986,772,426,476,850,000,000,000,000,000,000,000 | 50 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static xmlParserInputPtr MSLResolveEntity(void *context,
const xmlChar *public_id,const xmlChar *system_id)
{
MSLInfo
*msl_info;
xmlParserInputPtr
stream;
/*
Special entity resolver, better left to the parser, it has more
context than the application layer. The default behaviour is to
not... | 0 | [
"CWE-772",
"CWE-787"
] | ImageMagick | e793eb203e5e0f91f5037aed6585e81b1e27395b | 159,172,889,841,800,260,000,000,000,000,000,000,000 | 24 | https://github.com/ImageMagick/ImageMagick/issues/636 |
static zend_object_value spl_dllist_object_new_ex(zend_class_entry *class_type, spl_dllist_object **obj, zval *orig, int clone_orig TSRMLS_DC) /* {{{ */
{
zend_object_value retval = {0};
spl_dllist_object *intern;
zend_class_entry *parent = class_type;
int inherited = 0;
intern = ecalloc(1, sizeo... | 0 | [] | php-src | df78c48354f376cf419d7a97f88ca07d572f00fb | 74,915,807,049,267,140,000,000,000,000,000,000,000 | 88 | Fixed Bug #67538 (SPL Iterators use-after-free) |
static int oidc_handle_session_management_iframe_rp(request_rec *r, oidc_cfg *c,
oidc_session_t *session, const char *client_id,
const char *check_session_iframe) {
oidc_debug(r, "enter");
const char *java_script =
" <script type=\"text/javascript\">\n"
" var targetOrigin = '%s';\n"
" var... | 0 | [
"CWE-601"
] | mod_auth_openidc | 5c15dfb08106c2451c2c44ce7ace6813c216ba75 | 35,066,222,228,704,046,000,000,000,000,000,000,000 | 74 | improve validation of the post-logout URL; closes #449
- to avoid an open redirect; thanks AIMOTO Norihito
- release 2.4.0.1
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
ResolveSymlink (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
IN EFI_DISK_IO_PROTOCOL *DiskIo,
IN UDF_VOLUME_INFO *Volume,
IN UDF_FILE_INFO *Parent,
IN VOID *FileEntryData,
OUT UDF_FILE_INFO *File
)
{
EFI_STATUS Status;
UDF_READ_FILE_IN... | 0 | [] | edk2 | 89f75aa04a97293a8ed9db2a90851a5053730cf5 | 147,732,842,749,957,500,000,000,000,000,000,000,000 | 183 | MdeModulePkg/UdfDxe: Add boundary check for ComponentIdentifier decode
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828
Within ResolveSymlink():
The boundary check will validate the 'LengthofComponentIdentifier' field
of a Path Component matches the data within the relating (Extended) File
Entry.
Cc: Ruiyu Ni... |
filter_trim (struct backend *b, struct connection *conn,
uint32_t count, uint64_t offset,
uint32_t flags, int *err)
{
struct backend_filter *f = container_of (b, struct backend_filter, backend);
void *handle = connection_get_handle (conn, b->i);
struct b_conn nxdata = { .b = b->next, .co... | 0 | [
"CWE-406"
] | nbdkit | a6b88b195a959b17524d1c8353fd425d4891dc5f | 314,597,654,665,459,280,000,000,000,000,000,000,000 | 14 | server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO
Most known NBD clients do not bother with NBD_OPT_INFO (except for
clients like 'qemu-nbd --list' that don't ever intend to connect), but
go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu
to add in an extra client step (whether info on the ... |
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
{
dh->p = p;
dh->q = q;
dh->g = g;
return 1;
} | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 118,935,299,485,242,500,000,000,000,000,000,000,000 | 7 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
MagickExport Image *CharcoalImage(const Image *image,const double radius,
const double sigma,ExceptionInfo *exception)
{
Image
*charcoal_image,
*edge_image;
MagickBooleanType
status;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFal... | 0 | [
"CWE-369"
] | ImageMagick | 329dd528ab79531d884c0ba131e97d43f872ab5d | 248,587,493,201,210,000,000,000,000,000,000,000,000 | 36 | uses the PerceptibleReciprocal() to prevent the divide-by-zero from occurring (#3194)
Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com> |
size_t parse_core(const char *s, size_t n, SemanticValues & /*sv*/,
Context &c, any &dt) const override {
const auto &rule = *ope_;
auto &chldsv = c.push();
auto se = make_scope_exit([&]() { c.pop(); });
return rule.parse(s, n, chldsv, c, dt);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 240,174,464,584,598,630,000,000,000,000,000,000,000 | 7 | Fix #122 |
ptvcursor_add_ret_string(ptvcursor_t* ptvc, int hf, gint length, const guint encoding, wmem_allocator_t *scope, const guint8 **retval)
{
header_field_info *hfinfo;
field_info *new_fi;
const guint8 *value;
gint item_length;
int offset;
offset = ptvc->offset;
PROTO_REGISTRAR_GET_NTH(hf, hfinfo);
switch (... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 266,621,694,951,229,080,000,000,000,000,000,000,000 | 47 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static void __init hugetlb_register_all_nodes(void)
{
int nid;
for_each_node_state(nid, N_MEMORY) {
struct node *node = node_devices[nid];
if (node->dev.id == nid)
hugetlb_register_node(node);
}
/*
* Let the node device driver know we're here so it can
* [un]register hstate attributes on node hotplug.
... | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 96,814,220,385,356,750,000,000,000,000,000,000,000 | 17 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
static int xdp_umem_reg(struct xdp_umem *umem, struct xdp_umem_reg *mr)
{
bool unaligned_chunks = mr->flags & XDP_UMEM_UNALIGNED_CHUNK_FLAG;
u32 chunk_size = mr->chunk_size, headroom = mr->headroom;
unsigned int chunks, chunks_per_page;
u64 addr = mr->addr, size = mr->len;
int err;
if (chunk_size < XDP_UMEM_MIN_... | 0 | [
"CWE-416",
"CWE-787"
] | linux | 99e3a236dd43d06c65af0a2ef9cb44306aef6e02 | 42,054,657,955,985,470,000,000,000,000,000,000,000 | 90 | xsk: Add missing check on user supplied headroom size
Add a check that the headroom cannot be larger than the available
space in the chunk. In the current code, a malicious user can set the
headroom to a value larger than the chunk size minus the fixed XDP
headroom. That way packets with a length larger than the suppo... |
child_watch_died (GPid pid,
gint status,
gpointer user_data)
{
PidData *pid_data = user_data;
g_autoptr(GVariant) signal_variant = NULL;
g_debug ("Client Pid %d died", pid_data->pid);
signal_variant = g_variant_ref_sink (g_variant_new ("(uu)", pid, status));
g_dbu... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 311,920,544,009,798,420,000,000,000,000,000,000,000 | 24 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static inline void ext4_mb_show_ac(struct ext4_allocation_context *ac)
{
ext4_mb_show_pa(ac->ac_sb);
return;
} | 0 | [
"CWE-703"
] | linux | ce9f24cccdc019229b70a5c15e2b09ad9c0ab5d1 | 34,022,113,400,711,036,000,000,000,000,000,000,000 | 5 | ext4: check journal inode extents more carefully
Currently, system zones just track ranges of block, that are "important"
fs metadata (bitmaps, group descriptors, journal blocks, etc.). This
however complicates how extent tree (or indirect blocks) can be checked
for inodes that actually track such metadata - currently... |
add_unique_interface(ip_address_item *list, ip_address_item *ipa)
{
ip_address_item *ipa2;
for (ipa2 = list; ipa2; ipa2 = ipa2->next)
if (Ustrcmp(ipa2->address, ipa->address) == 0) return list;
ipa2 = store_get_perm(sizeof(ip_address_item), FALSE);
*ipa2 = *ipa;
ipa2->next = list;
return ipa2;
} | 0 | [
"CWE-787"
] | exim | d4bc023436e4cce7c23c5f8bb5199e178b4cc743 | 328,041,774,418,906,330,000,000,000,000,000,000,000 | 10 | Fix host_name_lookup (Close 2747)
Thanks to Nico R for providing a reproducing configuration.
host_lookup = *
message_size_limit = ${if def:sender_host_name {32M}{32M}}
acl_smtp_connect = acl_smtp_connect
acl_smtp_rcpt = acl_smtp_rcpt
begin ac... |
Item *Item_param::safe_charset_converter(THD *thd, CHARSET_INFO *tocs)
{
/*
Return "this" if in prepare. result_type may change at execition time,
to it's possible that the converter will not be needed at all:
PREPARE stmt FROM 'SELECT * FROM t1 WHERE field = ?';
SET @arg= 1;
EXECUTE stmt USING @... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 222,650,189,899,924,140,000,000,000,000,000,000,000 | 16 | 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 int set_msr_mce(struct kvm_vcpu *vcpu, u32 msr, u64 data)
{
u64 mcg_cap = vcpu->arch.mcg_cap;
unsigned bank_num = mcg_cap & 0xff;
switch (msr) {
case MSR_IA32_MCG_STATUS:
vcpu->arch.mcg_status = data;
break;
case MSR_IA32_MCG_CTL:
if (!(mcg_cap & MCG_CTL_P))
return 1;
if (data != 0 && data != ~(... | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 185,781,026,985,143,880,000,000,000,000,000,000,000 | 35 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
static void CleanupBlockEncoder(MemoryManager* m, BlockEncoder* self) {
BROTLI_FREE(m, self->depths_);
BROTLI_FREE(m, self->bits_);
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 149,153,382,635,789,130,000,000,000,000,000,000,000 | 4 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
pci_emul_alloc_bar(struct pci_vdev *pdi, int idx, enum pcibar_type type,
uint64_t size)
{
return pci_emul_alloc_pbar(pdi, idx, 0, type, size);
} | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 6199e653418eda58cd698d8769820904453e2535 | 209,095,233,735,517,900,000,000,000,000,000,000,000 | 5 | dm: validate the input in 'pci_emul_mem_handler()'
checking the inputs explicitly instead of using Assert.
Tracked-On: #4003
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com> |
uint Field_str::is_equal(Create_field *new_field)
{
return ((new_field->sql_type == real_type()) &&
new_field->charset == field_charset &&
new_field->length == max_display_length());
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 97,091,672,777,656,240,000,000,000,000,000,000,000 | 6 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
int ber_write_integer(wStream* s, UINT32 value)
{
ber_write_universal_tag(s, BER_TAG_INTEGER, FALSE);
if (value < 0x80)
{
ber_write_length(s, 1);
Stream_Write_UINT8(s, value);
return 3;
}
else if (value < 0x8000)
{
ber_write_length(s, 2);
Stream_Write_UINT16_BE(s, value);
return 4;
}
else if (val... | 1 | [
"CWE-476"
] | FreeRDP | bceec083677a609ba2f06cc75924ab0accac5388 | 60,923,015,639,328,740,000,000,000,000,000,000,000 | 32 | Finished merging missing changes from pull request #1257 (https://github.com/FreeRDP/FreeRDP/pull/1257 - commit 0dc22d5). Correctly report the length of ts_password_creds. |
WireFormatLite::ReadPrimitive<int64_t, WireFormatLite::TYPE_SFIXED64>(
io::CodedInputStream* input, int64_t* value) {
uint64_t temp;
if (!input->ReadLittleEndian64(&temp)) return false;
*value = static_cast<int64_t>(temp);
return true;
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 336,904,236,722,693,570,000,000,000,000,000,000,000 | 7 | Apply patch |
void ip_mc_init_dev(struct in_device *in_dev)
{
ASSERT_RTNL();
#ifdef CONFIG_IP_MULTICAST
timer_setup(&in_dev->mr_gq_timer, igmp_gq_timer_expire, 0);
timer_setup(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire, 0);
#endif
ip_mc_reset(in_dev);
spin_lock_init(&in_dev->mc_tomb_lock);
} | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 280,799,481,624,941,270,000,000,000,000,000,000,000 | 12 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
GF_Err drep_dump(GF_Box *a, FILE * trace)
{
GF_DREPBox *p;
p = (GF_DREPBox *)a;
gf_isom_box_dump_start(a, "RepeatedDataBytesBox", trace);
fprintf(trace, "RepeatedBytes=\""LLD"\">\n", LLD_CAST p->nbBytes);
gf_isom_box_dump_done("RepeatedDataBytesBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 33,635,589,830,266,824,000,000,000,000,000,000,000 | 9 | fixed 2 possible heap overflows (inc. #1088) |
static void ext4_da_release_space(struct inode *inode, int to_free)
{
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
struct ext4_inode_info *ei = EXT4_I(inode);
if (!to_free)
return; /* Nothing to release, exit */
spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
if (unlikely(to_free > ei->i_reserved_da... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 164,211,385,714,040,160,000,000,000,000,000,000,000 | 44 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
CWD_API char *tsrm_realpath(const char *path, char *real_path TSRMLS_DC) /* {{{ */
{
cwd_state new_state;
char cwd[MAXPATHLEN];
/* realpath("") returns CWD */
if (!*path) {
new_state.cwd = (char*)malloc(1);
if (new_state.cwd == NULL) {
return NULL;
}
new_state.cwd[0] = '\0';
new_state.cwd_length = 0;
... | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 212,819,951,249,970,000,000,000,000,000,000,000,000 | 44 | Fix for bug #72513 |
int EC_GROUP_get_curve_name(const EC_GROUP *group)
{
return group->curve_name;
} | 0 | [
"CWE-320"
] | openssl | 8aed2a7548362e88e84a7feb795a3a97e8395008 | 38,573,939,293,743,173,000,000,000,000,000,000,000 | 4 | Reserve option to use BN_mod_exp_mont_consttime in ECDSA.
Submitted by Shay Gueron, Intel Corp.
RT: 3149
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit f54be179aa4cbbd944728771d7d59ed588158a12) |
static ssize_t pull_ascii_string(char *dest, const void *src, size_t dest_len, size_t src_len, int flags)
{
size_t size = 0;
if (flags & (STR_TERMINATE | STR_TERMINATE_ASCII)) {
if (src_len == (size_t)-1) {
src_len = strlen((const char *)src) + 1;
} else {
size_t len = strnlen((const char *)src, src_len);
... | 0 | [
"CWE-200"
] | samba | ba5dbda6d0174a59d221c45cca52ecd232820d48 | 283,020,936,699,892,650,000,000,000,000,000,000,000 | 23 | CVE-2015-5330: Fix handling of unicode near string endings
Until now next_codepoint_ext() and next_codepoint_handle_ext() were
using strnlen(str, 5) to determine how much string they should try to
decode. This ended up looking past the end of the string when it was not
null terminated and the final character looked li... |
check_mountpoint(const char *progname, char *mountpoint)
{
int err;
struct stat statbuf;
/* does mountpoint exist and is it a directory? */
err = stat(mountpoint, &statbuf);
if (err) {
fprintf(stderr, "%s: failed to stat %s: %s\n", progname,
mountpoint, strerror(errno));
return EX_USAGE;
}
if (!S_ISDIR... | 1 | [
"CWE-59"
] | samba | 3ae5dac462c4ed0fb2cd94553583c56fce2f9d80 | 166,864,297,489,576,770,000,000,000,000,000,000,000 | 39 | mount.cifs: take extra care that mountpoint isn't changed during mount
It's possible to trick mount.cifs into mounting onto the wrong directory
by replacing the mountpoint with a symlink to a directory. mount.cifs
attempts to check the validity of the mountpoint, but there's still a
possible race between those checks ... |
static int napi_gro_complete(struct sk_buff *skb)
{
struct packet_offload *ptype;
__be16 type = skb->protocol;
struct list_head *head = &offload_base;
int err = -ENOENT;
BUILD_BUG_ON(sizeof(struct napi_gro_cb) > sizeof(skb->cb));
if (NAPI_GRO_CB(skb)->count == 1) {
skb_shinfo(skb)->gso_size = 0;
goto out;
... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 312,857,222,622,198,640,000,000,000,000,000,000,000 | 33 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
void CWebSock::SetPaths(CModule* pModule, bool bIsTemplate) {
m_Template.ClearPaths();
VCString vsDirs = GetDirs(pModule, bIsTemplate);
for (const CString& sDir : vsDirs) {
m_Template.AppendPath(sDir);
}
m_bPathsSet = true;
} | 0 | [
"CWE-22"
] | znc | a4a5aeeb17d32937d8c7d743dae9a4cc755ce773 | 45,668,514,744,435,950,000,000,000,000,000,000,000 | 10 | Don't let web skin name ../../../../ access files outside of usual skins directories.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
stopped_push(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
push(1);
*op = esp[-1];
esp -= 3;
return o_pop_estack;
} | 0 | [
"CWE-200"
] | ghostpdl | 34cc326eb2c5695833361887fe0b32e8d987741c | 182,673,386,861,758,600,000,000,000,000,000,000,000 | 9 | Bug 699927: don't include operator arrays in execstack output
When we transfer the contents of the execution stack into the array, take the
extra step of replacing any operator arrays on the stack with the operator
that reference them.
This prevents the contents of Postscript defined, internal only operators (those
c... |
static int on_part_data_end(multipart_parser *parser)
{
multipart_parser_data_t *data = NULL;
ogs_assert(parser);
data = multipart_parser_get_data(parser);
ogs_assert(data);
if (data->num_of_part < OGS_SBI_MAX_NUM_OF_PART) {
data->num_of_part++;
}
return 0;
} | 0 | [
"CWE-476",
"CWE-787"
] | open5gs | d919b2744cd05abae043490f0a3dd1946c1ccb8c | 208,450,764,534,672,550,000,000,000,000,000,000,000 | 14 | [AMF] fix the memory problem (#1247)
1. memory corruption
- Overflow num_of_part in SBI message
2. null pointer dereference
- n2InfoContent->ngap_ie_type |
void VvcUnitWithProfile::profile_tier_level(bool profileTierPresentFlag, int MaxNumSubLayersMinus1)
{
if (profileTierPresentFlag)
{
profile_idc = m_reader.getBits(7);
bool tier_flag = m_reader.getBit();
}
level_idc = m_reader.getBits(8);
m_reader.skipBits(2); // ptl_frame_only_const... | 1 | [
"CWE-22"
] | tsMuxer | 3763dd34755a8944d903aa19578fa22cd3734165 | 181,342,659,738,487,030,000,000,000,000,000,000,000 | 38 | Fix Buffer Overflow
Fixes issue #509. |
xfs_file_mmap(
struct file *filp,
struct vm_area_struct *vma)
{
vma->vm_ops = &xfs_file_vm_ops;
file_accessed(filp);
return 0;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 113,116,041,136,047,820,000,000,000,000,000,000,000 | 9 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
static uint64_t reencrypt_data_shift(struct luks2_hdr *hdr)
{
json_object *jobj_keyslot, *jobj_area, *jobj_data_shift;
int ks = LUKS2_find_keyslot(hdr, "reencrypt");
if (ks < 0)
return 0;
jobj_keyslot = LUKS2_get_keyslot_jobj(hdr, ks);
json_object_object_get_ex(jobj_keyslot, "area", &jobj_area);
if (!json_ob... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 8,036,407,117,477,025,000,000,000,000,000,000,000 | 16 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
int argc,char **argv,char **wand_unused(metadata),ExceptionInfo *exception)
{
#define DestroyMogrify() \
{ \
if (format != (char *) NULL) \
format=DestroyString(format); \
if (path != (char *) NULL) \
path=DestroyString(path); \
Des... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick6 | bb812022d0bc12107db215c981cab0b1ccd73d91 | 133,803,122,307,171,930,000,000,000,000,000,000,000 | 2,738 | https://github.com/ImageMagick/ImageMagick/issues/1623 |
void TopologyDescription::associateServerDescriptions(
const TopologyDescriptionPtr& topologyDescription) {
auto& servers = topologyDescription->_servers;
for (auto& server : servers) {
server->_topologyDescription = topologyDescription;
}
} | 0 | [
"CWE-755"
] | mongo | 75f7184eafa78006a698cda4c4adfb57f1290047 | 146,713,352,441,858,740,000,000,000,000,000,000,000 | 7 | SERVER-50170 fix max staleness read preference parameter for server selection |
Symbol* Binary::get_symbol(const std::string& name) {
return const_cast<Symbol*>(static_cast<const Binary*>(this)->get_symbol(name));
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 142,922,168,564,515,740,000,000,000,000,000,000,000 | 3 | Resolve #764 |
ufmt_getType(const UFormattable *fmt, UErrorCode *status) {
if(U_FAILURE(*status)) {
return (UFormattableType)UFMT_COUNT;
}
const Formattable *obj = Formattable::fromUFormattable(fmt);
return (UFormattableType)obj->getType();
} | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 142,544,114,242,671,570,000,000,000,000,000,000,000 | 7 | ICU-20246 Fixing another integer overflow in number parsing. |
static int h2c_send_window_update(struct h2c *h2c, int sid, uint32_t increment)
{
struct buffer *res;
char str[13];
int ret = -1;
if (h2c_mux_busy(h2c, NULL)) {
h2c->flags |= H2_CF_DEM_MBUSY;
return 0;
}
res = h2_get_buf(h2c, &h2c->mbuf);
if (!res) {
h2c->flags |= H2_CF_MUX_MALLOC;
h2c->flags |= H2_CF_... | 0 | [
"CWE-125"
] | haproxy | a01f45e3ced23c799f6e78b5efdbd32198a75354 | 227,806,582,765,054,200,000,000,000,000,000,000,000 | 38 | BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used
Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder
when the PRIORITY flag is present. A check is missing to ensure the 5
extra bytes needed with this flag are actually part of the frame. As per
RFC7540#4.2, let's return a connec... |
static BOOL wf_cliprdr_get_file_contents(WCHAR* file_name, BYTE* buffer, LONG positionLow,
LONG positionHigh, DWORD nRequested, DWORD* puSize)
{
BOOL res = FALSE;
HANDLE hFile;
DWORD nGet, rc;
if (!file_name || !buffer || !puSize)
{
WLog_ERR(TAG, "get file contents Inval... | 0 | [
"CWE-20"
] | FreeRDP | 0d79670a28c0ab049af08613621aa0c267f977e9 | 130,773,339,187,122,250,000,000,000,000,000,000,000 | 41 | Fixed missing input checks for file contents request
reported by Valentino Ricotta (Thalium) |
void setVariable(StringData name, Value val) {
auto varId = _expCtx->variablesParseState.defineVariable(name);
_expCtx->variables.setValue(varId, val);
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 250,693,231,468,938,760,000,000,000,000,000,000,000 | 4 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static int udp_v4_mcast_deliver(struct sk_buff *skb, struct udphdr *uh,
__be32 saddr, __be32 daddr)
{
struct sock *sk;
int dif;
read_lock(&udp_hash_lock);
sk = sk_head(&udp_hash[ntohs(uh->dest) & (UDP_HTABLE_SIZE - 1)]);
dif = skb->dev->ifindex;
sk = udp_v4_mcast_next(sk, uh->dest, daddr, uh->source, saddr,... | 0 | [
"CWE-476"
] | linux-2.6 | 1e0c14f49d6b393179f423abbac47f85618d3d46 | 131,549,840,197,120,720,000,000,000,000,000,000,000 | 35 | [UDP]: Fix MSG_PROBE crash
UDP tracks corking status through the pending variable. The
IP layer also tracks it through the socket write queue. It
is possible for the two to get out of sync when MSG_PROBE is
used.
This patch changes UDP to check the write queue to ensure
that the two stay in sync.
Signed-off-by: He... |
static void sony_release_device_id(struct sony_sc *sc)
{
if (sc->device_id >= 0) {
ida_simple_remove(&sony_device_id_allocator, sc->device_id);
sc->device_id = -1;
}
} | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 145,454,423,717,341,960,000,000,000,000,000,000,000 | 7 | 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... |
tiff_document_init (TiffDocument *tiff_document)
{
tiff_document->n_pages = -1;
} | 0 | [
"CWE-754"
] | evince | 234f034a4d15cd46dd556f4945f99fbd57ef5f15 | 282,198,422,230,723,800,000,000,000,000,000,000,000 | 4 | tiff: Handle failure from TIFFReadRGBAImageOriented
The TIFFReadRGBAImageOriented function returns zero if it was unable to
read the image. Return NULL in this case instead of displaying
uninitialized memory.
Fixes #1129 |
static int update_clone(int argc, const char **argv, const char *prefix)
{
const char *update = NULL;
int max_jobs = -1;
struct string_list_item *item;
struct pathspec pathspec;
struct submodule_update_clone suc = SUBMODULE_UPDATE_CLONE_INIT;
struct option module_update_clone_options[] = {
OPT_STRING(0, "prefi... | 1 | [
"CWE-20"
] | git | 0060fd1511b94c918928fa3708f69a3f33895a4a | 121,874,789,547,380,300,000,000,000,000,000,000,000 | 82 | clone --recurse-submodules: prevent name squatting on Windows
In addition to preventing `.git` from being tracked by Git, on Windows
we also have to prevent `git~1` from being tracked, as the default NTFS
short name (also known as the "8.3 filename") for the file name `.git`
is `git~1`, otherwise it would be possible ... |
void tipc_mon_rcv(struct net *net, void *data, u16 dlen, u32 addr,
struct tipc_mon_state *state, int bearer_id)
{
struct tipc_monitor *mon = tipc_monitor(net, bearer_id);
struct tipc_mon_domain *arrv_dom = data;
struct tipc_mon_domain dom_bef;
struct tipc_mon_domain *dom;
struct tipc_peer *peer;
u16 new_membe... | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 155,729,554,744,941,500,000,000,000,000,000,000,000 | 85 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
static WORD_LIST *
expand_string_for_rhs (string, quoted, dollar_at_p, expanded_p)
char *string;
int quoted, *dollar_at_p, *expanded_p;
{
WORD_DESC td;
WORD_LIST *tresult;
if (string == 0 || *string == '\0')
return (WORD_LIST *)NULL;
expand_no_split_dollar_star = 1;
td.flags = W_NOSPLIT2; /* ... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 255,842,111,917,892,440,000,000,000,000,000,000,000 | 18 | Bash-4.4 patch 7 |
inline void FullyConnected(
const FullyConnectedParams& params, const RuntimeShape& input_shape,
const uint8* input_data, const RuntimeShape& filter_shape,
const uint8* filter_data, const RuntimeShape& bias_shape,
const int32* bias_data, const RuntimeShape& output_shape,
uint8* output_data, CpuBacke... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 288,911,627,521,405,620,000,000,000,000,000,000,000 | 62 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
static int ovl_symlink(struct inode *dir, struct dentry *dentry,
const char *link)
{
return ovl_create_object(dentry, S_IFLNK, 0, link);
} | 0 | [
"CWE-20"
] | linux | 11f3710417d026ea2f4fcf362d866342c5274185 | 295,793,126,514,258,540,000,000,000,000,000,000,000 | 5 | ovl: verify upper dentry before unlink and rename
Unlink and rename in overlayfs checked the upper dentry for staleness by
verifying upper->d_parent against upperdir. However the dentry can go
stale also by being unhashed, for example.
Expand the verification to actually look up the name again (under parent
lock) an... |
bool AES_GCM_DecryptContext::Decrypt(
const void *pEncryptedDataAndTag, size_t cbEncryptedDataAndTag,
const void *pIV,
void *pPlaintextData, uint32 *pcbPlaintextData,
const void *pAdditionalAuthenticationData, size_t cbAuthenticationData
) {
// Make sure caller's buffer is big enough to hold the result
if ( cbEnc... | 0 | [
"CWE-787"
] | GameNetworkingSockets | bea84e2844b647532a9b7fbc3a6a8989d66e49e3 | 55,011,099,790,602,340,000,000,000,000,000,000,000 | 26 | Check if output buffer is too small.
It really seems like libsodium (whose entire purpose is to make crypto
idiot-proof) making me mess with these details is a flaw in the API design.
Also, correct Hungarian. |
static int __mlx5_ib_modify_qp(struct ib_qp *ibqp,
const struct ib_qp_attr *attr, int attr_mask,
enum ib_qp_state cur_state, enum ib_qp_state new_state,
const struct mlx5_ib_modify_qp *ucmd)
{
static const u16 optab[MLX5_QP_NUM_STATE][MLX5_QP_NUM_STATE] = {
[MLX5_QP_STATE_RST] = {
[M... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 293,038,010,767,162,200,000,000,000,000,000,000,000 | 313 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
pick_next_task(struct rq *rq, struct task_struct *prev)
{
const struct sched_class *class = &fair_sched_class;
struct task_struct *p;
/*
* Optimization: we know that if all tasks are in
* the fair class we can call that function directly:
*/
if (likely(prev->sched_class == class &&
rq->nr_running == rq-... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 99,145,592,128,890,550,000,000,000,000,000,000,000 | 34 | 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... |
static const char *req_unparsed_uri_field(request_rec *r)
{
return r->unparsed_uri;
} | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 93,556,079,788,448,300,000,000,000,000,000,000,000 | 4 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
clear_winopt(winopt_T *wop UNUSED)
{
#ifdef FEAT_FOLDING
clear_string_option(&wop->wo_fdi);
clear_string_option(&wop->wo_fdm);
clear_string_option(&wop->wo_fdm_save);
# ifdef FEAT_EVAL
clear_string_option(&wop->wo_fde);
clear_string_option(&wop->wo_fdt);
# endif
clear_string_option(&wop->wo_fmr)... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 230,028,407,891,805,840,000,000,000,000,000,000,000 | 42 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
static void GCTM (lua_State *L) {
global_State *g = G(L);
const TValue *tm;
TValue v;
lua_assert(!g->gcemergency);
setgcovalue(L, &v, udata2finalize(g));
tm = luaT_gettmbyobj(L, &v, TM_GC);
if (!notm(tm)) { /* is there a finalizer? */
int status;
lu_byte oldah = L->allowhook;
int running = g... | 0 | [
"CWE-125"
] | lua | 127e7a6c8942b362aa3c6627f44d660a4fb75312 | 116,427,553,603,713,220,000,000,000,000,000,000,000 | 26 | Fixed bug of old finalized objects in the GC
When an object aged OLD1 is finalized, it is moved from the list
'finobj' to the *beginning* of the list 'allgc'. So, this part of the
list (and not only the survival list) must be visited by 'markold'. |
static ssize_t mt_set_quirks(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct hid_device *hdev = to_hid_device(dev);
struct mt_device *td = hid_get_drvdata(hdev);
struct mt_application *application;
unsigned long val;
if (kstrtoul(buf, 0, &val))
return -EINVA... | 0 | [
"CWE-787"
] | linux | 35556bed836f8dc07ac55f69c8d17dce3e7f0e25 | 117,707,186,663,374,910,000,000,000,000,000,000,000 | 23 | HID: core: Sanitize event code and type when mapping input
When calling into hid_map_usage(), the passed event code is
blindly stored as is, even if it doesn't fit in the associated bitmap.
This event code can come from a variety of sources, including devices
masquerading as input devices, only a bit more "programmab... |
static int dummy_ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len,
int *addr_len)
{
return -EAFNOSUPPORT;
} | 0 | [
"CWE-20"
] | net | 85fbaa75037d0b6b786ff18658ddf0b4014ce2a4 | 90,939,363,617,225,260,000,000,000,000,000,000,000 | 5 | inet: fix addr_len/msg->msg_namelen assignment in recv_error and rxpmtu functions
Commit bceaa90240b6019ed73b49965eac7d167610be69 ("inet: prevent leakage
of uninitialized memory to user in recv syscalls") conditionally updated
addr_len if the msg_name is written to. The recv_error and rxpmtu
functions relied on the re... |
static int allocate_cgrp_cset_links(int count, struct list_head *tmp_links)
{
struct cgrp_cset_link *link;
int i;
INIT_LIST_HEAD(tmp_links);
for (i = 0; i < count; i++) {
link = kzalloc(sizeof(*link), GFP_KERNEL);
if (!link) {
free_cgrp_cset_links(tmp_links);
return -ENOMEM;
}
list_add(&link->cset_l... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 301,117,216,552,485,400,000,000,000,000,000,000,000 | 17 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
static int sony_set_device_id(struct sony_sc *sc)
{
int ret;
/*
* Only DualShock 4 or Sixaxis controllers get an id.
* All others are set to -1.
*/
if ((sc->quirks & SIXAXIS_CONTROLLER) ||
(sc->quirks & DUALSHOCK4_CONTROLLER)) {
ret = ida_simple_get(&sony_device_id_allocator, 0, 0,
GFP_KERNEL);
... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 152,695,006,867,931,030,000,000,000,000,000,000,000 | 23 | 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... |
get_reg_contents(int regname, int flags)
{
long i;
char_u *retval;
int allocated;
long len;
// Don't allow using an expression register inside an expression
if (regname == '=')
{
if (flags & GREG_NO_EXPR)
return NULL;
if (flags & GREG_EXPR_SRC)
return getreg_wrap_one_line(get_e... | 0 | [
"CWE-122",
"CWE-787"
] | vim | d25f003342aca9889067f2e839963dfeccf1fe05 | 172,979,883,364,578,070,000,000,000,000,000,000,000 | 91 | patch 9.0.0011: reading beyond the end of the line with put command
Problem: Reading beyond the end of the line with put command.
Solution: Adjust the end mark position. |
char type() const { return TYPE; } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 236,845,049,804,995,700,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
AP_DECLARE(apr_time_t) ap_rationalize_mtime(request_rec *r, apr_time_t mtime)
{
apr_time_t now;
/* For all static responses, it's almost certain that the file was
* last modified before the beginning of the request. So there's
* no reason to call time(NULL) again. But if the response has been
... | 0 | [
"CWE-703"
] | httpd | be0f5335e3e73eb63253b050fdc23f252f5c8ae3 | 255,460,920,128,123,130,000,000,000,000,000,000,000 | 16 | *) SECURITY: CVE-2015-0253 (cve.mitre.org)
core: Fix a crash introduced in with ErrorDocument 400 pointing
to a local URL-path with the INCLUDES filter active, introduced
in 2.4.11. PR 57531. [Yann Ylavic]
Submitted By: ylavic
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/http... |
mergefree (struct dns_transmit *d)
{
int i = 0;
if (merge_enable)
unregister_inprogress (d);
/* unregister us from our mater */
if (d->master)
{
for (i = 0; i < d->master->nslaves; i++)
if (d->master->slaves[i] == d)
d->master->slaves[i] = 0;
}
... | 0 | [
"CWE-362"
] | ndjbdns | 177b5522e9b3d25778001c8cebfddd4d2973fcfd | 41,507,151,945,591,810,000,000,000,000,000,000,000 | 24 | Merge identical outgoing requests - patch 2.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. The merges operation takes place in the
dns_transmit layer, rather than between query and dns_transmit layers,
as don... |
static void release_dsc(struct resource_context *res_ctx,
const struct resource_pool *pool,
struct display_stream_compressor **dsc)
{
int i;
for (i = 0; i < pool->res_cap->num_dsc; i++)
if (pool->dscs[i] == *dsc) {
res_ctx->is_dsc_acquired[i] = false;
*dsc = NULL;
break;
}
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-401"
] | linux | 055e547478a11a6360c7ce05e2afc3e366968a12 | 172,233,794,172,965,460,000,000,000,000,000,000,000 | 13 | drm/amd/display: memory leak
In dcn*_clock_source_create when dcn20_clk_src_construct fails allocated
clk_src needs release.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
TIFFWriteDirectoryTagCheckedLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value)
{
assert(count<0x40000000);
assert(sizeof(uint32)==4);
if (tif->tif_flags&TIFF_SWAB)
TIFFSwabArrayOfLong(value,count);
return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG,count,count*... | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 29,726,848,827,636,570,000,000,000,000,000,000,000 | 8 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
CancelBackup(void)
{
struct stat stat_buf;
/* if the file is not there, return */
if (stat(BACKUP_LABEL_FILE, &stat_buf) < 0)
return;
/* remove leftover file from previously canceled backup if it exists */
unlink(BACKUP_LABEL_OLD);
if (rename(BACKUP_LABEL_FILE, BACKUP_LABEL_OLD) == 0)
{
ereport(LOG,
(... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 146,525,456,947,340,920,000,000,000,000,000,000,000 | 27 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
XML_GetCurrentLineNumber(XML_Parser parser)
{
if (parser == NULL)
return 0;
if (eventPtr && eventPtr >= positionPtr) {
XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
positionPtr = eventPtr;
}
return position.lineNumber + 1;
} | 0 | [
"CWE-611"
] | libexpat | c4bf96bb51dd2a1b0e185374362ee136fe2c9d7f | 16,750,491,149,025,055,000,000,000,000,000,000,000 | 10 | xmlparse.c: Fix external entity infinite loop bug (CVE-2017-9233) |
static int selinux_get_mnt_opts(const struct super_block *sb,
struct security_mnt_opts *opts)
{
int rc = 0, i;
struct superblock_security_struct *sbsec = sb->s_security;
char *context = NULL;
u32 len;
char tmp;
security_init_mnt_opts(opts);
if (!(sbsec->flags & SE_SBINITIALIZED))
return -EINVAL;
if (!s... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 126,073,382,776,885,000,000,000,000,000,000,000,000 | 88 | 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... |
static void ide_nop_start(IDEDMA *dma, IDEState *s,
BlockDriverCompletionFunc *cb)
{
} | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 39,517,250,684,465,650,000,000,000,000,000,000,000 | 4 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
tty_emulate_repeat(struct tty *tty, enum tty_code_code code,
enum tty_code_code code1, u_int n)
{
if (tty_term_has(tty->term, code))
tty_putcode1(tty, code, n);
else {
while (n-- > 0)
tty_putcode(tty, code1);
}
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 322,604,797,960,502,460,000,000,000,000,000,000,000 | 10 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
dns64_get_funcblock(void)
{
return &dns64_block;
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 176,117,061,636,691,050,000,000,000,000,000,000,000 | 4 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
local_and_exported (var)
SHELL_VAR *var;
{
return (invisible_p (var) == 0 && local_p (var) && var->context == variable_context && exported_p (var));
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 71,123,393,544,629,060,000,000,000,000,000,000,000 | 5 | commit bash-20120224 snapshot |
gboolean vnc_color_map_set(VncColorMap *map,
guint16 idx,
guint16 red,
guint16 green,
guint16 blue)
{
if (idx < map->offset || idx >= (map->size + map->offset))
return FALSE;
map->colors[idx - ma... | 0 | [] | gtk-vnc | c8583fd3783c5b811590fcb7bae4ce6e7344963e | 269,871,074,865,432,900,000,000,000,000,000,000,000 | 15 | Correctly validate color map range indexes
The color map index could wrap around to zero causing negative
array index accesses.
https://bugzilla.gnome.org/show_bug.cgi?id=778050
CVE-2017-5885
Signed-off-by: Daniel P. Berrange <berrange@redhat.com> |
TEST_F(InternalUnpackBucketSplitMatchOnMetaAndRename, OptimizeSplitsMatchAndMapsControlPredicates) {
auto unpack = fromjson(
"{$_internalUnpackBucket: { exclude: [], timeField: 'foo', metaField: 'myMeta', "
"bucketMaxSpanSeconds: 3600}}");
auto pipeline = Pipeline::parse(
makeVector(unpa... | 1 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 283,580,320,012,825,480,000,000,000,000,000,000,000 | 22 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
parse_oxms(struct ofpbuf *payload, bool loose,
struct mf_bitmap *exactp, struct mf_bitmap *maskedp)
{
struct mf_bitmap exact = MF_BITMAP_INITIALIZER;
struct mf_bitmap masked = MF_BITMAP_INITIALIZER;
while (payload->size > 0) {
const struct mf_field *field;
enum ofperr error;
... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 107,332,873,274,673,520,000,000,000,000,000,000,000 | 30 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
void set_string(StringRef str) {
string.value = str.data();
string.size = str.size();
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 99,655,384,019,112,640,000,000,000,000,000,000,000 | 4 | Fix segfault on complex pointer formatting (#642) |
static void ipc_do_vfree(struct work_struct *work)
{
vfree(container_of(work, struct ipc_rcu_sched, work));
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 27,866,765,329,248,247,000,000,000,000,000,000,000 | 4 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
gpg_ctx_get_argv (struct _GpgCtx *gpg,
gint status_fd,
gchar **sfd,
gint passwd_fd,
gchar **pfd)
{
const gchar *hash_str;
GPtrArray *argv;
gchar *buf;
gint i;
argv = g_ptr_array_new ();
g_ptr_array_add (argv, (guint8 *) gpg_ctx_get_executabl... | 0 | [
"CWE-200"
] | evolution-data-server | 5d8b92c622f6927b253762ff9310479dd3ac627d | 170,445,765,948,885,460,000,000,000,000,000,000,000 | 111 | CamelGpgContext: Enclose email addresses in brackets.
The recipient list for encrypting can be specified by either key ID or
email address. Enclose email addresses in brackets to ensure an exact
match, as per the gpg man page:
HOW TO SPECIFY A USER ID
...
By exact match on an email address.
... |
void Scan::OptimizeDCTBlock(LONG bx,LONG by,UBYTE compidx,DOUBLE lambda,
class DCT *dct,LONG quantized[64])
{
UBYTE i;
assert(m_pParser);
for(i = 0;i < m_ucCount;i++) {
if (m_pComponent[i] && m_pComponent[i]->IndexOf() == compidx) {
m_pParser->OptimizeBlock(bx,by,i,lambda,d... | 0 | [
"CWE-476"
] | libjpeg | ea6315164b1649ff932a396b7600eac4bffcfaba | 145,061,532,151,331,330,000,000,000,000,000,000,000 | 14 | Added a check whether all components in a scan are actually present. |
static void do_sec_send(struct Curl_easy *data, struct connectdata *conn,
curl_socket_t fd, const char *from, int length)
{
int bytes, htonl_bytes; /* 32-bit integers for htonl */
char *buffer = NULL;
char *cmd_buffer;
size_t cmd_size = 0;
CURLcode error;
enum protection_level prot_l... | 0 | [] | curl | 6ecdf5136b52af747e7bda08db9a748256b1cd09 | 114,934,273,122,542,060,000,000,000,000,000,000,000 | 53 | krb5: return error properly on decode errors
Bug: https://curl.se/docs/CVE-2022-32208.html
CVE-2022-32208
Reported-by: Harry Sintonen
Closes #9051 |
PHP_METHOD(Phar, convertToExecutable)
{
char *ext = NULL;
int is_data, ext_len = 0;
php_uint32 flags;
zval *ret;
/* a number that is not 0, 1 or 2 (Which is also Greg's birthday, so there) */
long format = 9021976, method = 9021976;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|... | 0 | [
"CWE-416"
] | php-src | b2cf3f064b8f5efef89bb084521b61318c71781b | 184,874,170,436,043,500,000,000,000,000,000,000,000 | 96 | Fixed bug #68901 (use after free) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.