func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int vcpu_enter_guest(struct kvm_vcpu *vcpu) { int r; bool req_int_win = !irqchip_in_kernel(vcpu->kvm) && vcpu->run->request_interrupt_window; bool req_immediate_exit = false; if (vcpu->requests) { if (kvm_check_request(KVM_REQ_MMU_RELOAD, vcpu)) kvm_mmu_unload(vcpu); if (kvm_check_request(KVM_REQ_M...
0
[ "CWE-119", "CWE-703", "CWE-120" ]
linux
a08d3b3b99efd509133946056531cdf8f3a0c09b
257,683,922,849,696,940,000,000,000,000,000,000,000
196
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...
static int get_info(struct net *net, void __user *user, const int *len, int compat) { char name[XT_TABLE_MAXNAMELEN]; struct xt_table *t; int ret; if (*len != sizeof(struct ipt_getinfo)) { duprintf("length %u != %zu\n", *len, sizeof(struct ipt_getinfo)); return -EINVAL; } if (copy_fr...
0
[ "CWE-200" ]
linux-2.6
78b79876761b86653df89c48a7010b5cbd41a84a
135,853,796,088,758,430,000,000,000,000,000,000,000
60
netfilter: ip_tables: fix infoleak to userspace Structures ipt_replace, compat_ipt_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sensitive in...
encode_BUNDLE(const struct ofpact_bundle *bundle, enum ofp_version ofp_version OVS_UNUSED, struct ofpbuf *out) { int slaves_len = ROUND_UP(2 * bundle->n_slaves, OFP_ACTION_ALIGN); struct nx_action_bundle *nab; ovs_be16 *slaves; size_t i; nab = (bundle->dst.field ...
0
[ "CWE-125" ]
ovs
9237a63c47bd314b807cda0bd2216264e82edbe8
57,159,979,558,315,100,000,000,000,000,000,000,000
29
ofp-actions: Avoid buffer overread in BUNDLE action decoding. Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052 Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
AirPDcapRsnaPwd2PskStep( const guint8 *ppBytes, const guint ppLength, const CHAR *ssid, const size_t ssidLength, const INT iterations, const INT count, UCHAR *output) { UCHAR digest[MAX_SSID_LENGTH+4]; /* SSID plus 4 bytes of count */ UCHAR digest1[SHA1_DIGEST_LEN]; INT i, j; ...
0
[ "CWE-20" ]
wireshark
9b0b20b8d5f8c9f7839d58ff6c5900f7e19283b4
194,562,659,257,444,760,000,000,000,000,000,000,000
44
Make sure EAPOL body is big enough for a EAPOL_RSN_KEY. A pointer to a EAPOL_RSN_KEY is set on the packet presuming the whole EAPOL_RSN_KEY is there. That's not always the case for fuzzed/malicious captures. Bug: 11585 Change-Id: Ib94b8aceef444c7820e43b969596efdb8dbecccd Reviewed-on: https://code.wireshark.org/revie...
print_krb5_data(char *label, krb5_data *kdata) { int i; printf("%s[%d] ", label, kdata->length); for (i=0; i < (int)kdata->length; i++) { if (0 && isprint((int) kdata->data[i])) printf( "%c ", kdata->data[i]); else printf( "%02x ", (unsig...
0
[ "CWE-20" ]
openssl
cca1cd9a3447dd067503e4a85ebd1679ee78a48e
215,380,327,440,177,400,000,000,000,000,000,000,000
14
Submitted by: Tomas Hoger <thoger@redhat.com> Fix for CVE-2010-0433 where some kerberos enabled versions of OpenSSL could be crashed if the relevant tables were not present (e.g. chrooted).
bool SendClientMessage(const std::vector<std::string>& parameters) { if (this->state != SASL_COMM) return true; parameterlist params; params.push_back(sasl_target); params.push_back("SASL"); params.push_back(this->user->uuid); params.push_back(this->agent); params.push_back("C"); params.insert(pa...
0
[ "CWE-284", "CWE-264" ]
inspircd
74fafb7f11b06747f69f182ad5e3769b665eea7a
219,974,592,081,282,130,000,000,000,000,000,000,000
24
m_sasl: don't allow AUTHENTICATE with mechanisms with a space
apr_byte_t oidc_enabled(request_rec *r) { if (ap_auth_type(r) == NULL) return FALSE; if (apr_strnatcasecmp((const char*) ap_auth_type(r), OIDC_AUTH_TYPE_OPENID_CONNECT) == 0) return TRUE; if (apr_strnatcasecmp((const char*) ap_auth_type(r), OIDC_AUTH_TYPE_OPENID_OAUTH20) == 0) return TRUE; if (apr_st...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
26,264,237,040,775,380,000,000,000,000,000,000,000
18
Add a function to escape Javascript characters
void set_query_timer() { #ifndef EMBEDDED_LIBRARY /* Don't start a query timer if - If timeouts are not set - if we are in a stored procedure or sub statement - If this is a slave thread - If we already have set a timeout (happens when running prepared statements that calls...
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
200,160,598,600,590,930,000,000,000,000,000,000,000
17
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
static inline int vcc_writable(struct sock *sk) { struct atm_vcc *vcc = atm_sk(sk); return (vcc->qos.txtp.max_sdu + atomic_read(&sk->sk_wmem_alloc)) <= sk->sk_sndbuf; }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
125,040,841,179,681,980,000,000,000,000,000,000,000
7
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
SYSCALL_DEFINE3(madvise, unsigned long, start, size_t, len_in, int, behavior) { return do_madvise(start, len_in, behavior); }
0
[]
linux
bc0c4d1e176eeb614dc8734fc3ace34292771f11
212,574,426,989,773,500,000,000,000,000,000,000,000
4
mm: check that mm is still valid in madvise() IORING_OP_MADVISE can end up basically doing mprotect() on the VM of another process, which means that it can race with our crazy core dump handling which accesses the VM state without holding the mmap_sem (because it incorrectly thinks that it is the final user). This is...
grub_crypto_lookup_md_by_name (const char *name) { const gcry_md_spec_t *md; int first = 1; while (1) { for (md = grub_digests; md; md = md->next) if (grub_strcasecmp (name, md->name) == 0) return md; if (grub_crypto_autoload_hook && first) grub_crypto_autoload_hook (name); else return...
0
[ "CWE-264" ]
grub
451d80e52d851432e109771bb8febafca7a5f1f2
336,574,029,417,146,700,000,000,000,000,000,000,000
16
Fix security issue when reading username and password This patch fixes two integer underflows at: * grub-core/lib/crypto.c * grub-core/normal/auth.c CVE-2015-8370 Signed-off-by: Hector Marco-Gisbert <hecmargi@upv.es> Signed-off-by: Ismael Ripoll-Ripoll <iripoll@disca.upv.es> Also-By: Andrey Borzenkov <arvidjaar@...
static int stv06xx_start(struct gspca_dev *gspca_dev) { struct sd *sd = (struct sd *) gspca_dev; struct usb_host_interface *alt; struct usb_interface *intf; int err, packet_size; intf = usb_ifnum_to_if(sd->gspca_dev.dev, sd->gspca_dev.iface); alt = usb_altnum_to_altsetting(intf, sd->gspca_dev.alt); if (!alt) { ...
0
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
172,012,280,501,474,780,000,000,000,000,000,000,000
38
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
run_statements(MYSQL *mysql, statement *stmt) { statement *ptr; MYSQL_RES *result; DBUG_ENTER("run_statements"); for (ptr= stmt; ptr && ptr->length; ptr= ptr->next) { if (run_query(mysql, ptr->string, ptr->length)) { fprintf(stderr,"%s: Cannot run query %.*s ERROR : %s\n", my_pro...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
310,237,775,968,947,430,000,000,000,000,000,000,000
23
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
void CServerBan::ConBanExt(IConsole::IResult *pResult, void *pUser) { CServerBan *pThis = static_cast<CServerBan *>(pUser); const char *pStr = pResult->GetString(0); int Minutes = pResult->NumArguments()>1 ? clamp(pResult->GetInteger(1), 0, 44640) : 30; const char *pReason = pResult->NumArguments()>2 ? pResult->Ge...
0
[ "CWE-20", "CWE-703", "CWE-400" ]
teeworlds
c68402fa7e279d42886d5951d1ea8ac2facc1ea5
296,696,146,406,437,570,000,000,000,000,000,000,000
19
changed a check
kafka_tvb_get_string(tvbuff_t *tvb, int offset, int length) { if (length>=0) { return tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8);; } else { return "[ Null ]"; } }
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
93,984,507,538,541,780,000,000,000,000,000,000,000
8
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
get_new_scriptitem(int *error) { static scid_T last_current_SID = 0; int sid = ++last_current_SID; scriptitem_T *si = NULL; if (ga_grow(&script_items, (int)(sid - script_items.ga_len)) == FAIL) { *error = FAIL; return sid; } while (script_items.ga_len < sid) { si = ALLOC_CL...
0
[ "CWE-122" ]
vim
2bdad6126778f907c0b98002bfebf0e611a3f5db
96,547,496,569,174,130,000,000,000,000,000,000,000
42
patch 8.2.4647: "source" can read past end of copied line Problem: "source" can read past end of copied line. Solution: Add a terminating NUL.
flatpak_run_add_environment_args (FlatpakBwrap *bwrap, const char *app_info_path, FlatpakRunFlags flags, const char *app_id, FlatpakContext *context, ...
0
[ "CWE-20" ]
flatpak
a9107feeb4b8275b78965b36bf21b92d5724699e
32,258,554,436,016,306,000,000,000,000,000,000,000
157
run: Only compare the lowest 32 ioctl arg bits for TIOCSTI Closes #2782. Closes: #2783 Approved by: alexlarsson
xmlSchemaIDCStoreKey(xmlSchemaValidCtxtPtr vctxt, xmlSchemaPSVIIDCKeyPtr key) { /* * Add to gobal list. */ if (vctxt->idcKeys == NULL) { vctxt->idcKeys = (xmlSchemaPSVIIDCKeyPtr *) xmlMalloc(40 * sizeof(xmlSchemaPSVIIDCKeyPtr)); if (vctxt->idcKeys == NULL) { xmlSchemaVErrMemory(vctxt,...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
290,080,770,757,073,860,000,000,000,000,000,000,000
30
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
static int ext4_writepages(struct address_space *mapping, struct writeback_control *wbc) { pgoff_t writeback_index = 0; long nr_to_write = wbc->nr_to_write; int range_whole = 0; int cycled = 1; handle_t *handle = NULL; struct mpage_da_data mpd; struct inode *inode = mapping->host; int needed_blocks, rsv_b...
0
[ "CWE-416", "CWE-401" ]
linux
4ea99936a1630f51fc3a2d61a58ec4a1c4b7d55a
261,568,847,859,953,530,000,000,000,000,000,000,000
243
ext4: add more paranoia checking in ext4_expand_extra_isize handling It's possible to specify a non-zero s_want_extra_isize via debugging option, and this can cause bad things(tm) to happen when using a file system with an inode size of 128 bytes. Add better checking when the file system is mounted, as well as when w...
static inline void dump_stacktrace(void) {;}
0
[ "CWE-59", "CWE-61" ]
lxc
72cf81f6a3404e35028567db2c99a90406e9c6e6
287,069,877,134,378,340,000,000,000,000,000,000,000
1
CVE-2015-1331: lxclock: use /run/lxc/lock rather than /run/lock/lxc This prevents an unprivileged user to use LXC to create arbitrary file on the filesystem. Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com> Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Acked-by: Stéphane Graber <stgraber@ubuntu.com>
static inline void ax25_dev_put(ax25_dev *ax25_dev) { if (refcount_dec_and_test(&ax25_dev->refcount)) { kfree(ax25_dev); } }
0
[ "CWE-416" ]
linux
87563a043cef044fed5db7967a75741cc16ad2b1
266,801,088,177,747,400,000,000,000,000,000,000,000
6
ax25: fix reference count leaks of ax25_dev The previous commit d01ffb9eee4a ("ax25: add refcount in ax25_dev to avoid UAF bugs") introduces refcount into ax25_dev, but there are reference leak paths in ax25_ctl_ioctl(), ax25_fwd_ioctl(), ax25_rt_add(), ax25_rt_del() and ax25_rt_opt(). This patch uses ax25_dev_put() ...
PHPAPI int php_execute_script(zend_file_handle *primary_file) { zend_file_handle *prepend_file_p, *append_file_p; zend_file_handle prepend_file = {{0}, NULL, NULL, 0, 0}, append_file = {{0}, NULL, NULL, 0, 0}; #if HAVE_BROKEN_GETCWD volatile int old_cwd_fd = -1; #else char *old_cwd; ALLOCA_FLAG(use_heap) #endif i...
0
[]
php-src
9a07245b728714de09361ea16b9c6fcf70cb5685
116,226,914,240,145,590,000,000,000,000,000,000,000
117
Fixed bug #71273 A wrong ext directory setup in php.ini leads to crash
process_cmd_cmdallowall(CMD_Request *msg, char *line) { int status; msg->command = htons(REQ_CMDALLOWALL); status = parse_allow_deny(msg, line); return status; }
0
[ "CWE-189" ]
chrony
7712455d9aa33d0db0945effaa07e900b85987b1
241,213,867,569,101,000,000,000,000,000,000,000,000
7
Fix buffer overflow when processing crafted command packets When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES, RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is calculated, the number of items stored in the packet is not v...
evdns_init(void) { struct evdns_base *base = evdns_base_new(NULL, 1); if (base) { current_base = base; return 0; } else { return -1; } }
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
289,607,113,868,228,120,000,000,000,000,000,000,000
10
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
read_dns(int fd, int tun_fd, struct query *q) /* FIXME: tun_fd is because of raw_decode() below */ { struct sockaddr_in from; socklen_t addrlen; char packet[64*1024]; int r; #ifndef WINDOWS32 char address[96]; struct msghdr msg; struct iovec iov; struct cmsghdr *cmsg; addrlen = sizeof(struct sockaddr); iov.i...
0
[]
iodine
b715be5cf3978fbe589b03b09c9398d0d791f850
25,128,359,564,228,896,000,000,000,000,000,000,000
63
Fix authentication bypass bug The client could bypass the password check by continuing after getting error from the server and guessing the network parameters. The server would still accept the rest of the setup and also network traffic. Add checks for normal and raw mode that user has authenticated before allowing a...
void ACSequentialScan::StartParseScan(class ByteStream *io,class Checksum *chk,class BufferCtrl *ctrl) { #if ACCUSOFT_CODE class ACTemplate *ac,*dc; int i; for(i = 0;i < m_ucCount;i++) { dc = m_pScan->DCConditionerOf(i); ac = m_pScan->ACConditionerOf(i); m_ucDCContext[i] = m_pScan->DCTableInd...
0
[ "CWE-119", "CWE-703" ]
libjpeg
ef4a29a62ab48b8dc235f4af52cfd6319eda9a6a
222,019,035,750,383,100,000,000,000,000,000,000,000
48
Added out-of-bounds checks for lossless symbol decoding and AC context indices. Worked around some gcc warnings. Bumped to 1.64.
static void __gvt_dma_release(struct kref *ref) { struct gvt_dma *entry = container_of(ref, typeof(*entry), ref); gvt_dma_unmap_page(entry->vgpu, entry->gfn, entry->dma_addr, entry->size); __gvt_cache_remove_entry(entry->vgpu, entry); }
0
[ "CWE-20" ]
linux
51b00d8509dc69c98740da2ad07308b630d3eb7d
140,221,237,189,242,050,000,000,000,000,000,000,000
8
drm/i915/gvt: Fix mmap range check This is to fix missed mmap range check on vGPU bar2 region and only allow to map vGPU allocated GMADDR range, which means user space should support sparse mmap to get proper offset for mmap vGPU aperture. And this takes care of actual pgoff in mmap request as original code always doe...
init_dynamic_assoc_var (name, getfunc, setfunc, attrs) char *name; sh_var_value_func_t *getfunc; sh_var_assign_func_t *setfunc; int attrs; { SHELL_VAR *v; v = find_variable (name); if (v) return (v); INIT_DYNAMIC_ASSOC_VAR (name, getfunc, setfunc); if (attrs) VSETATTR (v, attrs); ...
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
150,265,527,508,824,240,000,000,000,000,000,000,000
16
commit bash-20120224 snapshot
packet_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) { struct sock *sk = sock->sk; struct packet_sock *po = pkt_sk(sk); int ret; if (level != SOL_PACKET) return -ENOPROTOOPT; switch (optname) { case PACKET_ADD_MEMBERSHIP: case PACKET_DROP_MEMBERSHIP: { s...
1
[ "CWE-119" ]
linux
bcc5364bdcfe131e6379363f089e7b4108d35b70
243,205,310,609,717,700,000,000,000,000,000,000,000
217
net/packet: fix overflow in check for tp_reserve When calculating po->tp_hdrlen + po->tp_reserve the result can overflow. Fix by checking that tp_reserve <= INT_MAX on assign. Signed-off-by: Andrey Konovalov <andreyknvl@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@da...
static int xfrm_add_pol_expire(struct sk_buff *skb, struct nlmsghdr *nlh, struct nlattr **attrs) { struct net *net = sock_net(skb->sk); struct xfrm_policy *xp; struct xfrm_user_polexpire *up = nlmsg_data(nlh); struct xfrm_userpolicy_info *p = &up->pol; u8 type = XFRM_POLICY_TYPE_MAIN; int err = -ENOENT; struct...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
126,376,517,922,011,320,000,000,000,000,000,000,000
68
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
_gnutls_server_select_suite (gnutls_session_t session, opaque * data, int datalen) { int x, i, j; cipher_suite_st *ciphers, cs; int retval, err; gnutls_pk_algorithm_t pk_algo; /* will hold the pk algorithms * supported by the peer. */ pk_algo = _gnutls_server_find_pk_algos_in_ciphersuites...
0
[ "CWE-189" ]
gnutls
bc8102405fda11ea00ca3b42acc4f4bce9d6e97b
126,639,152,251,024,460,000,000,000,000,000,000,000
122
Fix GNUTLS-SA-2008-1 security vulnerabilities. See http://www.gnu.org/software/gnutls/security.html for updates.
void X509_STORE_CTX_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk) { ctx->other_ctx = sk; ctx->get_issuer = get_issuer_sk; }
0
[ "CWE-119" ]
openssl
370ac320301e28bb615cee80124c042649c95d14
85,351,207,039,109,000,000,000,000,000,000,000,000
5
Fix length checks in X509_cmp_time to avoid out-of-bounds reads. Also tighten X509_cmp_time to reject more than three fractional seconds in the time; and to reject trailing garbage after the offset. CVE-2015-1789 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
DEFUN (no_neighbor_interface, no_neighbor_interface_cmd, NO_NEIGHBOR_CMD "interface WORD", NO_STR NEIGHBOR_STR NEIGHBOR_ADDR_STR "Interface\n" "Interface name\n") { return peer_interface_vty (vty, argv[0], NULL); }
0
[ "CWE-125" ]
frr
6d58272b4cf96f0daa846210dd2104877900f921
155,949,455,610,165,080,000,000,000,000,000,000,000
11
[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...
set_can_cindent(int val) { can_cindent = val; }
0
[]
vim
98a336dd497d3422e7efeef9f24cc9e25aeb8a49
316,852,314,550,007,100,000,000,000,000,000,000,000
4
patch 8.2.0133: invalid memory access with search command Problem: Invalid memory access with search command. Solution: When :normal runs out of characters in bracketed paste mode break out of the loop.(closes #5511)
TEST_F(HttpConnectionManagerImplTest, RequestTimeoutDisabledByDefault) { setup(false, ""); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> void { EXPECT_CALL(filter_callbacks_.connection_.dispatcher_, createTimer_).Times(0); conn_manager_->newStream(response_encoder_); })); ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
53,604,109,173,475,430,000,000,000,000,000,000,000
11
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
NO_INLINE JsVar *jspeStatementIf() { bool cond; JsVar *var, *result = 0; JSP_ASSERT_MATCH(LEX_R_IF); JSP_MATCH('('); var = jspeExpression(); if (JSP_SHOULDNT_PARSE) return var; JSP_MATCH(')'); cond = JSP_SHOULD_EXECUTE && jsvGetBoolAndUnLock(jsvSkipName(var)); jsvUnLock(var); JSP_SAVE_EXECUTE(); ...
0
[ "CWE-125", "CWE-674" ]
Espruino
51380baf17241728b6d48cdb84140b931e3e3cc5
146,063,986,802,572,660,000,000,000,000,000,000,000
34
Fix stack overflow if interpreting a file full of '{' (fix #1448)
void problem_data_load_from_dump_dir(problem_data_t *problem_data, struct dump_dir *dd, char **excluding) { char *short_name; char *full_name; dd_init_next_file(dd); while (dd_get_next_file(dd, &short_name, &full_name)) { if (excluding && is_in_string_list(short_name, excluding)) { ...
0
[ "CWE-20" ]
libreport
1951e7282043dfe1268d492aea056b554baedb75
167,665,724,202,878,360,000,000,000,000,000,000,000
96
lib: fix races in dump directory handling code Florian Weimer <fweimer@redhat.com>: dd_opendir() should keep a file handle (opened with O_DIRECTORY) and use openat() and similar functions to access files in it. ... The file system manipulation functions should guard against hard links (check tha...
static AvahiLegacyUnicastReflectSlot* allocate_slot(AvahiServer *s) { unsigned n, idx = (unsigned) -1; AvahiLegacyUnicastReflectSlot *slot; assert(s); if (!s->legacy_unicast_reflect_slots) s->legacy_unicast_reflect_slots = avahi_new0(AvahiLegacyUnicastReflectSlot*, AVAHI_LEGACY_UNICAST_REFLECT...
0
[ "CWE-399" ]
avahi
3093047f1aa36bed8a37fa79004bf0ee287929f4
59,790,515,654,429,130,000,000,000,000,000,000,000
28
Don't get confused by UDP packets with a source port that is zero This is a fix for rhbz 475394. Problem identified by Hugo Dias.
htmlAutoCloseOnClose(htmlParserCtxtPtr ctxt, const xmlChar * newtag) { const htmlElemDesc *info; int i, priority; priority = htmlGetEndPriority(newtag); for (i = (ctxt->nameNr - 1); i >= 0; i--) { if (xmlStrEqual(newtag, ctxt->nameTab[i])) break; /* * A missplaced...
0
[ "CWE-399" ]
libxml2
de0cc20c29cb3f056062925395e0f68d2250a46f
198,490,945,716,148,670,000,000,000,000,000,000,000
35
Fix some buffer conversion issues https://bugzilla.gnome.org/show_bug.cgi?id=690202 Buffer overflow errors originating from xmlBufGetInputBase in 2.9.0 The pointers from the context input were not properly reset after that call which can do reallocations.
hyphenHashFree (HyphenHashTab * hashTab) { int i; HyphenHashEntry *e, *next; for (i = 0; i < HYPHENHASHSIZE; i++) for (e = hashTab->entries[i]; e; e = next) { next = e->next; free (e->key); free (e); } free (hashTab); }
0
[]
liblouis
dc97ef791a4fae9da11592c79f9f79e010596e0c
148,110,374,934,531,610,000,000,000,000,000,000,000
13
Merge branch 'table_resolver'
win_alloc_firstwin(win_T *oldwin) { curwin = win_alloc(NULL, FALSE); if (curwin == NULL) return FAIL; if (oldwin == NULL) { // Very first window, need to create an empty buffer for it and // initialize from scratch. curbuf = buflist_new(NULL, NULL, 1L, BLN_LISTED); if (curwin == NULL || curbuf == N...
0
[ "CWE-416" ]
vim
28d032cc688ccfda18c5bbcab8b50aba6e18cde5
83,503,164,734,682,380,000,000,000,000,000,000,000
38
patch 8.2.4979: accessing freed memory when line is flushed Problem: Accessing freed memory when line is flushed. Solution: Make a copy of the pattern to search for.
_outBoolExpr(StringInfo str, const BoolExpr *node) { char *opstr = NULL; WRITE_NODE_TYPE("BOOLEXPR"); /* do-it-yourself enum representation */ switch (node->boolop) { case AND_EXPR: opstr = "and"; break; case OR_EXPR: opstr = "or"; break; case NOT_EXPR: opstr = "not"; break; } append...
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
101,465,782,713,270,000,000,000,000,000,000,000,000
25
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...
static int pn_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, size_t len, int noblock, int flags, int *addr_len) { struct sk_buff *skb = NULL; struct sockaddr_pn sa; int rval = -EOPNOTSUPP; int copylen; if (flags & ~(MSG_PEEK|MSG_TRUNC|MSG_DONTWAIT|MSG_NOSIGNAL| MSG_CMSG_COMPAT)) goto ...
1
[ "CWE-20" ]
net
bceaa90240b6019ed73b49965eac7d167610be69
61,187,525,898,163,210,000,000,000,000,000,000,000
45
inet: prevent leakage of uninitialized memory to user in recv syscalls Only update *addr_len when we actually fill in sockaddr, otherwise we can return uninitialized memory from the stack to the caller in the recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL) checks because we only get called wit...
current_getpwuid(void) { uid_t ruid; /* GNU Hurd implementation has an extension where a process can exist in a * non-conforming environment, and thus be outside the realms of POSIX * process identifiers; on this platform, getuid() fails with a status of * (uid_t)(-1) and sets errno if a program is run fr...
0
[ "CWE-362" ]
util-linux
dffab154d29a288aa171ff50263ecc8f2e14a891
287,998,522,772,554,270,000,000,000,000,000,000,000
17
su: properly clear child PID Reported-by: Tobias Stöckmann <tobias@stoeckmann.org> Signed-off-by: Karel Zak <kzak@redhat.com>
AlgorithmEnum* ZRtp::findBestCipher(ZrtpPacketHello *hello, AlgorithmEnum* pk) { int i; int ii; int numAlgosOffered; AlgorithmEnum* algosOffered[ZrtpConfigure::maxNoOfAlgos+1]; int numAlgosConf; AlgorithmEnum* algosConf[ZrtpConfigure::maxNoOfAlgos+1]; int num = hello->getNumCiphers(); ...
0
[ "CWE-119" ]
ZRTPCPP
c8617100f359b217a974938c5539a1dd8a120b0e
251,740,234,781,289,000,000,000,000,000,000,000,000
38
Fix vulnerabilities found and reported by Mark Dowd - limit length of memcpy - limit number of offered algorithms in Hello packet - length check in PING packet - fix a small coding error
cmsStage* CMSEXPORT cmsStageDup(cmsStage* mpe) { cmsStage* NewMPE; if (mpe == NULL) return NULL; NewMPE = _cmsStageAllocPlaceholder(mpe ->ContextID, mpe ->Type, mpe ->InputChannels, mpe ->OutputCh...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
170,066,505,398,025,400,000,000,000,000,000,000,000
34
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
server_find_pk_algos_in_ciphersuites(const uint8_t * data, unsigned int datalen, gnutls_pk_algorithm_t * algos, size_t * algos_size) { unsigned int j, x; gnutls_kx_algorithm_t kx; gnutls_pk_algorithm_t pk; unsigned found; unsigned int max = *algos_size; if (datalen % 2 != 0) { gnutls...
0
[ "CWE-310" ]
gnutls
db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa
43,150,775,356,604,200,000,000,000,000,000,000,000
41
handshake: check for TLS_FALLBACK_SCSV If TLS_FALLBACK_SCSV was sent by the client during the handshake, and the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX, send the "Inappropriate fallback" fatal alert and abort the handshake. This mechanism was defined in RFC7507.
static int rtl8xxxu_init_queue_priority(struct rtl8xxxu_priv *priv) { u16 val16, hi, lo; u16 hiq, mgq, bkq, beq, viq, voq; int hip, mgp, bkp, bep, vip, vop; int ret = 0; switch (priv->ep_tx_count) { case 1: if (priv->ep_tx_high_queue) { hi = TRXDMA_QUEUE_HIGH; } else if (priv->ep_tx_low_queue) { hi = T...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
80,441,271,600,185,270,000,000,000,000,000,000,000
118
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
TEST_F(ExpressionNaryTest, FlattenInnerOperandsOptimizationOnAssociativeOnlyMiddleOperandAndGroup) { BSONArrayBuilder specBuilder; addOperandArrayToExpr(_associativeOnly, BSON_ARRAY(200 << "$path3" << 201)); specBuilder << 200 << "$path3" << 201; intrusive_ptr<Testable> innerOperand = Testable::create...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
9,189,684,266,186,877,000,000,000,000,000,000,000
23
SERVER-38070 fix infinite loop in agg expression
static int _nfs4_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsstat *fsstat) { struct nfs4_statfs_arg args = { .fh = fhandle, .bitmask = server->attr_bitmask, }; struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_STATFS], .rpc_argp = &args, .rpc_resp = fs...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
296,202,307,131,363,200,000,000,000,000,000,000,000
16
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OJPEGReadHeaderInfoSecTablesQTable(TIFF* tif) { static const char module[]="OJPEGReadHeaderInfoSecTablesQTable"; OJPEGState* sp=(OJPEGState*)tif->tif_data; uint8 m; uint8 n; uint32 oa; uint8* ob; uint32 p; if (sp->qtable_offset[0]==0) { TIFFErrorExt(tif->tif_clientdata,module,"Missing JPEG tables"); return...
1
[ "CWE-772" ]
libtiff
2ea32f7372b65c24b2816f11c04bf59b5090d05b
103,933,084,034,637,700,000,000,000,000,000,000,000
52
* libtiff/tif_ojpeg.c: fix leak in OJPEGReadHeaderInfoSecTablesQTable, OJPEGReadHeaderInfoSecTablesDcTable and OJPEGReadHeaderInfoSecTablesAcTable
ec_mod (gcry_mpi_t w, mpi_ec_t ec) { if (0 && ec->dialect == ECC_DIALECT_ED25519) _gcry_mpi_ec_ed25519_mod (w); else if (ec->t.p_barrett) _gcry_mpi_mod_barrett (w, w, ec->t.p_barrett); else _gcry_mpi_mod (w, w, ec->p); }
0
[ "CWE-200" ]
libgcrypt
88e1358962e902ff1cbec8d53ba3eee46407851a
296,707,817,773,660,070,000,000,000,000,000,000,000
9
ecc: Constant-time multiplication for Weierstrass curve. * mpi/ec.c (_gcry_mpi_ec_mul_point): Use simple left-to-right binary method for Weierstrass curve when SCALAR is secure.
mac_deinit (digest_hd_st * td, opaque * res, int ver) { if (ver == GNUTLS_SSL3) { /* SSL 3.0 */ _gnutls_mac_deinit_ssl3 (td, res); } else { _gnutls_hmac_deinit (td, res); } }
0
[ "CWE-310" ]
gnutls
422214868061370aeeb0ac9cd0f021a5c350a57d
116,336,546,439,375,760,000,000,000,000,000,000,000
11
better check decrypted data.
GIT_INLINE(int) checkout_conflicts_cmp_entry( const char *path, const git_index_entry *entry) { return strcmp((const char *)path, entry->path); }
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
269,454,795,789,655,160,000,000,000,000,000,000,000
6
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
static const struct submodule *cache_lookup_path(struct submodule_cache *cache, const unsigned char *gitmodules_sha1, const char *path) { struct submodule_entry *entry; unsigned int hash = hash_sha1_string(gitmodules_sha1, path); struct submodule_entry key; struct submodule key_config; hashcpy(key_config.gitmod...
0
[ "CWE-88" ]
git
f6adec4e329ef0e25e14c63b735a5956dc67b8bc
267,575,808,602,396,960,000,000,000,000,000,000,000
19
submodule-config: ban submodule urls that start with dash The previous commit taught the submodule code to invoke our "git clone $url $path" with a "--" separator so that we aren't confused by urls or paths that start with dashes. However, that's just one code path. It's not clear if there are others, and it would be...
static void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skb, u16 *opcode, u8 *status, hci_req_complete_t *req_complete, hci_req_complete_skb_t *req_complete_skb) { struct hci_ev_cmd_complete *ev = (void *) skb->data; *opcode = __le16_to_cpu(ev->opcode); *status = skb->data[sizeof(*ev)]...
0
[ "CWE-416" ]
linux
5c4c8c9544099bb9043a10a5318130a943e32fc3
195,125,705,776,564,900,000,000,000,000,000,000,000
380
Bluetooth: verify AMP hci_chan before amp_destroy hci_chan can be created in 2 places: hci_loglink_complete_evt() if it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory, Only AMP hci_chan should be removed by a call to hci_disconn_loglink_complete_evt(). However, the controller might mess up, call that fun...
bool Webm2Pes::ReadVideoFrame(const mkvparser::Block::Frame& mkvparser_frame, VideoFrame* frame) { if (mkvparser_frame.len < 1 || frame == nullptr) return false; const std::size_t mkv_len = static_cast<std::size_t>(mkvparser_frame.len); if (mkv_len > frame->buffer().capacity) { ...
0
[ "CWE-125" ]
libwebm
8e88e04b07352f2ca449278b44a2d8ec7631bdcf
156,660,530,655,070,980,000,000,000,000,000,000,000
19
webm2pes: Avoid OOB reads caused by invalid superframe index. BUG=webm:1492 Change-Id: Ibd5781731fe8f6fcdf5f1cc6e5807d17b3b92d4d
static void cbq_unlink_class(struct cbq_class *this) { struct cbq_class *cl, **clp; struct cbq_sched_data *q = qdisc_priv(this->qdisc); for (clp = &q->classes[cbq_hash(this->classid)]; (cl = *clp) != NULL; clp = &cl->next) { if (cl == this) { *clp = cl->next; cl->next = NULL; break; } } if (this->tp...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
315,359,679,301,913,140,000,000,000,000,000,000,000
33
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
dwg_color_method_name (unsigned m) { switch (m) { case 0xc0: return "ByLayer"; case 0xc1: return "ByBlock"; case 0xc2: return "entity (default)"; case 0xc3: return "Truecolor"; case 0xc5: return "Foreground"; case 0xc8: return "none"; default: return ""; } }
0
[ "CWE-787" ]
libredwg
ecf5183d8b3b286afe2a30021353b7116e0208dd
132,665,663,947,131,960,000,000,000,000,000,000,000
12
dwg_section_wtype: fix fuzzing overflow with illegal and overlong section names. Fixes GH #349, #352 section names cannot be longer than 24
static inline int page_cpupid_last(struct page *page) { return page->_last_cpupid; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
33,496,598,999,981,354,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
void Monitor::sync_reset_provider() { dout(10) << __func__ << dendl; sync_providers.clear(); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
108,320,418,571,502,240,000,000,000,000,000,000,000
5
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 ...
term_enter_normal_mode(void) { term_T *term = curbuf->b_term; set_terminal_mode(term, TRUE); /* Append the current terminal contents to the buffer. */ may_move_terminal_to_buffer(term, TRUE); /* Move the window cursor to the position of the cursor in the * terminal. */ curwin->w_cursor.l...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
116,165,627,752,452,540,000,000,000,000,000,000,000
20
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
int X509_check_ip(X509 *x, const unsigned char *chk, size_t chklen, unsigned int flags) { return do_x509_check(x, chk, chklen, flags, GEN_IPADD); }
0
[]
openssl
a70da5b3ecc3160368529677006801c58cb369db
166,905,041,610,130,700,000,000,000,000,000,000,000
5
New functions to check a hostname email or IP address against a certificate. Add options to s_client, s_server and x509 utilities to print results of checks.
if (ptr) { /* on Tcl interpreter */ is_tk_evloop_thread = (ptr->tk_thread_id == (Tcl_ThreadId) 0 || ptr->tk_thread_id == Tcl_GetCurrentThread()); } else {
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
141,863,867,428,739,270,000,000,000,000,000,000,000
5
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static inline int pmd_present(pmd_t pmd) { return pmd_flags(pmd) & _PAGE_PRESENT; }
1
[ "CWE-119", "CWE-787" ]
linux
027ef6c87853b0a9df53175063028edb4950d476
145,540,160,975,471,760,000,000,000,000,000,000,000
4
mm: thp: fix pmd_present for split_huge_page and PROT_NONE with THP In many places !pmd_present has been converted to pmd_none. For pmds that's equivalent and pmd_none is quicker so using pmd_none is better. However (unless we delete pmd_present) we should provide an accurate pmd_present too. This will avoid the ri...
static int ceph_x_verify_authorizer_reply(struct ceph_auth_client *ac, struct ceph_authorizer *a, size_t len) { struct ceph_x_authorizer *au = (void *)a; struct ceph_x_ticket_handler *th; int ret = 0; struct ceph_x_authorize_reply reply; void *p = au->reply_buf; void *end = p + sizeof(au->reply_buf); th ...
1
[ "CWE-399", "CWE-119" ]
linux
c27a3e4d667fdcad3db7b104f75659478e0c68d8
73,641,423,252,598,130,000,000,000,000,000,000,000
27
libceph: do not hard code max auth ticket len We hard code cephx auth ticket buffer size to 256 bytes. This isn't enough for any moderate setups and, in case tickets themselves are not encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S...
void unregister_memory_block_under_nodes(struct memory_block *mem_blk) { if (mem_blk->nid == NUMA_NO_NODE) return; sysfs_remove_link(&node_devices[mem_blk->nid]->dev.kobj, kobject_name(&mem_blk->dev.kobj)); sysfs_remove_link(&mem_blk->dev.kobj, kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
79,724,583,045,830,020,000,000,000,000,000,000,000
10
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
static int MP4_ReadBox_drms( stream_t *p_stream, MP4_Box_t *p_box ) { VLC_UNUSED(p_box); /* ATOMs 'user', 'key', 'iviv', and 'priv' will be skipped, * so unless data decrypt itself by magic, there will be no playback, * but we never know... */ msg_Warn( p_stream, "DRM protected streams are not sup...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
193,462,158,640,612,850,000,000,000,000,000,000,000
9
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
GF_Err adaf_box_dump(GF_Box *a, FILE * trace) { GF_AdobeDRMAUFormatBox *ptr = (GF_AdobeDRMAUFormatBox *)a; if (!a) return GF_BAD_PARAM; gf_isom_box_dump_start(a, "AdobeDRMAUFormatBox ", trace); gf_fprintf(trace, "SelectiveEncryption=\"%d\" IV_length=\"%d\">\n", ptr->selective_enc ? 1 : 0, ptr->IV_length); gf_isom_...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
103,521,888,349,565,850,000,000,000,000,000,000,000
9
fixed #2138
PHPAPI void var_push_dtor_no_addref(php_unserialize_data_t *var_hashx, zval *rval) { var_dtor_entries *var_hash = (*var_hashx)->last_dtor; #if VAR_ENTRIES_DBG fprintf(stderr, "var_push_dtor_no_addref(%ld): %d (%d)\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval), Z_REFCOUNT_PP(rval)); #endif if (!var_hash || ...
0
[]
php-src
d76b293ac71aa5bd4e9a433192afef6e0dd5a4ee
124,082,164,631,589,840,000,000,000,000,000,000,000
24
forgot to commit this one
TPMS_ENC_SCHEME_OAEP_Marshal(TPMS_ENC_SCHEME_OAEP *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPMS_SCHEME_HASH_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
222,337,128,035,369,980,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static void cswitch(JF, js_Ast *ref, js_Ast *head) { js_Ast *node, *clause, *def = NULL; int end; cexp(J, F, ref); /* emit an if-else chain of tests for the case clause expressions */ for (node = head; node; node = node->b) { clause = node->a; if (clause->type == STM_DEFAULT) { if (def) jsC_error(J, c...
0
[ "CWE-703", "CWE-787" ]
mujs
df8559e7bdbc6065276e786217eeee70f28fce66
268,109,525,889,184,280,000,000,000,000,000,000,000
42
Bug 704749: Clear jump list after patching jump addresses. Since we can emit a statement multiple times when compiling try/finally we have to use a new patch list for each instance.
hostkey_method_ssh_ed25519_init(LIBSSH2_SESSION * session, const unsigned char *hostkey_data, size_t hostkey_data_len, void **abstract) { const unsigned char *s; unsigned long len, key_len; libssh2_ed25519_ctx *c...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
271,445,407,490,327,580,000,000,000,000,000,000,000
40
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
static inline void set_trap_gate(unsigned int n, void *addr) { BUG_ON((unsigned)n > 0xFF); _set_gate(n, GATE_TRAP, addr, 0, 0, __KERNEL_CS); }
0
[ "CWE-119" ]
linux-2.6
5ac37f87ff18843aabab84cf75b2f8504c2d81fe
292,942,548,401,805,430,000,000,000,000,000,000,000
5
x86: fix ldt limit for 64 bit Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor. Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de> Signed-off-by: Ingo Molnar <mingo@elte.hu>
static void do_caselesscmp(compiler_common *common) { DEFINE_COMPILER; struct sljit_jump *jump; struct sljit_label *label; int char1_reg = STR_END; int char2_reg; int lcc_table; int opt_type = 0; if (sljit_get_register_index(TMP3) < 0) { char2_reg = STACK_TOP; lcc_table = STACK_LIMIT; } else { char2_reg = ...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
19,068,936,418,919,935,000,000,000,000,000,000,000
97
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
static INLINE BYTE* WRITEFGBGIMAGE(BYTE* pbDest, const BYTE* pbDestEnd, UINT32 rowDelta, BYTE bitmask, PIXEL fgPel, INT32 cBits) { PIXEL xorPixel; BYTE mask = 0x01; if (cBits > 8) return NULL; if (!ENSURE_CAPACITY(pbDest, pbDestEnd, cBits)) return NULL; UNROLL(cBits, { U...
0
[ "CWE-787" ]
FreeRDP
7b1d4b49391b4512402840431757703a96946820
33,896,117,140,269,404,000,000,000,000,000,000,000
27
Fix CVE-2020-11524: out of bounds access in interleaved Thanks to Sunglin and HuanGMz from Knownsec 404
void ScriptDlg(FontView *fv,CharView *cv) { GRect pos; static GWindow gw; GWindowAttrs wattrs; GGadgetCreateData gcd[12], boxes[5], *barray[4][8], *hvarray[4][2]; #if !defined(_NO_FFSCRIPT) && !defined(_NO_PYTHON) GGadgetCreateData *rarray[4]; #endif GTextInfo label[12]; struct sd_data sd; ...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
108,469,908,586,964,810,000,000,000,000,000,000,000
165
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
static int rx_alloc_submit(struct usbnet *dev, gfp_t flags) { struct urb *urb; int i; int ret = 0; /* don't refill the queue all at once */ for (i = 0; i < 10 && dev->rxq.qlen < RX_QLEN(dev); i++) { urb = usb_alloc_urb(0, flags); if (urb != NULL) { ret = rx_submit(dev, urb, flags); if (ret) goto e...
0
[ "CWE-703" ]
linux
1666984c8625b3db19a9abc298931d35ab7bc64b
318,161,748,478,540,560,000,000,000,000,000,000,000
21
usbnet: cleanup after bind() in probe() In case bind() works, but a later error forces bailing in probe() in error cases work and a timer may be scheduled. They must be killed. This fixes an error case related to the double free reported in http://www.spinics.net/lists/netdev/msg367669.html and needs to go on top of L...
static int is_fuse_usermount(struct libmnt_context *cxt, int *errsv) { struct libmnt_ns *ns_old; const char *type = mnt_fs_get_fstype(cxt->fs); const char *optstr; uid_t uid, entry_uid; *errsv = 0; if (!type) return 0; if (strcmp(type, "fuse") != 0 && strcmp(type, "fuseblk") != 0 && strncmp(type, ...
0
[ "CWE-552", "CWE-703" ]
util-linux
57202f5713afa2af20ffbb6ab5331481d0396f8d
183,698,717,299,577,400,000,000,000,000,000,000,000
41
libmount: fix UID check for FUSE umount [CVE-2021-3995] Improper UID check allows an unprivileged user to unmount FUSE filesystems of users with similar UID. Signed-off-by: Karel Zak <kzak@redhat.com>
static const char *CompositeOperatorToPSDBlendMode(CompositeOperator op) { const char *blend_mode; switch (op) { case ColorBurnCompositeOp: blend_mode = "idiv"; break; case ColorDodgeCompositeOp: blend_mode = "div "; break; case ColorizeCompositeOp: blend_mode = "colr"; break; case Dark...
0
[]
ImageMagick
bd9f1e7d1bd2c8e2cf7895d133c5c5b5cd3526b6
188,185,372,876,441,360,000,000,000,000,000,000,000
34
Fixed memory leak when reading incorrect PSD files
TORRENT_TEST(nodigit_int) { char b[] = "ie"; bdecode_node e; error_code ec; int pos; int ret = bdecode(b, b + sizeof(b)-1, e, ec, &pos); TEST_EQUAL(ret, -1); TEST_EQUAL(pos, 1); TEST_EQUAL(ec, error_code(bdecode_errors::expected_digit)); printf("%s\n", print_entry(e).c_str()); }
0
[ "CWE-125" ]
libtorrent
ec30a5e9ec703afb8abefba757c6d401303b53db
127,347,392,143,924,240,000,000,000,000,000,000,000
12
fix out-of-bounds read in bdecode Fixes #2099
static void suffix_object( cJSON *prev, cJSON *item ) { prev->next = item; item->prev = prev; }
1
[ "CWE-120", "CWE-119", "CWE-787" ]
iperf
91f2fa59e8ed80dfbf400add0164ee0e508e412a
137,729,386,219,910,040,000,000,000,000,000,000,000
5
Fix a buffer overflow / heap corruption issue that could occur if a malformed JSON string was passed on the control channel. This issue, present in the cJSON library, was already fixed upstream, so was addressed here in iperf3 by importing a newer version of cJSON (plus local ESnet modifications). Discovered and repo...
template<typename tz, typename tc> CImg<T>& draw_triangle(CImg<tz>& zbuffer, const int x0, const int y0, const float z0, const int x1, const int y1, const float z1, const int x2, const int y2, const float z2, ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
200,640,424,586,843,700,000,000,000,000,000,000,000
90
Fix other issues in 'CImg<T>::load_bmp()'.
rsvg_get_surface_of_node (RsvgDrawingCtx * ctx, RsvgNode * drawable, double w, double h) { return ctx->render->get_surface_of_node (ctx, drawable, w, h); }
0
[ "CWE-20" ]
librsvg
d83e426fff3f6d0fa6042d0930fb70357db24125
142,699,842,575,571,500,000,000,000,000,000,000,000
4
io: Use XML_PARSE_NONET We don't want to load resources off the net. Bug #691708.
static bool mtrr_lookup_okay(struct mtrr_iter *iter) { if (iter->fixed) { iter->mem_type = iter->mtrr_state->fixed_ranges[iter->index]; return true; } if (iter->range) { iter->mem_type = iter->range->base & 0xff; return true; } return false; }
0
[ "CWE-284" ]
linux
9842df62004f366b9fed2423e24df10542ee0dc5
124,638,362,083,420,820,000,000,000,000,000,000,000
14
KVM: MTRR: remove MSR 0x2f8 MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support was introduced by 9ba075a664df ("KVM: MTRR support"). 0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8, which made access to ...
XSetFontPath ( register Display *dpy, char **directories, int ndirs) { register int n = 0; register int i; register int nbytes; char *p; register xSetFontPathReq *req; int retCode; LockDisplay(dpy); GetReq (SetFontPath, req); req->nFonts = ndirs; for (i = 0; i < ndirs; i++) { n = (int) (...
1
[ "CWE-120" ]
libx11
8d2e02ae650f00c4a53deb625211a0527126c605
317,542,786,346,155,200,000,000,000,000,000,000,000
43
Reject string longer than USHRT_MAX before sending them on the wire The X protocol uses CARD16 values to represent the length so this would overflow. CVE-2021-31535 Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
static int io_sync_file_range(struct io_kiocb *req, struct io_kiocb **nxt, bool force_nonblock) { struct io_wq_work *work, *old_work; /* sync_file_range always requires a blocking context */ if (force_nonblock) { io_put_req(req); req->work.func = io_sync_file_range_finish; return -EAGAIN; } work =...
0
[]
linux
ff002b30181d30cdfbca316dadd099c3ca0d739c
211,243,543,104,593,400,000,000,000,000,000,000,000
18
io_uring: grab ->fs as part of async preparation This passes it in to io-wq, so it assumes the right fs_struct when executing async work that may need to do lookups. Cc: stable@vger.kernel.org # 5.3+ Signed-off-by: Jens Axboe <axboe@kernel.dk>
static bool check_list_constants(THD *thd, partition_info *part_info) { uint i, size_entries, num_column_values; uint list_index= 0; part_elem_value *list_value; bool result= TRUE; longlong type_add, calc_value; void *curr_value; void *UNINIT_VAR(prev_value); partition_element* part_def; bool found_nu...
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
46,861,245,375,042,900,000,000,000,000,000,000,000
152
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.
xfs_lookup_buffer_offset( struct page *page, loff_t *offset, unsigned int type) { loff_t lastoff = page_offset(page); bool found = false; struct buffer_head *bh, *head; bh = head = page_buffers(page); do { /* * Unwritten extents that have data in the page * cache covering them can be identified...
0
[ "CWE-284", "CWE-264" ]
linux
8d0207652cbe27d1f962050737848e5ad4671958
26,441,459,288,408,865,000,000,000,000,000,000,000
38
->splice_write() via ->write_iter() iter_file_splice_write() - a ->splice_write() instance that gathers the pipe buffers, builds a bio_vec-based iov_iter covering those and feeds it to ->write_iter(). A bunch of simple cases coverted to that... [AV: fixed the braino spotted by Cyrill] Signed-off-by: Al Viro <viro@z...
static ssize_t btrfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t offset, unsigned long nr_segs) { struct file *file = iocb->ki_filp; struct inode *inode = file->f_mapping->host; if (check_direct_IO(BTRFS_I(inode)->root, rw, iocb, iov, offset, nr_segs)) return 0; return __b...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
166,746,940,021,838,800,000,000,000,000,000,000,000
16
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
String *val_str(String *to) { return update_null() ? NULL : cached_time.to_string(to, decimals); }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
41,166,369,805,179,470,000,000,000,000,000,000,000
4
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
select_result(THD *thd_arg): select_result_sink(thd_arg) {}
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
286,775,916,717,153,670,000,000,000,000,000,000,000
1
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
nautilus_file_get_integer_metadata (NautilusFile *file, const char *key, int default_metadata) { g_return_val_if_fail (key != NULL, default_metadata); g_return_val_if_fail (key[0] != '\0', default_metadata); if (file == NULL) { return default_metadata; } g_return_val_if_fail (NAUTILUS...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
312,857,325,808,419,600,000,000,000,000,000,000,000
17
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
static inline struct hlist_head *dev_name_hash(const char *name) { unsigned hash = full_name_hash(name, strnlen(name, IFNAMSIZ)); return &dev_name_head[hash & ((1<<NETDEV_HASHBITS)-1)]; }
0
[]
linux
e89e9cf539a28df7d0eb1d0a545368e9920b34ac
102,764,522,929,530,100,000,000,000,000,000,000,000
5
[IPv4/IPv6]: UFO Scatter-gather approach Attached is kernel patch for UDP Fragmentation Offload (UFO) feature. 1. This patch incorporate the review comments by Jeff Garzik. 2. Renamed USO as UFO (UDP Fragmentation Offload) 3. udp sendfile support with UFO This patches uses scatter-gather feature of skb to generate l...
static void __net_exit netdev_exit(struct net *net) { kfree(net->dev_name_head); kfree(net->dev_index_head); }
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
101,126,651,703,504,910,000,000,000,000,000,000,000
5
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
boost::intrusive_ptr<Expression> ExpressionZip::optimize() { std::transform(_inputs.begin(), _inputs.end(), _inputs.begin(), [](intrusive_ptr<Expression> inputExpression) -> intrusive_ptr<Expression> { return inputExpression->optimize()...
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
223,159,447,019,498,080,000,000,000,000,000,000,000
17
SERVER-38070 fix infinite loop in agg expression
static int channel_request_pty(LIBSSH2_CHANNEL *channel, const char *term, unsigned int term_len, const char *modes, unsigned int modes_len, int width, int height, int width_px, int height_px) { ...
1
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
57,993,784,318,157,880,000,000,000,000,000,000,000
96
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
int ssl3_get_new_session_ticket(SSL *s) { int ok,al,ret=0, ticklen; long n; const unsigned char *p; unsigned char *d; n=s->method->ssl_get_message(s, SSL3_ST_CR_SESSION_TICKET_A, SSL3_ST_CR_SESSION_TICKET_B, SSL3_MT_NEWSESSION_TICKET, 16384, &ok); if (!ok) return((int)n); if (n < 6) { /* need...
0
[ "CWE-310" ]
openssl
ce325c60c74b0fa784f5872404b722e120e5cab0
30,479,495,650,680,650,000,000,000,000,000,000,000
77
Only allow ephemeral RSA keys in export ciphersuites. OpenSSL clients would tolerate temporary RSA keys in non-export ciphersuites. It also had an option SSL_OP_EPHEMERAL_RSA which enabled this server side. Remove both options as they are a protocol violation. Thanks to Karthikeyan Bhargavan for reporting this issue....
void cpu_physical_memory_rw(hwaddr addr, uint8_t *buf, int len, int is_write) { address_space_rw(&address_space_memory, addr, buf, len, is_write); }
0
[]
qemu
c3c1bb99d1c11978d9ce94d1bdcf0705378c1459
274,039,214,652,393,550,000,000,000,000,000,000,000
5
exec: Respect as_tranlsate_internal length clamp address_space_translate_internal will clamp the *plen length argument based on the size of the memory region being queried. The iommu walker logic in addresss_space_translate was ignoring this by discarding the post fn call value of *plen. Fix by just always using *plen...
void rfcomm_cleanup_ttys(void) { tty_unregister_driver(rfcomm_tty_driver); put_tty_driver(rfcomm_tty_driver); }
0
[ "CWE-200" ]
linux
f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a
35,649,248,446,247,350,000,000,000,000,000,000,000
5
Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST) The RFCOMM code fails to initialize the two padding bytes of struct rfcomm_dev_list_req inserted for alignment before copying it to userland. Additionally there are two padding bytes in each instance of struct rfcomm_dev_info. The ioctl() that for disclosure...