func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline void xfrm_dev_state_delete(struct xfrm_state *x)
{
} | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 284,006,816,277,772,440,000,000,000,000,000,000,000 | 3 | 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... |
term_get_bg_color(char_u *r, char_u *g, char_u *b)
{
if (rbg_status.tr_progress == STATUS_GOT)
{
*r = bg_r;
*g = bg_g;
*b = bg_b;
}
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 221,961,859,956,579,540,000,000,000,000,000,000,000 | 9 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
static bool hugetlbfs_pagecache_present(struct hstate *h,
struct vm_area_struct *vma, unsigned long address)
{
struct address_space *mapping;
pgoff_t idx;
struct page *page;
mapping = vma->vm_file->f_mapping;
idx = vma_hugecache_offset(h, vma, address);
page = find_get_page(mapping, idx);
if (page)
put_pa... | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 92,020,321,091,763,340,000,000,000,000,000,000,000 | 15 | 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... |
bool CWebSession::IsAdmin() const { return IsLoggedIn() && m_pUser->IsAdmin(); } | 0 | [
"CWE-22"
] | znc | a4a5aeeb17d32937d8c7d743dae9a4cc755ce773 | 5,239,729,587,371,487,000,000,000,000,000,000,000 | 1 | 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. |
static int flashcard(struct net_device *dev, aironet_ioctl *comp) {
int z;
/* Only super-user can modify flash */
if (!capable(CAP_NET_ADMIN))
return -EPERM;
switch(comp->command)
{
case AIROFLSHRST:
return cmdreset((struct airo_info *)dev->ml_priv);
case AIROFLSHSTFL:
if (!AIRO_FLASH(dev) &&
(AIR... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 197,309,482,710,388,240,000,000,000,000,000,000,000 | 50 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static ut64 *next_append(ut64 *next, int *nexti, ut64 v) {
ut64 *tmp_next = realloc (next, sizeof (ut64) * (1 + *nexti));
if (!tmp_next) {
return NULL;
}
next = tmp_next;
next[*nexti] = v;
(*nexti)++;
return next;
} | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 230,894,762,087,090,200,000,000,000,000,000,000,000 | 10 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
GF_Err dimm_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_DIMMBox *ptr = (GF_DIMMBox *)s;
ISOM_DECREASE_SIZE(ptr, 8)
ptr->nbBytes = gf_bs_read_u64(bs);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 109,618,128,004,347,600,000,000,000,000,000,000,000 | 7 | fixed #1587 |
inline void WireFormatLite::WriteDoubleNoTag(double value,
io::CodedOutputStream* output) {
output->WriteLittleEndian64(EncodeDouble(value));
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 59,609,432,492,061,070,000,000,000,000,000,000,000 | 4 | Apply patch |
print_addr_act(TSK_FS_FILE * fs_file, TSK_OFF_T a_off, TSK_DADDR_T addr,
char *buf, size_t size, TSK_FS_BLOCK_FLAG_ENUM flags, void *ptr)
{
HFS_PRINT_ADDR *print = (HFS_PRINT_ADDR *) ptr;
if (print->accumulating) {
if (addr == print->startBlock + print->blockCount) {
++print->blockCount... | 0 | [
"CWE-190",
"CWE-284"
] | sleuthkit | 114cd3d0aac8bd1aeaf4b33840feb0163d342d5b | 332,691,061,655,493,430,000,000,000,000,000,000,000 | 24 | hfs: fix keylen check in hfs_cat_traverse()
If key->key_len is 65535, calculating "uint16_t keylen' would
cause an overflow:
uint16_t keylen;
...
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len)
so the code bypasses the sanity check "if (keylen > nodesize)"
which results in crash later:
./too... |
X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(X509_STORE_CTX *ctx)
{
return ctx->get_issuer;
} | 0 | [
"CWE-295"
] | openssl | 2a40b7bc7b94dd7de897a74571e7024f0cf0d63b | 185,862,571,892,655,560,000,000,000,000,000,000,000 | 4 | check_chain_extensions: Do not override error return value by check_curve
The X509_V_FLAG_X509_STRICT flag enables additional security checks of the
certificates present in a certificate chain. It is not set by default.
Starting from OpenSSL version 1.1.1h a check to disallow certificates with
explicitly encoded elli... |
static uint64_t vfswrap_disk_free(vfs_handle_struct *handle, const char *path, bool small_query, uint64_t *bsize,
uint64_t *dfree, uint64_t *dsize)
{
uint64_t result;
result = sys_disk_free(handle->conn, path, small_query, bsize, dfree, dsize);
return result;
} | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 119,699,382,672,790,440,000,000,000,000,000,000,000 | 8 | FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
Otherwise num_volumes and the end marker can return uninitialized data
to the client.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org> |
static char *make_sieve_db(const char *user)
{
static char buf[MAX_MAILBOX_PATH+1];
buf[0] = '.';
buf[1] = '\0';
strlcat(buf, user, sizeof(buf));
strlcat(buf, ".sieve.", sizeof(buf));
return buf;
} | 0 | [
"CWE-269"
] | cyrus-imapd | 673ebd96e2efbb8895d08648983377262f35b3f7 | 148,407,369,138,776,400,000,000,000,000,000,000,000 | 11 | lmtp_sieve: don't create mailbox with admin for sieve autocreate |
static char *get_nextpath(char *path, int *offsetp, int fulllen)
{
int offset = *offsetp;
if (offset >= fulllen)
return NULL;
while (path[offset] != '\0' && offset < fulllen)
offset++;
while (path[offset] == '\0' && offset < fulllen)
offset++;
*offsetp = offset;
return (offset < fulllen) ? &path[offset] ... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 179,293,642,824,748,900,000,000,000,000,000,000,000 | 15 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
dns_zone_getsigvalidityinterval(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->sigvalidityinterval);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 240,685,611,355,497,400,000,000,000,000,000,000,000 | 5 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static void FVMenuFlattenByCMap(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
SplineFont *cidmaster = fv->b.cidmaster;
char *cmapname;
if ( cidmaster==NULL )
return;
cmapname = gwwv_open_filename(_("Find an adobe CMap file..."),NULL... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 170,346,057,555,062,300,000,000,000,000,000,000,000 | 15 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static int timeout_compare(const void *a, const void *b) {
const struct reply_callback *x = a, *y = b;
if (x->timeout_usec != 0 && y->timeout_usec == 0)
return -1;
if (x->timeout_usec == 0 && y->timeout_usec != 0)
return 1;
return CMP(x->timeout_usec, y... | 0 | [
"CWE-416"
] | systemd | 1068447e6954dc6ce52f099ed174c442cb89ed54 | 164,715,012,965,184,230,000,000,000,000,000,000,000 | 11 | sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueu... |
sctp_disposition_t sctp_sf_beat_8_3(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_chunk *reply;
size_t paylen = 0;
if (!sctp_vtag_verify(chunk, asoc))... | 1 | [] | linux-2.6 | 62b08083ec3dbfd7e533c8d230dd1d8191a6e813 | 85,079,861,428,767,100,000,000,000,000,000,000,000 | 37 | [SCTP]: Fix panic's when receiving fragmented SCTP control chunks.
Use pskb_pull() to handle incoming COOKIE_ECHO and HEARTBEAT chunks that
are received as skb's with fragment list.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int exec_mmap(struct mm_struct *mm)
{
struct task_struct *tsk;
struct mm_struct * old_mm, *active_mm;
/* Notify parent that we're no longer interested in the old VM */
tsk = current;
old_mm = current->mm;
sync_mm_rss(old_mm);
mm_release(tsk, old_mm);
if (old_mm) {
/*
* Make sure that if there is a... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 151,112,956,750,857,350,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 void ip4_frag_free(struct inet_frag_queue *q)
{
struct ipq *qp;
qp = container_of(q, struct ipq, q);
if (qp->peer)
inet_putpeer(qp->peer);
} | 0 | [
"CWE-20"
] | linux | 5d407b071dc369c26a38398326ee2be53651cfe4 | 63,477,616,944,498,980,000,000,000,000,000,000,000 | 8 | ip: frags: fix crash in ip_do_fragment()
A kernel crash occurrs when defragmented packet is fragmented
in ip_do_fragment().
In defragment routine, skb_orphan() is called and
skb->ip_defrag_offset is set. but skb->sk and
skb->ip_defrag_offset are same union member. so that
frag->sk is not NULL.
Hence crash occurrs in s... |
medialib_get_interpolation (mlInterp * ml_interp,
PixopsInterpType interp_type,
double scale_x,
double scale_y,
double overall_alpha)
{
mlib_s32 leftPadding, topPadding;
ml_interp->interp_table = NULL;
... | 0 | [] | gdk-pixbuf | ffec86ed5010c5a2be14f47b33bcf4ed3169a199 | 147,441,309,995,550,660,000,000,000,000,000,000,000 | 106 | pixops: Be more careful about integer overflow
Our loader code is supposed to handle out-of-memory and overflow
situations gracefully, reporting errors instead of aborting. But
if you load an image at a specific size, we also execute our
scaling code, which was not careful enough about overflow in some
places.
This c... |
CheckParameters (
IN UINTN SmBusAddress,
IN EFI_SMBUS_OPERATION Operation,
IN OUT UINTN *Length,
IN VOID *Buffer
)
{
EFI_STATUS Status;
UINTN RequiredLen;
EFI_SMBUS_DEVICE_COMMAND Command;
BOOLEAN ... | 0 | [
"CWE-787"
] | edk2 | 322ac05f8bbc1bce066af1dabd1b70ccdbe28891 | 273,774,332,545,257,850,000,000,000,000,000,000,000 | 66 | MdeModulePkg/PiDxeS3BootScriptLib: Fix potential numeric truncation (CVE-2019-14563)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=2001
For S3BootScriptLib APIs:
S3BootScriptSaveIoWrite
S3BootScriptSaveMemWrite
S3BootScriptSavePciCfgWrite
S3BootScriptSavePciCfg2Write
S3BootScriptSaveSmbusExecute
S3BootScriptSav... |
dwg_obj_has_subentity (const Dwg_Object *obj)
{
const unsigned int type = obj->type;
return (obj->supertype == DWG_SUPERTYPE_ENTITY)
&& (type == DWG_TYPE_INSERT || type == DWG_TYPE_MINSERT
|| type == DWG_TYPE_POLYLINE_2D || type == DWG_TYPE_POLYLINE_3D
|| type == DWG_TYPE_POLYLINE... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 63,449,462,027,598,820,000,000,000,000,000,000,000 | 9 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
static inline int pmd_write(pmd_t pmd)
{
BUG();
return 0;
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 109,255,692,273,830,460,000,000,000,000,000,000,000 | 5 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static void qxl_spice_flush_surfaces_async(PCIQXLDevice *qxl)
{
trace_qxl_spice_flush_surfaces_async(qxl->id, qxl->guest_surfaces.count,
qxl->num_free_res);
spice_qxl_flush_surfaces_async(&qxl->ssd.qxl,
(uintptr_t)qxl_cookie_new(QXL_COOKIE_TYPE_IO,
... | 0 | [
"CWE-476"
] | qemu | d52680fc932efb8a2f334cc6993e705ed1e31e99 | 150,883,052,984,309,840,000,000,000,000,000,000,000 | 8 | qxl: check release info object
When releasing spice resources in release_resource() routine,
if release info object 'ext.info' is null, it leads to null
pointer dereference. Add check to avoid it.
Reported-by: Bugs SysSec <bugs-syssec@rub.de>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-id: 20190425... |
void bgp_process_packet(struct thread *thread)
{
/* Yes first of all get peer pointer. */
struct peer *peer; // peer
uint32_t rpkt_quanta_old; // how many packets to read
int fsm_update_result; // return code of bgp_event_update()
int mprc; // message processing return code
peer = THREAD_ARG(thread);
rpkt... | 0 | [
"CWE-125"
] | frr | ff6db1027f8f36df657ff2e5ea167773752537ed | 335,732,248,445,687,600,000,000,000,000,000,000,000 | 160 | bgpd: Make sure hdr length is at a minimum of what is expected
Ensure that if the capability length specified is enough data.
Signed-off-by: Donald Sharp <sharpd@nvidia.com> |
evdns_add_server_port_with_base(struct event_base *base, evutil_socket_t socket, int flags, evdns_request_callback_fn_type cb, void *user_data)
{
struct evdns_server_port *port;
if (flags)
return NULL; /* flags not yet implemented */
if (!(port = mm_malloc(sizeof(struct evdns_server_port))))
return NULL;
memset... | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 159,415,372,543,327,780,000,000,000,000,000,000,000 | 29 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
longlong Item_func_length::val_int()
{
DBUG_ASSERT(fixed == 1);
String *res=args[0]->val_str(&value);
if (!res)
{
null_value=1;
return 0; /* purecov: inspected */
}
null_value=0;
return (longlong) res->length();
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 327,196,095,339,863,070,000,000,000,000,000,000,000 | 12 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static int vxlan_changelink(struct net_device *dev, struct nlattr *tb[],
struct nlattr *data[],
struct netlink_ext_ack *extack)
{
struct vxlan_dev *vxlan = netdev_priv(dev);
struct net_device *lowerdev;
struct vxlan_config conf;
struct vxlan_rdst *dst;
int err;
dst = &vxlan->default_dst;
err = vxl... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 147,607,588,983,559,440,000,000,000,000,000,000,000 | 71 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
static void x509v3_cache_extensions(X509 *x)
{
BASIC_CONSTRAINTS *bs;
PROXY_CERT_INFO_EXTENSION *pci;
ASN1_BIT_STRING *usage;
ASN1_BIT_STRING *ns;
EXTENDED_KEY_USAGE *extusage;
X509_EXTENSION *ex;
int i;
if(x->ex_flags & EXFLAG_SET) return;
#ifndef OPENSSL_NO_SHA
X509_digest(x, EVP_sha1(), x->sha1_hash, NULL... | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 83,820,401,727,996,250,000,000,000,000,000,000,000 | 137 | Backport OCSP fixes. |
virDomainMigrateVersion3Params(virDomainPtr domain,
virConnectPtr dconn,
virTypedParameterPtr params,
int nparams,
unsigned int flags)
{
return virDomainMigrateVersion3Full(domain, dconn, NULL... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 102,889,784,794,879,770,000,000,000,000,000,000,000 | 9 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey)
{
return ASN1_i2d_fp_of(EC_KEY,i2d_ECPrivateKey,fp,eckey);
} | 0 | [
"CWE-310"
] | openssl | 684400ce192dac51df3d3e92b61830a6ef90be3e | 51,561,088,384,513,950,000,000,000,000,000,000,000 | 4 | Fix various certificate fingerprint issues.
By using non-DER or invalid encodings outside the signed portion of a
certificate the fingerprint can be changed without breaking the signature.
Although no details of the signed portion of the certificate can be changed
this can cause problems with some applications: e.g. t... |
void nedmalloc_stats(void) THROWSPEC { nedpmalloc_stats(0); } | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 99,152,633,667,374,540,000,000,000,000,000,000,000 | 1 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
static void FixSignedValues(const Image *image,Quantum *q, int y)
{
while(y-->0)
{
/* Please note that negative values will overflow
Q=8; QuantumRange=255: <0;127> + 127+1 = <128; 255>
<-1;-128> + 127+1 = <0; 127> */
SetPixelRed(image,GetPixelRed(image,q)+QuantumRange/2+1,q);
SetPixe... | 0 | [
"CWE-772"
] | ImageMagick | cdafbc753cf794160eb53b320d4bc0b36ba6ed1d | 149,961,720,975,874,070,000,000,000,000,000,000,000 | 13 | Fix moment when quantum info is acquired to fix issue reported in #469. |
polkit_system_bus_name_finalize (GObject *object)
{
PolkitSystemBusName *system_bus_name = POLKIT_SYSTEM_BUS_NAME (object);
g_free (system_bus_name->name);
if (G_OBJECT_CLASS (polkit_system_bus_name_parent_class)->finalize != NULL)
G_OBJECT_CLASS (polkit_system_bus_name_parent_class)->finalize (object);
} | 0 | [
"CWE-754"
] | polkit | a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81 | 304,494,140,024,941,600,000,000,000,000,000,000,000 | 9 | GHSL-2021-074: authentication bypass vulnerability in polkit
initial values returned if error caught |
static void prep_ifreq(struct ifreq *ifr, const char *ifname)
{
memset(ifr, 0, sizeof(*ifr));
snprintf(ifr->ifr_name, IFNAMSIZ, "%s", ifname);
} | 0 | [] | qemu | 03d7712b4bcd47bfe0fe14ba2fffa87e111fa086 | 146,807,397,056,749,680,000,000,000,000,000,000,000 | 5 | qemu-bridge-helper: restrict interface name to IFNAMSIZ
The network interface name in Linux is defined to be of size
IFNAMSIZ(=16), including the terminating null('\0') byte.
The same is applied to interface names read from 'bridge.conf'
file to form ACL rules. If user supplied '--br=bridge' name
is not restricted to ... |
bool Config::add_notifier(Notifier * n)
{
Vector<Notifier *>::iterator i = notifier_list.begin();
Vector<Notifier *>::iterator end = notifier_list.end();
while (i != end && *i != n)
++i;
if (i != end) {
return false;
} else {
notifier_list.push_back(n);
re... | 0 | [
"CWE-125"
] | aspell | 80fa26c74279fced8d778351cff19d1d8f44fe4e | 170,239,957,391,028,230,000,000,000,000,000,000,000 | 19 | Fix various bugs found by OSS-Fuze. |
struct ldb_val ldb_val_map_local(struct ldb_module *module, void *mem_ctx,
const struct ldb_map_attribute *map, const struct ldb_val *val)
{
if (map && (map->type == LDB_MAP_CONVERT) && (map->u.convert.convert_local)) {
return map->u.convert.convert_local(module, mem_ctx, val);
}
return ldb_val_dup(mem_ctx,... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 220,045,929,421,591,040,000,000,000,000,000,000,000 | 9 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
shutdown_extend(void)
{
#ifndef USING_UCD_SNMP_EXTENSIBLE_MODULE
free(compatability_entries);
compatability_entries = NULL;
#endif
while (ereg_head)
_unregister_extend(ereg_head);
} | 0 | [
"CWE-269"
] | net-snmp | 77f6c60f57dba0aaea5d8ef1dd94bcd0c8e6d205 | 144,804,279,704,115,580,000,000,000,000,000,000,000 | 9 | make the extend mib read-only by default |
static int stbi__psd_info(stbi__context *s, int *x, int *y, int *comp)
{
int channelCount, dummy, depth;
if (!x) x = &dummy;
if (!y) y = &dummy;
if (!comp) comp = &dummy;
if (stbi__get32be(s) != 0x38425053) {
stbi__rewind( s );
return 0;
}
if (stbi__get16be(s) != 1) {
stbi__rew... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 44,630,358,460,349,020,000,000,000,000,000,000,000 | 34 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
g_tls_connection_base_init (GTlsConnectionBase *tls)
{
GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
priv->need_handshake = TRUE;
priv->database_is_unset = TRUE;
priv->is_system_certdb = TRUE;
g_mutex_init (&priv->verify_certificate_mutex);
g_cond_init (&priv->verify_... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 187,256,859,829,129,240,000,000,000,000,000,000,000 | 15 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
const ASN1_ITEM *it,
int tag, int aclass, char opt, ASN1_TLC *ctx)
{
const ASN1_TEMPLATE *tt, *errtt = NULL;
const ASN1_COMPAT_FUNCS *cf;
const ASN1_EXTERN_FUNCS *ef;
const ASN1_AUX *aux... | 1 | [
"CWE-200"
] | openssl | cc598f321fbac9c04da5766243ed55d55948637d | 189,062,300,780,082,000,000,000,000,000,000,000,000 | 346 | Fix leak with ASN.1 combine.
When parsing a combined structure pass a flag to the decode routine
so on error a pointer to the parent structure is not zeroed as
this will leak any additional components in the parent.
This can leak memory in any application parsing PKCS#7 or CMS structures.
CVE-2015-3195.
Thanks to A... |
static void do_deferred_remove(struct work_struct *w)
{
dm_deferred_remove();
} | 0 | [
"CWE-362"
] | linux | b9a41d21dceadf8104812626ef85dc56ee8a60ed | 48,093,286,107,722,000,000,000,000,000,000,000,000 | 4 | dm: fix race between dm_get_from_kobject() and __dm_destroy()
The following BUG_ON was hit when testing repeat creation and removal of
DM devices:
kernel BUG at drivers/md/dm.c:2919!
CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44
Call Trace:
[<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a
... |
static int tg3_rx(struct tg3_napi *tnapi, int budget)
{
struct tg3 *tp = tnapi->tp;
u32 work_mask, rx_std_posted = 0;
u32 std_prod_idx, jmb_prod_idx;
u32 sw_idx = tnapi->rx_rcb_ptr;
u16 hw_idx;
int received;
struct tg3_rx_prodring_set *tpr = &tnapi->prodring;
hw_idx = *(tnapi->rx_rcb_prod_idx);
/*
* We need... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 98,794,570,558,012,880,000,000,000,000,000,000,000 | 205 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
static void b43_dump_keymemory(struct b43_wldev *dev)
{
unsigned int i, index, count, offset, pairwise_keys_start;
u8 mac[ETH_ALEN];
u16 algo;
u32 rcmta0;
u16 rcmta1;
u64 hf;
struct b43_key *key;
if (!b43_debug(dev, B43_DBG_KEYS))
return;
hf = b43_hf_read(dev);
b43dbg(dev->wl, "Hardware key memory dump: ... | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 184,795,546,487,749,450,000,000,000,000,000,000,000 | 58 | b43: stop format string leaking into error msgs
The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with... |
void vrend_renderer_destroy_sub_ctx(struct vrend_context *ctx, int sub_ctx_id)
{
struct vrend_sub_context *sub, *tofree = NULL;
/* never destroy sub context id 0 */
if (sub_ctx_id == 0)
return;
LIST_FOR_EACH_ENTRY(sub, &ctx->sub_ctxs, head) {
if (sub->sub_ctx_id == sub_ctx_id) {
tofre... | 0 | [
"CWE-787"
] | virglrenderer | cbc8d8b75be360236cada63784046688aeb6d921 | 271,322,523,511,801,880,000,000,000,000,000,000,000 | 22 | 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> |
__releases(&idprv->handler_mutex)
{
enum rdma_cm_state state;
unsigned long flags;
trace_cm_id_destroy(id_priv);
/*
* Setting the state to destroyed under the handler mutex provides a
* fence against calling handler callbacks. If this is invoked due to
* the failure of a handler callback then it guarentees... | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 178,756,377,140,107,900,000,000,000,000,000,000,000 | 21 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
static noinline int join_transaction(struct btrfs_fs_info *fs_info,
unsigned int type)
{
struct btrfs_transaction *cur_trans;
spin_lock(&fs_info->trans_lock);
loop:
/* The file system has been taken offline. No new transactions. */
if (test_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state)) {
spin_unlock(&f... | 1 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 300,216,741,349,218,430,000,000,000,000,000,000,000 | 124 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
Item *create_item_ident(THD *thd,
const Lex_ident_cli_st *ca,
const Lex_ident_cli_st *cb,
const Lex_ident_cli_st *cc)
{
Lex_ident_sys b(thd, cb), c(thd, cc);
if (b.is_null() || c.is_null())
return NULL;
if (ca->pos() == ... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 123,395,775,233,771,350,000,000,000,000,000,000,000 | 17 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
unsigned LibRaw:: parse_custom_cameras(unsigned limit, libraw_custom_camera_t table[], char** list)
{
if(!list) return 0;
unsigned index = 0;
for(int i=0; i< limit; i++)
{
if(!list[i]) break;
if(strlen(list[i])<10) continue;
char *string = (char*)malloc(strlen(list[i])+1);
strcpy(string,... | 0 | [
"CWE-787"
] | LibRaw | 8682ad204392b914ab1cc6ebcca9c27c19c1a4b4 | 123,121,501,909,701,300,000,000,000,000,000,000,000 | 44 | 0.18.17 |
ConstraintNameIsUsed(ConstraintCategory conCat, Oid objId,
Oid objNamespace, const char *conname)
{
bool found;
Relation conDesc;
SysScanDesc conscan;
ScanKeyData skey[2];
HeapTuple tup;
conDesc = heap_open(ConstraintRelationId, AccessShareLock);
found = false;
ScanKeyInit(&skey[0],
Anum_pg_constr... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 8,478,240,896,224,146,000,000,000,000,000,000,000 | 47 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
//! Search path of an executable (Windows only).
#if cimg_OS==2
inline bool win_searchpath(const char *const exec_name, char *const res, const unsigned int size_res) {
char *ptr = 0; | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 259,060,970,809,150,150,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int read_n(SSL *s, unsigned int n, unsigned int max,
unsigned int extend)
{
int i,off,newb;
/* if there is stuff still in the buffer from a previous read,
* and there is more than we want, take some. */
if (s->s2->rbuf_left >= (int)n)
{
if (extend)
s->packet_length+=n;
else
{
s->packe... | 0 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 259,667,138,788,164,100,000,000,000,000,000,000,000 | 98 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
common_function(typval_T *argvars, typval_T *rettv, int is_funcref)
{
char_u *s;
char_u *name;
int use_string = FALSE;
partial_T *arg_pt = NULL;
char_u *trans_name = NULL;
if (argvars[0].v_type == VAR_FUNC)
{
/* function(MyFunc, [arg], dict) */
s = argvars[0].vval.v_string;
}
e... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 247,953,424,921,163,920,000,000,000,000,000,000,000 | 196 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static int try_enable_event_buffer(struct smi_info *smi_info)
{
unsigned char msg[3];
unsigned char *resp;
unsigned long resp_len;
int rv = 0;
resp = kmalloc(IPMI_MAX_MSG_LENGTH, GFP_KERNEL);
if (!resp)
return -ENOMEM;
msg[0] = IPMI_NETFN_APP_REQUEST << 2;
msg[1] = ... | 0 | [
"CWE-416"
] | linux | 401e7e88d4ef80188ffa07095ac00456f901b8c4 | 21,820,687,806,615,626,000,000,000,000,000,000,000 | 74 | ipmi_si: fix use-after-free of resource->name
When we excute the following commands, we got oops
rmmod ipmi_si
cat /proc/ioports
[ 1623.482380] Unable to handle kernel paging request at virtual address ffff00000901d478
[ 1623.482382] Mem abort info:
[ 1623.482383] ESR = 0x96000007
[ 1623.482385] Exception class =... |
lyxml_unlink_elem(struct ly_ctx *ctx, struct lyxml_elem *elem, int copy_ns)
{
struct lyxml_elem *parent, *first;
if (!elem) {
return;
}
/* store pointers to important nodes */
parent = elem->parent;
/* unlink from parent */
if (parent) {
if (parent->child == elem) {
... | 0 | [
"CWE-674"
] | libyang | 298b30ea4ebee137226acf9bb38678bd82704582 | 35,527,143,991,800,460,000,000,000,000,000,000,000 | 53 | common FEATURE add a hard limit for recursion
Fixes #1453 |
display_encode_color_device8(gx_device * dev, const gx_color_value cv[])
{
/* palette of 96 colors */
/* 0->63 = 00RRGGBB, 64->95 = 010YYYYY */
gx_color_value r = cv[0];
gx_color_value g = cv[1];
gx_color_value b = cv[2];
gx_color_value k = cv[3]; /* 0 = black */
if ((r == 0) && (g == 0) && ... | 0 | [] | ghostpdl | 1ef5f08f2c2e27efa978f0010669ff22355c385f | 265,805,622,160,342,860,000,000,000,000,000,000,000 | 34 | Fix display device DisplayFormat=16#a0800 (Separation mode) broken by f2cf6829
The ICC profile checking needs to be told that the device supports_devn, so
add a spec_op proc to return true when in separation mode, and add a proc for
fill_rectangle_hl_color so that fillpage will work in Separation mode.
This was fixed... |
SECURITY_STATUS SEC_ENTRY EnumerateSecurityPackagesA(ULONG* pcPackages, PSecPkgInfoA* ppPackageInfo)
{
int index;
size_t size;
UINT32 cPackages;
SecPkgInfoA* pPackageInfo;
cPackages = sizeof(SecPkgInfoA_LIST) / sizeof(*(SecPkgInfoA_LIST));
size = sizeof(SecPkgInfoA) * cPackages;
pPackageInfo = (SecPkgInfoA*) s... | 0 | [
"CWE-476",
"CWE-125"
] | FreeRDP | 0773bb9303d24473fe1185d85a424dfe159aff53 | 32,786,168,091,265,336,000,000,000,000,000,000,000 | 27 | nla: invalidate sec handle after creation
If sec pointer isn't invalidated after creation it is not possible
to check if the upper and lower pointers are valid.
This fixes a segfault in the server part if the client disconnects before
the authentication was finished. |
MagickExport char *GetNextImageProperty(const Image *image)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",
image->filename);
if (image->properties == (void *) NULL)
return... | 0 | [
"CWE-476"
] | ImageMagick6 | 5bf7ff59c8ada957d6a681a0a2cc29f3813ad4bc | 238,490,616,173,260,100,000,000,000,000,000,000,000 | 11 | https://github.com/ImageMagick/ImageMagick/issues/1225 |
detectOptimizationMode (const vector<sliceOptimizationData>& optData)
{
OptimizationMode w;
// need to be compiled with SSE optimisations: if not, just returns false
#ifdef IMF_HAVE_SSE2
// only handle reading 3,4,6 or 8 channels
switch(optData.size())
{
case 3 : break;
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 249,154,997,732,294,600,000,000,000,000,000,000,000 | 69 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
void MkvWriter::Close() {
if (file_ && writer_owns_file_) {
fclose(file_);
}
file_ = NULL;
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 288,678,984,957,491,480,000,000,000,000,000,000,000 | 6 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
virConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains,
unsigned int flags)
{
VIR_DEBUG("conn=%p, domains=%p, flags=%x", conn, domains, flags);
virResetLastError();
if (domains)
*domains = NULL;
virCheckConnectReturn(conn, -1);
... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 123,941,506,573,148,500,000,000,000,000,000,000,000 | 27 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
char *
expand_assignment_string_to_string (string, quoted)
char *string;
int quoted;
{
return (expand_string_to_string_internal (string, quoted, expand_string_assignment)); | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 209,998,887,467,613,300,000,000,000,000,000,000,000 | 6 | Bash-4.4 patch 7 |
static int vfswrap_setxattr(struct vfs_handle_struct *handle, const char *path, const char *name, const void *value, size_t size, int flags)
{
return setxattr(path, name, value, size, flags);
} | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 148,497,900,491,240,300,000,000,000,000,000,000,000 | 4 | FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero
Otherwise num_volumes and the end marker can return uninitialized data
to the client.
Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org> |
static int nodeAcquire(
Rtree *pRtree, /* R-tree structure */
i64 iNode, /* Node number to load */
RtreeNode *pParent, /* Either the parent node or NULL */
RtreeNode **ppNode /* OUT: Acquired node */
){
int rc = SQLITE_OK;
RtreeNode *pNode = 0;
/* Check if the r... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 305,336,959,041,159,100,000,000,000,000,000,000,000 | 114 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
plugin_trim (struct backend *b, struct connection *conn,
uint32_t count, uint64_t offset, uint32_t flags, int *err)
{
int r;
struct backend_plugin *p = container_of (b, struct backend_plugin, backend);
bool fua = flags & NBDKIT_FLAG_FUA;
bool need_flush = false;
assert (connection_get_handle (co... | 0 | [
"CWE-406"
] | nbdkit | a6b88b195a959b17524d1c8353fd425d4891dc5f | 122,056,292,791,900,750,000,000,000,000,000,000,000 | 28 | 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 ... |
lyd_wd_add_leaf(struct lyd_node **tree, struct lyd_node *last_parent, struct lys_node_leaf *leaf, struct unres_data *unres,
int check_when_must)
{
struct lyd_node *dummy = NULL, *current;
struct lys_tpdf *tpdf;
const char *dflt = NULL;
int ret;
/* get know if there is a default valu... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 86,114,030,736,973,890,000,000,000,000,000,000,000 | 88 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
static void ok_png_decode2(ok_png_decoder *decoder) {
ok_png *png = decoder->png;
uint8_t png_header[8];
if (!ok_read(decoder, png_header, sizeof(png_header))) {
return;
}
uint8_t png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
if (memcmp(png_header, png_signature, 8) != 0) {
... | 1 | [
"CWE-787"
] | ok-file-formats | e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e | 88,368,051,304,508,140,000,000,000,000,000,000,000 | 84 | ok_png: Disallow multiple IHDR chunks (#15) |
static xmlEntityPtr SVGGetParameterEntity(void *context,const xmlChar *name)
{
SVGInfo
*svg_info;
/*
Get a parameter entity by name.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule(),
" SAX.getParameterEntity(%s)",name);
svg_info=(SVGInfo *) context;
return(xmlGetParameterEntity(svg_info->... | 0 | [
"CWE-125"
] | ImageMagick6 | a5db4873626f702d2ddd8bc293573493e0a412c0 | 220,522,341,898,073,030,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/1336 |
PHP_FUNCTION(openssl_pkcs7_encrypt)
{
zval ** zrecipcerts, * zheaders = NULL;
STACK_OF(X509) * recipcerts = NULL;
BIO * infile = NULL, * outfile = NULL;
long flags = 0;
PKCS7 * p7 = NULL;
HashPosition hpos;
zval ** zcertval;
X509 * cert;
const EVP_CIPHER *cipher = NULL;
long cipherid = PHP_OPENSSL_CIPHER_DEFA... | 0 | [
"CWE-200"
] | php-src | 270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e | 330,774,570,511,822,980,000,000,000,000,000,000,000 | 139 | Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only |
nfsd4_decode_delegreturn(struct nfsd4_compoundargs *argp, struct nfsd4_delegreturn *dr)
{
return nfsd4_decode_stateid(argp, &dr->dr_stateid);
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 92,142,724,007,523,200,000,000,000,000,000,000,000 | 4 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
static void naldmx_switch_timestamps(GF_NALUDmxCtx *ctx, GF_FilterPacket *pck)
{
//input pid sets some timescale - we flushed pending data , update cts
if (!ctx->notime) {
u64 ts = gf_filter_pck_get_cts(pck);
if (ts != GF_FILTER_NO_TS) {
ctx->prev_cts = ctx->cts;
ctx->cts = ts;
}
ts = gf_filter_pck_get_... | 0 | [
"CWE-476"
] | gpac | b43f9d1a4b4e33d08edaef6d313e6ce4bdf554d3 | 131,299,190,911,526,020,000,000,000,000,000,000,000 | 43 | fixed #2223 |
Field_set(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
uchar null_bit_arg,
enum utype unireg_check_arg, const LEX_CSTRING *field_name_arg,
uint32 packlength_arg,
TYPELIB *typelib_arg, const DTCollation &collation)
:Field_enum(ptr_arg, len_arg, null_ptr_arg, null_bit_arg,
unireg_c... | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 76,111,642,032,740,450,000,000,000,000,000,000,000 | 13 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static bool checkreturn default_extension_decoder(pb_istream_t *stream,
pb_extension_t *extension, uint32_t tag, pb_wire_type_t wire_type)
{
pb_field_iter_t iter;
if (!pb_field_iter_begin_extension(&iter, extension))
PB_RETURN_ERROR(stream, "invalid extension");
if (iter.tag != tag)
re... | 0 | [
"CWE-125"
] | nanopb | 45582f1f97f49e2abfdba1463d1e1027682d9856 | 110,542,054,580,159,230,000,000,000,000,000,000,000 | 14 | Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) |
MATCHER_P(ApplicationProtocolListEq, expected, "") {
const Network::TransportSocketOptionsConstSharedPtr& options = arg;
EXPECT_EQ(options->applicationProtocolListOverride(), std::vector<std::string>{expected});
return true;
} | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 320,807,728,382,310,070,000,000,000,000,000,000,000 | 5 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static void walk_shadow_page_lockless_begin(struct kvm_vcpu *vcpu)
{
if (is_tdp_mmu(vcpu->arch.mmu)) {
kvm_tdp_mmu_walk_lockless_begin();
} else {
/*
* Prevent page table teardown by making any free-er wait during
* kvm_flush_remote_tlbs() IPI to all active vcpus.
*/
local_irq_disable();
/*
* Mak... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 103,349,401,995,109,520,000,000,000,000,000,000,000 | 18 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
static zend_always_inline zend_bool instanceof_class(const zend_class_entry *instance_ce, const zend_class_entry *ce) /* {{{ */
{
do {
if (instance_ce == ce) {
return 1;
}
instance_ce = instance_ce->parent;
} while (instance_ce);
return 0;
} | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 63,774,967,229,896,790,000,000,000,000,000,000,000 | 10 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
ext4_ext_shift_path_extents(struct ext4_ext_path *path, ext4_lblk_t shift,
struct inode *inode, handle_t *handle,
enum SHIFT_DIRECTION SHIFT)
{
int depth, err = 0;
struct ext4_extent *ex_start, *ex_last;
bool update = 0;
depth = path->p_depth;
while (depth >= 0) {
if (depth == path->p_depth) {
... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 312,362,567,426,599,140,000,000,000,000,000,000,000 | 75 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
CopySendChar(CopyState cstate, char c)
{
appendStringInfoCharMacro(cstate->fe_msgbuf, c);
} | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 220,125,137,523,868,420,000,000,000,000,000,000,000 | 4 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
struct yang_data *yang_data_new_empty(const char *xpath)
{
return yang_data_new(xpath, NULL);
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 276,668,094,041,634,100,000,000,000,000,000,000,000 | 4 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
DEFUN (bgp_confederation_identifier,
bgp_confederation_identifier_cmd,
"bgp confederation identifier <1-65535>",
"BGP specific commands\n"
"AS confederation parameters\n"
"AS number\n"
"Set routing domain confederation AS\n")
{
struct bgp *bgp;
as_t as;
bgp = vty->index;... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 265,268,767,227,848,600,000,000,000,000,000,000,000 | 19 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
void * calloc(size_t n, size_t lb)
{
if (lb && n > GC_SIZE_MAX / lb)
return NULL;
# if defined(GC_LINUX_THREADS) /* && !defined(USE_PROC_FOR_LIBRARIES) */
/* libpthread allocated some memory that is only pointed to by */
/* mmapped thread stacks. Make sure it's not collectable. */
... | 1 | [
"CWE-189"
] | bdwgc | 83231d0ab5ed60015797c3d1ad9056295ac3b2bb | 26,537,679,560,672,510,000,000,000,000,000,000,000 | 27 | Speedup calloc size overflow check by preventing division if small values
* malloc.c (GC_SQRT_SIZE_MAX): New macro.
* malloc.c (calloc): Add fast initial size overflow check to avoid
integer division for reasonably small values passed. |
static inline void dev_set_cma_area(struct device *dev, struct cma *cma)
{
if (dev)
dev->cma_area = cma;
} | 0 | [
"CWE-682"
] | linux | 67a2e213e7e937c41c52ab5bc46bf3f4de469f6e | 69,050,837,702,306,120,000,000,000,000,000,000,000 | 5 | mm: cma: fix incorrect type conversion for size during dma allocation
This was found during userspace fuzzing test when a large size dma cma
allocation is made by driver(like ion) through userspace.
show_stack+0x10/0x1c
dump_stack+0x74/0xc8
kasan_report_error+0x2b0/0x408
kasan_report+0x34/0x40
__asan_storeN... |
operator()(Halfedge_handle e) const
{
return this->operator()(e, typename Is_extended_kernel<Extended_kernel>::value_type());
} | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 317,982,212,357,273,820,000,000,000,000,000,000,000 | 4 | Fix Nef_2 and Nef_S2 IO |
const char *mnt_fs_get_bindsrc(struct libmnt_fs *fs)
{
return fs ? fs->bindsrc : NULL;
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 242,304,528,577,273,640,000,000,000,000,000,000,000 | 4 | libmount: remove support for deleted mount table entries
The "(deleted)" suffix has been originally used by kernel for deleted
mountpoints. Since kernel commit 9d4d65748a5ca26ea8650e50ba521295549bf4e3
(Dec 2014) kernel does not use this suffix for mount stuff in /proc at
all. Let's remove this support from libmount to... |
static void cmd_descriptor_init(RCore *core) {
const ut8 *p;
RListIter *iter;
RCmdDescriptor *x, *y;
int n = core->cmd_descriptors->length;
r_list_sort (core->cmd_descriptors, compare_cmd_descriptor_name);
r_list_foreach (core->cmd_descriptors, iter, y) {
if (--n < 0) {
break;
}
x = &core->root_cmd_descr... | 0 | [
"CWE-78"
] | radare2 | dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7 | 200,611,264,936,832,500,000,000,000,000,000,000,000 | 27 | Fix #14990 - multiple quoted command parsing issue ##core
> "?e hello""?e world"
hello
world"
> "?e hello";"?e world"
hello
world |
hwaddr virtio_queue_get_desc_size(VirtIODevice *vdev, int n)
{
return sizeof(VRingDesc) * vdev->vq[n].vring.num;
} | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 124,543,764,471,358,760,000,000,000,000,000,000,000 | 4 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
double Item_func_cos::val_real()
{
DBUG_ASSERT(fixed == 1);
double value= args[0]->val_real();
if ((null_value=args[0]->null_value))
return 0.0;
return cos(value);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 314,106,805,223,781,100,000,000,000,000,000,000,000 | 8 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static int ssl_parse_supported_point_formats_ext( mbedtls_ssl_context *ssl,
const unsigned char *buf,
size_t len )
{
size_t list_size;
const unsigned char *p;
list_size = buf[0];
if( list_size + 1 != len... | 0 | [
"CWE-119",
"CWE-125",
"CWE-295"
] | mbedtls | a1098f81c252b317ad34ea978aea2bc47760b215 | 327,768,072,237,194,450,000,000,000,000,000,000,000 | 41 | Add bounds check before signature length read |
g_socket_client_connected_callback (GObject *source,
GAsyncResult *result,
gpointer user_data)
{
ConnectionAttempt *attempt = user_data;
GSocketClientAsyncConnectData *data = attempt->data;
GSList *l;
GError *error = NULL;
GProxy *proxy;
const gchar *protocol;
if (g_cancellable_... | 0 | [
"CWE-754"
] | glib | d553d92d6e9f53cbe5a34166fcb919ba652c6a8e | 329,090,302,882,137,840,000,000,000,000,000,000,000 | 113 | gsocketclient: Fix criticals
This ensures the parent GTask is kept alive as long as an enumeration
is running and trying to connect.
Closes #1646
Closes #1649 |
void BitTestMatchExpression::serialize(BSONObjBuilder* out) const {
std::string opString = "";
switch (matchType()) {
case BITS_ALL_SET:
opString = "$bitsAllSet";
break;
case BITS_ALL_CLEAR:
opString = "$bitsAllClear";
break;
case BITS_ANY... | 0 | [] | mongo | b0ef26c639112b50648a02d969298650fbd402a4 | 271,577,719,117,557,540,000,000,000,000,000,000,000 | 28 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
mt76_dma_rx_process(struct mt76_dev *dev, struct mt76_queue *q, int budget)
{
int len, data_len, done = 0;
struct sk_buff *skb;
unsigned char *data;
bool more;
while (done < budget) {
u32 info;
data = mt76_dma_dequeue(dev, q, false, &len, &info, &more);
if (!data)
break;
if (q->rx_head)
data_len =... | 0 | [
"CWE-120",
"CWE-787"
] | linux | b102f0c522cf668c8382c56a4f771b37d011cda2 | 254,830,865,742,758,670,000,000,000,000,000,000,000 | 58 | mt76: fix array overflow on receiving too many fragments for a packet
If the hardware receives an oversized packet with too many rx fragments,
skb_shinfo(skb)->frags can overflow and corrupt memory of adjacent pages.
This becomes especially visible if it corrupts the freelist pointer of
a slab page.
Cc: stable@vger.k... |
dwg_next_entity (const Dwg_Object *restrict obj)
{
Dwg_Object_Ref *restrict next;
if (obj == NULL ||
obj->parent == NULL ||
obj->supertype != DWG_SUPERTYPE_ENTITY)
return NULL;
if (obj->parent->header.version < R_2004)
{
if (!obj->tio.entity) // decoding error
goto next_obj;
... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 177,910,151,144,253,650,000,000,000,000,000,000,000 | 29 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
idr_set_num(unsigned char *p, int num)
{
static const char xdig[] = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'
};
num %= sizeof(xdig) * sizeof(xdig) * sizeof(xdig);
p[0]... | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 237,241,385,995,230,940,000,000,000,000,000,000,000 | 16 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
BOOL nego_transport_disconnect(rdpNego* nego)
{
if (nego->TcpConnected)
transport_disconnect(nego->transport);
nego->TcpConnected = FALSE;
nego->SecurityConnected = FALSE;
return TRUE;
} | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 165,579,967,075,303,220,000,000,000,000,000,000,000 | 9 | Fixed oob read in irp_write and similar |
if(pThis->qType != QUEUETYPE_DIRECT && pThis->pWtpReg != NULL) {
wtpDestruct(&pThis->pWtpReg);
} | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 222,249,243,453,218,830,000,000,000,000,000,000,000 | 3 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
static Bool check_task_list_enum(void *udta, void *item)
{
assert(udta != item);
return GF_FALSE;
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 314,317,817,406,851,000,000,000,000,000,000,000,000 | 5 | fixed crashes for very long path - cf #1908 |
UdfOpenVolume (
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,
OUT EFI_FILE_PROTOCOL **Root
)
{
EFI_TPL OldTpl;
EFI_STATUS Status;
PRIVATE_UDF_SIMPLE_FS_DATA *PrivFsData;
PRIVATE_UDF_FILE_DATA *PrivFileData;
OldTpl = gBS->RaiseTPL (TPL... | 0 | [] | edk2 | b9ae1705adfdd43668027a25a2b03c2e81960219 | 331,402,673,051,834,800,000,000,000,000,000,000,000 | 83 | MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828
The commit refines the boundary checks for file/path name string to
prevent possible buffer overrun.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: ... |
QPDFWriter::setLinearizationPass1Filename(std::string const& filename)
{
this->m->lin_pass1_filename = filename;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 143,249,937,762,287,860,000,000,000,000,000,000,000 | 4 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
unsigned int bit = 0;
VP8_BD_VALUE value;
unsigned int split;
VP8_BD_VALUE bigsplit;
int count;
unsigned int range;
split = 1 + (((br->range - 1) * probability) >> 8);
if (br->count < 0) vp8dx_bool_decoder_fill(br);
value = br->value... | 1 | [
"CWE-125"
] | libvpx | 46e17f0cb4a80b36755c84b8bf15731d3386c08f | 38,898,817,773,430,432,000,000,000,000,000,000,000 | 37 | Fix OOB memory access on fuzzed data
vp8_norm table has 256 elements while index to it can be higher on
fuzzed data. Typecasting it to unsigned char will ensure valid range and
will trigger proper error later. Also declaring "shift" as unsigned char to
avoid UB sanitizer warning
BUG=b/122373286,b/122373822,b/12237111... |
RGWOp *RGWHandler_REST_Service_S3::op_get()
{
if (is_usage_op()) {
return new RGWGetUsage_ObjStore_S3;
} else {
return new RGWListBuckets_ObjStore_S3;
}
} | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 26,139,775,947,802,990,000,000,000,000,000,000,000 | 8 | 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) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.