func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
do_ldobj_value (VerifyContext *ctx, int token) { ILStackDesc *value; MonoType *type = get_boxable_mono_type (ctx, token, "ldobj"); CLEAR_PREFIX (ctx, PREFIX_UNALIGNED | PREFIX_VOLATILE); if (!type) return; if (!check_underflow (ctx, 1)) return; value = stack_pop (ctx); if (!stack_slot_is_managed_pointer ...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
182,178,623,961,595,350,000,000,000,000,000,000,000
29
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
static int __init atomic_pool_init(void) { struct dma_pool *pool = &atomic_pool; pgprot_t prot = pgprot_dmacoherent(pgprot_kernel); gfp_t gfp = GFP_KERNEL | GFP_DMA; unsigned long nr_pages = pool->size >> PAGE_SHIFT; unsigned long *bitmap; struct page *page; struct page **pages; void *ptr; int bitmap_size = BI...
0
[ "CWE-284", "CWE-264" ]
linux
0ea1ec713f04bdfac343c9702b21cd3a7c711826
163,236,996,639,179,870,000,000,000,000,000,000,000
50
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...
void Magick::Image::floodFillColor(const Geometry &point_, const Magick::Color &fillColor_,const Magick::Color &borderColor_, const bool invert_) { floodFillColor(point_.xOff(),point_.yOff(),fillColor_,borderColor_,invert_); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
248,858,328,862,091,400,000,000,000,000,000,000,000
6
Added missing return to avoid use after free.
static void *malloc_startup(size_t size) { void *result = malloc(size); if (!result) die_startup(); return result; }
0
[ "CWE-20" ]
git
6d8684161ee9c03bed5cb69ae76dfdddb85a0003
111,966,300,063,430,900,000,000,000,000,000,000,000
7
mingw: fix quoting of arguments We need to be careful to follow proper quoting rules. For example, if an argument contains spaces, we have to quote them. Double-quotes need to be escaped. Backslashes need to be escaped, but only if they are followed by a double-quote character. We need to be _extra_ careful to consid...
static int cdrom_ioctl_read_tochdr(struct cdrom_device_info *cdi, void __user *argp) { struct cdrom_tochdr header; int ret; /* cd_dbg(CD_DO_IOCTL, "entering CDROMREADTOCHDR\n"); */ if (copy_from_user(&header, argp, sizeof(header))) return -EFAULT; ret = cdi->ops->audio_ioctl(cdi, CDROMREADTOCHDR, &header); ...
0
[ "CWE-119", "CWE-787" ]
linux
9de4ee40547fd315d4a0ed1dd15a2fa3559ad707
287,942,505,025,575,300,000,000,000,000,000,000,000
20
cdrom: information leak in cdrom_ioctl_media_changed() This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned long. The way the check is written now, if one of the high 32 bits is set then we could read outside the info->slots[] array. This bug is pretty old and it predates git. Reviewed-by: Christ...
int ext4_ext_calc_credits_for_single_extent(struct inode *inode, int nrblocks, struct ext4_ext_path *path) { if (path) { int depth = ext_depth(inode); int ret = 0; /* probably there is space in leaf? */ if (le16_to_cpu(path[depth].p_hdr->eh_entries) < le16_to_cpu(path[depth].p_hdr->eh_max)) { /*...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
89,837,756,792,481,660,000,000,000,000,000,000,000
27
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
static Block_Obj sass_parse_block(Sass_Compiler* compiler) throw() { // assert valid pointer if (compiler == 0) return {}; // The cpp context must be set by now Context* cpp_ctx = compiler->cpp_ctx; Sass_Context* c_ctx = compiler->c_ctx; // We will take care to wire up the rest compiler...
0
[ "CWE-125" ]
libsass
8f40dc03e5ab5a8b2ebeb72b31f8d1adbb2fd6ae
221,490,470,442,923,220,000,000,000,000,000,000,000
48
Optimize line_begin/end search in `handle_error` There is no need to advance by UTF-8 code points when searching for an ASCII character, because UTF-8 is a prefix-free encoding.
static int iommu_prepare_identity_map(struct device *dev, unsigned long long start, unsigned long long end) { struct dmar_domain *domain; int ret; domain = get_domain_for_dev(dev, DEFAULT_DOMAIN_ADDRESS_WIDTH); if (!domain) return -ENOMEM; ret = domain_prepare_identity_map(dev, domain, star...
0
[]
linux
d8b8591054575f33237556c32762d54e30774d28
143,870,182,321,621,600,000,000,000,000,000,000,000
17
iommu/vt-d: Disable ATS support on untrusted devices Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted devices") disables ATS support on the devices which have been marked as untrusted. Unfortunately this is not enough to fix the DMA attack vulnerabiltiies because IOMMU driver allows translated reques...
static void init_defrootdomain(void) { init_rootdomain(&def_root_domain); atomic_set(&def_root_domain.refcount, 1); }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
204,711,784,955,683,330,000,000,000,000,000,000,000
6
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
static int mb86a20s_get_interleaving(struct mb86a20s_state *state, unsigned layer) { int rc; int interleaving[] = { 0, 1, 2, 4, 8 }; static unsigned char reg[] = { [0] = 0x88, /* Layer A */ [1] = 0x8c, /* Layer B */ [2] = 0x90, /* Layer C */ }; if (layer >= ARRAY_SIZE(reg)) return -EINVAL; r...
0
[ "CWE-119" ]
media_tree
eca2d34b9d2ce70165a50510659838e28ca22742
152,045,024,999,834,870,000,000,000,000,000,000,000
25
[media] mb86a20s: apply mask to val after checking for read failure Appling the mask 0x0f to the immediate return of the call to mb86a20s_readreg will always result in a positive value, meaning that the check of ret < 0 will never work. Instead, check for a -ve return value first, and then mask val with 0x0f. Kudos ...
check_need_cap(linenr_T lnum, colnr_T col) { int need_cap = FALSE; char_u *line; char_u *line_copy = NULL; char_u *p; colnr_T endcol; regmatch_T regmatch; if (curwin->w_s->b_cap_prog == NULL) return FALSE; line = ml_get_curline(); endcol = 0; if (getwhitecols(line) >= (int)co...
0
[ "CWE-416" ]
vim
2813f38e021c6e6581c0c88fcf107e41788bc835
331,887,680,187,348,120,000,000,000,000,000,000,000
62
patch 8.2.5072: using uninitialized value and freed memory in spell command Problem: Using uninitialized value and freed memory in spell command. Solution: Initialize "attr". Check for empty line early.
const BlockEntry* Cluster::GetEntry(const CuePoint& cp, const CuePoint::TrackPosition& tp) const { assert(m_pSegment); const long long tc = cp.GetTimeCode(); if (tp.m_block > 0) { const long block = static_cast<long>(tp.m_block); const long index = block - 1; whil...
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
201,138,796,048,940,640,000,000,000,000,000,000,000
99
update libwebm to libwebm-1.0.0.27-358-gdbf1d10 changelog: https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10 Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3
void httpsSslBumpStep2AccessCheckDone(allow_t answer, void *data) { ConnStateData *connState = (ConnStateData *) data; // if the connection is closed or closing, just return. if (!connState->isOpen()) return; debugs(33, 5, "Answer: " << answer << " kind:" << answer.kind); assert(connState-...
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
31,434,313,419,617,983,000,000,000,000,000,000,000
29
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
raise_error (DBusConnection *connection, DBusMessage *in_reply_to, const char *error_name, char *format, ...) { char buf[512]; DBusMessage *reply; va_list args; va_start (args, format); vsnprintf (buf, sizeof (buf),...
0
[]
gnome-screensaver
284c9924969a49dbf2d5fae1d680d3310c4df4a3
112,969,992,957,688,540,000,000,000,000,000,000,000
24
Remove session inhibitors if the originator falls of the bus This fixes a problem where totem leaves inhibitors behind, see bug 600488.
get_c_civil(union DateData *x) { assert(complex_dat_p(x)); if (!have_civil_p(x)) { #ifndef USE_PACK int jd, y, m, d; #else int jd, y, m, d, h, min, s; #endif assert(have_jd_p(x)); get_c_df(x); jd = jd_utc_to_local(x->c.jd, x->c.df, x->c.of); c_jd_to_civil(jd, c_virtual_sg(x), &y, &m, &d); x->c.year = y;...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
329,824,725,064,604,930,000,000,000,000,000,000,000
27
Add length limit option for methods that parses date strings `Date.parse` now raises an ArgumentError when a given date string is longer than 128. You can configure the limit by giving `limit` keyword arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`, the limit is disabled. Not only `Date.parse`...
static int snd_emu0204_ch_switch_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct usb_mixer_elem_list *list = snd_kcontrol_chip(kcontrol); struct usb_mixer_interface *mixer = list->mixer; unsigned int value = ucontrol->value.enumerated.item[0]; int err; if (value > 1) re...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
140,790,296,851,599,060,000,000,000,000,000,000,000
18
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...
MaybeLocal<Value> GetCurveNistName(Environment* env, const int nid) { const char* nist = EC_curve_nid2nist(nid); return nist != nullptr ? MaybeLocal<Value>(OneByteString(env->isolate(), nist)) : MaybeLocal<Value>(Undefined(env->isolate())); }
0
[ "CWE-295" ]
node
466e5415a2b7b3574ab5403acb87e89a94a980d1
115,791,322,253,001,700,000,000,000,000,000,000,000
6
crypto,tls: implement safe x509 GeneralName format This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even ...
MATCHER_P(ProtoEq, expected, "") { const bool equal = TestUtility::protoEqual(arg, expected, /*ignore_repeated_field_ordering=*/false); if (!equal) { *result_listener << "\n" << "==========================Expected proto:===========================\n" << expected.D...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
25,283,764,546,831,850,000,000,000,000,000,000,000
13
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...
int ssl_parse_certificate( ssl_context *ssl ) { int ret; size_t i, n; SSL_DEBUG_MSG( 2, ( "=> parse certificate" ) ); if( ssl->endpoint == SSL_IS_SERVER && ssl->authmode == SSL_VERIFY_NONE ) { ssl->verify_result = BADCERT_SKIP_VERIFY; SSL_DEBUG_MSG( 2, ( "<= skip parse cert...
1
[ "CWE-20" ]
polarssl
1922a4e6aade7b1d685af19d4d9339ddb5c02859
197,103,510,246,300,860,000,000,000,000,000,000
153
ssl_parse_certificate() now calls x509parse_crt_der() directly
static int dump_tablespaces_for_databases(char** databases) { DYNAMIC_STRING where; int r; int i; init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN (" "SELECT DISTINCT TABLESPACE_NAME FROM" " INFORMATION_SCHEMA.PARTITIONS" " WHERE" ...
0
[ "CWE-319" ]
mysql-server
0002e1380d5f8c113b6bce91f2cf3f75136fd7c7
129,247,555,533,984,000,000,000,000,000,000,000,000
29
BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION MYSQL_OPT_SSL_MODE option introduced. It is set in case of --ssl-mode=REQUIRED and permits only SSL connection. (cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec)
static DeviceTable *SFDReadDeviceTable(FILE *sfd,DeviceTable *adjust) { int i, junk, first, last, ch, len; while ( (ch=nlgetc(sfd))==' ' ); if ( ch=='{' ) { while ( (ch=nlgetc(sfd))==' ' ); if ( ch=='}' ) return(NULL); else ungetc(ch,sfd); getint(sfd,&first); ch = nlgetc(sfd); /* Should be '-' *...
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
72,481,669,125,429,710,000,000,000,000,000,000,000
35
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
const char *MirrorJob::AddPattern(Ref<PatternSet>& exclude,char opt,const char *optarg) { PatternSet::Type type= (opt=='x'||opt=='X'||opt=='\0'?PatternSet::EXCLUDE:PatternSet::INCLUDE); PatternSet::Pattern *pattern=0; if(opt=='x' || opt=='i') { Ref<PatternSet::Regex> rx(new PatternSet::Regex(opt...
0
[ "CWE-20", "CWE-401" ]
lftp
a27e07d90a4608ceaf928b1babb27d4d803e1992
151,394,225,137,656,730,000,000,000,000,000,000,000
42
mirror: prepend ./ to rm and chmod arguments to avoid URL recognition (fix #452)
int SSL_CIPHER_get_bits(const SSL_CIPHER *c, int *alg_bits) { int ret=0; if (c != NULL) { if (alg_bits != NULL) *alg_bits = c->alg_bits; ret = c->strength_bits; } return(ret); }
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
210,464,390,645,833,070,000,000,000,000,000,000,000
11
Add SRP support.
int xmlSAXUserParseMemory(xmlSAXHandlerPtr sax, void *user_data, const char *buffer, int size) { int ret = 0; xmlParserCtxtPtr ctxt; xmlInitParser(); ctxt = xmlCreateMemoryParserCtxt(buffer, size); if (ctxt == NULL) return -1; if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler) ...
0
[ "CWE-125" ]
libxml2
77404b8b69bc122d12231807abf1a837d121b551
273,479,153,014,970,750,000,000,000,000,000,000,000
37
Make sure the parser returns when getting a Stop order patch backported from chromiun bug fixes, assuming author is Chris
PHP_FUNCTION(hash_update_file) { zval *zhash, *zcontext = NULL; php_hash_data *hash; php_stream_context *context; php_stream *stream; char *filename, buf[1024]; int filename_len, n; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rp|r", &zhash, &filename, &filename_len, &zcontext) == FAILURE) { return; ...
0
[ "CWE-20" ]
php-src
52b93f0cfd3cba7ff98cc5198df6ca4f23865f80
38,618,555,836,904,900,000,000,000,000,000,000,000
29
Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions)
static int n_tty_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg) { struct n_tty_data *ldata = tty->disc_data; int retval; switch (cmd) { case TIOCOUTQ: return put_user(tty_chars_in_buffer(tty), (int __user *) arg); case TIOCINQ: down_write(&tty->termios_rwsem); ...
0
[ "CWE-704" ]
linux
966031f340185eddd05affcf72b740549f056348
40,189,642,543,900,780,000,000,000,000,000,000,000
21
n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD) We added support for EXTPROC back in 2010 in commit 26df6d13406d ("tty: Add EXTPROC support for LINEMODE") and the intent was to allow it to override some (all?) ICANON behavior. Quoting from that original commit message: There is a new bi...
static int cap_setprocattr(struct task_struct *p, char *name, void *value, size_t size) { return -EINVAL; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
72,141,341,272,323,190,000,000,000,000,000,000,000
5
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
static void ndp_msg_addrto_adjust_all_routers(struct in6_addr *addr) { struct in6_addr any = IN6ADDR_ANY_INIT; if (memcmp(addr, &any, sizeof(any))) return; addr->s6_addr32[0] = htonl(0xFF020000); addr->s6_addr32[1] = 0; addr->s6_addr32[2] = 0; addr->s6_addr32[3] = htonl(0x2); }
0
[ "CWE-284" ]
libndp
a4892df306e0532487f1634ba6d4c6d4bb381c7f
216,995,587,435,689,200,000,000,000,000,000,000,000
11
libndp: validate the IPv6 hop limit None of the NDP messages should ever come from a non-local network; as stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA), and 8.1. (redirect): - The IP Hop Limit field has a value of 255, i.e., the packet could not possibly have been forwarded by a router. T...
static void netlink_sock_destruct(struct sock *sk) { struct netlink_sock *nlk = nlk_sk(sk); if (nlk->cb_running) { if (nlk->cb.done) nlk->cb.done(&nlk->cb); module_put(nlk->cb.module); kfree_skb(nlk->cb.skb); } skb_queue_purge(&sk->sk_receive_queue); if (!sock_flag(sk, SOCK_DEAD)) { printk(KERN_ERR ...
0
[ "CWE-362", "CWE-415" ]
linux
92964c79b357efd980812c4de5c1fd2ec8bb5520
312,448,552,737,230,140,000,000,000,000,000,000,000
23
netlink: Fix dump skb leak/double free When we free cb->skb after a dump, we do it after releasing the lock. This means that a new dump could have started in the time being and we'll end up freeing their skb instead of ours. This patch saves the skb and module before we unlock so we free the right memory. Fixes: 16...
fileinfo( int fullname, // when non-zero print full path int shorthelp, int dont_truncate) { char_u *name; int n; char *p; char *buffer; size_t len; buffer = alloc(IOSIZE); if (buffer == NULL) return; if (fullname > 1) // 2 CTRL-G: include buffer number { vim...
0
[ "CWE-416" ]
vim
9b4a80a66544f2782040b641498754bcb5b8d461
204,057,217,774,182,460,000,000,000,000,000,000,000
113
patch 8.2.4281: using freed memory with :lopen and :bwipe Problem: Using freed memory with :lopen and :bwipe. Solution: Do not use a wiped out buffer.
static longT _distance_dist_cdt(const longT x, const longT i, const longT *const g) { const longT d = x<i?i - x:x - i; return d<g[i]?g[i]:d;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
53,236,866,380,127,340,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
void MainWindow::showSaveError() { QMessageBox dialog(QMessageBox::Critical, qApp->applicationName(), tr("There was an error saving. Please try again."), QMessageBox::Ok, this); dialog.setDefaultButton(QMessageBox::Ok); ...
0
[ "CWE-89", "CWE-327", "CWE-295" ]
shotcut
f008adc039642307f6ee3378d378cdb842e52c1d
30,372,757,665,678,185,000,000,000,000,000,000,000
12
fix upgrade check is not using TLS correctly
uint32_t BinaryProtocolWriter::serializedSizeListBegin( TType /*elemType*/, uint32_t /*size*/ ) const { return serializedSizeByte() + serializedSizeI32(); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
98,318,947,458,276,500,000,000,000,000,000,000,000
6
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
static bool tcp_time_to_recover(struct sock *sk, int flag) { struct tcp_sock *tp = tcp_sk(sk); __u32 packets_out; /* Trick#1: The loss is proven. */ if (tp->lost_out) return true; /* Not-A-Trick#2 : Classic rule... */ if (tcp_dupack_heuristics(tp) > tp->reordering) return true; /* Trick#4: It is still not...
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
55,460,021,255,363,190,000,000,000,000,000,000,000
48
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
static void rfc2231_join_continuations (PARAMETER **head, struct rfc2231_parameter *par) { struct rfc2231_parameter *q; char attribute[STRING]; char charset[STRING]; char *value = NULL; char *valp; int encoded; size_t l, vl; while (par) { value = NULL; l = 0; strfcpy (attribute, par->...
0
[]
mutt
3b6f6b829718ec8a7cf3eb6997d86e83e6c38567
335,653,651,034,711,500,000,000,000,000,000,000,000
52
Avoid undefined behavior on huge integer in a RFC 2231 header. The atoi() function was called on the index, which can potentially be huge in an invalid message and can yield undefined behavior. The mutt_atoi() function is now used for error detection.
quint32 qHash(const ShortcutTarget &t) { quint32 h = t.bForceCenter ? 0x55555555 : 0xaaaaaaaa; if (t.bUsers) { foreach(unsigned int u, t.qlSessions) h ^= u; } else { h ^= t.iChannel; if (t.bLinks) h ^= 0x80000000; if (t.bChildren) h ^= 0x40000000; h ^= qHash(t.qsGroup); h = ~h; } return h; }
0
[ "CWE-310" ]
mumble
5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e
103,449,104,208,468,750,000,000,000,000,000,000,000
16
Explicitly remove file permissions for settings and DB
int main (int argc, char **argv) { int c; bool lock_memory = false; bool do_daemonize = false; bool preallocate = false; int maxcore = 0; char *username = NULL; char *pid_file = NULL; struct passwd *pw; struct rlimit rlim; char *buf; char unit = '\0'; int size_max = 0; ...
0
[ "CWE-190", "CWE-667" ]
memcached
a8c4a82787b8b6c256d61bd5c42fb7f92d1bae00
55,696,336,462,404,370,000,000,000,000,000,000,000
870
Don't overflow item refcount on get Counts as a miss if the refcount is too high. ASCII multigets are the only time refcounts can be held for so long. doing a dirty read of refcount. is aligned. trying to avoid adding an extra refcount branch for all calls of item_get due to performance. might be able to move it in ...
static irqreturn_t gfar_transmit(int irq, void *grp_id) { struct gfar_priv_grp *grp = (struct gfar_priv_grp *)grp_id; unsigned long flags; u32 imask; if (likely(napi_schedule_prep(&grp->napi_tx))) { spin_lock_irqsave(&grp->grplock, flags); imask = gfar_read(&grp->regs->imask); imask &= IMASK_TX_DISABLED; g...
0
[]
linux
d8861bab48b6c1fc3cdbcab8ff9d1eaea43afe7f
301,219,845,447,791,400,000,000,000,000,000,000,000
22
gianfar: fix jumbo packets+napi+rx overrun crash When using jumbo packets and overrunning rx queue with napi enabled, the following sequence is observed in gfar_add_rx_frag: | lstatus | | skb | t | lstatus, size, flags | first | len, data_len, *...
md_free_attribute(MD_CTX* ctx, MD_ATTRIBUTE_BUILD* build) { MD_UNUSED(ctx); if(build->substr_alloc > 0) { free(build->text); free(build->substr_types); free(build->substr_offsets); } }
0
[ "CWE-125", "CWE-908" ]
md4c
4fc808d8fe8d8904f8525bb4231d854f45e23a19
134,853,240,169,524,780,000,000,000,000,000,000,000
10
md_analyze_line: Avoid reading 1 byte beyond the input size. Fixes #155.
listener_ref_entry_check (GSListener *listener, int entry_type) { switch (entry_type) { case REF_ENTRY_TYPE_INHIBIT: listener_check_activation (listener); break; case REF_ENTRY_TYPE_THROTTLE: listener_check_throttl...
0
[]
gnome-screensaver
284c9924969a49dbf2d5fae1d680d3310c4df4a3
283,503,616,884,284,800,000,000,000,000,000,000,000
15
Remove session inhibitors if the originator falls of the bus This fixes a problem where totem leaves inhibitors behind, see bug 600488.
static int bounce_error_event(struct snd_seq_client *client, struct snd_seq_event *event, int err, int atomic, int hop) { struct snd_seq_event bounce_ev; int result; if (client == NULL || ! (client->filter & SNDRV_SEQ_FILTER_BOUNCE) || ! client->accept_input) return 0; /* ignored */ ...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
117,877,639,438,117,700,000,000,000,000,000,000,000
32
ALSA: seq: Fix missing NULL check at remove_events ioctl snd_seq_ioctl_remove_events() calls snd_seq_fifo_clear() unconditionally even if there is no FIFO assigned, and this leads to an Oops due to NULL dereference. The fix is just to add a proper NULL check. Reported-by: Dmitry Vyukov <dvyukov@google.com> Tested-by...
static void pndisc_redo(struct sk_buff *skb) { ndisc_recv_ns(skb); kfree_skb(skb); }
0
[ "CWE-17" ]
linux
6fd99094de2b83d1d4c8457f2c83483b2828e75a
172,698,684,141,416,900,000,000,000,000,000,000,000
5
ipv6: Don't reduce hop limit for an interface A local route may have a lower hop_limit set than global routes do. RFC 3756, Section 4.2.7, "Parameter Spoofing" > 1. The attacker includes a Current Hop Limit of one or another small > number which the attacker knows will cause legitimate packets to > be...
address_space_translate_internal(AddressSpaceDispatch *d, hwaddr addr, hwaddr *xlat, hwaddr *plen, bool resolve_subpage) { MemoryRegionSection *section; Int128 diff; section = address_space_lookup_region(d, addr, resolve_subpage); /* Compute offset within MemoryRegionSe...
1
[]
qemu
965eb2fcdfe919ecced6c34803535ad32dc1249c
77,627,361,203,170,470,000,000,000,000,000,000,000
17
exec: do not clamp accesses to MMIO regions It is common for MMIO registers to overlap, for example a 4 byte register at 0xcf8 (totally random choice... :)) and a 1 byte register at 0xcf9. If these registers are implemented via separate MemoryRegions, it is wrong to clamp the accesses as the value written would be tru...
bool handler::check_table_binlog_row_based_internal(bool binlog_row) { THD *thd= table->in_use; return (table->s->can_do_row_logging && thd->is_current_stmt_binlog_format_row() && /* Wsrep partially enables binary logging if it have not been explicitly turned on. As a re...
0
[ "CWE-416" ]
server
af810407f78b7f792a9bb8c47c8c532eb3b3a758
46,263,138,383,689,810,000,000,000,000,000,000,000
28
MDEV-28098 incorrect key in "dup value" error after long unique reset errkey after using it, so that it wouldn't affect the next error message in the next statement
loop_info64_from_old(const struct loop_info *info, struct loop_info64 *info64) { memset(info64, 0, sizeof(*info64)); info64->lo_number = info->lo_number; info64->lo_device = info->lo_device; info64->lo_inode = info->lo_inode; info64->lo_rdevice = info->lo_rdevice; info64->lo_offset = info->lo_offset; info64->lo_...
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
105,451,587,915,348,030,000,000,000,000,000,000,000
20
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...
check_and_convert_grammar (void) { /* Grammar has been read. Do some checking. */ if (nrules == 0) complain (NULL, fatal, _("no rules in the input grammar")); /* If the user did not define her EOFTOKEN, do it now. */ if (!eoftoken) { eoftoken = symbol_get ("YYEOF", empty_loc); eoftoken->c...
1
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
74,779,295,211,320,560,000,000,000,000,000,000,000
74
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
pfm_proc_show_header(struct seq_file *m) { struct list_head * pos; pfm_buffer_fmt_t * entry; unsigned long flags; seq_printf(m, "perfmon version : %u.%u\n" "model : %s\n" "fastctxsw : %s\n" "expert mode : %s\n" "ovfl_mask : 0x%l...
0
[]
linux-2.6
41d5e5d73ecef4ef56b7b4cde962929a712689b4
10,328,676,433,442,843,000,000,000,000,000,000,000
60
[IA64] permon use-after-free fix Perfmon associates vmalloc()ed memory with a file descriptor, and installs a vma mapping that memory. Unfortunately, the vm_file field is not filled in, so processes with mappings to that memory do not prevent the file from being closed and the memory freed. This results in use-after...
read_pbm_integer(j_compress_ptr cinfo, FILE *infile, unsigned int maxval) /* Read an unsigned decimal integer from the PPM file */ /* Swallows one trailing character after the integer */ /* Note that on a 16-bit-int machine, only values up to 64k can be read. */ /* This should not be a problem in practice. */ { regis...
1
[ "CWE-200", "CWE-125" ]
libjpeg-turbo
9c78a04df4e44ef6487eee99c4258397f4fdca55
45,096,973,031,005,680,000,000,000,000,000,000,000
30
cjpeg: Fix OOB read caused by malformed 8-bit BMP ... in which one or more of the color indices is out of range for the number of palette entries. Fix partly borrowed from jpeg-9c. This commit also adopts Guido's JERR_PPM_OUTOFRANGE enum value in lieu of our project-specific JERR_PPM_TOOLARGE enum value. Fixes #258
static SDL_INLINE int hasSSE2() { static int val = -1; if (val != -1) { return val; } val = SDL_HasSSE2(); return val; }
0
[ "CWE-190", "CWE-787" ]
SDL_ttf
db1b41ab8bde6723c24b866e466cad78c2fa0448
279,141,387,284,416,000,000,000,000,000,000,000,000
9
More integer overflow (see bug #187) Make sure that 'width + alignment' doesn't overflow, otherwise it could create a SDL_Surface of 'width' but with wrong 'pitch'
gst_rmdemux_sink_activate_mode (GstPad * sinkpad, GstObject * parent, GstPadMode mode, gboolean active) { gboolean res; GstRMDemux *demux; demux = GST_RMDEMUX (parent); switch (mode) { case GST_PAD_MODE_PUSH: demux->seekable = FALSE; demux->running = active; res = TRUE; break; ...
0
[]
gst-plugins-ugly
9726aaf78e6643a5955864f444852423de58de29
302,253,739,732,721,350,000,000,000,000,000,000,000
33
rmdemux: Make sure we have enough data available when parsing audio/video packets Otherwise there will be out-of-bounds reads and potential crashes. Thanks to Natalie Silvanovich for reporting. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/-/issues/37 Part-of: <https://gitlab.freedesktop.org/gstre...
static int nested_ept_init_mmu_context(struct kvm_vcpu *vcpu) { WARN_ON(mmu_is_nested(vcpu)); if (!valid_ept_address(vcpu, nested_ept_get_cr3(vcpu))) return 1; kvm_mmu_unload(vcpu); kvm_init_shadow_ept_mmu(vcpu, to_vmx(vcpu)->nested.nested_vmx_ept_caps & VMX_EPT_EXECUTE_ONLY_BIT, nested_ept_ad_enabled(v...
0
[ "CWE-20", "CWE-617" ]
linux
3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb
229,987,732,922,989,900,000,000,000,000,000,000,000
18
KVM: VMX: Do not BUG() on out-of-bounds guest IRQ The value of the guest_irq argument to vmx_update_pi_irte() is ultimately coming from a KVM_IRQFD API call. Do not BUG() in vmx_update_pi_irte() if the value is out-of bounds. (Especially, since KVM as a whole seems to hang after that.) Instead, print a message only o...
void dwc3_gadget_exit(struct dwc3 *dwc) { usb_del_gadget_udc(&dwc->gadget); dwc3_gadget_free_endpoints(dwc); dma_free_coherent(dwc->sysdev, DWC3_BOUNCE_SIZE, dwc->bounce, dwc->bounce_addr); kfree(dwc->setup_buf); dma_free_coherent(dwc->sysdev, sizeof(*dwc->ep0_trb) * 2, dwc->ep0_trb, dwc->ep0_trb_addr); ...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
134,626,041,208,546,010,000,000,000,000,000,000,000
10
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
cpTag(TIFF* in, TIFF* out, uint16 tag, uint16 count, TIFFDataType type) { switch (type) { case TIFF_SHORT: if (count == 1) { uint16 shortv; CopyField(tag, shortv); } else if (count == 2) { uint16 shortv1, shortv2; CopyField2(tag, shortv1, shortv2); } else if (count == 4) { uint16 *tr, *tg, *tb, *...
0
[ "CWE-190" ]
libtiff
43c0b81a818640429317c80fea1e66771e85024b
80,183,793,025,153,210,000,000,000,000,000,000,000
53
* tools/tiffcp.c: fix read of undefined variable in case of missing required tags. Found on test case of MSVR 35100. * tools/tiffcrop.c: fix read of undefined buffer in readContigStripsIntoBuffer() due to uint16 overflow. Probably not a security issue but I can be wrong. Reported as MSVR 35100 by Axel Souchet from the ...
static void url_stream_end (auth_client *auth_user) { char *mount, *server; ice_config_t *config = config_get_config (); mount_proxy *mountinfo = config_find_mount (config, auth_user->mount, MOUNT_TYPE_NORMAL); auth_t *auth = mountinfo->auth; auth_url *url = auth->state; char *stream_end_url; ...
0
[ "CWE-119" ]
icecast-server
b21a7283bd1598c5af0bbb250a041ba8198f98f2
300,326,023,002,347,480,000,000,000,000,000,000,000
57
Fix: Fixed buffer overflows in URL auth code. See: #2342
void jam_v1_transition(jambuf_t *buf, const struct state_v1_microcode *transition) { if (transition == NULL) { jam(buf, "NULL"); } else { jam(buf, "%s->%s", finite_states[transition->state]->short_name, finite_states[transition->next_state]->short_name); } }
0
[ "CWE-125" ]
libreswan
471a3e41a449d7c753bc4edbba4239501bb62ba8
125,158,214,711,433,540,000,000,000,000,000,000,000
10
security: Fix for CVE-2020-1763 pluto will crash on a null pointer dereference when trying to log an error for an IKEv1 packet containing bogus information and/or flags. Signed-off-by: Paul Wouters <pwouters@redhat.com>
static BrotliDecoderErrorCode ReadCodeLengthCodeLengths(BrotliDecoderState* s) { BrotliBitReader* br = &s->br; BrotliMetablockHeaderArena* h = &s->arena.header; uint32_t num_codes = h->repeat; unsigned space = h->space; uint32_t i = h->sub_loop_counter; for (; i < BROTLI_CODE_LENGTH_CODES; ++i) { const ...
0
[ "CWE-120" ]
brotli
223d80cfbec8fd346e32906c732c8ede21f0cea6
64,034,166,163,295,730,000,000,000,000,000,000,000
44
Update (#826) * IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB * simplify max Huffman table size calculation * eliminate symbol duplicates (static arrays in .h files) * minor combing in research/ code
GF_Err stsh_box_read(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 count, i; GF_ShadowSyncBox *ptr = (GF_ShadowSyncBox *)s; ISOM_DECREASE_SIZE(s, 4) count = gf_bs_read_u32(bs); if (ptr->size / 8 < count) return GF_ISOM_INVALID_FILE; for (i = 0; i < count; i++) { GF_StshEntry *ent = (GF_StshEntry *) gf_mallo...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
66,585,983,122,317,050,000,000,000,000,000,000,000
21
fixed #2255
operate(struct Configurable *config, int argc, argv_item_t argv[]) { char errorbuffer[CURL_ERROR_SIZE]; char useragent[128]; /* buah, we don't want a larger default user agent */ struct ProgressData progressbar; struct getout *urlnode; struct getout *nextnode; struct OutStruct outs; struct OutStruct head...
0
[ "CWE-125" ]
curl
70b1900dd13d16f2e83f571407a614541d5ac9ba
97,769,377,570,555,070,000,000,000,000,000,000,000
1,134
'mytx' in bug report #1723194 (http://curl.haxx.se/bug/view.cgi?id=1723194) pointed out that the warnf() function in the curl tool didn't properly deal with the cases when excessively long words were used in the string to chop up.
rsvg_filter_primitive_merge_node_free (RsvgNode * self) { RsvgFilterPrimitive *upself; upself = (RsvgFilterPrimitive *) self; g_string_free (upself->in, TRUE); _rsvg_node_free (self); }
0
[]
librsvg
34c95743ca692ea0e44778e41a7c0a129363de84
56,308,720,959,898,760,000,000,000,000,000,000,000
7
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...
static void pair_ut64(const char *key, ut64 val, int mode, bool last) { pair (key, sdb_fmt ("%"PFMT64d, val), mode, last); }
0
[ "CWE-78" ]
radare2
5411543a310a470b1257fb93273cdd6e8dfcb3af
17,642,805,534,989,345,000,000,000,000,000,000,000
3
More fixes for the CVE-2019-14745
FORCE_INLINE int LZ4_compress_limitedOutput_local(const char* src, char* dst, int size, int maxOut, int clevel) { (void)clevel; return LZ4_compress_limitedOutput(src, dst, size, maxOut); }
0
[ "CWE-20" ]
lz4
da5373197e84ee49d75b8334d4510689731d6e90
101,205,610,003,940,780,000,000,000,000,000,000,000
2
Fixed : issue 52 (reported by Ludwig Strigeus)
RZ_API RZ_OWN RzBinStrDb *rz_bin_string_database_new(RZ_NULLABLE RZ_OWN RzList /*<RzBinString *>*/ *list) { RzBinStrDb *db = RZ_NEW0(RzBinStrDb); if (!db) { RZ_LOG_ERROR("rz_bin: Cannot allocate RzBinStrDb\n"); rz_list_free(list); return NULL; } db->list = list ? list : rz_list_newf((RzListFree)rz_bin_string...
0
[ "CWE-200", "CWE-787" ]
rizin
07b43bc8aa1ffebd9b68d60624c9610cf7e460c7
233,750,235,994,915,400,000,000,000,000,000,000,000
34
fix oob read on luac
int wc_InitRsaHw(RsaKey* key) { unsigned char* m; /* RSA modulous */ word32 e = 0; /* RSA public exponent */ int mSz; int eSz; if (key == NULL) { return BAD_FUNC_ARG; } mSz = mp_unsigned_bin_size(&(key->n)); m = (unsigned char*)XMALLOC(mSz, key->heap, DYNAMIC_TYPE_KEY); ...
0
[ "CWE-310", "CWE-787" ]
wolfssl
fb2288c46dd4c864b78f00a47a364b96a09a5c0f
275,713,476,500,028,050,000,000,000,000,000,000,000
64
RSA-PSS: Handle edge case with encoding message to hash When the key is small relative to the digest (1024-bit key, 64-byte hash, 61-byte salt length), the internal message to hash is larger than the output size. Allocate a buffer for the message when this happens.
struct file *fget_task(struct task_struct *task, unsigned int fd) { struct file *file = NULL; task_lock(task); if (task->files) file = __fget_files(task->files, fd, 0, 1); task_unlock(task); return file; }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
310,832,898,336,456,650,000,000,000,000,000,000,000
11
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
int kvm_read_guest_virt(struct kvm_vcpu *vcpu, gva_t addr, void *val, unsigned int bytes, struct x86_exception *exception) { u64 access = (static_call(kvm_x86_get_cpl)(vcpu) == 3) ? PFERR_USER_MASK : 0; /* * FIXME: this should call handle_emulation_failure if X86EMUL_IO_NEEDED * is returned, ...
0
[ "CWE-459" ]
linux
683412ccf61294d727ead4a73d97397396e69a6b
115,795,795,931,997,800,000,000,000,000,000,000,000
16
KVM: SEV: add cache flush to solve SEV cache incoherency issues Flush the CPU caches when memory is reclaimed from an SEV guest (where reclaim also includes it being unmapped from KVM's memslots). Due to lack of coherency for SEV encrypted memory, failure to flush results in silent data corruption if userspace is mal...
int kvmppc_kvm_pv(struct kvm_vcpu *vcpu) { int nr = kvmppc_get_gpr(vcpu, 11); int r; unsigned long __maybe_unused param1 = kvmppc_get_gpr(vcpu, 3); unsigned long __maybe_unused param2 = kvmppc_get_gpr(vcpu, 4); unsigned long __maybe_unused param3 = kvmppc_get_gpr(vcpu, 5); unsigned long __maybe_unused param4 = kv...
0
[ "CWE-476" ]
linux
ac64115a66c18c01745bbd3c47a36b124e5fd8c0
61,278,535,392,619,680,000,000,000,000,000,000,000
90
KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM The following program causes a kernel oops: #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <sys/ioctl.h> #include <linux/kvm.h> main() { int fd = open("/dev/kvm", O_RDWR); ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM); } This happe...
static bool check_show_access(THD *thd, TABLE_LIST *table) { /* This is a SHOW command using an INFORMATION_SCHEMA table. check_access() has not been called for 'table', and SELECT is currently always granted on the I_S, so we automatically grant SELECT on table here, to bypass a call to check_access(...
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
201,619,616,027,011,800,000,000,000,000,000,000,000
85
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...
getNotify(PGconn *conn) { int be_pid; int nmlen; PGnotify *newNotify; if (pqGetInt(&be_pid, 4, conn)) return EOF; if (pqGets(&conn->workBuffer, conn)) return EOF; /* * Store the relation name right after the PQnotify structure so it can * all be freed at once. We don't use NAMEDATALEN because we ...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
227,749,939,256,141,950,000,000,000,000,000,000,000
35
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
MODRET set_rewritehome(cmd_rec *cmd) { int bool = -1; config_rec *c = NULL; CHECK_ARGS(cmd, 1); CHECK_CONF(cmd, CONF_ROOT|CONF_VIRTUAL|CONF_GLOBAL); bool = get_boolean(cmd, 1); if (bool == -1) CONF_ERROR(cmd, "expected Boolean parameter"); c = add_config_param(cmd->argv[0], 1, NULL); c->argv[0] =...
0
[ "CWE-59", "CWE-61" ]
proftpd
ecff21e0d0e84f35c299ef91d7fda088e516d4ed
330,403,210,365,753,650,000,000,000,000,000,000,000
17
Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks is off, to 1.3.5 branch.
static inline int ip6mr_forward2_finish(struct net *net, struct sock *sk, struct sk_buff *skb) { __IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_OUTFORWDATAGRAMS); __IP6_ADD_STATS(net, ip6_dst_idev(skb_dst(skb)), IPSTATS_MIB_OUTOCTETS, skb->len); return dst_output(net, sk, skb); }
0
[ "CWE-20" ]
linux
99253eb750fda6a644d5188fb26c43bad8d5a745
119,489,454,191,928,030,000,000,000,000,000,000,000
8
ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed the issue for ipv4 ipmr: ip_mroute_setsockopt() & ip_mroute_getsockopt() should not access/set raw_sk(sk)->ipmr_table before making sure the socket is a raw socket, and prot...
flatpak_dir_get_remote_prio (FlatpakDir *self, const char *remote_name) { GKeyFile *config = flatpak_dir_get_repo_config (self); g_autofree char *group = get_group (remote_name); if (config && g_key_file_has_key (config, group, "xa.prio", NULL)) return g_key_file_get_integer (con...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
232,670,084,811,463,800,000,000,000,000,000,000,000
11
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
testcase_write_mangled(Solver *solv, const char *dir, int resultflags, const char *testcasename, const char *resultname) { Pool *pool = solv->pool; Repo *repo; int i; Id arch, repoid; Id lowscore; FILE *fp; Strqueue sq; char *cmd, *out, *result; const char *s; if (!testcasename) testcasename = ...
0
[ "CWE-120" ]
libsolv
0077ef29eb46d2e1df2f230fc95a1d9748d49dec
44,320,111,951,588,670,000,000,000,000,000,000,000
226
testcase_read: error out if repos are added or the system is changed too late We must not add new solvables after the considered map was created, the solver was created, or jobs were added. We may not changed the system after jobs have been added. (Jobs may point inside the whatproviedes array, so we must not invalid...
void tmax_del(GF_Box *s) { gf_free((GF_TMAXBox *)s); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
202,809,039,826,505,550,000,000,000,000,000,000,000
4
prevent dref memleak on invalid input (#1183)
void CLASS parseFujiMakernotes(unsigned tag, unsigned type) { switch (tag) { case 0x1002: imgdata.makernotes.fuji.WB_Preset = get2(); break; case 0x1011: imgdata.other.FlashEC = getreal(type); break; case 0x1020: imgdata.makernotes.fuji.Macro = get2(); break; case 0x1021: imgdata...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
122,049,932,068,271,610,000,000,000,000,000,000,000
78
Secunia SA75000 advisory: several buffer overruns
PHP_FUNCTION(openssl_spki_verify) { int spkstr_len, i = 0; char *spkstr = NULL, * spkstr_cleaned = NULL; EVP_PKEY *pkey = NULL; NETSCAPE_SPKI *spki = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &spkstr, &spkstr_len) == FAILURE) { return; } RETVAL_FALSE; if (spkstr == NULL) { php_error...
0
[ "CWE-754" ]
php-src
89637c6b41b510c20d262c17483f582f115c66d6
203,404,553,052,824,540,000,000,000,000,000,000,000
56
Fix bug #74651 - check EVP_SealInit as it can return -1
void tls_cert_generate(TALLOC_CTX *mem_ctx, const char *hostname, const char *keyfile, const char *certfile, const char *cafile) { gnutls_x509_crt cacrt, crt; gnutls_x509_privkey key, cakey; uint32_t serial = (uint32_t)time(NULL); unsigned char keyid[100]; char buf[4096]; size_t bufsi...
0
[]
samba
e0248cde8dcd82f348218665f5edd6b30cd3ef1f
247,397,675,956,588,750,000,000,000,000,000,000,000
133
CVE-2013-4476: s4:libtls: Create tls private key file (key.pem) with mode 0600 Bug: https://bugzilla.samba.org/show_bug.cgi?id=10234 Signed-off-by: Björn Baumbach <bb@sernet.de> Reviewed-by: Stefan Metzmacher <metze@samba.org>
sd2_open (SF_PRIVATE *psf) { int subformat, error = 0, valid ; /* SD2 is always big endian. */ psf->endian = SF_ENDIAN_BIG ; if (psf->file.mode == SFM_READ || (psf->file.mode == SFM_RDWR && psf->rsrclength > 0)) { psf_use_rsrc (psf, SF_TRUE) ; valid = psf_file_valid (psf) ; psf_use_rsrc (psf, SF_FALSE) ; if...
0
[ "CWE-119", "CWE-787" ]
libsndfile
dbe14f00030af5d3577f4cabbf9861db59e9c378
237,156,098,444,037,980,000,000,000,000,000,000,000
69
src/sd2.c : Fix two potential buffer read overflows. Closes: https://github.com/erikd/libsndfile/issues/93
static char *get_field(char *src, int nfields) { char *p = src; int i; for (i = 0; i < nfields; i++) { while (*p && *p != ' ' && *p != '\t') p++; if (!*p) break; p++; } return p; }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
70,570,902,945,021,570,000,000,000,000,000,000,000
14
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
TEST_F(QueryPlannerTest, ContainedOrOfAndCollapseIndenticalScansWithFilter2) { addIndex(BSON("a" << 1 << "b" << 1)); runQuery(fromjson("{c: 1, $or: [{a:{$gte:1,$lte:1}, b:2}, {a:1, b:2, d:3}]}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fet...
0
[]
mongo
ee97c0699fd55b498310996ee002328e533681a3
234,793,157,774,344,480,000,000,000,000,000,000,000
12
SERVER-36993 Fix crash due to incorrect $or pushdown for indexed $expr.
_outCreateForeignTableStmt(StringInfo str, const CreateForeignTableStmt *node) { WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT"); _outCreateStmtInfo(str, (const CreateStmt *) node); WRITE_STRING_FIELD(servername); WRITE_NODE_FIELD(options); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
222,995,787,423,686,430,000,000,000,000,000,000,000
9
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...
set_str(unsigned char *p, const char *s, size_t l, char f, const char *map) { unsigned char c; if (s == NULL) s = ""; while ((c = *s++) != 0 && l > 0) { if (c >= 0x80 || map[c] == 0) { /* illegal character */ if (c >= 'a' && c <= 'z') { /* convert c from a-z to A-Z */ c -= 0x20; } else c...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
103,692,713,430,110,330,000,000,000,000,000,000,000
24
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
uint32_t cli_bcapi_debug_print_uint(struct cli_bc_ctx *ctx, uint32_t a) { cli_event_int(EV, BCEV_DBG_INT, a); if (!cli_debug_flag) return 0; return fprintf(stderr, "%d", a); }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
276,681,693,954,194,870,000,000,000,000,000,000,000
7
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static inline void irqenable_rx(struct cx23885_dev *dev, u32 mask) { mask &= (IRQEN_RTE | IRQEN_ROE | IRQEN_RSE); cx23888_ir_and_or4(dev, CX23888_IR_IRQEN_REG, ~(IRQEN_RTE | IRQEN_ROE | IRQEN_RSE), mask); }
0
[ "CWE-400", "CWE-401" ]
linux
a7b2df76b42bdd026e3106cf2ba97db41345a177
314,197,625,651,567,060,000,000,000,000,000,000,000
6
media: rc: prevent memory leak in cx23888_ir_probe In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
static llvh::raw_ostream &operator<<( llvh::raw_ostream &OS, DumpHermesValue dhv) { OS << dhv.hv; // If it is a string, dump the contents, truncated to 8 characters. if (dhv.hv.isString()) { SmallU16String<32> str; dhv.hv.getString()->copyUTF16String(str); UTF16Ref ref = str.arrayRef(); if...
0
[ "CWE-416", "CWE-703" ]
hermes
d86e185e485b6330216dee8e854455c694e3a36e
339,059,480,813,862,380,000,000,000,000,000,000,000
18
Fix a bug in transient object property assignment and getUTF16Ref Summary: The returned `UTF16Ref` from `StringView::getUTF16Ref` can be invalidated by appending more contents to the same allocator. This case was encountered in `transientObjectPutErrorMessage`, resulting in using free'd memory. Reviewed By: tmikov D...
psutil_posix_setpriority(PyObject *self, PyObject *args) { long pid; int priority; int retval; if (! PyArg_ParseTuple(args, "li", &pid, &priority)) return NULL; #ifdef PSUTIL_OSX retval = setpriority(PRIO_PROCESS, (id_t)pid, priority); #else retval = setpriority(PRIO_PROCESS, pid, prio...
0
[ "CWE-415" ]
psutil
3a9bccfd2c6d2e6538298cd3892058b1204056e0
200,221,771,719,904,560,000,000,000,000,000,000,000
17
psutil/_psutil_posix.c: better clear variables to ensure they are NULL (#1624)
static void bond_resend_igmp_join_requests_delayed(struct work_struct *work) { struct bonding *bond = container_of(work, struct bonding, mcast_work.work); bond_resend_igmp_join_requests(bond); }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
275,046,081,901,031,440,000,000,000,000,000,000,000
6
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static int trace_downrec(jit_State *J) { /* Restart recording at the return instruction. */ lua_assert(J->pt != NULL); lua_assert(bc_isret(bc_op(*J->pc))); if (bc_op(*J->pc) == BC_RETM) return 0; /* NYI: down-recursion with RETM. */ J->parent = 0; J->exitno = 0; J->state = LJ_TRACE_RECORD; trace_st...
0
[ "CWE-125" ]
LuaJIT
12ab596997b9cb27846a5b254d11230c3f9c50c8
315,663,960,767,979,550,000,000,000,000,000,000,000
13
Fix handling of errors during snapshot restore.
imapx_untagged_preauth (CamelIMAPXServer *is, GInputStream *input_stream, GCancellable *cancellable, GError **error) { g_return_val_if_fail (CAMEL_IS_IMAPX_SERVER (is), FALSE); c (is->priv->tagprefix, "preauthenticated\n"); if (is->priv->state ...
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
7,201,560,398,572,222,000,000,000,000,000,000,000
13
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
void cgm_unlock(void) { unlock_mutex(&cgm_mutex); }
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
84,221,145,967,429,550,000,000,000,000,000,000,000
4
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
static file_bcast_info_t *_bcast_lookup_file(file_bcast_info_t *key) { return list_find_first(file_bcast_list, _bcast_find_in_list, key); }
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
318,147,250,890,049,860,000,000,000,000,000,000,000
4
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
authreadkeys( const char *file ) { FILE *fp; char *line; char *token; keyid_t keyno; int keytype; char buf[512]; /* lots of room for line */ u_char keystr[32]; /* Bug 2537 */ size_t len; size_t j; size_t nerr; /* * Open file. Complain and return if it can't be opened. */ fp = fopen(file, "r"); if...
0
[ "CWE-835" ]
ntp
bb928ef08eec020ef6008f3a140702ccc0536b8e
83,692,434,976,635,680,000,000,000,000,000,000,000
158
[TALOS-CAN-0055] Infinite loop if extended logging enabled and the logfile and keyfile are the same
nautilus_is_desktop_directory (GFile *dir) { if (!desktop_dir_changed_callback_installed) { eel_preferences_add_callback (NAUTILUS_PREFERENCES_DESKTOP_IS_HOME_DIR, desktop_dir_changed_callback, NULL); desktop_dir_changed_callback_installed = TRUE; } if (desktop_dir == NULL) { update_d...
0
[]
nautilus
a0f7bb5f2e9af8ecb463b13da834fa8559b0a481
287,668,478,019,750,320,000,000,000,000,000,000,000
16
Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop 2009-02-25 Alexander Larsson <alexl@redhat.com> * src/nautilus-application.c: Use $XDG_DATA_HOME/.converted-launchers as marker for one-time desktop file trust operation. * libnautilus-private/nautilus-file-utilities.[ch]: Ad...
static int atalk_autobind(struct sock *sk) { struct atalk_sock *at = at_sk(sk); struct sockaddr_at sat; struct atalk_addr *ap = atalk_find_primary(); int n = -EADDRNOTAVAIL; if (!ap || ap->s_net == htons(ATADDR_ANYNET)) goto out; at->src_net = sat.sat_addr.s_net = ap->s_net; at->src_node = sat.sat_addr.s_n...
0
[]
history
7ab442d7e0a76402c12553ee256f756097cae2d2
94,278,598,549,827,100,000,000,000,000,000,000,000
19
[DDP]: Convert to new protocol interface. Convert ddp to the new protocol interface which means it has to handle fragmented skb's. The only big change is in the checksum routine which has to do more work (like skb_checksum). Minor speedup is folding the carry to avoid a branch. Tested against a 2.4 system and by ru...
struct sctp_association *sctp_make_temp_asoc(const struct sctp_endpoint *ep, struct sctp_chunk *chunk, gfp_t gfp) { struct sctp_association *asoc; enum sctp_scope scope; struct sk_buff *skb; /* Create the bare association. */ scope = sctp_scope(sctp_source(chunk)); asoc = sctp_association_ne...
0
[ "CWE-20" ]
linux
07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c
204,426,244,316,571,700,000,000,000,000,000,000,000
21
sctp: verify size of a new chunk in _sctp_make_chunk() When SCTP makes INIT or INIT_ACK packet the total chunk length can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when transmitting these packets, e.g. the crash on sending INIT_ACK: [ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168 ...
MagickExport MagickBooleanType ModulateImage(Image *image,const char *modulate, ExceptionInfo *exception) { #define ModulateImageTag "Modulate/Image" CacheView *image_view; ColorspaceType colorspace; const char *artifact; double percent_brightness, percent_hue, percent_saturation;...
0
[ "CWE-125" ]
ImageMagick
76401e172ea3a55182be2b8e2aca4d07270f6da6
187,192,672,645,431,830,000,000,000,000,000,000,000
255
Evaluate lazy pixel cache morphology to prevent buffer overflow (bug report from Ibrahim M. El-Sayed)
static uint32_t hashlittle(const void *key, size_t length, uint32_t initval) { uint32_t a,b,c; /* internal state */ union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */ /* Set up the internal state */ a = b = c = 0xdeadbeef + ((uint32_t)length) ...
0
[ "CWE-310" ]
jansson
8f80c2d83808150724d31793e6ade92749b1faa4
68,675,787,165,369,950,000,000,000,000,000,000,000
171
CVE-2013-6401: Change hash function, randomize hashes Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing and testing.
xmlValidateElementContent(xmlValidCtxtPtr ctxt, xmlNodePtr child, xmlElementPtr elemDecl, int warn, xmlNodePtr parent) { int ret = 1; #ifndef LIBXML_REGEXP_ENABLED xmlNodePtr repl = NULL, last = NULL, tmp; #endif xmlNodePtr cur; xmlElementContentPtr cont; const xmlChar *name; if ((elemD...
0
[]
libxml2
932cc9896ab41475d4aa429c27d9afd175959d74
279,920,744,826,973,300,000,000,000,000,000,000,000
274
Fix buffer size checks in xmlSnprintfElementContent xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
size_t ZSTD_sizeof_CStream(const ZSTD_CStream* zcs) { return ZSTD_sizeof_CCtx(zcs); /* same object */ }
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
130,743,136,306,233,330,000,000,000,000,000,000,000
4
fixed T36302429
SCM_DEFINE (scm_close_fdes, "close-fdes", 1, 0, 0, (SCM fd), "A simple wrapper for the @code{close} system call.\n" "Close file descriptor @var{fd}, which must be an integer.\n" "Unlike close (@pxref{Ports and File Descriptors, close}),\n" "the file descriptor will be closed even if a p...
0
[]
guile
245608911698adb3472803856019bdd5670b6614
273,610,375,475,528,760,000,000,000,000,000,000,000
18
Remove 'umask' calls from 'mkdir'. Fixes <http://bugs.gnu.org/24659>. * libguile/filesys.c (SCM_DEFINE): Remove calls to 'umask' when MODE is unbound; instead, use 0777 as the mode. Update docstring to clarify this. * doc/ref/posix.texi (File System): Adjust accordingly. * NEWS: Mention it.
struct key *key_get_instantiation_authkey(key_serial_t target_id) { char description[16]; struct keyring_search_context ctx = { .index_key.type = &key_type_request_key_auth, .index_key.description = description, .cred = current_cred(), .match_data.cmp = key_default_cmp, .match_data.raw_data = descriptio...
0
[ "CWE-20" ]
linux
363b02dab09b3226f3bd1420dad9c72b79a42a76
78,631,438,978,090,850,000,000,000,000,000,000,000
35
KEYS: Fix race between updating and finding a negative key Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection error into one field such that: (1) The instantiation state can be modified/read atomically. (2) The error can be accessed atomically with the state. (3) The error isn't stored unione...