func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
R_API void r_bin_java_inner_classes_attr_free(void /*RBinJavaAttrInfo*/ *a) {
RBinJavaAttrInfo *attr = a;
if (attr) {
free (attr->name);
free (attr->metas);
r_list_free (attr->info.inner_classes_attr.classes);
free (attr);
}
} | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 320,305,472,129,090,300,000,000,000,000,000,000,000 | 9 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static int io_req_prep_async(struct io_kiocb *req)
{
const struct io_op_def *def = &io_op_defs[req->opcode];
/* assign early for deferred execution for non-fixed file */
if (def->needs_file && !(req->flags & REQ_F_FIXED_FILE))
req->file = io_file_get_normal(req, req->cqe.fd);
if (!def->needs_async_setup)
retu... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 174,403,519,374,865,300,000,000,000,000,000,000,000 | 32 | 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... |
pdf_filter_Do_image(fz_context *ctx, pdf_processor *proc, const char *name, fz_image *image)
{
pdf_filter_processor *p = (pdf_filter_processor*)proc;
filter_flush(ctx, p, FLUSH_ALL);
if (p->chain->op_Do_image)
p->chain->op_Do_image(ctx, p->chain, name, image);
copy_resource(ctx, p, PDF_NAME(XObject), name);
} | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 101,027,581,330,883,060,000,000,000,000,000,000,000 | 8 | Bug 701292: Fix test for missing/empty string. |
static int validate_certificate_from_root(json_t * j_params, gnutls_x509_crt_t cert_leaf, cbor_item_t * x5c_array) {
int ret = G_ERROR_NOT_FOUND, res;
unsigned int result;
gnutls_datum_t cert_dat = {NULL, 0}, issuer_dat = {NULL, 0};
gnutls_x509_trust_list_t tlist = NULL;
gnutls_x509_crt_t cert_x509[cbor_array... | 0 | [
"CWE-120",
"CWE-787"
] | glewlwyd | 0efd112bb62f566877750ad62ee828bff579b4e2 | 128,756,936,205,880,520,000,000,000,000,000,000,000 | 75 | Fix fido2 signature validation bug |
GF_Err gf_isom_change_sample_desc_index(GF_ISOFile *the_file, u32 trackNumber, u32 sample_number, u32 newSampleDescIndex)
{
GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak || !sample_number || !newSampleDescIndex) return GF_BAD_PARAM;
if (!trak->is_unpacked) {
unpack_track(trak);
... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 286,811,952,354,731,600,000,000,000,000,000,000,000 | 12 | fixed #1706 |
static int localmom(void)
{
static int have_addr = 0;
static struct in_addr hostaddr;
struct addrinfo *addr_info;
int i;
int sock;
struct sockaddr_in remote;
struct linger ltime;
if (local_conn >= 0)
{
return(local_conn);... | 0 | [
"CWE-264"
] | torque | f2f4c950f3d461a249111c8826da3beaafccace9 | 230,969,058,620,803,780,000,000,000,000,000,000,000 | 117 | TRQ-2885 - limit tm_adopt() to only adopt a session id that
is owned by the calling user. |
void HBasicBlock::Verify() {
// Check that every block is finished.
ASSERT(IsFinished());
ASSERT(block_id() >= 0);
// Check that the incoming edges are in edge split form.
if (predecessors_.length() > 1) {
for (int i = 0; i < predecessors_.length(); ++i) {
ASSERT(predecessors_[i]->end()->SecondSucc... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 8,138,361,073,505,077,000,000,000,000,000,000,000 | 12 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
static const char *am_set_merge_env_vars(cmd_parms *cmd,
void *struct_ptr,
const char *flag,
const char *sep)
{
am_dir_cfg_rec *d = (am_dir_cfg_rec *)struct_ptr;
apr_pool_t *p= cmd->pool... | 0 | [
"CWE-601"
] | mod_auth_mellon | 9d28908e28ef70a12196c215503fb0075e1fd7f3 | 293,431,170,498,833,300,000,000,000,000,000,000,000 | 30 | Add MellonRedirectDomains option.
Limit the domains that we will redirect to after login / logout to a
set of trusted domains. By default we only allow redirects to the
current domain.
This change breaks backwards compatibility with any site that relies on
redirects to separate domains.
Fixes #35 |
Status queryAuthzDocument(OperationContext* opCtx,
const NamespaceString& collectionName,
const BSONObj& query,
const BSONObj& projection,
const stdx::function<void(const BSONObj&)>& resultProcessor) {
try {
... | 0 | [
"CWE-613"
] | mongo | 6dfb92b1299de04677d0bd2230e89a52eb01003c | 115,408,104,852,040,440,000,000,000,000,000,000,000 | 13 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
static const char *set_limit_req_fieldsize(cmd_parms *cmd, void *dummy,
const char *arg)
{
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_CONTEXT);
int lim;
if (err != NULL) {
return err;
}
lim = atoi(arg);
if (lim < 0) {
retur... | 0 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 285,216,580,453,280,800,000,000,000,000,000,000,000 | 20 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
static void fuse_do_finish_interrupt(struct fuse *f, fuse_req_t req,
struct fuse_intr_data *d)
{
pthread_mutex_lock(&f->lock);
d->finished = 1;
pthread_cond_broadcast(&d->cond);
pthread_mutex_unlock(&f->lock);
fuse_req_interrupt_func(req, NULL, NULL);
pthread... | 0 | [] | ntfs-3g | fb28eef6f1c26170566187c1ab7dc913a13ea43c | 31,231,645,496,930,900,000,000,000,000,000,000,000 | 10 | Hardened the checking of directory offset requested by a readdir
When asked for the next directory entries, make sure the chunk offset
is within valid values, otherwise return no more entries in chunk. |
static int spl_filesystem_file_read_csv(spl_filesystem_object *intern, char delimiter, char enclosure, char escape, zval *return_value TSRMLS_DC) /* {{{ */
{
int ret = SUCCESS;
do {
ret = spl_filesystem_file_read(intern, 1 TSRMLS_CC);
} while (ret == SUCCESS && !intern->u.file.current_line_len && SPL_HAS_FLAG(in... | 1 | [
"CWE-190"
] | php-src | 7245bff300d3fa8bacbef7897ff080a6f1c23eba | 115,359,579,849,942,290,000,000,000,000,000,000,000 | 28 | Fix bug #72262 - do not overflow int |
static void descript(MI_CHECK *param, register MI_INFO *info, char * name)
{
uint key,keyseg_nr,field,start;
reg3 MI_KEYDEF *keyinfo;
reg2 HA_KEYSEG *keyseg;
reg4 const char *text;
char buff[160],length[10],*pos,*end;
enum en_fieldtype type;
MYISAM_SHARE *share=info->s;
char llbuff[22],llbuff2[22];
DB... | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 294,447,514,615,518,040,000,000,000,000,000,000,000 | 254 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
PxMEncoder::PxMEncoder()
{
m_description = "Portable image format (*.pbm;*.pgm;*.ppm;*.pxm;*.pnm)";
m_buf_supported = true;
} | 0 | [
"CWE-399",
"CWE-119"
] | opencv | 7bbe1a53cfc097b82b1589f7915a2120de39274c | 225,215,728,385,489,530,000,000,000,000,000,000,000 | 5 | imgcodecs(pxm): fix memcpy size |
static int incclass(Reclass *cc, Rune c)
{
Rune *p;
for (p = cc->spans; p < cc->end; p += 2)
if (p[0] <= c && c <= p[1])
return 1;
return 0;
} | 0 | [
"CWE-703",
"CWE-674"
] | mujs | 160ae29578054dc09fd91e5401ef040d52797e61 | 96,974,880,100,940,030,000,000,000,000,000,000,000 | 8 | Issue #162: Check stack overflow during regexp compilation.
Only bother checking during the first compilation pass that counts
the size of the program. |
_tor_strdup(const char *s DMALLOC_PARAMS)
{
char *dup;
tor_assert(s);
#ifdef USE_DMALLOC
dup = dmalloc_strdup(file, line, s, 0);
#else
dup = strdup(s);
#endif
if (PREDICT_UNLIKELY(dup == NULL)) {
log_err(LD_MM,"Out of memory on strdup(). Dying.");
exit(1);
}
return dup;
} | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 17,974,998,153,843,692,000,000,000,000,000,000,000 | 16 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create)
{
char *buf = NULL, *p;
ASN1_INTEGER *bs = NULL;
BIGNUM *serial = NULL;
size_t len;
len = ((serialfile == NULL)
?(strlen(CAfile)+strlen(POSTFIX)+1)
:(strlen(serialfile)))+1;
buf=OPENSSL_malloc(len);
if (buf == NULL) { BIO_pri... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 148,763,723,965,732,420,000,000,000,000,000,000,000 | 39 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
static int build_rle_packet(unsigned char *row, int packet_type, int length, unsigned char *data)
{
int compressed_size = 0;
if (length < 1 || length > 128) {
return 0;
}
/* Bitmap specific cases is that we can't have uncompressed rows of length 1 or 2 */
if (packet_type == BMP_RLE_TYPE_RAW && length < 3) {
i... | 0 | [
"CWE-415"
] | libgd | ac16bdf2d41724b5a65255d4c28fb0ec46bc42f5 | 42,904,044,757,056,570,000,000,000,000,000,000,000 | 45 | bmp: check return value in gdImageBmpPtr
Closes #447. |
nm_gconf_get_keyring_items (NMConnection *connection,
const char *setting_name,
gboolean include_private_passwords,
GError **error)
{
NMSettingConnection *s_con;
GHashTable *secrets;
GList *found_list = NULL;
GnomeKeyringResult ret;... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 100,360,954,482,467,580,000,000,000,000,000,000,000 | 101 | 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... |
std::vector<std::string> Binary::get_abstract_imported_libraries() const {
std::vector<std::string> result;
for (const DylibCommand& lib : libraries()) {
result.push_back(lib.name());
}
return result;
} | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 54,654,860,500,645,820,000,000,000,000,000,000,000 | 7 | Resolve #764 |
static cache_imgxtr_t *read_cache_imgextra(RzBuffer *cache_buf, cache_hdr_t *hdr, cache_accel_t *accel) {
if (!cache_buf || !hdr || !hdr->imagesCount || !accel || !accel->imageExtrasCount || !accel->imagesExtrasOffset) {
return NULL;
}
ut64 size = sizeof(cache_imgxtr_t) * accel->imageExtrasCount;
cache_imgxtr_t ... | 0 | [
"CWE-787"
] | rizin | 556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810 | 149,125,356,394,333,780,000,000,000,000,000,000,000 | 18 | Fix oob write in dyldcache
When the individual n_slide_infos were too high, the sum would overflow
and too few entries would be allocated. |
static void __init of_unittest_parse_phandle_with_args_map(void)
{
struct device_node *np, *p0, *p1, *p2, *p3;
struct of_phandle_args args;
int i, rc;
np = of_find_node_by_path("/testcase-data/phandle-tests/consumer-b");
if (!np) {
pr_err("missing testcase data\n");
return;
}
p0 = of_find_node_by_path("/te... | 0 | [
"CWE-401"
] | linux | e13de8fe0d6a51341671bbe384826d527afe8d44 | 336,938,916,965,078,780,000,000,000,000,000,000,000 | 123 | of: unittest: fix memory leak in unittest_data_add
In unittest_data_add, a copy buffer is created via kmemdup. This buffer
is leaked if of_fdt_unflatten_tree fails. The release for the
unittest_data buffer is added.
Fixes: b951f9dc7f25 ("Enabling OF selftest to run without machine's devicetree")
Signed-off-by: Navid ... |
check_string_option(char_u **pp)
{
if (*pp == NULL)
*pp = empty_option;
} | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 191,852,332,127,590,400,000,000,000,000,000,000,000 | 5 | 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'. |
streamConsumer *streamCreateConsumer(streamCG *cg, sds name, robj *key, int dbid, int flags) {
if (cg == NULL) return NULL;
int notify = !(flags & SCC_NO_NOTIFY);
int dirty = !(flags & SCC_NO_DIRTIFY);
streamConsumer *consumer = zmalloc(sizeof(*consumer));
int success = raxTryInsert(cg->consumers,(u... | 0 | [
"CWE-703",
"CWE-401"
] | redis | 4a7a4e42db8ff757cdf3f4a824f66426036034ef | 93,074,621,422,432,110,000,000,000,000,000,000,000 | 18 | Fix memory leak in streamGetEdgeID (#10753)
si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
regression introduced in #9127 (redis 7.0) |
static int wcd9335_slim_set_hw_params(struct wcd9335_codec *wcd,
struct wcd_slim_codec_dai_data *dai_data,
int direction)
{
struct list_head *slim_ch_list = &dai_data->slim_ch_list;
struct slim_stream_config *cfg = &dai_data->sconfig;
struct wcd9335_slim_ch *ch;
u16 payload = 0;
int ret, i;
cfg->ch_cou... | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 14,346,902,240,968,048,000,000,000,000,000,000,000 | 78 | 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>
... |
compile_quantifier_node(QtfrNode* qn, regex_t* reg)
{
int r, mod_tlen;
int ckn;
int infinite = IS_REPEAT_INFINITE(qn->upper);
int empty_info = qn->target_empty_info;
int tlen = compile_length_tree(qn->target, reg);
if (tlen < 0) return tlen;
ckn = ((reg->num_comb_exp_check > 0) ? qn->comb_exp_check_num ... | 0 | [
"CWE-125"
] | php-src | c6e34d91b88638966662caac62c4d0e90538e317 | 88,479,898,865,615,800,000,000,000,000,000,000,000 | 150 | Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node) |
MD5::getFileChecksum(char const* filename, qpdf_offset_t up_to_offset)
{
MD5 m;
m.encodeFile(filename, up_to_offset);
return m.unparse();
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 309,390,055,344,079,350,000,000,000,000,000,000,000 | 6 | 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 ... |
int diff_tree(struct tree_desc *t1, struct tree_desc *t2, const char *base, struct diff_options *opt)
{
int baselen = strlen(base);
for (;;) {
if (DIFF_OPT_TST(opt, QUIET) && DIFF_OPT_TST(opt, HAS_CHANGES))
break;
if (opt->nr_paths) {
skip_uninteresting(t1, base, baselen, opt);
skip_uninteresting(t2, ba... | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 305,270,654,038,148,340,000,000,000,000,000,000,000 | 38 | 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> |
flatpak_deploy_new (GFile *dir,
FlatpakDecomposed *ref,
GKeyFile *metadata,
OstreeRepo *repo)
{
FlatpakDeploy *deploy;
deploy = g_object_new (FLATPAK_TYPE_DEPLOY, NULL);
deploy->ref = flatpak_decomposed_ref (ref);
deploy->d... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 261,128,836,693,231,220,000,000,000,000,000,000,000 | 15 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
BGD_DECLARE(void) gdImageStringUp (gdImagePtr im, gdFontPtr f,
int x, int y, unsigned char *s, int color)
{
int i;
int l;
l = strlen ((char *) s);
for (i = 0; (i < l); i++)
{
gdImageCharUp (im, f, x, y, s[i], color);
y -= f->w;
}
} | 0 | [
"CWE-190"
] | libgd | cfee163a5e848fc3e3fb1d05a30d7557cdd36457 | 133,332,652,583,599,760,000,000,000,000,000,000,000 | 12 | - #18, Removed invalid gdFree call when overflow2 fails
- #17, Free im->pixels as well on error |
TEST(HeaderMapImplTest, SetCopy) {
TestRequestHeaderMapImpl headers;
LowerCaseString foo("hello");
headers.setCopy(foo, "world");
EXPECT_EQ("world", headers.get(foo)->value().getStringView());
// Overwrite value.
headers.setCopy(foo, "monde");
EXPECT_EQ("monde", headers.get(foo)->value().getStringView())... | 1 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 249,957,232,039,751,860,000,000,000,000,000,000,000 | 44 | 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 phar_write_32(char buffer[4], php_uint32 value)
{
buffer[3] = (unsigned char) ((value & 0xff000000) >> 24);
buffer[2] = (unsigned char) ((value & 0xff0000) >> 16);
buffer[1] = (unsigned char) ((value & 0xff00) >> 8);
buffer[0] = (unsigned char) (value & 0xff);
} | 0 | [
"CWE-119"
] | php-src | a6fdc5bb27b20d889de0cd29318b3968aabb57bd | 65,650,698,842,766,340,000,000,000,000,000,000,000 | 7 | Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile() |
pop3_store_dispose (GObject *object)
{
CamelPOP3StorePrivate *priv;
priv = CAMEL_POP3_STORE (object)->priv;
/* Force disconnect so we dont have it run
* later, after we've cleaned up some stuff. */
camel_service_disconnect_sync (
CAMEL_SERVICE (object), TRUE, NULL, NULL);
g_clear_object (&priv->cache);
g_c... | 0 | [
"CWE-74"
] | evolution-data-server | ba82be72cfd427b5d72ff21f929b3a6d8529c4df | 159,021,934,598,606,230,000,000,000,000,000,000,000 | 17 | I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226 |
static void nft_flowtable_hooks_del(struct nft_flowtable *flowtable,
struct list_head *hook_list)
{
struct nft_hook *hook, *next;
list_for_each_entry_safe(hook, next, &flowtable->hook_list, list) {
if (hook->inactive)
list_move(&hook->list, hook_list);
}
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 266,016,085,161,872,340,000,000,000,000,000,000,000 | 10 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
void uECC_decompress(const uint8_t *compressed, uint8_t *public_key, uECC_Curve curve) {
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
uECC_word_t *point = (uECC_word_t *)public_key;
#else
uECC_word_t point[uECC_MAX_WORDS * 2];
#endif
uECC_word_t *y = point + curve->num_words;
#if uECC_VLI_NATIVE_LITTLE_ENDIAN
bcop... | 0 | [
"CWE-415"
] | micro-ecc | 1b5f5cea5145c96dd8791b9b2c41424fc74c2172 | 286,630,769,557,660,480,000,000,000,000,000,000,000 | 24 | Fix for #168 |
RGWOpType get_type() override { return RGW_OP_CREATE_BUCKET; } | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 158,348,978,275,078,700,000,000,000,000,000,000,000 | 1 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static bool fwnet_frag_overlap(struct fwnet_partial_datagram *pd,
unsigned offset, unsigned len)
{
struct fwnet_fragment_info *fi;
unsigned end = offset + len;
list_for_each_entry(fi, &pd->fi_list, fi_link)
if (offset < fi->offset + fi->len && end > fi->offset)
return true;
return false;
} | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 272,492,555,856,529,660,000,000,000,000,000,000,000 | 12 | firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment wi... |
xmlAutomataGetInitState(xmlAutomataPtr am) {
if (am == NULL)
return(NULL);
return(am->start);
} | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 181,631,784,683,301,900,000,000,000,000,000,000,000 | 5 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
copy_shmid_from_user(struct shmid64_ds *out, void __user *buf, int version)
{
switch (version) {
case IPC_64:
if (copy_from_user(out, buf, sizeof(*out)))
return -EFAULT;
return 0;
case IPC_OLD:
{
struct shmid_ds tbuf_old;
if (copy_from_user(&tbuf_old, buf, sizeof(tbuf_old)))
return -EFAULT;
ou... | 0 | [] | linux | 95e91b831f87ac8e1f8ed50c14d709089b4e01b8 | 133,937,056,646,222,840,000,000,000,000,000,000,000 | 24 | ipc/shm: Fix shmat mmap nil-page protection
The issue is described here, with a nice testcase:
https://bugzilla.kernel.org/show_bug.cgi?id=192931
The problem is that shmat() calls do_mmap_pgoff() with MAP_FIXED, and
the address rounded down to 0. For the regular mmap case, the
protection mentioned above is that... |
may_peek_next_line(cctx_T *cctx, char_u *arg, char_u **nextp)
{
char_u *p = skipwhite(arg);
*nextp = NULL;
if (*p == NUL || (VIM_ISWHITE(*arg) && vim9_comment_start(p)))
{
*nextp = peek_next_line_from_context(cctx);
if (*nextp != NULL)
return *nextp;
}
return p;
} | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 112,247,759,773,608,070,000,000,000,000,000,000,000 | 13 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
ClearSelectionBuffer(TScreen *screen, String selection)
{
int which = TargetToSelection(screen, selection);
SelectedCells *scp = &(screen->selected_cells[okSelectionCode(which)]);
FreeAndNull(scp->data_buffer);
scp->data_limit = 0;
scp->data_length = 0;
screen->base64_count = 0;
} | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 324,311,973,844,172,800,000,000,000,000,000,000,000 | 9 | snapshot of project "xterm", label xterm-365d |
static inline void tg3_netif_start(struct tg3 *tp)
{
tg3_ptp_resume(tp);
/* NOTE: unconditional netif_tx_wake_all_queues is only
* appropriate so long as all callers are assured to
* have free tx slots (such as after tg3_init_hw)
*/
netif_tx_wake_all_queues(tp->dev);
if (tp->link_up)
netif_carrier_on(tp->... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 226,082,314,494,825,150,000,000,000,000,000,000,000 | 17 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
self_t& multithreaded()
{
return concurrency(std::thread::hardware_concurrency());
} | 0 | [
"CWE-416"
] | Crow | fba01dc76d6ea940ad7c8392e8f39f9647241d8e | 63,631,809,893,441,880,000,000,000,000,000,000,000 | 4 | Prevent HTTP pipelining which Crow doesn't support. |
static void nfs4_locku_done(struct rpc_task *task, void *data)
{
struct nfs4_unlockdata *calldata = data;
if (!nfs4_sequence_done(task, &calldata->res.seq_res))
return;
switch (task->tk_status) {
case 0:
nfs4_stateid_copy(&calldata->lsp->ls_stateid,
&calldata->res.stateid);
renew_lease(calldata->serv... | 0 | [
"CWE-119",
"CWE-401"
] | linux | 7d3e91a89b7adbc2831334def9e494dd9892f9af | 293,346,347,981,146,840,000,000,000,000,000,000,000 | 23 | NFSv4: Check for buffer length in __nfs4_get_acl_uncached
Commit 1f1ea6c "NFSv4: Fix buffer overflow checking in
__nfs4_get_acl_uncached" accidently dropped the checking for too small
result buffer length.
If someone uses getxattr on "system.nfs4_acl" on an NFSv4 mount
supporting ACLs, the ACL has not been cached and... |
void* xmalloc(size_t size)
{
void *ptr = malloc(size);
if (ptr == NULL && size != 0)
die_out_of_memory();
return ptr;
} | 0 | [
"CWE-20"
] | libreport | 1951e7282043dfe1268d492aea056b554baedb75 | 222,002,328,001,691,600,000,000,000,000,000,000,000 | 7 | lib: fix races in dump directory handling code
Florian Weimer <fweimer@redhat.com>:
dd_opendir() should keep a file handle (opened with O_DIRECTORY) and
use openat() and similar functions to access files in it.
...
The file system manipulation functions should guard against hard
links (check tha... |
static void __exit hidp_exit(void)
{
hidp_cleanup_sockets();
} | 0 | [
"CWE-843"
] | linux | 51bda2bca53b265715ca1852528f38dc67429d9a | 261,963,565,780,711,200,000,000,000,000,000,000,000 | 4 | Bluetooth: hidp_connection_add() unsafe use of l2cap_pi()
it's OK after we'd verified the sockets, but not before that.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
static int insert_key(
sc_pkcs15_card_t *p15card,
const char *path,
unsigned char id,
unsigned char key_reference,
int key_length,
unsigned char auth_id,
const char *label
)
{
sc_card_t *card = p15card->card;
sc_context_t *ctx = p15card->card->ctx;
sc_file_t *f;
struct s... | 1 | [] | OpenSC | 78cdab949f098ad7e593d853229fccf57d749d0c | 215,523,050,943,564,980,000,000,000,000,000,000,000 | 96 | tcos: prevent out of bounds read
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=27719 |
static void exec_next_prep_write(struct exec_data *data, uint16_t ehandle,
int err)
{
struct prep_write_data *next = NULL;
struct gatt_db_attribute *attr;
bool status;
if (err)
goto error;
next = queue_pop_head(data->server->prep_queue);
if (!next) {
bt_att_chan_send_rsp(data->chan, BT_ATT_OP_EXEC_W... | 0 | [
"CWE-287"
] | bluez | 00da0fb4972cf59e1c075f313da81ea549cb8738 | 279,960,046,680,437,750,000,000,000,000,000,000,000 | 45 | shared/gatt-server: Fix not properly checking for secure flags
When passing the mask to check_permissions all valid permissions for
the operation must be set including BT_ATT_PERM_SECURE flags. |
static u16 vhost_scsi_get_tpgt(struct se_portal_group *se_tpg)
{
struct vhost_scsi_tpg *tpg = container_of(se_tpg,
struct vhost_scsi_tpg, se_tpg);
return tpg->tport_tpgt;
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 59c816c1f24df0204e01851431d3bab3eb76719c | 307,579,226,724,301,750,000,000,000,000,000,000,000 | 6 | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... |
int kvm_arch_create_vcpu_debugfs(struct kvm_vcpu *vcpu)
{
return 0;
} | 0 | [
"CWE-476"
] | linux | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 | 195,151,065,204,093,800,000,000,000,000,000,000,000 | 4 | KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
The following program causes a kernel oops:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kvm.h>
main()
{
int fd = open("/dev/kvm", O_RDWR);
ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
}
This happe... |
static inline int inword(const u16 c) {
return c > 0xff || (( inwordLut[c>>5] >> (c & 0x1F) ) & 1);
} | 0 | [
"CWE-399"
] | linux-2.6 | 878b8619f711280fd05845e21956434b5e588cc4 | 152,305,560,985,261,490,000,000,000,000,000,000,000 | 3 | Fix memory corruption in console selection
Fix an off-by-two memory error in console selection.
The loop below goes from sel_start to sel_end (inclusive), so it writes
one more character. This one more character was added to the allocated
size (+1), but it was not multiplied by an UTF-8 multiplier.
This patch fixes... |
ExpandSettings(
expand_T *xp,
regmatch_T *regmatch,
int *num_file,
char_u ***file)
{
int num_normal = 0; // Nr of matching non-term-code settings
int num_term = 0; // Nr of matching terminal code settings
int opt_idx;
int match;
int count = 0;
char_u *str;
int ... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 126,918,799,074,017,440,000,000,000,000,000,000,000 | 158 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
int MAIN(int argc, char **argv)
{
unsigned int off=0, clr=0;
SSL *con=NULL;
#ifndef OPENSSL_NO_KRB5
KSSL_CTX *kctx;
#endif
int s,k,width,state=0;
char *cbuf=NULL,*sbuf=NULL,*mbuf=NULL;
int cbuf_len,cbuf_off;
int sbuf_len,sbuf_off;
fd_set readfds,writefds;
short port=PORT;
int full_log=1;
char *host=SSL_HOST... | 1 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 300,563,884,559,026,500,000,000,000,000,000,000,000 | 1,356 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
eqproc_check_type(ref *r)
{
return r_has_type(r, t_array)
|| r_has_type(r, t_mixedarray)
|| r_has_type(r, t_shortarray)
|| r_has_type(r, t_oparray);
} | 0 | [] | ghostpdl | 57f20719e1cfaea77b67cb26e26de7fe4d7f9b2e | 5,684,872,014,589,265,000,000,000,000,000,000,000 | 7 | Bug 697846: revision to commit 4f83478c88 (.eqproc)
When using the "DELAYBIND" feature, it turns out that .eqproc can be called with
parameters that are not both procedures. In this case, it turns out, the
expectation is for the operator to return 'false', rather than throw an error. |
proto_find_finfo(proto_tree *tree, const int id)
{
ffdata_t ffdata;
ffdata.array = g_ptr_array_new();
ffdata.id = id;
proto_tree_traverse_pre_order(tree, find_finfo, &ffdata);
return ffdata.array;
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 291,824,129,894,742,000,000,000,000,000,000,000,000 | 11 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
static int sev_launch_measure(struct kvm *kvm, struct kvm_sev_cmd *argp)
{
void __user *measure = (void __user *)(uintptr_t)argp->data;
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
struct sev_data_launch_measure *data;
struct kvm_sev_launch_measure params;
void __user *p = NULL;
void *blob = NULL;
int ... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 79,508,873,500,671,790,000,000,000,000,000,000,000 | 68 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
field_args(agooErr err, gqlDoc doc, gqlCobj obj, gqlField field, gqlSel sel, gqlValue result, int depth) {
gqlField f = (gqlField)obj->ptr;
const char *key = sel->name;
gqlArg a;
gqlValue list = gql_list_create(err, NULL);
gqlValue co;
struct _gqlField cf;
struct _gqlCobj child = { .cla... | 0 | [
"CWE-703"
] | agoo | ecb72fa66f3d846b724b4fa1d7648669cebabe0c | 340,251,175,477,750,960,000,000,000,000,000,000,000 | 32 | Protect against recursive fragment in schema
Really a error on the developers part but this catches the error. |
void HGraphBuilder::VisitModuleDeclaration(ModuleDeclaration* declaration) {
UNREACHABLE();
} | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 38,968,647,697,615,410,000,000,000,000,000,000,000 | 3 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
png_build_16to8_table(png_structrp png_ptr, png_uint_16pp *ptable,
PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val)
{
PNG_CONST unsigned int num = 1U << (8U - shift);
PNG_CONST unsigned int max = (1U << (16U - shift))-1U;
unsigned int i;
png_uint_32 last;
png_uint_16pp table = *pta... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 107,981,023,411,674,840,000,000,000,000,000,000,000 | 61 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
int ext4_htree_fill_tree(struct file *dir_file, __u32 start_hash,
__u32 start_minor_hash, __u32 *next_hash)
{
struct dx_hash_info hinfo;
struct ext4_dir_entry_2 *de;
struct dx_frame frames[2], *frame;
struct inode *dir;
ext4_lblk_t block;
int count = 0;
int ret, err;
__u32 hashval;
dxtrace(printk(KERN_DEB... | 0 | [
"CWE-20"
] | linux | c9b92530a723ac5ef8e352885a1862b18f31b2f5 | 81,775,464,885,757,450,000,000,000,000,000,000,000 | 81 | ext4: make orphan functions be no-op in no-journal mode
Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.
Signe... |
Item *Item_float::clone_item(THD *thd)
{
return new (thd->mem_root) Item_float(thd, name, value, decimals,
max_length);
} | 0 | [
"CWE-89"
] | server | b5e16a6e0381b28b598da80b414168ce9a5016e5 | 159,675,245,032,506,970,000,000,000,000,000,000,000 | 5 | MDEV-26061 MariaDB server crash at Field::set_default
* Item_default_value::fix_fields creates a copy of its argument's field.
* Field::default_value is changed when its expression is prepared in
unpack_vcol_info_from_frm()
This means we must unpack any vcol expression that includes DEFAULT(x)
strictly after unpack... |
int auth_policy_strptrcmp(const char *a0, const char *a1,
const char *b0, const char *b1)
{
i_assert(a0 <= a1 && b0 <= b1);
return memcmp(a0, b0, I_MIN((a1-a0),(b1-b0)));
} | 0 | [
"CWE-20"
] | core | 1f2c35da2b96905bec6e45f88af0f33ee63789e6 | 180,279,569,959,609,340,000,000,000,000,000,000,000 | 6 | auth: Fix auth-policy crash when username is NULL
If SASL request is invalid, or incomplete, and username
is left NULL, handle it gracefully by adding just
NUL byte in auth policy digest for username. |
static ulong read_event(MYSQL* mysql, Master_info *mi, bool* suppress_warnings)
{
ulong len;
DBUG_ENTER("read_event");
*suppress_warnings= FALSE;
/*
my_real_read() will time us out
We check if we were told to die, and if not, try reading again
*/
#ifndef DBUG_OFF
if (disconnect_slave_event_count &&... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 234,023,535,133,237,750,000,000,000,000,000,000,000 | 51 | 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... |
save_vimvars(vimvars_save_T *vvsave)
{
vvsave->vv_prevcount = vimvars[VV_PREVCOUNT].vv_nr;
vvsave->vv_count = vimvars[VV_COUNT].vv_nr;
vvsave->vv_count1 = vimvars[VV_COUNT1].vv_nr;
} | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 190,162,862,599,506,060,000,000,000,000,000,000,000 | 6 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
decompileWITH(int n, SWF_ACTION *actions, int maxn)
{
OUT_BEGIN2(SWF_ACTIONWITH);
INDENT
puts("with(");
decompilePUSHPARAM(pop(),0);
puts(")");
println(" {" );
decompileActions(sact->numActions, sact->Actions,gIndent+1);
INDENT
println("}" );
return 1;
} | 0 | [
"CWE-119",
"CWE-125"
] | libming | da9d86eab55cbf608d5c916b8b690f5b76bca462 | 138,216,074,832,618,580,000,000,000,000,000,000,000 | 15 | decompileAction: Prevent heap buffer overflow and underflow with using OpCode |
void LibRaw:: recycle_datastream()
{
if(libraw_internal_data.internal_data.input && libraw_internal_data.internal_data.input_internal)
{
delete libraw_internal_data.internal_data.input;
libraw_internal_data.internal_data.input = NULL;
}
libraw_internal_data.internal_data.input_internal = 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | LibRaw | 2f912f5b33582961b1cdbd9fd828589f8b78f21d | 243,743,275,842,634,770,000,000,000,000,000,000,000 | 9 | fixed wrong data_maximum calcluation; prevent out-of-buffer in exp_bef |
append_cell_to_circuit_queue(circuit_t *circ, channel_t *chan,
cell_t *cell, cell_direction_t direction,
streamid_t fromstream)
{
or_circuit_t *orcirc = NULL;
cell_queue_t *queue;
int streams_blocked;
if (circ->marked_for_close)
return;
if (direc... | 0 | [
"CWE-200",
"CWE-617"
] | tor | 56a7c5bc15e0447203a491c1ee37de9939ad1dcd | 168,949,478,250,314,770,000,000,000,000,000,000,000 | 83 | TROVE-2017-005: Fix assertion failure in connection_edge_process_relay_cell
On an hidden service rendezvous circuit, a BEGIN_DIR could be sent
(maliciously) which would trigger a tor_assert() because
connection_edge_process_relay_cell() thought that the circuit is an
or_circuit_t but is an origin circuit in reality.
... |
static void dtls1_set_handshake_header(SSL *s, int htype, unsigned long len)
{
unsigned char *p = (unsigned char *)s->init_buf->data;
dtls1_set_message_header(s, p, htype, len, 0, len);
s->init_num = (int)len + DTLS1_HM_HEADER_LENGTH;
s->init_off = 0;
/* Buffer the message to handle re-xmits */
dtls1_buffer_mess... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 16,563,455,980,631,232,000,000,000,000,000,000,000 | 9 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static int ocfs2_zero_tail(struct inode *inode, struct buffer_head *di_bh,
loff_t pos)
{
int ret = 0;
BUG_ON(!ocfs2_sparse_alloc(OCFS2_SB(inode->i_sb)));
if (pos > i_size_read(inode))
ret = ocfs2_zero_extend(inode, di_bh, pos);
return ret;
} | 0 | [
"CWE-362"
] | linux | 3e4c56d41eef5595035872a2ec5a483f42e8917f | 147,649,399,668,670,070,000,000,000,000,000,000,000 | 11 | ocfs2: ip_alloc_sem should be taken in ocfs2_get_block()
ip_alloc_sem should be taken in ocfs2_get_block() when reading file in
DIRECT mode to prevent concurrent access to extent tree with
ocfs2_dio_end_io_write(), which may cause BUGON in the following
situation:
read file 'A' end_io... |
Returns a properly formatted email address given the mailbox, host, and personal info */
PHP_FUNCTION(imap_rfc822_write_address)
{
zend_string *mailbox, *host, *personal;
ADDRESS *addr;
zend_string *string;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SSS", &mailbox, &host, &personal) == FAILURE) {
return;
}
... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 63,772,001,352,551,060,000,000,000,000,000,000,000 | 35 | Disable rsh/ssh functionality in imap by default (bug #77153) |
struct session_info *session_info_create(int verbose)
{
return NULL;
} | 0 | [
"CWE-362"
] | spice-vd_agent | 5c50131797e985d0a5654c1fd7000ae945ed29a7 | 232,439,160,157,025,270,000,000,000,000,000,000,000 | 4 | Better check for sessions
Do not allow other users to hijack a session checking that
the process is launched by the owner of the session.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com> |
clear_node_opt_info(NodeOpt* opt)
{
clear_mml(&opt->len);
clear_opt_anc_info(&opt->anc);
clear_opt_exact(&opt->exb);
clear_opt_exact(&opt->exm);
clear_opt_exact(&opt->expr);
clear_opt_map(&opt->map);
} | 0 | [
"CWE-476"
] | oniguruma | 410f5916429e7d2920e1d4867388514f605413b8 | 317,574,378,884,341,660,000,000,000,000,000,000,000 | 9 | fix #87: Read unknown address in onig_error_code_to_str() |
long keyctl_update_key(key_serial_t id,
const void __user *_payload,
size_t plen)
{
key_ref_t key_ref;
void *payload;
long ret;
ret = -EINVAL;
if (plen > PAGE_SIZE)
goto error;
/* pull the payload in if one was supplied */
payload = NULL;
if (_payload) {
ret = -ENOMEM;
payload = kmallo... | 1 | [
"CWE-476"
] | linux | 5649645d725c73df4302428ee4e02c869248b4c5 | 274,860,533,838,047,400,000,000,000,000,000,000,000 | 41 | KEYS: fix dereferencing NULL payload with nonzero length
sys_add_key() and the KEYCTL_UPDATE operation of sys_keyctl() allowed a
NULL payload with nonzero length to be passed to the key type's
->preparse(), ->instantiate(), and/or ->update() methods. Various key
types including asymmetric, cifs.idmap, cifs.spnego, an... |
ecma_date_time_in_day_from_time (ecma_number_t time) /**< time value */
{
JERRY_ASSERT (!ecma_number_is_nan (time));
ecma_number_t day = ecma_date_day_from_time (time);
return (int32_t) (time - (day * ECMA_DATE_MS_PER_DAY));
} /* ecma_date_time_in_day_from_time */ | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 339,426,021,858,687,630,000,000,000,000,000,000,000 | 8 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
dwg_handle_name (Dwg_Data *restrict dwg, const char *restrict table,
const BITCODE_H restrict handle)
{
BITCODE_BL i, num_entries = 0;
BITCODE_H ctrl = NULL, *hdlv = NULL;
Dwg_Object *obj;
Dwg_Object_APPID_CONTROL *_obj; // just some random generic type
Dwg_Header_Variables *vars = &dwg->head... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 260,725,088,453,257,020,000,000,000,000,000,000,000 | 84 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
static uint32 get_part_id_from_linear_hash(longlong hash_value, uint mask,
uint num_parts)
{
uint32 part_id= (uint32)(hash_value & mask);
if (part_id >= num_parts)
{
uint new_mask= ((mask + 1) >> 1) - 1;
part_id= (uint32)(hash_value & new_mask);
}
return par... | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 327,913,923,907,675,630,000,000,000,000,000,000,000 | 12 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
__ip_vs_get_dest_entries(const struct ip_vs_get_dests *get,
struct ip_vs_get_dests __user *uptr)
{
struct ip_vs_service *svc;
union nf_inet_addr addr = { .ip = get->addr };
int ret = 0;
if (get->fwmark)
svc = __ip_vs_svc_fwm_get(AF_INET, get->fwmark);
else
svc = __ip_vs_service_get(AF_INET, get->protocol,... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 04bcef2a83f40c6db24222b27a52892cba39dffb | 219,890,530,828,352,570,000,000,000,000,000,000,000 | 44 | ipvs: Add boundary check on ioctl arguments
The ipvs code has a nifty system for doing the size of ioctl command
copies; it defines an array with values into which it indexes the cmd
to find the right length.
Unfortunately, the ipvs code forgot to check if the cmd was in the
range that the array provides, allowing fo... |
static void store_regs(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
{
kvm_run->psw_mask = vcpu->arch.sie_block->gpsw.mask;
kvm_run->psw_addr = vcpu->arch.sie_block->gpsw.addr;
kvm_run->s.regs.prefix = kvm_s390_get_prefix(vcpu);
memcpy(&kvm_run->s.regs.crs, &vcpu->arch.sie_block->gcr, 128);
kvm_run->s.regs.cputm... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 39,089,660,942,412,558,000,000,000,000,000,000,000 | 22 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
int main( int argc, char *argv[] )
{
((void) argc);
((void) argv);
printf("POLARSSL_AES_C and/or POLARSSL_DHM_C and/or POLARSSL_ENTROPY_C "
"and/or POLARSSL_NET_C and/or POLARSSL_RSA_C and/or "
"POLARSSL_SHA1_C and/or POLARSSL_FS_IO and/or "
"POLARSSL_CTR_DRBG_C not defined... | 1 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 209,267,773,824,090,870,000,000,000,000,000,000,000 | 11 | RSA blinding on CRT operations to counter timing attacks |
virDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(domain, "flags=%x", flags);
virResetLastError();
virCheckDomainReturn(domain, NULL);
conn = domain->conn;
if ((conn->flags & VIR_CONNECT_RO) &&
(flags & (VIR_DOMAIN_XML_SECURE | VIR_DO... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 287,015,173,899,191,440,000,000,000,000,000,000,000 | 32 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
bool AuthorizationSessionImpl::isCoauthorizedWithClient(Client* opClient, WithLock opClientLock) {
auto getUserNames = [](AuthorizationSession* authSession) {
if (authSession->isImpersonating()) {
return authSession->getImpersonatedUserNames();
} else {
return authSession->ge... | 0 | [
"CWE-613"
] | mongo | 6dfb92b1299de04677d0bd2230e89a52eb01003c | 91,933,127,082,620,990,000,000,000,000,000,000,000 | 23 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
Perl_current_re_engine(pTHX)
{
if (IN_PERL_COMPILETIME) {
HV * const table = GvHV(PL_hintgv);
SV **ptr;
if (!table || !(PL_hints & HINT_LOCALIZE_HH))
return &PL_core_reg_engine;
ptr = hv_fetchs(table, "regcomp", FALSE);
if ( !(ptr && SvIOK(*ptr) && SvIV(*ptr)))
return &PL_core_reg_engine;
return IN... | 0 | [
"CWE-125"
] | perl5 | 43b2f4ef399e2fd7240b4eeb0658686ad95f8e62 | 295,916,660,593,358,820,000,000,000,000,000,000,000 | 23 | regcomp.c: Convert some strchr to memchr
This allows things to work properly in the face of embedded NULs.
See the branch merge message for more information. |
static void sasl_start(IRC_SERVER_REC *server, const char *data, const char *from)
{
IRC_SERVER_CONNECT_REC *conn;
sasl_timeout_stop(server);
conn = server->connrec;
switch (conn->sasl_mechanism) {
case SASL_MECHANISM_PLAIN:
irc_send_cmd_now(server, "AUTHENTICATE PLAIN");
break;
case SASL_MECHANISM_EX... | 0 | [
"CWE-416"
] | irssi | 36564717c9f701e3a339da362ab46d220d27e0c1 | 297,017,694,630,341,730,000,000,000,000,000,000,000 | 19 | Merge branch 'security' into 'master'
Security
See merge request irssi/irssi!34
(cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f) |
static int l_setup_channel (lua_State *L) {
return setup_channel(L, 0, 0);
} | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 309,292,475,392,962,780,000,000,000,000,000,000,000 | 3 | Avoid a crash (double-free) when SSH connection fails |
JPEGSetupEncode(TIFF* tif)
{
JPEGState* sp = JState(tif);
TIFFDirectory *td = &tif->tif_dir;
static const char module[] = "JPEGSetupEncode";
#if defined(JPEG_DUAL_MODE_8_12) && !defined(TIFFInitJPEG)
if( tif->tif_dir.td_bitspersample == 12 )
return TIFFReInitJPEG_12( tif, COMPRESSION_JPEG, 1 );
... | 1 | [
"CWE-369"
] | libtiff | 47f2fb61a3a64667bce1a8398a8fcb1b348ff122 | 301,904,330,310,215,800,000,000,000,000,000,000,000 | 155 | * libtiff/tif_jpeg.c: avoid integer division by zero in
JPEGSetupEncode() when horizontal or vertical sampling is set to 0.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2653 |
static uint64_t type(T) { return Arg::INT; } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 322,113,843,960,333,570,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
test_client_auth_connection (TestConnection *test,
gconstpointer data)
{
GIOStream *connection;
GError *error = NULL;
GTlsCertificate *cert;
GTlsCertificate *peer;
gboolean cas_changed;
GSocketClient *client;
test->database = g_tls_file_database_new (tls_test_file_path ("ca... | 0 | [
"CWE-295"
] | glib-networking | 29513946809590c4912550f6f8620468f9836d94 | 315,131,882,082,931,820,000,000,000,000,000,000,000 | 82 | Return bad identity error if identity is unset
When the server-identity property of GTlsClientConnection is unset, the
documentation sasy we need to fail the certificate verification with
G_TLS_CERTIFICATE_BAD_IDENTITY. This is important because otherwise,
it's easy for applications to fail to specify server identity.... |
void sctp_chunk_assign_ssn(struct sctp_chunk *chunk)
{
struct sctp_datamsg *msg;
struct sctp_chunk *lchunk;
struct sctp_stream *stream;
__u16 ssn;
__u16 sid;
if (chunk->has_ssn)
return;
/* All fragments will be on the same stream */
sid = ntohs(chunk->subh.data_hdr->stream);
stream = &chunk->asoc->ssnmap->... | 0 | [
"CWE-20"
] | linux-2.6 | ba0166708ef4da7eeb61dd92bbba4d5a749d6561 | 138,410,242,090,657,860,000,000,000,000,000,000,000 | 33 | sctp: Fix kernel panic while process protocol violation parameter
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramh... |
CImg<T>& assign() {
if (!_is_shared) delete[] _data;
_width = _height = _depth = _spectrum = 0; _is_shared = false; _data = 0;
return *this;
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 99,338,614,290,158,700,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
int git_pkt_parse_line(
git_pkt **head, const char *line, const char **out, size_t bufflen)
{
int ret;
int32_t len;
/* Not even enough for the length */
if (bufflen > 0 && bufflen < PKT_LEN_SIZE)
return GIT_EBUFS;
len = parse_len(line);
if (len < 0) {
/*
* If we fail to parse the length, it might be bec... | 1 | [
"CWE-476",
"CWE-119"
] | libgit2 | 2fdef641fd0dd2828bd948234ae86de75221a11a | 245,939,976,804,651,070,000,000,000,000,000,000,000 | 85 | smart_pkt: treat empty packet lines as error
The Git protocol does not specify what should happen in the case
of an empty packet line (that is a packet line "0004"). We
currently indicate success, but do not return a packet in the
case where we hit an empty line. The smart protocol was not
prepared to handle such pack... |
polkit_system_bus_name_exists_sync (PolkitSubject *subject,
GCancellable *cancellable,
GError **error)
{
PolkitSystemBusName *name = POLKIT_SYSTEM_BUS_NAME (subject);
GDBusConnection *connection;
GVariant *result;
gboolean ret;... | 0 | [
"CWE-754"
] | polkit | a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81 | 13,276,382,981,103,385,000,000,000,000,000,000,000 | 37 | GHSL-2021-074: authentication bypass vulnerability in polkit
initial values returned if error caught |
gb18030_left_adjust_char_head(const UChar* start, const UChar* s)
{
const UChar *p;
enum state state = S_START;
DEBUG_GB18030(("----------------\n"));
for (p = s; p >= start; p--) {
DEBUG_GB18030(("state %d --(%02x)-->\n", state, *p));
switch (state) {
case S_START:
switch (GB18030_MAP[*p]) {... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 76,105,498,982,708,200,000,000,000,000,000,000,000 | 323 | onig-5.9.2 |
static MagickBooleanType ReadPSDLayersInternal(Image *image,
const ImageInfo *image_info,const PSDInfo *psd_info,
const MagickBooleanType skip_layers,ExceptionInfo *exception)
{
char
type[4];
LayerInfo
*layer_info;
MagickSizeType
size;
MagickBooleanType
status;
register ssize_t
i;
... | 0 | [
"CWE-399",
"CWE-401"
] | ImageMagick | 8a43abefb38c5e29138e1c9c515b313363541c06 | 327,996,897,129,601,500,000,000,000,000,000,000,000 | 368 | https://github.com/ImageMagick/ImageMagick/issues/1451 |
entry *load_entry(FILE * file, void (*error_func) (), struct passwd *pw,
char **envp) {
/* this function reads one crontab entry -- the next -- from a file.
* it skips any leading blank lines, ignores comments, and returns
* NULL if for any reason the entry can't be read and parsed.
*
* the entry is also pars... | 1 | [
"CWE-476"
] | cronie | a6576769f01325303b11edc3e0cfb05ef382ce56 | 112,445,623,636,983,760,000,000,000,000,000,000,000 | 351 | Fix CVE-2019-9704 and CVE-2019-9705
The users can cause DoS of the crond by loading huge crontab files.
We now allow maximum 1000 environment variables and 1000 crontab entries.
Also the comments and whitespace between the entries and variables
are now limited to 32768 characters. |
static int rtecp_construct_fci(sc_card_t *card, const sc_file_t *file,
u8 *out, size_t *outlen)
{
u8 buf[64], *p = out;
assert(card && card->ctx && file && out && outlen);
assert(*outlen >= (size_t)(p - out) + 2);
*p++ = 0x6F; /* FCI template */
p++; /* for length */
/* 0x80 - Number of data bytes in the fi... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 333,317,611,676,438,260,000,000,000,000,000,000,000 | 63 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
static void btrfs_dentry_release(struct dentry *dentry)
{
kfree(dentry->d_fsdata);
} | 0 | [
"CWE-200"
] | linux | 0305cd5f7fca85dae392b9ba85b116896eb7c1c7 | 334,676,981,344,250,240,000,000,000,000,000,000,000 | 4 | Btrfs: fix truncation of compressed and inlined extents
When truncating a file to a smaller size which consists of an inline
extent that is compressed, we did not discard (or made unusable) the
data between the new file size and the old file size, wasting metadata
space and allowing for the truncated data to be leaked... |
int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len){
int w;
int r;
uint8_t code;
if(scp==NULL)
return SSH_ERROR;
if(scp->state != SSH_SCP_WRITE_WRITING){
ssh_set_error(scp->session,SSH_FATAL,"ssh_scp_write called under invalid state");
return SSH_ERROR;
}
if(scp->processed + len >... | 1 | [] | libssh | 4aea835974996b2deb011024c53f4ff4329a95b5 | 18,491,474,695,307,555,000,000,000,000,000,000,000 | 52 | CVE-2019-14889: scp: Reformat scp.c
Fixes T181
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 42c727d0c186a1e2fa84a31ab40e16e58b404ab3) |
int dccp_disconnect(struct sock *sk, int flags)
{
struct inet_connection_sock *icsk = inet_csk(sk);
struct inet_sock *inet = inet_sk(sk);
int err = 0;
const int old_state = sk->sk_state;
if (old_state != DCCP_CLOSED)
dccp_set_state(sk, DCCP_CLOSED);
/* ABORT function of RFC793 */
if (old_state == DCCP_LISTEN... | 0 | [] | linux-2.6 | 39ebc0276bada8bb70e067cb6d0eb71839c0fb08 | 143,591,715,656,324,650,000,000,000,000,000,000,000 | 41 | [DCCP] getsockopt: Fix DCCP_SOCKOPT_[SEND,RECV]_CSCOV
We were only checking if there was enough space to put the int, but
left len as specified by the (malicious) user, sigh, fix it by setting
len to sizeof(val) and transfering just one int worth of data, the one
asked for.
Also check for negative len values.
Signed... |
void mark_unused_memory_as_defined() {} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 122,355,882,458,797,600,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 int load_module(struct load_info *info, const char __user *uargs,
int flags)
{
struct module *mod;
long err = 0;
char *after_dashes;
/*
* Do the signature check (if any) first. All that
* the signature check needs is info->len, it does
* not need any of the section info. That can be
* set u... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 305,062,280,846,128,780,000,000,000,000,000,000,000 | 227 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.