func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
GBool isReverseVideo() { return reverseVideo; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 200,308,617,566,846,700,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
Character(char ch) : ch_(ch) {} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 60,461,608,608,223,270,000,000,000,000,000,000,000 | 1 | Fix #122 |
static char *auto_complete(CHANNEL_REC *channel, const char *line)
{
GList *comp;
const char *p;
char *nick, *ret;
p = strstr(line, completion_char);
if (p == NULL)
return NULL;
nick = g_strndup(line, (int) (p-line));
ret = NULL;
if (nicklist_find(channel, nick) == NULL) {
... | 0 | [
"CWE-416"
] | irssi | 36564717c9f701e3a339da362ab46d220d27e0c1 | 251,556,549,473,699,030,000,000,000,000,000,000,000 | 27 | Merge branch 'security' into 'master'
Security
See merge request irssi/irssi!34
(cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) |
static void test23(char const* infile,
char const* password,
char const* outfile,
char const* outfile2)
{
QPDF_ERROR_CODE status = 0;
qpdf_read(qpdf, infile, password);
status = qpdf_check_pdf(qpdf);
printf("status: %d\n", status);
report_errors();
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 66,720,826,248,246,200,000,000,000,000,000,000,000 | 11 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static void register_hooks(apr_pool_t *p)
{
static const char * const cfgPost[]={ "http_core.c", NULL };
static const char * const parsePre[]={ "mod_proxy.c", NULL };
ap_hook_pre_config(pre_init, NULL, NULL, APR_HOOK_MIDDLE);
ap_hook_post_config(initialize_module, NULL, cfgPost, APR_HOOK_MIDDLE);
a... | 0 | [
"CWE-787"
] | httpd | 3b6431eb9c9dba603385f70a2131ab4a01bf0d3b | 60,486,314,079,750,730,000,000,000,000,000,000,000 | 17 | Merge r1885659 from trunk:
mod_auth_digest: Fast validation of the nonce's base64 to fail early if
the format can't match anyway.
Submitted by: ylavic
Reviewed by: ylavic, covener, jailletc36
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1885666 13f79535-47bb-0310-9956-ffa... |
static bool uhid_send_input_report(struct input_device *idev,
const uint8_t *data, size_t size)
{
struct uhid_event ev;
int err;
if (data == NULL)
size = 0;
if (size > sizeof(ev.u.input.data))
size = sizeof(ev.u.input.data);
if (!idev->uhid_created) {
DBG("HID report (%zu bytes) dropped", size);
re... | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 298,845,394,353,987,000,000,000,000,000,000,000,000 | 34 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev,
u32 portid, u32 seq, int event, unsigned int flags)
{
struct net_device *dev = idev->dev;
struct ifinfomsg *hdr;
struct nlmsghdr *nlh;
void *protoinfo;
nlh = nlmsg_put(skb, portid, seq, event, sizeof(*hdr), flags);
if (nlh == NULL)... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 64,392,894,602,204,150,000,000,000,000,000,000,000 | 41 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
static int fname_decrypt(struct inode *inode,
const struct fscrypt_str *iname,
struct fscrypt_str *oname)
{
struct skcipher_request *req = NULL;
DECLARE_FS_COMPLETION_RESULT(ecr);
struct scatterlist src_sg, dst_sg;
struct fscrypt_info *ci = inode->i_crypt_info;
struct crypto_skcipher *tfm = ci->ci_ctfm;
i... | 0 | [
"CWE-416",
"CWE-476"
] | linux | 1b53cf9815bb4744958d41f3795d5d5a1d365e2d | 208,816,448,682,556,140,000,000,000,000,000,000,000 | 50 | fscrypt: remove broken support for detecting keyring key revocation
Filesystem encryption ostensibly supported revoking a keyring key that
had been used to "unlock" encrypted files, causing those files to become
"locked" again. This was, however, buggy for several reasons, the most
severe of which was that when key r... |
void CLASS Canon_WBpresets(int skip1, int skip2)
{
int c;
FORC4 imgdata.color.WB_Coeffs[LIBRAW_WBI_Daylight][c ^ (c >> 1)] = get2();
if (skip1)
fseek(ifp, skip1, SEEK_CUR);
FORC4 imgdata.color.WB_Coeffs[LIBRAW_WBI_Shade][c ^ (c >> 1)] = get2();
if (skip1)
fseek(ifp, skip1, SEEK_CUR);
FORC4 imgdata.c... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 125,399,763,498,859,880,000,000,000,000,000,000,000 | 21 | Secunia SA75000 advisory: several buffer overruns |
bool stringHasTokenAtIndex(size_t index, const std::string& input, const std::string& token) {
if (token.size() + index > input.size()) {
return false;
}
return input.compare(index, token.size(), token) == 0;
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 302,502,622,415,357,950,000,000,000,000,000,000,000 | 6 | SERVER-38070 fix infinite loop in agg expression |
symbols_pack (void)
{
symbols = xcalloc (nsyms, sizeof *symbols);
for (int i = 0; symbols_sorted[i]; ++i)
symbol_pack (symbols_sorted[i]);
/* Aliases leave empty slots in symbols, so remove them. */
{
int nsyms_old = nsyms;
for (int writei = 0, readi = 0; readi < nsyms_old; readi += 1)
{
... | 0 | [] | bison | b7aab2dbad43aaf14eebe78d54aafa245a000988 | 339,126,648,436,386,600,000,000,000,000,000,000,000 | 49 | fix: crash when redefining the EOF token
Reported by Agency for Defense Development.
https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html
On an empty such as
%token FOO
BAR
FOO 0
%%
input: %empty
we crash because when we find FOO 0, we decrement ntokens (since FOO
was discovered... |
struct io_cancel_data *cd)
__must_hold(&ctx->completion_lock)
{
struct io_kiocb *req;
int i;
for (i = 0; i < (1U << ctx->cancel_hash_bits); i++) {
struct hlist_head *list;
list = &ctx->cancel_hash[i];
hlist_for_each_entry(req, list, hash_node) {
if (!(cd->flags & IORING_ASYNC_CANCEL_ANY) &&
... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 131,624,708,677,940,780,000,000,000,000,000,000,000 | 21 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
static CURLcode bearssl_sha256sum(const unsigned char *input,
size_t inputlen,
unsigned char *sha256sum,
size_t sha256len UNUSED_PARAM)
{
br_sha256_context ctx;
br_sha256_init(&ctx);
br_sha256_update(&ctx, input... | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 128,290,714,367,840,230,000,000,000,000,000,000,000 | 12 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
static GF_Err gf_isom_dump_ttxt_track(GF_ISOFile *the_file, u32 track, FILE *dump, Bool box_dump)
{
u32 i, j, count, di, nb_descs, shift_offset[20], so_count;
u64 last_DTS;
size_t len;
GF_Box *a;
Bool has_scroll;
char szDur[100];
GF_Tx3gSampleEntryBox *txt;
GF_TrackBox *trak = gf_isom_get_track_from_file(the_f... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 26,158,964,388,090,650,000,000,000,000,000,000,000 | 335 | fixed 2 possible heap overflows (inc. #1088) |
int Field_varstring::key_cmp(const uchar *key_ptr, uint max_key_length)
{
uint length= length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
uint local_char_length= max_key_length / field_charset->mbmaxlen;
local_char_length= my_charpos(field_charset, ptr + length_bytes,
ptr + length_bytes... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 63,719,946,544,344,530,000,000,000,000,000,000,000 | 15 | 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... |
_gnutls_x509_decode_string(unsigned int etype,
const uint8_t * der, size_t der_size,
gnutls_datum_t * output, unsigned allow_ber)
{
int ret;
uint8_t *str;
unsigned int str_size, len;
gnutls_datum_t td;
#ifdef HAVE_ASN1_DECODE_SIMPLE_BER
if (allow_ber)
ret =
asn1_decode_simple_ber(etype, der, d... | 0 | [] | gnutls | 272854367efc130fbd4f1a51840d80c630214e12 | 332,758,606,039,787,300,000,000,000,000,000,000,000 | 60 | Reset the output value on error in _gnutls_x509_dn_to_string()
Reported by Kurt Roeckx. |
gpa_t kvm_mmu_gva_to_gpa_system(struct kvm_vcpu *vcpu, gva_t gva,
struct x86_exception *exception)
{
struct kvm_mmu *mmu = vcpu->arch.walk_mmu;
return mmu->gva_to_gpa(vcpu, mmu, gva, 0, exception);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 220,280,158,132,763,250,000,000,000,000,000,000,000 | 7 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
void SELECT_LEX::lex_start(LEX *plex)
{
SELECT_LEX_UNIT *unit= &plex->unit;
/* 'parent_lex' is used in init_query() so it must be before it. */
parent_lex= plex;
init_query();
master= unit;
prev= &unit->slave;
link_next= slave= next= 0;
link_prev= (st_select_lex_node**)&(plex->all_selects_list);
DBUG_... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 147,598,666,820,068,300,000,000,000,000,000,000,000 | 19 | 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 do_json_objects(QPDF& pdf, Options& o, JSON& j)
{
// Add all objects. Do this first before other code below modifies
// things by doing stuff like calling
// pushInheritedAttributesToPage.
bool all_objects = o.json_objects.empty();
std::set<QPDFObjGen> wanted_og;
for (std::set<std::s... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 67,837,725,085,317,800,000,000,000,000,000,000,000 | 36 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static void mg_dns_free(struct dns_data *d) {
LIST_DELETE(struct dns_data, &s_reqs, d);
free(d);
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 291,098,667,406,549,600,000,000,000,000,000,000,000 | 4 | Protect against the directory traversal in mg_upload() |
qf_get_nth_above_entry(qfline_T *entry, int n, int linewise, int *errornr)
{
while (n-- > 0 && !got_int)
{
if (entry->qf_prev == NULL
|| entry->qf_prev->qf_fnum != entry->qf_fnum)
break;
entry = entry->qf_prev;
--*errornr;
// If multiple entries are on the same line, then use the first entry
if (l... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 176,962,817,644,785,730,000,000,000,000,000,000,000 | 16 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
int handler::update_auto_increment()
{
ulonglong nr, nb_reserved_values;
bool append= FALSE;
THD *thd= table->in_use;
struct system_variables *variables= &thd->variables;
int result=0, tmp;
DBUG_ENTER("handler::update_auto_increment");
/*
next_insert_id is a "cursor" into the reserved interval, it ma... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 258,659,387,207,523,960,000,000,000,000,000,000,000 | 226 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
int vmw_gb_surface_define_ioctl(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
struct vmw_private *dev_priv = vmw_priv(dev);
struct vmw_user_surface *user_srf;
struct vmw_surface *srf;
struct vmw_resource *res;
struct vmw_resource *tmp;
union drm_vmw_gb_surface_create_arg *arg =
(union... | 1 | [
"CWE-200"
] | linux | 07678eca2cf9c9a18584e546c2b2a0d0c9a3150c | 329,068,265,810,383,470,000,000,000,000,000,000,000 | 111 | drm/vmwgfx: Make sure backup_handle is always valid
When vmw_gb_surface_define_ioctl() is called with an existing buffer,
we end up returning an uninitialized variable in the backup_handle.
The fix is to first initialize backup_handle to 0 just to be sure, and
second, when a user-provided buffer is found, we will use... |
static int imap_msg_open_new(struct Context *ctx, struct Message *msg, struct Header *hdr)
{
char tmp[PATH_MAX];
mutt_mktemp(tmp, sizeof(tmp));
msg->fp = mutt_file_fopen(tmp, "w");
if (!msg->fp)
{
mutt_perror(tmp);
return -1;
}
msg->path = mutt_str_strdup(tmp);
return 0;
} | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | 95e80bf9ff10f68cb6443f760b85df4117cb15eb | 208,363,579,858,639,130,000,000,000,000,000,000,000 | 14 | Quote path in imap_subscribe |
int get_num_images(char *imgdirpath)
{
DIR *dir;
struct dirent* content;
int num_images = 0;
/*Reading the input images from given input directory*/
dir = opendir(imgdirpath);
if (!dir) {
fprintf(stderr, "Could not open Folder %s\n", imgdirpath);
return 0;
}
while ((co... | 0 | [
"CWE-824"
] | openjpeg | 0afbdcf3e6d0d2bd2e16a0c4d513ee3cf86e460d | 273,955,909,069,617,230,000,000,000,000,000,000,000 | 23 | Fix segfault in src/bin/jp2/opj_decompress.c due to uninitialized pointer (fixes #1368) (#1369) |
bool attemptToParseGenericExpression(ParseContext* parseCtx,
const FieldPath& path,
const BSONObj& subObj,
ProjectionPathASTNode* parent) {
if (!Expression::isExpressionName(subObj.firstElementFieldNameStr... | 0 | [
"CWE-732"
] | mongo | cd583b6c4d8aa2364f255992708b9bb54e110cf4 | 83,619,272,104,887,340,000,000,000,000,000,000,000 | 26 | SERVER-53929 Add stricter parser checks around positional projection |
vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev,
struct VhostUserMsg *msg)
{
uint16_t vring_idx;
switch (msg->request.master) {
case VHOST_USER_SET_VRING_KICK:
case VHOST_USER_SET_VRING_CALL:
case VHOST_USER_SET_VRING_ERR:
vring_idx = msg->payload.u64 & VHOST_USER_VRING_IDX_MASK;
break;
case ... | 0 | [] | dpdk | 612e17cf6d7b2bf05a687d8a9ba7be582a744e50 | 79,247,182,918,343,010,000,000,000,000,000,000,000 | 34 | vhost: fix possible denial of service on SET_VRING_NUM
vhost_user_set_vring_num() performs multiple allocations
without checking whether data were previously allocated.
It may cause a denial of service because of the memory leaks
that happen if a malicious vhost-user master keeps sending
VHOST_USER_SET_VRING_NUM requ... |
bool Aggregator_distinct::unique_walk_function(void *element)
{
memcpy(table->field[0]->ptr, element, tree_key_length);
item_sum->add();
return 0;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 147,894,728,546,462,080,000,000,000,000,000,000,000 | 6 | 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 int parse_group (BUFFER *buf, BUFFER *s, unsigned long data, BUFFER *err)
{
group_context_t *gc = NULL;
group_state_t state = NONE;
ADDRESS *addr = NULL;
char *estr = NULL;
do
{
mutt_extract_token (buf, s, 0);
if (parse_group_context (&gc, buf, s, data, err) == -1)
goto bail;
if (... | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 141,544,472,597,941,510,000,000,000,000,000,000,000 | 69 | use a 64-bit random value in temporary filenames.
closes #3158 |
msdos_type_find (GstTypeFind * tf, gpointer unused)
{
const guint8 *data = gst_type_find_peek (tf, 0, 64);
if (data && data[0] == 'M' && data[1] == 'Z' &&
GST_READ_UINT16_LE (data + 8) == 4) {
guint32 pe_offset = GST_READ_UINT32_LE (data + 60);
data = gst_type_find_peek (tf, pe_offset, 2);
if (d... | 0 | [
"CWE-125"
] | gst-plugins-base | 2fdccfd64fc609e44e9c4b8eed5bfdc0ab9c9095 | 149,458,636,014,801,740,000,000,000,000,000,000,000 | 14 | typefind: bounds check windows ico detection
Fixes out of bounds read
https://bugzilla.gnome.org/show_bug.cgi?id=774902 |
CImg<T>& object3dtoCImg3d(const bool full_check=true) {
return get_object3dtoCImg3d(full_check).move_to(*this);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 286,880,490,153,680,800,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int tar_set(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
return user_regset_copyin(&pos, &count, &kbuf, &ubuf,
&target->thread.tar, 0, sizeof(u64));
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 272,827,821,376,308,150,000,000,000,000,000,000,000 | 8 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
static void memcpy_to_page(struct page *page, size_t offset, const char *from, size_t len)
{
char *to = kmap_atomic(page);
memcpy(to + offset, from, len);
kunmap_atomic(to);
} | 0 | [
"CWE-200"
] | linux | b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb | 76,939,798,761,602,220,000,000,000,000,000,000,000 | 6 | fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buffers. If that happened, none of them had been released,
leaving pipe full. Worse, it was trivial to trigger and we end up ... |
coolkey_v1_get_attribute_record_len(const u8 *attr, size_t buf_len)
{
size_t attribute_len = sizeof(coolkey_attribute_header_t);
size_t len = 0;
int r;
r = coolkey_v1_get_attribute_len(attr, buf_len, &len, 1);
if (r < 0) {
return buf_len; /* skip to the end, ignore the rest of the record */
}
return MIN(buf_... | 0 | [
"CWE-415"
] | OpenSC | c246f6f69a749d4f68626b40795a4f69168008f4 | 10,644,714,771,748,371,000,000,000,000,000,000,000 | 13 | coolkey: Make sure the object ID is unique when filling list
Thanks to oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208 |
void http_msg_analyzer(struct http_msg *msg, struct hdr_idx *idx)
{
unsigned int state; /* updated only when leaving the FSM */
register char *ptr, *end; /* request pointers, to avoid dereferences */
struct buffer *buf;
state = msg->msg_state;
buf = msg->chn->buf;
ptr = buf->p + msg->next;
end = buf->p + ... | 0 | [] | haproxy | aae75e3279c6c9bd136413a72dafdcd4986bb89a | 149,236,183,715,031,890,000,000,000,000,000,000,000 | 303 | 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... |
static int ip_vs_genl_dump_services(struct sk_buff *skb,
struct netlink_callback *cb)
{
int idx = 0, i;
int start = cb->args[0];
struct ip_vs_service *svc;
struct net *net = skb_sknet(skb);
mutex_lock(&__ip_vs_mutex);
for (i = 0; i < IP_VS_SVC_TAB_SIZE; i++) {
list_for_each_entry(svc, &ip_vs_svc_table[... | 0 | [
"CWE-200"
] | linux | 2d8a041b7bfe1097af21441cb77d6af95f4f4680 | 158,883,018,532,649,500,000,000,000,000,000,000,000 | 37 | ipvs: fix info leak in getsockopt(IP_VS_SO_GET_TIMEOUT)
If at least one of CONFIG_IP_VS_PROTO_TCP or CONFIG_IP_VS_PROTO_UDP is
not set, __ip_vs_get_timeouts() does not fully initialize the structure
that gets copied to userland and that for leaks up to 12 bytes of kernel
stack. Add an explicit memset(0) before passing... |
megasas_check_reset_xscale(struct megasas_instance *instance,
struct megasas_register_set __iomem *regs)
{
if ((atomic_read(&instance->adprecovery) != MEGASAS_HBA_OPERATIONAL) &&
(le32_to_cpu(*instance->consumer) ==
MEGASAS_ADPRESET_INPROG_SIGN))
return 1;
return 0;
} | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 228,841,022,162,675,430,000,000,000,000,000,000,000 | 9 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
static void auth_server_reconnect_timeout(struct auth_server_connection *conn)
{
(void)auth_server_connection_connect(conn);
} | 0 | [] | core | a9b135760aea6d1790d447d351c56b78889dac22 | 196,873,985,221,575,700,000,000,000,000,000,000,000 | 4 | lib-auth: Remove request after abort
Otherwise the request will still stay in hash table
and get dereferenced when all requests are aborted
causing an attempt to access free'd memory.
Found by Apollon Oikonomopoulos <apoikos@debian.org>
Broken in 1a29ed2f96da1be22fa5a4d96c7583aa81b8b060 |
inline const char* option(const char *const name, const int argc, const char *const *const argv,
const char *const _default, const char *const usage=0) {
return option(name,argc,argv,_default,usage,false);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 166,778,377,463,787,140,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
x509::~x509()
{
ysArrayDelete(buffer_);
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 66,102,226,981,302,070,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
flatpak_context_load_metadata (FlatpakContext *context,
GKeyFile *metakey,
GError **error)
{
gboolean remove;
g_auto(GStrv) groups = NULL;
gsize i;
if (g_key_file_has_key (metakey, FLATPAK_METADATA_GROUP_CONTEXT, FLATPAK_METADATA_KEY_SH... | 0 | [
"CWE-74"
] | flatpak | 4108e022452303093d8b90c838695a0476cb09c7 | 204,720,100,094,647,120,000,000,000,000,000,000,000 | 247 | context: Add --unset-env option and a corresponding override
This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality
that I noticed while resolving that vulnerability, but is not required
for fixing the vulnerability.
Signed-off-by: Simon McVittie <smcv@collabora.com> |
//! Append two images along specified axis \specialization.
CImg<T> get_append(const CImg<T>& img, const char axis='x', const float align=0) const {
if (is_empty()) return +img;
if (!img) return +*this;
return CImgList<T>(*this,img,true).get_append(axis,align); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 1,890,860,671,912,762,700,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
void mysql_read_default_options(struct st_mysql_options *options,
const char *filename,const char *group)
{
int argc;
char *argv_buff[1],**argv;
const char *groups[5];
DBUG_ENTER("mysql_read_default_options");
DBUG_PRINT("enter",("file: %s group: %s",filename,group ? group :"NULL"));
compile_time_asse... | 0 | [] | server | f5369faf5bbfb56b5e945836eb3f7c7ee88b4079 | 50,205,267,544,689,050,000,000,000,000,000,000,000 | 213 | don't disable SSL when connecting via libmysqld |
static int crypto_report_one(struct crypto_alg *alg,
struct crypto_user_alg *ualg, struct sk_buff *skb)
{
strlcpy(ualg->cru_name, alg->cra_name, sizeof(ualg->cru_name));
strlcpy(ualg->cru_driver_name, alg->cra_driver_name,
sizeof(ualg->cru_driver_name));
strlcpy(ualg->cru_module_name, module_name(alg->cra_... | 1 | [
"CWE-200"
] | linux | f43f39958beb206b53292801e216d9b8a660f087 | 113,204,639,660,369,490,000,000,000,000,000,000,000 | 66 | crypto: user - fix leaking uninitialized memory to userspace
All bytes of the NETLINK_CRYPTO report structures must be initialized,
since they are copied to userspace. The change from strncpy() to
strlcpy() broke this. As a minimal fix, change it back.
Fixes: 4473710df1f8 ("crypto: user - Prepare for CRYPTO_MAX_ALG... |
static int parse_CRowSeekByBookmark(tvbuff_t *tvb, int offset, proto_tree *parent_tree, const char *fmt, ...)
{
proto_tree *tree;
proto_item *item;
guint32 num;
const char *txt;
va_list ap;
va_start(ap, fmt);
txt = wmem_strdup_vprintf(wmem_packet_scope(), fmt, ap);
va_end(ap);
tree = proto_tree_add_subtree(p... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 149,401,735,505,829,700,000,000,000,000,000,000,000 | 29 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
void WebPImage::decodeChunks(uint32_t filesize)
{
DataBuf chunkId(5);
byte size_buff[WEBP_TAG_SIZE];
bool has_canvas_data = false;
#ifdef DEBUG
std::cout << "Reading metadata" << std::endl;
#endif
chunkId.pData_[4] = '\0' ;
while ( !io_->eof() && (ui... | 0 | [
"CWE-190"
] | exiv2 | c73d1e27198a389ce7caf52ac30f8e2120acdafd | 40,930,305,355,552,487,000,000,000,000,000,000,000 | 196 | Avoid negative integer overflow when `filesize < io_->tell()`.
This fixes #791. |
static UINT cliprdr_server_receive_format_data_request(CliprdrServerContext* context, wStream* s,
const CLIPRDR_HEADER* header)
{
CLIPRDR_FORMAT_DATA_REQUEST formatDataRequest;
UINT error = CHANNEL_RC_OK;
WLog_DBG(TAG, "CliprdrClientFormatDataRequest");
formatD... | 0 | [] | FreeRDP | 8e1a1b407565eb0a48923c796f5b1f69167b3c48 | 70,493,072,868,483,040,000,000,000,000,000,000,000 | 21 | Fixed cliprdr_server_receive_capabilities
Thanks to hac425 CVE-2020-11017, CVE-2020-11018 |
unsigned char *ndp_msg_opt_tlladdr(struct ndp_msg *msg, int offset)
{
unsigned char *opt_data = ndp_msg_payload_opts_offset(msg, offset);
return &opt_data[2];
} | 0 | [
"CWE-284"
] | libndp | a4892df306e0532487f1634ba6d4c6d4bb381c7f | 301,951,327,038,725,670,000,000,000,000,000,000,000 | 6 | libndp: validate the IPv6 hop limit
None of the NDP messages should ever come from a non-local network; as
stated in RFC4861's 6.1.1 (RS), 6.1.2 (RA), 7.1.1 (NS), 7.1.2 (NA),
and 8.1. (redirect):
- The IP Hop Limit field has a value of 255, i.e., the packet
could not possibly have been forwarded by a router.
T... |
TEST_F(HeaderToMetadataTest, RejectBothCookieHeader) {
const std::string config = R"EOF(
request_rules:
- header: x-something
cookie: something-else
on_header_present:
key: something
value: else
type: STRING
remove: false
)EOF";
auto expected = "Cannot specify both header and cookie... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 195,784,794,716,294,340,000,000,000,000,000,000,000 | 15 | 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 inline void put_tpel_pixels_mc20_c(uint8_t *dst, const uint8_t *src, int stride, int width, int height){
int i,j;
for (i=0; i < height; i++) {
for (j=0; j < width; j++) {
dst[j] = (683*(src[j] + 2*src[j+1] + 1)) >> 11;
}
src += stride;
dst += stride;
}
} | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 295,010,812,478,750,270,000,000,000,000,000,000,000 | 10 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static int __init cipso_v4_cache_init(void)
{
u32 iter;
cipso_v4_cache = kcalloc(CIPSO_V4_CACHE_BUCKETS,
sizeof(struct cipso_v4_map_cache_bkt),
GFP_KERNEL);
if (!cipso_v4_cache)
return -ENOMEM;
for (iter = 0; iter < CIPSO_V4_CACHE_BUCKETS; iter++) {
spin_lock_init(&cipso_v4_cache[iter].lock);
cips... | 0 | [
"CWE-835"
] | linux | 40413955ee265a5e42f710940ec78f5450d49149 | 334,181,974,906,230,360,000,000,000,000,000,000,000 | 18 | Cipso: cipso_v4_optptr enter infinite loop
in for(),if((optlen > 0) && (optptr[1] == 0)), enter infinite loop.
Test: receive a packet which the ip length > 20 and the first byte of ip option is 0, produce this issue
Signed-off-by: yujuan.qi <yujuan.qi@mediatek.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-o... |
static void cancel_att_send_op(void *data)
{
struct att_send_op *op = data;
if (op->destroy)
op->destroy(op->user_data);
op->user_data = NULL;
op->callback = NULL;
op->destroy = NULL;
} | 0 | [
"CWE-415"
] | bluez | 1cd644db8c23a2f530ddb93cebed7dacc5f5721a | 263,389,844,017,891,540,000,000,000,000,000,000,000 | 11 | shared/att: Fix possible crash on disconnect
If there are pending request while disconnecting they would be notified
but clients may endup being freed in the proccess which will then be
calling bt_att_cancel to cancal its requests causing the following
trace:
Invalid read of size 4
at 0x1D894C: enable_ccc_callback... |
decode_legacy_async_masks(const ovs_be32 masks[2],
enum ofputil_async_msg_type oam,
enum ofp_version version,
struct ofputil_async_cfg *dst)
{
for (int i = 0; i < 2; i++) {
bool master = i == 0;
const struct ofp14_async_pr... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 114,716,826,564,664,530,000,000,000,000,000,000,000 | 12 | 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> |
f_toupper(typval_T *argvars, typval_T *rettv)
{
rettv->v_type = VAR_STRING;
rettv->vval.v_string = strup_save(tv_get_string(&argvars[0]));
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 61,104,048,082,587,530,000,000,000,000,000,000,000 | 5 | 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. |
static void dwc3_gadget_disconnect_interrupt(struct dwc3 *dwc)
{
int reg;
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
reg &= ~DWC3_DCTL_INITU1ENA;
dwc3_writel(dwc->regs, DWC3_DCTL, reg);
reg &= ~DWC3_DCTL_INITU2ENA;
dwc3_writel(dwc->regs, DWC3_DCTL, reg);
dwc3_disconnect_gadget(dwc);
dwc->gadget.speed = USB_S... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 319,982,004,015,416,400,000,000,000,000,000,000,000 | 19 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... |
static inline void ext4_unlock_group(struct super_block *sb,
ext4_group_t group)
{
spin_unlock(ext4_group_lock_ptr(sb, group)); | 0 | [
"CWE-787"
] | linux | c37e9e013469521d9adb932d17a1795c139b36db | 285,795,555,242,245,000,000,000,000,000,000,000,000 | 5 | ext4: add more inode number paranoia checks
If there is a directory entry pointing to a system inode (such as a
journal inode), complain and declare the file system to be corrupted.
Also, if the superblock's first inode number field is too small,
refuse to mount the file system.
This addresses CVE-2018-10882.
https... |
TEST_P(ProtocolIntegrationTest, HeadersWithUnderscoresDropped) {
config_helper_.addConfigModifier(
[&](envoy::extensions::filters::network::http_connection_manager::v3::HttpConnectionManager&
hcm) -> void {
hcm.mutable_common_http_protocol_options()->set_headers_with_underscores_action(
... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 77,446,756,714,520,110,000,000,000,000,000,000,000 | 30 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static int nbd_send_reply(QIOChannel *ioc, NBDReply *reply, Error **errp)
{
uint8_t buf[NBD_REPLY_SIZE];
reply->error = system_errno_to_nbd_errno(reply->error);
trace_nbd_send_reply(reply->error, reply->handle);
/* Reply
[ 0 .. 3] magic (NBD_REPLY_MAGIC)
[ 4 .. 7] error (0 =... | 0 | [] | qemu | f37708f6b8e0bef0dd85c6aad7fc2062071f8227 | 267,559,693,629,674,400,000,000,000,000,000,000,000 | 19 | nbd: Implement NBD_OPT_GO on server
NBD_OPT_EXPORT_NAME is lousy: per the NBD protocol, any failure
requires us to close the connection rather than report an error.
Therefore, upstream NBD recently added NBD_OPT_GO as the improved
version of the option that does what we want [1], along with
NBD_OPT_INFO that returns t... |
inline bool LowFirstBitReader::FillBuffer(unsigned int length)
{
while (m_bitsBuffered < length)
{
byte b;
if (!m_store.Get(b))
return false;
m_buffer |= (unsigned long)b << m_bitsBuffered;
m_bitsBuffered += 8;
}
CRYPTOPP_ASSERT(m_bitsBuffered <= sizeof(unsigned long)*8);
return true;
}
| 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 226,949,888,515,903,960,000,000,000,000,000,000,000 | 13 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
filter_free (struct backend *b)
{
struct backend_filter *f = container_of (b, struct backend_filter, backend);
f->backend.next->free (f->backend.next);
/* Acquiring this lock prevents any filter callbacks from running
* simultaneously.
*/
lock_unload ();
debug ("%s: unload", f->name);
if (f->filter... | 0 | [
"CWE-406"
] | nbdkit | bf0d61883a2f02f4388ec10dc92d4c61c093679e | 50,599,633,017,311,950,000,000,000,000,000,000,000 | 24 | 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 int mcryptd_hash_import(struct ahash_request *req, const void *in)
{
struct mcryptd_hash_request_ctx *rctx = ahash_request_ctx(req);
return crypto_ahash_import(&rctx->areq, in);
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 48a992727d82cb7db076fa15d372178743b1f4cd | 293,315,898,233,050,020,000,000,000,000,000,000,000 | 6 | crypto: mcryptd - Check mcryptd algorithm compatibility
Algorithms not compatible with mcryptd could be spawned by mcryptd
with a direct crypto_alloc_tfm invocation using a "mcryptd(alg)" name
construct. This causes mcryptd to crash the kernel if an arbitrary
"alg" is incompatible and not intended to be used with mcr... |
void TinyGLTF::RemoveImageLoader() {
LoadImageData =
#ifndef TINYGLTF_NO_STB_IMAGE
&tinygltf::LoadImageData;
#else
nullptr;
#endif
load_image_user_data_ = nullptr;
user_image_loader_ = false;
} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 213,650,133,023,257,000,000,000,000,000,000,000,000 | 11 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
void user_free_preparse(struct key_preparsed_payload *prep)
{
kfree(prep->payload[0]);
} | 0 | [
"CWE-476"
] | linux | c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81 | 163,764,149,236,660,200,000,000,000,000,000,000,000 | 4 | KEYS: Remove key_type::match in favour of overriding default by match_preparse
A previous patch added a ->match_preparse() method to the key type. This is
allowed to override the function called by the iteration algorithm.
Therefore, we can just set a default that simply checks for an exact match of
the key descripti... |
virDomainVsockDefFree(virDomainVsockDefPtr vsock)
{
if (!vsock)
return;
virObjectUnref(vsock->privateData);
virDomainDeviceInfoClear(&vsock->info);
VIR_FREE(vsock);
} | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 123,536,726,254,338,470,000,000,000,000,000,000,000 | 9 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static int nested_svm_intercept_ioio(struct vcpu_svm *svm)
{
unsigned port, size, iopm_len;
u16 val, mask;
u8 start_bit;
u64 gpa;
if (!(svm->nested.intercept & (1ULL << INTERCEPT_IOIO_PROT)))
return NESTED_EXIT_HOST;
port = svm->vmcb->control.exit_info_1 >> 16;
size = (svm->vmcb->control.exit_info_1 & SVM_IO... | 0 | [] | kvm | 854e8bb1aa06c578c2c9145fa6bfe3680ef63b23 | 135,685,562,829,126,550,000,000,000,000,000,000,000 | 24 | KVM: x86: Check non-canonical addresses upon WRMSR
Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is
written to certain MSRs. The behavior is "almost" identical for AMD and Intel
(ignoring MSRs that are not implemented in either architecture since they would
anyhow #GP). However, IA32_SYSENTE... |
setrl(isc_ratelimiter_t *rl, unsigned int *rate, unsigned int value) {
isc_interval_t interval;
uint32_t s, ns;
uint32_t pertic;
isc_result_t result;
if (value == 0)
value = 1;
if (value == 1) {
s = 1;
ns = 0;
pertic = 1;
} else if (value <= 10) {
s = 0;
ns = 1000000000 / value;
pertic = 1;
} el... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 206,409,759,059,663,770,000,000,000,000,000,000,000 | 31 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
static void nfs_writeback_done_common(struct rpc_task *task, void *calldata)
{
struct nfs_write_data *data = calldata;
nfs_writeback_done(task, data);
} | 0 | [] | linux | c7559663e42f4294ffe31fe159da6b6a66b35d61 | 190,449,883,768,025,400,000,000,000,000,000,000,000 | 6 | NFS: Allow nfs_updatepage to extend a write under additional circumstances
Currently nfs_updatepage allows a write to be extended to cover a full
page only if we don't have a byte range lock lock on the file... but if
we have a write delegation on the file or if we have the whole file
locked for writing then we should... |
static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win,
u32 tsval, u32 tsecr,
struct tcp_md5sig_key *key, int rst, u8 tclass,
u32 label)
{
const struct tcphdr *th = tcp_hdr(skb);
struct tcphdr *t1;
struct sk_buff *buff;
struct flowi6 fl6;
struct net *net = dev_net(skb_dst(sk... | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 273,601,125,556,727,760,000,000,000,000,000,000,000 | 95 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
static int slab_pad_check(struct kmem_cache *s, struct page *page)
{
u8 *start;
u8 *fault;
u8 *end;
u8 *pad;
int length;
int remainder;
if (!(s->flags & SLAB_POISON))
return 1;
start = page_address(page);
length = page_size(page);
end = start + length;
remainder = length % s->size;
if (!remainder)
ret... | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 167,592,776,743,216,030,000,000,000,000,000,000,000 | 35 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
Item *Item_field::derived_field_transformer_for_where(THD *thd, uchar *arg)
{
st_select_lex *sel= (st_select_lex *)arg;
Item *producing_item= find_producing_item(this, sel);
if (producing_item)
{
Item *producing_clone= producing_item->build_clone(thd);
if (producing_clone)
producing_clone->marker|... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 211,760,866,956,483,650,000,000,000,000,000,000,000 | 13 | 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. |
//! Load a list from a file.
/**
\param filename Filename to read data from.
**/
CImgList<T>& load(const char *const filename) {
if (!filename)
throw CImgArgumentException(_cimglist_instance
"load(): Specified filename is (null).",
... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 102,610,450,481,663,050,000,000,000,000,000,000,000 | 118 | . |
type_column_sort_func (GtkTreeModel *model,
GtkTreeIter *a,
GtkTreeIter *b,
gpointer user_data)
{
FileData *fdata1;
FileData *fdata2;
GtkSortType sort_order;
int result;
gtk_tree_sortable_get_sort_column_id (GTK_TREE_SORTABLE (model), NULL, &sort_order);
gtk_tre... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 164,247,607,846,060,900,000,000,000,000,000,000,000 | 39 | libarchive: sanitize filenames before extracting |
psutil_users(PyObject *self, PyObject *args) {
struct utmpx *ut;
PyObject *py_retlist = PyList_New(0);
PyObject *py_tuple = NULL;
PyObject *py_username = NULL;
PyObject *py_tty = NULL;
PyObject *py_hostname = NULL;
PyObject *py_user_proc = NULL;
if (py_retlist == NULL)
return NU... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 145,212,562,570,391,380,000,000,000,000,000,000,000 | 59 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
QPDF::getTrailer()
{
return this->trailer;
} | 0 | [
"CWE-399",
"CWE-835"
] | qpdf | 701b518d5c56a1449825a3a37a716c58e05e1c3e | 189,994,187,751,056,060,000,000,000,000,000,000,000 | 4 | Detect recursion loops resolving objects (fixes #51)
During parsing of an object, sometimes parts of the object have to be
resolved. An example is stream lengths. If such an object directly or
indirectly points to the object being parsed, it can cause an infinite
loop. Guard against all cases of re-entrant resolution ... |
SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode)
{
struct path path;
int error;
unsigned int lookup_flags = LOOKUP_FOLLOW;
retry:
error = user_path_at(dfd, filename, lookup_flags, &path);
if (!error) {
error = chmod_common(&path, mode);
path_put(&path);
if (retry_estale(error... | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 140,735,655,341,633,740,000,000,000,000,000,000,000 | 17 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
const EVP_CIPHER *EVP_aes_128_wrap_pad(void)
{
return &aes_128_wrap_pad;
} | 0 | [
"CWE-125"
] | openssl | 2198b3a55de681e1f3c23edb0586afe13f438051 | 158,986,163,617,956,180,000,000,000,000,000,000,000 | 4 | crypto/evp: harden AEAD ciphers.
Originally a crash in 32-bit build was reported CHACHA20-POLY1305
cipher. The crash is triggered by truncated packet and is result
of excessive hashing to the edge of accessible memory. Since hash
operation is read-only it is not considered to be exploitable
beyond a DoS condition. Oth... |
nautilus_file_mark_desktop_file_trusted (GFile *file,
GtkWindow *parent_window,
NautilusOpCallback done_callback,
gpointer done_callback_data)
{
MarkTrustedJob *job;
job = op_job_new (MarkTrustedJob, parent_window);
job->file = g_object_ref (file);
job->done_callback = done_callback;
job->done_... | 0 | [] | nautilus | ca2fd475297946f163c32dcea897f25da892b89d | 245,062,640,522,095,870,000,000,000,000,000,000,000 | 18 | Add nautilus_file_mark_desktop_file_trusted(), this now adds a #! line if
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-file-operations.c:
* libnautilus-private/nautilus-file-operations.h:
Add nautilus_file_mark_desktop_file_trusted(), this now
adds a #! line if th... |
fetch_name(OnigCodePoint start_code, UChar** src, UChar* end,
UChar** rname_end, ScanEnv* env, int* rback_num,
enum REF_NUM* num_type, int is_ref)
{
int r, sign;
int digit_count;
OnigCodePoint end_code;
OnigCodePoint c = 0;
OnigEncoding enc = env->enc;
UChar *name_end;
UChar *pnum_he... | 0 | [
"CWE-125"
] | oniguruma | aa0188eaedc056dca8374ac03d0177429b495515 | 129,586,619,532,779,240,000,000,000,000,000,000,000 | 131 | fix #163: heap-buffer-overflow in gb18030_mbc_enc_len |
static inline void aio_poll_complete(struct aio_kiocb *iocb, __poll_t mask)
{
struct file *file = iocb->poll.file;
aio_complete(iocb, mangle_poll(mask), 0);
fput(file);
} | 1 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 322,014,618,578,786,600,000,000,000,000,000,000,000 | 7 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
static void nodeDestruct(struct SaveNode* node)
{
TR_ASSERT(node != NULL);
if (node->sorted != NULL)
{
tr_free(node->sorted->val.l.vals);
tr_free(node->sorted);
}
} | 0 | [
"CWE-416",
"CWE-284"
] | transmission | 2123adf8e5e1c2b48791f9d22fc8c747e974180e | 16,756,064,529,771,620,000,000,000,000,000,000,000 | 10 | CVE-2018-10756: Fix heap-use-after-free in tr_variantWalk
In libtransmission/variant.c, function tr_variantWalk, when the variant
stack is reallocated, a pointer to the previously allocated memory
region is kept. This address is later accessed (heap use-after-free)
while walking back down the stack, causing the applic... |
qf_entry_on_or_before_pos(qfline_T *qfp, pos_T *pos, int linewise)
{
if (linewise)
return qfp->qf_lnum <= pos->lnum;
else
return (qfp->qf_lnum < pos->lnum ||
(qfp->qf_lnum == pos->lnum && qfp->qf_col <= pos->col));
} | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 241,560,439,186,835,030,000,000,000,000,000,000,000 | 8 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
ExpressionConstant::ExpressionConstant(ExpressionContext* const expCtx, const Value& value)
: Expression(expCtx), _value(value) {} | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 151,230,381,282,102,800,000,000,000,000,000,000,000 | 2 | SERVER-49404 Enforce additional checks in $arrayToObject |
R_API char *cmd_syscall_dostr(RCore *core, st64 n, ut64 addr) {
int i;
char str[64];
st64 N = n;
int defVector = r_syscall_get_swi (core->anal->syscall);
if (defVector > 0) {
n = -1;
}
if (n == -1 || defVector > 0) {
n = (int)r_debug_reg_get (core->dbg, "oeax");
if (!n || n == -1) {
const char *a0 = r_r... | 0 | [
"CWE-703",
"CWE-908"
] | radare2 | 4d3811681a80f92a53e795f6a64c4b0fc2c8dd22 | 161,154,302,779,748,400,000,000,000,000,000,000,000 | 74 | Fix segfault in adf (#16230) |
init_seconds_var ()
{
SHELL_VAR *v;
v = find_variable ("SECONDS");
if (v)
{
if (legal_number (value_cell(v), &seconds_value_assigned) == 0)
seconds_value_assigned = 0;
}
INIT_DYNAMIC_VAR ("SECONDS", (v ? value_cell (v) : (char *)NULL), get_seconds, assign_seconds);
return v;
} | 0 | [] | bash | 863d31ae775d56b785dc5b0105b6d251515d81d5 | 241,643,709,104,589,800,000,000,000,000,000,000,000 | 13 | commit bash-20120224 snapshot |
long vt_compat_ioctl(struct tty_struct *tty,
unsigned int cmd, unsigned long arg)
{
struct vc_data *vc = tty->driver_data;
struct console_font_op op; /* used in multiple places here */
void __user *up = compat_ptr(arg);
int perm;
/*
* To have permissions to do most of the vt ioctls, we either have
* to ... | 1 | [
"CWE-662"
] | linux | 90bfdeef83f1d6c696039b6a917190dcbbad3220 | 233,679,579,024,077,900,000,000,000,000,000,000,000 | 64 | tty: make FONTX ioctl use the tty pointer they were actually passed
Some of the font tty ioctl's always used the current foreground VC for
their operations. Don't do that then.
This fixes a data race on fg_console.
Side note: both Michael Ellerman and Jiri Slaby point out that all these
ioctls are deprecated, and s... |
void Ogg::XiphComment::setTitle(const String &s)
{
addField("TITLE", s);
} | 0 | [
"CWE-20"
] | taglib | ab8a0ee8937256311e649a88e8ddd7c7f870ad59 | 93,927,347,279,499,470,000,000,000,000,000,000,000 | 4 | Don't store the output of ByteVector::toUInt() in int, use uint instead |
static void blkif_notify_work(struct xen_blkif *blkif)
{
blkif->waiting_reqs = 1;
wake_up(&blkif->wq);
} | 0 | [
"CWE-20"
] | linux-2.6 | 604c499cbbcc3d5fe5fb8d53306aa0fae1990109 | 269,281,090,711,466,660,000,000,000,000,000,000,000 | 5 | xen/blkback: Check device permissions before allowing OP_DISCARD
We need to make sure that the device is not RO or that
the request is not past the number of sectors we want to
issue the DISCARD operation for.
This fixes CVE-2013-2140.
Cc: stable@vger.kernel.org
Acked-by: Jan Beulich <JBeulich@suse.com>
Acked-by: Ia... |
static int wcd9335_power_on_reset(struct wcd9335_codec *wcd)
{
struct device *dev = wcd->dev;
int ret;
ret = regulator_bulk_enable(WCD9335_MAX_SUPPLY, wcd->supplies);
if (ret) {
dev_err(dev, "Failed to get supplies: err = %d\n", ret);
return ret;
}
/*
* For WCD9335, it takes about 600us for the Vout_A and... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 168,387,294,240,835,430,000,000,000,000,000,000,000 | 27 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
routerid_handler(vector_t *strvec)
{
FREE_PTR(global_data->router_id);
global_data->router_id = set_value(strvec);
} | 0 | [
"CWE-200"
] | keepalived | c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067 | 12,361,284,622,102,704,000,000,000,000,000,000,000 | 5 | Add command line and configuration option to set umask
Issue #1048 identified that files created by keepalived are created
with mode 0666. This commit changes the default to 0644, and also
allows the umask to be specified in the configuration or as a command
line option.
Signed-off-by: Quentin Armitage <quentin@armit... |
void BrotliContext::finalizeOutput(Buffer::Instance& output_buffer) {
const size_t n_output = chunk_size_ - avail_out_;
if (n_output > 0) {
output_buffer.add(static_cast<void*>(chunk_ptr_.get()), n_output);
}
} | 0 | [] | envoy | cb4ef0b09200c720dfdb07e097092dd105450343 | 205,759,119,083,072,850,000,000,000,000,000,000,000 | 6 | decompressors: stop decompressing upon excessive compression ratio (#733)
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Co-authored-by: Ryan Hamilton <rch@google.com>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
dict_continue(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
es_ptr obj = esp - 2;
int index = esp->value.intval;
push(2); /* make room for key and value */
if ((index = dict_next(obj, index, op - 1)) >= 0) { /* continue */
esp->value.intval = index;
esp += 2;
*esp = obj[1];
... | 0 | [] | ghostpdl | d683d1e6450d74619e6277efeebfc222d9a5cb91 | 149,028,499,025,906,720,000,000,000,000,000,000,000 | 18 | Bug 700585: Obliterate "superexec". We don't need it, nor do any known apps.
We were under the impression that the Windows driver 'PScript5.dll' used
superexec, but after testing with our extensive suite of PostScript file,
and analysis of the PScript5 "Adobe CoolType ProcSet, it does not appear
that this operator is ... |
void write( const char* key, double value )
{
char buf[128];
writeScalar( key, fs::doubleToString( buf, value, true ));
} | 0 | [
"CWE-787"
] | opencv | f42d5399aac80d371b17d689851406669c9b9111 | 208,864,686,175,284,300,000,000,000,000,000,000,000 | 5 | core(persistence): add more checks for implementation limitations |
archive_read_format_zip_seekable_bid(struct archive_read *a, int best_bid)
{
struct zip *zip = (struct zip *)a->format->data;
int64_t file_size, current_offset;
const char *p;
int i, tail;
/* If someone has already bid more than 32, then avoid
trashing the look-ahead buffers with a seek. */
if (best_bid > 32... | 0 | [
"CWE-399",
"CWE-401"
] | libarchive | ba641f73f3d758d9032b3f0e5597a9c6e593a505 | 263,956,172,867,565,700,000,000,000,000,000,000,000 | 53 | Fix typo in preprocessor macro in archive_read_format_zip_cleanup()
Frees lzma_stream on cleanup()
Fixes #1165 |
QString Utils::String::fromStdString(const std::string &str)
{
return QString::fromUtf8(str.c_str());
} | 0 | [
"CWE-20",
"CWE-79"
] | qBittorrent | 6ca3e4f094da0a0017cb2d483ec1db6176bb0b16 | 331,742,689,370,953,760,000,000,000,000,000,000,000 | 4 | Add Utils::String::toHtmlEscaped |
CNF_AddSources(void)
{
NTP_Source *source;
unsigned int i;
for (i = 0; i < ARR_GetSize(ntp_sources); i++) {
source = (NTP_Source *)ARR_GetElement(ntp_sources, i);
NSR_AddSourceByName(source->params.name, source->params.port,
source->pool, source->type, &source->params.params);
... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 328,444,299,528,211,920,000,000,000,000,000,000,000 | 14 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static void cqspi_configure_cs_and_sizes(struct spi_nor *nor)
{
struct cqspi_flash_pdata *f_pdata = nor->priv;
struct cqspi_st *cqspi = f_pdata->cqspi;
void __iomem *iobase = cqspi->iobase;
unsigned int reg;
/* configure page size and block size. */
reg = readl(iobase + CQSPI_REG_SIZE);
reg &= ~(CQSPI_REG_SIZE_... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 193e87143c290ec16838f5368adc0e0bc94eb931 | 10,595,996,626,378,274,000,000,000,000,000,000,000 | 25 | mtd: spi-nor: Off by one in cqspi_setup_flash()
There are CQSPI_MAX_CHIPSELECT elements in the ->f_pdata array so the >
should be >=.
Fixes: 140623410536 ('mtd: spi-nor: Add driver for Cadence Quad SPI Flash Controller')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Marek Vasut <marex@denx.de>
... |
static struct nft_rule_blob *nf_tables_chain_alloc_rules(unsigned int size)
{
struct nft_rule_blob *blob;
/* size must include room for the last rule */
if (size < offsetof(struct nft_rule_dp, data))
return NULL;
size += sizeof(struct nft_rule_blob) + sizeof(struct nft_rules_old);
if (size > INT_MAX)
return ... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 218,585,782,921,130,780,000,000,000,000,000,000,000 | 21 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
static void rfx_write_message_channels(RFX_CONTEXT* context, wStream* s)
{
Stream_Write_UINT16(s, WBT_CHANNELS); /* BlockT.blockType (2 bytes) */
Stream_Write_UINT32(s, 12); /* BlockT.blockLen (4 bytes) */
Stream_Write_UINT8(s, 1); /* numChannels (1 byte) */
Stream_Write_UINT8(s, 0); ... | 0 | [
"CWE-125"
] | FreeRDP | 3a06ce058f690b7fc1edad2f352c453376c2ebfe | 205,057,604,651,420,170,000,000,000,000,000,000,000 | 9 | Fixed oob read in rfx_process_message_tileset
Check input data length
Thanks to hac425 CVE-2020-11043 |
void sqlite3WindowFunctions(void){
static FuncDef aWindowFuncs[] = {
WINDOWFUNCX(row_number, 0, 0),
WINDOWFUNCX(dense_rank, 0, 0),
WINDOWFUNCX(rank, 0, 0),
WINDOWFUNCALL(percent_rank, 0, 0),
WINDOWFUNCALL(cume_dist, 0, 0),
WINDOWFUNCALL(ntile, 1, 0),
WINDOWFUNCALL(last_value, 1, 0),
WI... | 0 | [
"CWE-476"
] | sqlite | 75e95e1fcd52d3ec8282edb75ac8cd0814095d54 | 298,507,056,624,946,600,000,000,000,000,000,000,000 | 20 | When processing constant integer values in ORDER BY clauses of window
definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable
the constant value to avoid an invalid pointer dereference if the expression
is ever duplicated. This fixes a crash report from Yongheng and Rui.
FossilOrigin-Name: 1ca0bd982ab11... |
void sort_directory(struct dir *dir)
{
struct dir_ent *cur, *l1, *l2, *next;
int len1, len2, stride = 1;
if(dir->dir_count < 2)
return;
/*
* We can consider our linked-list to be made up of stride length
* sublists. Eacn iteration around this loop merges adjacent
* stride length sublists into larger 2*st... | 0 | [
"CWE-200",
"CWE-59",
"CWE-22"
] | squashfs-tools | e0485802ec72996c20026da320650d8362f555bd | 195,677,670,004,602,400,000,000,000,000,000,000,000 | 78 | Unsquashfs: additional write outside destination directory exploit fix
An issue on github (https://github.com/plougher/squashfs-tools/issues/72)
showed how some specially crafted Squashfs filesystems containing
invalid file names (with '/' and '..') can cause Unsquashfs to write
files outside of the destination direct... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.