func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int ghash_update(struct shash_desc *desc,
const u8 *src, unsigned int srclen)
{
struct ghash_desc_ctx *dctx = shash_desc_ctx(desc);
struct ghash_ctx *ctx = crypto_shash_ctx(desc->tfm);
u8 *dst = dctx->buffer;
if (dctx->bytes) {
int n = min(srclen, dctx->bytes);
u8 *pos = dst + (GHASH_BLOCK_SIZE - dc... | 1 | [
"CWE-476"
] | linux | 7ed47b7d142ec99ad6880bbbec51e9f12b3af74c | 108,542,730,933,150,130,000,000,000,000,000,000,000 | 36 | crypto: ghash - Avoid null pointer dereference if no key is set
The ghash_update function passes a pointer to gf128mul_4k_lle which will
be NULL if ghash_setkey is not called or if the most recent call to
ghash_setkey failed to allocate memory. This causes an oops. Fix this
up by returning an error code in the null ... |
strtoint_clipped(const char *const str, int min, int max)
{
int r = strtoint(str);
if (r == -1)
return r;
else if (r<min)
return min;
else if (r>max)
return max;
else
return r;
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 275,279,745,248,407,840,000,000,000,000,000,000,000 | 12 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
bool Field_longlong::is_max()
{
ASSERT_COLUMN_MARKED_FOR_READ;
if (unsigned_flag)
{
ulonglong j;
j= uint8korr(ptr);
return j == ULONGLONG_MAX;
}
longlong j;
j= sint8korr(ptr);
return j == LONGLONG_MAX;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 95,796,944,319,781,570,000,000,000,000,000,000,000 | 13 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
unsigned int vector2_vs(const mp_func op, const unsigned int arg1, const unsigned int arg2) {
const unsigned int
siz = _cimg_mp_size(arg1),
pos = is_comp_vector(arg1)?arg1:vector(siz);
if (siz>24) CImg<ulongT>::vector((ulongT)mp_vector_map_vs,pos,siz,(ulongT)op,arg1,arg2).move... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 316,413,682,779,664,300,000,000,000,000,000,000,000 | 12 | Fix other issues in 'CImg<T>::load_bmp()'. |
static struct child_process *git_connect_git(int fd[2], char *hostandport,
const char *path, const char *prog,
enum protocol_version version,
int flags)
{
struct child_process *conn;
struct strbuf request = STRBUF_INIT;
/*
* Set up virtual host information based on where we will
* c... | 0 | [] | git | a02ea577174ab8ed18f847cf1693f213e0b9c473 | 313,315,798,360,401,420,000,000,000,000,000,000,000 | 55 | git_connect_git(): forbid newlines in host and path
When we connect to a git:// server, we send an initial request that
looks something like:
002dgit-upload-pack repo.git\0host=example.com
If the repo path contains a newline, then it's included literally, and
we get:
002egit-upload-pack repo
.git\0host=exampl... |
void CLASS fill_holes (int holes)
{
int row, col, val[4];
for (row=2; row < height-2; row++) {
if (!HOLE(row)) continue;
for (col=1; col < width-1; col+=4) {
val[0] = RAW(row-1,col-1);
val[1] = RAW(row-1,col+1);
val[2] = RAW(row+1,col-1);
val[3] = RAW(row+1,col+1);
RAW(row,col... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 134,472,762,229,778,350,000,000,000,000,000,000,000 | 25 | cumulated data checks patch |
scanner_free (void *ptr, /**< pointer to free */
size_t size) /**< size of the memory block */
{
jmem_heap_free_block (ptr, size);
} /* scanner_free */ | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 107,037,153,833,899,650,000,000,000,000,000,000,000 | 5 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static int ZEND_FASTCALL ZEND_BW_OR_SPEC_VAR_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
bitwise_or_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 41,894,608,113,680,430,000,000,000,000,000,000,000 | 12 | - 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 |
NO_INLINE JsVar *__jspeAssignmentExpression(JsVar *lhs) {
if (lex->tk=='=' || lex->tk==LEX_PLUSEQUAL || lex->tk==LEX_MINUSEQUAL ||
lex->tk==LEX_MULEQUAL || lex->tk==LEX_DIVEQUAL || lex->tk==LEX_MODEQUAL ||
lex->tk==LEX_ANDEQUAL || lex->tk==LEX_OREQUAL ||
lex->tk==LEX_XOREQUAL || lex->tk==LEX_RSHIFTE... | 0 | [
"CWE-787"
] | Espruino | e069be2ecc5060ef47391716e4de94999595b260 | 304,550,924,640,968,030,000,000,000,000,000,000,000 | 53 | Fix potential corruption issue caused by `delete [].__proto__` (fix #2142) |
static void ehci_trace_guest_bug(EHCIState *s, const char *message)
{
trace_usb_ehci_guest_bug(message);
fprintf(stderr, "ehci warning: %s\n", message);
} | 0 | [] | qemu | 791f97758e223de3290592d169f8e6339c281714 | 15,485,097,764,763,644,000,000,000,000,000,000,000 | 5 | usb: ehci: fix memory leak in ehci_init_transfer
In ehci_init_transfer function, if the 'cpage' is bigger than 4,
it doesn't free the 'p->sgl' once allocated previously thus leading
a memory leak issue. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5821c0f4.091c6b0a.e0c92.e811@mx.goog... |
dissect_kafka_init_producer_id_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
offset = dissect_kafka_string(tree, hf_kafka_transactional_id, tvb, pinfo, offset, api_version >= 2, NULL, NULL);
proto_tree_add_item(tree, h... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 144,765,734,892,410,000,000,000,000,000,000,000,000 | 25 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
irc_server_check_certificate_fingerprint (struct t_irc_server *server,
gnutls_x509_crt_t certificate,
const char *good_fingerprints)
{
unsigned char *fingerprint_server[IRC_FINGERPRINT_NUM_ALGOS];
char **fingerprints;
int i,... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 206,121,378,886,214,800,000,000,000,000,000,000,000 | 89 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
intrusive_ptr<Expression> ExpressionCompare::parse(
const boost::intrusive_ptr<ExpressionContext>& expCtx,
BSONElement bsonExpr,
const VariablesParseState& vps,
CmpOp op) {
intrusive_ptr<ExpressionCompare> expr = new ExpressionCompare(expCtx, op);
ExpressionVector args = parseArguments(expCtx, b... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 152,192,531,159,536,540,000,000,000,000,000,000,000 | 11 | SERVER-43699 $mod should not overflow for large negative values |
static bool samdb_set_ntds_GUID(struct ldb_context *ldb,
const struct GUID *ntds_guid_in,
const char *attribute,
const char *cache_name)
{
TALLOC_CTX *tmp_ctx;
struct GUID *ntds_guid_new;
struct GUID *ntds_guid_old;
/* see if we have a cached copy */
ntds_guid_old = (struct GUID *)ldb_get_opaque(ldb, ... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 4,598,675,466,081,182,000,000,000,000,000,000,000 | 41 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
void SSL::SendWriteBuffered()
{
output_buffer* out = buffers_.TakeOutput();
if (out) {
mySTL::auto_ptr<output_buffer> tmp(out);
Send(out->get_buffer(), out->get_size());
}
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 146,443,600,437,508,440,000,000,000,000,000,000,000 | 9 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
//! Load image from a raw binary file \overloading.
CImg<T>& load_raw(std::FILE *const file,
const unsigned int size_x=0, const unsigned int size_y=1,
const unsigned int size_z=1, const unsigned int size_c=1,
const bool is_multiplexed=false, cons... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 338,895,350,704,769,580,000,000,000,000,000,000,000 | 7 | Fix other issues in 'CImg<T>::load_bmp()'. |
_g_filename_has_extension (const char *filename,
const char *ext)
{
int filename_l, ext_l;
filename_l = strlen (filename);
ext_l = strlen (ext);
if (filename_l < ext_l)
return FALSE;
return strcasecmp (filename + filename_l - ext_l, ext) == 0;
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 205,054,868,751,158,940,000,000,000,000,000,000,000 | 12 | libarchive: sanitize filenames before extracting |
static void nfs4_open_release(void *calldata)
{
struct nfs4_opendata *data = calldata;
struct nfs4_state *state = NULL;
/* If this request hasn't been cancelled, do nothing */
if (data->cancelled == 0)
goto out_free;
/* In case of error, no cleanup! */
if (data->rpc_status != 0 || !data->rpc_done)
goto out_f... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 9,618,076,756,290,514,000,000,000,000,000,000,000 | 20 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static const char *nfsd4_op_name(unsigned opnum)
{
if (opnum < ARRAY_SIZE(nfsd4_ops))
return nfsd4_ops[opnum].op_name;
return "unknown_operation";
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 170,871,602,386,184,370,000,000,000,000,000,000,000 | 6 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
add_name_to_object (struct link_map *l, const char *name)
{
struct libname_list *lnp, *lastp;
struct libname_list *newname;
size_t name_len;
lastp = NULL;
for (lnp = l->l_libname; lnp != NULL; lastp = lnp, lnp = lnp->next)
if (strcmp (name, lnp->name) == 0)
return;
name_len = strlen (name) + 1;
... | 0 | [
"CWE-190",
"CWE-252"
] | glibc | 2864e767053317538feafa815046fff89e5a16be | 318,412,649,469,408,240,000,000,000,000,000,000,000 | 26 | 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 ... |
psutil_cpu_stats(PyObject *self, PyObject *args) {
NTSTATUS status;
_SYSTEM_PERFORMANCE_INFORMATION *spi = NULL;
_SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION *sppi = NULL;
_SYSTEM_INTERRUPT_INFORMATION *InterruptInformation = NULL;
unsigned int ncpus;
UINT i;
ULONG64 dpcs = 0;
ULONG interru... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 90,797,455,227,236,430,000,000,000,000,000,000,000 | 100 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
void ef_globals_free(void)
{
SAFE_FREE(ef_gbls->source_file);
SAFE_FREE(ef_gbls->output_file);
SAFE_FREE(ef_gbls);
return;
} | 0 | [
"CWE-703",
"CWE-125"
] | ettercap | 626dc56686f15f2dda13c48f78c2a666cb6d8506 | 163,458,781,642,251,380,000,000,000,000,000,000,000 | 9 | Exit gracefully in case of corrupted filters (Closes issue #782) |
static int get_description(struct NntpMboxData *mdata, const char *wildmat, const char *msg)
{
char buf[256];
const char *cmd = NULL;
/* get newsgroup description, if possible */
struct NntpAccountData *adata = mdata->adata;
if (!wildmat)
wildmat = mdata->group;
if (adata->hasLIST_NEWSGROUPS)
cmd =... | 0 | [
"CWE-94",
"CWE-74"
] | neomutt | fb013ec666759cb8a9e294347c7b4c1f597639cc | 252,226,630,564,102,000,000,000,000,000,000,000,000 | 24 | tls: clear data after a starttls acknowledgement
After a starttls acknowledgement message, clear the buffers of any
incoming data / commands. This will ensure that all future data is
handled securely.
Co-authored-by: Pietro Cerutti <gahr@gahr.ch> |
static int hci_sock_setsockopt(struct socket *sock, int level, int optname,
char __user *optval, unsigned int len)
{
struct hci_ufilter uf = { .opcode = 0 };
struct sock *sk = sock->sk;
int err = 0, opt = 0;
BT_DBG("sk %p, opt %d", sk, optname);
lock_sock(sk);
if (hci_pi(sk)->channel != HCI_CHANNEL_R... | 0 | [
"CWE-200"
] | linux | 3f68ba07b1da811bf383b4b701b129bfcb2e4988 | 187,881,356,566,481,270,000,000,000,000,000,000,000 | 82 | Bluetooth: HCI - Fix info leak via getsockname()
The HCI code fails to initialize the hci_channel member of struct
sockaddr_hci and that for leaks two bytes kernel stack via the
getsockname() syscall. Initialize hci_channel with 0 to avoid the
info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marc... |
do_autocmd(char_u *arg_in, int forceit)
{
char_u *arg = arg_in;
char_u *pat;
char_u *envpat = NULL;
char_u *cmd;
event_T event;
int need_free = FALSE;
int nested = FALSE;
int group;
if (*arg == '|')
{
arg = (char_u *)"";
group = AUGROUP_ALL; /* no argument, use all groups *... | 0 | [
"CWE-200",
"CWE-668"
] | vim | 5a73e0ca54c77e067c3b12ea6f35e3e8681e8cf8 | 195,554,576,008,458,000,000,000,000,000,000,000,000 | 125 | patch 8.0.1263: others can read the swap file if a user is careless
Problem: Others can read the swap file if a user is careless with his
primary group.
Solution: If the group permission allows for reading but the world
permissions doesn't, make sure the group is right. |
pdf14_create_clist_device(gs_memory_t *mem, gs_gstate * pgs,
gx_device ** ppdev, gx_device * target,
const gs_pdf14trans_t * pdf14pct)
{
pdf14_clist_device * dev_proto;
pdf14_clist_device * pdev, temp_dev_proto;
int code;
bool has_tags = de... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 37,118,981,428,537,233,000,000,000,000,000,000,000 | 81 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
int _yr_emit_inst_arg_int16(
RE_EMIT_CONTEXT* emit_context,
uint8_t opcode,
int16_t argument,
uint8_t** instruction_addr,
int16_t** argument_addr,
int* code_size)
{
FAIL_ON_ERROR(yr_arena_write_data(
emit_context->arena,
&opcode,
sizeof(uint8_t),
(void**) instruction_ad... | 0 | [
"CWE-125"
] | yara | 83d799804648c2a0895d40a19835d9b757c6fa4e | 55,327,322,887,439,150,000,000,000,000,000,000,000 | 24 | Fix issue #646 (#648)
* Fix issue #646 and some edge cases with wide regexps using \b and \B
* Rename function IS_WORD_CHAR to _yr_re_is_word_char |
mono_thread_get_stack_bounds (guint8 **staddr, size_t *stsize)
{
#if defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
*staddr = (guint8*)pthread_get_stackaddr_np (pthread_self ());
*stsize = pthread_get_stacksize_np (pthread_self ());
*staddr = (guint8*)((gssize)*staddr & ~(mono_pages... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 332,481,133,596,390,300,000,000,000,000,000,000,000 | 54 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
static void client_mpvio_info(MYSQL_PLUGIN_VIO *vio,
MYSQL_PLUGIN_VIO_INFO *info)
{
MCPVIO_EXT *mpvio= (MCPVIO_EXT*)vio;
mpvio_info(mpvio->mysql->net.vio, info); | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 277,232,231,644,103,800,000,000,000,000,000,000,000 | 6 | 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 _clua_panic(lua_State *ls)
{
UNUSED(ls);
if (crawl_state.need_save && !crawl_state.saving_game
&& !crawl_state.updating_scores)
{
save_game(true);
}
return 0;
} | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 88,683,817,832,020,750,000,000,000,000,000,000,000 | 10 | Disable lua load(), loadstring() bytcode loading |
int HttpDownstreamConnection::write_tls() {
conn_.last_read = ev_now(conn_.loop);
ERR_clear_error();
auto upstream = downstream_->get_upstream();
auto input = downstream_->get_request_buf();
struct iovec iov;
while (input->rleft() > 0) {
auto iovcnt = input->riovec(&iov, 1);
if (iovcnt != 1) {
... | 0 | [] | nghttp2 | 319d5ab1c6d916b6b8a0d85b2ae3f01b3ad04f2c | 99,853,144,867,448,330,000,000,000,000,000,000,000 | 50 | nghttpx: Fix request stall
Fix request stall if backend connection is reused and buffer is full. |
static ext3_fsblk_t descriptor_loc(struct super_block *sb,
ext3_fsblk_t logic_sb_block,
int nr)
{
struct ext3_sb_info *sbi = EXT3_SB(sb);
unsigned long bg, first_meta_bg;
int has_super = 0;
first_meta_bg = le32_to_cpu(sbi->s_es->s_first_meta_bg);
if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_IN... | 0 | [
"CWE-20"
] | linux | 8d0c2d10dd72c5292eda7a06231056a4c972e4cc | 333,508,672,901,404,550,000,000,000,000,000,000,000 | 18 | ext3: Fix format string issues
ext3_msg() takes the printk prefix as the second parameter and the
format string as the third parameter. Two callers of ext3_msg omit the
prefix and pass the format string as the second parameter and the first
parameter to the format string as the third parameter. In both cases
this stri... |
static __inline__ int isdn_net_device_started(isdn_net_dev *n)
{
isdn_net_local *lp = n->local;
struct net_device *dev;
if (lp->master)
dev = lp->master;
else
dev = n->dev;
return netif_running(dev);
} | 0 | [
"CWE-119"
] | linux-2.6 | 0f13864e5b24d9cbe18d125d41bfa4b726a82e40 | 29,260,550,235,983,163,000,000,000,000,000,000,000 | 11 | isdn: avoid copying overly-long strings
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9416
Signed-off-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
AP4_HvccAtom::AP4_HvccAtom(AP4_UI08 general_profile_space,
AP4_UI08 general_tier_flag,
AP4_UI08 general_profile,
AP4_UI32 general_profile_compa... | 0 | [
"CWE-125",
"CWE-787"
] | Bento4 | 53499d8d4c69142137c7c7f0097a444783fdeb90 | 148,910,842,837,396,360,000,000,000,000,000,000,000 | 77 | fix for #188 |
static inline struct kiocb *aio_get_req(struct kioctx *ctx)
{
struct kiocb *req;
if (!get_reqs_available(ctx))
return NULL;
req = kmem_cache_alloc(kiocb_cachep, GFP_KERNEL|__GFP_ZERO);
if (unlikely(!req))
goto out_put;
percpu_ref_get(&ctx->reqs);
req->ki_ctx = ctx;
return req;
out_put:
put_reqs_availabl... | 0 | [
"CWE-399"
] | linux | d558023207e008a4476a3b7bb8706b2a2bf5d84f | 21,473,692,388,596,673,000,000,000,000,000,000,000 | 19 | aio: prevent double free in ioctx_alloc
ioctx_alloc() calls aio_setup_ring() to allocate a ring. If aio_setup_ring()
fails to do so it would call aio_free_ring() before returning, but
ioctx_alloc() would call aio_free_ring() again causing a double free of
the ring.
This is easily reproducible from userspace.
Signed-... |
Ptr<FileStorageEmitter> createJSONEmitter(FileStorage_API* fs)
{
return makePtr<JSONEmitter>(fs);
} | 0 | [
"CWE-787"
] | opencv | f42d5399aac80d371b17d689851406669c9b9111 | 172,766,943,175,302,570,000,000,000,000,000,000,000 | 4 | core(persistence): add more checks for implementation limitations |
int OBJ_obj2nid(const ASN1_OBJECT *a)
{
const unsigned int *op;
ADDED_OBJ ad,*adp;
if (a == NULL)
return(NID_undef);
if (a->nid != 0)
return(a->nid);
if (added != NULL)
{
ad.type=ADDED_DATA;
ad.obj=(ASN1_OBJECT *)a; /* XXX: ugly but harmless */
adp=lh_ADDED_OBJ_retrieve(added,&ad);
if (adp != NULL... | 0 | [
"CWE-200"
] | openssl | 0042fb5fd1c9d257d713b15a1f45da05cf5c1c87 | 53,637,991,606,904,360,000,000,000,000,000,000,000 | 22 | Fix OID handling:
- Upon parsing, reject OIDs with invalid base-128 encoding.
- Always NUL-terminate the destination buffer in OBJ_obj2txt printing function.
CVE-2014-3508
Reviewed-by: Dr. Stephen Henson <steve@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org> |
static void ext_session_lock_surface_v1_handle_configure(void *data,
struct ext_session_lock_surface_v1 *lock_surface, uint32_t serial,
uint32_t width, uint32_t height) {
struct swaylock_surface *surface = data;
surface->width = width;
surface->height = height;
surface->indicator_width = 0;
surface->indicator_... | 0 | [
"CWE-703"
] | swaylock | 1d1c75b6316d21933069a9d201f966d84099f6ca | 265,521,288,483,819,200,000,000,000,000,000,000,000 | 12 | Add support for ext-session-lock-v1
This is a new protocol to lock the session [1]. It should be more
reliable than layer-shell + input-inhibitor.
[1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131 |
static inline void skb_split_inside_header(struct sk_buff *skb,
struct sk_buff* skb1,
const u32 len, const int pos)
{
int i;
memcpy(skb_put(skb1, pos - len), skb->data + len, pos - len);
/* And move data appendix as is. */
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
skb_shinfo(skb1)->frags[i... | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 166,399,807,966,221,400,000,000,000,000,000,000,000 | 20 | [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... |
_copyTypeName(const TypeName *from)
{
TypeName *newnode = makeNode(TypeName);
COPY_NODE_FIELD(names);
COPY_SCALAR_FIELD(typeOid);
COPY_SCALAR_FIELD(setof);
COPY_SCALAR_FIELD(pct_type);
COPY_NODE_FIELD(typmods);
COPY_SCALAR_FIELD(typemod);
COPY_NODE_FIELD(arrayBounds);
COPY_LOCATION_FIELD(location);
return... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 300,213,368,154,892,700,000,000,000,000,000,000,000 | 15 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
int RGWGetObj_ObjStore_S3Website::send_response_data(bufferlist& bl, off_t bl_ofs, off_t bl_len) {
map<string, bufferlist>::iterator iter;
iter = attrs.find(RGW_ATTR_AMZ_WEBSITE_REDIRECT_LOCATION);
if (iter != attrs.end()) {
bufferlist &bl = iter->second;
s->redirect = bl.c_str();
s->err.http_ret = 30... | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 96,343,896,869,301,800,000,000,000,000,000,000,000 | 19 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static inline bool dma_dev_has_pq_continue(struct dma_device *dma)
{
return (dma->max_pq & DMA_HAS_PQ_CONTINUE) == DMA_HAS_PQ_CONTINUE;
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 193,927,596,968,093,160,000,000,000,000,000,000,000 | 4 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
njs_promise_reaction_job(njs_vm_t *vm, njs_value_t *args, njs_uint_t nargs,
njs_index_t unused)
{
njs_int_t ret;
njs_bool_t is_error;
njs_value_t *value, *argument, retval;
njs_promise_reaction_t *reaction;
njs_promise_capability_t *capability;
... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 125,046,079,013,726,510,000,000,000,000,000,000,000 | 57 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
void HttpIntegrationTest::testLargeRequestTrailers(uint32_t size, uint32_t max_size) {
// `size` parameter is the size of the trailer that will be added to the
// request. The actual request byte size will exceed `size` due to keys
// and other headers.
config_helper_.addConfigModifier(
[&](envoy::extens... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 298,761,015,734,612,800,000,000,000,000,000,000,000 | 42 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static CURLcode parse_login_details(const char *login, const size_t len,
char **userp, char **passwdp,
char **optionsp)
{
CURLcode result = CURLE_OK;
char *ubuf = NULL;
char *pbuf = NULL;
char *obuf = NULL;
const char *psep = NULL;
cons... | 0 | [
"CWE-264"
] | curl | 31be461c6b659312100c47be6ddd5f0f569290f6 | 250,646,793,761,436,570,000,000,000,000,000,000,000 | 97 | ConnectionExists: for NTLM re-use, require credentials to match
CVE-2015-3143
Bug: http://curl.haxx.se/docs/adv_20150422A.html
Reported-by: Paras Sethia |
should_skip_readdir_error (CommonJob *common,
GFile *dir)
{
if (common->skip_readdir_error != NULL)
{
return g_hash_table_lookup (common->skip_readdir_error, dir) != NULL;
}
return FALSE;
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 302,458,273,370,750,400,000,000,000,000,000,000,000 | 9 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static inline void VectorMultiply3(const DDSVector3 left,
const DDSVector3 right, DDSVector3 *destination)
{
destination->x = left.x * right.x;
destination->y = left.y * right.y;
destination->z = left.z * right.z;
} | 0 | [
"CWE-20",
"CWE-617"
] | ImageMagick | 0c5b1e430a83ef793a7334bbbee408cf3c628699 | 143,812,779,867,447,470,000,000,000,000,000,000,000 | 7 | Added check to prevent image being 0x0 (reported in #489). |
ar6000_roam_tbl_event(struct ar6_softc *ar, WMI_TARGET_ROAM_TBL *pTbl)
{
u8 i;
A_PRINTF("ROAM TABLE NO OF ENTRIES is %d ROAM MODE is %d\n",
pTbl->numEntries, pTbl->roamMode);
for (i= 0; i < pTbl->numEntries; i++) {
A_PRINTF("[%d]bssid %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x ", i,
... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 204,855,765,419,649,740,000,000,000,000,000,000,000 | 23 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
pgp_init(sc_card_t *card)
{
struct pgp_priv_data *priv;
sc_path_t path;
sc_file_t *file = NULL;
struct do_info *info;
int r;
LOG_FUNC_CALLED(card->ctx);
priv = calloc (1, sizeof *priv);
if (!priv)
LOG_FUNC_RETURN(card->ctx, SC_ERROR_OUT_OF_MEMORY);
card->drv_data = priv;
card->cla = 0x00;
/* select ap... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 58,926,633,360,429,550,000,000,000,000,000,000,000 | 128 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void *i40e_fwd_add(struct net_device *netdev, struct net_device *vdev)
{
struct i40e_netdev_priv *np = netdev_priv(netdev);
u16 q_per_macvlan = 0, macvlan_cnt = 0, vectors;
struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back;
struct i40e_fwd_adapter *fwd;
int avail_macvlan, ret;
if ((pf->flags... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 279,908,347,224,702,600,000,000,000,000,000,000,000 | 105 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
png_read_filter_row_up(png_row_infop row_info, png_bytep row,
png_const_bytep prev_row)
{
png_size_t i;
png_size_t istop = row_info->rowbytes;
png_bytep rp = row;
png_const_bytep pp = prev_row;
for (i = 0; i < istop; i++)
{
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
rp++;
... | 0 | [
"CWE-369"
] | libpng | 2dca15686fadb1b8951cb29b02bad4cae73448da | 169,439,203,264,645,430,000,000,000,000,000,000,000 | 14 | [libpng16] Moved chunk-length check into a png_check_chunk_length() private
function (Suggested by Max Stepin). |
static void xx(char* pattern, char* str, int from, int to, int mem, int not)
{
int r;
char cpat[4000], cstr[4000];
#ifdef POSIX_TEST
regex_t reg;
char buf[200];
regmatch_t pmatch[20];
uconv(pattern, cpat, ulen(pattern));
uconv(str, cstr, ulen(str));
r = regcomp(®, pattern, REG_EXTENDED | REG_N... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 199,094,134,207,436,360,000,000,000,000,000,000,000 | 131 | onig-5.9.2 |
ip_vs_zero_stats(struct ip_vs_stats *stats)
{
spin_lock_bh(&stats->lock);
/* get current counters as zero point, rates are zeroed */
#define IP_VS_ZERO_STATS_COUNTER(c) stats->ustats0.c = stats->ustats.c
IP_VS_ZERO_STATS_COUNTER(conns);
IP_VS_ZERO_STATS_COUNTER(inpkts);
IP_VS_ZERO_STATS_COUNTER(outpkts);
IP_VS... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 283,785,138,412,811,080,000,000,000,000,000,000,000 | 18 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
authentic_sm_get_wrapped_apdu(struct sc_card *card, struct sc_apdu *plain, struct sc_apdu **sm_apdu)
{
struct sc_context *ctx = card->ctx;
struct sc_apdu *apdu = NULL;
int rv = 0;
LOG_FUNC_CALLED(ctx);
if (!plain || !sm_apdu)
LOG_FUNC_RETURN(ctx, SC_ERROR_INVALID_ARGUMENTS);
sc_log(ctx,
"called; CLA:... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 12,706,711,278,728,310,000,000,000,000,000,000,000 | 68 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static inline void sem_getref_and_unlock(struct sem_array *sma)
{
WARN_ON_ONCE(!ipc_rcu_getref(sma));
sem_unlock(sma, -1);
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 255,710,505,090,798,800,000,000,000,000,000,000,000 | 5 | ipc,sem: fine grained locking for semtimedop
Introduce finer grained locking for semtimedop, to handle the common case
of a program wanting to manipulate one semaphore from an array with
multiple semaphores.
If the call is a semop manipulating just one semaphore in an array with
multiple semaphores, only take the loc... |
struct kvm_memory_slot *gfn_to_memslot(struct kvm *kvm, gfn_t gfn)
{
return __gfn_to_memslot(kvm_memslots(kvm), gfn); | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 125,556,677,191,267,000,000,000,000,000,000,000,000 | 4 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
static void set_cursor(struct vc_data *vc)
{
if (!con_is_fg(vc) || console_blanked || vc->vc_mode == KD_GRAPHICS)
return;
if (vc->vc_deccm) {
if (vc_is_sel(vc))
clear_selection();
add_softcursor(vc);
if ((vc->vc_cursor_type & 0x0f) != 1)
vc->vc_sw->con_cursor(vc, CM_DRAW);
} else
hide_cursor(vc);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | ca4463bf8438b403596edd0ec961ca0d4fbe0220 | 196,524,627,584,973,060,000,000,000,000,000,000,000 | 13 | vt: vt_ioctl: fix VT_DISALLOCATE freeing in-use virtual console
The VT_DISALLOCATE ioctl can free a virtual console while tty_release()
is still running, causing a use-after-free in con_shutdown(). This
occurs because VT_DISALLOCATE considers a virtual console's
'struct vc_data' to be unused as soon as the correspond... |
uint64_t StreamTcpGetMemcap(void)
{
uint64_t memcapcopy = SC_ATOMIC_GET(stream_config.memcap);
return memcapcopy;
} | 0 | [] | suricata | 50e2b973eeec7172991bf8f544ab06fb782b97df | 339,464,478,313,641,000,000,000,000,000,000,000,000 | 5 | stream/tcp: handle RST with MD5 or AO header
Special handling for RST packets if they have an TCP MD5 or AO header option.
The options hash can't be validated. The end host might be able to validate
it, as it can have a key/password that was communicated out of band.
The sender could use this to move the TCP state to... |
void Sys_RemovePIDFile( const char *gamedir )
{
char *pidFile = Sys_PIDFileName( gamedir );
if( pidFile != NULL )
remove( pidFile );
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 284,340,395,053,253,500,000,000,000,000,000,000,000 | 7 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
static void io_submit_state_end(struct io_submit_state *state)
{
blk_finish_plug(&state->plug);
io_file_put(state);
if (state->free_reqs)
kmem_cache_free_bulk(req_cachep, state->free_reqs,
&state->reqs[state->cur_req]);
} | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 324,585,787,571,959,540,000,000,000,000,000,000,000 | 8 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static ssize_t ndp_to_end_show(struct device *d, struct device_attribute *attr, char *buf)
{
struct usbnet *dev = netdev_priv(to_net_dev(d));
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
return sprintf(buf, "%c\n", ctx->drvflags & CDC_NCM_FLAG_NDP_TO_END ? 'Y' : 'N');
} | 0 | [
"CWE-703"
] | linux | 4d06dd537f95683aba3651098ae288b7cbff8274 | 146,073,839,196,127,470,000,000,000,000,000,000,000 | 7 | cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.
Instead of making the call conditional, we can just defer
it to usbnet_probe, using the... |
DLLEXPORT unsigned char *tjLoadImage(const char *filename, int *width,
int align, int *height, int *pixelFormat,
int flags)
{
int retval = 0, tempc;
size_t pitch;
tjhandle handle = NULL;
tjinstance *this;
j_compress_ptr cinfo = NULL;
... | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 90,988,169,796,338,820,000,000,000,000,000,000,000 | 91 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... |
void MainWindow::updateThumbnails()
{
if (Settings.playlistThumbnails() != "hidden")
m_playlistDock->model()->refreshThumbnails();
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 186,324,227,346,590,530,000,000,000,000,000,000,000 | 5 | fix upgrade check is not using TLS correctly |
static void __exit kvm_s390_exit(void)
{
kvm_exit();
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 248,698,086,826,202,130,000,000,000,000,000,000,000 | 4 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
void ServerConnectionImpl::maybeAddSentinelBufferFragment(Buffer::Instance& output_buffer) {
// It's messy and complicated to try to tag the final write of an HTTP response for response
// tracking for flood protection. Instead, write an empty buffer fragment after the response,
// to allow for tracking.
// Whe... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 133,449,285,082,132,400,000,000,000,000,000,000,000 | 12 | 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> |
static int handle_halt(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
skip_emulated_instruction(vcpu);
return kvm_emulate_halt(vcpu);
} | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 149,354,625,762,145,100,000,000,000,000,000,000,000 | 5 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
static int parse_no_kvmclock_vsyscall(char *arg)
{
kvmclock_vsyscall = 0;
return 0;
} | 0 | [] | kvm | 29fa6825463c97e5157284db80107d1bfac5d77b | 105,813,502,057,445,730,000,000,000,000,000,000,000 | 5 | x86, kvm: Clear paravirt_enabled on KVM guests for espfix32's benefit
paravirt_enabled has the following effects:
- Disables the F00F bug workaround warning. There is no F00F bug
workaround any more because Linux's standard IDT handling already
works around the F00F bug, but the warning still exists. This
... |
PHP_FUNCTION(pcntl_strerror)
{
long error;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &error) == FAILURE) {
RETURN_FALSE;
}
RETURN_STRING(strerror(error), 1);
} | 0 | [
"CWE-19"
] | php-src | be9b2a95adb504abd5acdc092d770444ad6f6854 | 15,747,118,927,455,477,000,000,000,000,000,000,000 | 10 | Fixed bug #69418 - more s->p fixes for filenames |
GF_EXPORT
Bool gf_isom_get_tile_info(GF_ISOFile *file, u32 trackNumber, u32 sample_description_index, u32 *default_sample_group_index, u32 *id, u32 *independent, Bool *full_picture, u32 *x, u32 *y, u32 *w, u32 *h)
{
const u8 *data;
u32 size;
if (!gf_isom_get_sample_group_info(file, trackNumber, sample_description_i... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 123,163,745,250,489,210,000,000,000,000,000,000,000 | 10 | fixed #1706 |
bool Item_allany_subselect::transform_into_max_min(JOIN *join)
{
DBUG_ENTER("Item_allany_subselect::transform_into_max_min");
if (!test_strategy(SUBS_MAXMIN_INJECTED | SUBS_MAXMIN_ENGINE))
DBUG_RETURN(false);
Item **place= optimizer->arguments() + 1;
SELECT_LEX *select_lex= join->select_lex;
Item *subs;
... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 174,988,037,395,219,430,000,000,000,000,000,000,000 | 112 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
static int sony_input_configured(struct hid_device *hdev,
struct hid_input *hidinput)
{
struct sony_sc *sc = hid_get_drvdata(hdev);
int append_dev_id;
int ret;
ret = sony_set_device_id(sc);
if (ret < 0) {
hid_err(hdev, "failed to allocate the device id\n");
goto err_stop;
}
ret = append_dev_id = sony_... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 326,842,470,961,444,560,000,000,000,000,000,000,000 | 239 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
ngx_http_lua_subrequest_resume(ngx_http_request_t *r)
{
lua_State *vm;
ngx_int_t rc;
ngx_uint_t nreqs;
ngx_connection_t *c;
ngx_http_lua_ctx_t *ctx;
ngx_http_lua_co_ctx_t *coctx;
ctx = ngx_http_get_module_ctx(r... | 0 | [
"CWE-444"
] | lua-nginx-module | 9ab38e8ee35fc08a57636b1b6190dca70b0076fa | 295,994,369,398,615,100,000,000,000,000,000,000,000 | 63 | bugfix: prevented request smuggling in the ngx.location.capture API.
Signed-off-by: Yichun Zhang (agentzh) <yichun@openresty.com> |
pk_transaction_init (PkTransaction *transaction)
{
gboolean ret;
_cleanup_error_free_ GError *error = NULL;
transaction->priv = PK_TRANSACTION_GET_PRIVATE (transaction);
transaction->priv->allow_cancel = TRUE;
transaction->priv->caller_active = TRUE;
transaction->priv->cached_transaction_flags = PK_TRANSACTION_FL... | 0 | [
"CWE-287"
] | PackageKit | f176976e24e8c17b80eff222572275517c16bdad | 56,784,374,488,570,210,000,000,000,000,000,000,000 | 28 | Reinstallation and downgrade require authorization
Added new policy actions:
* org.freedesktop.packagekit.package-reinstall
* org.freedesktop.packagekit.package-downgrade
The first does not depend or require any other actions to be authorized
except for org.freedesktop.packagekit.package-install-untrusted in case
o... |
build_sig_subpkt (PKT_signature *sig, sigsubpkttype_t type,
const byte *buffer, size_t buflen )
{
byte *p;
int critical, hashed;
subpktarea_t *oldarea, *newarea;
size_t nlen, n, n0;
critical = (type & SIGSUBPKT_FLAG_CRITICAL);
type &= ~SIGSUBPKT_FLAG_CRITICAL;
/* Sanity check buffer si... | 1 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 194,688,751,649,733,740,000,000,000,000,000,000,000 | 156 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static MagickBooleanType MogrifyUsage(void)
{
static const char
channel_operators[] =
" -channel-fx expression\n"
" exchange, extract, or transfer one or more image channels\n"
" -separate separate an image channel into a grayscale image",
miscellaneous[] =... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick | 4a334bbf5584de37c6f5a47c380a531c8c4b140a | 155,840,419,877,611,080,000,000,000,000,000,000,000 | 346 | https://github.com/ImageMagick/ImageMagick/issues/1623 |
static void report_progress(const MYSQL *mysql __attribute__((unused)),
uint stage, uint max_stage,
double progress __attribute__((unused)),
const char *proc_info __attribute__((unused)),
uint proc_info_lengt... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 132,578,797,107,794,300,000,000,000,000,000,000,000 | 10 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
verify_flags (krb5_context context,
krb5_kdc_configuration *config,
const EncTicketPart *et,
const char *pstr)
{
if(et->endtime < kdc_time){
kdc_log(context, config, 4, "Ticket expired (%s)", pstr);
return KRB5KRB_AP_ERR_TKT_EXPIRED;
}
if(et->flags.invalid){
kdc_log(context, config, ... | 0 | [
"CWE-476"
] | heimdal | 04171147948d0a3636bc6374181926f0fb2ec83a | 189,970,727,093,370,940,000,000,000,000,000,000,000 | 15 | kdc: validate sname in TGS-REQ
In tgs_build_reply(), validate the server name in the TGS-REQ is present before
dereferencing. |
static int smack_syslog(int typefrom_file)
{
int rc = 0;
struct smack_known *skp = smk_of_current();
if (smack_privileged(CAP_MAC_OVERRIDE))
return 0;
if (smack_syslog_label != NULL && smack_syslog_label != skp)
rc = -EACCES;
return rc;
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 35,060,766,353,783,840,000,000,000,000,000,000,000 | 13 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
ecma_op_container_free_entries (ecma_object_t *object_p) /**< collection object pointer */
{
JERRY_ASSERT (object_p != NULL);
ecma_extended_object_t *map_object_p = (ecma_extended_object_t *) object_p;
ecma_collection_t *container_p = ECMA_GET_INTERNAL_VALUE_POINTER (ecma_collection_t,
... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703"
] | jerryscript | c2b662170245a16f46ce02eae68815c325d99821 | 307,928,277,935,464,500,000,000,000,000,000,000,000 | 46 | Fix adding entries to the internal buffer of a Map object (#3805)
When appending the key/value pair separately, garbage collection could be
triggered before the value is added, which could cause problems during
marking. This patch changes insertion to add both values at the same
time, which prevents partial entries... |
static void AuthPAMUserPwdRspFunc(rfbClientPtr cl)
{
CARD32 userLen;
CARD32 pwdLen;
char userBuf[MAX_USER_LEN + 1];
char pwdBuf[MAX_PWD_LEN + 1];
int n;
const char *emsg;
n = ReadExact(cl, (char *)&userLen, sizeof(userLen));
if (n <= 0) {
if (n != 0)
rfbLogPerror("AuthPAMUserPwdRspFunc: read ... | 0 | [
"CWE-787"
] | turbovnc | cea98166008301e614e0d36776bf9435a536136e | 272,427,846,914,591,280,000,000,000,000,000,000,000 | 93 | Server: Fix two issues identified by ASan
1. If the TLSPlain and X509Plain security types were both disabled, then
rfbOptPamAuth() would overflow the name field in the secTypes
structure when testing the "none" security type, since the name of
that security type has less than five characters. This issue was
... |
static void usbvision_unregister_video(struct usb_usbvision *usbvision)
{
/* Radio Device: */
if (video_is_registered(&usbvision->rdev)) {
PDEBUG(DBG_PROBE, "unregister %s [v4l2]",
video_device_node_name(&usbvision->rdev));
video_unregister_device(&usbvision->rdev);
}
/* Video Device: */
if (video_is... | 0 | [
"CWE-17"
] | media_tree | fa52bd506f274b7619955917abfde355e3d19ffe | 281,163,924,110,003,470,000,000,000,000,000,000,000 | 16 | [media] usbvision: fix crash on detecting device with invalid configuration
The usbvision driver crashes when a specially crafted usb device with invalid
number of interfaces or endpoints is detected. This fix adds checks that the
device has proper configuration expected by the driver.
Reported-by: Ralf Spenneberg <r... |
g_file_query_settable_attributes (GFile *file,
GCancellable *cancellable,
GError **error)
{
GFileIface *iface;
GError *my_error;
GFileAttributeInfoList *list;
g_return_val_if_fail (G_IS_FILE (file), NULL);
if (g_cancellable_s... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 286,295,088,157,670,100,000,000,000,000,000,000,000 | 34 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
int nfs_writepage(struct page *page, struct writeback_control *wbc)
{
int ret;
ret = nfs_writepage_locked(page, wbc);
unlock_page(page);
return ret;
} | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 189,394,737,822,762,560,000,000,000,000,000,000,000 | 8 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
int fpregs_set(struct task_struct *target, const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
struct fpu *fpu = &target->thread.fpu;
struct user_i387_ia32_struct env;
int ret;
fpu__activate_fpstate_write(fpu);
fpstate_sanitize_xstat... | 0 | [
"CWE-200"
] | linux | 814fb7bb7db5433757d76f4c4502c96fc53b0b5e | 81,382,211,038,842,370,000,000,000,000,000,000,000 | 34 | x86/fpu: Don't let userspace set bogus xcomp_bv
On x86, userspace can use the ptrace() or rt_sigreturn() system calls to
set a task's extended state (xstate) or "FPU" registers. ptrace() can
set them for another task using the PTRACE_SETREGSET request with
NT_X86_XSTATE, while rt_sigreturn() can set them for the curr... |
static Bool lsr_setup_smil_anim(GF_LASeRCodec *lsr, SVG_Element *anim, SVG_Element *anim_parent)
{
GF_FieldInfo info;
u32 coded_type, not_res;
GF_Node *target;
Bool is_animateMotion, is_animateTransform;
XMLRI *xlink;
SMIL_AttributeName *name = NULL;
SMIL_AnimateValue *value;
/*setup smil events*/
not_res = 0... | 0 | [
"CWE-190"
] | gpac | faa75edde3dfeba1e2cf6ffa48e45a50f1042096 | 59,054,548,722,124,580,000,000,000,000,000,000,000 | 122 | fixed #2213 |
PHP_FUNCTION(readfile)
{
char *filename;
int filename_len;
int size = 0;
zend_bool use_include_path = 0;
zval *zcontext = NULL;
php_stream *stream;
php_stream_context *context = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|br!", &filename, &filename_len, &use_include_path, &zcontext) == FAILUR... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 39,403,418,477,498,393,000,000,000,000,000,000,000 | 29 | - 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 |
void auth_request_unref(struct auth_request **_request)
{
struct auth_request *request = *_request;
*_request = NULL;
i_assert(request->refcount > 0);
if (--request->refcount > 0)
return;
i_assert(array_count(&request->authdb_event) == 0);
if (request->handler_pending_reply)
auth_request_handler_abort(requ... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 93,349,261,404,837,000,000,000,000,000,000,000,000 | 34 | auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter
The passdb was wrongly deduplicated in this situation, causing wrong
mechanisms or username_filter setting to be used. This would be a rather
unlikely configuration though.
Fixed by moving mechanisms and username_filter fro... |
fetch_token_in_cc(OnigToken* tok, UChar** src, UChar* end, ScanEnv* env)
{
int num;
OnigCodePoint c, c2;
OnigSyntaxType* syn = env->syntax;
OnigEncoding enc = env->enc;
UChar* prev;
UChar* p = *src;
PFETCH_READY;
if (PEND) {
tok->type = TK_EOT;
return tok->type;
}
PFETCH(c);
tok->type = ... | 0 | [
"CWE-787"
] | oniguruma | f015fbdd95f76438cd86366467bb2b39870dd7c6 | 2,948,249,262,591,281,000,000,000,000,000,000,000 | 218 | fix #55 : Byte value expressed in octal must be smaller than 256 |
com_nopager(String *buffer MY_ATTRIBUTE((unused)),
char *line MY_ATTRIBUTE((unused)))
{
strmov(pager, "stdout");
opt_nopager=1;
PAGER= stdout;
tee_fprintf(stdout, "PAGER set to stdout\n");
return 0;
} | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 263,806,176,035,463,140,000,000,000,000,000,000,000 | 9 | 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 f91b941842d240b8a62645e507f5554e8be76aec) |
init_pci(struct vmctx *ctx)
{
struct mem_range mr;
struct pci_vdev_ops *ops;
struct businfo *bi;
struct slotinfo *si;
struct funcinfo *fi;
size_t lowmem;
int bus, slot, func;
int success_cnt = 0;
int error;
pci_emul_iobase = PCI_EMUL_IOBASE;
pci_emul_membase32 = vm_get_lowmem_limit(ctx);
pci_emul_membase64... | 1 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 2b3dedfb9ba13f15887f22b935d373f36c9a59fa | 133,390,890,596,990,740,000,000,000,000,000,000,000 | 170 | dm: pci: clean up assert() in pci core
Tracked-On: #3252
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
RZ_API RzDyldCache *rz_dyldcache_new_buf(RzBuffer *buf) {
RzDyldCache *cache = RZ_NEW0(RzDyldCache);
if (!cache) {
return NULL;
}
memcpy(cache->magic, "dyldcac", 7);
cache->buf = rz_buf_ref(buf);
populate_cache_headers(cache);
if (!cache->hdr) {
goto cupertino;
}
populate_cache_maps(cache);
if (!cache->ma... | 0 | [
"CWE-787"
] | rizin | 556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810 | 338,063,394,886,675,220,000,000,000,000,000,000,000 | 27 | Fix oob write in dyldcache
When the individual n_slide_infos were too high, the sum would overflow
and too few entries would be allocated. |
if (err == MP_OKAY) {
if (mp_iszero(r) == MP_YES || mp_iszero(s) == MP_YES ||
mp_cmp(r, curve->order) != MP_LT ||
mp_cmp(s, curve->order) != MP_LT) {
err = MP_ZERO_E;
}
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 146,105,726,490,553,850,000,000,000,000,000,000,000 | 7 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
OFB crypt/decrypt data using key key with cipher cipher starting with iv */
PHP_FUNCTION(mcrypt_decrypt)
{
zval **mode;
char *cipher, *key, *data, *iv = NULL;
int cipher_len, key_len, data_len, iv_len = 0;
MCRYPT_GET_CRYPT_ARGS
convert_to_string_ex(mode);
php_mcrypt_do_crypt(cipher, key, key_len, data, dat... | 1 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 155,969,128,471,535,530,000,000,000,000,000,000,000 | 12 | Fix bug #72455: Heap Overflow due to integer overflows |
jd_to_ordinal(VALUE jd, double sg,
VALUE *nth, int *rjd,
int *ry, int *rd)
{
decode_jd(jd, nth, rjd);
c_jd_to_ordinal(*rjd, sg, ry, rd);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 230,069,647,156,447,470,000,000,000,000,000,000,000 | 7 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
BOOL CBINDInstallDlg::OnInitDialog() {
CDialog::OnInitDialog();
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
char filename[MAX_PATH];
char dirn... | 0 | [
"CWE-284"
] | bind9 | 967a3b9419a3c12b8c0870c86d1ee3840bcbbad7 | 195,556,913,720,868,170,000,000,000,000,000,000,000 | 67 | [master] quote service registry paths
4532. [security] The BIND installer on Windows used an unquoted
service path, which can enable privilege escalation.
(CVE-2017-3141) [RT #45229] |
void gf_bs_write_u24(GF_BitStream *bs, u32 value)
{
assert(!bs->nbBits);
if (bs->cache_write && (bs->buffer_written+3 < bs->cache_write_size) ) {
bs->cache_write[bs->buffer_written] = (u8) ((value>>16)&0xff);
bs->cache_write[bs->buffer_written+1] = (u8) ((value>>8)&0xff);
bs->cache_write[bs->buffer_written+2] =... | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 289,581,599,789,748,730,000,000,000,000,000,000,000 | 14 | fixed #2165 |
static void ClearBounds(Image *image,RectangleInfo *bounds)
{
ExceptionInfo
*exception;
ssize_t
y;
if (bounds->x < 0)
return;
if (image->matte == MagickFalse)
(void) SetImageAlphaChannel(image,OpaqueAlphaChannel);
exception=(&image->exception);
for (y=0; y < (ssize_t) bounds->height; y++)
... | 0 | [
"CWE-369"
] | ImageMagick6 | 4f31d78716ac94c85c244efcea368fea202e2ed4 | 222,847,680,224,915,400,000,000,000,000,000,000,000 | 33 | https://github.com/ImageMagick/ImageMagick/issues/1629 |
void Compute(OpKernelContext* context) override {
typedef Eigen::Map<const Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>>
ConstEigenMatrixMap;
typedef Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>>
EigenMatrixMap;
constexpr int tensor_in_and_out_dims = 4;
const Tenso... | 0 | [
"CWE-703",
"CWE-908"
] | tensorflow | 32fdcbff9d06d010d908fcc4bd4b36eb3ce15925 | 331,168,497,918,114,470,000,000,000,000,000,000,000 | 113 | Validate arguments of `FractionalMaxPoolGrad`
PiperOrigin-RevId: 372274982
Change-Id: If46b0c442efa4eaef635ce6a476717060420122c |
static void vxlan_encap_bypass(struct sk_buff *skb, struct vxlan_dev *src_vxlan,
struct vxlan_dev *dst_vxlan, __be32 vni)
{
struct pcpu_sw_netstats *tx_stats, *rx_stats;
union vxlan_addr loopback;
union vxlan_addr *remote_ip = &dst_vxlan->default_dst.remote_ip;
struct net_device *dev;
int len = skb->len;... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 90,978,261,669,169,860,000,000,000,000,000,000,000 | 52 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
MagickExport MagickBooleanType SetQuantumDepth(const Image *image,
QuantumInfo *quantum_info,const size_t depth)
{
size_t
extent,
quantum;
/*
Allocate the quantum pixel buffer.
*/
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse... | 0 | [
"CWE-369"
] | ImageMagick | c4e63ad30bc42da691f2b5f82a24516dd6b4dc70 | 299,647,716,464,249,260,000,000,000,000,000,000,000 | 36 | https://github.com/ImageMagick/ImageMagick/issues/105 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.