func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void test_multi()
{
MYSQL_STMT *stmt_delete, *stmt_update, *stmt_select1, *stmt_select2;
char *query;
MYSQL_BIND my_bind[1];
int rc, i;
int32 param= 1;
ulong length= 1;
myheader("test_multi");
/*
We need to memset bind structure because mysql_stmt_bind_param checks all
its members.
*/
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 182,808,579,483,565,660,000,000,000,000,000,000,000 | 86 | 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... |
static int exprSrcCount(Walker *pWalker, Expr *pExpr){
/* The NEVER() on the second term is because sqlite3FunctionUsesThisSrc()
** is always called before sqlite3ExprAnalyzeAggregates() and so the
** TK_COLUMNs have not yet been converted into TK_AGG_COLUMN. If
** sqlite3FunctionUsesThisSrc() is used differen... | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 47,703,789,021,030,300,000,000,000,000,000,000,000 | 25 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
int URI_FUNC(ParseSingleUri)(URI_TYPE(Uri) * uri, const URI_CHAR * text,
const URI_CHAR ** errorPos) {
return URI_FUNC(ParseSingleUriEx)(uri, text, NULL, errorPos);
} | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 135,638,410,527,193,400,000,000,000,000,000,000,000 | 4 | Fix uriParse*Ex* out-of-bounds read |
static void destroy_inodecache(void)
{
/*
* Make sure all delayed rcu free inodes are flushed before we
* destroy cache.
*/
rcu_barrier();
kmem_cache_destroy(f2fs_inode_cachep);
} | 0 | [
"CWE-284"
] | linux | b9dd46188edc2f0d1f37328637860bb65a771124 | 151,936,209,174,048,980,000,000,000,000,000,000,000 | 9 | f2fs: sanity check segment count
F2FS uses 4 bytes to represent block address. As a result, supported
size of disk is 16 TB and it equals to 16 * 1024 * 1024 / 2 segments.
Signed-off-by: Jin Qian <jinqian@google.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
static void *esp_alloc_tmp(struct crypto_aead *aead, int nfrags)
{
unsigned int len;
len = crypto_aead_ivsize(aead);
if (len) {
len += crypto_aead_alignmask(aead) &
~(crypto_tfm_ctx_alignment() - 1);
len = ALIGN(len, crypto_tfm_ctx_alignment());
}
len += sizeof(struct aead_givcrypt_request) + crypto... | 0 | [
"CWE-16"
] | linux-2.6 | 920fc941a9617f95ccb283037fe6f8a38d95bb69 | 27,256,162,892,536,066,000,000,000,000,000,000,000 | 18 | [ESP]: Ensure IV is in linear part of the skb to avoid BUG() due to OOB access
ESP does not account for the IV size when calling pskb_may_pull() to
ensure everything it accesses directly is within the linear part of a
potential fragment. This results in a BUG() being triggered when the
both the IPv4 and IPv6 ESP stack... |
bool shouldNormalizePath() const override { return true; } | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 34,927,323,174,170,393,000,000,000,000,000,000,000 | 1 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
static GF_Err lsr_decode_laser_unit(GF_LASeRCodec *lsr, GF_List *com_list)
{
GF_Err e;
Bool reset_encoding_context;
u32 flag, i, count = 0, privateDataIdentifierIndexBits;
lsr->last_error = GF_OK;
/*
* 1 - laser unit header
*/
GF_LSR_READ_INT(lsr, reset_encoding_context, 1, "resetEncodingContext");
GF_LSR_... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 85,105,081,781,846,110,000,000,000,000,000,000,000 | 143 | fixed #2213 |
find_key_option(char_u *arg)
{
int key;
int modifiers;
/*
* Don't use get_special_key_code() for t_xx, we don't want it to call
* add_termcap_entry().
*/
if (arg[0] == 't' && arg[1] == '_' && arg[2] && arg[3])
key = TERMCAP2KEY(arg[2], arg[3]);
else
{
--arg; /* put arg ... | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 234,094,769,361,664,270,000,000,000,000,000,000,000 | 21 | patch 8.0.0056
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'. |
PHP_FUNCTION(xml_get_error_code)
{
xml_parser *parser;
zval *pind;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &pind) == FAILURE) {
return;
}
if ((parser = (xml_parser *)zend_fetch_resource(Z_RES_P(pind), "XML Parser", le_xml_parser)) == NULL) {
RETURN_FALSE;
}
RETURN_LONG((zend_long)XML_GetErrorCode(... | 0 | [
"CWE-190"
] | php-src | 57b997ebf99e0eb9a073e0dafd2ab100bd4a112d | 196,276,285,407,715,000,000,000,000,000,000,000,000 | 15 | Fix bug #71637: Multiple Heap Overflow due to integer overflows |
int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,
const struct iwl_fw_dump_desc *desc,
bool monitor_only,
unsigned int delay)
{
u32 trig_type = le32_to_cpu(desc->trig_desc.type);
int ret;
if (iwl_trans_dbg_ini_valid(fwrt->trans)) {
ret = iwl_fw_dbg_ini_collect(fwrt, trig_type);
if (!... | 0 | [
"CWE-400",
"CWE-401"
] | linux | b4b814fec1a5a849383f7b3886b654a13abbda7d | 116,402,012,900,464,960,000,000,000,000,000,000,000 | 35 | iwlwifi: dbg_ini: fix memory leak in alloc_sgtable
In alloc_sgtable if alloc_page fails, the alocated table should be
released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com> |
TEST("Test plain strings")
{
test_urldecode("Hello World", "Hello World");
} | 0 | [
"CWE-94"
] | qdecoder | ce7c8a7ac450a823a11b06508ef1eb7441241f81 | 100,958,120,934,077,860,000,000,000,000,000,000,000 | 4 | security update: add check on improperly encoded input |
static __always_inline void wake_userfault(struct userfaultfd_ctx *ctx,
struct userfaultfd_wake_range *range)
{
unsigned seq;
bool need_wakeup;
/*
* To be sure waitqueue_active() is not reordered by the CPU
* before the pagetable update, use an explicit SMP memory
* barrier here. PT lock release or up... | 0 | [
"CWE-416"
] | linux | 384632e67e0829deb8015ee6ad916b180049d252 | 231,602,979,346,524,980,000,000,000,000,000,000,000 | 30 | userfaultfd: non-cooperative: fix fork use after free
When reading the event from the uffd, we put it on a temporary
fork_event list to detect if we can still access it after releasing and
retaking the event_wqh.lock.
If fork aborts and removes the event from the fork_event all is fine as
long as we're still in the u... |
coolkey_get_public_key_from_certificate(sc_pkcs15_card_t *p15card, sc_cardctl_coolkey_object_t *obj)
{
sc_pkcs15_cert_info_t cert_info;
sc_pkcs15_cert_t *cert_out = NULL;
sc_pkcs15_pubkey_t *key = NULL;
int r;
cert_info.value.value = NULL;
r = coolkey_get_certificate(p15card->card, obj, &cert_info.value);
if (r... | 1 | [] | OpenSC | 7114fb71b54ddfe06ce5dfdab013f4c38f129d14 | 205,501,721,843,329,560,000,000,000,000,000,000,000 | 27 | coolkey: Initialize potentially uninitialized memory
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28855 |
void FileBody::Dump(std::ostream& os, const std::string& prefix) const {
os << prefix << "<file: " << path_.u8string() << ">" << std::endl;
} | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 4,831,802,366,854,023,400,000,000,000,000,000,000 | 3 | fix static file serving security issue; fix url path encoding issue |
PJ_DEF(void) pjsip_tpselector_dec_ref(pjsip_tpselector *sel)
{
if (sel->type == PJSIP_TPSELECTOR_TRANSPORT && sel->u.transport != NULL)
pjsip_transport_dec_ref(sel->u.transport);
else if (sel->type == PJSIP_TPSELECTOR_LISTENER && sel->u.listener != NULL)
; /* Hmm.. looks like we don't have reference counter f... | 0 | [
"CWE-297",
"CWE-295"
] | pjproject | 67e46c1ac45ad784db5b9080f5ed8b133c122872 | 145,729,974,360,938,670,000,000,000,000,000,000,000 | 7 | Merge pull request from GHSA-8hcp-hm38-mfph
* Check hostname during TLS transport selection
* revision based on feedback
* remove the code in create_request that has been moved |
void Add(const float* input1_data, const Dims<4>& input1_dims,
const float* input2_data, const Dims<4>& input2_dims,
float* output_data, const Dims<4>& output_dims) {
float output_activation_min, output_activation_max;
GetActivationMinMax(Ac, &output_activation_min, &output_activation_max);
tfl... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 114,338,844,381,508,170,000,000,000,000,000,000,000 | 13 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
static int sisusb_wait_all_out_complete(struct sisusb_usb_data *sisusb)
{
int timeout = 5 * HZ, i = 1;
wait_event_timeout(sisusb->wait_q, (i = sisusb_all_free(sisusb)),
timeout);
return i;
} | 0 | [
"CWE-476"
] | linux | 9a5729f68d3a82786aea110b1bfe610be318f80a | 283,984,148,501,879,080,000,000,000,000,000,000,000 | 9 | USB: sisusbvga: fix oops in error path of sisusb_probe
The pointer used to log a failure of usb_register_dev() must
be set before the error is logged.
v2: fix that minor is not available before registration
Signed-off-by: oliver Neukum <oneukum@suse.com>
Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail... |
gerbv_gdk_draw_circle(GdkPixmap *pixmap, GdkGC *gc,
gint filled, gint x, gint y, gint dia)
{
static const gint full_circle = 23360;
gint real_x = x - dia / 2;
gint real_y = y - dia / 2;
gdk_draw_arc(pixmap, gc, filled, real_x, real_y, dia, dia, 0, full_circle);
return;
} /* gerbv_gdk_... | 0 | [
"CWE-703"
] | gerbv | b2c2f8da851f2ac8079a91ce9d498d87ff96abcf | 118,170,617,308,778,820,000,000,000,000,000,000,000 | 11 | Avoid direct access on array of unknown size
Be requiring a `gerbv_simplified_amacro_t` the `dgk_draw_amacro_funcs` can be sure of the length of the parameter array. |
enable_broadcast(
struct interface * iface,
sockaddr_u * baddr
)
{
#ifdef OPEN_BCAST_SOCKET
socket_broadcast_enable(iface, iface->fd, baddr);
#endif
} | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 286,145,369,657,130,580,000,000,000,000,000,000,000 | 9 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
dlz_newversion(const char *zone, void *dbdata, void **versionp) {
struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
if (state->transaction_started) {
if (state->log != NULL)
state->log(ISC_LOG_INFO,
"dlz_example: transaction already "
"started for zone %s", zone);
return (ISC_R... | 0 | [
"CWE-732"
] | bind9 | 34348d9ee4db15307c6c42db294419b4df569f76 | 163,037,764,141,808,480,000,000,000,000,000,000,000 | 16 | denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283) |
int rdbLoad(char *filename, rdbSaveInfo *rsi, int rdbflags) {
FILE *fp;
rio rdb;
int retval;
if ((fp = fopen(filename,"r")) == NULL) return C_ERR;
startLoadingFile(fp, filename,rdbflags);
rioInitWithFile(&rdb,fp);
retval = rdbLoadRio(&rdb,rdbflags,rsi);
fclose(fp);
stopLoading(retva... | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 26,815,218,355,058,395,000,000,000,000,000,000,000 | 13 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
Repair_mrg_table_error_handler()
: m_handled_errors(false), m_unhandled_errors(false)
{} | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 242,212,047,448,299,000,000,000,000,000,000,000,000 | 3 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
inline uint8_t* WireFormatLite::WriteSFixed32NoTagToArray(int32_t value,
uint8_t* target) {
return io::CodedOutputStream::WriteLittleEndian32ToArray(
static_cast<uint32_t>(value), target);
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 142,533,175,870,517,600,000,000,000,000,000,000,000 | 5 | Apply patch |
bool IsCapacityFull() const { return buf_.size() >= capacity_; } | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | cebe3c45d76357d201c65bdbbf0dbe6e8a63bbdb | 115,998,411,351,717,070,000,000,000,000,000,000,000 | 1 | Fix tf.raw_ops.StagePeek vulnerability with invalid `index`.
Check that input is actually a scalar before treating it as such.
PiperOrigin-RevId: 445524908 |
static int l_set_timeout(lua_State *L) {
long timeout = luaL_checkinteger(L, 2);
struct ssh_userdata *state = NULL;
state = (struct ssh_userdata *) nseU_checkudata(L, 1, SSH2_UDATA, "ssh2");
libssh2_session_set_timeout(state->session, timeout);
return 0;
} | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 231,215,840,831,748,220,000,000,000,000,000,000,000 | 9 | Avoid a crash (double-free) when SSH connection fails |
DefineSequence(ParseState *pstate, CreateSeqStmt *seq)
{
FormData_pg_sequence seqform;
FormData_pg_sequence_data seqdataform;
bool need_seq_rewrite;
List *owned_by;
CreateStmt *stmt = makeNode(CreateStmt);
Oid seqoid;
ObjectAddress address;
Relation rel;
HeapTuple tuple;
TupleDesc tupDesc;
Datum value... | 0 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 108,728,482,299,087,680,000,000,000,000,000,000,000 | 140 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
static jas_cmpxform_t *jas_cmpxform_createshapmat()
{
int i;
int j;
jas_cmpxform_t *pxform;
jas_cmshapmat_t *shapmat;
if (!(pxform = jas_cmpxform_create0()))
return 0;
pxform->ops = &shapmat_ops;
shapmat = &pxform->data.shapmat;
shapmat->mono = 0;
shapmat->order = 0;
shapmat->useluts = 0;
shapmat->usemat =... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 273,489,084,364,532,880,000,000,000,000,000,000,000 | 23 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
tomsg(struct module_env* env, struct query_info* q, struct reply_info* r,
struct regional* region, time_t now, int allow_expired,
struct regional* scratch)
{
struct dns_msg* msg;
size_t i;
int is_expired = 0;
time_t now_control = now;
if(now > r->ttl) {
/* Check if we are allowed to serve expired */
if(allow... | 0 | [
"CWE-400"
] | unbound | ba0f382eee814e56900a535778d13206b86b6d49 | 113,907,663,901,883,230,000,000,000,000,000,000,000 | 72 | - CVE-2020-12662 Unbound can be tricked into amplifying an incoming
query into a large number of queries directed to a target.
- CVE-2020-12663 Malformed answers from upstream name servers can be
used to make Unbound unresponsive. |
soup_ntlm_response (const char *nonce,
const char *user,
guchar nt_hash[21],
guchar lm_hash[21],
const char *host,
const char *domain,
gboolean ntlmv2_session,
gboolean negotiate_target,
const char *target_info,
size_t target_info_sz)
{
int offse... | 0 | [
"CWE-125"
] | libsoup | f8a54ac85eec2008c85393f331cdd251af8266ad | 317,013,302,046,598,200,000,000,000,000,000,000,000 | 97 | NTLM: Avoid a potential heap buffer overflow in v2 authentication
Check the length of the decoded v2 challenge before attempting to
parse it, to avoid reading past it.
Fixes #173 |
mountpoint_last(struct nameidata *nd, struct path *path)
{
int error = 0;
struct dentry *dentry;
struct dentry *dir = nd->path.dentry;
/* If we're in rcuwalk, drop out of it to handle last component */
if (nd->flags & LOOKUP_RCU) {
if (unlazy_walk(nd, NULL)) {
error = -ECHILD;
goto out;
}
}
nd->flags... | 1 | [
"CWE-59",
"CWE-61"
] | linux | 295dc39d941dc2ae53d5c170365af4c9d5c16212 | 217,047,050,330,597,600,000,000,000,000,000,000,000 | 63 | fs: umount on symlink leaks mnt count
Currently umount on symlink blocks following umount:
/vz is separate mount
# ls /vz/ -al | grep test
drwxr-xr-x. 2 root root 4096 Jul 19 01:14 testdir
lrwxrwxrwx. 1 root root 11 Jul 19 01:16 testlink -> /vz/testdir
# umount -l /vz/testlink
umount: /vz/testlink: n... |
void CairoOutputDev::setCairo(cairo_t *cairo)
{
if (this->cairo != NULL) {
cairo_status_t status = cairo_status (this->cairo);
if (status) {
warning("cairo context error: %s\n", cairo_status_to_string(status));
}
cairo_destroy (this->cairo);
assert(!cairo_shape);
}
if (cairo != NULL) {
... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 176,629,862,269,886,270,000,000,000,000,000,000,000 | 20 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s)
{
return s->compress_meth;
} | 0 | [
"CWE-362"
] | openssl | 939b4960276b040fc0ed52232238fcc9e2e9ec21 | 36,920,107,056,264,500,000,000,000,000,000,000,000 | 4 | Fix race condition in NewSessionTicket
If a NewSessionTicket is received by a multi-threaded client when
attempting to reuse a previous ticket then a race condition can occur
potentially leading to a double free of the ticket data.
CVE-2015-1791
This also fixes RT#3808 where a session ID is changed for a session alr... |
qb_ipcc_us_disconnect(struct qb_ipcc_connection *c)
{
munmap(c->request.u.us.shared_data, SHM_CONTROL_SIZE);
unlink(c->request.u.us.shared_file_name);
if (use_filesystem_sockets()) {
struct sockaddr_un un_addr;
socklen_t un_addr_len = sizeof(struct sockaddr_un);
char *base_name;
char sock_name[PATH_MAX];
... | 0 | [
"CWE-59"
] | libqb | e322e98dc264bc5911d6fe1d371e55ac9f95a71e | 186,190,937,558,239,800,000,000,000,000,000,000,000 | 35 | ipc: use O_EXCL on SHM files, and randomize the names
Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> |
static int io_sfr_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
{
struct io_ring_ctx *ctx = req->ctx;
if (unlikely(ctx->flags & IORING_SETUP_IOPOLL))
return -EINVAL;
if (unlikely(sqe->addr || sqe->ioprio || sqe->buf_index ||
sqe->splice_fd_in))
return -EINVAL;
req->sync.off = READ_ONCE(sqe... | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 298,803,227,226,736,870,000,000,000,000,000,000,000 | 15 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
static void test_store_result2()
{
MYSQL_STMT *stmt;
int rc;
int nData;
ulong length;
MYSQL_BIND my_bind[1];
char query[MAX_TEST_QUERY_LENGTH];
myheader("test_store_result2");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_store_result");
myquery(rc);
rc= mysql_query(mysql, ... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 298,797,207,289,285,500,000,000,000,000,000,000,000 | 84 | 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... |
static ssize_t lbs_rdrf_write(struct file *file,
const char __user *userbuf,
size_t count, loff_t *ppos)
{
struct lbs_private *priv = file->private_data;
ssize_t res, buf_size;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
if (!buf)
return -ENOMEM;
buf_size = min(c... | 0 | [
"CWE-703",
"CWE-189"
] | linux | a497e47d4aec37aaf8f13509f3ef3d1f6a717d88 | 295,256,874,767,490,160,000,000,000,000,000,000,000 | 22 | libertas: potential oops in debugfs
If we do a zero size allocation then it will oops. Also we can't be
sure the user passes us a NUL terminated string so I've added a
terminator.
This code can only be triggered by root.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-... |
e_mail_parser_parse_part_as (EMailParser *parser,
CamelMimePart *part,
GString *part_id,
const gchar *mime_type,
GCancellable *cancellable,
GQueue *out_mail_parts)
{
GQueue *... | 0 | [
"CWE-347"
] | evolution | 9c55a311325f5905d8b8403b96607e46cf343f21 | 41,034,272,915,865,940,000,000,000,000,000,000,000 | 36 | I#120 - Show security bar above message headers
Closes https://gitlab.gnome.org/GNOME/evolution/issues/120 |
mask62plen(const u_char *mask)
{
u_char bitmasks[9] = {
0x00,
0x80, 0xc0, 0xe0, 0xf0,
0xf8, 0xfc, 0xfe, 0xff
};
int byte;
int cidr_len = 0;
for (byte = 0; byte < 16; byte++) {
u_int bits;
for (bits = 0; bits < (sizeof (bitmasks) / sizeof (bitmasks[0])); bits++) {
if (mask[byte] == bitmasks[bits]) {
... | 0 | [
"CWE-119",
"CWE-125"
] | tcpdump | 9f0730bee3eb65d07b49fd468bc2f269173352fe | 83,561,368,444,169,600,000,000,000,000,000,000,000 | 25 | CVE-2017-13011/Properly check for buffer overflow in bittok2str_internal().
Also, make the buffer bigger.
This fixes a buffer overflow discovered by Bhargava Shastry,
SecT/TU Berlin.
Add a test using the capture file supplied by the reporter(s), modified
so the capture file won't be rejected as an invalid capture. |
void bzpopmaxCommand(client *c) {
blockingGenericZpopCommand(c,ZSET_MAX);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 96,842,703,995,809,280,000,000,000,000,000,000,000 | 3 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
PHP_ME_MAPPING(seek, sqlite_seek, arginfo_sqlite_method_seek, 0)
{NULL, NULL, NULL} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 213,093,060,576,956,650,000,000,000,000,000,000,000 | 2 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static int hog_accept(struct btd_service *service)
{
struct hog_device *dev = btd_service_get_user_data(service);
struct btd_device *device = btd_service_get_device(service);
struct gatt_db *db = btd_device_get_gatt_db(device);
GAttrib *attrib = btd_device_get_attrib(device);
if (!dev->hog) {
hog_device_accept(... | 1 | [] | bluez | 8cdbd3b09f29da29374e2f83369df24228da0ad1 | 31,001,069,933,163,024,000,000,000,000,000,000,000 | 20 | HOGP must only accept data from bonded devices.
HOGP 1.0 Section 6.1 establishes that the HOGP must require bonding.
Reference:
https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00352.htm |
onig_reg_init(regex_t* reg, OnigOptionType option, OnigCaseFoldType case_fold_flag,
OnigEncoding enc, OnigSyntaxType* syntax)
{
int r;
xmemset(reg, 0, sizeof(*reg));
if (onig_inited == 0) {
#if 0
return ONIGERR_LIBRARY_IS_NOT_INITIALIZED;
#else
r = onig_initialize(&enc, 1);
if (r != 0)... | 0 | [
"CWE-125"
] | oniguruma | 4d461376bd85e7994835677b2ff453a43c49cd28 | 333,685,110,115,897,700,000,000,000,000,000,000,000 | 52 | don't expand string case folds to alternatives if code length == 1 and byte length is same |
void setFromForRecreateStream(StreamInfo& info) {
downstream_timing_ = info.downstreamTiming();
protocol_ = info.protocol();
bytes_received_ = info.bytesReceived();
downstream_bytes_meter_ = info.getDownstreamBytesMeter();
// These two are set in the constructor, but to T(recreate), and should be ... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 147,439,010,835,233,000,000,000,000,000,000,000,000 | 9 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
int sock_no_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m,
size_t len, int flags)
{
return -EOPNOTSUPP;
} | 0 | [
"CWE-264"
] | linux-2.6 | df0bca049d01c0ee94afb7cd5dfd959541e6c8da | 67,663,611,576,507,590,000,000,000,000,000,000,000 | 5 | net: 4 bytes kernel memory disclosure in SO_BSDCOMPAT gsopt try #2
In function sock_getsockopt() located in net/core/sock.c, optval v.val
is not correctly initialized and directly returned in userland in case
we have SO_BSDCOMPAT option set.
This dummy code should trigger the bug:
int main(void)
{
unsigned char buf... |
static int handle_rmode_exception(struct kvm_vcpu *vcpu,
int vec, u32 err_code)
{
/*
* Instruction with address size override prefix opcode 0x67
* Cause the #SS fault with 0 error code in VM86 mode.
*/
if (((vec == GP_VECTOR) || (vec == SS_VECTOR)) && err_code == 0) {
if (kvm_emulate_instruction(vcpu, 0... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 258,584,998,219,362,100,000,000,000,000,000,000,000 | 26 | 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... |
MagickExport MagickBooleanType GetImageKurtosis(const Image *image,
double *kurtosis,double *skewness,ExceptionInfo *exception)
{
ChannelStatistics
*channel_statistics;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickE... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 025e77fcb2f45b21689931ba3bf74eac153afa48 | 315,829,074,121,863,570,000,000,000,000,000,000,000 | 19 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
static int mailimf_cparenth_parse(const char * message, size_t length,
size_t * indx)
{
return mailimf_char_parse(message, length, indx, ')');
} | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 97,673,219,357,429,100,000,000,000,000,000,000,000 | 5 | Fixed crash #274 |
vips_giflib_buffer_read( GifFileType *file, GifByteType *buf, int n )
{
VipsForeignLoadGif *gif = (VipsForeignLoadGif *) file->UserData;
VipsForeignLoadGifBuffer *buffer = (VipsForeignLoadGifBuffer *) gif;
size_t will_read = VIPS_MIN( n, buffer->bytes_to_go );
memcpy( buf, buffer->p, will_read );
buffer->p += wil... | 0 | [
"CWE-416"
] | libvips | ce684dd008532ea0bf9d4a1d89bacb35f4a83f4d | 200,669,845,907,622,380,000,000,000,000,000,000,000 | 15 | fetch map after DGifGetImageDesc()
Earlier refactoring broke GIF map fetch. |
static int handle_request_for_tables(char *tables, uint length)
{
char *query, *end, options[100], message[100];
uint query_length= 0;
const char *op = 0;
options[0] = 0;
end = options;
switch (what_to_do) {
case DO_CHECK:
op = "CHECK";
if (opt_quick) end = my_stpcpy(end, " QUICK");
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 194,490,600,348,662,130,000,000,000,000,000,000,000 | 61 | 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... |
static inline void RelinquishCacheNexusPixels(NexusInfo *nexus_info)
{
if (nexus_info->mapped == MagickFalse)
(void) RelinquishAlignedMemory(nexus_info->cache);
else
(void) UnmapBlob(nexus_info->cache,(size_t) nexus_info->length);
nexus_info->cache=(Quantum *) NULL;
nexus_info->pixels=(Quantum *) NULL;
... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | aecd0ada163a4d6c769cec178955d5f3e9316f2f | 1,992,098,416,677,998,400,000,000,000,000,000,000 | 12 | Set pixel cache to undefined if any resource limit is exceeded |
compare_mount_options(struct super_block *sb, struct cifs_mnt_data *mnt_data)
{
struct cifs_sb_info *old = CIFS_SB(sb);
struct cifs_sb_info *new = mnt_data->cifs_sb;
if ((sb->s_flags & CIFS_MS_MASK) != (mnt_data->flags & CIFS_MS_MASK))
return 0;
if ((old->mnt_cifs_flags & CIFS_MOUNT_MASK) !=
(new->mnt_cifs... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 1fc29bacedeabb278080e31bb9c1ecb49f143c3b | 312,573,684,674,298,050,000,000,000,000,000,000,000 | 37 | cifs: fix off-by-one bug in build_unc_path_to_root
commit 839db3d10a (cifs: fix up handling of prefixpath= option) changed
the code such that the vol->prepath no longer contained a leading
delimiter and then fixed up the places that accessed that field to
account for that change.
One spot in build_unc_path_to_root wa... |
static int tcp_inq_hint(struct sock *sk)
{
const struct tcp_sock *tp = tcp_sk(sk);
u32 copied_seq = READ_ONCE(tp->copied_seq);
u32 rcv_nxt = READ_ONCE(tp->rcv_nxt);
int inq;
inq = rcv_nxt - copied_seq;
if (unlikely(inq < 0 || copied_seq != READ_ONCE(tp->copied_seq))) {
lock_sock(sk);
inq = tp->rcv_nxt - tp->... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 151,538,921,604,846,710,000,000,000,000,000,000,000 | 20 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
int __mm_populate(unsigned long start, unsigned long len, int ignore_errors)
{
struct mm_struct *mm = current->mm;
unsigned long end, nstart, nend;
struct vm_area_struct *vma = NULL;
int locked = 0;
long ret = 0;
end = start + len;
for (nstart = start; nstart < end; nstart = nend) {
/*
* We want to fault ... | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 251,038,042,442,482,040,000,000,000,000,000,000,000 | 52 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
void rt6_mtu_change(struct net_device *dev, unsigned int mtu)
{
struct rt6_mtu_change_arg arg = {
.dev = dev,
.mtu = mtu,
};
fib6_clean_all(dev_net(dev), rt6_mtu_change_route, &arg);
} | 0 | [
"CWE-119"
] | net | c88507fbad8055297c1d1e21e599f46960cbee39 | 303,713,653,932,632,500,000,000,000,000,000,000,000 | 9 | ipv6: don't set DST_NOCOUNT for remotely added routes
DST_NOCOUNT should only be used if an authorized user adds routes
locally. In case of routes which are added on behalf of router
advertisments this flag must not get used as it allows an unlimited
number of routes getting added remotely.
Signed-off-by: Sabrina Dub... |
encodeAcceptBer(uint8_t* buffer, int bufPos)
{
bufPos = BerEncoder_encodeTL(0x30, 7, buffer, bufPos);
bufPos = BerEncoder_encodeTL(0x80, 1, buffer, bufPos);
buffer[bufPos++] = 0;
bufPos = BerEncoder_encodeTL(0x81, 2, buffer, bufPos);
buffer[bufPos++] = 0x51;
buffer[bufPos++] = 0x01;
return ... | 0 | [
"CWE-703",
"CWE-835"
] | libiec61850 | cfa94cbf10302bedc779703f874ee2e8387a0721 | 103,957,522,627,704,220,000,000,000,000,000,000,000 | 11 | - fixed - Bug in presentation layer parser can cause infinite loop (LIB61850-302) |
void CCrypto::Init()
{
// sodium_init is safe to call multiple times from multiple threads
// so no need to do anything clever here.
if(sodium_init() < 0)
{
AssertMsg( false, "libsodium didn't init" );
}
} | 0 | [
"CWE-787"
] | GameNetworkingSockets | bea84e2844b647532a9b7fbc3a6a8989d66e49e3 | 109,806,499,847,159,340,000,000,000,000,000,000,000 | 9 | Check if output buffer is too small.
It really seems like libsodium (whose entire purpose is to make crypto
idiot-proof) making me mess with these details is a flaw in the API design.
Also, correct Hungarian. |
static int lua_ap_regex(lua_State *L)
{
request_rec *r;
int i,
rv,
flags;
const char *pattern,
*source;
char *err;
ap_regex_t regex;
ap_regmatch_t matches[MODLUA_MAX_REG_MATCH+1];
luaL_checktype(L, 1, LUA_TUSERDATA);
luaL_checktype(L, 2, LUA_TSTRING)... | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 140,986,866,957,890,040,000,000,000,000,000,000,000 | 59 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
void RunJob() override {
CIRCSock* pIRCSock = m_pNetwork->GetIRCSock();
auto uFrequency = m_pNetwork->GetUser()->GetPingFrequency();
if (pIRCSock &&
pIRCSock->GetTimeSinceLastDataTransaction() >= uFrequency) {
pIRCSock->PutIRC("PING :ZNC");
}
const v... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 20,069,964,441,072,816,000,000,000,000,000,000,000 | 20 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
GC_INNER GC_bool GC_enclosing_mapping(ptr_t addr, ptr_t *startp,
ptr_t *endp)
{
char *prot;
ptr_t my_start, my_end;
unsigned int maj_dev;
char *maps = GC_get_maps();
char *buf_ptr = maps;
if (0 == maps) return(FALSE);
for (;;) {
buf_ptr = GC... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 1,938,737,409,926,225,300,000,000,000,000,000,000 | 25 | 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... |
yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
{
yaml_mark_t start_mark;
yaml_mark_t end_mark;
yaml_string_t string = NULL_STRING;
yaml_string_t leading_break = NULL_STRING;
yaml_string_t trailing_breaks = NULL_STRING;
yaml_string_t whitespaces = NULL_STRING;
int l... | 0 | [
"CWE-20"
] | libyaml | e6aa721cc0e5a48f408c52355559fd36780ba32a | 35,333,065,657,419,176,000,000,000,000,000,000,000 | 190 | Fix for https://bitbucket.org/xi/libyaml/issue/10/
https://bitbucket.org/xi/libyaml/issue/10/wrapped-strings-cause-assert-failure
Commenting out the assert makes the scanner do the right thing and
results in just a simple parse failure. |
slow_search_backward_ic(OnigEncoding enc, int case_fold_flag,
UChar* target, UChar* target_end,
const UChar* text, const UChar* adjust_text,
const UChar* text_end, const UChar* text_start)
{
UChar *s;
s = (UChar* )text_end;
s -= (target_end - target);
if (s > text_start)
s = (UChar* )text_start;
... | 0 | [
"CWE-125"
] | oniguruma | 690313a061f7a4fa614ec5cc8368b4f2284e059b | 58,082,270,982,044,140,000,000,000,000,000,000,000 | 24 | fix #57 : DATA_ENSURE() check must be before data access |
TfLiteRegistration* Register_MAX_POOL_REF() {
static TfLiteRegistration r = {pooling::Init, pooling::Free,
pooling::GenericPrepare<pooling::kMax>,
pooling::MaxEval<pooling::kReference>};
return &r;
} | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 34,996,602,580,859,377,000,000,000,000,000,000,000 | 6 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
DeletePinhole(struct upnphttp * h, const char * action, const char * ns)
{
int n;
#if 0
static const char resp[] =
"<u:DeletePinholeResponse "
"xmlns:u=\"urn:schemas-upnp-org:service:WANIPv6FirewallControl:1\">"
"</u:DeletePinholeResponse>";
#endif
static const char resp[] =
"<u:%sResponse "
"xmlns:u=\"%s\... | 0 | [
"CWE-476"
] | miniupnp | 13585f15c7f7dc28bbbba1661efb280d530d114c | 141,211,457,410,260,880,000,000,000,000,000,000,000 | 75 | GetOutboundPinholeTimeout: check args |
static void Sp_toString(js_State *J)
{
js_Object *self = js_toobject(J, 0);
if (self->type != JS_CSTRING) js_typeerror(J, "not a string");
js_pushliteral(J, self->u.s.string);
} | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | mujs | 00d4606c3baf813b7b1c176823b2729bf51002a2 | 324,616,017,786,427,840,000,000,000,000,000,000,000 | 6 | Bug 700937: Limit recursion in regexp matcher.
Also handle negative return code as an error in the JS bindings. |
void
http_parser_set_max_header_size(uint32_t size) {
max_header_size = size; | 0 | [
"CWE-444"
] | http-parser | 7d5c99d09f6743b055d53fc3f642746d9801479b | 15,742,750,185,990,000,000,000,000,000,000,000,000 | 3 | Support multi-coding Transfer-Encoding
`Transfer-Encoding` header might have multiple codings in it. Even
though llhttp cares only about `chunked`, it must check that `chunked`
is the last coding (if present).
ABNF from RFC 7230:
```
Transfer-Encoding = *( "," OWS ) transfer-coding *( OWS "," [ OWS
transfer-codi... |
static int rxrpc_preparse_xdr_rxkad(struct key_preparsed_payload *prep,
size_t datalen,
const __be32 *xdr, unsigned int toklen)
{
struct rxrpc_key_token *token, **pptoken;
size_t plen;
u32 tktlen;
_enter(",{%x,%x,%x,%x},%u",
ntohl(xdr[0]), ntohl(xdr[1]), ntohl(xdr[2]), ntohl(xdr[3]),
... | 0 | [
"CWE-190"
] | linux | 5f2f97656ada8d811d3c1bef503ced266fcd53a0 | 150,987,713,398,319,700,000,000,000,000,000,000,000 | 77 | rxrpc: Fix several cases where a padded len isn't checked in ticket decode
This fixes CVE-2017-7482.
When a kerberos 5 ticket is being decoded so that it can be loaded into an
rxrpc-type key, there are several places in which the length of a
variable-length field is checked to make sure that it's not going to
overrun... |
static int GetBasicDate(const byte* source, word32* idx, byte* date,
byte* format, int maxIdx)
{
int ret, length;
const byte *datePtr = NULL;
WOLFSSL_ENTER("GetBasicDate");
ret = GetDateInfo(source, idx, &datePtr, format, &length, maxIdx);
if (ret < 0)
return ret... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 216,219,020,329,512,150,000,000,000,000,000,000,000 | 16 | OCSP: improve handling of OCSP no check extension |
int wm_SemFree(wm_Sem *s) {
CloseHandle(*s);
*s = NULL;
return 0;
} | 0 | [
"CWE-787"
] | wolfMQTT | 84d4b53122e0fa0280c7872350b89d5777dabbb2 | 296,908,966,691,214,500,000,000,000,000,000,000,000 | 5 | Fix wolfmqtt-fuzzer: Null-dereference WRITE in MqttProps_Free |
ipmi_fru_query_new_value(uint8_t *data,int offset, size_t len)
{
bool status = false;
int ret;
char answer;
printf("Would you like to change this value <y/n> ? ");
ret = scanf("%c", &answer);
if (ret != 1) {
return false;
}
if( answer == 'y' || answer == 'Y' ){
int i;
unsigned int *holder;
holder = m... | 0 | [
"CWE-120",
"CWE-787"
] | ipmitool | e824c23316ae50beb7f7488f2055ac65e8b341f2 | 298,159,161,102,844,850,000,000,000,000,000,000,000 | 42 | fru: Fix buffer overflow vulnerabilities
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `read_fru_area_section` function only performs size validation of
requested read size, and falsely assumes that the IPMI message will not
respond with more than ... |
static double mp_image_d(_cimg_math_parser& mp) {
unsigned int ind = (unsigned int)mp.opcode[2];
if (ind!=~0U) {
if (!mp.imglist.width()) return cimg::type<double>::nan();
ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width());
}
const CImg<T> &img = ... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 165,835,328,673,546,360,000,000,000,000,000,000,000 | 9 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
ep0_fasync (int f, struct file *fd, int on)
{
struct dev_data *dev = fd->private_data;
// caller must F_SETOWN before signal delivery happens
VDEBUG (dev, "%s %s\n", __func__, on ? "on" : "off");
return fasync_helper (f, fd, on, &dev->fasync);
} | 0 | [
"CWE-763"
] | linux | 501e38a5531efbd77d5c73c0ba838a889bfc1d74 | 295,525,810,450,434,450,000,000,000,000,000,000,000 | 7 | usb: gadget: clear related members when goto fail
dev->config and dev->hs_config and dev->dev need to be cleaned if
dev_config fails to avoid UAF.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20211231172138.7993-3-hbh25y@gmail.com
Signed... |
krb5_encode_krbsecretkey(krb5_key_data *key_data_in, int n_key_data,
krb5_kvno mkvno) {
struct berval **ret = NULL;
int currkvno;
int num_versions = 1;
int i, j, last;
krb5_error_code err = 0;
krb5_key_data *key_data = NULL;
if (n_key_data < 0)
return NULL;
... | 0 | [
"CWE-703"
] | krb5 | 04038bf3633c4b909b5ded3072dc88c8c419bf16 | 212,382,356,010,580,740,000,000,000,000,000,000,000 | 77 | Support keyless principals in LDAP [CVE-2014-5354]
Operations like "kadmin -q 'addprinc -nokey foo'" or
"kadmin -q 'purgekeys -all foo'" result in principal entries with
no keys present, so krb5_encode_krbsecretkey() would just return
NULL, which then got unconditionally dereferenced in
krb5_add_ber_mem_ldap_mod().
A... |
ExprAppendMultiKeysymList(ExprDef *expr, ExprDef *append)
{
unsigned nSyms = darray_size(expr->keysym_list.syms);
unsigned numEntries = darray_size(append->keysym_list.syms);
darray_append(expr->keysym_list.symsMapIndex, nSyms);
darray_append(expr->keysym_list.symsNumEntries, numEntries);
darray_co... | 1 | [
"CWE-416",
"CWE-200"
] | libxkbcommon | c1e5ac16e77a21f87bdf3bc4dea61b037a17dddb | 278,195,891,311,789,860,000,000,000,000,000,000,000 | 13 | xkbcomp: fix pointer value for FreeStmt
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> |
SYSCALL_DEFINE5(recvmmsg, int, fd, struct mmsghdr __user *, mmsg,
unsigned int, vlen, unsigned int, flags,
struct timespec __user *, timeout)
{
int datagrams;
struct timespec timeout_sys;
if (flags & MSG_CMSG_COMPAT)
return -EINVAL;
if (!timeout)
return __sys_recvmmsg(fd, mmsg, vlen, flags, NULL);
if (c... | 0 | [
"CWE-264"
] | net | 4de930efc23b92ddf88ce91c405ee645fe6e27ea | 333,542,662,158,904,100,000,000,000,000,000,000,000 | 24 | net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static const char *cpusubtype_tostring(ut32 cputype, ut32 cpusubtype) {
switch (cputype) {
case CPU_TYPE_VAX:
switch (cpusubtype) {
case CPU_SUBTYPE_VAX_ALL: return "all";
case CPU_SUBTYPE_VAX780: return "vax780";
case CPU_SUBTYPE_VAX785: return "vax785";
case CPU_SUBTYPE_VAX750: return "vax750";
case CPU... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 0052500c1ed5bf8263b26b9fd7773dbdc6f170c4 | 272,861,076,440,882,940,000,000,000,000,000,000,000 | 153 | Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'
mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrm... |
static struct mm_struct * mm_init(struct mm_struct * mm, struct task_struct *p)
{
atomic_set(&mm->mm_users, 1);
atomic_set(&mm->mm_count, 1);
init_rwsem(&mm->mmap_sem);
INIT_LIST_HEAD(&mm->mmlist);
mm->flags = (current->mm) ? current->mm->flags : default_dump_filter;
mm->core_state = NULL;
mm->nr_ptes = 0;
set_... | 0 | [
"CWE-264"
] | linux-2.6 | 2d5516cbb9daf7d0e342a2e3b0fc6f8c39a81205 | 84,601,430,075,719,850,000,000,000,000,000,000,000 | 27 | copy_process: fix CLONE_PARENT && parent_exec_id interaction
CLONE_PARENT can fool the ->self_exec_id/parent_exec_id logic. If we
re-use the old parent, we must also re-use ->parent_exec_id to make
sure exit_notify() sees the right ->xxx_exec_id's when the CLONE_PARENT'ed
task exits.
Also, move down the "p->parent_ex... |
static int do_arpt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
{
int ret;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
switch (cmd) {
case ARPT_SO_GET_INFO:
ret = get_info(sock_net(sk), user, len, 0);
break;
case ARPT_SO_GET_ENTRIES:
ret = get_entries(sock_net(sk), user, len);
break;... | 0 | [
"CWE-200"
] | linux-2.6 | 42eab94fff18cb1091d3501cd284d6bd6cc9c143 | 100,376,205,599,524,490,000,000,000,000,000,000,000 | 42 | netfilter: arp_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
i... |
static void create_trace_options_dir(struct trace_array *tr)
{
struct dentry *t_options;
bool top_level = tr == &global_trace;
int i;
t_options = trace_options_init_dentry(tr);
if (!t_options)
return;
for (i = 0; trace_options[i]; i++) {
if (top_level ||
!((1 << i) & TOP_LEVEL_TRACE_FLAGS))
create_... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 28,944,944,250,191,830,000,000,000,000,000,000,000 | 16 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
static PHP_FUNCTION(readgzfile)
{
char *filename;
int filename_len;
int flags = REPORT_ERRORS;
php_stream *stream;
int size;
long use_include_path = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &filename, &filename_len, &use_include_path) == FAILURE) {
return;
}
if (use_include_path) {
... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 170,708,111,732,629,720,000,000,000,000,000,000,000 | 26 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
GF_Err stbl_repackCTS(GF_CompositionOffsetBox *ctts)
{
u32 i, j;
if (!ctts->unpack_mode) return GF_OK;
ctts->unpack_mode = 0;
j=0;
for (i=1; i<ctts->nb_entries; i++) {
if (ctts->entries[i].decodingOffset==ctts->entries[j].decodingOffset) {
ctts->entries[j].sampleCount++;
} else {
j++;
ctts->entries[... | 0 | [
"CWE-120",
"CWE-787"
] | gpac | 77ed81c069e10b3861d88f72e1c6be1277ee7eae | 316,267,610,213,988,860,000,000,000,000,000,000,000 | 21 | fixed #1774 (fuzz) |
static int dbConnect(char *host, char *user, char *passwd)
{
DBUG_ENTER("dbConnect");
if (verbose)
{
fprintf(stderr, "# Connecting to %s...\n", host ? host : "localhost");
}
mysql_init(&mysql_connection);
if (opt_compress)
mysql_options(&mysql_connection, MYSQL_OPT_COMPRESS, NullS);
#ifdef HAVE_OPEN... | 0 | [
"CWE-319"
] | mysql-server | 060b1eadf4913f7066484ea34ec62feead1bca44 | 220,500,889,797,588,880,000,000,000,000,000,000,000 | 44 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99) |
static inline struct sock *unix_find_socket_byname(struct net *net,
struct sockaddr_un *sunname,
int len, unsigned int hash)
{
struct sock *s;
spin_lock(&unix_table_lock);
s = __unix_find_socket_byname(net, sunname, len, hash);
if (s)
sock_hold(s);
spin_unlock(&unix_table_lock);
return s;
} | 0 | [
"CWE-362"
] | linux | cbcf01128d0a92e131bd09f1688fe032480b65ca | 119,073,604,027,323,740,000,000,000,000,000,000,000 | 13 | af_unix: fix garbage collect vs MSG_PEEK
unix_gc() assumes that candidate sockets can never gain an external
reference (i.e. be installed into an fd) while the unix_gc_lock is
held. Except for MSG_PEEK this is guaranteed by modifying inflight
count under the unix_gc_lock.
MSG_PEEK does not touch any variable protec... |
int sha1sum_file(char *fnam, unsigned char *digest)
{
char *buf;
int ret;
FILE *f;
long flen;
if (!fnam)
return -1;
f = fopen_cloexec(fnam, "r");
if (!f) {
SYSERROR("Error opening template");
return -1;
}
if (fseek(f, 0, SEEK_END) < 0) {
SYSERROR("Error seeking to end of template");
fclose(f);
r... | 0 | [
"CWE-417"
] | lxc | c1cf54ebf251fdbad1e971679614e81649f1c032 | 171,424,298,977,736,050,000,000,000,000,000,000,000 | 58 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
TEST_F(RouterTest, UpstreamPerTryTimeout) {
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](Http::ResponseDecoder& decoder,
Http::ConnectionPool::Ca... | 0 | [
"CWE-703"
] | envoy | f0bb2219112d8cdb4c4e8b346834f962925362ca | 74,558,159,640,924,730,000,000,000,000,000,000,000 | 50 | [1.20] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
TEST_F(QueryPlannerTest, ContainedOrNestedElemMatchObject) {
addIndex(BSON("d" << 1 << "a.b.c" << 1));
addIndex(BSON("e" << 1 << "a.b.c" << 1));
runQuery(fromjson(
"{$and: [{a: {$elemMatch: {b: {$elemMatch: {c: 5}}}}}, {$or: [{d: 6}, {e: 7}]}]}"));
assertNumSolutions(2);
assertSolutionExist... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 211,302,701,948,744,200,000,000,000,000,000,000,000 | 16 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
static bool log_access_ok(void __user *log_base, u64 addr, unsigned long sz)
{
u64 a = addr / VHOST_PAGE_SIZE / 8;
/* Make sure 64 bit math will not overflow. */
if (a > ULONG_MAX - (unsigned long)log_base ||
a + (unsigned long)log_base > ULONG_MAX)
return false;
return access_ok(log_base + a,
(sz + VH... | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 133,244,171,199,897,370,000,000,000,000,000,000,000 | 12 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
png_push_read_sig(png_structrp png_ptr, png_inforp info_ptr)
{
png_size_t num_checked = png_ptr->sig_bytes, /* SAFE, does not exceed 8 */
num_to_check = 8 - num_checked;
if (png_ptr->buffer_size < num_to_check)
{
num_to_check = png_ptr->buffer_size;
}
png_push_fill_buffer(png_ptr, &(info_p... | 0 | [
"CWE-369"
] | libpng | 2dca15686fadb1b8951cb29b02bad4cae73448da | 65,986,023,699,764,800,000,000,000,000,000,000,000 | 31 | [libpng16] Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin). |
static void mysql_once_init()
#endif
{
ma_init(); /* Will init threads */
init_client_errs();
get_default_configuration_dirs();
set_default_charset_by_name(MARIADB_DEFAULT_CHARSET, 0);
if (mysql_client_plugin_init())
{
#ifdef _WIN32
return 1;
#else
return;
#endif
}
if (!mysql_port)
{
#if !... | 0 | [
"CWE-20"
] | mariadb-connector-c | 2759b87d72926b7c9b5426437a7c8dd15ff57945 | 146,394,803,445,355,310,000,000,000,000,000,000,000 | 53 | sanity checks for client-supplied OK packet content
reported by Matthias Kaiser, Apple Information Security |
static double mp_set_ixyzc(_cimg_math_parser& mp) {
CImg<T> &img = mp.imgout;
const int
x = (int)_mp_arg(2), y = (int)_mp_arg(3),
z = (int)_mp_arg(4), c = (int)_mp_arg(5);
const double val = _mp_arg(1);
if (x>=0 && x<img.width() && y>=0 && y<img.height() &&
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 70,005,752,295,166,280,000,000,000,000,000,000,000 | 11 | Fix other issues in 'CImg<T>::load_bmp()'. |
static int io_add_buffers(struct io_provide_buf *pbuf, struct io_buffer **head)
{
struct io_buffer *buf;
u64 addr = pbuf->addr;
int i, bid = pbuf->bid;
for (i = 0; i < pbuf->nbufs; i++) {
buf = kmalloc(sizeof(*buf), GFP_KERNEL);
if (!buf)
break;
buf->addr = addr;
buf->len = min_t(__u32, pbuf->len, MAX_... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 66,027,508,180,468,260,000,000,000,000,000,000,000 | 26 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs)
{
u8 proto;
struct pfkey_sock *pfk = pfkey_sk(sk);
if (pfk->dump.dump != NULL)
return -EBUSY;
proto = pfkey_satype2proto(hdr->sadb_msg_satype);
if (proto == 0)
return -EINVAL;
pfk->dump.msg_versi... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 190,792,802,078,264,100,000,000,000,000,000,000,000 | 20 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static PHP_INI_MH(OnUpdateSessionString) /* {{{ */
{
SESSION_CHECK_ACTIVE_STATE;
SESSION_CHECK_OUTPUT_STATE;
return OnUpdateString(entry, new_value, mh_arg1, mh_arg2, mh_arg3, stage);
} | 0 | [
"CWE-476"
] | php-src | d76f7c6c636b8240e06a1fa29eebb98ad005008a | 106,599,778,471,309,440,000,000,000,000,000,000,000 | 6 | Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress |
job_read_callback(__unused struct bufferevent *bufev, void *data)
{
struct job *job = data;
if (job->updatecb != NULL)
job->updatecb(job);
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 91,723,977,550,110,750,000,000,000,000,000,000,000 | 7 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
e_ews_calendar_recurring_day_transition_new (void)
{
return g_new0 (EEwsCalendarRecurringDayTransition, 1);
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 182,680,617,851,698,400,000,000,000,000,000,000,000 | 4 | 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 |
re_exec (s)
const char *s;
{
const int len = strlen (s);
return
0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
} | 0 | [
"CWE-190",
"CWE-252"
] | glibc | 2864e767053317538feafa815046fff89e5a16be | 305,315,776,580,372,400,000,000,000,000,000,000,000 | 7 | Update.
1999-11-09 Ulrich Drepper <drepper@cygnus.com>
* elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to
directory with the reference since this is as secure as using the
object with the dependency.
(_dl_dst_substitute): Likewise.
* elf/dl-load.c (_dl_dst_count): Change strings in first two
strncmp ... |
RZ_API RzAnalysisOp *rz_core_analysis_op(RzCore *core, ut64 addr, int mask) {
int len;
ut8 buf[32];
ut8 *ptr;
rz_return_val_if_fail(core, NULL);
if (addr == UT64_MAX) {
return NULL;
}
RzAnalysisOp *op = RZ_NEW0(RzAnalysisOp);
if (!op) {
return NULL;
}
int delta = (addr - core->offset);
int minopsz = 8;
... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 144,548,474,039,979,000,000,000,000,000,000,000,000 | 49 | 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 operator delete(void *, MEM_ROOT*) {} | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 302,721,401,344,209,660,000,000,000,000,000,000,000 | 1 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static X509 *find_issuer(X509_STORE_CTX *ctx, STACK_OF(X509) *sk, X509 *x)
{
int i;
X509 *issuer;
for (i = 0; i < sk_X509_num(sk); i++)
{
issuer = sk_X509_value(sk, i);
if (ctx->check_issued(ctx, x, issuer))
return issuer;
}
return NULL;
} | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 12,518,454,458,586,798,000,000,000,000,000,000,000 | 12 | Backport OCSP fixes. |
void nft_obj_notify(struct net *net, const struct nft_table *table,
struct nft_object *obj, u32 portid, u32 seq, int event,
int family, int report, gfp_t gfp)
{
struct nftables_pernet *nft_net = nft_pernet(net);
struct sk_buff *skb;
int err;
char *buf = kasprintf(gfp, "%s:%u",
table->name, nft_... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 310,432,505,066,968,960,000,000,000,000,000,000,000 | 39 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
free_search_patterns(void)
{
vim_free(spats[0].pat);
vim_free(spats[1].pat);
VIM_CLEAR(mr_pattern);
} | 0 | [
"CWE-416"
] | vim | 409510c588b1eec1ae33511ae97a21eb8e110895 | 281,598,278,231,357,240,000,000,000,000,000,000,000 | 6 | patch 8.2.5050: using freed memory when searching for pattern in path
Problem: Using freed memory when searching for pattern in path.
Solution: Make a copy of the line. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.