func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
void Compute(OpKernelContext* const context) override { // node_id_range const Tensor* node_id_range_t; OP_REQUIRES_OK(context, context->input("node_id_range", &node_id_range_t)); const auto node_id_range = node_id_range_t->vec<int32>(); const int32_t node_id_first = node_id_range(0); // Inclusiv...
1
[ "CWE-125", "CWE-824" ]
tensorflow
9c87c32c710d0b5b53dc6fd3bfde4046e1f7a5ad
159,594,845,608,770,870,000,000,000,000,000,000,000
234
Disallow empty node_id_range in tf.raw_ops.BoostedTreesCalculateBestFeatureSplitV2 and tf.raw_ops.BoostedTreesCalculateBestGainsPerFeature PiperOrigin-RevId: 387165936 Change-Id: I2f70341af96236b2776c2a592c917d549c1fc1e2
int lj_debug_getinfo(lua_State *L, const char *what, lj_Debug *ar, int ext) { int opt_f = 0, opt_L = 0; TValue *frame = NULL; TValue *nextframe = NULL; GCfunc *fn; if (*what == '>') { TValue *func = L->top - 1; if (!tvisfunc(func)) return 0; fn = funcV(func); L->top--; what++; } else { ...
0
[ "CWE-125" ]
LuaJIT
e296f56b825c688c3530a981dc6b495d972f3d01
176,881,090,139,235,650,000,000,000,000,000,000,000
101
Call error function on rethrow after trace exit.
Error ImageLoaderTGA::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) { Vector<uint8_t> src_image; int src_image_len = f->get_len(); ERR_FAIL_COND_V(src_image_len == 0, ERR_FILE_CORRUPT); ERR_FAIL_COND_V(src_image_len < (int)sizeof(tga_header_s), ERR_FILE_CORRUPT); src_image.resiz...
0
[ "CWE-20", "CWE-787" ]
godot
403e4fd08b0b212e96f53d926e6273e0745eaa5a
8,075,739,914,768,154,000,000,000,000,000,000,000
103
Fix a crash in the TGA loader with malformed input
static bool imap_parser_skip_to_next(struct imap_parser *parser, const unsigned char **data, size_t *data_size) { size_t i; for (i = parser->cur_pos; i < *data_size; i++) { if ((*data)[i] != ' ') break; } parser->line_size += i; i_stream_skip(parser->input, i); parser->cur_pos = 0;...
0
[ "CWE-787" ]
core
85fcb895ca7f0bcb8ee72047fe0e1e78532ff90b
211,954,500,852,794,580,000,000,000,000,000,000,000
19
lib-imap: Don't accept strings with NULs IMAP doesn't allow NULs except in binary literals. We'll still allow them in regular literals as well, but just not in strings. This fixes a bug with unescaping a string with NULs: str_unescape() could have been called for memory that points outside the allocated string, causi...
static int protected_save_fp_context(struct sigcontext __user *sc) { int err; while (1) { lock_fpu_owner(); own_fpu_inatomic(1); err = save_fp_context(sc); /* this might fail */ unlock_fpu_owner(); if (likely(!err)) break; /* touch the sigcontext and try again */ err = __put_user(0, &sc->sc_fpregs[0]...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
143,285,143,985,514,010,000,000,000,000,000,000,000
19
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
isoent_make_sorted_files(struct archive_write *a, struct isoent *isoent, struct idr *idr) { struct archive_rb_node *rn; struct isoent **children; children = malloc(isoent->children.cnt * sizeof(struct isoent *)); if (children == NULL) { archive_set_error(&a->archive, ENOMEM, "Can't allocate memory"); ...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
323,821,166,306,643,200,000,000,000,000,000,000,000
20
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
static void free_resources() { if (md_result_file && md_result_file != stdout) my_fclose(md_result_file, MYF(0)); my_free(opt_password); my_free(current_host); if (my_hash_inited(&ignore_table)) my_hash_free(&ignore_table); if (extended_insert) dynstr_free(&extended_row); if (insert_pat_inited) ...
0
[]
server
5a43a31ee81bc181eeb5ef2bf0704befa6e0594d
76,141,971,204,606,900,000,000,000,000,000,000,000
17
mysqldump: comments and identifiers with new lines don't let identifiers with new lines to break a comment
void get_files_in_dir(const std::string &directory, std::vector<std::string>* files, std::vector<std::string>* dirs, file_name_option mode, file_filter_option filter, file_reorder_option reorder, file_tree_checksum* checksum) { // If we have a path to find directories in, // ...
0
[ "CWE-200" ]
wesnoth
af61f9fdd15cd439da9e2fe5fa39d174c923eaae
111,637,927,868,873,180,000,000,000,000,000,000,000
169
fs: Use game data path to resolve ./ in the absence of a current_dir Fixes a file content disclosure bug (#22042) affecting functionality relying on the get_wml_location() function and not passing a non-empty value for the current_dir parameter. See <https://gna.org/bugs/?22042> for details. This is a candidate for ...
OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, opj_cparameters_t *parameters, opj_image_t *p_image) { if (p_codec && parameters && p_image) { opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec; ...
0
[ "CWE-20" ]
openjpeg
4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5
22,621,272,258,339,380,000,000,000,000,000,000,000
17
Add support for generation of PLT markers in encoder * -PLT switch added to opj_compress * Add a opj_encoder_set_extra_options() function that accepts a PLT=YES option, and could be expanded later for other uses. ------- Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2, coming from S2A_MSIL1C_20...
void gf_filter_remove_task(GF_FSTask *task) { s32 res; GF_Filter *f = task->filter; u32 count = gf_fq_count(f->tasks); //do not destroy filters if tasks for this filter are pending or some ref packets are still present if (f->out_pid_connection_pending || f->detach_pid_tasks_pending || f->nb_ref_packets) { task...
0
[ "CWE-787" ]
gpac
da37ec8582266983d0ec4b7550ec907401ec441e
6,699,634,363,697,534,000,000,000,000,000,000,000
55
fixed crashes for very long path - cf #1908
int X509_REQ_get_attr_by_NID(const X509_REQ *req, int nid, int lastpos) { return X509at_get_attr_by_NID(req->req_info->attributes, nid, lastpos); }
0
[]
openssl
28a00bcd8e318da18031b2ac8778c64147cd54f9
214,636,855,277,497,350,000,000,000,000,000,000,000
4
Check public key is not NULL. CVE-2015-0288 PR#3708 Reviewed-by: Matt Caswell <matt@openssl.org>
serialNumberAndIssuerSerialPretty( Syntax *syntax, struct berval *in, struct berval *out, void *ctx ) { struct berval sn, i, i_sn, ni = BER_BVNULL; char *p; int rc; assert( in != NULL ); assert( out != NULL ); Debug( LDAP_DEBUG_TRACE, ">>> serialNumberAndIssuerSerialPretty: <%s>\n", in->bv_val ); rc = s...
0
[ "CWE-617" ]
openldap
3539fc33212b528c56b716584f2c2994af7c30b0
133,052,603,064,978,520,000,000,000,000,000,000,000
62
ITS#9454 fix issuerAndThisUpdateCheck
static int do_video_stillpicture(unsigned int fd, unsigned int cmd, unsigned long arg) { struct compat_video_still_picture __user *up; struct video_still_picture __user *up_native; compat_uptr_t fp; int32_t size; int err; up = (struct compat_video_still_picture __user *) arg; err = get_user(fp, &up->iFrame); ...
0
[]
linux-2.6
188f83dfe0eeecd1427d0d255cc97dbf7ef6b4b7
301,660,531,409,658,700,000,000,000,000,000,000,000
24
[PATCH] BLOCK: Move the msdos device ioctl compat stuff to the msdos driver [try #6] Move the msdos device ioctl compat stuff from fs/compat_ioctl.c to the msdos driver so that the msdos header file doesn't need to be included. Signed-Off-By: David Howells <dhowells@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel...
static void tcf_chain_head_change_item(struct tcf_filter_chain_list_item *item, struct tcf_proto *tp_head) { if (item->chain_head_change) item->chain_head_change(tp_head, item->chain_head_change_priv); }
0
[ "CWE-416" ]
linux
04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5
77,569,104,787,607,765,000,000,000,000,000,000,000
6
net: sched: fix use-after-free in tc_new_tfilter() Whenever tc_new_tfilter() jumps back to replay: label, we need to make sure @q and @chain local variables are cleared again, or risk use-after-free as in [1] For consistency, apply the same fix in tc_ctl_chain() BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1...
static int vfio_pci_fill_devs(struct pci_dev *pdev, void *data) { struct vfio_pci_fill_info *fill = data; struct iommu_group *iommu_group; if (fill->cur == fill->max) return -EAGAIN; /* Something changed, try again */ iommu_group = iommu_group_get(&pdev->dev); if (!iommu_group) return -EPERM; /* Cannot reset...
0
[ "CWE-399", "CWE-190" ]
linux
05692d7005a364add85c6e25a6c4447ce08f913a
57,503,188,031,901,190,000,000,000,000,000,000,000
20
vfio/pci: Fix integer overflows, bitmask check The VFIO_DEVICE_SET_IRQS ioctl did not sufficiently sanitize user-supplied integers, potentially allowing memory corruption. This patch adds appropriate integer overflow checks, checks the range bounds for VFIO_IRQ_SET_DATA_NONE, and also verifies that only single element...
TEST_P(DownstreamProtocolIntegrationTest, AddInvalidEncodedData) { EXPECT_ENVOY_BUG( { useAccessLog("%RESPONSE_CODE_DETAILS%"); config_helper_.prependFilter(R"EOF( name: add-invalid-data-filter )EOF"); initialize(); codec_client_ = makeHttpConnection(lookupPort("http")); ...
0
[ "CWE-416" ]
envoy
148de954ed3585d8b4298b424aa24916d0de6136
258,768,556,071,527,640,000,000,000,000,000,000,000
18
CVE-2021-43825 Response filter manager crash Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int snd_rawmidi_dev_register(struct snd_device *device) { int err; struct snd_info_entry *entry; char name[16]; struct snd_rawmidi *rmidi = device->device_data; if (rmidi->device >= SNDRV_RAWMIDI_DEVICES) return -ENOMEM; mutex_lock(&register_mutex); if (snd_rawmidi_search(rmidi->card, rmidi->device)) {...
0
[ "CWE-415" ]
linux
39675f7a7c7e7702f7d5341f1e0d01db746543a0
276,138,094,783,702,180,000,000,000,000,000,000,000
85
ALSA: rawmidi: Change resized buffers atomically The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the current code is racy. For example, the sequencer client may write to buffer while it being resized. As a simple workaround, let's switch to the resized buffer inside the stream runtime lock. Reported...
parseuid(const char *s, uid_t *uid) { struct passwd *pw; const char *errstr; if ((pw = getpwnam(s)) != NULL) { *uid = pw->pw_uid; return 0; } *uid = strtonum(s, 0, UID_MAX, &errstr); if (errstr) return -1; return 0; }
0
[ "CWE-200", "CWE-909" ]
OpenDoas
01c658f8c45cb92a343be5f32aa6da70b2032168
150,738,875,158,033,300,000,000,000,000,000,000,000
14
redo the environment inheritance to not inherit. it was intended to make life easier, but it can be surprising or even unsafe. instead, reset just about everything to the target user's values. ok deraadt martijn Thanks to Sander Bos in particular for pointing out some nasty edge cases.
int rearrange_frequencies() { int *freqs; int count, left, pos; int width, last_used=0; int cur_freq, last_freq, round_done; // int i; width = DEFAULT_CWIDTH; cur_freq=0; count = getfreqcount(0); left = count; pos = 0; freqs = malloc(sizeof(int) * (count + 1)); memset(...
0
[ "CWE-787" ]
aircrack-ng
ff70494dd389ba570dbdbf36f217c28d4381c6b5
261,812,312,968,231,460,000,000,000,000,000,000,000
50
Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub). git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab
g_socket_client_connect_async (GSocketClient *client, GSocketConnectable *connectable, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data) { GSocketClientAsyncConnectData *data; g_return_if_fail (G_IS_SOCKET_CLIENT (client)...
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
273,338,934,502,468,620,000,000,000,000,000,000,000
47
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
static size_t get_chunk_length(const char *buf, size_t len, size_t *ll) { size_t i = 0, n; while (i < len && buf[i] != '\r' && i != '\n') i++; n = mg_unhexn((char *) buf, i); while (i < len && (buf[i] == '\r' || i == '\n')) i++; // LOG(LL_INFO, ("len %zu i %zu n %zu ", len, i, n)); if (ll != NULL) *ll = i +...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
39,707,247,323,511,572,000,000,000,000,000,000,000
10
Protect against the directory traversal in mg_upload()
mrb_vm_exec(mrb_state *mrb, const struct RProc *proc, const mrb_code *pc) { /* mrb_assert(MRB_PROC_CFUNC_P(proc)) */ const mrb_irep *irep = proc->body.irep; const mrb_pool_value *pool = irep->pool; const mrb_sym *syms = irep->syms; mrb_code insn; int ai = mrb_gc_arena_save(mrb); struct mrb_jmpbuf *prev_jm...
1
[ "CWE-703", "CWE-125" ]
mruby
a4d97934d51cb88954cc49161dc1d151f64afb6b
147,780,436,991,899,740,000,000,000,000,000,000,000
1,844
vm.c: check if target_class is NULL (when prepended).
AVCPBProperties *av_cpb_properties_alloc(size_t *size) { AVCPBProperties *props = av_mallocz(sizeof(AVCPBProperties)); if (!props) return NULL; if (size) *size = sizeof(*props); props->vbv_delay = UINT64_MAX; return props; }
0
[ "CWE-787" ]
FFmpeg
2080bc33717955a0e4268e738acf8c1eeddbf8cb
47,477,306,321,131,600,000,000,000,000,000,000,000
13
avcodec/utils: correct align value for interplay Fixes out of array access Fixes: 452/fuzz-1-ffmpeg_VIDEO_AV_CODEC_ID_INTERPLAY_VIDEO_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
static int scm_fp_copy(struct cmsghdr *cmsg, struct scm_fp_list **fplp) { int *fdp = (int*)CMSG_DATA(cmsg); struct scm_fp_list *fpl = *fplp; struct file **fpp; int i, num; num = (cmsg->cmsg_len - CMSG_ALIGN(sizeof(struct cmsghdr)))/sizeof(int); if (num <= 0) return 0; if (num > SCM_MAX_FD) return -EINVAL;...
0
[]
linux-2.6
f8d570a4745835f2238a33b537218a1bb03fc671
24,466,402,984,817,266,000,000,000,000,000,000,000
45
net: Fix recursive descent in __scm_destroy(). __scm_destroy() walks the list of file descriptors in the scm_fp_list pointed to by the scm_cookie argument. Those, in turn, can close sockets and invoke __scm_destroy() again. There is nothing which limits how deeply this can occur. The idea for how to fix this is fro...
void thd_key_delete(MYSQL_THD_KEY_T *key) { *key= INVALID_THD_KEY; }
0
[ "CWE-416" ]
server
c05fd700970ad45735caed3a6f9930d4ce19a3bd
321,476,456,717,065,900,000,000,000,000,000,000,000
4
MDEV-26323 use-after-poison issue of MariaDB server
char *plastchar(ptr, len) ZCONST char *ptr; extent len; { unsigned clen; ZCONST char *oldptr = ptr; while(*ptr != '\0' && len > 0){ oldptr = ptr; clen = CLEN(ptr); ptr += clen; len -= clen; } return (char *)oldptr; }
0
[ "CWE-400" ]
unzip
41beb477c5744bc396fa1162ee0c14218ec12213
32,867,195,600,143,590,000,000,000,000,000,000,000
14
Fix bug in undefer_input() that misplaced the input state.
_equalSetToDefault(const SetToDefault *a, const SetToDefault *b) { COMPARE_SCALAR_FIELD(typeId); COMPARE_SCALAR_FIELD(typeMod); COMPARE_SCALAR_FIELD(collation); COMPARE_LOCATION_FIELD(location); return true; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
122,242,217,592,548,580,000,000,000,000,000,000,000
9
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
TypeObjectV1& type() { return type_; }
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
142,663,528,100,621,140,000,000,000,000,000,000,000
4
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
static void task_numa_compare(struct task_numa_env *env, long taskimp, long groupimp, bool maymove) { struct numa_group *cur_ng, *p_ng = deref_curr_numa_group(env->p); struct rq *dst_rq = cpu_rq(env->dst_cpu); long imp = p_ng ? groupimp : taskimp; struct task_struct *cur; long src_load, dst_load; int dis...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
10,098,185,646,341,042,000,000,000,000,000,000,000
120
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
match_records(struct ftrace_hash *hash, char *buff, int len, char *mod, int not) { unsigned search_len = 0; struct ftrace_page *pg; struct dyn_ftrace *rec; int type = MATCH_FULL; char *search = buff; int found = 0; int ret; if (len) { type = filter_parse_regex(buff, len, &search, &not); search_len =...
0
[ "CWE-703" ]
linux
6a76f8c0ab19f215af2a3442870eeb5f0e81998d
71,107,328,720,220,380,000,000,000,000,000,000,000
36
tracing: Fix possible NULL pointer dereferences Currently set_ftrace_pid and set_graph_function files use seq_lseek for their fops. However seq_open() is called only for FMODE_READ in the fops->open() so that if an user tries to seek one of those file when she open it for writing, it sees NULL seq_file and then panic...
TEST_P(Security, BuiltinAuthenticationAndCryptoPlugin_reliable_payload_large_string) { PubSubReader<StringType> reader(TEST_TOPIC_NAME); PubSubWriter<StringType> writer(TEST_TOPIC_NAME); PropertyPolicy pub_part_property_policy, sub_part_property_policy, pub_property_policy, sub_property_policy;...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
249,516,125,362,233,000,000,000,000,000,000,000,000
64
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
int LUKS2_reencrypt_lock_by_dm_uuid(struct crypt_device *cd, const char *dm_uuid, struct crypt_lock_handle **reencrypt_lock) { int r; char hdr_uuid[37]; const char *uuid = crypt_get_uuid(cd); if (!dm_uuid) return -EINVAL; if (!uuid) { r = snprintf(hdr_uuid, sizeof(hdr_uuid), "%.8s-%.4s-%.4s-%.4s-%.12s", ...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
12,139,784,869,400,036,000,000,000,000,000,000,000
20
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
do_enumerate (GVfsBackend *backend, GVfsJobEnumerate *enumerate_job, const char *filename, GFileAttributeMatcher *attribute_matcher, GFileQueryInfoFlags flags) { GVfsBackendAdmin *self = G_VFS_BACKEND_ADMIN (backend); GVfsJob *job = G_VFS_JOB (enumerate_job); ...
0
[]
gvfs
d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80
72,015,780,890,894,890,000,000,000,000,000,000,000
50
admin: Use fsuid to ensure correct file ownership Files created over admin backend should be owned by root, but they are owned by the user itself. This is because the daemon drops the uid to make dbus connection work. Use fsuid and euid to fix this issue. Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21
static struct dentry *udf_get_parent(struct dentry *child) { struct kernel_lb_addr tloc; struct inode *inode = NULL; struct qstr dotdot = QSTR_INIT("..", 2); struct fileIdentDesc cfi; struct udf_fileident_bh fibh; if (!udf_find_entry(child->d_inode, &dotdot, &fibh, &cfi)) goto out_unlock; if (fibh.sbh != fib...
0
[ "CWE-200" ]
linux
0143fc5e9f6f5aad4764801015bc8d4b4a278200
252,586,193,052,386,470,000,000,000,000,000,000,000
24
udf: avoid info leak on export For type 0x51 the udf.parent_partref member in struct fid gets copied uninitialized to userland. Fix this by initializing it to 0. Signed-off-by: Mathias Krause <minipli@googlemail.com> Signed-off-by: Jan Kara <jack@suse.cz>
static MagickBooleanType DrawBoundingRectangles(Image *image, const DrawInfo *draw_info,const PolygonInfo *polygon_info, ExceptionInfo *exception) { double mid; DrawInfo *clone_info; MagickStatusType status; PointInfo end, resolution, start; PrimitiveInfo primitive_info[6];...
0
[ "CWE-703" ]
ImageMagick
d7f1b2b9b816baaa956381ff80c3b120e83faa95
250,684,843,085,859,560,000,000,000,000,000,000,000
137
https://github.com/ImageMagick/ImageMagick/issues/4626
passGetName(CharsString *passLine, int *passLinepos, CharsString *name) { name->length = 0; // a name is a sequence of characters in the ranges 'a'..'z' and 'A'..'Z' do { widechar c = passLine->chars[*passLinepos]; if ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')) { name->chars[name->length++] = c; (*p...
0
[ "CWE-787" ]
liblouis
2e4772befb2b1c37cb4b9d6572945115ee28630a
278,039,033,108,136,140,000,000,000,000,000,000,000
14
Prevent an invalid memory writes in compileRule Thanks to Han Zheng for reporting it Fixes #1214
wc_any_to_iso2022(wc_wchar_t cc, wc_status *st) { wc_uint32 ucs = wc_any_to_ucs(cc); wc_ccs is_wide = WC_CCS_IS_WIDE(cc.ccs); if (ucs < 0x80) { cc.ccs = WC_CCS_US_ASCII; cc.code = ucs; return cc; } if (ucs != WC_C_UCS4_ERROR) { cc = wc_ucs_to_any_list(ucs, is_wide ? st->tlistw : st->tlist); if...
0
[ "CWE-119" ]
w3m
716bc126638393c733399d11d3228edb82877faa
272,442,231,162,838,460,000,000,000,000,000,000,000
65
Prevent global-buffer-overflow in wc_any_to_ucs() Bug-Debian: https://github.com/tats/w3m/issues/43
cms_envelopeddata_create(krb5_context context, pkinit_plg_crypto_context plgctx, pkinit_req_crypto_context reqctx, pkinit_identity_crypto_context idctx, krb5_preauthtype pa_type, int include_cert...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
255,991,002,374,914,130,000,000,000,000,000,000,000
123
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
static RList * cpfind_float (RCore *core, RBinJavaObj *obj, const char *cmd) { float value = cmd && *cmd ? atof (cmd) : 0.0; if (value == 0.0 && !(cmd && cmd[0] == '0' && cmd[1] == '.' && cmd[2] == '0')) { return r_list_new (); } return r_bin_java_find_cp_const_by_val ( obj, (const ut8 *) &value, 4, R_BIN_JAVA_CP...
0
[ "CWE-703", "CWE-193" ]
radare2
ced0223c7a1b3b5344af315715cd28fe7c0d9ebc
59,315,070,791,436,610,000,000,000,000,000,000,000
7
Fix unmatched array length in core_java.c (issue #16304) (#16313)
static unsigned long get_user_msr(struct task_struct *task) { return task->thread.regs->msr | task->thread.fpexc_mode; }
0
[ "CWE-119", "CWE-787" ]
linux
c1fa0768a8713b135848f78fd43ffc208d8ded70
234,853,952,351,351,340,000,000,000,000,000,000,000
4
powerpc/tm: Flush TM only if CPU has TM feature Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump") added code to access TM SPRs in flush_tmregs_to_thread(). However flush_tmregs_to_thread() does not check if TM feature is available on CPU before trying to access TM SPRs in order to copy live state to th...
gst_matroska_demux_send_event (GstMatroskaDemux * demux, GstEvent * event) { gboolean ret = FALSE; gint i; g_return_val_if_fail (event != NULL, FALSE); GST_DEBUG_OBJECT (demux, "Sending event of type %s to all source pads", GST_EVENT_TYPE_NAME (event)); g_assert (demux->common.src->len == demux->comm...
0
[]
gst-plugins-good
9181191511f9c0be6a89c98b311f49d66bd46dc3
200,618,014,586,752,900,000,000,000,000,000,000,000
23
matroskademux: Fix extraction of multichannel WavPack The old code had a couple of issues that all lead to potential memory safety bugs. - Use a constant for the Wavpack4Header size instead of using sizeof. It's written out into the data and not from the struct and who knows what special alignment/padding r...
conntrack_init(struct conntrack *ct) { unsigned i, j; long long now = time_msec(); ct_rwlock_init(&ct->resources_lock); ct_rwlock_wrlock(&ct->resources_lock); hmap_init(&ct->nat_conn_keys); hmap_init(&ct->alg_expectations); ovs_list_init(&ct->alg_exp_list); ct_rwlock_unlock(&ct->resourc...
0
[ "CWE-400" ]
ovs
35c280072c1c3ed58202745b7d27fbbd0736999b
13,442,507,301,463,750,000,000,000,000,000,000,000
33
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
static void trace_insert_eval_map(struct module *mod, struct trace_eval_map **start, int len) { struct trace_eval_map **map; if (len <= 0) return; map = start; trace_event_eval_update(map, len); trace_insert_eval_map_file(mod, start, len); }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
265,973,181,607,592,900,000,000,000,000,000,000,000
14
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
bool test_r_str_unescape(void) { char buf[] = "Hello\\x31World\\n"; r_str_unescape (buf); mu_assert_streq (buf, "Hello1World\n", "unescaped"); mu_end; }
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
230,399,849,915,994,500,000,000,000,000,000,000,000
6
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...
set_job_attrs(cupsd_client_t *con, /* I - Client connection */ ipp_attribute_t *uri) /* I - Job URI */ { ipp_attribute_t *attr, /* Current attribute */ *attr2; /* Job attribute */ int jobid; /* Job ID */ cupsd_job_t *job; /* Current job */ char scheme[HTTP_MAX_URI], /* Method portion of...
0
[ "CWE-20" ]
cups
49fa4983f25b64ec29d548ffa3b9782426007df3
226,083,991,052,670,900,000,000,000,000,000,000,000
373
DBUS notifications could crash the scheduler (Issue #5143) - scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
*/ void *skb_push(struct sk_buff *skb, unsigned int len) { skb->data -= len; skb->len += len; if (unlikely(skb->data<skb->head)) skb_under_panic(skb, len, __builtin_return_address(0)); return skb->data;
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
114,900,701,532,914,200,000,000,000,000,000,000,000
8
net: create skb_gso_validate_mac_len() If you take a GSO skb, and split it into packets, will the MAC length (L2 + L3 + L4 headers + payload) of those packets be small enough to fit within a given length? Move skb_gso_mac_seglen() to skbuff.h with other related functions like skb_gso_network_seglen() so we can use it...
gs_opendevice(gx_device *dev) { if (dev->is_open) return 0; check_device_separable(dev); gx_device_fill_in_procs(dev); { int code = (*dev_proc(dev, open_device))(dev); if (code < 0) return_error(code); dev->is_open = true; return 1; } }
0
[]
ghostpdl
79cccf641486a6595c43f1de1cd7ade696020a31
124,282,748,623,219,960,000,000,000,000,000,000,000
15
Bug 699654(2): preserve LockSafetyParams in the nulldevice The nulldevice does not necessarily use the normal setpagedevice machinery, but can be set using the nulldevice operator. In which case, we don't preserve the settings from the original device (in the way setpagedevice does). Since nulldevice does nothing, th...
int kmem_ptr_validate(struct kmem_cache *s, const void *object) { struct page *page; page = get_object_page(object); if (!page || s != page->slab) /* No slab or wrong slab */ return 0; if (!check_valid_pointer(s, page, object)) return 0; /* * We could also check if the object is on the slabs freelist. ...
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
178,537,027,317,290,620,000,000,000,000,000,000,000
21
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
static void tg3_get_eeprom_hw_cfg(struct tg3 *tp) { u32 val; tp->phy_id = TG3_PHY_ID_INVALID; tp->led_ctrl = LED_CTRL_MODE_PHY_1; /* Assume an onboard device and WOL capable by default. */ tg3_flag_set(tp, EEPROM_WRITE_PROT); tg3_flag_set(tp, WOL_CAP); if (tg3_asic_rev(tp) == ASIC_REV_5906) { if (!(tr32(PC...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
212,319,378,615,723,900,000,000,000,000,000,000,000
197
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 ...
get_next_owned_block_entity (const Dwg_Object *restrict hdr, const Dwg_Object *restrict current) { Dwg_Data *dwg; Dwg_Version_Type version; Dwg_Object_BLOCK_HEADER *restrict _hdr; if (hdr->type != DWG_TYPE_BLOCK_HEADER) { LOG_ERROR ("Invalid BLOCK_HEADER type %d", hdr->ty...
0
[ "CWE-787" ]
libredwg
ecf5183d8b3b286afe2a30021353b7116e0208dd
338,781,759,863,575,500,000,000,000,000,000,000,000
38
dwg_section_wtype: fix fuzzing overflow with illegal and overlong section names. Fixes GH #349, #352 section names cannot be longer than 24
static inline int SlabFrozen(struct page *page) { return page->flags & FROZEN; }
0
[ "CWE-189" ]
linux
f8bd2258e2d520dff28c855658bd24bdafb5102d
307,723,472,796,306,100,000,000,000,000,000,000,000
4
remove div_long_long_rem x86 is the only arch right now, which provides an optimized for div_long_long_rem and it has the downside that one has to be very careful that the divide doesn't overflow. The API is a little akward, as the arguments for the unsigned divide are signed. The signed version also doesn't handle ...
MONGO_EXPORT void mongo_write_concern_init( mongo_write_concern *write_concern ) { memset( write_concern, 0, sizeof( mongo_write_concern ) ); }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
230,900,352,220,388,470,000,000,000,000,000,000,000
3
don't mix up int and size_t (first pass to fix that)
static s32 brcmf_set_wpa_version(struct net_device *ndev, struct cfg80211_connect_params *sme) { struct brcmf_if *ifp = netdev_priv(ndev); struct wiphy *wiphy = ifp->drvr->wiphy; struct brcmf_cfg80211_profile *profile = ndev_to_prof(ndev); struct brcmf_cfg80211_security *sec; s32 val = 0; s32 err = 0; if (...
0
[ "CWE-787" ]
linux
1b5e2423164b3670e8bc9174e4762d297990deff
294,787,314,297,818,600,000,000,000,000,000,000,000
26
brcmfmac: assure SSID length from firmware is limited The SSID length as received from firmware should not exceed IEEE80211_MAX_SSID_LEN as that would result in heap overflow. Reviewed-by: Hante Meuleman <hante.meuleman@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieter-paul.giesberts@broadcom.com> Reviewed-by:...
const char* ExpressionLn::getOpName() const { return "$ln"; }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
232,903,352,760,186,970,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
ews_append_additional_props_to_msg (ESoapMessage *msg, const EEwsAdditionalProps *add_props) { GSList *l; if (!add_props) return; e_soap_message_start_element (msg, "AdditionalProperties", NULL, NULL); if (add_props->field_uri) { gchar **prop = g_strsplit (add_props->field...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
116,482,761,927,750,320,000,000,000,000,000,000,000
65
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
Type makeStructWithIncludeLike() { Type object; object.fieldA_ref().emplace(); return object; }
0
[ "CWE-763" ]
fbthrift
bfda1efa547dce11a38592820916db01b05b9339
187,544,382,939,138,020,000,000,000,000,000,000,000
5
Fix handling of invalid union data in table-based serializer Summary: Fix handling of invalid union data in the table-based serializer. Previously if the input contained duplicate union data, previous active member of the union was overwritten without calling the destructor of the old object, potentially causing a mem...
CNF_GetNoClientLog(void) { return no_client_log; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
18,567,211,245,773,784,000,000,000,000,000,000,000
4
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
static int ieee80211_dump_mpp(struct wiphy *wiphy, struct net_device *dev, int idx, u8 *dst, u8 *mpp, struct mpath_info *pinfo) { struct ieee80211_sub_if_data *sdata; struct mesh_path *mpath; sdata = IEEE80211_DEV_TO_SUB_IF(dev); rcu_read_lock(); mpath = mpp_path_lookup_by_idx(sdata, idx); if ...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
287,496,424,041,994,420,000,000,000,000,000,000,000
20
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
static int ssl_parse_certificate_verify( mbedtls_ssl_context *ssl ) { int ret = MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE; size_t i, sig_len; unsigned char hash[48]; unsigned char *hash_start = hash; size_t hashlen; #if defined(MBEDTLS_SSL_PROTO_TLS1_2) mbedtls_pk_type_t pk_alg; #endif mbedtls_md_...
0
[ "CWE-20", "CWE-190" ]
mbedtls
83c9f495ffe70c7dd280b41fdfd4881485a3bc28
54,830,475,328,068,880,000,000,000,000,000,000,000
176
Prevent bounds check bypass through overflow in PSK identity parsing The check `if( *p + n > end )` in `ssl_parse_client_psk_identity` is unsafe because `*p + n` might overflow, thus bypassing the check. As `n` is a user-specified value up to 65K, this is relevant if the library happens to be located in the last 65K o...
static ossl_inline void put_digit(uint8_t *out, int out_len, uint64_t digit) { assert(out != NULL); assert(out_len <= 8); for (; out_len > 0; out_len--) { *out++ = (uint8_t)(digit & 0xFF); digit >>= 8; } }
0
[ "CWE-787" ]
openssl
4d8a88c134df634ba610ff8db1eb8478ac5fd345
203,507,929,644,352,020,000,000,000,000,000,000,000
10
rsa: fix bn_reduce_once_in_place call for rsaz_mod_exp_avx512_x2 bn_reduce_once_in_place expects the number of BN_ULONG, but factor_size is moduli bit size. Fixes #18625. Signed-off-by: Xi Ruoyao <xry111@xry111.site> Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from...
static char * string_extract_double_quoted (string, sindex, flags) char *string; int *sindex, flags; { size_t slen; char *send; int j, i, t; unsigned char c; char *temp, *ret; /* The new string we return. */ int pass_next, backquote, si; /* State variables for the machine. */ int dquote; int ...
0
[ "CWE-20" ]
bash
4f747edc625815f449048579f6e65869914dd715
140,493,102,498,109,760,000,000,000,000,000,000,000
157
Bash-4.4 patch 7
int abytereader::read_n( unsigned char* byte, int n ) { int nl = lbyte - cbyte; int i; if ( nl < n ) { for ( i = 0; i < nl; i++ ) byte[ i ] = data[ cbyte + i ]; cbyte = lbyte; eof = true; return nl; } else { for ( i = 0; i < n; i++ ) byte[ i ] = data[ cbyte + i ]; cbyte += n; return n; } }
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
75,146,337,916,067,610,000,000,000,000,000,000,000
19
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
void Http2Session::Request(const FunctionCallbackInfo<Value>& args) { Http2Session* session; ASSIGN_OR_RETURN_UNWRAP(&session, args.Holder()); Environment* env = session->env(); Local<Context> context = env->context(); Isolate* isolate = env->isolate(); Local<Array> headers = args[0].As<Array>(); int opt...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
85,486,481,565,250,900,000,000,000,000,000,000,000
30
http2: add altsvc support Add support for sending and receiving ALTSVC frames. PR-URL: https://github.com/nodejs/node/pull/17917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
template<typename t> const CImg<T>& SVD(CImg<t>& U, CImg<t>& S, CImg<t>& V, const bool sorting=true, const unsigned int max_iteration=40, const float lambda=0) const { typedef _cimg_Ttfloat Ttfloat; if (is_empty()) { U.assign(); S.assign(); V.assign(); } else { ...
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
269,698,759,228,185,530,000,000,000,000,000,000,000
143
.
static unsigned addChunk_IHDR(ucvector* out, unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth, unsigned interlace_method) { unsigned error = 0; ucvector header; ucvector_init(&header); if (!lodepng_add32bitInt(&header, w)) /*width*/ return 1; if (!lodepn...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
243,894,600,199,543,400,000,000,000,000,000,000,000
22
Fixed #5645: realloc return handling
select_session_keytype(kdc_realm_t *kdc_active_realm, krb5_db_entry *server, int nktypes, krb5_enctype *ktype) { int i; for (i = 0; i < nktypes; i++) { if (!krb5_c_valid_enctype(ktype[i])) continue; if (!krb5_is_permitted_enctype(kdc_context, ktype[i]...
0
[ "CWE-476" ]
krb5
93b4a6306a0026cf1cc31ac4bd8a49ba5d034ba7
151,061,919,343,571,120,000,000,000,000,000,000,000
18
Fix S4U2Self KDC crash when anon is restricted In validate_as_request(), when enforcing restrict_anonymous_to_tgt, use client.princ instead of request->client; the latter is NULL when validating S4U2Self requests. CVE-2016-3120: In MIT krb5 1.9 and later, an authenticated attacker can cause krb5kdc to dereference a ...
static void g_tv_details_checkbox_toggled( GtkCellRendererToggle *cell_renderer_UNUSED, gchar *tree_path, gpointer user_data_UNUSED) { //log("%s: path:'%s'", __func__, tree_path); GtkTreeIter iter; if (!gtk_tree_model_get_iter_from_...
0
[ "CWE-200" ]
libreport
257578a23d1537a2d235aaa2b1488ee4f818e360
297,777,530,248,400,900,000,000,000,000,000,000,000
43
wizard: fix save users changes after reviewing dump dir files If the user reviewed the dump dir's files during reporting the crash, the changes was thrown away and original data was passed to the bugzilla bug report. report-gtk saves the first text view buffer and then reloads data from the reported problem directory...
local unsigned long put_header(void) { unsigned long len; unsigned char head[30]; if (g.form > 1) { /* zip */ /* write local header */ PUT4L(head, 0x04034b50UL); /* local header signature */ PUT2L(head + 4, 20); /* version needed to extract (2.0) */ PUT...
0
[ "CWE-703", "CWE-22" ]
pigz
fdad1406b3ec809f4954ff7cdf9e99eb18c2458f
239,298,174,372,457,400,000,000,000,000,000,000,000
63
When decompressing with -N or -NT, strip any path from header name. This uses the path of the compressed file combined with the name from the header as the name of the decompressed output file. Any path information in the header name is stripped. This avoids a possible vulnerability where absolute or descending path...
FormattableStreamer() {} // private - forbid instantiation
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
259,702,830,382,895,600,000,000,000,000,000,000,000
1
ICU-20246 Fixing another integer overflow in number parsing.
static int read_fragment_table(long long *table_start) { /* * Note on overflow limits: * Size of SBlk.s.fragments is 2^32 (unsigned int) * Max size of bytes is 2^32*16 or 2^36 * Max indexes is (2^32*16)/8K or 2^23 * Max length is ((2^32*16)/8K)*8 or 2^26 or 64M */ int res, i; long long bytes = SQUASHFS_F...
0
[ "CWE-22" ]
squashfs-tools
79b5a555058eef4e1e7ff220c344d39f8cd09646
272,014,655,188,635,170,000,000,000,000,000,000,000
84
Unsquashfs: fix write outside destination directory exploit An issue on Github (https://github.com/plougher/squashfs-tools/issues/72) shows how some specially crafted Squashfs filesystems containing invalid file names (with '/' and ..) can cause Unsquashfs to write files outside of the destination directory. This com...
static void fuse_fs_cleanup(void) { unregister_filesystem(&fuse_fs_type); unregister_fuseblk(); /* * Make sure all delayed rcu free inodes are flushed before we * destroy cache. */ rcu_barrier(); kmem_cache_destroy(fuse_inode_cachep); }
0
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
300,002,568,721,424,450,000,000,000,000,000,000,000
12
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,...
bool st_select_lex::collect_fields_equal_to_grouping(THD *thd) { if (!join->cond_equal || join->cond_equal->is_empty()) return false; List_iterator_fast<Item_equal> li(join->cond_equal->current_level); Item_equal *item_equal; while ((item_equal= li++)) { Item_equal_fields_iterator it(*item_equal); ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
145,442,682,964,633,430,000,000,000,000,000,000,000
33
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
const OverloadActionState& getState(const std::string&) override { return inactive_; }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
114,571,023,949,865,830,000,000,000,000,000,000,000
1
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
resp_get_length(netdissect_options *ndo, register const u_char *bp, int len, const u_char **endp) { int result; u_char c; int saw_digit; int neg; int too_large; if (len == 0) goto trunc; ND_TCHECK(*bp); too_large = 0; neg = 0; if (*bp == '-') { neg = 1; b...
1
[ "CWE-399", "CWE-835" ]
tcpdump
db24063b01cba8e9d4d88b7d8ac70c9000c104e4
180,203,543,260,106,680,000,000,000,000,000,000,000
82
CVE-2017-12989/RESP: Make sure resp_get_length() advances the pointer for invalid lengths. Make sure that it always sends *endp before returning and that, for invalid lengths where we don't like a character in the length string, what it sets *endp to is past the character in question, so we don't run the risk of infin...
static int ssl_verify_cert(struct tunnel *tunnel) { int ret = -1; int cert_valid = 0; unsigned char digest[SHA256LEN]; unsigned int len; struct x509_digest *elem; char digest_str[SHA256STRLEN], *subject, *issuer; char *line; int i; X509_NAME *subj; SSL_set_verify(tunnel->ssl_handle, SSL_VERIFY_PEER, NULL); ...
0
[ "CWE-295" ]
openfortivpn
6328a070ddaab16faaf008cb9a8a62439c30f2a8
135,184,877,244,989,480,000,000,000,000,000,000,000
89
fix TLS Certificate CommonName NULL Byte Vulnerability CVE-2020-7043 TLS Certificate CommonName NULL Byte Vulnerability is fixed with this commit with #8 hostname validation for the certificate was introduced but unfortunately strncasecmp() was used to compare the byte array against the expected hostname. This does n...
void mg_mqtt_puback(struct mg_connection *nc, uint16_t message_id) { mg_send_mqtt_short_command(nc, MG_MQTT_CMD_PUBACK, message_id); }
0
[ "CWE-119", "CWE-284", "CWE-787" ]
mongoose
b3e0f780c34cea88f057a62213c012aa88fe2deb
238,563,012,888,324,160,000,000,000,000,000,000,000
3
Fix heap-based overflow in parse_mqtt PUBLISHED_FROM=3306592896298597fff5269634df0c1a1555113b
static int gnutls_system_mutex_init(void **priv) { return 0; }
0
[ "CWE-20" ]
gnutls
b0a3048e56611a2deee4976aeba3b8c0740655a6
169,673,940,979,909,150,000,000,000,000,000,000,000
4
env: use secure_getenv when reading environment variables
expand_case_fold_string_alt(int item_num, OnigCaseFoldCodeItem items[], UChar *p, int slen, UChar *end, regex_t* reg, Node **rnode) { int r, i, j; int len; int varlen; Node *anode, *var_anode, *snode, *xnode, *an; UChar buf[ONIGENC_CODE_TO_MBC_MAXLEN]; *rnode = var_anode = NULL_...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
52,729,049,461,656,260,000,000,000,000,000,000,000
111
fix #87: Read unknown address in onig_error_code_to_str()
Item *next() { return *(list++); }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
261,004,209,871,830,800,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void diff_tree_release_paths(struct diff_options *opt) { free(opt->pathlens); }
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
153,664,875,000,079,250,000,000,000,000,000,000,000
4
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>
find_builtin_by_name (const char *name) { const builtin *bp; for (bp = &builtin_tab[0]; bp->name != NULL; bp++) if (strcmp (bp->name, name) == 0) return bp; return bp + 1; }
0
[]
m4
5345bb49077bfda9fabd048e563f9e7077fe335d
79,619,690,765,386,820,000,000,000,000,000,000,000
9
Minor security fix: Quote output of mkstemp. * src/builtin.c (mkstemp_helper): Produce quoted output. * doc/m4.texinfo (Mkstemp): Update the documentation and tests. * NEWS: Document this change. Signed-off-by: Eric Blake <ebb9@byu.net> (cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba)
static int clean_non_persistent_function(zval *zv) /* {{{ */ { zend_function *function = Z_PTR_P(zv); return (function->type == ZEND_INTERNAL_FUNCTION) ? ZEND_HASH_APPLY_STOP : ZEND_HASH_APPLY_REMOVE; }
0
[ "CWE-134" ]
php-src
b101a6bbd4f2181c360bd38e7683df4a03cba83e
171,347,347,940,389,280,000,000,000,000,000,000,000
5
Use format string
void gscms_set_icc_range(cmm_profile_t **icc_profile) { int num_comp = (*icc_profile)->num_comps; int k; for ( k = 0; k < num_comp; k++) { (*icc_profile)->Range.ranges[k].rmin = 0.0; (*icc_profile)->Range.ranges[k].rmax = 1.0; } }
0
[]
ghostpdl
6d444c273da5499a4cd72f21cb6d4c9a5256807d
170,860,622,463,393,400,000,000,000,000,000,000,000
10
Bug 697178: Add a file permissions callback For the rare occasions when the graphics library directly opens a file (currently for reading), this allows us to apply any restrictions on file access normally applied in the interpteter.
TEST_P(ProtocolIntegrationTest, RouterRedirect) { auto host = config_helper_.createVirtualHost("www.redirect.com", "/"); host.set_require_tls(envoy::api::v2::route::VirtualHost::ALL); config_helper_.addVirtualHost(host); initialize(); BufferingStreamDecoderPtr response = IntegrationUtil::makeSingleRequest( ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
17,161,828,133,037,292,000,000,000,000,000,000,000
13
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
TEST_F(OwnedImplTest, Search) { // Populate a buffer with a string split across many small slices, to // exercise edge cases in the search implementation. static const char* Inputs[] = {"ab", "a", "", "aaa", "b", "a", "aaa", "ab", "a"}; Buffer::OwnedImpl buffer; for (const auto& input : Inputs) { buffer.a...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
228,148,739,462,448,140,000,000,000,000,000,000,000
26
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
mrb_irep_remove_lv(mrb_state *mrb, mrb_irep *irep) { int i; if (irep->flags & MRB_IREP_NO_FREE) return; if (irep->lv) { mrb_free(mrb, (void*)irep->lv); irep->lv = NULL; } if (!irep->reps) return; for (i = 0; i < irep->rlen; ++i) { mrb_irep_remove_lv(mrb, (mrb_irep*)irep->reps[i]); } }
0
[ "CWE-415", "CWE-122" ]
mruby
38b164ace7d6ae1c367883a3d67d7f559783faad
98,046,437,989,516,920,000,000,000,000,000,000,000
14
codegen.c: fix a bug in `gen_values()`. - Fix limit handling that fails 15 arguments method calls. - Fix too early argument packing in arrays.
static NTSTATUS dcesrv_lsa_CREDRENUMERATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct lsa_CREDRENUMERATE *r) { DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR); }
0
[ "CWE-200" ]
samba
0a3aa5f908e351201dc9c4d4807b09ed9eedff77
119,702,369,971,449,550,000,000,000,000,000,000,000
5
CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message This aims to minimise usage of the error-prone pattern of searching for a just-added message element in order to make modifications to it (and potentially finding the wrong element). BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009 Signed...
int vrend_begin_query(struct vrend_context *ctx, uint32_t handle) { struct vrend_query *q; q = vrend_object_lookup(ctx->sub->object_hash, handle, VIRGL_OBJECT_QUERY); if (!q) return EINVAL; if (q->index > 0 && !has_feature(feat_transform_feedback3)) return EINVAL; lock_sync(); list_deli...
0
[ "CWE-787" ]
virglrenderer
95e581fd181b213c2ed7cdc63f2abc03eaaa77ec
171,205,725,091,344,900,000,000,000,000,000,000,000
24
vrend: Add test to resource OOB write and fix it v2: Also check that no depth != 1 has been send when none is due Closes: #250 Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
bool path_is_under(const struct path *path1, const struct path *path2) { bool res; read_seqlock_excl(&mount_lock); res = is_path_reachable(real_mount(path1->mnt), path1->dentry, path2); read_sequnlock_excl(&mount_lock); return res; }
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
7,741,725,713,587,771,000,000,000,000,000,000,000
8
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
void SSL_SESSION::CopyX509(X509* x) { if (x == 0) return; X509_NAME* issuer = x->GetIssuer(); X509_NAME* subject = x->GetSubject(); ASN1_STRING* before = x->GetBefore(); ASN1_STRING* after = x->GetAfter(); peerX509_ = NEW_YS X509(issuer->GetName(), issuer->GetLength(), subject->Get...
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
210,327,616,129,780,600,000,000,000,000,000,000,000
15
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
virtual int flush() { if (next) { return next->flush(); } return 0; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
72,458,507,426,186,860,000,000,000,000,000,000,000
6
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 <...
int kvm_write_guest_offset_cached(struct kvm *kvm, struct gfn_to_hva_cache *ghc, void *data, unsigned int offset, unsigned long len) { struct kvm_memslots *slots = kvm_memslots(kvm); int r; gpa_t gpa = ghc->gpa + offset; BUG_ON(len + offset > ghc->len); if (slots->generation != ghc->generation) __k...
0
[ "CWE-416", "CWE-362" ]
linux
cfa39381173d5f969daf43582c95ad679189cbc9
72,705,537,702,926,150,000,000,000,000,000,000,000
26
kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974) kvm_ioctl_create_device() does the following: 1. creates a device that holds a reference to the VM object (with a borrowed reference, the VM's refcount has not been bumped yet) 2. initializes the device 3. transfers the reference to the device t...
replace_substring(PyBytesObject *self, const char *from_s, Py_ssize_t from_len, const char *to_s, Py_ssize_t to_len, Py_ssize_t maxcount) { char *self_s, *result_s; char *start, *next, *end; Py_ssize_t self_len, result_len; Py_ssize_t count, offset; ...
0
[ "CWE-190" ]
cpython
6c004b40f9d51872d848981ef1a18bb08c2dfc42
220,122,303,476,190,800,000,000,000,000,000,000,000
65
bpo-30657: Fix CVE-2017-1000158 (#4758) Fixes possible integer overflow in PyBytes_DecodeEscape. Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com>
Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array */ PHP_FUNCTION(localtime) { long timestamp = (long)time(NULL); zend_bool associative = 0; timelib_tzinfo *tzi; timelib_time *ts; if (zend_parse_parameters...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
218,000,355,345,848,300,000,000,000,000,000,000,000
43
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
my_atoi(const char *p) { unsigned cp; cp = 0; while (*p) { if (*p >= '0' && *p <= '9') cp = cp * 10 + (*p - '0'); else return (-1); p++; } return (cp); }
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
28,654,349,442,318,405,000,000,000,000,000,000,000
14
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
redisContext *redisConnectNonBlock(const char *ip, int port) { redisOptions options = {0}; REDIS_OPTIONS_SET_TCP(&options, ip, port); options.options |= REDIS_OPT_NONBLOCK; return redisConnectWithOptions(&options); }
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
136,280,855,357,251,300,000,000,000,000,000,000,000
6
Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587) The redis-cli command line tool and redis-sentinel service may be vulnerable to integer overflow when parsing specially crafted large multi-bulk network replies. This is a result of a vulnerability in the underlying hiredis library wh...
static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf) { struct super_block *sb = dentry->d_sb; struct ext4_sb_info *sbi = EXT4_SB(sb); struct ext4_super_block *es = sbi->s_es; u64 fsid; if (test_opt(sb, MINIX_DF)) { sbi->s_overhead_last = 0; } else if (sbi->s_blocks_last != ext4_blocks_count(es)) ...
0
[ "CWE-20" ]
linux-2.6
4ec110281379826c5cf6ed14735e47027c3c5765
65,979,299,794,660,160,000,000,000,000,000,000,000
66
ext4: Add sanity checks for the superblock before mounting the filesystem This avoids insane superblock configurations that could lead to kernel oops due to null pointer derefences. http://bugzilla.kernel.org/show_bug.cgi?id=12371 Thanks to David Maciejak at Fortinet's FortiGuard Global Security Research Team who di...
static void srpt_release_cmd(struct se_cmd *se_cmd) { struct srpt_send_ioctx *ioctx = container_of(se_cmd, struct srpt_send_ioctx, cmd); struct srpt_rdma_ch *ch = ioctx->ch; unsigned long flags; WARN_ON(ioctx->state != SRPT_STATE_DONE); WARN_ON(ioctx->mapped_sg_count != 0); if (ioctx->n_rbuf > 1) { kfree(...
0
[ "CWE-200", "CWE-476" ]
linux
51093254bf879bc9ce96590400a87897c7498463
107,465,846,903,876,270,000,000,000,000,000,000,000
20
IB/srpt: Simplify srpt_handle_tsk_mgmt() Let the target core check task existence instead of the SRP target driver. Additionally, let the target core check the validity of the task management request instead of the ib_srpt driver. This patch fixes the following kernel crash: BUG: unable to handle kernel NULL pointer...
static inline bool tcp_ca_needs_ecn(const struct sock *sk) { const struct inet_connection_sock *icsk = inet_csk(sk); return icsk->icsk_ca_ops->flags & TCP_CONG_NEEDS_ECN; }
0
[ "CWE-416", "CWE-269" ]
linux
bb1fceca22492109be12640d49f5ea5a544c6bb4
302,925,913,250,196,170,000,000,000,000,000,000,000
6
tcp: fix use after free in tcp_xmit_retransmit_queue() When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the tail of the write queue using tcp_add_write_queue_tail() Then it attempts to copy user data into this fresh skb. If the copy fails, we undo the work and remove the fresh skb. Unfortunately, t...
static ssize_t loop_attr_backing_file_show(struct loop_device *lo, char *buf) { ssize_t ret; char *p = NULL; spin_lock_irq(&lo->lo_lock); if (lo->lo_backing_file) p = file_path(lo->lo_backing_file, buf, PAGE_SIZE - 1); spin_unlock_irq(&lo->lo_lock); if (IS_ERR_OR_NULL(p)) ret = PTR_ERR(p); else { ret = s...
0
[ "CWE-416", "CWE-362" ]
linux
ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5
172,446,259,742,955,150,000,000,000,000,000,000,000
21
loop: fix concurrent lo_open/lo_release 范龙飞 reports that KASAN can report a use-after-free in __lock_acquire. The reason is due to insufficient serialization in lo_release(), which will continue to use the loop device even after it has decremented the lo_refcnt to zero. In the meantime, another process can come in, o...