func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static unsigned checkColorValidity(LodePNGColorType colortype, unsigned bd) /*bd = bitdepth*/ { switch(colortype) { case 0: if(!(bd == 1 || bd == 2 || bd == 4 || bd == 8 || bd == 16)) return 37; break; /*grey*/ case 2: if(!( bd == 8 || bd == 16)) return 37; break; /*RGB*/ ...
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
267,631,510,410,624,540,000,000,000,000,000,000,000
13
Fixed #5645: realloc return handling
static inline void perf_cgroup_sched_in(struct task_struct *prev, struct task_struct *task) { }
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
50,724,587,973,421,830,000,000,000,000,000,000,000
4
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
static noinline int do_no_pfn(struct mm_struct *mm, struct vm_area_struct *vma, unsigned long address, pte_t *page_table, pmd_t *pmd, int write_access) { spinlock_t *ptl; pte_t entry; unsigned long pfn; pte_unmap(page_table); BUG_ON(!(vma->vm_flags & (VM_PFNMAP|VM_MIXEDMAP))); BUG_ON((vma->vm_flags...
0
[ "CWE-20" ]
linux-2.6
89f5b7da2a6bad2e84670422ab8192382a5aeb9f
152,211,791,974,505,860,000,000,000,000,000,000,000
35
Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit 557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed the ZERO_PAGE from the VM mappings, any users of get_user_pages() will generally now populate the VM with real emp...
R_API RAnalVar *r_anal_var_get_dst_var(RAnalVar *var) { r_return_val_if_fail (var, NULL); RAnalVarAccess *acc; r_vector_foreach (&var->accesses, acc) { if (!(acc->type & R_ANAL_VAR_ACCESS_TYPE_READ)) { continue; } ut64 addr = var->fcn->addr + acc->offset; RPVector *used_vars = r_anal_function_get_vars_use...
0
[ "CWE-416" ]
radare2
a7ce29647fcb38386d7439696375e16e093d6acb
183,080,317,220,067,240,000,000,000,000,000,000,000
23
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...
save_text(const char *fmt, const char *s, int len) { size_t s_len = strlen(s); if (len > (int) s_len) s_len = (size_t) len; get_space(s_len + 1); _nc_SPRINTF(TPS(out_buff) + TPS(out_used), _nc_SLIMIT(TPS(out_size) - TPS(out_used)) fmt, s); TPS(out_used) += strlen(TPS(out_buff) + TPS(out_used)...
1
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
194,385,710,518,180,960,000,000,000,000,000,000,000
13
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
manager_suspend_jobs (GSManager *manager) { if (manager->priv->jobs != NULL) { g_hash_table_foreach (manager->priv->jobs, (GHFunc) suspend_job, manager); } }
0
[]
gnome-screensaver
2f597ea9f1f363277fd4dfc109fa41bbc6225aca
96,342,393,241,933,640,000,000,000,000,000,000,000
6
Fix adding monitors Make sure to show windows that are added. And fix an off by one bug.
static int ZEND_FASTCALL ZEND_FETCH_DIM_FUNC_ARG_SPEC_VAR_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); zend_free_op free_op1, free_op2; zval *dim = _get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC); zval **container; if (ARG_SHOULD_BE_SENT_BY_REF(EX(fbc), opline->extended_valu...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
44,919,616,702,141,320,000,000,000,000,000,000,000
35
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
inline size_t WireFormatLite::UInt64SizePlusOne(uint64_t value) { return io::CodedOutputStream::VarintSize64PlusOne(value); }
0
[ "CWE-703" ]
protobuf
d1635e1496f51e0d5653d856211e8821bc47adc4
124,582,417,115,879,820,000,000,000,000,000,000,000
3
Apply patch
ZEND_VM_COLD_CONSTCONST_HANDLER(11, ZEND_BW_XOR, CONST|TMPVARCV, CONST|TMPVARCV, SPEC(COMMUTATIVE)) { USE_OPLINE zend_free_op free_op1, free_op2; zval *op1, *op2; op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R); op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R); if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) { ...
0
[ "CWE-787" ]
php-src
f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d
272,354,039,582,948,900,000,000,000,000,000,000,000
18
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 inline int ReadPropertyByte(const unsigned char **p,size_t *length) { int c; if (*length < 1) return(EOF); c=(int) (*(*p)++); (*length)--; return(c); }
0
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
62,609,589,471,177,350,000,000,000,000,000,000,000
11
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
static void module_remove_modinfo_attrs(struct module *mod, int end) { }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
144,561,392,471,323,310,000,000,000,000,000,000,000
3
module: limit enabling module.sig_enforce Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying "module.sig_enforce=1" on the boot command line sets "sig_enforce". Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured. This patch makes the presence of /sys/module/module/parameters/s...
Status GetErrorOptions(OpKernelConstruction* ctx, ErrorOptions* out) { *out = ErrorOptions(); string error_policy; TF_RETURN_IF_ERROR(ctx->GetAttr("errors", &error_policy)); if (error_policy == "replace") { out->elide_replacement = false; } else if (error_policy == "ignore") { out->elide_replacement...
0
[ "CWE-125", "CWE-787" ]
tensorflow
51300ba1cc2f487aefec6e6631fef03b0e08b298
82,707,886,515,938,830,000,000,000,000,000,000,000
35
Fix heap buffer overflow in tf.raw_ops.UnicodeEncode. PiperOrigin-RevId: 371717714 Change-Id: If33443b28f158e58078f1268f6b92f2728d219e0
static int rebuild_table(char *name) { char *query, *ptr; int rc= 0; query= (char*)my_malloc(PSI_NOT_INSTRUMENTED, sizeof(char) * (12 + fixed_name_length(name) + 6 + 1), MYF(MY_WME)); if (!query) return 1; ptr= my_stpcpy(query, "ALTER TABLE "); ptr= fi...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
141,765,536,653,145,240,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...
lzw_result lzw_decode(struct lzw_ctx *ctx, const uint8_t ** const stack_pos_out) { lzw_result res; uint32_t code_new; uint32_t code_out; uint8_t last_value; uint8_t *stack_pos = ctx->stack_base; uint32_t clear_code = ctx->clear_code; uint32_t current_entry = ctx->current_entry; struct lzw_dictionary_entry * c...
0
[ "CWE-125", "CWE-787" ]
chafa
e6ce3746cdcf0836b9dae659a5aed15d73a080d8
279,736,870,767,791,500,000,000,000,000,000,000,000
81
libnsgif: fix oob in lzw_decode
static int check_ld_abs(struct bpf_verifier_env *env, struct bpf_insn *insn) { struct bpf_reg_state *regs = cur_regs(env); u8 mode = BPF_MODE(insn->code); int i, err; if (!may_access_skb(env->prog->type)) { verbose(env, "BPF_LD_[ABS|IND] instructions not allowed for this program type\n"); return -EINVAL; } ...
0
[ "CWE-20" ]
linux
c131187db2d3fa2f8bf32fdf4e9a4ef805168467
126,283,989,794,635,400,000,000,000,000,000,000,000
49
bpf: fix branch pruning logic when the verifier detects that register contains a runtime constant and it's compared with another constant it will prune exploration of the branch that is guaranteed not to be taken at runtime. This is all correct, but malicious program may be constructed in such a way that it always has...
static void i40e_fdir_teardown(struct i40e_pf *pf) { struct i40e_vsi *vsi; i40e_fdir_filter_exit(pf); vsi = i40e_find_vsi_by_type(pf, I40E_VSI_FDIR); if (vsi) i40e_vsi_release(vsi); }
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
12,499,091,714,100,330,000,000,000,000,000,000,000
9
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
uint SSL::bufferedData() { return STL::for_each(buffers_.getData().begin(),buffers_.getData().end(), SumData()).total_; }
0
[ "CWE-254" ]
mysql-server
e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69
57,829,561,146,205,010,000,000,000,000,000,000,000
5
Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED.
void CLASS get_timestamp (int reversed) { struct tm t; char str[20]; int i; str[19] = 0; if (reversed) for (i=19; i--; ) str[i] = fgetc(ifp); else fread (str, 19, 1, ifp); memset (&t, 0, sizeof t); if (sscanf (str, "%d:%d:%d %d:%d:%d", &t.tm_year, &t.tm_mon, &t.tm_mday, &t.tm_hour, &t.tm_min, ...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
31,987,896,769,199,490,000,000,000,000,000,000,000
21
cumulated data checks patch
static char *__filterShell(const char *arg) { r_return_val_if_fail (arg, NULL); char *a = malloc (strlen (arg) + 1); if (!a) { return NULL; } char *b = a; while (*arg) { char ch = *arg; switch (ch) { case '@': case '`': case '|': case ';': case '=': case '\n': break; default: *b++ = ch; ...
0
[ "CWE-78" ]
radare2
5411543a310a470b1257fb93273cdd6e8dfcb3af
98,406,836,280,516,600,000,000,000,000,000,000,000
26
More fixes for the CVE-2019-14745
enum ha_base_keytype key_type() const { return HA_KEYTYPE_BINARY; }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
214,806,340,164,138,780,000,000,000,000,000,000,000
1
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
void __dev_set_rx_mode(struct net_device *dev) { const struct net_device_ops *ops = dev->netdev_ops; /* dev_open will call this function so the list will stay sane. */ if (!(dev->flags&IFF_UP)) return; if (!netif_device_present(dev)) return; if (ops->ndo_set_rx_mode) ops->ndo_set_rx_mode(dev); else { /...
0
[ "CWE-399" ]
linux
6ec82562ffc6f297d0de36d65776cff8e5704867
119,347,841,365,937,170,000,000,000,000,000,000,000
29
veth: Dont kfree_skb() after dev_forward_skb() In case of congestion, netif_rx() frees the skb, so we must assume dev_forward_skb() also consume skb. Bug introduced by commit 445409602c092 (veth: move loopback logic to common location) We must change dev_forward_skb() to always consume skb, and veth to not double fr...
static inline double MagickRound(double x) { /* Round the fraction to nearest integer. */ if ((x-floor(x)) < (ceil(x)-x)) return(floor(x)); return(ceil(x)); }
1
[ "CWE-190" ]
ImageMagick
64dc80b2e1907f7f20bf34d4df9483f938b0de71
248,761,879,110,927,260,000,000,000,000,000,000,000
9
https://github.com/ImageMagick/ImageMagick/issues/1731
rb_str_ljust(argc, argv, str) int argc; VALUE *argv; VALUE str; { return rb_str_justify(argc, argv, str, 'l'); }
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
274,078,305,122,659,300,000,000,000,000,000,000,000
7
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
*/ static struct bfq_io_cq *bfq_bic_lookup(struct bfq_data *bfqd, struct io_context *ioc, struct request_queue *q) { if (ioc) { unsigned long flags; struct bfq_io_cq *icq; spin_lock_irqsave(&q->queue_lock, flags); icq = icq_to_bic(ioc_lookup_icq(ioc, q)); spin_unlock_irqrestore(&q->queue_lock, fl...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
41,241,310,609,717,270,000,000,000,000,000,000,000
17
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
static void bdrv_dev_change_media_cb(BlockDriverState *bs, bool load) { if (bs->dev_ops && bs->dev_ops->change_media_cb) { bool tray_was_closed = !bdrv_dev_is_tray_open(bs); bs->dev_ops->change_media_cb(bs->dev_opaque, load); if (tray_was_closed) { /* tray open */ bdr...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
208,519,933,896,431,140,000,000,000,000,000,000,000
15
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
CModule::EModRet CModule::OnPrivCTCPMessage(CCTCPMessage& Message) { CString sText = Message.GetText(); EModRet ret = OnPrivCTCP(Message.GetNick(), sText); Message.SetText(sText); return ret; }
0
[ "CWE-20", "CWE-264" ]
znc
8de9e376ce531fe7f3c8b0aa4876d15b479b7311
169,283,862,741,569,230,000,000,000,000,000,000,000
6
Fix remote code execution and privilege escalation vulnerability. To trigger this, need to have a user already. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. CVE-2019-12816
SYSCALL_DEFINE4(wait4, pid_t, upid, int __user *, stat_addr, int, options, struct rusage __user *, ru) { struct rusage r; long err = kernel_wait4(upid, stat_addr, options, ru ? &r : NULL); if (err > 0) { if (ru && copy_to_user(ru, &r, sizeof(struct rusage))) return -EFAULT; } return err; }
0
[ "CWE-200", "CWE-284" ]
linux
6c85501f2fabcfc4fc6ed976543d252c4eaf4be9
138,815,172,941,561,210,000,000,000,000,000,000,000
12
fix infoleak in waitid(2) kernel_waitid() can return a PID, an error or 0. rusage is filled in the first case and waitid(2) rusage should've been copied out exactly in that case, *not* whenever kernel_waitid() has not returned an error. Compat variant shares that braino; none of kernel_wait4() callers do, so the bel...
xfs_inode_match_id_union( struct xfs_inode *ip, struct xfs_eofblocks *eofb) { if ((eofb->eof_flags & XFS_EOF_FLAGS_UID) && uid_eq(VFS_I(ip)->i_uid, eofb->eof_uid)) return 1; if ((eofb->eof_flags & XFS_EOF_FLAGS_GID) && gid_eq(VFS_I(ip)->i_gid, eofb->eof_gid)) return 1; if ((eofb->eof_flags & XFS_EO...
0
[ "CWE-476" ]
linux
afca6c5b2595fc44383919fba740c194b0b76aff
137,809,194,044,039,420,000,000,000,000,000,000,000
18
xfs: validate cached inodes are free when allocated A recent fuzzed filesystem image cached random dcache corruption when the reproducer was run. This often showed up as panics in lookup_slow() on a null inode->i_ops pointer when doing pathwalks. BUG: unable to handle kernel NULL pointer dereference at 00000000000000...
static void svm_disable_lbrv(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); svm->vmcb->control.virt_ext &= ~LBR_CTL_ENABLE_MASK; set_msr_interception(vcpu, svm->msrpm, MSR_IA32_LASTBRANCHFROMIP, 0, 0); set_msr_interception(vcpu, svm->msrpm, MSR_IA32_LASTBRANCHTOIP, 0, 0); set_msr_interception(vcpu,...
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
144,761,670,634,296,330,000,000,000,000,000,000,000
10
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
static int recv_stream(struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t buf_len, int flags) { struct sock *sk = sock->sk; struct tipc_port *tport = tipc_sk_port(sk); struct sk_buff *buf; struct tipc_msg *msg; long timeout; unsigned int sz; int sz_to_copy, target, needed; int sz_copied ...
1
[ "CWE-200" ]
linux
60085c3d009b0df252547adb336d1ccca5ce52ec
231,601,799,881,460,870,000,000,000,000,000,000,000
117
tipc: fix info leaks via msg_name in recv_msg/recv_stream The code in set_orig_addr() does not initialize all of the members of struct sockaddr_tipc when filling the sockaddr info -- namely the union is only partly filled. This will make recv_msg() and recv_stream() -- the only users of this function -- leak kernel st...
static int if6_seq_show(struct seq_file *seq, void *v) { struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v; seq_printf(seq, "%pi6 %02x %02x %02x %02x %8s\n", &ifp->addr, ifp->idev->dev->ifindex, ifp->prefix_len, ifp->scope, (u8) ifp->flags, ifp->idev->dev->name); return 0; }
0
[ "CWE-20" ]
linux
77751427a1ff25b27d47a4c36b12c3c8667855ac
3,344,868,628,665,985,000,000,000,000,000,000,000
12
ipv6: addrconf: validate new MTU before applying it Currently we don't check if the new MTU is valid or not and this allows one to configure a smaller than minimum allowed by RFCs or even bigger than interface own MTU, which is a problem as it may lead to packet drops. If you have a daemon like NetworkManager running...
int EC_POINT_copy(EC_POINT *dest, const EC_POINT *src) { if (dest->meth->point_copy == 0) { ECerr(EC_F_EC_POINT_COPY, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED); return 0; } if (dest->meth != src->meth) { ECerr(EC_F_EC_POINT_COPY, EC_R_INCOMPATIBLE_OBJECTS); return 0; } if (d...
0
[]
openssl
21c856b75d81eff61aa63b4f036bb64a85bf6d46
109,037,701,953,508,370,000,000,000,000,000,000,000
14
[crypto/ec] for ECC parameters with NULL or zero cofactor, compute it The cofactor argument to EC_GROUP_set_generator is optional, and SCA mitigations for ECC currently use it. So the library currently falls back to very old SCA-vulnerable code if the cofactor is not present. This PR allows EC_GROUP_set_generator to ...
PHP_XML_API zend_string *xml_utf8_encode(const char *s, size_t len, const XML_Char *encoding) { size_t pos = len; zend_string *str; unsigned int c; unsigned short (*encoder)(unsigned char) = NULL; xml_encoding *enc = xml_get_encoding(encoding); if (enc) { encoder = enc->encoding_function; } else { /* If the...
0
[ "CWE-190" ]
php-src
57b997ebf99e0eb9a073e0dafd2ab100bd4a112d
59,617,174,640,089,630,000,000,000,000,000,000,000
48
Fix bug #71637: Multiple Heap Overflow due to integer overflows
static void calipso_cache_entry_free(struct calipso_map_cache_entry *entry) { if (entry->lsm_data) netlbl_secattr_cache_free(entry->lsm_data); kfree(entry->key); kfree(entry); }
0
[ "CWE-416" ]
linux
ad5d07f4a9cd671233ae20983848874731102c08
231,836,559,314,470,070,000,000,000,000,000,000,000
7
cipso,calipso: resolve a number of problems with the DOI refcounts The current CIPSO and CALIPSO refcounting scheme for the DOI definitions is a bit flawed in that we: 1. Don't correctly match gets/puts in netlbl_cipsov4_list(). 2. Decrement the refcount on each attempt to remove the DOI from the DOI list, only re...
_unlock_suspend_job(uint32_t job_id) { int i; slurm_mutex_lock(&suspend_mutex); for (i = 0; i < job_suspend_size; i++) { if (job_suspend_array[i] == job_id) job_suspend_array[i] = 0; } slurm_mutex_unlock(&suspend_mutex); }
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
235,129,089,573,104,700,000,000,000,000,000,000,000
10
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
CImg<T>& load_jpeg(std::FILE *const file) { return _load_jpeg(file,0); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
332,971,068,842,870,840,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.
static int _nfs4_proc_destroy_clientid(struct nfs_client *clp, const struct cred *cred) { struct rpc_message msg = { .rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_DESTROY_CLIENTID], .rpc_argp = clp, .rpc_cred = cred, }; int status; status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT | R...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
218,443,526,268,163,420,000,000,000,000,000,000,000
18
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
static void StrRtrim(char *pStr) { int i = str_length(pStr); while(i >= 0) { if(pStr[i] < 0 || pStr[i] > 32) break; pStr[i] = 0; i--; } }
0
[ "CWE-20" ]
teeworlds
a766cb44bcffcdb0b88e776d01c5ee1323d44f85
281,222,319,526,676,520,000,000,000,000,000,000,000
11
fixed a server crash
static Bool vvc_parse_nal_header(GF_BitStream *bs, u8 *nal_unit_type, u8 *temporal_id, u8 *layer_id) { u32 val; val = gf_bs_read_int_log(bs, 1, "forbidden_zero"); if (val) return GF_FALSE; val = gf_bs_read_int_log(bs, 1, "resevred0"); if (val) return GF_FALSE; val = gf_bs_read_int_log(bs, 6, "layerID"); if (lay...
0
[ "CWE-190", "CWE-787" ]
gpac
51cdb67ff7c5f1242ac58c5aa603ceaf1793b788
158,416,484,326,483,070,000,000,000,000,000,000,000
20
add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722
void f2fs_quota_off_umount(struct super_block *sb) { }
0
[ "CWE-20" ]
linux
638164a2718f337ea224b747cf5977ef143166a4
69,778,536,553,576,810,000,000,000,000,000,000,000
3
f2fs: fix potential panic during fstrim As Ju Hyung Park reported: "When 'fstrim' is called for manual trim, a BUG() can be triggered randomly with this patch. I'm seeing this issue on both x86 Desktop and arm64 Android phone. On x86 Desktop, this was caused during Ubuntu boot-up. I have a cronjob installed which c...
void unit_add_to_cleanup_queue(Unit *u) { assert(u); if (u->in_cleanup_queue) return; LIST_PREPEND(cleanup_queue, u->manager->cleanup_queue, u); u->in_cleanup_queue = true; }
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
229,930,332,434,022,930,000,000,000,000,000,000,000
9
core: imply NNP and SUID/SGID restriction for DynamicUser=yes service Let's be safe, rather than sorry. This way DynamicUser=yes services can neither take benefit of, nor create SUID/SGID binaries. Given that DynamicUser= is a recent addition only we should be able to get away with turning this on, even though this i...
SYSCALL_DEFINE2(creat, const char __user *, pathname, int, mode) { return sys_open(pathname, O_CREAT | O_WRONLY | O_TRUNC, mode); }
0
[ "CWE-732" ]
linux-stable
e57712ebebbb9db7d8dcef216437b3171ddcf115
301,666,436,726,167,170,000,000,000,000,000,000,000
4
merge fchmod() and fchmodat() guts, kill ancient broken kludge The kludge in question is undocumented and doesn't work for 32bit binaries on amd64, sparc64 and s390. Passing (mode_t)-1 as mode had (since 0.99.14v and contrary to behaviour of any other Unix, prescriptions of POSIX, SuS and our own manpages) was kinda-...
hash_findi_add(struct hash_table *hash, const char *str) { struct hash_insert hi; void **r; char *strx; size_t l = strlen(str) + 1; r = hash_findib(hash, str, l, &hi); if (r) return r; strx = nasm_malloc(l); /* Use a more efficient allocator here? */ memcpy(strx, str, l); ...
0
[]
nasm
6299a3114ce0f3acd55d07de201a8ca2f0a83059
285,966,705,720,397,730,000,000,000,000,000,000,000
15
BR 3392708: fix NULL pointer reference for invalid %stacksize After issuing an error message for a missing %stacksize argument, need to quit rather than continuing to try to access the pointer. Fold uses of tok_text() while we are at it. Reported-by: Suhwan <prada960808@gmail.com> Signed-off-by: H. Peter Anvin (Inte...
static int usb_host_find_device_scan(void *opaque, int bus_num, int addr, int class_id, int vendor_id, int product_id, const char *product_name, int speed) { FindDeviceState *s = opaque; if ((vendor_id...
0
[ "CWE-119" ]
qemu
babd03fde68093482528010a5435c14ce9128e3f
64,857,469,708,206,150,000,000,000,000,000,000,000
18
usb-linux.c: fix buffer overflow In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and length to the kernel. However, the length was provided by the caller of dev->handle_packet, and is not checked, so the kernel might provide too much data and overflow our buffer. For example, hw/usb-uhci.c could s...
int snd_usb_create_quirk(struct snd_usb_audio *chip, struct usb_interface *iface, struct usb_driver *driver, const struct snd_usb_audio_quirk *quirk) { typedef int (*quirk_func_t)(struct snd_usb_audio *, struct usb_interface *, struct usb_driver *, const struct snd_usb_audio_quirk *...
0
[]
sound
0f886ca12765d20124bd06291c82951fd49a33be
216,142,886,301,697,660,000,000,000,000,000,000,000
39
ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() create_fixed_stream_quirk() may cause a NULL-pointer dereference by accessing the non-existing endpoint when a USB device with a malformed USB descriptor is used. This patch avoids it simply by adding a sanity check of bNumEndpoints before the acces...
static void DestroyTIFFInfo(TIFFInfo *tiff_info) { assert(tiff_info != (TIFFInfo *) NULL); if (tiff_info->scanlines != (unsigned char *) NULL) tiff_info->scanlines=(unsigned char *) RelinquishMagickMemory( tiff_info->scanlines); if (tiff_info->pixels != (unsigned char *) NULL) tiff_info->pixels=(uns...
0
[ "CWE-125" ]
ImageMagick
803bc34ebe023f209f745baf8a112610ff77cc8c
263,610,622,477,452,960,000,000,000,000,000,000,000
10
Prevent possible buffer overflow when reading TIFF images (bug report from Shi Pu of MS509 Team)
void ssl3_free(SSL *s) { if(s == NULL) return; #ifdef TLSEXT_TYPE_opaque_prf_input if (s->s3->client_opaque_prf_input != NULL) OPENSSL_free(s->s3->client_opaque_prf_input); if (s->s3->server_opaque_prf_input != NULL) OPENSSL_free(s->s3->server_opaque_prf_input); #endif ssl3_cleanup_key_block(s); if (s-...
1
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
266,060,707,097,682,460,000,000,000,000,000,000,000
38
Add SRP support.
int mp_safe(lua_State *L) { int argc, err, total_results; argc = lua_gettop(L); /* This adds our function to the bottom of the stack * (the "call this function" position) */ lua_pushvalue(L, lua_upvalueindex(1)); lua_insert(L, 1); err = lua_pcall(L, argc, LUA_MULTRET, 0); total_resul...
0
[ "CWE-119", "CWE-787" ]
redis
52a00201fca331217c3b4b8b634f6a0f57d6b7d3
112,398,110,339,965,930,000,000,000,000,000,000,000
21
Security: fix Lua cmsgpack library stack overflow. During an auditing effort, the Apple Vulnerability Research team discovered a critical Redis security issue affecting the Lua scripting part of Redis. -- Description of the problem Several years ago I merged a pull request including many small changes at the Lua Msg...
static void mincore_hugetlb_page_range(struct vm_area_struct *vma, unsigned long addr, unsigned long end, unsigned char *vec) { #ifdef CONFIG_HUGETLB_PAGE struct hstate *h; h = hstate_vma(vma); while (1) { unsigned char present; pte_t *ptep; /* * Huge pages are always in RAM for now, but * theor...
0
[ "CWE-264" ]
linux-2.6
1a5a9906d4e8d1976b701f889d8f35d54b928f25
290,534,915,471,951,320,000,000,000,000,000,000,000
33
mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode In some cases it may happen that pmd_none_or_clear_bad() is called with the mmap_sem hold in read mode. In those cases the huge page faults can allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a false positive from pmd_bad(...
static inline bool f2fs_crc_valid(struct f2fs_sb_info *sbi, __u32 blk_crc, void *buf, size_t buf_size) { return f2fs_crc32(sbi, buf, buf_size) == blk_crc; }
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
236,216,118,456,117,400,000,000,000,000,000,000,000
5
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
DeepTiledInputFile::fileName () const { return _data->_streamData->is->fileName(); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
52,234,064,414,050,400,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 inline int calculate_order(unsigned int size) { unsigned int order; unsigned int min_objects; unsigned int max_objects; /* * Attempt to find best configuration for a slab. This * works by first attempting to generate a layout with * the best configuration and backing off gradually. * * First we in...
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
275,961,735,797,856,200,000,000,000,000,000,000,000
50
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
CImg<T> operator^(const t value) const { return (+*this)^=value; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
18,487,476,442,828,055,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.
absl::optional<CelValue> convertHeaderEntry(const Http::HeaderEntry* header) { if (header == nullptr) { return {}; } return CelValue::CreateString(header->value().getStringView()); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
145,556,871,861,965,750,000,000,000,000,000,000,000
6
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...
int tls1_process_ticket(SSL *s, unsigned char *session_id, int len, const unsigned char *limit, SSL_SESSION **ret) { /* Point after session ID in client hello */ const unsigned char *p = session_id + len; unsigned short i; *ret = NULL; s->tlsext_ticket_expected = 0; /* If tickets disabled behave as if no ti...
0
[]
openssl
80bd7b41b30af6ee96f519e629463583318de3b0
121,079,811,867,647,490,000,000,000,000,000,000,000
86
Fix SRP ciphersuite DoS vulnerability. If a client attempted to use an SRP ciphersuite and it had not been set up correctly it would crash with a null pointer read. A malicious server could exploit this in a DoS attack. Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon for reporting this issue. CVE-201...
static void parse_abouble_date2(void **state) { TALLOC_CTX *frame = *state; struct adouble *ad = NULL; ad = parse_adouble(frame, ad_date2, sizeof(ad_date2), 0x52); assert_null(ad); return; }
0
[ "CWE-787" ]
samba
4533a7b4319cd95815d2dcd5fe5075539fb850e5
184,821,939,299,649,200,000,000,000,000,000,000,000
10
CVE-2021-44142: libadouble: add basic cmocka tests BUG: https://bugzilla.samba.org/show_bug.cgi?id=14914 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> [slow@samba.org: conflict due to missing test in selftest/tests.py]
static inline int handle_metadata_errors(req_state* const s, const int op_ret) { if (op_ret == -EFBIG) { /* Handle the custom error message of exceeding maximum custom attribute * (stored as xattr) size. */ const auto error_message = boost::str( boost::format("Metadata value longer than %lld") ...
0
[ "CWE-617" ]
ceph
f44a8ae8aa27ecef69528db9aec220f12492810e
339,559,037,910,041,770,000,000,000,000,000,000,000
20
rgw: RGWSwiftWebsiteHandler::is_web_dir checks empty subdir_name checking for empty name avoids later assertion in RGWObjectCtx::set_atomic Fixes: CVE-2021-3531 Reviewed-by: Casey Bodley <cbodley@redhat.com> Signed-off-by: Casey Bodley <cbodley@redhat.com> (cherry picked from commit 7196a469b4470f3c8628489df9a41ec8b...
static unsigned long segment_base(u16 selector) { struct desc_ptr *gdt = &__get_cpu_var(host_gdt); struct desc_struct *d; unsigned long table_base; unsigned long v; if (!(selector & ~3)) return 0; table_base = gdt->address; if (selector & 4) { /* from ldt */ u16 ldt_selector = kvm_read_ldt(); ...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
42,886,105,970,926,055,000,000,000,000,000,000,000
28
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
GF_Err hnti_Write(GF_Box *s, GF_BitStream *bs) { return gf_isom_box_write_header(s, bs); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
91,676,979,688,435,100,000,000,000,000,000,000,000
4
prevent dref memleak on invalid input (#1183)
static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags) { unsigned long vm_start, vm_end; bool exact_vma_exists = false; struct mm_struct *mm = NULL; struct task_struct *task; struct inode *inode; int status = 0; if (flags & LOOKUP_RCU) return -ECHILD; inode = d_inode(dentry); task = g...
0
[ "CWE-119" ]
linux
7f7ccc2ccc2e70c6054685f5e3522efa81556830
218,037,571,267,191,200,000,000,000,000,000,000,000
42
proc: do not access cmdline nor environ from file-backed areas proc_pid_cmdline_read() and environ_read() directly access the target process' VM to retrieve the command line and environment. If this process remaps these areas onto a file via mmap(), the requesting process may experience various issues such as extra de...
static void ok_jpg_decode_restart(ok_jpg_decoder *decoder) { decoder->restart_intervals_remaining = decoder->restart_intervals; for (int i = 0; i < decoder->num_scan_components; i++) { ok_jpg_component *c = decoder->components + decoder->scan_components[i]; c->pred = 0; c->eob_run = 0; ...
0
[ "CWE-787" ]
ok-file-formats
a9cc1711dd4ed6a215038f1c5c03af0ef52c3211
119,031,067,774,744,050,000,000,000,000,000,000,000
8
ok_jpg: Fix invalid DHT (#11)
uint8_t readByte() { return cursor_.template read<uint8_t>(); }
0
[ "CWE-400", "CWE-522", "CWE-674" ]
mcrouter
97e033b3bb0cb16b61bf49f0dc7f311a3e0edd1b
282,244,370,206,347,570,000,000,000,000,000,000,000
3
Attempt to make CarbonProtocolReader::skip tail recursive Reviewed By: edenzik Differential Revision: D17967570 fbshipit-source-id: fdc32e190a521349c7c8f4d6081902fa18eb0284
static OPJ_BOOL opj_tcd_rate_allocate_encode(opj_tcd_t *p_tcd, OPJ_BYTE * p_dest_data, OPJ_UINT32 p_max_dest_size, opj_codestream_info_t *p_cstr_info) { opj_cp_t * l_cp = p_tcd->cp; OPJ_UINT32 l_nb_written = 0; if (p_cstr_info) { p_cstr_info->index_write = 0; } if ...
0
[ "CWE-119", "CWE-787" ]
openjpeg
397f62c0a838e15d667ef50e27d5d011d2c79c04
163,571,525,544,271,370,000,000,000,000,000,000,000
27
Fix write heap buffer overflow in opj_mqc_byteout(). Discovered by Ke Liu of Tencent's Xuanwu LAB (#835)
[[noreturn]] void TProtocolException::throwUnionMissingStop() { throw TProtocolException( TProtocolException::INVALID_DATA, "missing stop marker to terminate a union"); }
0
[ "CWE-20", "CWE-703", "CWE-755" ]
fbthrift
c5d6e07588cd03061bc54d451a7fa6e84883d62b
57,987,372,108,292,350,000,000,000,000,000,000,000
5
Throw on bad types during skipping data Summary: The current code silently returns on bad types. In case when we have an invalid data, we may get a container of a large size with a bad type, this would lead to us running long loop doing nothing (though we already can say that the data is invalid). The new code would ...
QPDFFormFieldObjectHelper::getParent() { return this->oh.getKey("/Parent"); // may be null }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
78,576,441,874,080,460,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static double mp_image_stats(_cimg_math_parser& mp) { double *ptrd = &_mp_arg(1) + 1; unsigned int ind = (unsigned int)mp.opcode[2]; if (ind==~0U) CImg<doubleT>(ptrd,14,1,1,1,true) = mp.imgout.get_stats(); else { if (!mp.imglist.width()) return cimg::type<double...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
143,127,853,844,289,520,000,000,000,000,000,000,000
12
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
struct vfsmount *collect_mounts(struct path *path) { struct mount *tree; down_write(&namespace_sem); tree = copy_tree(real_mount(path->mnt), path->dentry, CL_COPY_ALL | CL_PRIVATE); up_write(&namespace_sem); if (IS_ERR(tree)) return NULL; return &tree->mnt; }
0
[ "CWE-284", "CWE-264" ]
linux
3151527ee007b73a0ebd296010f1c0454a919c7d
110,148,737,542,266,280,000,000,000,000,000,000,000
11
userns: Don't allow creation if the user is chrooted Guarantee that the policy of which files may be access that is established by setting the root directory will not be violated by user namespaces by verifying that the root directory points to the root of the mount namespace at the time of user namespace creation. ...
ipmi_lan_alert_set(struct ipmi_intf * intf, uint8_t chan, uint8_t alert, int argc, char ** argv) { struct lan_param * p; uint8_t data[32], temp[32]; int rc = 0; if (argc < 2) { print_lan_alert_set_usage(); return (-1); } if (strncmp(argv[0], "help", 4) == 0 || strncmp(argv[1], "help", 4) == 0) { ...
0
[ "CWE-120" ]
ipmitool
d45572d71e70840e0d4c50bf48218492b79c1a10
128,890,414,513,340,910,000,000,000,000,000,000,000
170
lanp: Fix buffer overflows in get_lan_param_select Partial fix for CVE-2020-5208, see https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp The `get_lan_param_select` function is missing a validation check on the response’s `data_len`, which it then returns to caller functions, where stack buff...
inflate_unzip_internal(STATE_PARAM transformer_state_t *xstate) { IF_DESKTOP(long long) int n = 0; ssize_t nwrote; /* Allocate all global buffers (for DYN_ALLOC option) */ gunzip_window = xmalloc(GUNZIP_WSIZE); gunzip_outbuf_count = 0; gunzip_bytes_out = 0; gunzip_src_fd = xstate->src_fd; /* (re) initialize s...
0
[ "CWE-476" ]
busybox
1de25a6e87e0e627aa34298105a3d17c60a1f44e
191,704,680,428,120,640,000,000,000,000,000,000,000
55
unzip: test for bad archive SEGVing function old new delta huft_build 1296 1300 +4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
static int ssl_check_ca_name(STACK_OF(X509_NAME) *names, X509 *x) { X509_NAME *nm; int i; nm = X509_get_issuer_name(x); for (i = 0; i < sk_X509_NAME_num(names); i++) { if(!X509_NAME_cmp(nm, sk_X509_NAME_value(names, i))) return 1; } return 0; }
0
[]
openssl
80bd7b41b30af6ee96f519e629463583318de3b0
317,457,009,618,580,870,000,000,000,000,000,000,000
12
Fix SRP ciphersuite DoS vulnerability. If a client attempted to use an SRP ciphersuite and it had not been set up correctly it would crash with a null pointer read. A malicious server could exploit this in a DoS attack. Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon for reporting this issue. CVE-201...
static int nl80211_nan_change_config(struct sk_buff *skb, struct genl_info *info) { struct cfg80211_registered_device *rdev = info->user_ptr[0]; struct wireless_dev *wdev = info->user_ptr[1]; struct cfg80211_nan_conf conf = {}; u32 changed = 0; if (wdev->iftype != NL80211_IFTYPE_NAN) return -EOPNOTSUPP...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
183,464,787,974,881,830,000,000,000,000,000,000,000
41
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
int kvm_vm_ioctl_get_dirty_log(struct kvm *kvm, struct kvm_dirty_log *log) { return -EINVAL; }
0
[ "CWE-399", "CWE-284" ]
linux
e8180dcaa8470ceca21109f143876fdcd9fe050a
43,246,998,712,474,440,000,000,000,000,000,000,000
4
ARM: KVM: prevent NULL pointer dereferences with KVM VCPU ioctl Some ARM KVM VCPU ioctls require the vCPU to be properly initialized with the KVM_ARM_VCPU_INIT ioctl before being used with further requests. KVM_RUN checks whether this initialization has been done, but other ioctls do not. Namely KVM_GET_REG_LIST will ...
sd_do_mode_sense(struct scsi_device *sdp, int dbd, int modepage, unsigned char *buffer, int len, struct scsi_mode_data *data, struct scsi_sense_hdr *sshdr) { return scsi_mode_sense(sdp, dbd, modepage, buffer, len, SD_TIMEOUT, SD_MAX_RETRIES, data, sshdr); }
0
[ "CWE-284", "CWE-264" ]
linux
0bfc96cb77224736dfa35c3c555d37b3646ef35e
26,887,351,450,127,830,000,000,000,000,000,000,000
8
block: fail SCSI passthrough ioctls on partition devices Linux allows executing the SG_IO ioctl on a partition or LVM volume, and will pass the command to the underlying block device. This is well-known, but it is also a large security problem when (via Unix permissions, ACLs, SELinux or a combination thereof) a prog...
__wsum __skb_checksum(const struct sk_buff *skb, int offset, int len, __wsum csum, const struct skb_checksum_ops *ops) { int start = skb_headlen(skb); int i, copy = start - offset; struct sk_buff *frag_iter; int pos = 0; /* Checksum header. */ if (copy > 0) { if (copy > len) copy = len; csum = ops...
0
[ "CWE-416" ]
net
36d5fe6a000790f56039afe26834265db0a3ad4c
82,531,838,417,255,710,000,000,000,000,000,000,000
69
core, nfqueue, openvswitch: Orphan frags in skb_zerocopy and handle errors skb_zerocopy can copy elements of the frags array between skbs, but it doesn't orphan them. Also, it doesn't handle errors, so this patch takes care of that as well, and modify the callers accordingly. skb_tx_error() is also added to the caller...
set_printer_attrs(cupsd_client_t *con, /* I - Client connection */ ipp_attribute_t *uri) /* I - Printer */ { http_status_t status; /* Policy status */ cups_ptype_t dtype; /* Destination type (printer/class) */ cupsd_printer_t *printer; /* Printer/class */ ipp_attribute_t *attr; /* Printe...
0
[ "CWE-20" ]
cups
49fa4983f25b64ec29d548ffa3b9782426007df3
129,177,284,798,440,950,000,000,000,000,000,000,000
96
DBUS notifications could crash the scheduler (Issue #5143) - scheduler/ipp.c: Make sure requesting-user-name string is valid UTF-8.
inline bool& network_mode(const bool value, const bool is_set) { static bool mode = true; if (is_set) { cimg::mutex(0); mode = value; cimg::mutex(0,0); } return mode; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
240,886,157,442,874,280,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
Item_sp::sp_check_access(THD *thd) { DBUG_ENTER("Item_sp::sp_check_access"); DBUG_ASSERT(m_sp); DBUG_RETURN(m_sp->check_execute_access(thd)); }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
278,560,117,862,447,700,000,000,000,000,000,000,000
6
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
template<typename tp, typename tf, typename tc, typename to> CImg<T>& draw_object3d(LibBoard::Board& board, const float x0, const float y0, const float z0, const CImg<tp>& vertices, const CImgList<tf>& primitives, const CImgList<tc...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
135,496,627,301,731,750,000,000,000,000,000,000,000
12
Fix other issues in 'CImg<T>::load_bmp()'.
virStoragePoolObjFromStoragePool(virStoragePoolPtr pool) { return storagePoolObjFindByUUID(pool->uuid, pool->name); }
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
33,900,068,122,567,960,000,000,000,000,000,000,000
4
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
g_socket_client_set_enable_proxy (GSocketClient *client, gboolean enable) { enable = !!enable; if (client->priv->enable_proxy == enable) return; client->priv->enable_proxy = enable; g_object_notify (G_OBJECT (client), "enable-proxy"); }
0
[ "CWE-754" ]
glib
d553d92d6e9f53cbe5a34166fcb919ba652c6a8e
138,757,849,492,884,000,000,000,000,000,000,000,000
10
gsocketclient: Fix criticals This ensures the parent GTask is kept alive as long as an enumeration is running and trying to connect. Closes #1646 Closes #1649
GF_Err stsd_Write(GF_Box *s, GF_BitStream *bs) { GF_Err e; u32 nb_entries; GF_SampleDescriptionBox *ptr = (GF_SampleDescriptionBox *)s; e = gf_isom_full_box_write(s, bs); if (e) return e; nb_entries = gf_list_count(ptr->other_boxes); gf_bs_write_u32(bs, nb_entries); return GF_OK; }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
211,525,874,275,599,140,000,000,000,000,000,000,000
12
prevent dref memleak on invalid input (#1183)
int get_devices_from_authfile(const char *authfile, const char *username, unsigned max_devs, int verbose, FILE *debug_file, device_t *devices, unsigned *n_devs) { char *buf = NULL; char *s_user, *s_token; int retval = 0; int fd = -1; struct stat st;...
1
[ "CWE-787" ]
pam-u2f
aab0c31a3bfed8912a271685d6ec909f61380155
107,986,778,084,712,850,000,000,000,000,000,000,000
201
Fix out-of-bound accesses
static void string_set(char** out, const char* in) { size_t insize = strlen(in), i = 0; if(string_resize(out, insize)) { for(i = 0; i < insize; i++) { (*out)[i] = in[i]; } } }
0
[ "CWE-401" ]
FreeRDP
9fee4ae076b1ec97b97efb79ece08d1dab4df29a
195,773,275,212,249,100,000,000,000,000,000,000,000
11
Fixed #5645: realloc return handling
static u8 st21nfca_se_get_bwi(struct nfc_hci_dev *hdev) { int i; u8 td; struct st21nfca_hci_info *info = nfc_hci_get_clientdata(hdev); /* Bits 8 to 5 of the first TB for T=1 encode BWI from zero to nine */ for (i = 1; i < ST21NFCA_ESE_MAX_LENGTH; i++) { td = ST21NFCA_ATR_GET_Y_FROM_TD(info->se_info.atr[i]); i...
0
[ "CWE-120" ]
linux
4fbcc1a4cb20fe26ad0225679c536c80f1648221
319,795,109,161,672,180,000,000,000,000,000,000,000
18
nfc: st21nfca: Fix potential buffer overflows in EVT_TRANSACTION It appears that there are some buffer overflows in EVT_TRANSACTION. This happens because the length parameters that are passed to memcpy come directly from skb->data and are not guarded in any way. Signed-off-by: Jordy Zomer <jordy@pwning.systems> Revie...
static int do_send_NPPrint(rpc_message_t *message, void *p_value) { NPPrint *printInfo = (NPPrint *)p_value; int error; if ((error = rpc_message_send_uint32(message, printInfo->mode)) < 0) return error; switch (printInfo->mode) { case NP_FULL: if ((error = do_send_NPFullPrint(message, &printInfo->print.ful...
0
[ "CWE-264" ]
nspluginwrapper
7e4ab8e1189846041f955e6c83f72bc1624e7a98
118,349,915,143,234,860,000,000,000,000,000,000,000
22
Support all the new variables added
static int spl_array_skip_protected(spl_array_object *intern, HashTable *aht TSRMLS_DC) /* {{{ */ { char *string_key; uint string_length; ulong num_key; if (Z_TYPE_P(intern->array) == IS_OBJECT) { do { if (zend_hash_get_current_key_ex(aht, &string_key, &string_length, &num_key, 0, &intern->pos) == HASH_KEY_IS...
0
[]
php-src
a374dfab567ff7f0ab0dc150f14cc891b0340b47
113,528,574,978,624,890,000,000,000,000,000,000,000
31
Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion
ext_ensure_tag_table(regex_t* reg) { int r; RegexExt* ext; CalloutTagTable* t; ext = onig_get_regex_ext(reg); CHECK_NULL_RETURN_MEMERR(ext); if (IS_NULL(ext->tag_table)) { r = callout_tag_table_new(&t); if (r != ONIG_NORMAL) return r; ext->tag_table = t; } return ONIG_NORMAL; }
0
[ "CWE-400", "CWE-399", "CWE-674" ]
oniguruma
4097828d7cc87589864fecf452f2cd46c5f37180
280,874,593,419,149,360,000,000,000,000,000,000,000
18
fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves.
inline unsigned int wait(const unsigned int milliseconds, cimg_uint64 *const p_timer) { if (!*p_timer) *p_timer = cimg::time(); const cimg_uint64 current_time = cimg::time(); if (current_time<*p_timer || current_time>=*p_timer + milliseconds) { *p_timer = current_time; return 0; } const unsi...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
166,435,617,813,931,640,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
ldns_pkt_opcode2str(ldns_pkt_opcode opcode) { char *str; ldns_buffer *buf; buf = ldns_buffer_new(12); if (!buf) { return NULL; } str = NULL; if (ldns_pkt_opcode2buffer_str(buf, opcode) == LDNS_STATUS_OK) { str = ldns_buffer_export2str(buf); } ldns_buffer_free(buf); return str; }
0
[ "CWE-415" ]
ldns
070b4595981f48a21cc6b4f5047fdc2d09d3da91
40,124,501,031,911,423,000,000,000,000,000,000,000
18
CAA and URI
static int dn_getsockopt(struct socket *sock, int level, int optname, char __user *optval, int __user *optlen) { struct sock *sk = sock->sk; int err; lock_sock(sk); err = __dn_getsockopt(sock, level, optname, optval, optlen, 0); release_sock(sk); return err; }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
79,191,370,988,007,750,000,000,000,000,000,000,000
11
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...
QByteArray Helper::lastProcessStandardOutput() { return m_processStandardOutput; }
0
[ "CWE-59", "CWE-61" ]
deepin-clone
e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab
203,346,799,478,266,750,000,000,000,000,000,000,000
4
fix: Do not use the "/tmp" directory https://github.com/linuxdeepin/deepin-clone/issues/16 https://bugzilla.opensuse.org/show_bug.cgi?id=1130388
static void io_wq_submit_work(struct io_wq_work *work) { struct io_kiocb *req = container_of(work, struct io_kiocb, work); const struct io_op_def *def = &io_op_defs[req->opcode]; unsigned int issue_flags = IO_URING_F_UNLOCKED; bool needs_poll = false; int ret = 0, err = -ECANCELED; /* one will be dropped by ->i...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
290,435,960,429,630,830,000,000,000,000,000,000,000
64
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
static int gtextfield_expose(GWindow pixmap, GGadget *g, GEvent *event) { GTextField *gt = (GTextField *) g; GListField *ge = (GListField *) g; GRect old1, old2, *r = &g->r; Color fg; int ll,i, last; GRect unpadded_inner; int pad; if ( g->state == gs_invisible || gt->dontdraw ) return( ...
0
[ "CWE-119", "CWE-787" ]
fontforge
626f751752875a0ddd74b9e217b6f4828713573c
153,476,887,091,199,460,000,000,000,000,000,000,000
98
Warn users before discarding their unsaved scripts (#3852) * Warn users before discarding their unsaved scripts This closes #3846.
void mp_encode_lua_table_as_array(lua_State *L, mp_buf *buf, int level) { #if LUA_VERSION_NUM < 502 size_t len = lua_objlen(L,-1), j; #else size_t len = lua_rawlen(L,-1), j; #endif mp_encode_array(L,buf,len); for (j = 1; j <= len; j++) { lua_pushnumber(L,j); lua_gettable(L,-2); ...
1
[ "CWE-119", "CWE-787" ]
redis
5ccb6f7a791bf3490357b00a898885759d98bab0
155,000,711,042,875,630,000,000,000,000,000,000,000
14
Security: more cmsgpack fixes by @soloestoy. @soloestoy sent me this additional fixes, after searching for similar problems to the one reported in mp_pack(). I'm committing the changes because it was not possible during to make a public PR to protect Redis users and give Redis providers some time to patch their system...
bool lxc_string_in_list(const char *needle, const char *haystack, char _sep) { char *token, *str, *saveptr = NULL; char sep[2] = { _sep, '\0' }; if (!haystack || !needle) return 0; str = alloca(strlen(haystack)+1); strcpy(str, haystack); for (; (token = strtok_r(str, sep, &saveptr)); str = NULL) { if (strcm...
0
[ "CWE-59", "CWE-61" ]
lxc
592fd47a6245508b79fe6ac819fe6d3b2c1289be
215,979,099,937,715,850,000,000,000,000,000,000,000
17
CVE-2015-1335: Protect container mounts against symlinks When a container starts up, lxc sets up the container's inital fstree by doing a bunch of mounting, guided by the container configuration file. The container config is owned by the admin or user on the host, so we do not try to guard against bad entries. Howev...
f_prompt_setprompt(typval_T *argvars, typval_T *rettv UNUSED) { buf_T *buf; char_u *text; if (check_secure()) return; buf = tv_get_buf(&argvars[0], FALSE); if (buf == NULL) return; text = tv_get_string(&argvars[1]); vim_free(buf->b_prompt_text); buf->b_prompt_text = vim_strsave(text)...
0
[ "CWE-78" ]
vim
8c62a08faf89663e5633dc5036cd8695c80f1075
310,216,498,803,350,260,000,000,000,000,000,000,000
15
patch 8.1.0881: can execute shell commands in rvim through interfaces Problem: Can execute shell commands in rvim through interfaces. Solution: Disable using interfaces in restricted mode. Allow for writing file with writefile(), histadd() and a few others.
bool lua_datum::is_string() const { LUA_CHECK_TYPE(lua_isstring); }
0
[ "CWE-434" ]
crawl
fc522ff6eb1bbb85e3de60c60a45762571e48c28
241,622,857,485,258,080,000,000,000,000,000,000,000
4
Disable lua load(), loadstring() bytcode loading
export_vpn_cb (GtkButton *button, gpointer user_data) { ActionInfo *info = (ActionInfo *) user_data; NMExportedConnection *exported; NMConnection *connection = NULL; exported = get_active_connection (info->treeview); if (exported) connection = nm_exported_connection_get_connection (exported); if (!connection) ...
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
327,117,937,980,301,400,000,000,000,000,000,000,000
14
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...
TEST_F(DocumentSourceMatchTest, ShouldAddCorrectDependenciesForClausesWithEmptyJSONSchema) { DepsTracker dependencies; auto query = fromjson("{$jsonSchema: {}}"); auto match = DocumentSourceMatch::create(query, getExpCtx()); ASSERT_EQUALS(DepsTracker::State::SEE_NEXT, match->getDependencies(&dependencie...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
117,809,334,842,682,240,000,000,000,000,000,000,000
9
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
pk_transaction_install_signature (PkTransaction *transaction, GVariant *params, GDBusMethodInvocation *context) { gboolean ret; const gchar *key_id; const gchar *package_id; PkSigTypeEnum sig_type; g_autoptr(GError) error = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
36,175,462,011,676,870,000,000,000,000,000,000,000
68
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.