func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int check_duplicate_event(ASS_Track *track, int ReadOrder) { if (track->parser_priv->read_order_bitmap) return test_and_set_read_order_bit(track, ReadOrder) > 0; // ignoring last event, it is the one we are comparing with for (int i = 0; i < track->n_events - 1; i++) if (track->events...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
230,140,547,594,417,200,000,000,000,000,000,000,000
10
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
START_TEST(safe_atoi_base_16_test) { struct atoi_test tests[] = { { "10", true, 0x10 }, { "20", true, 0x20 }, { "-1", true, -1 }, { "0x10", true, 0x10 }, { "0xff", true, 0xff }, { "abc", true, 0xabc }, { "-10", true, -0x10 }, { "0x0", true, 0 }, { "0", true, 0 }, { "0x-99", false, 0 }, { "0xak", ...
0
[ "CWE-134" ]
libinput
a423d7d3269dc32a87384f79e29bb5ac021c83d1
142,009,944,613,621,540,000,000,000,000,000,000,000
32
evdev: strip the device name of format directives This fixes a format string vulnerabilty. evdev_log_message() composes a format string consisting of a fixed prefix (including the rendered device name) and the passed-in format buffer. This format string is then passed with the arguments to the actual log handler, whi...
MagickExport void DestroyXWidget(void) { if (selection_info != (XWidgetInfo *) NULL) selection_info=(XWidgetInfo *) RelinquishMagickMemory(selection_info); }
0
[]
ImageMagick6
366c9708a7ca1256ee03d0d4addb2690ed42273f
11,817,256,080,458,936,000,000,000,000,000,000,000
5
https://github.com/ImageMagick/ImageMagick/issues/3333
static void edge_set_termios(struct tty_struct *tty, struct usb_serial_port *port, struct ktermios *old_termios) { struct edgeport_port *edge_port = usb_get_serial_port_data(port); unsigned int cflag; cflag = tty->termios.c_cflag; dev_dbg(&port->dev, "%s - clfag %08x iflag %08x\n", __func__, tty->termios.c_cf...
0
[ "CWE-191" ]
linux
654b404f2a222f918af9b0cd18ad469d0c941a8e
296,366,840,549,518,230,000,000,000,000,000,000,000
18
USB: serial: io_ti: fix information leak in completion handler Add missing sanity check to the bulk-in completion handler to avoid an integer underflow that can be triggered by a malicious device. This avoids leaking 128 kB of memory content from after the URB transfer buffer to user space. Fixes: 8c209e6782ca ("USB...
MagickExport MagickBooleanType GetImageQuantizeError(Image *image, ExceptionInfo *exception) { CacheView *image_view; double alpha, area, beta, distance, maximum_error, mean_error, mean_error_per_pixel; size_t index; ssize_t y; assert(image != (Image *) NULL); a...
0
[ "CWE-703", "CWE-772" ]
ImageMagick
0417cea1b6d72f90bd4f1f573f91e42a8ba66a89
327,693,157,915,246,200,000,000,000,000,000,000,000
83
https://github.com/ImageMagick/ImageMagick/issues/574
megasas_fw_crash_state_store(struct device *cdev, struct device_attribute *attr, const char *buf, size_t count) { struct Scsi_Host *shost = class_to_shost(cdev); struct megasas_instance *instance = (struct megasas_instance *) shost->hostdata; int val = 0; unsigned long flags; if (kstrtoint(buf, 0, &val) != 0) ...
0
[ "CWE-476" ]
linux
bcf3b67d16a4c8ffae0aa79de5853435e683945c
192,552,460,219,440,830,000,000,000,000,000,000,000
33
scsi: megaraid_sas: return error when create DMA pool failed when create DMA pool for cmd frames failed, we should return -ENOMEM, instead of 0. In some case in: megasas_init_adapter_fusion() -->megasas_alloc_cmds() -->megasas_create_frame_pool create DMA pool failed, --> megasas_fre...
all_zeroes(char *s) { if (*s == '\0' || *s == '\n') return 0; while (*s == '0') s++; return *s == '\0' || *s == '\n'; }
0
[ "CWE-119", "CWE-787" ]
t1utils
6b9d1aafcb61a3663c883663eb19ccdbfcde8d33
84,501,156,882,685,970,000,000,000,000,000,000,000
8
Security fixes. - Don't overflow the small cs_start buffer (reported by Niels Thykier via the debian tracker (Jakub Wilk), found with a fuzzer ("American fuzzy lop")). - Cast arguments to <ctype.h> functions to unsigned char.
psutil_proc_wait(PyObject *self, PyObject *args) { HANDLE hProcess; DWORD ExitCode; DWORD retVal; long pid; long timeout; if (! PyArg_ParseTuple(args, "ll", &pid, &timeout)) return NULL; if (pid == 0) return AccessDenied(""); hProcess = OpenProcess(SYNCHRONIZE | PROCESS...
0
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
38,102,692,244,041,407,000,000,000,000,000,000,000
66
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
Status AuthorizationManagerImpl::getRoleDescription(OperationContext* opCtx, const RoleName& roleName, PrivilegeFormat privileges, AuthenticationRestrictionsFormat ...
0
[ "CWE-613" ]
mongo
6dfb92b1299de04677d0bd2230e89a52eb01003c
62,224,807,574,988,230,000,000,000,000,000,000,000
7
SERVER-38984 Validate unique User ID on UserCache hit (cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7)
down_read_failed(struct ld_semaphore *sem, long count, long timeout) { struct ldsem_waiter waiter; struct task_struct *tsk = current; long adjust = -LDSEM_ACTIVE_BIAS + LDSEM_WAIT_BIAS; /* set up my own style of waitqueue */ raw_spin_lock_irq(&sem->wait_lock); /* Try to reverse the lock attempt but if the count...
0
[ "CWE-362" ]
linux
cf872776fc84128bb779ce2b83a37c884c3203ae
96,877,302,744,957,320,000,000,000,000,000,000,000
63
tty: Fix hang at ldsem_down_read() When a controlling tty is being hung up and the hang up is waiting for a just-signalled tty reader or writer to exit, and a new tty reader/writer tries to acquire an ldisc reference concurrently with the ldisc reference release from the signalled reader/writer, the hangup can hang. T...
xfs_attr3_leaf_hdr_from_disk( struct xfs_attr3_icleaf_hdr *to, struct xfs_attr_leafblock *from) { int i; ASSERT(from->hdr.info.magic == cpu_to_be16(XFS_ATTR_LEAF_MAGIC) || from->hdr.info.magic == cpu_to_be16(XFS_ATTR3_LEAF_MAGIC)); if (from->hdr.info.magic == cpu_to_be16(XFS_ATTR3_LEAF_MAGIC)) { struct...
0
[ "CWE-241", "CWE-19" ]
linux
8275cdd0e7ac550dcce2b3ef6d2fb3b808c1ae59
76,511,370,656,946,280,000,000,000,000,000,000,000
39
xfs: remote attribute overwrite causes transaction overrun Commit e461fcb ("xfs: remote attribute lookups require the value length") passes the remote attribute length in the xfs_da_args structure on lookup so that CRC calculations and validity checking can be performed correctly by related code. This, unfortunately h...
static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int fmt) { int stacksize = r_config_get_i (core->config, "esil.stack.depth"); bool iotrap = r_config_get_i (core->config, "esil.iotrap"); bool romem = r_config_get_i (core->config, "esil.romem"); bool stats = r_config_get_i (core->config, "...
0
[ "CWE-125", "CWE-787" ]
radare2
a1bc65c3db593530775823d6d7506a457ed95267
176,696,117,474,731,860,000,000,000,000,000,000,000
335
Fix #12375 - Crash in bd+ao (#12382)
static void nl80211_post_doit(struct genl_ops *ops, struct sk_buff *skb, struct genl_info *info) { if (info->user_ptr[0]) cfg80211_unlock_rdev(info->user_ptr[0]); if (info->user_ptr[1]) dev_put(info->user_ptr[1]); if (ops->internal_flags & NL80211_FLAG_NEED_RTNL) rtnl_unlock();
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
49,118,893,395,426,070,000,000,000,000,000,000,000
10
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
static int php_openssl_validate_iv(char **piv, size_t *piv_len, size_t iv_required_len, zend_bool *free_iv, EVP_CIPHER_CTX *cipher_ctx, struct php_openssl_cipher_mode *mode) /* {{{ */ { char *iv_new; /* Best case scenario, user behaved */ if (*piv_len == iv_required_len) { return SUCCESS; } if (mode->is_aead...
1
[ "CWE-326" ]
php-src
0216630ea2815a5789a24279a1211ac398d4de79
232,840,072,465,422,830,000,000,000,000,000,000,000
50
Fix bug #79601 (Wrong ciphertext/tag in AES-CCM encryption for a 12 bytes IV)
void SoundTouch::setTempoChange(double newTempo) { virtualTempo = 1.0 + 0.01 * newTempo; calcEffectiveRateAndTempo(); }
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
277,262,869,811,192,100,000,000,000,000,000,000,000
5
Replaced illegal-number-of-channel assertions with run-time exception
static void salsa20_ivsetup(struct salsa20_ctx *ctx, const u8 *iv) { ctx->input[6] = U8TO32_LITTLE(iv + 0); ctx->input[7] = U8TO32_LITTLE(iv + 4); ctx->input[8] = 0; ctx->input[9] = 0; }
0
[ "CWE-20", "CWE-200" ]
linux
ecaaab5649781c5a0effdaf298a925063020500e
147,486,994,793,431,130,000,000,000,000,000,000,000
7
crypto: salsa20 - fix blkcipher_walk API usage When asked to encrypt or decrypt 0 bytes, both the generic and x86 implementations of Salsa20 crash in blkcipher_walk_done(), either when doing 'kfree(walk->buffer)' or 'free_page((unsigned long)walk->page)', because walk->buffer and walk->page have not been initialized. ...
uint16_t smbXcli_conn_max_requests(struct smbXcli_conn *conn) { if (conn->protocol >= PROTOCOL_SMB2_02) { /* * TODO... */ return 1; } return conn->smb1.server.max_mux; }
0
[ "CWE-20" ]
samba
a819d2b440aafa3138d95ff6e8b824da885a70e9
284,825,804,920,815,060,000,000,000,000,000,000,000
11
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 StreamTcp4WHSTest02 (void) { int ret = 0; Packet *p = SCMalloc(SIZE_OF_PACKET); if (unlikely(p == NULL)) return 0; Flow f; ThreadVars tv; StreamTcpThread stt; TCPHdr tcph; memset(p, 0, SIZE_OF_PACKET); PacketQueue pq; memset(&pq,0,sizeof(PacketQueue)); mems...
0
[]
suricata
843d0b7a10bb45627f94764a6c5d468a24143345
148,030,577,196,943,440,000,000,000,000,000,000,000
62
stream: support RST getting lost/ignored In case of a valid RST on a SYN, the state is switched to 'TCP_CLOSED'. However, the target of the RST may not have received it, or may not have accepted it. Also, the RST may have been injected, so the supposed sender may not actually be aware of the RST that was sent in it's ...
virDomainMigrateUnmanagedProto3(virDomainPtr domain, const char *dconnuri, virTypedParameterPtr params, int nparams, unsigned int flags) { const char *compatParams[] = { VIR_MIGRATE_PARAM_...
0
[ "CWE-254" ]
libvirt
506e9d6c2d4baaf580d489fff0690c0ff2ff588f
118,223,769,457,047,420,000,000,000,000,000,000,000
38
virDomainGetTime: Deny on RO connections We have a policy that if API may end up talking to a guest agent it should require RW connection. We don't obey the rule in virDomainGetTime(). Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
static void enable_profile_very_weak(gnutls_priority_t c) { c->additional_verify_flags &= 0x00ffffff; c->additional_verify_flags |= GNUTLS_PROFILE_TO_VFLAGS(GNUTLS_PROFILE_VERY_WEAK); c->level = GNUTLS_SEC_PARAM_VERY_WEAK; }
0
[ "CWE-310" ]
gnutls
21f89efad7014a5ee0debd4cd3d59e27774b29e6
68,231,229,977,718,560,000,000,000,000,000,000,000
6
handshake: add FALLBACK_SCSV priority option This allows clients to enable the TLS_FALLBACK_SCSV mechanism during the handshake, as defined in RFC7507.
PngImage::PngImage(BasicIo::UniquePtr io, bool create) : Image(ImageType::png, mdExif | mdIptc | mdXmp | mdComment, std::move(io)) { if (create) { if (io_->open() == 0) { #ifdef DEBUG std::cerr << "Exiv2::PngImage:: Creating PNG image to memory\n"; #endif ...
0
[ "CWE-190" ]
exiv2
491c3ebe3b3faa6d8f75fb28146186792c2439da
302,443,653,501,263,700,000,000,000,000,000,000,000
17
Avoid negative integer overflow when `iccOffset > chunkLength`. This fixes #790. (cherry picked from commit 6fa2e31206127bd8bcac0269311f3775a8d6ea21)
xdr_krb5_ui_2(XDR *xdrs, krb5_ui_2 *objp) { unsigned int tmp; tmp = (unsigned int) *objp; if (!xdr_u_int(xdrs, &tmp)) return(FALSE); *objp = (krb5_ui_2) tmp; return(TRUE); }
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
66,428,909,895,427,070,000,000,000,000,000,000,000
13
Fix kadm5/gssrpc XDR double free [CVE-2014-9421] [MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free partial deserialization results upon failure to deserialize. This responsibility belongs to the callers, svctcp_getargs() and svcudp_getargs(); doing it in the unwrap function results in freeing the result...
static void json_append_escaped_char(string_t *dest, unsigned char src) { switch (src) { case '\b': str_append(dest, "\\b"); break; case '\f': str_append(dest, "\\f"); break; case '\n': str_append(dest, "\\n"); break; case '\r': str_append(dest, "\\r"); break; case '\t': str_append(dest, "\\t");...
0
[]
core
973769d74433de3c56c4ffdf4f343cb35d98e4f7
45,023,954,963,495,270,000,000,000,000,000,000,000
32
lib: json - Escape invalid UTF-8 as unicode bytes This prevents dovecot from crashing if invalid UTF-8 input is given.
typval_compare_blob( typval_T *tv1, typval_T *tv2, exprtype_T type, int *res) { int val = 0; if (type == EXPR_IS || type == EXPR_ISNOT) { val = (tv1->v_type == tv2->v_type && tv1->vval.v_blob == tv2->vval.v_blob); if (type == EXPR_ISNOT) val = !val; } else if (tv1->v_ty...
0
[ "CWE-125", "CWE-122" ]
vim
1e56bda9048a9625bce6e660938c834c5c15b07d
141,824,889,610,868,460,000,000,000,000,000,000,000
33
patch 9.0.0104: going beyond allocated memory when evaluating string constant Problem: Going beyond allocated memory when evaluating string constant. Solution: Properly skip over <Key> form.
xmlSchemaVStart(xmlSchemaValidCtxtPtr vctxt) { int ret = 0; if (xmlSchemaPreRun(vctxt) < 0) return(-1); if (vctxt->doc != NULL) { /* * Tree validation. */ ret = xmlSchemaVDocWalk(vctxt); #ifdef LIBXML_READER_ENABLED } else if (vctxt->reader != NULL) { /* * XML Reader validation. */ ...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
9,306,397,687,573,571,000,000,000,000,000,000,000
37
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
TABLE_LIST *st_select_lex_node::add_table_to_list(THD *thd, Table_ident *table, LEX_STRING *alias, ulong table_join_options, thr_lock_type flags, enum_mdl_type mdl_type, List<Index_hint> *hints, ...
0
[ "CWE-476" ]
server
3a52569499e2f0c4d1f25db1e81617a9d9755400
6,242,823,215,540,250,000,000,000,000,000,000,000
11
MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294 The asserion failure was caused by this query select /*id=1*/ from t1 where col= ( select /*id=2*/ from ... where corr_cond1 union select /*id=4*/ from ... where corr_cond2) Here, - select with id=2 was correlated due to corr_cond1....
__must_hold(&journal->j_state_lock) { transaction_t *t = journal->j_running_transaction; int needed; int total = blocks + rsv_blocks; /* * If the current transaction is locked down for commit, wait * for the lock to be released. */ if (t->t_state != T_RUNNING) { WARN_ON_ONCE(t->t_state >= T_FLUSH); wait...
0
[ "CWE-416" ]
linux
cc16eecae687912238ee6efbff71ad31e2bc414e
252,498,763,001,031,160,000,000,000,000,000,000,000
94
jbd2: fix use-after-free of transaction_t race jbd2_journal_wait_updates() is called with j_state_lock held. But if there is a commit in progress, then this transaction might get committed and freed via jbd2_journal_commit_transaction() -> jbd2_journal_free_transaction(), when we release j_state_lock. So check for jou...
test_AddUntrustedKey(void) { const keyid_t KEYNO = 3; AddUntrustedKey(KEYNO); TEST_ASSERT_FALSE(authistrusted(KEYNO)); return; }
0
[ "CWE-287" ]
ntp
71a962710bfe066f76da9679cf4cfdeffe34e95e
152,343,634,440,263,010,000,000,000,000,000,000,000
10
[Sec 2936] Skeleton Key: Any trusted key system can serve time. HStenn.
void addrconf_dad_failure(struct inet6_ifaddr *ifp) { struct inet6_dev *idev = ifp->idev; if (addrconf_dad_end(ifp)) { in6_ifa_put(ifp); return; } net_info_ratelimited("%s: IPv6 duplicate address %pI6c detected!\n", ifp->idev->dev->name, &ifp->addr); if (idev->cnf.accept_dad > 1 && !idev->cnf.disabl...
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
60,548,590,610,808,360,000,000,000,000,000,000,000
30
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
bool Cluster::AddFrame(const Frame* const frame) { return QueueOrWriteFrame(frame); }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
142,009,000,420,334,300,000,000,000,000,000,000,000
3
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
ZEND_VM_HELPER(zend_shift_left_helper, ANY, ANY, zval *op_1, zval *op_2) { USE_OPLINE SAVE_OPLINE(); if (UNEXPECTED(Z_TYPE_INFO_P(op_1) == IS_UNDEF)) { op_1 = ZVAL_UNDEFINED_OP1(); } if (UNEXPECTED(Z_TYPE_INFO_P(op_2) == IS_UNDEF)) { op_2 = ZVAL_UNDEFINED_OP2(); } shift_left_function(EX_VAR(opline->result.v...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
253,133,038,078,660,550,000,000,000,000,000,000,000
20
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static void *reiserfs_posix_acl_to_disk(const struct posix_acl *acl, size_t * size) { reiserfs_acl_header *ext_acl; char *e; int n; *size = reiserfs_acl_size(acl->a_count); ext_acl = kmalloc(sizeof(reiserfs_acl_header) + acl->a_count * sizeof(reiserfs_acl_entry), GFP_NOFS); if (!ext_acl) ...
0
[ "CWE-862", "CWE-285" ]
linux
073931017b49d9458aa351605b43a7e34598caef
77,130,711,653,169,100,000,000,000,000,000,000,000
49
posix_acl: Clear SGID bit when setting file permissions When file permissions are modified via chmod(2) and the user is not in the owning group or capable of CAP_FSETID, the setgid bit is cleared in inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file permissions as well as the new ACL, but doesn't cl...
void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_str, struct ndpi_flow_struct *flow, u_int16_t upper_detected_protocol, u_int16_t lower_detected_protocol) { if((upper_detected_protocol == NDPI_PROTOCOL_UNKNOWN) && (lower_detected_protocol != NDPI_PROTOCOL_UNKNOWN))...
0
[ "CWE-416", "CWE-787" ]
nDPI
6a9f5e4f7c3fd5ddab3e6727b071904d76773952
111,117,943,368,113,200,000,000,000,000,000,000,000
21
Fixed use after free caused by dangling pointer * This fix also improved RCE Injection detection Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
static bool gfs2_unaligned_extlen(struct gfs2_rbm *rbm, u32 n_unaligned, u32 *len) { u32 n; u8 res; for (n = 0; n < n_unaligned; n++) { res = gfs2_testbit(rbm); if (res != GFS2_BLKST_FREE) return true; (*len)--; if (*len == 0) return true; if (gfs2_rbm_incr(rbm)) return true; } return false; }
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
31,082,265,899,226,304,000,000,000,000,000,000,000
18
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
mono_get_method (MonoImage *image, guint32 token, MonoClass *klass) { return mono_get_method_full (image, token, klass, NULL); }
0
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
276,445,902,613,723,040,000,000,000,000,000,000,000
4
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
static const struct sys_reg_desc *get_target_table(unsigned target, bool mode_is_64, size_t *num) { struct kvm_sys_reg_target_table *table; table = target_tables[target]; if (mode_is_64) { *num = table->table64.num; return table->table64.table; } else { *num = table->table32.num; return t...
0
[ "CWE-20", "CWE-617" ]
linux
9e3f7a29694049edd728e2400ab57ad7553e5aa9
16,230,102,484,079,470,000,000,000,000,000,000,000
15
arm64: KVM: pmu: Fix AArch32 cycle counter access We're missing the handling code for the cycle counter accessed from a 32bit guest, leading to unexpected results. Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
R_API bool r_crbtree_insert(RRBTree *tree, void *data, RRBComparator cmp, void *user) { r_return_val_if_fail (tree && data && cmp, false); bool inserted = false; if (!tree->root) { tree->root = _node_new (data, NULL); if (!tree->root) { return false; } inserted = true; goto out_exit; } RRBNode head;...
0
[ "CWE-416" ]
radare2
b5cb90b28ec71fda3504da04e3cc94a362807f5e
183,262,241,688,188,330,000,000,000,000,000,000,000
82
Prefer memleak over usaf in io.bank's rbtree bug ##crash * That's a workaround, proper fix will come later * Reproducer: bins/fuzzed/iobank-crash * Reported by Akyne Choi via huntr.dev
static double y2scr_top(ASS_Renderer *render_priv, double y) { if (render_priv->state.explicit) return y2scr_pos(render_priv, y); if (render_priv->settings.use_margins) return y * render_priv->orig_height_nocrop / render_priv->track->PlayResY; else return y * render_priv-...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
104,652,813,472,757,330,000,000,000,000,000,000,000
12
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
static int esp_init_aead(struct xfrm_state *x) { char aead_name[CRYPTO_MAX_ALG_NAME]; struct crypto_aead *aead; int err; err = -ENAMETOOLONG; if (snprintf(aead_name, CRYPTO_MAX_ALG_NAME, "%s(%s)", x->geniv, x->aead->alg_name) >= CRYPTO_MAX_ALG_NAME) goto error; aead = crypto_alloc_aead(aead_name, 0, 0)...
0
[ "CWE-787" ]
linux
ebe48d368e97d007bfeb76fcb065d6cfc4c96645
339,598,751,765,014,540,000,000,000,000,000,000,000
30
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...
static void *wolfssl_get_internals(struct ssl_connect_data *connssl, CURLINFO info UNUSED_PARAM) { struct ssl_backend_data *backend = connssl->backend; (void)info; return backend->handle; }
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
302,629,704,937,344,470,000,000,000,000,000,000,000
7
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static bool tcp_ecn_rcv_ecn_echo(const struct tcp_sock *tp, const struct tcphdr *th) { if (th->ece && !th->syn && (tp->ecn_flags & TCP_ECN_OK)) return true; return false; }
0
[ "CWE-703", "CWE-189" ]
linux
8b8a321ff72c785ed5e8b4cf6eda20b35d427390
240,297,726,249,776,940,000,000,000,000,000,000,000
6
tcp: fix zero cwnd in tcp_cwnd_reduction Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode conditionally") introduced a bug that cwnd may become 0 when both inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead to a div-by-zero if the connection starts another cwnd reduction phase by set...
xfs_init_workqueues(void) { /* * The allocation workqueue can be used in memory reclaim situations * (writepage path), and parallelism is only limited by the number of * AGs in all the filesystems mounted. Hence use the default large * max_active value for this workqueue. */ xfs_alloc_wq = alloc_workqueue("...
0
[ "CWE-416" ]
linux
c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82
241,763,623,902,516,430,000,000,000,000,000,000,000
22
xfs: clear sb->s_fs_info on mount failure We recently had an oops reported on a 4.14 kernel in xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage and so the m_perag_tree lookup walked into lala land. Essentially, the machine was under memory pressure when the mount was being run, xfs_fs_fill_super() fa...
stbi_inline static stbi_uc stbi__get8(stbi__context *s) { if (s->img_buffer < s->img_buffer_end) return *s->img_buffer++; if (s->read_from_callbacks) { stbi__refill_buffer(s); return *s->img_buffer++; } return 0; }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
11,913,349,387,461,986,000,000,000,000,000,000,000
10
stb_image: Reject fractional JPEG component subsampling ratios The component resamplers are not written to support this and I've never seen it happen in a real (non-crafted) JPEG file so I'm fine rejecting this as outright corrupt. Fixes issue #1178.
static void drop_links(struct nameidata *nd) { int i = nd->depth; while (i--) { struct saved *last = nd->stack + i; do_delayed_call(&last->done); clear_delayed_call(&last->done); } }
0
[ "CWE-284" ]
linux
9409e22acdfc9153f88d9b1ed2bd2a5b34d2d3ca
269,903,124,713,115,340,000,000,000,000,000,000,000
9
vfs: rename: check backing inode being equal If a file is renamed to a hardlink of itself POSIX specifies that rename(2) should do nothing and return success. This condition is checked in vfs_rename(). However it won't detect hard links on overlayfs where these are given separate inodes on the overlayfs layer. Over...
ex_oldfiles(exarg_T *eap UNUSED) { list_T *l = get_vim_var_list(VV_OLDFILES); listitem_T *li; int nr = 0; char_u *fname; if (l == NULL) msg(_("No old files")); else { msg_start(); msg_scroll = TRUE; for (li = l->lv_first; li != NULL && !got_int; li = li->li_next) { ++nr; fna...
0
[ "CWE-416" ]
vim
37f47958b8a2a44abc60614271d9537e7f14e51a
6,962,132,867,863,923,000,000,000,000,000,000,000
57
patch 8.2.4253: using freed memory when substitute with function call Problem: Using freed memory when substitute uses a recursive function call. Solution: Make a copy of the substitute text.
void dictSdsDestructor(void *privdata, void *val) { DICT_NOTUSED(privdata); sdsfree(val); }
0
[ "CWE-20" ]
redis
697af434fbeb2e3ba2ba9687cd283ed1a2734fa5
145,464,767,424,132,400,000,000,000,000,000,000,000
6
initial changes needed to turn the current VM code into a cache system. Tons of work to do still.
rpc_C_FindObjects (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_SESSION_HANDLE session; CK_OBJECT_HANDLE_PTR objects; CK_ULONG max_object_count; CK_ULONG object_count; BEGIN_CALL (FindObjects); IN_ULONG (session); IN_ULONG_BUFFER (objects, max_object_count); PROCESS_CALL ((self, s...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
303,297,241,489,193,700,000,000,000,000,000,000,000
15
Check for arithmetic overflows before allocating
int recreate_table(MI_CHECK *param, MI_INFO **org_info, char *filename) { int error; MI_INFO info; MYISAM_SHARE share; MI_KEYDEF *keyinfo,*key,*key_end; HA_KEYSEG *keysegs,*keyseg; MI_COLUMNDEF *recdef,*rec,*end; MI_UNIQUEDEF *uniquedef,*u_ptr,*u_end; MI_STATUS_INFO status_info; uint unpack,key_parts;...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
259,102,728,378,676,730,000,000,000,000,000,000,000
169
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...
Header::find (const char name[]) { return _map.find (name); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
125,831,594,545,478,940,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
static int preg_do_repl_func(zval *function, char *subject, int *offsets, char **subpat_names, int count, char **result TSRMLS_DC) { zval *retval_ptr; /* Function return value */ zval **args[1]; /* Argument to pass to function */ zval *subpats; /* Captured subpatterns */ int result_len; /* Return val...
1
[]
php-src
03964892c054d0c736414c10b3edc7a40318b975
161,110,007,195,546,620,000,000,000,000,000,000,000
35
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
rb_str_shared_replace(VALUE str, VALUE str2) { rb_encoding *enc; int cr; if (str == str2) return; enc = STR_ENC_GET(str2); cr = ENC_CODERANGE(str2); str_discard(str); OBJ_INFECT(str, str2); if (RSTRING_LEN(str2) <= RSTRING_EMBED_LEN_MAX) { STR_SET_EMBED(str); memcpy(RSTRING_PTR(str), R...
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
193,921,002,390,119,830,000,000,000,000,000,000,000
34
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void cwd_globals_ctor(virtual_cwd_globals *cwd_g TSRMLS_DC) /* {{{ */ { CWD_STATE_COPY(&cwd_g->cwd, &main_cwd_state); cwd_g->realpath_cache_size = 0; cwd_g->realpath_cache_size_limit = REALPATH_CACHE_SIZE; cwd_g->realpath_cache_ttl = REALPATH_CACHE_TTL; memset(cwd_g->realpath_cache, 0, sizeof(cwd_g->realpat...
0
[ "CWE-190" ]
php-src
0218acb7e756a469099c4ccfb22bce6c2bd1ef87
94,869,477,363,348,930,000,000,000,000,000,000,000
8
Fix for bug #72513
TEST_F(RenameCollectionTest, RenameCollectionReturnsNamespaceNotFoundIfDatabaseDoesNotExist) { ASSERT_FALSE(AutoGetDb(_opCtx.get(), _sourceNss.db(), MODE_X).getDb()); ASSERT_EQUALS(ErrorCodes::NamespaceNotFound, renameCollection(_opCtx.get(), _sourceNss, _targetNss, {})); }
0
[ "CWE-20" ]
mongo
35c1b1f588f04926a958ad2fe4d9c59d79f81e8b
274,344,461,070,048,230,000,000,000,000,000,000,000
5
SERVER-35636 renameCollectionForApplyOps checks for complete namespace
static enum test_return test_binary_set_impl(const char *key, uint8_t cmd) { union { protocol_binary_request_no_extras request; protocol_binary_response_no_extras response; char bytes[1024]; } send, receive; uint64_t value = 0xdeadbeefdeadcafe; size_t len = storage_command(send.b...
0
[ "CWE-20" ]
memcached
75cc83685e103bc8ba380a57468c8f04413033f9
89,629,799,761,767,570,000,000,000,000,000,000,000
39
Issue 102: Piping null to the server will crash it
static int cma_resolve_ib_udp(struct rdma_id_private *id_priv, struct rdma_conn_param *conn_param) { struct ib_cm_sidr_req_param req; struct ib_cm_id *id; void *private_data; u8 offset; int ret; memset(&req, 0, sizeof req); offset = cma_user_data_offset(id_priv); req.private_data_len = offset + conn_p...
0
[ "CWE-416" ]
linux
bc0bdc5afaa740d782fbf936aaeebd65e5c2921d
196,020,391,406,819,900,000,000,000,000,000,000,000
58
RDMA/cma: Do not change route.addr.src_addr.ss_family If the state is not idle then rdma_bind_addr() will immediately fail and no change to global state should happen. For instance if the state is already RDMA_CM_LISTEN then this will corrupt the src_addr and would cause the test in cma_cancel_operation(): if (cma...
static int overlap(Segment *s1, Segment *s2) { if (s1->a >= s2->b || s2->a >= s1->b || s1->ha >= s2->hb || s2->ha >= s1->hb) return 0; return 1; }
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
72,600,673,602,377,500,000,000,000,000,000,000,000
7
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) { unsigned long prev_energy = ULONG_MAX, best_energy = ULONG_MAX; struct root_domain *rd = cpu_rq(smp_processor_id())->rd; int cpu, best_energy_cpu = prev_cpu; struct perf_domain *head, *pd; unsigned long cpu_cap, util; struct sched_domain ...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
249,399,585,746,927,920,000,000,000,000,000,000,000
90
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...
xcf_find_layer_offset_table (XcfInfo *info, glong offset) { guint8 c = 0; guint8 buf[4] = { 0, }; guint layer_offset; gint i; xcf_seek_pos (info, offset, NULL); /* read all NULL-bytes; return if no byte was read */ while (c == 0) { if (xcf_read_int8 (info->fp, ...
0
[ "CWE-416" ]
gimp
e82aaa4b4ee0703c879e35ea9321fff6be3e9b6f
183,793,121,115,356,360,000,000,000,000,000,000,000
44
Bug 767873 - (CVE-2016-4994) Multiple Use-After-Free when parsing... ...XCF channel and layer properties The properties PROP_ACTIVE_LAYER, PROP_FLOATING_SELECTION, PROP_ACTIVE_CHANNEL saves the current object pointer the @info structure. Others like PROP_SELECTION (for channel) and PROP_GROUP_ITEM (for layer) will de...
TEST_P(Http2FloodMitigationTest, EmptyHeaders) { config_helper_.addConfigModifier( [&](envoy::config::filter::network::http_connection_manager::v2::HttpConnectionManager& hcm) -> void { hcm.mutable_http2_protocol_options() ->mutable_max_consecutive_inbound_frames_with_empty_payload...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
46,750,012,256,766,130,000,000,000,000,000,000,000
20
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...
//! Save image as an INRIMAGE-4 file \overloading. const CImg<T>& save_inr(std::FILE *const file, const float *const voxel_size=0) const { return _save_inr(file,0,voxel_size);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
62,992,398,369,992,440,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
TEST(ParseExpression, ShouldRejectUnknownExpression) { ASSERT_THROWS(parseExpression(BSON("$invalid" << 1)), AssertionException); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
158,138,271,204,343,180,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
find_extra(char_u **pp) { char_u *str = *pp; char_u first_char = **pp; // Repeat for addresses separated with ';' for (;;) { if (VIM_ISDIGIT(*str)) str = skipdigits(str + 1); else if (*str == '/' || *str == '?') { str = skip_regexp(str + 1, *str, FALSE); if (*str != first_char) ...
0
[ "CWE-416" ]
vim
adce965162dd89bf29ee0e5baf53652e7515762c
261,599,501,319,056,700,000,000,000,000,000,000,000
43
patch 9.0.0246: using freed memory when 'tagfunc' deletes the buffer Problem: Using freed memory when 'tagfunc' deletes the buffer. Solution: Make a copy of the tag name.
ZEND_VM_HANDLER(184, ZEND_FETCH_THIS, UNUSED, UNUSED) { USE_OPLINE if (EXPECTED(Z_TYPE(EX(This)) == IS_OBJECT)) { zval *result = EX_VAR(opline->result.var); ZVAL_OBJ(result, Z_OBJ(EX(This))); Z_ADDREF_P(result); ZEND_VM_NEXT_OPCODE(); } else { ZEND_VM_DISPATCH_TO_HELPER(zend_this_not_in_object_context_he...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
255,297,580,833,830,100,000,000,000,000,000,000,000
14
Fix #73122: Integer Overflow when concatenating strings We must avoid integer overflows in memory allocations, so we introduce an additional check in the VM, and bail out in the rare case of an overflow. Since the recent fix for bug #74960 still doesn't catch all possible overflows, we fix that right away.
static bool kvm_sync_page(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp, struct list_head *invalid_list) { int ret = vcpu->arch.mmu->sync_page(vcpu, sp); if (ret < 0) { kvm_mmu_prepare_zap_page(vcpu->kvm, sp, invalid_list); return false; } return !!ret; }
0
[ "CWE-476" ]
linux
9f46c187e2e680ecd9de7983e4d081c3391acc76
100,211,869,331,907,090,000,000,000,000,000,000,000
12
KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID With shadow paging enabled, the INVPCID instruction results in a call to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the invlpg callback is not set and the result is a NULL pointer dereference. Fix it trivially by checking for mmu->invlpg befo...
ins_compl_dict_alloc(compl_T *match) { dict_T *dict = dict_alloc_lock(VAR_FIXED); if (dict == NULL) return NULL; dict_add_string(dict, "word", match->cp_str); dict_add_string(dict, "abbr", match->cp_text[CPT_ABBR]); dict_add_string(dict, "menu", match->cp_text[CPT_MENU]); dict_add_string(dict...
0
[ "CWE-125" ]
vim
f12129f1714f7d2301935bb21d896609bdac221c
143,749,998,175,476,860,000,000,000,000,000,000,000
19
patch 9.0.0020: with some completion reading past end of string Problem: With some completion reading past end of string. Solution: Check the length of the string.
int ndo_dflt_fdb_dump(struct sk_buff *skb, struct netlink_callback *cb, struct net_device *dev, int idx) { int err; netif_addr_lock_bh(dev); err = nlmsg_populate_fdb(skb, cb, dev, &idx, &dev->uc); if (err) goto out; nlmsg_populate_fdb(skb, cb, dev, &idx, &dev->mc); out: netif_addr_unloc...
0
[ "CWE-399" ]
linux-2.6
84d73cd3fb142bf1298a8c13fd4ca50fd2432372
58,115,113,214,127,130,000,000,000,000,000,000,000
16
rtnl: fix info leak on RTM_GETLINK request for VF devices Initialize the mac address buffer with 0 as the driver specific function will probably not fill the whole buffer. In fact, all in-kernel drivers fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible bytes. Therefore we currently leak 26 bytes ...
spell_read_wordfile(spellinfo_T *spin, char_u *fname) { FILE *fd; long lnum = 0; char_u rline[MAXLINELEN]; char_u *line; char_u *pc = NULL; char_u *p; int l; int retval = OK; int did_word = FALSE; int non_ascii = 0; int flags; int regionmask; /* * Open the...
0
[ "CWE-787" ]
vim
7c824682d2028432ee082703ef0ab399867a089b
180,663,225,129,636,860,000,000,000,000,000,000,000
193
patch 8.2.4919: can add invalid bytes with :spellgood Problem: Can add invalid bytes with :spellgood. Solution: Check for a valid word string.
void Magick::Image::transformRotation(const double angle_) { modifyImage(); options()->transformRotation(angle_); }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
260,951,537,486,555,840,000,000,000,000,000,000,000
5
Added missing return to avoid use after free.
static RList *relocs(RBinFile *arch) { struct r_bin_bflt_obj *obj = (struct r_bin_bflt_obj*)arch->o->bin_obj; RList *list = r_list_newf ((RListFree)free); int i, len, n_got, amount; if (!list || !obj) { r_list_free (list); return NULL; } if (obj->hdr->flags & FLAT_FLAG_GOTPIC) { n_got = get_ngot_entries (ob...
0
[ "CWE-119", "CWE-787" ]
radare2
72794dc3523bbd5bb370de3c5857cb736c387e18
210,934,374,282,270,300,000,000,000,000,000,000,000
117
Fix #6829 oob write because of using wrong struct
static OPJ_BOOL opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k, opj_stream_private_t *p_stream, opj_event_mgr_t * p_manager ) { /* preconditions */ assert(p_...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
291,193,608,356,188,870,000,000,000,000,000,000,000
19
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
setbit (unsigned int b, charclass c) { c[b / INTBITS] |= 1 << b % INTBITS; }
0
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
28,241,706,282,273,520,000,000,000,000,000,000,000
4
grep: fix some core dumps with long lines etc. These problems mostly occur because the code attempts to stuff sizes into int or into unsigned int; this doesn't work on most 64-bit hosts and the errors can lead to core dumps. * NEWS: Document this. * src/dfa.c (token): Typedef to ptrdiff_t, since the enum's range could...
static int add_oid_section(struct php_x509_request * req TSRMLS_DC) /* {{{ */ { char * str; STACK_OF(CONF_VALUE) * sktmp; CONF_VALUE * cnf; int i; str = CONF_get_string(req->req_config, NULL, "oid_section"); if (str == NULL) { return SUCCESS; } sktmp = CONF_get_section(req->req_config, str); if (sktmp == NU...
0
[ "CWE-200" ]
php-src
270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e
42,476,480,198,602,335,000,000,000,000,000,000,000
25
Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only
static bool io_file_supports_async(struct io_kiocb *req, int rw) { if (rw == READ && (req->flags & REQ_F_ASYNC_READ)) return true; else if (rw == WRITE && (req->flags & REQ_F_ASYNC_WRITE)) return true; return __io_file_supports_async(req->file, rw); }
0
[ "CWE-787" ]
linux
d1f82808877bb10d3deee7cf3374a4eb3fb582db
29,351,666,736,231,413,000,000,000,000,000,000,000
9
io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS. Truncate those lengths when doing io_add_buffers, so buffer addresses still use the uncapped lengt...
virtual UnicodeString& format(double ,UnicodeString& appendTo,FieldPosition& ) const { return appendTo; }
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
265,538,409,669,556,700,000,000,000,000,000,000,000
3
ICU-20246 Fixing another integer overflow in number parsing.
void CLASS adobe_copy_pixel(unsigned row, unsigned col, ushort **rp) { int c; if (tiff_samples == 2 && shot_select) (*rp)++; if (raw_image) { if (row < raw_height && col < raw_width) RAW(row, col) = curve[**rp]; *rp += tiff_samples; } else { if (row < height && col < width) FO...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
127,427,504,503,310,280,000,000,000,000,000,000,000
22
Secunia SA75000 advisory: several buffer overruns
static int ib_ucm_event_handler(struct ib_cm_id *cm_id, struct ib_cm_event *event) { struct ib_ucm_event *uevent; struct ib_ucm_context *ctx; int result = 0; ctx = cm_id->context; uevent = kzalloc(sizeof *uevent, GFP_KERNEL); if (!uevent) goto err1; uevent->ctx = ctx; uevent->cm_id = cm_id; uevent->re...
0
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
323,000,648,649,888,900,000,000,000,000,000,000,000
36
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
krb5_error_code ipadb_get_pwd_policy(krb5_context kcontext, char *name, osa_policy_ent_t *policy) { struct ipadb_context *ipactx; char *esc_name = NULL; char *src_filter = NULL; krb5_error_code kerr; LDAPMessage *res = NULL; LDAPMessage *lentry; osa_polic...
1
[ "CWE-255" ]
freeipa
73f33569c8893610e246b2f44a7aeaec872b37e6
87,022,666,721,460,250,000,000,000,000,000,000,000
123
ipa-kdb: search for password policies globally With the CoS templates now used to create additional password policies per object type that are placed under the object subtrees, DAL driver needs to search for the policies in the whole tree. Individual policies referenced by the krbPwdPolicyReference attribute are alwa...
uECC_VLI_API uECC_word_t uECC_vli_sub(uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words) { uECC_word_t borrow = 0; wordcount_t i; for (i = 0; i < num_...
0
[ "CWE-415" ]
micro-ecc
1b5f5cea5145c96dd8791b9b2c41424fc74c2172
302,015,909,299,644,360,000,000,000,000,000,000,000
15
Fix for #168
dequote_escapes (string) char *string; { register char *s, *t, *s1; size_t slen; char *result, *send; int quote_spaces; DECLARE_MBSTATE; if (string == 0) return string; slen = strlen (string); send = string + slen; t = result = (char *)xmalloc (slen + 1); if (strchr (string, CTLESC) == ...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
293,058,294,337,796,250,000,000,000,000,000,000,000
37
bash-4.4-rc2 release
h2v1_merged_upsample_565D(j_decompress_ptr cinfo, JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, JSAMPARRAY output_buf) { if (is_big_endian()) h2v1_merged_upsample_565D_be(cinfo, input_buf, in_row_group_ctr, output_buf); else h2v1_merged_upsampl...
0
[ "CWE-476" ]
libjpeg-turbo
9120a247436e84c0b4eea828cb11e8f665fcde30
98,868,193,313,728,570,000,000,000,000,000,000,000
10
Fix jpeg_skip_scanlines() segfault w/merged upsamp The additional segfault mentioned in #244 was due to the fact that the merged upsamplers use a different private structure than the non-merged upsamplers. jpeg_skip_scanlines() was assuming the latter, so when merged upsampling was enabled, jpeg_skip_scanlines() clob...
void sock_set_sndtimeo(struct sock *sk, s64 secs) { lock_sock(sk); if (secs && secs < MAX_SCHEDULE_TIMEOUT / HZ - 1) sk->sk_sndtimeo = secs * HZ; else sk->sk_sndtimeo = MAX_SCHEDULE_TIMEOUT; release_sock(sk); }
0
[]
net
35306eb23814444bd4021f8a1c3047d3cb0c8b2b
189,458,806,075,987,840,000,000,000,000,000,000,000
9
af_unix: fix races in sk_peer_pid and sk_peer_cred accesses Jann Horn reported that SO_PEERCRED and SO_PEERGROUPS implementations are racy, as af_unix can concurrently change sk_peer_pid and sk_peer_cred. In order to fix this issue, this patch adds a new spinlock that needs to be used whenever these fields are read o...
static inline int frag_mem_limit(struct netns_frags *nf) { return percpu_counter_read(&nf->mem); }
0
[]
linux
3ef0eb0db4bf92c6d2510fe5c4dc51852746f206
22,222,427,559,811,183,000,000,000,000,000,000,000
4
net: frag, move LRU list maintenance outside of rwlock Updating the fragmentation queues LRU (Least-Recently-Used) list, required taking the hash writer lock. However, the LRU list isn't tied to the hash at all, so we can use a separate lock for it. Original-idea-by: Florian Westphal <fw@strlen.de> Signed-off-by: Je...
fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs) { fr_tls_server_conf_t *conf; /* * If cs has already been parsed there should be a cached copy * of conf already stored, so just return that. */ conf = cf_data_find(cs, "tls-conf"); if (conf) { DEBUG(LOG_PREFIX ": Using cached TLS configuration ...
0
[ "CWE-295" ]
freeradius-server
874b39451702338389260edbfc52b381b20352ec
204,846,277,573,115,000,000,000,000,000,000,000,000
83
Set X509_V_FLAG_CRL_CHECK_ALL
static inline void encode_delegation_type(struct xdr_stream *xdr, fmode_t delegation_type) { __be32 *p; RESERVE_SPACE(4); switch (delegation_type) { case 0: WRITE32(NFS4_OPEN_DELEGATE_NONE); break; case FMODE_READ: WRITE32(NFS4_OPEN_DELEGATE_READ); break; case FMODE_WRITE|FMODE_READ: WRITE32(NF...
0
[ "CWE-703" ]
linux
dc0b027dfadfcb8a5504f7d8052754bf8d501ab9
102,136,265,217,662,940,000,000,000,000,000,000,000
19
NFSv4: Convert the open and close ops to use fmode Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
qmerge_key_free (struct qmerge_key *qmk) { dns_domain_free (&qmk->q); dns_domain_free (&qmk->control); }
0
[ "CWE-362" ]
ndjbdns
847523271f3966cf4618c5689b905703c41dec1c
35,374,042,178,127,100,000,000,000,000,000,000,000
5
Merge identical outgoing requests. This patch fixes dnscache to combine *same* client queries into one single outgoing request, thus securing the server from possible cache poisoning attacks. This fixes one of the cache poisoning vulnerability reported by Mr Mark Johnson -> https://bugzilla.redhat.com/show_bug.cgi?id...
deep_count_one (DeepCountState *state, GFileInfo *info) { NautilusFile *file; GFile *subdir; gboolean is_seen_inode; if (should_skip_file (NULL, info)) { return; } is_seen_inode = seen_inode (state, info); if (!is_seen_inode) { mark_inode_as_seen (state, info); } file = state->directory->details->deep...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
321,692,644,204,602,160,000,000,000,000,000,000,000
37
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
AddWindows(buf, len, flags, where) char *buf; int len; int flags; int where; { register char *s, *ss; register struct win **pp, *p; register char *cmd; int l; s = ss = buf; if ((flags & 8) && where < 0) { *s = 0; return ss; } for (pp = ((flags & 4) && where >= 0) ? wtab + where + 1: w...
0
[]
screen
c5db181b6e017cfccb8d7842ce140e59294d9f62
238,939,171,808,449,040,000,000,000,000,000,000,000
76
ansi: add support for xterm OSC 11 It allows for getting and setting the background color. Notably, Vim uses OSC 11 to learn whether it's running on a light or dark colored terminal and choose a color scheme accordingly. Tested with gnome-terminal and xterm. When called with "?" argument the current background color ...
ex_read(exarg_T *eap) { int i; int empty = (curbuf->b_ml.ml_flags & ML_EMPTY); linenr_T lnum; if (eap->usefilter) // :r!cmd do_bang(1, eap, FALSE, FALSE, TRUE); else { if (u_save(eap->line2, (linenr_T)(eap->line2 + 1)) == FAIL) return; #ifdef FEAT_BROWSE if (cmdmod.cmod_flags & CMO...
0
[ "CWE-416" ]
vim
35d21c6830fc2d68aca838424a0e786821c5891c
21,867,348,324,568,790,000,000,000,000,000,000,000
76
patch 9.0.0360: crash when invalid line number on :for is ignored Problem: Crash when invalid line number on :for is ignored. Solution: Do not check breakpoint for non-existing line.
GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP) { int i, j, ret; unsigned char count; if (flag) { scd->curbit = 0; scd->lastbit = 0; scd->last_byte = 0; scd->done = FALSE; return 0; } if ( (scd->curbit + code_size) >= scd->lastbit) { if (scd->done)...
1
[ "CWE-119" ]
php-src
07b5896a1389c3e865cbd2fb353806b2cefe4f5c
206,767,165,348,912,800,000,000,000,000,000,000,000
38
Fix bug #68601 buffer read overflow in gd_gif_in.c
static void test_message_parser_stop_early(void) { struct istream *input, *input2; struct message_part *parts; unsigned int i; pool_t pool; test_begin("message parser in stop early"); pool = pool_alloconly_create("message parser", 524288); input = test_istream_create(test_msg); test_istream_set_allow_eof(inpu...
0
[ "CWE-20" ]
core
fb97a1cddbda4019e327fa736972a1c7433fedaa
265,100,719,621,386,850,000,000,000,000,000,000,000
34
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit The limit could have been exceeded with message/rfc822 parts.
cmsToneCurve* CMSEXPORT cmsDupToneCurve(const cmsToneCurve* In) { if (In == NULL) return NULL; return AllocateToneCurveStruct(In ->InterpParams ->ContextID, In ->nEntries, In ->nSegments, In ->Segments, In ->Table16); }
0
[]
Little-CMS
9cf2d61867375f867e6e80906a571d222bc2cbf3
20,921,113,332,496,697,000,000,000,000,000,000,000
6
Memory squeezing fix: LCMS2: AllocateToneCurveStruct Simply add an extra check on the last allocation to avoid returning a partially built struct.
bpf_jit_binary_alloc(unsigned int proglen, u8 **image_ptr, unsigned int alignment, bpf_jit_fill_hole_t bpf_fill_ill_insns) { struct bpf_binary_header *hdr; unsigned int size, hole, start; /* Most of BPF filters are really small, but if some of them * fill a page, allow at least 128 extra bytes to in...
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
140,771,343,384,319,930,000,000,000,000,000,000,000
29
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
gss_get_mic (minor_status, context_handle, qop_req, message_buffer, msg_token) OM_uint32 * minor_status; gss_ctx_id_t context_handle; gss_qop_t qop_req; gss_buffer_t message_buffer; gss_buffer_t msg_token; { OM_uint32 status; gss_union_ctx_id_t ctx; gss_mechanism mech; s...
1
[ "CWE-415" ]
krb5
56f7b1bc95a2a3eeb420e069e7655fb181ade5cf
256,188,775,982,022,570,000,000,000,000,000,000,000
48
Preserve GSS context on init/accept failure After gss_init_sec_context() or gss_accept_sec_context() has created a context, don't delete the mechglue context on failures from subsequent calls, even if the mechanism deletes the mech-specific context (which is allowed by RFC 2744 but not preferred). Check for union con...
static int btrfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) { struct btrfs_trans_handle *trans; struct btrfs_root *root = BTRFS_I(dir)->root; struct inode *inode = NULL; int drop_inode_on_err = 0; int err; u64 objectid; u64 index = 0; /* * 2 for inode item and ref * 2 for ...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
110,804,836,235,958,400,000,000,000,000,000,000,000
68
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
int cli_bytecode_context_setfile(struct cli_bc_ctx *ctx, fmap_t *map) { ctx->fmap = map; ctx->file_size = map->len + map->offset; ctx->hooks.filesize = &ctx->file_size; return 0; }
0
[ "CWE-189" ]
clamav-devel
3d664817f6ef833a17414a4ecea42004c35cc42f
127,650,134,352,151,850,000,000,000,000,000,000,000
7
fix recursion level crash (bb #3706). Thanks to Stephane Chazelas for the analysis.
static void naludmx_set_hevc_linf(GF_NALUDmxCtx *ctx) { u32 i, nb_layers=0, nb_sublayers=0; u8 *data; u32 data_size; GF_BitStream *bs; for (i=0; i<64; i++) { if (ctx->linf[i].layer_id_plus_one) nb_layers++; if (ctx->linf[i].min_temporal_id != ctx->linf[i].max_temporal_id) nb_sublayers++; } if (!nb_layers &&...
0
[ "CWE-476" ]
gpac
b43f9d1a4b4e33d08edaef6d313e6ce4bdf554d3
76,114,864,768,286,220,000,000,000,000,000,000,000
32
fixed #2223
MagickExport Image *SwirlImage(const Image *image,double degrees, const PixelInterpolateMethod method,ExceptionInfo *exception) { #define SwirlImageTag "Swirl/Image" CacheView *canvas_view, *interpolate_view, *swirl_view; double radius; Image *canvas_image, *swirl_image; MagickBoo...
0
[ "CWE-369" ]
ImageMagick
329dd528ab79531d884c0ba131e97d43f872ab5d
73,541,914,192,565,140,000,000,000,000,000,000,000
183
uses the PerceptibleReciprocal() to prevent the divide-by-zero from occurring (#3194) Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com>
SPL_METHOD(SplObjectStorage, removeAll) { zval *obj; spl_SplObjectStorage *intern = (spl_SplObjectStorage *)zend_object_store_get_object(getThis() TSRMLS_CC); spl_SplObjectStorage *other; spl_SplObjectStorageElement *element; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O", &obj, spl_ce_SplObjectStorage)...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
284,565,493,657,784,330,000,000,000,000,000,000,000
25
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
void CLua::setregistry(const char *name) { lua_pushstring(state(), name); // Slide name round before the value lua_insert(state(), -2); lua_settable(state(), LUA_REGISTRYINDEX); }
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
202,209,051,942,872,670,000,000,000,000,000,000,000
7
Disable lua load(), loadstring() bytcode loading
static void nextstate(struct gps_packet_t *lexer, unsigned char c) { static int n = 0; #ifdef RTCM104V2_ENABLE enum isgpsstat_t isgpsstat; #endif /* RTCM104V2_ENABLE */ #ifdef SUPERSTAR2_ENABLE static unsigned char ctmp; #endif /* SUPERSTAR2_ENABLE */ /*@ +charint -casebreak @*/ n++; switch (lexer->...
0
[]
gpsd
dd9c3c2830cb8f8fd8491ce68c82698dc5538f50
241,269,469,585,299,240,000,000,000,000,000,000,000
1,165
Fix a malformed-packet crash. Under weird circumstances, this line of device input $GPGGA,030130$GPGLL,2638.1728,N,08011.3893,W,030131.000,A,A*41 could core-dump the packet parser. The context had to be exactly right for it to happen. The bug was an incorrect attempt at optimizing recovery from this rare case.