func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void emit(JF, int value)
{
emitraw(J, F, F->lastline);
emitraw(J, F, value);
} | 0 | [
"CWE-703",
"CWE-787"
] | mujs | df8559e7bdbc6065276e786217eeee70f28fce66 | 59,255,528,734,010,930,000,000,000,000,000,000,000 | 5 | Bug 704749: Clear jump list after patching jump addresses.
Since we can emit a statement multiple times when compiling try/finally
we have to use a new patch list for each instance. |
static uint32_t read_next_header (FILE *infile, WavpackHeader *wphdr)
{
unsigned char buffer [sizeof (*wphdr)], *sp = buffer + sizeof (*wphdr), *ep = sp;
uint32_t bytes_skipped = 0;
int bleft;
while (1) {
if (sp < ep) {
bleft = (int)(ep - sp);
memmove (buffer, sp, bleft);
}
else
bleft... | 0 | [
"CWE-476",
"CWE-703"
] | WavPack | 25b4a2725d8568212e7cf89ca05ca29d128af7ac | 93,834,375,471,864,910,000,000,000,000,000,000,000 | 34 | issue #121: NULL pointer dereference in wvunpack.c
* check for NULL pointer before dereferencing in wvunpack.c
* sanitize custom extensions to be alphanumeric only |
TEST_P(DownstreamProtocolIntegrationTest, HeadersOnlyFilterDecoding) {
config_helper_.addFilter(R"EOF(
name: decode-headers-only
)EOF");
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
auto response =
codec_client_->makeRequestWithBody(Http::TestHeaderMapImpl{{":method", "POST"},
... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 258,722,368,139,110,750,000,000,000,000,000,000,000 | 22 | 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... |
XMLRPC_VALUE XMLRPC_CreateValueDateTime_ISO8601(const char* id, const char *s) {
XMLRPC_VALUE val = XMLRPC_CreateValueEmpty();
if(val) {
XMLRPC_SetValueDateTime_ISO8601(val, s);
if(id) {
XMLRPC_SetValueID(val, id, 0);
}
}
return val;
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 288,206,279,671,046,070,000,000,000,000,000,000,000 | 10 | Fix bug #68027 - fix date parsing in XMLRPC lib |
static bool gfs2_rgrp_congested(const struct gfs2_rgrpd *rgd, int loops)
{
const struct gfs2_glock *gl = rgd->rd_gl;
const struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
struct gfs2_lkstats *st;
u64 r_dcount, l_dcount;
u64 l_srttb, a_srttb = 0;
s64 srttb_diff;
u64 sqr_diff;
u64 var;
int cpu, nonzero = 0;
preempt... | 0 | [
"CWE-416"
] | linux | 36e4ad0316c017d5b271378ed9a1c9a4b77fab5f | 163,342,716,588,316,760,000,000,000,000,000,000,000 | 45 | GFS2: don't set rgrp gl_object until it's inserted into rgrp tree
Before this patch, function read_rindex_entry would set a rgrp
glock's gl_object pointer to itself before inserting the rgrp into
the rgrp rbtree. The problem is: if another process was also reading
the rgrp in, and had already inserted its newly create... |
GF_Err ihdr_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_J2KImageHeaderBox *ptr = (GF_J2KImageHeaderBox *) s;
e = gf_isom_box_write_header(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->height);
gf_bs_write_u32(bs, ptr->width);
gf_bs_write_u16(bs, ptr->nb_comp);
gf_bs_write_u8(bs, ptr->bpc);
gf_b... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 74,567,946,952,476,590,000,000,000,000,000,000,000 | 17 | fixed #2255 |
BlockDriverAIOCB *bdrv_aio_flush(BlockDriverState *bs,
BlockDriverCompletionFunc *cb, void *opaque)
{
trace_bdrv_aio_flush(bs, opaque);
Coroutine *co;
BlockDriverAIOCBCoroutine *acb;
acb = qemu_aio_get(&bdrv_em_co_aiocb_info, bs, cb, opaque);
acb->done = NULL;
co = qemu_coroutine_crea... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 16,024,683,465,987,468,000,000,000,000,000,000,000 | 16 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
xmlNewNs(xmlNodePtr node, const xmlChar *href, const xmlChar *prefix) {
xmlNsPtr cur;
if ((node != NULL) && (node->type != XML_ELEMENT_NODE))
return(NULL);
if ((prefix != NULL) && (xmlStrEqual(prefix, BAD_CAST "xml"))) {
/* xml namespace is predefined, no need to add it */
if (xmlStrEqual... | 0 | [
"CWE-20"
] | libxml2 | bdd66182ef53fe1f7209ab6535fda56366bd7ac9 | 259,437,922,680,518,300,000,000,000,000,000,000,000 | 64 | Avoid building recursive entities
For https://bugzilla.gnome.org/show_bug.cgi?id=762100
When we detect a recusive entity we should really not
build the associated data, moreover if someone bypass
libxml2 fatal errors and still tries to serialize a broken
entity make sure we don't risk to get ito a recursion
* parser... |
static SECURITY_STATUS SEC_ENTRY kerberos_DecryptMessage(PCtxtHandle phContext,
PSecBufferDesc pMessage,
ULONG MessageSeqNo, ULONG* pfQOP)
{
#ifdef WITH_GSSAPI
KRB_CONTEXT* context;
PSecBuffer sig_buffer,... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 170,874,991,114,719,500,000,000,000,000,000,000,000 | 104 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
cmsBool AllocElem(cmsContext ContextID, _cmsDICelem* e, cmsUInt32Number Count)
{
e->Offsets = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *));
if (e->Offsets == NULL) return FALSE;
e->Sizes = (cmsUInt32Number *) _cmsCalloc(ContextID, Count, sizeof(cmsUInt32Number *));
if (e... | 1 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 297,803,986,358,663,320,000,000,000,000,000,000,000 | 15 | Fixes from coverity check |
static int cgw_remove_job(struct sk_buff *skb, struct nlmsghdr *nlh,
struct netlink_ext_ack *extack)
{
struct net *net = sock_net(skb->sk);
struct cgw_job *gwj = NULL;
struct hlist_node *nx;
struct rtcanmsg *r;
struct cf_mod mod;
struct can_can_gw ccgw;
u8 limhops = 0;
int err = 0;
if (!netlink_capable(s... | 0 | [
"CWE-787"
] | linux | 0aaa81377c5a01f686bcdb8c7a6929a7bf330c68 | 299,450,881,927,908,880,000,000,000,000,000,000,000 | 72 | can: gw: ensure DLC boundaries after CAN frame modification
Muyu Yu provided a POC where user root with CAP_NET_ADMIN can create a CAN
frame modification rule that makes the data length code a higher value than
the available CAN frame data size. In combination with a configured checksum
calculation where the result is... |
bool Item_date_literal::get_date(MYSQL_TIME *ltime, ulonglong fuzzy_date)
{
DBUG_ASSERT(fixed);
fuzzy_date |= sql_mode_for_dates(current_thd);
*ltime= cached_time;
return (null_value= check_date_with_warn(ltime, fuzzy_date,
MYSQL_TIMESTAMP_ERROR));
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 1,180,707,127,658,661,100,000,000,000,000,000,000 | 8 | 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. |
get_page_geometry (char *name, struct pagedef *page)
{
char *ptr;
int n;
for (ptr = name; *ptr; ptr++)
*ptr = (char)tolower((int)*ptr);
for (n = 0; n < MAX_PAPERNAMES; n++)
{
if (strcmp(name, PaperTable[n].name) == 0)
{
page->width = PaperTable[n].width;
page->length =... | 0 | [
"CWE-125"
] | libtiff | 21d39de1002a5e69caa0574b2cc05d795d6fbfad | 171,473,763,096,339,030,000,000,000,000,000,000,000 | 22 | * tools/tiffcrop.c: fix multiple uint32 overflows in
writeBufferToSeparateStrips(), writeBufferToContigTiles() and
writeBufferToSeparateTiles() that could cause heap buffer overflows.
Reported by Henri Salo from Nixu Corporation.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 |
void __ext4_error_inode(struct inode *inode, const char *function,
unsigned int line, ext4_fsblk_t block,
const char *fmt, ...)
{
va_list args;
struct va_format vaf;
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
es->s_last_error_ino = cpu_to_le32(inode->i_ino);
es->s_last_error_block = cpu_to_le... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 72,530,434,448,071,610,000,000,000,000,000,000,000 | 29 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
const std::vector<Box_ipma::PropertyAssociation>* Box_ipma::get_properties_for_item_ID(uint32_t itemID) const
{
for (const auto& entry : m_entries) {
if (entry.item_ID == itemID) {
return &entry.associations;
}
}
return nullptr;
} | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 264,017,975,659,327,600,000,000,000,000,000,000,000 | 10 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
static void t1_subset_end(void)
{
if (t1_synthetic) { /* copy to "dup /FontName get exch definefont pop" */
while (!strstr(t1_line_array, "definefont")) {
t1_getline();
t1_putline();
}
while (!t1_end_eexec())
t1_getline(); /* ignore the rest ... | 0 | [
"CWE-119"
] | texlive-source | 6ed0077520e2b0da1fd060c7f88db7b2e6068e4c | 180,408,437,775,095,600,000,000,000,000,000,000,000 | 26 | writet1 protection against buffer overflow
git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751 |
expanded_string_integer(uschar *s, BOOL isplus)
{
int_eximarith_t value;
uschar *msg = US"invalid integer \"%s\"";
uschar *endptr;
/* If expansion failed, expand_string_message will be set. */
if (s == NULL) return -1;
/* On an overflow, strtol() returns LONG_MAX or LONG_MIN, and sets errno
to ERANGE. When there isn... | 0 | [
"CWE-189"
] | exim | 7685ce68148a083d7759e78d01aa5198fc099c44 | 88,001,972,438,225,400,000,000,000,000,000,000,000 | 77 | Only expand integers for integer math once |
static void sf_markstate(struct ip_mc_list *pmc)
{
struct ip_sf_list *psf;
int mca_xcount = pmc->sfcount[MCAST_EXCLUDE];
for (psf = pmc->sources; psf; psf = psf->sf_next)
if (pmc->sfcount[MCAST_EXCLUDE]) {
psf->sf_oldin = mca_xcount ==
psf->sf_count[MCAST_EXCLUDE] &&
!psf->sf_count[MCAST_INCLUDE];
} ... | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 4,841,089,558,183,845,700,000,000,000,000,000,000 | 13 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
TEST_F(ExprMatchTest, UndefinedMatchesCorrectly) {
createMatcher(fromjson("{$expr: {$eq: ['$x', undefined]}}"));
ASSERT_TRUE(matches(BSON("x" << BSONUndefined)));
ASSERT_TRUE(matches(BSONObj()));
ASSERT_FALSE(matches(BSON("x" << BSONNULL)));
} | 0 | [] | mongo | ee97c0699fd55b498310996ee002328e533681a3 | 329,074,582,000,206,300,000,000,000,000,000,000,000 | 8 | SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr. |
static void sig_complete_tag(GList **list, WINDOW_REC *window,
const char *word, const char *line,
int *want_space)
{
g_return_if_fail(list != NULL);
g_return_if_fail(word != NULL);
*list = completion_get_servertags(word);
if (*list != NULL) signal_stop();
} | 0 | [
"CWE-416"
] | irssi | 36564717c9f701e3a339da362ab46d220d27e0c1 | 18,378,926,668,078,852,000,000,000,000,000,000,000 | 10 | Merge branch 'security' into 'master'
Security
See merge request irssi/irssi!34
(cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) |
static void hci_sync_conn_complete_evt(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_ev_sync_conn_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdadd... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 218,953,412,793,930,000,000,000,000,000,000,000,000 | 80 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
static inline void req_ref_put(struct io_kiocb *req)
{
WARN_ON_ONCE(req_ref_put_and_test(req));
} | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 89,332,275,964,751,400,000,000,000,000,000,000,000 | 4 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
int f_name_cmp(const struct file_struct *f1, const struct file_struct *f2)
{
int dif;
const uchar *c1, *c2;
enum fnc_state state1, state2;
enum fnc_type type1, type2;
enum fnc_type t_path = protocol_version >= 29 ? t_PATH : t_ITEM;
if (!f1 || !F_IS_ACTIVE(f1)) {
if (!f2 || !F_IS_ACTIVE(f2))
return 0;
retu... | 0 | [
"CWE-59"
] | rsync | 962f8b90045ab331fc04c9e65f80f1a53e68243b | 263,976,044,211,151,570,000,000,000,000,000,000,000 | 118 | Complain if an inc-recursive path is not right for its dir.
This ensures that a malicious sender can't use a just-sent
symlink as a trasnfer path. |
unicode_log2vis (PyUnicodeObject* string,
FriBidiParType base_direction, int clean, int reordernsm)
{
int i;
int length = string->length;
FriBidiChar *logical = NULL; /* input fribidi unicode buffer */
FriBidiChar *visual = NULL; /* output fribidi unicode buffer */
FriBidiStrIn... | 0 | [
"CWE-119"
] | pyfribidi | d2860c655357975e7b32d84e6b45e98f0dcecd7a | 21,697,634,377,588,857,000,000,000,000,000,000,000 | 62 | refactor pyfribidi.c module
pyfribidi.c is now compiled as _pyfribidi. This module only handles
unicode internally and doesn't use the fribidi_utf8_to_unicode
function (which can't handle 4 byte utf-8 sequences). This fixes the
buffer overflow in issue #2.
The code is now also much simpler: pyfribidi.c is down from 2... |
static int io_account_mem(struct io_ring_ctx *ctx, unsigned long nr_pages,
enum io_mem_account acct)
{
int ret;
if (ctx->limit_mem) {
ret = __io_account_mem(ctx->user, nr_pages);
if (ret)
return ret;
}
if (ctx->mm_account) {
if (acct == ACCT_LOCKED)
ctx->mm_account->locked_vm += nr_pages;
else ... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 107,804,281,875,405,240,000,000,000,000,000,000,000 | 20 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
vhost_shadow_enqueue_single_packed(struct virtio_net *dev,
struct vhost_virtqueue *vq,
uint32_t len[],
uint16_t id[],
uint16_t count[],
uint16_t num_buffers)
{
uint16_t i;
for (i = 0; i < num_buffers; i++) {
/* enqueue shadow flush action aligned with batch num */
if (!vq->shado... | 0 | [
"CWE-665"
] | dpdk | 97ecc1c85c95c13bc66a87435758e93406c35c48 | 47,023,603,768,582,470,000,000,000,000,000,000,000 | 25 | vhost: fix translated address not checked
Malicious guest can construct desc with invalid address and zero buffer
length. That will request vhost to check both translated address and
translated data length. This patch will add missed address check.
CVE-2020-10725
Fixes: 75ed51697820 ("vhost: add packed ring batch deq... |
static void cbs_jpeg_close(CodedBitstreamContext *ctx)
{
CodedBitstreamJPEGContext *priv = ctx->priv_data;
av_freep(&priv->write_buffer);
} | 0 | [
"CWE-787"
] | FFmpeg | a3a3730b5456ca00587455004d40c047f7b20a99 | 125,621,042,119,392,010,000,000,000,000,000,000,000 | 6 | avcodec/cbs_jpeg: Check length for SOS
Fixes: out of array access
Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584
Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680
Found-by: continuous fuzzing process https://github.com/google/oss... |
void platform_device_put(struct platform_device *pdev)
{
if (pdev)
put_device(&pdev->dev);
} | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 33,584,178,179,476,580,000,000,000,000,000,000,000 | 5 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
nautilus_application_new (void)
{
return g_object_new (NAUTILUS_TYPE_APPLICATION, NULL);
} | 0 | [] | nautilus | 1e1c916f5537eb5e4144950f291f4a3962fc2395 | 166,214,948,136,874,940,000,000,000,000,000,000,000 | 4 | Add "interactive" argument to nautilus_file_mark_desktop_file_trusted.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
* libnautilus-private/nautilus-mime-actions.c:
Add "interactive" ... |
PHP_FUNCTION(sqlite_exec)
{
zval *zdb;
struct php_sqlite_db *db;
char *sql;
int sql_len;
char *errtext = NULL;
zval *errmsg = NULL;
zval *object = getThis();
if (object) {
if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z/", &sql, &sql_len, &errmsg)) {
return;
}
DB_FROM_OBJECT(db, o... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 218,310,673,540,442,050,000,000,000,000,000,000,000 | 44 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static struct managesieve_arg *managesieve_arg_create
(struct managesieve_parser *parser)
{
struct managesieve_arg *arg;
arg = array_append_space(parser->cur_list);
arg->parent = parser->list_arg;
return arg;
} | 0 | [
"CWE-787"
] | pigeonhole | 7ce9990a5e6ba59e89b7fe1c07f574279aed922c | 36,760,777,951,005,960,000,000,000,000,000,000,000 | 10 | lib-managesieve: Don't accept strings with NULs
ManageSieve doesn't allow NULs in strings.
This fixes a bug with unescaping a string with NULs: str_unescape() could
have been called for memory that points outside the allocated string,
causing heap corruption. This could cause crashes or theoretically even
result in r... |
TEST_F(EncryptedRecordTest, TestOverSize) {
addToQueue("1603015000");
EXPECT_ANY_THROW(read_.read(queue_));
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-770"
] | fizz | 6bf67137ef1ee5cd70c842b014c322b7deaf994b | 108,419,770,432,389,700,000,000,000,000,000,000,000 | 4 | Reject zero length handshake records.
Summary:
Zero length (all padding) handshake are forbidden by RFC. Allowing
these was a regression in D13754697 (2c6f78a).
This is a partial fix for CVE-2019-11924
Reviewed By: xybu
Differential Revision: D16285100
fbshipit-source-id: 05a19d31ad74601ce89156a0e59517aaad8dd928 |
static inline bool need_reserve_reloc_root(struct btrfs_root *root)
{
struct btrfs_fs_info *fs_info = root->fs_info;
if (!fs_info->reloc_ctl ||
!test_bit(BTRFS_ROOT_SHAREABLE, &root->state) ||
root->root_key.objectid == BTRFS_TREE_RELOC_OBJECTID ||
root->reloc_root)
return false;
return true;
} | 0 | [
"CWE-703",
"CWE-667"
] | linux | 1cb3db1cf383a3c7dbda1aa0ce748b0958759947 | 106,932,579,615,518,490,000,000,000,000,000,000,000 | 12 | btrfs: fix deadlock with concurrent chunk allocations involving system chunks
When a task attempting to allocate a new chunk verifies that there is not
currently enough free space in the system space_info and there is another
task that allocated a new system chunk but it did not finish yet the
creation of the respecti... |
eval0(
char_u *arg,
typval_T *rettv,
exarg_T *eap,
evalarg_T *evalarg)
{
return eval0_retarg(arg, rettv, eap, evalarg, NULL);
} | 0 | [
"CWE-786",
"CWE-119",
"CWE-787"
] | vim | fe6fb267e6ee5c5da2f41889e4e0e0ac5bf4b89d | 235,477,047,564,253,180,000,000,000,000,000,000,000 | 8 | patch 8.2.4206: condition with many "(" causes a crash
Problem: Condition with many "(" causes a crash.
Solution: Limit recursion to 1000. |
onigenc_single_byte_code_to_mbc(OnigCodePoint code, UChar *buf)
{
*buf = (UChar )(code & 0xff);
return 1;
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 118,542,612,308,559,520,000,000,000,000,000,000,000 | 5 | onig-5.9.2 |
extra_close_record(struct ctl_extr_rec *ctl, int ce_size)
{
int padding = 0;
if (ce_size > 0)
extra_tell_used_size(ctl, ce_size);
/* Padding. */
if (ctl->cur_len & 0x01) {
ctl->cur_len++;
if (ctl->bp != NULL)
ctl->bp[ctl->cur_len] = 0;
padding = 1;
}
if (ctl->use_extr) {
if (ctl->ce_ptr != NULL)
... | 0 | [
"CWE-190"
] | libarchive | 3014e19820ea53c15c90f9d447ca3e668a0b76c6 | 261,980,555,988,446,120,000,000,000,000,000,000,000 | 20 | Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives
* Don't cast size_t to int, since this can lead to overflow
on machines where sizeof(int) < sizeof(size_t)
* Check a + b > limit by writing it as
a > limit || b > limit || a + b > limit
to avoid problems when a + b wraps... |
static void page_cache_pipe_buf_release(struct pipe_inode_info *pipe,
struct pipe_buffer *buf)
{
page_cache_release(buf->page);
buf->flags &= ~PIPE_BUF_FLAG_LRU;
} | 0 | [
"CWE-94"
] | linux-2.6 | 8811930dc74a503415b35c4a79d14fb0b408a361 | 319,694,320,237,170,400,000,000,000,000,000,000,000 | 6 | splice: missing user pointer access verification
vmsplice_to_user() must always check the user pointer and length
with access_ok() before copying. Likewise, for the slow path of
copy_from_user_mmap_sem() we need to check that we may read from
the user region.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Cc: Wojc... |
GF_Err minf_Size(GF_Box *s)
{
GF_Err e;
GF_MediaInformationBox *ptr = (GF_MediaInformationBox *)s;
if (ptr->InfoHeader) {
e = gf_isom_box_size((GF_Box *) ptr->InfoHeader);
if (e) return e;
ptr->size += ptr->InfoHeader->size;
}
if (ptr->dataInformation) {
e = gf_isom_box_size((GF_Box *) ptr->dataInformatio... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 4,637,219,963,058,846,500,000,000,000,000,000,000 | 22 | prevent dref memleak on invalid input (#1183) |
struct mg_str mg_url_user(const char *url) {
struct url u = urlparse(url);
struct mg_str s = mg_str("");
if (u.user && (u.pass || u.host)) {
size_t n = u.pass ? u.pass - u.user - 1 : u.host - u.user - 1;
s = mg_str_n(url + u.user, n);
}
return s;
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 237,716,941,543,594,320,000,000,000,000,000,000,000 | 9 | Protect against the directory traversal in mg_upload() |
ly_set_new(void)
{
struct ly_set *new;
new = calloc(1, sizeof(struct ly_set));
LY_CHECK_ERR_RETURN(!new, LOGMEM(NULL), NULL);
return new;
} | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 292,479,258,367,697,640,000,000,000,000,000,000,000 | 8 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
smb2_find_mid(struct TCP_Server_Info *server, char *buf)
{
return __smb2_find_mid(server, buf, false);
} | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 134,304,260,466,899,360,000,000,000,000,000,000,000 | 4 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
start_default_fetch_ldap (ctrl_t ctrl, cert_fetch_context_t *context,
const char *dn, const char *attr)
{
gpg_error_t err;
struct ldapserver_iter iter;
*context = xtrycalloc (1, sizeof **context);
if (!*context)
return gpg_error_from_errno (errno);
/* FIXME; we might want to lo... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 317,835,657,656,101,300,000,000,000,000,000,000,000 | 38 | 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 int fib6_age(struct rt6_info *rt, void *arg)
{
unsigned long now = jiffies;
/*
* check addrconf expiration here.
* Routes are expired even if they are in use.
*
* Also age clones. Note, that clones are aged out
* only if they are not in use now.
*/
if (rt->rt6i_flags & RTF_EXPIRES && rt->dst.exp... | 0 | [
"CWE-399"
] | linux | 307f2fb95e9b96b3577916e73d92e104f8f26494 | 46,254,957,439,154,730,000,000,000,000,000,000,000 | 43 | ipv6: only static routes qualify for equal cost multipathing
Static routes in this case are non-expiring routes which did not get
configured by autoconf or by icmpv6 redirects.
To make sure we actually get an ecmp route while searching for the first
one in this fib6_node's leafs, also make sure it matches the ecmp ro... |
static void conn_cleanup(conn *c) {
assert(c != NULL);
conn_release_items(c);
if (c->sasl_conn) {
assert(settings.sasl);
sasl_dispose(&c->sasl_conn);
c->sasl_conn = NULL;
}
if (IS_UDP(c->transport)) {
conn_set_state(c, conn_read);
}
} | 0 | [] | memcached | f249724cedcab6605ca8a0769ac4b356a8124f63 | 297,444,460,604,796,600,000,000,000,000,000,000,000 | 15 | crash fix: errstr wasn't initialized in metaget
if meta_flag_preparse bailed out early it would try to read
uninitialized memory. |
static u32 atl2_get_msglevel(struct net_device *netdev)
{
return 0;
} | 0 | [
"CWE-200"
] | linux | f43bfaeddc79effbf3d0fcb53ca477cca66f3db8 | 50,026,191,220,603,930,000,000,000,000,000,000,000 | 4 | atl2: Disable unimplemented scatter/gather feature
atl2 includes NETIF_F_SG in hw_features even though it has no support
for non-linear skbs. This bug was originally harmless since the
driver does not claim to implement checksum offload and that used to
be a requirement for SG.
Now that SG and checksum offload are i... |
static struct branch *new_branch(const char *name)
{
unsigned int hc = hc_str(name, strlen(name)) % branch_table_sz;
struct branch *b = lookup_branch(name);
if (b)
die("Invalid attempt to create duplicate branch: %s", name);
if (check_refname_format(name, REFNAME_ALLOW_ONELEVEL))
die("Branch name doesn't confo... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 79,383,983,959,069,510,000,000,000,000,000,000,000 | 22 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
void Magick::Image::composite(const Image &compositeImage_,
const Geometry &offset_,const CompositeOperator compose_)
{
size_t
height=rows(),
width=columns();
ssize_t
x=offset_.xOff(),
y=offset_.yOff();
ParseMetaGeometry(static_cast<std::string>(offset_).c_str(),&x,&y,&width,
&height);
... | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 240,199,274,576,094,200,000,000,000,000,000,000,000 | 20 | Added missing return to avoid use after free. |
static int latm_decode_frame(AVCodecContext *avctx, void *out,
int *got_frame_ptr, AVPacket *avpkt)
{
struct LATMContext *latmctx = avctx->priv_data;
int muxlength, err;
GetBitContext gb;
if ((err = init_get_bits8(&gb, avpkt->data, avpkt->size)) < 0)
... | 0 | [
"CWE-703"
] | FFmpeg | 6e42ccb9dbc13836cd52cda594f819d17af9afa2 | 193,838,863,138,735,980,000,000,000,000,000,000,000 | 50 | avcodec/aacdec: Fix pulse position checks in decode_pulses()
Fixes out of array read
Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void print_string(RBinString *string, RBinFile *bf) {
if (!string || !bf) {
return;
}
int mode = bf->strmode;
ut64 addr , vaddr;
RBin *bin = bf->rbin;
const char *section_name, *type_string;
RIO *io = bin->iob.io;
if (!io) {
return;
}
RBinSection *s = r_bin_get_section_at (bf->o, string->paddr, fal... | 0 | [
"CWE-125"
] | radare2 | 3fcf41ed96ffa25b38029449520c8d0a198745f3 | 29,301,961,732,716,100,000,000,000,000,000,000,000 | 56 | Fix #9902 - Fix oobread in RBin.string_scan_range |
SecureElementStatus_t SecureElementRandomNumber( uint32_t* randomNum )
{
if( randomNum == NULL )
{
return SECURE_ELEMENT_ERROR_NPE;
}
*randomNum = LR1110SeHalGetRandomNumber( );
return SECURE_ELEMENT_SUCCESS;
} | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 232,334,399,119,032,750,000,000,000,000,000,000,000 | 9 | Added received buffer size checks. |
static int jpc_poc_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_poc_t *poc = &ms->parms.poc;
jpc_pocpchg_t *pchg;
int pchgno;
for (pchgno = 0, pchg = poc->pchgs; pchgno < poc->numpchgs;
++pchgno, ++pchg) {
fprintf(out, "po[%d] = %d; ", pchgno, pchg->prgord);
fprintf(out, "cs[%d] = %"PRIuFAST16"; ce[%d] = %"PRIuF... | 0 | [
"CWE-20",
"CWE-399"
] | jasper | ba2b9d000660313af7b692542afbd374c5685865 | 32,726,537,000,045,330,000,000,000,000,000,000,000 | 16 | Ensure that not all tiles lie outside the image area. |
void luaD_reallocstack (lua_State *L, int newsize) {
TValue *oldstack = L->stack;
int realsize = newsize + 1 + EXTRA_STACK;
lua_assert(L->stack_last - L->stack == L->stacksize - EXTRA_STACK - 1);
luaM_reallocvector(L, L->stack, L->stacksize, realsize, TValue);
L->stacksize = realsize;
L->stack_last = L->sta... | 0 | [
"CWE-200",
"CWE-17"
] | redis | fdf9d455098f54f7666c702ae464e6ea21e25411 | 45,673,689,230,008,605,000,000,000,000,000,000,000 | 9 | disable loading lua bytecode |
long uwsgi_num_from_file(char *filename, int quiet) {
char buf[16];
ssize_t len;
int fd = open(filename, O_RDONLY);
if (fd < 0) {
if (!quiet)
uwsgi_error_open(filename);
return -1L;
}
len = read(fd, buf, sizeof(buf));
if (len == 0) {
if (!quiet)
uwsgi_log("read error %s\n", filename);
close(fd);
... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 130,635,342,719,481,340,000,000,000,000,000,000,000 | 19 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
ssize_t device_show_int(struct device *dev,
struct device_attribute *attr,
char *buf)
{
struct dev_ext_attribute *ea = to_ext_attr(attr);
return snprintf(buf, PAGE_SIZE, "%d\n", *(int *)(ea->var));
} | 1 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 111,109,861,711,396,790,000,000,000,000,000,000,000 | 8 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
hfs_attr_walk_lzvn_rsrc(const TSK_FS_ATTR * fs_attr,
int flags, TSK_FS_FILE_WALK_CB a_action, void *ptr)
{
return hfs_attr_walk_compressed_rsrc(
fs_attr, flags, a_action, ptr,
hfs_read_lzvn_block_table,
hfs_decompress_lzvn_block
);
} | 0 | [
"CWE-190",
"CWE-284"
] | sleuthkit | 114cd3d0aac8bd1aeaf4b33840feb0163d342d5b | 337,109,439,089,193,900,000,000,000,000,000,000,000 | 9 | hfs: fix keylen check in hfs_cat_traverse()
If key->key_len is 65535, calculating "uint16_t keylen' would
cause an overflow:
uint16_t keylen;
...
keylen = 2 + tsk_getu16(hfs->fs_info.endian, key->key_len)
so the code bypasses the sanity check "if (keylen > nodesize)"
which results in crash later:
./too... |
void SplashOutputDev::setFreeTypeHinting(bool enable, bool enableSlightHintingA)
{
enableFreeTypeHinting = enable;
enableSlightHinting = enableSlightHintingA;
} | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 31,258,739,383,825,000,000,000,000,000,000,000,000 | 5 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
static int open_terminal_as(const char *path, int flags, int nfd) {
int fd;
assert(path);
assert(nfd >= 0);
fd = open_terminal(path, flags | O_NOCTTY);
if (fd < 0)
return fd;
return move_fd(fd, nfd, false);
} | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 111,041,609,139,820,900,000,000,000,000,000,000,000 | 12 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
explicit MklRequantizationRangePerChannelOp(OpKernelConstruction* ctx)
: OpKernel(ctx) {
OP_REQUIRES_OK(ctx, ctx->GetAttr("clip_value_max", &clip_value_max_));
} | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | 9e62869465573cb2d9b5053f1fa02a81fce21d69 | 310,359,577,947,793,100,000,000,000,000,000,000,000 | 4 | Add more validation to `RequantizationRangePerChannel`.
PiperOrigin-RevId: 387693946
Change-Id: Ife8dcbdb021bec4787eef6a4361dd08f17c14bd6 |
hash_symbol_hasher (void const *m, size_t tablesize)
{
return hash_symbol (m, tablesize);
} | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 7,311,306,537,517,402,000,000,000,000,000,000,000 | 4 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
static void __init perf_event_init_all_cpus(void)
{
struct swevent_htable *swhash;
int cpu;
for_each_possible_cpu(cpu) {
swhash = &per_cpu(swevent_htable, cpu);
mutex_init(&swhash->hlist_mutex);
INIT_LIST_HEAD(&per_cpu(active_ctx_list, cpu));
INIT_LIST_HEAD(&per_cpu(pmu_sb_events.list, cpu));
raw_spin_lo... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 142,855,675,747,150,300,000,000,000,000,000,000,000 | 16 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
gdImagePtr gdImageCreateFromGd2Part (FILE * inFile, int srcx, int srcy, int w, int h)
{
gdImagePtr im;
gdIOCtx *in = gdNewFileCtx(inFile);
im = gdImageCreateFromGd2PartCtx(in, srcx, srcy, w, h);
in->gd_free(in);
return im;
} | 0 | [
"CWE-190"
] | php-src | 7722455726bec8c53458a32851d2a87982cf0eac | 258,857,977,005,004,480,000,000,000,000,000,000,000 | 11 | Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow |
static int tweak_reset_device_cmd(struct urb *urb)
{
struct stub_priv *priv = (struct stub_priv *) urb->context;
struct stub_device *sdev = priv->sdev;
dev_info(&urb->dev->dev, "usb_queue_reset_device\n");
if (usb_lock_device_for_reset(sdev->udev, NULL) < 0) {
dev_err(&urb->dev->dev, "could not obtain lock to r... | 0 | [
"CWE-125"
] | linux | 635f545a7e8be7596b9b2b6a43cab6bbd5a88e43 | 70,607,797,456,435,120,000,000,000,000,000,000,000 | 16 | usbip: fix stub_rx: get_pipe() to validate endpoint number
get_pipe() routine doesn't validate the input endpoint number
and uses to reference ep_in and ep_out arrays. Invalid endpoint
number can trigger BUG(). Range check the epnum and returning
error instead of calling BUG().
Change caller stub_recv_cmd_submit() to... |
static struct htc_packet *ar6000_alloc_amsdu_rxbuf(void *Context, HTC_ENDPOINT_ID Endpoint, int Length)
{
struct htc_packet *pPacket = NULL;
struct ar6_softc *ar = (struct ar6_softc *)Context;
int refillCount = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_WLAN_RX,("ar6000_alloc_amsdu_rxbuf: eid=%d, Length:%d... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 130,551,941,871,941,510,000,000,000,000,000,000,000 | 42 | 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... |
}
GF_Err jp2h_box_read(GF_Box *s,GF_BitStream *bs)
{
return gf_isom_box_array_read_ex(s, bs, s->type); | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 126,182,910,211,088,520,000,000,000,000,000,000,000 | 4 | fixed #1757 |
int dsdb_search_dn(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_result **_result,
struct ldb_dn *basedn,
const char * const *attrs,
uint32_t dsdb_flags)
{
int ret;
struct ldb_request *req;
struct ldb_result *res;
res = talloc_zero(mem_ctx, struct ldb_result);
if (!res) {
ret... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 252,510,073,441,422,730,000,000,000,000,000,000,000 | 50 | 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... |
static int handle_task_switch(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
unsigned long exit_qualification;
bool has_error_code = false;
u32 error_code = 0;
u16 tss_selector;
int reason, type, idt_v, idt_index;
idt_v = (vmx->idt_vectoring_info & VECTORING_INFO_VALID_MASK);
idt_index = (vmx->i... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 181,339,817,915,325,520,000,000,000,000,000,000,000 | 56 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
Item_sum_num::val_str(String *str)
{
return val_string_from_real(str);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 20,618,437,235,898,471,000,000,000,000,000,000,000 | 4 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static int sctp_wait_for_connect(struct sctp_association *asoc, long *timeo_p)
{
struct sock *sk = asoc->base.sk;
int err = 0;
long current_timeo = *timeo_p;
DEFINE_WAIT(wait);
pr_debug("%s: asoc:%p, timeo:%ld\n", __func__, asoc, *timeo_p);
/* Increment the association's refcnt. */
sctp_association_hold(asoc)... | 0 | [
"CWE-617",
"CWE-362"
] | linux | 2dcab598484185dea7ec22219c76dcdd59e3cb90 | 2,616,329,023,682,935,800,000,000,000,000,000,000 | 61 | sctp: avoid BUG_ON on sctp_wait_for_sndbuf
Alexander Popov reported that an application may trigger a BUG_ON in
sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is
waiting on it to queue more data and meanwhile another thread peels off
the association being used by the first thread.
This patch replaces ... |
GBool isMonochrome() { return mono; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 155,194,450,641,232,120,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
handle_smtp_call(int *listen_sockets, int listen_socket_count,
int accept_socket, struct sockaddr *accepted)
{
pid_t pid;
union sockaddr_46 interface_sockaddr;
EXIM_SOCKLEN_T ifsize = sizeof(interface_sockaddr);
int dup_accept_socket = -1;
int max_for_this_host = 0;
int wfsize = 0;
int wfptr = 0;
int use_log_write_se... | 0 | [
"CWE-264"
] | exim | fa32850be0d9e605da1b33305c122f7a59a24650 | 143,120,496,801,838,040,000,000,000,000,000,000,000 | 603 | Set FD_CLOEXEC on SMTP sockets after forking to handle the connection. |
compress_task_thread_func (GTask *task,
gpointer source_object,
gpointer task_data,
GCancellable *cancellable)
{
CompressJob *compress_job = task_data;
SourceInfo source_info;
g_autoptr (AutoarCompressor) compr... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 118,389,669,023,713,770,000,000,000,000,000,000,000 | 50 | 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 void adu_delete(struct adu_device *dev)
{
/* free data structures */
usb_free_urb(dev->interrupt_in_urb);
usb_free_urb(dev->interrupt_out_urb);
kfree(dev->read_buffer_primary);
kfree(dev->read_buffer_secondary);
kfree(dev->interrupt_in_buffer);
kfree(dev->interrupt_out_buffer);
kfree(dev);
} | 0 | [
"CWE-416"
] | linux | 44efc269db7929f6275a1fa927ef082e533ecde0 | 31,391,334,391,722,306,000,000,000,000,000,000,000 | 11 | USB: adutux: fix use-after-free on disconnect
The driver was clearing its struct usb_device pointer, which it used as
an inverted disconnected flag, before deregistering the character device
and without serialising against racing release().
This could lead to a use-after-free if a racing release() callback
observes t... |
bool DL_Dxf::processDXFGroup(DL_CreationInterface* creationInterface,
int groupCode, const std::string& groupValue) {
//printf("%d\n", groupCode);
//printf("%s\n", groupValue.c_str());
// Init values on first call
if (firstCall) {
settingValue[0] = '\0';
fi... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 278,530,404,780,791,900,000,000,000,000,000,000,000 | 419 | check vertexIndex which might be -1 for broken DXF |
ebb_ews_migrate_data_cb (ECache *cache,
const gchar *uid,
const gchar *revision,
const gchar *object,
EOfflineState offline_state,
gint ncols,
const gchar *column_names[],
const gchar *column_values[],
gchar **out_revision,
gchar **out_object,
EOfflineState *out_offline_state,
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 251,612,069,548,182,200,000,000,000,000,000,000,000 | 47 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static _Bool check_send_notify_okay(const notification_t *n) /* {{{ */
{
static c_complain_t complain_forwarding = C_COMPLAIN_INIT_STATIC;
_Bool received = 0;
if (n->meta == NULL)
return (1);
received = check_notify_received(n);
if (network_config_forward && received) {
c_complain_once(
LOG... | 0 | [
"CWE-835"
] | collectd | f6be4f9b49b949b379326c3d7002476e6ce4f211 | 338,442,644,624,005,730,000,000,000,000,000,000,000 | 24 | network plugin: Fix endless loop DOS in parse_packet()
When correct 'Signature part' is received by Collectd, configured without
AuthFile option, condition for endless loop occurs due to missing increase
of pointer to next unprocessed part.
This is a forward-port of #2233.
Fixes: CVE-2017-7401
Closes: #2174
Signed-o... |
cdataSectionProcessor(XML_Parser parser,
const char *start,
const char *end,
const char **endPtr)
{
enum XML_Error result = doCdataSection(parser, encoding, &start, end,
endPtr, (XML_Bool)!ps_finalBuffer);
if ... | 0 | [
"CWE-119"
] | libexpat | ba0f9c3b40c264b8dd392e02a7a060a8fa54f032 | 123,521,404,190,135,790,000,000,000,000,000,000,000 | 21 | CVE-2015-1283 Sanity check size calculations. r=peterv, a=abillings
https://sourceforge.net/p/expat/bugs/528/ |
ssize_t enc_untrusted_recvmsg(int sockfd, struct msghdr *msg, int flags) {
size_t total_buffer_size = CalculateTotalMessageSize(msg);
MessageWriter input;
input.Push(sockfd);
input.Push<uint64_t>(msg->msg_namelen);
input.Push<uint64_t>(total_buffer_size);
input.Push<uint64_t>(msg->msg_controllen);
input.... | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 149,711,920,913,208,340,000,000,000,000,000,000,000 | 62 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
void gf_bs_rewind_bits(GF_BitStream *bs, u64 nbBits)
{
u64 nbBytes;
if (bs->bsmode != GF_BITSTREAM_READ) return;
nbBits -= (bs->nbBits);
nbBytes = (nbBits+8)>>3;
nbBits = nbBytes*8 - nbBits;
gf_bs_align(bs);
assert(bs->position >= nbBytes);
bs->position -= nbBytes + 1;
gf_bs_read_int(bs, (u32)nbBits);
return... | 0 | [
"CWE-617",
"CWE-703"
] | gpac | 9ea93a2ec8f555ceed1ee27294cf94822f14f10f | 274,185,315,783,210,400,000,000,000,000,000,000,000 | 14 | fixed #2165 |
_zip_dirent_torrent_normalize(struct zip_dirent *de)
{
static struct tm torrenttime;
static time_t last_mod = 0;
if (last_mod == 0) {
#ifdef HAVE_STRUCT_TM_TM_ZONE
time_t now;
struct tm *l;
#endif
torrenttime.tm_sec = 0;
torrenttime.tm_min = 32;
torrenttime.tm_hour = 23;
torrenttime.tm_mday = 24;
t... | 0 | [
"CWE-189"
] | php-src | ef8fc4b53d92fbfcd8ef1abbd6f2f5fe2c4a11e5 | 88,350,240,255,355,720,000,000,000,000,000,000,000 | 49 | Fix bug #69253 - ZIP Integer Overflow leads to writing past heap boundary |
DNSRecordContent::t2namemap_t& DNSRecordContent::getT2Namemap()
{
static DNSRecordContent::t2namemap_t t2namemap;
return t2namemap;
} | 0 | [
"CWE-399"
] | pdns | adb10be102ddd4d2baf7a8adbb5673946fe5e555 | 10,477,178,435,346,730,000,000,000,000,000,000,000 | 5 | fix forward reference-check in getLabelFromContent() |
int vhdx_user_visible_write(BlockDriverState *bs, BDRVVHDXState *s)
{
int ret = 0;
if (s->first_visible_write) {
s->first_visible_write = false;
ret = vhdx_update_headers(bs, s, true, NULL);
}
return ret;
} | 0 | [
"CWE-835"
] | qemu | 1d7678dec4761acdc43439da6ceda41a703ba1a6 | 137,255,781,588,336,480,000,000,000,000,000,000,000 | 9 | vhdx: Bounds checking for block_size and logical_sector_size (CVE-2014-0148)
Other variables (e.g. sectors_per_block) are calculated using these
variables, and if not range-checked illegal values could be obtained
causing infinite loops and other potential issues when calculating
BAT entries.
The 1.00 VHDX spec requi... |
static ssize_t loop_attr_dio_show(struct loop_device *lo, char *buf)
{
int dio = (lo->lo_flags & LO_FLAGS_DIRECT_IO);
return sprintf(buf, "%s\n", dio ? "1" : "0");
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 128,165,977,697,846,260,000,000,000,000,000,000,000 | 6 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
int32_t cli_bcapi_pdf_getobjflags(struct cli_bc_ctx *ctx , int32_t objidx)
{
if (!ctx->pdf_phase ||
objidx >= ctx->pdf_nobjs)
return -1;
return ctx->pdf_objs[objidx].flags;
} | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 9,955,764,656,960,332,000,000,000,000,000,000,000 | 7 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
struct sk_buff *sock_dequeue_err_skb(struct sock *sk)
{
struct sk_buff_head *q = &sk->sk_error_queue;
struct sk_buff *skb, *skb_next = NULL;
bool icmp_next = false;
unsigned long flags;
spin_lock_irqsave(&q->lock, flags);
skb = __skb_dequeue(q);
if (skb && (skb_next = skb_peek(q))) {
icmp_next = is_icmp_err_... | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 104,272,252,011,267,330,000,000,000,000,000,000,000 | 24 | 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... |
ha_rows ha_maria::multi_range_read_info_const(uint keyno, RANGE_SEQ_IF *seq,
void *seq_init_param,
uint n_ranges, uint *bufsz,
uint *flags, Cost_estimate *cost)
{
/*
This ca... | 0 | [
"CWE-400"
] | server | 9e39d0ae44595dbd1570805d97c9c874778a6be8 | 22,900,524,682,868,196,000,000,000,000,000,000,000 | 14 | MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields
fix a debug assert to account for not opened temp tables |
com_connect(String *buffer, char *line)
{
char *tmp, buff[256];
bool save_rehash= opt_rehash;
int error;
memset(buff, 0, sizeof(buff));
if (buffer)
{
/*
Two null bytes are needed in the end of buff to allow
get_arg to find end of string the second time it's called.
*/
tmp= strmake(b... | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 313,112,639,080,019,100,000,000,000,000,000,000,000 | 51 | 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) |
equal_celattr(cellattr_T *a, cellattr_T *b)
{
/* Comparing the colors should be sufficient. */
return a->fg.red == b->fg.red
&& a->fg.green == b->fg.green
&& a->fg.blue == b->fg.blue
&& a->bg.red == b->bg.red
&& a->bg.green == b->bg.green
&& a->bg.blue == b->bg.blue;
} | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 285,192,763,525,715,170,000,000,000,000,000,000,000 | 10 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos,
int write)
{
struct page *page;
int ret;
unsigned int gup_flags = FOLL_FORCE;
#ifdef CONFIG_STACK_GROWSUP
if (write) {
ret = expand_downwards(bprm->vma, pos);
if (ret < 0)
return NULL;
}
#endif
if (write)
gup_flags |= FOLL... | 0 | [] | linux | 98da7d08850fb8bdeb395d6368ed15753304aa0c | 236,138,716,088,502,800,000,000,000,000,000,000,000 | 76 | fs/exec.c: account for argv/envp pointers
When limiting the argv/envp strings during exec to 1/4 of the stack limit,
the storage of the pointers to the strings was not included. This means
that an exec with huge numbers of tiny strings could eat 1/4 of the stack
limit in strings and then additional space would be lat... |
SYSCALL_DEFINE3(osf_fstatfs, unsigned long, fd,
struct osf_statfs __user *, buffer, unsigned long, bufsiz)
{
struct kstatfs linux_stat;
int error = fd_statfs(fd, &linux_stat);
if (!error)
error = linux_to_osf_statfs(&linux_stat, buffer, bufsiz);
return error;
} | 0 | [
"CWE-703",
"CWE-264",
"CWE-189"
] | linux | 21c5977a836e399fc710ff2c5367845ed5c2527f | 137,638,353,746,097,100,000,000,000,000,000,000,000 | 9 | alpha: fix several security issues
Fix several security issues in Alpha-specific syscalls. Untested, but
mostly trivial.
1. Signedness issue in osf_getdomainname allows copying out-of-bounds
kernel memory to userland.
2. Signedness issue in osf_sysinfo allows copying large amounts of
kernel memory to userland.
3. ... |
void skb_add_mtu(int mtu)
{
/* Must match allocation in alloc_skb */
mtu = SKB_DATA_ALIGN(mtu) + sizeof(struct skb_shared_info);
kmem_add_cache_size(mtu);
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 738,349,746,638,364,600,000,000,000,000,000,000 | 7 | [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... |
asmlinkage long compat_sys_recv(int fd, void __user *buf, size_t len, unsigned int flags)
{
return sys_recv(fd, buf, len, flags | MSG_CMSG_COMPAT);
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 171,927,215,098,584,900,000,000,000,000,000,000,000 | 4 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static void Ins_MDRP( INS_ARG )
{
Int point;
TT_F26Dot6 distance,
org_dist;
point = (Int)args[0];
if ( BOUNDS( args[0], CUR.zp1.n_points ) ||
BOUNDS( CUR.GS.rp0, CUR.zp0.n_points) )
{
/* Current version of FreeType silently ignores this out of bounds ... | 0 | [
"CWE-125"
] | ghostpdl | 7755e67116e8973ee0e3b22d653df026a84fa01b | 151,931,871,162,641,490,000,000,000,000,000,000,000 | 76 | Bug 698055: bounds check zone pointer in Ins_MDRP |
void wait_for_unix_gc(void)
{
/* If number of inflight sockets is insane,
* force a garbage collect right now.
*/
if (unix_tot_inflight > UNIX_INFLIGHT_TRIGGER_GC && !gc_in_progress)
unix_gc();
wait_event(unix_gc_wait, gc_in_progress == false);
} | 0 | [] | net | 712f4aad406bb1ed67f3f98d04c044191f0ff593 | 162,808,036,453,621,090,000,000,000,000,000,000,000 | 9 | unix: properly account for FDs passed over unix sockets
It is possible for a process to allocate and accumulate far more FDs than
the process' limit by sending them over a unix socket then closing them
to keep the process' fd count low.
This change addresses this problem by keeping track of the number of FDs
in fligh... |
curl_socket_t grab_socket_opensocket_cb(void *clientp, __maybe_unused curlsocktype purpose, struct curl_sockaddr *addr)
{
struct pool *pool = clientp;
curl_socket_t sck = socket(addr->family, addr->socktype, addr->protocol);
pool->sock = sck;
return sck;
} | 0 | [
"CWE-119",
"CWE-787"
] | bfgminer | c80ad8548251eb0e15329fc240c89070640c9d79 | 283,125,833,169,080,370,000,000,000,000,000,000,000 | 7 | Stratum: extract_sockaddr: Truncate overlong addresses rather than stack overflow
Thanks to Mick Ayzenberg <mick@dejavusecurity.com> for finding this! |
TEST_METHOD(6) {
// If there are no existing generations, newGeneration() creates a new
// generation directory with number 0.
ServerInstanceDir dir(parentDir + "/passenger-test.1234");
unsigned int ncontents = listDir(dir.getPath()).size();
ServerInstanceDir::GenerationPtr generation = dir.newGeneration(tru... | 0 | [
"CWE-59",
"CWE-61"
] | passenger | 5483b3292cc2af1c83033eaaadec20dba4dcfd9b | 151,264,801,966,278,040,000,000,000,000,000,000,000 | 12 | If the server instance directory already exists, it is now removed first in order get correct directory permissions.
If the directory still exists after removal, Phusion Passenger aborts to avoid writing to a directory with unexpected permissions.
Fixes issue #910. |
void FS_Remove( const char *osPath ) {
FS_CheckFilenameIsMutable( osPath, __func__ );
remove( osPath );
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 152,337,733,211,650,040,000,000,000,000,000,000,000 | 5 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
static inline void write_io_word(Encoder *encoder)
{
if (G_UNLIKELY(encoder->io_now == encoder->io_end)) {
more_io_words(encoder);
}
*(encoder->io_now++) = GUINT32_TO_LE(encoder->io_word);
} | 0 | [] | spice-common | 762e0abae36033ccde658fd52d3235887b60862d | 53,233,426,970,805,820,000,000,000,000,000,000,000 | 7 | quic: Check we have some data to start decoding quic image
All paths already pass some data to quic_decode_begin but for the
test check it, it's not that expensive test.
Checking for not 0 is enough, all other words will potentially be
read calling more_io_words but we need one to avoid a potential
initial buffer over... |
void ext4_abort(struct super_block *sb, const char *function,
const char *fmt, ...)
{
va_list args;
printk(KERN_CRIT "ext4_abort called.\n");
va_start(args, fmt);
printk(KERN_CRIT "EXT4-fs error (device %s): %s: ", sb->s_id, function);
vprintk(fmt, args);
printk("\n");
va_end(args);
if (test_opt(sb, ERRORS... | 0 | [
"CWE-20"
] | linux-2.6 | 4ec110281379826c5cf6ed14735e47027c3c5765 | 38,591,902,033,864,900,000,000,000,000,000,000,000 | 26 | ext4: Add sanity checks for the superblock before mounting the filesystem
This avoids insane superblock configurations that could lead to kernel
oops due to null pointer derefences.
http://bugzilla.kernel.org/show_bug.cgi?id=12371
Thanks to David Maciejak at Fortinet's FortiGuard Global Security
Research Team who di... |
static void sctp_generate_t1_cookie_event(unsigned long data)
{
struct sctp_association *asoc = (struct sctp_association *) data;
sctp_generate_timeout_event(asoc, SCTP_EVENT_TIMEOUT_T1_COOKIE);
} | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 103,820,816,297,490,670,000,000,000,000,000,000,000 | 5 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
static void handle_LIST(ctrl_t *ctrl, char *arg)
{
list(ctrl, arg, 0);
} | 0 | [
"CWE-120",
"CWE-787"
] | uftpd | 0fb2c031ce0ace07cc19cd2cb2143c4b5a63c9dd | 302,883,484,814,457,000,000,000,000,000,000,000,000 | 4 | FTP: Fix buffer overflow in PORT parser, reported by Aaron Esau
Signed-off-by: Joachim Nilsson <troglobit@gmail.com> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.