func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static BOOL rdp_print_frame_acknowledge_capability_set(wStream* s, UINT16 length) { UINT32 frameAcknowledge; WLog_INFO(TAG, "FrameAcknowledgeCapabilitySet (length %" PRIu16 "):", length); if (length < 8) return FALSE; Stream_Read_UINT32(s, frameAcknowledge); /* frameAcknowledge (4 bytes) */ WLog_INFO(TAG, "\tf...
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
160,917,538,292,160,120,000,000,000,000,000,000,000
12
Fixed #6011: Bounds check in rdp_read_font_capability_set
static int parseHeader(struct cli_bc *bc, unsigned char *buffer, unsigned *linelength) { uint64_t magic1; unsigned magic2; char ok = 1; unsigned offset, len, flevel; char *pos; if (strncmp((const char*)buffer, BC_HEADER, sizeof(BC_HEADER)-1)) { cli_errmsg("Missing file magic in bytecode"); re...
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
47,394,074,211,266,730,000,000,000,000,000,000,000
89
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static inline int snd_pcm_substream_proc_init(struct snd_pcm_substream *substream) { return 0; }
0
[ "CWE-416" ]
linux
362bca57f5d78220f8b5907b875961af9436e229
162,917,265,137,722,250,000,000,000,000,000,000,000
1
ALSA: pcm: prevent UAF in snd_pcm_info When the device descriptor is closed, the `substream->runtime` pointer is freed. But another thread may be in the ioctl handler, case SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which calls snd_pcm_info() which accesses the now freed `substream->runtime`. Note:...
void __fastcall TSCPFileSystem::ExecCommand(TFSCommand Cmd, const TVarRec * args, int size, int Params) { if (Params < 0) Params = ecDefault; UnicodeString FullCommand = FCommandSet->FullCommand(Cmd, args, size); UnicodeString Command = FCommandSet->Command(Cmd, args, size); ExecCommand(FullCommand, Par...
0
[ "CWE-20" ]
winscp
49d876f2c5fc00bcedaa986a7cf6dedd6bf16f54
58,560,066,610,812,300,000,000,000,000,000,000,000
19
Bug 1675: Prevent SCP server sending files that were not requested https://winscp.net/tracker/1675 Source commit: 4aa587620973bf793fb6e783052277c0f7be4b55
static inline long decode_twos_comp(ulong c, int prec) { long result; assert(prec >= 2); jas_eprintf("warning: support for signed data is untested\n"); // NOTE: Is this correct? result = (c & ((1 << (prec - 1)) - 1)) - (c & (1 << (prec - 1))); return result; }
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
203,705,827,404,276,630,000,000,000,000,000,000,000
9
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
policies_set_node_exitpolicy_to_reject_all(node_t *node) { node->rejects_all = 1; }
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
322,040,651,599,195,600,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...
GF_Err gf_isom_text_set_karaoke_segment(GF_TextSample *samp, u32 end_time, u16 start_char, u16 end_char) { if (!samp || !samp->cur_karaoke) return GF_BAD_PARAM; samp->cur_karaoke->records = (KaraokeRecord*)gf_realloc(samp->cur_karaoke->records, sizeof(KaraokeRecord)*(samp->cur_karaoke->nb_entries+1)); if (!samp->cur...
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
37,868,377,166,351,560,000,000,000,000,000,000,000
11
fixed #1768
static void parent_esp_reset(ESPState *s, int irq, int level) { if (level) { esp_soft_reset(s); } }
0
[ "CWE-787" ]
qemu
926cde5f3e4d2504ed161ed0cb771ac7cad6fd11
293,861,120,245,832,960,000,000,000,000,000,000,000
6
scsi: esp: make cmdbuf big enough for maximum CDB size While doing DMA read into ESP command buffer 's->cmdbuf', it could write past the 's->cmdbuf' area, if it was transferring more than 16 bytes. Increase the command buffer size to 32, which is maximum when 's->do_cmd' is set, and add a check on 'len' to avoid OOB ...
MagickExport Image *AcquireImage(const ImageInfo *image_info) { const char *option; Image *image; MagickStatusType flags; /* Allocate image structure. */ (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); image=(Image *) AcquireCriticalMemory(sizeof(*image)); (void) memset(ima...
1
[ "CWE-665" ]
ImageMagick6
27b1c74979ac473a430e266ff6c4b645664bc805
172,244,786,076,976,450,000,000,000,000,000,000,000
160
https://github.com/ImageMagick/ImageMagick/issues/1522
TfLiteStatus SoftmaxEval(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteSoftmaxParams*>(node->builtin_data); SoftmaxOpData* data = reinterpret_cast<SoftmaxOpData*>(node->user_data); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &input));...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
73,816,916,290,733,360,000,000,000,000,000,000,000
56
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath) { return(X509_STORE_load_locations(ctx->cert_store,CAfile,CApath)); }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
181,803,777,090,779,170,000,000,000,000,000,000,000
5
Add Next Protocol Negotiation.
static apr_byte_t oidc_oauth_parse_and_cache_token_expiry(request_rec *r, oidc_cfg *c, json_t *introspection_response, const char *expiry_claim_name, int expiry_format_absolute, int expiry_claim_is_mandatory, apr_time_t *cache_until) { oidc_debug(r, "expiry_claim_name=%s, expiry_format_absolute=%d, expiry_cl...
0
[ "CWE-287" ]
mod_auth_openidc
21e3728a825c41ab41efa75e664108051bb9665e
334,493,107,042,248,570,000,000,000,000,000,000,000
49
release 2.1.6 : security fix: scrub headers for "AuthType oauth20" Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu>
void diff_debug_filepair(const struct diff_filepair *p, int i) { diff_debug_filespec(p->one, i, "one"); diff_debug_filespec(p->two, i, "two"); fprintf(stderr, "score %d, status %c rename_used %d broken %d\n", p->score, p->status ? p->status : '?', p->one->rename_used, p->broken_pair); }
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
15,055,555,774,871,160,000,000,000,000,000,000,000
8
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
static int sas_discover_expander(struct domain_device *dev) { int res; res = sas_notify_lldd_dev_found(dev); if (res) return res; res = sas_ex_general(dev); if (res) goto out_err; res = sas_ex_manuf_info(dev); if (res) goto out_err; res = sas_expander_discover(dev); if (res) { SAS_DPRINTK("expander ...
0
[ "CWE-399", "CWE-772" ]
linux
4a491b1ab11ca0556d2fda1ff1301e862a2d44c4
223,766,837,384,903,000,000,000,000,000,000,000,000
31
scsi: libsas: fix memory leak in sas_smp_get_phy_events() We've got a memory leak with the following producer: while true; do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null; done The buffer req is allocated and not freed after we return. Fix it. Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver") S...
static void nonInterruptableKillAndWaitpid(pid_t pid) { boost::this_thread::disable_syscall_interruption dsi; syscalls::kill(pid, SIGKILL); syscalls::waitpid(pid, NULL, 0); }
0
[ "CWE-200", "CWE-61" ]
passenger
4043718264095cde6623c2cbe8c644541036d7bf
154,081,867,612,157,480,000,000,000,000,000,000,000
5
Disable unused feature.
ZEND_API int zend_declare_property_stringl(zend_class_entry *ce, const char *name, int name_length, const char *value, int value_len, int access_type TSRMLS_DC) /* {{{ */ { zval *property; if (ce->type & ZEND_INTERNAL_CLASS) { ALLOC_PERMANENT_ZVAL(property); ZVAL_STRINGL(property, zend_strndup(value, value_len),...
0
[ "CWE-416" ]
php-src
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
321,434,239,525,437,300,000,000,000,000,000,000,000
14
Fix bug #73147: Use After Free in PHP7 unserialize()
static __init int match_config_table(efi_guid_t *guid, unsigned long table, efi_config_table_type_t *table_types) { int i; if (table_types) { for (i = 0; efi_guidcmp(table_types[i].guid, NULL_GUID); i++) { if (!efi_guidcmp(*guid, table_types[i].guid)) { *(table_types[i].ptr) = table; i...
0
[]
linux
1957a85b0032a81e6482ca4aab883643b8dae06e
190,765,041,473,957,020,000,000,000,000,000,000,000
20
efi: Restrict efivar_ssdt_load when the kernel is locked down efivar_ssdt_load allows the kernel to import arbitrary ACPI code from an EFI variable, which gives arbitrary code execution in ring 0. Prevent that when the kernel is locked down. Signed-off-by: Matthew Garrett <mjg59@google.com> Acked-by: Ard Biesheuvel <...
QPDFAcroFormDocumentHelper::getNeedAppearances() { bool result = false; QPDFObjectHandle acroform = this->qpdf.getRoot().getKey("/AcroForm"); if (acroform.isDictionary() && acroform.getKey("/NeedAppearances").isBool()) { result = acroform.getKey("/NeedAppearances").getBoolValue(); } ...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
132,551,468,197,871,600,000,000,000,000,000,000,000
11
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 ...
R_API RList *r_bin_java_get_field_num_name(RBinJavaObj *bin_obj) { ut32 i = 0; RBinJavaField *fm_type; RListIter *iter = NULL; RList *res = r_list_newf (free); r_list_foreach (bin_obj->fields_list, iter, fm_type) { ut32 len = strlen (fm_type->name) + 30; char *str = malloc (len); if (!str) { r_list_free (...
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
339,721,735,053,125,000,000,000,000,000,000,000,000
18
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
GC_API void GC_CALL GC_free(void * p) { struct hblk *h; hdr *hhdr; size_t sz; /* In bytes */ size_t ngranules; /* sz in granules */ void **flh; int knd; struct obj_kind * ok; DCL_LOCK_STATE; if (p == 0) return; /* Required by ANSI. It's not my fault ... */ # ifdef L...
0
[ "CWE-189" ]
bdwgc
be9df82919960214ee4b9d3313523bff44fd99e1
38,340,466,043,898,454,000,000,000,000,000,000,000
58
Fix allocation size overflows due to rounding. * malloc.c (GC_generic_malloc): Check if the allocation size is rounded to a smaller value. * mallocx.c (GC_generic_malloc_ignore_off_page): Likewise.
static int dtls1_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x) { int n; unsigned char *p; n=i2d_X509(x,NULL); if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3))) { SSLerr(SSL_F_DTLS1_ADD_CERT_TO_BUF,ERR_R_BUF_LIB); return 0; } p=(unsigned char *)&(buf->data[*l]); l2n3(n,p); i2d_X509(x,&p); *l+=n+...
0
[ "CWE-310" ]
openssl
34628967f1e65dc8f34e000f0f5518e21afbfc7b
74,073,716,751,195,210,000,000,000,000,000,000,000
18
Fix DTLS retransmission from previous session. For DTLS we might need to retransmit messages from the previous session so keep a copy of write context in DTLS retransmission buffers instead of replacing it after sending CCS. CVE-2013-6450.
int gnutls_x509_ext_import_authority_key_id(const gnutls_datum_t * ext, gnutls_x509_aki_t aki, unsigned int flags) { int ret; unsigned i; ASN1_TYPE c2 = ASN1_TYPE_EMPTY; gnutls_datum_t san, othername_oid; unsigned type; ret = asn1_create_element (_gnutls_get_pkix(), "PKIX1.AuthorityKeyIdentifier...
0
[ "CWE-415" ]
gnutls
c5aaa488a3d6df712dc8dff23a049133cab5ec1b
275,051,455,006,706,670,000,000,000,000,000,000,000
91
gnutls_x509_ext_import_proxy: fix issue reading the policy language If the language was set but the policy wasn't, that could lead to a double free, as the value returned to the user was freed.
QPDFWriter::doWriteSetup() { if (this->m->did_write_setup) { return; } this->m->did_write_setup = true; // Do preliminary setup if (this->m->linearized) { this->m->qdf_mode = false; } if (this->m->pclm) { this->m->stream_decode_level = qpdf_dl_none; th...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
161,597,473,861,991,900,000,000,000,000,000,000,000
166
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 ...
amgtar_estimate( application_argument_t *argument) { char *incrname = NULL; GPtrArray *argv_ptr; char *cmd = NULL; int nullfd = -1; int pipefd = -1; FILE *dumpout = NULL; off_t size = -1; char line[32768]; char *errmsg = NULL; char...
1
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
199,742,837,140,514,130,000,000,000,000,000,000,000
233
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
SPICE_GNUC_VISIBLE void spice_server_free_video_codecs(SpiceServer *reds, const char *video_codecs) { g_free((char *) video_codecs); }
0
[]
spice
ca5bbc5692e052159bce1a75f55dc60b36078749
22,776,241,192,326,657,000,000,000,000,000,000,000
4
With OpenSSL 1.1: Disable client-initiated renegotiation. Fixes issue #49 Fixes BZ#1904459 Signed-off-by: Julien Ropé <jrope@redhat.com> Reported-by: BlackKD Acked-by: Frediano Ziglio <fziglio@redhat.com>
static unsigned ucvector_resize(ucvector* p, size_t size) { if(!ucvector_reserve(p, size * sizeof(unsigned char))) return 0; p->size = size; return 1; /*success*/ }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
60,807,049,421,615,830,000,000,000,000,000,000,000
6
Fixed #5645: realloc return handling
gdImagePaletteCopy (gdImagePtr to, gdImagePtr from) { int i; int x, y, p; int xlate[256]; if (to->trueColor) { return; } if (from->trueColor) { return; } for (i = 0; i < 256; i++) { xlate[i] = -1; }; for (x = 0; x < (to->sx); x++) { for (y = 0; y < (to...
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
50,339,492,640,990,510,000,000,000,000,000,000,000
55
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
void __audit_ipc_obj(struct kern_ipc_perm *ipcp) { struct audit_context *context = current->audit_context; context->ipc.uid = ipcp->uid; context->ipc.gid = ipcp->gid; context->ipc.mode = ipcp->mode; context->ipc.has_perm = 0; security_ipc_getsecid(ipcp, &context->ipc.osid); context->type = AUDIT_IPC; }
0
[ "CWE-362" ]
linux
43761473c254b45883a64441dd0bc85a42f3645c
228,836,998,306,299,070,000,000,000,000,000,000,000
10
audit: fix a double fetch in audit_log_single_execve_arg() There is a double fetch problem in audit_log_single_execve_arg() where we first check the execve(2) argumnets for any "bad" characters which would require hex encoding and then re-fetch the arguments for logging in the audit record[1]. Of course this leaves a...
static bool IsFullPath(const char *PathA) // Unix ASCII version. { return *PathA==CPATHDIVIDER; }
0
[]
unrar
22b52431a0581ab5d687747b65662f825ec03946
152,912,962,309,169,730,000,000,000,000,000,000,000
4
Updated to 6.1.7
int intel_execlists_submission_setup(struct intel_engine_cs *engine) { tasklet_init(&engine->execlists.tasklet, execlists_submission_tasklet, (unsigned long)engine); timer_setup(&engine->execlists.timer, execlists_timeslice, 0); timer_setup(&engine->execlists.preempt, execlists_preempt, 0); logical_ring_def...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
93,464,412,832,099,610,000,000,000,000,000,000,000
15
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
ncp_reply_le16(struct ncp_server *server, int offset) { return get_unaligned_le16(ncp_reply_data(server, offset)); }
0
[ "CWE-119" ]
staging
4c41aa24baa4ed338241d05494f2c595c885af8f
195,089,697,994,502,530,000,000,000,000,000,000,000
4
staging: ncpfs: memory corruption in ncp_read_kernel() If the server is malicious then *bytes_read could be larger than the size of the "target" buffer. It would lead to memory corruption when we do the memcpy(). Reported-by: Dr Silvio Cesare of InfoSect <Silvio Cesare <silvio.cesare@gmail.com> Signed-off-by: Dan Ca...
smb3_parse_lease_buf(void *buf, unsigned int *epoch, char *lease_key) { struct create_lease_v2 *lc = (struct create_lease_v2 *)buf; *epoch = le16_to_cpu(lc->lcontext.Epoch); if (lc->lcontext.LeaseFlags & SMB2_LEASE_FLAG_BREAK_IN_PROGRESS_LE) return SMB2_OPLOCK_LEVEL_NOCHANGE; if (lease_key) memcpy(lease_key, &...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
189,660,499,299,243,420,000,000,000,000,000,000,000
11
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
const std::list<AccessLog::InstanceSharedPtr>& accessLogs() override { return access_logs_; }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
132,719,327,711,308,920,000,000,000,000,000,000,000
1
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...
static void mkiss_close(struct tty_struct *tty) { struct mkiss *ax; write_lock_irq(&disc_data_lock); ax = tty->disc_data; tty->disc_data = NULL; write_unlock_irq(&disc_data_lock); if (!ax) return; /* * We have now ensured that nobody can start using ap from now on, but * we have to wait for all existing...
1
[ "CWE-416" ]
linux
3e0588c291d6ce225f2b891753ca41d45ba42469
109,440,345,853,446,200,000,000,000,000,000,000,000
33
hamradio: defer ax25 kfree after unregister_netdev There is a possible race condition (use-after-free) like below (USE) | (FREE) ax25_sendmsg | ax25_queue_xmit | dev_queue_xmit | __dev_queue_xmit | __dev_xmit_skb | sch_d...
static int handle_trailing_headers(h2o_http2_conn_t *conn, h2o_http2_stream_t *stream, const uint8_t *src, size_t len, const char **err_desc) { size_t dummy_content_length; int ret; assert(stream->state == H2O_HTTP2_STREAM_STATE_RECV_BODY); if ((ret = h2o_hpack_parse...
0
[ "CWE-703" ]
h2o
1c0808d580da09fdec5a9a74ff09e103ea058dd4
339,096,965,356,437,300,000,000,000,000,000,000,000
15
h2: use after free on premature connection close #920 lib/http2/connection.c:on_read() calls parse_input(), which might free `conn`. It does so in particular if the connection preface isn't the expected one in expect_preface(). `conn` is then used after the free in `if (h2o_timeout_is_linked(&conn->_write.timeout_entr...
__zzip_aligned4(char *p) { #define aligned4 __zzip_aligned4 p += ((intptr_t) p) & 1; p += ((intptr_t) p) & 2; return p; }
0
[ "CWE-770" ]
zziplib
8f48323c181e20b7e527b8be7229d6eb1148ec5f
281,092,520,918,853,180,000,000,000,000,000,000,000
7
check rootseek and rootsize to be positive #27
void CLASS adobe_coeff(const char *t_make, const char *t_model #ifdef LIBRAW_LIBRARY_BUILD , int internal_only #endif ) { // clang-format off static const struct { const char *prefix; int t_black, t_maximum, trans[12]; } table[] = { { "AgfaPhoto DC-833m"...
0
[ "CWE-703", "CWE-835" ]
LibRaw
e47384546b43d0fd536e933249047bc397a4d88b
47,910,228,141,484,260,000,000,000,000,000,000,000
1,631
Secunia Advisory SA83050: possible infinite loop in parse_minolta()
void avsubtitle_free(AVSubtitle *sub) { int i; for (i = 0; i < sub->num_rects; i++) { av_freep(&sub->rects[i]->data[0]); av_freep(&sub->rects[i]->data[1]); av_freep(&sub->rects[i]->data[2]); av_freep(&sub->rects[i]->data[3]); av_freep(&sub->rects[i]->text); av_fr...
0
[ "CWE-476" ]
FFmpeg
8df6884832ec413cf032dfaa45c23b1c7876670c
42,608,657,771,363,980,000,000,000,000,000,000,000
18
avcodec/utils: Check close before calling it Fixes: NULL pointer dereference Fixes: 15733/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IDF_fuzzer-5658616977162240 Reviewed-by: Paul B Mahol <onemda@gmail.com> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signe...
static void ext4_xattr_inode_set_hash(struct inode *ea_inode, u32 hash) { ea_inode->i_atime.tv_sec = hash; }
0
[]
linux
54dd0e0a1b255f115f8647fc6fb93273251b01b9
59,626,416,709,983,970,000,000,000,000,000,000,000
4
ext4: add extra checks to ext4_xattr_block_get() Add explicit checks in ext4_xattr_block_get() just in case the e_value_offs and e_value_size fields in the the xattr block are corrupted in memory after the buffer_verified bit is set on the xattr block. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: stable@kernel.or...
static void psi_schedule_poll_work(struct psi_group *group, unsigned long delay) { struct kthread_worker *kworker; /* Do not reschedule if already scheduled */ if (atomic_cmpxchg(&group->poll_scheduled, 0, 1) != 0) return; rcu_read_lock(); kworker = rcu_dereference(group->poll_kworker); /* * kworker might ...
0
[ "CWE-787" ]
linux
6fcca0fa48118e6d63733eb4644c6cd880c15b8f
108,484,942,428,246,600,000,000,000,000,000,000,000
22
sched/psi: Fix OOB write when writing 0 bytes to PSI files Issuing write() with count parameter set to 0 on any file under /proc/pressure/ will cause an OOB write because of the access to buf[buf_size-1] when NUL-termination is performed. Fix this by checking for buf_size to be non-zero. Signed-off-by: Suren Baghdasa...
evbuffer_add_buffer(struct evbuffer *outbuf, struct evbuffer *inbuf) { struct evbuffer_chain *pinned, *last; size_t in_total_len, out_total_len; int result = 0; EVBUFFER_LOCK2(inbuf, outbuf); in_total_len = inbuf->total_len; out_total_len = outbuf->total_len; if (in_total_len == 0 || outbuf == inbuf) goto do...
0
[ "CWE-189" ]
libevent
841ecbd96105c84ac2e7c9594aeadbcc6fb38bc4
185,899,652,032,252,870,000,000,000,000,000,000,000
44
Fix CVE-2014-6272 in Libevent 2.1 For this fix, we need to make sure that passing too-large inputs to the evbuffer functions can't make us do bad things with the heap. Also, lower the maximum chunk size to the lower of off_t, size_t maximum. This is necessary since otherwise we could get into an infinite loop if we ...
void perf_output_sample(struct perf_output_handle *handle, struct perf_event_header *header, struct perf_sample_data *data, struct perf_event *event) { u64 sample_type = data->type; perf_output_put(handle, *header); if (sample_type & PERF_SAMPLE_IDENTIFIER) perf_output_put(handle, data->id); if (sampl...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
177,697,420,353,143,800,000,000,000,000,000,000,000
176
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
TEST_P(Http2CodecImplTest, TrailingHeadersLargeBody) { initialize(); // Buffer server data so we can make sure we don't get any window updates. ON_CALL(client_connection_, write(_, _)) .WillByDefault( Invoke([&](Buffer::Instance& data, bool) -> void { server_wrapper_.buffer_.add(data); })); Te...
1
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
240,343,975,918,468,540,000,000,000,000,000,000,000
32
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...
_outTableLikeClause(StringInfo str, const TableLikeClause *node) { WRITE_NODE_TYPE("TABLELIKECLAUSE"); WRITE_NODE_FIELD(relation); WRITE_UINT_FIELD(options); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
299,323,104,990,913,600,000,000,000,000,000,000,000
7
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
dwarf_global_cu_offset(Dwarf_Global global, Dwarf_Off * cu_header_offset, Dwarf_Error * error) { Dwarf_Global_Context con = 0; if (global == NULL) { _dwarf_error(NULL, error, DW_DLE_GLOBAL_NULL); return DW_DLV_ERROR; } con = global->gl_context; if (con == NULL) { _dw...
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
8151575a6ace77d005ca5bb5d71c1bfdba3f7069
15,198,315,810,574,635,000,000,000,000,000,000,000
18
Fixes vulnerability DW202205-001 Reports error instead of crashing the when reading a specially crafted (corrupted) .debug_pubnames or .debug_pubtypes section. modified: src/lib/libdwarf/dwarf_global.c
static void *set_eth_seg(struct mlx5_wqe_eth_seg *eseg, const struct ib_send_wr *wr, void *qend, struct mlx5_ib_qp *qp, int *size) { void *seg = eseg; memset(eseg, 0, sizeof(struct mlx5_wqe_eth_seg)); if (wr->send_flags & IB_SEND_IP_CSUM) eseg->cs_flags = MLX5_ETH_WQE_L3_CSUM | MLX5_ETH_WQE_L4_CSUM;...
0
[ "CWE-119", "CWE-787" ]
linux
0625b4ba1a5d4703c7fb01c497bd6c156908af00
67,568,356,057,693,830,000,000,000,000,000,000,000
52
IB/mlx5: Fix leaking stack memory to userspace mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes were written. Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp") Cc: <stable@vger.kernel.org> Acked-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <...
BOOL rdp_send_data_pdu(rdpRdp* rdp, STREAM* s, BYTE type, UINT16 channel_id) { UINT16 length; UINT32 sec_bytes; BYTE* sec_hold; length = stream_get_length(s); stream_set_pos(s, 0); rdp_write_header(rdp, s, length, MCS_GLOBAL_CHANNEL_ID); sec_bytes = rdp_get_sec_bytes(rdp); sec_hold = s->p; stream_seek(s, se...
0
[ "CWE-476" ]
FreeRDP
7d58aac24fe20ffaad7bd9b40c9ddf457c1b06e7
217,303,784,113,778,050,000,000,000,000,000,000,000
27
security: add a NULL pointer check to fix a server crash.
void WebContents::SetWebRTCIPHandlingPolicy( const std::string& webrtc_ip_handling_policy) { if (GetWebRTCIPHandlingPolicy() == webrtc_ip_handling_policy) return; web_contents()->GetMutableRendererPrefs()->webrtc_ip_handling_policy = webrtc_ip_handling_policy; web_contents()->SyncRendererPrefs(); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
139,613,813,956,950,300,000,000,000,000,000,000,000
9
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
httpWrite(http_t *http, /* I - HTTP connection */ const char *buffer, /* I - Buffer for data */ int length) /* I - Number of bytes to write */ { return ((int)httpWrite2(http, buffer, (size_t)length)); }
0
[ "CWE-120" ]
cups
f24e6cf6a39300ad0c3726a41a4aab51ad54c109
137,425,746,546,339,730,000,000,000,000,000,000,000
6
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)
SYSCALL_DEFINE3(shmat, int, shmid, char __user *, shmaddr, int, shmflg) { unsigned long ret; long err; err = do_shmat(shmid, shmaddr, shmflg, &ret, SHMLBA); if (err) return err; force_successful_syscall_return(); return (long)ret; }
0
[]
linux
95e91b831f87ac8e1f8ed50c14d709089b4e01b8
227,716,076,212,586,370,000,000,000,000,000,000,000
11
ipc/shm: Fix shmat mmap nil-page protection The issue is described here, with a nice testcase: https://bugzilla.kernel.org/show_bug.cgi?id=192931 The problem is that shmat() calls do_mmap_pgoff() with MAP_FIXED, and the address rounded down to 0. For the regular mmap case, the protection mentioned above is that...
static inline int skb_checksum_start_offset(const struct sk_buff *skb) { return skb->csum_start - skb_headroom(skb);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
222,565,393,148,216,540,000,000,000,000,000,000,000
4
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...
FLAC__bool FLAC__bitreader_read_byte_block_aligned_no_crc(FLAC__BitReader *br, FLAC__byte *val, uint32_t nvals) { FLAC__uint32 x; FLAC__ASSERT(0 != br); FLAC__ASSERT(0 != br->buffer); FLAC__ASSERT(FLAC__bitreader_is_consumed_byte_aligned(br)); /* step 1: read from partial head word to get word aligned */ while(...
0
[ "CWE-125" ]
flac
2e7931c27eb15e387da440a37f12437e35b22dd4
50,927,589,978,052,390,000,000,000,000,000,000,000
55
libFLAC/bitreader.c: Fix out-of-bounds read Credit: Oss-Fuzz Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069 Testcase: fuzzer_decoder-5670265022840832
void CLua::init_libraries() { lua_stack_cleaner clean(state()); // Open Crawl bindings cluaopen_kills(_state); cluaopen_you(_state); cluaopen_item(_state); cluaopen_food(_state); cluaopen_crawl(_state); cluaopen_file(_state); cluaopen_moninf(_state); cluaopen_options(_state); ...
1
[ "CWE-434" ]
crawl
768f60da87a3fa0b5561da5ade9309577c176d04
154,780,829,118,697,960,000,000,000,000,000,000,000
41
Disable lua bytecode loading
void CLASS ljpeg_idct (struct jhead *jh) { int c, i, j, len, skip, coef; float work[3][8][8]; static float cs[106] = { 0 }; static const uchar zigzag[80] = { 0, 1, 8,16, 9, 2, 3,10,17,24,32,25,18,11, 4, 5,12,19,26,33, 40,48,41,34,27,20,13, 6, 7,14,21,28,35,42,49,56,57,50,43,36, 29,22,15,23,30,37,44,5...
0
[ "CWE-119", "CWE-125", "CWE-787" ]
LibRaw
d13e8f6d1e987b7491182040a188c16a395f1d21
192,115,180,205,464,930,000,000,000,000,000,000,000
35
CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access
Bool gf_box_valid_in_parent(GF_Box *a, const char *parent_4cc) { if (!a || !a->registry || !a->registry->parents_4cc) return GF_FALSE; if (strstr(a->registry->parents_4cc, parent_4cc) != NULL) return GF_TRUE; return GF_FALSE;
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
203,211,176,032,325,360,000,000,000,000,000,000,000
6
fixed #1768
void bgp_packet_mpunreach_end(struct stream *s, size_t attrlen_pnt) { bgp_packet_mpattr_end(s, attrlen_pnt); }
0
[ "CWE-20", "CWE-436" ]
frr
943d595a018e69b550db08cccba1d0778a86705a
335,832,873,540,957,330,000,000,000,000,000,000,000
4
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined Signed-off-by: Lou Berger <lberger@labn.net>
HTTPSession::readEOF() noexcept { DestructorGuard guard(this); VLOG(4) << "EOF on " << *this; // for SSL only: error without any bytes from the client might happen // due to client-side issues with the SSL cert. Note that it can also // happen if the client sends a SPDY frame header but no body. if (infoCal...
0
[ "CWE-20" ]
proxygen
0600ebe59c3e82cd012def77ca9ca1918da74a71
159,003,815,356,847,900,000,000,000,000,000,000,000
18
Check that a secondary auth manager is set before dereferencing. Summary: CVE-2018-6343 Reviewed By: mingtaoy Differential Revision: D12994423 fbshipit-source-id: 9229ec11da8085f1fa153595e8e5353e19d06fb7
int _gnutls_ecc_curve_fill_params(gnutls_ecc_curve_t curve, gnutls_pk_params_st* params) { const gnutls_ecc_curve_entry_st *st; uint8_t val[MAX_ECC_CURVE_SIZE]; size_t val_size; int ret; st = _gnutls_ecc_curve_get_params(curve); if (st == NULL) return gnutls_assert_val(GNUTLS_E_ECC_UNSUPPORTED_CURVE); val_s...
0
[ "CWE-310" ]
gnutls
7429872b74c8216bbf15e241e47aba94369ef083
97,351,896,631,196,010,000,000,000,000,000,000,000
114
when exporting curve coordinates to X9.63 format, perform additional sanity checks on input Reported by Sean Burford.
static void __execlists_kick(struct intel_engine_execlists *execlists) { /* Kick the tasklet for some interrupt coalescing and reset handling */ tasklet_hi_schedule(&execlists->tasklet); }
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
80,478,385,663,635,380,000,000,000,000,000,000,000
5
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
GetWord(Buffer *buf) { int b, e; char *p; if ((p = getCurWord(buf, &b, &e)) != NULL) { return Strnew_charp_n(p, e - b)->ptr; } return NULL; }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
17,448,090,689,560,743,000,000,000,000,000,000,000
10
Make temporary directory safely when ~/.w3m is unwritable
get_cookies (SoupCookieJar *jar, SoupURI *uri, gboolean for_http, gboolean copy_cookies) { SoupCookieJarPrivate *priv; GSList *cookies, *domain_cookies; char *domain, *cur, *next_domain; GSList *new_head, *cookies_to_remove = NULL, *p; priv = soup_cookie_jar_get_instance_private (jar); if (!uri->host) return ...
1
[ "CWE-125" ]
libsoup
db2b0d5809d5f8226d47312b40992cadbcde439f
291,896,490,629,418,350,000,000,000,000,000,000,000
55
cookie-jar: bail if hostname is an empty string There are several other ways to fix the problem with this function, but skipping over all of the code is probably the simplest. Fixes #3
static s32 brcmf_update_bss_info(struct brcmf_cfg80211_info *cfg, struct brcmf_if *ifp) { struct wiphy *wiphy = cfg_to_wiphy(cfg); struct brcmf_bss_info_le *bi; const struct brcmf_tlv *tim; u16 beacon_interval; u8 dtim_period; size_t ie_len; u8 *ie; s32 err = 0; brcmf_dbg(TRACE, "Enter\n"); if (brcmf_is...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
155,989,964,882,770,550,000,000,000,000,000,000,000
55
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
path_in(PG_FUNCTION_ARGS) { char *str = PG_GETARG_CSTRING(0); PATH *path; int isopen; char *s; int npts; int size; int depth = 0; if ((npts = pair_count(str, ',')) <= 0) ereport(ERROR, (errcode(ERRCODE_INVALID_TEXT_REPRESENTATION), errmsg("invalid input syntax for type path: \"%s\""...
1
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
340,150,327,620,048,200,000,000,000,000,000,000,000
44
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
int SSL_get_rfd(const SSL *s) { int ret = -1; BIO *b, *r; b = SSL_get_rbio(s); r = BIO_find_type(b, BIO_TYPE_DESCRIPTOR); if (r != NULL) BIO_get_fd(r, &ret); return (ret); }
0
[ "CWE-310" ]
openssl
56f1acf5ef8a432992497a04792ff4b3b2c6f286
92,076,232,783,100,700,000,000,000,000,000,000,000
11
Disable SSLv2 default build, default negotiation and weak ciphers. SSLv2 is by default disabled at build-time. Builds that are not configured with "enable-ssl2" will not support SSLv2. Even if "enable-ssl2" is used, users who want to negotiate SSLv2 via the version-flexible SSLv23_method() will need to explicitly ca...
rfbBool rfbSendFileTransferMessage(rfbClientPtr cl, uint8_t contentType, uint8_t contentParam, uint32_t size, uint32_t length, const char *buffer) { rfbFileTransferMsg ft; ft.type = rfbFileTransfer; ft.contentType = contentType; ft.contentParam = contentParam; ft.pad = 0; /* UltraVNC did no...
0
[ "CWE-19" ]
libvncserver
6037a9074d52b1963c97cb28ea1096c7c14cbf28
289,152,223,219,240,000,000,000,000,000,000,000,000
37
Check malloc() return value on client->server ClientCutText message. Client can send up to 2**32-1 bytes of text, and such a large allocation is likely to fail in case of high memory pressure. This would in a server crash (write at address 0).
int gfs2_inplace_reserve(struct gfs2_inode *ip, struct gfs2_alloc_parms *ap) { struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_rgrpd *begin = NULL; struct gfs2_blkreserv *rs = &ip->i_res; int error = 0, rg_locked, flags = 0; u64 last_unlinked = NO_BLOCK; int loops = 0; u32 skip = 0; if (sdp->sd_args....
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
213,472,595,005,567,950,000,000,000,000,000,000,000
123
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
uint32_t cli_bcapi_get_environment(struct cli_bc_ctx *ctx , struct cli_environment* env, uint32_t len) { if (len > sizeof(*env)) { cli_dbgmsg("cli_bcapi_get_environment len %u > %lu\n", len, sizeof(*env)); return -1; } memcpy(env, ctx->env, len); return 0; }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
74,555,711,886,173,910,000,000,000,000,000,000,000
9
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static bool parse_reconnect(struct pool *pool, json_t *val) { char *sockaddr_url, *stratum_port, *tmp; char *url, *port, address[256]; memset(address, 0, 255); url = (char *)json_string_value(json_array_get(val, 0)); if (!url) url = pool->sockaddr_url; else { char *dot_pool, *dot_reconnect; dot_pool = strc...
1
[ "CWE-119", "CWE-787" ]
cgminer
e1c5050734123973b99d181c45e74b2cbb00272e
266,979,340,016,523,900,000,000,000,000,000,000,000
61
Do some random sanity checking for stratum message parsing
static void svm_get_segment(struct kvm_vcpu *vcpu, struct kvm_segment *var, int seg) { struct vmcb_seg *s = svm_seg(vcpu, seg); var->base = s->base; var->limit = s->limit; var->selector = s->selector; var->type = s->attrib & SVM_SELECTOR_TYPE_MASK; var->s = (s->attrib >> SVM_SELECTOR_S_SHIFT) & 1; var->d...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
238,185,170,787,841,770,000,000,000,000,000,000,000
65
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
autoar_extractor_set_delete_after_extraction (AutoarExtractor *self, gboolean delete_after_extraction) { g_return_if_fail (AUTOAR_IS_EXTRACTOR (self)); self->delete_after_extraction = delete_after_extraction; }
0
[ "CWE-22" ]
gnome-autoar
adb067e645732fdbe7103516e506d09eb6a54429
42,322,700,244,671,544,000,000,000,000,000,000,000
6
AutoarExtractor: Do not extract files outside the destination dir Currently, a malicious archive can cause that the files are extracted outside of the destination dir. This can happen if the archive contains a file whose parent is a symbolic link, which points outside of the destination dir. This is potentially a secu...
rdpsnd_process_training(STREAM in) { uint16 tick; uint16 packsize; STREAM out; in_uint16_le(in, tick); in_uint16_le(in, packsize); logger(Sound, Debug, "rdpsnd_process_training(), tick=0x%04x", (unsigned) tick); out = rdpsnd_init_packet(SNDC_TRAINING, 4); out_uint16_le(out, tick); out_uint16_le(out, packsiz...
1
[ "CWE-119", "CWE-125", "CWE-703", "CWE-787" ]
rdesktop
4dca546d04321a610c1835010b5dad85163b65e1
322,296,591,417,885,100,000,000,000,000,000,000,000
17
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 av_cold int rpza_decode_init(AVCodecContext *avctx) { RpzaContext *s = avctx->priv_data; s->avctx = avctx; avctx->pix_fmt = AV_PIX_FMT_RGB555; s->frame = av_frame_alloc(); if (!s->frame) return AVERROR(ENOMEM); return 0; }
0
[ "CWE-787" ]
FFmpeg
77bb0004bbe18f1498cfecdc68db5f10808b6599
90,908,482,129,689,100,000,000,000,000,000,000,000
13
rpza: limit the number of blocks to the total remaining blocks in the frame Fixes invalid writes. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
static void JPEGSetImageSamplingFactor(struct jpeg_decompress_struct *jpeg_info, Image *image) { char sampling_factor[MaxTextExtent]; switch (jpeg_info->out_color_space) { case JCS_CMYK: { (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Colorspace: CMYK"); (void) FormatLocaleString(s...
0
[ "CWE-416" ]
ImageMagick6
c1a5aa3f4214ad6e4748de84dad44398959014e1
50,361,043,689,271,610,000,000,000,000,000,000,000
62
https://github.com/ImageMagick/ImageMagick/issues/1641
static void Scroll(char *cp, int cnt1, int cnt2, char *tmp) { if (!cnt1 || !cnt2) return; if (cnt1 <= cnt2) { memmove(tmp, cp, cnt1); memmove(cp, cp + cnt1, cnt2); memmove(cp + cnt2, tmp, cnt1); } else { memmove(tmp, cp + cnt1, cnt2); memmove(cp + cnt2, cp, cnt1); memmove(cp, tmp, cnt2); } }
0
[ "CWE-119" ]
screen
c336a32a1dcd445e6b83827f83531d4c6414e2cd
157,243,792,793,431,490,000,000,000,000,000,000,000
14
Fix stack overflow due to too deep recursion Bug: 45713 How to reproduce: Run this command inside screen $ printf '\x1b[10000000T' screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge.
DEFUN (neighbor_set_peer_group, neighbor_set_peer_group_cmd, NEIGHBOR_CMD "peer-group WORD", NEIGHBOR_STR NEIGHBOR_ADDR_STR "Member of the peer-group\n" "peer-group name\n") { int ret; as_t as; union sockunion su; struct bgp *bgp; struct peer_group *group; bgp = vt...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
220,700,907,398,472,550,000,000,000,000,000,000,000
48
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
yang_free_choice(struct ly_ctx *ctx, struct lys_node_choice *choice) { free(choice->dflt); lys_when_free(ctx, choice->when, NULL); }
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
17,558,850,683,134,252,000,000,000,000,000,000,000
5
yang parser BUGFIX double free Fixes #742
int DeliverSignal(int linux_signum, int linux_sigcode) { absl::optional<int> signum = FromkLinuxSignalNumber(linux_signum); if (!signum) { return 1; } siginfo_t info; info.si_signo = *signum; info.si_code = linux_sigcode; SignalManager *signal_manager = SignalManager::GetInstance(); const sigset_t m...
0
[]
asylo
53ed5d8fd8118ced1466e509606dd2f473707a5c
167,019,675,184,240,360,000,000,000,000,000,000,000
19
Store untrusted output pointer in enclave Validate the pointer after it's stored in enclave to avoid unexpected modifications after it's validated. PiperOrigin-RevId: 365648810 Change-Id: I3079128040c142e86bab8255b07d03562a6fcb61
xfs_setsize_buftarg_early( xfs_buftarg_t *btp, struct block_device *bdev) { return xfs_setsize_buftarg_flags(btp, PAGE_SIZE, bdev_logical_block_size(bdev), 0); }
0
[ "CWE-20", "CWE-703" ]
linux
eb178619f930fa2ba2348de332a1ff1c66a31424
162,762,005,624,913,600,000,000,000,000,000,000,000
7
xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end When _xfs_buf_find is passed an out of range address, it will fail to find a relevant struct xfs_perag and oops with a null dereference. This can happen when trying to walk a filesystem with a metadata inode that has a partially corrupted extent map (i.e....
mz_bool mz_zip_reader_init_file(mz_zip_archive *pZip, const char *pFilename, mz_uint32 flags) { mz_uint64 file_size; MZ_FILE *pFile = MZ_FOPEN(pFilename, "rb"); if (!pFile) return MZ_FALSE; if (MZ_FSEEK64(pFile, 0, SEEK_END)) { MZ_FCLOSE(pFile); return MZ_FALSE; } fil...
0
[ "CWE-20", "CWE-190" ]
tinyexr
a685e3332f61cd4e59324bf3f669d36973d64270
105,402,147,802,357,400,000,000,000,000,000,000,000
24
Make line_no with too large value(2**20) invalid. Fixes #124
static struct idr_layer *get_from_free_list(struct idr *idp) { struct idr_layer *p; unsigned long flags; spin_lock_irqsave(&idp->lock, flags); if ((p = idp->id_free)) { idp->id_free = p->ary[0]; idp->id_free_cnt--; p->ary[0] = NULL; } spin_unlock_irqrestore(&idp->lock, flags); return(p); }
0
[]
linux
2dcb22b346be7b7b7e630a8970d69cf3f1111ec1
313,551,810,856,801,370,000,000,000,000,000,000,000
14
idr: fix backtrack logic in idr_remove_all Currently idr_remove_all will fail with a use after free error if idr::layers is bigger than 2, which on 32 bit systems corresponds to items more than 1024. This is due to stepping back too many levels during backtracking. For simplicity let's assume that IDR_BITS=1 -> we h...
static void DefineImageHistogram(const Image *image,NodeInfo *node_info, PixelInfo **histogram) { register ssize_t i; size_t number_children; /* Traverse any children. */ number_children=image->alpha_trait == UndefinedPixelTrait ? 8UL : 16UL; for (i=0; i < (ssize_t) number_children; i++) ...
0
[ "CWE-190" ]
ImageMagick
94691f00839dbdf43edb1508af945ab19b388573
108,200,453,447,600,320,000,000,000,000,000,000,000
30
https://github.com/ImageMagick/ImageMagick/issues/1750
void ProtocolV2::requeue_sent() { write_in_progress = false; if (sent.empty()) { return; } auto& rq = out_queue[CEPH_MSG_PRIO_HIGHEST]; out_seq -= sent.size(); while (!sent.empty()) { Message *m = sent.back(); sent.pop_back(); ldout(cct, 5) << __func__ << " requeueing message m=" << m ...
0
[ "CWE-323" ]
ceph
47c7e623546a7a33bd6bbddfb899fa9c9a40f40a
311,073,754,182,840,960,000,000,000,000,000,000,000
17
msg/async/ProtocolV2: avoid AES-GCM nonce reuse vulnerabilities The secure mode uses AES-128-GCM with 96-bit nonces consisting of a 32-bit counter followed by a 64-bit salt. The counter is incremented after processing each frame, the salt is fixed for the duration of the session. Both are initialized from the sessio...
badblocks_show(struct badblocks *bb, char *page, int unack) { size_t len; int i; u64 *p = bb->page; unsigned seq; if (bb->shift < 0) return 0; retry: seq = read_seqbegin(&bb->lock); len = 0; i = 0; while (len < PAGE_SIZE && i < bb->count) { sector_t s = BB_OFFSET(p[i]); unsigned int length = BB_LEN(p...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
17,184,025,445,637,070,000,000,000,000,000,000,000
37
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
CImg<T>& fill(const T& val) { if (is_empty()) return *this; if (val && sizeof(T)!=1) cimg_for(*this,ptrd,T) *ptrd = val; else std::memset(_data,(int)(ulongT)val,sizeof(T)*size()); // Double cast to allow val to be (void*) return *this; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
30,948,650,292,388,830,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
f_mkdir(typval_T *argvars, typval_T *rettv) { char_u *dir; char_u buf[NUMBUFLEN]; int prot = 0755; rettv->vval.v_number = FAIL; if (check_restricted() || check_secure()) return; if (in_vim9script() && (check_for_nonempty_string_arg(argvars, 0) == FAIL || check_for_opt_string_arg(argva...
0
[ "CWE-823", "CWE-703" ]
vim
5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
268,520,165,215,601,080,000,000,000,000,000,000,000
46
patch 8.2.4418: crash when using special multi-byte character Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character.
void MainWindow::openVideo() { QString path = Settings.openPath(); #ifdef Q_OS_MAC path.append("/*"); #endif QStringList filenames = QFileDialog::getOpenFileNames(this, tr("Open File"), path, tr("All Files (*);;MLT XML (*.mlt)")); if (filenames.length() > 0) { Settings.setOpenPath(QFile...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
161,654,313,963,176,880,000,000,000,000,000,000,000
22
fix upgrade check is not using TLS correctly
static void handle_prev_tw_list(struct io_wq_work_node *node, struct io_ring_ctx **ctx, bool *uring_locked) { if (*ctx && !*uring_locked) spin_lock(&(*ctx)->completion_lock); do { struct io_wq_work_node *next = node->next; struct io_kiocb *req = container_of(node, struct io_kiocb, io_task_work.no...
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
335,037,826,891,856,100,000,000,000,000,000,000,000
36
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
static int ssl3_get_record(SSL *s) { int ssl_major,ssl_minor,al; int enc_err,n,i,ret= -1; SSL3_RECORD *rr; SSL_SESSION *sess; unsigned char *p; unsigned char md[EVP_MAX_MD_SIZE]; short version; unsigned mac_size, orig_len; size_t extra; rr= &(s->s3->rrec); sess=s->session; if (s->options & SSL_OP_MICROSO...
0
[]
openssl
95783193946982d5acfc9f8d43dc25c021f39b9c
80,675,415,141,699,630,000,000,000,000,000,000,000
256
ssl/s3_pkt.c: add multi-block processing [from master].
void sendReplyToClient(aeEventLoop *el, int fd, void *privdata, int mask) { UNUSED(el); UNUSED(mask); writeToClient(fd,privdata,1); }
0
[ "CWE-254" ]
redis
874804da0c014a7d704b3d285aa500098a931f50
92,684,302,045,738,490,000,000,000,000,000,000,000
5
Security: Cross Protocol Scripting protection. This is an attempt at mitigating problems due to cross protocol scripting, an attack targeting services using line oriented protocols like Redis that can accept HTTP requests as valid protocol, by discarding the invalid parts and accepting the payloads sent, for example, ...
static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd) { struct dentry *res; struct inode *inode = NULL; int error; struct nfs_fh fhandle; struct nfs_fattr fattr; dfprintk(VFS, "NFS: lookup(%s/%s)\n", dentry->d_parent->d_name.name, dentry->d_name.name); nfs_inc_stats...
0
[ "CWE-20" ]
linux-2.6
54af3bb543c071769141387a42deaaab5074da55
215,781,099,488,693,970,000,000,000,000,000,000,000
68
NFS: Fix an Oops in encode_lookup() It doesn't look as if the NFS file name limit is being initialised correctly in the struct nfs_server. Make sure that we limit whatever is being set in nfs_probe_fsinfo() and nfs_init_server(). Also ensure that readdirplus and nfs4_path_walk respect our file name limits. Signed-of...
idna_to_unicode_8zlz (const char *input, char **output, int flags) { char *utf8; int rc; rc = idna_to_unicode_8z8z (input, &utf8, flags); *output = stringprep_utf8_to_locale (utf8); free (utf8); if (!*output) return IDNA_ICONV_ERROR; return rc; }
1
[ "CWE-119" ]
libidn
58c721ac2dc96bccd737f3f544f3a22a50477bbf
324,946,234,275,114,570,000,000,000,000,000,000,000
14
libidn: Fix crash in idna_to_unicode_8z8z and idna_to_unicode_8zlz.
static int unmap_and_move(new_page_t get_new_page, unsigned long private, struct page *page, int force) { int rc = 0; int *result = NULL; struct page *newpage = get_new_page(page, private, &result); int rcu_locked = 0; int charge = 0; if (!newpage) return -ENOMEM; if (page_count(page) == 1) /* page was ...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
178,600,568,590,998,900,000,000,000,000,000,000,000
113
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
assert_addr_policy_ok(smartlist_t *lst) { if (!lst) return; SMARTLIST_FOREACH(lst, addr_policy_t *, t, { tor_assert(t->policy_type == ADDR_POLICY_REJECT || t->policy_type == ADDR_POLICY_ACCEPT); tor_assert(t->prt_min <= t->prt_max); }); }
0
[ "CWE-399" ]
tor
57e35ad3d91724882c345ac709666a551a977f0f
134,597,587,190,467,660,000,000,000,000,000,000,000
9
Avoid possible segfault when handling networkstatus vote with bad flavor Fix for 6530; fix on 0.2.2.6-alpha.
void ParticipantImpl::MyRTPSParticipantListener::onWriterDiscovery( RTPSParticipant*, rtps::WriterDiscoveryInfo&& info) { if (this->mp_participantimpl->mp_listener != nullptr) { this->mp_participantimpl->mp_listener->onPublisherDiscovery(mp_participantimpl->mp_participant, ...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
141,412,104,783,812,120,000,000,000,000,000,000,000
10
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static bool tr_valid(struct kvm_vcpu *vcpu) { struct kvm_segment tr; vmx_get_segment(vcpu, &tr, VCPU_SREG_TR); if (tr.unusable) return false; if (tr.selector & SEGMENT_TI_MASK) /* TI = 1 */ return false; if (tr.type != 3 && tr.type != 11) /* TODO: Check if guest is in IA32e mode */ return false; if (!tr.p...
0
[ "CWE-284" ]
linux
727ba748e110b4de50d142edca9d6a9b7e6111d8
86,709,816,610,542,250,000,000,000,000,000,000,000
17
kvm: nVMX: Enforce cpl=0 for VMX instructions VMX instructions executed inside a L1 VM will always trigger a VM exit even when executed with cpl 3. This means we must perform the privilege check in software. Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks") Cc: stable@vger.kernel.org S...
TEST_P(Http2CodecImplTest, PingFlood) { initialize(); TestRequestHeaderMapImpl request_headers; HttpTestUtility::addDefaultHeaders(request_headers); EXPECT_CALL(request_decoder_, decodeHeaders_(_, false)); request_encoder_->encodeHeaders(request_headers, false); // Send one frame above the outbound contro...
0
[ "CWE-400" ]
envoy
0e49a495826ea9e29134c1bd54fdeb31a034f40c
92,945,190,039,197,950,000,000,000,000,000,000,000
26
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 get_crl_sk(X509_STORE_CTX *ctx, X509_CRL **pcrl, X509_CRL **pdcrl, X509 **pissuer, int *pscore, unsigned int *preasons, STACK_OF(X509_CRL) *crls) { int i, crl_score, best_score = *pscore; unsigned int reasons, best_reasons = 0; X509 *x = ctx->current_ce...
0
[ "CWE-119" ]
openssl
370ac320301e28bb615cee80124c042649c95d14
261,054,933,013,344,500,000,000,000,000,000,000,000
43
Fix length checks in X509_cmp_time to avoid out-of-bounds reads. Also tighten X509_cmp_time to reject more than three fractional seconds in the time; and to reject trailing garbage after the offset. CVE-2015-1789 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
static void midi_attr_release(struct config_item *item) { struct f_midi_opts *opts = to_f_midi_opts(item); usb_put_function_instance(&opts->func_inst); }
0
[ "CWE-415" ]
linux
7fafcfdf6377b18b2a726ea554d6e593ba44349f
29,889,708,237,220,545,000,000,000,000,000,000,000
6
USB: gadget: f_midi: fixing a possible double-free in f_midi It looks like there is a possibility of a double-free vulnerability on an error path of the f_midi_set_alt function in the f_midi driver. If the path is feasible then free_ep_req gets called twice: req->complete = f_midi_complete; err = us...
get_it (PKT_pubkey_enc *enc, DEK *dek, PKT_public_key *sk, u32 *keyid) { gpg_error_t err; byte *frame = NULL; unsigned int n; size_t nframe; u16 csum, csum2; int padding; gcry_sexp_t s_data; char *desc; char *keygrip; byte fp[MAX_FINGERPRINT_LEN]; size_t fpn; if (DBG_CLOCK) log_clock ("decr...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
5,292,404,214,303,607,000,000,000,000,000,000,000
257
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
void jpc_ft_fwdlift_row(jpc_fix_t *a, int numcols, int parity) { register jpc_fix_t *lptr; register jpc_fix_t *hptr; register int n; int llen; llen = (numcols + 1 - parity) >> 1; if (numcols > 1) { /* Apply the first lifting step. */ lptr = &a[0]; hptr = &a[llen]; if (parity) { hptr[0] -= lptr[0]; ...
0
[ "CWE-119", "CWE-787" ]
jasper
4a59cfaf9ab3d48fca4a15c0d2674bf7138e3d1a
117,108,858,343,909,240,000,000,000,000,000,000,000
61
Fixed a buffer overrun problem in the QMFB code in the JPC codec that was caused by a buffer being allocated with a size that was too small in some cases. Added a new regression test case.