func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static SLJIT_INLINE void compile_control_verb_backtrackingpath(compiler_common *common, struct backtrack_common *current) { DEFINE_COMPILER; PCRE2_UCHAR opcode = *current->cc; struct sljit_label *loop; struct sljit_jump *jump; if (opcode == OP_THEN || opcode == OP_THEN_ARG) { if (common->then_trap != NULL) { ...
0
[ "CWE-125" ]
pcre2
50a51cb7e67268e6ad417eb07c9de9bfea5cc55a
326,377,690,218,929,300,000,000,000,000,000,000,000
61
Fixed a unicode properrty matching issue in JIT
static int search_old_relocation(struct reloc_struct_t *reloc_table, ut32 addr_to_patch, int n_reloc) { int i; for (i = 0; i < n_reloc; i++) { if (addr_to_patch == reloc_table[i].data_offset) { return i; } } return -1; }
1
[ "CWE-119", "CWE-787" ]
radare2
72794dc3523bbd5bb370de3c5857cb736c387e18
214,036,197,085,815,900,000,000,000,000,000,000,000
9
Fix #6829 oob write because of using wrong struct
R_API void r_anal_var_delete(RAnalVar *var) { r_return_if_fail (var); RAnalFunction *fcn = var->fcn; size_t i; for (i = 0; i < r_pvector_len (&fcn->vars); i++) { RAnalVar *v = r_pvector_at (&fcn->vars, i); if (v == var) { r_pvector_remove_at (&fcn->vars, i); var_free (v); return; } } }
0
[ "CWE-416" ]
radare2
a7ce29647fcb38386d7439696375e16e093d6acb
206,315,441,094,251,430,000,000,000,000,000,000,000
13
Fix UAF in aaaa on arm/thumb switching ##crash * Reported by @peacock-doris via huntr.dev * Reproducer tests_65185 * This is a logic fix, but not the fully safe as changes in the code can result on UAF again, to properly protect r2 from crashing we need to break the ABI and add refcounting to RRegItem, which can't...
int gnutls_x509_crt_get_version(gnutls_x509_crt_t cert) { uint8_t version[8]; int len, result; if (cert == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } len = sizeof(version); if ((result = asn1_read_value(cert->cert, "tbsCertificate.version", version, &len)) != ASN1_SUCCESS) { ...
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
180,334,153,879,276,800,000,000,000,000,000,000,000
23
on certificate import check whether the two signature algorithms match
static uint64_t type(unsigned long) { return sizeof(unsigned long) == sizeof(unsigned) ? Arg::UINT : Arg::ULONG_LONG; }
0
[ "CWE-134", "CWE-119", "CWE-787" ]
fmt
8cf30aa2be256eba07bb1cefb998c52326e846e7
78,792,752,497,325,800,000,000,000,000,000,000,000
4
Fix segfault on complex pointer formatting (#642)
JVM_TraceMethodCalls(jboolean on) { Trc_SC_TraceMethodCalls(on); }
0
[ "CWE-119" ]
openj9
0971f22d88f42cf7332364ad7430e9bd8681c970
231,807,578,196,055,600,000,000,000,000,000,000,000
4
Clean up jio_snprintf and jio_vfprintf Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=543659 Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
WCHAR* VDir::MapPathW(const WCHAR *pInName) { /* * possiblities -- relative path or absolute path with or without drive letter * OR UNC name */ int driveIndex; WCHAR szBuffer[(MAX_PATH+1)*2]; WCHAR szlBuf[MAX_PATH+1]; int length = wcslen(pInName); if (!length) return (WCHAR*)pInNa...
0
[]
perl5
52236464559c6e410a4587d3c6da9639e75f3ec1
255,504,451,933,578,500,000,000,000,000,000,000,000
74
avoid invalid memory access in MapPath[AW] This issue was assigned CVE-2015-8608. [perl #126755]
void set_state(int s) { state = s; }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
294,728,995,407,151,500,000,000,000,000,000,000,000
3
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static void detach_entity_load_avg(struct cfs_rq *cfs_rq, struct sched_entity *se) { dequeue_load_avg(cfs_rq, se); sub_positive(&cfs_rq->avg.util_avg, se->avg.util_avg); sub_positive(&cfs_rq->avg.util_sum, se->avg.util_sum); add_tg_cfs_propagate(cfs_rq, -se->avg.load_sum); cfs_rq_util_change(cfs_rq, 0); trace_...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
316,856,995,823,583,240,000,000,000,000,000,000,000
12
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...
ZEND_VM_COLD_CONST_HANDLER(13, ZEND_BW_NOT, CONST|TMPVAR|CV, ANY) { USE_OPLINE zend_free_op free_op1; zval *op1; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); if (EXPECTED(Z_TYPE_INFO_P(op1) == IS_LONG)) { ZVAL_LONG(EX_VAR(opline->result.var), ~Z_LVAL_P(op1)); ZEND_VM_NEXT_OPCODE(); } SAVE_OPLINE(); if (OP1_TYP...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
101,871,356,735,057,700,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.
int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length) { struct super_block *sb = inode->i_sb; ext4_lblk_t first_block, stop_block; struct address_space *mapping = inode->i_mapping; loff_t first_block_offset, last_block_offset; handle_t *handle; unsigned int credits; int ret = 0; if (!S_ISREG(i...
0
[ "CWE-200" ]
linux
06bd3c36a733ac27962fea7d6f47168841376824
1,098,981,621,772,922,600,000,000,000,000,000,000
131
ext4: fix data exposure after a crash Huang has reported that in his powerfail testing he is seeing stale block contents in some of recently allocated blocks although he mounts ext4 in data=ordered mode. After some investigation I have found out that indeed when delayed allocation is used, we don't add inode to transa...
smtp_filter_printf(struct smtp_tx *tx, const char *fmt, ...) { va_list ap; int len; if (tx->error) return -1; va_start(ap, fmt); len = io_vprintf(tx->filter, fmt, ap); va_end(ap); if (len < 0) { log_warn("smtp-in: session %016"PRIx64": vfprintf", tx->session->id); tx->error = TX_ERROR_IO; } else tx-...
0
[ "CWE-78", "CWE-252" ]
src
9dcfda045474d8903224d175907bfc29761dcb45
31,372,069,975,703,715,000,000,000,000,000,000,000
21
Fix a security vulnerability discovered by Qualys which can lead to a privileges escalation on mbox deliveries and unprivileged code execution on lmtp deliveries, due to a logic issue causing a sanity check to be missed. ok eric@, millert@
bool Binary::has_code_signature() const { return has(LOAD_COMMAND_TYPES::LC_CODE_SIGNATURE); }
0
[ "CWE-703" ]
LIEF
7acf0bc4224081d4f425fcc8b2e361b95291d878
222,187,231,213,356,750,000,000,000,000,000,000,000
3
Resolve #764
static int nf_tables_getobj(struct sk_buff *skb, const struct nfnl_info *info, const struct nlattr * const nla[]) { const struct nfgenmsg *nfmsg = nlmsg_data(info->nlh); struct netlink_ext_ack *extack = info->extack; u8 genmask = nft_genmask_cur(info->net); int family = nfmsg->nfgen_family; const struct nft...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
220,696,158,702,754,250,000,000,000,000,000,000,000
78
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
static void sc_usage(void) { BIO_printf(bio_err,"usage: s_client args\n"); BIO_printf(bio_err,"\n"); BIO_printf(bio_err," -host host - use -connect instead\n"); BIO_printf(bio_err," -port port - use -connect instead\n"); BIO_printf(bio_err," -connect host:port - who to connect to (default is %s:%s)\n",SSL...
0
[ "CWE-310" ]
openssl
6bfe55380abbf7528e04e59f18921bd6c896af1c
240,482,688,417,081,050,000,000,000,000,000,000,000
90
Support TLS_FALLBACK_SCSV. Reviewed-by: Rich Salz <rsalz@openssl.org>
int cap_task_setscheduler (struct task_struct *p, int policy, struct sched_param *lp) { return 0; }
0
[]
linux-2.6
3318a386e4ca68c76e0294363d29bdc46fcad670
98,568,258,799,021,410,000,000,000,000,000,000,000
5
file caps: always start with clear bprm->caps_* While Linux doesn't honor setuid on scripts. However, it mistakenly behaves differently for file capabilities. This patch fixes that behavior by making sure that get_file_caps() begins with empty bprm->caps_*. That way when a script is loaded, its bprm->caps_* may be ...
static void __cleanup_single_sta(struct sta_info *sta) { int ac, i; struct tid_ampdu_tx *tid_tx; struct ieee80211_sub_if_data *sdata = sta->sdata; struct ieee80211_local *local = sdata->local; struct ps_data *ps; if (test_sta_flag(sta, WLAN_STA_PS_STA) || test_sta_flag(sta, WLAN_STA_PS_DRIVER) || test_...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
292,489,493,288,324,270,000,000,000,000,000,000,000
65
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
is_system_connection (NMConnection *connection) { return (nm_connection_get_scope (connection) == NM_CONNECTION_SCOPE_SYSTEM) ? TRUE : FALSE; }
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
210,168,331,183,175,500,000,000,000,000,000,000,000
4
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
qf_find_entry_after_pos( int bnr, pos_T *pos, int linewise, qfline_T *qfp, int *errornr) { if (qf_entry_after_pos(qfp, pos, linewise)) // First entry is after position 'pos' return qfp; // Find the entry just before or at the position 'pos' while (qfp->qf_next != NULL && qfp->qf_next->qf_fn...
0
[ "CWE-416" ]
vim
4f1b083be43f351bc107541e7b0c9655a5d2c0bb
313,561,320,687,026,700,000,000,000,000,000,000,000
30
patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set Problem: Crash when no errors and 'quickfixtextfunc' is set. Solution: Do not handle errors if there aren't any.
testframe_init(struct module_env* env, struct cachedb_env* cachedb_env) { struct testframe_moddata* d; (void)env; verbose(VERB_ALGO, "testframe_init"); d = (struct testframe_moddata*)calloc(1, sizeof(struct testframe_moddata)); cachedb_env->backend_data = (void*)d; if(!cachedb_env->backend_data) { log_err("ou...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
181,195,193,019,789,700,000,000,000,000,000,000,000
16
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
int64_t qmp_guest_fsfreeze_freeze(Error **errp) { int i; Error *local_err = NULL; if (!vss_initialized()) { error_setg(errp, QERR_UNSUPPORTED); return 0; } slog("guest-fsfreeze called"); /* cannot risk guest agent blocking itself on a write in this state */ ga_set_frozen(g...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
127,789,494,246,477,850,000,000,000,000,000,000,000
32
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
bool one_thread_per_connection_end(THD *thd, bool put_in_cache) { DBUG_ENTER("one_thread_per_connection_end"); unlink_thd(thd); mysql_mutex_unlock(&LOCK_thd_remove); if (put_in_cache) put_in_cache= cache_thread(); mysql_mutex_unlock(&LOCK_thread_count); if (put_in_cache) DBUG_RETURN(0); ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
82,343,714,368,620,020,000,000,000,000,000,000,000
20
Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE [This is the 5.5/5.6 version of the bugfix]. The problem was that it was possible to write log files ending in .ini/.cnf that later could be parsed as an options file. This made it possible for users to specify startup options without the permissions to do so. Thi...
int Field_temporal_with_date::store_TIME_with_warning(MYSQL_TIME *ltime, const ErrConv *str, int was_cut, int have_smth_to_conv) { Sql_condition::enum_warni...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
184,124,628,655,564,700,000,000,000,000,000,000,000
34
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...
flush_signal_handlers(struct task_struct *t, int force_default) { int i; struct k_sigaction *ka = &t->sighand->action[0]; for (i = _NSIG ; i != 0 ; i--) { if (force_default || ka->sa.sa_handler != SIG_IGN) ka->sa.sa_handler = SIG_DFL; ka->sa.sa_flags = 0; #ifdef __ARCH_HAS_SA_RESTORER ka->sa.sa_restorer = N...
0
[ "CWE-119", "CWE-787" ]
linux
4ea77014af0d6205b05503d1c7aac6eace11d473
29,405,491,179,009,236,000,000,000,000,000,000,000
15
kernel/signal.c: avoid undefined behaviour in kill_something_info When running kill(72057458746458112, 0) in userspace I hit the following issue. UBSAN: Undefined behaviour in kernel/signal.c:1462:11 negation of -2147483648 cannot be represented in type 'int': CPU: 226 PID: 9849 Comm: test Tainted: G B ...
QPDFObjectHandle::assertInlineImage() { assertType("InlineImage", isInlineImage()); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
261,826,264,471,725,300,000,000,000,000,000,000,000
4
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static struct net_buf *ctl_buf_create(uint8_t op, const void *data, uint8_t data_len, uint8_t retransmits) { struct net_buf *buf; BT_DBG("op 0x%02x data_len %u", op, data_len); buf = adv_buf_create(retransmits); if (!buf) { return NULL; } net_buf_add_be32(buf, link.id); /* Transaction ID, always 0...
0
[ "CWE-787" ]
zephyr
6ec31c852049641095f2cdf25591f2e1bff86774
119,840,476,606,922,840,000,000,000,000,000,000,000
20
Bluetooth: Mesh: Check SegN when receiving Transaction Start PDU When receiving Transaction Start PDU, assure that number of segments needed to send a Provisioning PDU with TotalLength size is equal to SegN value provided in the Transaction Start PDU. Signed-off-by: Pavel Vasilyev <pavel.vasilyev@nordicsemi.no> (cher...
msg_sb_start(msgchunk_T *mps) { msgchunk_T *mp = mps; while (mp != NULL && mp->sb_prev != NULL && !mp->sb_prev->sb_eol) mp = mp->sb_prev; return mp; }
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
130,465,601,026,520,350,000,000,000,000,000,000,000
8
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
GC_API int GC_CALL GC_get_java_finalization(void) { return GC_java_finalization; }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
202,449,740,873,303,900,000,000,000,000,000,000,000
4
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...
void __init omap_iommu_debugfs_init(void) { iommu_debug_root = debugfs_create_dir("omap_iommu", NULL); if (!iommu_debug_root) pr_err("can't create debugfs dir\n"); }
0
[]
linux
e203db293863fa15b4b1917d4398fb5bd63c4e88
236,395,230,072,343,870,000,000,000,000,000,000,000
6
iommu/omap: Fix debug_read_tlb() to use seq_printf() The debug_read_tlb() uses the sprintf() functions directly on the buffer allocated by buf = kmalloc(count), without taking into account the size of the buffer, with the consequence corrupting the heap, depending on the count requested by the user. The patch fixes t...
static int io_sqe_alloc_file_tables(struct io_ring_ctx *ctx, unsigned nr_tables, unsigned nr_files) { int i; for (i = 0; i < nr_tables; i++) { struct fixed_file_table *table = &ctx->file_table[i]; unsigned this_files; this_files = min(nr_files, IORING_MAX_FILES_TABLE); table->files = kcalloc(this_fi...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
106,369,114,051,932,700,000,000,000,000,000,000,000
26
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
static int ctnetlink_new_expect(struct net *net, struct sock *ctnl, struct sk_buff *skb, const struct nlmsghdr *nlh, const struct nlattr * const cda[], struct netlink_ext_ack *extack) { struct nf_conntrack_tuple tuple; struct nf_conntrack_expect *exp; struct nfgenmsg *nfmsg = nlmsg_data(nlh); u_int8_t u...
0
[ "CWE-120" ]
linux
1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6
152,381,576,273,250,340,000,000,000,000,000,000,000
46
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 ...
static int TraceLineTo(FT_Vector *to,DrawInfo *draw_info) { AffineMatrix affine; char path[MagickPathExtent]; affine=draw_info->affine; (void) FormatLocaleString(path,MagickPathExtent,"L%g,%g",affine.tx+to->x/64.0, affine.ty-to->y/64.0); (void) ConcatenateString(&draw_info->primitive,path); re...
0
[ "CWE-125" ]
ImageMagick
7c2c5ba5b8e3a0b2b82f56c71dfab74ed4006df7
207,239,316,490,562,000,000,000,000,000,000,000,000
14
https://github.com/ImageMagick/ImageMagick/issues/1588
rfbProcessClientAuthType(rfbClientPtr cl) { uint32_t auth_type; int n, i; rfbTightClientPtr rtcp = rfbGetTightClientData(cl); rfbLog("tightvnc-filetransfer/rfbProcessClientAuthType\n"); if(rtcp == NULL) return; /* Read authentication type selected by the client. */ n = rfbReadExact(cl, (...
0
[]
libvncserver
804335f9d296440bb708ca844f5d89b58b50b0c6
180,214,781,756,143,640,000,000,000,000,000,000,000
51
Thread safety for zrle, zlib, tight. Proposed tight security type fix for debian bug 517422.
static void nvme_compare_data_cb(void *opaque, int ret) { NvmeRequest *req = opaque; NvmeCtrl *n = nvme_ctrl(req); NvmeNamespace *ns = req->ns; BlockBackend *blk = ns->blkconf.blk; BlockAcctCookie *acct = &req->acct; BlockAcctStats *stats = blk_get_stats(blk); struct nvme_compare_ctx *ctx =...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
125,057,225,124,152,380,000,000,000,000,000,000,000
61
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
bool Webm2Pes::ConvertToFile() { if (input_file_name_.empty() || output_file_name_.empty()) { std::fprintf(stderr, "Webm2Pes: input and/or output file name(s) empty.\n"); return false; } output_file_ = FilePtr(fopen(output_file_name_.c_str(), "wb"), FILEDeleter()); if (output_file_ == nullptr) { st...
0
[ "CWE-125" ]
libwebm
8e88e04b07352f2ca449278b44a2d8ec7631bdcf
323,926,727,461,108,760,000,000,000,000,000,000,000
76
webm2pes: Avoid OOB reads caused by invalid superframe index. BUG=webm:1492 Change-Id: Ibd5781731fe8f6fcdf5f1cc6e5807d17b3b92d4d
static void iscsi_endpoint_release(struct device *dev) { struct iscsi_endpoint *ep = iscsi_dev_to_endpoint(dev); kfree(ep); }
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
288,171,449,583,354,030,000,000,000,000,000,000,000
5
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
int skcipher_register_instance(struct crypto_template *tmpl, struct skcipher_instance *inst) { int err; err = skcipher_prepare_alg(&inst->alg); if (err) return err; return crypto_register_instance(tmpl, skcipher_crypto_instance(inst)); }
0
[ "CWE-476", "CWE-703" ]
linux
9933e113c2e87a9f46a40fde8dafbf801dca1ab9
179,136,265,944,444,400,000,000,000,000,000,000,000
11
crypto: skcipher - Add missing API setkey checks The API setkey checks for key sizes and alignment went AWOL during the skcipher conversion. This patch restores them. Cc: <stable@vger.kernel.org> Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...") Reported-by: Baozeng <sploving1@gmail.com> Signed-of...
static apr_status_t load_job_props(md_reg_t *reg, md_job_t *job, apr_pool_t *p) { md_store_t *store = md_reg_store_get(reg); md_json_t *jprops; apr_status_t rv; rv = md_store_load_json(store, MD_SG_STAGING, job->md->name, MD_FN_JOB, &jprops, p); if (APR_SUCCESS == rv...
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
193,567,221,877,911,770,000,000,000,000,000,000,000
14
v1.1.12, notifycmd improvements
bool Field_time_hires::get_date(MYSQL_TIME *ltime, ulonglong fuzzydate) { if (check_zero_in_date_with_warn(fuzzydate)) return true; uint32 len= pack_length(); longlong packed= read_bigendian(ptr, len); packed= sec_part_unshift(packed - zero_point, dec); unpack_time(packed, ltime); /* unpack_time()...
0
[ "CWE-120" ]
server
eca207c46293bc72dd8d0d5622153fab4d3fccf1
14,352,600,844,837,804,000,000,000,000,000,000,000
19
MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size. Precision should be kept below DECIMAL_MAX_SCALE for computations. It can be bigger in Item_decimal. I'd fix this too but it changes...
static ssize_t nr_hugepages_store_common(bool obey_mempolicy, struct kobject *kobj, const char *buf, size_t len) { struct hstate *h; unsigned long count; int nid; int err; err = kstrtoul(buf, 10, &count); if (err) return err; h = kobj_to_hstate(kobj, &nid); return __nr_hugepages_store_common(obe...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
253,654,898,568,993,850,000,000,000,000,000,000,000
16
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos) { CONF_VALUE *cnf; ASN1_INTEGER *aint; int i; for (i = 0; i < sk_CONF_VALUE_num(nos); i++) { cnf = sk_CONF_VALUE_value(nos, i); if ((aint = s2i_ASN1_INTEGER(NULL, cnf->name)) == NULL) { X509V3err(...
0
[ "CWE-125" ]
openssl
5f54e57406ca17731b9ade3afd561d3c652e07f2
52,756,462,954,367,900,000,000,000,000,000,000,000
25
Fix POLICYINFO printing to not assume NUL terminated strings ASN.1 strings may not be NUL terminated. Don't assume they are. CVE-2021-3712 Reviewed-by: Viktor Dukhovni <viktor@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org>
ex_retab(exarg_T *eap) { linenr_T lnum; int got_tab = FALSE; long num_spaces = 0; long num_tabs; long len; long col; long vcol; long start_col = 0; // For start of white-space string long start_vcol = 0; // For start of white-space string long old_len; long new_len; ch...
0
[ "CWE-122", "CWE-787" ]
vim
4e889f98e95ac05d7c8bd3ee933ab4d47820fdfa
226,852,570,639,941,100,000,000,000,000,000,000,000
230
patch 8.2.4436: crash with weird 'vartabstop' value Problem: Crash with weird 'vartabstop' value. Solution: Check for running into the end of the line.
int snd_ctl_get_preferred_subdevice(struct snd_card *card, int type) { struct snd_ctl_file *kctl; int subdevice = -1; unsigned long flags; read_lock_irqsave(&card->ctl_files_rwlock, flags); list_for_each_entry(kctl, &card->ctl_files, list) { if (kctl->pid == task_pid(current)) { subdevice = kctl->preferred_s...
0
[ "CWE-416", "CWE-125" ]
linux
6ab55ec0a938c7f943a4edba3d6514f775983887
10,540,817,907,087,357,000,000,000,000,000,000,000
17
ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash() Since the user can control the arguments provided to the kernel by the ioctl() system call, an out-of-bounds bug occurs when the 'id->name' provided by the user does not end with '\0'. The following log can reveal it: [ 10.002313] BUG: KASAN: stack-out-...
static inline void skb_queue_head_init_class(struct sk_buff_head *list, struct lock_class_key *class) { skb_queue_head_init(list); lockdep_set_class(&list->lock, class);
0
[ "CWE-20" ]
linux
2b16f048729bf35e6c28a40cbfad07239f9dcd90
115,290,601,832,446,520,000,000,000,000,000,000,000
6
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 xmlNodePtr xmlXPathNextPrecedingInternal(xmlXPathParserContextPtr ctxt, xmlNodePtr cur) { if ((ctxt == NULL) || (ctxt->context == NULL)) return(NULL); if (cur == NULL) { cur = ctxt->context->node; if (cur == NULL) return (NULL); if (cur->type...
1
[ "CWE-119" ]
libxml2
91d19754d46acd4a639a8b9e31f50f31c78f8c9c
305,399,539,984,494,130,000,000,000,000,000,000,000
29
Fix the semantic of XPath axis for namespace/attribute context nodes The processing of namespace and attributes nodes was not compliant to the XPath-1.0 specification
static int svm_get_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 *data) { struct vcpu_svm *svm = to_svm(vcpu); switch (ecx) { case MSR_IA32_TSC: { u64 tsc_offset; if (is_nested(svm)) tsc_offset = svm->nested.hsave->control.tsc_offset; else tsc_offset = svm->vmcb->control.tsc_offset; *data = tsc_offse...
0
[ "CWE-400" ]
linux-2.6
9581d442b9058d3699b4be568b6e5eae38a41493
323,638,542,424,350,580,000,000,000,000,000,000,000
76
KVM: Fix fs/gs reload oops with invalid ldt kvm reloads the host's fs and gs blindly, however the underlying segment descriptors may be invalid due to the user modifying the ldt after loading them. Fix by using the safe accessors (loadsegment() and load_gs_index()) instead of home grown unsafe versions. This is CVE-...
static void sh_delentry(struct curl_hash *sh, curl_socket_t s) { /* We remove the hash entry. This will end up in a call to sh_freeentry(). */ Curl_hash_delete(sh, (char *)&s, sizeof(curl_socket_t)); }
0
[ "CWE-416" ]
curl
75dc096e01ef1e21b6c57690d99371dedb2c0b80
220,256,767,718,069,340,000,000,000,000,000,000,000
6
curl_multi_cleanup: clear connection pointer for easy handles CVE-2016-5421 Bug: https://curl.haxx.se/docs/adv_20160803C.html Reported-by: Marcelo Echeverria and Fernando Muñoz
static int afiucv_netdev_event(struct notifier_block *this, unsigned long event, void *ptr) { struct net_device *event_dev = (struct net_device *)ptr; struct sock *sk; struct iucv_sock *iucv; switch (event) { case NETDEV_REBOOT: case NETDEV_GOING_DOWN: sk_for_each(sk, &iucv_sk_list.head) { iucv = ...
0
[ "CWE-200" ]
linux
a5598bd9c087dc0efc250a5221e5d0e6f584ee88
156,523,417,346,746,310,000,000,000,000,000,000,000
28
iucv: Fix missing msg_namelen update in iucv_sock_recvmsg() The current code does not fill the msg_name member in case it is set. It also does not set the msg_namelen member to 0 and therefore makes net/socket.c leak the local, uninitialized sockaddr_storage variable to userland -- 128 bytes of kernel stack memory. F...
const T& _atX(const int x, const int y=0, const int z=0, const int c=0) const { return (*this)(x<0?0:(x>=width()?width() - 1:x),y,z,c); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
274,325,112,443,542,550,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int main(void) { #if defined(UMM_INTEGRITY_CHECK) TRY(test_integrity_check()); #endif #if defined(UMM_POISON) TRY(test_poison()); #endif // Check for integer overflows TRY(umm_malloc((size_t) ~0) == NULL); TRY(random_stress()); TRY(test_oom_random()); return 0; }
0
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
224,106,973,358,424,600,000,000,000,000,000,000,000
17
Fix umm_malloc()
int ccp_run_cmd(struct ccp_cmd_queue *cmd_q, struct ccp_cmd *cmd) { int ret; cmd->engine_error = 0; cmd_q->cmd_error = 0; cmd_q->int_rcvd = 0; cmd_q->free_slots = cmd_q->ccp->vdata->perform->get_free_slots(cmd_q); switch (cmd->engine) { case CCP_ENGINE_AES: switch (cmd->u.aes.mode) { case CCP_AES_MODE_CMAC...
0
[ "CWE-400", "CWE-401" ]
linux
128c66429247add5128c03dc1e144ca56f05a4e2
300,207,730,331,927,100,000,000,000,000,000,000,000
50
crypto: ccp - Release all allocated memory if sha type is invalid Release all allocated memory if sha type is invalid: In ccp_run_sha_cmd, if the type of sha is invalid, the allocated hmac_buf should be released. v2: fix the goto. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Acked-by: Gary R Hook <gary...
static struct page *get_a_page(struct receive_queue *rq, gfp_t gfp_mask) { struct page *p = rq->pages; if (p) { rq->pages = (struct page *)p->private; /* clear private here, it is used to chain pages */ p->private = 0; } else p = alloc_page(gfp_mask); return p; }
0
[ "CWE-119", "CWE-787" ]
linux
48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39
199,743,553,362,088,480,000,000,000,000,000,000,000
12
virtio-net: drop NETIF_F_FRAGLIST virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make the call to skb_to_sgvec overflow the sg array, leading to memory corruption. Drop NETIF_F_FRA...
MagickPrivate MagickBooleanType LogComponentGenesis(void) { ExceptionInfo *exception; if (log_semaphore == (SemaphoreInfo *) NULL) log_semaphore=AcquireSemaphoreInfo(); exception=AcquireExceptionInfo(); (void) GetLogInfo("*",exception); exception=DestroyExceptionInfo(exception); event_semaphore=Acq...
0
[ "CWE-476" ]
ImageMagick
107ce8577e818cf4801e5a59641cb769d645cc95
164,482,103,932,494,120,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/1224
alt_match_null_string_p (p, end, reg_info) unsigned char *p, *end; register_info_type *reg_info; { int mcnt; unsigned char *p1 = p; while (p1 < end) { /* Skip over opcodes that can match nothing, and break when we get to one that can't. */ switch ((re_opcode_t) *p1) { ...
0
[ "CWE-190", "CWE-252" ]
glibc
2864e767053317538feafa815046fff89e5a16be
26,155,348,115,990,460,000,000,000,000,000,000,000
29
Update. 1999-11-09 Ulrich Drepper <drepper@cygnus.com> * elf/dl-load.c (_dl_dst_count): Allow $ORIGIN to point to directory with the reference since this is as secure as using the object with the dependency. (_dl_dst_substitute): Likewise. * elf/dl-load.c (_dl_dst_count): Change strings in first two strncmp ...
static int indexedbasecolor(i_ctx_t * i_ctx_p, ref *space, int base, int *stage, int *cont, int *stack_depth) { int code; if (*stage == 0) { /* Usefully /Indexed can't be the base of any other space, so we know * the current space in the graphics state is this one. */ gs_color...
0
[]
ghostpdl
b326a71659b7837d3acde954b18bda1a6f5e9498
46,698,041,757,659,330,000,000,000,000,000,000,000
74
Bug 699655: Properly check the return value.... ...when getting a value from a dictionary
static const char *tulip_tx_state_name(int state) { switch (state) { case CSR5_TS_STOPPED: return "STOPPED"; case CSR5_TS_RUNNING_FETCH: return "RUNNING/FETCH"; case CSR5_TS_RUNNING_WAIT_EOT: return "RUNNING/WAIT EOT"; case CSR5_TS_RUNNING_READ_BUF: return "RUNNING...
0
[ "CWE-787" ]
qemu
8ffb7265af64ec81748335ec8f20e7ab542c3850
333,780,785,907,748,330,000,000,000,000,000,000,000
29
net: tulip: check frame size and r/w data length Tulip network driver while copying tx/rx buffers does not check frame size against r/w data length. This may lead to OOB buffer access. Add check to avoid it. Limit iterations over descriptors to avoid potential infinite loop issue in tulip_xmit_list_update. Reported-...
inline std::unique_ptr<std::pair<std::string, std::string>> qs_dict_name2kv(const char * dict_name, char * const * qs_kv, int qs_kv_size, int nth = 0) { int i; size_t name_len, skip_to_eq, skip_to_brace_open, skip_to_brace_close; name_len = strlen(dict_name); #ifdef _qsSORTING // TODO: binary search for k...
0
[ "CWE-703" ]
Crow
79eec91f00b5fb7df890d4e84b2f048b0841e044
180,823,792,042,054,470,000,000,000,000,000,000,000
41
Fixed issue where an index in qs_parse is incorrectly incremented beyond the maximum possible value
void t_cpp_generator::generate_deserialize_set_element(ofstream& out, t_set* tset, string prefix) { string elem = tmp("_elem"); t_field felem(tset->get_elem_type(), elem); indent(out) << declare_field(&felem) << endl; generate_deserialize_field(out, &felem); indent(out) << prefix << ".insert(" << elem << "...
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
249,983,352,343,543,500,000,000,000,000,000,000,000
10
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
get_text_rgb_cmyk_row(j_compress_ptr cinfo, cjpeg_source_ptr sinfo) /* This version is for reading text-format PPM files with any maxval and converting to CMYK */ { ppm_source_ptr source = (ppm_source_ptr)sinfo; FILE *infile = source->pub.input_file; register JSAMPROW ptr; register JSAMPLE *rescale = source-...
0
[ "CWE-200", "CWE-125" ]
libjpeg-turbo
9c78a04df4e44ef6487eee99c4258397f4fdca55
285,610,566,508,131,200,000,000,000,000,000,000,000
31
cjpeg: Fix OOB read caused by malformed 8-bit BMP ... in which one or more of the color indices is out of range for the number of palette entries. Fix partly borrowed from jpeg-9c. This commit also adopts Guido's JERR_PPM_OUTOFRANGE enum value in lieu of our project-specific JERR_PPM_TOOLARGE enum value. Fixes #258
QString ImportEPUB::PrepareOPFForReading(const QString &source) { QString source_copy(source); QString prefix = source_copy.left(XML_DECLARATION_SEARCH_PREFIX_SIZE); QRegularExpression version(VERSION_ATTRIBUTE); QRegularExpressionMatch mo = version.match(prefix); if (mo.hasMatch()) { // MAS...
0
[ "CWE-22" ]
Sigil
04e2f280cc4a0766bedcc7b9eb56449ceecc2ad4
124,205,573,368,516,950,000,000,000,000,000,000,000
14
further harden against malicious epubs and produce error message
void hsr_handle_sup_frame(struct sk_buff *skb, struct hsr_node *node_curr, struct hsr_port *port_rcv) { struct ethhdr *ethhdr; struct hsr_node *node_real; struct hsr_sup_payload *hsr_sp; struct list_head *node_db; int i; ethhdr = (struct ethhdr *) skb_mac_header(skb); /* Leave the ethernet header. */ skb...
0
[ "CWE-772", "CWE-269", "CWE-401" ]
linux
6caabe7f197d3466d238f70915d65301f1716626
171,798,201,533,524,700,000,000,000,000,000,000,000
54
net: hsr: fix memory leak in hsr_dev_finalize() If hsr_add_port(hsr, hsr_dev, HSR_PT_MASTER) failed to add port, it directly returns res and forgets to free the node that allocated in hsr_create_self_node(), and forgets to delete the node->mac_list linked in hsr->self_node_db. BUG: memory leak unreferenced object 0xf...
static void flush_old_files(struct files_struct * files) { long j = -1; struct fdtable *fdt; spin_lock(&files->file_lock); for (;;) { unsigned long set, i; j++; i = j * __NFDBITS; fdt = files_fdtable(files); if (i >= fdt->max_fds) break; set = fdt->close_on_exec[j]; if (!set) continue; fdt->...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
216,987,891,597,986,350,000,000,000,000,000,000,000
29
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...
int ha_partition::common_index_read(uchar *buf, bool have_start_key) { int error; uint UNINIT_VAR(key_len); /* used if have_start_key==TRUE */ bool reverse_order= FALSE; DBUG_ENTER("ha_partition::common_index_read"); DBUG_PRINT("info", ("m_ordered %u m_ordered_scan_ong %u", m_ordered, m...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
256,739,302,346,745,400,000,000,000,000,000,000,000
56
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
nfsd4_offload_cancel(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) { struct nfsd4_offload_status *os = &u->offload_status; __be32 status = 0; struct nfsd4_copy *copy; struct nfs4_client *clp = cstate->clp; copy = find_async_copy(clp, &os->stateid); if (copy) nf...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
144,848,863,266,319,870,000,000,000,000,000,000,000
17
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
GF_Err rely_box_size(GF_Box *s) { s->size += 1; return GF_OK; }
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
49,996,125,126,524,260,000,000,000,000,000,000,000
5
fixed #1587
TEST(LteOp, MatchesMinKey) { BSONObj operand = BSON("a" << MinKey); LTEMatchExpression lte; ASSERT(lte.init("a", operand["a"]).isOK()); ASSERT(lte.matchesBSON(BSON("a" << MinKey), NULL)); ASSERT(!lte.matchesBSON(BSON("a" << MaxKey), NULL)); ASSERT(!lte.matchesBSON(BSON("a" << 4), NULL)); }
0
[]
mongo
b0ef26c639112b50648a02d969298650fbd402a4
298,761,898,370,551,760,000,000,000,000,000,000,000
8
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
inboth (char **left, char **right) { char **both; char **temp; int lnum, rnum; if (left == NULL || right == NULL) return NULL; both = malloc(sizeof *both); if (both == NULL) return NULL; both[0] = NULL; for (lnum = 0; left[lnum] != NULL; ++lnum) { for (rnum = 0; right[rnum] != NULL; +...
1
[ "CWE-189" ]
grep
cbbc1a45b9f843c811905c97c90a5d31f8e6c189
61,137,104,647,505,240,000,000,000,000,000,000,000
31
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...
void OSDService::update_osd_stat(vector<int>& hb_peers) { // load osd stats first struct store_statfs_t stbuf; int r = osd->store->statfs(&stbuf); if (r < 0) { derr << "statfs() failed: " << cpp_strerror(r) << dendl; return; } auto new_stat = set_osd_stat(stbuf, hb_peers, osd->get_num_pgs()); dou...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
52,743,410,973,651,210,000,000,000,000,000,000,000
16
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int read_keyfile ( const char *key_location, struct totem_config *totem_config, const char **error_string) { int fd; int res; ssize_t expected_key_len = sizeof (totem_config->private_key); int saved_errno; char error_str[100]; const char *error_ptr; fd = open (key_location, O_RDONLY); if (fd == -1) {...
0
[]
corosync
55dc09ea237482f827333759fd45608bc9518d64
69,739,424,792,297,400,000,000,000,000,000,000,000
48
totemconfig: enforce hmac config when crypto is enabled Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
void clearExtendedConnectHeaders() { connect_headers_.removeProtocol(); connect_headers_.removePath(); }
0
[ "CWE-416" ]
envoy
ce0ae309057a216aba031aff81c445c90c6ef145
50,011,251,736,493,240,000,000,000,000,000,000,000
4
CVE-2021-43826 Signed-off-by: Yan Avlasov <yavlasov@google.com>
int jpc_bitstream_putbits(jpc_bitstream_t *bitstream, int n, long v) { int m; /* We can reliably put at most 31 bits since ISO/IEC 9899 only guarantees that a long can represent values up to 2^31-1. */ //assert(n >= 0 && n < 32); if (n < 0 || n >= 32) { return EOF; } /* Ensure that only the bits to be outpu...
0
[ "CWE-703" ]
jasper
1e84674d95353c64e5c4c0e7232ae86fd6ea813b
210,498,825,409,274,100,000,000,000,000,000,000,000
23
Changed the JPC bitstream code to more gracefully handle a request for a larger sized integer than what can be handled (i.e., return with an error instead of failing an assert).
int ssl3_release_write_buffer(SSL *s) { if (s->s3->wbuf.buf != NULL) { freelist_insert(s->ctx, 0, s->s3->wbuf.len, s->s3->wbuf.buf); s->s3->wbuf.buf = NULL; } return 1; }
0
[ "CWE-310" ]
openssl
9c00a950604aca819cee977f1dcb4b45f2af3aa6
277,685,433,813,285,700,000,000,000,000,000,000,000
9
Add and use a constant-time memcmp. This change adds CRYPTO_memcmp, which compares two vectors of bytes in an amount of time that's independent of their contents. It also changes several MAC compares in the code to use this over the standard memcmp, which may leak information about the size of a matching prefix. (cher...
static int hwsim_fops_ps_read(void *dat, u64 *val) { struct mac80211_hwsim_data *data = dat; *val = data->ps; return 0; }
0
[ "CWE-703", "CWE-772" ]
linux
0ddcff49b672239dda94d70d0fcf50317a9f4b51
124,072,758,990,223,450,000,000,000,000,000,000,000
6
mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl() 'hwname' is malloced in hwsim_new_radio_nl() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fixes: ff4dd73dd2b4 ("mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length") Signed-off-by: Wei Yongjun <we...
static inline int noodle(ELFOBJ *bin, const char *s) { const ut8 *p = bin->b->buf; if (bin->b->length > 64) { p += bin->b->length - 64; } else { return 0; } return r_mem_mem (p, 64, (const ut8 *)s, strlen (s)) != NULL; }
0
[ "CWE-125" ]
radare2
c6d0076c924891ad9948a62d89d0bcdaf965f0cd
153,103,927,035,148,600,000,000,000,000,000,000,000
9
Fix #8731 - Crash in ELF parser with negative 32bit number
MagickExport MagickBooleanType DefineImageProperty(Image *image, const char *property,ExceptionInfo *exception) { char key[MagickPathExtent], value[MagickPathExtent]; register char *p; assert(image != (Image *) NULL); assert(property != (const char *) NULL); (void) CopyMagickString(key,propert...
0
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
3,551,583,202,409,568,400,000,000,000,000,000,000
22
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
static inline void ep_set_busy_poll_napi_id(struct epitem *epi) { struct eventpoll *ep; unsigned int napi_id; struct socket *sock; struct sock *sk; int err; if (!net_busy_loop_on()) return; sock = sock_from_file(epi->ffd.file, &err); if (!sock) return; sk = sock->sk; if (!sk) return; napi_id = READ...
0
[ "CWE-416" ]
linux
a9ed4a6560b8562b7e2e2bed9527e88001f7b682
192,866,581,538,252,340,000,000,000,000,000,000,000
32
epoll: Keep a reference on files added to the check list When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe wh...
static int stbi__mad3sizes_valid(int a, int b, int c, int add) { return stbi__mul2sizes_valid(a, b) && stbi__mul2sizes_valid(a*b, c) && stbi__addsizes_valid(a*b*c, add); }
0
[ "CWE-787" ]
stb
5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40
90,216,754,805,848,800,000,000,000,000,000,000,000
5
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.
mp_sint32 PlayerGeneric::getCurrentBeatIndex() { if (player) return player->getBeatIndexFromSamplePos(getCurrentSamplePosition()); return 0; }
0
[ "CWE-416" ]
MilkyTracker
7afd55c42ad80d01a339197a2d8b5461d214edaf
196,907,448,349,055,560,000,000,000,000,000,000,000
7
Fix use-after-free in PlayerGeneric destructor
static kgid_t v9fs_get_fsgid_for_create(struct inode *dir_inode) { BUG_ON(dir_inode == NULL); if (dir_inode->i_mode & S_ISGID) { /* set_gid bit is set.*/ return dir_inode->i_gid; } return current_fsgid(); }
0
[ "CWE-835" ]
linux
5e3cc1ee1405a7eb3487ed24f786dec01b4cbe1f
59,414,912,685,828,240,000,000,000,000,000,000,000
10
9p: use inode->i_lock to protect i_size_write() under 32-bit Use inode->i_lock to protect i_size_write(), else i_size_read() in generic_fillattr() may loop infinitely in read_seqcount_begin() when multiple processes invoke v9fs_vfs_getattr() or v9fs_vfs_getattr_dotl() simultaneously under 32-bit SMP environment, and a...
GF_Err gf_isom_nalu_sample_rewrite(GF_MediaBox *mdia, GF_ISOSample *sample, u32 sampleNumber, GF_MPEGVisualSampleEntryBox *entry) { Bool is_hevc = GF_FALSE; //if only one sync given in the sample sync table, insert sps/pps/vps before cra/bla in hevc // Bool check_cra_bla = (mdia->information->sampleTable->SyncSample ...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
244,333,817,241,041,800,000,000,000,000,000,000,000
445
fixed #2165
static ssize_t do_sock_read(struct msghdr *msg, struct kiocb *iocb, struct file *file, const struct iovec *iov, unsigned long nr_segs) { struct socket *sock = file->private_data; size_t size = 0; int i; for (i = 0; i < nr_segs; i++) size += iov[i].iov_len; msg->msg_name = NULL; msg->msg_namelen = 0; msg-...
0
[]
linux-2.6
644595f89620ba8446cc555be336d24a34464950
55,709,870,624,618,840,000,000,000,000,000,000,000
21
compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct timeval and struct timespec to userspace in net/socket.c. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
void fc_drop_locked(struct fs_context *fc) { struct super_block *sb = fc->root->d_sb; dput(fc->root); fc->root = NULL; deactivate_locked_super(sb); }
0
[ "CWE-787" ]
linux
722d94847de29310e8aa03fcbdb41fc92c521756
104,625,893,156,153,020,000,000,000,000,000,000,000
7
vfs: fs_context: fix up param length parsing in legacy_parse_param The "PAGE_SIZE - 2 - size" calculation in legacy_parse_param() is an unsigned type so a large value of "size" results in a high positive value instead of a negative value as expected. Fix this by getting rid of the subtraction. Signed-off-by: Jamie H...
run_client_script_err_backup( gpointer data, gpointer user_data) { char *line = data; script_output_t *so = user_data; if (line && so->stream) { g_fprintf(so->stream, "? %s\n", line); } }
0
[ "CWE-264" ]
amanda
4bf5b9b356848da98560ffbb3a07a9cb5c4ea6d7
172,826,209,782,756,170,000,000,000,000,000,000,000
11
* Add a /etc/amanda-security.conf file git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/branches/3_3@6486 a8d146d6-cc15-0410-8900-af154a0219e0
static void __cleanup(struct ioat2_dma_chan *ioat, dma_addr_t phys_complete) { struct ioat_chan_common *chan = &ioat->base; struct ioatdma_device *device = chan->device; struct ioat_ring_ent *desc; bool seen_current = false; int idx = ioat->tail, i; u16 active; dev_dbg(to_dev(chan), "%s: head: %#x tail: %#x iss...
0
[]
linux
7bced397510ab569d31de4c70b39e13355046387
143,418,180,187,194,960,000,000,000,000,000,000,000
75
net_dma: simple removal Per commit "77873803363c net_dma: mark broken" net_dma is no longer used and there is no plan to fix it. This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards. Reverting the remainder of the net_dma induced changes is deferred to subsequent patches. Marked for stable due to Ro...
static PCRE2_SPTR SLJIT_FUNC do_utf_caselesscmp(PCRE2_SPTR src1, PCRE2_SPTR src2, PCRE2_SPTR end1, PCRE2_SPTR end2) { /* This function would be ineffective to do in JIT level. */ sljit_u32 c1, c2; const ucd_record *ur; const sljit_u32 *pp; while (src1 < end1) { if (src2 >= end2) return (PCRE2_SPTR)1; GETCHAR...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
283,156,993,761,368,300,000,000,000,000,000,000,000
26
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
void mpls_stats_inc_outucastpkts(struct net_device *dev, const struct sk_buff *skb) { struct mpls_dev *mdev; if (skb->protocol == htons(ETH_P_MPLS_UC)) { mdev = mpls_dev_get(dev); if (mdev) MPLS_INC_STATS_LEN(mdev, skb->len, tx_packets, tx_bytes); } else if (skb->protocol == htons(ETH_P_...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
273,254,594,340,830,700,000,000,000,000,000,000,000
23
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static void __exit decnet_exit(void) { sock_unregister(AF_DECnet); rtnl_unregister_all(PF_DECnet); dev_remove_pack(&dn_dix_packet_type); dn_unregister_sysctl(); unregister_netdevice_notifier(&dn_dev_notifier); dn_route_cleanup(); dn_dev_cleanup(); dn_neigh_cleanup(); dn_fib_cleanup(); remove_proc_entry("d...
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
17,431,851,914,899,577,000,000,000,000,000,000,000
21
net: add validation for the socket syscall protocol argument 郭永刚 reported that one could simply crash the kernel as root by using a simple program: int socket_fd; struct sockaddr_in addr; addr.sin_port = 0; addr.sin_addr.s_addr = INADDR_ANY; addr.sin_family = 10; socket_fd = socket(10,3,0x40000000); connect(s...
CopySendInt32(CopyState cstate, int32 val) { uint32 buf; buf = htonl((uint32) val); CopySendData(cstate, &buf, sizeof(buf)); }
0
[ "CWE-209" ]
postgres
804b6b6db4dcfc590a468e7be390738f9f7755fb
180,963,079,840,151,350,000,000,000,000,000,000,000
7
Fix column-privilege leak in error-message paths While building error messages to return to the user, BuildIndexValueDescription, ExecBuildSlotValueDescription and ri_ReportViolation would happily include the entire key or entire row in the result returned to the user, even if the user didn't have access to view all o...
void recover_inline_xattr(struct inode *inode, struct page *page) { void *src_addr, *dst_addr; size_t inline_size; struct page *ipage; struct f2fs_inode *ri; ipage = get_node_page(F2FS_I_SB(inode), inode->i_ino); f2fs_bug_on(F2FS_I_SB(inode), IS_ERR(ipage)); ri = F2FS_INODE(page); if (!(ri->i_inline & F2FS_IN...
0
[ "CWE-200", "CWE-362" ]
linux
30a61ddf8117c26ac5b295e1233eaa9629a94ca3
147,663,958,567,804,120,000,000,000,000,000,000,000
26
f2fs: fix race condition in between free nid allocator/initializer In below concurrent case, allocated nid can be loaded into free nid cache and be allocated again. Thread A Thread B - f2fs_create - f2fs_new_inode - alloc_nid - __insert_nid_to_list(ALLOC_NID_LIST) - f2fs_balance_fs_bg - build_free...
struct razer_report razer_chroma_standard_get_serial(void) { return get_razer_report(0x00, 0x82, 0x16); }
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
299,180,668,897,691,900,000,000,000,000,000,000,000
4
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
void RemoteFsDevice::saveOptions() { opts.save(id()); }
0
[ "CWE-20", "CWE-22" ]
cantata
afc4f8315d3e96574925fb530a7004cc9e6ce3d3
236,201,154,765,003,550,000,000,000,000,000,000,000
4
Remove internal Samba shre mounting code, this had some privilege escalation issues, and is not well tested
static int vhost_net_release(struct inode *inode, struct file *f) { struct vhost_net *n = f->private_data; struct socket *tx_sock; struct socket *rx_sock; vhost_net_stop(n, &tx_sock, &rx_sock); vhost_net_flush(n); vhost_dev_stop(&n->dev); vhost_dev_cleanup(&n->dev, false); vhost_net_vq_reset(n); if (tx_sock) ...
0
[ "CWE-787" ]
linux
e2b3b35eb9896f26c98b9a2c047d9111638059a2
247,645,655,097,494,900,000,000,000,000,000,000,000
25
vhost_net: batch used ring update in rx This patch tries to batched used ring update during RX. This is pretty fit for the case when guest is much faster (e.g dpdk based backend). In this case, used ring is almost empty: - we may get serious cache line misses/contending on both used ring and used idx. - at most 1 p...
void mysql_detach_stmt_list(LIST **stmt_list __attribute__((unused)), const char *func_name __attribute__((unused))) { #ifdef MYSQL_CLIENT /* Reset connection handle in all prepared statements. */ LIST *element= *stmt_list; char buff[MYSQL_ERRMSG_SIZE]; DBUG_ENTER("mysql_detach_stmt...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
292,738,473,907,642,900,000,000,000,000,000,000,000
21
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
onig_compile(regex_t* reg, const UChar* pattern, const UChar* pattern_end, OnigErrorInfo* einfo) { #define COMPILE_INIT_SIZE 20 int r, init_size; Node* root; ScanEnv scan_env; #ifdef USE_CALL UnsetAddrList uslist; #endif root = 0; if (IS_NOT_NULL(einfo)) { einfo->enc = reg->enc; e...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
104,265,155,398,366,440,000,000,000,000,000,000,000
171
fix #87: Read unknown address in onig_error_code_to_str()
dissect_kafka_add_partitions_to_txn_response_topic(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, kafka_api_version_t api_version _U_) { int topic_start, topic_len; proto_item *subti, *subsubti; proto_tree *subtree, *subsubtree; subtree = pr...
0
[ "CWE-401" ]
wireshark
f4374967bbf9c12746b8ec3cd54dddada9dd353e
254,047,157,537,436,800,000,000,000,000,000,000,000
23
Kafka: Limit our decompression size. Don't assume that the Internet has our best interests at heart when it gives us the size of our decompression buffer. Assign an arbitrary limit of 50 MB. This fixes #16739 in that it takes care of ** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac...
static int send_pptp_start_ctrl_conn_rply(struct pptp_conn_t *conn, int res_code, int err_code) { struct pptp_start_ctrl_conn msg = { .header = PPTP_HEADER_CTRL(PPTP_START_CTRL_CONN_RPLY), .version = htons(PPTP_VERSION), .result_code = res_code, .error_code = err_code, .framing_cap = htonl(PPTP_FRAME_ANY), ...
0
[ "CWE-787" ]
accel-ppp
a0b8bfc4e74ff31b15ccfa6c626e3bbc591ba98f
84,762,963,380,106,640,000,000,000,000,000,000,000
24
Fix post_msg implementation bug I think the error handling code of `post_msg` is wrongly implemented due to coding typo. The `EPIPE` should be also considered and then return -1, just like `PPTP_write`: https://github.com/xebd/accel-ppp/blob/1b8711cf75a7c278d99840112bc7a396398e0205/accel-pppd/ctrl/pptp/pptp.c#L539-L5...
bool check_has_uncommitted_xa() const { if (xa_state == XA_IDLE || xa_state == XA_PREPARED || xa_state == XA_ROLLBACK_ONLY) { my_error(ER_XAER_RMFAIL, MYF(0), xa_state_names[xa_state]); return true; } return false; }
0
[ "CWE-416" ]
server
4681b6f2d8c82b4ec5cf115e83698251963d80d5
246,921,160,894,733,480,000,000,000,000,000,000,000
11
MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, t...
void MDSDaemon::dump_status(Formatter *f) { f->open_object_section("status"); f->dump_stream("cluster_fsid") << monc->get_fsid(); if (mds_rank) { f->dump_int("whoami", mds_rank->get_nodeid()); } else { f->dump_int("whoami", MDS_RANK_NONE); } f->dump_int("id", monc->get_global_id()); f->dump_strin...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
208,746,002,045,312,460,000,000,000,000,000,000,000
32
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 ...
**/ CImg<T>& threshold(const T& value, const bool soft_threshold=false, const bool strict_threshold=false) { if (is_empty()) return *this; if (strict_threshold) { if (soft_threshold) cimg_pragma_openmp(parallel for cimg_openmp_if(size()>=32768)) cimg_rof(*this,ptrd,T) { ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
179,405,445,517,843,280,000,000,000,000,000,000,000
25
Fix other issues in 'CImg<T>::load_bmp()'.
static int set_sync_ep_implicit_fb_quirk(struct snd_usb_substream *subs, struct usb_device *dev, struct usb_interface_descriptor *altsd, unsigned int attr) { struct usb_host_interface *alts; struct usb_interface *iface; unsigned int ep; /* Implicit feedback sync EPs consumers are always playback ...
0
[]
sound
447d6275f0c21f6cc97a88b3a0c601436a4cdf2a
149,842,363,246,156,350,000,000,000,000,000,000,000
61
ALSA: usb-audio: Add sanity checks for endpoint accesses Add some sanity check codes before actually accessing the endpoint via get_endpoint() in order to avoid the invalid access through a malformed USB descriptor. Mostly just checking bNumEndpoints, but in one place (snd_microii_spdif_default_get()), the validity o...