func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
XkbWriteModifierMap(XkbDescPtr xkb, xkbGetMapReply * rep, char *buf, ClientPtr client) { unsigned i; char *start; unsigned char *pMap; start = buf; pMap = &xkb->map->modmap[rep->firstModMapKey]; for (i = 0; i < rep->nModMapKeys; i++, pMap++) { if (*pMap != 0) { ...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
173,886,504,161,802,370,000,000,000,000,000,000,000
18
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
void OSD::final_init() { AdminSocket *admin_socket = cct->get_admin_socket(); asok_hook = new OSDSocketHook(this); int r = admin_socket->register_command("status", "status", asok_hook, "high-level status of OSD"); assert(r == 0); r = admin_socket->register_command("flush_journal", "flush_journal", ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
181,805,460,358,454,930,000,000,000,000,000,000,000
220
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 void prb_setup_retire_blk_timer(struct packet_sock *po) { struct tpacket_kbdq_core *pkc; pkc = GET_PBDQC_FROM_RB(&po->rx_ring); prb_init_blk_timer(po, pkc, prb_retire_rx_blk_timer_expired); }
0
[ "CWE-416", "CWE-362" ]
linux
84ac7260236a49c79eede91617700174c2c19b0c
977,048,257,837,856,600,000,000,000,000,000,000
7
packet: fix race condition in packet_set_ring When packet_set_ring creates a ring buffer it will initialize a struct timer_list if the packet version is TPACKET_V3. This value can then be raced by a different thread calling setsockopt to set the version to TPACKET_V1 before packet_set_ring has finished. This leads to...
R_API void U(r_bin_java_print_stack_map_append_frame_summary)(RBinJavaStackMapFrame * obj) { RListIter *iter, *iter_tmp; RList *ptrList; RBinJavaVerificationObj *ver_obj; Eprintf ("Stack Map Frame Information\n"); Eprintf (" Tag Value = 0x%02x Name: %s\n", obj->tag, ((RBinJavaStackMapFrameMetas *) obj->metas->typ...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
227,121,868,523,498,140,000,000,000,000,000,000,000
20
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
static void flush_queued_data_bh(void *opaque) { VirtIOSerialPort *port = opaque; flush_queued_data(port); }
0
[ "CWE-120", "CWE-787" ]
qemu
7882080388be5088e72c425b02223c02e6cb4295
247,614,537,632,931,040,000,000,000,000,000,000,000
6
virtio-serial: fix ANY_LAYOUT Don't assume a specific layout for control messages. Required by virtio 1. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Amit Shah <amit.shah@redhat.com> Reviewed-by: Jason Wang <jasowang@redhat.com>
void CLASS parse_ciff(int offset, int length, int depth) { int tboff, nrecs, c, type, len, save, wbi = -1; ushort key[] = {0x410, 0x45f3}; #ifdef LIBRAW_LIBRARY_BUILD INT64 fsize = ifp->size(); #endif fseek(ifp, offset + length - 4, SEEK_SET); tboff = get4() + offset; fseek(ifp, tboff, SEEK_SET); nrecs =...
0
[ "CWE-400" ]
LibRaw
e67a9862d10ebaa97712f532eca1eb5e2e410a22
37,113,796,617,039,664,000,000,000,000,000,000,000
222
Fixed Secunia Advisory SA86384 - possible infinite loop in unpacked_load_raw() - possible infinite loop in parse_rollei() - possible infinite loop in parse_sinar_ia() Credits: Laurent Delosieres, Secunia Research at Flexera
virtual Ref_Type ref_type() { return VIEW_REF; }
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
224,844,549,086,882,000,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
Method* LinkResolver::lookup_polymorphic_method(const LinkInfo& link_info, Handle *appendix_result_or_null, TRAPS) { ResourceMark rm(THREAD); Klass* klass = link_info.resolved_klass(); Symbol* name = link_info.name(); ...
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
102,494,161,805,301,360,000,000,000,000,000,000,000
99
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
read_children(struct archive_read *a, struct file_info *parent) { struct iso9660 *iso9660; const unsigned char *b, *p; struct file_info *multi; size_t step, skip_size; iso9660 = (struct iso9660 *)(a->format->data); /* flush any remaining bytes from the last round to ensure * we're positioned */ if (iso9660->e...
0
[ "CWE-125" ]
libarchive
f9569c086ff29259c73790db9cbf39fe8fb9d862
76,256,613,085,624,530,000,000,000,000,000,000,000
121
iso9660: validate directory record length
ZEND_API const char* zend_find_alias_name(zend_class_entry *ce, const char *name, zend_uint len) /* {{{ */ { zend_trait_alias *alias, **alias_ptr; if ((alias_ptr = ce->trait_aliases)) { alias = *alias_ptr; while (alias) { if (alias->alias_len == len && !strncasecmp(name, alias->alias, alias->alias_len)) {...
0
[ "CWE-416" ]
php-src
0e6fe3a4c96be2d3e88389a5776f878021b4c59f
217,339,829,683,319,550,000,000,000,000,000,000,000
18
Fix bug #73147: Use After Free in PHP7 unserialize()
static inline int bprm_caps_from_vfs_caps(struct cpu_vfs_cap_data *caps, struct linux_binprm *bprm, bool *effective, bool *has_cap) { struct cred *new = bprm->cred; unsigned i; int ret = 0; if (caps->magic_etc & VFS_CAP_FLAGS_EFFECTIVE) *effective = true; if (caps->magic_etc & VFS_CAP_REVI...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
132,034,268,502,782,940,000,000,000,000,000,000,000
38
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 void spk_ttyio_flush_buffer(void) { mutex_lock(&speakup_tty_mutex); if (check_tty(speakup_tty)) { mutex_unlock(&speakup_tty_mutex); return; } if (speakup_tty->ops->flush_buffer) speakup_tty->ops->flush_buffer(speakup_tty); mutex_unlock(&speakup_tty_mutex); }
0
[ "CWE-362", "CWE-763" ]
linux
d4122754442799187d5d537a9c039a49a67e57f1
167,802,231,402,434,700,000,000,000,000,000,000,000
13
speakup: Do not let the line discipline be used several times Speakup has only one speakup_tty variable to store the tty it is managing. This makes sense since its codebase currently assumes that there is only one user who controls the screen reading. That however means that we have to forbid using the line disciplin...
void freeReplyObject(void *reply) { redisReply *r = reply; size_t j; if (r == NULL) return; switch(r->type) { case REDIS_REPLY_INTEGER: break; /* Nothing to free */ case REDIS_REPLY_ARRAY: case REDIS_REPLY_MAP: case REDIS_REPLY_SET: case REDIS_REPLY_PUSH: if...
0
[ "CWE-190", "CWE-680" ]
redis
0215324a66af949be39b34be2d55143232c1cb71
259,194,731,359,294,300,000,000,000,000,000,000,000
30
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...
read_eocd(struct zip *zip, const char *p, int64_t current_offset) { /* Sanity-check the EOCD we've found. */ /* This must be the first volume. */ if (archive_le16dec(p + 4) != 0) return 0; /* Central directory must be on this volume. */ if (archive_le16dec(p + 4) != archive_le16dec(p + 6)) return 0; /* All c...
0
[ "CWE-20" ]
libarchive
d0331e8e5b05b475f20b1f3101fe1ad772d7e7e7
120,307,940,323,710,940,000,000,000,000,000,000,000
27
Issue #656: Fix CVE-2016-1541, VU#862384 When reading OS X metadata entries in Zip archives that were stored without compression, libarchive would use the uncompressed entry size to allocate a buffer but would use the compressed entry size to limit the amount of data copied into that buffer. Since the compressed and...
Tensor::Tensor(DataType type, const TensorShape& shape, TensorBuffer* buf) : shape_(shape), buf_(buf) { set_dtype(type); RefIfNonNull(buf); }
0
[ "CWE-345" ]
tensorflow
abcced051cb1bd8fb05046ac3b6023a7ebcc4578
44,090,934,514,311,605,000,000,000,000,000,000,000
5
Prevent crashes when loading tensor slices with unsupported types. Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL) messages for the unset and unsupported types. PiperOrigin-RevId: 392695027 Change-Id: I4beda7db950db951d273e3259a7c8534ece49354
static void dce100_destroy_resource_pool(struct resource_pool **pool) { struct dce110_resource_pool *dce110_pool = TO_DCE110_RES_POOL(*pool); destruct(dce110_pool); kfree(dce110_pool); *pool = NULL; }
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
236,841,510,416,146,350,000,000,000,000,000,000,000
8
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
static int esp_init_authenc(struct xfrm_state *x) { struct crypto_aead *aead; struct crypto_authenc_key_param *param; struct rtattr *rta; char *key; char *p; char authenc_name[CRYPTO_MAX_ALG_NAME]; unsigned int keylen; int err; err = -EINVAL; if (!x->ealg) goto error; err = -ENAMETOOLONG; if ((x->props...
0
[ "CWE-787" ]
linux
ebe48d368e97d007bfeb76fcb065d6cfc4c96645
220,926,508,253,526,600,000,000,000,000,000,000,000
92
esp: Fix possible buffer overflow in ESP transformation The maximum message size that can be send is bigger than the maximum site that skb_page_frag_refill can allocate. So it is possible to write beyond the allocated buffer. Fix this by doing a fallback to COW in that case. v2: Avoid get get_order() costs as sugg...
const struct GUID *smbXcli_conn_server_guid(struct smbXcli_conn *conn) { if (conn->protocol >= PROTOCOL_SMB2_02) { return &conn->smb2.server.guid; } return &conn->smb1.server.guid; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
236,997,188,912,258,370,000,000,000,000,000,000,000
8
CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
static int sisusb_write_memio_byte(struct sisusb_usb_data *sisusb, int type, u32 addr, u8 data) { struct sisusb_packet packet; packet.header = (1 << (addr & 3)) | (type << 6); packet.address = addr & ~3; packet.data = data << ((addr & 3) << 3); return sisusb_send_packet(sisusb, 10, &packet); }
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
81,304,200,317,044,600,000,000,000,000,000,000,000
10
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
static int selinux_is_sblabel_mnt(struct super_block *sb) { struct superblock_security_struct *sbsec = sb->s_security; /* * IMPORTANT: Double-check logic in this function when adding a new * SECURITY_FS_USE_* definition! */ BUILD_BUG_ON(SECURITY_FS_USE_MAX != 7); switch (sbsec->behavior) { case SECURITY_FS...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
153,264,168,502,191,450,000,000,000,000,000,000,000
27
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
static HashTable *spl_array_get_gc(zval *object, zval ***gc_data, int *gc_data_count TSRMLS_DC) /* {{{ */ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); *gc_data = &intern->array; *gc_data_count = 1; return zend_std_get_properties(object TSRMLS_CC); }
0
[ "CWE-20" ]
php-src
ecb7f58a069be0dec4a6131b6351a761f808f22e
106,294,915,824,787,150,000,000,000,000,000,000,000
8
Fix bug #73029 - Missing type check when unserializing SplArray
\param[out] max_val Value of the maximum value found. **/ template<typename t> T& min_max(t& max_val) { bool is_all_empty = true; T *ptr_min = 0; cimglist_for(*this,l) if (!_data[l].is_empty()) { ptr_min = _data[l]._data; is_all_empty = false; break; } ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
202,394,112,700,604,030,000,000,000,000,000,000,000
25
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Unit *unit_new(Manager *m, size_t size) { Unit *u; assert(m); assert(size >= sizeof(Unit)); u = malloc0(size); if (!u) return NULL; u->names = set_new(&string_hash_ops); if (!u->names) return mfree(u); u->manager = m; ...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
172,864,875,362,196,800,000,000,000,000,000,000,000
43
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
static OPJ_BOOL opj_j2k_write_SPCod_SPCoc(opj_j2k_t *p_j2k, OPJ_UINT32 p_tile_no, OPJ_UINT32 p_comp_no, OPJ_BYTE * p_data, OPJ_UINT32 * p_header_size, struct opj_event_mgr * p_manager) { OPJ_UINT32 i; opj_cp_t *l_cp = 00; opj_tcp_t *l_tcp = 00; opj_tccp_t *l_tccp ...
0
[ "CWE-416", "CWE-787" ]
openjpeg
4241ae6fbbf1de9658764a80944dc8108f2b4154
201,418,410,693,356,170,000,000,000,000,000,000,000
68
Fix assertion in debug mode / heap-based buffer overflow in opj_write_bytes_LE for Cinema profiles with numresolutions = 1 (#985)
static int scrollrect(VTermRect rect, int downward, int rightward, void *user) { VTermScreen *screen = user; if(screen->damage_merge != VTERM_DAMAGE_SCROLL) { vterm_scroll_rect(rect, downward, rightward, moverect_internal, erase_internal, screen); vterm_screen_flush_damage(screen); vterm_scro...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
271,834,091,986,011,500,000,000,000,000,000,000,000
83
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
static ssize_t cgroup_pressure_write(struct kernfs_open_file *of, char *buf, size_t nbytes, enum psi_res res) { struct cgroup_file_ctx *ctx = of->priv; struct psi_trigger *new; struct cgroup *cgrp; struct psi_group *psi; cgrp = cgroup_kn_lock_live(of->kn, false); if (!cgrp) return -ENODEV; cgroup_get(...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
311,047,363,051,714,050,000,000,000,000,000,000,000
33
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
DECLAREContigPutFunc(putRGBcontig8bitCMYKtile) { int samplesperpixel = img->samplesperpixel; uint16 r, g, b, k; (void) x; (void) y; fromskew *= samplesperpixel; for( ; h > 0; --h) { UNROLL8(w, NOP, k = 255 - pp[3]; r = (k*(255-pp[0]))/255; g = (k*(255-pp[1]))/255; b = (k*(255-p...
0
[ "CWE-787" ]
libtiff
4bb584a35f87af42d6cf09d15e9ce8909a839145
273,360,552,876,645,800,000,000,000,000,000,000,000
19
RGBA interface: fix integer overflow potentially causing write heap buffer overflow, especially on 32 bit builds. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16443. Credit to OSS Fuzz
char* takeBuf() {char* tmp = buf; buf = 0; return tmp;}
0
[ "CWE-20", "CWE-787" ]
tigervnc
0943c006c7d900dfc0281639e992791d6c567438
231,918,189,156,547,400,000,000,000,000,000,000,000
1
Use size_t for lengths in stream objects Provides safety against them accidentally becoming negative because of bugs in the calculations. Also does the same to CharArray and friends as they were strongly connection to the stream objects.
GF_Err clap_box_size(GF_Box *s) { s->size += 32; return GF_OK; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
55,501,358,229,736,000,000,000,000,000,000,000,000
5
fixed #2255
camel_imapx_server_append_message_sync (CamelIMAPXServer *is, CamelIMAPXMailbox *mailbox, CamelFolderSummary *summary, CamelDataCache *message_cache, CamelMimeMessage *message, const CamelMessageInfo *mi, gchar **appended_uid, GCancellable *cancellable, GError **error) { gchar *...
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
274,661,494,147,029,540,000,000,000,000,000,000,000
229
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
static NAN_METHOD(New) { MarkPopErrorOnReturn mark_pop_error_on_return; if (!info[0]->IsString()) return Nan::ThrowTypeError("Missing/Invalid cipher name"); if (!Buffer::HasInstance(info[1])) return Nan::ThrowTypeError("Missing/Invalid cipher key"); if (!Buffer::HasInstance(info[2])) ...
0
[ "CWE-78" ]
ssh2
f763271f41320e71d5cbee02ea5bc6a2ded3ca21
124,584,271,534,682,500,000,000,000,000,000,000,000
63
examples,lib,test: switch to code rewrite For more information see: https://github.com/mscdex/ssh2/issues/935
void pointZZ_pMul(PointZZ_p * rop, const PointZZ_p * point, const mpz_t scalar, const CurveZZ_p * curve) { // handle the identity element if(pointZZ_pIsIdentityElement(point)) { return pointZZ_pSetToIdentityElement(rop); } PointZZ_p R0, R1, tmp; mpz_inits(R1.x, R1.y, tmp.x, tmp.y, NULL); ...
0
[ "CWE-347" ]
fastecdsa
e592f106edd5acf6dacedfab2ad16fe6c735c9d1
192,229,705,596,515,440,000,000,000,000,000,000,000
37
Properly handle the point at infinity
subject_iface_init (PolkitSubjectIface *subject_iface) { subject_iface->hash = polkit_system_bus_name_hash; subject_iface->equal = polkit_system_bus_name_equal; subject_iface->to_string = polkit_system_bus_name_to_string; subject_iface->exists = polkit_system_bus_name_exists; subje...
0
[ "CWE-754" ]
polkit
a04d13affe0fa53ff618e07aa8f57f4c0e3b9b81
302,183,338,932,985,960,000,000,000,000,000,000,000
9
GHSL-2021-074: authentication bypass vulnerability in polkit initial values returned if error caught
mono_method_get_equivalent_method (MonoMethod *method, MonoClass *klass) { int offset = -1, i; if (method->is_inflated && ((MonoMethodInflated*)method)->context.method_inst) { MonoMethodInflated *inflated = (MonoMethodInflated*)method; //method is inflated, we should inflate it on the other class MonoGenericCon...
0
[ "CWE-264" ]
mono
035c8587c0d8d307e45f1b7171a0d337bb451f1e
11,127,595,768,563,990,000,000,000,000,000,000,000
31
Allow only primitive types/enums in RuntimeHelpers.InitializeArray ().
static int xfrm_send_acquire(struct xfrm_state *x, struct xfrm_tmpl *xt, struct xfrm_policy *xp) { struct net *net = xs_net(x); struct sk_buff *skb; skb = nlmsg_new(xfrm_acquire_msgsize(x, xp), GFP_ATOMIC); if (skb == NULL) return -ENOMEM; if (build_acquire(skb, x, xt, xp) < 0) BUG(); return xfrm_n...
0
[ "CWE-284" ]
linux
677e806da4d916052585301785d847c3b3e6186a
111,061,614,702,143,480,000,000,000,000,000,000,000
15
xfrm_user: validate XFRM_MSG_NEWAE XFRMA_REPLAY_ESN_VAL replay_window When a new xfrm state is created during an XFRM_MSG_NEWSA call we validate the user supplied replay_esn to ensure that the size is valid and to ensure that the replay_window size is within the allocated buffer. However later it is possible to updat...
static int alarmtimer_rtc_interface_setup(void) { alarmtimer_rtc_interface.class = rtc_class; return class_interface_register(&alarmtimer_rtc_interface); }
0
[ "CWE-190" ]
linux
5f936e19cc0ef97dbe3a56e9498922ad5ba1edef
2,385,507,848,441,323,000,000,000,000,000,000,000
5
alarmtimer: Prevent overflow for relative nanosleep Air Icy reported: UBSAN: Undefined behaviour in kernel/time/alarmtimer.c:811:7 signed integer overflow: 1529859276030040771 + 9223372036854775807 cannot be represented in type 'long long int' Call Trace: alarm_timer_nsleep+0x44c/0x510 kernel/time/alarmtim...
after_copy_winopt(win_T *wp UNUSED) { #ifdef FEAT_LINEBREAK briopt_check(wp); #endif #ifdef FEAT_SYN_HL fill_culopt_flags(NULL, wp); check_colorcolumn(wp); #endif set_chars_option(wp, &wp->w_p_lcs); }
0
[ "CWE-122" ]
vim
b7081e135a16091c93f6f5f7525a5c58fb7ca9f9
305,349,855,029,053,860,000,000,000,000,000,000,000
11
patch 8.2.3402: invalid memory access when using :retab with large value Problem: Invalid memory access when using :retab with large value. Solution: Check the number is positive.
void RGWDeleteObjTags::execute() { if (s->object.empty()) return; rgw_obj obj; obj = rgw_obj(s->bucket, s->object); store->set_atomic(s->obj_ctx, obj); map <string, bufferlist> attrs; map <string, bufferlist> rmattr; bufferlist bl; rmattr[RGW_ATTR_TAGS] = bl; op_ret = store->set_attrs(s->obj_ctx,...
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
131,602,543,394,217,100,000,000,000,000,000,000,000
14
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 Adapter_process_file_wrapper(AdapterObject *self) { int done = 0; #ifndef WIN32 PyObject *filelike = NULL; PyObject *method = NULL; PyObject *object = NULL; apr_status_t rv = 0; apr_os_file_t fd = -1; apr_file_t *tmpfile = NULL; apr_finfo_t finfo; apr_off_t fd_offset =...
0
[ "CWE-254" ]
mod_wsgi
545354a80b9cc20d8b6916ca30542eab36c3b8bd
212,479,199,945,950,800,000,000,000,000,000,000,000
212
When there is any sort of error in setting up daemon process group, kill the process rather than risk running in an unexpected state.
OPJ_BOOL opj_j2k_read_mcc ( opj_j2k_t *p_j2k, OPJ_BYTE * p_header_data, OPJ_UINT32 p_header_size, opj_event_mgr_t * p_manager ) { OPJ_UINT32 i,j; OPJ_UINT32...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
222,666,306,376,664,340,000,000,000,000,000,000,000
214
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
GC_API void * GC_CALL GC_generate_random_valid_address(void) { ptr_t result; ptr_t base; do { result = GC_generate_random_heap_address(); base = GC_base(result); } while (base == 0 || !GC_is_marked(base)); return result; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
61,404,476,429,277,770,000,000,000,000,000,000,000
10
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
static void uas_sense(struct urb *urb, struct scsi_cmnd *cmnd) { struct sense_iu *sense_iu = urb->transfer_buffer; struct scsi_device *sdev = cmnd->device; if (urb->actual_length > 16) { unsigned len = be16_to_cpup(&sense_iu->len); if (len + 16 != urb->actual_length) { int newlen = min(len + 16, urb->actual_...
0
[ "CWE-125" ]
linux
786de92b3cb26012d3d0f00ee37adf14527f35c4
244,069,677,004,997,230,000,000,000,000,000,000,000
22
USB: uas: fix bug in handling of alternate settings The uas driver has a subtle bug in the way it handles alternate settings. The uas_find_uas_alt_setting() routine returns an altsetting value (the bAlternateSetting number in the descriptor), but uas_use_uas_driver() then treats that value as an index to the intf->al...
int ldb_kv_filter_attrs(struct ldb_context *ldb, const struct ldb_message *msg, const char *const *attrs, struct ldb_message *filtered_msg) { return ldb_filter_attrs(ldb, msg, attrs, filtered_msg); }
0
[ "CWE-703" ]
samba
08c9016cb9f25105c39488770113a1b00f8a4223
195,452,370,667,548,200,000,000,000,000,000,000,000
7
CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing The LDB filter processing is where the time is spent in the LDB stack but the timeout event will not get run while this is ongoing, so we must confirm we have not yet timed out manually. RN: Ensure that the LDB request has not timed...
static int __get_index(struct qtree_mem_dqinfo *info, qid_t id, int depth) { unsigned int epb = info->dqi_usable_bs >> 2; depth = info->dqi_qtree_depth - depth - 1; while (depth--) id /= epb; return id % epb; }
0
[ "CWE-416" ]
linux
9bf3d20331295b1ecb81f4ed9ef358c51699a050
137,765,017,005,058,950,000,000,000,000,000,000,000
9
quota: check block number when reading the block in quota file The block number in the quota tree on disk should be smaller than the v2_disk_dqinfo.dqi_blocks. If the quota file was corrupted, we may be allocating an 'allocated' block and that would lead to a loop in a tree, which will probably trigger oops later. Thi...
static void fdctrl_write_mem (void *opaque, hwaddr reg, uint64_t value, unsigned size) { fdctrl_write(opaque, (uint32_t)reg, value); }
0
[ "CWE-119" ]
qemu
e907746266721f305d67bc0718795fedee2e824c
164,298,023,179,345,400,000,000,000,000,000,000,000
5
fdc: force the fifo access to be in bounds of the allocated buffer During processing of certain commands such as FD_CMD_READ_ID and FD_CMD_DRIVE_SPECIFICATION_COMMAND the fifo memory access could get out of bounds leading to memory corruption with values coming from the guest. Fix this by making sure that the index i...
Status EagerCopyToDevice(TensorHandle* h, EagerContext* ctx, EagerExecutor* executor, Device* device, bool mirror, TensorHandle** result) { TF_RETURN_IF_ERROR(h->WaitUnknownDevice()); auto send_device = h->DeviceOrHostCPU(*ctx); bool sender_is_local = send_device-...
0
[ "CWE-476", "CWE-475" ]
tensorflow
a5b89cd68c02329d793356bda85d079e9e69b4e7
81,174,915,715,809,780,000,000,000,000,000,000,000
92
Fix empty resource handle vulnerability. Some ops that attempt to extract a resource handle from user input can lead to nullptr dereferences. This returns an error in such a case. PiperOrigin-RevId: 445571938
void qmp_guest_set_time(int64_t time_ns, Error **errp) { int ret; int status; pid_t pid; Error *local_err = NULL; struct timeval tv; /* year-2038 will overflow in case time_t is 32bit */ if (time_ns / 1000000000 != (time_t)(time_ns / 1000000000)) { error_setg(errp, "Time %" PRId64 "...
0
[ "CWE-264" ]
qemu
c689b4f1bac352dcfd6ecb9a1d45337de0f1de67
179,324,458,226,398,300,000,000,000,000,000,000,000
54
qga: set umask 0077 when daemonizing (CVE-2013-2007) The qemu guest agent creates a bunch of files with insecure permissions when started in daemon mode. For example: -rw-rw-rw- 1 root root /var/log/qemu-ga.log -rw-rw-rw- 1 root root /var/run/qga.state -rw-rw-rw- 1 root root /var/log/qga-fsfreeze-hook.log In a...
init_hex_table (void) { /* * We build the table at run time for several reasons: * * 1. portable to non-ASCII machines. * 2. still reentrant since we set the init flag after setting table. * 3. easier to extend. * 4. less prone to bugs. */ hex_table['0'] = 0; hex_table['1'] = 1; hex_table['2'] = 2; h...
0
[ "CWE-189" ]
gdk-pixbuf
4f0f465f991cd454d03189497f923eb40c170c22
88,316,813,991,308,880,000,000,000,000,000,000,000
42
Avoid an integer overflow in the xbm loader At the same time, reject some silly input, such as negative width or height. https://bugzilla.gnome.org/show_bug.cgi?id=672811
static void load_xref_entries(FILE *fp, xref_t *xref) { if (xref->is_stream) load_xref_from_stream(fp, xref); else load_xref_from_plaintext(fp, xref); }
0
[ "CWE-787" ]
pdfresurrect
0c4120fffa3dffe97b95c486a120eded82afe8a6
241,310,829,488,560,270,000,000,000,000,000,000,000
7
Zero and sanity check all dynamic allocs. This addresses the memory issues in Issue #6 expressed in calloc_some.pdf and malloc_some.pdf
int vb2_ioctl_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) { struct video_device *vdev = video_devdata(file); if (vb2_queue_is_busy(vdev, file)) return -EBUSY; return vb2_streamoff(vdev->queue, i); }
0
[ "CWE-119", "CWE-787" ]
linux
2c1f6951a8a82e6de0d82b1158b5e493fc6c54ab
339,603,082,518,666,930,000,000,000,000,000,000,000
8
[media] videobuf2-v4l2: Verify planes array in buffer dequeueing When a buffer is being dequeued using VIDIOC_DQBUF IOCTL, the exact buffer which will be dequeued is not known until the buffer has been removed from the queue. The number of planes is specific to a buffer, not to the queue. This does lead to the situat...
InternalFindFile ( IN EFI_BLOCK_IO_PROTOCOL *BlockIo, IN EFI_DISK_IO_PROTOCOL *DiskIo, IN UDF_VOLUME_INFO *Volume, IN CHAR16 *FileName, IN UDF_FILE_INFO *Parent, IN UDF_LONG_ALLOCATION_DESCRIPTOR *Icb, OUT ...
0
[]
edk2
b9ae1705adfdd43668027a25a2b03c2e81960219
31,489,559,300,180,854,000,000,000,000,000,000,000
168
MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828 The commit refines the boundary checks for file/path name string to prevent possible buffer overrun. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Cc: Jiewen Yao <jiewen.yao@intel.com> Contributed-under: ...
hwaddr virtio_queue_get_desc_addr(VirtIODevice *vdev, int n) { return vdev->vq[n].vring.desc; }
0
[ "CWE-94" ]
qemu
cc45995294b92d95319b4782750a3580cabdbc0c
37,393,018,504,513,960,000,000,000,000,000,000,000
4
virtio: out-of-bounds buffer write on invalid state load CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in virtio_load@hw/virtio/virtio.c So we have this code since way back when: num = qemu_get_be32(f); for (i = 0; i < num; i++) { vdev->vq[i].vring.num = qemu_get_be32(f); array of vqs has size ...
static void bnx2x_init_internal(struct bnx2x *bp, u32 load_code) { switch (load_code) { case FW_MSG_CODE_DRV_LOAD_COMMON: case FW_MSG_CODE_DRV_LOAD_COMMON_CHIP: bnx2x_init_internal_common(bp); /* no break */ case FW_MSG_CODE_DRV_LOAD_PORT: /* nothing to do */ /* no break */ case FW_MSG_CODE_DRV_LOAD_FUNC...
0
[ "CWE-20" ]
linux
8914a595110a6eca69a5e275b323f5d09e18f4f9
58,926,851,686,837,950,000,000,000,000,000,000,000
22
bnx2x: disable GSO where gso_size is too big for hardware If a bnx2x card is passed a GSO packet with a gso_size larger than ~9700 bytes, it will cause a firmware error that will bring the card down: bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert! bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT...
void thread_stack_cache_init(void) { thread_stack_cache = kmem_cache_create_usercopy("thread_stack", THREAD_SIZE, THREAD_SIZE, 0, 0, THREAD_SIZE, NULL); BUG_ON(thread_stack_cache == NULL); }
0
[ "CWE-362" ]
linux
7b55851367136b1efd84d98fea81ba57a98304cf
105,573,115,977,203,260,000,000,000,000,000,000,000
7
fork: record start_time late This changes the fork(2) syscall to record the process start_time after initializing the basic task structure but still before making the new process visible to user-space. Technically, we could record the start_time anytime during fork(2). But this might lead to scenarios where a start_...
test_commands_sorted(void) { unsigned i; for (i = 1; i < countof(commands); ++i) { if (strcasecmp (commands[i - 1].name, commands[i].name) > 0) { mu_assert ("FAILED", false); break; } } return NULL; }
0
[ "CWE-22" ]
wget
18b0979357ed7dc4e11d4f2b1d7e0f5932d82aa7
7,181,904,332,436,080,000,000,000,000,000,000,000
14
CVE-2014-4877: Arbitrary Symlink Access Wget was susceptible to a symlink attack which could create arbitrary files, directories or symbolic links and set their permissions when retrieving a directory recursively through FTP. This commit changes the default settings in Wget such that Wget no longer creates local symbo...
snmp_rfcv3_handler(__attribute__((unused)) vector_t *strvec) { global_data->enable_snmp_rfcv3 = true; }
0
[ "CWE-200" ]
keepalived
c6247a9ef2c7b33244ab1d3aa5d629ec49f0a067
117,164,762,418,861,220,000,000,000,000,000,000,000
4
Add command line and configuration option to set umask Issue #1048 identified that files created by keepalived are created with mode 0666. This commit changes the default to 0644, and also allows the umask to be specified in the configuration or as a command line option. Signed-off-by: Quentin Armitage <quentin@armit...
static void pppol2tp_show(struct seq_file *m, void *arg) { struct l2tp_session *session = arg; struct pppol2tp_session *ps = l2tp_session_priv(session); if (ps) { struct pppox_sock *po = pppox_sk(ps->sock); if (po) seq_printf(m, " interface %s\n", ppp_dev_name(&po->chan)); } }
0
[ "CWE-416" ]
linux
f026bc29a8e093edfbb2a77700454b285c97e8ad
195,512,522,275,314,360,000,000,000,000,000,000,000
11
l2tp: pass tunnel pointer to ->session_create() Using l2tp_tunnel_find() in pppol2tp_session_create() and l2tp_eth_create() is racy, because no reference is held on the returned session. These functions are only used to implement the ->session_create callback which is run by l2tp_nl_cmd_session_create(). Therefore sea...
gdm_session_worker_start_auditor (GdmSessionWorker *worker) { /* Use dummy auditor so program session doesn't pollute user audit logs */ if (worker->priv->is_program_session) { worker->priv->auditor = gdm_session_auditor_new (worker->priv->hostname, ...
0
[ "CWE-362" ]
gdm
dcdbaaa04012541ad2813cf83559d91d52f208b9
95,904,459,011,368,650,000,000,000,000,000,000,000
24
session-worker: Don't switch back VTs until session is fully exited There's a race condition on shutdown where the session worker is switching VTs back to the initial VT at the same time as the session exit is being processed. This means that manager may try to start a login screen (because of the VT switch) when aut...
xmlParserInputGrow(xmlParserInputPtr in, int len) { size_t ret; size_t indx; const xmlChar *content; if ((in == NULL) || (len < 0)) return(-1); #ifdef DEBUG_INPUT xmlGenericError(xmlGenericErrorContext, "Grow\n"); #endif if (in->buf == NULL) return(-1); if (in->base == NULL) return(-1); ...
0
[ "CWE-119" ]
libxml2
23f05e0c33987d6605387b300c4be5da2120a7ab
197,900,698,837,707,700,000,000,000,000,000,000,000
50
Detect excessive entities expansion upon replacement If entities expansion in the XML parser is asked for, it is possble to craft relatively small input document leading to excessive on-the-fly content generation. This patch accounts for those replacement and stop parsing after a given threshold. it can be bypassed as...
static inline void AssociateAlphaPixel(const Image *image, const CubeInfo *cube_info,const Quantum *pixel,DoublePixelPacket *alpha_pixel) { double alpha; if ((cube_info->associate_alpha == MagickFalse) || (GetPixelAlpha(image,pixel) == OpaqueAlpha)) { alpha_pixel->red=(double) GetPixelRed(ima...
0
[ "CWE-125" ]
ImageMagick
5294966898532a6bd54699fbf04edf18902513ac
297,339,362,729,628,130,000,000,000,000,000,000,000
21
https://github.com/ImageMagick/ImageMagick/issues/1156
int cmp_binary_offset(uint row_offset) { return cmp_offset(row_offset); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
122,089,310,754,074,090,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void __tcp_v4_send_check(struct sk_buff *skb, __be32 saddr, __be32 daddr) { struct tcphdr *th = tcp_hdr(skb); if (skb->ip_summed == CHECKSUM_PARTIAL) { th->check = ~tcp_v4_check(skb->len, saddr, daddr, 0); skb->csum_start = skb_transport_header(skb) - skb->head; skb->csum_offset = offsetof(struct tcphdr, check...
0
[ "CWE-284" ]
linux
ac6e780070e30e4c35bd395acfe9191e6268bdd3
228,403,141,581,821,670,000,000,000,000,000,000,000
15
tcp: take care of truncations done by sk_filter() With syzkaller help, Marco Grassi found a bug in TCP stack, crashing in tcp_collapse() Root cause is that sk_filter() can truncate the incoming skb, but TCP stack was not really expecting this to happen. It probably was expecting a simple DROP or ACCEPT behavior. We ...
*/ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_sunset) { double latitude = 0.0, longitude = 0.0, zenith = 0.0, gmt_offset = 0, altitude; double h_rise, h_set, N; timelib_sll rise, set, transit; long time, retformat = 0; int rs; timelib_time *t; timelib_tzinfo *tzi...
0
[]
php-src
c377f1a715476934133f3254d1e0d4bf3743e2d2
79,597,306,499,964,080,000,000,000,000,000,000,000
82
Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone)
nautilus_file_mark_desktop_file_trusted (GFile *file, GtkWindow *parent_window, gboolean interactive, NautilusOpCallback done_callback, gpointer done_callback_data) { MarkTrustedJob *job; job = op_job_new (MarkTrustedJob, parent_window); job->file = g_object_ref (file); job->interactive = ...
0
[]
nautilus
1e1c916f5537eb5e4144950f291f4a3962fc2395
323,441,703,487,932,570,000,000,000,000,000,000,000
20
Add "interactive" argument to nautilus_file_mark_desktop_file_trusted. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-file-operations.c: * libnautilus-private/nautilus-file-operations.h: * libnautilus-private/nautilus-mime-actions.c: Add "interactive" ...
const BuildVersion* Binary::build_version() const { return command<BuildVersion>(); }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
279,120,087,060,054,400,000,000,000,000,000,000,000
3
Resolve #764
uint32_t Context::registerSharedQueue(absl::string_view queue_name) { // Get the id of the root context if this is a stream context because onQueueReady is on the root. return global_shared_data.registerQueue( wasm_->vm_id(), queue_name, isRootContext() ? id_ : root_context_id_, wasm_->dispatcher_); }
0
[ "CWE-476" ]
envoy
8788a3cf255b647fd14e6b5e2585abaaedb28153
151,967,066,495,314,580,000,000,000,000,000,000,000
5
1.4 - Do not call into the VM unless the VM Context has been created. (#24) * Ensure that the in VM Context is created before onDone is called. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Update as per offline discussion. Signed-off-by: John Plevyak <jplevyak@gmail.com> * Set in_vm_context_created_ in onNet...
MYSQL_RES * STDCALL mysql_store_result(MYSQL *mysql) { MYSQL_RES *result; DBUG_ENTER("mysql_store_result"); if (!mysql->fields) DBUG_RETURN(0); if (mysql->status != MYSQL_STATUS_GET_RESULT) { set_mysql_error(mysql, CR_COMMANDS_OUT_OF_SYNC, unknown_sqlstate); DBUG_RETURN(0); } mysql->status=MY...
0
[ "CWE-254" ]
server
f0d774d48416bb06063184380b684380ca005a41
264,472,494,178,408,550,000,000,000,000,000,000,000
42
MDEV-9212 ssl-validate-cert incorrect hostname check Reimplement ssl_verify_server_cert() using the logic from https://wiki.openssl.org/index.php/Hostname_validation The bug was discovered by Alex Gaynor.
static __u32 twothirdsMD4Transform(__u32 const buf[4], __u32 const in[12]) { __u32 a = buf[0], b = buf[1], c = buf[2], d = buf[3]; /* Round 1 */ ROUND(F, a, b, c, d, in[ 0] + K1, 3); ROUND(F, d, a, b, c, in[ 1] + K1, 7); ROUND(F, c, d, a, b, in[ 2] + K1, 11); ROUND(F, b, c, d, a, in[ 3] + K1, 19); ROUND(F, a,...
1
[ "CWE-703" ]
linux
6e5714eaf77d79ae1c8b47e3e040ff5411b717ec
100,841,690,038,537,670,000,000,000,000,000,000,000
49
net: Compute protocol sequence numbers and fragment IDs using MD5. Computers have become a lot faster since we compromised on the partial MD4 hash which we use currently for performance reasons. MD5 is a much safer choice, and is inline with both RFC1948 and other ISS generators (OpenBSD, Solaris, etc.) Furthermore,...
RGWOpType get_type() override { return RGW_OP_GET_HEALTH_CHECK; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
177,364,115,858,382,200,000,000,000,000,000,000,000
3
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 void vmx_hwapic_isr_update(struct kvm *kvm, int isr) { u16 status; u8 old; if (!vmx_vm_has_apicv(kvm)) return; if (isr == -1) isr = 0; status = vmcs_read16(GUEST_INTR_STATUS); old = status >> 8; if (isr != old) { status &= 0xff; status |= isr << 8; vmcs_write16(GUEST_INTR_STATUS, status); } ...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
272,161,647,636,014,880,000,000,000,000,000,000,000
19
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
std::string Utf16ToUtf8(const std::wstring& utf16_string) { return WC2MB(utf16_string, CP_UTF8); }
1
[ "CWE-22" ]
webcc
55a45fd5039061d5cc62e9f1b9d1f7e97a15143f
105,088,735,995,834,530,000,000,000,000,000,000,000
3
fix static file serving security issue; fix url path encoding issue
cifs_reclassify_socket6(struct socket *sock) { struct sock *sk = sock->sk; BUG_ON(sock_owned_by_user(sk)); sock_lock_init_class_and_name(sk, "slock-AF_INET6-CIFS", &cifs_slock_key[1], "sk_lock-AF_INET6-CIFS", &cifs_key[1]); }
0
[ "CWE-20" ]
linux
70945643722ffeac779d2529a348f99567fa5c33
85,028,675,731,075,490,000,000,000,000,000,000,000
7
cifs: always do is_path_accessible check in cifs_mount Currently, we skip doing the is_path_accessible check in cifs_mount if there is no prefixpath. I have a report of at least one server however that allows a TREE_CONNECT to a share that has a DFS referral at its root. The reporter in this case was using a UNC that ...
ctnetlink_parse_tuple(const struct nlattr * const cda[], struct nf_conntrack_tuple *tuple, u32 type, u_int8_t l3num, struct nf_conntrack_zone *zone) { return ctnetlink_parse_tuple_filter(cda, tuple, type, l3num, zone, CTA_FILTER_FLAG(ALL)); }
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
332,304,284,781,146,260,000,000,000,000,000,000,000
7
netfilter: ctnetlink: add a range check for l3/l4 protonum The indexes to the nf_nat_l[34]protos arrays come from userspace. So check the tuple's family, e.g. l3num, when creating the conntrack in order to prevent an OOB memory access during setup. Here is an example kernel panic on 4.14.180 when userspace passes in ...
bool timerqueue_del(struct timerqueue_head *head, struct timerqueue_node *node) { WARN_ON_ONCE(RB_EMPTY_NODE(&node->node)); rb_erase_cached(&node->node, &head->rb_root); RB_CLEAR_NODE(&node->node); return !RB_EMPTY_ROOT(&head->rb_root.rb_root); }
0
[ "CWE-665" ]
tip
511885d7061eda3eb1faf3f57dcc936ff75863f1
329,473,736,144,029,200,000,000,000,000,000,000,000
9
lib/timerqueue: Rely on rbtree semantics for next timer Simplify the timerqueue code by using cached rbtrees and rely on the tree leftmost node semantics to get the timer with earliest expiration time. This is a drop in conversion, and therefore semantics remain untouched. The runtime overhead of cached rbtrees is be...
long FileIo::read(byte* buf, long rcount) { assert(p_->fp_ != 0); if (p_->switchMode(Impl::opRead) != 0) return 0; return (long)std::fread(buf, 1, rcount, p_->fp_); }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
130,791,272,218,588,860,000,000,000,000,000,000,000
6
Fix https://github.com/Exiv2/exiv2/issues/55
static void v9fs_setattr(void *opaque) { int err = 0; int32_t fid; V9fsFidState *fidp; size_t offset = 7; V9fsIattr v9iattr; V9fsPDU *pdu = opaque; err = pdu_unmarshal(pdu, offset, "dI", &fid, &v9iattr); if (err < 0) { goto out_nofid; } fidp = get_fid(pdu, fid); if ...
0
[ "CWE-399", "CWE-772" ]
qemu
e95c9a493a5a8d6f969e86c9f19f80ffe6587e19
154,336,386,197,713,550,000,000,000,000,000,000,000
83
9pfs: fix potential host memory leak in v9fs_read In 9pfs read dispatch function, it doesn't free two QEMUIOVector object thus causing potential memory leak. This patch avoid this. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Signed-off-by: Greg Kurz <groug@kaod.org>
void cfm_state_change(struct s_smc *smc, int c_state) { #ifdef DRIVERDEBUG char *s; switch (c_state) { case SC0_ISOLATED: s = "SC0_ISOLATED"; break; case SC1_WRAP_A: s = "SC1_WRAP_A"; break; case SC2_WRAP_B: s = "SC2_WRAP_B"; break; case SC4_THRU_A: s = "SC4_THRU_A"; break; case SC5_THRU_B: s ...
0
[ "CWE-264" ]
linux-2.6
c25b9abbc2c2c0da88e180c3933d6e773245815a
217,998,183,624,266,140,000,000,000,000,000,000,000
40
drivers/net/skfp: if !capable(CAP_NET_ADMIN): inverted logic Fix inverted logic Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int decode_attr_change(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *change) { __be32 *p; int ret = 0; *change = 0; if (unlikely(bitmap[0] & (FATTR4_WORD0_CHANGE - 1U))) return -EIO; if (likely(bitmap[0] & FATTR4_WORD0_CHANGE)) { p = xdr_inline_decode(xdr, 8); if (unlikely(!p)) return -EIO; ...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
249,607,048,181,147,470,000,000,000,000,000,000,000
20
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
BigInt power_mod(const BigInt& base, const BigInt& exp, const BigInt& mod) { Power_Mod pow_mod(mod); pow_mod.set_base(base); pow_mod.set_exponent(exp); return pow_mod.execute(); }
0
[ "CWE-200" ]
botan
bcf13fa153a11b3e0ad54e2af6962441cea3adf1
156,652,442,075,075,010,000,000,000,000,000,000,000
7
Fixes for CVE-2015-7827 and CVE-2016-2849
static void adjust_git_path(const struct repository *repo, struct strbuf *buf, int git_dir_len) { const char *base = buf->buf + git_dir_len; if (is_dir_file(base, "info", "grafts")) strbuf_splice(buf, 0, buf->len, repo->graft_file, strlen(repo->graft_file)); else if (!strcmp(base, "index")) strbu...
0
[ "CWE-20" ]
git
7c3745fc6185495d5765628b4dfe1bd2c25a2981
57,727,217,943,222,230,000,000,000,000,000,000,000
17
path: safeguard `.git` against NTFS Alternate Streams Accesses Probably inspired by HFS' resource streams, NTFS supports "Alternate Data Streams": by appending `:<stream-name>` to the file name, information in addition to the file contents can be written and read, information that is copied together with the file (unl...
restore_expand_strings(int save_expand_nmax, uschar **save_expand_nstring, int *save_expand_nlength) { int i; expand_nmax = save_expand_nmax; for (i = 0; i <= expand_nmax; i++) { expand_nstring[i] = save_expand_nstring[i]; expand_nlength[i] = save_expand_nlength[i]; } }
0
[ "CWE-189" ]
exim
7685ce68148a083d7759e78d01aa5198fc099c44
79,736,966,249,710,810,000,000,000,000,000,000,000
11
Only expand integers for integer math once
static void blk_rq_timed_out_timer(struct timer_list *t) { struct request_queue *q = from_timer(q, t, timeout); kblockd_schedule_work(&q->timeout_work); }
0
[ "CWE-416", "CWE-703" ]
linux
54648cf1ec2d7f4b6a71767799c45676a138ca24
52,250,040,334,492,350,000,000,000,000,000,000,000
6
block: blk_init_allocated_queue() set q->fq as NULL in the fail case We find the memory use-after-free issue in __blk_drain_queue() on the kernel 4.14. After read the latest kernel 4.18-rc6 we think it has the same problem. Memory is allocated for q->fq in the blk_init_allocated_queue(). If the elevator init function...
static int FIPS_sha1_test() { unsigned char digest[SHA_DIGEST_LENGTH] = { 0x11, 0xf1, 0x9a, 0x3a, 0xec, 0x1a, 0x1e, 0x8e, 0x65, 0xd4, 0x9a, 0x38, 0x0c, 0x8b, 0x1e, 0x2c, 0xe8, 0xb3, 0xc5, 0x18 }; unsigned char str[] = "etaonrishd"; unsigned char md[SHA_DIGEST_LENGTH]; ERR_clear_error(); ...
0
[]
openssl
200f249b8c3b6439e0200d01caadc24806f1a983
327,843,079,812,752,600,000,000,000,000,000,000,000
14
Remove Dual EC DRBG from FIPS module.
static size_t php_stream_output_read(php_stream *stream, char *buf, size_t count TSRMLS_DC) /* {{{ */ { stream->eof = 1; return 0; }
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
81,403,400,500,677,840,000,000,000,000,000,000,000
5
slim post data
static double mp_list_height(_cimg_math_parser& mp) { const unsigned int ind = (unsigned int)cimg::mod((int)_mp_arg(2),mp.listin.width()); return (double)mp.listin[ind]._height;
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
29,286,067,609,751,450,000,000,000,000,000,000,000
4
Fix other issues in 'CImg<T>::load_bmp()'.
void MACH0_(kv_loadlibs)(struct MACH0_(obj_t) *bin) { int i; char lib_flagname[128]; for (i = 0; i < bin->nlibs; i++) { snprintf (lib_flagname, sizeof (lib_flagname), "libs.%d.name", i); sdb_set (bin->kv, lib_flagname, bin->libs[i], 0); } }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
294,310,878,255,652,570,000,000,000,000,000,000,000
8
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
std::string clGetWrapperString(U function, V param, W param2) { size_t len; function(param, param2, 0, NULL, &len); char * const szString = new char[len]; function(param, param2, len, szString, NULL); std::string r(szString); delete[] szString; return r; }
0
[ "CWE-703" ]
profanity
69ff010c14ff80ec14246772db6a245aa59e6689
295,388,234,911,828,200,000,000,000,000,000,000,000
9
[FIX] pritive key seed .
*/ bool skb_gso_validate_mtu(const struct sk_buff *skb, unsigned int mtu) { return skb_gso_size_check(skb, skb_gso_network_seglen(skb), mtu);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
12,466,885,418,438,932,000,000,000,000,000,000,000
4
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...
static void FVMenuRound2Hundredths(GWindow gw, struct gmenuitem *UNUSED(mi), GEvent *UNUSED(e)) { FVRound2Int( (FontViewBase *) GDrawGetUserData(gw),100.0 ); }
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
219,311,531,120,465,900,000,000,000,000,000,000,000
3
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
GF_Err gitn_box_read(GF_Box *s, GF_BitStream *bs) { u32 i; GF_Err e; GroupIdToNameBox *ptr = (GroupIdToNameBox *)s; ISOM_DECREASE_SIZE(ptr, 2); ptr->nb_entries = gf_bs_read_u16(bs); if (ptr->size / 4 < ptr->nb_entries) return GF_ISOM_INVALID_FILE; GF_SAFE_ALLOC_N(ptr->entries, ptr->nb_entries, GroupIdNameEnt...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
260,770,522,376,671,250,000,000,000,000,000,000,000
23
fixed #2255
TEST_METHOD(12) { // A Generation object returned by getGeneration() doesn't delete the // associated generation directory upon destruction. ServerInstanceDir dir(parentDir + "/passenger-test.1234"); ServerInstanceDir::GenerationPtr generation0 = dir.newGeneration(true, "nobody", nobodyGroup, 0, 0); ServerIn...
0
[ "CWE-59", "CWE-61" ]
passenger
5483b3292cc2af1c83033eaaadec20dba4dcfd9b
12,554,604,898,402,005,000,000,000,000,000,000,000
12
If the server instance directory already exists, it is now removed first in order get correct directory permissions. If the directory still exists after removal, Phusion Passenger aborts to avoid writing to a directory with unexpected permissions. Fixes issue #910.
static int insert_key( sc_pkcs15_card_t *p15card, const char *path, unsigned char id, unsigned char key_reference, int key_length, unsigned char auth_id, const char *label ){ sc_card_t *card=p15card->card; sc_context_t *ctx=p15card->card->ctx; sc_file_t *f; struct sc_pkc...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
68,653,877,243,401,170,000,000,000,000,000,000,000
84
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static uint32_t hashlittle( const void *key, size_t length, uint32_t initval) { uint32_t a,b,c; /* internal state */ union { const void *ptr; size_t i; } u; /* needed for Mac Powerbook G4 */ /* Set up the internal state */ a = b = c = 0xdeadbeef + ((uint32_t)length)...
0
[ "CWE-119", "CWE-310" ]
json-c
64e36901a0614bf64a19bc3396469c66dcd0b015
303,970,357,671,754,550,000,000,000,000,000,000,000
167
Patch to address the following issues: * CVE-2013-6371: hash collision denial of service * CVE-2013-6370: buffer overflow if size_t is larger than int
inline int Http2Session::OnHeaderCallback(nghttp2_session* handle, const nghttp2_frame* frame, nghttp2_rcbuf* name, nghttp2_rcbuf* value, uint8_t flags,...
0
[]
node
ce22d6f9178507c7a41b04ac4097b9ea902049e3
149,907,785,602,071,490,000,000,000,000,000,000,000
21
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>
static void qxl_hw_text_update(void *opaque, console_ch_t *chardata) { PCIQXLDevice *qxl = opaque; VGACommonState *vga = &qxl->vga; if (qxl->mode == QXL_MODE_VGA) { vga->text_update(vga, chardata); return; } }
0
[]
qemu-kvm
5ff4e36c804157bd84af43c139f8cd3a59722db9
281,463,719,926,032,940,000,000,000,000,000,000,000
10
qxl: async io support using new spice api Some of the QXL port i/o commands are waiting for the spice server to complete certain actions. Add async versions for these commands, so we don't block the vcpu while the spice server processses the command. Instead the qxl device will raise an IRQ when done. The async comm...
obj2ast_arguments(PyObject* obj, arguments_ty* out, PyArena* arena) { PyObject* tmp = NULL; asdl_seq* args; arg_ty vararg; asdl_seq* kwonlyargs; asdl_seq* kw_defaults; arg_ty kwarg; asdl_seq* defaults; if (_PyObject_LookupAttrId(obj, &PyId_args, &tmp) < 0) { return 1; } ...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
181,734,258,014,345,260,000,000,000,000,000,000,000
163
bpo-35766: Merge typed_ast back into CPython (GH-11645)
xmlFreeRefTable(xmlRefTablePtr table) { xmlHashFree(table, (xmlHashDeallocator) xmlFreeRefList); }
0
[]
libxml2
932cc9896ab41475d4aa429c27d9afd175959d74
31,970,740,882,417,270,000,000,000,000,000,000,000
3
Fix buffer size checks in xmlSnprintfElementContent xmlSnprintfElementContent failed to correctly check the available buffer space in two locations. Fixes bug 781333 (CVE-2017-9047) and bug 781701 (CVE-2017-9048). Thanks to Marcel Böhme and Thuan Pham for the report.
void Magick::Image::stegano(const Image &watermark_) { MagickCore::Image *newImage; GetPPException; newImage=SteganoImage(constImage(),watermark_.constImage(),exceptionInfo); replaceImage(newImage); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
312,732,015,809,996,220,000,000,000,000,000,000,000
10
Added missing return to avoid use after free.
gst_asf_demux_pop_obj (GstASFDemux * demux) { gchar *s; if ((s = g_strrstr (demux->objpath, "/"))) { *s = '\0'; } else { g_free (demux->objpath); demux->objpath = NULL; } }
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
194,084,022,003,059,350,000,000,000,000,000,000,000
11
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
struct vfsmount *lookup_mnt(const struct path *path) { struct mount *child_mnt; struct vfsmount *m; unsigned seq; rcu_read_lock(); do { seq = read_seqbegin(&mount_lock); child_mnt = __lookup_mnt(path->mnt, path->dentry); m = child_mnt ? &child_mnt->mnt : NULL; } while (!legitimize_mnt(m, seq)); rcu_read_u...
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
221,008,159,346,205,150,000,000,000,000,000,000,000
15
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: ...