func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
process_cookie(ns_client_t *client, isc_buffer_t *buf, size_t optlen) {
ns_altsecret_t *altsecret;
unsigned char dbuf[COOKIE_SIZE];
unsigned char *old;
isc_stdtime_t now;
uint32_t when;
uint32_t nonce;
isc_buffer_t db;
/*
* If we have already seen a cookie option skip this cookie option.
*/
if ((!client->... | 0 | [
"CWE-617"
] | bind9 | 15996f0cb15631b95a801e3e88928494a69ad6ee | 69,563,406,695,543,710,000,000,000,000,000,000,000 | 90 | ns_client_error() could assert if rcode was overridden to NOERROR
The client->rcode_override was originally created to force the server
to send SERVFAIL in some cases when it would normally have sent FORMERR.
More recently, it was used in a3ba95116ed04594ea59a8124bf781b30367a7a2
commit (part of GL #2790) to force the... |
static Bool parse_short_term_ref_pic_set(GF_BitStream *bs, HEVC_SPS *sps, u32 idx_rps)
{
u32 i;
Bool inter_ref_pic_set_prediction_flag = 0;
if (idx_rps != 0)
inter_ref_pic_set_prediction_flag = gf_bs_read_int(bs, 1);
if (inter_ref_pic_set_prediction_flag ) {
HEVC_ReferencePictureSets *ref_ps, *rps;
u32 delta... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 234,712,170,647,460,260,000,000,000,000,000,000,000 | 75 | fix some exploitable overflows (#994, #997) |
kvm_eventfd_init(struct kvm *kvm)
{
#ifdef CONFIG_HAVE_KVM_IRQFD
spin_lock_init(&kvm->irqfds.lock);
INIT_LIST_HEAD(&kvm->irqfds.items);
INIT_LIST_HEAD(&kvm->irqfds.resampler_list);
mutex_init(&kvm->irqfds.resampler_lock);
#endif
INIT_LIST_HEAD(&kvm->ioeventfds);
} | 0 | [
"CWE-20",
"CWE-617"
] | linux | 36ae3c0a36b7456432fedce38ae2f7bd3e01a563 | 138,333,823,523,632,660,000,000,000,000,000,000,000 | 10 | 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... |
ecEncCtx* wc_ecc_ctx_new_ex(int flags, WC_RNG* rng, void* heap)
{
int ret = 0;
ecEncCtx* ctx = (ecEncCtx*)XMALLOC(sizeof(ecEncCtx), heap,
DYNAMIC_TYPE_ECC);
if (ctx) {
ctx->protocol = (byte)flags;
ctx->heap = heap;
... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 310,745,095,536,365,560,000,000,000,000,000,000,000 | 19 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
xsltParseStylesheetImport(xsltStylesheetPtr style, xmlNodePtr cur) {
int ret = -1;
xmlDocPtr import = NULL;
xmlChar *base = NULL;
xmlChar *uriRef = NULL;
xmlChar *URI = NULL;
xsltStylesheetPtr res;
xsltSecurityPrefsPtr sec;
if ((cur == NULL) || (style == NULL))
return (ret);
uriRe... | 1 | [] | libxslt | e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 | 42,538,628,651,514,160,000,000,000,000,000,000,000 | 85 | Fix security framework bypass
xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
don't check for this condition and allow access. With a specially
crafted URL, xsltCheckRead could be tricked into returning an error
because of a supposedly invalid URL that would still be loaded
succesfully later on... |
int mg_http_parse(const char *s, size_t len, struct mg_http_message *hm) {
int is_response, req_len = mg_http_get_request_len((unsigned char *) s, len);
const char *end = s + req_len, *qs;
struct mg_str *cl;
memset(hm, 0, sizeof(*hm));
if (req_len <= 0) return req_len;
hm->message.ptr = hm->head.ptr = s;
... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 280,732,794,883,911,000,000,000,000,000,000,000,000 | 65 | Protect against the directory traversal in mg_upload() |
static void ConvertVectorsToMatrices(
const OpInputList bucketized_features_list,
std::vector<tensorflow::TTypes<int32>::ConstMatrix>& bucketized_features) {
for (const Tensor& tensor : bucketized_features_list) {
if (tensor.dims() == 1) {
const auto v = tensor.vec<int32>();
bucketized_feature... | 0 | [
"CWE-703",
"CWE-197"
] | tensorflow | ca8c013b5e97b1373b3bb1c97ea655e69f31a575 | 144,598,157,356,585,770,000,000,000,000,000,000,000 | 13 | Prevent integer truncation from 64 to 32 bits.
The `tensorflow::Shard` functions last argument must be a 2 argument function where both arguments are `int64` (`long long`, 64 bits). However, there are usages where code passes in a function where arguments are `int` or `int32` (32 bits). In these cases, it is possible ... |
void _map_window() {
Display *const dpy = cimg::X11_attr().display;
bool is_exposed = false, is_mapped = false;
XWindowAttributes attr;
XEvent event;
XMapRaised(dpy,_window);
do { // Wait for the window to be mapped
XWindowEvent(dpy,_window,StructureNotifyMask | Exposure... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 58,284,481,412,935,360,000,000,000,000,000,000,000 | 20 | . |
snmp_synch_response_cb(netsnmp_session * ss,
netsnmp_pdu *pdu,
netsnmp_pdu **response, snmp_callback pcb)
{
struct synch_state lstate, *state;
snmp_callback cbsav;
void *cbmagsav;
int numfds, count;
netsnmp_la... | 0 | [
"CWE-415"
] | net-snmp | 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 | 282,234,886,353,338,600,000,000,000,000,000,000,000 | 80 | libsnmp, USM: Introduce a reference count in struct usmStateReference
This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. |
TIFFWriteDirectoryTagCheckedSlong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, int64* value)
{
assert(count<0x20000000);
assert(sizeof(int64)==8);
assert(tif->tif_flags&TIFF_BIGTIFF);
if (tif->tif_flags&TIFF_SWAB)
TIFFSwabArrayOfLong8((uint64*)value,count);
return(TIFFWriteDirector... | 0 | [
"CWE-20"
] | libtiff | 3144e57770c1e4d26520d8abee750f8ac8b75490 | 173,218,067,503,924,500,000,000,000,000,000,000,000 | 9 | * libtiff/tif_dir.c, tif_dirread.c, tif_dirwrite.c: implement various clampings
of double to other data types to avoid undefined behaviour if the output range
isn't big enough to hold the input value.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2643
http://bugzilla.maptools.org/show_bug.cgi?id=2642
http://bugzil... |
static struct net_bridge_mdb_entry *br_multicast_get_group(
struct net_bridge *br, struct net_bridge_port *port,
struct br_ip *group, int hash)
{
struct net_bridge_mdb_htable *mdb;
struct net_bridge_mdb_entry *mp;
struct hlist_node *p;
unsigned count = 0;
unsigned max;
int elasticity;
int err;
mdb = rcu_dere... | 0 | [
"CWE-399"
] | linux | 6b0d6a9b4296fa16a28d10d416db7a770fc03287 | 15,284,612,578,552,806,000,000,000,000,000,000,000 | 73 | bridge: Fix mglist corruption that leads to memory corruption
The list mp->mglist is used to indicate whether a multicast group
is active on the bridge interface itself as opposed to one of the
constituent interfaces in the bridge.
Unfortunately the operation that adds the mp->mglist node to the
list neglected to che... |
static int propfind_restype(const xmlChar *name, xmlNsPtr ns,
struct propfind_ctx *fctx,
xmlNodePtr resp,
struct propstat propstat[],
void *rock __attribute__((unused)))
{
xmlNodePtr node = xml_add_prop(HTTP_OK, fctx->ns[NS_DAV],
&propstat[PROPSTAT_OK], name, ns, NULL, 0);
if... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 77,664,367,494,400,640,000,000,000,000,000,000,000 | 31 | HTTP: don't overrun buffer when parsing strings with sscanf() |
BOOL nego_recv_response(rdpNego* nego)
{
int status;
wStream* s;
s = Stream_New(NULL, 1024);
if (!s)
{
WLog_ERR(TAG, "Stream_New failed!");
return FALSE;
}
status = transport_read_pdu(nego->transport, s);
if (status < 0)
{
Stream_Free(s, TRUE);
return FALSE;
}
status = nego_recv(nego->transport, ... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 268,050,299,352,231,380,000,000,000,000,000,000,000 | 28 | Fixed oob read in irp_write and similar |
static int nfp_flower_sriov_enable(struct nfp_app *app, int num_vfs)
{
struct nfp_flower_priv *priv = app->priv;
if (!priv->nn)
return 0;
return nfp_flower_spawn_vnic_reprs(app,
NFP_FLOWER_CMSG_PORT_VNIC_TYPE_VF,
NFP_REPR_TYPE_VF, num_vfs);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 8572cea1461a006bce1d06c0c4b0575869125fa4 | 38,951,482,155,560,894,000,000,000,000,000,000,000 | 11 | nfp: flower: prevent memory leak in nfp_flower_spawn_phy_reprs
In nfp_flower_spawn_phy_reprs, in the for loop over eth_tbl if any of
intermediate allocations or initializations fail memory is leaked.
requiered releases are added.
Fixes: b94524529741 ("nfp: flower: add per repr private data for LAG offload")
Signed-of... |
static int snd_ctl_elem_user_tlv(struct snd_kcontrol *kcontrol,
int op_flag,
unsigned int size,
unsigned int __user *tlv)
{
struct user_element *ue = kcontrol->private_data;
int change = 0;
void *new_data;
if (op_flag > 0) {
if (size > 1024 * 128) /* sane value */
return -EINVAL;
new_data = ... | 1 | [
"CWE-362",
"CWE-399"
] | linux | 07f4d9d74a04aa7c72c5dae0ef97565f28f17b92 | 275,738,377,376,799,750,000,000,000,000,000,000,000 | 32 | ALSA: control: Protect user controls against concurrent access
The user-control put and get handlers as well as the tlv do not protect against
concurrent access from multiple threads. Since the state of the control is not
updated atomically it is possible that either two write operations or a write
and a read operatio... |
static int bpf_btf_load(const union bpf_attr *attr)
{
if (CHECK_ATTR(BPF_BTF_LOAD))
return -EINVAL;
if (!bpf_capable())
return -EPERM;
return btf_new_fd(attr);
} | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 289,415,696,704,985,170,000,000,000,000,000,000,000 | 10 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
static void print_line(char* line)
{
while (*line && *line != '\n')
{
fputc(*line, stderr);
line++;
}
fputc('\n', stderr);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 277,817,600,994,043,200,000,000,000,000,000,000,000 | 9 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
do_dcs(void)
{
// Implemented:
// DECRQSS (Request Status String)
// DECAUPSS (Assign User-Preferred Supplemental Set)
// DECSIXEL
// No DECUDK (User-Defined Keys) or xterm termcap/terminfo data.
char *s = term.cmd_buf;
if (!term.cmd_len)
*s = 0;
switch (term.dcs_cmd) {
when CPAIR('!', 'u'): /... | 0 | [
"CWE-703",
"CWE-770"
] | mintty | bd52109993440b6996760aaccb66e68e782762b9 | 179,499,562,271,018,370,000,000,000,000,000,000,000 | 292 | tame some window operations, just in case |
attach_pending_entry_connections_cb(mainloop_event_t *ev, void *arg)
{
(void)ev;
(void)arg;
connection_ap_attach_pending(0);
} | 0 | [
"CWE-532"
] | tor | 80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9 | 171,846,604,982,342,160,000,000,000,000,000,000,000 | 6 | Log warning when connecting to soon-to-be-deprecated v2 onions. |
static gboolean udp4_listener_event(GIOChannel *channel, GIOCondition condition,
gpointer user_data)
{
struct listener_data *ifdata = user_data;
return udp_listener_event(channel, condition, ifdata, AF_INET,
&ifdata->udp4_listener_watch);
} | 0 | [
"CWE-119"
] | connman | 5c281d182ecdd0a424b64f7698f32467f8f67b71 | 336,248,983,432,195,330,000,000,000,000,000,000,000 | 8 | dnsproxy: Fix crash on malformed DNS response
If the response query string is malformed, we might access memory
pass the end of "name" variable in parse_response(). |
const Hashes& sslHashes::get_certVerify() const
{
return certVerify_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 245,921,591,440,358,050,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
DeepScanLineInputFile::~DeepScanLineInputFile ()
{
if (_data->_deleteStream)
delete _data->_streamData->is;
if (_data)
{
if (!_data->memoryMapped)
for (size_t i = 0; i < _data->lineBuffers.size(); i++)
delete [] _data->lineBuffers[i]->buffer;
//
... | 1 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 294,344,434,220,212,100,000,000,000,000,000,000,000 | 28 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
long long ustime(void) {
struct timeval tv;
long long ust;
gettimeofday(&tv, NULL);
ust = ((long long)tv.tv_sec)*1000000;
ust += tv.tv_usec;
return ust;
} | 0 | [
"CWE-770"
] | redis | 5674b0057ff2903d43eaff802017eddf37c360f8 | 51,894,437,171,416,790,000,000,000,000,000,000,000 | 9 | 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... |
xmlSchemaSAXHandleStartElementNs(void *ctx,
const xmlChar * localname,
const xmlChar * prefix ATTRIBUTE_UNUSED,
const xmlChar * URI,
int nb_namespaces,
const xmlChar ** namespaces,
int nb_attributes,
int nb_defaulted ATTRIBUTE_UNUSED,
const xmlChar ** attributes)
{
xmlSchemaV... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 182,894,037,550,523,080,000,000,000,000,000,000,000 | 144 | 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. |
msg_puts_title(char *s)
{
msg_puts_attr(s, HL_ATTR(HLF_T));
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 338,321,489,813,187,530,000,000,000,000,000,000,000 | 4 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
int luaRedisSha1hexCommand(lua_State *lua) {
int argc = lua_gettop(lua);
char digest[41];
size_t len;
char *s;
if (argc != 1) {
lua_pushstring(lua, "wrong number of arguments");
return lua_error(lua);
}
s = (char*)lua_tolstring(lua,1,&len);
sha1hex(digest,s,len);
lu... | 0 | [
"CWE-703",
"CWE-125"
] | redis | 6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd | 131,199,443,083,203,370,000,000,000,000,000,000,000 | 16 | Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672)
The protocol parsing on 'ldbReplParseCommand' (LUA debugging)
Assumed protocol correctness. This means that if the following
is given:
*1
$100
test
The parser will try to read additional 94 unallocated bytes after
the client buffer.
This commit fixes this ... |
reverse_nat_packet(struct dp_packet *pkt, const struct conn *conn)
{
char *tail = dp_packet_tail(pkt);
uint8_t pad = dp_packet_l2_pad_size(pkt);
struct conn_key inner_key;
const char *inner_l4 = NULL;
uint16_t orig_l3_ofs = pkt->l3_ofs;
uint16_t orig_l4_ofs = pkt->l4_ofs;
if (conn->key.dl_t... | 1 | [
"CWE-400"
] | ovs | 35c280072c1c3ed58202745b7d27fbbd0736999b | 243,784,179,096,545,000,000,000,000,000,000,000,000 | 63 | 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... |
TPMI_ALG_ECC_SCHEME_Unmarshal(TPMI_ALG_ECC_SCHEME *target, BYTE **buffer, INT32 *size, BOOL allowNull)
{
TPM_RC rc = TPM_RC_SUCCESS;
TPMI_ALG_ECC_SCHEME orig_target = *target; // libtpms added
if (rc == TPM_RC_SUCCESS) {
rc = TPM_ALG_ID_Unmarshal(target, buffer, size);
}
if (rc == TPM_RC_SUCCESS... | 0 | [
"CWE-787"
] | libtpms | 5cc98a62dc6f204dcf5b87c2ee83ac742a6a319b | 61,617,175,963,765,590,000,000,000,000,000,000,000 | 40 | tpm2: Restore original value if unmarshalled value was illegal
Restore the original value of the memory location where data from
a stream was unmarshalled and the unmarshalled value was found to
be illegal. The goal is to not keep illegal values in memory.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
void ConnectionImpl::onResetStreamBase(StreamResetReason reason) {
ASSERT(!reset_stream_called_);
reset_stream_called_ = true;
onResetStream(reason);
} | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 220,577,967,067,008,420,000,000,000,000,000,000,000 | 5 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
void remove_from_page_cache(struct page *page)
{
struct address_space *mapping = page->mapping;
BUG_ON(!PageLocked(page));
spin_lock_irq(&mapping->tree_lock);
__remove_from_page_cache(page);
spin_unlock_irq(&mapping->tree_lock);
} | 0 | [
"CWE-193"
] | linux-2.6 | 94ad374a0751f40d25e22e036c37f7263569d24c | 241,249,323,538,195,550,000,000,000,000,000,000,000 | 10 | Fix off-by-one error in iov_iter_advance()
The iov_iter_advance() function would look at the iov->iov_len entry
even though it might have iterated over the whole array, and iov was
pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a
kernel page fault if the allocation was at the end of a page, and th... |
bytes_fromhex_impl(PyTypeObject *type, PyObject *string)
/*[clinic end generated code: output=0973acc63661bb2e input=bf4d1c361670acd3]*/
{
PyObject *newstring;
char *buf;
Py_ssize_t hexlen, byteslen, i, j;
int top, bot;
void *data;
unsigned int kind;
assert(PyUnicode_Check(string));
if ... | 0 | [
"CWE-190"
] | cpython | fd8614c5c5466a14a945db5b059c10c0fb8f76d9 | 56,819,761,174,125,950,000,000,000,000,000,000,000 | 46 | bpo-30657: Fix CVE-2017-1000158 (#4664)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
Linker* PackLinuxElf32x86::newLinker() const
{
return new ElfLinkerX86;
} | 0 | [
"CWE-476"
] | upx | ef336dbcc6dc8344482f8cf6c909ae96c3286317 | 146,174,642,242,806,260,000,000,000,000,000,000,000 | 4 | Protect against bad crafted input.
https://github.com/upx/upx/issues/128
modified: p_lx_elf.cpp |
void PlayerGeneric::setMasterVolume(mp_sint32 vol)
{
masterVolume = vol;
if (player)
player->setMasterVolume(vol);
} | 0 | [
"CWE-416"
] | MilkyTracker | 7afd55c42ad80d01a339197a2d8b5461d214edaf | 244,420,812,152,325,700,000,000,000,000,000,000,000 | 6 | Fix use-after-free in PlayerGeneric destructor |
int ssl3_get_client_hello(SSL *s)
{
int i, j, ok, al, ret = -1;
unsigned int cookie_len;
long n;
unsigned long id;
unsigned char *p, *d, *q;
SSL_CIPHER *c;
#ifndef OPENSSL_NO_COMP
SSL_COMP *comp = NULL;
#endif
STACK_OF(SSL_CIPHER) *ciphers = NULL;
/*
* We do this so that we wil... | 0 | [] | openssl | 1392c238657ec745af6a40def03d67d4ce02a082 | 181,428,057,863,667,530,000,000,000,000,000,000,000 | 526 | Fix PSK handling.
The PSK identity hint should be stored in the SSL_SESSION structure
and not in the parent context (which will overwrite values used
by other SSL structures with the same SSL_CTX).
Use BUF_strndup when copying identity as it may not be null terminated.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cher... |
virDomainSetTime(virDomainPtr dom,
long long seconds,
unsigned int nseconds,
unsigned int flags)
{
VIR_DOMAIN_DEBUG(dom, "seconds=%lld, nseconds=%u, flags=%x",
seconds, nseconds, flags);
virResetLastError();
virCheckDomainReturn(dom, ... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 110,293,873,954,293,750,000,000,000,000,000,000,000 | 27 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
read_cups_files_conf(cups_file_t *fp) /* I - File to read from */
{
int i, /* Looping var */
linenum; /* Current line number */
char line[HTTP_MAX_BUFFER], /* Line from file */
*value; /* Value from line */
struct group *group; /* Group */
static const char * const prohibited_env[] =
{ /* Pro... | 0 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 39,830,376,392,441,490,000,000,000,000,000,000,000 | 293 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
GC_INNER void GC_setpagesize(void)
{
# if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(USE_MMAP)
GC_page_size = GETPAGESIZE();
if (!GC_page_size) ABORT("getpagesize failed");
# else
/* It's acceptable to fake it. */
GC_page_size = HBLKSIZE;
# endif
} | 1 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 48,184,684,668,835,490,000,000,000,000,000,000,000 | 10 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
int read_super_2(squashfs_operations **s_ops, void *s)
{
squashfs_super_block_3 *sBlk_3 = s;
if(sBlk_3->s_magic != SQUASHFS_MAGIC || sBlk_3->s_major != 2 ||
sBlk_3->s_minor > 1)
return -1;
sBlk.s.s_magic = sBlk_3->s_magic;
sBlk.s.inodes = sBlk_3->inodes;
sBlk.s.mkfs_time = sBlk_3->mkfs_time;
sBlk.s.bl... | 1 | [
"CWE-200",
"CWE-59",
"CWE-22"
] | squashfs-tools | e0485802ec72996c20026da320650d8362f555bd | 8,840,025,808,340,767,000,000,000,000,000,000,000 | 37 | Unsquashfs: additional write outside destination directory exploit fix
An issue on github (https://github.com/plougher/squashfs-tools/issues/72)
showed how some specially crafted Squashfs filesystems containing
invalid file names (with '/' and '..') can cause Unsquashfs to write
files outside of the destination direct... |
JSObject *create(JSContext *cx, HandleObject self, Mode mode, HandleObject owner,
HandleValue initv) {
RootedObject headers(cx, create(cx, self, mode, owner));
if (!headers)
return nullptr;
bool consumed = false;
if (!maybe_consume_sequence_or_record<detail::append_header_value>(cx, initv,... | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 63,327,196,906,957,970,000,000,000,000,000,000,000 | 19 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
static Image *ReadPICTImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
#define ThrowPICTException(exception,message) \
{ \
if (tile_image != (Image *) NULL) \
tile_image=DestroyImage(tile_image); \
if (read_info != (ImageInfo *) NULL) \
read_info=DestroyImageInfo(read_info); \
ThrowReaderE... | 1 | [
"CWE-252"
] | ImageMagick6 | 11d9dac3d991c62289d1ef7a097670166480e76c | 8,549,124,370,999,496,000,000,000,000,000,000,000 | 724 | https://github.com/ImageMagick/ImageMagick/issues/1199 |
static int proc_pident_readdir(struct file *file, struct dir_context *ctx,
const struct pid_entry *ents, unsigned int nents)
{
struct task_struct *task = get_proc_task(file_inode(file));
const struct pid_entry *p;
if (!task)
return -ENOENT;
if (!dir_emit_dots(file, ctx))
goto out;
if (ctx->pos >= nents + ... | 0 | [
"CWE-119"
] | linux | 7f7ccc2ccc2e70c6054685f5e3522efa81556830 | 307,987,316,801,387,220,000,000,000,000,000,000,000 | 25 | proc: do not access cmdline nor environ from file-backed areas
proc_pid_cmdline_read() and environ_read() directly access the target
process' VM to retrieve the command line and environment. If this
process remaps these areas onto a file via mmap(), the requesting
process may experience various issues such as extra de... |
static ssize_t acpi_table_oem_table_id_show(struct config_item *cfg, char *str)
{
struct acpi_table_header *h = get_header(cfg);
if (!h)
return -EINVAL;
return sprintf(str, "%.*s\n", ACPI_OEM_TABLE_ID_SIZE, h->oem_table_id);
} | 0 | [
"CWE-862"
] | linux | 75b0cea7bf307f362057cc778efe89af4c615354 | 293,429,847,349,226,600,000,000,000,000,000,000,000 | 9 | ACPI: configfs: Disallow loading ACPI tables when locked down
Like other vectors already patched, this one here allows the root
user to load ACPI tables, which enables arbitrary physical address
writes, which in turn makes it possible to disable lockdown.
Prevents this by checking the lockdown status before allowing ... |
static void js_defvar(js_State *J, const char *name)
{
jsR_defproperty(J, J->E->variables, name, JS_DONTENUM | JS_DONTCONF, NULL, NULL, NULL);
} | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 264,005,704,300,937,080,000,000,000,000,000,000,000 | 4 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
g_file_real_set_attributes_async (GFile *file,
GFileInfo *info,
GFileQueryInfoFlags flags,
int io_priority,
GCancellable *cancellable,
... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 66,043,660,217,081,490,000,000,000,000,000,000,000 | 23 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static int process_text(ASS_Track *track, char *str)
{
char *p = str;
while (1) {
char *q;
while (1) {
if ((*p == '\r') || (*p == '\n'))
++p;
else if (p[0] == '\xef' && p[1] == '\xbb' && p[2] == '\xbf')
p += 3; // U+FFFE (BOM)
... | 0 | [
"CWE-369",
"CWE-787"
] | libass | 017137471d0043e0321e377ed8da48e45a3ec632 | 140,979,223,776,216,840,000,000,000,000,000,000,000 | 29 | decode_font: fix subtraction broken by change to unsigned type
This caused a one-byte buffer overwrite and an assertion failure.
Regression in commit 910211f1c0078e37546f73e95306724358b89be2.
Discovered by OSS-Fuzz.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674.
Fixes https://bugs.chromium.org/p... |
ZEND_VM_HANDLER(96, ZEND_FETCH_DIM_UNSET, VAR|CV, CONST|TMPVAR|CV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *container;
SAVE_OPLINE();
container = GET_OP1_ZVAL_PTR_PTR_UNDEF(BP_VAR_UNSET);
zend_fetch_dimension_address_UNSET(container, GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R), OP2_TYPE OPLINE_CC EXECUTE_DATA_CC... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 105,743,517,961,228,670,000,000,000,000,000,000,000 | 16 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
main (int argc, char **argv)
{
int last_argc = -1;
gpg_error_t err;
int rc; parsed_uri_t uri;
uri_tuple_t r;
http_t hd;
int c;
unsigned int my_http_flags = 0;
int no_out = 0;
int tls_dbg = 0;
int no_crl = 0;
const char *cafile = NULL;
http_session_t session = NULL;
unsigned int timeout = 0;
... | 0 | [
"CWE-352"
] | gnupg | 4a4bb874f63741026bd26264c43bb32b1099f060 | 135,775,384,681,152,200,000,000,000,000,000,000,000 | 305 | 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... |
static void k_shift(struct vc_data *vc, unsigned char value, char up_flag)
{
int old_state = shift_state;
if (rep)
return;
/*
* Mimic typewriter:
* a CapsShift key acts like Shift but undoes CapsLock
*/
if (value == KVAL(K_CAPSSHIFT)) {
value = KVAL(K_SHIFT);
if (!up_flag)
clr_vc_kbd_led(kbd, VC_CAP... | 1 | [
"CWE-190"
] | linux | b86dab054059b970111b5516ae548efaae5b3aae | 198,264,764,006,323,200,000,000,000,000,000,000,000 | 40 | vt: keyboard: avoid signed integer overflow in k_ascii
When k_ascii is invoked several times in a row there is a potential for
signed integer overflow:
UBSAN: Undefined behaviour in drivers/tty/vt/keyboard.c:888:19 signed integer overflow:
10 * 1111111111 cannot be represented in type 'int'
CPU: 0 PID: 0 Comm: swappe... |
virtual bool maintenanceOk() const {
return false;
} | 0 | [
"CWE-20"
] | mongo | 5c7c6729c37514760fd34da462b6961a2e385417 | 275,211,029,182,359,400,000,000,000,000,000,000,000 | 3 | SERVER-38275 ban explain with UUID |
struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
int noblock, int *err)
{
int error;
struct sk_buff *skb;
long timeo;
timeo = sock_rcvtimeo(sk, noblock);
pr_debug("%s: timeo:%ld, max:%ld\n", __func__, timeo,
MAX_SCHEDULE_TIMEOUT);
do {
/* Again only user level code calls this ... | 0 | [
"CWE-362",
"CWE-703"
] | linux | 2d45a02d0166caf2627fe91897c6ffc3b19514c4 | 162,629,754,220,409,710,000,000,000,000,000,000,000 | 57 | sctp: fix ASCONF list handling
->auto_asconf_splist is per namespace and mangled by functions like
sctp_setsockopt_auto_asconf() which doesn't guarantee any serialization.
Also, the call to inet_sk_copy_descendant() was backuping
->auto_asconf_list through the copy but was not honoring
->do_auto_asconf, which could l... |
ImagingDestroyArray(Imaging im)
{
int y;
if (im->image)
for (y = 0; y < im->ysize; y++)
if (im->image[y])
free(im->image[y]);
} | 0 | [
"CWE-284"
] | Pillow | 5d8a0be45aad78c5a22c8d099118ee26ef8144af | 311,032,314,840,410,800,000,000,000,000,000,000,000 | 9 | Memory error in Storage.c when accepting negative image size arguments |
void *Pipe::DelayedDelivery::entry()
{
Mutex::Locker locker(delay_lock);
lgeneric_subdout(pipe->msgr->cct, ms, 20) << *pipe << "DelayedDelivery::entry start" << dendl;
while (!stop_delayed_delivery) {
if (delay_queue.empty()) {
lgeneric_subdout(pipe->msgr->cct, ms, 30) << *pipe << "DelayedDelivery::ent... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 158,706,031,177,861,240,000,000,000,000,000,000,000 | 49 | 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 ... |
static int insert_pfn(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn, pgprot_t prot)
{
struct mm_struct *mm = vma->vm_mm;
int retval;
pte_t *pte, entry;
spinlock_t *ptl;
retval = -ENOMEM;
pte = get_locked_pte(mm, addr, &ptl);
if (!pte)
goto out;
retval = -EBUSY;
if (!pte_none(*pte))
... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 203,031,341,165,556,800,000,000,000,000,000,000,000 | 27 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
TEST(QueryProjectionTest, InvalidPositionalProjectionDefaultPathMatchExpression) {
QueryTestServiceContext serviceCtx;
auto opCtx = serviceCtx.makeOperationContext();
const boost::intrusive_ptr<ExpressionContext> expCtx(
new ExpressionContext(opCtx.get(), nullptr, kTestNss));
unique_ptr<MatchEx... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 164,421,914,102,528,580,000,000,000,000,000,000,000 | 21 | SERVER-53929 Add stricter parser checks around positional projection |
RateLimit *ClientHandler::get_rlimit() { return &conn_.rlimit; } | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 155,403,242,450,772,260,000,000,000,000,000,000,000 | 1 | Don't read too greedily |
ReportLedBadType(CompatInfo *info, LedInfo *ledi, const char *field,
const char *wanted)
{
return ReportBadType(info->ctx, "indicator map", field,
xkb_atom_text(info->ctx, ledi->led.name),
wanted);
} | 0 | [
"CWE-476"
] | libxkbcommon | 96df3106d49438e442510c59acad306e94f3db4d | 45,901,630,547,395,600,000,000,000,000,000,000,000 | 7 | 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> |
virDomainHostdevDefCheckABIStability(virDomainHostdevDefPtr src,
virDomainHostdevDefPtr dst)
{
if (src->mode != dst->mode) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target host device mode %s does not match source %s"),
... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 156,426,285,909,933,740,000,000,000,000,000,000,000 | 25 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static int chmd_read_headers(struct mspack_system *sys, struct mspack_file *fh,
struct mschmd_header *chm, int entire)
{
unsigned int section, name_len, x, errors, num_chunks;
unsigned char buf[0x54], *chunk = NULL, *name, *p, *end;
struct mschmd_file *fi, *link = NULL;
off_t offset, length;
int num_e... | 0 | [
"CWE-476"
] | libmspack | 8759da8db6ec9e866cb8eb143313f397f925bb4f | 37,544,985,868,185,216,000,000,000,000,000,000,000 | 260 | Avoid returning CHM file entries that are "blank" because they have embedded null bytes |
static bool is_class_idx_in_code_classes(RBinDexObj *bin, int class_idx) {
int i;
for (i = 0; i < bin->header.class_size; i++) {
if (class_idx == bin->classes[i].class_id) {
return true;
}
}
return false;
} | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 131,816,987,618,313,970,000,000,000,000,000,000,000 | 9 | fix #6857 |
static int mwifiex_write_reg(struct mwifiex_adapter *adapter, int reg, u32 data)
{
struct pcie_service_card *card = adapter->card;
iowrite32(data, card->pci_mmap1 + reg);
return 0;
} | 0 | [
"CWE-400",
"CWE-200",
"CWE-401"
] | linux | d10dcb615c8e29d403a24d35f8310a7a53e3050c | 107,275,804,385,202,000,000,000,000,000,000,000,000 | 8 | mwifiex: pcie: Fix memory leak in mwifiex_pcie_init_evt_ring
In mwifiex_pcie_init_evt_ring, a new skb is allocated which should be
released if mwifiex_map_pci_memory() fails. The release for skb and
card->evtbd_ring_vbase is added.
Fixes: 0732484b47b5 ("mwifiex: separate ring initialization and ring creation routines... |
void Context::onLog() {
if (in_vm_context_created_ && wasm_->onLog_) {
wasm_->onLog_(this, id_);
}
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 249,399,499,636,023,500,000,000,000,000,000,000,000 | 5 | 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... |
static int wanxl_attach(struct net_device *dev, unsigned short encoding,
unsigned short parity)
{
port_t *port = dev_to_port(dev);
if (encoding != ENCODING_NRZ &&
encoding != ENCODING_NRZI)
return -EINVAL;
if (parity != PARITY_NONE &&
parity != PARITY_CRC32_PR1_CCITT &&
parity != PARITY_CRC16_P... | 0 | [
"CWE-399"
] | linux | 2b13d06c9584b4eb773f1e80bbaedab9a1c344e1 | 124,717,719,172,057,000,000,000,000,000,000,000,000 | 20 | wanxl: fix info leak in ioctl
The wanxl_ioctl() code fails to initialize the two padding bytes of
struct sync_serial_settings after the ->loopback member. Add an explicit
memset(0) before filling the structure to avoid the info leak.
Signed-off-by: Salva Peiró <speiro@ai2.upv.es>
Signed-off-by: David S. Miller <davem... |
static void unfold_ifblk(struct block **blk)
{
struct ifblock *ifblk;
struct unfold_elm *ue;
u_int32 a = vlabel++;
u_int32 b = vlabel++;
u_int32 c = vlabel++;
/*
* the virtual labels represent the three points of an if block:
*
* if (conds) {
* a ->
* ...
* j... | 0 | [
"CWE-703",
"CWE-125"
] | ettercap | 626dc56686f15f2dda13c48f78c2a666cb6d8506 | 164,094,646,373,499,750,000,000,000,000,000,000,000 | 72 | Exit gracefully in case of corrupted filters (Closes issue #782) |
ebb_ews_gal_store_contact (EContact *contact,
goffset offset,
const gchar *sha1,
guint percent,
gpointer user_data,
GCancellable *cancellable,
GError **error)
{
struct _db_data *data = (struct _db_data *) user_data;
if (contact) {
const gchar *uid = e_contact_get_const (contact,... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 113,375,346,797,309,600,000,000,000,000,000,000,000 | 49 | 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 |
inline SegmentReader::SegmentReader(Arena* arena, SegmentId id, kj::ArrayPtr<const word> ptr,
ReadLimiter* readLimiter)
: arena(arena), id(id), ptr(ptr), readLimiter(readLimiter) {} | 0 | [
"CWE-400",
"CWE-703"
] | capnproto | 104870608fde3c698483fdef6b97f093fc15685d | 32,338,081,387,954,930,000,000,000,000,000,000,000 | 3 | SECURITY: CPU usage amplification attack.
Details: https://github.com/sandstorm-io/capnproto/tree/master/security-advisories/2014-03-02-0-all-cpu-amplification.md |
inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int chans, int ord, const DivPattern** patCache) {
static char id[32];
bool selectedRow=(i>=sel1.y && i<=sel2.y);
ImGui::TableNextRow(0,lineHeight);
ImGui::TableNextColumn();
float cursorPosY=ImGui::GetCursorPos().y-ImGui::GetScrollY(... | 1 | [
"CWE-703"
] | furnace | 0eb02422d5161767e9983bdaa5c429762d3477ce | 136,686,899,264,564,970,000,000,000,000,000,000,000 | 275 | fix possible pattern crash
issue #325 |
int ncp_dirhandle_free(struct ncp_server* server, __u8 dirhandle) {
int result;
ncp_init_request_s(server, 20);
ncp_add_byte(server, dirhandle);
result = ncp_request(server, 22);
ncp_unlock_server(server);
return result;
} | 0 | [
"CWE-119"
] | staging | 4c41aa24baa4ed338241d05494f2c595c885af8f | 169,165,948,226,001,030,000,000,000,000,000,000,000 | 9 | staging: ncpfs: memory corruption in ncp_read_kernel()
If the server is malicious then *bytes_read could be larger than the
size of the "target" buffer. It would lead to memory corruption when we
do the memcpy().
Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com>
Signed-off-by: Dan Ca... |
static void sdl_serialize_key(zend_string *key, smart_str *out)
{
if (key) {
WSDL_CACHE_PUT_INT(ZSTR_LEN(key), out);
WSDL_CACHE_PUT_N(ZSTR_VAL(key), ZSTR_LEN(key), out);
} else {
WSDL_CACHE_PUT_INT(WSDL_NO_STRING_MARKER, out);
}
} | 0 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 239,233,758,368,533,930,000,000,000,000,000,000,000 | 9 | Fix bug #80672 - Null Dereference in SoapClient |
PHP_FUNCTION(utf8_decode)
{
char *arg;
size_t arg_len;
zend_string *decoded;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &arg, &arg_len) == FAILURE) {
return;
}
decoded = xml_utf8_decode((XML_Char*)arg, arg_len, (XML_Char*)"ISO-8859-1");
if (decoded == NULL) {
RETURN_FALSE;
}
RETURN_STR(decoded);
} | 0 | [
"CWE-190"
] | php-src | 57b997ebf99e0eb9a073e0dafd2ab100bd4a112d | 208,309,066,478,322,300,000,000,000,000,000,000,000 | 16 | Fix bug #71637: Multiple Heap Overflow due to integer overflows |
inline MetadataType StreamType2MetadataType(StreamType type) {
return static_cast<MetadataType>(type);
} | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 186,733,749,645,562,750,000,000,000,000,000,000,000 | 3 | 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... |
gss_sign (minor_status,
context_handle,
qop_req,
message_buffer,
msg_token)
OM_uint32 * minor_status;
gss_ctx_id_t context_handle;
int qop_req;
gss_buffer_t message_buffer;
gss_buffer_t msg_token;
{
return (gss_get_mic(minor_status, context_handle, (gss_qop_t) qop_req,
... | 0 | [
"CWE-415"
] | krb5 | 56f7b1bc95a2a3eeb420e069e7655fb181ade5cf | 9,033,848,565,011,629,000,000,000,000,000,000,000 | 16 | Preserve GSS context on init/accept failure
After gss_init_sec_context() or gss_accept_sec_context() has created a
context, don't delete the mechglue context on failures from subsequent
calls, even if the mechanism deletes the mech-specific context (which
is allowed by RFC 2744 but not preferred). Check for union con... |
**/
static const CImg<Tuchar>& lines_LUT256() {
static const unsigned char pal[] = {
0,255,255,0,0,28,125,125,235,210,186,182,36,0,125,255,
53,32,255,210,89,186,65,45,125,210,210,97,130,194,0,125,
206,53,190,89,255,146,20,190,154,73,255,36,130,215,0,138,
101,210,61,194,206,... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 284,560,327,455,937,440,000,000,000,000,000,000,000 | 53 | . |
bool has_int_value() const
{
return state == SHORT_DATA_VALUE &&
value.type_handler()->cmp_type() == INT_RESULT;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 205,905,049,443,590,330,000,000,000,000,000,000,000 | 5 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static void php_stream_apply_filter_list(php_stream *stream, char *filterlist, int read_chain, int write_chain TSRMLS_DC) /* {{{ */
{
char *p, *token;
php_stream_filter *temp_filter;
p = php_strtok_r(filterlist, "|", &token);
while (p) {
php_url_decode(p, strlen(p));
if (read_chain) {
if ((temp_filter = php... | 0 | [] | php-src | 2438490addfbfba51e12246a74588b2382caa08a | 160,027,849,059,151,310,000,000,000,000,000,000,000 | 25 | slim post data |
static void init_gro_hash(struct napi_struct *napi)
{
int i;
for (i = 0; i < GRO_HASH_BUCKETS; i++) {
INIT_LIST_HEAD(&napi->gro_hash[i].list);
napi->gro_hash[i].count = 0;
}
napi->gro_bitmask = 0; | 0 | [
"CWE-416"
] | linux | a4270d6795b0580287453ea55974d948393e66ef | 225,770,147,666,052,800,000,000,000,000,000,000,000 | 10 | net-gro: fix use-after-free read in napi_gro_frags()
If a network driver provides to napi_gro_frags() an
skb with a page fragment of exactly 14 bytes, the call
to gro_pull_from_frag0() will 'consume' the fragment
by calling skb_frag_unref(skb, 0), and the page might
be freed and reused.
Reading eth->h_proto at the en... |
int LUKS2_keyslot_for_segment(struct luks2_hdr *hdr, int keyslot, int segment)
{
int r = -EINVAL;
/* no need to check anything */
if (segment == CRYPT_ANY_SEGMENT)
return 0; /* ok */
if (segment == CRYPT_DEFAULT_SEGMENT) {
segment = LUKS2_get_default_segment(hdr);
if (segment < 0)
return segment;
}
r =... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 55,227,386,064,018,400,000,000,000,000,000,000,000 | 19 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
static int addr_contains(IPAddressOrRanges *parent,
IPAddressOrRanges *child, int length)
{
unsigned char p_min[ADDR_RAW_BUF_LEN], p_max[ADDR_RAW_BUF_LEN];
unsigned char c_min[ADDR_RAW_BUF_LEN], c_max[ADDR_RAW_BUF_LEN];
int p, c;
if (child == NULL || parent == child)
re... | 0 | [
"CWE-119",
"CWE-787"
] | openssl | 068b963bb7afc57f5bdd723de0dd15e7795d5822 | 74,487,212,512,330,440,000,000,000,000,000,000,000 | 33 | Avoid out-of-bounds read
Fixes CVE 2017-3735
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4276)
(cherry picked from commit b23171744b01e473ebbfd6edad70c1c3825ffbcd) |
int ssl3_get_server_certificate(SSL *s)
{
int al,i,ok,ret= -1;
unsigned long n,nc,llen,l;
X509 *x=NULL;
const unsigned char *q,*p;
unsigned char *d;
STACK_OF(X509) *sk=NULL;
SESS_CERT *sc;
EVP_PKEY *pkey=NULL;
int need_cert = 1; /* VRS: 0=> will allow null cert if auth == KRB5 */
n=s->method->ssl_get_messag... | 0 | [] | openssl | ee2ffc279417f15fef3b1073c7dc81a908991516 | 40,966,642,144,390,030,000,000,000,000,000,000,000 | 185 | Add Next Protocol Negotiation. |
static int fsl_lpspi_dma_configure(struct spi_controller *controller)
{
int ret;
enum dma_slave_buswidth buswidth;
struct dma_slave_config rx = {}, tx = {};
struct fsl_lpspi_data *fsl_lpspi =
spi_controller_get_devdata(controller);
switch (fsl_lpspi_bytes_per_word(fsl_lpspi->config.bpw)) {
case 4:
buswidth... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 057b8945f78f76d0b04eeb5c27cd9225e5e7ad86 | 156,241,198,000,015,860,000,000,000,000,000,000,000 | 46 | spi: lpspi: fix memory leak in fsl_lpspi_probe
In fsl_lpspi_probe an SPI controller is allocated either via
spi_alloc_slave or spi_alloc_master. In all but one error cases this
controller is put by going to error handling code. This commit fixes the
case when pm_runtime_get_sync fails and it should go to the error
han... |
static void kvm_machine_check(void)
{
#if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_64)
struct pt_regs regs = {
.cs = 3, /* Fake ring 3 no matter what the guest ran on */
.flags = X86_EFLAGS_IF,
};
do_machine_check(®s, 0);
#endif
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 265,567,153,254,354,500,000,000,000,000,000,000,000 | 11 | 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-... |
Status V2UserDocumentParser::parseRoleVector(const BSONArray& rolesArray,
std::vector<RoleName>* result) {
std::vector<RoleName> roles;
for (BSONObjIterator it(rolesArray); it.more(); it.next()) {
if ((*it).type() != Object) {
return Status(ErrorC... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 97,682,726,723,940,820,000,000,000,000,000,000,000 | 16 | SERVER-38984 Validate unique User ID on UserCache hit |
static int oidc_handle_logout(request_rec *r, oidc_cfg *c,
oidc_session_t *session) {
oidc_provider_t *provider = NULL;
/* pickup the command or URL where the user wants to go after logout */
char *url = NULL;
char *error_str = NULL;
char *error_description = NULL;
oidc_util_get_request_parameter(r, OIDC_REDI... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 254,763,731,751,258,450,000,000,000,000,000,000,000 | 65 | Add a function to escape Javascript characters |
int search_binary_handler(struct linux_binprm *bprm)
{
unsigned int depth = bprm->recursion_depth;
int try,retval;
struct linux_binfmt *fmt;
pid_t old_pid, old_vpid;
/* This allows 4 levels of binfmt rewrites before failing hard. */
if (depth > 5)
return -ELOOP;
retval = security_bprm_check(bprm);
if (retva... | 0 | [
"CWE-200"
] | linux-2.6 | b66c5984017533316fd1951770302649baf1aa33 | 129,248,715,759,501,120,000,000,000,000,000,000,000 | 82 | exec: do not leave bprm->interp on stack
If a series of scripts are executed, each triggering module loading via
unprintable bytes in the script header, kernel stack contents can leak
into the command line.
Normally execution of binfmt_script and binfmt_misc happens recursively.
However, when modules are enabled, and... |
static void nft_fwd_netdev_eval(const struct nft_expr *expr,
struct nft_regs *regs,
const struct nft_pktinfo *pkt)
{
struct nft_fwd_netdev *priv = nft_expr_priv(expr);
int oif = regs->data[priv->sreg_dev];
struct sk_buff *skb = pkt->skb;
/* This is used by ifb only. */
skb->skb_iif = skb->dev->ifindex;
s... | 0 | [
"CWE-269"
] | nf | b1a5983f56e371046dcf164f90bfaf704d2b89f6 | 202,565,483,239,757,800,000,000,000,000,000,000,000 | 15 | netfilter: nf_tables_offload: incorrect flow offload action array size
immediate verdict expression needs to allocate one slot in the flow offload
action array, however, immediate data expression does not need to do so.
fwd and dup expression need to allocate one slot, this is missing.
Add a new offload_action inter... |
static void sas_scsi_clear_queue_port(struct list_head *error_q,
struct asd_sas_port *port)
{
struct scsi_cmnd *cmd, *n;
list_for_each_entry_safe(cmd, n, error_q, eh_entry) {
struct domain_device *dev = cmd_to_domain_dev(cmd);
struct asd_sas_port *x = dev->port;
if (x == port)
sas_eh_finish_cmd(c... | 0 | [] | linux | 318aaf34f1179b39fa9c30fa0f3288b645beee39 | 52,232,986,869,252,900,000,000,000,000,000,000,000 | 13 | scsi: libsas: defer ata device eh commands to libata
When ata device doing EH, some commands still attached with tasks are
not passed to libata when abort failed or recover failed, so libata did
not handle these commands. After these commands done, sas task is freed,
but ata qc is not freed. This will cause ata qc lea... |
static void fixup_inode_flags(struct inode *dir, struct inode *inode)
{
struct btrfs_inode *b_dir = BTRFS_I(dir);
struct btrfs_inode *b_inode = BTRFS_I(inode);
if (b_dir->flags & BTRFS_INODE_NODATACOW)
b_inode->flags |= BTRFS_INODE_NODATACOW;
else
b_inode->flags &= ~BTRFS_INODE_NODATACOW;
if (b_dir->flags & ... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 201,290,330,167,052,600,000,000,000,000,000,000,000 | 18 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
int af_alg_make_sg(struct af_alg_sgl *sgl, struct iov_iter *iter, int len)
{
size_t off;
ssize_t n;
int npages, i;
n = iov_iter_get_pages(iter, sgl->pages, len, ALG_MAX_PAGES, &off);
if (n < 0)
return n;
npages = (off + n + PAGE_SIZE - 1) >> PAGE_SHIFT;
if (WARN_ON(npages == 0))
return -EINVAL;
/* Add one... | 0 | [
"CWE-416"
] | linux | 9060cb719e61b685ec0102574e10337fa5f445ea | 96,856,754,790,956,920,000,000,000,000,000,000,000 | 29 | net: crypto set sk to NULL when af_alg_release.
KASAN has found use-after-free in sockfs_setattr.
The existed commit 6d8c50dcb029 ("socket: close race condition between sock_close()
and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore
that crypto module forgets to set the sk to NULL after af_al... |
static void extract_nonewprivs(ProcessHandle sandbox) {
struct stat s;
if (process_rootfs_stat(sandbox, RUN_NONEWPRIVS_CFG, &s) == 0)
arg_nonewprivs = 1;
} | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 163,570,683,727,811,400,000,000,000,000,000,000,000 | 6 | fixing CVE-2022-31214 |
IOBuf::IOBuf(CreateOp, std::size_t capacity)
: next_(this),
prev_(this),
data_(nullptr),
length_(0),
flagsAndSharedInfo_(0) {
SharedInfo* info;
allocExtBuffer(capacity, &buf_, &info, &capacity_);
setSharedInfo(info);
data_ = buf_;
} | 0 | [
"CWE-787"
] | folly | 4f304af1411e68851bdd00ef6140e9de4616f7d3 | 59,633,191,805,228,320,000,000,000,000,000,000,000 | 11 | [folly] Add additional overflow checks to IOBuf - CVE-2021-24036
Summary:
As per title
CVE-2021-24036
Reviewed By: jan
Differential Revision: D27938605
fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c |
static bool checkreturn pb_dec_varint(pb_istream_t *stream, const pb_field_t *field, void *dest)
{
uint64_t value;
if (!pb_decode_varint(stream, &value))
return false;
switch (field->data_size)
{
case 1: *(int8_t*)dest = (int8_t)value; break;
case 2: *(int16_t*)dest = (int16... | 0 | [
"CWE-125"
] | nanopb | 7b396821ddd06df8e39143f16e1dc0a4645b89a3 | 83,107,385,871,670,190,000,000,000,000,000,000,000 | 17 | Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) |
void HGraphBuilder::GenerateIsRegExp(CallRuntime* call) {
ASSERT(call->arguments()->length() == 1);
CHECK_ALIVE(VisitForValue(call->arguments()->at(0)));
HValue* value = Pop();
HHasInstanceTypeAndBranch* result =
new(zone()) HHasInstanceTypeAndBranch(value, JS_REGEXP_TYPE);
return ast_context()->ReturnC... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 124,976,755,026,110,160,000,000,000,000,000,000,000 | 8 | 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... |
static void vmx_inject_nmi(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (!enable_vnmi) {
/*
* Tracking the NMI-blocked state in software is built upon
* finding the next open IRQ window. This, in turn, depends on
* well-behaving guests: They have to keep IRQs disabled at
* least as ... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 92,266,066,420,362,380,000,000,000,000,000,000,000 | 30 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
static ssize_t mon_text_read_t(struct file *file, char __user *buf,
size_t nbytes, loff_t *ppos)
{
struct mon_reader_text *rp = file->private_data;
struct mon_event_text *ep;
struct mon_text_ptr ptr;
ssize_t ret;
mutex_lock(&rp->printf_lock);
if (rp->printf_togo == 0) {
ep = mon_text_read_wait(rp, file);... | 0 | [
"CWE-787"
] | linux | a5f596830e27e15f7a0ecd6be55e433d776986d8 | 226,882,409,573,894,800,000,000,000,000,000,000,000 | 37 | usb: usbmon: Read text within supplied buffer size
This change fixes buffer overflows and silent data corruption with the
usbmon device driver text file read operations.
Signed-off-by: Fredrik Noring <noring@nocrew.org>
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by... |
static int airspy_set_mixer_gain(struct airspy *s)
{
int ret;
u8 u8tmp;
dev_dbg(s->dev, "mixer auto=%d->%d val=%d->%d\n",
s->mixer_gain_auto->cur.val, s->mixer_gain_auto->val,
s->mixer_gain->cur.val, s->mixer_gain->val);
ret = airspy_ctrl_msg(s, CMD_SET_MIXER_AGC, 0, s->mixer_gain_auto->val,
&u8tmp, 1);
... | 0 | [
"CWE-119"
] | media_tree | aa93d1fee85c890a34f2510a310e55ee76a27848 | 78,759,142,985,736,010,000,000,000,000,000,000,000 | 26 | media: fix airspy usb probe error path
Fix a memory leak on probe error of the airspy usb device driver.
The problem is triggered when more than 64 usb devices register with
v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV.
The memory leak is caused by the probe function of the airspy driver
mishandeling errors and not ... |
RAND_DRBG *RAND_DRBG_get0_master(void)
{
if (!RUN_ONCE(&rand_drbg_init, do_rand_drbg_init))
return NULL;
return master_drbg;
} | 0 | [
"CWE-330"
] | openssl | 1b0fe00e2704b5e20334a16d3c9099d1ba2ef1be | 22,985,913,611,822,387,000,000,000,000,000,000,000 | 7 | drbg: ensure fork-safety without using a pthread_atfork handler
When the new OpenSSL CSPRNG was introduced in version 1.1.1,
it was announced in the release notes that it would be fork-safe,
which the old CSPRNG hadn't been.
The fork-safety was implemented using a fork count, which was
incremented by a pthread_atfork... |
static inline int do_tuner_callback(struct dvb_frontend *fe, int cmd, int arg)
{
struct xc2028_data *priv = fe->tuner_priv;
/* analog side (tuner-core) uses i2c_adap->algo_data.
* digital side is not guaranteed to have algo_data defined.
*
* digital side will always have fe->dvb defined.
* analog side (tuner... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 8dfbcc4351a0b6d2f2d77f367552f48ffefafe18 | 276,834,652,686,565,400,000,000,000,000,000,000,000 | 16 | [media] xc2028: avoid use after free
If struct xc2028_config is passed without a firmware name,
the following trouble may happen:
[11009.907205] xc2028 5-0061: type set to XCeive xc2028/xc3028 tuner
[11009.907491] ==================================================================
[11009.907750] BUG: KASAN: use-after-... |
static inline cputime_t cputime_div_non_zero(cputime_t time, unsigned long div)
{
cputime_t res = cputime_div(time, div);
return max_t(cputime_t, res, 1);
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 297,885,766,771,935,800,000,000,000,000,000,000,000 | 6 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
static int check_certificate_expiration (X509 *peercert, int silent)
{
if (option (OPTSSLVERIFYDATES) != MUTT_NO)
{
if (X509_cmp_current_time (X509_get0_notBefore (peercert)) >= 0)
{
if (!silent)
{
dprint (2, (debugfile, "Server certificate is not yet valid\n"));
mutt_error (_("S... | 0 | [
"CWE-74"
] | mutt | c547433cdf2e79191b15c6932c57f1472bfb5ff4 | 336,165,923,395,599,670,000,000,000,000,000,000,000 | 28 | Fix STARTTLS response injection attack.
Thanks again to Damian Poddebniak and Fabian Ising from the Münster
University of Applied Sciences for reporting this issue. Their
summary in ticket 248 states the issue clearly:
We found another STARTTLS-related issue in Mutt. Unfortunately, it
affects SMTP, POP3 and IMAP... |
measured_bw_line_apply(measured_bw_line_t *parsed_line,
smartlist_t *routerstatuses)
{
vote_routerstatus_t *rs = NULL;
if (!routerstatuses)
return 0;
rs = smartlist_bsearch(routerstatuses, parsed_line->node_id,
compare_digest_to_vote_routerstatus_entry);
if ... | 0 | [] | tor | 02e05bd74dbec614397b696cfcda6525562a4675 | 107,891,025,617,698,880,000,000,000,000,000,000,000 | 20 | When examining descriptors as a dirserver, reject ones with bad versions
This is an extra fix for bug 21278: it ensures that these
descriptors and platforms will never be listed in a legit consensus. |
static int vfs_rename_dir(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
{
int error = 0;
struct inode *target;
/*
* If we are going to change the parent - check write permissions,
* we'll need to flip '..'.
*/
if (new_dir != old_dir) {
error = perm... | 0 | [
"CWE-120"
] | linux-2.6 | d70b67c8bc72ee23b55381bd6a884f4796692f77 | 143,741,278,809,206,520,000,000,000,000,000,000,000 | 42 | [patch] vfs: fix lookup on deleted directory
Lookup can install a child dentry for a deleted directory. This keeps
the directory dentry alive, and the inode pinned in the cache and on
disk, even after all external references have gone away.
This isn't a big problem normally, since memory pressure or umount
will clea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.