func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static size_t append_ctl_name(struct snd_kcontrol *kctl, const char *str) { return strlcat(kctl->id.name, str, sizeof(kctl->id.name)); }
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
282,905,979,933,685,400,000,000,000,000,000,000,000
4
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
void cgroup1_pidlist_destroy_all(struct cgroup *cgrp) { struct cgroup_pidlist *l, *tmp_l; mutex_lock(&cgrp->pidlist_mutex); list_for_each_entry_safe(l, tmp_l, &cgrp->pidlists, links) mod_delayed_work(cgroup_pidlist_destroy_wq, &l->destroy_dwork, 0); mutex_unlock(&cgrp->pidlist_mutex); flush_workqueue(cgroup_pi...
0
[ "CWE-416" ]
linux
3b0462726e7ef281c35a7a4ae33e93ee2bc9975b
315,685,020,364,477,800,000,000,000,000,000,000,000
12
cgroup: verify that source is a string The following sequence can be used to trigger a UAF: int fscontext_fd = fsopen("cgroup"); int fd_null = open("/dev/null, O_RDONLY); int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null); close_range(3, ~0U, 0); The cgroup v1 specific fs parser expects a...
void DES_set_key_unchecked(const_DES_cblock* key, DES_key_schedule* schedule) { memcpy(schedule, key, sizeof(const_DES_cblock)); }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
80,748,477,305,636,760,000,000,000,000,000,000,000
4
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
whoami() { /* * Who am i? Algorithm: 1. Use name as specified in NETHACKOPTIONS * 2. Use $USER or $LOGNAME (if 1. fails) * 3. Use getlogin() (if 2. fails) * The resulting name is overridden by command line options. * If everything fails...
0
[ "CWE-120", "CWE-269" ]
NetHack
f3def5c0b999478da2d0a8f0b6a7c370a2065f77
142,985,619,479,493,200,000,000,000,000,000,000,000
30
command line triggered buffer overruns Prevent extremely long command line arguments from overflowing local buffers in raw_printf or config_error_add. The increased buffer sizes they recently got to deal with long configuration file values aren't sufficient to handle command line induced overflows. choose_windows(co...
struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags) { struct dentry *res; struct inode *inode = NULL; struct nfs_fh *fhandle = NULL; struct nfs_fattr *fattr = NULL; unsigned long dir_verifier; int error; dfprintk(VFS, "NFS: lookup(%pd2)\n", dentry); nfs_inc_stats(dir, NFSIO...
0
[ "CWE-909" ]
linux
ac795161c93699d600db16c1a8cc23a65a1eceaf
194,643,772,522,335,100,000,000,000,000,000,000,000
62
NFSv4: Handle case where the lookup of a directory fails If the application sets the O_DIRECTORY flag, and tries to open a regular file, nfs_atomic_open() will punt to doing a regular lookup. If the server then returns a regular file, we will happily return a file descriptor with uninitialised open state. The fix is ...
uint8_t* WireFormat::InternalSerializeUnknownFieldsToArray( const UnknownFieldSet& unknown_fields, uint8_t* target, io::EpsCopyOutputStream* stream) { for (int i = 0; i < unknown_fields.field_count(); i++) { const UnknownField& field = unknown_fields.field(i); target = stream->EnsureSpace(target); ...
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
97,130,313,749,134,400,000,000,000,000,000,000,000
37
Apply patch
router_pick_directory_server(dirinfo_type_t type, int flags) { int busy = 0; const routerstatus_t *choice; if (!routerlist) return NULL; choice = router_pick_directory_server_impl(type, flags, &busy); if (choice || !(flags & PDS_RETRY_IF_NO_SERVERS)) return choice; if (busy) { /* If the reaso...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
326,184,544,255,934,800,000,000,000,000,000,000,000
30
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
NetworkStack *get_stack() { return stack; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
144,224,491,934,863,200,000,000,000,000,000,000,000
3
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int usbtest_suspend(struct usb_interface *intf, pm_message_t message) { return 0; }
0
[ "CWE-476" ]
linux
7c80f9e4a588f1925b07134bb2e3689335f6c6d8
305,454,134,302,574,630,000,000,000,000,000,000,000
4
usb: usbtest: fix NULL pointer dereference If the usbtest driver encounters a device with an IN bulk endpoint but no OUT bulk endpoint, it will try to dereference a NULL pointer (out->desc.bEndpointAddress). The problem can be solved by adding a missing test. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Rep...
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *yyscanner, RE_LEX_ENVIRONMENT *lex_env) { YYUSE (yyvaluep); YYUSE (yyscanner); YYUSE (lex_env); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN ...
0
[ "CWE-674", "CWE-787" ]
yara
925bcf3c3b0a28b5b78e25d9efda5c0bf27ae699
254,964,361,455,687,850,000,000,000,000,000,000,000
48
Fix issue #674. Move regexp limits to limits.h.
rs_filter_set_label(RSFilter *filter, const gchar *label) { g_return_if_fail(RS_IS_FILTER(filter)); filter->label = label; }
0
[ "CWE-59" ]
rawstudio
9c2cd3c93c05d009a91d84eedbb85873b0cb505d
31,480,071,190,791,254,000,000,000,000,000,000,000
6
Fixes insecure use of temporary file (CVE-2014-4978).
String *val_str(String* tmp) { if (check_null_ref()) return NULL; else return Item_direct_ref::val_str(tmp); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
163,041,640,449,683,530,000,000,000,000,000,000,000
7
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void bus_set_state(sd_bus *bus, enum bus_state state) { static const char * const table[_BUS_STATE_MAX] = { [BUS_UNSET] = "UNSET", [BUS_WATCH_BIND] = "WATCH_BIND", [BUS_OPENING] = "OPENING", [BUS_AUTHENTICATING] = "AUTHENTICATING", ...
0
[ "CWE-416" ]
systemd
1068447e6954dc6ce52f099ed174c442cb89ed54
253,219,543,107,674,470,000,000,000,000,000,000,000
22
sd-bus: introduce API for re-enqueuing incoming messages When authorizing via PolicyKit we want to process incoming method calls twice: once to process and figure out that we need PK authentication, and a second time after we aquired PK authentication to actually execute the operation. With this new call sd_bus_enqueu...
generate_using_x (ELG_secret_key *sk, unsigned int nbits, gcry_mpi_t x, gcry_mpi_t **ret_factors ) { gcry_err_code_t rc; gcry_mpi_t p; /* The prime. */ gcry_mpi_t p_min1; /* The prime minus 1. */ gcry_mpi_t g; /* The generator. */ gcry_mpi_t y; /* g^x mod p. */ unsigned ...
0
[ "CWE-200" ]
libgcrypt
410d70bad9a650e3837055e36f157894ae49a57d
101,567,346,231,887,070,000,000,000,000,000,000,000
77
cipher: Use ciphertext blinding for Elgamal decryption. * cipher/elgamal.c (USE_BLINDING): New. (decrypt): Rewrite to use ciphertext blinding. -- CVE-id: CVE-2014-3591 As a countermeasure to a new side-channel attacks on sliding windows exponentiation we blind the ciphertext for Elgamal decryption. This is similar ...
u8 gf_mp3_version(u32 hdr) { return ((hdr >> 19) & 0x3); }
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
73,344,353,130,174,450,000,000,000,000,000,000,000
4
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
static void free_thread_stack(struct task_struct *tsk) { kmem_cache_free(thread_stack_cache, tsk->stack); }
0
[ "CWE-416", "CWE-703" ]
linux
2b7e8665b4ff51c034c55df3cff76518d1a9ee3a
312,303,175,618,061,300,000,000,000,000,000,000,000
4
fork: fix incorrect fput of ->exe_file causing use-after-free Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for write killable") made it possible to kill a forking task while it is waiting to acquire its ->mmap_sem for write, in dup_mmap(). However, it was overlooked that this introduced an new erro...
void AsyncSSLSocket::sslConn( HandshakeCB* callback, std::chrono::milliseconds timeout, const SSLContext::SSLVerifyPeerEnum& verifyPeer) { DestructorGuard dg(this); eventBase_->dcheckIsInEventBaseThread(); // Cache local and remote socket addresses to keep them available // after socket file descri...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
183,584,678,007,623,300,000,000,000,000,000,000,000
63
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
dirvote_recalculate_timing(or_options_t *options, time_t now) { int interval, vote_delay, dist_delay; time_t start; time_t end; networkstatus_t *consensus; if (!authdir_mode_v3(options)) return; consensus = networkstatus_get_live_consensus(now); memset(&voting_schedule, 0, sizeof(voting_schedule));...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
258,654,952,991,642,750,000,000,000,000,000,000,000
48
Fix assertion failure in tor_timegm. Fixes bug 6811.
string DebugString() const override { return "SparseTensorSliceDatasetOp::Dataset"; }
0
[ "CWE-476" ]
tensorflow
02cc160e29d20631de3859c6653184e3f876b9d7
188,150,915,980,160,200,000,000,000,000,000,000,000
3
Prevent nullptr deref in SparseTensorSliceDataset The arguments must determine a valid sparse tensor. This means that when indices are empty then the values must be empty too (and the reverse). Also added test, by modifying existing test with empty sparse tensor to now run with an invalid sparse tensor input. PiperO...
add_ctype_to_cc_by_range(CClassNode* cc, int ctype ARG_UNUSED, int not, OnigEncoding enc ARG_UNUSED, OnigCodePoint sb_out, const OnigCodePoint mbr[]) { int i, r; OnigCodePoint j; int n = ONIGENC_CODE_RANGE_NUM(mbr); if (not == 0) { for (i = 0; i < n; i++) { for (j = ONI...
0
[ "CWE-787" ]
oniguruma
ddbf55698b5f7ffdfa737b0b8e0079af1fdd7cb1
143,242,642,485,009,780,000,000,000,000,000,000,000
70
re-fix #60 by check val_type
int snd_pcm_kernel_ioctl(struct snd_pcm_substream *substream, unsigned int cmd, void *arg) { snd_pcm_uframes_t *frames = arg; snd_pcm_sframes_t result; if (substream->runtime->status->state == SNDRV_PCM_STATE_DISCONNECTED) return -EBADFD; switch (cmd) { case SNDRV_PCM_IOCTL_FORWARD: { /* provided only ...
0
[ "CWE-125" ]
linux
92ee3c60ec9fe64404dc035e7c41277d74aa26cb
124,263,309,551,681,660,000,000,000,000,000,000,000
36
ALSA: pcm: Fix races among concurrent hw_params and hw_free calls Currently we have neither proper check nor protection against the concurrent calls of PCM hw_params and hw_free ioctls, which may result in a UAF. Since the existing PCM stream lock can't be used for protecting the whole ioctl operations, we need a new...
static void npidentifier_cache_add_string(NPIdentifier ident, const gchar *str) { if (G_UNLIKELY(g_npidentifier_cache == NULL)) return; NPIdentifierInfo *npi = npidentifier_info_new(); if (G_UNLIKELY(npi == NULL)) return; npi->string_len = strlen(str) + 1; if ((npi->u.string = NPW_MemAlloc(npi->string_len))...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
85,669,944,697,910,570,000,000,000,000,000,000,000
15
Support all the new variables added
void Compute(OpKernelContext *ctx) override { const Tensor *indices_t, *values_t, *shape_t, *reduction_axes_t; OP_REQUIRES_OK(ctx, ctx->input("input_indices", &indices_t)); OP_REQUIRES_OK(ctx, ctx->input("input_values", &values_t)); OP_REQUIRES_OK(ctx, ctx->input("input_shape", &shape_t)); OP_REQU...
1
[ "CWE-125" ]
tensorflow
87158f43f05f2720a374f3e6d22a7aaa3a33f750
51,050,455,024,866,715,000,000,000,000,000,000,000
69
Prevent heap OOB in sparse reduction ops. PiperOrigin-RevId: 387934524 Change-Id: I894aa30f1e454f09b471d565b4a325da49322c1a
static sector_t fuse_bmap(struct address_space *mapping, sector_t block) { struct inode *inode = mapping->host; struct fuse_mount *fm = get_fuse_mount(inode); FUSE_ARGS(args); struct fuse_bmap_in inarg; struct fuse_bmap_out outarg; int err; if (!inode->i_sb->s_bdev || fm->fc->no_bmap) return 0; memset(&inar...
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
42,060,954,143,954,536,000,000,000,000,000,000,000
29
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
static inline void __set_task_cpu(struct task_struct *p, unsigned int cpu) { set_task_rq(p, cpu); #ifdef CONFIG_SMP /* * After ->cpu is set up to a new value, task_rq_lock(p, ...) can be * successfuly executed on another CPU. We must ensure that updates of * per-task data have been completed by this moment. *...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
338,771,221,647,904,280,000,000,000,000,000,000,000
13
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
STATIC void S_skip_to_be_ignored_text(pTHX_ RExC_state_t *pRExC_state, char ** p, const bool force_to_xmod ) { /* If the text at the current parse position '*p' is a '(?#...)' comment, * or if we are under /x or 'force_to_...
0
[ "CWE-190", "CWE-787" ]
perl5
897d1f7fd515b828e4b198d8b8bef76c6faf03ed
289,188,239,546,082,080,000,000,000,000,000,000,000
55
regcomp.c: Prevent integer overflow from nested regex quantifiers. (CVE-2020-10543) On 32bit systems the size calculations for nested regular expression quantifiers could overflow causing heap memory corruption. Fixes: Perl/perl5-security#125 (cherry picked from commit bfd31397db5dc1a5c5d3e0a1f753a4f89a736e71)
void operator()(const CPUDevice& d, typename TTypes<T, 4>::ConstTensor input, typename TTypes<T, 3>::ConstTensor filter, typename TTypes<T, 4>::ConstTensor out_backprop, int stride_rows, int stride_cols, int rate_rows, int rate_cols, int pad_top,...
0
[ "CWE-787" ]
tensorflow
3f6fe4dfef6f57e768260b48166c27d148f3015f
325,410,324,808,762,330,000,000,000,000,000,000,000
59
Add missing validations in dillation ops. PiperOrigin-RevId: 372037158 Change-Id: I4ee304c84a02550c030288a6534000b934fc1599
int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) { #ifdef OPENSSL_FIPS if (FIPS_mode() && !(dh->meth->flags & DH_FLAG_FIPS_METHOD) && !(dh->flags & DH_FLAG_NON_FIPS_ALLOW)) { DHerr(DH_F_DH_COMPUTE_KEY, DH_R_NON_FIPS_METHOD); return 0; } #endif return dh->meth->co...
0
[ "CWE-320" ]
openssl
3984ef0b72831da8b3ece4745cac4f8575b19098
201,331,841,261,319,040,000,000,000,000,000,000,000
11
Reject excessively large primes in DH key generation. CVE-2018-0732 Signed-off-by: Guido Vranken <guidovranken@gmail.com> (cherry picked from commit 91f7361f47b082ae61ffe1a7b17bb2adf213c7fe) Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openss...
int cil_resolve_level(struct cil_tree_node *current, struct cil_level *level, void *extra_args) { struct cil_symtab_datum *sens_datum = NULL; int rc = SEPOL_ERR; rc = cil_resolve_name(current, (char*)level->sens_str, CIL_SYM_SENS, extra_args, &sens_datum); if (rc != SEPOL_OK) { cil_log(CIL_ERR, "Failed to find s...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
284,524,367,306,034,000,000,000,000,000,000,000,000
25
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
router_digest_version_as_new_as(const char *digest, const char *cutoff) { routerinfo_t *router = router_get_by_digest(digest); if (!router) return 1; return tor_version_as_new_as(router->platform, cutoff); }
0
[ "CWE-399" ]
tor
308f6dad20675c42b29862f4269ad1fbfb00dc9a
32,392,030,349,402,704,000,000,000,000,000,000,000
7
Mitigate a side-channel leak of which relays Tor chooses for a circuit Tor's and OpenSSL's current design guarantee that there are other leaks, but this one is likely to be more easily exploitable, and is easy to fix.
FLAC_API FLAC__bool FLAC__stream_encoder_set_min_residual_partition_order(FLAC__StreamEncoder *encoder, uint32_t value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) return false; en...
0
[ "CWE-787" ]
flac
e1575e4a7c5157cbf4e4a16dbd39b74f7174c7be
328,369,216,835,174,100,000,000,000,000,000,000,000
10
libFlac: Exit at EOS in verify mode When verify mode is enabled, once decoder flags end of stream, encode processing is considered complete. CVE-2021-0561 Signed-off-by: Ralph Giles <giles@thaumas.net>
SYSCALL_DEFINE3(getresgid, gid_t __user *, rgid, gid_t __user *, egid, gid_t __user *, sgid) { const struct cred *cred = current_cred(); int retval; if (!(retval = put_user(cred->gid, rgid)) && !(retval = put_user(cred->egid, egid))) retval = put_user(cred->sgid, sgid); return retval; }
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
101,734,958,424,630,550,000,000,000,000,000,000,000
11
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
static inline struct cfs_bandwidth *tg_cfs_bandwidth(struct task_group *tg) { return NULL; }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
162,901,588,079,087,320,000,000,000,000,000,000,000
4
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static OPJ_FLOAT32 opj_j2k_get_default_stride(opj_tcp_t * p_tcp) { (void)p_tcp; return 0; }
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
23,103,716,359,360,445,000,000,000,000,000,000,000
5
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
delegpt_add_ns(struct delegpt* dp, struct regional* region, uint8_t* name, uint8_t lame) { struct delegpt_ns* ns; size_t len; (void)dname_count_size_labels(name, &len); log_assert(!dp->dp_type_mlc); /* slow check for duplicates to avoid counting failures when * adding the same server as a dependency twice */ i...
0
[ "CWE-400" ]
unbound
ba0f382eee814e56900a535778d13206b86b6d49
33,243,934,800,539,890,000,000,000,000,000,000,000
27
- CVE-2020-12662 Unbound can be tricked into amplifying an incoming query into a large number of queries directed to a target. - CVE-2020-12663 Malformed answers from upstream name servers can be used to make Unbound unresponsive.
QPDFObjectHandle::addTokenFilter(PointerHolder<TokenFilter> filter) { assertStream(); return dynamic_cast<QPDF_Stream*>( m->obj.getPointer())->addTokenFilter(filter); }
0
[ "CWE-399", "CWE-674" ]
qpdf
b4d6cf6836ce025ba1811b7bbec52680c7204223
82,046,184,736,399,310,000,000,000,000,000,000,000
6
Limit depth of nesting in direct objects (fixes #202) This fixes CVE-2018-9918.
static int rm_read_multi(AVFormatContext *s, AVIOContext *pb, AVStream *st, char *mime) { int number_of_streams = avio_rb16(pb); int number_of_mdpr; int i, ret; unsigned size2; for (i = 0; i<number_of_streams; i++) avio_rb16(pb); number_of_mdpr = avio_rb16(pb); ...
0
[ "CWE-416" ]
FFmpeg
a7e032a277452366771951e29fd0bf2bd5c029f0
148,365,070,207,258,880,000,000,000,000,000,000,000
40
avformat/rmdec: Do not pass mime type in rm_read_multi() to ff_rm_read_mdpr_codecdata() Fixes: use after free() Fixes: rmdec-crash-ffe85b4cab1597d1cfea6955705e53f1f5c8a362 Found-by: Paul Ch <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static void entry_clear(struct name_entry *a) { memset(a, 0, sizeof(*a)); }
0
[ "CWE-20" ]
git
e1d911dd4c7b76a5a8cec0f5c8de15981e34da83
254,107,142,662,729,320,000,000,000,000,000,000,000
4
mingw: disallow backslash characters in tree objects' file names The backslash character is not a valid part of a file name on Windows. Hence it is dangerous to allow writing files that were unpacked from tree objects, when the stored file name contains a backslash character: it will be misinterpreted as directory sep...
Value ExpressionObject::evaluate(const Document& root, Variables* variables) const { MutableDocument outputDoc; for (auto&& pair : _expressions) { outputDoc.addField(pair.first, pair.second->evaluate(root, variables)); } return outputDoc.freezeToValue(); }
0
[]
mongo
1772b9a0393b55e6a280a35e8f0a1f75c014f301
139,545,982,211,710,250,000,000,000,000,000,000,000
7
SERVER-49404 Enforce additional checks in $arrayToObject
static void __net_exit default_device_exit_batch(struct list_head *net_list) { /* At exit all network devices most be removed from a network * namespace. Do this in the reverse order of registration. * Do this across as many network namespaces as possible to * improve batching efficiency. */ struct net_devi...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
33,864,172,627,752,103,000,000,000,000,000,000,000
35
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 inline void gen_goto_tb(DisasContext *s, int tb_num, target_ulong eip) { target_ulong pc = s->cs_base + eip; if (use_goto_tb(s, pc)) { /* jump to same page: we can use a direct jump */ tcg_gen_goto_tb(tb_num); gen_jmp_im(eip); tcg_gen_exit_tb((uintptr_t)s->tb + tb_num); ...
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
111,163,377,274,378,660,000,000,000,000,000,000,000
15
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
int git_path_iconv(git_path_iconv_t *ic, const char **in, size_t *inlen) { char *nfd = (char*)*in, *nfc; size_t nfdlen = *inlen, nfclen, wantlen = nfdlen, alloclen, rv; int retry = 1; if (!ic || ic->map == (iconv_t)-1 || !git_path_has_non_ascii(*in, *inlen)) return 0; git_buf_clear(&ic->buf); while (1) { ...
0
[ "CWE-20", "CWE-706" ]
libgit2
3f7851eadca36a99627ad78cbe56a40d3776ed01
224,157,921,968,833,100,000,000,000,000,000,000,000
53
Disallow NTFS Alternate Data Stream attacks, even on Linux/macOS A little-known feature of NTFS is that it offers to store metadata in so-called "Alternate Data Streams" (inspired by Apple's "resource forks") that are copied together with the file they are associated with. These Alternate Data Streams can be accessed ...
static int io_renameat_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe) { struct io_rename *ren = &req->rename; const char __user *oldf, *newf; if (sqe->buf_index || sqe->splice_fd_in) return -EINVAL; if (unlikely(req->flags & REQ_F_FIXED_FILE)) return -EBADF; ren->old_dfd = READ_ONCE(sqe->f...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
190,132,713,786,355,600,000,000,000,000,000,000,000
30
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 int threaded_has_dirs_only_path(struct cache_def *cache, const char *name, int len, int prefix_len) { /* * Note: this function is used by the checkout machinery, which also * takes care to properly reset the cache when it performs an operation * that would leave the cache outdated. If this function starts...
0
[ "CWE-59", "CWE-61" ]
git
684dd4c2b414bcf648505e74498a608f28de4592
83,054,086,632,233,540,000,000,000,000,000,000,000
13
checkout: fix bug that makes checkout follow symlinks in leading path Before checking out a file, we have to confirm that all of its leading components are real existing directories. And to reduce the number of lstat() calls in this process, we cache the last leading path known to contain only directories. However, wh...
static int ip6gre_fill_info(struct sk_buff *skb, const struct net_device *dev) { struct ip6_tnl *t = netdev_priv(dev); struct __ip6_tnl_parm *p = &t->parms; if (nla_put_u32(skb, IFLA_GRE_LINK, p->link) || nla_put_be16(skb, IFLA_GRE_IFLAGS, gre_tnl_flags_to_gre_flags(p->i_flags)) || nla_put_be16(skb, I...
0
[ "CWE-125" ]
net
7892032cfe67f4bde6fc2ee967e45a8fbaf33756
16,915,459,714,447,227,000,000,000,000,000,000,000
35
ip6_gre: fix ip6gre_err() invalid reads Andrey Konovalov reported out of bound accesses in ip6gre_err() If GRE flags contains GRE_KEY, the following expression *(((__be32 *)p) + (grehlen / 4) - 1) accesses data ~40 bytes after the expected point, since grehlen includes the size of IPv6 headers. Let's use a "struct ...
kex_prop2buf(struct sshbuf *b, char *proposal[PROPOSAL_MAX]) { u_int i; int r; sshbuf_reset(b); /* * add a dummy cookie, the cookie will be overwritten by * kex_send_kexinit(), each time a kexinit is set */ for (i = 0; i < KEX_COOKIE_LEN; i++) { if ((r = sshbuf_put_u8(b, 0)) != 0) return r; } for (i...
0
[ "CWE-522", "CWE-399" ]
openssh-portable
ec165c392ca54317dbe3064a8c200de6531e89ad
107,694,633,515,306,620,000,000,000,000,000,000,000
24
upstream commit Unregister the KEXINIT handler after message has been received. Otherwise an unauthenticated peer can repeat the KEXINIT and cause allocation of up to 128MB -- until the connection is closed. Reported by shilei-c at 360.cn Upstream-ID: 43649ae12a27ef94290db16d1a98294588b75c05
socket_putmessage(char msgtype, const char *s, size_t len) { if (DoingCopyOut || PqCommBusy) return 0; PqCommBusy = true; if (msgtype) if (internal_putbytes(&msgtype, 1)) goto fail; if (PG_PROTOCOL_MAJOR(FrontendProtocol) >= 3) { uint32 n32; n32 = htonl((uint32) (len + 4)); if (internal_putbytes((ch...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
156,393,086,162,135,870,000,000,000,000,000,000,000
25
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
ComputeQualifiedName( TPM_HANDLE parentHandle, // IN: parent's handle TPM_ALG_ID nameAlg, // IN: name hash TPM2B_NAME *name, // IN: name of the object TPM2B_NAME *qualifiedName // OUT: qualified name of the object ) { HASH_STATE hashStat...
0
[ "CWE-119" ]
libtpms
ea62fd9679f8c6fc5e79471b33cfbd8227bfed72
308,594,026,761,543,270,000,000,000,000,000,000,000
32
tpm2: Initialize a whole OBJECT before using it Initialize a whole OBJECT before using it. This is necessary since an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT union and that HASH_OBJECT can leave bad size inidicators in TPM2B buffer in the OBJECT. To get rid of this problem we reset the whole OBJECT...
static int mem_cgroup_do_charge(struct mem_cgroup *memcg, gfp_t gfp_mask, unsigned int nr_pages, bool oom_check) { unsigned long csize = nr_pages * PAGE_SIZE; struct mem_cgroup *mem_over_limit; struct res_counter *fail_res; unsigned long flags = 0; int ret; ret = res_counter_charge(&memcg->res, csize, &fail_...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
315,056,467,209,501,030,000,000,000,000,000,000,000
67
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
GF_Err fdpa_Read(GF_Box *s, GF_BitStream *bs) { u32 i; GF_FDpacketBox *ptr = (GF_FDpacketBox *)s; ISOM_DECREASE_SIZE(ptr, 3); ptr->info.sender_current_time_present = gf_bs_read_int(bs, 1); ptr->info.expected_residual_time_present = gf_bs_read_int(bs, 1); ptr->info.session_close_bit = gf_bs_read_int(bs, 1); ptr...
0
[ "CWE-416" ]
gpac
6063b1a011c3f80cee25daade18154e15e4c058c
321,428,276,198,046,300,000,000,000,000,000,000,000
42
fix UAF in audio_sample_entry_Read (#1440)
void sqlite3KeyInfoUnref(KeyInfo *p){ if( p ){ assert( p->nRef>0 ); p->nRef--; if( p->nRef==0 ) sqlite3DbFreeNN(p->db, p); } }
0
[ "CWE-20" ]
sqlite
e59c562b3f6894f84c715772c4b116d7b5c01348
156,493,194,540,490,770,000,000,000,000,000,000,000
7
Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list. FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba
void lremCommand(client *c) { robj *subject, *obj; obj = c->argv[3]; long toremove; long removed = 0; if ((getLongFromObjectOrReply(c, c->argv[2], &toremove, NULL) != C_OK)) return; subject = lookupKeyWriteOrReply(c,c->argv[1],shared.czero); if (subject == NULL || checkType(c,subje...
1
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
253,854,928,078,654,620,000,000,000,000,000,000,000
43
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static inline void _swap16Buffer(short *pData, int numBytes) { // do nothing }
0
[ "CWE-119" ]
soundtouch
9e02d9b04fda6c1f44336ff00bb5af1e2ffc039e
4,319,101,627,620,882,000,000,000,000,000,000,000
4
Added minimum size check for WAV header block lengh values
static void test_do_set() { MYSQL_STMT *stmt_do, *stmt_set; char *query; int rc, i; myheader("test_do_set"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); myquery(rc); rc= mysql_query(mysql, "create table t1 (a int)"); myquery(rc); query= (char*)"do @var:=(1 in (select * from t1))"; stmt_do=...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
238,907,858,288,336,440,000,000,000,000,000,000,000
36
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...
static struct page *new_page(struct page *p, unsigned long private, int **x) { int nid = page_to_nid(p); if (PageHuge(p)) return alloc_huge_page_node(page_hstate(compound_head(p)), nid); else return __alloc_pages_node(nid, GFP_HIGHUSER_MOVABLE, 0); }
0
[]
linux
c3901e722b2975666f42748340df798114742d6d
95,490,571,153,802,860,000,000,000,000,000,000,000
9
mm: hwpoison: fix thp split handling in memory_failure() When memory_failure() runs on a thp tail page after pmd is split, we trigger the following VM_BUG_ON_PAGE(): page:ffffd7cd819b0040 count:0 mapcount:0 mapping: (null) index:0x1 flags: 0x1fffc000400000(hwpoison) page dumped because: VM_BUG_ON_PAG...
static int smtp_rcpt_to(struct Connection *conn, const struct AddressList *al) { if (!al) return 0; struct Address *a = NULL; TAILQ_FOREACH(a, al, entries) { /* weed out group mailboxes, since those are for display only */ if (!a->mailbox || a->group) { continue; } char buf[1024];...
0
[ "CWE-94", "CWE-74" ]
neomutt
fb013ec666759cb8a9e294347c7b4c1f597639cc
12,150,820,541,995,590,000,000,000,000,000,000,000
27
tls: clear data after a starttls acknowledgement After a starttls acknowledgement message, clear the buffers of any incoming data / commands. This will ensure that all future data is handled securely. Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
get_gdb_index_symbol_kind_name (gdb_index_symbol_kind kind) { /* See gdb/gdb-index.h. */ static const char * const kinds[] = { N_ ("no info"), N_ ("type"), N_ ("variable"), N_ ("function"), N_ ("other"), N_ ("unused5"), N_ ("unused6"), N_ ("unused7") }; return _ (kinds[kind])...
0
[ "CWE-703" ]
binutils-gdb
695c6dfe7e85006b98c8b746f3fd5f913c94ebff
61,455,518,481,175,270,000,000,000,000,000,000,000
17
PR29370, infinite loop in display_debug_abbrev The PR29370 testcase is a fuzzed object file with multiple .trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev sections are not a violation of the DWARF standard. The DWARF5 standard even gives an example of multiple .debug_abbrev sections contained in group...
get_wordnode(spellinfo_T *spin) { wordnode_T *n; if (spin->si_first_free == NULL) n = (wordnode_T *)getroom(spin, sizeof(wordnode_T), TRUE); else { n = spin->si_first_free; spin->si_first_free = n->wn_child; vim_memset(n, 0, sizeof(wordnode_T)); --spin->si_free_count; } #ifdef SPELL_PRINTTREE ...
0
[ "CWE-190" ]
vim
399c297aa93afe2c0a39e2a1b3f972aebba44c9d
217,154,355,347,523,400,000,000,000,000,000,000,000
19
patch 8.0.0322: possible overflow with corrupted spell file Problem: Possible overflow with spell file where the tree length is corrupted. Solution: Check for an invalid length (suggested by shqking)
DEFUN(goLineL, END, "Go to the last line") { _goLine("$"); }
0
[ "CWE-59", "CWE-241" ]
w3m
18dcbadf2771cdb0c18509b14e4e73505b242753
232,141,679,406,955,060,000,000,000,000,000,000,000
4
Make temporary directory safely when ~/.w3m is unwritable
const char *gf_av1_get_obu_name(ObuType obu_type) { switch (obu_type) { case OBU_SEQUENCE_HEADER: return "seq_header"; case OBU_TEMPORAL_DELIMITER: return "delimiter"; case OBU_FRAME_HEADER: return "frame_header"; case OBU_TILE_GROUP: return "tile_group"; case OBU_METADATA: return "metadata"; case OBU_FRAME: ret...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
291,532,803,757,933,300,000,000,000,000,000,000,000
23
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
bool asn1_read_uint8(struct asn1_data *data, uint8_t *v) { return asn1_read(data, v, 1); }
0
[ "CWE-399" ]
samba
9d989c9dd7a5b92d0c5d65287935471b83b6e884
8,591,723,851,994,936,000,000,000,000,000,000,000
4
CVE-2015-7540: lib: util: Check *every* asn1 return call and early return. BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri Sep...
convert_database_name(text *databasename) { char *dbname = text_to_cstring(databasename); return get_database_oid(dbname, false); }
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
225,229,418,747,801,260,000,000,000,000,000,000,000
6
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
p11_kit_iter_get_module (P11KitIter *iter) { return_val_if_fail (iter != NULL, NULL); return_val_if_fail (iter->iterating, 0); return iter->module; }
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
30,565,647,502,270,160,000,000,000,000,000,000,000
6
Check for arithmetic overflows before allocating
static void save_state_to_tss16(struct x86_emulate_ctxt *ctxt, struct tss_segment_16 *tss) { tss->ip = ctxt->_eip; tss->flag = ctxt->eflags; tss->ax = ctxt->regs[VCPU_REGS_RAX]; tss->cx = ctxt->regs[VCPU_REGS_RCX]; tss->dx = ctxt->regs[VCPU_REGS_RDX]; tss->bx = ctxt->regs[VCPU_REGS_RBX]; tss->sp = ctxt->regs...
0
[]
kvm
e28ba7bb020f07193bc000453c8775e9d2c0dda7
177,425,412,704,435,200,000,000,000,000,000,000,000
20
KVM: x86: fix missing checks in syscall emulation On hosts without this patch, 32bit guests will crash (and 64bit guests may behave in a wrong way) for example by simply executing following nasm-demo-application: [bits 32] global _start SECTION .text _start: syscall (I tested it with winxp and linux ...
int tls1_setup_key_block(SSL *s) { unsigned char *p1, *p2 = NULL; const EVP_CIPHER *c; const EVP_MD *hash; int num; SSL_COMP *comp; int mac_type = NID_undef, mac_secret_size = 0; int ret = 0; #ifdef KSSL_DEBUG fprintf(stderr, "tls1_setup_key_block()\n"); #endif ...
0
[]
openssl
1a3701f4fe0530a40ec073cd78d02cfcc26c0f8e
293,399,606,019,335,020,000,000,000,000,000,000,000
107
Sanity check EVP_CTRL_AEAD_TLS_AAD The various implementations of EVP_CTRL_AEAD_TLS_AAD expect a buffer of at least 13 bytes long. Add sanity checks to ensure that the length is at least that. Also add a new constant (EVP_AEAD_TLS1_AAD_LEN) to evp.h to represent this length. Thanks to Kevin Wojtysiak (Int3 Solutions) ...
int parse_sar_opt(char *argv[], int *opt, struct activity *act[], unsigned int *flags, int caller) { int i, p; for (i = 1; *(argv[*opt] + i); i++) { /* * Note: argv[*opt] contains something like "-BruW" * *(argv[*opt] + i) will contain 'B', 'r', etc. */ switch (*(argv[*opt] + i)) { case 'A':...
0
[ "CWE-125" ]
sysstat
fbc691eaaa10d0bcea6741d5a223dc3906106548
332,304,576,439,369,750,000,000,000,000,000,000,000
181
Fix #196 and #199: Out of bound reads security issues Check args before calling memmove() and memset() in remap_struct() function to avoid out of bound reads which would possibly lead to unknown code execution and/or sadf command crash. Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com>
int kvm_arch_vcpu_ioctl_get_mpstate(struct kvm_vcpu *vcpu, struct kvm_mp_state *mp_state) { kvm_apic_accept_events(vcpu); if (vcpu->arch.mp_state == KVM_MP_STATE_HALTED && vcpu->arch.pv.pv_unhalted) mp_state->mp_state = KVM_MP_STATE_RUNNABLE; else mp_state->mp_state = vcpu->arch.mp_state; return 0...
0
[ "CWE-119", "CWE-703", "CWE-120" ]
linux
a08d3b3b99efd509133946056531cdf8f3a0c09b
25,342,335,651,692,334,000,000,000,000,000,000,000
12
kvm: x86: fix emulator buffer overflow (CVE-2014-0049) The problem occurs when the guest performs a pusha with the stack address pointing to an mmio address (or an invalid guest physical address) to start with, but then extending into an ordinary guest physical address. When doing repeated emulated pushes emulator_re...
GtkTreeModel *bluetooth_client_get_model (BluetoothClient *client) { BluetoothClientPrivate *priv; GtkTreeModel *model; g_return_val_if_fail (BLUETOOTH_IS_CLIENT (client), NULL); priv = BLUETOOTH_CLIENT_GET_PRIVATE(client); model = GTK_TREE_MODEL (g_object_ref(priv->store)); return model; }
0
[]
gnome-bluetooth
6b5086d42ea64d46277f3c93b43984f331d12f89
91,455,958,063,704,740,000,000,000,000,000,000,000
12
lib: Fix Discoverable being reset when turned off Work-around race in bluetoothd which would reset the discoverable flag if a timeout change was requested before discoverable finished being set to off: See https://bugzilla.redhat.com/show_bug.cgi?id=1602985
R_API void r_str_reverse(char *str) { int i, len = strlen (str); int half = len / 2; for (i = 0; i < half; i++) { char ch = str[i]; str[i] = str[len - i - 1]; str[len - i - 1] = ch; } }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
160,308,547,568,443,530,000,000,000,000,000,000,000
9
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
static SUB_STATE_RETURN write_state_machine(SSL *s) { OSSL_STATEM *st = &s->statem; int ret; WRITE_TRAN(*transition) (SSL *s); WORK_STATE(*pre_work) (SSL *s, WORK_STATE wst); WORK_STATE(*post_work) (SSL *s, WORK_STATE wst); int (*construct_message) (SSL *s); void (*cb) (const SSL *ssl, int t...
0
[ "CWE-400" ]
openssl
4b390b6c3f8df925dc92a3dd6b022baa9a2f4650
324,835,972,828,596,900,000,000,000,000,000,000,000
97
Excessive allocation of memory in tls_get_message_header() A TLS message includes 3 bytes for its length in the header for the message. This would allow for messages up to 16Mb in length. Messages of this length are excessive and OpenSSL includes a check to ensure that a peer is sending reasonably sized messages in or...
static pyc_object *get_array_object_generic(RBuffer *buffer, ut32 size) { pyc_object *tmp = NULL; pyc_object *ret = NULL; ut32 i = 0; ret = R_NEW0 (pyc_object); if (!ret) { return NULL; } ret->data = r_list_newf ((RListFree)free_object); if (!ret->data) { free (ret); return NULL; } for (i = 0; i < size...
1
[ "CWE-119", "CWE-825" ]
radare2
35482cb760db10f87a62569e2f8872dbd95e9269
39,523,904,555,183,865,000,000,000,000,000,000,000
30
Fix UAF in pyc parser ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/harep2.pyc
yang_check_type(struct lys_module *module, struct lys_node *parent, struct yang_type *typ, struct lys_type *type, int tpdftype, struct unres_schema *unres) { struct ly_ctx *ctx = module->ctx; int rc, ret = -1; unsigned int i, j; int8_t req; const char *name, *value, *module_name = NULL; LY_DATA_...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
150,996,379,225,999,960,000,000,000,000,000,000,000
417
yang parser BUGFIX double free Fixes #742
flushupdates(struct interface *ifp) { babel_interface_nfo *babel_ifp = NULL; struct xroute *xroute; struct babel_route *route; const unsigned char *last_prefix = NULL; unsigned char last_plen = 0xFF; int i; if(ifp == NULL) { struct vrf *vrf = vrf_lookup_by_id(VRF_DEFAULT); struct i...
0
[ "CWE-787" ]
frr
c3793352a8d76d2eee1edc38a9a16c1c8a6573f4
281,092,793,068,305,850,000,000,000,000,000,000,000
124
babeld: fix #10502 #10503 by repairing the checks on length This patch repairs the checking conditions on length in four functions: babel_packet_examin, parse_hello_subtlv, parse_ihu_subtlv, and parse_update_subtlv Signed-off-by: qingkaishi <qingkaishi@gmail.com>
FunctionCall8Coll(FmgrInfo *flinfo, Oid collation, Datum arg1, Datum arg2, Datum arg3, Datum arg4, Datum arg5, Datum arg6, Datum arg7, Datum arg8) { FunctionCallInfoData fcinfo; Datum result; InitFunctionCallInfoData(fcinfo, flinfo, 8, collation, NULL, NULL); fcinfo.arg[0] = arg1; fcinfo.arg[1] = ar...
0
[ "CWE-264" ]
postgres
537cbd35c893e67a63c59bc636c3e888bd228bc7
187,911,599,418,632,730,000,000,000,000,000,000,000
34
Prevent privilege escalation in explicit calls to PL validators. The primary role of PL validators is to be called implicitly during CREATE FUNCTION, but they are also normal functions that a user can call explicitly. Add a permissions check to each validator to ensure that a user cannot use explicit validator calls ...
lt_dladvise_init (lt_dladvise *padvise) { lt_dladvise advise = (lt_dladvise) lt__zalloc (sizeof (struct lt__advise)); *padvise = advise; return (advise ? 0 : 1); }
0
[]
libtool
e91f7b960032074a55fc91273c1917e3082b5338
191,727,270,746,098,100,000,000,000,000,000,000,000
6
Don't load module.la from current directory by default. * libltdl/ltdl.c (try_dlopen): Do not attempt to load an unqualified module.la file from the current directory (by default) since doing so is insecure and is not compliant with the documentation. * tests/testsuite.at: Qualify access to module.la file in current d...
static void ucma_finish_ctx(struct ucma_context *ctx) { lockdep_assert_held(&ctx->file->mut); list_add_tail(&ctx->list, &ctx->file->ctx_list); xa_store(&ctx_table, ctx->id, ctx, GFP_KERNEL); }
0
[ "CWE-416" ]
linux
f5449e74802c1112dea984aec8af7a33c4516af1
101,023,260,467,653,030,000,000,000,000,000,000,000
6
RDMA/ucma: Rework ucma_migrate_id() to avoid races with destroy ucma_destroy_id() assumes that all things accessing the ctx will do so via the xarray. This assumption violated only in the case the FD is being closed, then the ctx is reached via the ctx_list. Normally this is OK since ucma_destroy_id() cannot run concu...
static int evtchn_set_fn(struct kvm_kernel_irq_routing_entry *e, struct kvm *kvm, int irq_source_id, int level, bool line_status) { bool mm_borrowed = false; int rc; if (!level) return -1; rc = kvm_xen_set_evtchn_fast(e, kvm); if (rc != -EWOULDBLOCK) return rc; if (current->mm != kvm->mm) { /* * I...
0
[ "CWE-476" ]
linux
55749769fe608fa3f4a075e42e89d237c8e37637
253,376,496,897,810,180,000,000,000,000,000,000,000
70
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 decode(const char * in, int size, FilterCharVector & out) const { if (size == -1) { for (;*in; ++in) out.append(lookup[*in]); } else { const char * stop = in + size; for (;in != stop; ++in) out.append(lookup[*in]); } }
0
[ "CWE-125" ]
aspell
de29341638833ba7717bd6b5e6850998454b044b
305,481,452,797,054,600,000,000,000,000,000,000,000
10
Don't allow null-terminated UCS-2/4 strings using the original API. Detect if the encoding is UCS-2/4 and the length is -1 in affected API functions and refuse to convert the string. If the string ends up being converted somehow, abort with an error message in DecodeDirect and ConvDirect. To convert a null terminate...
void *ip6t_alloc_initial_table(const struct xt_table *info) { return xt_alloc_initial_table(ip6t, IP6T); }
0
[ "CWE-200" ]
linux-2.6
6a8ab060779779de8aea92ce3337ca348f973f54
56,300,344,864,944,465,000,000,000,000,000,000,000
4
ipv6: netfilter: ip6_tables: fix infoleak to userspace Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sen...
static int uvesafb_setcmap(struct fb_cmap *cmap, struct fb_info *info) { struct uvesafb_pal_entry *entries; int shift = 16 - dac_width; int i, err = 0; if (info->var.bits_per_pixel == 8) { if (cmap->start + cmap->len > info->cmap.start + info->cmap.len || cmap->start < info->cmap.start) return -EINVAL; ...
1
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
283,168,282,956,283,660,000,000,000,000,000,000,000
37
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
dot24_print_page (gx_device_printer *pdev, gp_file *prn_stream, char *init_string, int init_len) { int xres = (int)pdev->x_pixels_per_inch; int yres = (int)pdev->y_pixels_per_inch; int x_high = (xres == 360); int y_high = (yres == 360); int bits_per_column = (y_high ? 48 : 24); uint line_size = gdev_prn_ras...
1
[ "CWE-369" ]
ghostpdl
eaba1d97b62831b42c51840cc8ee2bc4576c942e
162,861,064,573,790,740,000,000,000,000,000,000,000
179
Bug 701828: make dot24_print_page() return error instead of divide by zero. Fixes: ./sanbin/gs -dBATCH -dNOPAUSE -dSAFER -r2 -sOutputFile=tmp -sDEVICE=necp6 ../bug-701828.pdf
R_API void *r_bin_free(RBin *bin) { if (!bin) { return NULL; } if (bin->io_owned) { r_io_free (bin->iob.io); } bin->file = NULL; free (bin->force); free (bin->srcdir); //r_bin_free_bin_files (bin); r_list_free (bin->binfiles); r_list_free (bin->binxtrs); r_list_free (bin->plugins); sdb_free (bin->sdb); ...
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
79,325,679,585,222,030,000,000,000,000,000,000,000
20
Fix #8748 - Fix oobread on string search
static void Adam7_interlace(unsigned char* out, const unsigned char* in, unsigned w, unsigned h, unsigned bpp) { unsigned passw[7], passh[7]; size_t filter_passstart[8], padded_passstart[8], passstart[8]; unsigned i; Adam7_getpassvalues(passw, passh, filter_passstart, padded_passstart, passstart, w, h, bpp); ...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
336,744,382,785,211,230,000,000,000,000,000,000,000
48
Fixed #5645: realloc return handling
static inline int nla_padlen(int payload) { return nla_total_size(payload) - nla_attr_size(payload); }
0
[]
linux-2.6
1045b03e07d85f3545118510a587035536030c1c
256,466,059,802,339,100,000,000,000,000,000,000,000
4
netlink: fix overrun in attribute iteration kmemcheck reported this: kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30) 0500110001508abf050010000500000002017300140000006f72672e66726565 i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u ^ Pid: 3...
void auth_request_set_fields(struct auth_request *request, const char *const *fields, const char *default_scheme) { for (; *fields != NULL; fields++) { if (**fields == '\0') continue; auth_request_set_field_keyvalue(request, *fields, default_scheme); } }
0
[ "CWE-284" ]
core
7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904
140,807,165,799,590,610,000,000,000,000,000,000,000
10
auth: Fix handling passdbs with identical driver/args but different mechanisms/username_filter The passdb was wrongly deduplicated in this situation, causing wrong mechanisms or username_filter setting to be used. This would be a rather unlikely configuration though. Fixed by moving mechanisms and username_filter fro...
int ip6_route_add(struct fib6_config *cfg) { int err; struct net *net = cfg->fc_nlinfo.nl_net; struct rt6_info *rt = NULL; struct net_device *dev = NULL; struct inet6_dev *idev = NULL; struct fib6_table *table; int addr_type; if (cfg->fc_dst_len > 128 || cfg->fc_src_len > 128) return -EINVAL; #ifndef CONFIG_...
0
[ "CWE-119" ]
net
c88507fbad8055297c1d1e21e599f46960cbee39
232,844,609,700,782,560,000,000,000,000,000,000,000
238
ipv6: don't set DST_NOCOUNT for remotely added routes DST_NOCOUNT should only be used if an authorized user adds routes locally. In case of routes which are added on behalf of router advertisments this flag must not get used as it allows an unlimited number of routes getting added remotely. Signed-off-by: Sabrina Dub...
int RGWGetObj::handle_user_manifest(const char *prefix) { const boost::string_view prefix_view(prefix); ldout(s->cct, 2) << "RGWGetObj::handle_user_manifest() prefix=" << prefix_view << dendl; const size_t pos = prefix_view.find('/'); if (pos == string::npos) { return -EINVAL; } con...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
85,313,991,710,385,220,000,000,000,000,000,000,000
98
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 int irda_open_lsap(struct irda_sock *self, int pid) { notify_t notify; if (self->lsap) { IRDA_WARNING("%s(), busy!\n", __func__); return -EBUSY; } /* Initialize callbacks to be used by the IrDA stack */ irda_notify_init(&notify); notify.udata_indication = irda_data_indication; notify.instance = self...
0
[ "CWE-200" ]
linux-2.6
09384dfc76e526c3993c09c42e016372dc9dd22c
259,556,517,499,260,680,000,000,000,000,000,000,000
23
irda: Fix irda_getname() leak irda_getname() can leak kernel memory to user. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
ECPKPARAMETERS *EC_GROUP_get_ecpkparameters(const EC_GROUP *group, ECPKPARAMETERS *params) { int ok = 1, tmp; ECPKPARAMETERS *ret = params; if (ret == NULL) { if ((ret = ECPKPARAMETERS_new()) == NULL) { ECerr(EC_F_EC_GROUP_GET_ECPKPARAMETERS, ...
0
[ "CWE-125" ]
openssl
94d23fcff9b2a7a8368dfe52214d5c2569882c11
307,271,516,585,113,140,000,000,000,000,000,000,000
52
Fix EC_GROUP_new_from_ecparameters to check the base length Check that there's at least one byte in params->base before trying to read it. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
virDomainGraphicsDefParseXMLDesktop(virDomainGraphicsDefPtr def, xmlNodePtr node) { g_autofree char *fullscreen = virXMLPropString(node, "fullscreen"); if (fullscreen != NULL) { if (virStringParseYesNo(fullscreen, &def->data.desktop.fullscreen) < 0) { vir...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
251,825,486,083,659,500,000,000,000,000,000,000,000
19
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...
HttpStateData::doneWithServer() const { return !Comm::IsConnOpen(serverConnection); }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
158,408,195,114,987,540,000,000,000,000,000,000,000
4
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
long join_session_keyring(const char *name) { const struct cred *old; struct cred *new; struct key *keyring; long ret, serial; new = prepare_creds(); if (!new) return -ENOMEM; old = current_cred(); /* if no name is provided, install an anonymous keyring */ if (!name) { ret = install_session_keyring_to_cr...
1
[ "CWE-703" ]
linux
23567fd052a9abb6d67fe8e7a9ccdd9800a540f2
115,117,446,303,326,180,000,000,000,000,000,000,000
67
KEYS: Fix keyring ref leak in join_session_keyring() This fixes CVE-2016-0728. If a thread is asked to join as a session keyring the keyring that's already set as its session, we leak a keyring reference. This can be tested with the following program: #include <stddef.h> #include <stdio.h> #include <sys/types.h>...
static inline notrace void arch_local_irq_enable(void) { PVOP_VCALLEE0(irq.irq_enable); }
0
[ "CWE-276" ]
linux
cadfad870154e14f745ec845708bc17d166065f2
217,556,678,861,522,200,000,000,000,000,000,000,000
4
x86/ioperm: Fix io bitmap invalidation on Xen PV tss_invalidate_io_bitmap() wasn't wired up properly through the pvop machinery, so the TSS and Xen's io bitmap would get out of sync whenever disabling a valid io bitmap. Add a new pvop for tss_invalidate_io_bitmap() to fix it. This is XSA-329. Fixes: 22fe5b0439dd ("...
FLAC_API FLAC__bool FLAC__stream_encoder_set_do_qlp_coeff_prec_search(FLAC__StreamEncoder *encoder, FLAC__bool value) { FLAC__ASSERT(0 != encoder); FLAC__ASSERT(0 != encoder->private_); FLAC__ASSERT(0 != encoder->protected_); if(encoder->protected_->state != FLAC__STREAM_ENCODER_UNINITIALIZED) return false; enco...
0
[]
flac
c06a44969c1145242a22f75fc8fb2e8b54c55303
20,302,157,476,837,036,000,000,000,000,000,000,000
10
flac : Fix for https://sourceforge.net/p/flac/bugs/425/ * flac/encode.c : Validate num_tracks field of cuesheet. * libFLAC/stream_encoder.c : Add check for a NULL pointer. * flac/encode.c : Improve bounds checking. Closes: https://sourceforge.net/p/flac/bugs/425/
rtadv_init (struct zebra_vrf *zvrf) { /* Empty.*/; }
0
[ "CWE-119", "CWE-787" ]
quagga
cfb1fae25f8c092e0d17073eaf7bd428ce1cd546
133,751,797,064,381,410,000,000,000,000,000,000,000
4
zebra: stack overrun in IPv6 RA receive code (CVE-2016-1245) The IPv6 RA code also receives ICMPv6 RS and RA messages. Unfortunately, by bad coding practice, the buffer size specified on receiving such messages mixed up 2 constants that in fact have different values. The code itself has: #define RTADV_MSG_SIZE 4096 ...
static void sdap_initgr_nested_store(struct tevent_req *req) { errno_t ret; struct sdap_initgr_nested_state *state; bool in_transaction = false; errno_t tret; state = tevent_req_data(req, struct sdap_initgr_nested_state); ret = sysdb_transaction_start(state->sysdb); if (ret != EOK) { ...
0
[ "CWE-264" ]
sssd
0b6b4b7669b46d3d0b0ebefbc0e1621965444717
59,928,127,458,228,030,000,000,000,000,000,000,000
62
IPA: process non-posix nested groups Do not expect objectClass to be posixGroup but rather more general groupofnames. Resolves: https://fedorahosted.org/sssd/ticket/2343 Reviewed-by: Michal Židek <mzidek@redhat.com> (cherry picked from commit bc8c93ffe881271043492c938c626a9be948000e)
void CLASS parse_qt(int end) { unsigned save, size; char tag[4]; order = 0x4d4d; while (ftell(ifp) + 7 < end) { save = ftell(ifp); if ((size = get4()) < 8) return; if ((int)size < 0) return; // 2+GB is too much if (save + size < save) return; // 32bit overflow fread(tag, 4, 1, ifp);...
0
[ "CWE-190" ]
LibRaw
4554e24ce24beaef5d0ef48372801cfd91039076
322,192,310,511,889,960,000,000,000,000,000,000,000
21
parse_qt: possible integer overflow
bool JOIN::change_result(select_result *new_result, select_result *old_result) { DBUG_ENTER("JOIN::change_result"); if (old_result == NULL || result == old_result) { result= new_result; if (result->prepare(fields_list, select_lex->master_unit()) || result->prepare2(this)) DBUG_RETURN(true); ...
0
[]
server
ff77a09bda884fe6bf3917eb29b9d3a2f53f919b
240,268,805,684,657,800,000,000,000,000,000,000,000
13
MDEV-22464 Server crash on UPDATE with nested subquery Uninitialized ref_pointer_array[] because setup_fields() got empty fields list. mysql_multi_update() for some reason does that by substituting the fields list with empty total_list for the mysql_select() call (looks like wrong merge since total_list is not used a...
CtcLossDescriptor CreateCtcLossDescriptor() { cudnnCTCLossDescriptor_t result; CHECK_CUDNN_OK(cudnnCreateCTCLossDescriptor(&result)); return CtcLossDescriptor(result); }
0
[ "CWE-20" ]
tensorflow
14755416e364f17fb1870882fa778c7fec7f16e3
198,073,601,427,242,550,000,000,000,000,000,000,000
5
Prevent CHECK-fail in LSTM/GRU with zero-length input. PiperOrigin-RevId: 346239181 Change-Id: I5f233dbc076aab7bb4e31ba24f5abd4eaf99ea4f
virDomainShmemDefParseXML(virDomainXMLOptionPtr xmlopt, xmlNodePtr node, xmlXPathContextPtr ctxt, unsigned int flags) { virDomainShmemDefPtr def = NULL; virDomainShmemDefPtr ret = NULL; xmlNodePtr msi = NULL; VIR_XPATH_NODE_AU...
0
[ "CWE-212" ]
libvirt
a5b064bf4b17a9884d7d361733737fb614ad8979
273,319,370,223,819,900,000,000,000,000,000,000,000
92
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...