func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
glob_char_p (s) const char *s; { switch (*s) { case '*': case '[': case ']': case '?': case '\\': return 1; case '+': case '@': case '!': if (s[1] == '(') /*(*/ return 1; break; } return 0; }
0
[ "CWE-273", "CWE-787" ]
bash
951bdaad7a18cc0dc1036bba86b18b90874d39ff
274,349,185,013,081,780,000,000,000,000,000,000,000
20
commit bash-20190628 snapshot
void ConnectionManagerImpl::ActiveStream::onResponseDataTooLarge() { connection_manager_.stats_.named_.rs_too_large_.inc(); }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
268,602,816,904,637,000,000,000,000,000,000,000,000
3
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
CustomizableCleanupPriorWALFiles(void) { /* * Work out name of prior file from current filename */ if (nextWALFileType == XLOG_DATA) { int rc; DIR *xldir; struct dirent *xlde; /* * Assume it's OK to keep failing. The failure situation may change * over time, so we'd rather keep going on the ...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
275,194,975,955,216,020,000,000,000,000,000,000,000
67
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...
static MagickBooleanType DrawDashPolygon(const DrawInfo *draw_info, const PrimitiveInfo *primitive_info,Image *image,ExceptionInfo *exception) { double length, maximum_length, offset, scale, total_length; DrawInfo *clone_info; MagickStatusType status; PrimitiveInfo *dash_pol...
0
[]
ImageMagick
f4cdb3f3aab28273960ffacf1d356312b56ffd27
87,682,624,310,616,700,000,000,000,000,000,000,000
155
https://github.com/ImageMagick/ImageMagick/issues/3338
NDIS_STATUS ParaNdis_ExactSendFailureStatus(PARANDIS_ADAPTER *pContext) { NDIS_STATUS status = NDIS_STATUS_FAILURE; if (pContext->SendState != srsEnabled ) status = NDIS_STATUS_PAUSED; if (!pContext->bConnected) status = NDIS_STATUS_MEDIA_DISCONNECTED; if (pContext->bSurprizeRemoved) status = NDIS_STATU...
0
[ "CWE-20" ]
kvm-guest-drivers-windows
723416fa4210b7464b28eab89cc76252e6193ac1
264,456,085,947,570,600,000,000,000,000,000,000,000
11
NetKVM: BZ#1169718: Checking the length only on read Signed-off-by: Joseph Hindin <yhindin@rehat.com>
static void * CJSON_CDECL internal_realloc(void *pointer, size_t size) { return realloc(pointer, size); }
0
[ "CWE-754", "CWE-787" ]
cJSON
be749d7efa7c9021da746e685bd6dec79f9dd99b
333,958,411,450,997,570,000,000,000,000,000,000,000
4
Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays
apdu_send_le(int slot, int extended_mode, int class, int ins, int p0, int p1, int lc, const char *data, int le, unsigned char **retbuf, size_t *retbuflen) { return send_le (slot, class, ins, p0, p1, lc, data, le, retbuf, retbuflen, ...
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
168,269,837,080,763,070,000,000,000,000,000,000,000
10
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 ...
static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){ Vdbe *v = 0; int iLimit = 0; int iOffset; int n; Expr *pLimit = p->pLimit; if( p->iLimit ) return; /* ** "LIMIT -1" always shows all rows. There is some ** controversy about what the correct behavior should be. ** The curre...
0
[ "CWE-20" ]
sqlite
e59c562b3f6894f84c715772c4b116d7b5c01348
233,863,310,411,562,960,000,000,000,000,000,000,000
47
Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list. FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba
static int ip_vs_svc_unhash(struct ip_vs_service *svc) { if (!(svc->flags & IP_VS_SVC_F_HASHED)) { pr_err("%s(): request for unhash flagged, called from %pF\n", __func__, __builtin_return_address(0)); return 0; } if (svc->fwmark == 0) { /* Remove it from the ip_vs_svc_table table */ list_del(&svc->...
0
[ "CWE-119", "CWE-787" ]
linux
04bcef2a83f40c6db24222b27a52892cba39dffb
318,935,894,929,641,600,000,000,000,000,000,000,000
20
ipvs: Add boundary check on ioctl arguments The ipvs code has a nifty system for doing the size of ioctl command copies; it defines an array with values into which it indexes the cmd to find the right length. Unfortunately, the ipvs code forgot to check if the cmd was in the range that the array provides, allowing fo...
static int unix_stream_read_sock(struct sock *sk, read_descriptor_t *desc, sk_read_actor_t recv_actor) { if (unlikely(sk->sk_state != TCP_ESTABLISHED)) return -ENOTCONN; return unix_read_sock(sk, desc, recv_actor); }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
53,567,434,108,053,660,000,000,000,000,000,000,000
8
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
shmem_get_inode(struct super_block *sb, int mode, dev_t dev) { struct inode *inode; struct shmem_inode_info *info; struct shmem_sb_info *sbinfo = SHMEM_SB(sb); if (shmem_reserve_inode(sb)) return NULL; inode = new_inode(sb); if (inode) { inode->i_mode = mode; inode->i_uid = current->fsuid; inode->i_gid ...
0
[ "CWE-400" ]
linux-2.6
14fcc23fdc78e9d32372553ccf21758a9bd56fa1
11,989,651,722,196,241,000,000,000,000,000,000,000
54
tmpfs: fix kernel BUG in shmem_delete_inode SuSE's insserve initscript ordering program hits kernel BUG at mm/shmem.c:814 on 2.6.26. It's using posix_fadvise on directories, and the shmem_readpage method added in 2.6.23 is letting POSIX_FADV_WILLNEED allocate useless pages to a tmpfs directory, incrementing i_blocks ...
NOEXPORT char *imap_server(CLI *c, SERVICE_OPTIONS *opt, const PHASE phase) { char *line, *id, *tail, *capa; if(phase==PROTOCOL_CHECK) opt->option.connect_before_ssl=1; /* c->remote_fd needed */ if(phase!=PROTOCOL_MIDDLE) return NULL; s_poll_init(c->fds, 0); s_poll_add(c->fds, c->lo...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
234,293,662,453,313,900,000,000,000,000,000,000,000
100
stunnel-5.57
SSLNetVConnection::sslClientHandShakeEvent(int &err) { bool trace = getSSLTrace(); ssl_error_t ssl_error; ink_assert(SSLNetVCAccess(ssl) == this); ssl_error = SSLConnect(ssl); switch (ssl_error) { case SSL_ERROR_NONE: if (is_debug_tag_set("ssl")) { X509 *cert = SSL_get_peer_certificate(ssl); ...
0
[ "CWE-284" ]
trafficserver
d3f36f79820ea10c26573c742b1bbc370c351716
125,176,079,706,680,030,000,000,000,000,000,000,000
101
Bug fix in origin connection handling (#8731) Co-authored-by: Takuya Kitano <tkitano@yahoo-corp.jp>
static int _hostresolver_getaddrinfo( oe_resolver_t* resolver, const char* node, const char* service, const struct oe_addrinfo* hints, struct oe_addrinfo** res) { int ret = OE_EAI_FAIL; uint64_t handle = 0; struct oe_addrinfo* head = NULL; struct oe_addrinfo* tail = NULL; struct ...
1
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
272,112,565,954,528,200,000,000,000,000,000,000,000
177
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
register_smtp_addresses(void) { register_thread_address("body_cmd", body_cmd); register_thread_address("connection_error", connection_error); register_thread_address("connection_in_progress", connection_in_progress); register_thread_address("connection_success", connection_success); register_thread_address("connec...
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
44,644,685,980,608,530,000,000,000,000,000,000,000
15
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
TRIO_PUBLIC_STRING trio_string_t* trio_string_duplicate TRIO_ARGS1((other), trio_string_t* other) { trio_string_t* self; assert(other); self = internal_string_alloc(); if (self) { self->content = internal_duplicate_max(other->content, other->length); if (self->content) { self->length = other->length; ...
0
[ "CWE-190", "CWE-125" ]
FreeRDP
05cd9ea2290d23931f615c1b004d4b2e69074e27
217,419,326,625,773,100,000,000,000,000,000,000,000
22
Fixed TrioParse and trio_length limts. CVE-2020-4030 thanks to @antonio-morales for finding this.
JsVar *jspEvaluateExpressionVar(JsVar *str) { JsLex lex; assert(jsvIsString(str)); JsLex *oldLex = jslSetLex(&lex); jslInit(str); lex.lineNumberOffset = oldLex->lineNumberOffset; // actually do the parsing JsVar *v = jspeExpression(); jslKill(); jslSetLex(oldLex); return jsvSkipNameAndUnLock(v); ...
0
[ "CWE-125", "CWE-674" ]
Espruino
51380baf17241728b6d48cdb84140b931e3e3cc5
235,064,146,221,300,840,000,000,000,000,000,000,000
15
Fix stack overflow if interpreting a file full of '{' (fix #1448)
static dma_addr_t pq16_get_src(struct ioat_raw_descriptor *desc[3], int idx) { struct ioat_raw_descriptor *raw = desc[pq16_idx_to_desc[idx]]; return raw->field[pq16_idx_to_field[idx]]; }
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
74,781,098,412,112,410,000,000,000,000,000,000,000
6
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
void jslFunctionCharAsString(unsigned char ch, char *str, size_t len) { if (ch >= LEX_TOKEN_START) { jslTokenAsString(ch, str, len); } else { str[0] = (char)ch; str[1] = 0; } }
0
[ "CWE-787" ]
Espruino
bed844f109b6c222816740555068de2e101e8018
175,287,548,095,054,560,000,000,000,000,000,000,000
8
remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426)
parser_pattern_finalize (parser_context_t *context_p, /**< context */ parser_pattern_flags_t flags, /**< flags */ parser_pattern_end_marker_t *end_marker_p) /**< pattern end position */ { if ((flags & (PARSER_PATTERN_TARGET_ON_STACK | PARSER_PATTERN_TARGET_DEFAULT)) ...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
46,151,180,336,790,820,000,000,000,000,000,000,000
28
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
unsigned long __thp_get_unmapped_area(struct file *filp, unsigned long len, loff_t off, unsigned long flags, unsigned long size) { unsigned long addr; loff_t off_end = off + len; loff_t off_align = round_up(off, size); unsigned long len_pad; if (off_end <= off_align || (off_end - off_align) < size) return 0; ...
0
[ "CWE-362" ]
linux
a8f97366452ed491d13cf1e44241bc0b5740b1f0
224,904,029,362,256,250,000,000,000,000,000,000,000
23
mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d() Currently, we unconditionally make page table dirty in touch_pmd(). It may result in false-positive can_follow_write_pmd(). We may avoid the situation, if we would only make the page table entry dirty if caller asks for write access -- FOLL_WRITE...
static int ca8210_xmit_async(struct ieee802154_hw *hw, struct sk_buff *skb) { struct ca8210_priv *priv = hw->priv; int status; dev_dbg(&priv->spi->dev, "calling %s\n", __func__); priv->tx_skb = skb; priv->async_tx_pending = true; status = ca8210_skb_tx(skb, priv->nextmsduhandle, priv); return status; }
0
[ "CWE-400", "CWE-401" ]
linux
6402939ec86eaf226c8b8ae00ed983936b164908
176,824,861,544,463,800,000,000,000,000,000,000,000
12
ieee802154: ca8210: prevent memory leak In ca8210_probe the allocated pdata needs to be assigned to spi_device->dev.platform_data before calling ca8210_get_platform_data. Othrwise when ca8210_get_platform_data fails pdata cannot be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Link: https://lor...
static int lookup_fast(struct nameidata *nd, struct path *path, struct inode **inode, unsigned *seqp) { struct vfsmount *mnt = nd->path.mnt; struct dentry *dentry, *parent = nd->path.dentry; int status = 1; int err; /* * Rename seqlock is not required here because in the off chance * of a fa...
0
[ "CWE-362", "CWE-399" ]
linux
49d31c2f389acfe83417083e1208422b4091cd9e
170,556,168,535,537,620,000,000,000,000,000,000,000
86
dentry name snapshots take_dentry_name_snapshot() takes a safe snapshot of dentry name; if the name is a short one, it gets copied into caller-supplied structure, otherwise an extra reference to external name is grabbed (those are never modified). In either case the pointer to stable string is stored into the same st...
static MagickBooleanType DrawBoundingRectangles(Image *image, const DrawInfo *draw_info,const PolygonInfo *polygon_info, ExceptionInfo *exception) { double mid; DrawInfo *clone_info; MagickStatusType status; PointInfo end, resolution, start; PrimitiveInfo primitive_info[6];...
0
[]
ImageMagick
f4cdb3f3aab28273960ffacf1d356312b56ffd27
339,416,528,863,112,330,000,000,000,000,000,000,000
136
https://github.com/ImageMagick/ImageMagick/issues/3338
void BinaryProtocolReader::readStringBody(StrType& str, int32_t size) { checkStringSize(size); // Catch empty string case if (size == 0) { str.clear(); return; } if (static_cast<int32_t>(in_.length()) < size) { str.reserve(size); // only reserve for multi iter case below } str.clear(); siz...
1
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
233,683,322,620,491,800,000,000,000,000,000,000,000
26
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...
ZEND_VM_HOT_TYPE_SPEC_HANDLER(ZEND_SUB, (op1_info == MAY_BE_LONG && op2_info == MAY_BE_LONG), ZEND_SUB_LONG, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(NO_CONST_CONST)) { USE_OPLINE zval *op1, *op2, *result; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); result = EX_VAR(opline->result.v...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
189,253,140,886,693,180,000,000,000,000,000,000,000
11
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base, struct hrtimer_clock_base *new_base) { struct hrtimer *timer; struct timerqueue_node *node; while ((node = timerqueue_getnext(&old_base->active))) { timer = container_of(node, struct hrtimer, node); BUG_ON(hrtimer_callback_running(timer))...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
332,280,483,866,658,680,000,000,000,000,000,000,000
29
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static void add_or_replace_ace(SEC_ACE *nt_ace_list, size_t *num_aces, const DOM_SID *sid, enum security_ace_type type, uint32_t mask, uint8_t flags) { int i; /* first search for a duplicate */ for (i = 0; i < *num_aces; i++) { if (sid_equal(&nt_ace_list[i].trustee, sid) && (nt_ace_list[i].flags == ...
0
[ "CWE-264" ]
samba
d6c28913f3109d1327a3d1369b6eafd3874b2dca
17,949,047,440,047,270,000,000,000,000,000,000,000
23
Bug 6488: acl_group_override() call in posix acls references an uninitialized variable. (cherry picked from commit f92195e3a1baaddda47a5d496f9488c8445b41ad)
void addDbAdminDbPrivileges(PrivilegeVector* privileges, StringData dbName) { Privilege::addPrivilegeToPrivilegeVector( privileges, Privilege(ResourcePattern::forDatabaseName(dbName), dbAdminRoleActions)); ActionSet profileActions = readRoleActions; profileActions.addAction(ActionType::convertToCap...
0
[ "CWE-20" ]
mongo
865eccaf35aca29d1b71764d50227cdf853752d0
69,145,316,199,813,290,000,000,000,000,000,000,000
13
SERVER-36263 Bypassing operation validation in applyOps should require special privilege
static int ad5755_write_raw(struct iio_dev *indio_dev, const struct iio_chan_spec *chan, int val, int val2, long info) { struct ad5755_state *st = iio_priv(indio_dev); unsigned int shift, reg, offset; int ret; ret = ad5755_chan_reg_info(st, chan, info, true, &reg, &shift, &offset); if (ret) return ret; ...
0
[ "CWE-787" ]
linux
9d47964bfd471f0dd4c89f28556aec68bffa0020
110,367,737,041,380,900,000,000,000,000,000,000,000
20
iio: ad5755: fix off-by-one on devnr limit check The comparison for devnr limits is off-by-one, the current check allows 0 to AD5755_NUM_CHANNELS and the limit should be in fact 0 to AD5755_NUM_CHANNELS - 1. This can lead to an out of bounds write to pdata->dac[devnr]. Fix this by replacing > with >= on the compariso...
Field_timestamp::Field_timestamp(uchar *ptr_arg, uint32 len_arg, uchar *null_ptr_arg, uchar null_bit_arg, enum utype unireg_check_arg, const char *field_name_arg, TABLE_SHARE *share) :Field_temporal(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, unireg_...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
19,177,501,856,576,812,000,000,000,000,000,000,000
21
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
boost::optional<SaplingOutgoingPlaintext> SaplingOutgoingPlaintext::decrypt( const SaplingOutCiphertext &ciphertext, const uint256& ovk, const uint256& cv, const uint256& cm, const uint256& epk ) { auto pt = AttemptSaplingOutDecryption(ciphertext, ovk, cv, cm, epk); if (!pt) { return...
0
[ "CWE-755", "CWE-787" ]
zcash
c1fbf8ab5d73cff5e1f45236995857c75ba4128d
321,132,688,302,182,500,000,000,000,000,000,000,000
30
Ignore exceptions when deserializing note plaintexts
flatpak_dir_recreate_repo (FlatpakDir *self, GCancellable *cancellable, GError **error) { gboolean res; OstreeRepo *old_repo = g_steal_pointer (&self->repo); res = flatpak_dir_ensure_repo (self, cancellable, error); g_clear_object (&old_repo); retu...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
109,876,264,542,993,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 ...
LIEF::Binary::functions_t Binary::functions() const { static const auto func_cmd = [] (const Function& lhs, const Function& rhs) { return lhs.address() < rhs.address(); }; std::set<Function, decltype(func_cmd)> functions_set(func_cmd); LIEF::Binary::functions_t unwind_functions = this->unwind_functions(); ...
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
9,071,390,562,042,395,000,000,000,000,000,000,000
22
Resolve #764
static inline LineContribType *_gdContributionsCalc(unsigned int line_size, unsigned int src_size, double scale_d, const interpolation_method pFilter) { double width_d; double scale_f_d = 1.0; const double filter_width_d = DEFAULT_BOX_RADIUS; int windows_size; unsigned int u; LineContribType *res; ...
1
[ "CWE-125" ]
php-src
7a1aac3343af85b4af4df5f8844946eaa27394ab
318,123,285,293,480,800,000,000,000,000,000,000,000
56
Fixed bug #72227: imagescale out-of-bounds read Ported from https://github.com/libgd/libgd/commit/4f65a3e4eedaffa1efcf9ee1eb08f0b504fbc31a
static void __set_size(struct mapped_device *md, sector_t size) { lockdep_assert_held(&md->suspend_lock); set_capacity(md->disk, size); i_size_write(md->bdev->bd_inode, (loff_t)size << SECTOR_SHIFT); }
0
[ "CWE-362" ]
linux
b9a41d21dceadf8104812626ef85dc56ee8a60ed
262,445,419,871,460,300,000,000,000,000,000,000,000
8
dm: fix race between dm_get_from_kobject() and __dm_destroy() The following BUG_ON was hit when testing repeat creation and removal of DM devices: kernel BUG at drivers/md/dm.c:2919! CPU: 7 PID: 750 Comm: systemd-udevd Not tainted 4.1.44 Call Trace: [<ffffffff81649e8b>] dm_get_from_kobject+0x34/0x3a ...
void kvm_write_tsc(struct kvm_vcpu *vcpu, struct msr_data *msr) { struct kvm *kvm = vcpu->kvm; u64 offset, ns, elapsed; unsigned long flags; s64 usdiff; bool matched; u64 data = msr->data; raw_spin_lock_irqsave(&kvm->arch.tsc_write_lock, flags); offset = kvm_x86_ops->compute_tsc_offset(vcpu, data); ns = get_k...
0
[ "CWE-119", "CWE-703", "CWE-120" ]
linux
a08d3b3b99efd509133946056531cdf8f3a0c09b
177,980,857,407,237,080,000,000,000,000,000,000,000
119
kvm: x86: fix emulator buffer overflow (CVE-2014-0049) The problem occurs when the guest performs a pusha with the stack address pointing to an mmio address (or an invalid guest physical address) to start with, but then extending into an ordinary guest physical address. When doing repeated emulated pushes emulator_re...
bool ActiveStreamDecoderFilter::hasTrailers() { return parent_.filter_manager_callbacks_.requestTrailers().has_value(); }
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
191,734,800,745,624,080,000,000,000,000,000,000,000
3
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
bool Item_splocal_row_field::fix_fields(THD *thd, Item **ref) { DBUG_ASSERT(!fixed); Item *item= get_variable(thd->spcont)->element_index(m_field_idx); return fix_fields_from_item(thd, ref, item); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
107,179,981,709,795,680,000,000,000,000,000,000,000
6
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
static int replmd_replPropertyMetaDataCtr1_verify(struct ldb_context *ldb, struct replPropertyMetaDataCtr1 *ctr1, struct ldb_dn *dn) { if (ctr1->count == 0) { ldb_debug_set(ldb, LDB_DEBUG_FATAL, "No elements found in replPropertyMetaData for %s!\n", ldb_dn_get_linearized(dn)); ret...
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
316,087,315,677,107,560,000,000,000,000,000,000,000
21
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
static PCRE2_SPTR SLJIT_FUNC do_script_run_utf(PCRE2_SPTR ptr, PCRE2_SPTR endptr) { if (PRIV(script_run)(ptr, endptr, TRUE)) return endptr; return NULL; }
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
197,368,258,641,096,150,000,000,000,000,000,000,000
6
Fixed a unicode properrty matching issue in JIT
char* crypto_cert_get_upn(X509* x509) { char* result = 0; object_list list; object_list_initialize(&list); list.type_id = OBJ_nid2obj(NID_ms_upn); list.maximum = 1; map_subject_alt_name(x509, GEN_OTHERNAME, extract_othername_object_as_string, &list); if (list.count == 0) { object_list_free(&list); return 0...
0
[ "CWE-787" ]
FreeRDP
8305349a943c68b1bc8c158f431dc607655aadea
131,707,778,683,960,650,000,000,000,000,000,000,000
19
Fixed GHSL-2020-102 heap overflow (cherry picked from commit 197b16cc15a12813c2e4fa2d6ae9cd9c4a57e581)
web_view_clear_notify_progress_cb (gpointer user_data) { GoaWebView *self = GOA_WEB_VIEW (user_data); GoaWebViewPrivate *priv = self->priv; gtk_widget_hide (priv->progress_bar); priv->clear_notify_progress_id = 0; return FALSE; }
0
[ "CWE-310" ]
gnome-online-accounts
edde7c63326242a60a075341d3fea0be0bc4d80e
265,071,719,186,716,940,000,000,000,000,000,000,000
9
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
static void free_skb_pool(rtl8150_t *dev) { int i; for (i = 0; i < RX_SKB_POOL_SIZE; i++) if (dev->rx_skb_pool[i]) dev_kfree_skb(dev->rx_skb_pool[i]); }
0
[ "CWE-119", "CWE-787" ]
linux
7926aff5c57b577ab0f43364ff0c59d968f6a414
94,265,680,776,902,250,000,000,000,000,000,000,000
8
rtl8150: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net...
text_locked(void) { return text_and_win_locked() || textlock != 0; }
0
[ "CWE-122", "CWE-787" ]
vim
85b6747abc15a7a81086db31289cf1b8b17e6cb1
79,585,240,548,669,930,000,000,000,000,000,000,000
4
patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode Problem: Illegal memory access with large 'tabstop' in Ex mode. Solution: Allocate enough memory.
bool st_select_lex::add_item_to_list(THD *thd, Item *item) { DBUG_ENTER("st_select_lex::add_item_to_list"); DBUG_PRINT("info", ("Item: %p", item)); DBUG_RETURN(item_list.push_back(item, thd->mem_root)); }
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
293,075,121,925,234,730,000,000,000,000,000,000,000
6
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
TEST_CASE("Simple syntax test", "[general]") { parser parser(R"( ROOT <- _ _ <- ' ' )"); bool ret = parser; REQUIRE(ret == true); }
1
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
333,461,865,272,575,800,000,000,000,000,000,000,000
10
Fix #122
xsltFreeParserContext(xsltParserContextPtr ctxt) { if (ctxt == NULL) return; memset(ctxt, -1, sizeof(xsltParserContext)); xmlFree(ctxt); }
0
[ "CWE-125" ]
libxslt
fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b
309,790,485,012,572,400,000,000,000,000,000,000,000
6
Fix some case of pattern parsing errors We could accidentally hit an off by one string array access due to improper loop exit when parsing patterns
Status DecodeImageAPNG(Span<const uint8_t> bytes, ThreadPool* pool, CodecInOut* io) { Reader r; unsigned int id, i, j, w, h, w0, h0, x0, y0; unsigned int delay_num, delay_den, dop, bop, rowbytes, imagesize; unsigned char sig[8]; png_structp png_ptr; png_infop info_ptr; CHUNK chunk; ...
0
[ "CWE-369" ]
libjxl
7dfa400ded53919d986c5d3d23446a09e0cf481b
54,153,193,081,775,750,000,000,000,000,000,000,000
214
Fix handling of APNG with 0 delay_den (#313)
static int msr_interception(struct kvm_vcpu *vcpu) { if (to_svm(vcpu)->vmcb->control.exit_info_1) return kvm_emulate_wrmsr(vcpu); else return kvm_emulate_rdmsr(vcpu); }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
329,092,133,317,906,140,000,000,000,000,000,000,000
7
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
DECLAREContigPutFunc(put4bitcmaptile) { uint32** PALmap = img->PALmap; (void) x; (void) y; fromskew /= 2; while (h-- > 0) { uint32* bw; UNROLL2(w, bw = PALmap[*pp++], *cp++ = *bw++); cp += toskew; pp += fromskew; } }
0
[ "CWE-119" ]
libtiff
40a5955cbf0df62b1f9e9bd7d9657b0070725d19
25,269,588,601,377,853,000,000,000,000,000,000,000
13
* libtiff/tif_next.c: add new tests to check that we don't read outside of the compressed input stream buffer. * libtiff/tif_getimage.c: in OJPEG case, fix checks on strile width/height
Event_timed::~Event_timed() { }
0
[ "CWE-284" ]
server
0b5a5258abbeaf8a0c3a18c7e753699787fdf46e
327,054,888,078,888,770,000,000,000,000,000,000,000
3
MW-416 DDL replication moved after acl checking galera_events test shows a regression with the original fix for MW-416 Reason was that Events::drop_event() can be called also from inside event execution, and there we have a speacial treatment for event, which executes "DROP EVENT" statement, and runs TOI replication i...
static int nfs4_sp4_select_mode(struct nfs_client *clp, struct nfs41_state_protection *sp) { static const u32 supported_enforce[NFS4_OP_MAP_NUM_WORDS] = { [1] = 1 << (OP_BIND_CONN_TO_SESSION - 32) | 1 << (OP_EXCHANGE_ID - 32) | 1 << (OP_CREATE_SESSION - 32) | 1 << (OP_DESTROY_SESSION - 3...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
209,814,122,989,191,900,000,000,000,000,000,000,000
94
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static u32 tcp_v6_init_seq(const struct sk_buff *skb) { return secure_tcpv6_seq(ipv6_hdr(skb)->daddr.s6_addr32, ipv6_hdr(skb)->saddr.s6_addr32, tcp_hdr(skb)->dest, tcp_hdr(skb)->source); }
0
[ "CWE-241" ]
linux
83eaddab4378db256d00d295bda6ca997cd13a52
272,431,149,662,850,480,000,000,000,000,000,000,000
7
ipv6/dccp: do not inherit ipv6_mc_list from parent Like commit 657831ffc38e ("dccp/tcp: do not inherit mc_list from parent") we should clear ipv6_mc_list etc. for IPv6 sockets too. Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Acked-by: Eric Dumazet <edumazet@google.com> S...
static PHP_FUNCTION(session_cache_limiter) { zend_string *limiter = NULL; zend_string *ini_name; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|S", &limiter) == FAILURE) { return; } if (limiter && PS(session_status) == php_session_active) { php_error_docref(NULL, E_WARNING, "Cannot change cache limiter when se...
0
[ "CWE-476" ]
php-src
d76f7c6c636b8240e06a1fa29eebb98ad005008a
334,190,719,183,153,550,000,000,000,000,000,000,000
27
Fix bug #79221 - Null Pointer Dereference in PHP Session Upload Progress
static int io_fsync(struct io_kiocb *req, unsigned int issue_flags) { loff_t end = req->sync.off + req->sync.len; int ret; /* fsync always requires a blocking context */ if (issue_flags & IO_URING_F_NONBLOCK) return -EAGAIN; ret = vfs_fsync_range(req->file, req->sync.off, end > 0 ? end : LLONG_MAX, req...
0
[ "CWE-667" ]
linux
3ebba796fa251d042be42b929a2d916ee5c34a49
183,027,550,489,138,600,000,000,000,000,000,000,000
17
io_uring: ensure that SQPOLL thread is started for exit If we create it in a disabled state because IORING_SETUP_R_DISABLED is set on ring creation, we need to ensure that we've kicked the thread if we're exiting before it's been explicitly disabled. Otherwise we can run into a deadlock where exit is waiting go park t...
another_hunk (enum diff difftype, bool rev) { char *s; lin context = 0; size_t chars_read; char numbuf0[LINENUM_LENGTH_BOUND + 1]; char numbuf1[LINENUM_LENGTH_BOUND + 1]; char numbuf2[LINENUM_LENGTH_BOUND + 1]; char numbuf3[LINENUM_LENGTH_BOUND + 1]; set_hunkmax(); while (p_end >= ...
0
[ "CWE-476" ]
patch
f290f48a621867084884bfff87f8093c15195e6a
111,722,572,647,010,350,000,000,000,000,000,000,000
771
Fix segfault with mangled rename patch http://savannah.gnu.org/bugs/?53132 * src/pch.c (intuit_diff_type): Ensure that two filenames are specified for renames and copies (fix the existing check).
static void css_task_iter_skip(struct css_task_iter *it, struct task_struct *task) { lockdep_assert_held(&css_set_lock); if (it->task_pos == &task->cg_list) { it->task_pos = it->task_pos->next; it->flags |= CSS_TASK_ITER_SKIPPED; } }
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
194,504,927,798,478,430,000,000,000,000,000,000,000
10
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
static void t1_mark_glyphs(void) { int i; char *charset = extra_charset(); char *g, *s, *r; cs_entry *ptr; if (t1_synthetic || embed_all_glyphs(tex_font)) { /* mark everything */ if (cs_tab != NULL) for (ptr = cs_tab; ptr < cs_ptr; ptr++) if (ptr->valid) ...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
175,517,110,185,273,230,000,000,000,000,000,000,000
44
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
static void t1_read_subrs(PDF pdf) { int i, s; cs_entry *ptr; t1_getline(); while (!(t1_charstrings() || t1_subrs())) { t1_scan_param(pdf); if (!t1_prefix("/UniqueID")) { /*tex Ignore |/UniqueID| for subsetted fonts. */ t1_putline(pdf); } t1_getlin...
0
[ "CWE-119" ]
texlive-source
6ed0077520e2b0da1fd060c7f88db7b2e6068e4c
64,253,563,167,848,110,000,000,000,000,000,000,000
76
writet1 protection against buffer overflow git-svn-id: svn://tug.org/texlive/trunk/Build/source@48697 c570f23f-e606-0410-a88d-b1316a301751
int ssl3_read_bytes(SSL *s, int type, unsigned char *buf, int len, int peek) { int al, i, j, ret; unsigned int n; SSL3_RECORD *rr; void (*cb) (const SSL *ssl, int type2, int val) = NULL; if (s->s3->rbuf.buf == NULL) /* Not initialized yet */ if (!ssl3_setup_read_buffer(s)) retur...
1
[ "CWE-200", "CWE-203" ]
openssl
e9bbefbf0f24c57645e7ad6a5a71ae649d18ac8e
306,606,460,378,418,800,000,000,000,000,000,000,000
495
Go into the error state if a fatal alert is sent or received If an application calls SSL_shutdown after a fatal alert has occured and then behaves different based on error codes from that function then the application may be vulnerable to a padding oracle. CVE-2019-1559 Reviewed-by: Richard Levitte <levitte@openssl....
bool verifyFramePresent( std::vector<std::unique_ptr<folly::IOBuf>>& socketWrites, QuicReadCodec& readCodec, QuicFrame::Type frameType) { AckStates ackStates; for (auto& write : socketWrites) { auto packetQueue = bufToQueue(write->clone()); auto result = readCodec.parsePacket(packetQueue, ackSta...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
245,244,680,492,973,400,000,000,000,000,000,000,000
21
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
onig_error_code_to_format(int code) { char *p; if (code >= 0) return (UChar* )0; switch (code) { case ONIG_MISMATCH: p = "mismatch"; break; case ONIG_NO_SUPPORT_CONFIG: p = "no support in this configuration"; break; case ONIGERR_MEMORY: p = "fail to memory allocation"; break; case ONIGERR_MA...
0
[ "CWE-125" ]
oniguruma
65a9b1aa03c9bc2dc01b074295b9603232cb3b78
147,815,296,562,566,650,000,000,000,000,000,000,000
142
onig-5.9.2
static int sr_read_tochdr(struct cdrom_device_info *cdi, struct cdrom_tochdr *tochdr) { struct scsi_cd *cd = cdi->handle; struct packet_command cgc; int result; unsigned char *buffer; buffer = kmalloc(32, GFP_KERNEL | SR_GFP_DMA(cd)); if (!buffer) return -ENOMEM; memset(&cgc, 0, sizeof(struct packet_comman...
0
[ "CWE-119", "CWE-787" ]
linux
f7068114d45ec55996b9040e98111afa56e010fe
276,317,700,129,824,030,000,000,000,000,000,000,000
29
sr: pass down correctly sized SCSI sense buffer We're casting the CDROM layer request_sense to the SCSI sense buffer, but the former is 64 bytes and the latter is 96 bytes. As we generally allocate these on the stack, we end up blowing up the stack. Fix this by wrapping the scsi_execute() call with a properly sized s...
nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd, const char *name, int namlen) { struct svc_export *exp = cd->rd_fhp->fh_export; struct dentry *dentry; __be32 nfserr; int ignore_crossmnt = 0; dentry = lookup_one_len_unlocked(name, cd->rd_fhp->fh_dentry, namlen); if (IS_ERR(dentry)) ...
0
[ "CWE-20", "CWE-129" ]
linux
f961e3f2acae94b727380c0b74e2d3954d0edf79
646,400,499,015,028,140,000,000,000,000,000,000
60
nfsd: encoders mustn't use unitialized values in error cases In error cases, lgp->lg_layout_type may be out of bounds; so we shouldn't be using it until after the check of nfserr. This was seen to crash nfsd threads when the server receives a LAYOUTGET request with a large layout type. GETDEVICEINFO has the same pro...
tar_directory_for_file (GsfInfileTar *dir, const char *name, gboolean last) { const char *s = name; while (1) { const char *s0 = s; char *dirname; /* Find a directory component, if any. */ while (1) { if (*s == 0) { if (last && s != s0) break; else return dir; } /* This is delibe...
0
[ "CWE-476" ]
libgsf
95a8351a75758cf10b3bf6abae0b6b461f90d9e5
40,396,338,700,349,070,000,000,000,000,000,000,000
43
tar: fix crash on broken tar file.
static int check_message(const struct set_name_fn *fn, const char *op, const char *nameincert, int match, const char *name) { char msg[1024]; if (match < 0) return 1; BIO_snprintf(msg, sizeof(msg), "%s: %s: [%s] %s [%s]", fn->name, op, nameincert, ...
0
[ "CWE-476" ]
openssl
97ab3c4b538840037812c8d9164d09a1f4bf11a1
102,726,822,612,496,200,000,000,000,000,000,000,000
15
Add a test for GENERAL_NAME_cmp Based on a boringssl test contributed by David Benjamin Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
static SQInteger array_map(HSQUIRRELVM v) { SQObject &o = stack_get(v,1); SQInteger size = _array(o)->Size(); SQObjectPtr ret = SQArray::Create(_ss(v),size); if(SQ_FAILED(__map_array(_array(ret),_array(o),v))) return SQ_ERROR; v->Push(ret); return 1; }
0
[ "CWE-703", "CWE-787" ]
squirrel
a6413aa690e0bdfef648c68693349a7b878fe60d
134,602,528,247,382,380,000,000,000,000,000,000,000
10
fix in thread.call
static void FLTRemoveGroupName(FilterEncodingNode *psFilterNode, gmlGroupListObj* groupList) { int i; if (psFilterNode) { if (psFilterNode->eType == FILTER_NODE_TYPE_PROPERTYNAME) { if( psFilterNode->pszValue != NULL ) { const char* pszPropertyName = psFilter...
0
[ "CWE-200", "CWE-119" ]
mapserver
e52a436c0e1c5e9f7ef13428dba83194a800f4df
333,529,214,075,926,900,000,000,000,000,000,000,000
43
security fix (patch by EvenR)
static int _hostfs_ioctl(oe_fd_t* desc, unsigned long request, uint64_t arg) { int ret = -1; file_t* file = _cast_file(desc); uint64_t argsize = 0; void* argout = NULL; if (!file) OE_RAISE_ERRNO(OE_EINVAL); /* * MUSL uses the TIOCGWINSZ ioctl request to determine whether the file ...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
13,965,216,354,168,503,000,000,000,000,000,000,000
32
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
static int snd_seq_ioctl_create_port(struct snd_seq_client *client, void __user *arg) { struct snd_seq_client_port *port; struct snd_seq_port_info info; struct snd_seq_port_callback *callback; if (copy_from_user(&info, arg, sizeof(info))) return -EFAULT; /* it is not allowed to create the port for an ...
0
[ "CWE-703" ]
linux
030e2c78d3a91dd0d27fef37e91950dde333eba1
200,430,244,258,472,660,000,000,000,000,000,000,000
46
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...
while(glbl.GetGlobalInputTermState() == 0) { DBGPRINTF("imptcp going on epoll_wait\n"); nEvents = epoll_wait(epollfd, events, sizeof(events)/sizeof(struct epoll_event), -1); DBGPRINTF("imptcp: epoll returned %d events\n", nEvents); processWorkSet(nEvents, events); }
0
[ "CWE-190" ]
rsyslog
0381a0de64a5a048c3d48b79055bd9848d0c7fc2
325,302,907,070,317,620,000,000,000,000,000,000,000
6
imptcp: fix Segmentation Fault when octet count is to high
static long llc_ui_wait_for_conn(struct sock *sk, long timeout) { DEFINE_WAIT(wait); while (1) { prepare_to_wait(sk_sleep(sk), &wait, TASK_INTERRUPTIBLE); if (sk_wait_event(sk, &timeout, sk->sk_state != TCP_SYN_SENT)) break; if (signal_pending(current) || !timeout) break; } finish_wait(sk_sleep(sk), &w...
0
[ "CWE-200" ]
net
b8670c09f37bdf2847cc44f36511a53afc6161fd
188,259,645,032,732,460,000,000,000,000,000,000,000
14
net: fix infoleak in llc The stack object “info” has a total size of 12 bytes. Its last byte is padding which is not initialized and leaked via “put_cmsg”. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
static void rds_ib_dev_shutdown(struct rds_ib_device *rds_ibdev) { struct rds_ib_connection *ic; unsigned long flags; spin_lock_irqsave(&rds_ibdev->spinlock, flags); list_for_each_entry(ic, &rds_ibdev->conn_list, ib_node) rds_conn_drop(ic->conn); spin_unlock_irqrestore(&rds_ibdev->spinlock, flags); }
0
[ "CWE-399", "CWE-476" ]
linux
c2349758acf1874e4c2b93fe41d072336f1a31d0
174,623,180,433,951,460,000,000,000,000,000,000,000
10
rds: prevent dereference of a NULL device Binding might result in a NULL device, which is dereferenced causing this BUG: [ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097 4 [ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110 [ 1317.263315] PGD 418bcb067 PUD 3ceb...
void fp_set_int(fp_int *a, unsigned long b) { int x; /* use direct fp_set if b is less than fp_digit max */ if (b < FP_DIGIT_MAX) { fp_set (a, (fp_digit)b); return; } fp_zero (a); /* set chunk bits at a time */ for (x = 0; x < (int)(sizeof(b) * 8) / MP_SET_CHUNK_BITS; x++) { fp_mul_2d (a, M...
0
[ "CWE-326", "CWE-203" ]
wolfssl
1de07da61f0c8e9926dcbd68119f73230dae283f
319,262,239,396,670,330,000,000,000,000,000,000,000
30
Constant time EC map to affine for private operations For fast math, use a constant time modular inverse when mapping to affine when operation involves a private key - key gen, calc shared secret, sign.
static int snd_usbmidi_urb_error(const struct urb *urb) { switch (urb->status) { /* manually unlinked, or device gone */ case -ENOENT: case -ECONNRESET: case -ESHUTDOWN: case -ENODEV: return -ENODEV; /* errors that might occur during unplugging */ case -EPROTO: case -ETIME: case -EILSEQ: return -EIO; def...
0
[ "CWE-703" ]
linux
07d86ca93db7e5cdf4743564d98292042ec21af7
72,690,688,285,437,090,000,000,000,000,000,000,000
19
ALSA: usb-audio: avoid freeing umidi object twice The 'umidi' object will be free'd on the error path by snd_usbmidi_free() when tearing down the rawmidi interface. So we shouldn't try to free it in snd_usbmidi_create() after having registered the rawmidi interface. Found by KASAN. Signed-off-by: Andrey Konovalov <a...
void Http2Session::Consume(const FunctionCallbackInfo<Value>& args) { Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); CHECK(args[0]->IsObject()); session->Consume(args[0].As<Object>()); }
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
28,822,675,246,854,255,000,000,000,000,000,000,000
6
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
term_pop_title(int which) { if ((which & SAVE_RESTORE_TITLE) && T_CRT != NULL && *T_CRT != NUL) { OUT_STR(T_CRT); out_flush(); } if ((which & SAVE_RESTORE_ICON) && T_SRI != NULL && *T_SRI != NUL) { OUT_STR(T_SRI); out_flush(); } }
0
[ "CWE-125", "CWE-787" ]
vim
e178af5a586ea023622d460779fdcabbbfac0908
156,432,914,843,694,630,000,000,000,000,000,000,000
14
patch 8.2.5160: accessing invalid memory after changing terminal size Problem: Accessing invalid memory after changing terminal size. Solution: Adjust cmdline_row and msg_row to the value of Rows.
int AsyncSSLSocket::getSSLExDataIndex() { static auto index = SSL_get_ex_new_index( 0, (void*)"AsyncSSLSocket data index", nullptr, nullptr, nullptr); return index; }
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
316,861,046,112,431,930,000,000,000,000,000,000,000
5
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
int __sched __cond_resched_softirq(void) { BUG_ON(!in_softirq()); if (should_resched(SOFTIRQ_DISABLE_OFFSET)) { local_bh_enable(); preempt_schedule_common(); local_bh_disable(); return 1; } return 0; }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
157,824,023,105,626,430,000,000,000,000,000,000,000
12
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 double mp_list_wh(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.imglist.width()); return (double)mp.imglist[ind]._width*mp.imglist[ind]._height; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
271,541,635,967,036,760,000,000,000,000,000,000,000
4
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
void Monitor::handle_subscribe(MonOpRequestRef op) { MMonSubscribe *m = static_cast<MMonSubscribe*>(op->get_req()); dout(10) << "handle_subscribe " << *m << dendl; bool reply = false; MonSession *s = op->get_session(); assert(s); for (map<string,ceph_mon_subscribe_item>::iterator p = m->what.begin(); ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
216,615,748,109,900,770,000,000,000,000,000,000,000
82
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static char *make_filename_safe(const char *filename TSRMLS_DC) { if (*filename && memcmp(filename, ":memory:", sizeof(":memory:"))) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { return NULL; } if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR...
0
[ "CWE-264" ]
php-src
055ecbc62878e86287d742c7246c21606cee8183
107,340,962,273,293,510,000,000,000,000,000,000,000
22
Improve check for :memory: pseudo-filename in SQlite
scroll_cursor_halfway(int atend) { int above = 0; linenr_T topline; #ifdef FEAT_DIFF int topfill = 0; #endif int below = 0; int used; lineoff_T loff; lineoff_T boff; #ifdef FEAT_DIFF linenr_T old_topline = curwin->w_topline; #endif #ifdef FEAT_PROP_POPUP // if the width changed ...
0
[ "CWE-122" ]
vim
777e7c21b7627be80961848ac560cb0a9978ff43
275,769,880,335,463,170,000,000,000,000,000,000,000
80
patch 8.2.3564: invalid memory access when scrolling without valid screen Problem: Invalid memory access when scrolling without a valid screen. Solution: Do not set VALID_BOTLINE in w_valid.
void xdr_init_decode_pages(struct xdr_stream *xdr, struct xdr_buf *buf, struct page **pages, unsigned int len) { memset(buf, 0, sizeof(*buf)); buf->pages = pages; buf->page_len = len; buf->buflen = len; buf->len = len; xdr_init_decode(xdr, buf, NULL, NULL); }
0
[ "CWE-119", "CWE-787" ]
linux
6d1c0f3d28f98ea2736128ed3e46821496dc3a8c
258,826,111,872,225,930,000,000,000,000,000,000,000
10
sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base() This seems to happen fairly easily during READ_PLUS testing on NFS v4.2. I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr greater than the number of pages in the array. So let's just return early if we're setting base to a poin...
static int rtp_packetize_jpeg( sout_stream_id_sys_t *id, block_t *in ) { uint8_t *p_data = in->p_buffer; int i_data = in->i_buffer; uint8_t *bufend = p_data + i_data; const uint8_t *qtables = NULL; int nb_qtables = 0; int off = 0; // fragment offset in frame int y_sampling_factor; ...
0
[ "CWE-119", "CWE-787" ]
vlc
204291467724867b79735c0ee3aeb0dbc2200f97
25,228,531,928,667,290,000,000,000,000,000,000,000
185
stream_out: rtp: don't use VLA for user controlled data It should fix a possible invalid memory access When streaming ogg-files via rtp, an ogg-file can trigger an invalid write access using an overly long 'configuration' string. The original code attemps to allocate space to hold the string on the stack and hence, ...
zend(i_ctx_t *i_ctx_p) { if (ref_stack_count_inline(&d_stack) == min_dstack_size) { /* We would underflow the d-stack. */ return_error(gs_error_dictstackunderflow); } while (dsp == dsbot) { /* We would underflow the current block. */ ref_stack_pop_block(&d_stack); } d...
0
[]
ghostpdl
d683d1e6450d74619e6277efeebfc222d9a5cb91
105,234,486,162,443,740,000,000,000,000,000,000,000
14
Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps. We were under the impression that the Windows driver 'PScript5.dll' used superexec, but after testing with our extensive suite of PostScript file, and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear that this operator is ...
struct xenvif *xenvif_alloc(struct device *parent, domid_t domid, unsigned int handle) { int err; struct net_device *dev; struct xenvif *vif; char name[IFNAMSIZ] = {}; int i; snprintf(name, IFNAMSIZ - 1, "vif%u.%u", domid, handle); dev = alloc_netdev(sizeof(struct xenvif), name, ether_setup); if (dev ==...
0
[ "CWE-399" ]
net-next
e9d8b2c2968499c1f96563e6522c56958d5a1d0d
18,638,228,098,620,728,000,000,000,000,000,000,000
106
xen-netback: disable rogue vif in kthread context When netback discovers frontend is sending malformed packet it will disables the interface which serves that frontend. However disabling a network interface involving taking a mutex which cannot be done in softirq context, so we need to defer this process to kthread c...
bool cleanup_excluding_const_fields_processor(void *arg) { Item *item= real_item(); if (item && item->type() == FIELD_ITEM && ((Item_field *) item)->field && item->const_item()) return 0; return cleanup_processor(arg); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
290,043,761,223,736,100,000,000,000,000,000,000,000
8
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void __init rtnetlink_init(void) { int i; for (i = 0; i < ARRAY_SIZE(rtnl_msg_handlers_ref); i++) refcount_set(&rtnl_msg_handlers_ref[i], 1); if (register_pernet_subsys(&rtnetlink_net_ops)) panic("rtnetlink_init: cannot initialize rtnetlink\n"); register_netdevice_notifier(&rtnetlink_dev_notifier); rtnl_re...
0
[ "CWE-476" ]
linux
f428fe4a04cc339166c8bbd489789760de3a0cee
259,259,507,658,906,240,000,000,000,000,000,000,000
33
rtnetlink: give a user socket to get_target_net() This function is used from two places: rtnl_dump_ifinfo and rtnl_getlink. In rtnl_getlink(), we give a request skb into get_target_net(), but in rtnl_dump_ifinfo, we give a response skb into get_target_net(). The problem here is that NETLINK_CB() isn't initialized for ...
record_raw_stats( sockaddr_u *srcadr, sockaddr_u *dstadr, l_fp *t1, /* originate timestamp */ l_fp *t2, /* receive timestamp */ l_fp *t3, /* transmit timestamp */ l_fp *t4 /* destination timestamp */ ) { l_fp now; u_long day; if (!stats_control) return; get_systime(&now); filegen_setup(&rawstats, no...
0
[ "CWE-20" ]
ntp
52e977d79a0c4ace997e5c74af429844da2f27be
26,366,580,762,770,426,000,000,000,000,000,000,000
27
[Bug 1773] openssl not detected during ./configure. [Bug 1774] Segfaults if cryptostats enabled and built without OpenSSL.
Block::Lacing Block::GetLacing() const { const int value = int(m_flags & 0x06) >> 1; return static_cast<Lacing>(value); }
0
[ "CWE-20" ]
libvpx
34d54b04e98dd0bac32e9aab0fbda0bf501bc742
283,889,842,005,125,660,000,000,000,000,000,000,000
4
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
static int jp2_cmap_getdata(jp2_box_t *box, jas_stream_t *in) { jp2_cmap_t *cmap = &box->data.cmap; jp2_cmapent_t *ent; unsigned int i; cmap->numchans = (box->datalen) / 4; if (!(cmap->ents = jas_alloc2(cmap->numchans, sizeof(jp2_cmapent_t)))) { return -1; } for (i = 0; i < cmap->numchans; ++i) { ent = &cma...
1
[ "CWE-476" ]
jasper
e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d
128,971,697,583,312,870,000,000,000,000,000,000,000
21
Fixed bugs due to uninitialized data in the JP2 decoder. Also, added some comments marking I/O stream interfaces that probably need to be changed (in the long term) to fix integer overflow problems.
static void svm_clear_vintr(struct vcpu_svm *svm) { const u32 mask = V_TPR_MASK | V_GIF_ENABLE_MASK | V_GIF_MASK | V_INTR_MASKING_MASK; svm_clr_intercept(svm, INTERCEPT_VINTR); /* Drop int_ctl fields related to VINTR injection. */ svm->vmcb->control.int_ctl &= mask; if (is_guest_mode(&svm->vcpu)) { svm->vmcb01...
1
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
276,949,534,482,648,370,000,000,000,000,000,000,000
17
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CONST_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op2; zval *result = &EX_T(opline->result.u.var).tmp_var; compare_function(result, &opline->op1.u.constant, _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRM...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
128,404,890,271,098,770,000,000,000,000,000,000,000
14
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static void vmxnet3_put_rx_stats_to_file(QEMUFile *f, struct UPT1_RxStats *rx_stat) { qemu_put_be64(f, rx_stat->LROPktsRxOK); qemu_put_be64(f, rx_stat->LROBytesRxOK); qemu_put_be64(f, rx_stat->ucastPktsRxOK); qemu_put_be64(f, rx_stat->ucastBytesRxOK); qemu_put_be64(f, rx_stat->mcastPktsRxOK); ...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
276,098,924,941,515,260,000,000,000,000,000,000,000
14
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...
static void initialize_environment() { setenv("LIBGL_ALWAYS_SOFTWARE", "true", 0); setenv("GALLIUM_DRIVER", "softpipe", 0); test_egl = virgl_egl_init(NULL, true, true); assert(test_egl); virgl_renderer_init(&cookie, VIRGL_RENDERER_USE_GLES| VIRGL_RENDERER_USE_SURFACELESS, &fuzzer_...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
163,295,953,770,391,820,000,000,000,000,000,000,000
13
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
DEFUN (bgp_default_local_preference, bgp_default_local_preference_cmd, "bgp default local-preference <0-4294967295>", "BGP specific commands\n" "Configure BGP defaults\n" "local preference (higher=more preferred)\n" "Configure default local preference value\n") { struct bgp *...
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
153,013,177,918,121,920,000,000,000,000,000,000,000
19
[bgpd] cleanup, compact and consolidate capability parsing code 2007-07-26 Paul Jakma <paul.jakma@sun.com> * (general) Clean up and compact capability parsing slightly. Consolidate validation of length and logging of generic TLV, and memcpy of capability data, thus removing such from cap specifc code (not a...
void Statement::CloseCallback(uv_handle_t* handle) { assert(handle != NULL); assert(handle->data != NULL); Async* async = static_cast<Async*>(handle->data); delete async; }
0
[]
node-sqlite3
593c9d498be2510d286349134537e3bf89401c4a
197,408,022,741,676,140,000,000,000,000,000,000,000
6
bug: fix segfault of invalid toString() object (#1450) * bug: verify toString() returns valid data * test: faulty toString test
static void ide_dummy_transfer_stop(IDEState *s) { s->data_ptr = s->io_buffer; s->data_end = s->io_buffer; s->io_buffer[0] = 0xff; s->io_buffer[1] = 0xff; s->io_buffer[2] = 0xff; s->io_buffer[3] = 0xff; }
0
[ "CWE-189" ]
qemu
940973ae0b45c9b6817bab8e4cf4df99a9ef83d7
147,784,523,846,111,590,000,000,000,000,000,000,000
9
ide: Correct improper smart self test counter reset in ide core. The SMART self test counter was incorrectly being reset to zero, not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE: * We would write off the beginning of a dynamically allocated buffer * We forgot the SMART history Fix this. Signed-o...