func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
wc_is_ucs_wide(wc_uint32 ucs)
{
if (ucs <= WC_C_UCS2_END)
return (wc_map_range_search((wc_uint16)ucs,
ucs_wide_map, N_ucs_wide_map) != NULL);
else
return ((ucs & ~0xFFFF) == WC_C_UCS4_PLANE2 ||
(ucs & ~0xFFFF) == WC_C_UCS4_PLANE3);
} | 0 | [
"CWE-119"
] | w3m | 716bc126638393c733399d11d3228edb82877faa | 34,320,378,940,162,080,000,000,000,000,000,000,000 | 9 | Prevent global-buffer-overflow in wc_any_to_ucs()
Bug-Debian: https://github.com/tats/w3m/issues/43 |
add_dir_tree_columns (FrWindow *window,
GtkTreeView *treeview)
{
GtkCellRenderer *renderer;
GtkTreeViewColumn *column;
GValue value = { 0, };
/* First column. */
column = gtk_tree_view_column_new ();
gtk_tree_view_column_set_title (column, _("Folders"));
/* icon */
renderer = gtk_ce... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 192,572,578,378,142,100,000,000,000,000,000,000,000 | 42 | libarchive: sanitize filenames before extracting |
rdpdr_abort_io(uint32 fd, uint32 major, RD_NTSTATUS status)
{
uint32 result;
struct async_iorequest *iorq;
struct async_iorequest *prev;
iorq = g_iorequest;
prev = NULL;
while (iorq != NULL)
{
/* Only remove from table when major is not set, or when correct major is supplied.
Abort read should not abort ... | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 4,401,150,362,977,691,000,000,000,000,000,000,000 | 28 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
h2_connectionerror(uint32_t u)
{
if (u < NCONNERRORS && conn_errors[u] != NULL)
return (conn_errors[u]);
else
return (H2NN_ERROR);
} | 0 | [
"CWE-444"
] | varnish-cache | d4c67d2a1a05304598895c24663c58a2e2932708 | 135,215,679,418,046,120,000,000,000,000,000,000,000 | 7 | Take content length into account on H/2 request bodies
When receiving H/2 data frames, make sure to take the advertised content
length into account, and fail appropriately if the combined sum of the
data frames does not match the content length. |
static void __clear_buddies_skip(struct sched_entity *se)
{
for_each_sched_entity(se) {
struct cfs_rq *cfs_rq = cfs_rq_of(se);
if (cfs_rq->skip != se)
break;
cfs_rq->skip = NULL;
}
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 227,290,584,494,759,820,000,000,000,000,000,000,000 | 10 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
unsigned int zipRawEntryLength(unsigned char *p) {
unsigned int prevlensize, encoding, lensize, len;
ZIP_DECODE_PREVLENSIZE(p, prevlensize);
ZIP_DECODE_LENGTH(p + prevlensize, encoding, lensize, len);
return prevlensize + lensize + len;
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 137,288,882,984,725,150,000,000,000,000,000,000,000 | 6 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
AP_DECLARE(void) ap_random_insecure_bytes(void *buf, apr_size_t size)
{
#if APR_HAS_THREADS
if (rng_mutex)
apr_thread_mutex_lock(rng_mutex);
#endif
/* apr_random_insecure_bytes can only fail with APR_ENOTENOUGHENTROPY,
* and we have ruled that out during initialization. Therefore we don't
* ne... | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 167,797,837,085,704,380,000,000,000,000,000,000,000 | 16 | core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7... |
static void sysvipc_proc_stop(struct seq_file *s, void *it)
{
struct kern_ipc_perm *ipc = it;
struct ipc_proc_iter *iter = s->private;
struct ipc_proc_iface *iface = iter->iface;
struct ipc_ids *ids;
/* If we had a locked structure, release it */
if (ipc && ipc != SEQ_START_TOKEN)
ipc_unlock(ipc);
ids = &ite... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 6062a8dc0517bce23e3c2f7d2fea5e22411269a3 | 240,897,946,055,893,370,000,000,000,000,000,000,000 | 15 | 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... |
static void ctx_flush_and_put(struct io_ring_ctx *ctx)
{
if (!ctx)
return;
if (ctx->submit_state.comp.nr) {
mutex_lock(&ctx->uring_lock);
io_submit_flush_completions(ctx);
mutex_unlock(&ctx->uring_lock);
}
percpu_ref_put(&ctx->refs);
} | 0 | [
"CWE-125"
] | linux | 89c2b3b74918200e46699338d7bcc19b1ea12110 | 251,916,444,205,633,040,000,000,000,000,000,000,000 | 11 | io_uring: reexpand under-reexpanded iters
[ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900
[ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task
syz-executor.0/828
[ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted
5.14.0-rc3-next-20210730 #1
[ 74.216525] Hardware n... |
static int ZEND_FASTCALL ZEND_FETCH_W_SPEC_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
return zend_fetch_var_address_helper_SPEC_CONST(BP_VAR_W, ZEND_OPCODE_HANDLER_ARGS_PASSTHRU);
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 114,336,803,478,539,100,000,000,000,000,000,000,000 | 4 | - 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 |
decompileArithmeticOp(int n, SWF_ACTION *actions, int maxn)
{
struct SWF_ACTIONPUSHPARAM *left, *right;
int op_l = OpCode(actions, n, maxn);
int op_r = OpCode(actions, n+1, maxn);
right=pop();
left=pop();
switch(OpCode(actions, n, maxn))
{
/*
case SWFACTION_GETMEMBER:
decompilePUSHPARAM(peek(),0);
break;
... | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 140,997,962,705,556,570,000,000,000,000,000,000,000 | 188 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
static int selinux_kernel_module_from_file(struct file *file)
{
struct common_audit_data ad;
struct inode_security_struct *isec;
struct file_security_struct *fsec;
u32 sid = current_sid();
int rc;
/* init_module */
if (file == NULL)
return avc_has_perm(sid, sid, SECCLASS_SYSTEM,
SYSTEM__MODULE_LOAD, NULL... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 259,370,826,011,398,650,000,000,000,000,000,000,000 | 29 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
ALWAYS_INLINE void ScalarMulAdd3Way(const float a1, const float a2,
const float a3, const bfloat16** inp1,
const bfloat16** inp2,
const bfloat16** inp3, float** out) {
float inp1_f = ConvertBfloat16ToFloat(*inp... | 0 | [
"CWE-125"
] | tensorflow | e6cf28c72ba2eb949ca950d834dd6d66bb01cfae | 157,658,808,036,035,930,000,000,000,000,000,000,000 | 13 | Validate that matrix dimension sizes in SparseMatMul are positive.
PiperOrigin-RevId: 401149683
Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d |
void ZrtpQueue::goClearOk() { } | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 211,448,653,804,086,980,000,000,000,000,000,000,000 | 1 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
void CompressTest::testDirectory()
{
std::ofstream out("pocobin.zip", std::ios::binary);
Poco::File aFile("some/");
if (aFile.exists())
aFile.remove(true);
Poco::File aDir("some/recursive/dir/");
aDir.createDirectories();
Poco::File aDir2("some/other/recursive/dir/");
aDir2.createDirectories();
Poco::File aF(... | 1 | [
"CWE-22"
] | poco | bb7e5feece68ccfd8660caee93da25c5c39a4707 | 92,990,799,871,660,610,000,000,000,000,000,000,000 | 22 | merge zip entry absolute path vulnerability fix (#1968) from develop |
void QueryParams::parse_url(const char* url)
{
UrlParser p(*this);
while (*url)
{
p.parse(*url);
++url;
}
p.finish();
} | 0 | [
"CWE-399"
] | cxxtools | 142bb2589dc184709857c08c1e10570947c444e3 | 160,492,678,993,056,100,000,000,000,000,000,000,000 | 12 | fix parsing double % in query parameters |
rb_threadUpdateProc(clientData)
ClientData clientData; /* Pointer to integer to set to 1. */
{
struct th_update_param *param = (struct th_update_param *) clientData;
DUMP1("threadUpdateProc is called");
param->done = 1;
rb_thread_wakeup(param->thread);
return;
} | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 182,168,508,356,539,300,000,000,000,000,000,000,000 | 11 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void TIFFSetProfiles(TIFF *tiff,Image *image)
{
const char
*name;
const StringInfo
*profile;
if (image->profiles == (void *) NULL)
return;
ResetImageProfileIterator(image);
for (name=GetNextImageProfile(image); name != (const char *) NULL; )
{
profile=GetImageProfile(image,name);
... | 0 | [
"CWE-125"
] | ImageMagick | 803bc34ebe023f209f745baf8a112610ff77cc8c | 163,319,833,396,385,980,000,000,000,000,000,000,000 | 62 | Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team) |
INST_HANDLER (mov) { // MOV Rd, Rr
int d = ((buf[1] << 4) & 0x10) | ((buf[0] >> 4) & 0x0f);
int r = ((buf[1] << 3) & 0x10) | (buf[0] & 0x0f);
ESIL_A ("r%d,r%d,=,", r, d);
} | 0 | [
"CWE-125"
] | radare2 | 041e53cab7ca33481ae45ecd65ad596976d78e68 | 76,357,867,757,808,800,000,000,000,000,000,000,000 | 5 | Fix crash in anal.avr |
Returns the difference between two DateTime objects.
*/
PHP_FUNCTION(date_diff)
{
zval *object1, *object2;
php_date_obj *dateobj1, *dateobj2;
php_interval_obj *interval;
long absolute = 0;
if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OO|l", &object1, date_ce_interfac... | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 294,458,778,825,996,800,000,000,000,000,000,000,000 | 25 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
static int _crypt_load_luks(struct crypt_device *cd, const char *requested_type,
int require_header, int repair)
{
char *cipher_spec;
struct luks_phdr hdr = {};
int r, version;
r = init_crypto(cd);
if (r < 0)
return r;
/* This will return 0 if primary LUKS2 header is damaged */
version = LUKS2_hdr_ver... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 115,738,382,680,387,760,000,000,000,000,000,000,000 | 88 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
DEFUN (no_neighbor_send_community,
no_neighbor_send_community_cmd,
NO_NEIGHBOR_CMD2 "send-community",
NO_STR
NEIGHBOR_STR
NEIGHBOR_ADDR_STR2
"Send Community attribute to this neighbor\n")
{
return peer_af_flag_unset_vty (vty, argv[0], bgp_node_afi (vty),
bgp_node_safi (v... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 207,825,012,883,908,500,000,000,000,000,000,000,000 | 12 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
void encode(bufferlist& bl) const {
ENCODE_START(1, 1, bl);
::encode(tenant, bl);
::encode(id, bl);
ENCODE_FINISH(bl);
} | 0 | [
"CWE-617"
] | ceph | b3118cabb8060a8cc6a01c4e8264cb18e7b1745a | 62,116,080,451,386,120,000,000,000,000,000,000,000 | 6 | rgw: Remove assertions in IAM Policy
A couple of them could be triggered by user input.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com> |
static void bnx2x_sp_task(struct work_struct *work)
{
struct bnx2x *bp = container_of(work, struct bnx2x, sp_task.work);
DP(BNX2X_MSG_SP, "sp task invoked\n");
/* make sure the atomic interrupt_occurred has been written */
smp_rmb();
if (atomic_read(&bp->interrupt_occurred)) {
/* what work needs to be perform... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 267,610,320,779,167,870,000,000,000,000,000,000,000 | 62 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
int check_submodule_name(const char *name)
{
/* Disallow empty names */
if (!*name)
return -1;
/*
* Look for '..' as a path component. Check both '/' and '\\' as
* separators rather than is_dir_sep(), because we want the name rules
* to be consistent across platforms.
*/
goto in_component; /* always star... | 0 | [
"CWE-88"
] | git | f6adec4e329ef0e25e14c63b735a5956dc67b8bc | 1,616,507,527,472,598,200,000,000,000,000,000,000 | 24 | submodule-config: ban submodule urls that start with dash
The previous commit taught the submodule code to invoke our
"git clone $url $path" with a "--" separator so that we
aren't confused by urls or paths that start with dashes.
However, that's just one code path. It's not clear if there
are others, and it would be... |
PHP_HASH_API void PHP_HAVAL128Final(unsigned char *digest, PHP_HAVAL_CTX * context)
{
unsigned char bits[10];
unsigned int index, padLen;
/* Version, Passes, and Digest Length */
bits[0] = (PHP_HASH_HAVAL_VERSION & 0x07) |
((context->passes & 0x07) << 3) |
((context->output & 0x03) << 6);
bits[1] = (conte... | 1 | [] | php-src | 1390a5812b151e0ea8f74e64bfeaa5df4dd5b801 | 252,721,688,951,720,000,000,000,000,000,000,000,000 | 50 | Fix bug #70312 - HAVAL gives wrong hashes in specific cases |
vrrp_print_stats(void)
{
FILE *file;
file = fopen (stats_file, "w");
if (!file) {
log_message(LOG_INFO, "Can't open %s (%d: %s)",
stats_file, errno, strerror(errno));
return;
}
list l = vrrp_data->vrrp;
element e;
vrrp_t *vrrp;
for (e = LIST_HEAD(l); e; ELEMENT_NEXT(e)) {
vrrp = ELEMENT_DATA(e);
f... | 1 | [
"CWE-59",
"CWE-61"
] | keepalived | 04f2d32871bb3b11d7dc024039952f2fe2750306 | 147,005,929,196,811,040,000,000,000,000,000,000,000 | 48 | When opening files for write, ensure they aren't symbolic links
Issue #1048 identified that if, for example, a non privileged user
created a symbolic link from /etc/keepalvied.data to /etc/passwd,
writing to /etc/keepalived.data (which could be invoked via DBus)
would cause /etc/passwd to be overwritten.
This commit ... |
ebews_populate_ims (EBookBackendEws *bbews,
EContact *contact,
EEwsItem *item,
GCancellable *cancellable,
GError **error)
{
/* TODO : The fields returned by server does not match with the EContact fields
* for the IMS, handle it later */
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 155,843,868,886,258,970,000,000,000,000,000,000,000 | 9 | 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 |
MagickExport MagickBooleanType IsHighDynamicRangeImage(const Image *image,
ExceptionInfo *exception)
{
#if !defined(MAGICKCORE_HDRI_SUPPORT)
(void) image;
(void) exception;
return(MagickFalse);
#else
CacheView
*image_view;
MagickBooleanType
status;
MagickPixelPacket
zero;
ssize_t
y;
... | 0 | [
"CWE-665"
] | ImageMagick6 | 27b1c74979ac473a430e266ff6c4b645664bc805 | 94,001,859,359,793,400,000,000,000,000,000,000,000 | 88 | https://github.com/ImageMagick/ImageMagick/issues/1522 |
static int test_gf2m_add(void)
{
BIGNUM *a = NULL, *b = NULL, *c = NULL;
int i, st = 0;
if (!TEST_ptr(a = BN_new())
|| !TEST_ptr(b = BN_new())
|| !TEST_ptr(c = BN_new()))
goto err;
for (i = 0; i < NUM0; i++) {
if (!(TEST_true(BN_rand(a, 512, 0, 0))
... | 0 | [] | openssl | 336923c0c8d705cb8af5216b29a205662db0d590 | 187,163,138,945,493,470,000,000,000,000,000,000,000 | 33 | Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets
bn_sqr_comba8 does for instance compute a wrong result for the value:
a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45
The correct result is:
r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f
9... |
sctp_disposition_t sctp_sf_eat_fwd_tsn_fast(
struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_fwdtsn_hdr *fwdtsn_hdr;
struct sctp_fwdtsn_skip *skip;
__u16 len;
__... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 265,044,174,967,506,300,000,000,000,000,000,000,000 | 66 | 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 int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client,
void __user *arg)
{
int result;
struct snd_seq_queue_tempo tempo;
if (copy_from_user(&tempo, arg, sizeof(tempo)))
return -EFAULT;
result = snd_seq_set_queue_tempo(client->number, &tempo);
return result < 0 ? result : 0;
} | 0 | [
"CWE-703"
] | linux | 030e2c78d3a91dd0d27fef37e91950dde333eba1 | 332,232,989,906,442,000,000,000,000,000,000,000,000 | 12 | ALSA: seq: Fix missing NULL check at remove_events ioctl
snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear()
unconditionally even if there is no FIFO assigned, and this leads to
an Oops due to NULL dereference. The fix is just to add a proper NULL
check.
Reported-by: Dmitry Vyukov <dvyukov@google.com>
Tested-by... |
static void adts_error_check(adts_header *adts, bitfile *ld)
{
if (adts->protection_absent == 0)
{
adts->crc_check = (uint16_t)faad_getbits(ld, 16
DEBUGVAR(1,134,"adts_error_check(): crc_check"));
}
} | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 303,312,364,060,197,070,000,000,000,000,000,000,000 | 8 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
bool ha_partition::can_switch_engines()
{
handler **file;
DBUG_ENTER("ha_partition::can_switch_engines");
file= m_file;
do
{
if (!(*file)->can_switch_engines())
DBUG_RETURN(FALSE);
} while (*(++file));
DBUG_RETURN(TRUE);
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 43,946,393,204,512,940,000,000,000,000,000,000,000 | 13 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
inline void BuildFrom(const T& src_iterable) {
const int dimensions_count =
std::distance(src_iterable.begin(), src_iterable.end());
Resize(dimensions_count);
int32_t* data = DimsData();
for (auto it : src_iterable) {
*data = it;
++data;
}
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 8ee24e7949a203d234489f9da2c5bf45a7d5157d | 188,723,213,691,498,070,000,000,000,000,000,000,000 | 10 | [tflite] Ensure `MatchingDim` does not allow buffer overflow.
We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ... |
static PostorderProcessor* CreateEntryProcessor(Zone* zone,
HBasicBlock* block,
BitVector* visited) {
PostorderProcessor* result = new(zone) PostorderProcessor(NULL);
return result->SetupSuccessors(zone, block,... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 285,516,464,007,596,400,000,000,000,000,000,000,000 | 6 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
show_cclass_range(int lo, int hi)
{
int cclass = CharacterClass(lo);
int ident = (cclass == lo);
int more = 0;
if (ident) {
int ch;
for (ch = lo + 1; ch <= hi; ch++) {
if (CharacterClass(ch) != ch) {
ident = 0;
break;
}
}
if (ident && (hi < 255)) {
ch = hi + 1;
if (CharacterC... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 73,708,167,544,213,510,000,000,000,000,000,000,000 | 36 | snapshot of project "xterm", label xterm-365d |
static void set_dec_mode(VTermState *state, int num, int val)
{
switch(num) {
case 1:
state->mode.cursor = val;
break;
case 5: // DECSCNM - screen mode
settermprop_bool(state, VTERM_PROP_REVERSE, val);
break;
case 6: // DECOM - origin mode
{
VTermPos oldpos = state->pos;
state-... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 233,522,263,666,307,000,000,000,000,000,000,000,000 | 94 | 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. |
cib_remote_dispatch(gpointer user_data)
{
cib_t *cib = user_data;
cib_remote_opaque_t *private = cib->variant_opaque;
xmlNode *msg = NULL;
const char *type = NULL;
crm_info("Message on callback channel");
msg = crm_recv_remote_msg(private->callback.session, private->callback.encrypted);
t... | 1 | [
"CWE-399"
] | pacemaker | 564f7cc2a51dcd2f28ab12a13394f31be5aa3c93 | 9,887,373,107,614,576,000,000,000,000,000,000,000 | 30 | High: core: Internal tls api improvements for reuse with future LRMD tls backend. |
R_API void r_anal_extract_vars(RAnal *anal, RAnalFunction *fcn, RAnalOp *op) {
r_return_if_fail (anal && fcn && op);
const char *BP = anal->reg->name[R_REG_NAME_BP];
if (BP) {
extract_arg (anal, fcn, op, BP, "+", R_ANAL_VAR_KIND_BPV);
extract_arg (anal, fcn, op, BP, "-", R_ANAL_VAR_KIND_BPV);
}
const char *SP... | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 236,141,175,140,337,150,000,000,000,000,000,000,000 | 13 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
static int handle_vmptrld(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
gpa_t vmptr;
if (!nested_vmx_check_permission(vcpu))
return 1;
if (nested_vmx_get_vmptr(vcpu, &vmptr))
return 1;
if (!PAGE_ALIGNED(vmptr) || (vmptr >> cpuid_maxphyaddr(vcpu))) {
nested_vmx_failValid(vcpu, VMXERR_VMPTRL... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 191,677,025,233,158,350,000,000,000,000,000,000,000 | 53 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
set_content_type (int *dt, const char *type)
{
/* If content-type is not given, assume text/html. This is because
of the multitude of broken CGI's that "forget" to generate the
content-type. */
if (!type ||
0 == c_strcasecmp (type, TEXTHTML_S) ||
0 == c_strcasecmp (type, TEXTXHTML_S))
*d... | 0 | [
"CWE-119"
] | wget | d892291fb8ace4c3b734ea5125770989c215df3f | 154,494,187,199,941,270,000,000,000,000,000,000,000 | 18 | Fix stack overflow in HTTP protocol handling (CVE-2017-13089)
* src/http.c (skip_short_body): Return error on negative chunk size
Reported-by: Antti Levomäki, Christian Jalio, Joonas Pihlaja from Forcepoint
Reported-by: Juhani Eronen from Finnish National Cyber Security Centre |
const char *setup_git_directory(void)
{
const char *retval = setup_git_directory_gently(NULL);
/* If the work tree is not the default one, recompute prefix */
if (inside_work_tree < 0) {
static char buffer[PATH_MAX + 1];
char *rel;
if (retval && chdir(retval))
die_errno ("Could not jump back into original ... | 0 | [
"CWE-787"
] | git | 3c9d0414ed2db0167e6c828b547be8fc9f88fccc | 90,509,687,917,085,800,000,000,000,000,000,000,000 | 18 | Check size of path buffer before writing into it
This prevents a buffer overrun that could otherwise be triggered by
creating a file called '.git' with contents
gitdir: (something really long)
Signed-off-by: Greg Brockman <gdb@mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static inline int l2cap_command_rej(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, u8 *data)
{
struct l2cap_cmd_rej *rej = (struct l2cap_cmd_rej *) data;
if (rej->reason != 0x0000)
return 0;
if ((conn->info_state & L2CAP_INFO_FEAT_MASK_REQ_SENT) &&
cmd->ident == conn->info_ident) {
del_timer(&conn->i... | 0 | [
"CWE-200",
"CWE-119",
"CWE-787"
] | linux | f2fcfcd670257236ebf2088bbdf26f6a8ef459fe | 34,934,482,418,338,763,000,000,000,000,000,000,000 | 19 | Bluetooth: Add configuration support for ERTM and Streaming mode
Add support to config_req and config_rsp to configure ERTM and Streaming
mode. If the remote device specifies ERTM or Streaming mode, then the
same mode is proposed. Otherwise ERTM or Basic mode is used. And in case
of a state 2 device, the remote device... |
void ieee80211_sta_reset_conn_monitor(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
if (unlikely(!ifmgd->associated))
return;
if (ifmgd->probe_send_count)
ifmgd->probe_send_count = 0;
if (ieee80211_hw_check(&sdata->local->hw, CONNECTION_MONITOR))
return;
mod_t... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 325,727,456,129,333,420,000,000,000,000,000,000,000 | 16 | mac80211: handle deauthentication/disassociation from TDLS peer
When receiving a deauthentication/disassociation frame from a TDLS
peer, a station should not disconnect the current AP, but only
disable the current TDLS link if it's enabled.
Without this change, a TDLS issue can be reproduced by following the
steps as... |
static void set_encodings(VncState *vs, int32_t *encodings, size_t n_encodings)
{
int i;
unsigned int enc = 0;
vs->features = 0;
vs->vnc_encoding = 0;
vs->tight.compression = 9;
vs->tight.quality = -1; /* Lossless by default */
vs->absolute = -1;
/*
* Start from the end because th... | 1 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 250,316,759,720,200,170,000,000,000,000,000,000,000 | 92 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... |
void CConnectionTransportUDPBase::Received_Data( const uint8 *pPkt, int cbPkt, SteamNetworkingMicroseconds usecNow )
{
if ( cbPkt < sizeof(UDPDataMsgHdr) )
{
ReportBadUDPPacketFromConnectionPeer( "DataPacket", "Packet of size %d is too small.", cbPkt );
return;
}
// Check cookie
const UDPDataMsgHdr *hdr = (c... | 0 | [
"CWE-703"
] | GameNetworkingSockets | d944a10808891d202bb1d5e1998de6e0423af678 | 215,627,719,781,971,800,000,000,000,000,000,000,000 | 113 | Tweak pointer math to avoid possible integer overflow |
piv_cache_internal_data(sc_card_t *card, int enumtag)
{
piv_private_data_t * priv = PIV_DATA(card);
const u8* tag;
const u8* body;
size_t taglen;
size_t bodylen;
int compressed = 0;
/* if already cached */
if (priv->obj_cache[enumtag].internal_obj_data && priv->obj_cache[enumtag].internal_obj_len) {
sc_log(c... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 258,953,690,366,264,260,000,000,000,000,000,000,000 | 94 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
QueueSetMemberHandle_t xQueueSelectFromSetFromISR( QueueSetHandle_t xQueueSet )
{
QueueSetMemberHandle_t xReturn = NULL;
( void ) xQueueReceiveFromISR( ( QueueHandle_t ) xQueueSet, &xReturn, NULL ); /*lint !e961 Casting from one typedef to another is not redundant. */
return xRetur... | 0 | [
"CWE-200",
"CWE-190"
] | FreeRTOS-Kernel | 47338393f1f79558f6144213409f09f81d7c4837 | 229,997,606,226,427,000,000,000,000,000,000,000,000 | 7 | add assert for addition overflow on queue creation (#225) |
static int tpacket_snd(struct packet_sock *po, struct msghdr *msg)
{
struct sk_buff *skb = NULL;
struct net_device *dev;
struct virtio_net_hdr *vnet_hdr = NULL;
struct sockcm_cookie sockc;
__be16 proto;
int err, reserve = 0;
void *ph;
DECLARE_SOCKADDR(struct sockaddr_ll *, saddr, msg->msg_name);
bool need_wait... | 0 | [
"CWE-415"
] | linux | ec6af094ea28f0f2dda1a6a33b14cd57e36a9755 | 49,278,144,705,516,750,000,000,000,000,000,000,000 | 195 | net/packet: rx_owner_map depends on pg_vec
Packet sockets may switch ring versions. Avoid misinterpreting state
between versions, whose fields share a union. rx_owner_map is only
allocated with a packet ring (pg_vec) and both are swapped together.
If pg_vec is NULL, meaning no packet ring was allocated, then neither
w... |
hb_ot_layout_set_ppem (hb_ot_layout_t *layout,
unsigned int x_ppem, unsigned int y_ppem)
{
layout->gpos_info.x_ppem = x_ppem;
layout->gpos_info.y_ppem = y_ppem;
} | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 71,352,894,623,956,050,000,000,000,000,000,000,000 | 6 | [HB] Remove all references to the old code! |
Opal::Call::OnNoAnswerTimeout (PTimer &,
INT)
{
if (!is_outgoing ()) {
if (!forward_uri.empty ()) {
PSafePtr<OpalConnection> connection = get_remote_connection ();
if (connection != NULL)
connection->ForwardCall (forward_uri);
}
else
Clear (OpalCo... | 0 | [] | ekiga | 7d09807257963a4f5168a01aec1795a398746372 | 2,035,541,811,143,157,700,000,000,000,000,000,000 | 15 | Validate UTF-8 strings before showing them
Closes bug #653009. |
static int mk_security_conf(char *confdir)
{
int n;
int ret = 0;
unsigned long len;
char *conf_path = NULL;
char *_net, *_mask;
struct mk_secure_ip_t *new_ip;
struct mk_secure_url_t *new_url;
struct mk_secure_deny_hotlink_t *new_deny_hotlink;
struct mk_config_section *section;
... | 0 | [
"CWE-284",
"CWE-264"
] | monkey | 15f72c1ee5e0afad20232bdf0fcecab8d62a5d89 | 203,476,380,281,039,240,000,000,000,000,000,000,000 | 115 | Mandril: check decoded URI (fix #92)
Signed-off-by: Eduardo Silva <eduardo@monkey.io> |
TEST(LineBasedFrameDecoder, DoubleCarriage) {
auto pipeline = Pipeline<IOBufQueue&, std::unique_ptr<IOBuf>>::create();
int called = 0;
(*pipeline)
.addBack(LineBasedFrameDecoder(
10, true, LineBasedFrameDecoder::TerminatorType::CARRIAGENEWLINE))
.addBack(test::FrameTester([&](std::unique_pt... | 0 | [
"CWE-119",
"CWE-787"
] | wangle | 5b3bceca875e4ea4ed9d14c20b20ce46c92c13c6 | 216,482,620,506,848,000,000,000,000,000,000,000,000 | 19 | Peek for \n in LineBasedFrameDecoder.
Summary:
Previously this could underflow if there was not a following \n.
CVE-2019-3563
Reviewed By: siyengar
Differential Revision: D14935715
fbshipit-source-id: 25c3eecf373f89efa1232456aeeb092f13b7fa06 |
static int smsusb1_load_firmware(struct usb_device *udev, int id, int board_id)
{
const struct firmware *fw;
u8 *fw_buffer;
int rc, dummy;
char *fw_filename;
if (id < 0)
id = sms_get_board(board_id)->default_mode;
if (id < DEVICE_MODE_DVBT || id > DEVICE_MODE_DVBT_BDA) {
pr_err("invalid firmware id specifie... | 0 | [
"CWE-476"
] | linux | 31e0456de5be379b10fea0fa94a681057114a96e | 229,043,207,169,794,600,000,000,000,000,000,000,000 | 52 | media: usb: siano: Fix general protection fault in smsusb
The syzkaller USB fuzzer found a general-protection-fault bug in the
smsusb part of the Siano DVB driver. The fault occurs during probe
because the driver assumes without checking that the device has both
IN and OUT endpoints and the IN endpoint is ep1.
By sl... |
vte_sequence_handler_uc (VteTerminal *terminal, GValueArray *params)
{
VteCell *cell;
int column;
VteScreen *screen;
screen = terminal->pvt->screen;
column = screen->cursor_current.col;
cell = vte_terminal_find_charcell(terminal, column, screen->cursor_current.row);
while ((cell != NULL) && (cell->attr.fragment... | 0 | [] | vte | 8b971a7b2c59902914ecbbc3915c45dd21530a91 | 59,910,372,003,191,950,000,000,000,000,000,000,000 | 28 | Fix terminal title reporting
Fixed CVE-2003-0070 again.
See also http://marc.info/?l=bugtraq&m=104612710031920&w=2 .
(cherry picked from commit 6042c75b5a6daa0e499e61c8e07242d890d38ff1) |
static int parseinlinechar(REgg *egg, char c) {
/* skip until '{' */
if (c == '{') { /* XXX: repeated code!! */
rcc_context (egg, 1);
egg->lang.inlinectr++;
if (egg->lang.inlinectr == 1) {
return 0;
}
} else if (egg->lang.inlinectr == 0) {
return 0;
}
/* capture body */
if (c == '}') { /* XXX: repea... | 0 | [
"CWE-416"
] | radare2 | 93af319e0af787ede96537d46210369f5c24240c | 143,146,089,053,176,360,000,000,000,000,000,000,000 | 42 | Fix #14296 - Segfault in ragg2 (#14308) |
gen_svm_check_intercept(DisasContext *s, target_ulong pc_start, uint64_t type)
{
gen_svm_check_intercept_param(s, pc_start, type, 0);
} | 0 | [
"CWE-94"
] | qemu | 30663fd26c0307e414622c7a8607fbc04f92ec14 | 121,452,354,738,412,430,000,000,000,000,000,000,000 | 4 | tcg/i386: Check the size of instruction being translated
This fixes the bug: 'user-to-root privesc inside VM via bad translation
caching' reported by Jann Horn here:
https://bugs.chromium.org/p/project-zero/issues/detail?id=1122
Reviewed-by: Richard Henderson <rth@twiddle.net>
CC: Peter Maydell <peter.maydell@linaro.... |
int read_image_tga( gdIOCtx *ctx, oTga *tga )
{
int pixel_block_size = (tga->bits / 8);
int image_block_size = (tga->width * tga->height) * pixel_block_size;
uint8_t* decompression_buffer = NULL;
unsigned char* conversion_buffer = NULL;
int buffer_caret = 0;
int bitmap_caret = 0;
int i = 0;
uint8_t encoded_pixe... | 0 | [
"CWE-125"
] | libgd | 01c61f8ab110a77ae64b5ca67c244c728c506f03 | 229,258,680,417,499,630,000,000,000,000,000,000,000 | 129 | Proper fix for #248 |
static int SetSKID(byte* output, word32 outSz, const byte *input, word32 length)
{
byte skid_len[1 + MAX_LENGTH_SZ];
byte skid_enc_len[MAX_LENGTH_SZ];
int idx = 0, skid_lenSz, skid_enc_lenSz;
const byte skid_oid[] = { 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04 };
if (output == NULL || input == NULL)
... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 56,963,788,897,631,400,000,000,000,000,000,000,000 | 43 | OCSP: improve handling of OCSP no check extension |
JBIG2HuffmanDecoder::JBIG2HuffmanDecoder()
{
str = nullptr;
byteCounter = 0;
reset();
} | 0 | [
"CWE-476",
"CWE-190"
] | poppler | 27354e9d9696ee2bc063910a6c9a6b27c5184a52 | 191,641,647,818,045,150,000,000,000,000,000,000,000 | 6 | JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up |
static struct sk_buff **ipv6_gro_receive(struct sk_buff **head,
struct sk_buff *skb)
{
const struct net_offload *ops;
struct sk_buff **pp = NULL;
struct sk_buff *p;
struct ipv6hdr *iph;
unsigned int nlen;
unsigned int hlen;
unsigned int off;
u16 flush = 1;
int proto;
off = skb_gro_offset(skb);
hlen = ... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 155,628,547,119,965,790,000,000,000,000,000,000,000 | 94 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
DEFUN(nextRD, NEXT_RIGHT_DOWN, "Move right or downward to the next hyperlink")
{
nextX(1, 1);
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 326,170,099,083,547,060,000,000,000,000,000,000,000 | 4 | Make temporary directory safely when ~/.w3m is unwritable |
static void mark_unsync(u64 *spte)
{
struct kvm_mmu_page *sp;
unsigned int index;
sp = sptep_to_sp(spte);
index = spte - sp->spt;
if (__test_and_set_bit(index, sp->unsync_child_bitmap))
return;
if (sp->unsync_children++)
return;
kvm_mmu_mark_parents_unsync(sp);
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 162,586,087,164,762,940,000,000,000,000,000,000,000 | 13 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
static int btrfs_inode_by_name(struct inode *dir, struct dentry *dentry,
struct btrfs_key *location)
{
const char *name = dentry->d_name.name;
int namelen = dentry->d_name.len;
struct btrfs_dir_item *di;
struct btrfs_path *path;
struct btrfs_root *root = BTRFS_I(dir)->root;
int ret = 0;
path = btrfs_a... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 101,151,331,745,239,170,000,000,000,000,000,000,000 | 30 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
static void ___mark_reg_known(struct bpf_reg_state *reg, u64 imm)
{
reg->var_off = tnum_const(imm);
reg->smin_value = (s64)imm;
reg->smax_value = (s64)imm;
reg->umin_value = imm;
reg->umax_value = imm;
reg->s32_min_value = (s32)imm;
reg->s32_max_value = (s32)imm;
reg->u32_min_value = (u32)imm;
reg->u32_max_va... | 0 | [] | linux | 9b00f1b78809309163dda2d044d9e94a3c0248a3 | 120,006,131,630,881,910,000,000,000,000,000,000,000 | 13 | bpf: Fix truncation handling for mod32 dst reg wrt zero
Recently noticed that when mod32 with a known src reg of 0 is performed,
then the dst register is 32-bit truncated in verifier:
0: R1=ctx(id=0,off=0,imm=0) R10=fp0
0: (b7) r0 = 0
1: R0_w=inv0 R1=ctx(id=0,off=0,imm=0) R10=fp0
1: (b7) r1 = -1
2: R0_w=inv... |
int propfind_suplock(const xmlChar *name, xmlNsPtr ns,
struct propfind_ctx *fctx,
xmlNodePtr prop __attribute__((unused)),
xmlNodePtr resp __attribute__((unused)),
struct propstat propstat[],
void *rock __attribute_... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 232,751,231,716,136,870,000,000,000,000,000,000,000 | 21 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
static void slice_flush_segments(void *parm)
{
struct mm_struct *mm = parm;
unsigned long flags;
if (mm != current->active_mm)
return;
copy_mm_to_paca(current->active_mm);
local_irq_save(flags);
slb_flush_and_rebolt();
local_irq_restore(flags);
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 115,073,210,105,228,130,000,000,000,000,000,000,000 | 14 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
load_contents_fstat_callback (GObject *obj,
GAsyncResult *stat_res,
gpointer user_data)
{
GInputStream *stream = G_INPUT_STREAM (obj);
LoadContentsData *data = user_data;
GFileInfo *info;
info = g_file_input_stream_query_info_finish (G_FILE_... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 243,899,420,832,737,860,000,000,000,000,000,000,000 | 20 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static void mod_tree_remove(struct module *mod) { } | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 325,257,488,964,101,400,000,000,000,000,000,000,000 | 1 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
const BSONElement& chk(BSONType t) const {
if (t != type()) {
StringBuilder ss;
if (eoo())
ss << "field not found, expected type " << t;
else
ss << "wrong type for field (" << fieldName() << ") " << type() << " != " << t;
uasser... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 84,822,914,794,908,660,000,000,000,000,000,000,000 | 11 | SERVER-38984 Validate unique User ID on UserCache hit |
validate_cline_row(void)
{
/*
* First make sure that w_topline is valid (after moving the cursor).
*/
update_topline();
check_cursor_moved(curwin);
if (!(curwin->w_valid & VALID_CROW))
curs_rows(curwin);
} | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 154,619,999,166,124,450,000,000,000,000,000,000,000 | 10 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
inline double ror(const long double a, const unsigned int n=1) {
return (double)ror((cimg_long)a,n);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 314,900,513,076,070,340,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static inline void ModulateHWB(const double percent_hue,
const double percent_whiteness,const double percent_blackness,double *red,
double *green,double *blue)
{
double
blackness,
hue,
whiteness;
/*
Increase or decrease color blackness, whiteness, or hue.
*/
ConvertRGBToHWB(*red,*green,*blu... | 0 | [
"CWE-401",
"CWE-119",
"CWE-787"
] | ImageMagick | 1cc6f0ccc92c20c7cab6c4a7335daf29c91f0d8e | 65,832,230,769,569,580,000,000,000,000,000,000,000 | 18 | https://github.com/ImageMagick/ImageMagick/issues/663
https://github.com/ImageMagick/ImageMagick/issues/655 |
gpa_t kvm_mmu_gva_to_gpa_write(struct kvm_vcpu *vcpu, gva_t gva,
struct x86_exception *exception)
{
struct kvm_mmu *mmu = vcpu->arch.walk_mmu;
u32 access = (static_call(kvm_x86_get_cpl)(vcpu) == 3) ? PFERR_USER_MASK : 0;
access |= PFERR_WRITE_MASK;
return mmu->gva_to_gpa(vcpu, mmu, gva, access, exception... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 77,560,847,112,278,720,000,000,000,000,000,000,000 | 9 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
static noinline void async_cow_start(struct btrfs_work *work)
{
struct async_cow *async_cow;
int num_added = 0;
async_cow = container_of(work, struct async_cow, work);
compress_file_range(async_cow->inode, async_cow->locked_page,
async_cow->start, async_cow->end, async_cow,
&num_added);
if (num_adde... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 198,456,181,791,862,770,000,000,000,000,000,000,000 | 14 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
mono_object_register_finalizer (MonoObject *obj)
{
/* g_print ("Registered finalizer on %p %s.%s\n", obj, mono_object_class (obj)->name_space, mono_object_class (obj)->name); */
object_register_finalizer (obj, mono_gc_run_finalize);
} | 0 | [
"CWE-399",
"CWE-264"
] | mono | 8eb1189099e02372fd45ca1c67230eccf1edddc0 | 292,935,768,299,969,700,000,000,000,000,000,000,000 | 5 | Implement a reference queue API.
* gc.c: A reference queue allows one to queue
callbcks for when objects are collected.
It allows for safe cleanup of objects that can
only be done when it is effectively collected.
The major difference with regular finalization
is that the collector makes sure the object
was col... |
int SSL_peek(SSL* ssl, void* buffer, int sz)
{
Data data(min(sz, MAX_RECORD_SIZE), static_cast<opaque*>(buffer));
return receiveData(*ssl, data, true);
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 216,383,432,888,879,250,000,000,000,000,000,000,000 | 5 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
static inline i64 read_vchars(rzip_control *control, void *ss, int stream, int length)
{
i64 s = 0;
if (unlikely(read_stream(control, ss, stream, (uchar *)&s, length) != length))
fatal_return(("Stream read of %d bytes failed\n", length), -1);
s = le64toh(s);
return s;
} | 0 | [
"CWE-703"
] | lrzip | 4b3942103b57c639c8e0f31d6d5fd7bac53bbdf4 | 180,321,318,432,805,300,000,000,000,000,000,000,000 | 9 | Fix possible race condition between zpaq_decompress_buf() and clear_rulist() function as reported by wcventure. |
xmlCopyElementTable(xmlElementTablePtr table) {
return((xmlElementTablePtr) xmlHashCopy(table,
(xmlHashCopier) xmlCopyElement));
} | 0 | [] | libxml2 | 932cc9896ab41475d4aa429c27d9afd175959d74 | 319,788,295,423,362,400,000,000,000,000,000,000,000 | 4 | Fix buffer size checks in xmlSnprintfElementContent
xmlSnprintfElementContent failed to correctly check the available
buffer space in two locations.
Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048).
Thanks to Marcel Böhme and Thuan Pham for the report. |
read_zip64_eocd(struct archive_read *a, struct zip *zip, const char *p)
{
int64_t eocd64_offset;
int64_t eocd64_size;
/* Sanity-check the locator record. */
/* Central dir must be on first volume. */
if (archive_le32dec(p + 4) != 0)
return;
/* Must be only a single volume. */
if (archive_le32dec(p + 16) != 1... | 0 | [
"CWE-20"
] | libarchive | d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7 | 235,020,392,676,001,970,000,000,000,000,000,000,000 | 39 | Issue #656: Fix CVE-2016-1541, VU#862384
When reading OS X metadata entries in Zip archives that were stored
without compression, libarchive would use the uncompressed entry size
to allocate a buffer but would use the compressed entry size to limit
the amount of data copied into that buffer. Since the compressed
and... |
static char hex2num(char *str) {
char val = 0;
val <<= 4;
if (str[0] >= '0' && str[0] <= '9') {
val += str[0] & 0x0F;
}
else if (str[0] >= 'A' && str[0] <= 'F') {
val += (str[0] & 0x0F) + 9;
}
else if (str[0] >= 'a' && str[0] <= 'f') {
val += (str[0] & 0x0F) + 9;
}
else {
return 0;
}
val <<= 4;
... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 238,270,317,531,726,240,000,000,000,000,000,000,000 | 36 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
check_l4_icmp(const void *data, size_t size, bool validate_checksum)
{
return validate_checksum ? csum(data, size) == 0 : true;
} | 0 | [
"CWE-400"
] | ovs | 3512fb512c76a1f08eba4005aa2eb69160d0840e | 28,517,637,542,199,996,000,000,000,000,000,000,000 | 4 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
int SSL_cache_hit(SSL *s)
{
return s->hit;
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 21,607,114,213,132,540,000,000,000,000,000,000,000 | 4 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
static ssize_t kernel_readv(struct file *file, const struct iovec *vec,
unsigned long vlen, loff_t offset)
{
mm_segment_t old_fs;
loff_t pos = offset;
ssize_t res;
old_fs = get_fs();
set_fs(get_ds());
/* The cast to a user pointer is valid due to the set_fs() */
res = vfs_readv(file, (const struct iovec ... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 318,358,873,814,548,800,000,000,000,000,000,000,000 | 15 | ->splice_write() via ->write_iter()
iter_file_splice_write() - a ->splice_write() instance that gathers the
pipe buffers, builds a bio_vec-based iov_iter covering those and feeds
it to ->write_iter(). A bunch of simple cases coverted to that...
[AV: fixed the braino spotted by Cyrill]
Signed-off-by: Al Viro <viro@z... |
static inline void ConvertXYZToRGB(const double X,const double Y,const double Z,
double *red,double *green,double *blue)
{
double
b,
g,
r;
assert(red != (double *) NULL);
assert(green != (double *) NULL);
assert(blue != (double *) NULL);
r=3.2404542*X-1.5371385*Y-0.4985314*Z;
g=(-0.9692660)*X... | 0 | [
"CWE-369"
] | ImageMagick | 3d71aa8265ffaaf686021a6fbd54c037f71ee3a2 | 225,189,995,208,147,870,000,000,000,000,000,000,000 | 18 | https://github.com/ImageMagick/ImageMagick/issues/1739 |
static int __f2fs_write_data_pages(struct address_space *mapping,
struct writeback_control *wbc,
enum iostat_type io_type)
{
struct inode *inode = mapping->host;
struct f2fs_sb_info *sbi = F2FS_I_SB(inode);
struct blk_plug plug;
int ret;
bool locked = false;
/* deal with chardevs and other special fi... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 245,579,162,575,205,470,000,000,000,000,000,000,000 | 67 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
static int AppLayerProtoDetectTest06(void)
{
AppLayerProtoDetectUnittestCtxBackup();
AppLayerProtoDetectSetup();
uint8_t l7data[] = "220 Welcome to the OISF FTP server\r\n";
const char *buf;
int r = 0;
Flow f;
AppProto pm_results[ALPROTO_MAX];
AppLayerProtoDetectThreadCtx *alpd_tctx;
... | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 125,320,638,290,934,850,000,000,000,000,000,000,000 | 72 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
int kvm_mmu_unprotect_page(struct kvm *kvm, gfn_t gfn)
{
struct kvm_mmu_page *sp;
LIST_HEAD(invalid_list);
int r;
pgprintk("%s: looking for gfn %llx\n", __func__, gfn);
r = 0;
write_lock(&kvm->mmu_lock);
for_each_gfn_indirect_valid_sp(kvm, sp, gfn) {
pgprintk("%s: gfn %llx role %x\n", __func__, gfn,
sp->r... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 209,032,779,244,886,730,000,000,000,000,000,000,000 | 20 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
static enum dc_status build_mapped_resource(
const struct dc *dc,
struct dc_state *context,
struct dc_stream_state *stream)
{
struct pipe_ctx *pipe_ctx = resource_get_head_pipe_for_stream(&context->res_ctx, stream);
if (!pipe_ctx)
return DC_ERROR_UNEXPECTED;
dce110_resource_build_pipe_hw_param(pipe_ctx);
... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 257,586,041,203,889,600,000,000,000,000,000,000,000 | 16 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
TORRENT_TEST(zeroes)
{
std::vector<char> zipped;
error_code ec;
load_file(combine_path("..", "zeroes.gz"), zipped, ec, 1000000);
if (ec) fprintf(stderr, "failed to open file: (%d) %s\n", ec.value()
, ec.message().c_str());
TEST_CHECK(!ec);
std::vector<char> inflated;
inflate_gzip(&zipped[0], zipped.size(), in... | 0 | [
"CWE-20"
] | libtorrent | debf3c6e3688aab8394fe5c47737625faffe6f9e | 69,674,740,414,655,480,000,000,000,000,000,000,000 | 20 | update puff.c for gzip inflation (#1022)
update puff.c for gzip inflation |
static inline void add_sect_attrs(struct module *mod,
const struct load_info *info)
{
} | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 128,835,341,894,899,120,000,000,000,000,000,000,000 | 4 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static HRESULT STDMETHODCALLTYPE stm_copy_to(IStream *This, IStream *pstm, ULARGE_INTEGER cb,
ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
{
FETCH_STM();
return E_NOTIMPL;
} | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 46,095,266,216,308,610,000,000,000,000,000,000,000 | 7 | - 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 |
QPDF::writeHSharedObject(BitWriter& w)
{
HSharedObject& t = this->m->shared_object_hints;
w.writeBitsInt(t.first_shared_obj, 32); // 1
w.writeBitsInt(toI(t.first_shared_offset), 32); // 2
w.writeBitsInt(t.nshared_first_page, 32); // 3
w.writeBitsInt(t.nshared_t... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 158,780,997,096,372,590,000,000,000,000,000,000,000 | 36 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static int check_ext_type_set(const uint8_t *ext_types, uint8_t type) {
return (ext_types[type / 8] & (1 << (type & 0x7))) > 0;
} | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 234,470,907,643,504,850,000,000,000,000,000,000,000 | 3 | Add nghttp2_option_set_max_outbound_ack |
static void bond_ab_arp_probe(struct bonding *bond)
{
struct slave *slave;
int i;
read_lock(&bond->curr_slave_lock);
if (bond->current_arp_slave && bond->curr_active_slave)
pr_info("PROBE: c_arp %s && cas %s BAD\n",
bond->current_arp_slave->dev->name,
bond->curr_active_slave->dev->name);
if (bond->curr_... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 337,822,649,271,624,520,000,000,000,000,000,000,000 | 63 | 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... |
ofputil_encode_get_async_reply(const struct ofp_header *oh,
const struct ofputil_async_cfg *ac)
{
struct ofpbuf *buf;
enum ofpraw raw = (oh->version < OFP14_VERSION
? OFPRAW_OFPT13_GET_ASYNC_REPLY
: OFPRAW_OFPT14_GET_ASYNC_REPLY);
... | 0 | [
"CWE-617",
"CWE-703"
] | ovs | 4af6da3b275b764b1afe194df6499b33d2bf4cde | 327,139,971,840,077,500,000,000,000,000,000,000,000 | 16 | ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command.
When decoding a group mod, the current code validates the group type and
command after the whole group mod has been decoded. The OF1.5 decoder,
however, tries to use the type and command earlier, when it might still be
invalid. This caused an... |
int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, unsigned int flags)
{
pgd_t *pgd;
pud_t *pud;
pmd_t *pmd;
pte_t *pte;
__set_current_state(TASK_RUNNING);
count_vm_event(PGFAULT);
mem_cgroup_count_vm_event(mm, PGFAULT);
/* do counter updates before entering really... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 145,683,878,832,625,570,000,000,000,000,000,000,000 | 63 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static inline int audit_expand(struct audit_buffer *ab, int extra)
{
struct sk_buff *skb = ab->skb;
int oldtail = skb_tailroom(skb);
int ret = pskb_expand_head(skb, 0, extra, ab->gfp_mask);
int newtail = skb_tailroom(skb);
if (ret < 0) {
audit_log_lost("out of memory in audit_expand");
return 0;
}
skb->tru... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 75,407,866,061,027,800,000,000,000,000,000,000,000 | 15 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
void t_go_generator::generate_go_docstring(ofstream& out, t_struct* tstruct) {
generate_go_docstring(out, tstruct, tstruct, "Attributes");
} | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 281,884,597,915,047,400,000,000,000,000,000,000,000 | 3 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.