func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void account_freq_event_nohz(void)
{
#ifdef CONFIG_NO_HZ_FULL
/* Lock so we don't race with concurrent unaccount */
spin_lock(&nr_freq_lock);
if (atomic_inc_return(&nr_freq_events) == 1)
tick_nohz_dep_set(TICK_DEP_BIT_PERF_EVENTS);
spin_unlock(&nr_freq_lock);
#endif
} | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 210,151,940,115,681,140,000,000,000,000,000,000,000 | 10 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
set_optimize_map(regex_t* reg, OptMap* m)
{
int i;
for (i = 0; i < CHAR_MAP_SIZE; i++)
reg->map[i] = m->map[i];
reg->optimize = OPTIMIZE_MAP;
reg->dist_min = m->mm.min;
reg->dist_max = m->mm.max;
if (reg->dist_min != INFINITE_LEN) {
reg->threshold_len = reg->dist_min + ONIGENC_MBC_MINLEN(re... | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 289,785,810,940,345,100,000,000,000,000,000,000,000 | 15 | #207: Out-of-bounds write |
static void SFDDumpUTF7Str(FILE *sfd, const char *_str) {
int ch, prev_cnt=0, prev=0, in=0;
const unsigned char *str = (const unsigned char *) _str;
putc('"',sfd);
if ( str!=NULL ) while ( (ch = *str++)!='\0' ) {
/* Convert from utf8 to ucs4 */
if ( ch<=127 )
/* Done */;
else if ( ch<=0xdf && *... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 46,126,844,843,200,580,000,000,000,000,000,000,000 | 69 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
DwaCompressor::classifyChannels
(ChannelList channels,
std::vector<ChannelData> &chanData,
std::vector<CscChannelSet> &cscData)
{
//
// prefixMap used to map channel name prefixes to
// potential CSC-able sets of channels.
//
std::map<std::string, DwaCompressor::CscChannelSet> prefix... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 211,891,532,597,349,630,000,000,000,000,000,000,000 | 136 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
struct dst_entry *__sk_dst_check(struct sock *sk, u32 cookie)
{
struct dst_entry *dst = __sk_dst_get(sk);
if (dst && dst->obsolete &&
INDIRECT_CALL_INET(dst->ops->check, ip6_dst_check, ipv4_dst_check,
dst, cookie) == NULL) {
sk_tx_queue_clear(sk);
sk->sk_dst_pending_confirm = 0;
RCU_INIT_POINTER... | 0 | [] | net | 35306eb23814444bd4021f8a1c3047d3cb0c8b2b | 202,601,815,597,619,200,000,000,000,000,000,000,000 | 16 | af_unix: fix races in sk_peer_pid and sk_peer_cred accesses
Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations
are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred.
In order to fix this issue, this patch adds a new spinlock that needs
to be used whenever these fields are read o... |
QPDFWriter::unparseObject(QPDFObjectHandle object, int level,
unsigned int flags, size_t stream_length,
bool compress)
{
QPDFObjGen old_og = object.getObjGen();
unsigned int child_flags = flags & ~f_stream;
std::string indent;
for (int i = 0; i < level; ++i)
{
indent... | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 8249a26d69f72b9cda584c14cc3f12769985e481 | 210,842,072,364,316,200,000,000,000,000,000,000,000 | 420 | Fix infinite loop in QPDFWriter (fixes #143) |
main(int argc, char *argv[])
{
raptor_world *world;
const char *program = raptor_basename(argv[0]);
raptor_iostream *iostr;
raptor_namespace_stack *nstack;
raptor_namespace* foo_ns;
raptor_xml_writer* xml_writer;
raptor_uri* base_uri;
raptor_qname* el_name;
raptor_xml_element *element;
unsigned lon... | 0 | [
"CWE-787"
] | raptor | 590681e546cd9aa18d57dc2ea1858cb734a3863f | 70,769,256,692,307,670,000,000,000,000,000,000,000 | 133 | Calcualte max nspace declarations correctly for XML writer
(raptor_xml_writer_start_element_common): Calculate max including for
each attribute a potential name and value.
Fixes Issues #0000617 http://bugs.librdf.org/mantis/view.php?id=617
and #0000618 http://bugs.librdf.org/mantis/view.php?id=618 |
static int vfswrap_chflags(vfs_handle_struct *handle, const char *path,
unsigned int flags)
{
#ifdef HAVE_CHFLAGS
return chflags(path, flags);
#else
errno = ENOSYS;
return -1;
#endif
} | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 86,785,720,127,751,120,000,000,000,000,000,000,000 | 10 | 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> |
// Conversion functions to get more precision when trying to store unsigned ints values as floats.
inline unsigned int float2uint(const float f) {
int tmp = 0;
std::memcpy(&tmp,&f,sizeof(float));
if (tmp>=0) return (unsigned int)f;
unsigned int u;
// use memcpy instead of assignmen... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 83,137,575,468,586,130,000,000,000,000,000,000,000 | 9 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline void tcp_check_probe_timer(struct sock *sk)
{
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
if (!tp->packets_out && !icsk->icsk_pending)
inet_csk_reset_xmit_timer(sk, ICSK_TIME_PROBE0,
icsk->icsk_rto, TCP_RTO_MAX);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 307,720,423,562,950,660,000,000,000,000,000,000,000 | 9 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
NeXTDecode(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
{
static const char module[] = "NeXTDecode";
unsigned char *bp, *op;
tmsize_t cc;
uint8* row;
tmsize_t scanline, n;
(void) s;
/*
* Each scanline is assumed to start off as all
* white (we assume a PhotometricInterpretation
* of ``min-is-black'').
... | 1 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | libtiff | b18012dae552f85dcc5c57d3bf4e997a15b1cc1c | 183,141,182,822,525,500,000,000,000,000,000,000,000 | 96 | * libtiff/tif_next.c: fix potential out-of-bound write in NeXTDecode()
triggered by http://lcamtuf.coredump.cx/afl/vulns/libtiff5.tif
(bugzilla #2508) |
bgp_decode_next_hop_none(struct bgp_parse_state *s UNUSED, byte *data UNUSED, uint len UNUSED, rta *a UNUSED)
{
/*
* Although we expect no next hop and RFC 7606 7.11 states that attribute
* MP_REACH_NLRI with unexpected next hop length is considered malformed,
* FlowSpec RFC 5575 4 states that next hop shall... | 0 | [
"CWE-787"
] | bird | 8388f5a7e14108a1458fea35bfbb5a453e2c563c | 15,986,065,004,924,738,000,000,000,000,000,000,000 | 10 | BGP: Fix bugs in handling of shutdown messages
There is an improper check for valid message size, which may lead to
stack overflow and buffer leaks to log when a large message is received.
Thanks to Daniel McCarney for bugreport and analysis. |
static inline void cpu_physical_memory_write_rom_internal(AddressSpace *as,
hwaddr addr, const uint8_t *buf, int len, enum write_rom_type type)
{
hwaddr l;
uint8_t *ptr;
hwaddr addr1;
MemoryRegion *mr;
rcu_read_lock();
while (len > 0) {
l = len;
mr = address_space_translate(... | 0 | [] | qemu | b242e0e0e2969c044a318e56f7988bbd84de1f63 | 133,797,306,720,791,500,000,000,000,000,000,000,000 | 36 | exec: skip MMIO regions correctly in cpu_physical_memory_write_rom_internal
Loading the BIOS in the mac99 machine is interesting, because there is a
PROM in the middle of the BIOS region (from 16K to 32K). Before memory
region accesses were clamped, when QEMU was asked to load a BIOS from
0xfff00000 to 0xffffffff it ... |
template<typename tc>
CImg<T>& draw_triangle(const int x0, const int y0, const float z0,
const int x1, const int y1, const float z1,
const int x2, const int y2, const float z2,
const CImg<tc>& texture,
co... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 120,316,111,301,270,000,000,000,000,000,000,000,000 | 110 | Fix other issues in 'CImg<T>::load_bmp()'. |
const EC_Group_Data& EC_Group::data() const
{
if(m_data == nullptr)
throw Invalid_State("EC_Group uninitialized");
return *m_data;
} | 0 | [
"CWE-200"
] | botan | 48fc8df51d99f9d8ba251219367b3d629cc848e3 | 112,061,051,318,983,100,000,000,000,000,000,000,000 | 6 | Address DSA/ECDSA side channel |
static void rdp_write_capability_set_header(wStream* s, UINT16 length, UINT16 type)
{
Stream_Write_UINT16(s, type); /* capabilitySetType */
Stream_Write_UINT16(s, length); /* lengthCapability */
} | 0 | [
"CWE-119",
"CWE-125"
] | FreeRDP | 3627aaf7d289315b614a584afb388f04abfb5bbf | 148,469,441,589,550,210,000,000,000,000,000,000,000 | 5 | Fixed #6011: Bounds check in rdp_read_font_capability_set |
int listenToPort(int port, int *fds, int *count) {
int j;
/* Force binding of 0.0.0.0 if no bind address is specified, always
* entering the loop if j == 0. */
if (server.bindaddr_count == 0) server.bindaddr[0] = NULL;
for (j = 0; j < server.bindaddr_count || j == 0; j++) {
if (server.bind... | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 289,760,200,251,196,240,000,000,000,000,000,000,000 | 63 | Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675)
This change sets a low limit for multibulk and bulk length in the
protocol for unauthenticated connections, so that they can't easily
cause redis to allocate massive amounts of memory by sending just a few
characters on the network.
T... |
static bool svm_xsaves_supported(void)
{
return boot_cpu_has(X86_FEATURE_XSAVES);
} | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 1,648,131,399,628,303,000,000,000,000,000,000,000 | 4 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
static enum enum_field_types mysql_to_perl_type(enum enum_field_types type)
{
static enum enum_field_types enum_type;
switch (type) {
case MYSQL_TYPE_DOUBLE:
case MYSQL_TYPE_FLOAT:
enum_type= MYSQL_TYPE_DOUBLE;
break;
case MYSQL_TYPE_SHORT:
case MYSQL_TYPE_TINY:
case MYSQL_TYPE_LONG:
case MYSQ... | 0 | [
"CWE-416"
] | DBD-mysql | 3619c170461a3107a258d1fd2d00ed4832adb1b1 | 129,323,642,798,700,150,000,000,000,000,000,000,000 | 65 | Fix use-after-free for repeated fetchrow_arrayref calls when mysql_server_prepare=1
Function dbd_st_fetch() via Renew() can reallocate output buffer for
mysql_stmt_fetch() call. But it does not update pointer to that buffer in
imp_sth->stmt structure initialized by mysql_stmt_bind_result() function.
That leads to use-... |
int PDFDoc::saveAs(OutStream *outStr, PDFWriteMode mode) {
if (file && file->modificationTimeChangedSinceOpen())
return errFileChangedSinceOpen;
if (!xref->isModified() && mode == writeStandard) {
// simply copy the original file
saveWithoutChangesAs (outStr);
} else if (mode == writeForceRewrite) {
... | 0 | [
"CWE-20"
] | poppler | 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f | 58,565,954,864,365,360,000,000,000,000,000,000,000 | 15 | PDFDoc::setup: Fix return value
At that point xref can have gone wrong since extractPDFSubtype() can
have caused a reconstruct that broke stuff so instead of unconditionally
returning true, return xref->isOk()
Fixes #706 |
QPDF::trim_user_password(std::string& user_password)
{
// Although unnecessary, this routine trims the padding string
// from the end of a user password. Its only purpose is for
// recovery of user passwords which is done in the test suite.
char const* cstr = user_password.c_str();
size_t len = use... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 295,623,910,096,802,200,000,000,000,000,000,000,000 | 28 | 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 ... |
GF_Err totl_Size(GF_Box *s)
{
s->size += 4;
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 82,075,933,230,790,970,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
static void DrawRoundLinecap(Image *image,const DrawInfo *draw_info,
const PrimitiveInfo *primitive_info,ExceptionInfo *exception)
{
PrimitiveInfo
linecap[5];
register ssize_t
i;
for (i=0; i < 4; i++)
linecap[i]=(*primitive_info);
linecap[0].coordinates=4;
linecap[1].point.x+=(double) (10.0*Ma... | 0 | [
"CWE-399",
"CWE-119"
] | ImageMagick | 726812fa2fa7ce16bcf58f6e115f65427a1c0950 | 184,464,042,103,492,800,000,000,000,000,000,000,000 | 19 | Prevent buffer overflow in magick/draw.c |
xmlSchemaCustomErr4(xmlSchemaAbstractCtxtPtr actxt,
xmlParserErrors error,
xmlNodePtr node,
xmlSchemaBasicItemPtr item,
const char *message,
const xmlChar *str1, const xmlChar *str2,
const xmlChar *str3, const xmlChar *str4)
{
xmlChar *msg = NULL;
if ((node == NULL) && (item != NU... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 301,662,674,081,021,780,000,000,000,000,000,000,000 | 23 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
get_entry(const void *base, unsigned int offset)
{
return (struct arpt_entry *)(base + offset);
} | 0 | [
"CWE-200"
] | linux-2.6 | 42eab94fff18cb1091d3501cd284d6bd6cc9c143 | 198,770,011,381,485,500,000,000,000,000,000,000,000 | 4 | netfilter: arp_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
i... |
PHP_METHOD(Phar, decompressFiles)
{
char *error;
PHAR_ARCHIVE_OBJECT();
if (zend_parse_parameters_none() == FAILURE) {
return;
}
if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC,
"Phar is readonly, cannot change compression");
... | 0 | [
"CWE-416"
] | php-src | b2cf3f064b8f5efef89bb084521b61318c71781b | 60,765,794,184,219,590,000,000,000,000,000,000,000 | 41 | Fixed bug #68901 (use after free) |
u64 gf_bs_get_position(GF_BitStream *bs)
{
if (bs->cache_write)
return bs->position + bs->buffer_written;
return bs->position;
} | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 184,026,614,772,349,100,000,000,000,000,000,000,000 | 6 | fixed #2165 |
static int tcp_disordered_ack(const struct sock *sk, const struct sk_buff *skb)
{
const struct tcp_sock *tp = tcp_sk(sk);
const struct tcphdr *th = tcp_hdr(skb);
u32 seq = TCP_SKB_CB(skb)->seq;
u32 ack = TCP_SKB_CB(skb)->ack_seq;
return (/* 1. Pure ACK with correct sequence number. */
(th->ack && seq == TCP_SKB... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 43,303,205,115,526,990,000,000,000,000,000,000,000 | 19 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
*/
static int rps_ipi_queued(struct softnet_data *sd)
{
#ifdef CONFIG_RPS
struct softnet_data *mysd = this_cpu_ptr(&softnet_data);
if (sd != mysd) {
sd->rps_ipi_next = mysd->rps_ipi_list;
mysd->rps_ipi_list = sd;
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
return 1;
}
#endif /* CONFIG_RPS */
return 0; | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 70,144,201,391,925,200,000,000,000,000,000,000,000 | 15 | 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... |
char *SSL_get_shared_ciphers(const SSL *s,char *buf,int len)
{
char *p;
STACK_OF(SSL_CIPHER) *sk;
SSL_CIPHER *c;
int i;
if ((s->session == NULL) || (s->session->ciphers == NULL) ||
(len < 2))
return(NULL);
p=buf;
sk=s->session->ciphers;
if (sk_SSL_CIPHER_num(sk) == 0)
return NULL;
for (i=0; i<sk_SSL... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 241,278,646,458,434,460,000,000,000,000,000,000,000 | 38 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static int asf_read_frame_header(AVFormatContext *s, AVIOContext *pb)
{
ASFContext *asf = s->priv_data;
ASFStream *asfst;
int rsize = 1;
int num = avio_r8(pb);
int i;
int64_t ts0, ts1 av_unused;
asf->packet_segments--;
asf->packet_key_frame = num >> 7;
asf->stream_inde... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | FFmpeg | afc9c683ed9db01edb357bc8c19edad4282b3a97 | 35,968,249,595,236,520,000,000,000,000,000,000,000 | 119 | avformat/asfdec: Fix DoS in asf_build_simple_index()
Fixes: Missing EOF check in loop
No testcase
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
static int cdrom_ioctl_get_capability(struct cdrom_device_info *cdi)
{
cd_dbg(CD_DO_IOCTL, "entering CDROM_GET_CAPABILITY\n");
return (cdi->ops->capability & ~cdi->mask);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 9de4ee40547fd315d4a0ed1dd15a2fa3559ad707 | 152,767,647,467,609,240,000,000,000,000,000,000,000 | 5 | cdrom: information leak in cdrom_ioctl_media_changed()
This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned
long. The way the check is written now, if one of the high 32 bits is
set then we could read outside the info->slots[] array.
This bug is pretty old and it predates git.
Reviewed-by: Christ... |
void kvm_register_irq_ack_notifier(struct kvm *kvm,
struct kvm_irq_ack_notifier *kian)
{
mutex_lock(&kvm->irq_lock);
hlist_add_head_rcu(&kian->link, &kvm->irq_ack_notifier_list);
mutex_unlock(&kvm->irq_lock);
kvm_arch_post_irq_ack_notifier_list_update(kvm);
} | 0 | [
"CWE-20",
"CWE-617"
] | linux | 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 | 169,477,072,732,534,720,000,000,000,000,000,000,000 | 8 | KVM: Don't accept obviously wrong gsi values via KVM_IRQFD
We cannot add routes for gsi values >= KVM_MAX_IRQ_ROUTES -- see
kvm_set_irq_routing(). Hence, there is no sense in accepting them
via KVM_IRQFD. Prevent them from entering the system in the first
place.
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Si... |
void* Type_Measurement_Dup(struct _cms_typehandler_struct* self, const void *Ptr, cmsUInt32Number n)
{
return _cmsDupMem(self ->ContextID, Ptr, sizeof(cmsICCMeasurementConditions));
cmsUNUSED_PARAMETER(n);
} | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 19,999,923,892,375,160,000,000,000,000,000,000,000 | 6 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
PHPAPI int php_session_flush(int write) /* {{{ */
{
if (PS(session_status) == php_session_active) {
php_session_save_current_state(write);
PS(session_status) = php_session_none;
return SUCCESS;
}
return FAILURE;
} | 0 | [
"CWE-476"
] | php-src | d76f7c6c636b8240e06a1fa29eebb98ad005008a | 298,173,858,799,454,950,000,000,000,000,000,000,000 | 9 | Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress |
void NumberFormatTest::TestCompatibleCurrencies() {
/*
static const UChar JPY[] = {0x4A, 0x50, 0x59, 0};
static const UChar CNY[] = {0x43, 0x4E, 0x59, 0};
UErrorCode status = U_ZERO_ERROR;
LocalPointer<NumberFormat> fmt(
NumberFormat::createCurrencyInstance(Locale::getUS(), status));
if (U_F... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 61,719,453,127,635,060,000,000,000,000,000,000,000 | 37 | ICU-20246 Fixing another integer overflow in number parsing. |
/* }}} */
static void set_timezone_from_timelib_time(php_timezone_obj *tzobj, timelib_time *t)
{
tzobj->initialized = 1;
tzobj->type = t->zone_type;
switch (t->zone_type) {
case TIMELIB_ZONETYPE_ID:
tzobj->tzi.tz = t->tz_info;
break;
... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 97,141,091,528,242,140,000,000,000,000,000,000,000 | 18 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
QPDF::makeIndirectObject(QPDFObjectHandle oh)
{
int max_objid = toI(getObjectCount());
QPDFObjGen next(max_objid + 1, 0);
this->m->obj_cache[next] =
ObjCache(QPDFObjectHandle::ObjAccessor::getObject(oh), -1, -1);
return QPDFObjectHandle::Factory::newIndirect(
this, next.getObj(), next.getGen())... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 156,309,638,607,159,820,000,000,000,000,000,000,000 | 9 | 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 ... |
c_find_fdom(int y, int m, double sg, int *rjd, int *ns)
{
int d, rm, rd;
for (d = 1; d < 31; d++)
if (c_valid_civil_p(y, m, d, sg, &rm, &rd, rjd, ns))
return 1;
return 0;
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 265,796,153,526,038,970,000,000,000,000,000,000,000 | 9 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
jas_stream_t *jas_stream_memopen(char *buf, int bufsize)
{
jas_stream_t *stream;
jas_stream_memobj_t *obj;
JAS_DBGLOG(100, ("jas_stream_memopen(%p, %d)\n", buf, bufsize));
if (!(stream = jas_stream_create())) {
return 0;
}
/* A stream associated with a memory buffer is always opened
for both reading and wri... | 1 | [
"CWE-415",
"CWE-190",
"CWE-369"
] | jasper | 634ce8e8a5accc0fa05dd2c20d42b4749d4b2735 | 306,735,928,812,097,100,000,000,000,000,000,000,000 | 68 | Made some changes to the I/O stream library for memory streams.
There were a number of potential problems due to the possibility
of integer overflow.
Changed some integral types to the larger types size_t or ssize_t.
For example, the function mem_resize now takes the buffer size parameter
as a size_t.
Added a new funct... |
static int uio_get_minor(struct uio_device *idev)
{
int retval = -ENOMEM;
mutex_lock(&minor_lock);
retval = idr_alloc(&uio_idr, idev, 0, UIO_MAX_DEVICES, GFP_KERNEL);
if (retval >= 0) {
idev->minor = retval;
retval = 0;
} else if (retval == -ENOSPC) {
dev_err(idev->dev, "too many uio devices\n");
retval =... | 0 | [
"CWE-119",
"CWE-189",
"CWE-703"
] | linux | 7314e613d5ff9f0934f7a0f74ed7973b903315d1 | 336,809,936,319,875,670,000,000,000,000,000,000,000 | 16 | Fix a few incorrectly checked [io_]remap_pfn_range() calls
Nico Golde reports a few straggling uses of [io_]remap_pfn_range() that
really should use the vm_iomap_memory() helper. This trivially converts
two of them to the helper, and comments about why the third one really
needs to continue to use remap_pfn_range(), ... |
cssp_gss_wrap(gss_ctx_id_t * ctx, STREAM in, STREAM out)
{
int conf_state;
OM_uint32 major_status;
OM_uint32 minor_status;
gss_buffer_desc inbuf, outbuf;
inbuf.value = in->data;
inbuf.length = s_length(in);
major_status = gss_wrap(&minor_status, ctx, True,
GSS_C_QOP_DEFAULT, &inbuf, &conf_state, &outbuf);
... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 49,016,879,230,464,370,000,000,000,000,000,000,000 | 36 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
reallocarray (void *ptr,
size_t nmemb,
size_t size)
{
assert (nmemb > 0 && size > 0);
if (SIZE_MAX / nmemb < size) {
errno = ENOMEM;
return NULL;
}
return realloc (ptr, nmemb * size);
} | 1 | [
"CWE-190"
] | p11-kit | bd670b1d4984b27d6a397b9ddafaf89ab26e4e7f | 192,057,256,293,066,200,000,000,000,000,000,000,000 | 11 | Follow-up to arithmetic overflow fix
Check if nmemb is zero in p11_rpc_message_alloc_extra_array to avoid a
division by zero trap. Additionally, change the reallocarray
compatibility shim so that it won't assert when resizing an array to
zero, and add the same nmemb != 0 check there. |
static int checkout_conflict_add(
checkout_data *data,
const git_index_entry *conflict)
{
int error = git_index_remove(data->index, conflict->path, 0);
if (error == GIT_ENOTFOUND)
git_error_clear();
else if (error < 0)
return error;
return git_index_add(data->index, conflict);
} | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 64c612cc3e25eff5fb02c59ef5a66ba7a14751e4 | 148,255,736,921,338,720,000,000,000,000,000,000,000 | 13 | Protect against 8.3 "short name" attacks also on Linux/macOS
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).
... |
dns_zone_getqueryonacl(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->queryon_acl);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 147,212,925,131,078,330,000,000,000,000,000,000,000 | 6 | 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 __update_open_stateid(struct nfs4_state *state, nfs4_stateid *open_stateid, const nfs4_stateid *deleg_stateid, int open_flags)
{
/*
* Protect the call to nfs4_state_set_mode_locked and
* serialise the stateid update
*/
write_seqlock(&state->seqlock);
if (deleg_stateid != NULL) {
memcpy(state->sta... | 1 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 40,078,366,391,014,717,000,000,000,000,000,000,000 | 18 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
horAcc32(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
uint32* wp = (uint32*) cp0;
tmsize_t wc = cc / 4;
if((cc%(4*stride))!=0)
{
TIFFErrorExt(tif->tif_clientdata, "horAcc32",
"%s", "cc%(4*stride))!=0");
return 0;
}
if (wc > s... | 0 | [
"CWE-119",
"CWE-787"
] | libtiff | 3ca657a8793dd011bf869695d72ad31c779c3cc1 | 245,609,143,376,785,630,000,000,000,000,000,000,000 | 22 | * libtiff/tif_predict.h, libtiff/tif_predict.c:
Replace assertions by runtime checks to avoid assertions in debug mode,
or buffer overflows in release mode. Can happen when dealing with
unusual tile size like YCbCr with subsampling. Reported as MSVR 35105
by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities &... |
static void debugadd_channel_cb(const char *buf, void *private_data)
{
struct debug_channel_level *dcl =
(struct debug_channel_level *)private_data;
DEBUGADDC(dcl->channel, dcl->level,("%s", buf));
} | 0 | [] | samba | 8eae8d28bce2c3f6a323d3dc48ed10c2e6bb1ba5 | 320,233,703,361,658,500,000,000,000,000,000,000,000 | 7 | CVE-2013-4476: lib-util: add file_check_permissions()
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org> |
static int decode_layoutreturn(struct xdr_stream *xdr,
struct nfs4_layoutreturn_res *res)
{
__be32 *p;
int status;
status = decode_op_hdr(xdr, OP_LAYOUTRETURN);
if (status)
return status;
p = xdr_inline_decode(xdr, 4);
if (unlikely(!p))
return -EIO;
res->lrs_present = be32_to_cpup(p);
if (res->lr... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 103,642,007,862,060,430,000,000,000,000,000,000,000 | 19 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static int brcmf_psm_watchdog_notify(struct brcmf_if *ifp,
const struct brcmf_event_msg *evtmsg,
void *data)
{
int err;
brcmf_dbg(TRACE, "enter: bsscfgidx=%d\n", ifp->bsscfgidx);
brcmf_err("PSM's watchdog has fired!\n");
err = brcmf_debug_create_memdump(ifp->drvr->bus_if, data,
evtmsg->da... | 0 | [
"CWE-20"
] | linux | a4176ec356c73a46c07c181c6d04039fafa34a9f | 113,242,085,137,473,400,000,000,000,000,000,000,000 | 17 | brcmfmac: add subtype check for event handling in data path
For USB there is no separate channel being used to pass events
from firmware to the host driver and as such are passed over the
data path. In order to detect mock event messages an additional
check is needed on event subtype. This check is added conditionally... |
void nntp_delete_group_cache(struct NntpData *nntp_data)
{
if (!nntp_data || !nntp_data->nserv || !nntp_data->nserv->cacheable)
return;
#ifdef USE_HCACHE
char file[PATH_MAX];
nntp_hcache_namer(nntp_data->group, file, sizeof(file));
cache_expand(file, sizeof(file), &nntp_data->nserv->conn->account, file);
... | 0 | [
"CWE-119",
"CWE-787"
] | neomutt | 6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3 | 180,107,958,719,078,700,000,000,000,000,000,000,000 | 26 | Set length modifiers for group and desc
nntp_add_group parses a line controlled by the connected nntp server.
Restrict the maximum lengths read into the stack buffers group, and
desc. |
void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector)
{
int irq;
#ifdef CONFIG_X86
if (unlikely(vector == XEN_NMI_VECTOR)) {
int rc = HYPERVISOR_vcpu_op(VCPUOP_send_nmi, xen_vcpu_nr(cpu),
NULL);
if (rc < 0)
printk(KERN_WARNING "Sending nmi to CPU%d failed (rc:%d)\n", cpu, rc);
return;
... | 0 | [
"CWE-400",
"CWE-703"
] | linux | e99502f76271d6bc4e374fe368c50c67a1fd3070 | 218,006,719,613,381,240,000,000,000,000,000,000,000 | 17 | xen/events: defer eoi in case of excessive number of events
In case rogue guests are sending events at high frequency it might
happen that xen_evtchn_do_upcall() won't stop processing events in
dom0. As this is done in irq handling a crash might be the result.
In order to avoid that, delay further inter-domain events... |
TEST_F(QueryPlannerTest, OrWithAndChild) {
addIndex(BSON("a" << 1));
runQuery(fromjson("{$or: [{a: 20}, {$and: [{a:1}, {b:7}]}]}"));
ASSERT_EQUALS(getNumSolutions(), 2U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetch: {filter: null, node: {or: {nodes: ["
"... | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 336,051,970,745,652,950,000,000,000,000,000,000,000 | 12 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static ssize_t per_cpu_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
struct workqueue_struct *wq = dev_to_wq(dev);
return scnprintf(buf, PAGE_SIZE, "%d\n", (bool)!(wq->flags & WQ_UNBOUND));
} | 0 | [
"CWE-200"
] | tip | dfb4357da6ddbdf57d583ba64361c9d792b0e0b1 | 111,154,669,581,754,970,000,000,000,000,000,000,000 | 7 | time: Remove CONFIG_TIMER_STATS
Currently CONFIG_TIMER_STATS exposes process information across namespaces:
kernel/time/timer_list.c print_timer():
SEQ_printf(m, ", %s/%d", tmp, timer->start_pid);
/proc/timer_list:
#11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570
Given that the trac... |
static int iscsi_translate_sense(struct scsi_sense *sense)
{
return scsi_sense_to_errno(sense->key,
(sense->ascq & 0xFF00) >> 8,
sense->ascq & 0xFF);
} | 0 | [
"CWE-125"
] | qemu | ff0507c239a246fd7215b31c5658fc6a3ee1e4c5 | 159,527,425,683,386,500,000,000,000,000,000,000,000 | 6 | block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb
There is an overflow, the source 'datain.data[2]' is 100 bytes,
but the 'ss' is 252 bytes.This may cause a security issue because
we can access a lot of unrelated memory data.
The len for sbp copy data should take the minimum of mx_sb_len and
sb_len_wr, no... |
static void parse_rtcp_bye(pjmedia_rtcp_session *sess,
const void *pkt,
pj_size_t size)
{
pj_str_t reason = {"-", 1};
/* Check and get BYE reason */
if (size > 8) {
/* Make sure the BYE reason does not exceed:
* - the size of the available buffer
* - the declared reason's lengt... | 0 | [
"CWE-125"
] | pjproject | 8b621f192cae14456ee0b0ade52ce6c6f258af1e | 96,761,309,652,857,390,000,000,000,000,000,000,000 | 26 | Merge pull request from GHSA-3qx3-cg72-wrh9 |
void CLASS kodak_ycbcr_load_raw()
{
short buf[384], *bp;
int row, col, len, c, i, j, k, y[2][2], cb, cr, rgb[3];
ushort *ip;
for (row=0; row < height; row+=2)
for (col=0; col < width; col+=128) {
len = MIN (128, width-col);
kodak_65000_decode (buf, len*3);
y[0][1] = y[1][1] = cb = cr = 0;... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 322,288,612,463,545,070,000,000,000,000,000,000,000 | 26 | cumulated data checks patch |
SCTP_STATIC void sctp_close(struct sock *sk, long timeout)
{
struct sctp_endpoint *ep;
struct sctp_association *asoc;
struct list_head *pos, *temp;
SCTP_DEBUG_PRINTK("sctp_close(sk: 0x%p, timeout:%ld)\n", sk, timeout);
sctp_lock_sock(sk);
sk->sk_shutdown = SHUTDOWN_MASK;
sk->sk_state = SCTP_SS_CLOSING;
ep = ... | 0 | [
"CWE-400"
] | linux-2.6 | c377411f2494a931ff7facdbb3a6839b1266bcf6 | 283,802,348,533,645,360,000,000,000,000,000,000,000 | 71 | net: sk_add_backlog() take rmem_alloc into account
Current socket backlog limit is not enough to really stop DDOS attacks,
because user thread spend many time to process a full backlog each
round, and user might crazy spin on socket lock.
We should add backlog size and receive_queue size (aka rmem_alloc) to
pace writ... |
static void cirrus_write_bitblt(CirrusVGAState * s, unsigned reg_value)
{
unsigned old_value;
old_value = s->vga.gr[0x31];
s->vga.gr[0x31] = reg_value;
if (((old_value & CIRRUS_BLT_RESET) != 0) &&
((reg_value & CIRRUS_BLT_RESET) == 0)) {
cirrus_bitblt_reset(s);
} else if (((old_value & CIRRUS_BL... | 0 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 55,384,428,325,791,860,000,000,000,000,000,000,000 | 15 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
static int compat_check_entry(struct ip6t_entry *e, struct net *net,
const char *name)
{
unsigned int j;
int ret = 0;
struct xt_mtchk_param mtpar;
struct xt_entry_match *ematch;
j = 0;
mtpar.net = net;
mtpar.table = name;
mtpar.entryinfo = &e->ipv6;
mtpar.hook_mask = e->comefrom;
mtpar.family ... | 0 | [
"CWE-200"
] | linux-2.6 | 6a8ab060779779de8aea92ce3337ca348f973f54 | 172,519,867,334,466,380,000,000,000,000,000,000,000 | 34 | ipv6: netfilter: ip6_tables: fix infoleak to userspace
Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sen... |
static int compat_werrorget(int drive,
struct compat_floppy_write_errors __user *arg)
{
struct compat_floppy_write_errors v32;
struct floppy_write_errors v;
memset(&v32, 0, sizeof(struct compat_floppy_write_errors));
mutex_lock(&floppy_mutex);
v = write_errors[drive];
mutex_unlock(&floppy_mutex);
v32.wri... | 0 | [
"CWE-416"
] | linux | 233087ca063686964a53c829d547c7571e3f67bf | 253,412,173,826,205,960,000,000,000,000,000,000,000 | 20 | floppy: disable FDRAWCMD by default
Minh Yuan reported a concurrency use-after-free issue in the floppy code
between raw_cmd_ioctl and seek_interrupt.
[ It turns out this has been around, and that others have reported the
KASAN splats over the years, but Minh Yuan had a reproducer for it and
so gets primary credi... |
bool JOIN::prepare_result(List<Item> **columns_list)
{
DBUG_ENTER("JOIN::prepare_result");
error= 0;
/* Create result tables for materialized views. */
if (!zero_result_cause &&
select_lex->handle_derived(thd->lex, DT_CREATE))
goto err;
if (result->prepare2())
goto err;
if ((select_lex->opt... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 108,208,638,548,032,970,000,000,000,000,000,000,000 | 23 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
int ha_partition::open(const char *name, int mode, uint test_if_locked)
{
char *name_buffer_ptr;
int error= HA_ERR_INITIALIZATION;
handler **file;
char name_buff[FN_REFLEN];
bool is_not_tmp_table= (table_share->tmp_table == NO_TMP_TABLE);
ulonglong check_table_flags;
DBUG_ENTER("ha_partition::open");
D... | 1 | [] | server | f305a7ce4bccbd56520d874e1d81a4f29bc17a96 | 217,279,695,623,332,100,000,000,000,000,000,000,000 | 195 | bugfix: long partition names |
njs_descriptor_prop(njs_vm_t *vm, njs_object_prop_t *prop,
const njs_value_t *desc)
{
njs_int_t ret;
njs_bool_t data, accessor;
njs_value_t value;
njs_lvlhsh_query_t lhq;
static const njs_value_t get_string = njs_string("get");
if (!njs_is_object(desc)) {
... | 0 | [] | njs | 6549d49630ce5f5ac823fd3ae0c6c8558b8716ae | 196,311,937,438,985,250,000,000,000,000,000,000,000 | 125 | Fixed redefinition of special props in Object.defineProperty().
Previously, when NJS_PROPERTY_HANDLER property was updated it might be
left in inconsistent state. Namely, prop->type was left unchanged, but
prop->value did not have an expected property handler. As a result
consecutive reference to the property may re... |
xmlXPathWrapCString (char * val) {
return(xmlXPathWrapString((xmlChar *)(val)));
} | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 108,538,074,316,178,410,000,000,000,000,000,000,000 | 3 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
Router::ConfigConstSharedPtr config() override { return config_; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 77,607,166,133,482,060,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int ssl_set_client_hello_version(SSL *s)
{
int ver_min, ver_max, ret;
ret = ssl_get_client_min_max_version(s, &ver_min, &ver_max);
if (ret != 0)
return ret;
s->client_version = s->version = ver_max;
return 0;
} | 0 | [
"CWE-400"
] | openssl | 4b390b6c3f8df925dc92a3dd6b022baa9a2f4650 | 183,903,318,908,414,380,000,000,000,000,000,000,000 | 12 | Excessive allocation of memory in tls_get_message_header()
A TLS message includes 3 bytes for its length in the header for the message.
This would allow for messages up to 16Mb in length. Messages of this length
are excessive and OpenSSL includes a check to ensure that a peer is sending
reasonably sized messages in or... |
static CURLcode servercert(struct Curl_easy *data,
struct connectdata *conn,
struct ssl_connect_data *connssl,
bool strict)
{
CURLcode result = CURLE_OK;
int rc;
long lerr;
X509 *issuer;
BIO *fp = NULL;
char error_buffer[256]="... | 0 | [] | curl | 139a54ed0a172adaaf1a78d6f4fff50b2c3f9e08 | 313,238,389,844,949,040,000,000,000,000,000,000,000 | 204 | openssl: don't leak the SRP credentials in redirects either
Follow-up to 620ea21410030
Reported-by: Harry Sintonen
Closes #8751 |
static void add_addr(struct inet6_dev *idev, const struct in6_addr *addr,
int plen, int scope)
{
struct inet6_ifaddr *ifp;
ifp = ipv6_add_addr(idev, addr, NULL, plen,
scope, IFA_F_PERMANENT, 0, 0);
if (!IS_ERR(ifp)) {
spin_lock_bh(&ifp->lock);
ifp->flags &= ~IFA_F_TENTATIVE;
spin_unlock_bh(&ifp-... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 23,781,956,346,708,167,000,000,000,000,000,000,000 | 15 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
RemoveStatisticsDataById(Oid statsOid, bool inh)
{
Relation relation;
HeapTuple tup;
relation = table_open(StatisticExtDataRelationId, RowExclusiveLock);
tup = SearchSysCache2(STATEXTDATASTXOID, ObjectIdGetDatum(statsOid),
BoolGetDatum(inh));
/* We don't know if the data row for inh value exists. */
if... | 0 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 15,180,076,253,243,395,000,000,000,000,000,000,000 | 20 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
static inline unsigned long read_msr(unsigned long msr)
{
u64 value;
rdmsrl(msr, value);
return value;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 133,343,071,829,505,560,000,000,000,000,000,000,000 | 7 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
copyIntoDeepFrameBuffer (const char *& readPtr,
char * base,
const char* sampleCountBase,
ptrdiff_t sampleCountXStride,
ptrdiff_t sampleCountYStride,
int y, int minX, int maxX,
... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 103,841,614,522,675,350,000,000,000,000,000,000,000 | 699 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int atalk_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
{
int rc = -ENOIOCTLCMD;
struct sock *sk = sock->sk;
void __user *argp = (void __user *)arg;
switch (cmd) {
/* Protocol layer */
case TIOCOUTQ: {
long amount = sk->sk_sndbuf - sk_wmem_alloc_get(sk);
if (amount < 0)
amount = ... | 0 | [
"CWE-416"
] | linux | 6377f787aeb945cae7abbb6474798de129e1f3ac | 264,162,541,685,390,470,000,000,000,000,000,000,000 | 58 | appletalk: Fix use-after-free in atalk_proc_exit
KASAN report this:
BUG: KASAN: use-after-free in pde_subdir_find+0x12d/0x150 fs/proc/generic.c:71
Read of size 8 at addr ffff8881f41fe5b0 by task syz-executor.0/2806
CPU: 0 PID: 2806 Comm: syz-executor.0 Not tainted 5.0.0-rc7+ #45
Hardware name: QEMU Standard PC (i440... |
__must_hold(RCU)
{
struct nf_nat_hook *nat_hook;
int err;
nat_hook = rcu_dereference(nf_nat_hook);
if (!nat_hook) {
#ifdef CONFIG_MODULES
rcu_read_unlock();
nfnl_unlock(NFNL_SUBSYS_CTNETLINK);
if (request_module("nf-nat") < 0) {
nfnl_lock(NFNL_SUBSYS_CTNETLINK);
rcu_read_lock();
return -EOPNOTSUPP;... | 0 | [
"CWE-120"
] | linux | 1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6 | 86,897,056,381,589,750,000,000,000,000,000,000,000 | 42 | netfilter: ctnetlink: add a range check for l3/l4 protonum
The indexes to the nf_nat_l[34]protos arrays come from userspace. So
check the tuple's family, e.g. l3num, when creating the conntrack in
order to prevent an OOB memory access during setup. Here is an example
kernel panic on 4.14.180 when userspace passes in ... |
Status AuthorizationManager::checkValidPrivilegeDocument(const StringData& dbname,
const BSONObj& doc) {
BSONElement userElement = doc[USER_NAME_FIELD_NAME];
BSONElement userSourceElement = doc[USER_SOURCE_FIELD_NAME];
BSONElement ... | 0 | [
"CWE-264"
] | mongo | 23344f8b7506df694f66999693ee3c00dfd6afae | 4,559,933,410,660,283,000,000,000,000,000,000,000 | 90 | SERVER-9983 Do not needlessly lock when looking up privileges for the __system@local user.
Uncorrected, this can cause replica set heartbeats to stall behind operations
that hold the read lock for a long time. |
magic_isset(void)
{
switch (magic_overruled)
{
case OPTION_MAGIC_ON: return TRUE;
case OPTION_MAGIC_OFF: return FALSE;
case OPTION_MAGIC_NOT_SET: break;
}
#ifdef FEAT_EVAL
if (in_vim9script())
return TRUE;
#endif
return p_magic;
} | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 111,263,210,030,534,710,000,000,000,000,000,000,000 | 14 | 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. |
void HGraph::CollectPhis() {
int block_count = blocks_.length();
phi_list_ = new(zone()) ZoneList<HPhi*>(block_count, zone());
for (int i = 0; i < block_count; ++i) {
for (int j = 0; j < blocks_[i]->phis()->length(); ++j) {
HPhi* phi = blocks_[i]->phis()->at(j);
phi_list_->Add(phi, zone());
}
... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 165,595,310,590,247,600,000,000,000,000,000,000,000 | 10 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
void proto_register_fp(void)
{
static hf_register_info hf[] =
{
{ &hf_fp_release,
{ "Release",
"fp.release", FT_NONE, BASE_NONE, NULL, 0x0,
"Release information", HFILL
}
},
{ &hf_fp_release_version,
... | 0 | [
"CWE-20"
] | wireshark | 7d7190695ce2ff269fdffb04e87139995cde21f4 | 51,757,706,164,445,920,000,000,000,000,000,000,000 | 1,076 | UMTS_FP: fix handling reserved C/T value
The spec puts the reserved value at 0xf but our internal table has 'unknown' at
0; since all the other values seem to be offset-by-one, just take the modulus
0xf to avoid running off the end of the table.
Bug: 12191
Change-Id: I83c8fb66797bbdee52a2246fb1eea6e37cbc7eb0
Reviewed... |
static inline void intel_pmu_ack_status(u64 ack)
{
wrmsrl(MSR_CORE_PERF_GLOBAL_OVF_CTRL, ack);
} | 0 | [
"CWE-20",
"CWE-401"
] | linux | f1923820c447e986a9da0fc6bf60c1dccdf0408e | 47,288,713,219,424,710,000,000,000,000,000,000,000 | 4 | perf/x86: Fix offcore_rsp valid mask for SNB/IVB
The valid mask for both offcore_response_0 and
offcore_response_1 was wrong for SNB/SNB-EP,
IVB/IVB-EP. It was possible to write to
reserved bit and cause a GP fault crashing
the kernel.
This patch fixes the problem by correctly marking the
reserved bits in the valid m... |
int devinet_ioctl(struct net *net, unsigned int cmd, void __user *arg)
{
struct ifreq ifr;
struct sockaddr_in sin_orig;
struct sockaddr_in *sin = (struct sockaddr_in *)&ifr.ifr_addr;
struct in_device *in_dev;
struct in_ifaddr **ifap = NULL;
struct in_ifaddr *ifa = NULL;
struct net_device *dev;
char *colon;
int... | 0 | [
"CWE-399"
] | net-next | fbd40ea0180a2d328c5adc61414dc8bab9335ce2 | 245,322,082,728,160,250,000,000,000,000,000,000,000 | 241 | ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And in this scenerio we do two pointless things which can
be very expensive if the number of assigned interfaces is large:
1) Address promotion. We are deleting all address... |
static int mlx5e_route_lookup_ipv6(struct mlx5e_priv *priv,
struct net_device *mirred_dev,
struct net_device **out_dev,
struct net_device **route_dev,
struct flowi6 *fl6,
struct neighbour **out_n,
u8 *out_ttl)
{
struct dst_entry *dst;
struct neighbour *n;
int ret;
dst = i... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 102,457,354,870,359,620,000,000,000,000,000,000,000 | 35 | 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... |
shared_ptr<Sorter<Value, Value>::Iterator> DocumentSourceGroup::spill() {
_usedDisk = true;
vector<const GroupsMap::value_type*> ptrs; // using pointers to speed sorting
ptrs.reserve(_groups->size());
for (GroupsMap::const_iterator it = _groups->begin(), end = _groups->end(); it != end; ++it) {
... | 0 | [] | mongo | 07b8851825836911265e909d6842d4586832f9bb | 257,114,567,624,493,100,000,000,000,000,000,000,000 | 41 | SERVER-60218-44: SERVER-60218 add initialize helper function for document_source_group (cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2) |
static inline void ccid_hc_tx_packet_recv(struct ccid *ccid, struct sock *sk,
struct sk_buff *skb)
{
if (ccid->ccid_ops->ccid_hc_tx_packet_recv != NULL)
ccid->ccid_ops->ccid_hc_tx_packet_recv(sk, skb);
} | 0 | [
"CWE-703"
] | linux | 276bdb82dedb290511467a5a4fdbe9f0b52dce6f | 39,020,811,347,661,350,000,000,000,000,000,000,000 | 6 | dccp: check ccid before dereferencing
ccid_hc_rx_getsockopt() and ccid_hc_tx_getsockopt() might be called with
a NULL ccid pointer leading to a NULL pointer dereference. This could
lead to a privilege escalation if the attacker is able to map page 0 and
prepare it with a fake ccid_ops pointer.
Signed-off-by: Mathias ... |
HTTP1_DissectRequest(struct http_conn *htc, struct http *hp)
{
uint16_t retval;
const char *p;
const char *b = NULL, *e;
CHECK_OBJ_NOTNULL(htc, HTTP_CONN_MAGIC);
CHECK_OBJ_NOTNULL(hp, HTTP_MAGIC);
retval = http1_splitline(hp, htc,
HTTP1_Req, cache_param->http_req_hdr_len);
if (retval != 0)
return (retva... | 0 | [
"CWE-617"
] | varnish-cache | 406b583fe54634afd029e7a41e35b3cf9ccac28a | 152,858,029,901,654,220,000,000,000,000,000,000,000 | 59 | Avoid some code duplication
Apply some adjustments to recent patches based off of review by Nils
Goroll at UPLEX (@nigoroll) |
JSONEmitter(FileStorage_API* _fs) : fs(_fs)
{
} | 0 | [
"CWE-787"
] | opencv | f42d5399aac80d371b17d689851406669c9b9111 | 288,788,415,205,414,180,000,000,000,000,000,000,000 | 3 | core(persistence): add more checks for implementation limitations |
static ssize_t unix_stream_sendpage(struct socket *socket, struct page *page,
int offset, size_t size, int flags)
{
int err;
bool send_sigpipe = false;
bool init_scm = true;
struct scm_cookie scm;
struct sock *other, *sk = socket->sk;
struct sk_buff *skb, *newskb = NULL, *tail = NULL;
if (flags & MSG_OO... | 0 | [] | net | 712f4aad406bb1ed67f3f98d04c044191f0ff593 | 60,410,189,460,676,050,000,000,000,000,000,000,000 | 115 | unix: properly account for FDs passed over unix sockets
It is possible for a process to allocate and accumulate far more FDs than
the process' limit by sending them over a unix socket then closing them
to keep the process' fd count low.
This change addresses this problem by keeping track of the number of FDs
in fligh... |
int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode)
{
struct inode *inode = old_dentry->d_inode;
unsigned max_links = dir->i_sb->s_max_links;
int error;
if (!inode)
return -ENOENT;
error = may_create(dir, new_dentry);
if (error)
return error;... | 0 | [
"CWE-284"
] | linux | 9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca | 88,997,989,710,436,160,000,000,000,000,000,000,000 | 52 | vfs: rename: check backing inode being equal
If a file is renamed to a hardlink of itself POSIX specifies that rename(2)
should do nothing and return success.
This condition is checked in vfs_rename(). However it won't detect hard
links on overlayfs where these are given separate inodes on the overlayfs
layer.
Over... |
dirserv_get_routerdescs(smartlist_t *descs_out, const char *key,
const char **msg)
{
*msg = NULL;
if (!strcmp(key, "/tor/server/all")) {
routerlist_t *rl = router_get_routerlist();
SMARTLIST_FOREACH(rl->routers, routerinfo_t *, r,
smartlist_add(descs_out, &(r->... | 0 | [
"CWE-264"
] | tor | 00fffbc1a15e2696a89c721d0c94dc333ff419ef | 200,458,250,592,956,020,000,000,000,000,000,000,000 | 62 | Don't give the Guard flag to relays without the CVE-2011-2768 fix |
static bool rbd_obj_advance_read(struct rbd_obj_request *obj_req, int *result)
{
struct rbd_device *rbd_dev = obj_req->img_request->rbd_dev;
int ret;
again:
switch (obj_req->read_state) {
case RBD_OBJ_READ_START:
rbd_assert(!*result);
if (!rbd_obj_may_exist(obj_req)) {
*result = -ENOENT;
obj_req->read_s... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 112,807,661,036,537,790,000,000,000,000,000,000,000 | 76 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
void ixgbe_check_vf_rate_limit(struct ixgbe_adapter *adapter)
{
int i;
/* VF Tx rate limit was not set */
if (!adapter->vf_rate_link_speed)
return;
if (ixgbe_link_mbps(adapter) != adapter->vf_rate_link_speed) {
adapter->vf_rate_link_speed = 0;
dev_info(&adapter->pdev->dev,
"Link speed has been changed. ... | 0 | [
"CWE-20"
] | linux | 63e39d29b3da02e901349f6cd71159818a4737a6 | 196,685,790,488,911,600,000,000,000,000,000,000,000 | 21 | ixgbe: fix large MTU request from VF
Check that the MTU value requested by the VF is in the supported
range of MTUs before attempting to set the VF large packet enable,
otherwise reject the request. This also avoids unnecessary
register updates in the case of the 82599 controller.
Fixes: 872844ddb9e4 ("ixgbe: Enable ... |
static NTSTATUS dcesrv_interface_lsarpc_init_server(struct dcesrv_context *dce_ctx,
const struct dcesrv_endpoint_server *ep_server)
{
if (lpcfg_lsa_over_netlogon(dce_ctx->lp_ctx)) {
NTSTATUS ret = dcesrv_interface_register(dce_ctx,
NCACN_NP_PIPE_NETLOGON,
NCACN_NP_PIPE_LSASS,
&dcesrv_lsar... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 164,604,964,680,280,460,000,000,000,000,000,000,000 | 15 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static int hw_atl_utils_init_ucp(struct aq_hw_s *self,
const struct aq_hw_caps_s *aq_hw_caps)
{
int err = 0;
if (!aq_hw_read_reg(self, 0x370U)) {
unsigned int rnd = 0U;
unsigned int ucp_0x370 = 0U;
get_random_bytes(&rnd, sizeof(unsigned int));
ucp_0x370 = 0x02020202U | (0xFEFEFEFEU & rnd);
aq_hw_wri... | 0 | [
"CWE-787"
] | net | b922f622592af76b57cbc566eaeccda0b31a3496 | 311,756,118,624,745,160,000,000,000,000,000,000,000 | 29 | atlantic: Fix OOB read and write in hw_atl_utils_fw_rpc_wait
This bug report shows up when running our research tools. The
reports is SOOB read, but it seems SOOB write is also possible
a few lines below.
In details, fw.len and sw.len are inputs coming from io. A len
over the size of self->rpc triggers SOOB. The patc... |
MagickPrivate int XConfirmWidget(Display *display,XWindows *windows,
const char *reason,const char *description)
{
#define CancelButtonText "Cancel"
#define DismissButtonText "Dismiss"
#define YesButtonText "Yes"
int
confirm,
x,
y;
Status
status;
unsigned int
height,
width;
size... | 0 | [] | ImageMagick | d95735d25a39300dd874f0227c430d5dbb1f83cc | 161,325,442,163,657,580,000,000,000,000,000,000,000 | 373 | https://github.com/ImageMagick/ImageMagick/issues/3333 |
void Curl_verboseconnect(struct connectdata *conn)
{
if(conn->data->set.verbose)
infof(conn->data, "Connected to %s (%s) port %ld (#%ld)\n",
conn->bits.proxy ? conn->proxy.dispname : conn->host.dispname,
conn->ip_addr_str, conn->port, conn->connection_id);
} | 0 | [
"CWE-200"
] | curl | b3875606925536f82fc61f3114ac42f29eaf6945 | 41,653,825,019,469,080,000,000,000,000,000,000,000 | 7 | curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds
When duplicating a handle, the data to post was duplicated using
strdup() when it could be binary and contain zeroes and it was not even
zero terminated! This caused read out of bounds crashes/segfaults.
Since the lib/strdup.c file no longer is easily sha... |
int lxc_create_network(struct lxc_handler *handler)
{
struct lxc_list *network = &handler->conf->network;
struct lxc_list *iterator;
struct lxc_netdev *netdev;
int am_root = (getuid() == 0);
if (!am_root)
return 0;
lxc_list_for_each(iterator, network) {
netdev = iterator->elem;
if (netdev->type < 0 || n... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 172,622,532,770,902,760,000,000,000,000,000,000,000 | 29 | 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... |
static int quattro_skip_setting_quirk(struct snd_usb_audio *chip,
int iface, int altno)
{
/* Reset ALL ifaces to 0 altsetting.
* Call it for every possible altsetting of every interface.
*/
usb_set_interface(chip->dev, iface, 0);
if (chip->setup & MAUDIO_SET) {
if (chip->setup & MAUDIO_SET_COMPATIBLE... | 0 | [] | sound | 0f886ca12765d20124bd06291c82951fd49a33be | 240,942,169,662,478,500,000,000,000,000,000,000,000 | 31 | ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk()
create_fixed_stream_quirk() may cause a NULL-pointer dereference by
accessing the non-existing endpoint when a USB device with a malformed
USB descriptor is used.
This patch avoids it simply by adding a sanity check of bNumEndpoints
before the acces... |
pk_transaction_search_names (PkTransaction *transaction,
GVariant *params,
GDBusMethodInvocation *context)
{
gboolean ret;
PkBitfield filter;
g_autofree gchar **values = NULL;
g_autoptr(GError) error = NULL;
g_return_if_fail (PK_IS_TRANSACTION (transaction));
g_return_if_fail (transaction->priv->... | 0 | [
"CWE-287"
] | PackageKit | 7e8a7905ea9abbd1f384f05f36a4458682cd4697 | 306,867,206,590,701,660,000,000,000,000,000,000,000 | 45 | Do not set JUST_REINSTALL on any kind of auth failure
If we try to continue the auth queue when it has been cancelled (or failed)
then we fall upon the obscure JUST_REINSTALL transaction flag which only the
DNF backend actually verifies.
Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem. |
queue_filter (gpointer data,
GBytes *bytes)
{
QueueStep *qs = data;
QueueStep qn = { .response = qs->response };
g_return_if_fail (bytes != NULL);
if (qs->filters)
{
qn.filters = qs->filters->next;
cockpit_web_filter_push (qs->filters->data, bytes, queue_filter, &qn);
}
els... | 0 | [
"CWE-1021"
] | cockpit | 8d9bc10d8128aae03dfde62fd00075fe492ead10 | 244,253,426,976,705,730,000,000,000,000,000,000,000 | 18 | common: Restrict frame embedding to same origin
Declare `X-Frame-Options: sameorigin` [1] so that cockpit frames can
only be embedded into pages coming from the same origin. This is similar
to setting CORP in commit 2b38b8de92f9a (which applies to `<script>`,
`<img>`, etc.).
The main use case for embedding is to run ... |
static int is_string(const ut8 *buf, int size, int *len) {
int i, fakeLen = 0;
if (size < 1) {
return 0;
}
if (!len) {
len = &fakeLen;
}
if (size > 3 && buf[0] && !buf[1] && buf[2] && !buf[3]) {
*len = 1; // XXX: TODO: Measure wide string length
return 2; // is wide
}
for (i = 0; i < size; i++) {
if (... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 223,765,011,326,988,600,000,000,000,000,000,000,000 | 32 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
static int asf_deinterleave(AVFormatContext *s, ASFPacket *asf_pkt, int st_num)
{
ASFContext *asf = s->priv_data;
ASFStream *asf_st = asf->asf_st[st_num];
unsigned char *p = asf_pkt->avpkt.data;
uint16_t pkt_len = asf->asf_st[st_num]->virtual_pkt_len;
uint16_t chunk_len = asf->asf_st[st_num]... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 2b46ebdbff1d8dec7a3d8ea280a612b91a582869 | 290,850,704,800,950,200,000,000,000,000,000,000,000 | 41 | avformat/asfdec_o: Check size_bmp more fully
Fixes: integer overflow and out of array access
Fixes: asfo-crash-46080c4341572a7137a162331af77f6ded45cbd7
Found-by: Paul Ch <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.