func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int ntop_get_interface_names(lua_State* vm) { lua_newtable(vm); ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__); for(int i=0; i<ntop->get_num_interface_views(); i++) { NetworkInterfaceView *iface = ntop->getInterfaceViewAtId(i); if(iface != NULL) { char num[8]; ...
0
[ "CWE-254" ]
ntopng
2e0620be3410f5e22c9aa47e261bc5a12be692c6
163,303,419,547,017,300,000,000,000,000,000,000,000
17
Added security fix to avoid escalating privileges to non-privileged users Many thanks to Dolev Farhi for reporting it
void Compute(OpKernelContext* context) override { const Tensor& input = context->input(0); Tensor* output; OP_REQUIRES_OK(context, context->allocate_output(0, input.shape(), &output)); functor::DataFormatDimMap<Device, T>()(context->eigen_device<Device>(), ...
0
[ "CWE-125" ]
tensorflow
ebc70b7a592420d3d2f359e4b1694c236b82c7ae
143,481,357,413,615,200,000,000,000,000,000,000,000
9
Validate that `DataFormat*` attributes form a permutation. The `src_format` and `dst_format` attributes for the `DataFormatDimMap` and `DataFormatVecPermute` raw ops are supposed to determine a permutation. However, this was not validated and could result in unitialized memory accesses as well as writes outside of bou...
validMatch(const TranslationTableHeader *table, int pos, const InString *input, formtype *typebuf, const TranslationTableRule *transRule, int transCharslen) { /* Analyze the typeform parameter and also check for capitalization */ TranslationTableCharacter *inputChar; TranslationTableCharacter *ruleChar; Translati...
0
[ "CWE-125" ]
liblouis
5e4089659bb49b3095fa541fa6387b4c40d7396e
27,323,639,467,386,844,000,000,000,000,000,000,000
35
Fix a buffer overflow Fixes #635 Thanks to HongxuChen for reporting it
struct buffer_head *ext4_bread(handle_t *handle, struct inode *inode, ext4_lblk_t block, int create, int *err) { struct buffer_head *bh; bh = ext4_getblk(handle, inode, block, create, err); if (!bh) return bh; if (buffer_uptodate(bh)) return bh; ll_rw_block(READ_META, 1, &bh); wait_on_buffer(bh); ...
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
112,993,416,383,972,000,000,000,000,000,000,000,000
18
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
bool st_select_lex::add_window_def(THD *thd, LEX_STRING *win_name, LEX_STRING *win_ref, SQL_I_List<ORDER> win_partition_list, SQL_I_List<ORDER> win_order_list, ...
1
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
337,483,721,023,925,900,000,000,000,000,000,000,000
27
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event) { struct kvm_lapic *apic = vcpu->arch.apic; u64 msr_val; int i; if (!init_event) { msr_val = APIC_DEFAULT_PHYS_BASE | MSR_IA32_APICBASE_ENABLE; if (kvm_vcpu_is_reset_bsp(vcpu)) msr_val |= MSR_IA32_APICBASE_BSP; kvm_lapic_set_base(vcpu, msr_val);...
0
[ "CWE-703", "CWE-459" ]
linux
f7d8a19f9a056a05c5c509fa65af472a322abfee
64,108,343,818,699,350,000,000,000,000,000,000,000
66
Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET" Revert a change to open code bits of kvm_lapic_set_base() when emulating APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base and apic_hw_disabled being unsyncrhonized when the APIC is created. If kvm_arch_vcpu_crea...
compare_guards_by_confirmed_idx(const void **a_, const void **b_) { const entry_guard_t *a = *a_, *b = *b_; if (a->confirmed_idx < b->confirmed_idx) return -1; else if (a->confirmed_idx > b->confirmed_idx) return 1; else return 0; }
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
87,755,532,452,160,820,000,000,000,000,000,000,000
10
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
p_string(FILE* f, int len, UChar* s) { fputs(":", f); while (len-- > 0) { fputc(*s++, f); } }
0
[ "CWE-125" ]
php-src
c6e34d91b88638966662caac62c4d0e90538e317
119,978,831,511,283,140,000,000,000,000,000,000,000
5
Fix bug #77371 (heap buffer overflow in mb regex functions - compile_string_node)
static void lp_cleanup_module (void) { unsigned int offset; parport_unregister_driver (&lp_driver); #ifdef CONFIG_LP_CONSOLE unregister_console (&lpcons); #endif unregister_chrdev(LP_MAJOR, "lp"); for (offset = 0; offset < LP_NO; offset++) { if (lp_table[offset].dev == NULL) continue; parport_unregister_...
0
[ "CWE-787" ]
linux
3e21f4af170bebf47c187c1ff8bf155583c9f3b1
290,391,290,270,244,530,000,000,000,000,000,000,000
19
char: lp: fix possible integer overflow in lp_setup() The lp_setup() code doesn't apply any bounds checking when passing "lp=none", and only in this case, resulting in an overflow of the parport_nr[] array. All versions in Git history are affected. Reported-By: Roee Hay <roee.hay@hcl.com> Cc: Ben Hutchings <ben@decad...
static int gen8_emit_flush(struct i915_request *request, u32 mode) { u32 cmd, *cs; cs = intel_ring_begin(request, 4); if (IS_ERR(cs)) return PTR_ERR(cs); cmd = MI_FLUSH_DW + 1; /* We always require a command barrier so that subsequent * commands, such as breadcrumb interrupts, are strictly ordered * wrt t...
0
[]
linux
bc8a76a152c5f9ef3b48104154a65a68a8b76946
285,014,597,185,482,830,000,000,000,000,000,000,000
31
drm/i915/gen9: Clear residual context state on context switch Intel ID: PSIRT-TA-201910-001 CVEID: CVE-2019-14615 Intel GPU Hardware prior to Gen11 does not clear EU state during a context switch. This can result in information leakage between contexts. For Gen8 and Gen9, hardware provides a mechanism for fast clear...
int set_thread_tidr(struct task_struct *t) { if (!cpu_has_feature(CPU_FTR_P9_TIDR)) return -EINVAL; if (t != current) return -EINVAL; if (t->thread.tidr) return 0; t->thread.tidr = (u16)task_pid_nr(t); mtspr(SPRN_TIDR, t->thread.tidr); return 0; }
0
[ "CWE-862" ]
linux
8205d5d98ef7f155de211f5e2eb6ca03d95a5a60
311,110,438,308,346,140,000,000,000,000,000,000,000
16
powerpc/tm: Fix FP/VMX unavailable exceptions inside a transaction When we take an FP unavailable exception in a transaction we have to account for the hardware FP TM checkpointed registers being incorrect. In this case for this process we know the current and checkpointed FP registers must be the same (since FP wasn'...
static MagickBooleanType ReadProfile(Image *image,const char *name, const unsigned char *datum,ssize_t length) { MagickBooleanType status; StringInfo *profile; if (length < 4) return(MagickFalse); profile=BlobToStringInfo(datum,(size_t) length); if (profile == (StringInfo *) NULL) ThrowBin...
0
[ "CWE-400" ]
ImageMagick6
0701e59f00194897494fa2be74cee8ca626d8f6f
219,990,285,973,791,770,000,000,000,000,000,000,000
22
https://github.com/ImageMagick/ImageMagick/issues/664
FileSpec::FileSpec(const Object *fileSpecA) { ok = true; fileName = nullptr; platformFileName = nullptr; embFile = nullptr; desc = nullptr; fileSpec = fileSpecA->copy(); Object obj1 = getFileSpecName(fileSpecA); if (!obj1.isString()) { ok = false; error(errSyntaxError, -1, "Invalid FileSpec"); ...
1
[ "CWE-20" ]
poppler
de0c0b8324e776f0b851485e0fc9622fc35695b7
164,417,489,132,986,920,000,000,000,000,000,000,000
35
FileSpec: Move the fileSpec.dictLookup call inside fileSpec.isDict if Fixes #704
int socket_create(uint16_t port) { int sfd = -1; int yes = 1; #ifdef WIN32 WSADATA wsa_data; if (!wsa_init) { if (WSAStartup(MAKEWORD(2,2), &wsa_data) != ERROR_SUCCESS) { fprintf(stderr, "WSAStartup failed!\n"); ExitProcess(-1); } wsa_init = 1; } #endif struct sockaddr_in saddr; if (0 > (sfd = socke...
0
[ "CWE-284", "CWE-703" ]
libusbmuxd
4397b3376dc4e4cb1c991d0aed61ce6482614196
110,122,662,175,442,820,000,000,000,000,000,000,000
54
common: [security fix] Make sure sockets only listen locally
static int __ntop_rrd_args (lua_State* vm, char **filename, char **cf, time_t *start, time_t *end) { char *start_s, *end_s, *err; rrd_time_value_t start_tv, end_tv; if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_PARAM_ERROR); if((*filename = (char*)lua_tostring(vm, 1)) == NULL) return(C...
0
[ "CWE-476" ]
ntopng
01f47e04fd7c8d54399c9e465f823f0017069f8f
59,930,725,866,077,840,000,000,000,000,000,000,000
35
Security fix: prevents empty host from being used
static int show_vfsmnt(struct seq_file *m, void *v) { struct vfsmount *mnt = v; int err = 0; static struct proc_fs_info { int flag; char *str; } fs_info[] = { { MS_SYNCHRONOUS, ",sync" }, { MS_DIRSYNC, ",dirsync" }, { MS_MANDLOCK, ",mand" }, { 0, NULL } }; static struct proc_fs_info mnt_info[] = { {...
0
[ "CWE-269" ]
linux-2.6
ee6f958291e2a768fd727e7a67badfff0b67711a
29,827,405,671,607,940,000,000,000,000,000,000,000
47
check privileges before setting mount propagation There's a missing check for CAP_SYS_ADMIN in do_change_type(). Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torva...
XmlDocWrapper(xmlDocPtr doc, const String& cls, Object domNode = nullptr) : m_doc(doc), m_cls(cls), m_domNode(domNode) { if (!domNode.isNull()) { DEBUG_ONLY c_DOMNode *domnode = domNode.getTyped<c_DOMNode>(); assert(!domnode || domnode->m_node == (xmlNodePtr) doc); } }
0
[ "CWE-94" ]
hhvm
95f96e7287effe2fcdfb9a5338d1a7e4f55b083b
280,376,351,737,937,900,000,000,000,000,000,000,000
7
Fix libxml_disable_entity_loader() This wasn't calling requestInit and setting the libxml handler no null. So the first time an error came along it would reset the handler from no-op to reading again. This is a much better fix, we set our custom handler in requestInit and when libxml_disable_entity_loader we store th...
int virt_to_scatterlist(const void *addr, int size, struct scatterlist *sg, int sg_size) { int i = 0; struct page *pg; int offset; int remainder_of_page; sg_init_table(sg, sg_size); while (size > 0 && i < sg_size) { pg = virt_to_page(addr); offset = offset_in_page(addr); sg_set_page(&sg[i], pg, 0, offs...
0
[ "CWE-703", "CWE-189" ]
linux
942080643bce061c3dd9d5718d3b745dcb39a8bc
42,727,497,532,686,620,000,000,000,000,000,000,000
30
eCryptfs: Remove buggy and unnecessary write in file name decode routine Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the end of the allocated buffer during encrypted filename decoding. This fix corrects the issue by getting rid of the unnecessary 0 write when the current bit offset is 2. Signed...
bool InMatchExpression::equivalent(const MatchExpression* other) const { if (matchType() != other->matchType()) { return false; } const InMatchExpression* realOther = static_cast<const InMatchExpression*>(other); if (path() != realOther->path()) { return false; } if (_hasNull != ...
0
[ "CWE-190" ]
mongo
21d8699ed6c517b45e1613e20231cd8eba894985
169,515,050,768,184,700,000,000,000,000,000,000,000
39
SERVER-43699 $mod should not overflow for large negative values
static void perf_event_interrupt(struct pt_regs *regs) { int i; struct cpu_hw_events *cpuhw = &__get_cpu_var(cpu_hw_events); struct perf_event *event; unsigned long val; int found = 0; int nmi; if (cpuhw->n_limited) freeze_limited_counters(cpuhw, mfspr(SPRN_PMC5), mfspr(SPRN_PMC6)); perf_read_regs(regs...
1
[ "CWE-703", "CWE-189" ]
linux
0837e3242c73566fc1c0196b4ec61779c25ffc93
163,533,173,924,394,330,000,000,000,000,000,000,000
63
perf, powerpc: Handle events that raise an exception without overflowing Events on POWER7 can roll back if a speculative event doesn't eventually complete. Unfortunately in some rare cases they will raise a performance monitor exception. We need to catch this to ensure we reset the PMC. In all cases the PMC will be 25...
void mg_sha1_update(mg_sha1_ctx *context, const unsigned char *data, size_t len) { size_t i, j; j = context->count[0]; if ((context->count[0] += (uint32_t) len << 3) < j) context->count[1]++; context->count[1] += (uint32_t)(len >> 29); j = (j >> 3) & 63; if ((j + len) > 63) { memcpy...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
200,606,504,794,282,600,000,000,000,000,000,000,000
19
Protect against the directory traversal in mg_upload()
static bool nested_vmcb_checks(struct vcpu_svm *svm, struct vmcb *vmcb12) { bool vmcb12_lma; if ((vmcb12->save.efer & EFER_SVME) == 0) return false; if (((vmcb12->save.cr0 & X86_CR0_CD) == 0) && (vmcb12->save.cr0 & X86_CR0_NW)) return false; if (!kvm_dr6_valid(vmcb12->save.dr6) || !kvm_dr7_valid(vmcb12->save...
1
[ "CWE-416" ]
linux
a58d9166a756a0f4a6618e4f593232593d6df134
132,988,316,136,018,830,000,000,000,000,000,000,000
34
KVM: SVM: load control fields from VMCB12 before checking them Avoid races between check and use of the nested VMCB controls. This for example ensures that the VMRUN intercept is always reflected to the nested hypervisor, instead of being processed by the host. Without this patch, it is possible to end up with svm->...
static bool update_cached_long_query_time(sys_var *self, THD *thd, enum_var_type type) { if (type == OPT_SESSION) thd->variables.long_query_time= double2ulonglong(thd->variables.long_query_time_double * 1e6); else global_system_variables.long_query_time= ...
0
[ "CWE-264" ]
mysql-server
48bd8b16fe382be302c6f0b45931be5aa6f29a0e
183,798,909,410,641,040,000,000,000,000,000,000,000
11
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...
dirvote_get_start_of_next_interval(time_t now, int interval, int offset) { struct tm tm; time_t midnight_today=0; time_t midnight_tomorrow; time_t next; tor_gmtime_r(&now, &tm); tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; if (tor_timegm(&tm, &midnight_today) < 0) { log_warn(LD_BUG, "Ran into a...
0
[]
tor
a0ef3cf0880e3cd343977b3fcbd0a2e7572f0cb4
64,526,200,881,697,760,000,000,000,000,000,000,000
34
Prevent int underflow in dirvote.c compare_vote_rs_. This should be "impossible" without making a SHA1 collision, but let's not keep the assumption that SHA1 collisions are super-hard. This prevents another case related to 21278. There should be no behavioral change unless -ftrapv is on.
e1000e_set_16bit(E1000ECore *core, int index, uint32_t val) { core->mac[index] = val & 0xffff; }
0
[ "CWE-835" ]
qemu
4154c7e03fa55b4cf52509a83d50d6c09d743b77
147,273,145,494,938,440,000,000,000,000,000,000,000
4
net: e1000e: fix an infinite loop issue This issue is like the issue in e1000 network card addressed in this commit: e1000: eliminate infinite loops on out-of-bounds transfer start. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Reviewed-by: Dmitry Fleytman <dmitry@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat....
std::string RegisterFileSystem(content::WebContents* web_contents, const base::FilePath& path) { auto* isolated_context = storage::IsolatedContext::GetInstance(); std::string root_name(kRootName); storage::IsolatedContext::ScopedFSHandle file_system = isolated_context->Registe...
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
219,501,553,909,535,040,000,000,000,000,000,000,000
22
fix: restrict sendToFrame to same-process frames by default (#26875)
static int create_cq(PVRDMADev *dev, union pvrdma_cmd_req *req, union pvrdma_cmd_resp *rsp) { struct pvrdma_cmd_create_cq *cmd = &req->create_cq; struct pvrdma_cmd_create_cq_resp *resp = &rsp->create_cq_resp; PvrdmaRing *ring = NULL; int rc; memset(resp, 0, sizeof(*resp)); ...
0
[ "CWE-787" ]
qemu
284f191b4abad213aed04cb0458e1600fd18d7c4
8,464,579,613,923,716,000,000,000,000,000,000,000
28
hw/rdma: Fix possible mremap overflow in the pvrdma device (CVE-2021-3582) Ensure mremap boundaries not trusting the guest kernel to pass the correct buffer length. Fixes: CVE-2021-3582 Reported-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Tested-by: VictorV (Kunlun Lab) <vv474172261@gmail.com> Signed-off-by: Mar...
static inline unsigned char ScaleQuantumToChar(const Quantum quantum) { #if !defined(MAGICKCORE_HDRI_SUPPORT) return((unsigned char) (quantum/72340172838076673.0+0.5)); #else if ((IsNaN(quantum) != MagickFalse) || (quantum <= 0.0)) return(0); if ((quantum/72340172838076673.0) >= 255.0) return(255); retu...
0
[ "CWE-190" ]
ImageMagick
564f2a35e523e2b6cce9485018157f03ec05a947
5,979,689,006,510,561,000,000,000,000,000,000,000
12
https://github.com/ImageMagick/ImageMagick/issues/1741
int tty_unregister_driver(struct tty_driver *driver) { #if 0 /* FIXME */ if (driver->refcount) return -EBUSY; #endif unregister_chrdev_region(MKDEV(driver->major, driver->minor_start), driver->num); mutex_lock(&tty_mutex); list_del(&driver->tty_drivers); mutex_unlock(&tty_mutex); return 0; }
0
[ "CWE-200", "CWE-362" ]
linux
5c17c861a357e9458001f021a7afa7aab9937439
246,747,221,275,095,200,000,000,000,000,000,000,000
14
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD) ioctl(TIOCGETD) retrieves the line discipline id directly from the ldisc because the line discipline id (c_line) in termios is untrustworthy; userspace may have set termios via ioctl(TCSETS*) without actually changing the line discipline via ioctl(TIOCSETD). However...
network_pass_proxy (const char *proxy, int sock, const char *address, int port) { int rc; struct t_proxy *ptr_proxy; rc = 0; ptr_proxy = proxy_search (proxy); if (ptr_proxy) { switch (CONFIG_INTEGER(ptr_proxy->options[PROXY_OPTION_TYPE])) { case PROXY_TYPE_H...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
234,455,245,526,848,220,000,000,000,000,000,000,000
25
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
ip6t_next_entry(const struct ip6t_entry *entry) { return (void *)entry + entry->next_offset; }
0
[ "CWE-200" ]
linux-2.6
6a8ab060779779de8aea92ce3337ca348f973f54
159,357,390,468,085,550,000,000,000,000,000,000,000
4
ipv6: netfilter: ip6_tables: fix infoleak to userspace Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are copied from userspace. Fields of these structs that are zero-terminated strings are not checked. When they are used as argument to a format string containing "%s" in request_module(), some sen...
void __kfree_skb_defer(struct sk_buff *skb) { _kfree_skb_defer(skb); }
0
[ "CWE-703", "CWE-125" ]
linux
8605330aac5a5785630aec8f64378a54891937cc
39,406,227,072,771,010,000,000,000,000,000,000,000
4
tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs __sock_recv_timestamp can be called for both normal skbs (for receive timestamps) and for skbs on the error queue (for transmit timestamps). Commit 1c885808e456 (tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING) assumes any skb passed to __sock_recv_timest...
static void load_library(const char *fname) { assert(fname); assert(*fname == '/'); // existing file owned by root, read access struct stat s; if (stat(fname, &s) == 0 && s.st_uid == 0 && !access(fname, R_OK)) { // load directories, regular 64 bit libraries, and 64 bit executables if (is_dir(fname) || is_lib_...
0
[ "CWE-284", "CWE-732" ]
firejail
eecf35c2f8249489a1d3e512bb07f0d427183134
330,017,860,133,335,660,000,000,000,000,000,000,000
21
mount runtime seccomp files read-only (#2602) avoid creating locations in the file system that are both writable and executable (in this case for processes with euid of the user). for the same reason also remove user owned libfiles when it is not needed any more
dir_networkstatus_download_failed(smartlist_t *failed, int status_code) { if (status_code == 503) return; SMARTLIST_FOREACH(failed, const char *, fp, { char digest[DIGEST_LEN]; trusted_dir_server_t *dir; if (base16_decode(digest, DIGEST_LEN, fp, strlen(fp))<0) { log_warn(LD_BUG, "Called with...
0
[]
tor
973c18bf0e84d14d8006a9ae97fde7f7fb97e404
33,808,734,022,491,670,000,000,000,000,000,000,000
19
Fix assertion failure in tor_timegm. Fixes bug 6811.
static int jpc_ppm_getparms(jpc_ms_t *ms, jpc_cstate_t *cstate, jas_stream_t *in) { jpc_ppm_t *ppm = &ms->parms.ppm; /* Eliminate compiler warning about unused variables. */ cstate = 0; ppm->data = 0; if (ms->len < 1) { goto error; } if (jpc_getuint8(in, &ppm->ind)) { goto error; } ppm->len = ms->len -...
1
[ "CWE-20", "CWE-190" ]
jasper
d42b2388f7f8e0332c846675133acea151fc557a
266,128,735,444,203,000,000,000,000,000,000,000,000
33
The generation of the configuration file jas_config.h has been completely reworked in order to avoid pollution of the global namespace. Some problematic types like uchar, ulong, and friends have been replaced with names with a jas_ prefix. An option max_samples has been added to the BMP and JPEG decoders to restrict ...
static int ttusb_dec_video_pes2ts_cb(void *priv, unsigned char *data) { struct ttusb_dec *dec = priv; dec->video_filter->feed->cb.ts(data, 188, NULL, 0, &dec->video_filter->feed->feed.ts, NULL); return 0; }
0
[ "CWE-772" ]
linux
a10feaf8c464c3f9cfdd3a8a7ce17e1c0d498da1
6,017,811,484,469,348,000,000,000,000,000,000,000
9
media: ttusb-dec: Fix info-leak in ttusb_dec_send_command() The function at issue does not always initialize each byte allocated for 'b' and can therefore leak uninitialized memory to a USB device in the call to usb_bulk_msg() Use kzalloc() instead of kmalloc() Signed-off-by: Tomas Bortoli <tomasbortoli@gmail.com> R...
void OSD::ms_fast_dispatch(Message *m) { FUNCTRACE(); if (service.is_stopping()) { m->put(); return; } OpRequestRef op = op_tracker.create_request<OpRequest, Message*>(m); { #ifdef WITH_LTTNG osd_reqid_t reqid = op->get_reqid(); #endif tracepoint(osd, ms_fast_dispatch, reqid.name._type, ...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
22,016,085,240,670,300,000,000,000,000,000,000,000
52
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 ...
keyring_save_authinfo (AuthInfo *info, SoupURI *uri, gboolean is_proxy) { const char *type = is_proxy ? "proxy" : "basic"; g_vfs_keyring_save_password (info->username, uri->host, NULL, ...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
40,373,710,789,791,870,000,000,000,000,000,000,000
16
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
static int composite_bind(struct usb_gadget *gadget, struct usb_gadget_driver *gdriver) { struct usb_composite_dev *cdev; struct usb_composite_driver *composite = to_cdriver(gdriver); int status = -ENOMEM; cdev = kzalloc(sizeof *cdev, GFP_KERNEL); if (!cdev) return status; spin_lock_init(&cdev->lock); c...
0
[ "CWE-476" ]
linux
75e5b4849b81e19e9efe1654b30d7f3151c33c2c
159,960,339,491,995,130,000,000,000,000,000,000,000
48
USB: gadget: validate interface OS descriptor requests Stall the control endpoint in case provided index exceeds array size of MAX_CONFIG_INTERFACES or when the retrieved function pointer is null. Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com> Cc: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregk...
static bool io_cancel_cb(struct io_wq_work *work, void *data) { struct io_kiocb *req = container_of(work, struct io_kiocb, work); return req->user_data == (unsigned long) data; }
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
69,621,059,851,637,820,000,000,000,000,000,000,000
6
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 io_poll_cancel(struct io_ring_ctx *ctx, struct io_cancel_data *cd) __must_hold(&ctx->completion_lock) { struct io_kiocb *req; if (cd->flags & (IORING_ASYNC_CANCEL_FD|IORING_ASYNC_CANCEL_ANY)) req = io_poll_file_find(ctx, cd); else req = io_poll_find(ctx, false, cd); if (!req) return -ENOENT; io_...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
240,336,781,716,824,080,000,000,000,000,000,000,000
13
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...
respip_set_delete(struct respip_set* set) { if(!set) return; regional_destroy(set->region); free(set); }
0
[ "CWE-190" ]
unbound
02080f6b180232f43b77f403d0c038e9360a460f
331,519,959,353,893,550,000,000,000,000,000,000,000
7
- Fix Integer Overflows in Size Calculations, reported by X41 D-Sec.
Returns the block size of the algorithm */ PHP_FUNCTION(mcrypt_module_get_algo_block_size) { MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir) RETURN_LONG(mcrypt_module_get_algo_block_size(module, dir));
0
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
224,007,460,571,395,000,000,000,000,000,000,000,000
6
Fix bug #72455: Heap Overflow due to integer overflows
void imap_pretty_mailbox (char* path) { IMAP_MBOX home, target; ciss_url_t url; char* delim; int tlen; int hlen = 0; char home_match = 0; if (imap_parse_path (path, &target) < 0) return; tlen = mutt_strlen (target.mbox); /* check whether we can do '=' substitution */ if (mx_is_imap(Maildir) &&...
0
[ "CWE-78" ]
mutt
185152818541f5cdc059cbff3f3e8b654fc27c1d
92,931,160,273,790,260,000,000,000,000,000,000,000
51
Properly quote IMAP mailbox names when (un)subscribing. When handling automatic subscription (via $imap_check_subscribed), or manual subscribe/unsubscribe commands, mutt generating a "mailboxes" command but failed to properly escape backquotes. Thanks to Jeriko One for the detailed bug report and patch, which this co...
HInstruction* HGraphBuilder::BuildStoreNamedGeneric(HValue* object, Handle<String> name, HValue* value) { HValue* context = environment()->LookupContext(); return new(zone()) HStoreNamedGeneric( ...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
338,638,019,844,284,950,000,000,000,000,000,000,000
11
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
new_msg_sync_lsdb (u_int32_t seqnum, struct lsa_filter_type *filter) { u_char buf[OSPF_API_MAX_MSG_SIZE]; struct msg_sync_lsdb *smsg; int len; smsg = (struct msg_sync_lsdb *) buf; len = sizeof (struct msg_sync_lsdb) + filter->num_areas * sizeof (struct in_addr); smsg->filter.typemask = htons (filter->t...
0
[ "CWE-119" ]
quagga
3f872fe60463a931c5c766dbf8c36870c0023e88
274,818,694,908,305,360,000,000,000,000,000,000,000
17
ospfd: CVE-2013-2236, stack overrun in apiserver the OSPF API-server (exporting the LSDB and allowing announcement of Opaque-LSAs) writes past the end of fixed on-stack buffers. This leads to an exploitable stack overflow. For this condition to occur, the following two conditions must be true: - Quagga is configured...
static void hci_cc_read_stored_link_key(struct hci_dev *hdev, struct sk_buff *skb) { struct hci_rp_read_stored_link_key *rp = (void *)skb->data; struct hci_cp_read_stored_link_key *sent; BT_DBG("%s status 0x%2.2x", hdev->name, rp->status); sent = hci_sent_cmd_data(hdev, HCI_OP_READ_STORED_LINK_KEY); if (!se...
0
[ "CWE-290" ]
linux
3ca44c16b0dcc764b641ee4ac226909f5c421aa3
35,070,561,272,593,440,000,000,000,000,000,000,000
17
Bluetooth: Consolidate encryption handling in hci_encrypt_cfm This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection state is BT_CONFIG so callers don't have to check the state. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
auth_card_ctl(struct sc_card *card, unsigned long cmd, void *ptr) { switch (cmd) { case SC_CARDCTL_GET_DEFAULT_KEY: return auth_get_default_key(card, (struct sc_cardctl_default_key *) ptr); case SC_CARDCTL_OBERTHUR_GENERATE_KEY: return auth_generate_key(card, 0, (struct sc_cardctl_oberthur_genkey_info *)...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
142,582,424,640,321,600,000,000,000,000,000,000,000
24
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
static void test_fetch_date() { MYSQL_STMT *stmt; uint i; int rc, year; char date[25], my_time[25], ts[25], ts_4[25], ts_6[20], dt[20]; ulong d_length, t_length, ts_length, ts4_length, ts6_length, dt_length, y_length; MYSQL_BIND my_bind[8]; my_bool is_null[8]; ulo...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
167,375,416,291,782,950,000,000,000,000,000,000,000
135
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...
Header::operator [] (const string &name) const { return this->operator[] (name.c_str()); }
0
[ "CWE-125" ]
openexr
e79d2296496a50826a15c667bf92bdc5a05518b4
62,479,840,311,213,480,000,000,000,000,000,000,000
4
fix memory leaks and invalid memory accesses Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
deleted_ip(ptr) struct tcltkip *ptr; { if (!ptr || !ptr->ip || Tcl_InterpDeleted(ptr->ip) #if TCL_NAMESPACE_DEBUG || rbtk_invalid_namespace(ptr) #endif ) { DUMP1("ip is deleted"); return 1; } return 0; }
0
[]
tk
ebd0fc80d62eeb7b8556522256f8d035e013eb65
83,311,394,434,842,580,000,000,000,000,000,000,000
13
tcltklib.c: check argument * ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and length. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static int select_sec(struct cifs_ses *ses, struct sess_data *sess_data) { int type; type = select_sectype(ses->server, ses->sectype); cifs_dbg(FYI, "sess setup type %d\n", type); if (type == Unspecified) { cifs_dbg(VFS, "Unable to select appropriate authentication method!"); return -EINVAL; } switch (ty...
0
[ "CWE-476" ]
linux
cabfb3680f78981d26c078a26e5c748531257ebb
239,125,429,466,414,960,000,000,000,000,000,000,000
50
CIFS: Enable encryption during session setup phase In order to allow encryption on SMB connection we need to exchange a session key and generate encryption and decryption keys. Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
EIGEN_STRONG_INLINE std::ostream& operator<<(std::ostream& os, QInt16 a) { os << static_cast<int>(a.value); return os; }
0
[ "CWE-908", "CWE-787" ]
tensorflow
ace0c15a22f7f054abcc1f53eabbcb0a1239a9e2
214,657,564,097,537,800,000,000,000,000,000,000,000
4
Default initialize fixed point Eigen types. In certain cases, tensors are filled with default values of the type. But, for these fixed point types, these values were uninitialized. Thus, we would have uninitialized memory access bugs, some of which were caught by MSAN. PiperOrigin-RevId: 344101137 Change-Id: I14555fd...
TEST(GteOp, MatchesElement) { BSONObj operand = BSON("$gte" << 5); BSONObj match = BSON("a" << 5.5); BSONObj equalMatch = BSON("a" << 5); BSONObj notMatch = BSON("a" << 4); BSONObj notMatchWrongType = BSON("a" << "foo"); GTEMatchExpression gte("", operand["$g...
0
[]
mongo
64095239f41e9f3841d8be9088347db56d35c891
312,239,098,348,681,700,000,000,000,000,000,000,000
13
SERVER-51083 Reject invalid UTF-8 from $regex match expressions
void rely_del(GF_Box *s) { GF_RelyHintBox *rely = (GF_RelyHintBox *)s; gf_free(rely); }
0
[ "CWE-400", "CWE-401" ]
gpac
d2371b4b204f0a3c0af51ad4e9b491144dd1225c
310,779,508,276,733,850,000,000,000,000,000,000,000
5
prevent dref memleak on invalid input (#1183)
static int ZEND_FASTCALL ZEND_FETCH_CLASS_SPEC_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS) { zend_op *opline = EX(opline); if (IS_CV == IS_UNUSED) { EX_T(opline->result.u.var).class_entry = zend_fetch_class(NULL, 0, opline->extended_value TSRMLS_CC); ZEND_VM_NEXT_OPCODE(); } else { zval *class_name = _get_zval_pt...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
245,589,330,306,860,430,000,000,000,000,000,000,000
23
- 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
secret_core_crt (gcry_mpi_t M, gcry_mpi_t C, gcry_mpi_t D, unsigned int Nlimbs, gcry_mpi_t P, gcry_mpi_t Q, gcry_mpi_t U) { gcry_mpi_t m1 = mpi_alloc_secure ( Nlimbs + 1 ); gcry_mpi_t m2 = mpi_alloc_secure ( Nlimbs + 1 ); gcry_mpi_t h = mpi_alloc_secure ( Nlimbs + 1 ); /* m1 ...
1
[ "CWE-310" ]
libgcrypt
8725c99ffa41778f382ca97233183bcd687bb0ce
309,863,256,326,667,240,000,000,000,000,000,000,000
32
rsa: Add exponent blinding. * cipher/rsa.c (secret_core_crt): Blind secret D with randomized nonce R for mpi_powm computation. -- Co-authored-by: Werner Koch <wk@gnupg.org> Signed-off-by: NIIBE Yutaka <gniibe@fsij.org> The paper describing attack: https://eprint.iacr.org/2017/627 Sliding right into disaster: Left-...
bool dwgReader21::parseDataPage(const dwgSectionInfo &si, duint8 *dData){ DRW_DBG("parseDataPage, section size: "); DRW_DBG(si.size); for (auto it=si.pages.begin(); it!=si.pages.end(); ++it){ dwgPageInfo pi = it->second; if (!fileBuf->setPosition(pi.address)) return false; s...
1
[ "CWE-191" ]
libdxfrw
6417118874333309aa10c4e59f954c3905a6e8b5
25,074,293,471,933,600,000,000,000,000,000,000,000
49
fixed heap buffer overflow vulnerability CVE-2021-21899 as reported in TALOS-2021-1350 / CVE-2021-21899, dwgCompressor::decompress21() could be abused with a malformed DWG file to force heap buffer overflow and possibly lead to malicious code execution.
struct tevent_req *smb_vfs_call_copy_chunk_send(struct vfs_handle_struct *handle, TALLOC_CTX *mem_ctx, struct tevent_context *ev, struct files_struct *src_fsp, off_t src_off, struct files_struct *dest_fsp, off_t dest_off, off_t num) { VFS_FIND(copy_chunk_send); return handle-...
0
[ "CWE-264" ]
samba
4278ef25f64d5fdbf432ff1534e275416ec9561e
112,109,331,456,040,110,000,000,000,000,000,000,000
13
CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share). Ensure matching component ends in '/' or '\0'. BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
BPF_CALL_2(bpf_redirect, u32, ifindex, u64, flags) { struct redirect_info *ri = this_cpu_ptr(&redirect_info); if (unlikely(flags & ~(BPF_F_INGRESS))) return TC_ACT_SHOT; ri->ifindex = ifindex; ri->flags = flags; return TC_ACT_REDIRECT; }
0
[ "CWE-120" ]
linux
050fad7c4534c13c8eb1d9c2ba66012e014773cb
186,675,693,854,162,200,000,000,000,000,000,000,000
12
bpf: fix truncated jump targets on heavy expansions Recently during testing, I ran into the following panic: [ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP [ 207.901637] Modules linked in: binfmt_misc [...] [ 207.966530] CPU: 45 PID: 2256 Comm: test_ve...
proxy_C_EncryptInit (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_MECHANISM_PTR mechanism, CK_OBJECT_HANDLE key) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session_to_real (state->px, &handle, &map, NULL); if (rv != CKR_...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
268,610,238,455,242,220,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
NOEXPORT char *include_config(char *directory, SERVICE_OPTIONS **section_ptr) { struct dirent **namelist; int i, num, err=0; num=scandir(directory, &namelist, NULL, alphasort); if(num<0) { ioerror("scandir"); return "Failed to include directory"; } for(i=0; i<num; ++i) { ...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
165,308,779,085,950,960,000,000,000,000,000,000,000
32
stunnel-5.57
httpHeaderNoteParsedEntry(Http::HdrType id, String const &context, bool error) { if (id != Http::HdrType::BAD_HDR) ++ headerStatsTable[id].parsCount; if (error) { if (id != Http::HdrType::BAD_HDR) ++ headerStatsTable[id].errCount; debugs(55, 2, "cannot parse hdr field: '" <<...
0
[ "CWE-444" ]
squid
9c8e2a71aa1d3c159a319d9365c346c48dc783a5
131,791,478,174,566,340,000,000,000,000,000,000,000
11
Enforce token characters for field-name (#700) RFC 7230 defines field-name as a token. Request splitting and cache poisoning attacks have used non-token characters to fool broken HTTP agents behind or in front of Squid for years. This change should significantly reduce that abuse. If we discover exceptional situatio...
pcsc_vendor_specific_init (int slot) { unsigned char buf[256]; pcsc_dword_t len; int sw; int vendor = 0; int product = 0; pcsc_dword_t get_tlv_ioctl = (pcsc_dword_t)-1; unsigned char *p; len = sizeof (buf); sw = control_pcsc (slot, CM_IOCTL_GET_FEATURE_REQUEST, NULL, 0, buf, &len); if (sw) { ...
1
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
58,194,400,619,337,570,000,000,000,000,000,000,000
136
Use inline functions to convert buffer data to scalars. * common/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to avoid all sign extension on ...
cmsStage* CMSEXPORT cmsStageAllocMatrix(cmsContext ContextID, cmsUInt32Number Rows, cmsUInt32Number Cols, const cmsFloat64Number* Matrix, const cmsFloat64Number* Offset) { cmsUInt32Number i, n; _cmsStageMatrixData* NewElem; cmsStage* NewMPE; n = Rows * Cols; /...
0
[]
Little-CMS
b0d5ffd4ad91cf8683ee106f13742db3dc66599a
185,738,464,171,530,170,000,000,000,000,000,000,000
53
Memory Squeezing: LCMS2: CLUTElemDup Check for allocation failures and tidy up if found.
static inline int ext4_begin_ordered_truncate(struct inode *inode, loff_t new_size) { return jbd2_journal_begin_ordered_truncate(&EXT4_I(inode)->jinode, new_size); }
0
[ "CWE-399" ]
linux-2.6
06a279d636734da32bb62dd2f7b0ade666f65d7c
79,089,393,777,034,410,000,000,000,000,000,000,000
6
ext4: only use i_size_high for regular files Directories are not allowed to be bigger than 2GB, so don't use i_size_high for anything other than regular files. E2fsck should complain about these inodes, but the simplest thing to do for the kernel is to only use i_size_high for regular files. This prevents an intenti...
BOOL update_write_cache_color_table_order(wStream* s, const CACHE_COLOR_TABLE_ORDER* cache_color_table, UINT16* flags) { int i, inf; UINT32* colorTable; if (cache_color_table->numberColors != 256) return FALSE; inf = update_appr...
0
[ "CWE-415" ]
FreeRDP
67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8
78,330,383,123,286,780,000,000,000,000,000,000,000
26
Fixed #6013: Check new length is > 0
static CURLcode parse_proxy(struct Curl_easy *data, struct connectdata *conn, char *proxy, curl_proxytype proxytype) { char *prox_portno; char *endofprot; /* We use 'proxyptr' to point to the proxy name from now on... */ char *proxyptr; char *portptr; ...
0
[ "CWE-416" ]
curl
81d135d67155c5295b1033679c606165d4e28f3f
276,116,340,193,160,850,000,000,000,000,000,000,000
201
Curl_close: clear data->multi_easy on free to avoid use-after-free Regression from b46cfbc068 (7.59.0) CVE-2018-16840 Reported-by: Brian Carpenter (Geeknik Labs) Bug: https://curl.haxx.se/docs/CVE-2018-16840.html
static int devinet_sysctl_register(struct in_device *idev) { int err; if (!sysctl_dev_name_is_allowed(idev->dev->name)) return -EINVAL; err = neigh_sysctl_register(idev->dev, idev->arp_parms, NULL); if (err) return err; err = __devinet_sysctl_register(dev_net(idev->dev), idev->dev->name, &idev->cnf); i...
0
[ "CWE-399" ]
net-next
fbd40ea0180a2d328c5adc61414dc8bab9335ce2
91,073,471,924,361,540,000,000,000,000,000,000,000
16
ipv4: Don't do expensive useless work during inetdev destroy. When an inetdev is destroyed, every address assigned to the interface is removed. And in this scenerio we do two pointless things which can be very expensive if the number of assigned interfaces is large: 1) Address promotion. We are deleting all address...
bool Image::isBigEndianPlatform() { union { uint32_t i; char c[4]; } e = { 0x01000000 }; return e.c[0]?true:false; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
49,151,163,804,656,305,000,000,000,000,000,000,000
9
Fix https://github.com/Exiv2/exiv2/issues/55
user_func_error(int error, char_u *name, funcexe_T *funcexe) { switch (error) { case FCERR_UNKNOWN: if (funcexe->fe_found_var) emsg_funcname(e_not_callable_type_str, name); else emsg_funcname(e_unknown_function_str, name); break; case FCERR_NOTMETHOD: emsg_funcname(e_cannot_use_function_as...
0
[ "CWE-416" ]
vim
91c7cbfe31bbef57d5fcf7d76989fc159f73ef15
135,261,941,734,197,910,000,000,000,000,000,000,000
31
patch 9.0.0225: using freed memory with multiple line breaks in expression Problem: Using freed memory with multiple line breaks in expression. Solution: Free eval_tofree later.
reportErrorPosition(PQExpBuffer msg, const char *query, int loc, int encoding) { #define DISPLAY_SIZE 60 /* screen width limit, in screen cols */ #define MIN_RIGHT_CUT 10 /* try to keep this far away from EOL */ char *wquery; int slen, cno, i, *qidx, *scridx, qoffset, scroffset, ...
0
[ "CWE-119" ]
postgres
01824385aead50e557ca1af28640460fa9877d51
308,279,744,213,387,800,000,000,000,000,000,000,000
218
Prevent potential overruns of fixed-size buffers. Coverity identified a number of places in which it couldn't prove that a string being copied into a fixed-size buffer would fit. We believe that most, perhaps all of these are in fact safe, or are copying data that is coming from a trusted source so that any overrun i...
static void php_var_serialize_class(smart_str *buf, zval *struc, zval *retval_ptr, HashTable *var_hash TSRMLS_DC) /* {{{ */ { int count; zend_bool incomplete_class; incomplete_class = php_var_serialize_class_name(buf, struc TSRMLS_CC); /* count after serializing name, since php_var_serialize_class_name * changes...
0
[]
php-src
e8429400d40e3c3aa4b22ba701991d698a2f3b2f
263,225,886,317,609,070,000,000,000,000,000,000,000
89
Fix bug #70172 - Use After Free Vulnerability in unserialize()
int jp2_box_put(jp2_box_t *box, jas_stream_t *out) { jas_stream_t *tmpstream; bool extlen; bool dataflag; tmpstream = 0; dataflag = !(box->info->flags & (JP2_BOX_SUPER | JP2_BOX_NODATA)); if (dataflag) { if (!(tmpstream = jas_stream_memopen(0, 0))) { goto error; } if (box->ops->putdata) { if ((*box...
1
[ "CWE-476" ]
jasper
e96fc4fdd525fa0ede28074a7e2b1caf94b58b0d
45,730,255,681,133,820,000,000,000,000,000,000,000
51
Fixed bugs due to uninitialized data in the JP2 decoder. Also, added some comments marking I/O stream interfaces that probably need to be changed (in the long term) to fix integer overflow problems.
MagickExport Image *AdaptiveThresholdImage(const Image *image, const size_t width,const size_t height,const double bias, ExceptionInfo *exception) { #define AdaptiveThresholdImageTag "AdaptiveThreshold/Image" CacheView *image_view, *threshold_view; Image *threshold_image; MagickBooleanType ...
0
[ "CWE-119", "CWE-787" ]
ImageMagick
450bd716ed3b9186dd10f9e60f630a3d9eeea2a4
149,434,028,340,030,100,000,000,000,000,000,000,000
181
semantic_type_code_props_set (semantic_type *type, code_props_type kind, code_props const *code) { if (type->props[kind].code) complain_semantic_type_redeclared (type, code_props_type_string (kind), type->props[kind...
0
[]
bison
b7aab2dbad43aaf14eebe78d54aafa245a000988
263,716,791,459,560,100,000,000,000,000,000,000,000
11
fix: crash when redefining the EOF token Reported by Agency for Defense Development. https://lists.gnu.org/r/bug-bison/2020-08/msg00008.html On an empty such as %token FOO BAR FOO 0 %% input: %empty we crash because when we find FOO 0, we decrement ntokens (since FOO was discovered...
static void ConvertRGBToxyY(const double red,const double green, const double blue,double *low_x,double *low_y,double *cap_Y) { double gamma, X, Y, Z; ConvertRGBToXYZ(red,green,blue,&X,&Y,&Z); gamma=PerceptibleReciprocal(X+Y+Z); *low_x=gamma*X; *low_y=gamma*Y; *cap_Y=Y; }
0
[ "CWE-369" ]
ImageMagick
75f6f5032690077cae3eaeda3c0165cc765eaeb5
338,445,562,755,091,830,000,000,000,000,000,000,000
15
https://github.com/ImageMagick/ImageMagick/issues/3295
vg_create_mapping_iov(VuGpu *g, struct virtio_gpu_resource_attach_backing *ab, struct virtio_gpu_ctrl_command *cmd, struct iovec **iov) { struct virtio_gpu_mem_entry *ents; size_t esize, s; int i; if (ab->nr_entries > 16384) { g_...
0
[]
qemu
86dd8fac2acc366930a5dc08d3fb1b1e816f4e1e
62,077,755,759,752,120,000,000,000,000,000,000,000
43
vhost-user-gpu: fix resource leak in 'vg_resource_create_2d' (CVE-2021-3544) Call 'vugbm_buffer_destroy' in error path to avoid resource leak. Fixes: CVE-2021-3544 Reported-by: Li Qiang <liq3ea@163.com> Reviewed-by: Prasad J Pandit <pjp@fedoraproject.org> Signed-off-by: Li Qiang <liq3ea@163.com> Reviewed-by: Marc-And...
void ConnectionImpl::onHeaderValue(const char* data, size_t length) { if (header_parsing_state_ == HeaderParsingState::Done && !enable_trailers_) { // Ignore trailers. return; } if (processing_trailers_) { maybeAllocTrailers(); } absl::string_view header_value{data, length}; if (strict_header...
1
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
80,753,064,273,947,790,000,000,000,000,000,000,000
41
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
static int ip6_setup_cork(struct sock *sk, struct inet_cork_full *cork, struct inet6_cork *v6_cork, struct ipcm6_cookie *ipc6, struct rt6_info *rt, struct flowi6 *fl6) { struct ipv6_pinfo *np = inet6_sk(sk); unsigned int mtu; struct ipv6_txoptions *opt = ipc6->opt; /* * setup for corking */ if (opt)...
0
[ "CWE-125" ]
linux
2423496af35d94a87156b063ea5cedffc10a70a1
168,008,422,468,894,410,000,000,000,000,000,000,000
67
ipv6: Prevent overrun when parsing v6 header options The KASAN warning repoted below was discovered with a syzkaller program. The reproducer is basically: int s = socket(AF_INET6, SOCK_RAW, NEXTHDR_HOP); send(s, &one_byte_of_data, 1, MSG_MORE); send(s, &more_than_mtu_bytes_data, 2000, 0); The socket() call set...
static ssize_t hfi1_file_write(struct file *fp, const char __user *data, size_t count, loff_t *offset) { const struct hfi1_cmd __user *ucmd; struct hfi1_filedata *fd = fp->private_data; struct hfi1_ctxtdata *uctxt = fd->uctxt; struct hfi1_cmd cmd; struct hfi1_user_info uinfo; struct hfi1_tid_info tinfo;...
1
[ "CWE-284", "CWE-264" ]
linux
e6bd18f57aad1a2d1ef40e646d03ed0f2515c9e3
161,842,834,296,784,840,000,000,000,000,000,000,000
244
IB/security: Restrict use of the write() interface The drivers/infiniband stack uses write() as a replacement for bi-directional ioctl(). This is not safe. There are ways to trigger write calls that result in the return structure that is normally written to user space being shunted off to user specified kernel memory...
TEST_P(Security, BuiltinAuthenticationAndCryptoPlugin_reliable_rtps_large_string) { PubSubReader<StringType> reader(TEST_TOPIC_NAME); PubSubWriter<StringType> writer(TEST_TOPIC_NAME); PropertyPolicy pub_property_policy, sub_property_policy; sub_property_policy.properties().emplace_back(Property("dds.s...
0
[ "CWE-284" ]
Fast-DDS
d2aeab37eb4fad4376b68ea4dfbbf285a2926384
223,954,298,720,572,240,000,000,000,000,000,000,000
61
check remote permissions (#1387) * Refs 5346. Blackbox test Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. one-way string compare Signed-off-by: Iker Luengo <ikerluengo@eprosima.com> * Refs 5346. Do not add partition separator on last partition Signed-off-by: Iker Luengo <ikerluengo@e...
xfs_lookup( xfs_inode_t *dp, struct xfs_name *name, xfs_inode_t **ipp, struct xfs_name *ci_name) { xfs_ino_t inum; int error; trace_xfs_lookup(dp, name); if (XFS_FORCED_SHUTDOWN(dp->i_mount)) return -EIO; xfs_ilock(dp, XFS_IOLOCK_SHARED); error = xfs_dir_lookup(NULL, dp, name, &inum, ci_name); if...
0
[ "CWE-19" ]
linux
fc0561cefc04e7803c0f6501ca4f310a502f65b8
44,492,856,721,807,360,000,000,000,000,000,000,000
34
xfs: optimise away log forces on timestamp updates for fdatasync xfs: timestamp updates cause excessive fdatasync log traffic Sage Weil reported that a ceph test workload was writing to the log on every fdatasync during an overwrite workload. Event tracing showed that the only metadata modification being made was the...
static int k400_allocate(struct hid_device *hdev) { struct hidpp_device *hidpp = hid_get_drvdata(hdev); struct k400_private_data *k400; k400 = devm_kzalloc(&hdev->dev, sizeof(struct k400_private_data), GFP_KERNEL); if (!k400) return -ENOMEM; hidpp->private_data = k400; return 0; };
0
[ "CWE-787" ]
linux
d9d4b1e46d9543a82c23f6df03f4ad697dab361b
173,067,600,042,418,260,000,000,000,000,000,000,000
14
HID: Fix assumption that devices have inputs The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff driver. The problem is caused by the driver's assumption that the device must have an input report. While this will be true for all normal HID input devices, a suitably malicious device can violate the...
static void cit_send_x_00(struct gspca_dev *gspca_dev, unsigned short x) { cit_write_reg(gspca_dev, x, 0x0127); cit_write_reg(gspca_dev, 0x0000, 0x0124); }
0
[ "CWE-476" ]
linux
a246b4d547708f33ff4d4b9a7a5dbac741dc89d8
85,499,101,312,320,600,000,000,000,000,000,000,000
5
media: xirlink_cit: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does...
restore_funccal(void) { if (funccal_stack == NULL) iemsg("INTERNAL: restore_funccal()"); else { current_funccal = funccal_stack->top_funccal; funccal_stack = funccal_stack->next; } }
0
[ "CWE-416" ]
vim
9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04
149,073,145,121,511,720,000,000,000,000,000,000,000
10
patch 8.2.3902: Vim9: double free with nested :def function Problem: Vim9: double free with nested :def function. Solution: Pass "line_to_free" from compile_def_function() and make sure cmdlinep is valid.
static int vmx_handle_exit(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); u32 exit_reason = vmx->exit_reason; u32 vectoring_info = vmx->idt_vectoring_info; /* If guest state is invalid, start emulating */ if (vmx->emulation_required) return handle_invalid_guest_state(vcpu); if (is_guest_mode(vc...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
111,803,710,494,597,130,000,000,000,000,000,000,000
79
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
rleUncompress (int inLength, int maxLength, const signed char in[], char out[]) { char *outStart = out; while (inLength > 0) { if (*in < 0) { int count = -((int)*in++); inLength -= count + 1; if (0 > (maxLength -= count)) return 0; // check the input buffer is big enough to con...
1
[ "CWE-119" ]
openexr
25259a84827234a283f6f9db72978198c7a3f268
304,669,280,453,166,070,000,000,000,000,000,000,000
40
detect buffer overflows in RleUncompress (#1036) Signed-off-by: Peter Hillman <peterh@wetafx.co.nz>
void CL_StopVideo_f( void ) { CL_CloseAVI( ); }
0
[ "CWE-269" ]
ioq3
376267d534476a875d8b9228149c4ee18b74a4fd
194,412,982,641,000,800,000,000,000,000,000,000,000
4
Don't load .pk3s as .dlls, and don't load user config files from .pk3s.
rpc_C_Initialize (CK_X_FUNCTION_LIST *self, p11_rpc_message *msg) { CK_X_Initialize func; CK_C_INITIALIZE_ARGS init_args; CK_BYTE_PTR handshake; CK_ULONG n_handshake; CK_BYTE reserved_present = 0; CK_BYTE_PTR reserved = NULL; CK_ULONG n_reserved; CK_RV ret = CKR_OK; p11_debug ("C_Initialize:...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
250,278,196,759,220,100,000,000,000,000,000,000,000
56
Check for arithmetic overflows before allocating
AllowedOnSecondary secondaryAllowed(ServiceContext* context) const override { return AllowedOnSecondary::kOptIn; }
0
[ "CWE-20" ]
mongo
722f06f3217c029ef9c50062c8cc775966fd7ead
210,397,422,131,074,300,000,000,000,000,000,000,000
3
SERVER-38275 ban find explain with UUID
rsvg_state_inherit_run (RsvgState * dst, const RsvgState * src, const InheritanceFunction function, const gboolean inherituninheritables) { gint i; if (function (dst->has_current_color, src->has_current_color)) dst->current_color = src->current_color; if (function (dst->has_...
0
[ "CWE-20" ]
librsvg
d1c9191949747f6dcfd207831d15dd4ba00e31f2
103,087,520,734,043,710,000,000,000,000,000,000,000
122
state: Store mask as reference Instead of immediately looking up the mask, store the reference and look it up on use.
static void trace_method_resolution(const char* prefix, Klass* klass, Klass* resolved_klass, Method* method, bool logitables, int index = -1...
0
[]
jdk17u
860464e46105b98ccf21e98abe2dc6e80155887c
336,536,569,199,428,600,000,000,000,000,000,000,000
33
8281866: Enhance MethodHandle invocations Reviewed-by: mbaesken Backport-of: d974d9da365f787f67971d88c79371c8b0769f75
gcab_folder_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { g_return_if_fail (GCAB_IS_FOLDER (object)); GCabFolder *self = GCAB_FOLDER (object); switch (prop_id) { case PROP_COMPTYPE: self->comptype = g_value_get_int (value); break; case PROP_...
0
[ "CWE-787" ]
gcab
c512f6ff0c82a1139b36db2b28f93edc01c74b4b
275,170,772,451,253,450,000,000,000,000,000,000,000
19
trivial: Allocate cdata_t on the heap Using a 91kB stack allocation for one object isn't awesome, and it also allows us to use g_autoptr() to simplify gcab_folder_extract()
static u32 str2ulong(unsigned char *str) { return ( (u32)str[0] | ((u32)str[1]<<8) | ((u32)str[2]<<16) | ((u32)str[3]<<24) ); }
0
[ "CWE-835" ]
gpac
7f060bbb72966cae80d6fee338d0b07fa3fc06e1
264,790,129,975,296,900,000,000,000,000,000,000,000
4
fixed #2159
static void io_rsrc_file_put(struct io_ring_ctx *ctx, struct io_rsrc_put *prsrc) { struct file *file = prsrc->file; #if defined(CONFIG_UNIX) struct sock *sock = ctx->ring_sock->sk; struct sk_buff_head list, *head = &sock->sk_receive_queue; struct sk_buff *skb; int i; if (!io_file_need_scm(file)) { fput(file);...
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
61,579,376,273,826,280,000,000,000,000,000,000,000
67
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...
sg_build_reserve(Sg_fd * sfp, int req_size) { Sg_scatter_hold *schp = &sfp->reserve; SCSI_LOG_TIMEOUT(4, sg_printk(KERN_INFO, sfp->parentdp, "sg_build_reserve: req_size=%d\n", req_size)); do { if (req_size < PAGE_SIZE) req_size = PAGE_SIZE; if (0 == sg_build_indirect(schp, sfp, req_size)) return; el...
0
[ "CWE-190", "CWE-189" ]
linux
fdc81f45e9f57858da6351836507fbcf1b7583ee
140,109,155,710,577,950,000,000,000,000,000,000,000
16
sg_start_req(): use import_iovec() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
static long hugetlbfs_punch_hole(struct inode *inode, loff_t offset, loff_t len) { struct hstate *h = hstate_inode(inode); loff_t hpage_size = huge_page_size(h); loff_t hole_start, hole_end; /* * For hole punch round up the beginning offset of the hole and * round down the end. */ hole_start = round_up(offs...
0
[]
linux
9aacdd354d197ad64685941b36d28ea20ab88757
310,395,789,793,722,300,000,000,000,000,000,000,000
29
fs/hugetlbfs/inode.c: fix bugs in hugetlb_vmtruncate_list() Hillf Danton noticed bugs in the hugetlb_vmtruncate_list routine. The argument end is of type pgoff_t. It was being converted to a vaddr offset and passed to unmap_hugepage_range. However, end was also being used as an argument to the vma_interval_tree_for...
ByteVector::ByteVector(uint size, char value) { d = new ByteVectorPrivate(size, value); }
0
[ "CWE-189" ]
taglib
dcdf4fd954e3213c355746fa15b7480461972308
107,459,079,990,016,360,000,000,000,000,000,000,000
4
Avoid uint overflow in case the length + index is over UINT_MAX
void _mi_report_crashed(MI_INFO *file, const char *message, const char *sfile, uint sline) { THD *cur_thd; LIST *element; char buf[1024]; mysql_mutex_lock(&file->s->intern_lock); if ((cur_thd= (THD*) file->in_use.data)) sql_print_error("Got an error from thread_id=%lu, %s:%d", cur_...
0
[ "CWE-362" ]
mysql-server
4e5473862e6852b0f3802b0cd0c6fa10b5253291
199,818,293,411,918,560,000,000,000,000,000,000,000
22
Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD) is created. When repair finishes, this file is renamed to the original .MYD file. The problem was that during this rename, we copied the stats from the old file to the new file w...