func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
xmlParseComment(xmlParserCtxtPtr ctxt) {
xmlChar *buf = NULL;
size_t size = XML_PARSER_BUFFER_SIZE;
size_t len = 0;
xmlParserInputState state;
const xmlChar *in;
size_t nbchar = 0;
int ccol;
int inputid;
/*
* Check that there is a comment right here.
*/
if ((RAW != '<'... | 0 | [
"CWE-119"
] | libxml2 | e50ba8164eee06461c73cd8abb9b46aa0be81869 | 274,468,691,558,587,300,000,000,000,000,000,000,000 | 157 | Improve handling of xmlStopParser()
Add a specific parser error
Try to stop parsing as quickly as possible |
void HttpIntegrationTest::testRouterNotFoundWithBody() {
config_helper_.setDefaultHostAndRoute("foo.com", "/found");
initialize();
BufferingStreamDecoderPtr response = IntegrationUtil::makeSingleRequest(
lookupPort("http"), "POST", "/notfound", "foo", downstream_protocol_, version_);
ASSERT_TRUE(response... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 234,397,495,827,476,530,000,000,000,000,000,000,000 | 9 | 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 setVirtualClusterName(const absl::optional<std::string>& virtual_cluster_name) override {
virtual_cluster_name_ = virtual_cluster_name;
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 112,539,805,904,605,100,000,000,000,000,000,000,000 | 3 | 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 fullSpeedBench(char** fileNamesTable, int nbFiles)
{
int fileIdx=0;
char* orig_buff;
# define NB_COMPRESSION_ALGORITHMS 13
# define MINCOMPRESSIONCHAR '0'
double totalCTime[NB_COMPRESSION_ALGORITHMS+1] = {0};
double totalCSize[NB_COMPRESSION_ALGORITHMS+1] = {0};
# define NB_DECOMPRESSION_ALGORITHMS 7
# defi... | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 123,268,727,912,465,890,000,000,000,000,000,000,000 | 262 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static void *rt_cache_seq_start(struct seq_file *seq, loff_t *pos)
{
if (*pos)
return NULL;
return SEQ_START_TOKEN;
} | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 215,785,308,333,774,000,000,000,000,000,000,000,000 | 6 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
repodata_add_poolstr_array(Repodata *data, Id solvid, Id keyname,
const char *str)
{
Id id;
if (data->localpool)
id = stringpool_str2id(&data->spool, str, 1);
else
id = pool_str2id(data->repo->pool, str, 1);
repodata_add_idarray(data, solvid, keyname, id);
} | 0 | [
"CWE-125"
] | libsolv | fdb9c9c03508990e4583046b590c30d958f272da | 335,991,941,369,998,700,000,000,000,000,000,000,000 | 10 | repodata_schema2id: fix heap-buffer-overflow in memcmp
When the length of last schema in data->schemadata is
less than length of input schema, we got a read overflow
in asan test.
Signed-off-by: Zhipeng Xie <xiezhipeng1@huawei.com> |
void ha_partition::get_dynamic_partition_info(PARTITION_STATS *stat_info,
uint part_id)
{
handler *file= m_file[part_id];
file->info(HA_STATUS_TIME | HA_STATUS_VARIABLE |
HA_STATUS_VARIABLE_EXTRA | HA_STATUS_NO_LOCK);
stat_info->records= fil... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 103,728,950,658,268,620,000,000,000,000,000,000,000 | 21 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
void setReferenceKey(const LowerCaseString& key, absl::string_view value) override {
header_map_->setReferenceKey(key, value);
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 293,300,852,055,383,260,000,000,000,000,000,000,000 | 3 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
int trio_get_upper TRIO_ARGS1((ref), trio_pointer_t ref)
{
return (((trio_reference_t*)ref)->parameter->flags & FLAGS_UPPER) ? TRUE : FALSE;
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 61,321,655,653,167,280,000,000,000,000,000,000,000 | 4 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
R_API int r_core_pdb_info(RCore *core, const char *file, ut64 baddr, int mode) {
R_PDB pdb = R_EMPTY;
pdb.cb_printf = r_cons_printf;
if (!init_pdb_parser (&pdb, file)) {
return false;
}
if (!pdb.pdb_parse (&pdb)) {
eprintf ("pdb was not parsed\n");
pdb.finish_pdb_parse (&pdb);
return false;
}
if (mode =... | 0 | [
"CWE-78"
] | radare2 | 5411543a310a470b1257fb93273cdd6e8dfcb3af | 292,129,928,555,761,380,000,000,000,000,000,000,000 | 45 | More fixes for the CVE-2019-14745 |
int ldb_kv_search_indexed(struct ldb_kv_context *ac, uint32_t *match_count)
{
struct ldb_context *ldb = ldb_module_get_ctx(ac->module);
struct ldb_kv_private *ldb_kv = talloc_get_type(
ldb_module_get_private(ac->module), struct ldb_kv_private);
struct dn_list *dn_list;
int ret;
enum ldb_scope index_scope;
en... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 31,495,679,706,056,210,000,000,000,000,000,000,000 | 165 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
pdf_filter_J(fz_context *ctx, pdf_processor *proc, int linecap)
{
pdf_filter_processor *p = (pdf_filter_processor*)proc;
filter_gstate *gstate = gstate_to_update(ctx, p);
gstate->pending.stroke.linecap = linecap;
} | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 80,290,459,481,674,080,000,000,000,000,000,000,000 | 6 | Bug 701292: Fix test for missing/empty string. |
SYSCALL_DEFINE1(setgid, gid_t, gid)
{
struct user_namespace *ns = current_user_ns();
const struct cred *old;
struct cred *new;
int retval;
kgid_t kgid;
kgid = make_kgid(ns, gid);
if (!gid_valid(kgid))
return -EINVAL;
new = prepare_creds();
if (!new)
return -ENOMEM;
old = current_cred();
retval = -EPER... | 0 | [
"CWE-16",
"CWE-79"
] | linux | 2702b1526c7278c4d65d78de209a465d4de2885e | 81,178,192,329,938,210,000,000,000,000,000,000,000 | 31 | kernel/sys.c: fix stack memory content leak via UNAME26
Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents. This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unne... |
std::vector<Option> get_rgw_options() {
return std::vector<Option>({
Option("rgw_acl_grants_max_num", Option::TYPE_INT, Option::LEVEL_ADVANCED)
.set_default(100)
.set_description("Max number of ACL grants in a single request"),
Option("rgw_rados_tracing", Option::TYPE_BOOL, Option::LEVEL_ADVANCED)
... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 111,450,291,369,987,840,000,000,000,000,000,000,000 | 1,335 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static bool hidp_send_message(GIOChannel *chan, uint8_t hdr,
const uint8_t *data, size_t size)
{
int fd;
ssize_t len;
uint8_t msg[size + 1];
if (!chan) {
error("BT socket not connected");
return false;
}
if (data == NULL)
size = 0;
msg[0] = hdr;
if (size > 0)
memcpy(&msg[1], data, size);
++size... | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 149,049,862,139,573,000,000,000,000,000,000,000,000 | 36 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
parserCreate(const XML_Char *encodingName,
const XML_Memory_Handling_Suite *memsuite, const XML_Char *nameSep,
DTD *dtd) {
XML_Parser parser;
if (memsuite) {
XML_Memory_Handling_Suite *mtemp;
parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
if (parser != NULL) {... | 0 | [
"CWE-400",
"CWE-703"
] | libexpat | 9b4ce651b26557f16103c3a366c91934ecd439ab | 311,636,301,623,160,240,000,000,000,000,000,000,000 | 113 | Prevent stack exhaustion in build_model
It is possible to trigger stack exhaustion in build_model function if
depth of nested children in DTD element is large enough. This happens
because build_node is a recursively called function within build_model.
The code has been adjusted to run iteratively. It uses the already... |
find_unused_session (server *serv)
{
session *sess;
GSList *list = sess_list;
while (list)
{
sess = (session *) list->data;
if (sess->type == SESS_CHANNEL && sess->channel[0] == 0 &&
sess->server == serv)
{
if (sess->waitchannel[0] == 0)
return sess;
}
list = list->next;
}
return NULL;
} | 0 | [
"CWE-22"
] | hexchat | 4e061a43b3453a9856d34250c3913175c45afe9d | 167,011,058,709,351,680,000,000,000,000,000,000,000 | 17 | Clean up handling CAP LS |
check_backrefs(Node* node, ScanEnv* env)
{
int r;
switch (NODE_TYPE(node)) {
case NODE_LIST:
case NODE_ALT:
do {
r = check_backrefs(NODE_CAR(node), env);
} while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
break;
case NODE_ANCHOR:
if (! ANCHOR_HAS_BODY(ANCHOR_(node))) {
r = 0... | 0 | [
"CWE-476"
] | oniguruma | 410f5916429e7d2920e1d4867388514f605413b8 | 62,220,991,135,451,590,000,000,000,000,000,000,000 | 64 | fix #87: Read unknown address in onig_error_code_to_str() |
static Buf _get_fwd_buf(pmixp_coll_ring_ctx_t *coll_ctx)
{
pmixp_coll_ring_t *ring = _ctx_get_coll_ring(coll_ctx);
Buf buf = list_pop(ring->fwrd_buf_pool);
if (!buf) {
buf = pmixp_server_buf_new();
}
return buf;
} | 0 | [
"CWE-120"
] | slurm | c3142dd87e06621ff148791c3d2f298b5c0b3a81 | 302,164,059,882,105,700,000,000,000,000,000,000,000 | 9 | PMIx - fix potential buffer overflows from use of unpackmem().
CVE-2020-27745. |
oop InstanceKlass::init_lock() const {
// return the init lock from the mirror
oop lock = java_lang_Class::init_lock(java_mirror());
// Prevent reordering with any access of initialization state
OrderAccess::loadload();
assert((oop)lock != NULL || !is_not_initialized(), // initialized or in_error state
... | 0 | [] | jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 96,240,346,169,162,840,000,000,000,000,000,000,000 | 9 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
int fmtutil_get_bmpinfo(deark *c, dbuf *f, struct de_bmpinfo *bi, i64 pos,
i64 len, unsigned int flags)
{
i64 fhs; // file header size
i64 bmih_pos;
struct de_fourcc cmpr4cc;
char cmprname_dbgstr[80];
de_zeromem(bi, sizeof(struct de_bmpinfo));
de_zeromem(&cmpr4cc, sizeof(struct de_fourcc));
fhs = (flags & DE_... | 0 | [
"CWE-369"
] | deark | 62acb7753b0e3c0d3ab3c15057b0a65222313334 | 53,544,927,601,900,090,000,000,000,000,000,000,000 | 150 | pict,macrsrc: Fixed a bug that could cause division by 0
Found by F. Çelik. |
static void SFDGetSpiros(FILE *sfd,SplineSet *cur) {
int ch;
spiro_cp cp;
ch = nlgetc(sfd); /* S */
ch = nlgetc(sfd); /* p */
ch = nlgetc(sfd); /* i */
ch = nlgetc(sfd); /* r */
ch = nlgetc(sfd); /* o */
while ( fscanf(sfd,"%lg %lg %c", &cp.x, &cp.y, &cp.ty )==3 ) {
if ( cur!=NULL... | 1 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 72,749,509,712,277,520,000,000,000,000,000,000,000 | 34 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
base_sock_create(struct net *net, struct socket *sock, int protocol)
{
struct sock *sk;
if (sock->type != SOCK_RAW)
return -ESOCKTNOSUPPORT;
sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto);
if (!sk)
return -ENOMEM;
sock_init_data(sock, sk);
sock->ops = &base_sock_ops;
sock->state = SS_UNCONNECTED;
... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 122,837,890,137,777,010,000,000,000,000,000,000,000 | 21 | 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... |
explicit UnicodeDecodeBaseOp(OpKernelConstruction* ctx, bool generate_offsets)
: OpKernel(ctx), generate_offsets_(generate_offsets) {
OP_REQUIRES_OK(ctx, GetErrorOptions(ctx, &error_options_));
OP_REQUIRES_OK(ctx, ctx->GetAttr("input_encoding", &input_encoding_));
// Make a temporary UConverter to e... | 0 | [
"CWE-824",
"CWE-787"
] | tensorflow | 2e0ee46f1a47675152d3d865797a18358881d7a6 | 314,264,375,215,187,330,000,000,000,000,000,000,000 | 15 | Ensure non-empty input_splits in tf.raw_ops.UnicodeEncode
PiperOrigin-RevId: 387170080
Change-Id: I3b489acc51c5cb4124c535b9df7cc6e62ef21766 |
void InstanceKlass::print_value_on(outputStream* st) const {
assert(is_klass(), "must be klass");
if (Verbose || WizardMode) access_flags().print_on(st);
name()->print_value_on(st);
} | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 8,168,895,043,165,854,000,000,000,000,000,000,000 | 5 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
long FileIo::read(byte* buf, long rcount)
{
assert(p_->fp_ != 0);
if (p_->switchMode(Impl::opRead) != 0) {
return 0;
}
return (long)std::fread(buf, 1, rcount, p_->fp_);
} | 0 | [
"CWE-190"
] | exiv2 | c73d1e27198a389ce7caf52ac30f8e2120acdafd | 253,697,708,574,270,560,000,000,000,000,000,000,000 | 8 | Avoid negative integer overflow when `filesize < io_->tell()`.
This fixes #791. |
static int __init fuse_fs_init(void)
{
int err;
fuse_inode_cachep = kmem_cache_create("fuse_inode",
sizeof(struct fuse_inode), 0,
SLAB_HWCACHE_ALIGN|SLAB_ACCOUNT|SLAB_RECLAIM_ACCOUNT,
fuse_inode_init_once);
err = -ENOMEM;
if (!fuse_inode_cachep)
goto out;
err = register_fuseblk();
if (err)
goto out... | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 281,390,415,911,040,360,000,000,000,000,000,000,000 | 29 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
SegmentSplitInfo* Binary::segment_split_info() {
return command<SegmentSplitInfo>();
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 306,136,977,501,472,950,000,000,000,000,000,000,000 | 3 | Resolve #764 |
virtual void saveState(GfxState *state) { } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 102,851,812,117,483,960,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static void x25_remove_socket(struct sock *sk)
{
write_lock_bh(&x25_list_lock);
sk_del_node_init(sk);
write_unlock_bh(&x25_list_lock);
} | 0 | [] | net | 7781607938c8371d4c2b243527430241c62e39c2 | 211,674,392,058,988,050,000,000,000,000,000,000,000 | 6 | net/x25: Fix null-ptr-deref caused by x25_disconnect
When the link layer is terminating, x25->neighbour will be set to NULL
in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in
x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is
shown below.
(Thread 1) | (Thread 2... |
static int v9fs_test_inode_dotl(struct inode *inode, void *data)
{
struct v9fs_inode *v9inode = V9FS_I(inode);
struct p9_stat_dotl *st = (struct p9_stat_dotl *)data;
/* don't match inode of different type */
if ((inode->i_mode & S_IFMT) != (st->st_mode & S_IFMT))
return 0;
if (inode->i_generation != st->st_gen... | 0 | [
"CWE-835"
] | linux | 5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f | 319,182,911,924,112,800,000,000,000,000,000,000,000 | 24 | 9p: use inode->i_lock to protect i_size_write() under 32-bit
Use inode->i_lock to protect i_size_write(), else i_size_read() in
generic_fillattr() may loop infinitely in read_seqcount_begin() when
multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl()
simultaneously under 32-bit SMP environment, and a... |
set_buflocal_ofu_callback(buf_T *buf UNUSED)
{
# ifdef FEAT_EVAL
copy_global_to_buflocal_cb(&ofu_cb, &buf->b_ofu_cb);
# endif
} | 0 | [
"CWE-125"
] | vim | f12129f1714f7d2301935bb21d896609bdac221c | 2,221,146,975,189,332,700,000,000,000,000,000,000 | 6 | patch 9.0.0020: with some completion reading past end of string
Problem: With some completion reading past end of string.
Solution: Check the length of the string. |
static void do_json_acroform(QPDF& pdf, Options& o, JSON& j)
{
JSON j_acroform = j.addDictionaryMember(
"acroform", JSON::makeDictionary());
QPDFAcroFormDocumentHelper afdh(pdf);
j_acroform.addDictionaryMember(
"hasacroform",
JSON::makeBool(afdh.hasAcroForm()));
j_acroform.addDic... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 204,089,276,666,653,880,000,000,000,000,000,000,000 | 102 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int atalk_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{
struct sockaddr_at *addr = (struct sockaddr_at *)uaddr;
struct sock *sk = sock->sk;
struct atalk_sock *at = at_sk(sk);
int err;
if (!sock_flag(sk, SOCK_ZAPPED) ||
addr_len != sizeof(struct sockaddr_at))
return -EINVAL;
if ... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 48,832,752,006,844,080,000,000,000,000,000,000,000 | 53 | 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... |
gx_image1_release(gs_image_common_t *pic, gs_memory_t *mem)
{
gx_pixel_image_release((gs_pixel_image_t *)pic, mem);
} | 0 | [] | ghostpdl | cffb5712bc10c2c2f46adf311fc74aaae74cb784 | 265,381,484,629,404,620,000,000,000,000,000,000,000 | 4 | Commit a9a58bb95 was incorrect, clearing some values that it shouldn't
The penum->rect values were cleared, and this didn't cover all uses of
gx_image_enum_alloc. Also, return *ppenum NULL if alloc fails in case the
caller doesn't check the return code. Also, if we fail the enum_begin,
free the enum and set *pinfo to ... |
void ModuleLoader::doctorModuleExtension(Firebird::PathName& name)
{
if (name.isEmpty())
return;
Firebird::PathName::size_type pos = name.rfind("." SHRLIB_EXT);
if (pos != name.length() - 3)
{
name += "." SHRLIB_EXT;
}
pos = name.rfind('/');
pos = (pos == Firebird::PathName::npos) ? 0 : pos + 1;
if (name.f... | 0 | [
"CWE-89"
] | firebird | 56e9a73c16803c3544076edb2d6c4ca25815e541 | 271,194,993,814,439,620,000,000,000,000,000,000,000 | 17 | Backported fix for CORE-5474: 'Restrict UDF' is not effective, because fbudf.so is dynamically linked against libc |
plperl_spi_execute_fetch_result(SPITupleTable *tuptable, int processed,
int status)
{
HV *result;
check_spi_usage_allowed();
result = newHV();
hv_store_string(result, "status",
cstr2sv(SPI_result_code_string(status)));
hv_store_string(result, "processed",
newSViv(processed));
if (status ... | 0 | [
"CWE-264"
] | postgres | 537cbd35c893e67a63c59bc636c3e888bd228bc7 | 153,306,247,446,094,300,000,000,000,000,000,000,000 | 35 | Prevent privilege escalation in explicit calls to PL validators.
The primary role of PL validators is to be called implicitly during
CREATE FUNCTION, but they are also normal functions that a user can call
explicitly. Add a permissions check to each validator to ensure that a
user cannot use explicit validator calls ... |
m4_m4exit (struct obstack *obs, int argc, token_data **argv)
{
int exit_code = EXIT_SUCCESS;
/* Warn on bad arguments, but still exit. */
bad_argc (argv[0], argc, 1, 2);
if (argc >= 2 && !numeric_arg (argv[0], ARG (1), &exit_code))
exit_code = EXIT_FAILURE;
if (exit_code < 0 || exit_code > 255)
{
... | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 111,567,613,718,164,150,000,000,000,000,000,000,000 | 25 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
static inline void Eagle3X(const Image *source,const Quantum *pixels,
Quantum *result,const size_t channels)
{
ssize_t
corner_tl,
corner_tr,
corner_bl,
corner_br;
corner_tl=PixelsEqual(pixels,0,pixels,1,channels) &&
PixelsEqual(pixels,0,pixels,3,channels);
corner_tr=PixelsEqual(pixels,1,pix... | 0 | [
"CWE-369"
] | ImageMagick | 43539e67a47d2f8de832d33a5b26dc2a7a12294f | 305,730,376,770,048,000,000,000,000,000,000,000,000 | 39 | https://github.com/ImageMagick/ImageMagick/issues/1718 |
void LibRaw::deflate_dng_load_raw()
{
throw LIBRAW_EXCEPTION_DECODE_RAW;
} | 0 | [
"CWE-787"
] | LibRaw | 8682ad204392b914ab1cc6ebcca9c27c19c1a4b4 | 60,503,737,903,562,420,000,000,000,000,000,000,000 | 5 | 0.18.17 |
static void mce_device_remove(unsigned int cpu)
{
struct device *dev = per_cpu(mce_device, cpu);
int i;
if (!cpumask_test_cpu(cpu, mce_device_initialized))
return;
for (i = 0; mce_device_attrs[i]; i++)
device_remove_file(dev, mce_device_attrs[i]);
for (i = 0; i < mca_cfg.banks; i++)
device_remove_file(dev... | 0 | [
"CWE-362"
] | linux | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf | 160,689,822,302,202,220,000,000,000,000,000,000,000 | 18 | x86/MCE: Serialize sysfs changes
The check_interval file in
/sys/devices/system/machinecheck/machinecheck<cpu number>
directory is a global timer value for MCE polling. If it is changed by one
CPU, mce_restart() broadcasts the event to other CPUs to delete and restart
the MCE polling timer and __mcheck_cpu_init_ti... |
static ssize_t oom_score_adj_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
struct task_struct *task = get_proc_task(file_inode(file));
char buffer[PROC_NUMBUF];
short oom_score_adj = OOM_SCORE_ADJ_MIN;
unsigned long flags;
size_t len;
if (!task)
return -ESRCH;
if (lock_task_sigh... | 0 | [
"CWE-362"
] | linux | 8148a73c9901a8794a50f950083c00ccf97d43b3 | 312,172,337,331,568,650,000,000,000,000,000,000,000 | 19 | proc: prevent accessing /proc/<PID>/environ until it's ready
If /proc/<PID>/environ gets read before the envp[] array is fully set up
in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
read more bytes than are actually written, as env_start will already be
set but env_end will still be zero, makin... |
static int crypto_ccm_decrypt(struct aead_request *req)
{
struct crypto_aead *aead = crypto_aead_reqtfm(req);
struct crypto_ccm_ctx *ctx = crypto_aead_ctx(aead);
struct crypto_ccm_req_priv_ctx *pctx = crypto_ccm_reqctx(req);
struct skcipher_request *skreq = &pctx->skreq;
struct scatterlist *dst;
unsigned int auth... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3b30460c5b0ed762be75a004e924ec3f8711e032 | 106,253,094,405,573,310,000,000,000,000,000,000,000 | 45 | crypto: ccm - move cbcmac input off the stack
Commit f15f05b0a5de ("crypto: ccm - switch to separate cbcmac driver")
refactored the CCM driver to allow separate implementations of the
underlying MAC to be provided by a platform. However, in doing so, it
moved some data from the linear region to the stack, which violat... |
TEST_F(AsStringGraphTest, FloatDefault) {
TF_ASSERT_OK(Init(DT_FLOAT));
AddInputFromArray<float>(TensorShape({4}), {-42, 0, 3.14159, 42});
TF_ASSERT_OK(RunOpKernel());
Tensor expected(allocator(), DT_STRING, TensorShape({4}));
test::FillValues<tstring>(
&expected, {"-42.000000", "0.000000", "3.141590",... | 0 | [
"CWE-20",
"CWE-134",
"CWE-703"
] | tensorflow | 33be22c65d86256e6826666662e40dbdfe70ee83 | 262,396,799,576,993,820,000,000,000,000,000,000,000 | 10 | Prevent format string vulnerability in `tf.strings.as_string`.
The `printf` format specifier only allows `#`, `0`, `-`, `+` and space as flag characters. Others are interpreted as width/precision/length modifier or conversion specifiers. If a character does not fit into any of these sets `printf` just displays it.
Al... |
int check_filter(filter_rule_list *listp, enum logcode code,
const char *name, int name_flags)
{
filter_rule *ent;
for (ent = listp->head; ent; ent = ent->next) {
if (ignore_perishable && ent->rflags & FILTRULE_PERISHABLE)
continue;
if (ent->rflags & FILTRULE_PERDIR_MERGE) {
int rc = check_filter(ent->u... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 115,695,664,234,962,680,000,000,000,000,000,000,000 | 28 | Some extra file-list safety checks. |
static bool is_editable_file(const char *file_name)
{
return is_in_string_list(file_name, (char**)editable_files);
} | 0 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 76,561,303,500,674,880,000,000,000,000,000,000,000 | 4 | lib: fix races in dump directory handling code
Florian Weimer <fweimer@redhat.com>:
dd_opendir() should keep a file handle (opened with O_DIRECTORY) and
use openat() and similar functions to access files in it.
...
The file system manipulation functions should guard against hard
links (check tha... |
redraw_curbuf_later(int type)
{
redraw_buf_later(curbuf, type);
} | 0 | [
"CWE-122"
] | vim | 826bfe4bbd7594188e3d74d2539d9707b1c6a14b | 45,290,177,164,699,320,000,000,000,000,000,000,000 | 4 | patch 8.2.3487: illegal memory access if buffer name is very long
Problem: Illegal memory access if buffer name is very long.
Solution: Make sure not to go over the end of the buffer. |
const char* XMLRPC_RequestGetMethodName(XMLRPC_REQUEST request) {
return request ? request->methodName.str : NULL;
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 73,631,060,307,246,900,000,000,000,000,000,000,000 | 3 | Fix bug #68027 - fix date parsing in XMLRPC lib |
static void fill_prstatus(struct elf_prstatus *prstatus,
struct task_struct *p, long signr)
{
prstatus->pr_info.si_signo = prstatus->pr_cursig = signr;
prstatus->pr_sigpend = p->pending.signal.sig[0];
prstatus->pr_sighold = p->blocked.sig[0];
rcu_read_lock();
prstatus->pr_ppid = task_pid_vnr(rcu_dereference(p->r... | 0 | [] | linux | eab09532d40090698b05a07c1c87f39fdbc5fab5 | 10,616,861,278,429,174,000,000,000,000,000,000,000 | 33 | binfmt_elf: use ELF_ET_DYN_BASE only for PIE
The ELF_ET_DYN_BASE position was originally intended to keep loaders
away from ET_EXEC binaries. (For example, running "/lib/ld-linux.so.2
/bin/cat" might cause the subsequent load of /bin/cat into where the
loader had been loaded.)
With the advent of PIE (ET_DYN binaries... |
int Pipe::accept()
{
ldout(msgr->cct,10) << "accept" << dendl;
assert(pipe_lock.is_locked());
assert(state == STATE_ACCEPTING);
pipe_lock.Unlock();
// vars
bufferlist addrs;
entity_addr_t socket_addr;
socklen_t len;
int r;
char banner[strlen(CEPH_BANNER)+1];
bufferlist addrbl;
ceph_msg_connect... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 282,542,391,654,870,200,000,000,000,000,000,000,000 | 595 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
int mnt_flags, struct list_head *fslist)
{
int err;
down_write(&namespace_sem);
/* Something was mounted here while we slept */
while (d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry))
;
err = -EINVAL;
if (!check_mnt(nd->mnt))
g... | 0 | [
"CWE-269"
] | linux-2.6 | ee6f958291e2a768fd727e7a67badfff0b67711a | 221,958,230,875,938,800,000,000,000,000,000,000,000 | 41 | check privileges before setting mount propagation
There's a missing check for CAP_SYS_ADMIN in do_change_type().
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torva... |
static int user_reset_fdc(int drive, int arg, bool interruptible)
{
int ret;
if (lock_fdc(drive))
return -EINTR;
if (arg == FD_RESET_ALWAYS)
fdc_state[current_fdc].reset = 1;
if (fdc_state[current_fdc].reset) {
/* note: reset_fdc will take care of unlocking the driver
* on completion.
*/
cont = &res... | 0 | [
"CWE-416"
] | linux | 233087ca063686964a53c829d547c7571e3f67bf | 166,310,898,072,148,830,000,000,000,000,000,000,000 | 21 | floppy: disable FDRAWCMD by default
Minh Yuan reported a concurrency use-after-free issue in the floppy code
between raw_cmd_ioctl and seek_interrupt.
[ It turns out this has been around, and that others have reported the
KASAN splats over the years, but Minh Yuan had a reproducer for it and
so gets primary credi... |
/* Returns true if the skb was allocated from PFMEMALLOC reserves */
static inline bool skb_pfmemalloc(const struct sk_buff *skb)
{
return unlikely(skb->pfmemalloc); | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 106,827,180,746,942,000,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
void lex_free(void)
{ // Call this when daemon ends
DBUG_ENTER("lex_free");
DBUG_VOID_RETURN;
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 267,715,436,814,505,530,000,000,000,000,000,000,000 | 5 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
HGraph* graph() { return graph_; } | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 54,914,037,167,923,030,000,000,000,000,000,000,000 | 1 | 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 GF_Err gf_odf_read_descriptor_internal(GF_BitStream *bs, GF_Descriptor *desc, u32 DescSize)
{
switch (desc->tag) {
case GF_ODF_IOD_TAG :
return gf_odf_read_iod(bs, (GF_InitialObjectDescriptor *)desc, DescSize);
case GF_ODF_ESD_TAG :
return gf_odf_read_esd(bs, (GF_ESD *)desc, DescSize);
case GF_ODF_DCD_TA... | 0 | [
"CWE-787"
] | gpac | 4e56ad72ac1afb4e049a10f2d99e7512d7141f9d | 63,482,927,770,157,080,000,000,000,000,000,000,000 | 94 | fixed #2216 |
gs_malloc_wrap(gs_memory_t **wrapped, gs_malloc_memory_t *contents)
{
# ifdef USE_RETRY_MEMORY_WRAPPER
/*
* This is deprecated since 'retry' for clist reversion/cycling
* will ONLY work for monochrome, simple PS or PCL, not for a
* color device and not for PDF or XPS with transparency
*/
{
... | 0 | [] | ghostpdl | 0c0b0859ae1aba64861599f0e7f74f143f305932 | 320,420,188,147,791,360,000,000,000,000,000,000,000 | 32 | Bug 696041: sanity check for memory allocation.
In gs_heap_alloc_bytes(), add a sanity check to ensure we don't overflow the
variable holding the actual number of bytes we allocate.
No cluster differences |
Tfloat _linear_atX_p(const float fx, const int y=0, const int z=0, const int c=0) const {
const float
nfx = cimg::mod(fx,(float)_width);
const unsigned int
x = (unsigned int)nfx;
const float
dx = nfx - x;
const unsigned int
nx = cimg::mod(x + 1,_width);
... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 1,471,226,323,537,491,800,000,000,000,000,000,000 | 13 | . |
void CLASS canon_600_auto_wb()
{
int mar, row, col, i, j, st, count[] = { 0,0 };
int test[8], total[2][8], ratio[2][2], stat[2];
memset (&total, 0, sizeof total);
i = canon_ev + 0.5;
if (i < 10) mar = 150;
else if (i > 12) mar = 20;
else mar = 280 - 20 * i;
if (flash_used) mar = 80;
for (row=14;... | 0 | [] | LibRaw | c4e374ea6c979a7d1d968f5082b7d0ea8cd27202 | 48,549,097,161,273,830,000,000,000,000,000,000,000 | 44 | additional data checks backported from 0.15.4 |
TRIO_PUBLIC_STRING int trio_to_lower TRIO_ARGS1((source), int source)
{
#if defined(HAVE_TOLOWER)
return tolower(source);
#else
/* Does not handle locales or non-contiguous alphabetic characters */
return ((source >= (int)'A') && (source <= (int)'Z')) ? source - 'A' + 'a' : source;
#endif
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 209,002,254,322,762,800,000,000,000,000,000,000,000 | 13 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int acm_tty_tiocmget(struct tty_struct *tty)
{
struct acm *acm = tty->driver_data;
return (acm->ctrlout & ACM_CTRL_DTR ? TIOCM_DTR : 0) |
(acm->ctrlout & ACM_CTRL_RTS ? TIOCM_RTS : 0) |
(acm->ctrlin & ACM_CTRL_DSR ? TIOCM_DSR : 0) |
(acm->ctrlin & ACM_CTRL_RI ? TIOCM_RI : 0) |
... | 0 | [
"CWE-703"
] | linux | 8835ba4a39cf53f705417b3b3a94eb067673f2c9 | 310,931,953,448,663,400,000,000,000,000,000,000,000 | 11 | USB: cdc-acm: more sanity checking
An attack has become available which pretends to be a quirky
device circumventing normal sanity checks and crashes the kernel
by an insufficient number of interfaces. This patch adds a check
to the code path for quirky devices.
Signed-off-by: Oliver Neukum <ONeukum@suse.com>
CC: sta... |
static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int i;
int64_t creation_time;
int version = avio_r8(pb); /* version */
avio_rb24(pb); /* flags */
if (version == 1) {
creation_time = avio_rb64(pb);
avio_rb64(pb);
} else {
creation_time = avio_rb32... | 0 | [
"CWE-399",
"CWE-834"
] | FFmpeg | 9cb4eb772839c5e1de2855d126bf74ff16d13382 | 190,226,213,229,138,000,000,000,000,000,000,000,000 | 50 | avformat/mov: Fix DoS in read_tfra()
Fixes: Missing EOF check in loop
No testcase
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
int MYSQL_BIN_LOG::new_file_impl(bool need_lock)
{
int error= 0, close_on_error= FALSE;
char new_name[FN_REFLEN], *new_name_ptr, *old_name, *file_to_open;
DBUG_ENTER("MYSQL_BIN_LOG::new_file_impl");
if (!is_open())
{
DBUG_PRINT("info",("log is closed"));
DBUG_RETURN(error);
}
if (need_lock)
... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 43,075,054,806,022,590,000,000,000,000,000,000,000 | 147 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
yaffs_initialize_spare_format(YAFFSFS_INFO * yfs, TSK_OFF_T maxBlocksToTest){
// Testing parameters - can all be changed
unsigned int blocksToTest = 10; // Number of blocks (64 chunks) to test
unsigned int chunksToTest = 10; // Number of chunks to test in each block
unsigned int minChunksRead = 10; ... | 0 | [
"CWE-125",
"CWE-787"
] | sleuthkit | 459ae818fc8dae717549810150de4d191ce158f1 | 272,052,748,464,105,140,000,000,000,000,000,000,000 | 349 | Fix stack buffer overflow in yaffsfs_istat
Prevent a stack buffer overflow in yaffsfs_istat by increasing the buffer size to the size required by tsk_fs_time_to_str. |
MagickExport Image *SeparateImages(const Image *image,ExceptionInfo *exception)
{
Image
*images,
*separate_image;
register ssize_t
i;
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickM... | 0 | [
"CWE-416"
] | ImageMagick | a47e7a994766b92b10d4a87df8c1c890c8b170f3 | 259,428,734,258,882,730,000,000,000,000,000,000,000 | 29 | https://github.com/ImageMagick/ImageMagick/issues/1724 |
static void __hrtick_start(void *arg)
{
struct rq *rq = arg;
raw_spin_lock(&rq->lock);
hrtimer_restart(&rq->hrtick_timer);
rq->hrtick_csd_pending = 0;
raw_spin_unlock(&rq->lock);
} | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 318,119,467,723,855,530,000,000,000,000,000,000,000 | 9 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
ftrace_set_hash(struct ftrace_ops *ops, unsigned char *buf, int len,
unsigned long ip, int remove, int reset, int enable)
{
struct ftrace_hash **orig_hash;
struct ftrace_hash *hash;
int ret;
/* All global ops uses the global ops filters */
if (ops->flags & FTRACE_OPS_FL_GLOBAL)
ops = &global_ops;
if (unlike... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 170,640,176,117,583,100,000,000,000,000,000,000,000 | 50 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
bool ValidateCamellia()
{
std::cout << "\nCamellia validation suite running...\n\n";
bool pass1 = true, pass2 = true, pass3 = true;
CamelliaEncryption enc;
pass1 = enc.StaticGetValidKeyLength(8) == 16 && pass1;
pass1 = enc.StaticGetValidKeyLength(16) == 16 && pass1;
pass1 = enc.StaticGetValidKeyLength(24... | 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 76,380,323,885,955,440,000,000,000,000,000,000,000 | 32 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
void qemu_input_queue_btn(QemuConsole *src, InputButton btn, bool down)
{
InputEvent *evt;
evt = qemu_input_event_new_btn(btn, down);
qemu_input_event_send(src, evt);
qapi_free_InputEvent(evt);
} | 0 | [
"CWE-772"
] | qemu | fa18f36a461984eae50ab957e47ec78dae3c14fc | 110,027,487,705,245,680,000,000,000,000,000,000,000 | 7 | input: limit kbd queue depth
Apply a limit to the number of items we accept into the keyboard queue.
Impact: Without this limit vnc clients can exhaust host memory by
sending keyboard events faster than qemu feeds them to the guest.
Fixes: CVE-2017-8379
Cc: P J P <ppandit@redhat.com>
Cc: Huawei PSIRT <PSIRT@huawei.c... |
static void mysql_close_free_options(MYSQL *mysql)
{
DBUG_ENTER("mysql_close_free_options");
my_free(mysql->options.user);
my_free(mysql->options.host);
my_free(mysql->options.password);
my_free(mysql->options.unix_socket);
my_free(mysql->options.db);
my_free(mysql->options.my_cnf_file);
my_free(mysql... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 322,240,528,940,531,330,000,000,000,000,000,000,000 | 42 | 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... |
int register_netdevice_notifier(struct notifier_block *nb)
{
struct net_device *dev;
int err;
rtnl_lock();
err = notifier_chain_register(&netdev_chain, nb);
if (!err) {
for (dev = dev_base; dev; dev = dev->next) {
nb->notifier_call(nb, NETDEV_REGISTER, dev);
if (dev->flags & IFF_UP)
nb->notifier_cal... | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 299,896,111,052,004,140,000,000,000,000,000,000,000 | 18 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
dnNormalize(
slap_mask_t use,
Syntax *syntax,
MatchingRule *mr,
struct berval *val,
struct berval *out,
void *ctx)
{
assert( val != NULL );
assert( out != NULL );
Debug( LDAP_DEBUG_TRACE, ">>> dnNormalize: <%s>\n", val->bv_val ? val->bv_val : "", 0, 0 );
if ( val->bv_len != 0 ) {
LDAPDN ... | 0 | [
"CWE-763"
] | openldap | 5a2017d4e61a6ddc4dcb4415028e0d08eb6bca26 | 76,307,204,574,807,230,000,000,000,000,000,000,000 | 54 | ITS#9412 fix AVA_Sort on invalid RDN |
run (const gchar *name,
gint nparams,
const GimpParam *param,
gint *nreturn_vals,
GimpParam **return_vals)
{
static GimpParam values[2];
GimpRunMode run_mode;
GimpPDBStatusType status = GIMP_PDB_SUCCESS;
gint32 image_ID;
gint32 ... | 0 | [
"CWE-787"
] | gimp | 48ec15890e1751dede061f6d1f469b6508c13439 | 8,039,724,830,063,111,000,000,000,000,000,000,000 | 130 | file-psp: fix for bogus input data. Fixes bug #639203 |
static void __io_sqe_files_unregister(struct io_ring_ctx *ctx)
{
#if defined(CONFIG_UNIX)
if (ctx->ring_sock) {
struct sock *sock = ctx->ring_sock->sk;
struct sk_buff *skb;
while ((skb = skb_dequeue(&sock->sk_receive_queue)) != NULL)
kfree_skb(skb);
}
#else
int i;
for (i = 0; i < ctx->nr_user_files; i++... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 47,935,055,723,340,490,000,000,000,000,000,000,000 | 22 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
int do_string(__G__ length, option) /* return PK-type error code */
__GDEF
unsigned int length; /* without prototype, ush converted to this */
int option;
{
unsigned comment_bytes_left;
unsigned int block_len;
int error=PK_OK;
#ifdef AMIGA
char tmp_fnote[2 * AMIGA_FILENOTELEN]; /*... | 0 | [
"CWE-400"
] | unzip | 41beb477c5744bc396fa1162ee0c14218ec12213 | 204,009,446,583,514,370,000,000,000,000,000,000,000 | 402 | Fix bug in undefer_input() that misplaced the input state. |
static inline int checkSettingSecurity(lua_State* L, const std::string &name)
{
if (ScriptApiSecurity::isSecure(L) && name.compare(0, 7, "secure.") == 0)
throw LuaError("Attempt to set secure setting.");
bool is_mainmenu = false;
#ifndef SERVER
is_mainmenu = ModApiBase::getGuiEngine(L) != nullptr;
#endif
if (!is... | 1 | [] | minetest | da71e86633d0b27cd02d7aac9fdac625d141ca13 | 14,542,184,638,408,057,000,000,000,000,000,000,000 | 18 | Protect a few more settings from being set from mods
Of those settings main_menu_script has concrete security impact, the rest are added out of abundance of caution. |
static int sctp_setsockopt_reset_assoc(struct sock *sk, sctp_assoc_t *associd,
unsigned int optlen)
{
struct sctp_association *asoc;
if (optlen != sizeof(*associd))
return -EINVAL;
asoc = sctp_id2assoc(sk, *associd);
if (!asoc)
return -EINVAL;
return sctp_send_reset_assoc(asoc);
} | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 300,454,075,650,637,900,000,000,000,000,000,000,000 | 14 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
{
struct inode *inode = file->f_path.dentry->d_inode;
struct btrfs_inode *ip = BTRFS_I(inode);
struct btrfs_root *root = ip->root;
struct btrfs_trans_handle *trans;
unsigned int flags, oldflags;
int ret;
u64 ip_oldflags;
unsigned int i_oldflag... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 232,950,614,863,053,130,000,000,000,000,000,000,000 | 132 | 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... |
void EvalQuantizedPerChannel16x8(TfLiteContext* context, TfLiteNode* node,
TfLiteConvParams* params, OpData* data,
const TfLiteTensor* input,
const TfLiteTensor* filter,
const TfLiteTensor... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 308,665,172,890,111,920,000,000,000,000,000,000,000 | 34 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
relpTcpSend(relpTcp_t *pThis, relpOctet_t *pBuf, ssize_t *pLenBuf)
{
ssize_t written;
ENTER_RELPFUNC;
RELPOBJ_assert(pThis, Tcp);
#ifdef ENABLE_TLS
if(pThis->bEnableTLS) {
written = gnutls_record_send(pThis->session, pBuf, *pLenBuf);
pThis->pEngine->dbgprint("librelp: TLS send returned %d\n", (int) written);
... | 0 | [
"CWE-787"
] | librelp | 2cfe657672636aa5d7d2a14cfcb0a6ab9d1f00cf | 215,100,941,953,166,800,000,000,000,000,000,000,000 | 46 | unify error message generation |
int SSL_set_wfd(SSL*, int)
{
return SSL_SUCCESS; // TODO:
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 89,060,060,138,535,880,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
int crypt_uuid_cmp(const char *dm_uuid, const char *hdr_uuid)
{
int i, j;
char *str;
if (!dm_uuid || !hdr_uuid)
return -EINVAL;
str = strchr(dm_uuid, '-');
if (!str)
return -EINVAL;
for (i = 0, j = 1; hdr_uuid[i]; i++) {
if (hdr_uuid[i] == '-')
continue;
if (!str[j] || str[j] == '-')
return -EIN... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 318,695,129,055,901,000,000,000,000,000,000,000,000 | 26 | 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... |
startTimer(void)
{
begin = clock();
} | 0 | [
"CWE-416"
] | libxml2 | 1358d157d0bd83be1dfe356a69213df9fac0b539 | 142,839,937,642,522,900,000,000,000,000,000,000,000 | 4 | Fix use-after-free with `xmllint --html --push`
Call htmlCtxtUseOptions to make sure that names aren't stored in
dictionaries.
Note that this issue only affects xmllint using the HTML push parser.
Fixes #230. |
/**
\param axis Axis to split images along.
\param nb Number of spliting parts for each image. | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 129,153,018,969,392,880,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
void Table_check_intact_log_error::report_error(uint, const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
error_log_print(ERROR_LEVEL, fmt, args);
va_end(args);
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 241,561,760,212,079,150,000,000,000,000,000,000,000 | 7 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
yang_read_units(struct lys_module *module, void *node, char *value, enum yytokentype type)
{
int ret;
switch (type) {
case LEAF_KEYWORD:
ret = yang_check_string(module, &((struct lys_node_leaf *) node)->units, "units", "leaf", value, node);
break;
case LEAF_LIST_KEYWORD:
ret = y... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 294,900,232,853,629,430,000,000,000,000,000,000,000 | 27 | yang parser BUGFIX double free
Fixes #742 |
static void debugmem_list_delete(MEMHDR *p)
{
if (p->mh_next)
p->mh_next->mh_prev = p->mh_prev;
if (p->mh_prev)
p->mh_prev->mh_next = p->mh_next;
else memlist = p->mh_next;
#ifdef MEM_LIST_DEBUG
if (stderr)
Mem_Display(stderr);
#endif
} | 0 | [
"CWE-787"
] | libxml2 | 897dffbae322b46b83f99a607d527058a72c51ed | 19,626,285,819,095,838,000,000,000,000,000,000,000 | 12 | Check for integer overflow in memory debug code
Fixes bug 783026.
Thanks to Pranjal Jumde for the report. |
void CL_GetPingInfo( int n, char *buf, int buflen )
{
if (n < 0 || n >= MAX_PINGREQUESTS || !cl_pinglist[n].adr.port)
{
// empty or invalid slot
if (buflen)
buf[0] = '\0';
return;
}
Q_strncpyz( buf, cl_pinglist[n].info, buflen );
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 150,381,105,516,479,930,000,000,000,000,000,000,000 | 12 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
void read_fragment_4(unsigned int fragment, long long *start_block, int *size)
{
TRACE("read_fragment: reading fragment %d\n", fragment);
struct squashfs_fragment_entry *fragment_entry;
fragment_entry = &fragment_table[fragment];
*start_block = fragment_entry->start_block;
*size = fragment_entry->size;
} | 0 | [
"CWE-20",
"CWE-190"
] | squashfs-tools | f95864afe8833fe3ad782d714b41378e860977b1 | 154,639,712,135,242,900,000,000,000,000,000,000,000 | 10 | unsquashfs-4: Add more sanity checks + fix CVE-2015-4645/6
Add more filesystem table sanity checks to Unsquashfs-4 and
also properly fix CVE-2015-4645 and CVE-2015-4646.
The CVEs were raised due to Unsquashfs having variable
oveflow and stack overflow in a number of vulnerable
functions.
The suggested patch only "fi... |
maybe_bool CLua::callmaybefn(const char *fn, const char *params, va_list args)
{
error.clear();
lua_State *ls = state();
if (!ls)
return MB_MAYBE;
lua_stack_cleaner clean(ls);
pushglobal(fn);
if (!lua_isfunction(ls, -1))
return MB_MAYBE;
bool ret = calltopfn(ls, params, ar... | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 1,385,256,632,953,891,500,000,000,000,000,000,000 | 19 | Disable lua load(), loadstring() bytcode loading |
static inline int security_xfrm_state_alloc_acquire(struct xfrm_state *x,
struct xfrm_sec_ctx *polsec, u32 secid)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 291,124,182,567,505,500,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static void php_openssl_x509_free(zend_resource *rsrc)
{
X509 *x509 = (X509 *)rsrc->ptr;
X509_free(x509);
} | 0 | [
"CWE-326"
] | php-src | 0216630ea2815a5789a24279a1211ac398d4de79 | 322,836,237,193,081,300,000,000,000,000,000,000,000 | 5 | Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV) |
string_strncasecmp (const char *string1, const char *string2, int max)
{
int count, diff;
if (!string1 || !string2)
return (string1) ? 1 : ((string2) ? -1 : 0);
count = 0;
while ((count < max) && string1[0] && string2[0])
{
diff = utf8_charcasecmp (string1, string2);
if (di... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 272,775,269,526,094,600,000,000,000,000,000,000,000 | 24 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
static inline void memalloc_noio_restore(unsigned int flags)
{
current->flags = (current->flags & ~PF_MEMALLOC_NOIO) | flags;
} | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 254,130,082,177,779,230,000,000,000,000,000,000,000 | 4 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
static int fuse_file_flock(struct file *file, int cmd, struct file_lock *fl)
{
struct inode *inode = file_inode(file);
struct fuse_conn *fc = get_fuse_conn(inode);
int err;
if (fc->no_flock) {
err = flock_lock_file_wait(file, fl);
} else {
struct fuse_file *ff = file->private_data;
/* emulate flock with PO... | 0 | [
"CWE-399",
"CWE-835"
] | linux | 3ca8138f014a913f98e6ef40e939868e1e9ea876 | 208,862,178,483,533,340,000,000,000,000,000,000,000 | 18 | fuse: break infinite loop in fuse_fill_write_pages()
I got a report about unkillable task eating CPU. Further
investigation shows, that the problem is in the fuse_fill_write_pages()
function. If iov's first segment has zero length, we get an infinite
loop, because we never reach iov_iter_advance() call.
Fix this by c... |
static ssize_t show_tabletXtilt(struct device *dev, struct device_attribute *attr, char *buf)
{
struct aiptek *aiptek = dev_get_drvdata(dev);
if (aiptek->curSetting.xTilt == AIPTEK_TILT_DISABLE) {
return snprintf(buf, PAGE_SIZE, "disable\n");
} else {
return snprintf(buf, PAGE_SIZE, "%d\n",
aiptek->curSetti... | 0 | [
"CWE-476",
"CWE-401"
] | linux | 8e20cf2bce122ce9262d6034ee5d5b76fbb92f96 | 62,944,080,791,281,830,000,000,000,000,000,000,000 | 11 | Input: aiptek - fix crash on detecting device without endpoints
The aiptek driver crashes in aiptek_probe() when a specially crafted USB
device without endpoints is detected. This fix adds a check that the device
has proper configuration expected by the driver. Also an error return value
is changed to more matching on... |
void ConnectionManagerImpl::initializeReadFilterCallbacks(Network::ReadFilterCallbacks& callbacks) {
read_callbacks_ = &callbacks;
stats_.named_.downstream_cx_total_.inc();
stats_.named_.downstream_cx_active_.inc();
if (read_callbacks_->connection().ssl()) {
stats_.named_.downstream_cx_ssl_total_.inc();
... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 304,797,967,402,614,740,000,000,000,000,000,000,000 | 31 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static double LOG2D(int a)
{
if (a < 0)
return 1.0 / (1UL << -a);
return 1UL << a;
} | 0 | [
"CWE-399"
] | busybox | 150dc7a2b483b8338a3e185c478b4b23ee884e71 | 338,451,269,311,520,030,000,000,000,000,000,000,000 | 6 | ntpd: respond only to client and symmetric active packets
The busybox NTP implementation doesn't check the NTP mode of packets
received on the server port and responds to any packet with the right
size. This includes responses from another NTP server. An attacker can
send a packet with a spoofed source address in orde... |
static void ExportGreenQuantum(QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const PixelPacket *magick_restrict p,
unsigned char *magick_restrict q)
{
QuantumAny
range;
ssize_t
x;
switch (quantum_info->depth)
{
case 8:
{
unsigned char
pixel;
for (x=0; x... | 0 | [
"CWE-190"
] | ImageMagick6 | 553054c1cb1e4e05ec86237afef76a32cd7c464d | 203,328,410,317,980,400,000,000,000,000,000,000,000 | 102 | https://github.com/ImageMagick/ImageMagick/pull/3083 |
void unix_gc(void)
{
struct unix_sock *u;
struct unix_sock *next;
struct sk_buff_head hitlist;
struct list_head cursor;
LIST_HEAD(not_cycle_list);
spin_lock(&unix_gc_lock);
/* Avoid a recursive GC. */
if (gc_in_progress)
goto out;
gc_in_progress = true;
/*
* First, select candidates for garbage collect... | 0 | [
"CWE-399"
] | linux-2.6 | 5f23b734963ec7eaa3ebcd9050da0c9b7d143dd3 | 284,843,096,121,678,770,000,000,000,000,000,000,000 | 111 | net: Fix soft lockups/OOM issues w/ unix garbage collector
This is an implementation of David Miller's suggested fix in:
https://bugzilla.redhat.com/show_bug.cgi?id=470201
It has been updated to use wait_event() instead of
wait_event_interruptible().
Paraphrasing the description from the above report, it makes sen... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.