func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void CoreNetwork::setPingInterval(int interval)
{
_pingTimer.setInterval(interval * 1000);
} | 0 | [
"CWE-399"
] | quassel | b5e38970ffd55e2dd9f706ce75af9a8d7730b1b8 | 39,239,288,845,329,550,000,000,000,000,000,000,000 | 4 | Improve the message-splitting algorithm for PRIVMSG and CTCP
This introduces a new message splitting algorithm based on
QTextBoundaryFinder. It works by first starting with the entire
message to be sent, encoding it, and checking to see if it is over
the maximum message length. If it is, it uses QTBF to find the
wor... |
GF_Err dinf_on_child_box(GF_Box *s, GF_Box *a)
{
GF_DataInformationBox *ptr = (GF_DataInformationBox *)s;
switch(a->type) {
case GF_ISOM_BOX_TYPE_DREF:
if (ptr->dref) ERROR_ON_DUPLICATED_BOX(a, ptr)
ptr->dref = (GF_DataReferenceBox *)a;
return GF_OK;
}
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 230,249,799,059,745,230,000,000,000,000,000,000,000 | 11 | fixed #1587 |
static inline void set_pte_at(struct mm_struct *mm, unsigned long addr,
pte_t *ptep, pte_t pte)
{
if (sizeof(pteval_t) > sizeof(long))
/* 5 arg words */
pv_ops.mmu.set_pte_at(mm, addr, ptep, pte);
else
PVOP_VCALL4(mmu.set_pte_at, mm, addr, ptep, pte.pte);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 201,267,862,141,760,960,000,000,000,000,000,000,000 | 9 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static const char *cmd_action(cmd_parms *cmd, void *_dcfg, const char *p1)
{
return add_rule(cmd, (directory_config *)_dcfg, RULE_TYPE_ACTION, SECACTION_TARGETS, SECACTION_ARGS, p1);
} | 0 | [
"CWE-20",
"CWE-611"
] | ModSecurity | d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe | 833,153,061,519,812,300,000,000,000,000,000,000 | 4 | Added SecXmlExternalEntity |
TEST_F(HeaderToMetadataTest, NoCookieValue) {
const std::string config = R"EOF(
request_rules:
- cookie: foo
on_header_missing:
metadata_namespace: envoy.lb
key: foo
value: some_value
type: STRING
)EOF";
initializeFilter(config);
Http::TestRequestHeaderMapImpl headers{{"cookie", ""}}... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 68,145,216,804,772,310,000,000,000,000,000,000,000 | 18 | 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... |
u64 blkg_prfill_rwstat(struct seq_file *sf, struct blkg_policy_data *pd,
int off)
{
struct blkg_rwstat rwstat = blkg_rwstat_read((void *)pd + off);
return __blkg_prfill_rwstat(sf, pd, &rwstat);
} | 0 | [
"CWE-415"
] | linux | 9b54d816e00425c3a517514e0d677bb3cec49258 | 230,060,014,458,799,740,000,000,000,000,000,000,000 | 7 | blkcg: fix double free of new_blkg in blkcg_init_queue
If blkg_create fails, new_blkg passed as an argument will
be freed by blkg_create, so there is no need to free it again.
Signed-off-by: Hou Tao <houtao1@huawei.com>
Signed-off-by: Jens Axboe <axboe@fb.com> |
void DoRealForwardFFT(OpKernelContext* ctx, uint64* fft_shape,
const Tensor& in, Tensor* out) {
// Create the axes (which are always trailing).
const auto axes = Eigen::ArrayXi::LinSpaced(FFTRank, 1, FFTRank);
auto device = ctx->eigen_device<CPUDevice>();
auto input = Tensor(in... | 0 | [
"CWE-617",
"CWE-703"
] | tensorflow | 31bd5026304677faa8a0b77602c6154171b9aec1 | 309,164,948,673,975,830,000,000,000,000,000,000,000 | 36 | Prevent check fail in FFT
PiperOrigin-RevId: 372031044
Change-Id: I50994e3e8a5d1342d01bde80256f6bf2730ca299 |
create_un_nat_conn(struct conntrack *ct, struct conn *conn_for_un_nat_copy,
long long now, bool alg_un_nat)
{
struct conn *nc = xmemdup(conn_for_un_nat_copy, sizeof *nc);
memcpy(&nc->key, &conn_for_un_nat_copy->rev_key, sizeof nc->key);
memcpy(&nc->rev_key, &conn_for_un_nat_copy->key, siz... | 0 | [
"CWE-400"
] | ovs | abd7a457652e6734902720fe6a5dddb3fc0d1e3b | 226,700,324,937,409,430,000,000,000,000,000,000,000 | 43 | 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... |
static void nma_icon_theme_changed (GtkIconTheme *icon_theme, NMApplet *applet)
{
nma_icons_free (applet);
nma_icons_load (applet);
} | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 204,311,954,339,026,460,000,000,000,000,000,000,000 | 5 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
void WebPImage::doWriteMetadata(BasicIo& outIo)
{
if (!io_->isopen()) throw Error(kerInputDataReadFailed);
if (!outIo.isopen()) throw Error(kerImageWriteFailed);
#ifdef DEBUG
std::cout << "Writing metadata" << std::endl;
#endif
byte data [WEBP_TAG_SIZE*3];
DataBuf ... | 0 | [
"CWE-190"
] | exiv2 | c73d1e27198a389ce7caf52ac30f8e2120acdafd | 184,435,689,863,349,250,000,000,000,000,000,000,000 | 279 | Avoid negative integer overflow when `filesize < io_->tell()`.
This fixes #791. |
xmlCtxtReadDoc(xmlParserCtxtPtr ctxt, const xmlChar * cur,
const char *URL, const char *encoding, int options)
{
xmlParserInputPtr stream;
if (cur == NULL)
return (NULL);
if (ctxt == NULL)
return (NULL);
xmlInitParser();
xmlCtxtReset(ctxt);
stream = xmlNewString... | 0 | [] | libxml2 | 9cd1c3cfbd32655d60572c0a413e017260c854df | 201,332,048,893,984,500,000,000,000,000,000,000,000 | 20 | Do not fetch external parameter entities
Unless explicitely asked for when validating or replacing entities
with their value. Problem pointed out by Daniel Berrange <berrange@redhat.com> |
sasl_session_abort(struct sasl_session *const restrict p)
{
(void) sasl_sts(p->uid, 'D', "F");
(void) sasl_session_destroy(p);
} | 0 | [
"CWE-287",
"CWE-288"
] | atheme | 4e664c75d0b280a052eb8b5e81aa41944e593c52 | 63,679,971,948,115,280,000,000,000,000,000,000,000 | 5 | saslserv/main: Track EID we're pending login to
The existing model does not remember that we've sent a SVSLOGIN for a
given SASL session, and simply assumes that if a client is introduced
with a SASL session open, that session must have succeeded. The security
of this approach requires ircd to implicitly abort SASL se... |
void ipmi_smi_watchdog_pretimeout(struct ipmi_smi *intf)
{
if (intf->in_shutdown)
return;
atomic_set(&intf->watchdog_pretimeouts_to_deliver, 1);
tasklet_schedule(&intf->recv_tasklet);
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 77f8269606bf95fcb232ee86f6da80886f1dfae8 | 20,370,976,612,373,712,000,000,000,000,000,000,000 | 8 | ipmi: fix use-after-free of user->release_barrier.rda
When we do the following test, we got oops in ipmi_msghandler driver
while((1))
do
service ipmievd restart & service ipmievd restart
done
---------------------------------------------------------------
[ 294.230186] Unable to handle kernel paging request at virt... |
static void nlm_put_lockowner(struct nlm_lockowner *lockowner)
{
if (!atomic_dec_and_lock(&lockowner->count, &lockowner->host->h_lock))
return;
list_del(&lockowner->list);
spin_unlock(&lockowner->host->h_lock);
nlmclnt_release_host(lockowner->host);
kfree(lockowner);
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 283,266,119,980,611,160,000,000,000,000,000,000,000 | 9 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
void dccp_destroy_sock(struct sock *sk)
{
struct dccp_sock *dp = dccp_sk(sk);
__skb_queue_purge(&sk->sk_write_queue);
if (sk->sk_send_head != NULL) {
kfree_skb(sk->sk_send_head);
sk->sk_send_head = NULL;
}
/* Clean up a referenced DCCP bind bucket. */
if (inet_csk(sk)->icsk_bind_hash != NULL)
inet_put_por... | 0 | [
"CWE-416"
] | linux | 69c64866ce072dea1d1e59a0d61e0f66c0dffb76 | 264,867,360,036,858,840,000,000,000,000,000,000,000 | 27 | dccp: CVE-2017-8824: use-after-free in DCCP code
Whenever the sock object is in DCCP_CLOSED state,
dccp_disconnect() must free dccps_hc_tx_ccid and
dccps_hc_rx_ccid and set to NULL.
Signed-off-by: Mohamed Ghannam <simo.ghannam@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <... |
xmlBufferAddHead(xmlBufferPtr buf, const xmlChar *str, int len) {
unsigned int needSize;
if (buf == NULL)
return(-1);
if (buf->alloc == XML_BUFFER_ALLOC_IMMUTABLE) return -1;
if (str == NULL) {
#ifdef DEBUG_BUFFER
xmlGenericError(xmlGenericErrorContext,
"xmlBufferAddHead: str == NULL\... | 0 | [
"CWE-190"
] | libxml2 | 6c283d83eccd940bcde15634ac8c7f100e3caefd | 115,145,151,552,209,540,000,000,000,000,000,000,000 | 55 | [CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer
In several places, the code handling string buffers didn't check for
integer overflow or used wrong types for buffer sizes. This could
result in out-of-bounds writes or other memory errors when working on
large, multi-gigabyte buffers.
Thanks to Felix Wil... |
R_API R_OWN char *r_anal_function_autoname_var(RAnalFunction *fcn, char kind, const char *pfx, int ptr) {
void **it;
const ut32 uptr = R_ABS (ptr);
char *varname = r_str_newf ("%s_%xh", pfx, uptr);
r_pvector_foreach (&fcn->vars, it) {
RAnalVar *var = *it;
if (!strcmp (varname, var->name)) {
if (var->kind != ... | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 75,865,278,660,347,590,000,000,000,000,000,000,000 | 23 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
ssize_t xdr_stream_decode_string(struct xdr_stream *xdr, char *str, size_t size)
{
ssize_t ret;
void *p;
ret = xdr_stream_decode_opaque_inline(xdr, &p, size);
if (ret > 0) {
memcpy(str, p, ret);
str[ret] = '\0';
return strlen(str);
}
*str = '\0';
return ret;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 6d1c0f3d28f98ea2736128ed3e46821496dc3a8c | 99,743,373,570,186,540,000,000,000,000,000,000,000 | 14 | sunrpc: Avoid a KASAN slab-out-of-bounds bug in xdr_set_page_base()
This seems to happen fairly easily during READ_PLUS testing on NFS v4.2.
I found that we could end up accessing xdr->buf->pages[pgnr] with a pgnr
greater than the number of pages in the array. So let's just return
early if we're setting base to a poin... |
void do_get_replace(struct st_command *command)
{
uint i;
char *from= command->first_argument;
char *buff, *start;
char word_end_chars[256], *pos;
POINTER_ARRAY to_array, from_array;
DBUG_ENTER("get_replace");
free_replace();
bzero((char*) &to_array,sizeof(to_array));
bzero((char*) &from_array,sizeo... | 0 | [
"CWE-295"
] | mysql-server | b3e9211e48a3fb586e88b0270a175d2348935424 | 272,518,426,999,717,600,000,000,000,000,000,000,000 | 45 | WL#9072: Backport WL#8785 to 5.5 |
unsigned find_get_pages(struct address_space *mapping, pgoff_t start,
unsigned int nr_pages, struct page **pages)
{
unsigned int i;
unsigned int ret;
read_lock_irq(&mapping->tree_lock);
ret = radix_tree_gang_lookup(&mapping->page_tree,
(void **)pages, start, nr_pages);
for (i = 0; i < ret; i++)
page_... | 0 | [
"CWE-20"
] | linux | 124d3b7041f9a0ca7c43a6293e1cae4576c32fd5 | 246,910,004,225,052,250,000,000,000,000,000,000,000 | 14 | fix writev regression: pan hanging unkillable and un-straceable
Frederik Himpe reported an unkillable and un-straceable pan process.
Zero length iovecs can go into an infinite loop in writev, because the
iovec iterator does not always advance over them.
The sequence required to trigger this is not trivial. I think i... |
static int ipv6_inherit_eui64(u8 *eui, struct inet6_dev *idev)
{
int err = -1;
struct inet6_ifaddr *ifp;
read_lock_bh(&idev->lock);
list_for_each_entry_reverse(ifp, &idev->addr_list, if_list) {
if (ifp->scope > IFA_LINK)
break;
if (ifp->scope == IFA_LINK && !(ifp->flags&IFA_F_TENTATIVE)) {
memcpy(eui, if... | 0 | [
"CWE-20"
] | linux | 77751427a1ff25b27d47a4c36b12c3c8667855ac | 227,252,326,091,425,780,000,000,000,000,000,000,000 | 18 | ipv6: addrconf: validate new MTU before applying it
Currently we don't check if the new MTU is valid or not and this allows
one to configure a smaller than minimum allowed by RFCs or even bigger
than interface own MTU, which is a problem as it may lead to packet
drops.
If you have a daemon like NetworkManager running... |
authentic_manage_sdo(struct sc_card *card, struct sc_authentic_sdo *sdo, unsigned long cmd)
{
struct sc_context *ctx = card->ctx;
struct sc_apdu apdu;
unsigned char *data = NULL;
size_t data_len = 0, save_max_send = card->max_send_size;
int rv;
LOG_FUNC_CALLED(ctx);
sc_log(ctx, "SDO(cmd:%lX,mech:%X,id:%X)", cmd... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 231,912,146,194,919,720,000,000,000,000,000,000,000 | 34 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static int _process_persist_conn(void *arg,
persist_msg_t *persist_msg,
Buf *out_buffer, uint32_t *uid)
{
slurm_msg_t msg;
slurm_persist_conn_t *persist_conn = arg;
if (*uid == NO_VAL)
*uid = g_slurm_auth_get_uid(persist_conn->auth_cred,
slurmctld_config.auth_info);
*out_buffer = NULL;
slur... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 307,197,938,331,026,100,000,000,000,000,000,000,000 | 26 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
void git_treebuilder_free(git_treebuilder *bld)
{
if (bld == NULL)
return;
git_treebuilder_clear(bld);
git_vector_free(&bld->entries);
git__free(bld);
} | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 33,386,906,441,704,390,000,000,000,000,000,000,000 | 9 | tree: Check for `.git` with case insensitivy |
bm_delta2_search (char const **tpp, char const *ep, char const *sp, int len,
char const *trans, char gc1, char gc2,
unsigned char const *d1, kwset_t kwset)
{
char const *tp = *tpp;
int d = len, skip = 0;
while (true)
{
int i = 2;
if (tr (trans, tp[-2]) == gc2)
... | 0 | [
"CWE-119"
] | grep | 83a95bd8c8561875b948cadd417c653dbe7ef2e2 | 203,298,987,497,166,270,000,000,000,000,000,000,000 | 43 | grep -F: fix a heap buffer (read) overrun
grep's read buffer is often filled to its full size, except when
reading the final buffer of a file. In that case, the number of
bytes read may be far less than the size of the buffer. However, for
certain unusual pattern/text combinations, grep -F would mistakenly
examine b... |
const struct cpumask *sched_trace_rd_span(struct root_domain *rd)
{
#ifdef CONFIG_SMP
return rd ? rd->span : NULL;
#else
return NULL;
#endif
} | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 252,889,890,226,232,300,000,000,000,000,000,000,000 | 8 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
SV *
Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog,
const regnode* node,
bool doinit,
SV** listsvp,
SV** only_utf8_locale_ptr,
... | 0 | [
"CWE-190",
"CWE-787"
] | perl5 | 897d1f7fd515b828e4b198d8b8bef76c6faf03ed | 135,326,011,323,460,500,000,000,000,000,000,000,000 | 239 | regcomp.c: Prevent integer overflow from nested regex quantifiers.
(CVE-2020-10543) On 32bit systems the size calculations for nested regular
expression quantifiers could overflow causing heap memory corruption.
Fixes: Perl/perl5-security#125
(cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71) |
my_bool end_of_query(int c)
{
return match_delimiter(c, delimiter, delimiter_length);
} | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 165,144,431,486,334,960,000,000,000,000,000,000,000 | 4 | 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... |
int Field_long::store(double nr)
{
ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED;
int error= 0;
int32 res;
nr=rint(nr);
if (unsigned_flag)
{
if (nr < 0)
{
res=0;
error= 1;
}
else if (nr > (double) UINT_MAX32)
{
res= UINT_MAX32;
set_warning(ER_WARN_DATA_OUT_OF_RANGE, ... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 20,216,638,095,720,540,000,000,000,000,000,000,000 | 43 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static struct cluster_list *cluster_intern(struct cluster_list *cluster)
{
struct cluster_list *find;
find = hash_get(cluster_hash, cluster, cluster_hash_alloc);
find->refcnt++;
return find;
} | 0 | [
"CWE-20",
"CWE-436"
] | frr | 943d595a018e69b550db08cccba1d0778a86705a | 231,019,157,008,195,300,000,000,000,000,000,000,000 | 9 | bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Signed-off-by: Lou Berger <lberger@labn.net> |
req_ack(
sockaddr_u *srcadr,
endpt *inter,
struct req_pkt *inpkt,
int errcode
)
{
/*
* fill in the fields
*/
rpkt.rm_vn_mode = RM_VN_MODE(RESP_BIT, 0, reqver);
rpkt.auth_seq = AUTH_SEQ(0, 0);
rpkt.implementation = inpkt->implementation;
rpkt.request = inpkt->request;
rpkt.err_nitems = ERR_NITEMS(errcode,... | 0 | [
"CWE-190"
] | ntp | c04c3d3d940dfe1a53132925c4f51aef017d2e0f | 52,302,477,835,166,190,000,000,000,000,000,000,000 | 23 | [TALOS-CAN-0052] crash by loop counter underrun. |
int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
struct notifier_block *n)
{
int ret;
/*
* This code gets used during boot-up, when task switching is
* not yet working and interrupts must remain disabled. At
* such times we must not call down_write().
*/
if (unlikely(system_state =... | 0 | [
"CWE-20"
] | linux-2.6 | 9926e4c74300c4b31dee007298c6475d33369df0 | 172,638,901,418,899,630,000,000,000,000,000,000,000 | 18 | CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix
As discovered here today, the change in Kernel 2.6.17 intended to inhibit
users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by
"cheating" and setting it to 1 in such a case, does not make a difference,
as the check is done in the wrong pla... |
static struct results_store *new_store(struct private_data *priv)
{
struct results_store *store;
int i;
int best = 0;
time_t oldest = TIME_T_MAX;
for (i = 0; i < priv->n_stores; i++) {
if (priv->store[i] == NULL) {
best = i;
break;
} else if (priv->store[i]->timestamp < oldest){
best = i;
oldest = ... | 0 | [
"CWE-416"
] | samba | 32c333def9ad5a1c67abee320cf5f3c4f2cb1e5c | 138,195,712,842,854,400,000,000,000,000,000,000,000 | 27 | CVE-2020-10760 dsdb: Ensure a proper talloc tree for saved controls
Otherwise a paged search on the GC port will fail as the ->data was
not kept around for the second page of searches.
An example command to produce this is
bin/ldbsearch --paged -H ldap://$SERVER:3268 -U$USERNAME%$PASSWORD
This shows up later in the... |
Value ExpressionRound::evaluate(const Document& root, Variables* variables) const {
return evaluateRoundOrTrunc(
root, _children, getOpName(), Decimal128::kRoundTiesToEven, &std::round, variables);
} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 57,503,612,460,496,220,000,000,000,000,000,000,000 | 4 | SERVER-49404 Enforce additional checks in $arrayToObject |
acl_fetch_meth(struct proxy *px, struct session *l4, void *l7, unsigned int opt,
const struct arg *args, struct sample *smp)
{
int meth;
struct http_txn *txn = l7;
CHECK_HTTP_MESSAGE_FIRST_PERM();
meth = txn->meth;
smp->type = SMP_T_UINT;
smp->data.uint = meth;
if (meth == HTTP_METH_OTHER) {
i... | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 178,275,310,572,889,900,000,000,000,000,000,000,000 | 22 | BUG/CRITICAL: using HTTP information in tcp-request content may crash the process
During normal HTTP request processing, request buffers are realigned if
there are less than global.maxrewrite bytes available after them, in
order to leave enough room for rewriting headers after the request. This
is done in http_wait_fo... |
CacheManager::ActionProtection(const Mgr::ActionProfile::Pointer &profile)
{
assert(profile != NULL);
const char *pwd = PasswdGet(Config.passwd_list, profile->name);
if (!pwd)
return profile->isPwReq ? "hidden" : "public";
if (!strcmp(pwd, "disable"))
return "disabled";
if (strcmp... | 0 | [
"CWE-401"
] | squid | 26e65059bc06ebce508737b5cd0866478691566a | 97,835,556,158,097,450,000,000,000,000,000,000,000 | 16 | Bug 5106: Broken cache manager URL parsing (#788)
Use already parsed request-target URL in cache manager and
update CacheManager to Tokanizer based URL parse
Removing use of sscan() and regex string processing which have
proven to be problematic on many levels. Most particularly with
regards to tolerance of normally ... |
SendMousePosition(XtermWidget xw, XEvent *event)
{
XButtonEvent *my_event = (XButtonEvent *) event;
Bool result = False;
switch (okSendMousePos(xw)) {
case MOUSE_OFF:
/* If send_mouse_pos mode isn't on, we shouldn't be here */
break;
case BTN_EVENT_MOUSE:
case ANY_EVENT_MOUSE:
if (!Override... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 275,911,435,035,056,160,000,000,000,000,000,000,000 | 72 | snapshot of project "xterm", label xterm-365d |
can_bs(
int what) /* BS_INDENT, BS_EOL or BS_START */
{
switch (*p_bs)
{
case '2': return TRUE;
case '1': return (what != BS_START);
case '0': return FALSE;
}
return vim_strchr(p_bs, what) != NULL;
} | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 268,173,206,866,864,500,000,000,000,000,000,000,000 | 11 | patch 8.0.0056
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'. |
includeFile(FileInfo *nested, CharsString *includedFile,
CharacterClass **characterClasses,
TranslationTableCharacterAttributes *characterClassAttribute,
short opcodeLengths[], TranslationTableOffset *newRuleOffset,
TranslationTableRule **newRule, RuleName **ruleNames,
TranslationTableHeader **table) {
int k... | 1 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 83,674,893,421,353,010,000,000,000,000,000,000,000 | 31 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
parse_string_opt(char *s) {
struct string_opt_map *m;
int lth;
for (m = &string_opt_map[0]; m->tag; m++) {
lth = strlen(m->tag);
if (!strncmp(s, m->tag, lth)) {
*(m->valptr) = xstrdup(s + lth);
return 1;
}
}
return 0;
} | 0 | [
"CWE-200"
] | util-linux | 0377ef91270d06592a0d4dd009c29e7b1ff9c9b8 | 120,670,638,267,576,120,000,000,000,000,000,000,000 | 13 | mount: (deprecated) drop --guess-fstype
The option is undocumented and unnecessary.
Signed-off-by: Karel Zak <kzak@redhat.com> |
static void show_entry(struct diff_options *opt, const char *prefix, struct tree_desc *desc,
const char *base, int baselen)
{
unsigned mode;
const char *path;
const unsigned char *sha1 = tree_entry_extract(desc, &path, &mode);
if (DIFF_OPT_TST(opt, RECURSIVE) && S_ISDIR(mode)) {
enum object_type type;
... | 1 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 138,571,458,001,826,580,000,000,000,000,000,000,000 | 28 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
int message_snippet_generate(struct istream *input,
unsigned int max_snippet_chars,
string_t *snippet)
{
struct message_parser_ctx *parser;
struct message_part *parts;
struct message_decoder_context *decoder;
struct message_block raw_block, block;
struct snippet_context ctx;
pool_t pool;
int ret;... | 0 | [
"CWE-20"
] | core | 3a55f35c208b5fd3d52c0a6272bd5b8717a2ae54 | 247,214,368,354,940,200,000,000,000,000,000,000,000 | 58 | lib-mail: message_snippet_generate() - Fix potential crash when input ends with '>'
This happens only when the mail was large enough and full enough with
whitespace that message-parser returned multiple blocks before the snippet
was finished.
Broken by 74063ed8219d055489d5233b0c02a59886d2078c |
static bool nft_setelem_valid_key_end(const struct nft_set *set,
struct nlattr **nla, u32 flags)
{
if ((set->flags & (NFT_SET_CONCAT | NFT_SET_INTERVAL)) ==
(NFT_SET_CONCAT | NFT_SET_INTERVAL)) {
if (flags & NFT_SET_ELEM_INTERVAL_END)
return false;
if (!nla[NFTA_SET_ELEM_KEY_END] &&
!(flags... | 0 | [
"CWE-400",
"CWE-703"
] | linux | e02f0d3970404bfea385b6edb86f2d936db0ea2b | 286,414,010,545,743,950,000,000,000,000,000,000,000 | 17 | netfilter: nf_tables: disallow binding to already bound chain
Update nft_data_init() to report EINVAL if chain is already bound.
Fixes: d0e2c7de92c7 ("netfilter: nf_tables: add NFT_CHAIN_BINDING")
Reported-by: Gwangun Jung <exsociety@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
BSONObj operand() {
return BSON("" << Date_t::fromMillisSinceEpoch(12345));
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 207,825,218,081,104,020,000,000,000,000,000,000,000 | 3 | SERVER-38070 fix infinite loop in agg expression |
long FS_filelength(fileHandle_t f)
{
FILE *h;
h = FS_FileForHandle(f);
if(h == NULL)
return -1;
else
return FS_fplength(h);
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 135,408,260,378,013,350,000,000,000,000,000,000,000 | 11 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev,
struct net_device *netdev, const u8 *addr,
gfp_t gfp)
{
nl80211_send_mlme_timeout(rdev, netdev, NL80211_CMD_ASSOCIATE,
addr, gfp); | 0 | [
"CWE-362",
"CWE-119"
] | linux | 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 | 98,334,702,879,137,700,000,000,000,000,000,000,000 | 7 | nl80211: fix check for valid SSID size in scan operations
In both trigger_scan and sched_scan operations, we were checking for
the SSID length before assigning the value correctly. Since the
memory was just kzalloc'ed, the check was always failing and SSID with
over 32 characters were allowed to go through.
This was... |
ConnStateData::handleSslBumpHandshakeError(const Security::IoResult &handshakeResult)
{
auto errCategory = ERR_NONE;
switch (handshakeResult.category) {
case Security::IoResult::ioSuccess: {
static const auto d = MakeNamedErrorDetail("TLS_ACCEPT_UNEXPECTED_SUCCESS");
updateError(errCategory... | 0 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 206,080,116,008,058,960,000,000,000,000,000,000,000 | 34 | Handle more Range requests (#790)
Also removed some effectively unused code. |
static int req_warn(lua_State *L)
{
return req_log_at(L, APLOG_WARNING);
} | 0 | [
"CWE-20"
] | httpd | 78eb3b9235515652ed141353d98c239237030410 | 333,737,261,343,693,060,000,000,000,000,000,000,000 | 4 | *) SECURITY: CVE-2015-0228 (cve.mitre.org)
mod_lua: A maliciously crafted websockets PING after a script
calls r:wsupgrade() can cause a child process crash.
[Edward Lu <Chaosed0 gmail.com>]
Discovered by Guido Vranken <guidovranken gmail.com>
Submitted by: Edward Lu
Committed by: covener
git-svn-id... |
static int stbi__tga_info(stbi__context *s, int *x, int *y, int *comp)
{
int tga_w, tga_h, tga_comp, tga_image_type, tga_bits_per_pixel, tga_colormap_bpp;
int sz, tga_colormap_type;
stbi__get8(s); // discard Offset
tga_colormap_type = stbi__get8(s); // colormap type
if( tga_colorma... | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 127,784,536,050,068,180,000,000,000,000,000,000,000 | 64 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
bool Type_std_attributes::agg_item_collations(DTCollation &c, const char *fname,
Item **av, uint count,
uint flags, int item_sep)
{
uint i;
Item **arg;
bool unknown_cs= 0;
c.set(av[0]->collation);
for (i= 1, arg= &av[... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 134,714,923,572,538,780,000,000,000,000,000,000,000 | 45 | 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. |
GF_Err nump_box_read(GF_Box *s, GF_BitStream *bs)
{
GF_NUMPBox *ptr = (GF_NUMPBox *)s;
ISOM_DECREASE_SIZE(ptr, 8);
ptr->nbPackets = gf_bs_read_u64(bs);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 294,757,654,268,122,540,000,000,000,000,000,000,000 | 7 | fixed #1587 |
utf16be_mbc_case_fold(OnigCaseFoldType flag,
const UChar** pp, const UChar* end, UChar* fold)
{
const UChar* p = *pp;
if (ONIGENC_IS_ASCII_CODE(*(p+1)) && *p == 0) {
p++;
#ifdef USE_UNICODE_CASE_FOLD_TURKISH_AZERI
if ((flag & ONIGENC_CASE_FOLD_TURKISH_AZERI) != 0) {
if (*p == 0x49) {
*fold++... | 0 | [
"CWE-125"
] | php-src | 9d6c59eeea88a3e9d7039cb4fed5126ef704593a | 14,619,335,932,294,853,000,000,000,000,000,000,000 | 27 | Fix bug #77418 - Heap overflow in utf32be_mbc_to_code |
int processing_finish(png_structp png_ptr, png_infop info_ptr) {
unsigned char footer[12] = {0, 0, 0, 0, 73, 69, 78, 68, 174, 66, 96, 130};
if (!png_ptr || !info_ptr) return 1;
if (setjmp(png_jmpbuf(png_ptr))) {
png_destroy_read_struct(&png_ptr, &info_ptr, 0);
return 1;
}
png_process_data(png_ptr, ... | 0 | [
"CWE-369"
] | libjxl | 7dfa400ded53919d986c5d3d23446a09e0cf481b | 299,930,837,348,692,720,000,000,000,000,000,000,000 | 15 | Fix handling of APNG with 0 delay_den (#313) |
int ip6_err_gen_icmpv6_unreach(struct sk_buff *skb, int nhs, int type,
unsigned int data_len)
{
struct in6_addr temp_saddr;
struct rt6_info *rt;
struct sk_buff *skb2;
u32 info = 0;
if (!pskb_may_pull(skb, nhs + sizeof(struct ipv6hdr) + 8))
return 1;
/* RFC 4884 (partial) support for ICMP extensions ... | 0 | [
"CWE-20",
"CWE-200"
] | linux | 79dc7e3f1cd323be4c81aa1a94faa1b3ed987fb2 | 279,264,975,514,688,000,000,000,000,000,000,000,000 | 57 | net: handle no dst on skb in icmp6_send
Andrey reported the following while fuzzing the kernel with syzkaller:
kasan: CONFIG_KASAN_INLINE enabled
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN
Modules linked in:
CPU: 0 PID: 3859 Comm: a.out Not tainted... |
static int bsg_open(struct inode *inode, struct file *file)
{
struct bsg_device *bd;
lock_kernel();
bd = bsg_get_device(inode, file);
unlock_kernel();
if (IS_ERR(bd))
return PTR_ERR(bd);
file->private_data = bd;
return 0;
} | 0 | [
"CWE-399"
] | linux-2.6 | f2f1fa78a155524b849edf359e42a3001ea652c0 | 167,179,195,585,021,760,000,000,000,000,000,000,000 | 14 | Enforce a minimum SG_IO timeout
There's no point in having too short SG_IO timeouts, since if the
command does end up timing out, we'll end up through the reset sequence
that is several seconds long in order to abort the command that timed
out.
As a result, shorter timeouts than a few seconds simply do not make
sense... |
int make_pages_present(unsigned long addr, unsigned long end)
{
int ret, len, write;
struct vm_area_struct * vma;
vma = find_vma(current->mm, addr);
if (!vma)
return -1;
write = (vma->vm_flags & VM_WRITE) != 0;
BUG_ON(addr >= end);
BUG_ON(end > vma->vm_end);
len = DIV_ROUND_UP(end, PAGE_SIZE) - addr/PAGE_SIZ... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 146,169,745,831,008,060,000,000,000,000,000,000,000 | 18 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
find_attendee_if_sentby (icalcomponent *ical_comp,
const gchar *address)
{
icalproperty *prop;
if (address == NULL)
return NULL;
for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
prop != NULL;
prop = icalcomponent_get_next_property (ical_comp, ... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 166,280,397,661,165,500,000,000,000,000,000,000,000 | 35 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
skip_vimgrep_pat(char_u *p, char_u **s, int *flags)
{
int c;
if (vim_isIDc(*p))
{
/* ":vimgrep pattern fname" */
if (s != NULL)
*s = p;
p = skiptowhite(p);
if (s != NULL && *p != NUL)
*p++ = NUL;
}
else
{
/* ":vimgrep /pattern/[g][j] fname" */
if (s != NULL)
*s = p + 1;
c... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 131,879,620,521,665,560,000,000,000,000,000,000,000 | 43 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial)
{
u64 vruntime;
if (first_fair(cfs_rq)) {
vruntime = min_vruntime(cfs_rq->min_vruntime,
__pick_next_entity(cfs_rq)->vruntime);
} else
vruntime = cfs_rq->min_vruntime;
/*
* The 'current' period is already promised to the current ta... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 275,895,987,838,523,030,000,000,000,000,000,000,000 | 34 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static void bnx2x_set_reset_done(struct bnx2x *bp)
{
u32 val;
u32 bit = BP_PATH(bp) ?
BNX2X_PATH1_RST_IN_PROG_BIT : BNX2X_PATH0_RST_IN_PROG_BIT;
bnx2x_acquire_hw_lock(bp, HW_LOCK_RESOURCE_RECOVERY_REG);
val = REG_RD(bp, BNX2X_RECOVERY_GLOB_REG);
/* Clear the bit */
val &= ~bit;
REG_WR(bp, BNX2X_RECOVERY_GLOB_... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 172,037,660,723,988,570,000,000,000,000,000,000,000 | 14 | 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... |
static bool check_rename_table(THD *thd, TABLE_LIST *first_table,
TABLE_LIST *all_tables)
{
DBUG_ASSERT(first_table == all_tables && first_table != 0);
TABLE_LIST *table;
for (table= first_table; table; table= table->next_local->next_local)
{
if (check_access(thd, ALTER_ACL | ... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 46,963,943,642,839,050,000,000,000,000,000,000,000 | 39 | 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... |
void ext4_error_file(struct file *file, const char *function,
unsigned int line, ext4_fsblk_t block,
const char *fmt, ...)
{
va_list args;
struct va_format vaf;
struct ext4_super_block *es;
struct inode *inode = file->f_dentry->d_inode;
char pathname[80], *path;
es = EXT4_SB(inode->i_sb)->s_es;
es... | 0 | [
"CWE-703",
"CWE-189"
] | linux | d50f2ab6f050311dbf7b8f5501b25f0bf64a439b | 170,482,954,352,489,350,000,000,000,000,000,000,000 | 29 | ext4: fix undefined behavior in ext4_fill_flex_info()
Commit 503358ae01b70ce6909d19dd01287093f6b6271c ("ext4: avoid divide by
zero when trying to mount a corrupted file system") fixes CVE-2009-4307
by performing a sanity check on s_log_groups_per_flex, since it can be
set to a bogus value by an attacker.
sbi->s_log_... |
static jas_iccattrval_t *jas_iccattrval_create0()
{
jas_iccattrval_t *attrval;
if (!(attrval = jas_malloc(sizeof(jas_iccattrval_t))))
return 0;
memset(attrval, 0, sizeof(jas_iccattrval_t));
attrval->refcnt = 0;
attrval->ops = 0;
attrval->type = 0;
return attrval;
} | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 58,132,860,740,248,820,000,000,000,000,000,000,000 | 11 | 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 MessageType anyConvert(const ProtobufWkt::Any& message) {
return MessageUtil::anyConvert<MessageType>(message);
} | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 70,405,519,370,580,805,000,000,000,000,000,000,000 | 3 | 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... |
remove_pattern (param, pattern, op)
char *param, *pattern;
int op;
{
char *xret;
if (param == NULL)
return (param);
if (*param == '\0' || pattern == NULL || *pattern == '\0') /* minor optimization */
return (savestring (param));
#if defined (HANDLE_MULTIBYTE)
if (MB_CUR_MAX > 1)
{
... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 313,016,670,000,600,360,000,000,000,000,000,000,000 | 61 | bash-4.4-rc2 release |
inline void PadV2(const T* input_data, const Dims<4>& input_dims,
const std::vector<int>& left_paddings,
const std::vector<int>& right_paddings, T* output_data,
const Dims<4>& output_dims, const T pad_value) {
TFLITE_DCHECK_EQ(left_paddings.size(), 4);
TFLITE_DC... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 216,037,004,914,596,450,000,000,000,000,000,000,000 | 18 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
virtual TYPELIB *get_typelib() const { return NULL; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 246,376,192,112,254,400,000,000,000,000,000,000,000 | 1 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
static void __xfrm_state_bump_genids(struct xfrm_state *xnew)
{
struct net *net = xs_net(xnew);
unsigned short family = xnew->props.family;
u32 reqid = xnew->props.reqid;
struct xfrm_state *x;
unsigned int h;
u32 mark = xnew->mark.v & xnew->mark.m;
u32 if_id = xnew->if_id;
h = xfrm_dst_hash(net, &xnew->id.dadd... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 182,290,623,533,868,170,000,000,000,000,000,000,000 | 21 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static int ssl_check_ca_name(STACK_OF(X509_NAME) *names, X509 *x)
{
X509_NAME *nm;
int i;
nm = X509_get_issuer_name(x);
for (i = 0; i < sk_X509_NAME_num(names); i++) {
if (!X509_NAME_cmp(nm, sk_X509_NAME_value(names, i)))
return 1;
}
return 0;
} | 0 | [] | openssl | 76343947ada960b6269090638f5391068daee88d | 291,158,032,886,860,880,000,000,000,000,000,000,000 | 11 | Fix for CVE-2015-0291
If a client renegotiates using an invalid signature algorithms extension
it will crash a server with a NULL pointer dereference.
Thanks to David Ramos of Stanford University for reporting this bug.
CVE-2015-0291
Reviewed-by: Tim Hudson <tjh@openssl.org>
Conflicts:
ssl/t1_lib.c |
Item_hex_hybrid(THD *thd): Item_hex_constant(thd) {} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 134,749,982,190,116,730,000,000,000,000,000,000,000 | 1 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
break_new(mrb_state *mrb, uint32_t tag, const struct RProc *p, mrb_value val)
{
struct RBreak *brk;
brk = MRB_OBJ_ALLOC(mrb, MRB_TT_BREAK, NULL);
mrb_break_proc_set(brk, p);
mrb_break_value_set(brk, val);
mrb_break_tag_set(brk, tag);
return brk;
} | 0 | [
"CWE-122",
"CWE-787"
] | mruby | 47068ae07a5fa3aa9a1879cdfe98a9ce0f339299 | 172,084,353,982,767,030,000,000,000,000,000,000,000 | 11 | vm.c: packed arguments length may be zero for `send` method. |
static int io_register_personality(struct io_ring_ctx *ctx)
{
const struct cred *creds = get_current_cred();
int id;
id = idr_alloc_cyclic(&ctx->personality_idr, (void *) creds, 1,
USHRT_MAX, GFP_KERNEL);
if (id < 0)
put_cred(creds);
return id;
} | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 152,337,915,474,341,900,000,000,000,000,000,000,000 | 11 | 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 int is_vma_resv_set(struct vm_area_struct *vma, unsigned long flag)
{
VM_BUG_ON_VMA(!is_vm_hugetlb_page(vma), vma);
return (get_vma_private_data(vma) & flag) != 0;
} | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 117,519,371,421,592,740,000,000,000,000,000,000,000 | 6 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
static NTSTATUS open_mode_check(connection_struct *conn,
struct share_mode_lock *lck,
uint32_t access_mask,
uint32_t share_access)
{
uint32_t i;
if(lck->data->num_share_modes == 0) {
return NT_STATUS_OK;
}
if (is_stat_open(access_mask)) {
/* Stat open that doesn't trigger oplock breaks or share mo... | 0 | [
"CWE-835"
] | samba | 10c3e3923022485c720f322ca4f0aca5d7501310 | 156,139,481,947,558,440,000,000,000,000,000,000,000 | 50 | s3: smbd: Don't loop infinitely on bad-symlink resolution.
In the FILE_OPEN_IF case we have O_CREAT, but not
O_EXCL. Previously we went into a loop trying first
~(O_CREAT|O_EXCL), and if that returned ENOENT
try (O_CREAT|O_EXCL). We kept looping indefinately
until we got an error, or the file was created or
opened.
T... |
static int rpmsg_ept_cb(struct rpmsg_device *rpdev, void *buf, int len,
void *priv, u32 addr)
{
struct rpmsg_eptdev *eptdev = priv;
struct sk_buff *skb;
skb = alloc_skb(len, GFP_ATOMIC);
if (!skb)
return -ENOMEM;
skb_put_data(skb, buf, len);
spin_lock(&eptdev->queue_lock);
skb_queue_tail(&eptdev->queue, ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | bbe692e349e2a1edf3fe0a29a0e05899c9c94d51 | 291,579,155,435,979,850,000,000,000,000,000,000,000 | 21 | rpmsg: char: release allocated memory
In rpmsg_eptdev_write_iter, if copy_from_iter_full fails the allocated
buffer needs to be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> |
IRBuilder &LReference::getBuilder() {
return irgen_->Builder;
} | 0 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 289,999,767,519,857,950,000,000,000,000,000,000,000 | 3 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
rpc_restart_call_prepare(struct rpc_task *task)
{
if (RPC_ASSASSINATED(task))
return 0;
task->tk_action = rpc_prepare_task;
return 1;
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 93,896,886,790,676,040,000,000,000,000,000,000,000 | 7 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
mspack_create_chm_decompressor(struct mspack_system *sys)
{
struct mschm_decompressor_p *self = NULL;
if (!sys) sys = mspack_default_system;
if (!mspack_valid_system(sys)) return NULL;
if ((self = (struct mschm_decompressor_p *) sys->alloc(sys, sizeof(struct mschm_decompressor_p)))) {
self->base.open ... | 0 | [
"CWE-20",
"CWE-193",
"CWE-682"
] | libmspack | 72e70a921f0f07fee748aec2274b30784e1d312a | 294,488,132,533,805,920,000,000,000,000,000,000,000 | 20 | Fix off-by-one bounds check on CHM PMGI/PMGL chunk numbers and
reject empty filenames. Thanks to Hanno Böck for reporting |
read_rep_section(FILE *fd, garray_T *gap, short *first)
{
int cnt;
fromto_T *ftp;
int i;
cnt = get2c(fd); /* <repcount> */
if (cnt < 0)
return SP_TRUNCERROR;
if (ga_grow(gap, cnt) == FAIL)
return SP_OTHERERROR;
/* <rep> : <repfromlen> <repfrom> <reptolen> <repto> */
for (; gap... | 0 | [
"CWE-190"
] | vim | 399c297aa93afe2c0a39e2a1b3f972aebba44c9d | 245,913,801,845,413,100,000,000,000,000,000,000,000 | 43 | patch 8.0.0322: possible overflow with corrupted spell file
Problem: Possible overflow with spell file where the tree length is
corrupted.
Solution: Check for an invalid length (suggested by shqking) |
static NTSTATUS dcesrv_lsa_LSARUNREGISTERAUDITEVENT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
struct lsa_LSARUNREGISTERAUDITEVENT *r)
{
DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 269,957,736,621,198,640,000,000,000,000,000,000,000 | 5 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
void sinterstoreCommand(client *c) {
sinterGenericCommand(c,c->argv+2,c->argc-2,c->argv[1]);
} | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 168,197,472,857,041,800,000,000,000,000,000,000,000 | 3 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
static int aesni_cbc_hmac_sha1_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
const unsigned char *in, size_t len)
{
EVP_AES_HMAC_SHA1 *key = data(ctx);
unsigned int l;
size_t plen = key->payload_length, iv = 0, /* explicit IV in TLS 1.1 and
... | 0 | [
"CWE-310"
] | openssl | 4159f311671cf3bac03815e5de44681eb758304a | 220,060,526,159,493,280,000,000,000,000,000,000,000 | 289 | Check that we have enough padding characters.
Reviewed-by: Emilia Käsper <emilia@openssl.org>
CVE-2016-2107
MR: #2572 |
//! Load image from a DLM file \newinstance.
static CImg<T> get_load_dlm(std::FILE *const file) {
return CImg<T>().load_dlm(file); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 125,127,478,354,924,840,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
uint32_t CompactProtocolWriter::serializedSizeMapEnd() const {
return 0;
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | c9a903e5902834e95bbd4ab0e9fa53ba0189f351 | 178,995,156,940,505,100,000,000,000,000,000,000,000 | 3 | Better handling of truncated data when reading strings
Summary:
Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB).
This diff changes the logic to check if we have enough data in the buffer bef... |
WandExport void DrawSetTextDecoration(DrawingWand *wand,
const DecorationType decoration)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if ((wand->filter_off != Mag... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 329,696,473,094,628,140,000,000,000,000,000,000,000 | 15 | https://github.com/ImageMagick/ImageMagick/issues/716 |
void Compute(OpKernelContext* ctx) override {
StagingMap<Ordered>* map = nullptr;
OP_REQUIRES_OK(ctx, GetStagingMap(ctx, def(), &map));
core::ScopedUnref scope(map);
// Allocate size output tensor
Tensor* size = nullptr;
OP_REQUIRES_OK(ctx, ctx->allocate_output(0, TensorShape({}), &size));
... | 0 | [
"CWE-20",
"CWE-476"
] | tensorflow | d7de67733925de196ec8863a33445b73f9562d1d | 136,690,776,941,916,170,000,000,000,000,000,000,000 | 12 | Prevent a CHECK-fail due to empty tensor input in `map_stage_op.cc`
PiperOrigin-RevId: 387737906
Change-Id: Idc52df0c71c7ed6e2dd633b651a581932f277c8a |
static gboolean gdk_pixbuf__bmp_image_stop_load(gpointer data, GError **error)
{
gboolean retval = TRUE;
struct bmp_progressive_state *context =
(struct bmp_progressive_state *) data;
/* FIXME this thing needs to report errors if
* we have unused image data
*/
g_return_val_if_fail... | 0 | [] | gdk-pixbuf | 779429ce34e439c01d257444fe9d6739e72a2024 | 56,953,584,008,212,280,000,000,000,000,000,000,000 | 33 | bmp: Detect integer overflow of the line width
Instead of risking crashes or OOM, return an error if
we detect integer overflow.
The commit also includes a test image that triggers
this overflow when used with pixbuf-read.
https://bugzilla.gnome.org/show_bug.cgi?id=768738 |
ebt_register_table(struct net *net, const struct ebt_table *input_table)
{
struct ebt_table_info *newinfo;
struct ebt_table *t, *table;
struct ebt_replace_kernel *repl;
int ret, i, countersize;
void *p;
if (input_table == NULL || (repl = input_table->table) == NULL ||
repl->entries == NULL || repl->entries_... | 0 | [
"CWE-20"
] | linux | d846f71195d57b0bbb143382647c2c6638b04c5a | 196,919,058,296,979,280,000,000,000,000,000,000,000 | 99 | bridge: netfilter: fix information leak
Struct tmp is copied from userspace. It is not checked whether the "name"
field is NULL terminated. This may lead to buffer overflow and passing
contents of kernel stack as a module name to try_then_request_module() and,
consequently, to modprobe commandline. It would be seen... |
action_text(
nic_rule_action action
)
{
const char *t;
switch (action) {
default:
t = "ERROR"; /* quiet uninit warning */
DPRINTF(1, ("fatal: unknown nic_rule_action %d\n",
action));
ENSURE(0);
break;
case ACTION_LISTEN:
t = "listen";
break;
case ACTION_IGNORE:
t = "ignore";
break;
c... | 0 | [
"CWE-287"
] | ntp | 71a962710bfe066f76da9679cf4cfdeffe34e95e | 336,630,369,161,610,240,000,000,000,000,000,000,000 | 30 | [Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn. |
static void nl_fib_lookup(struct net *net, struct fib_result_nl *frn)
{
struct fib_result res;
struct flowi4 fl4 = {
.flowi4_mark = frn->fl_mark,
.daddr = frn->fl_addr,
.flowi4_tos = frn->fl_tos,
.flowi4_scope = frn->fl_scope,
};
struct fib_table *tb;
rcu_read_lock();
tb = fib_get_table... | 0 | [
"CWE-399"
] | net-next | fbd40ea0180a2d328c5adc61414dc8bab9335ce2 | 172,966,665,798,671,100,000,000,000,000,000,000,000 | 34 | ipv4: Don't do expensive useless work during inetdev destroy.
When an inetdev is destroyed, every address assigned to the interface
is removed. And in this scenerio we do two pointless things which can
be very expensive if the number of assigned interfaces is large:
1) Address promotion. We are deleting all address... |
TEST_F(StreamInfoImplTest, BytesTest) {
StreamInfoImpl stream_info(Http::Protocol::Http2, test_time_.timeSystem(), nullptr);
const uint64_t bytes_sent = 7;
const uint64_t bytes_received = 12;
stream_info.addBytesSent(bytes_sent);
stream_info.addBytesReceived(bytes_received);
EXPECT_EQ(bytes_sent, stream_... | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 271,730,790,973,210,670,000,000,000,000,000,000,000 | 12 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static int stimer_set_config(struct kvm_vcpu_hv_stimer *stimer, u64 config,
bool host)
{
union hv_stimer_config new_config = {.as_uint64 = config},
old_config = {.as_uint64 = stimer->config.as_uint64};
struct kvm_vcpu *vcpu = hv_stimer_to_vcpu(stimer);
struct kvm_vcpu_hv *hv_vcpu = to_hv_vcpu(vcpu);
struc... | 0 | [
"CWE-476"
] | linux | b1e34d325397a33d97d845e312d7cf2a8b646b44 | 259,346,317,376,889,200,000,000,000,000,000,000,000 | 31 | KVM: x86: Forbid VMM to set SYNIC/STIMER MSRs when SynIC wasn't activated
Setting non-zero values to SYNIC/STIMER MSRs activates certain features,
this should not happen when KVM_CAP_HYPERV_SYNIC{,2} was not activated.
Note, it would've been better to forbid writing anything to SYNIC/STIMER
MSRs, including zeroes, ho... |
get_page_render_details(fz_context *ctx, fz_page *page, render_details *render)
{
float page_width, page_height;
int rot;
float s_x, s_y;
render->page = page;
render->list = NULL;
render->num_workers = num_workers;
render->bounds = fz_bound_page(ctx, page);
page_width = (render->bounds.x1 - render->bounds.x0)... | 0 | [
"CWE-369",
"CWE-22"
] | mupdf | 22c47acbd52949421f8c7cb46ea1556827d0fcbf | 61,402,250,459,759,630,000,000,000,000,000,000,000 | 81 | Bug 704834: Fix division by zero for zero width pages in muraster. |
static void child_msg_onlinestatus(int msg_type, struct process_id src,
void *buf, size_t len, void *private_data)
{
TALLOC_CTX *mem_ctx;
const char *message;
struct process_id *sender;
DEBUG(5,("winbind_msg_onlinestatus received.\n"));
if (!buf) {
return;
}
sender = (struct process_id *)buf;
mem_... | 0 | [] | samba | c93d42969451949566327e7fdbf29bfcee2c8319 | 248,465,118,807,215,460,000,000,000,000,000,000,000 | 31 | Back-port of Volkers fix.
Fix a race condition in winbind leading to a crash
When SIGCHLD handling is delayed for some reason, sending a request to a child
can fail early because the child has died already. In this case
async_main_request_sent() directly called the continuation function without
pr... |
static int x509_get_version( unsigned char **p,
const unsigned char *end,
int *ver )
{
int ret;
size_t len;
if( ( ret = mbedtls_asn1_get_tag( p, end, &len,
MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED | 0 ) ) != 0 )
{
... | 0 | [
"CWE-287",
"CWE-284"
] | mbedtls | d15795acd5074e0b44e71f7ede8bdfe1b48591fc | 62,100,417,877,547,620,000,000,000,000,000,000,000 | 30 | Improve behaviour on fatal errors
If we didn't walk the whole chain, then there may be any kind of errors in the
part of the chain we didn't check, so setting all flags looks like the safe
thing to do. |
free_buf_options(
buf_T *buf,
int free_p_ff)
{
if (free_p_ff)
{
clear_string_option(&buf->b_p_fenc);
clear_string_option(&buf->b_p_ff);
clear_string_option(&buf->b_p_bh);
clear_string_option(&buf->b_p_bt);
}
#ifdef FEAT_FIND_ID
clear_string_option(&buf->b_p_def);
clear_string_option(&bu... | 1 | [
"CWE-416"
] | vim | 9b4a80a66544f2782040b641498754bcb5b8d461 | 108,917,920,630,831,060,000,000,000,000,000,000,000 | 122 | patch 8.2.4281: using freed memory with :lopen and :bwipe
Problem: Using freed memory with :lopen and :bwipe.
Solution: Do not use a wiped out buffer. |
compile_gimmick_node(GimmickNode* node, regex_t* reg)
{
int r;
switch (node->type) {
case GIMMICK_FAIL:
r = add_op(reg, OP_FAIL);
break;
case GIMMICK_SAVE:
r = add_op(reg, OP_PUSH_SAVE_VAL);
if (r != 0) return r;
COP(reg)->push_save_val.type = node->detail_type;
COP(reg)->push_save_val... | 0 | [
"CWE-476",
"CWE-125"
] | oniguruma | c509265c5f6ae7264f7b8a8aae1cfa5fc59d108c | 214,666,603,635,932,440,000,000,000,000,000,000,000 | 52 | Fix CVE-2019-13225: problem in converting if-then-else pattern to bytecode. |
read_one_cert (ReadFromGConfInfo *info,
const char *setting_name,
const char *key)
{
char *value = NULL;
if (!nm_gconf_get_string_helper (info->client, info->dir, key, setting_name, &value))
return;
g_object_set_data_full (G_OBJECT (info->connection),
key, v... | 1 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 57,641,357,943,977,500,000,000,000,000,000,000,000 | 13 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
static inline void update_blocked_averages(int cpu)
{
struct rq *rq = cpu_rq(cpu);
struct cfs_rq *cfs_rq = &rq->cfs;
const struct sched_class *curr_class;
struct rq_flags rf;
rq_lock_irqsave(rq, &rf);
update_rq_clock(rq);
update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq);
curr_class = rq->curr->sched_... | 1 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 96,039,933,554,210,430,000,000,000,000,000,000,000 | 22 | 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... |
quicklist *quicklistNew(int fill, int compress) {
quicklist *quicklist = quicklistCreate();
quicklistSetOptions(quicklist, fill, compress);
return quicklist;
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 132,879,210,070,221,500,000,000,000,000,000,000,000 | 5 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.