func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int proc_delete_dentry(struct dentry * dentry)
{
return 1;
} | 0 | [] | linux-2.6 | 8b90db0df7187a01fb7177f1f812123138f562cf | 156,723,289,575,084,700,000,000,000,000,000,000,000 | 4 | Insanity avoidance in /proc
The old /proc interfaces were never updated to use loff_t, and are just
generally broken. Now, we should be using the seq_file interface for
all of the proc files, but converting the legacy functions is more work
than most people care for and has little upside..
But at least we can make t... |
png_free_data(png_const_structrp png_ptr, png_inforp info_ptr, png_uint_32 mask,
int num)
{
png_debug(1, "in png_free_data");
if (png_ptr == NULL || info_ptr == NULL)
return;
#ifdef PNG_TEXT_SUPPORTED
/* Free text item num or (if num == -1) all text items */
if (info_ptr->text != NULL &&
... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 152,658,357,653,452,170,000,000,000,000,000,000,000 | 188 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
struct hlist_node *seq_hlist_start_head_rcu(struct hlist_head *head,
loff_t pos)
{
if (!pos)
return SEQ_START_TOKEN;
return seq_hlist_start_rcu(head, pos - 1);
} | 0 | [
"CWE-120",
"CWE-787"
] | linux | 8cae8cd89f05f6de223d63e6d15e31c8ba9cf53b | 340,186,883,408,936,400,000,000,000,000,000,000,000 | 8 | seq_file: disallow extremely large seq buffer allocations
There is no reasonable need for a buffer larger than this, and it avoids
int overflow pitfalls.
Fixes: 058504edd026 ("fs/seq_file: fallback to vmalloc allocation")
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Qualys Security Advisory <qsa@qualy... |
static URI_INLINE void URI_FUNC(StopSyntax)(URI_TYPE(ParserState) * state,
const URI_CHAR * errorPos, UriMemoryManager * memory) {
URI_FUNC(FreeUriMembersMm)(state->uri, memory);
state->errorPos = errorPos;
state->errorCode = URI_ERROR_SYNTAX;
} | 0 | [
"CWE-125"
] | uriparser | cef25028de5ff872c2e1f0a6c562eb3ea9ecbce4 | 215,355,796,086,749,050,000,000,000,000,000,000,000 | 6 | Fix uriParse*Ex* out-of-bounds read |
virtual bool can_optimize_hash_join(const Item_bool_func *cond,
const Item *item) const
{
return can_optimize_keypart_ref(cond, item);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 186,681,715,884,282,030,000,000,000,000,000,000,000 | 5 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static int ZEND_FASTCALL ZEND_SR_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
shift_right_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_var(&opline->op2, EX(Ts), &free_... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 125,357,071,113,181,420,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static int read_new_config_info (WavpackContext *wpc, WavpackMetadata *wpmd)
{
int bytecnt = wpmd->byte_length;
unsigned char *byteptr = (unsigned char *)wpmd->data;
wpc->version_five = 1; // just having this block signals version 5.0
wpc->file_format = wpc->config.qmode = wpc->channel_layout = 0... | 0 | [
"CWE-125"
] | WavPack | bba5389dc598a92bdf2b297c3ea34620b6679b5b | 97,653,824,043,076,720,000,000,000,000,000,000,000 | 67 | issue #54: fix potential out-of-bounds heap read |
void skip_input_data(j_decompress_ptr cinfo, long num_bytes)
{
my_src_ptr src = (my_src_ptr)cinfo->src;
/* Just a dumb implementation for now. Not clear that being smart is worth
* any trouble anyway --- large skips are infrequent.
*/
if(num_bytes > 0) {
while(num_bytes > (long)src->pub.bytes_in_buffer) {
... | 0 | [
"CWE-415"
] | libgd | 553702980ae89c83f2d6e254d62cf82e204956d0 | 110,997,716,728,673,610,000,000,000,000,000,000,000 | 19 | Fix #492: Potential double-free in gdImage*Ptr()
Whenever `gdImage*Ptr()` calls `gdImage*Ctx()` and the latter fails, we
must not call `gdDPExtractData()`; otherwise a double-free would
happen. Since `gdImage*Ctx()` are void functions, and we can't change
that for BC reasons, we're introducing static helpers which ar... |
router_pick_trusteddirserver(dirinfo_type_t type, int flags)
{
return router_pick_dirserver_generic(trusted_dir_servers, type, flags);
} | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 259,079,403,378,703,270,000,000,000,000,000,000,000 | 4 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
static int airspy_queue_setup(struct vb2_queue *vq,
unsigned int *nbuffers,
unsigned int *nplanes, unsigned int sizes[], void *alloc_ctxs[])
{
struct airspy *s = vb2_get_drv_priv(vq);
dev_dbg(s->dev, "nbuffers=%d\n", *nbuffers);
/* Need at least 8 buffers */
if (vq->num_buffers + *nbuffers < 8)
*nbuffers = ... | 0 | [
"CWE-119"
] | media_tree | aa93d1fee85c890a34f2510a310e55ee76a27848 | 279,671,020,987,633,730,000,000,000,000,000,000,000 | 17 | media: fix airspy usb probe error path
Fix a memory leak on probe error of the airspy usb device driver.
The problem is triggered when more than 64 usb devices register with
v4l2 of type VFL_TYPE_SDR or VFL_TYPE_SUBDEV.
The memory leak is caused by the probe function of the airspy driver
mishandeling errors and not ... |
GF_Box *hinf_New()
{
ISOM_DECL_BOX_ALLOC(GF_HintInfoBox, GF_ISOM_BOX_TYPE_HINF);
tmp->other_boxes = gf_list_new();
return (GF_Box *)tmp;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 257,074,962,493,868,750,000,000,000,000,000,000,000 | 7 | prevent dref memleak on invalid input (#1183) |
static const sctp_sm_table_entry_t *sctp_chunk_event_lookup(sctp_cid_t cid,
sctp_state_t state)
{
if (state > SCTP_STATE_MAX)
return &bug;
if (cid <= SCTP_CID_BASE_MAX)
return &chunk_event_table[cid][state];
if (sctp_prsctp_enable) {
if (cid == SCTP_CID_FWD_TSN)
return &prsctp_chunk_event_table... | 0 | [] | linux | bbd0d59809f923ea2b540cbd781b32110e249f6e | 63,107,998,217,500,680,000,000,000,000,000,000,000 | 29 | [SCTP]: Implement the receive and verification of AUTH chunk
This patch implements the receive path needed to process authenticated
chunks. Add ability to process the AUTH chunk and handle edge cases
for authenticated COOKIE-ECHO as well.
Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David ... |
static void FVMenuSameGlyphAs(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
FVSameGlyphAs((FontViewBase *) fv);
GDrawRequestExpose(fv->v,NULL,false);
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 237,098,791,001,003,440,000,000,000,000,000,000,000 | 5 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
validate_exec_list(struct drm_i915_gem_exec_object2 *exec,
int count)
{
int i;
for (i = 0; i < count; i++) {
char __user *ptr = (char __user *)(uintptr_t)exec[i].relocs_ptr;
int length; /* limited by fault_in_pages_readable() */
if (exec[i].flags & __EXEC_OBJECT_UNKNOWN_FLAGS)
return -EINVAL;
/* Fi... | 1 | [] | linux | 3118a4f652c7b12c752f3222af0447008f9b2368 | 336,352,958,572,099,650,000,000,000,000,000,000,000 | 29 | drm/i915: bounds check execbuffer relocation count
It is possible to wrap the counter used to allocate the buffer for
relocation copies. This could lead to heap writing overflows.
CVE-2013-0913
v3: collapse test, improve comment
v2: move check into validate_exec_list
Signed-off-by: Kees Cook <keescook@chromium.org>... |
xmlXPathRegisteredFuncsCleanup(xmlXPathContextPtr ctxt) {
if (ctxt == NULL)
return;
xmlHashFree(ctxt->funcHash, NULL);
ctxt->funcHash = NULL;
} | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 324,487,391,566,826,200,000,000,000,000,000,000,000 | 7 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
enum_field_types Item_func_get_system_var::field_type() const
{
switch (var->show_type())
{
case SHOW_BOOL:
case SHOW_MY_BOOL:
case SHOW_SINT:
case SHOW_SLONG:
case SHOW_SLONGLONG:
case SHOW_UINT:
case SHOW_ULONG:
case SHOW_ULONGLONG:
case SHOW_HA_ROWS:
return MYSQL_TYPE_LO... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 17,699,003,374,435,608,000,000,000,000,000,000,000 | 25 | 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... |
void sctp_transport_raise_cwnd(struct sctp_transport *transport,
__u32 sack_ctsn, __u32 bytes_acked)
{
struct sctp_association *asoc = transport->asoc;
__u32 cwnd, ssthresh, flight_size, pba, pmtu;
cwnd = transport->cwnd;
flight_size = transport->flight_size;
/* See if we need to exit Fast Recovery fir... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 178,357,565,821,643,900,000,000,000,000,000,000,000 | 85 | 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.
... |
void sched_fork(struct task_struct *p, int clone_flags)
{
int cpu = get_cpu();
__sched_fork(p);
/*
* We mark the process as running here. This guarantees that
* nobody will actually run it, and a signal or other external
* event cannot wake it up and insert it on the runqueue either.
*/
p->state = TASK_RUN... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 286,713,850,168,164,280,000,000,000,000,000,000,000 | 71 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
RAMBlock *qemu_ram_block_by_name(const char *name)
{
RAMBlock *block;
RAMBLOCK_FOREACH(block) {
if (!strcmp(name, block->idstr)) {
return block;
}
}
return NULL;
} | 0 | [
"CWE-125"
] | qemu | 04bf2526ce87f21b32c9acba1c5518708c243ad0 | 317,986,365,737,459,880,000,000,000,000,000,000,000 | 12 | exec: use qemu_ram_ptr_length to access guest ram
When accessing guest's ram block during DMA operation, use
'qemu_ram_ptr_length' to get ram block pointer. It ensures
that DMA operation of given length is possible; And avoids
any OOB memory access situations.
Reported-by: Alex <broscutamaker@gmail.com>
Signed-off-by... |
externalEntityInitProcessor2(XML_Parser parser,
const char *start,
const char *end,
const char **endPtr)
{
const char *next = start; /* XmlContentTok doesn't always set the last arg */
int tok = XmlContentTok(parser->m_encoding, ... | 0 | [
"CWE-611"
] | libexpat | 11f8838bf99ea0a6f0b76f9760c43704d00c4ff6 | 68,470,567,275,812,160,000,000,000,000,000,000,000 | 38 | xmlparse.c: Fix extraction of namespace prefix from XML name (#186) |
//! Convert pixel values from RGB to YUV color spaces.
CImg<T>& RGBtoYUV() {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"RGBtoYUV(): Instance is not a RGB image.",
cimg_instance);
T *p1 = data(0,0,0,0)... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 148,450,472,754,273,140,000,000,000,000,000,000,000 | 21 | . |
static int srpt_queue_status(struct se_cmd *cmd)
{
struct srpt_send_ioctx *ioctx;
ioctx = container_of(cmd, struct srpt_send_ioctx, cmd);
BUG_ON(ioctx->sense_data != cmd->sense_buffer);
if (cmd->se_cmd_flags &
(SCF_TRANSPORT_TASK_SENSE | SCF_EMULATED_TASK_SENSE))
WARN_ON(cmd->scsi_status != SAM_STAT_CHECK_C... | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 54,802,510,235,087,120,000,000,000,000,000,000,000 | 13 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
EXPORTED int annotate_state_writemdata(annotate_state_t *state,
const char *entry,
const char *userid,
const struct buf *value,
const struct annotate_metadata *mdat... | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 4,739,361,062,417,448,500,000,000,000,000,000,000 | 9 | annotate: don't allow everyone to write shared server entries |
ipmi_sdr_get_sensor_thresholds(struct ipmi_intf *intf, uint8_t sensor,
uint8_t target, uint8_t lun, uint8_t channel)
{
struct ipmi_rq req;
struct ipmi_rs *rsp;
uint8_t bridged_request = 0;
uint32_t save_addr;
uint32_t save_channel;
if ( BRIDGE_TO_SENSOR(intf, target, channel) ) {
bridged_request = 1;
s... | 0 | [
"CWE-120"
] | ipmitool | 7ccea283dd62a05a320c1921e3d8d71a87772637 | 198,136,739,695,047,240,000,000,000,000,000,000,000 | 31 | fru, sdr: Fix id_string buffer overflows
Final part of the fixes for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
9 variants of stack buffer overflow when parsing `id_string` field of
SDR records returned from `CMD_GET_SDR` command.
SDR record structs have an `id_co... |
send_dbus_string_method (DBusConnection *connection,
const char *method,
const char *payload)
{
DBusError error;
DBusMessage *message;
DBusMessage *reply;
DBusMessageIter iter;
const char *str;
if ... | 0 | [] | gdm | c25ef9245be4e0be2126ef3d075df4401949b570 | 171,037,700,738,881,540,000,000,000,000,000,000,000 | 53 | Store the face and dmrc files in a cache. Refer to bug #565151. |
int rta_addattr8(struct rtattr *rta, int maxlen, int type, __u8 data)
{
return rta_addattr_l(rta, maxlen, type, &data, sizeof(__u8));
} | 0 | [] | iproute2 | 8c50b728b226f6254251282697ce38a72639a6fc | 49,579,409,179,182,390,000,000,000,000,000,000,000 | 4 | libnetlink: fix use-after-free of message buf
In __rtnl_talk_iov() main loop, err is a pointer to memory in dynamically
allocated 'buf' that is used to store netlink messages. If netlink message
is an error message, buf is deallocated before returning with error code.
However, on return err->error code is checked one ... |
static void tw5864_encoder_tables_upload(struct tw5864_dev *dev)
{
int i;
tw_writel(TW5864_VLC_RD, 0x1);
for (i = 0; i < VLC_LOOKUP_TABLE_LEN; i++) {
tw_writel((TW5864_VLC_STREAM_MEM_START + i * 4),
encoder_vlc_lookup_table[i]);
}
tw_writel(TW5864_VLC_RD, 0x0);
for (i = 0; i < QUANTIZATION_TABLE_LEN; i++... | 0 | [
"CWE-476"
] | linux | 2e7682ebfc750177a4944eeb56e97a3f05734528 | 129,941,919,417,340,670,000,000,000,000,000,000,000 | 21 | media: tw5864: Fix possible NULL pointer dereference in tw5864_handle_frame
'vb' null check should be done before dereferencing it in
tw5864_handle_frame, otherwise a NULL pointer dereference
may occur.
Fixes: 34d1324edd31 ("[media] pci: Add tw5864 driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-of... |
int asn1_tag_remaining(struct asn1_data *data)
{
int remaining;
if (data->has_error) {
return -1;
}
if (!data->nesting) {
data->has_error = true;
return -1;
}
remaining = data->nesting->taglen - (data->ofs - data->nesting->start);
if (remaining > (data->length - data->ofs)) {
data->has_error = true;
r... | 0 | [
"CWE-399"
] | samba | 9d989c9dd7a5b92d0c5d65287935471b83b6e884 | 78,339,798,592,197,910,000,000,000,000,000,000,000 | 18 | CVE-2015-7540: lib: util: Check *every* asn1 return call and early return.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep... |
//! Blur image with a box filter \newinstance.
CImg<Tfloat> get_blur_box(const float boxsize_x, const float boxsize_y, const float boxsize_z,
const bool boundary_conditions=true) const {
return CImg<Tfloat>(*this,false).blur_box(boxsize_x,boxsize_y,boxsize_z,boundary_conditio... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 300,234,214,809,143,140,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
int FuzzerInitialize(int *argc, char ***argv)
{
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
ERR_clear_error();
CRYPTO_free_ex_index(0, -1);
FuzzerSetRand();
return 1;
} | 0 | [
"CWE-476"
] | openssl | 55869f594f052561b11a2db6a7c42690051868de | 160,650,141,243,767,630,000,000,000,000,000,000,000 | 8 | Test that X509_issuer_and_serial_hash doesn't crash
Provide a certificate with a bad issuer and check that
X509_issuer_and_serial_hash doesn't crash.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
bool run(OperationContext* opCtx,
const string& dbname,
const BSONObj& cmdObj,
BSONObjBuilder& result) {
Status status = auth::parseAndValidateDropAllUsersFromDatabaseCommand(cmdObj, dbname);
uassertStatusOK(status);
ServiceContext* serviceContext = opC... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 19,087,560,375,385,314,000,000,000,000,000,000,000 | 23 | SERVER-38984 Validate unique User ID on UserCache hit |
UBaseType_t uxQueueMessagesWaiting( const QueueHandle_t xQueue )
{
UBaseType_t uxReturn;
configASSERT( xQueue );
taskENTER_CRITICAL();
{
uxReturn = ( ( Queue_t * ) xQueue )->uxMessagesWaiting;
}
taskEXIT_CRITICAL();
return uxReturn;
} /*lint !e818 Pointer cannot be de... | 0 | [
"CWE-200",
"CWE-190"
] | FreeRTOS-Kernel | 47338393f1f79558f6144213409f09f81d7c4837 | 319,336,932,926,052,000,000,000,000,000,000,000,000 | 14 | add assert for addition overflow on queue creation (#225) |
static int ftruncate64 (int fd, curl_off_t where)
{
curl_off_t curr;
int rc = 0;
if ((curr = _lseeki64(fd, 0, SEEK_CUR)) < 0)
return -1;
if (_lseeki64(fd, where, SEEK_SET) < 0)
return -1;
if (write(fd, 0, 0) < 0)
rc = -1;
_lseeki64(fd, curr, SEEK_SET);
return rc;
} | 0 | [
"CWE-125"
] | curl | 70b1900dd13d16f2e83f571407a614541d5ac9ba | 532,282,398,591,262,860,000,000,000,000,000,000 | 16 | 'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194)
pointed out that the warnf() function in the curl tool didn't properly deal
with the cases when excessively long words were used in the string to chop
up. |
static int cap_inode_listsecurity(struct inode *inode, char *buffer,
size_t buffer_size)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 53,208,592,462,749,450,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
message_count(dns_message_t *msg, dns_section_t section, dns_rdatatype_t type)
{
isc_result_t result;
dns_name_t *name;
dns_rdataset_t *curr;
int count = 0;
result = dns_message_firstname(msg, section);
while (result == ISC_R_SUCCESS) {
name = NULL;
dns_message_currentname(msg, section, &name);
for (curr ... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 53,261,283,908,079,220,000,000,000,000,000,000,000 | 22 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
void mark_progress(struct st_command* command MY_ATTRIBUTE((unused)),
int line)
{
static ulonglong progress_start= 0; // < Beware
DYNAMIC_STRING ds_progress;
char buf[32], *end;
ulonglong timer= timer_now();
if (!progress_start)
progress_start= timer;
timer-= progress_start;
if (i... | 0 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 311,172,314,066,024,640,000,000,000,000,000,000,000 | 41 | 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) |
copy_resource(fz_context *ctx, pdf_filter_processor *p, pdf_obj *key, const char *name)
{
pdf_obj *res, *obj;
if (!name || name[0] == 0)
return;
res = pdf_dict_get(ctx, p->old_rdb, key);
obj = pdf_dict_gets(ctx, res, name);
if (obj)
{
res = pdf_dict_get(ctx, p->new_rdb, key);
if (!res)
{
res = pdf_ne... | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 80,925,031,172,333,300,000,000,000,000,000,000,000 | 20 | Bug 701292: Fix test for missing/empty string. |
static void jpake_send_step1(BIO *bconn, JPAKE_CTX *ctx)
{
JPAKE_STEP1 s1;
JPAKE_STEP1_init(&s1);
JPAKE_STEP1_generate(&s1, ctx);
jpake_send_part(bconn, &s1.p1);
jpake_send_part(bconn, &s1.p2);
(void)BIO_flush(bconn);
JPAKE_STEP1_release(&s1);
} | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 207,380,735,455,073,400,000,000,000,000,000,000,000 | 11 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
TEST_P(Http2CodecImplTest, ResponseDataFlood) {
initialize();
TestRequestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
EXPECT_CALL(request_decoder_, decodeHeaders_(_, false));
request_encoder_->encodeHeaders(request_headers, false);
int frame_count = 0;
Buffer::Owne... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 144,609,553,082,332,680,000,000,000,000,000,000,000 | 31 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static int internal_get_user_pages_fast(unsigned long start, int nr_pages,
unsigned int gup_flags,
struct page **pages)
{
unsigned long addr, len, end;
int nr_pinned = 0, ret = 0;
if (WARN_ON_ONCE(gup_flags & ~(FOLL_WRITE | FOLL_LONGTERM |
FOLL_FORCE | FOLL_PIN | FOLL_GET)))
return -EINVAL;
... | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 293,441,687,871,703,100,000,000,000,000,000,000,000 | 55 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
hb_map_destroy (hb_map_t *map)
{
if (!hb_object_destroy (map)) return;
map->fini_shallow ();
hb_free (map);
} | 0 | [
"CWE-787"
] | harfbuzz | d3e09bf4654fe5478b6dbf2b26ebab6271317d81 | 298,755,230,418,741,000,000,000,000,000,000,000,000 | 8 | [set] Make all operators null-safe again
Changed my mind.
Also for hb_map_clear().
Part of https://github.com/harfbuzz/harfbuzz/pull/3162 |
int ssl3_get_client_key_exchange(SSL *s)
{
int i,al,ok;
long n;
unsigned long l;
unsigned char *p;
#ifndef OPENSSL_NO_RSA
RSA *rsa=NULL;
EVP_PKEY *pkey=NULL;
#endif
#ifndef OPENSSL_NO_DH
BIGNUM *pub=NULL;
DH *dh_srvr;
#endif
#ifndef OPENSSL_NO_KRB5
KSSL_ERR kssl_err;
#endif /* OPENSSL_NO_KRB5 */
#ifnd... | 0 | [] | openssl | 36ca4ba63d083da6f9d4598f18f17a8c32c8eca2 | 206,934,153,363,006,370,000,000,000,000,000,000,000 | 647 | Implement the Supported Point Formats Extension for ECC ciphersuites
Submitted by: Douglas Stebila |
void bpf_int_jit_compile(struct bpf_prog *prog)
{
struct bpf_binary_header *header = NULL;
int proglen, oldproglen = 0;
struct jit_context ctx = {};
u8 *image = NULL;
int *addrs;
int pass;
int i;
if (!bpf_jit_enable)
return;
if (!prog || !prog->len)
return;
addrs = kmalloc(prog->len * sizeof(*addrs), G... | 0 | [
"CWE-17"
] | net | 3f7352bf21f8fd7ba3e2fcef9488756f188e12be | 145,098,165,719,274,820,000,000,000,000,000,000,000 | 71 | x86: bpf_jit: fix compilation of large bpf programs
x86 has variable length encoding. x86 JIT compiler is trying
to pick the shortest encoding for given bpf instruction.
While doing so the jump targets are changing, so JIT is doing
multiple passes over the program. Typical program needs 3 passes.
Some very short progr... |
store_int(intmax_t intval, size_t size, void *val)
{
switch (size) {
case 1:
if ((int8_t)intval != intval)
return ASN1_OVERFLOW;
*(int8_t *)val = intval;
return 0;
case 2:
if ((int16_t)intval != intval)
return ASN1_OVERFLOW;
*(int16_t *)val = i... | 0 | [
"CWE-674",
"CWE-787"
] | krb5 | 57415dda6cf04e73ffc3723be518eddfae599bfd | 284,884,590,512,125,360,000,000,000,000,000,000,000 | 27 | Add recursion limit for ASN.1 indefinite lengths
The libkrb5 ASN.1 decoder supports BER indefinite lengths. It
computes the tag length using recursion; the lack of a recursion limit
allows an attacker to overrun the stack and cause the process to
crash. Reported by Demi Obenour.
CVE-2020-28196:
In MIT krb5 release... |
static void tcm_loop_fall_back_to_erl0(struct se_session *se_sess)
{
return;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 12f09ccb4612734a53e47ed5302e0479c10a50f8 | 95,426,705,056,837,470,000,000,000,000,000,000,000 | 4 | loopback: off by one in tcm_loop_make_naa_tpg()
This is an off by one 'tgpt' check in tcm_loop_make_naa_tpg() that could result
in memory corruption.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org> |
MOBI_RET mobi_xml_write_dcmeta(xmlTextWriterPtr writer, const char *name, const char **content) {
return mobi_xml_write_element_ns(writer, name, content, "dc");
} | 0 | [
"CWE-476"
] | libmobi | c0699c8693c47f14a2e57dec7292e862ac7adf9c | 55,257,143,108,848,200,000,000,000,000,000,000,000 | 3 | Fix undefined behavior when passing null to strdup |
int vnc_tight_send_framebuffer_update(VncState *vs, int x, int y,
int w, int h)
{
vs->tight.type = VNC_ENCODING_TIGHT;
return tight_send_framebuffer_update(vs, x, y, w, h);
} | 1 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 31,996,892,466,451,064,000,000,000,000,000,000,000 | 6 | 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'.
... |
static CImgList<T> get_load_cimg(std::FILE *const file) {
return CImgList<T>().load_cimg(file);
}
CImgList<T>& _load_cimg(std::FILE *const file, const char *const filename) {
#ifdef cimg_use_zlib
#define _cimgz_load_cimg_case(Tss) { \
Bytef *const cbuf = new Bytef[csiz]; \
cimg::fread(cbuf,csiz... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 132,103,332,098,502,280,000,000,000,000,000,000,000 | 108 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void __exit mcryptd_exit(void)
{
mcryptd_fini_queue(&mqueue);
crypto_unregister_template(&mcryptd_tmpl);
free_percpu(mcryptd_flist);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 48a992727d82cb7db076fa15d372178743b1f4cd | 221,613,566,520,212,500,000,000,000,000,000,000,000 | 6 | crypto: mcryptd - Check mcryptd algorithm compatibility
Algorithms not compatible with mcryptd could be spawned by mcryptd
with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name
construct. This causes mcryptd to crash the kernel if an arbitrary
"alg" is incompatible and not intended to be used with mcr... |
static int qeth_core_probe_device(struct ccwgroup_device *gdev)
{
struct qeth_card *card;
struct device *dev;
int rc;
unsigned long flags;
char dbf_name[DBF_NAME_LEN];
QETH_DBF_TEXT(SETUP, 2, "probedev");
dev = &gdev->dev;
if (!get_device(dev))
return -ENODEV;
QETH_DBF_TEXT_(SETUP, 2, "%s", dev_name(&gdev... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 41,071,596,128,590,330,000,000,000,000,000,000,000 | 87 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static void fill_model_structures(SPICE_GNUC_UNUSED Encoder *encoder, FamilyStat *family_stat,
unsigned int rep_first, unsigned int first_size,
unsigned int rep_next, unsigned int mul_size,
unsigned int levels, unsigne... | 0 | [] | spice-common | 762e0abae36033ccde658fd52d3235887b60862d | 187,830,112,259,596,630,000,000,000,000,000,000,000 | 55 | 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... |
static PHP_INI_MH(OnUpdateSerializer) /* {{{ */
{
const ps_serializer *tmp;
SESSION_CHECK_ACTIVE_STATE;
tmp = _php_find_ps_serializer(new_value TSRMLS_CC);
if (PG(modules_activated) && !tmp) {
int err_type;
if (stage == ZEND_INI_STAGE_RUNTIME) {
err_type = E_WARNING;
} else {
err_type = E_ERROR;
}
... | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 109,254,189,672,742,970,000,000,000,000,000,000,000 | 26 | Strict session |
void gdImageColorTransparent (gdImagePtr im, int color)
{
if (!im->trueColor) {
if (im->transparent != -1) {
im->alpha[im->transparent] = gdAlphaOpaque;
}
if (color > -1 && color<=gdMaxColors) {
im->alpha[color] = gdAlphaTransparent;
} else {
return;
}
}
im->transparent = color;
} | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 277,437,406,966,675,970,000,000,000,000,000,000,000 | 14 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). |
GF_Err sinf_box_write(GF_Box *s, GF_BitStream *bs)
{
return gf_isom_box_write_header(s, bs);
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 135,418,447,559,497,170,000,000,000,000,000,000,000 | 4 | fixed #1879 |
void bnx2x_set_rx_mode_inner(struct bnx2x *bp)
{
u32 rx_mode = BNX2X_RX_MODE_NORMAL;
DP(NETIF_MSG_IFUP, "dev->flags = %x\n", bp->dev->flags);
netif_addr_lock_bh(bp->dev);
if (bp->dev->flags & IFF_PROMISC) {
rx_mode = BNX2X_RX_MODE_PROMISC;
} else if ((bp->dev->flags & IFF_ALLMULTI) ||
((netdev_mc_count(b... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 58,593,612,334,107,810,000,000,000,000,000,000,000 | 58 | 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... |
bool Lex_input_stream::get_text(LEX_STRING *dst, uint sep,
int pre_skip, int post_skip)
{
uchar c;
uint found_escape=0;
CHARSET_INFO *cs= m_thd->charset();
tok_bitmap= 0;
while (! eof())
{
c= yyGet();
tok_bitmap|= c;
#ifdef USE_MB
{
int l;
if (use_mb(... | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 114,570,224,590,743,080,000,000,000,000,000,000,000 | 76 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
rdpdr_process_irp(STREAM s)
{
uint32 result = 0,
length = 0,
desired_access = 0,
request,
file,
info_level,
buffer_len,
id,
major,
minor,
device,
offset,
bytes_out,
share_mode, disposition, total_timeout, interval_timeout, flags_and_attributes = 0;
char *filename;
uint32 filename_len;
ui... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 263,673,316,748,541,000,000,000,000,000,000,000,000 | 415 | 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 ... |
static void forward_data_to_session_agent(uint32_t type, uint8_t *data, size_t size)
{
if (active_session_conn == NULL) {
syslog(LOG_DEBUG, "No active session, can't forward message (type %u)", type);
return;
}
udscs_write(active_session_conn, type, 0, 0, data, size);
} | 0 | [
"CWE-770"
] | spice-vd_agent | 1a8b93ca6ac0b690339ab7f0afc6fc45d198d332 | 200,399,760,052,964,570,000,000,000,000,000,000,000 | 9 | Avoids unchecked file transfer IDs allocation and usage
Avoid agents allocating file transfers.
The "active_xfers" entries are now inserted when client start sending
files.
Also different agents cannot mess with other agent transfers as a
transfer is bound to a single agent.
This issue was reported by SUSE security t... |
static MemoryRegionSection flatview_do_translate(struct uc_struct *uc, FlatView *fv,
hwaddr addr,
hwaddr *xlat,
hwaddr *plen_out,
... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 155,844,433,693,074,430,000,000,000,000,000,000,000 | 36 | Fix crash when mapping a big memory and calling uc_close |
SYSCALL_DEFINE3(timer_create, const clockid_t, which_clock,
struct sigevent __user *, timer_event_spec,
timer_t __user *, created_timer_id)
{
if (timer_event_spec) {
sigevent_t event;
if (copy_from_user(&event, timer_event_spec, sizeof (event)))
return -EFAULT;
return do_timer_create(which_clock, &event,... | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 320,819,527,568,445,000,000,000,000,000,000,000,000 | 13 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
static int snd_pcm_hw_params_user(struct snd_pcm_substream *substream,
struct snd_pcm_hw_params __user * _params)
{
struct snd_pcm_hw_params *params;
int err;
params = memdup_user(_params, sizeof(*params));
if (IS_ERR(params))
return PTR_ERR(params);
err = snd_pcm_hw_params(substream, params);
if (err <... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 276,939,111,994,308,750,000,000,000,000,000,000,000 | 20 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
void GrpcHealthCheckerImpl::GrpcActiveHealthCheckSession::onGoAway(
Http::GoAwayErrorCode error_code) {
ENVOY_CONN_LOG(debug, "connection going away health_flags={}", *client_,
HostUtility::healthFlagsToString(*host_));
// If we have an active health check probe and receive a GOAWAY indicating
... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 119,804,502,389,433,420,000,000,000,000,000,000,000 | 28 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
Value ExpressionLast::evaluate(const Document& root, Variables* variables) const {
const Value array = _children[0]->evaluate(root, variables);
return arrayElemAt(this, array, Value(-1));
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 329,231,002,150,428,770,000,000,000,000,000,000,000 | 4 | SERVER-49404 Enforce additional checks in $arrayToObject |
qemuProcessHandleMigrationPass(qemuMonitorPtr mon G_GNUC_UNUSED,
virDomainObjPtr vm,
int pass,
void *opaque)
{
virQEMUDriverPtr driver = opaque;
qemuDomainObjPrivatePtr priv;
virObjectLock(vm);
VIR_DEBUG("Migr... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 303,651,200,953,506,400,000,000,000,000,000,000,000 | 26 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
u16 ReadVirtIODeviceWord(ULONG_PTR ulRegister)
{
u16 wValue;
NdisRawReadPortUshort(ulRegister, &wValue);
DPrintf(6, ("[%s]R[%x]=%x\n", __FUNCTION__, (ULONG)ulRegister, wValue) );
return wValue;
} | 0 | [
"CWE-20"
] | kvm-guest-drivers-windows | 723416fa4210b7464b28eab89cc76252e6193ac1 | 290,633,042,738,247,280,000,000,000,000,000,000,000 | 10 | NetKVM: BZ#1169718: Checking the length only on read
Signed-off-by: Joseph Hindin <yhindin@rehat.com> |
static pj_status_t encode_errcode_attr(const void *a, pj_uint8_t *buf,
unsigned len,
const pj_stun_msg_hdr *msghdr,
unsigned *printed)
{
const pj_stun_errcode_attr *ca =
(const pj_stun_errcode_attr*)a;
PJ_CHECK_STACK();
PJ_UNUSED_ARG(msghdr);
if (len < ATTR_HD... | 0 | [
"CWE-191"
] | pjproject | 15663e3f37091069b8c98a7fce680dc04bc8e865 | 104,631,356,654,338,260,000,000,000,000,000,000,000 | 30 | Merge pull request from GHSA-2qpg-f6wf-w984 |
void verify_non_filename(const char *prefix, const char *arg)
{
if (!is_inside_work_tree() || is_inside_git_dir())
return;
if (*arg == '-')
return; /* flag */
if (!check_filename(prefix, arg))
return;
die(_("ambiguous argument '%s': both revision and filename\n"
"Use '--' to separate paths from revisio... | 0 | [
"CWE-22"
] | git | 3b0bf2704980b1ed6018622bdf5377ec22289688 | 257,337,428,078,981,700,000,000,000,000,000,000,000 | 12 | setup: tighten ownership checks post CVE-2022-24765
8959555cee7 (setup_git_directory(): add an owner check for the top-level
directory, 2022-03-02), adds a function to check for ownership of
repositories using a directory that is representative of it, and ways to
add exempt a specific repository from said check if nee... |
dns_zone_getchecknames(dns_zone_t *zone) {
REQUIRE(DNS_ZONE_VALID(zone));
return (zone->check_names);
} | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 131,281,760,109,280,280,000,000,000,000,000,000,000 | 5 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
TEST_F(TcpHealthCheckerImplTest, Success) {
InSequence s;
setupData();
cluster_->prioritySet().getMockHostSet(0)->hosts_ = {
makeTestHost(cluster_->info_, "tcp://127.0.0.1:80", simTime())};
expectSessionCreate();
expectClientCreate();
EXPECT_CALL(*connection_, write(_, _));
EXPECT_CALL(*timeout_tim... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 266,889,169,737,658,440,000,000,000,000,000,000,000 | 22 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
{
gfn_t pdpt_gfn = cr3 >> PAGE_SHIFT;
unsigned offset = ((cr3 & (PAGE_SIZE-1)) >> 5) << 2;
int i;
int ret;
u64 pdpte[ARRAY_SIZE(mmu->pdptrs)];
ret = kvm_read_guest_page_mmu(vcpu, mmu, pdpt_gfn, pdpte,
offset * sizeof(u64), s... | 0 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 50,788,769,514,955,850,000,000,000,000,000,000,000 | 34 | KVM: x86: Reload pit counters for all channels when restoring state
Currently if userspace restores the pit counters with a count of 0
on channels 1 or 2 and the guest attempts to read the count on those
channels, then KVM will perform a mod of 0 and crash. This will ensure
that 0 values are converted to 65536 as per... |
TEE_Result syscall_cryp_obj_populate(unsigned long obj,
struct utee_attribute *usr_attrs,
unsigned long attr_count)
{
TEE_Result res;
struct tee_ta_session *sess;
struct tee_obj *o;
const struct tee_cryp_obj_type_props *type_props;
TEE_Attribute *attrs = NULL;
res = tee_ta_get_current_session(&sess);
if (... | 0 | [
"CWE-119",
"CWE-787"
] | optee_os | a637243270fc1faae16de059091795c32d86e65e | 246,629,506,265,258,550,000,000,000,000,000,000,000 | 58 | svc: check for allocation overflow in crypto calls
Without checking for overflow there is a risk of allocating a buffer
with size smaller than anticipated and as a consequence of that it might
lead to a heap based overflow with attacker controlled data written
outside the boundaries of the buffer.
Fixes: OP-TEE-2018-... |
vmci_transport_recv_connecting_client(struct sock *sk,
struct vmci_transport_packet *pkt)
{
struct vsock_sock *vsk;
int err;
int skerr;
vsk = vsock_sk(sk);
switch (pkt->type) {
case VMCI_TRANSPORT_PACKET_TYPE_ATTACH:
if (vmci_handle_is_invalid(pkt->u.handle) ||
!vmci_handle_is_equal(pkt->u.han... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 196,735,044,466,542,370,000,000,000,000,000,000,000 | 98 | 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... |
CImg<Tfloat> get_diffusion_tensors(const float sharpness=0.7f, const float anisotropy=0.6f,
const float alpha=0.6f, const float sigma=1.1f, const bool is_sqrt=false) const {
return CImg<Tfloat>(*this,false).diffusion_tensors(sharpness,anisotropy,alpha,sigma,is_sqrt);
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 113,928,026,070,907,540,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
~sigpipe_stopper() {
if (blocked) {
struct timespec nowait{0};
int r = sigtimedwait(&pipe_mask, 0, &nowait);
assert(r == EAGAIN || r == 0);
r = pthread_sigmask(SIG_SETMASK, &existing_mask, 0);
assert(r == 0);
}
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 199,544,804,621,145,400,000,000,000,000,000,000,000 | 9 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
static int bond_update_speed_duplex(struct slave *slave)
{
struct net_device *slave_dev = slave->dev;
struct ethtool_link_ksettings ecmd;
int res;
slave->speed = SPEED_UNKNOWN;
slave->duplex = DUPLEX_UNKNOWN;
res = __ethtool_get_link_ksettings(slave_dev, &ecmd);
if (res < 0)
return 1;
if (ecmd.base.speed ==... | 0 | [
"CWE-476",
"CWE-703"
] | linux | 105cd17a866017b45f3c45901b394c711c97bf40 | 206,328,917,372,309,400,000,000,000,000,000,000,000 | 27 | bonding: fix null dereference in bond_ipsec_add_sa()
If bond doesn't have real device, bond->curr_active_slave is null.
But bond_ipsec_add_sa() dereferences bond->curr_active_slave without
null checking.
So, null-ptr-deref would occur.
Test commands:
ip link add bond0 type bond
ip link set bond0 up
ip x s... |
CString CZNC::GetCompileOptionsString() {
// Build system doesn't affect ABI
return ZNC_COMPILE_OPTIONS_STRING + CString(
", build: "
#ifdef BUILD_WITH_CMAKE
"cmake"
#else
"autocon... | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 197,700,777,172,002,000,000,000,000,000,000,000,000 | 11 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
static s64 common_hrtimer_forward(struct k_itimer *timr, ktime_t now)
{
struct hrtimer *timer = &timr->it.real.timer;
return hrtimer_forward(timer, now, timr->it_interval);
} | 0 | [
"CWE-190"
] | linux | 78c9c4dfbf8c04883941445a195276bb4bb92c76 | 85,281,523,033,574,860,000,000,000,000,000,000,000 | 6 | posix-timers: Sanitize overrun handling
The posix timer overrun handling is broken because the forwarding functions
can return a huge number of overruns which does not fit in an int. As a
consequence timer_getoverrun(2) and siginfo::si_overrun can turn into
random number generators.
The k_clock::timer_forward() callb... |
static void cmd_anal_calls(RCore *core, const char *input, bool only_print_flag) {
RList *ranges = NULL;
RIOMap *r;
RBinFile *binfile;
ut64 addr;
ut64 len = r_num_math (core->num, input);
if (len > 0xffffff) {
eprintf ("Too big\n");
return;
}
binfile = r_core_bin_cur (core);
addr = core->offset;
if (binfi... | 0 | [
"CWE-416",
"CWE-908"
] | radare2 | 9d348bcc2c4bbd3805e7eec97b594be9febbdf9a | 114,130,999,051,836,000,000,000,000,000,000,000,000 | 59 | Fix #9943 - Invalid free on RAnal.avr |
thumbnail_loader_size_prepared (GdkPixbufLoader *loader,
int width,
int height,
gpointer user_data)
{
int max_thumbnail_size;
double aspect_ratio;
aspect_ratio = ((double) width... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 188,554,495,197,592,030,000,000,000,000,000,000,000 | 28 | 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... |
write_header( FT_Error error_code )
{
FT_Face face;
const char* basename;
error = FTC_Manager_LookupFace( handle->cache_manager,
handle->scaler.face_id, &face );
if ( error )
PanicZ( "can't access font file" );
if ( !status.header )
{
... | 1 | [
"CWE-120"
] | freetype2-demos | b995299b73ba4cd259f221f500d4e63095508bec | 311,184,877,056,379,570,000,000,000,000,000,000,000 | 48 | Fix Savannah bug #30054.
* src/ftdiff.c, src/ftgrid.c, src/ftmulti.c, src/ftstring.c,
src/ftview.c: Use precision for `%s' where appropriate to avoid
buffer overflows. |
int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
struct kvm_sregs *sregs)
{
return -EINVAL;
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 21,940,666,615,323,830,000,000,000,000,000,000,000 | 5 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
TEST_F(OptimizePipeline, MultipleMatchesPushedDownWithSort) {
auto unpack = fromjson(
"{$_internalUnpackBucket: { exclude: [], timeField: 'time', metaField: 'myMeta', "
"bucketMaxSpanSeconds: 3600}}");
auto pipeline = Pipeline::parse(makeVector(unpack,
... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 280,890,172,399,590,300,000,000,000,000,000,000,000 | 24 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
static void lo_unlink(fuse_req_t req, fuse_ino_t parent, const char *name)
{
int res;
struct lo_inode *inode;
struct lo_data *lo = lo_data(req);
if (is_empty(name)) {
fuse_reply_err(req, ENOENT);
return;
}
if (!is_safe_path_component(name)) {
fuse_reply_err(req, EINVAL)... | 0 | [
"CWE-273"
] | qemu | 449e8171f96a6a944d1f3b7d3627ae059eae21ca | 225,842,308,795,515,530,000,000,000,000,000,000,000 | 28 | virtiofsd: Drop membership of all supplementary groups (CVE-2022-0358)
At the start, drop membership of all supplementary groups. This is
not required.
If we have membership of "root" supplementary group and when we switch
uid/gid using setresuid/setsgid, we still retain membership of existing
supplemntary groups. An... |
WandExport void DrawSetStrokeMiterLimit(DrawingWand *wand,
const size_t miterlimit)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (CurrentContext->miterlimit != ... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 252,595,865,232,818,600,000,000,000,000,000,000,000 | 13 | https://github.com/ImageMagick/ImageMagick/issues/716 |
void my_message_sql(uint error, const char *str, myf MyFlags)
{
THD *thd= current_thd;
MYSQL_ERROR::enum_warning_level level;
sql_print_message_func func;
DBUG_ENTER("my_message_sql");
DBUG_PRINT("error", ("error: %u message: '%s' Flag: %d", error, str, MyFlags));
DBUG_ASSERT(str != NULL);
DBUG_ASSERT... | 0 | [
"CWE-362"
] | server | 347eeefbfc658c8531878218487d729f4e020805 | 55,609,749,454,020,520,000,000,000,000,000,000,000 | 44 | don't use my_copystat in the server
it was supposed to be used in command-line tools only.
Different fix for 4e5473862e:
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE |
static u16 ieee80211_get_tdls_sta_capab(struct ieee80211_sub_if_data *sdata,
u16 status_code)
{
struct ieee80211_supported_band *sband;
/* The capability will be 0 when sending a failure code */
if (status_code != 0)
return 0;
sband = ieee80211_get_sband(sdata);
if (sband && sband->band == NL80211_BAND_2G... | 0 | [] | linux | 79c92ca42b5a3e0ea172ea2ce8df8e125af237da | 161,462,973,220,998,460,000,000,000,000,000,000,000 | 17 | 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... |
can_get_termresponse()
{
return cur_tmode == TMODE_RAW
&& termcap_active
# ifdef UNIX
&& (is_not_a_term() || (isatty(1) && isatty(read_cmd_fd)))
# endif
&& p_ek;
} | 0 | [
"CWE-125",
"CWE-787"
] | vim | e178af5a586ea023622d460779fdcabbbfac0908 | 264,176,186,723,506,240,000,000,000,000,000,000,000 | 9 | patch 8.2.5160: accessing invalid memory after changing terminal size
Problem: Accessing invalid memory after changing terminal size.
Solution: Adjust cmdline_row and msg_row to the value of Rows. |
static void fib6_clean_tree(struct net *net, struct fib6_node *root,
int (*func)(struct fib6_info *, void *arg),
int sernum, void *arg, bool skip_notify)
{
struct fib6_cleaner c;
c.w.root = root;
c.w.func = fib6_clean_node;
c.w.count = 0;
c.w.skip = 0;
c.w.skip_in_node = 0;
c.func = func;
c.sernu... | 0 | [
"CWE-755"
] | linux | 7b09c2d052db4b4ad0b27b97918b46a7746966fa | 164,533,655,667,772,510,000,000,000,000,000,000,000 | 19 | ipv6: fix a typo in fib6_rule_lookup()
Yi Ren reported an issue discovered by syzkaller, and bisected
to the cited commit.
Many thanks to Yi, this trivial patch does not reflect the patient
work that has been done.
Fixes: d64a1f574a29 ("ipv6: honor RT6_LOOKUP_F_DST_NOREF in rule lookup logic")
Signed-off-by: Eric Du... |
MagickExport void SetGeometry(const Image *image,RectangleInfo *geometry)
{
assert(image != (Image *) NULL);
assert(image->signature == MagickCoreSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
assert(geometry != (RectangleInfo *) NULL);... | 0 | [
"CWE-369"
] | ImageMagick | f35eca82b0c294ff9d0ccad104a881c3ae2ba913 | 217,098,542,955,391,200,000,000,000,000,000,000,000 | 11 | https://github.com/ImageMagick/ImageMagick/issues/1725 |
static int toint32(double d)
{
double two32 = 4294967296.0;
double two31 = 2147483648.0;
if (!isfinite(d) || d == 0)
return 0;
d = fmod(d, two32);
d = d >= 0 ? floor(d) : ceil(d) + two32;
if (d >= two31)
return d - two32;
else
return d;
} | 0 | [
"CWE-674"
] | mujs | 4d45a96e57fbabf00a7378b337d0ddcace6f38c1 | 11,978,153,513,974,145,000,000,000,000,000,000,000 | 15 | Guard binary expressions from too much recursion. |
GF_Err paen_box_size(GF_Box *s)
{
return GF_OK; | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 19,656,057,125,341,147,000,000,000,000,000,000,000 | 4 | fixed #1587 |
boot_initmod(mrb_state *mrb, struct RClass *mod)
{
if (!mod->mt) {
mod->mt = mt_new(mrb);
}
} | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 78,327,831,953,659,820,000,000,000,000,000,000,000 | 6 | class.c: clear method cache after `remove_method`. |
bool plugin_is_ready(const LEX_STRING *name, int type)
{
bool rc= FALSE;
if (plugin_status(name, type) == SHOW_OPTION_YES)
rc= TRUE;
return rc;
} | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 20,983,151,484,954,670,000,000,000,000,000,000,000 | 7 | MDEV-26323 use-after-poison issue of MariaDB server |
static struct cgroup_subsys_state *cpuacct_create(
struct cgroup_subsys *ss, struct cgroup *cgrp)
{
struct cpuacct *ca = kzalloc(sizeof(*ca), GFP_KERNEL);
if (!ca)
return ERR_PTR(-ENOMEM);
ca->cpuusage = alloc_percpu(u64);
if (!ca->cpuusage) {
kfree(ca);
return ERR_PTR(-ENOMEM);
}
return &ca->css;
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 66,766,266,730,757,440,000,000,000,000,000,000,000 | 16 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
void __init hugetlb_add_hstate(unsigned int order)
{
struct hstate *h;
unsigned long i;
if (size_to_hstate(PAGE_SIZE << order)) {
return;
}
BUG_ON(hugetlb_max_hstate >= HUGE_MAX_HSTATE);
BUG_ON(order == 0);
h = &hstates[hugetlb_max_hstate++];
mutex_init(&h->resize_lock);
h->order = order;
h->mask = ~(huge_... | 0 | [] | linux | a4a118f2eead1d6c49e00765de89878288d4b890 | 16,189,533,148,950,942,000,000,000,000,000,000,000 | 25 | hugetlbfs: flush TLBs correctly after huge_pmd_unshare
When __unmap_hugepage_range() calls to huge_pmd_unshare() succeed, a TLB
flush is missing. This TLB flush must be performed before releasing the
i_mmap_rwsem, in order to prevent an unshared PMDs page from being
released and reused before the TLB flush took place... |
explicit Conv3DBackpropFilterOp(OpKernelConstruction* context)
: OpKernel(context),
data_format_(FORMAT_NHWC),
takes_shape_(type_string().find("V2") != std::string::npos) {
// data_format is only available in V2.
if (takes_shape_) {
string data_format;
OP_REQUIRES_OK(context,... | 0 | [
"CWE-703",
"CWE-787"
] | tensorflow | 8f37b52e1320d8d72a9529b2468277791a261197 | 237,140,193,508,869,870,000,000,000,000,000,000,000 | 48 | Validate some shape requirements for `Conv3DBackpropFilter*` and `Conv3DBackpropInput*` ops.
Older versions of Eigen might otherwise crash / produce OOB read on specially crafted inputs.
PiperOrigin-RevId: 369293977
Change-Id: I58f51445a93936d7cf8e616f75de17677df36718 |
static int ext4_nfs_commit_metadata(struct inode *inode)
{
struct writeback_control wbc = {
.sync_mode = WB_SYNC_ALL
};
trace_ext4_nfs_commit_metadata(inode);
return ext4_write_inode(inode, &wbc);
} | 0 | [
"CWE-416",
"CWE-401"
] | linux | 4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a | 311,578,825,535,314,700,000,000,000,000,000,000,000 | 9 | ext4: add more paranoia checking in ext4_expand_extra_isize handling
It's possible to specify a non-zero s_want_extra_isize via debugging
option, and this can cause bad things(tm) to happen when using a file
system with an inode size of 128 bytes.
Add better checking when the file system is mounted, as well as when
w... |
void ConnectionImpl::StreamImpl::resetStreamWorker(StreamResetReason reason) {
int rc = nghttp2_submit_rst_stream(parent_.session_, NGHTTP2_FLAG_NONE, stream_id_,
reason == StreamResetReason::LocalRefusedStreamReset
? NGHTTP2_REFUSED_STREAM... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 251,059,427,109,359,720,000,000,000,000,000,000,000 | 7 | 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... |
g_file_real_read_async (GFile *file,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data)
{
GTask *task;
task = g_task_new (fil... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 8,578,751,092,597,742,000,000,000,000,000,000,000 | 14 | 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... |
push_pattern(const char *path, VALUE ary, void *enc)
{
#if defined _WIN32 || defined __APPLE__
VALUE name = rb_utf8_str_new_cstr(path);
rb_encoding *eenc = rb_default_internal_encoding();
OBJ_TAINT(name);
name = rb_str_conv_enc(name, NULL, eenc ? eenc : enc);
#else
VALUE name = rb_external_str_new_w... | 0 | [
"CWE-22"
] | ruby | bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8 | 72,830,912,625,087,540,000,000,000,000,000,000,000 | 12 | dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.