func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void mutt_to_base64 (unsigned char *out, const unsigned char *in, size_t len,
size_t olen)
{
while (len >= 3 && olen > 10)
{
*out++ = B64Chars[in[0] >> 2];
*out++ = B64Chars[((in[0] << 4) & 0x30) | (in[1] >> 4)];
*out++ = B64Chars[((in[1] << 2) & 0x3c) | (in[2] >> 6)];
*out++ = B64Chars[in[2]... | 0 | [
"CWE-120"
] | mutt | 3d9028fec8f4d08db2251096307c0bbbebce669a | 280,320,884,108,754,600,000,000,000,000,000,000,000 | 29 | Check outbuf length in mutt_from_base64()
The obuf can be overflowed in auth_cram.c, and possibly auth_gss.c.
Thanks to Jeriko One for the bug report. |
void InstanceKlass::process_interfaces(Thread *thread) {
// link this class into the implementors list of every interface it implements
for (int i = local_interfaces()->length() - 1; i >= 0; i--) {
assert(local_interfaces()->at(i)->is_klass(), "must be a klass");
InstanceKlass* interf = InstanceKlass::cast(... | 0 | [] | jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 51,121,909,790,728,385,000,000,000,000,000,000,000 | 9 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
static void next(struct cstate *g)
{
g->lookahead = lex(g);
} | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 226,822,539,997,239,160,000,000,000,000,000,000,000 | 4 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. |
bool SSL_CTX::SetDH(const DH& dh)
{
dhParms_.p_ = dh.p->int_;
dhParms_.g_ = dh.g->int_;
return dhParms_.set_ = true;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 87,343,690,132,047,690,000,000,000,000,000,000,000 | 7 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
}
inline int mod(const short x, const short m) {
return x>=0?x%m:(x%m?m + x%m:0); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 47,972,077,247,104,255,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static Image *ReadPALMImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status;
MagickOffsetType
totalOffset,
seekNextDepth;
PixelInfo
transpix;
Quantum
index;
register ssize_t
i,
x;
register Quantum
*q;
size_t
... | 1 | [
"CWE-703",
"CWE-772"
] | ImageMagick | 0417cea1b6d72f90bd4f1f573f91e42a8ba66a89 | 36,310,109,080,174,936,000,000,000,000,000,000,000 | 358 | https://github.com/ImageMagick/ImageMagick/issues/574 |
void CIRCSock::PutIRC(const CMessage& Message) {
// Only print if the line won't get sent immediately (same condition as in
// TrySend()!)
if (m_bFloodProtection && m_iSendsAllowed <= 0) {
DEBUG("(" << m_pNetwork->GetUser()->GetUserName() << "/"
<< m_pNetwork->GetName() << ") ZNC -... | 0 | [
"CWE-20",
"CWE-284"
] | znc | d22fef8620cdd87490754f607e7153979731c69d | 33,972,570,915,826,574,000,000,000,000,000,000,000 | 11 | Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
static void conn_handle_message(VDAgentConnection *conn,
gpointer header_buf,
gpointer data)
{
UdscsConnection *self = UDSCS_CONNECTION(conn);
struct udscs_message_header *header = header_buf;
debug_print_message_header(sel... | 0 | [
"CWE-770"
] | spice-vd_agent | 91caa9223857708475d29df1768208fed1675340 | 27,097,928,427,837,374,000,000,000,000,000,000,000 | 11 | Avoids unlimited agent connections
Limit the number of agents that can be connected.
Avoids reaching the maximum number of files in a process.
Beside one file descriptor per agent the daemon open just some
other fixed number of files.
This issue was reported by SUSE security team.
Signed-off-by: Frediano Ziglio <fre... |
static inline int copy_regset_from_user(struct task_struct *target,
const struct user_regset_view *view,
unsigned int setno,
unsigned int offset, unsigned int size,
const void __user *data)
{
const struct user_regset *regset = &view->regsets[setno];
if (!access_ok(VERIFY_READ, data, size))
retu... | 1 | [
"CWE-476"
] | linux | c8e252586f8d5de906385d8cf6385fee289a825e | 282,027,841,823,813,220,000,000,000,000,000,000,000 | 13 | regset: Prevent null pointer reference on readonly regsets
The regset common infrastructure assumed that regsets would always
have .get and .set methods, but not necessarily .active methods.
Unfortunately people have since written regsets without .set methods.
Rather than putting in stub functions everywhere, handle ... |
static int x509_get_entries( unsigned char **p,
const unsigned char *end,
x509_crl_entry *entry )
{
int ret;
size_t entry_len;
x509_crl_entry *cur_entry = entry;
if( *p == end )
return( 0 );
if( ( ret = asn1_get_tag( p, end, &entry_... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 189,979,994,897,856,100,000,000,000,000,000,000,000 | 61 | RSA blinding on CRT operations to counter timing attacks |
ecb_ews_store_original_comp (ECalComponent *comp)
{
gchar *comp_str;
gchar *base64;
g_return_if_fail (E_IS_CAL_COMPONENT (comp));
/* This makes sure it's not saved also in the original component */
e_cal_util_remove_x_property (e_cal_component_get_icalcomponent (comp), X_EWS_ORIGINAL_COMP);
comp_str = e_cal_co... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 241,131,500,164,544,450,000,000,000,000,000,000,000 | 22 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
Fraction::Fraction(int32_t num,int32_t den)
{
int32_t g = gcd(num, den);
// these strange tests are for catching the case that we divide -2147483648 by -1,
// which would exceed the maximum positive value by one.
if (num == std::numeric_limits<int32_t>::min() && g == -1) {
num++;
}
if (den == std::nu... | 1 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 94,908,240,988,263,540,000,000,000,000,000,000,000 | 29 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
Status requireAuthSchemaVersion26UpgradeOrFinal(OperationContext* opCtx,
AuthorizationManager* authzManager) {
int foundSchemaVersion;
Status status = authzManager->getAuthorizationVersion(opCtx, &foundSchemaVersion);
if (!status.isOK()) {
return statu... | 0 | [
"CWE-613"
] | mongo | db19e7ce84cfd702a4ba9983ee2ea5019f470f82 | 56,483,298,919,090,120,000,000,000,000,000,000,000 | 18 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static unsigned long ebb_switch_in(bool ebb, struct cpu_hw_events *cpuhw)
{
unsigned long mmcr0 = cpuhw->mmcr.mmcr0;
if (!ebb)
goto out;
/* Enable EBB and read/write to all 6 PMCs and BHRB for userspace */
mmcr0 |= MMCR0_EBE | MMCR0_BHRBA | MMCR0_PMCC_U6;
/*
* Add any bits from the user MMCR0, FC or PMAO. T... | 0 | [
"CWE-476"
] | linux | 60b7ed54a41b550d50caf7f2418db4a7e75b5bdc | 34,377,301,430,255,903,000,000,000,000,000,000,000 | 46 | powerpc/perf: Fix crash in perf_instruction_pointer() when ppmu is not set
On systems without any specific PMU driver support registered, running
perf record causes Oops.
The relevant portion from call trace:
BUG: Kernel NULL pointer dereference on read at 0x00000040
Faulting instruction address: 0xc0021f0c
Oo... |
void _snd_pcm_hw_param_setempty(struct snd_pcm_hw_params *params,
snd_pcm_hw_param_t var)
{
if (hw_is_mask(var)) {
snd_mask_none(hw_param_mask(params, var));
params->cmask |= 1 << var;
params->rmask |= 1 << var;
} else if (hw_is_interval(var)) {
snd_interval_none(hw_param_interval(params, var));
params-... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 206,354,153,355,149,900,000,000,000,000,000,000,000 | 15 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... |
_ppdCacheWriteFile(
_ppd_cache_t *pc, /* I - PPD cache and mapping data */
const char *filename, /* I - File to write */
ipp_t *attrs) /* I - Attributes to write, if any */
{
int i, j, k; /* Looping vars */
cups_file_t *fp; /* Output file */
pwg_size_t *size; /* Current size */
pw... | 0 | [
"CWE-93"
] | cups | 07428f6a640ff93aa0b4cc69ca372e2cf8490e41 | 337,262,870,468,654,280,000,000,000,000,000,000,000 | 245 | Only list supported PDLs (Issue #4923) |
static void _php_list_set_error_structure(xmlErrorPtr error, const char *msg)
{
xmlError error_copy;
int ret;
memset(&error_copy, 0, sizeof(xmlError));
if (error) {
ret = xmlCopyError(error, &error_copy);
} else {
error_copy.domain = 0;
error_copy.code = XML_ERR_INTERNAL_ERROR;
error_copy.level = XML_ER... | 0 | [] | php-src | f15f8fc573eb38c3c73e23e0930063a6f6409ed4 | 296,828,013,709,770,700,000,000,000,000,000,000,000 | 31 | Fix #79971: special character is breaking the path in xml function
The libxml based XML functions accepting a filename actually accept
URIs with possibly percent-encoded characters. Percent-encoded NUL
bytes lead to truncation, like non-encoded NUL bytes would. We catch
those, and let the functions fail with a respe... |
static void *php_libxml_streams_IO_open_wrapper(const char *filename, const char *mode, const int read_only)
{
php_stream_statbuf ssbuf;
php_stream_context *context = NULL;
php_stream_wrapper *wrapper = NULL;
char *resolved_path, *path_to_open = NULL;
void *ret_val = NULL;
int isescaped=0;
xmlURI *uri;
TSRMLS_... | 0 | [
"CWE-200"
] | php-src | 8e76d0404b7f664ee6719fd98f0483f0ac4669d6 | 37,874,792,843,480,195,000,000,000,000,000,000,000 | 52 | Fixed external entity loading |
static void bio_put_slab(struct bio_set *bs)
{
struct bio_slab *bslab = NULL;
unsigned int i;
mutex_lock(&bio_slab_lock);
for (i = 0; i < bio_slab_nr; i++) {
if (bs->bio_slab == bio_slabs[i].slab) {
bslab = &bio_slabs[i];
break;
}
}
if (WARN(!bslab, KERN_ERR "bio: unable to find slab!\n"))
goto out... | 0 | [
"CWE-772",
"CWE-787"
] | linux | 95d78c28b5a85bacbc29b8dba7c04babb9b0d467 | 288,091,341,040,219,400,000,000,000,000,000,000,000 | 28 | fix unbalanced page refcounting in bio_map_user_iov
bio_map_user_iov and bio_unmap_user do unbalanced pages refcounting if
IO vector has small consecutive buffers belonging to the same page.
bio_add_pc_page merges them into one, but the page reference is never
dropped.
Cc: stable@vger.kernel.org
Signed-off-by: Vitaly... |
dns_transmit_get (struct dns_transmit *d, const iopause_fd *x,
const struct taia *when)
{
char udpbuf[4097];
unsigned char ch = 0;
int r = 0, fd = 0, i = 0;
fd = d->s1 - 1;
errno = error_io;
if (d->tcpstate == 0 && d->master)
return 0;
if (... | 0 | [
"CWE-362"
] | ndjbdns | 177b5522e9b3d25778001c8cebfddd4d2973fcfd | 212,904,221,367,365,860,000,000,000,000,000,000,000 | 193 | Merge identical outgoing requests - patch 2.
This patch fixes dnscache to combine *same* client queries into one
single outgoing request, thus securing the server from possible cache
poisoning attacks. The merges operation takes place in the
dns_transmit layer, rather than between query and dns_transmit layers,
as don... |
u32 megasas_readl(struct megasas_instance *instance,
const volatile void __iomem *addr)
{
u32 i = 0, ret_val;
/*
* Due to a HW errata in Aero controllers, reads to certain
* Fusion registers could intermittently return all zeroes.
* This behavior is transient in nature and subsequent reads will
* return v... | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 117,940,969,378,338,770,000,000,000,000,000,000,000 | 21 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
http_get_header (http_t hd, const char *name)
{
header_t h;
for (h=hd->headers; h; h = h->next)
if ( !strcmp (h->name, name) )
return h->value;
return NULL;
} | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 319,191,930,926,555,720,000,000,000,000,000,000,000 | 9 | dirmngr: Avoid possible CSRF attacks via http redirects.
* dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
(http_redir_info_t): New.
* dirmngr/http.c (do_parse_uri): Set new fields.
(same_host_p): New.
(http_prepare_redirect): New.
* dirmngr/t-http-basic.c: New test.
* dirmngr/ks-engine-hkp.c (send_re... |
_archive_write_set_format_from_context (struct archive *a,
SaveData *save_data)
{
const char *mime_type;
int archive_filter;
/* set format and filter from the mime type */
mime_type = fr_archive_get_mime_type (LOAD_DATA (save_data)->archive);
archive_filter = ARCHIVE_FILTER_NONE;
if (_g_str_... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 325,775,322,770,060,900,000,000,000,000,000,000,000 | 104 | libarchive: sanitize filenames before extracting |
RZ_API RZ_DEPRECATE RzAnalysisVar *rz_analysis_get_used_function_var(RzAnalysis *analysis, ut64 addr) {
RzList *fcns = rz_analysis_get_functions_in(analysis, addr);
if (!fcns) {
return NULL;
}
RzAnalysisVar *var = NULL;
RzListIter *it;
RzAnalysisFunction *fcn;
rz_list_foreach (fcns, it, fcn) {
RzPVector *use... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 67,297,899,591,130,650,000,000,000,000,000,000,000 | 18 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static void register_service(void *data, void *user_data)
{
struct gatt_app *app = user_data;
GDBusProxy *proxy = data;
const char *iface = g_dbus_proxy_get_interface(proxy);
const char *path = g_dbus_proxy_get_path(proxy);
if (app->failed)
return;
if (g_strcmp0(iface, GATT_SERVICE_IFACE) == 0) {
struct ext... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 216,847,835,604,142,100,000,000,000,000,000,000,000 | 20 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
int http_parse_chunk_size(struct buffer *buf, struct http_msg *msg)
{
char *ptr = buf->lr;
char *end = buf->data + buf->size;
unsigned int chunk = 0;
/* The chunk size is in the following form, though we are only
* interested in the size and CRLF :
* 1*HEXDIGIT *WSP *[ ';' extensions ] CRLF
*/
while (1) ... | 0 | [] | haproxy-1.4 | dc80672211e085c211f1fc47e15cfe57ab587d38 | 302,545,348,447,930,070,000,000,000,000,000,000,000 | 89 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
void PostgreSqlStorage::renameUser(UserId user, const QString &newName)
{
QSqlQuery query(logDb());
query.prepare(queryString("update_username"));
query.bindValue(":userid", user.toInt());
query.bindValue(":username", newName);
safeExec(query);
emit userRenamed(user, newName);
} | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 21,061,991,603,176,460,000,000,000,000,000,000,000 | 9 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
static void xhci_doorbell_write(void *ptr, hwaddr reg,
uint64_t val, unsigned size)
{
XHCIState *xhci = ptr;
unsigned int epid, streamid;
trace_usb_xhci_doorbell_write(reg, val);
if (!xhci_running(xhci)) {
DPRINTF("xhci: wrote doorbell while xHC stopped or pause... | 0 | [
"CWE-835"
] | qemu | 96d87bdda3919bb16f754b3d3fd1227e1f38f13c | 208,410,541,432,790,600,000,000,000,000,000,000,000 | 35 | xhci: guard xhci_kick_epctx against recursive calls
Track xhci_kick_epctx processing being active in a variable. Check the
variable before calling xhci_kick_epctx from xhci_kick_ep. Add an
assert to make sure we don't call recursively into xhci_kick_epctx.
Cc: 1653384@bugs.launchpad.net
Fixes: 94b037f2a451b3dc855f9... |
QPDFTokenizer::readToken(PointerHolder<InputSource> input,
std::string const& context,
bool allow_bad,
size_t max_len)
{
qpdf_offset_t offset = input->tell();
Token token;
bool unread_char;
char char_to_unread;
bool presented... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 248,481,200,152,055,960,000,000,000,000,000,000,000 | 80 | 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 ... |
ipv4_sanity_check(const struct ip_header *nh, size_t size,
int *ip_lenp, uint16_t *tot_lenp)
{
int ip_len;
uint16_t tot_len;
if (OVS_UNLIKELY(size < IP_HEADER_LEN)) {
return false;
}
ip_len = IP_IHL(nh->ip_ihl_ver) * 4;
if (OVS_UNLIKELY(ip_len < IP_HEADER_LEN || size ... | 1 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 88,823,536,301,076,480,000,000,000,000,000,000,000 | 26 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
static OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k,
OPJ_UINT32 p_tile_no,
OPJ_UINT32 p_comp_no )
{
OPJ_UINT32 l_num_bands;
opj_cp_t *l_cp = 00;
... | 0 | [
"CWE-416"
] | openjpeg | 940100c28ae28931722290794889cf84a92c5f6f | 165,214,159,333,361,070,000,000,000,000,000,000,000 | 30 | Fix potential use-after-free in opj_j2k_write_mco function
Fixes #563 |
GF_Box *hdlr_New()
{
ISOM_DECL_BOX_ALLOC(GF_HandlerBox, GF_ISOM_BOX_TYPE_HDLR);
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 39,153,393,018,124,967,000,000,000,000,000,000,000 | 5 | prevent dref memleak on invalid input (#1183) |
skip_non_digits(char *str)
{
while (!isdigit(*str) && *str != 0) {
str++;
}
return str;
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 4,606,637,360,241,545,700,000,000,000,000,000,000 | 7 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
void __redisSetError(redisContext *c, int type, const char *str) {
size_t len;
c->err = type;
if (str != NULL) {
len = strlen(str);
len = len < (sizeof(c->errstr)-1) ? len : (sizeof(c->errstr)-1);
memcpy(c->errstr,str,len);
c->errstr[len] = '\0';
} else {
/* Only... | 0 | [
"CWE-190",
"CWE-680"
] | redis | 0215324a66af949be39b34be2d55143232c1cb71 | 201,513,979,433,642,460,000,000,000,000,000,000,000 | 15 | Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587)
The redis-cli command line tool and redis-sentinel service may be vulnerable
to integer overflow when parsing specially crafted large multi-bulk network
replies. This is a result of a vulnerability in the underlying hiredis
library wh... |
void CLASS ahd_interpolate_r_and_b_and_convert_to_cielab(int top, int left, ushort (*inout_rgb)[TS][TS][3], short (*out_lab)[TS][TS][3], const float (&xyz_cam)[3][4])
{
int direction;
for (direction = 0; direction < 2; direction++) {
ahd_interpolate_r_and_b_in_rgb_and_convert_to_cielab(top, left, inout_rgb[dire... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 259,992,215,340,074,700,000,000,000,000,000,000,000 | 7 | cumulated data checks patch |
uint TY_(ToLower)(uint c)
{
uint map = MAP(c);
if (map & uppercase)
c += 'a' - 'A';
return c;
} | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 242,323,761,750,898,500,000,000,000,000,000,000,000 | 9 | Issue #217 - avoid len going negative, ever... |
rdp_process_general_caps(STREAM s)
{
uint16 pad2octetsB; /* rdp5 flags? */
in_uint8s(s, 10);
in_uint16_le(s, pad2octetsB);
if (!pad2octetsB)
g_rdp_version = RDP_V4;
} | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 310,379,410,253,944,870,000,000,000,000,000,000,000 | 10 | 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... |
sctp_disposition_t sctp_sf_unk_chunk(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 *unk_chunk = arg;
struct sctp_chunk *err_chunk;
sctp_chunkhdr_t *hdr;
SCTP_DEBUG_PRINTK("... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 338,105,530,860,396,950,000,000,000,000,000,000,000 | 66 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
directory_send_command(dir_connection_t *conn,
int purpose, int direct, const char *resource,
const char *payload, size_t payload_len,
int supports_conditional_consensus,
time_t if_modified_since)
{
char proxystring[256];
ch... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 334,081,493,568,567,300,000,000,000,000,000,000,000 | 192 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
void Context::onStart(absl::string_view root_id, absl::string_view vm_configuration) {
if (wasm_->onStart_) {
auto root_id_addr = wasm_->copyString(root_id);
auto config_addr = wasm_->copyString(vm_configuration);
wasm_->onStart_(this, id_, root_id_addr, root_id.size(), config_addr, vm_configuration.size(... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 150,926,821,349,770,000,000,000,000,000,000,000,000 | 8 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
MessageType check_for_tiny_msg(uint8_t *buf)
{
return tiny_msg_poll_and_buffer(false, buf);
} | 0 | [
"CWE-787"
] | keepkey-firmware | b222c66cdd7c3203d917c80ba615082d309d80c3 | 275,210,035,102,789,830,000,000,000,000,000,000,000 | 4 | board: factor out tiny_dispatch
And add stronger checks on what tiny_msg's are allowed to be decoded. |
static void parseService4(const string &descr, ServiceTuple &st)
{
vector<string>parts;
stringtok(parts,descr,":");
if(parts.empty())
throw PDNSException("Unable to parse '"+descr+"' as a service");
st.host=parts[0];
if(parts.size()>1)
st.port=atoi(parts[1].c_str());
} | 0 | [
"CWE-399"
] | pdns | 881b5b03a590198d03008e4200dd00cc537712f3 | 177,677,915,560,404,440,000,000,000,000,000,000,000 | 10 | Reject qname's wirelength > 255, `chopOff()` handle dot inside labels |
longlong Item_null::val_int()
{
// following assert is redundant, because fixed=1 assigned in constructor
DBUG_ASSERT(fixed == 1);
null_value=1;
return 0;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 291,446,984,102,894,900,000,000,000,000,000,000,000 | 7 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
/* }}} */
static int php_date_timezone_initialize_from_hash(zval **return_value, php_timezone_obj **tzobj, HashTable *myht TSRMLS_DC)
{
zval **z_timezone = NULL;
zval **z_timezone_type = NULL;
if (zend_hash_find(myht, "timezone_type", 14, (void**) &z_timezone_type) == SUCCESS && Z_TYPE_PP(z_t... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 244,129,313,996,764,280,000,000,000,000,000,000,000 | 14 | 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(). |
ObjectGetPublicAttributes(
TPM_HANDLE handle
)
{
return HandleToObject(handle)->publicArea.objectAttributes;
} | 0 | [
"CWE-119"
] | libtpms | ea62fd9679f8c6fc5e79471b33cfbd8227bfed72 | 160,966,192,011,153,720,000,000,000,000,000,000,000 | 6 | tpm2: Initialize a whole OBJECT before using it
Initialize a whole OBJECT before using it. This is necessary since
an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT
union and that HASH_OBJECT can leave bad size inidicators in TPM2B
buffer in the OBJECT. To get rid of this problem we reset the whole
OBJECT... |
static int unix_stream_read_generic(struct unix_stream_read_state *state)
{
struct scm_cookie scm;
struct socket *sock = state->socket;
struct sock *sk = sock->sk;
struct unix_sock *u = unix_sk(sk);
int copied = 0;
int flags = state->flags;
int noblock = flags & MSG_DONTWAIT;
bool check_creds = false;
int targ... | 0 | [
"CWE-399"
] | linux | 415e3d3e90ce9e18727e8843ae343eda5a58fad6 | 167,562,394,775,437,500,000,000,000,000,000,000,000 | 194 | unix: correctly track in-flight fds in sending process user_struct
The commit referenced in the Fixes tag incorrectly accounted the number
of in-flight fds over a unix domain socket to the original opener
of the file-descriptor. This allows another process to arbitrary
deplete the original file-openers resource limit ... |
static int check_part_field(enum_field_types sql_type,
const char *field_name,
Item_result *result_type,
bool *need_cs_check)
{
if (sql_type >= MYSQL_TYPE_TINY_BLOB &&
sql_type <= MYSQL_TYPE_BLOB)
{
my_error(ER_BLOB_FIELD_... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 226,797,016,347,600,920,000,000,000,000,000,000,000 | 53 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
evbuffer_add_cb(struct evbuffer *buffer, evbuffer_cb_func cb, void *cbarg)
{
struct evbuffer_cb_entry *e;
if (! (e = mm_calloc(1, sizeof(struct evbuffer_cb_entry))))
return NULL;
EVBUFFER_LOCK(buffer);
e->cb.cb_func = cb;
e->cbarg = cbarg;
e->flags = EVBUFFER_CB_ENABLED;
LIST_INSERT_HEAD(&buffer->callbacks, e,... | 0 | [
"CWE-189"
] | libevent | 841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4 | 322,026,388,447,643,800,000,000,000,000,000,000,000 | 13 | Fix CVE-2014-6272 in Libevent 2.1
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
query_session_id (GSListener *listener)
{
DBusMessage *message;
DBusMessage *reply;
DBusError error;
DBusMessageIter reply_iter;
char *ssid;
if (listener->priv->system_connection == NULL) {
gs_debug ("No connection to the system bus"... | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 21,616,091,645,811,195,000,000,000,000,000,000,000 | 42 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
static int atusb_set_extended_addr(struct atusb *atusb)
{
struct usb_device *usb_dev = atusb->usb_dev;
unsigned char buffer[IEEE802154_EXTENDED_ADDR_LEN];
__le64 extended_addr;
u64 addr;
int ret;
/* Firmware versions before 0.3 do not support the EUI64_READ command.
* Just use a random address and be done */
... | 0 | [
"CWE-399",
"CWE-119"
] | linux | 05a974efa4bdf6e2a150e3f27dc6fcf0a9ad5655 | 90,467,653,316,408,560,000,000,000,000,000,000,000 | 36 | ieee802154: atusb: do not use the stack for buffers to make them DMA able
From 4.9 we should really avoid using the stack here as this will not be DMA
able on various platforms. This changes the buffers already being present in
time of 4.9 being released. This should go into stable as well.
Reported-by: Dan Carpenter... |
static void btrfs_close_one_device(struct btrfs_device *device)
{
struct btrfs_fs_devices *fs_devices = device->fs_devices;
if (test_bit(BTRFS_DEV_STATE_WRITEABLE, &device->dev_state) &&
device->devid != BTRFS_DEV_REPLACE_DEVID) {
list_del_init(&device->dev_alloc_list);
fs_devices->rw_devices--;
}
if (te... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 6,753,764,178,924,871,000,000,000,000,000,000,000 | 32 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
static void mkiss_receive_buf(struct tty_struct *tty, const unsigned char *cp,
const char *fp, int count)
{
struct mkiss *ax = mkiss_get(tty);
if (!ax)
return;
/*
* Argh! mtu change time! - costs us the packet part received
* at the change
*/
if (ax->mtu != ax->dev->mtu + 73)
ax_changedmtu(ax);
/* Re... | 0 | [
"CWE-416"
] | linux | b2f37aead1b82a770c48b5d583f35ec22aabb61e | 44,227,864,896,233,370,000,000,000,000,000,000,000 | 30 | hamradio: improve the incomplete fix to avoid NPD
The previous commit 3e0588c291d6 ("hamradio: defer ax25 kfree after
unregister_netdev") reorder the kfree operations and unregister_netdev
operation to prevent UAF.
This commit improves the previous one by also deferring the nullify of
the ax->tty pointer. Otherwise, ... |
BOOL IsVolumeClassFilterRegistered ()
{
UNICODE_STRING name;
NTSTATUS status;
BOOL registered = FALSE;
PKEY_VALUE_PARTIAL_INFORMATION data;
RtlInitUnicodeString (&name, L"\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Class\\{71A27CDD-812A-11D0-BEC7-08002BE2092F}");
status = TCReadRegistryKey (&name, ... | 0 | [
"CWE-119",
"CWE-787"
] | VeraCrypt | f30f9339c9a0b9bbcc6f5ad38804af39db1f479e | 136,473,140,945,765,290,000,000,000,000,000,000,000 | 33 | Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison. |
bool recovery_is_paused() {
Mutex::Locker l(recovery_lock);
return recovery_paused;
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 181,191,040,248,586,700,000,000,000,000,000,000,000 | 4 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
int addattr_nest_end(struct nlmsghdr *n, struct rtattr *nest)
{
nest->rta_len = (void *)NLMSG_TAIL(n) - (void *)nest;
return n->nlmsg_len;
} | 0 | [] | iproute2 | 8c50b728b226f6254251282697ce38a72639a6fc | 49,062,596,271,851,700,000,000,000,000,000,000,000 | 5 | libnetlink: fix use-after-free of message buf
In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically
allocated 'buf' that is used to store netlink messages. If netlink message
is an error message, buf is deallocated before returning with error code.
However, on return err->error code is checked one ... |
sent_string(const char *s)
{
bool sent = FALSE;
if (VALID_STRING(s)) {
tputs(s, 0, out_char);
sent = TRUE;
}
return sent;
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 25,743,166,858,144,464,000,000,000,000,000,000,000 | 9 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
static void check_spinlock_acquired(struct kmem_cache *cachep)
{
#ifdef CONFIG_SMP
check_irq_off();
assert_spin_locked(&get_node(cachep, numa_mem_id())->list_lock);
#endif
} | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 242,022,464,610,105,900,000,000,000,000,000,000,000 | 7 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
static int ec_status(struct t3cdev *tdev, struct sk_buff *skb, void *ctx)
{
struct cpl_rdma_ec_status *rep = cplhdr(skb);
struct iwch_ep *ep = ctx;
PDBG("%s ep %p tid %u status %d\n", __func__, ep, ep->hwtid,
rep->status);
if (rep->status) {
struct iwch_qp_attributes attrs;
printk(KERN_ERR MOD "%s BAD C... | 0 | [
"CWE-703"
] | linux | 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 | 220,501,013,172,857,100,000,000,000,000,000,000,000 | 21 | iw_cxgb3: Fix incorrectly returning error on success
The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off... |
ex_argdelete(exarg_T *eap)
{
int i;
int n;
if (check_arglist_locked() == FAIL)
return;
if (eap->addr_count > 0 || *eap->arg == NUL)
{
// ":argdel" works like ":.argdel"
if (eap->addr_count == 0)
{
if (curwin->w_arg_idx >= ARGCOUNT)
{
emsg(_("E610: No argument to delete"));
retu... | 0 | [
"CWE-416",
"CWE-125"
] | vim | 6f98371532fcff911b462d51bc64f2ce8a6ae682 | 175,403,071,372,435,900,000,000,000,000,000,000,000 | 54 | patch 8.2.3884: crash when clearing the argument list while using it
Problem: Crash when clearing the argument list while using it.
Solution: Lock the argument list for ":all". |
static void tcp_sack_maybe_coalesce(struct tcp_sock *tp)
{
int this_sack;
struct tcp_sack_block *sp = &tp->selective_acks[0];
struct tcp_sack_block *swalk = sp + 1;
/* See if the recent change to the first SACK eats into
* or hits the sequence space of other SACK blocks, if so coalesce.
*/
for (this_sack = 1;... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 276,389,026,177,530,700,000,000,000,000,000,000,000 | 24 | 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 int32_t virtio_net_rsc_coalesce4(VirtioNetRscChain *chain,
VirtioNetRscSeg *seg,
const uint8_t *buf, size_t size,
VirtioNetRscUnit *unit)
{
struct ip_header *ip1, *ip2;
ip1 = (struct i... | 0 | [
"CWE-703"
] | qemu | abe300d9d894f7138e1af7c8e9c88c04bfe98b37 | 169,389,273,192,896,450,000,000,000,000,000,000,000 | 18 | virtio-net: fix map leaking on error during receive
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
tries to fix the use after free of the sg by caching the virtqueue
elements in an array and unmap them at once after receiving the
packets, But it forgot to unmap the cached elements on error which
... |
load_header (XwdLoader *loader)
{
XwdHeader *h = &loader->header;
XwdHeader in;
const XwdHeader *inp;
if (!file_mapping_taste (loader->mapping, &in, 0, sizeof (in)))
return FALSE;
inp = ∈
UNPACK_FIELD_U32 (h, inp, header_size);
UNPACK_FIELD_U32 (h, inp, file_version);
UNPAC... | 0 | [
"CWE-125"
] | chafa | 56fabfa18a6880b4cb66047fa6557920078048d9 | 34,333,008,784,701,650,000,000,000,000,000,000,000 | 84 | XwdLoader: Fix buffer over-read and improve general robustness
This commit fixes a buffer over-read that could occur due to g_ntohl()
evaluating its argument more than once if at least one of the following
is true:
* Build target is not x86.
* __OPTIMIZE__ is not set during compilation (e.g. -O0 was used).
It also i... |
**/
CImgDisplay& flush() {
set_key().set_button().set_wheel();
_is_resized = _is_moved = _is_event = false;
_fps_timer = _fps_frames = _timer = 0;
_fps_fps = 0;
return *this; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 185,980,798,852,435,850,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
analyze_window_size_restore(GtkWidget *win)
{
GVariant *var;
const gint32 *xy;
gsize num;
if (!screen.settings)
return;
var = g_settings_get_value (screen.settings, "analyze-window-size");
xy = g_variant_get_fixed_array (var, &num, sizeof (*xy));
if (num == 2)
gtk_window_set_default_size (GTK_WINDOW (win),... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 223,053,126,688,571,420,000,000,000,000,000,000,000 | 21 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
GF_Err txtc_Read(GF_Box *s, GF_BitStream *bs)
{
GF_TextConfigBox *ptr = (GF_TextConfigBox*)s;
ptr->config = (char *)gf_malloc(sizeof(char)*((u32) ptr->size+1));
gf_bs_read_data(bs, ptr->config, (u32) ptr->size);
ptr->config[ptr->size] = 0;
return GF_OK; | 0 | [
"CWE-416"
] | gpac | 6063b1a011c3f80cee25daade18154e15e4c058c | 180,489,157,003,551,000,000,000,000,000,000,000,000 | 8 | fix UAF in audio_sample_entry_Read (#1440) |
ecma_stringbuilder_create (void)
{
const lit_utf8_size_t initial_size = ECMA_ASCII_STRING_HEADER_SIZE;
ecma_stringbuilder_header_t *header_p = (ecma_stringbuilder_header_t *) jmem_heap_alloc_block (initial_size);
header_p->current_size = initial_size;
#if JERRY_MEM_STATS
jmem_stats_allocate_string_bytes (initia... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 159,955,266,520,606,800,000,000,000,000,000,000,000 | 12 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static int dcbnl_pgrx_setcfg(struct net_device *netdev, struct nlmsghdr *nlh,
u32 seq, struct nlattr **tb, struct sk_buff *skb)
{
return __dcbnl_pg_setcfg(netdev, nlh, seq, tb, skb, 1);
} | 0 | [
"CWE-399"
] | linux-2.6 | 29cd8ae0e1a39e239a3a7b67da1986add1199fc0 | 259,578,777,139,313,030,000,000,000,000,000,000,000 | 5 | dcbnl: fix various netlink info leaks
The dcb netlink interface leaks stack memory in various places:
* perm_addr[] buffer is only filled at max with 12 of the 32 bytes but
copied completely,
* no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand,
so we're leaking up to 58 bytes for ieee_ets structs... |
static void scsi_cd_change_media_cb(void *opaque, bool load, Error **errp)
{
SCSIDiskState *s = opaque;
/*
* When a CD gets changed, we have to report an ejected state and
* then a loaded state to guests so that they detect tray
* open/close and media change events. Guests that do not use
... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 270,719,618,492,703,600,000,000,000,000,000,000,000 | 20 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
PHP_NAMED_FUNCTION(php_if_fopen)
{
char *filename, *mode;
int filename_len, mode_len;
zend_bool use_include_path = 0;
zval *zcontext = NULL;
php_stream *stream;
php_stream_context *context = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|br", &filename, &filename_len, &mode, &mode_len, &use_incl... | 1 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 262,642,966,987,272,040,000,000,000,000,000,000,000 | 23 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
ReportLedNotArray(CompatInfo *info, LedInfo *ledi, const char *field)
{
return ReportNotArray(info->ctx, "indicator map", field,
xkb_atom_text(info->ctx, ledi->led.name));
} | 0 | [
"CWE-476"
] | libxkbcommon | 96df3106d49438e442510c59acad306e94f3db4d | 7,793,556,541,196,842,000,000,000,000,000,000,000 | 5 | xkbcomp: Don't crash on no-op modmask expressions
If we have an expression of the form 'l1' in an interp section, we
unconditionally try to dereference its args, even if it has none.
Signed-off-by: Daniel Stone <daniels@collabora.com> |
static int inet_peer_gc(struct inet_peer_base *base,
struct inet_peer __rcu **stack[PEER_MAXDEPTH],
struct inet_peer __rcu ***stackptr)
{
struct inet_peer *p, *gchead = NULL;
__u32 delta, ttl;
int cnt = 0;
if (base->total >= inet_peer_threshold)
ttl = 0; /* be aggressive */
else
ttl = inet_peer_maxttl
... | 0 | [
"CWE-703"
] | linux | 87c48fa3b4630905f98268dde838ee43626a060c | 250,395,919,957,847,470,000,000,000,000,000,000,000 | 35 | ipv6: make fragment identifications less predictable
IPv6 fragment identification generation is way beyond what we use for
IPv4 : It uses a single generator. Its not scalable and allows DOS
attacks.
Now inetpeer is IPv6 aware, we can use it to provide a more secure and
scalable frag ident generator (per destination, ... |
resolve_identref(struct lys_type *type, const char *ident_name, struct lyd_node *node, struct lys_module *mod, int dflt)
{
const char *mod_name, *name;
char *str;
int mod_name_len, nam_len, rc;
int need_implemented = 0;
unsigned int i, j, found;
struct lys_ident *der = NULL, *cur;
struct lys... | 0 | [
"CWE-617"
] | libyang | 5ce30801f9ccc372bbe9b7c98bb5324b15fb010a | 292,100,440,487,183,580,000,000,000,000,000,000,000 | 217 | schema tree BUGFIX freeing nodes with no module set
Context must be passed explicitly for these cases.
Fixes #1452 |
xmlValidCtxtPtr xmlNewValidCtxt(void) {
xmlValidCtxtPtr ret;
if ((ret = xmlMalloc(sizeof (xmlValidCtxt))) == NULL) {
xmlVErrMemory(NULL, "malloc failed");
return (NULL);
}
(void) memset(ret, 0, sizeof (xmlValidCtxt));
return (ret);
} | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 30,678,364,417,934,333,000,000,000,000,000,000,000 | 12 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
fq_find(struct net *net, __be32 id, struct in6_addr *src, struct in6_addr *dst)
{
struct inet_frag_queue *q;
struct ip6_create_arg arg;
unsigned int hash;
arg.id = id;
arg.user = IP6_DEFRAG_LOCAL_DELIVER;
arg.src = src;
arg.dst = dst;
read_lock(&ip6_frags.lock);
hash = inet6_hash_frag(id, src, dst, ip6_frags... | 0 | [] | linux-2.6 | 70789d7052239992824628db8133de08dc78e593 | 184,128,587,370,352,140,000,000,000,000,000,000,000 | 20 | ipv6: discard overlapping fragment
RFC5722 prohibits reassembling fragments when some data overlaps.
Bug spotted by Zhang Zuotao <zuotao.zhang@6wind.com>.
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int mnt_fs_get_flags(struct libmnt_fs *fs)
{
return fs ? fs->flags : 0;
} | 0 | [
"CWE-552",
"CWE-703"
] | util-linux | 166e87368ae88bf31112a30e078cceae637f4cdb | 12,423,700,072,345,834,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... |
uint8_t* SerializeMapKeyWithCachedSizes(const FieldDescriptor* field,
const MapKey& value, uint8_t* target,
io::EpsCopyOutputStream* stream) {
target = stream->EnsureSpace(target);
switch (field->type()) {
case FieldDescriptor::TYPE... | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 134,802,545,192,938,180,000,000,000,000,000,000,000 | 36 | Apply patch |
static int snd_seq_ioctl_subscribe_port(struct snd_seq_client *client,
void __user *arg)
{
int result = -EINVAL;
struct snd_seq_client *receiver = NULL, *sender = NULL;
struct snd_seq_client_port *sport = NULL, *dport = NULL;
struct snd_seq_port_subscribe subs;
if (copy_from_user(&subs, arg, sizeof(subs)))
... | 0 | [
"CWE-703"
] | linux | 030e2c78d3a91dd0d27fef37e91950dde333eba1 | 285,444,283,409,854,370,000,000,000,000,000,000,000 | 40 | ALSA: seq: Fix missing NULL check at remove_events ioctl
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
unconditionally even if there is no FIFO assigned, and this leads to
an Oops due to NULL dereference. The fix is just to add a proper NULL
check.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by... |
static void my_reset_marker_reader(j_decompress_ptr dinfo)
{
} | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 318,603,385,341,352,100,000,000,000,000,000,000,000 | 3 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... |
GF_Err mdhd_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_MediaHeaderBox *ptr = (GF_MediaHeaderBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->version == 1) {
gf_bs_write_u64(bs, ptr->creationTime);
gf_bs_write_u64(bs, ptr->modificationTime);
gf_bs_write_u32(bs, ptr->timeScale);... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 262,243,174,959,335,340,000,000,000,000,000,000,000 | 25 | fixed #1587 |
static int update_child_status_internal(int child_num,
int thread_num,
int status,
conn_rec *c,
server_rec *s,
request_r... | 0 | [
"CWE-476"
] | httpd | fa7b2a5250e54363b3a6c8ac3aaa7de4e8da9b2e | 291,450,499,332,565,760,000,000,000,000,000,000,000 | 99 | Merge r1878092 from trunk:
Fix a NULL pointer dereference
* server/scoreboard.c (ap_increment_counts): In certain cases like certain
invalid requests r->method might be NULL here. r->method_number defaults
to M_GET and hence is M_GET in these cases.
Submitted by: rpluem
Reviewed by: covener, ylavic, jfclere
gi... |
htod16ap (PTPParams *params, unsigned char *a, uint16_t val)
{
if (params->byteorder==PTP_DL_LE)
htole16a(a,val);
else
htobe16a(a,val);
} | 0 | [
"CWE-190"
] | libgphoto2 | 203df81b9d97e820411e1eb94ae08139af73bbd0 | 258,634,572,270,533,400,000,000,000,000,000,000,000 | 7 | check for an integer overflow in ptp_unpack_OPL |
static int io_read(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_rw_state __s, *s = &__s;
struct iovec *iovec;
struct kiocb *kiocb = &req->rw.kiocb;
bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK;
struct io_async_rw *rw;
ssize_t ret, ret2;
loff_t *ppos;
if (!req_has_async_data(req)) {
... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 304,460,837,260,638,100,000,000,000,000,000,000,000 | 142 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
SAPI_API int sapi_flush(TSRMLS_D)
{
if (sapi_module.flush) {
sapi_module.flush(SG(server_context));
return SUCCESS;
} else {
return FAILURE;
}
} | 0 | [
"CWE-190",
"CWE-79"
] | php-src | 996faf964bba1aec06b153b370a7f20d3dd2bb8b | 38,612,308,966,999,907,000,000,000,000,000,000,000 | 9 | Update header handling to RFC 7230 |
template<typename T>
inline double cbrt(const T& x) {
#if cimg_use_cpp11==1
return std::cbrt(x);
#else
return x>=0?std::pow((double)x,1.0/3):-std::pow(-(double)x,1.0/3);
#endif | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 16,342,295,756,769,560,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
static ssize_t ppp_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct ppp_file *pf = file->private_data;
DECLARE_WAITQUEUE(wait, current);
ssize_t ret;
struct sk_buff *skb = NULL;
struct iovec iov;
struct iov_iter to;
ret = count;
if (!pf)
return -ENXIO;
add_wait_queue(&pf->r... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 202,180,201,782,236,760,000,000,000,000,000,000,000 | 64 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
CSessionManager() : m_mspSessions(24 * 60 * 60 * 1000), m_mIPSessions() {} | 0 | [
"CWE-22"
] | znc | a4a5aeeb17d32937d8c7d743dae9a4cc755ce773 | 70,255,307,587,686,110,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 char *handle_new_problem(GVariant *problem_info, uid_t caller_uid, char **error)
{
problem_data_t *pd = problem_data_new();
GVariantIter *iter;
g_variant_get(problem_info, "a{ss}", &iter);
gchar *key, *value;
while (g_variant_iter_loop(iter, "{ss}", &key, &value))
{
problem_data_... | 1 | [
"CWE-59"
] | abrt | 7417505e1d93cc95ec648b74e3c801bc67aacb9f | 336,884,137,112,807,960,000,000,000,000,000,000,000 | 32 | daemon, dbus: allow only root to create CCpp, Koops, vmcore and xorg
Florian Weimer <fweimer@redhat.com>:
This prevents users from feeding things that are not actually
coredumps and excerpts from /proc to these analyzers.
For example, it should not be possible to trigger a rule with
“EVENT=post-create... |
ecb_ews_remove_item_sync (ECalBackendEws *cbews,
ECalCache *cal_cache,
GHashTable *removed_indexes,
const gchar *uid,
const gchar *rid,
GCancellable *cancellable,
GError **error)
{
ECalComponent *comp = NULL, *parent = NULL;
EwsId item_id = { 0 };
gint index = 0;
gboolean success = TRU... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 71,755,779,658,768,230,000,000,000,000,000,000,000 | 65 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
void f2fs_wait_discard_bios(struct f2fs_sb_info *sbi)
{
__issue_discard_cmd(sbi, false);
__wait_discard_cmd(sbi, false);
} | 0 | [
"CWE-200",
"CWE-476"
] | linux | d4fdf8ba0e5808ba9ad6b44337783bd9935e0982 | 27,696,576,477,947,550,000,000,000,000,000,000,000 | 5 | f2fs: fix a panic caused by NULL flush_cmd_control
Mount fs with option noflush_merge, boot failed for illegal address
fcc in function f2fs_issue_flush:
if (!test_opt(sbi, FLUSH_MERGE)) {
ret = submit_flush_wait(sbi);
atomic_inc(&fcc->issued_flush); -> Here, fcc illegal
... |
connection_error(thread_t * thread)
{
smtp_t *smtp = THREAD_ARG(thread);
log_message(LOG_INFO, "SMTP connection ERROR to %s."
, FMT_SMTP_HOST());
free_smtp_all(smtp);
return 0;
} | 0 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 119,824,715,354,602,980,000,000,000,000,000,000,000 | 9 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
int qeth_hw_trap(struct qeth_card *card, enum qeth_diags_trap_action action)
{
struct qeth_cmd_buffer *iob;
struct qeth_ipa_cmd *cmd;
QETH_DBF_TEXT(SETUP, 2, "diagtrap");
iob = qeth_get_ipacmd_buffer(card, IPA_CMD_SET_DIAG_ASS, 0);
cmd = (struct qeth_ipa_cmd *)(iob->data+IPA_PDU_HEADER_SIZE);
cmd->data.diagass.s... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 310,764,706,280,363,730,000,000,000,000,000,000,000 | 28 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
TEST_F(OptimizePipeline, MixedMatchPushedDown) {
auto unpack = fromjson(
"{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: 'myMeta', "
"bucketMaxSpanSeconds: 3600}}");
auto pipeline = Pipeline::parse(
makeVector(unpack, fromjson("{$match: {myMeta: {$gte: 0, $lte: 5},... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 284,742,065,896,778,770,000,000,000,000,000,000,000 | 23 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
static int longest_path_match(const char *name_a, int len_a,
const char *name_b, int len_b,
int *previous_slash)
{
int max_len, match_len = 0, match_len_prev = 0, i = 0;
max_len = len_a < len_b ? len_a : len_b;
while (i < max_len && name_a[i] == name_b[i]) {
if (name_a[i] == '/') {
match_len_... | 0 | [
"CWE-59",
"CWE-61"
] | git | 684dd4c2b414bcf648505e74498a608f28de4592 | 316,240,068,120,392,770,000,000,000,000,000,000,000 | 27 | checkout: fix bug that makes checkout follow symlinks in leading path
Before checking out a file, we have to confirm that all of its leading
components are real existing directories. And to reduce the number of
lstat() calls in this process, we cache the last leading path known to
contain only directories. However, wh... |
setup_called_state_call(Node* node, int state)
{
switch (NODE_TYPE(node)) {
case NODE_ALT:
state |= IN_ALT;
/* fall */
case NODE_LIST:
do {
setup_called_state_call(NODE_CAR(node), state);
} while (IS_NOT_NULL(node = NODE_CDR(node)));
break;
case NODE_QUANT:
{
QuantNode* qn =... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 245,292,908,306,615,330,000,000,000,000,000,000,000 | 83 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
Item_outer_ref(Name_resolution_context *context_arg, Item **item,
const char *table_name_arg, const char *field_name_arg,
bool alias_name_used_arg)
:Item_direct_ref(context_arg, item, table_name_arg, field_name_arg,
alias_name_used_arg),
outer_ref(0), in_... | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 65,577,105,075,726,980,000,000,000,000,000,000,000 | 7 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
void beginFetchPhaseNoYield() {
fassert(17191, !_authzManager->_isFetchPhaseBusy);
_isThisGuardInFetchPhase = true;
_authzManager->_isFetchPhaseBusy = true;
_startGeneration = _authzManager->_fetchGeneration;
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 170,813,222,573,470,700,000,000,000,000,000,000,000 | 6 | SERVER-38984 Validate unique User ID on UserCache hit |
cached_resolves_eq(cached_resolve_t *a, cached_resolve_t *b)
{
/* make this smarter one day? */
assert_resolve_ok(a); // Not b; b may be just a search.
return !strncmp(a->address, b->address, MAX_ADDRESSLEN);
} | 0 | [
"CWE-399"
] | tor | 62637fa22405278758febb1743da9af562524d4c | 57,299,720,236,586,185,000,000,000,000,000,000,000 | 6 | Avoid hard (impossible?)-to-trigger double-free in dns_resolve()
Fixes 6480; fix on 0.2.0.1-alpha; based on pseudonymous patch. |
QList<QSslCertificate> OpenConnectionTask::sslCertificateChain() const
{
return m_sslChain;
} | 0 | [
"CWE-200"
] | trojita | 25fffa3e25cbad85bbca804193ad336b090a9ce1 | 163,956,367,511,143,680,000,000,000,000,000,000,000 | 4 | IMAP: refuse to work when STARTTLS is required but server sends PREAUTH
Oops, we cannot send STARTTLS when the connection is already authenticated.
This is serious enough to warrant an error; an attacker might be going after a
plaintext of a message we're going to APPEND, etc.
Thanks to Arnt Gulbrandsen on the imap-p... |
static void netdev_init_queue_locks(struct net_device *dev)
{
netdev_for_each_tx_queue(dev, __netdev_init_queue_locks_one, NULL);
__netdev_init_queue_locks_one(dev, &dev->rx_queue, NULL);
} | 0 | [
"CWE-399"
] | linux | 6ec82562ffc6f297d0de36d65776cff8e5704867 | 53,921,196,201,955,690,000,000,000,000,000,000,000 | 5 | veth: Dont kfree_skb() after dev_forward_skb()
In case of congestion, netif_rx() frees the skb, so we must assume
dev_forward_skb() also consume skb.
Bug introduced by commit 445409602c092
(veth: move loopback logic to common location)
We must change dev_forward_skb() to always consume skb, and veth to not
double fr... |
int mysql_init_character_set(MYSQL *mysql)
{
/* Set character set */
if (!mysql->options.charset_name)
{
if (!(mysql->options.charset_name=
my_strdup(MYSQL_DEFAULT_CHARSET_NAME,MYF(MY_WME))))
return 1;
}
else if (!strcmp(mysql->options.charset_name,
MYSQL_AUTODETECT_CHARSE... | 0 | [
"CWE-254"
] | server | f0d774d48416bb06063184380b684380ca005a41 | 256,605,817,256,398,000,000,000,000,000,000,000,000 | 36 | MDEV-9212 ssl-validate-cert incorrect hostname check
Reimplement ssl_verify_server_cert() using the logic
from https://wiki.openssl.org/index.php/Hostname_validation
The bug was discovered by Alex Gaynor. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.