func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static Node *GetCDATA( TidyDocImpl* doc, Node *container )
{
Lexer* lexer = doc->lexer;
uint start = 0;
int nested = 0;
CDATAState state = CDATA_INTERMEDIATE;
uint i;
Bool isEmpty = yes;
Bool matches = no;
uint c;
Bool hasSrc = TY_(AttrGetById)(container, TidyAttr_SRC) != NULL;
... | 0 | [
"CWE-119"
] | tidy-html5 | c18f27a58792f7fbd0b30a0ff50d6b40a82f940d | 226,920,318,769,718,550,000,000,000,000,000,000,000 | 175 | Issue #217 - avoid len going negative, ever... |
struct sk_buff *skb_segment(struct sk_buff *head_skb,
netdev_features_t features)
{
struct sk_buff *segs = NULL;
struct sk_buff *tail = NULL;
struct sk_buff *list_skb = skb_shinfo(head_skb)->frag_list;
skb_frag_t *frag = skb_shinfo(head_skb)->frags;
unsigned int mss = skb_shinfo(head_skb)->gso_size;
unsign... | 0 | [
"CWE-416"
] | net | 36d5fe6a000790f56039afe26834265db0a3ad4c | 20,811,249,040,694,270,000,000,000,000,000,000,000 | 202 | core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors
skb_zerocopy can copy elements of the frags array between skbs, but it doesn't
orphan them. Also, it doesn't handle errors, so this patch takes care of that
as well, and modify the callers accordingly. skb_tx_error() is also added to
the caller... |
static inline bool skip_blocked_update(struct sched_entity *se)
{
struct cfs_rq *gcfs_rq = group_cfs_rq(se);
/*
* If sched_entity still have not zero load or utilization, we have to
* decay it:
*/
if (se->avg.load_avg || se->avg.util_avg)
return false;
/*
* If there is a pending propagation, we have to ... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 266,330,265,376,606,350,000,000,000,000,000,000,000 | 25 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
static NORETURN void die_initial_contact(int unexpected)
{
/*
* A hang-up after seeing some response from the other end
* means that it is unexpected, as we know the other end is
* willing to talk to us. A hang-up before seeing any
* response does not necessarily mean an ACL problem, though.
*/
if (unexpec... | 0 | [] | git | a02ea577174ab8ed18f847cf1693f213e0b9c473 | 339,987,034,426,028,160,000,000,000,000,000,000,000 | 15 | git_connect_git(): forbid newlines in host and path
When we connect to a git:// server, we send an initial request that
looks something like:
002dgit-upload-pack repo.git\0host=example.com
If the repo path contains a newline, then it's included literally, and
we get:
002egit-upload-pack repo
.git\0host=exampl... |
NOEXPORT char **arg_alloc(char *str) {
size_t max_arg, i;
char **tmp, **retval;
max_arg=strlen(str)/2+1;
tmp=str_alloc((max_arg+1)*sizeof(char *));
i=0;
while(*str && i<max_arg) {
tmp[i++]=str;
while(*str && !isspace((unsigned char)*str))
++str;
while(*str &... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 279,037,601,067,551,200,000,000,000,000,000,000,000 | 21 | stunnel-5.57 |
static int selinux_syslog(int type)
{
int rc;
switch (type) {
case SYSLOG_ACTION_READ_ALL: /* Read last kernel messages */
case SYSLOG_ACTION_SIZE_BUFFER: /* Return size of the log buffer */
rc = task_has_system(current, SYSTEM__SYSLOG_READ);
break;
case SYSLOG_ACTION_CONSOLE_OFF: /* Disable logging to consol... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 325,801,003,644,199,170,000,000,000,000,000,000,000 | 26 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
vfs_kern_mount(struct file_system_type *type, int flags, const char *name, void *data)
{
struct mount *mnt;
struct dentry *root;
if (!type)
return ERR_PTR(-ENODEV);
mnt = alloc_vfsmnt(name);
if (!mnt)
return ERR_PTR(-ENOMEM);
if (flags & MS_KERNMOUNT)
mnt->mnt.mnt_flags = MNT_INTERNAL;
root = mount_fs(... | 0 | [
"CWE-269"
] | user-namespace | a6138db815df5ee542d848318e5dae681590fccd | 190,380,735,822,315,260,000,000,000,000,000,000,000 | 31 | mnt: Only change user settable mount flags in remount
Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
read-only bind mount read-only in a user namespace the
MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
to the remount a read-only mount read-write.
Correct this by replacing t... |
fr_window_clipboard_remove_file_list (FrWindow *window,
GList *file_list)
{
GList *scan1;
if (window->priv->copy_data == NULL)
return;
if (file_list == NULL) {
fr_clipboard_data_unref (window->priv->copy_data);
window->priv->copy_data = NULL;
return;
}
for (scan1 = file_list; scan1; scan1 ... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 177,717,602,798,435,340,000,000,000,000,000,000,000 | 39 | libarchive: sanitize filenames before extracting |
_XimReconnectModeSetAttr(
Xim im)
{
XimDefIMValues im_values;
if(!_XimSetIMResourceList(&im->core.im_resources,
&im->core.im_num_resources)) {
return False;
}
if(!_XimSetICResourceList(&im->core.ic_resources,
&im->core.ic_num_resources)) {
return False;
}
_XimSetIMMode(im... | 0 | [
"CWE-190"
] | libx11 | 1a566c9e00e5f35c1f9e7f3d741a02e5170852b2 | 133,990,162,655,866,770,000,000,000,000,000,000,000 | 24 | Zero out buffers in functions
It looks like uninitialized stack or heap memory can leak
out via padding bytes.
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Matthieu Herrb <matthieu@herrb.eu> |
static __init int svm_hardware_setup(void)
{
int cpu;
struct page *iopm_pages;
void *iopm_va;
int r;
unsigned int order = get_order(IOPM_SIZE);
/*
* NX is required for shadow paging and for NPT if the NX huge pages
* mitigation is enabled.
*/
if (!boot_cpu_has(X86_FEATURE_NX)) {
pr_err_ratelimited("NX (... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 277,146,174,824,683,340,000,000,000,000,000,000,000 | 138 | 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... |
void md_super_write(struct mddev *mddev, struct md_rdev *rdev,
sector_t sector, int size, struct page *page)
{
/* write first size bytes of page to sector of rdev
* Increment mddev->pending_writes before returning
* and decrement it on completion, waking up sb_wait
* if zero is reached.
* If an error occu... | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 111,735,645,301,287,130,000,000,000,000,000,000,000 | 20 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
static void wsgi_release_interpreter(InterpreterObject *handle)
{
PyThreadState *tstate = NULL;
PyGILState_STATE state;
/*
* Need to release and destroy the thread state that
* was created against the interpreter. This will
* release the GIL. Note that it should be safe to
* always ass... | 0 | [
"CWE-264"
] | mod_wsgi | d9d5fea585b23991f76532a9b07de7fcd3b649f4 | 295,787,232,959,052,700,000,000,000,000,000,000,000 | 37 | Local privilege escalation when using daemon mode. (CVE-2014-0240) |
static int cert_crl(X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x)
{
int ok;
X509_REVOKED *rev;
/*
* The rules changed for this... previously if a CRL contained unhandled
* critical extensions it could still be used to indicate a certificate
* was revoked. This has since been changed since crit... | 0 | [
"CWE-119"
] | openssl | 370ac320301e28bb615cee80124c042649c95d14 | 264,138,968,692,458,900,000,000,000,000,000,000,000 | 32 | 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> |
Item *Item_string::safe_charset_converter(CHARSET_INFO *tocs)
{
Item_string *conv;
uint conv_errors;
char *ptr;
String tmp, cstr, *ostr= val_str(&tmp);
cstr.copy(ostr->ptr(), ostr->length(), ostr->charset(), tocs, &conv_errors);
if (conv_errors || !(conv= new Item_string(cstr.ptr(), cstr.length(),
... | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 129,156,241,620,373,600,000,000,000,000,000,000,000 | 26 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
NOEXPORT void psk_free(PSK_KEYS *head) {
while(head) {
PSK_KEYS *next=head->next;
str_free(head->identity);
str_free(head->key_val);
str_free(head);
head=next;
}
} | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 272,751,726,323,188,070,000,000,000,000,000,000,000 | 9 | stunnel-5.57 |
pci_emul_diow(struct vmctx *ctx, int vcpu, struct pci_vdev *dev, int baridx,
uint64_t offset, int size, uint64_t value)
{
int i;
void *offset_ptr;
struct pci_emul_dummy *dummy = dev->arg;
if (baridx == 0) {
if (offset + size > DIOSZ) {
printf("diow: iow too large, offset %ld size %d\n",
offse... | 0 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 6199e653418eda58cd698d8769820904453e2535 | 323,277,101,084,750,050,000,000,000,000,000,000,000 | 65 | dm: validate the input in 'pci_emul_mem_handler()'
checking the inputs explicitly instead of using Assert.
Tracked-On: #4003
Signed-off-by: Yonghua Huang <yonghua.huang@intel.com>
Reviewed-by: Shuo Liu <shuo.a.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com> |
static int _crypt_format_integrity(struct crypt_device *cd,
const char *uuid,
struct crypt_params_integrity *params)
{
int r;
uint32_t integrity_tag_size;
char *integrity = NULL, *journal_integrity = NULL, *journal_crypt = NULL;
struct volume_key *journal_crypt_key = NULL, *journal_mac_key = NULL;
i... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 198,260,043,276,526,130,000,000,000,000,000,000,000 | 98 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
int xfrm_policy_insert(int dir, struct xfrm_policy *policy, int excl)
{
struct net *net = xp_net(policy);
struct xfrm_policy *pol;
struct xfrm_policy *delpol;
struct hlist_head *chain;
struct hlist_node *newpos;
spin_lock_bh(&net->xfrm.xfrm_policy_lock);
chain = policy_hash_bysel(net, &policy->selector, policy-... | 0 | [
"CWE-125"
] | ipsec | 7bab09631c2a303f87a7eb7e3d69e888673b9b7e | 195,545,179,742,199,070,000,000,000,000,000,000,000 | 64 | xfrm: policy: check policy direction value
The 'dir' parameter in xfrm_migrate() is a user-controlled byte which is used
as an array index. This can lead to an out-of-bound access, kernel lockup and
DoS. Add a check for the 'dir' value.
This fixes CVE-2017-11600.
References: https://bugzilla.redhat.com/show_bug.cgi?... |
expectation_remove(struct hmap *alg_expectations,
const struct conn_key *key, uint32_t basis)
{
struct alg_exp_node *alg_exp_node;
HMAP_FOR_EACH_WITH_HASH (alg_exp_node, node, conn_key_hash(key, basis),
alg_expectations) {
if (!conn_key_cmp(&alg_exp_node-... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 252,352,134,158,193,870,000,000,000,000,000,000,000 | 13 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
calc_ntlm2_session_response (const char *nonce,
guchar nt_hash[21],
guchar lm_hash[21],
guchar *lm_resp,
gsize lm_resp_sz,
guchar *nt_resp)
{
guint32 client_nonce[2];
guchar ntlmv2_hash[16];
GChecksum *ntlmv2_cksum;
gsize ntlmv2_hash_sz = sizeof (ntlmv... | 0 | [
"CWE-125"
] | libsoup | f8a54ac85eec2008c85393f331cdd251af8266ad | 235,873,131,657,708,200,000,000,000,000,000,000,000 | 31 | NTLM: Avoid a potential heap buffer overflow in v2 authentication
Check the length of the decoded v2 challenge before attempting to
parse it, to avoid reading past it.
Fixes #173 |
void Item_singlerow_subselect::bring_value()
{
if (!exec() && assigned())
{
null_value= true;
for (uint i= 0; i < max_columns ; i++)
{
if (!row[i]->null_value)
{
null_value= false;
return;
}
}
}
else
reset();
} | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 95,954,075,631,129,400,000,000,000,000,000,000,000 | 17 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
static int oidc_authenticate_user(request_rec *r, oidc_cfg *c,
oidc_provider_t *provider, const char *original_url,
const char *login_hint, const char *id_token_hint, const char *prompt,
const char *auth_request_params, const char *path_scope) {
oidc_debug(r, "enter");
if (provider == NULL) {
// TODO: shou... | 0 | [
"CWE-601"
] | mod_auth_openidc | 03e6bfb446f4e3f27c003d30d6a433e5dd8e2b3d | 292,619,035,342,954,120,000,000,000,000,000,000,000 | 123 | apply OIDCRedirectURLsAllowed setting to target_link_uri
closes #672; thanks @Meheni
release 2.4.9.4
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
size_t size() const override { return HeaderMapImpl::size(); } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 172,286,107,370,094,170,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
receive_packet (struct net_device *dev)
{
struct netdev_private *np = netdev_priv(dev);
int entry = np->cur_rx % RX_RING_SIZE;
int cnt = 30;
/* If RFDDone, FrameStart and FrameEnd set, there is a new packet in. */
while (1) {
struct netdev_desc *desc = &np->rx_ring[entry];
int pkt_len;
u64 frame_status;
... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 1bb57e940e1958e40d51f2078f50c3a96a9b2d75 | 134,598,806,674,548,900,000,000,000,000,000,000,000 | 102 | dl2k: Clean up rio_ioctl
The dl2k driver's rio_ioctl call has a few issues:
- No permissions checking
- Implements SIOCGMIIREG and SIOCGMIIREG using the SIOCDEVPRIVATE numbers
- Has a few ioctls that may have been used for debugging at one point
but have no place in the kernel proper.
This patch removes all but the... |
void HeaderMapImpl::iterateReverse(HeaderMap::ConstIterateCb cb) const {
for (auto it = headers_.rbegin(); it != headers_.rend(); it++) {
if (cb(*it) == HeaderMap::Iterate::Break) {
break;
}
}
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 304,057,274,806,890,670,000,000,000,000,000,000,000 | 7 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static int sctp_apply_peer_addr_params(struct sctp_paddrparams *params,
struct sctp_transport *trans,
struct sctp_association *asoc,
struct sctp_sock *sp,
int hb_change,
int pmtud_change,
int ... | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 8,581,181,332,241,378,000,000,000,000,000,000,000 | 188 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
void gnutls_global_set_time_function(gnutls_time_func time_func)
{
gnutls_time = time_func;
} | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 98,480,831,396,525,880,000,000,000,000,000,000,000 | 4 | env: use secure_getenv when reading environment variables |
void AES::ProcessAndXorBlock(const byte* in, const byte* xOr, byte* out) const
{
if (dir_ == ENCRYPTION)
encrypt(in, xOr, out);
else
decrypt(in, xOr, out);
} | 0 | [] | mysql-server | 5c6169fb309981b564a17bee31b367a18866d674 | 181,417,052,488,495,560,000,000,000,000,000,000,000 | 7 | Bug #24740291: YASSL UPDATE TO 2.4.2 |
get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
{
/* This is the X/Open sanctioned signal stack switching. */
if (ka->sa.sa_flags & SA_ONSTACK) {
if (sas_ss_flags(sp) == 0)
sp = current->sas_ss_sp + current->sas_ss_size;
}
return (void __user *)((sp - frame_size) & -8ul);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 146,322,814,853,405,460,000,000,000,000,000,000,000 | 10 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static php_ldap_bictx *_php_sasl_setdefs(LDAP *ld, char *sasl_mech, char *sasl_realm, char *sasl_authc_id, char *passwd, char *sasl_authz_id)
{
php_ldap_bictx *ctx;
ctx = ber_memalloc(sizeof(php_ldap_bictx));
ctx->mech = (sasl_mech) ? ber_strdup(sasl_mech) : NULL;
ctx->realm = (sasl_realm) ? ber_strdup(sasl_r... | 0 | [
"CWE-476"
] | php-src | 49782c54994ecca2ef2a061063bd5a7079c43527 | 43,172,545,239,012,590,000,000,000,000,000,000,000 | 26 | Fix bug #76248 - Malicious LDAP-Server Response causes Crash |
static Bool PrintHelpArg(char *arg_name, u32 search_type, GF_FilterSession *fs)
{
char szDesc[100];
Bool first=GF_TRUE;
GF_GPACArg an_arg;
u32 i, count;
u32 res = 0;
u32 alen = (u32) strlen(arg_name);
res += PrintHelpForArgs(arg_name, m4b_gen_args, NULL, search_type, "general");
res += PrintHelpForArgs(arg_name... | 0 | [
"CWE-787"
] | gpac | 4e56ad72ac1afb4e049a10f2d99e7512d7141f9d | 115,647,702,609,720,000,000,000,000,000,000,000,000 | 99 | fixed #2216 |
void streamNextID(streamID *last_id, streamID *new_id) {
uint64_t ms = mstime();
if (ms > last_id->ms) {
new_id->ms = ms;
new_id->seq = 0;
} else {
*new_id = *last_id;
streamIncrID(new_id);
}
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 22,368,770,607,957,636,000,000,000,000,000,000,000 | 10 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
generate_auth(Key *key, const unsigned char *data, int data_len,
unsigned char *auth, int auth_len)
{
switch (key->class) {
case NTP_MAC:
return HSH_Hash(key->data.ntp_mac.hash_id, key->data.ntp_mac.value,
key->data.ntp_mac.length, data, data_len, auth, auth_len);
cas... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 287,657,318,921,900,700,000,000,000,000,000,000,000 | 13 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
Perl_croak_sv(pTHX_ SV *baseex)
{
SV *ex = with_queued_errors(mess_sv(baseex, 0));
PERL_ARGS_ASSERT_CROAK_SV;
invoke_exception_hook(ex, FALSE);
die_unwind(ex);
} | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 200,552,455,162,701,400,000,000,000,000,000,000,000 | 7 | Perl_my_setenv(); handle integer wrap
RT #133204
Wean this function off int/I32 and onto UV/Size_t.
Also, replace all malloc-ish calls with a wrapper that does
overflow checks,
In particular, it was doing (nlen + vlen + 2) which could wrap when
the combined length of the environment variable name and value
exceeded ... |
SecureElementStatus_t SecureElementSetDevEui( uint8_t* devEui )
{
if( devEui == NULL )
{
return SECURE_ELEMENT_ERROR_NPE;
}
memcpy1( SeNvmCtx.DevEui, devEui, SE_EUI_SIZE );
SeNvmCtxChanged( );
return SECURE_ELEMENT_SUCCESS;
} | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 116,802,333,378,743,010,000,000,000,000,000,000,000 | 10 | Added received buffer size checks. |
MYSQL *mysql_connect_ssl_check(MYSQL *mysql_arg, const char *host,
const char *user, const char *passwd,
const char *db, uint port,
const char *unix_socket, ulong client_flag,
my_bool ssl_required... | 1 | [
"CWE-319"
] | mysql-server | 0002e1380d5f8c113b6bce91f2cf3f75136fd7c7 | 196,364,607,586,004,220,000,000,000,000,000,000,000 | 22 | BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.
(cherry picked from commit f91b941842d240b8a62645e507f5554e8be76aec) |
void bnx2x__link_status_update(struct bnx2x *bp)
{
if (bp->state != BNX2X_STATE_OPEN)
return;
/* read updated dcb configuration */
if (IS_PF(bp)) {
bnx2x_dcbx_pmf_update(bp);
bnx2x_link_status_update(&bp->link_params, &bp->link_vars);
if (bp->link_vars.link_up)
bnx2x_stats_handle(bp, STATS_EVENT_LINK_UP)... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 118,825,510,288,973,460,000,000,000,000,000,000,000 | 58 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
longlong Item_ref::val_time_packed()
{
DBUG_ASSERT(fixed);
longlong tmp= (*ref)->val_time_packed_result();
null_value= (*ref)->null_value;
return tmp;
} | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 295,217,020,738,564,880,000,000,000,000,000,000,000 | 7 | 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. |
save_pipeline (clear)
int clear;
{
sigset_t set, oset;
struct pipeline_saver *saver;
BLOCK_CHILD (set, oset);
saver = alloc_pipeline_saver ();
saver->pipeline = the_pipeline;
saver->next = saved_pipeline;
saved_pipeline = saver;
if (clear)
the_pipeline = (PROCESS *)NULL;
saved_already_making... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 261,729,909,885,822,370,000,000,000,000,000,000,000 | 16 | bash-4.4-rc2 release |
check_pidfile(void)
{
const char *pidfile = CNF_GetPidFile();
FILE *in;
int pid, count;
in = fopen(pidfile, "r");
if (!in)
return;
count = fscanf(in, "%d", &pid);
fclose(in);
if (count != 1)
return;
if (getsid(pid) < 0)
return;
LOG_FATAL("Another chronyd may already be running (... | 1 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 209,572,017,262,673,180,000,000,000,000,000,000,000 | 22 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
int isolate_movable_page(struct page *page, isolate_mode_t mode)
{
struct address_space *mapping;
/*
* Avoid burning cycles with pages that are yet under __free_pages(),
* or just got freed under us.
*
* In case we 'win' a race for a movable page being freed under us and
* raise its refcount preventing __f... | 0 | [
"CWE-200"
] | linux | 197e7e521384a23b9e585178f3f11c9fa08274b9 | 47,332,977,516,846,260,000,000,000,000,000,000,000 | 60 | Sanitize 'move_pages()' permission checks
The 'move_paghes()' system call was introduced long long ago with the
same permission checks as for sending a signal (except using
CAP_SYS_NICE instead of CAP_SYS_KILL for the overriding capability).
That turns out to not be a great choice - while the system call really
only ... |
static inline int is_loop_device(struct file *file)
{
struct inode *i = file->f_mapping->host;
return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 118,048,171,349,955,020,000,000,000,000,000,000,000 | 6 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
int rdma_addr_size_in6(struct sockaddr_in6 *addr)
{
int ret = rdma_addr_size((struct sockaddr *) addr);
return ret <= sizeof(*addr) ? ret : 0;
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 176,825,042,939,121,300,000,000,000,000,000,000,000 | 6 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
RSAEP(
TPM2B *dInOut, // IN: size of the encrypted block and the size of
// the encrypted value. It must be the size of
// the modulus.
// OUT: the encrypted data. Will receive the
// decrypted value
OBJECT *key // IN: the key to use
)
... | 0 | [
"CWE-787"
] | libtpms | 505ef841c00b4c096b1977c667cb957bec3a1d8b | 337,737,057,415,839,680,000,000,000,000,000,000,000 | 22 | tpm2: Fix output buffer parameter and size for RSA decyrption
For the RSA decryption we have to use an output buffer of the size of the
(largest possible) RSA key for the decryption to always work.
This fixes a stack corruption bug that caused a SIGBUS and termination of
'swtpm'.
Signed-off-by: Stefan Berger <stefan... |
static int jpc_pi_nextlrcp(register jpc_pi_t *pi)
{
jpc_pchg_t *pchg;
int *prclyrno;
pchg = pi->pchg;
if (!pi->prgvolfirst) {
prclyrno = &pi->pirlvl->prclyrnos[pi->prcno];
goto skip;
} else {
pi->prgvolfirst = false;
}
for (pi->lyrno = 0; pi->lyrno < pi->numlyrs && pi->lyrno <
JAS_CAST(int, pchg->lyrn... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 107,577,678,005,805,340,000,000,000,000,000,000,000 | 42 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
static inline int get_byte(LZOContext *c)
{
if (c->in < c->in_end)
return *c->in++;
c->error |= AV_LZO_INPUT_DEPLETED;
return 1;
} | 0 | [
"CWE-190"
] | FFmpeg | d6af26c55c1ea30f85a7d9edbc373f53be1743ee | 46,420,697,258,533,440,000,000,000,000,000,000,000 | 7 | avutil/lzo: Fix integer overflow
Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)
Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
Account_options() { } | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 335,056,557,604,353,770,000,000,000,000,000,000,000 | 1 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
static void Ins_IP( INS_ARG )
{
TT_F26Dot6 org_a, org_b, org_x,
cur_a, cur_b, cur_x,
distance;
Int point;
(void)args;
if ( CUR.top < CUR.GS.loop ||
BOUNDS(CUR.GS.rp1, CUR.zp0.n_points) ||
BOUNDS(CUR.GS.rp2, CUR.zp1.n_points))
{
C... | 0 | [
"CWE-416"
] | ghostpdl | 98f6da60b9d463c617e631fc254cf6d66f2e8e3c | 184,923,160,759,769,100,000,000,000,000,000,000,000 | 71 | Bug 698026: bounds check zone pointers in Ins_IP() |
videobuf_vm_open(struct vm_area_struct *vma)
{
struct videobuf_mapping *map = vma->vm_private_data;
dprintk(2,"vm_open %p [count=%d,vma=%08lx-%08lx]\n",map,
map->count,vma->vm_start,vma->vm_end);
map->count++;
} | 1 | [
"CWE-119",
"CWE-787"
] | linux | 0b29669c065f60501e7289e1950fa2a618962358 | 198,627,285,198,280,800,000,000,000,000,000,000,000 | 9 | V4L/DVB (6751): V4L: Memory leak! Fix count in videobuf-vmalloc mmap
This is pretty serious bug. map->count is never initialized after the
call to kmalloc making the count start at some random trash value. The
end result is leaking videobufs.
Also, fix up the debug statements to print unsigned values.
Pushed to h... |
_gnutls_recv_handshake(gnutls_session_t session,
gnutls_handshake_description_t type,
unsigned int optional, gnutls_buffer_st * buf)
{
int ret, ret2;
handshake_buffer_st hsk;
ret = _gnutls_handshake_io_recv_int(session, type, &hsk, optional);
if (ret < 0) {
if (optional != 0
&& ret == GNU... | 0 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 257,082,396,676,602,570,000,000,000,000,000,000,000 | 116 | 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. |
rl_restore_prompt ()
{
FREE (local_prompt);
FREE (local_prompt_prefix);
local_prompt = saved_local_prompt;
local_prompt_prefix = saved_local_prefix;
local_prompt_len = saved_local_length;
prompt_prefix_length = saved_prefix_length;
prompt_last_invisible = saved_last_invisible;
prompt_visible_length = s... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 180,557,867,207,032,800,000,000,000,000,000,000,000 | 20 | bash-4.4-rc2 release |
ofputil_frag_handling_to_string(enum ofputil_frag_handling frag)
{
switch (frag) {
case OFPUTIL_FRAG_NORMAL: return "normal";
case OFPUTIL_FRAG_DROP: return "drop";
case OFPUTIL_FRAG_REASM: return "reassemble";
case OFPUTIL_FRAG_NX_MATCH: return "nx-match";
}
OVS_NOT_REACHED();
} | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 332,994,737,582,714,860,000,000,000,000,000,000,000 | 11 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
int smb_vfs_call_sys_acl_delete_def_file(struct vfs_handle_struct *handle,
const char *path)
{
VFS_FIND(sys_acl_delete_def_file);
return handle->fns->sys_acl_delete_def_file(handle, path);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 328,003,696,991,338,240,000,000,000,000,000,000,000 | 6 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
uint32_t GPMF_PayloadSampleCount(GPMF_stream *ms)
{
uint32_t count = 0;
if (ms)
{
uint32_t fourcc = GPMF_Key(ms);
GPMF_stream find_stream;
GPMF_CopyState(ms, &find_stream);
if (GPMF_OK == GPMF_FindNext(&find_stream, fourcc, GPMF_CURRENT_LEVEL)) // Count the instances, not the repeats
{
count=2;
whi... | 0 | [
"CWE-125",
"CWE-369",
"CWE-787"
] | gpmf-parser | 341f12cd5b97ab419e53853ca00176457c9f1681 | 5,643,964,417,229,794,000,000,000,000,000,000,000 | 25 | fixed many security issues with the too crude mp4 reader |
tiff_document_load (EvDocument *document,
const char *uri,
GError **error)
{
TiffDocument *tiff_document = TIFF_DOCUMENT (document);
gchar *filename;
TIFF *tiff;
filename = g_filename_from_uri (uri, NULL, error);
if (!filename)
return FALSE;
push_handlers ();
#ifdef G_OS_WIN32
{
wchar_t ... | 0 | [
"CWE-754"
] | evince | 234f034a4d15cd46dd556f4945f99fbd57ef5f15 | 192,803,378,438,024,800,000,000,000,000,000,000,000 | 56 | tiff: Handle failure from TIFFReadRGBAImageOriented
The TIFFReadRGBAImageOriented function returns zero if it was unable to
read the image. Return NULL in this case instead of displaying
uninitialized memory.
Fixes #1129 |
dns_message_logpacket2(dns_message_t *message,
const char *description, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module,
int level, isc_mem_t *mctx)
{
REQUIRE(address != NULL);
logfmtpacket(message, description, address, category, module,
&dns_master_st... | 0 | [
"CWE-617"
] | bind9 | 6ed167ad0a647dff20c8cb08c944a7967df2d415 | 137,949,887,581,276,380,000,000,000,000,000,000,000 | 10 | Always keep a copy of the message
this allows it to be available even when dns_message_parse()
returns a error. |
void timing_operation_complete( char operation ) {
#ifndef _WIN32
if (g_use_seccomp) {
return;
}
dev_assert(current_operation == operation);
#ifdef _WIN32
current_operation_end = clock();
if (timing_log) {
double begin_to_end = (current_operation_end - current_operation_begin) / (dou... | 0 | [
"CWE-399",
"CWE-190"
] | lepton | 6a5ceefac1162783fffd9506a3de39c85c725761 | 203,189,438,256,241,500,000,000,000,000,000,000,000 | 40 | fix #111 |
static void io_req_task_work_add_fallback(struct io_kiocb *req,
task_work_func_t cb)
{
init_task_work(&req->task_work, cb);
io_task_work_add_head(&req->ctx->exit_task_work, &req->task_work);
} | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 237,930,129,557,357,050,000,000,000,000,000,000,000 | 6 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static void update_numa_stats(struct numa_stats *ns, int nid)
{
int cpu;
memset(ns, 0, sizeof(*ns));
for_each_cpu(cpu, cpumask_of_node(nid)) {
struct rq *rq = cpu_rq(cpu);
ns->load += weighted_cpuload(rq);
ns->compute_capacity += capacity_of(cpu);
}
} | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 240,738,321,769,221,000,000,000,000,000,000,000,000 | 13 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
static const char *pp_getenv(const Token *t, bool warn)
{
const char *txt = tok_text(t);
const char *v;
char *buf = NULL;
bool is_string = false;
if (!t)
return NULL;
switch (t->type) {
case TOK_ENVIRON:
txt += 2; /* Skip leading %! */
is_string = nasm_isquote(*txt);
break;
case ... | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 209,393,811,786,470,850,000,000,000,000,000,000,000 | 57 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
int RGWPutObjProcessor_Multipart::prepare(RGWRados *store, string *oid_rand)
{
string oid = obj_str;
upload_id = s->info.args.get("uploadId");
if (!oid_rand) {
mp.init(oid, upload_id);
} else {
mp.init(oid, upload_id, *oid_rand);
}
part_num = s->info.args.get("partNumber");
if (part_num.empty()) ... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 323,832,356,279,543,960,000,000,000,000,000,000,000 | 55 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static void _parse_resource_directory(struct PE_(r_bin_pe_obj_t) *bin, Pe_image_resource_directory *dir, ut64 offDir, int type, int id, SdbHash *dirs) {
int index = 0;
ut32 totalRes = dir->NumberOfNamedEntries + dir->NumberOfIdEntries;
ut64 rsrc_base = bin->resource_directory_offset;
ut64 off;
if (totalRes > R_PE_... | 0 | [
"CWE-125"
] | radare2 | 4e1cf0d3e6f6fe2552a269def0af1cd2403e266c | 301,570,503,979,180,900,000,000,000,000,000,000,000 | 104 | Fix crash in pe |
static int is_fullwidth(int c)
{
int i;
if (c < mbfl_eaw_table[0].begin) {
return 0;
}
for (i = 0; i < sizeof(mbfl_eaw_table) / sizeof(mbfl_eaw_table[0]); i++) {
if (mbfl_eaw_table[i].begin <= c && c <= mbfl_eaw_table[i].end) {
return 1;
}
}
return 0;
} | 0 | [
"CWE-119"
] | php-src | 64f42c73efc58e88671ad76b6b6bc8e2b62713e1 | 199,508,071,510,156,300,000,000,000,000,000,000,000 | 16 | Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut |
int coroutine_fn bdrv_co_discard(BlockDriverState *bs, int64_t sector_num,
int nb_sectors)
{
int max_discard;
if (!bs->drv) {
return -ENOMEDIUM;
} else if (bdrv_check_request(bs, sector_num, nb_sectors)) {
return -EIO;
} else if (bs->read_only) {
... | 0 | [
"CWE-190"
] | qemu | 8f4754ede56e3f9ea3fd7207f4a7c4453e59285b | 151,528,939,313,634,920,000,000,000,000,000,000,000 | 70 | block: Limit request size (CVE-2014-0143)
Limiting the size of a single request to INT_MAX not only fixes a
direct integer overflow in bdrv_check_request() (which would only
trigger bad behaviour with ridiculously huge images, as in close to
2^64 bytes), but can also prevent overflows in all block drivers.
Signed-off... |
static bool update_insert_id(THD *thd, set_var *var)
{
if (!var->value)
{
my_error(ER_NO_DEFAULT, MYF(0), var->var->name.str);
return true;
}
thd->force_one_auto_inc_interval(var->save_result.ulonglong_value);
return false;
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 226,359,931,864,897,300,000,000,000,000,000,000,000 | 10 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
initialize (void)
{
char *env_sysrc;
file_stats_t flstats;
bool ok = true;
memset(&flstats, 0, sizeof(flstats));
/* Run a non-standard system rc file when the according environment
variable has been set. For internal testing purposes only! */
env_sysrc = getenv ("SYSTEM_WGETRC");
if (env_sysrc && f... | 0 | [
"CWE-200"
] | wget | c125d24762962d91050d925fbbd9e6f30b2302f8 | 296,814,880,424,930,140,000,000,000,000,000,000,000 | 67 | Don't use extended attributes (--xattr) by default
* src/init.c (defaults): Set enable_xattr to false by default
* src/main.c (print_help): Reverse option logic of --xattr
* doc/wget.texi: Add description for --xattr
Users may not be aware that the origin URL and Referer are saved
including credentials, and possibly ... |
SYSCALL_DEFINE3(getresuid, uid_t __user *, ruidp, uid_t __user *, euidp, uid_t __user *, suidp)
{
const struct cred *cred = current_cred();
int retval;
uid_t ruid, euid, suid;
ruid = from_kuid_munged(cred->user_ns, cred->uid);
euid = from_kuid_munged(cred->user_ns, cred->euid);
suid = from_kuid_munged(cred->user... | 0 | [
"CWE-16",
"CWE-79"
] | linux | 2702b1526c7278c4d65d78de209a465d4de2885e | 26,555,650,981,018,680,000,000,000,000,000,000,000 | 16 | kernel/sys.c: fix stack memory content leak via UNAME26
Calling uname() with the UNAME26 personality set allows a leak of kernel
stack contents. This fixes it by defensively calculating the length of
copy_to_user() call, making the len argument unsigned, and initializing
the stack buffer to zero (now technically unne... |
SMB311_posix_qfs_info(const unsigned int xid, struct cifs_tcon *tcon,
u64 persistent_fid, u64 volatile_fid, struct kstatfs *fsdata)
{
struct smb_rqst rqst;
struct smb2_query_info_rsp *rsp = NULL;
struct kvec iov;
struct kvec rsp_iov;
int rc = 0;
int resp_buftype;
struct cifs_ses *ses = tcon->ses;
FILE_SY... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 100,367,434,335,744,920,000,000,000,000,000,000,000 | 46 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
struct ion_client *ion_client_create(struct ion_device *dev,
const char *name)
{
struct ion_client *client;
struct task_struct *task;
struct rb_node **p;
struct rb_node *parent = NULL;
struct ion_client *entry;
pid_t pid;
if (!name) {
pr_err("%s: Name cannot be null\n", __func__);
return ERR_PTR(-E... | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 16,482,281,862,326,706,000,000,000,000,000,000,000 | 89 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
static void nodeBlobReset(Rtree *pRtree){
if( pRtree->pNodeBlob && pRtree->inWrTrans==0 && pRtree->nCursor==0 ){
sqlite3_blob *pBlob = pRtree->pNodeBlob;
pRtree->pNodeBlob = 0;
sqlite3_blob_close(pBlob);
}
} | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 93,658,922,658,945,900,000,000,000,000,000,000,000 | 7 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
GF_Err iSLT_box_size(GF_Box *s)
{
s->size += 8;
return GF_OK;
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 215,625,875,335,721,000,000,000,000,000,000,000,000 | 5 | fixed #1879 |
ssize_t lxc_sendfile_nointr(int out_fd, int in_fd, off_t *offset, size_t count)
{
ssize_t ret;
again:
ret = sendfile(out_fd, in_fd, offset, count);
if (ret < 0) {
if (errno == EINTR)
goto again;
return -1;
}
return ret;
} | 0 | [
"CWE-78"
] | lxc | 6400238d08cdf1ca20d49bafb85f4e224348bf9d | 307,622,979,696,809,870,000,000,000,000,000,000,000 | 15 | CVE-2019-5736 (runC): rexec callers as memfd
Adam Iwaniuk and Borys Popławski discovered that an attacker can compromise the
runC host binary from inside a privileged runC container. As a result, this
could be exploited to gain root access on the host. runC is used as the default
runtime for containers with Docker, co... |
void X509_STORE_CTX_set0_dane(X509_STORE_CTX *ctx, struct dane_st *dane)
{
ctx->dane = dane;
} | 0 | [] | openssl | 33cc5dde478ba5ad79f8fd4acd8737f0e60e236e | 265,309,907,942,038,450,000,000,000,000,000,000,000 | 4 | Compat self-signed trust with reject-only aux data
When auxiliary data contains only reject entries, continue to trust
self-signed objects just as when no auxiliary data is present.
This makes it possible to reject specific uses without changing
what's accepted (and thus overring the underlying EKU).
Added new suppo... |
apr_status_t oidc_cache_mutex_child_init(apr_pool_t *p, server_rec *s,
oidc_cache_mutex_t *m) {
// oidc_sdebug(s, "enter: %d (m=%pp,s=%pp, p=%d)", (m && m->sema) ? *m->sema : -1, m->mutex ? m->mutex : 0, s, m->is_parent);
if (m->is_parent == FALSE)
return APR_SUCCESS;
/* initialize the lock for the child proc... | 0 | [
"CWE-330"
] | mod_auth_openidc | 375407c16c61a70b56fdbe13b0d2c8f11398e92c | 117,624,362,158,841,700,000,000,000,000,000,000,000 | 28 | use encrypted JWTs for storing encrypted cache contents
- avoid using static AAD/IV; thanks @niebardzo
- bump to 2.4.9-dev
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
format_versions_list(config_line_t *ln)
{
smartlist_t *versions;
char *result;
versions = smartlist_new();
for ( ; ln; ln = ln->next) {
smartlist_split_string(versions, ln->value, ",",
SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK, 0);
}
sort_version_list(versions, 1);
result = smartl... | 0 | [] | tor | 02e05bd74dbec614397b696cfcda6525562a4675 | 295,364,138,334,780,240,000,000,000,000,000,000,000 | 15 | When examining descriptors as a dirserver, reject ones with bad versions
This is an extra fix for bug 21278: it ensures that these
descriptors and platforms will never be listed in a legit consensus. |
static int mem_resize(jas_stream_memobj_t *m, int bufsize)
{
unsigned char *buf;
assert(m->buf_);
if (!(buf = jas_realloc(m->buf_, bufsize * sizeof(unsigned char)))) {
return -1;
}
m->buf_ = buf;
m->bufsize_ = bufsize;
return 0;
} | 1 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 203,493,757,926,343,200,000,000,000,000,000,000,000 | 12 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
extract_data_get_extraction_requested (ExtractData *extract_data,
const char *pathname)
{
if (extract_data->file_list != NULL)
return g_hash_table_lookup (extract_data->files_to_extract, pathname) != NULL;
else
return TRUE;
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 61,119,311,083,636,490,000,000,000,000,000,000,000 | 8 | libarchive: sanitize filenames before extracting |
int64 GetElapsedTime (LARGE_INTEGER *lastPerfCounter)
{
LARGE_INTEGER freq;
LARGE_INTEGER counter = KeQueryPerformanceCounter (&freq);
int64 elapsed = (counter.QuadPart - lastPerfCounter->QuadPart) * 1000000LL / freq.QuadPart;
*lastPerfCounter = counter;
return elapsed;
} | 0 | [
"CWE-119",
"CWE-787"
] | VeraCrypt | f30f9339c9a0b9bbcc6f5ad38804af39db1f479e | 41,825,297,699,562,863,000,000,000,000,000,000,000 | 10 | Windows: fix low severity vulnerability in driver that allowed reading 3 bytes of kernel stack memory (with a rare possibility of 25 additional bytes). Reported by Tim Harrison. |
static BROTLI_INLINE size_t BrotliGetRemainingBytes(BrotliBitReader* br) {
static const size_t kCap = (size_t)1 << BROTLI_LARGE_MAX_WBITS;
if (br->avail_in > kCap) return kCap;
return br->avail_in + (BrotliGetAvailableBits(br) >> 3);
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 322,240,401,335,864,270,000,000,000,000,000,000,000 | 5 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 3);
OpContext op_context(context, node);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), op_context.params->num_splits);
auto input_type = op_context.input->type;
TF_LITE_ENSURE(context,
... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 81,386,516,982,577,535,000,000,000,000,000,000,000 | 30 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static bool is_blocked_key(uint8_t key_type, uint8_t *key_value)
{
uint32_t i = 0;
for (i = 0; i < ARRAY_SIZE(blocked_keys); ++i) {
if (key_type == blocked_keys[i].type &&
!memcmp(blocked_keys[i].val, key_value,
sizeof(blocked_keys[i].val)))
return true;
}
return false;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 60,682,162,065,347,070,000,000,000,000,000,000,000 | 13 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
RGWOpType get_type() override { return RGW_OP_DELETE_CORS; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 300,110,483,421,190,200,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static RBinXtrData *get_the_meta(RBin *bin, RBuffer *buf) {
RBinXtrMetadata *meta = R_NEW0 (RBinXtrMetadata);
meta->machine = "mono";
meta->type = "assembly";
meta->libname = NULL;
meta->xtr_type = "xalz";
ut32 osz = r_buf_read_le32_at (buf, 8);
int datalen = r_buf_size (buf) - 0xc;
ut8 *data = malloc (datalen... | 0 | [
"CWE-125"
] | radare2 | fc285cecb8469f0262db0170bf6dd7c01d9b8ed5 | 135,849,517,023,762,090,000,000,000,000,000,000,000 | 30 | Fix #20354 |
next_can_zero (void *nxdata)
{
struct b_conn *b_conn = nxdata;
return b_conn->b->can_zero (b_conn->b, b_conn->conn);
} | 0 | [
"CWE-406"
] | nbdkit | bf0d61883a2f02f4388ec10dc92d4c61c093679e | 260,551,617,845,259,800,000,000,000,000,000,000,000 | 5 | server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO
Most known NBD clients do not bother with NBD_OPT_INFO (except for
clients like 'qemu-nbd --list' that don't ever intend to connect), but
go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu
to add in an extra client step (whether info on the ... |
static void update_depend_map_for_order(JOIN *join, ORDER *order)
{
for (; order ; order=order->next)
{
table_map depend_map;
order->item[0]->update_used_tables();
order->depend_map=depend_map=order->item[0]->used_tables();
order->used= 0;
// Not item_sum(), RAND() and no reference to table outs... | 0 | [] | server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | 282,416,310,242,790,000,000,000,000,000,000,000,000 | 23 | MDEV-28094 Window function in expression in ORDER BY
call item->split_sum_func() in setup_order() just as
it's done in setup_fields() |
static void ch345_broken_sysex_input(struct snd_usb_midi_in_endpoint *ep,
uint8_t *buffer, int buffer_length)
{
unsigned int i, cin, length;
for (i = 0; i + 3 < buffer_length; i += 4) {
if (buffer[i] == 0 && i > 0)
break;
cin = buffer[i] & 0x0f;
if (ep->in_sysex &&
cin == ep->last_cin &&
... | 0 | [
"CWE-703"
] | linux | 07d86ca93db7e5cdf4743564d98292042ec21af7 | 152,413,561,521,370,190,000,000,000,000,000,000,000 | 28 | 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... |
istr_set_get_as_list (GHashTable *table)
{
GList *list;
list = NULL;
g_hash_table_foreach (table, add_istr_to_list, &list);
return list;
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 168,515,070,150,967,510,000,000,000,000,000,000,000 | 8 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
DEFUN(dispVer, VERSION, "Display the version of w3m")
{
disp_message(Sprintf("w3m version %s", w3m_version)->ptr, TRUE);
} | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 214,886,934,576,456,260,000,000,000,000,000,000,000 | 4 | Make temporary directory safely when ~/.w3m is unwritable |
read_cupsd_conf(cups_file_t *fp) /* I - File to read from */
{
int linenum; /* Current line number */
char line[HTTP_MAX_BUFFER],
/* Line from file */
temp[HTTP_MAX_BUFFER],
/* Temporary buffer for value */
*value, /* Pointer to value */
*valueptr; /* Pointer into value */
int valuelen; ... | 1 | [] | cups | d47f6aec436e0e9df6554436e391471097686ecc | 258,831,427,634,352,750,000,000,000,000,000,000,000 | 564 | Fix local privilege escalation to root and sandbox bypasses in scheduler
(rdar://37836779, rdar://37836995, rdar://37837252, rdar://37837581) |
do_implicit_handshake (GTlsConnectionBase *tls,
gint64 timeout,
GCancellable *cancellable,
GError **error)
{
GTlsConnectionBasePrivate *priv = g_tls_connection_base_get_instance_private (tls);
GTlsConnectionBaseCl... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 20,184,556,789,751,474,000,000,000,000,000,000,000 | 89 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
horizontalDifferenceF(float *ip, int n, int stride, uint16 *wp, uint16 *FromLT2)
{
int32 r1, g1, b1, a1, r2, g2, b2, a2, mask;
float fltsize = Fltsize;
#define CLAMP(v) ( (v<(float)0.) ? 0 \
: (v<(float)2.) ? FromLT2[(int)(v*fltsize)] \
: (v>(float)24.2) ? 2047 \
: LogK1*log(v*LogK2) + 0.... | 0 | [
"CWE-119",
"CWE-787"
] | libtiff | 83a4b92815ea04969d494416eaae3d4c6b338e4a | 155,579,648,849,169,340,000,000,000,000,000,000,000 | 52 | * tools/tiffcrop.c: fix various out-of-bounds write vulnerabilities
in heap or stack allocated buffers. Reported as MSVR 35093,
MSVR 35096 and MSVR 35097. Discovered by Axel Souchet and Vishal
Chauhan from the MSRC Vulnerabilities & Mitigations team.
* tools/tiff2pdf.c: fix out-of-bounds write vulnerabilities in
heap a... |
static bool mysql_change_partitions(ALTER_PARTITION_PARAM_TYPE *lpt)
{
char path[FN_REFLEN+1];
int error;
handler *file= lpt->table->file;
THD *thd= lpt->thd;
DBUG_ENTER("mysql_change_partitions");
build_table_filename(path, sizeof(path) - 1, lpt->db.str, lpt->table_name.str, "", 0);
if(mysql_trans_prep... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 249,442,146,433,373,600,000,000,000,000,000,000,000 | 29 | 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. |
int proc_dointvec(struct ctl_table *table, int write,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
return -ENOSYS;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | bfdc0b497faa82a0ba2f9dddcf109231dd519fcc | 305,856,483,007,385,660,000,000,000,000,000,000,000 | 5 | sysctl: restrict write access to dmesg_restrict
When dmesg_restrict is set to 1 CAP_SYS_ADMIN is needed to read the kernel
ring buffer. But a root user without CAP_SYS_ADMIN is able to reset
dmesg_restrict to 0.
This is an issue when e.g. LXC (Linux Containers) are used and complete
user space is running without CA... |
void btrfs_destroy_dev_replace_tgtdev(struct btrfs_device *tgtdev)
{
struct btrfs_fs_devices *fs_devices = tgtdev->fs_info->fs_devices;
mutex_lock(&fs_devices->device_list_mutex);
btrfs_sysfs_remove_device(tgtdev);
if (tgtdev->bdev)
fs_devices->open_devices--;
fs_devices->num_devices--;
btrfs_assign_next_a... | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 101,174,345,887,776,480,000,000,000,000,000,000,000 | 33 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
__nvmet_fc_fcp_nvme_cmd_done(struct nvmet_fc_tgtport *tgtport,
struct nvmet_fc_fcp_iod *fod, int status)
{
struct nvme_common_command *sqe = &fod->cmdiubuf.sqe.common;
struct nvme_completion *cqe = &fod->rspiubuf.cqe;
unsigned long flags;
bool abort;
spin_lock_irqsave(&fod->flock, flags);
abort = fod->abort;
... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0c319d3a144d4b8f1ea2047fd614d2149b68f889 | 149,647,547,399,789,920,000,000,000,000,000,000,000 | 51 | nvmet-fc: ensure target queue id within range.
When searching for queue id's ensure they are within the expected range.
Signed-off-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
static bool vring_notify(VirtIODevice *vdev, VirtQueue *vq)
{
uint16_t old, new;
bool v;
/* We need to expose used array entries before checking used event. */
smp_mb();
/* Always notify when queue is empty (when feature acknowledge) */
if (((vdev->guest_features & (1 << VIRTIO_F_NOTIFY_ON_EMPTY... | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 242,882,446,242,202,400,000,000,000,000,000,000,000 | 22 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
irc_server_hdata_server_cb (const void *pointer, void *data,
const char *hdata_name)
{
struct t_hdata *hdata;
/* make C compiler happy */
(void) pointer;
(void) data;
hdata = weechat_hdata_new (hdata_name, "prev_server", "next_server",
0, ... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 160,977,661,095,206,830,000,000,000,000,000,000,000 | 102 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
Channel* GetChanTarget() const { return chantarget; } | 0 | [
"CWE-200",
"CWE-732"
] | inspircd | 4350a11c663b0d75f8119743bffb7736d87abd4d | 63,600,400,821,805,370,000,000,000,000,000,000,000 | 1 | Fix sending malformed pong messages in some cases. |
int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
struct inode **delegated_inode, unsigned int flags)
{
int error;
bool is_dir = d_is_dir(old_dentry);
const unsigned char *old_name;
struct inode *source = old_dentry->d_inode;
struct i... | 0 | [
"CWE-416"
] | linux | f15133df088ecadd141ea1907f2c96df67c729f0 | 286,521,308,268,740,700,000,000,000,000,000,000,000 | 132 | path_openat(): fix double fput()
path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static Image *ReadSGIImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image
*image;
MagickBooleanType
status;
MagickSizeType
n,
number_pixels;
MemoryInfo
*pixel_info;
register Quantum
*q;
register ssize_t
i,
x;
register unsigned char
*p;
SGIInfo
... | 0 | [
"CWE-787"
] | ImageMagick | 6ae32a9038e360b3491969d5d03d490884f02b4c | 178,939,131,686,535,380,000,000,000,000,000,000,000 | 503 | https://github.com/ImageMagick/ImageMagick/issues/1562 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.