func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void bdrv_dmg_init(void)
{
bdrv_register(&bdrv_dmg);
} | 0 | [
"CWE-119"
] | qemu | f0dce23475b5af5da6b17b97c1765271307734b6 | 304,744,324,836,693,270,000,000,000,000,000,000,000 | 4 | dmg: prevent chunk buffer overflow (CVE-2014-0145)
Both compressed and uncompressed I/O is buffered. dmg_open() calculates
the maximum buffer size needed from the metadata in the image file.
There is currently a buffer overflow since ->lengths[] is accounted
against the maximum compressed buffer size but actually us... |
static int hls_slice_data_wpp(HEVCContext *s, const H2645NAL *nal)
{
const uint8_t *data = nal->data;
int length = nal->size;
HEVCLocalContext *lc = s->HEVClc;
int *ret = av_malloc_array(s->sh.num_entry_point_offsets + 1, sizeof(int));
int *arg = av_malloc_array(s->sh.num_entry_point_offset... | 0 | [
"CWE-476"
] | FFmpeg | 9ccc633068c6fe76989f487c8932bd11886ad65b | 307,973,878,211,670,470,000,000,000,000,000,000,000 | 97 | avcodec/hevcdec: Avoid only partly skiping duplicate first slices
Fixes: NULL pointer dereference and out of array access
Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432
Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304
This also fi... |
void copy_array(VALUE_TYPE* dst, const VALUE_TYPE* src, INDEX_TYPE size) {
memcpy(dst, src, size * sizeof(VALUE_TYPE));
} | 0 | [
"CWE-131",
"CWE-369"
] | tensorflow | f94ef358bb3e91d517446454edff6535bcfe8e4a | 12,092,980,244,037,493,000,000,000,000,000,000,000 | 3 | Fix `tf.raw_ops.RaggedTensorToTensor` failing CHECK in `tensor.cc`.
PiperOrigin-RevId: 368300502
Change-Id: I91255d23c4bfd3aa3c029aac773937c09daf3c64 |
static BOOL autodetect_send_continuous_bandwidth_measure_stop(rdpContext* context,
UINT16 sequenceNumber)
{
return autodetect_send_bandwidth_measure_stop(context, 0, sequenceNumber,
RDP_BW_STOP_REQUEST_TYPE_CON... | 0 | [
"CWE-125"
] | FreeRDP | f5e73cc7c9cd973b516a618da877c87b80950b65 | 2,918,380,096,009,401,000,000,000,000,000,000,000 | 6 | Fixed #6009: Bounds checks in autodetect_recv_bandwidth_measure_results |
static void CloseDecoder( vlc_object_t *p_this )
{
decoder_t *p_dec = (decoder_t *)p_this;
decoder_sys_t *p_sys = p_dec->p_sys;
schro_decoder_free( p_sys->p_schro );
free( p_sys );
} | 0 | [
"CWE-120",
"CWE-787"
] | vlc | 9bb0353a5c63a7f8c6fc853faa3df4b4df1f5eb5 | 133,332,750,252,821,620,000,000,000,000,000,000,000 | 8 | codec: schroedinger: fix potential buffer overflow.
The variable len is a raw 32 bit value read using GetDWBE. If this
value is larger than UINT32_MAX - sizeof(eos), this will cause an
integer overflow in the subsequent call to malloc, and finally a
buffer overflow when calling memcpy. We fix this by checking len
acco... |
static int fb_check_caps(struct fb_info *info, struct fb_var_screeninfo *var,
u32 activate)
{
struct fb_event event;
struct fb_blit_caps caps, fbcaps;
int err = 0;
memset(&caps, 0, sizeof(caps));
memset(&fbcaps, 0, sizeof(fbcaps));
caps.flags = (activate & FB_ACTIVATE_ALL) ? 1 : 0;
event.info = info;
event... | 0 | [
"CWE-703",
"CWE-189"
] | linux | fc9bbca8f650e5f738af8806317c0a041a48ae4a | 288,529,057,135,773,170,000,000,000,000,000,000,000 | 22 | vm: convert fb_mmap to vm_iomap_memory() helper
This is my example conversion of a few existing mmap users. The
fb_mmap() case is a good example because it is a bit more complicated
than some: fb_mmap() mmaps one of two different memory areas depending
on the page offset of the mmap (but happily there is never any mi... |
static void parse_data_for_row_grayscale(TGAContext *ctx)
{
guchar *s = ctx->in->data;
guint upper_bound = ctx->pbuf->width;
guchar *p = ctx->pptr;
for (; upper_bound; upper_bound--) {
p[0] = p[1] = p[2] = *s++;
if (ctx->pbuf->n_channels == 4)
p[3] = *s++;
p += ctx->pbuf->n_channels;
}
} | 0 | [
"CWE-119"
] | gdk-pixbuf | edf6fb8d856574bc3bb3a703037f56533229267c | 542,120,532,318,837,800,000,000,000,000,000,000 | 13 | tga: Wrap TGAColormap struct in its own API
Instead of poking into it directly. |
httpReadRequest(http_t *http, /* I - HTTP connection */
char *uri, /* I - URI buffer */
size_t urilen) /* I - Size of URI buffer */
{
char line[4096], /* HTTP request line */
*req_method, /* HTTP request method */
*req_uri, /* HTTP request URI */
*req_version; /* HTTP request version... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 256,485,566,580,968,100,000,000,000,000,000,000,000 | 153 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
Http::Stream::getClientReplyContext() const
{
return static_cast<clientStreamNode *>(http->client_stream.tail->prev->data);
} | 0 | [
"CWE-20"
] | squid | 6c9c44d0e9cf7b72bb233360c5308aa063af3d69 | 12,524,861,864,201,407,000,000,000,000,000,000,000 | 4 | Handle more partial responses (#791) |
void gnutls_session_enable_compatibility_mode(gnutls_session_t session)
{
ENABLE_COMPAT(&session->internals.priorities);
} | 0 | [
"CWE-400"
] | gnutls | 1ffb827e45721ef56982d0ffd5c5de52376c428e | 96,839,545,856,524,700,000,000,000,000,000,000,000 | 4 | handshake: set a maximum number of warning messages that can be received per handshake
That is to avoid DoS due to the assymetry of cost of sending an alert vs the cost
of processing. |
pdf_filter_v(fz_context *ctx, pdf_processor *proc, float x2, float y2, float x3, float y3)
{
pdf_filter_processor *p = (pdf_filter_processor*)proc;
filter_flush(ctx, p, FLUSH_CTM);
if (p->chain->op_v)
p->chain->op_v(ctx, p->chain, x2, y2, x3, y3);
} | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 159,585,093,910,079,100,000,000,000,000,000,000,000 | 7 | Bug 701292: Fix test for missing/empty string. |
static void tsc2102_audio_rate_update(TSC210xState *s)
{
const TSC210xRateInfo *rate;
s->codec.tx_rate = 0;
s->codec.rx_rate = 0;
if (s->dac_power & (1 << 15)) /* PWDNC */
return;
for (rate = tsc2102_rates; rate->rate; rate ++)
if (rate->dsor == (s->audio_ctrl1 & 0x3f) && /* DA... | 0 | [
"CWE-119"
] | qemu | 5193be3be35f29a35bc465036cd64ad60d43385f | 201,630,514,853,250,650,000,000,000,000,000,000,000 | 20 | tsc210x: fix buffer overrun on invalid state load
CVE-2013-4539
s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.
Validate after load to avoid buffer overrun.
Cc: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael S. Tsirkin <mst... |
bool file_is_kvm(struct file *file)
{
return file && file->f_op == &kvm_vm_fops;
} | 0 | [
"CWE-119"
] | linux | f8be156be163a052a067306417cd0ff679068c97 | 162,287,372,754,614,980,000,000,000,000,000,000,000 | 4 | KVM: do not allow mapping valid but non-reference-counted pages
It's possible to create a region which maps valid but non-refcounted
pages (e.g., tail pages of non-compound higher order allocations). These
host pages can then be returned by gfn_to_page, gfn_to_pfn, etc., family
of APIs, which take a reference to the p... |
ssize_t tpm_show_temp_deactivated(struct device * dev,
struct device_attribute * attr, char *buf)
{
cap_t cap;
ssize_t rc;
rc = tpm_getcap(dev, TPM_CAP_FLAG_VOL, &cap,
"attempting to determine the temporary state");
if (rc)
return 0;
rc = sprintf(buf, "%d\n", cap.stclear_flags.deactivated);
return rc;... | 0 | [
"CWE-200"
] | linux | 1309d7afbed112f0e8e90be9af975550caa0076b | 216,047,422,571,264,900,000,000,000,000,000,000,000 | 14 | char/tpm: Fix unitialized usage of data buffer
This patch fixes information leakage to the userspace by initializing
the data buffer to zero.
Reported-by: Peter Huewe <huewe.external@infineon.com>
Signed-off-by: Peter Huewe <huewe.external@infineon.com>
Signed-off-by: Marcel Selhorst <m.selhorst@sirrix.com>
[ Also re... |
compileSwapDots(const FileInfo *file, CharsString *source, CharsString *dest) {
int k = 0;
int kk = 0;
CharsString dotsSource;
CharsString dotsDest;
dest->length = 0;
dotsSource.length = 0;
while (k <= source->length) {
if (source->chars[k] != ',' && k != source->length)
dotsSource.chars[dotsSource.length++... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 333,959,234,509,165,500,000,000,000,000,000,000,000 | 21 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
return _select(disp,title,feature_type,axis,align,exit_on_anykey,0,false,false,false);
}
CImg<intT> _select(CImgDisplay &disp, const char *const title, const bool feature_type,
const char axis, const float align, const bool exit_on_anykey,
const unsigned int ... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 150,327,648,716,483,220,000,000,000,000,000,000,000 | 234 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
png_read_chunk_header(png_structrp png_ptr)
{
png_byte buf[8];
png_uint_32 length;
#ifdef PNG_IO_STATE_SUPPORTED
png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR;
#endif
/* Read the length and the chunk name.
* This must be performed in a single I/O call.
*/
png_read_data(png_ptr, buf, 8);... | 0 | [
"CWE-20"
] | libpng | 347538efbdc21b8df684ebd92d37400b3ce85d55 | 269,063,298,700,230,940,000,000,000,000,000,000,000 | 50 | [libng16] Check length of all chunks except IDAT against user limit. |
void *Type_Curve_Read(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsUInt32Number* nItems, cmsUInt32Number SizeOfTag)
{
cmsUInt32Number Count;
cmsToneCurve* NewGamma;
*nItems = 0;
if (!_cmsReadUInt32Number(io, &Count)) return NULL;
switch (Count) {
case 0: // Linear.
... | 0 | [
"CWE-125"
] | Little-CMS | d41071eb8cfea7aa10a9262c12bd95d5d9d81c8f | 18,761,562,645,950,675,000,000,000,000,000,000,000 | 51 | Contributed fixes from Oracle
Two minor glitches |
bool Arg_comparator::set_cmp_func_native()
{
THD *thd= current_thd;
m_compare_collation= &my_charset_numeric;
func= is_owner_equal_func() ? &Arg_comparator::compare_e_native :
&Arg_comparator::compare_native;
a= cache_converted_constant(thd, a, &a_cache, compare_type_handler());
... | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 4,555,667,635,023,327,000,000,000,000,000,000,000 | 10 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
sprint_realloc_integer(u_char ** buf, size_t * buf_len, size_t * out_len,
int allow_realloc,
const netsnmp_variable_list * var,
const struct enum_list *enums,
const char *hint, const char *units)
{
char *enum_strin... | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 265,964,940,125,170,850,000,000,000,000,000,000,000 | 81 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
virtual void reset_fields() {} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 103,065,204,980,878,100,000,000,000,000,000,000,000 | 1 | 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 void enter_pmode(struct kvm_vcpu *vcpu)
{
unsigned long flags;
struct vcpu_vmx *vmx = to_vmx(vcpu);
vmx->emulation_required = 1;
vcpu->arch.rmode.active = 0;
vmcs_writel(GUEST_TR_BASE, vcpu->arch.rmode.tr.base);
vmcs_write32(GUEST_TR_LIMIT, vcpu->arch.rmode.tr.limit);
vmcs_write32(GUEST_TR_AR_BYTES, vcp... | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 210,035,074,010,234,540,000,000,000,000,000,000,000 | 37 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
static void spl_heap_it_get_current_data(zend_object_iterator *iter, zval ***data TSRMLS_DC) /* {{{ */
{
spl_heap_it *iterator = (spl_heap_it *)iter;
zval **element = (zval **)&iterator->object->heap->elements[0];
if (iterator->object->heap->flags & SPL_HEAP_CORRUPTED) {
zend_throw_exception(spl_ce_Runti... | 0 | [] | php-src | 1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1 | 23,771,290,707,916,590,000,000,000,000,000,000,000 | 16 | Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error |
static PHP_MINFO_FUNCTION(cli_server)
{
DISPLAY_INI_ENTRIES();
} | 0 | [] | php-src | 2438490addfbfba51e12246a74588b2382caa08a | 318,142,055,066,309,140,000,000,000,000,000,000,000 | 4 | slim post data |
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,(size_t)csiz,nfile); \
if (is_bool) { \
CImg<ucharT> raw(W... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 184,076,835,200,222,400,000,000,000,000,000,000,000 | 128 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int ext4_dio_get_block_unwritten_sync(struct inode *inode,
sector_t iblock, struct buffer_head *bh_result, int create)
{
int ret;
/* We don't expect handle for direct IO */
WARN_ON_ONCE(ext4_journal_current_handle());
ret = ext4_get_block_trans(inode, iblock, bh_result,
EXT4_GET_BLOCKS_IO_CREATE_E... | 0 | [
"CWE-200"
] | linux | 06bd3c36a733ac27962fea7d6f47168841376824 | 185,834,132,849,686,100,000,000,000,000,000,000,000 | 21 | ext4: fix data exposure after a crash
Huang has reported that in his powerfail testing he is seeing stale
block contents in some of recently allocated blocks although he mounts
ext4 in data=ordered mode. After some investigation I have found out
that indeed when delayed allocation is used, we don't add inode to
transa... |
TRI_action_result_t execute(TRI_vocbase_t* vocbase, GeneralRequest* request,
GeneralResponse* response, Mutex* dataLock,
void** data) override {
TRI_action_result_t result;
// allow use database execution in rest calls?
bool allowUseDatabase = _... | 0 | [
"CWE-918"
] | arangodb | d9b7f019d2435f107b19a59190bf9cc27d5f34dd | 92,809,336,205,739,990,000,000,000,000,000,000,000 | 64 | [APM-78] Disable installation from remote URL (#15292) |
TfLiteStatus Subgraph::Invoke() {
if (!consistent_) {
ReportError("Invoke called on model that is not consistent.");
return kTfLiteError;
}
TfLiteStatus status = kTfLiteOk;
if (state_ == kStateUninvokable) {
ReportError("Invoke called on model that is not ready.");
return kTfLiteError;
} else... | 1 | [
"CWE-703",
"CWE-835"
] | tensorflow | c6173f5fe66cdbab74f4f869311fe6aae2ba35f4 | 59,111,674,417,907,900,000,000,000,000,000,000,000 | 104 | TFLite: Error out when the graph has a recurion.
Recursion is currently unsupported.
PiperOrigin-RevId: 371708957
Change-Id: I8dfad0d85cbfe08e39ae8ea7bad21254ddee5003 |
void parse_resource_manager_string( const char *string, char **host,
char **port, char **service,
char **subject )
{
char *p;
char *q;
size_t len = strlen( string );
char *my_host = (char *)calloc( len+1, sizeof(char) );
char *my_port = (char *)calloc( len+1, sizeof(char) );
char *my_service = ... | 0 | [
"CWE-20"
] | htcondor | 2f3c393feb819cf6c6d06fb0a2e9c4e171f3c26d | 40,552,581,458,553,537,000,000,000,000,000,000,000 | 67 | (#6455) Fix issue validating VOMS proxies |
QPDF_BOOL qpdf_allow_modify_assembly(qpdf_data qpdf)
{
QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_assembly");
return qpdf->qpdf->allowModifyAssembly();
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 276,068,718,846,880,300,000,000,000,000,000,000,000 | 5 | 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 ... |
void nfs_write_prepare(struct rpc_task *task, void *calldata)
{
struct nfs_write_data *data = calldata;
NFS_PROTO(data->header->inode)->write_rpc_prepare(task, data);
if (unlikely(test_bit(NFS_CONTEXT_BAD, &data->args.context->flags)))
rpc_exit(task, -EIO);
} | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 93,891,498,584,659,610,000,000,000,000,000,000,000 | 7 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
//! Fill sequentially all pixel values with specified values \newinstance.
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
const T& val6, const T& val7) const {
return CImg<T>(_width,_height,_depth,_spectrum).fill(val0,val1,va... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 191,145,381,432,545,430,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
char *first_word(const char *s, const char *t) {
static char retbuf[2][MAX_TEMPSTR + 1]; /* sure wish C had GC */
static int retsel = 0;
char *rb, *rp;
/* select a return buffer */
retsel = 1 - retsel;
rb = &retbuf[retsel][0];
rp = rb;
/* skip any leading terminators */
while (*s && (NULL != strchr(t, *s))) ... | 0 | [
"CWE-476"
] | cronie | a6576769f01325303b11edc3e0cfb05ef382ce56 | 114,795,808,409,081,490,000,000,000,000,000,000,000 | 24 | Fix CVE-2019-9704 and CVE-2019-9705
The users can cause DoS of the crond by loading huge crontab files.
We now allow maximum 1000 environment variables and 1000 crontab entries.
Also the comments and whitespace between the entries and variables
are now limited to 32768 characters. |
static bool sanity(const struct iov_iter *i)
{
struct pipe_inode_info *pipe = i->pipe;
int idx = i->idx;
int next = pipe->curbuf + pipe->nrbufs;
if (i->iov_offset) {
struct pipe_buffer *p;
if (unlikely(!pipe->nrbufs))
goto Bad; // pipe must be non-empty
if (unlikely(idx != ((next - 1) & (pipe->buffers - 1)... | 0 | [
"CWE-200"
] | linux | b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb | 103,778,311,112,302,390,000,000,000,000,000,000,000 | 33 | fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buffers. If that happened, none of them had been released,
leaving pipe full. Worse, it was trivial to trigger and we end up ... |
void encode_encrypt_enc_bl(CephContext *cct, const T& t, const CryptoKey& key,
bufferlist& out, std::string &error)
{
bufferlist bl;
__u8 struct_v = 1;
::encode(struct_v, bl);
uint64_t magic = AUTH_ENC_MAGIC;
::encode(magic, bl);
::encode(t, bl);
key.encrypt(cct, bl, out, &error);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 266,927,076,350,263,900,000,000,000,000,000,000,000 | 12 | 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 ... |
tls_getc(void)
{
if (ssl_xfer_buffer_lwm >= ssl_xfer_buffer_hwm)
{
int error;
int inbytes;
DEBUG(D_tls) debug_printf("Calling SSL_read(%p, %p, %u)\n", ssl,
ssl_xfer_buffer, ssl_xfer_buffer_size);
if (smtp_receive_timeout > 0) alarm(smtp_receive_timeout);
inbytes = SSL_read(ssl, CS ssl_xfer_buffer, ssl... | 0 | [] | exim | 7be682ca5ebd9571a01b762195b11c34cd231830 | 227,250,426,444,218,680,000,000,000,000,000,000,000 | 66 | TLS SNI support for OpenSSL ($tls_sni) |
(InitializerContext* context) {
auto& compressorRegistry = MessageCompressorRegistry::get();
compressorRegistry.registerImplementation(stdx::make_unique<SnappyMessageCompressor>());
return Status::OK();
} | 0 | [] | mongo | 5ad69b851801edadbfde8fdf271f4ba7c21170b5 | 212,016,445,157,840,000,000,000,000,000,000,000,000 | 5 | SERVER-31273 Use Source/Sink version of snappy functions
(cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99) |
find_expiring_intro_point(rend_service_t *service, origin_circuit_t *circ)
{
tor_assert(service);
tor_assert(TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_ESTABLISH_INTRO ||
TO_CIRCUIT(circ)->purpose == CIRCUIT_PURPOSE_S_INTRO);
SMARTLIST_FOREACH(service->expiring_nodes, rend_intro_point_t *,
... | 0 | [
"CWE-532"
] | tor | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 | 174,393,387,982,940,870,000,000,000,000,000,000,000 | 14 | Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380 |
struct git_attr *git_attr(const char *name, int len)
{
unsigned hval = hash_name(name, len);
unsigned pos = hval % HASHSIZE;
struct git_attr *a;
for (a = git_attr_hash[pos]; a; a = a->next) {
if (a->h == hval &&
!memcmp(a->name, name, len) && !a->name[len])
return a;
}
if (invalid_attr_name(name, len... | 0 | [] | git | f66cf96d7c613a8129436a5d76ef7b74ee302436 | 18,945,733,626,699,440,000,000,000,000,000,000,000 | 29 | Fix buffer overflow in prepare_attr_stack
If PATH_MAX on your system is smaller than a path stored in the git repo,
it may cause the buffer overflow in prepare_attr_stack.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static client_entry *get_client(unsigned long key, const request_rec *r)
{
int bucket;
client_entry *entry, *prev = NULL;
if (!key || !client_shm) return NULL;
bucket = key % client_list->tbl_len;
entry = client_list->table[bucket];
apr_global_mutex_lock(client_lock);
while (entry && ... | 0 | [
"CWE-787"
] | httpd | 3b6431eb9c9dba603385f70a2131ab4a01bf0d3b | 255,265,518,155,950,140,000,000,000,000,000,000,000 | 37 | Merge r1885659 from trunk:
mod_auth_digest: Fast validation of the nonce's base64 to fail early if
the format can't match anyway.
Submitted by: ylavic
Reviewed by: ylavic, covener, jailletc36
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885666 13f79535-47bb-0310-9956-ffa... |
uint32_t writeStructEnd() {
T_VIRTUAL_CALL();
return writeStructEnd_virt();
} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 262,716,645,175,616,400,000,000,000,000,000,000,000 | 4 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
static void ip6_dst_ifdown(struct dst_entry *dst, struct net_device *dev,
int how)
{
struct rt6_info *rt = (struct rt6_info *)dst;
struct inet6_dev *idev = rt->rt6i_idev;
struct net_device *loopback_dev =
dev_net(dev)->loopback_dev;
if (dev != loopback_dev) {
if (idev && idev->dev == dev) {
struct ine... | 0 | [
"CWE-119"
] | net | c88507fbad8055297c1d1e21e599f46960cbee39 | 206,438,008,341,501,960,000,000,000,000,000,000,000 | 19 | ipv6: don't set DST_NOCOUNT for remotely added routes
DST_NOCOUNT should only be used if an authorized user adds routes
locally. In case of routes which are added on behalf of router
advertisments this flag must not get used as it allows an unlimited
number of routes getting added remotely.
Signed-off-by: Sabrina Dub... |
rsvg_paint_server_solid_current_colour (void)
{
RsvgPaintServer *result = g_new (RsvgPaintServer, 1);
result->refcnt = 1;
result->type = RSVG_PAINT_SERVER_SOLID;
result->core.colour = g_new (RsvgSolidColour, 1);
result->core.colour->currentcolour = TRUE;
return result;
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 238,259,561,411,479,030,000,000,000,000,000,000,000 | 11 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
gx_dc_shading_path_add_box(gx_path *ppath, const gx_device_color * pdevc)
{
gs_pattern2_instance_t *pinst = (gs_pattern2_instance_t *)pdevc->ccolor.pattern;
const gs_shading_t *psh = pinst->templat.Shading;
if (!psh->params.have_BBox)
return_error(gs_error_unregistered); /* Do not call in this case... | 0 | [
"CWE-704"
] | ghostpdl | 693baf02152119af6e6afd30bb8ec76d14f84bbf | 206,524,203,317,225,800,000,000,000,000,000,000,000 | 13 | PS interpreter - check the Implementation of a Pattern before use
Bug #700141 "Type confusion in setpattern"
As the bug thread says, we were not checking that the Implementation
of a pattern dictionary was a structure type, leading to a crash when
we tried to treat it as one.
Here we make the st_pattern1_instance an... |
ProcessInput(ibuf, ilen)
char *ibuf;
int ilen;
{
int ch, slen;
unsigned char *s, *q;
int i, l;
char *p;
debug1("ProcessInput: %d bytes\n", ilen);
if (display == 0 || ilen == 0)
return;
if (D_seql)
evdeq(&D_mapev);
slen = ilen;
s = (unsigned char *)ibuf;
while (ilen-- > 0)
{
ch = *... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 260,330,274,887,260,770,000,000,000,000,000,000,000 | 130 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
static int nfs_inode_attrs_need_update(const struct inode *inode, const struct nfs_fattr *fattr)
{
const struct nfs_inode *nfsi = NFS_I(inode);
return ((long)fattr->gencount - (long)nfsi->attr_gencount) > 0 ||
nfs_ctime_need_update(inode, fattr) ||
nfs_size_need_update(inode, fattr) ||
((long)nfsi->attr_gencou... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 172,540,536,083,079,150,000,000,000,000,000,000,000 | 9 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static void ttml_reset_intervals(GF_TXTIn *ctx)
{
while (gf_list_count(ctx->intervals)) {
TTMLInterval *ival = gf_list_pop_back(ctx->intervals);
if (ival->resources) {
while (gf_list_count(ival->resources)) {
TTMLRes *ires = gf_list_pop_back(ival->resources);
if (!ires->global) {
gf_free(ires->data... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 117,013,145,182,130,400,000,000,000,000,000,000,000 | 17 | fixed #2061 |
adjust_padlen(int minlen, int vallen, int leftjust, int *padlen)
{
*padlen = minlen - vallen;
if (*padlen < 0)
*padlen = 0;
if (leftjust)
*padlen = -(*padlen);
} | 0 | [
"CWE-787"
] | postgres | 29725b3db67ad3f09da1a7fb6690737d2f8d6c0a | 330,323,078,060,601,330,000,000,000,000,000,000,000 | 8 | port/snprintf(): fix overflow and do padding
Prevent port/snprintf() from overflowing its local fixed-size
buffer and pad to the desired number of digits with zeros, even
if the precision is beyond the ability of the native sprintf().
port/snprintf() is only used on systems that lack a native
snprintf().
Reported by... |
__fastcall TSaveWorkspaceDialog::TSaveWorkspaceDialog(
bool CanSavePasswords, bool NotRecommendedSavingPasswords) :
TCustomDialog(HELP_WORKSPACE_SAVE)
{
Caption = LoadStr(SAVE_WORKSPACE_CAPTION);
WorkspaceNameCombo = new TComboBox(this);
WorkspaceNameCombo->AutoComplete = false;
AddComboBox(Works... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 315,772,383,829,555,020,000,000,000,000,000,000,000 | 25 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
int main()
{
try
{
test();
}
catch (std::exception& e)
{
std::cout << "unexpected exception: " << e.what() << std::endl;
exit(2);
}
std::cout << "done" << std::endl;
return 0;
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 67,843,595,986,014,160,000,000,000,000,000,000,000 | 14 | 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 void vmx_hardware_disable(void)
{
vmclear_local_loaded_vmcss();
if (cpu_vmxoff())
kvm_spurious_fault();
intel_pt_handle_vmx(0);
} | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 331,592,464,401,148,340,000,000,000,000,000,000,000 | 9 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
void *buf, int len, int write)
{
resource_size_t phys_addr;
unsigned long prot = 0;
void __iomem *maddr;
int offset = addr & (PAGE_SIZE-1);
if (follow_phys(vma, addr, write, &prot, &phys_addr))
return -EINVAL;
maddr = ioremap_prot(phys... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 21,948,927,466,611,860,000,000,000,000,000,000,000 | 20 | 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 void stbi__start_callbacks(stbi__context *s, stbi_io_callbacks *c, void *user)
{
s->io = *c;
s->io_user_data = user;
s->buflen = sizeof(s->buffer_start);
s->read_from_callbacks = 1;
s->callback_already_read = 0;
s->img_buffer = s->img_buffer_original = s->buffer_start;
stbi__refill_buffer(s)... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 194,748,135,388,515,700,000,000,000,000,000,000,000 | 11 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
static int __init i8042_check_mux(void)
{
unsigned char mux_version;
if (i8042_set_mux_mode(true, &mux_version))
return -1;
pr_info("Detected active multiplexing controller, rev %d.%d\n",
(mux_version >> 4) & 0xf, mux_version & 0xf);
/*
* Disable all muxed ports by disabling AUX.
*/
i8042_ctr |= I8042_CTR_... | 0 | [
"CWE-476"
] | linux | 340d394a789518018f834ff70f7534fc463d3226 | 280,144,910,225,924,180,000,000,000,000,000,000,000 | 25 | Input: i8042 - fix crash at boot time
The driver checks port->exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port->exists may
change between the 2 checks, and we may end up calling serio_int... |
ObjectTerminateEvent(
void
)
{
HASH_OBJECT *hashObject;
int count;
BYTE buffer[MAX_DIGEST_SIZE];
hashObject = (HASH_OBJECT *)HandleToObject(g_DRTMHandle);
// Don't assume that this is a proper sequence object
if(hashObject->attributes.eventS... | 0 | [
"CWE-119"
] | libtpms | ea62fd9679f8c6fc5e79471b33cfbd8227bfed72 | 239,352,339,286,599,480,000,000,000,000,000,000,000 | 24 | tpm2: Initialize a whole OBJECT before using it
Initialize a whole OBJECT before using it. This is necessary since
an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT
union and that HASH_OBJECT can leave bad size inidicators in TPM2B
buffer in the OBJECT. To get rid of this problem we reset the whole
OBJECT... |
static bool key_gc_keyring(struct key *keyring, time_t limit)
{
struct keyring_list *klist;
struct key *key;
int loop;
kenter("%x", key_serial(keyring));
if (test_bit(KEY_FLAG_REVOKED, &keyring->flags))
goto dont_gc;
/* scan the keyring looking for dead keys */
klist = rcu_dereference(keyring->payload.subsc... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 155,665,429,720,821,520,000,000,000,000,000,000,000 | 36 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static int compat_table_info(const struct xt_table_info *info,
struct xt_table_info *newinfo)
{
struct ip6t_entry *iter;
const void *loc_cpu_entry;
int ret;
if (!newinfo || !info)
return -EINVAL;
/* we dont care about newinfo->entries */
memcpy(newinfo, info, offsetof(struct xt_table_info, entries));
... | 0 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 259,812,702,660,997,620,000,000,000,000,000,000,000 | 24 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
static inline int f2fs_trylock_op(struct f2fs_sb_info *sbi)
{
return down_read_trylock(&sbi->cp_rwsem);
} | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 287,905,601,365,546,700,000,000,000,000,000,000,000 | 4 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
enum_value_is_deprecated(agooErr err, gqlDoc doc, gqlCobj obj, gqlField field, gqlSel sel, gqlValue result, int depth) {
const char *key = sel->name;
if (NULL != sel->alias) {
key = sel->alias;
}
return gql_object_set(err, result, key, gql_bool_create(err, is_deprecated(((gqlEnumVal)obj->ptr)->dir)));... | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 263,395,262,255,317,740,000,000,000,000,000,000,000 | 8 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
httpErrorStreamHandler(int status,
FdEventHandlerPtr event,
StreamRequestPtr srequest)
{
HTTPConnectionPtr connection = srequest->data;
if(status == 0 && !streamRequestDone(srequest))
return 0;
httpClientFinish(connection, 1);
return 1;
} | 0 | [
"CWE-617"
] | polipo | 0e2b44af619e46e365971ea52b97457bc0778cd3 | 53,478,896,380,600,360,000,000,000,000,000,000,000 | 12 | Try to read POST requests to local configuration interface correctly. |
void ath9k_deinit_wmi(struct ath9k_htc_priv *priv)
{
struct wmi *wmi = priv->wmi;
mutex_lock(&wmi->op_mutex);
wmi->stopped = true;
mutex_unlock(&wmi->op_mutex);
kfree(priv->wmi);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 728c1e2a05e4b5fc52fab3421dce772a806612a2 | 82,540,342,131,940,660,000,000,000,000,000,000,000 | 10 | ath9k: release allocated buffer if timed out
In ath9k_wmi_cmd, the allocated network buffer needs to be released
if timeout happens. Otherwise memory will be leaked.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
f_deletebufline(typval_T *argvars, typval_T *rettv)
{
buf_T *buf;
linenr_T first, last;
linenr_T lnum;
long count;
int is_curbuf;
buf_T *curbuf_save = NULL;
win_T *curwin_save = NULL;
tabpage_T *tp;
win_T *wp;
buf = tv_get_buf(&argvars[0], FALSE);
if (buf == NULL)
{
re... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 139,993,205,354,042,390,000,000,000,000,000,000,000 | 80 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
xfs_file_fsync(
struct file *file,
loff_t start,
loff_t end,
int datasync)
{
struct inode *inode = file->f_mapping->host;
struct xfs_inode *ip = XFS_I(inode);
struct xfs_mount *mp = ip->i_mount;
int error = 0;
int log_flushed = 0;
xfs_lsn_t lsn = 0;
trace_xfs_file_fsync(ip);
error = filemap_w... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8d0207652cbe27d1f962050737848e5ad4671958 | 233,297,189,361,155,250,000,000,000,000,000,000,000 | 68 | ->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... |
void Http2Session::AltSvc(int32_t id,
uint8_t* origin,
size_t origin_len,
uint8_t* value,
size_t value_len) {
Http2Scope h2scope(this);
CHECK_EQ(nghttp2_submit_altsvc(session_, NGHTTP2_FLAG_NONE, id,
... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 165,282,270,585,036,490,000,000,000,000,000,000,000 | 9 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
input_csi_dispatch_winops(struct input_ctx *ictx)
{
struct window_pane *wp = ictx->wp;
int n, m;
m = 0;
while ((n = input_get(ictx, m, 0, -1)) != -1) {
switch (n) {
case 1:
case 2:
case 5:
case 6:
case 7:
case 11:
case 13:
case 14:
case 19:
case 20:
case 21:
case 24:
break;
case 3... | 0 | [] | tmux | 2ffbd5b5f05dded1564ba32a6a00b0b417439b2f | 303,700,139,541,154,100,000,000,000,000,000,000,000 | 46 | When searching for tabs, start from screen width, fixes out-of-bounds
read found by Kuang-che Wu. |
int config_ep_by_speed_and_alt(struct usb_gadget *g,
struct usb_function *f,
struct usb_ep *_ep,
u8 alt)
{
struct usb_endpoint_descriptor *chosen_desc = NULL;
struct usb_interface_descriptor *int_desc = NULL;
struct usb_descriptor_header **speed_desc = NULL;
struct usb_ss_ep_comp_descriptor *comp_desc ... | 0 | [
"CWE-476"
] | linux | 75e5b4849b81e19e9efe1654b30d7f3151c33c2c | 258,066,606,546,683,350,000,000,000,000,000,000,000 | 123 | USB: gadget: validate interface OS descriptor requests
Stall the control endpoint in case provided index exceeds array size of
MAX_CONFIG_INTERFACES or when the retrieved function pointer is null.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregk... |
SPL_METHOD(SplFileObject, setMaxLineLen)
{
zend_long max_len;
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
if (zend_parse_parameters(ZEND_NUM_ARGS(), "l", &max_len) == FAILURE) {
return;
}
if (max_len < 0) {
zend_throw_exception_ex(spl_ce_DomainException, 0, "Maximum line length must be gre... | 0 | [
"CWE-74"
] | php-src | a5a15965da23c8e97657278fc8dfbf1dfb20c016 | 126,746,892,113,207,360,000,000,000,000,000,000,000 | 17 | Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings. |
static void kvm_put_guest_fpu(struct kvm_vcpu *vcpu)
{
preempt_disable();
copy_fpregs_to_fpstate(&vcpu->arch.guest_fpu);
copy_kernel_to_fpregs(&vcpu->arch.user_fpu.state);
preempt_enable();
++vcpu->stat.fpu_reload;
trace_kvm_fpu(0);
} | 0 | [
"CWE-476"
] | linux | e97f852fd4561e77721bb9a4e0ea9d98305b1e93 | 127,580,545,513,098,320,000,000,000,000,000,000,000 | 9 | KVM: X86: Fix scan ioapic use-before-initialization
Reported by syzkaller:
BUG: unable to handle kernel NULL pointer dereference at 00000000000001c8
PGD 80000003ec4da067 P4D 80000003ec4da067 PUD 3f7bfa067 PMD 0
Oops: 0000 [#1] PREEMPT SMP PTI
CPU: 7 PID: 5059 Comm: debug Tainted: G OE 4.19.0-rc5 #16... |
int kvm_arch_init(void *opaque)
{
int r;
struct kvm_x86_ops *ops = opaque;
if (kvm_x86_ops) {
printk(KERN_ERR "kvm: already loaded the other module\n");
r = -EEXIST;
goto out;
}
if (!ops->cpu_has_kvm_support()) {
printk(KERN_ERR "kvm: no hardware support\n");
r = -EOPNOTSUPP;
goto out;
}
if (ops->d... | 0 | [
"CWE-369"
] | linux | 0185604c2d82c560dab2f2933a18f797e74ab5a8 | 339,587,410,625,124,700,000,000,000,000,000,000,000 | 59 | 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... |
static int server_socket_unix(const char *path, int access_mask) {
int sfd;
struct linger ling = {0, 0};
struct sockaddr_un addr;
struct stat tstat;
int flags =1;
int old_umask;
if (!path) {
return 1;
}
if ((sfd = new_socket_unix()) == -1) {
return 1;
}
/*
... | 0 | [
"CWE-189"
] | memcached | 6695ccbc525c36d693aaa3e8337b36aa0c784424 | 115,618,307,037,029,430,000,000,000,000,000,000,000 | 59 | Fix segfault on specially crafted packet. |
uint32_t writeFieldBegin(const char* name, const TType fieldType, const int16_t fieldId) {
T_VIRTUAL_CALL();
return writeFieldBegin_virt(name, fieldType, fieldId);
} | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 75,780,623,438,775,040,000,000,000,000,000,000,000 | 4 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
static const char *lookup_id(int id)
{
POST_ID *n;
static char out[40];
for (n = id_list; n->name; n++)
{
if (n->id == id)
return n->name;
}
sprintf(out, "ID=%d", id);
return out;
} | 0 | [] | openssl | 200f249b8c3b6439e0200d01caadc24806f1a983 | 27,356,224,048,977,395,000,000,000,000,000,000,000 | 12 | Remove Dual EC DRBG from FIPS module. |
do_set(
char_u *arg_start, // option string (may be written to!)
int opt_flags)
{
char_u *arg = arg_start;
int opt_idx;
char *errmsg;
char errbuf[80];
char_u *startarg;
int prefix; // 1: nothing, 0: "no", 2: "inv" in front of name
int nextchar; // next non-white char after op... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 260,159,967,684,281,700,000,000,000,000,000,000,000 | 993 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
download_requested_cb (WebKitWebView *web_view,
WebKitDownload *download,
EphyEmbed *embed)
{
/* Is download locked down? */
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_SAVE_TO_DISK))
return FALSE;
/* Wait for the request to be sent in all cases, so that we ... | 0 | [] | epiphany | 3e0f7dea754381c5ad11a06ccc62eb153382b498 | 159,243,803,189,888,210,000,000,000,000,000,000,000 | 26 | Report broken certs through the padlock icon
This uses a new feature in libsoup that reports through a
SoupMessageFlag whether the message is talking to a server that has a
trusted server.
Bug #600663 |
static void oss_helper_poll_out (void *opaque)
{
AudioState *s = opaque;
audio_run(s, "oss_poll_out");
} | 0 | [
"CWE-369"
] | qemu | 7a4ede0047a8613b0e3b72c9d351038f013dd357 | 161,589,849,299,310,710,000,000,000,000,000,000,000 | 5 | audio/oss: fix buffer pos calculation
Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api")
Reported-by: ziming zhang <ezrakiez@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200120101804.29578-1-kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
static int reencrypt_init(struct crypt_device *cd,
const char *name,
struct luks2_hdr *hdr,
const char *passphrase,
size_t passphrase_size,
int keyslot_old,
int keyslot_new,
const char *cipher,
const char *cipher_mode,
const struct crypt_params_reencrypt *params,
struct volume_key **vks)
{
bool mov... | 1 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 334,253,260,072,763,640,000,000,000,000,000,000,000 | 170 | 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... |
regset_search_body_position_lead(OnigRegSet* set,
const UChar* str, const UChar* end,
const UChar* start, const UChar* range, /* match start range */
const UChar* orig_range, /* data range */
OnigOptionType option, MatchArg* msas, int* rmatch_pos)
{
int r, n, i;
UChar *s,... | 1 | [
"CWE-125"
] | oniguruma | 778a43dd56925ed58bbe26e3a7bb8202d72c3f3f | 327,414,887,348,374,880,000,000,000,000,000,000,000 | 162 | fix #164: Integer overflow related to reg->dmax in search_in_range() |
static void usb_ohci_realize_pci(PCIDevice *dev, Error **errp)
{
Error *err = NULL;
OHCIPCIState *ohci = PCI_OHCI(dev);
dev->config[PCI_CLASS_PROG] = 0x10; /* OHCI */
dev->config[PCI_INTERRUPT_PIN] = 0x01; /* interrupt pin A */
usb_ohci_init(&ohci->state, DEVICE(dev), ohci->num_ports, 0,
... | 0 | [
"CWE-835"
] | qemu | 95ed56939eb2eaa4e2f349fe6dcd13ca4edfd8fb | 3,785,439,332,798,808,500,000,000,000,000,000,000 | 19 | usb: ohci: limit the number of link eds
The guest may builds an infinite loop with link eds. This patch
limit the number of linked ed to avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
int CLua::return_count(lua_State *ls, const char *format)
{
UNUSED(ls);
if (!format)
return 0;
const char *gs = strchr(format, '>');
if (gs)
return strlen(gs + 1);
const char *cs = strchr(format, ':');
if (cs && isdigit(*format))
{
char *es = nullptr;
int c... | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 153,603,964,404,599,000,000,000,000,000,000,000,000 | 26 | Disable lua load(), loadstring() bytcode loading |
void release_mounts(struct list_head *head)
{
struct mount *mnt;
while (!list_empty(head)) {
mnt = list_first_entry(head, struct mount, mnt_hash);
list_del_init(&mnt->mnt_hash);
if (mnt_has_parent(mnt)) {
struct dentry *dentry;
struct mount *m;
br_write_lock(&vfsmount_lock);
dentry = mnt->mnt_mount... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 3151527ee007b73a0ebd296010f1c0454a919c7d | 53,677,169,416,610,860,000,000,000,000,000,000,000 | 23 | userns: Don't allow creation if the user is chrooted
Guarantee that the policy of which files may be access that is
established by setting the root directory will not be violated
by user namespaces by verifying that the root directory points
to the root of the mount namespace at the time of user namespace
creation.
... |
static void *arm_iommu_alloc_attrs(struct device *dev, size_t size,
dma_addr_t *handle, gfp_t gfp, struct dma_attrs *attrs)
{
pgprot_t prot = __get_dma_pgprot(attrs, pgprot_kernel);
struct page **pages;
void *addr = NULL;
*handle = DMA_ERROR_CODE;
size = PAGE_ALIGN(size);
if (gfp & GFP_ATOMIC)
return __i... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 0ea1ec713f04bdfac343c9702b21cd3a7c711826 | 271,392,969,905,634,100,000,000,000,000,000,000,000 | 46 | ARM: dma-mapping: don't allow DMA mappings to be marked executable
DMA mapping permissions were being derived from pgprot_kernel directly
without using PAGE_KERNEL. This causes them to be marked with executable
permission, which is not what we want. Fix this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk... |
gs_window_set_monitor (GSWindow *window,
int monitor)
{
g_return_if_fail (GS_IS_WINDOW (window));
if (window->priv->monitor == monitor) {
return;
}
window->priv->monitor = monitor;
gtk_widget_queue_resize (GTK_WIDGET (window));
... | 0 | [] | gnome-screensaver | a5f66339be6719c2b8fc478a1d5fc6545297d950 | 264,476,659,213,814,300,000,000,000,000,000,000,000 | 15 | Ensure keyboard grab and unlock dialog exist after monitor removal
gnome-screensaver currently doesn't deal with monitors getting
removed properly. If the unlock dialog is on the removed monitor
then the unlock dialog and its associated keyboard grab are not
moved to an existing monitor when the monitor removal is pr... |
R_API RBinJavaAttrInfo *r_bin_java_deprecated_attr_new(RBinJavaObj *bin, ut8 *buffer, ut64 sz, ut64 buf_offset) {
RBinJavaAttrInfo *attr = NULL;
ut64 offset = 0;
attr = r_bin_java_default_attr_new (bin, buffer, sz, buf_offset);
offset += 6;
if (attr) {
attr->type = R_BIN_JAVA_ATTR_TYPE_DEPRECATED_ATTR;
attr->s... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 135,269,635,442,057,930,000,000,000,000,000,000,000 | 12 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
miniflow_extract(struct dp_packet *packet, struct miniflow *dst)
{
const struct pkt_metadata *md = &packet->md;
const void *data = dp_packet_data(packet);
size_t size = dp_packet_size(packet);
uint64_t *values = miniflow_values(dst);
struct mf_ctx mf = { FLOWMAP_EMPTY_INITIALIZER, values,
... | 1 | [
"CWE-400"
] | ovs | ad0d22f6435b43ecfc30c0e877d490d36721f200 | 27,382,272,081,777,070,000,000,000,000,000,000,000 | 277 | 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... |
bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table)
{
ulong access;
DBUG_ENTER("check_some_access");
/* This loop will work as long as we have less than 32 privileges */
for (access= 1; access < want_access ; access<<= 1)
{
if (access & want_access)
{
if (!check_access(thd, a... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 11,836,434,471,235,378,000,000,000,000,000,000,000 | 21 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static void rsp_increment(struct x86_emulate_ctxt *ctxt, int inc)
{
masked_increment(reg_rmw(ctxt, VCPU_REGS_RSP), stack_mask(ctxt), inc);
} | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 201,742,653,982,232,600,000,000,000,000,000,000,000 | 4 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
dwg_decode (Bit_Chain *restrict dat, Dwg_Data *restrict dwg)
{
int i;
char version[7];
dwg->num_object_refs = 0;
// dwg->num_layers = 0; // see now dwg->layer_control->num_entries
dwg->num_entities = 0;
dwg->num_objects = 0;
dwg->num_classes = 0;
dwg->thumbnail.size = 0;
dwg->thumbnail.chain = NULL;
... | 0 | [
"CWE-703",
"CWE-835"
] | libredwg | c6f6668b82bfe595899cc820279ac37bb9ef16f5 | 130,892,205,985,751,350,000,000,000,000,000,000,000 | 118 | cleanup tio.unknown
not needed anymore, we only have UNKNOWN_OBJ or UNKNOWN_ENT with full common
entity_data.
Fixes GH #178 heap_overflow2 |
void visit(PrecedenceClimbing & /*ope*/) override {
name = "PrecedenceClimbing";
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 211,653,666,604,966,200,000,000,000,000,000,000,000 | 3 | Fix #122 |
RawTile TileManager::getRegion( unsigned int res, int seq, int ang, int layers, unsigned int x, unsigned int y, unsigned int width, unsigned int height ){
// If our image type can directly handle region compositing, simply return that
if( image->regionDecoding() ){
if( loglevel >= 3 ){
*logfile << "TileM... | 0 | [
"CWE-190"
] | iipsrv | 882925b295a80ec992063deffc2a3b0d803c3195 | 92,332,863,440,237,680,000,000,000,000,000,000,000 | 204 | - Modified TileManager.cc to verify that malloc() has correctly allocated memory.
- Updated numerical types to std::size_t in RawTile.h, TileManager.cc, KakaduImage.cc, OpenJPEG.cc and Transforms.cc when allocating memory via new to avoid integer overflow - fixes remaining problems identified in https://github.com/ruve... |
createConnectPdu(IsoPresentation* self, BufferChain writeBuffer, BufferChain payload)
{
int contentLength = 0;
int i;
/* mode-selector */
contentLength += 5;
int normalModeLength = 0;
/* called- and calling-presentation-selector */
normalModeLength += 12;
int pclLength = 27; /* 35; *... | 0 | [
"CWE-703",
"CWE-835"
] | libiec61850 | cfa94cbf10302bedc779703f874ee2e8387a0721 | 281,141,914,977,182,260,000,000,000,000,000,000,000 | 90 | - fixed - Bug in presentation layer parser can cause infinite loop (LIB61850-302) |
static void init_thread_context(struct thread_context* thread_context, blosc2_context* context, int32_t tid)
{
int32_t ebsize;
thread_context->parent_context = context;
thread_context->tid = tid;
ebsize = context->blocksize + context->typesize * (int32_t)sizeof(int32_t);
thread_context->tmp_nbytes = (size_t... | 0 | [
"CWE-787"
] | c-blosc2 | c4c6470e88210afc95262c8b9fcc27e30ca043ee | 17,809,279,518,761,208,000,000,000,000,000,000,000 | 36 | Fixed asan heap buffer overflow when not enough space to write compressed block size. |
const CString& CZNC::GetHomePath() const { return CFile::GetHomePath(); } | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 278,283,056,990,207,560,000,000,000,000,000,000,000 | 1 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
*/
static inline void __skb_queue_head_init(struct sk_buff_head *list)
{
list->prev = list->next = (struct sk_buff *)list;
list->qlen = 0; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 174,715,000,178,954,400,000,000,000,000,000,000,000 | 5 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
QPDFWriter::writeXRefTable(trailer_e which, int first, int last, int size,
qpdf_offset_t prev, bool suppress_offsets,
int hint_id, qpdf_offset_t hint_offset,
qpdf_offset_t hint_length, int linearization_pass)
{
writeString("xref\n");
writeString(QUtil::int_to_string(first)... | 0 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 31,992,946,040,856,296,000,000,000,000,000,000,000 | 38 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
irc_nick_as_prefix (struct t_irc_server *server, struct t_irc_nick *nick,
const char *nickname, const char *force_color)
{
static char result[256];
char *color;
if (force_color)
color = strdup (force_color);
else if (nick)
color = strdup (nick->color);
else if (n... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 273,806,566,164,429,360,000,000,000,000,000,000,000 | 25 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
static int tg3_setup_fiber_mii_phy(struct tg3 *tp, int force_reset)
{
int current_link_up, err = 0;
u32 bmsr, bmcr;
u16 current_speed;
u8 current_duplex;
u32 local_adv, remote_adv;
tp->mac_mode |= MAC_MODE_PORT_MODE_GMII;
tw32_f(MAC_MODE, tp->mac_mode);
udelay(40);
tw32(MAC_EVENT, 0);
tw32_f(MAC_STATUS,
... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 209,830,494,904,852,100,000,000,000,000,000,000,000 | 162 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
SYSCALL_DEFINE1(ssetmask, int, newmask)
{
int old;
spin_lock_irq(¤t->sighand->siglock);
old = current->blocked.sig[0];
siginitset(¤t->blocked, newmask & ~(sigmask(SIGKILL)|
sigmask(SIGSTOP)));
recalc_sigpending();
spin_unlock_irq(¤t->sighand->siglock);
return old;
} | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 64,739,357,939,531,190,000,000,000,000,000,000,000 | 14 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
absl::optional<CelValue> UpstreamWrapper::operator[](CelValue key) const {
if (!key.IsString()) {
return {};
}
auto value = key.StringOrDie().value();
if (value == Address) {
auto upstream_host = info_.upstreamHost();
if (upstream_host != nullptr && upstream_host->address() != nullptr) {
retur... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 178,933,689,833,463,400,000,000,000,000,000,000,000 | 32 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static int display_update(void *handle, void *device,
int x, int y, int w, int h)
{
/* not implemented - eventually this will be used for progressive update */
return 0;
} | 0 | [] | ghostpdl | 514595fc2cc84f51efdef563cf7a35a0050902e5 | 74,699,623,194,092,030,000,000,000,000,000,000,000 | 6 | Bug 693038 - allow gsx to build against GTK+ 3.x
Patch from galtgendo@gmail.com applied with changes to maintain compatibility
with GTK+ 2.x, and replace a function deprecated in GTK+ 3.x.
This patch drops GTK+ 1.x support.
No cluster differences. |
cmsBool CMSEXPORT cmsIsCLUT(cmsHPROFILE hProfile, cmsUInt32Number Intent, cmsUInt32Number UsedDirection)
{
const cmsTagSignature* TagTable;
// For devicelinks, the supported intent is that one stated in the header
if (cmsGetDeviceClass(hProfile) == cmsSigLinkClass) {
return (cmsGetHeaderRender... | 0 | [] | Little-CMS | 41d222df1bc6188131a8f46c32eab0a4d4cdf1b6 | 250,254,465,793,647,000,000,000,000,000,000,000,000 | 27 | Memory squeezing fix: lcms2 cmsPipeline construction
When creating a new pipeline, lcms would often try to allocate a stage
and pass it to cmsPipelineInsertStage without checking whether the
allocation succeeded. cmsPipelineInsertStage would then assert (or crash)
if it had not.
The fix here is to change cmsPipelineI... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.