func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
int num_to_str(char *buf, int size, unsigned long long num) { /* put_dec requires 2-byte alignment of the buffer. */ char tmp[sizeof(num) * 3] __aligned(2); int idx, len; /* put_dec() may work incorrectly for num = 0 (generate "", not "0") */ if (num <= 9) { tmp[0] = '0' + num; len = 1; } else { len = put_...
0
[ "CWE-200" ]
linux
ad67b74d2469d9b82aaa572d76474c95bc484d57
59,683,179,988,230,100,000,000,000,000,000,000,000
20
printk: hash addresses printed with %p Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the a...
int cil_fill_ipaddr(struct cil_tree_node *addr_node, struct cil_ipaddr *addr) { int rc = SEPOL_ERR; if (addr_node == NULL || addr_node->data == NULL || addr == NULL) { goto exit; } if (addr_node->cl_head != NULL || addr_node->next != NULL) { goto exit; } if (strchr(addr_node->data, '.') != NULL) { addr-...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
153,472,856,527,191,410,000,000,000,000,000,000,000
30
libsepol/cil: Check for statements not allowed in optional blocks While there are some checks for invalid statements in an optional block when resolving the AST, there are no checks when building the AST. OSS-Fuzz found the following policy which caused a null dereference in cil_tree_get_next_path(). (blockinherit ...
TEST_F(HttpConnectionManagerImplTest, AccessEncoderRouteBeforeHeadersArriveOnIdleTimeout) { stream_idle_timeout_ = std::chrono::milliseconds(10); setup(false, ""); std::shared_ptr<MockStreamEncoderFilter> filter(new NiceMock<MockStreamEncoderFilter>()); EXPECT_CALL(filter_factory_, createFilterChain(_)) ...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
187,421,900,578,818,440,000,000,000,000,000,000,000
46
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...
void Subgraph::SwitchToDelegateContext() { context_.GetNodeAndRegistration = GetNodeAndRegistration; context_.ReplaceNodeSubsetsWithDelegateKernels = ReplaceNodeSubsetsWithDelegateKernels; context_.GetExecutionPlan = GetExecutionPlan; context_.PreviewDelegatePartitioning = PreviewDelegatePartitioning; }
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
64,940,525,388,541,250,000,000,000,000,000,000,000
7
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
static void *DestroyLogElement(void *log_info) { register LogInfo *p; p=(LogInfo *) log_info; if (p->file != (FILE *) NULL) { (void) FormatLocaleFile(p->file,"</log>\n"); (void) fclose(p->file); p->file=(FILE *) NULL; } if (p->format != (char *) NULL) p->format=DestroyString(p...
0
[ "CWE-476" ]
ImageMagick
107ce8577e818cf4801e5a59641cb769d645cc95
10,390,026,405,479,978,000,000,000,000,000,000,000
21
https://github.com/ImageMagick/ImageMagick/issues/1224
cpuacct_destroy(struct cgroup_subsys *ss, struct cgroup *cgrp) { struct cpuacct *ca = cgroup_ca(cgrp); int i; for (i = 0; i < CPUACCT_STAT_NSTATS; i++) percpu_counter_destroy(&ca->cpustat[i]); free_percpu(ca->cpuusage); kfree(ca); }
0
[ "CWE-703", "CWE-835" ]
linux
f26f9aff6aaf67e9a430d16c266f91b13a5bff64
320,616,641,289,421,250,000,000,000,000,000,000,000
10
Sched: fix skip_clock_update optimization idle_balance() drops/retakes rq->lock, leaving the previous task vulnerable to set_tsk_need_resched(). Clear it after we return from balancing instead, and in setup_thread_stack() as well, so no successfully descheduled or never scheduled task has it set. Need resched confus...
fetch_indexed_addr (dwarf_vma offset, uint32_t num_bytes) { struct dwarf_section *section = &debug_displays [debug_addr].section; if (section->start == NULL) { warn (_("<no .debug_addr section>")); return 0; } if (offset + num_bytes > section->size) { warn (_("Offset into section %...
0
[ "CWE-269" ]
binutils-gdb
e98e7d9a70dcc987bff0e925f20b78cd4a2979ed
137,473,074,528,654,820,000,000,000,000,000,000,000
19
Fix NULL pointer indirection when parsing corrupt DWARF data. PR 29290 * dwarf.c (read_and_display_attr_value): Check that debug_info_p is set before dereferencing it.
void transport_get_read_handles(rdpTransport* transport, HANDLE* events, DWORD* count) { events[*count] = tcp_get_event_handle(transport->TcpIn); (*count)++; if (transport->SplitInputOutput) { events[*count] = tcp_get_event_handle(transport->TcpOut); (*count)++; } if (transport->ReceiveEvent) { events[*c...
0
[ "CWE-476", "CWE-125" ]
FreeRDP
0773bb9303d24473fe1185d85a424dfe159aff53
108,754,438,910,622,420,000,000,000,000,000,000,000
23
nla: invalidate sec handle after creation If sec pointer isn't invalidated after creation it is not possible to check if the upper and lower pointers are valid. This fixes a segfault in the server part if the client disconnects before the authentication was finished.
static void tnt_event_hook(struct gps_device_t *session, event_t event) /* TNT lifetime event hook */ { if (session->context->readonly) return; if (event == event_wakeup) { (void)tnt_send(session, "@F0.3=1"); /* set run mode */ (void)tnt_send(session, "@F2.2=1"); /* report in degrees */ } }
0
[]
gpsd
08edc49d8f63c75bfdfb480b083b0d960310f94f
89,228,683,002,849,100,000,000,000,000,000,000,000
10
Address Savannah bug #38511: ais_context->bitlen <= sizeof(ais_context->bits)/8 is not checked
switch (type) { #ifdef ELFCORE case ET_CORE: phnum = elf_getu16(swap, elfhdr.e_phnum); if (phnum > ms->elf_phnum_max) return toomany(ms, "program headers", phnum); flags |= FLAGS_IS_CORE; if (dophn_core(ms, clazz, swap, fd, (off_t)elf_getu(swap, elfhdr.e_phoff), phnum, (size_t)elf_getu16(swap, ...
0
[ "CWE-399" ]
file
ce90e05774dd77d86cfc8dfa6da57b32816841c4
80,616,185,396,319,310,000,000,000,000,000,000,000
44
- Add a limit to the number of ELF notes processed (Suggested by Alexander Cherepanov) - Restructure ELF note printing so that we don't print the same message multiple times on repeated notes of the same kind.
TEST_F(QueryPlannerTest, ElemMatchWithNotInside2) { addIndex(BSON("a.b" << 1 << "a.c" << 1)); runQuery(fromjson("{d: 1, a: {$elemMatch: {c: {$ne: 3}, b: 4}}}")); assertNumSolutions(2U); assertSolutionExists("{cscan: {dir: 1}}"); assertSolutionExists( "{fetch: {filter: {d: 1, a: {$elemMatch:...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
311,946,366,543,931,300,000,000,000,000,000,000,000
13
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
rf64_set_chunk (SF_PRIVATE *psf, const SF_CHUNK_INFO * chunk_info) { return psf_save_write_chunk (&psf->wchunks, chunk_info) ; } /* rf64_set_chunk */
0
[ "CWE-476" ]
libsndfile
6f3266277bed16525f0ac2f0f03ff4626f1923e5
162,112,522,024,002,560,000,000,000,000,000,000,000
3
Fix max channel count bug The code was allowing files to be written with a channel count of exactly `SF_MAX_CHANNELS` but was failing to read some file formats with the same channel count.
static void generic_failure(void) { cont->done(0); }
0
[ "CWE-264", "CWE-754" ]
linux
ef87dbe7614341c2e7bfe8d32fcb7028cc97442c
170,161,650,931,526,460,000,000,000,000,000,000,000
4
floppy: ignore kernel-only members in FDRAWCMD ioctl input Always clear out these floppy_raw_cmd struct members after copying the entire structure from userspace so that the in-kernel version is always valid and never left in an interdeterminate state. Signed-off-by: Matthew Daley <mattd@bugfuzz.com> Signed-off-by: L...
void af_alg_async_cb(struct crypto_async_request *_req, int err) { struct af_alg_async_req *areq = _req->data; struct sock *sk = areq->sk; struct kiocb *iocb = areq->iocb; unsigned int resultlen; /* Buffer size written by crypto operation. */ resultlen = areq->outlen; af_alg_free_resources(areq); sock_put(sk)...
0
[ "CWE-416" ]
linux
9060cb719e61b685ec0102574e10337fa5f445ea
144,755,675,568,529,620,000,000,000,000,000,000,000
15
net: crypto set sk to NULL when af_alg_release. KASAN has found use-after-free in sockfs_setattr. The existed commit 6d8c50dcb029 ("socket: close race condition between sock_close() and sockfs_setattr()") is to fix this simillar issue, but it seems to ignore that crypto module forgets to set the sk to NULL after af_al...
dwg_section_type (const char* restrict name) { if (name == NULL) { return SECTION_UNKNOWN; // but could also be INFO or SYSTEM_MAP } else if (strEQc (name, "AcDb:Header")) { return SECTION_HEADER; } else if (strEQc (name, "AcDb:Classes")) { return SECTION_CLASSES; } els...
0
[ "CWE-787" ]
libredwg
ecf5183d8b3b286afe2a30021353b7116e0208dd
246,692,787,281,427,300,000,000,000,000,000,000,000
76
dwg_section_wtype: fix fuzzing overflow with illegal and overlong section names. Fixes GH #349, #352 section names cannot be longer than 24
static int binder_inc_ref_for_node(struct binder_proc *proc, struct binder_node *node, bool strong, struct list_head *target_list, struct binder_ref_data *rdata) { struct binder_ref *ref; struct binder_ref *new_ref = NULL; int ret = 0; binder_proc_lock(proc); ref = binder_get_ref_for_node_olocked(proc...
0
[ "CWE-416" ]
linux
7bada55ab50697861eee6bb7d60b41e68a961a9c
321,760,103,586,672,100,000,000,000,000,000,000,000
31
binder: fix race that allows malicious free of live buffer Malicious code can attempt to free buffers using the BC_FREE_BUFFER ioctl to binder. There are protections against a user freeing a buffer while in use by the kernel, however there was a window where BC_FREE_BUFFER could be used to free a recently allocated bu...
int btrfs_read_sys_array(struct btrfs_fs_info *fs_info) { struct btrfs_root *root = fs_info->tree_root; struct btrfs_super_block *super_copy = fs_info->super_copy; struct extent_buffer *sb; struct btrfs_disk_key *disk_key; struct btrfs_chunk *chunk; u8 *array_ptr; unsigned long sb_array_offset; int ret = 0; u3...
0
[ "CWE-476", "CWE-284" ]
linux
09ba3bc9dd150457c506e4661380a6183af651c1
219,813,181,786,111,030,000,000,000,000,000,000,000
119
btrfs: merge btrfs_find_device and find_device Both btrfs_find_device() and find_device() does the same thing except that the latter does not take the seed device onto account in the device scanning context. We can merge them. Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.c...
static int nfs40_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *state) { /* NFSv4.0 doesn't allow for delegation recovery on open expire */ nfs40_clear_delegation_stateid(state); nfs_state_clear_open_state_flags(state); return nfs4_open_expired(sp, state); }
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
132,054,415,420,357,000,000,000,000,000,000,000,000
7
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...
PHPAPI pcre* pcre_get_compiled_regex_ex(char *regex, pcre_extra **extra, int *preg_options, int *compile_options TSRMLS_DC) { pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex, strlen(regex) TSRMLS_CC); if (extra) { *extra = pce ? pce->extra : NULL; } if (preg_options) { *preg_options = pce ? pce->p...
0
[]
php-src
03964892c054d0c736414c10b3edc7a40318b975
123,786,974,619,770,900,000,000,000,000,000,000,000
16
Fix bug #70345 (Multiple vulnerabilities related to PCRE functions)
TfLiteStatus Subgraph::AddNodeWithParameters( const std::vector<int>& inputs, const std::vector<int>& outputs, const std::vector<int>& intermediates, const char* init_data, size_t init_data_size, void* builtin_data, const TfLiteRegistration* registration, int* node_index) { std::unique_ptr<void, declt...
0
[ "CWE-476" ]
tensorflow
f8378920345f4f4604202d4ab15ef64b2aceaa16
25,606,172,038,646,390,000,000,000,000,000,000,000
72
Prevent a null pointer dereference in TFLite. PiperOrigin-RevId: 370800353 Change-Id: Ic9c9712ce5c6e384c954dcd640a5bd9ff05c9a05
iakerb_gss_wrap_iov_length(OM_uint32 *minor_status, gss_ctx_id_t context_handle, int conf_req_flag, gss_qop_t qop_req, int *conf_state, gss_iov_buffer_desc *iov, int iov_count) { iakerb_ctx_id_t ctx = (iakerb_ctx_id_t)context_handle; ...
0
[ "CWE-18" ]
krb5
e04f0283516e80d2f93366e0d479d13c9b5c8c2a
173,936,939,023,574,340,000,000,000,000,000,000,000
13
Fix IAKERB context aliasing bugs [CVE-2015-2696] The IAKERB mechanism currently replaces its context handle with the krb5 mechanism handle upon establishment, under the assumption that most GSS functions are only called after context establishment. This assumption is incorrect, and can lead to aliasing violations for...
gifgetunsigned(Gif_Reader *grr) { uint8_t one = gifgetbyte(grr); uint8_t two = gifgetbyte(grr); return one | (two << 8); }
0
[ "CWE-416" ]
gifsicle
81fd7823f6d9c85ab598bc850e40382068361185
222,757,755,624,983,160,000,000,000,000,000,000,000
6
Fix use-after-free problems reported in #114.
free_config_tos( config_tree *ptree ) { FREE_ATTR_VAL_FIFO(ptree->orphan_cmds); }
0
[ "CWE-19" ]
ntp
fe46889f7baa75fc8e6c0fcde87706d396ce1461
67,108,611,426,994,720,000,000,000,000,000,000,000
6
[Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn.
cnt_deliver(struct worker *wrk, struct req *req) { CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req->objcore, OBJCORE_MAGIC); CHECK_OBJ_NOTNULL(req->objcore->objhead, OBJHEAD_MAGIC); AZ(req->stale_oc); AN(req->vcl); assert(req->objcore->refcnt > 0); ObjTouch(req-...
0
[ "CWE-212" ]
varnish-cache
bd7b3d6d47ccbb5e1747126f8e2a297f38e56b8c
263,952,980,545,830,120,000,000,000,000,000,000,000
85
Clear err_code and err_reason at start of request handling req->err_code and req->err_reason are set when going to synthetic handling. From there the resp.reason HTTP field is set from req->err_reason if set, or the generic code based on req->err_code is used if it was NULL. This patch clears these members so that a v...
static void del_usage_links(struct module *mod) { #ifdef CONFIG_MODULE_UNLOAD struct module_use *use; mutex_lock(&module_mutex); list_for_each_entry(use, &mod->target_list, target_list) sysfs_remove_link(use->target->holders_dir, mod->name); mutex_unlock(&module_mutex); #endif }
0
[ "CWE-362", "CWE-347" ]
linux
0c18f29aae7ce3dadd26d8ee3505d07cc982df75
243,237,438,590,120,630,000,000,000,000,000,000,000
11
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...
newbuffer(dns_message_t *msg, unsigned int size) { isc_result_t result; isc_buffer_t *dynbuf; dynbuf = NULL; result = isc_buffer_allocate(msg->mctx, &dynbuf, size); if (result != ISC_R_SUCCESS) return (ISC_R_NOMEMORY); ISC_LIST_APPEND(msg->scratchpad, dynbuf, link); return (ISC_R_SUCCESS); }
0
[ "CWE-617" ]
bind9
6ed167ad0a647dff20c8cb08c944a7967df2d415
102,338,432,197,027,430,000,000,000,000,000,000,000
12
Always keep a copy of the message this allows it to be available even when dns_message_parse() returns a error.
void emplace_front(SlicePtr&& slice) { growRing(); start_ = (start_ == 0) ? capacity_ - 1 : start_ - 1; ring_[start_] = std::move(slice); size_++; }
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
305,754,692,997,742,700,000,000,000,000,000,000,000
6
[buffer] Add on-drain hook to buffer API and use it to avoid fragmentation due to tracking of H2 data and control frames in the output buffer (#144) Signed-off-by: antonio <avd@google.com>
bool xt_percpu_counter_alloc(struct xt_percpu_counter_alloc_state *state, struct xt_counters *counter) { BUILD_BUG_ON(XT_PCPU_BLOCK_SIZE < (sizeof(*counter) * 2)); if (nr_cpu_ids <= 1) return true; if (!state->mem) { state->mem = __alloc_percpu(XT_PCPU_BLOCK_SIZE, XT_PCPU_BLOCK_SIZE); if (!s...
0
[]
linux
175e476b8cdf2a4de7432583b49c871345e4f8a1
299,100,545,144,689,930,000,000,000,000,000,000,000
22
netfilter: x_tables: Use correct memory barriers. When a new table value was assigned, it was followed by a write memory barrier. This ensured that all writes before this point would complete before any writes after this point. However, to determine whether the rules are unused, the sequence counter is read. To ensure...
static void add_grep(struct rev_info *revs, const char *ptn, enum grep_pat_token what) { if (!revs->grep_filter) { struct grep_opt *opt = xcalloc(1, sizeof(*opt)); opt->status_only = 1; opt->pattern_tail = &(opt->pattern_list); opt->regflags = REG_NEWLINE; revs->grep_filter = opt; } append_grep_pattern(rev...
0
[ "CWE-119" ]
git
fd55a19eb1d49ae54008d932a65f79cd6fda45c9
267,852,162,473,407,960,000,000,000,000,000,000,000
12
Fix buffer overflow in git diff If PATH_MAX on your system is smaller than a path stored, it may cause buffer overflow and stack corruption in diff_addremove() and diff_change() functions when running git-diff Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
bool operator()(OpKernelContext* context, const Device& d, typename TTypes<T, 4>::ConstTensor input_backward, typename TTypes<T, 4>::Tensor kernel, typename TTypes<T, 4>::ConstTensor output_backward, int input_rows, int input_cols, int row_stride...
0
[ "CWE-369", "CWE-787" ]
tensorflow
c570e2ecfc822941335ad48f6e10df4e21f11c96
271,666,921,226,913,500,000,000,000,000,000,000,000
9
Fix issues in Conv2DBackpropFilter. PiperOrigin-RevId: 369772454 Change-Id: I49b465f2ae2ce91def61b56cea8000197d5177d8
static int vsock_stream_setsockopt(struct socket *sock, int level, int optname, char __user *optval, unsigned int optlen) { int err; struct sock *sk; struct vsock_sock *vsk; u64 val; if (level != AF_VSOCK) return -ENOPROTOOPT; #define COPY_IN(_v) ...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
116,520,052,179,622,620,000,000,000,000,000,000,000
76
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
PyMODINIT_FUNC initcurvemath(void) { Py_InitModule("curvemath", curvemath__methods__); }
0
[ "CWE-347" ]
fastecdsa
e592f106edd5acf6dacedfab2ad16fe6c735c9d1
15,687,255,327,307,687,000,000,000,000,000,000,000
3
Properly handle the point at infinity
WalSndLastCycleHandler(SIGNAL_ARGS) { int save_errno = errno; /* * If replication has not yet started, die like with SIGTERM. If * replication is active, only set a flag and wake up the main loop. It * will send any outstanding WAL, wait for it to be replicated to the * standby, and then exit gracefully. ...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
70,793,157,900,104,020,000,000,000,000,000,000,000
18
Be more careful to not lose sync in the FE/BE protocol. If any error occurred while we were in the middle of reading a protocol message from the client, we could lose sync, and incorrectly try to interpret a part of another message as a new protocol message. That will usually lead to an "invalid frontend message" erro...
xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, xmlNodePtr origin) { xmlXPathContextPtr ret; ret = xmlXPathNewContext(doc); if (ret == NULL) return(ret); ret->xptr = 1; ret->here = here; ret->origin = origin; xmlXPathRegisterFunc(ret, (xmlChar *)"range", xmlXPtrRangeFu...
0
[ "CWE-416" ]
libxml2
9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
82,814,694,356,716,910,000,000,000,000,000,000,000
27
Fix XPointer paths beginning with range-to The old code would invoke the broken xmlXPtrRangeToFunction. range-to isn't really a function but a special kind of location step. Remove this function and always handle range-to in the XPath code. The old xmlXPtrRangeToFunction could also be abused to trigger a use-after-fr...
void SSH_Access::DisconnectLL() { if(send_buf) LogNote(9,_("Disconnecting")); send_buf=0; recv_buf=0; pty_send_buf=0; pty_recv_buf=0; ssh=0; received_greeting=false; password_sent=0; last_ssh_message.unset(); last_ssh_message_time=0; }
0
[]
lftp
bc7b476e782d77839765f56bbdb4cee9f36b54ec
55,007,936,514,834,470,000,000,000,000,000,000,000
14
add settings fish:auto-confirm and sftp:auto-confirm New host keys are now not confirmed by default, this should improve security. Suggested by Marcin Szewczyk <Marcin.Szewczyk@wodny.org>
static void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq, struct sched_rt_entity *rt_se, int cpu, int add, struct sched_rt_entity *parent) { struct rq *rq = cpu_rq(cpu); tg->rt_rq[cpu] = rt_rq; init_rt_rq(rt_rq, rq); rt_rq->tg = tg; rt_rq->rt_se = rt_se; rt_rq->rt_runtime = tg->rt_bandwidth.rt...
0
[]
linux-2.6
8f1bc385cfbab474db6c27b5af1e439614f3025c
296,202,562,026,775,780,000,000,000,000,000,000,000
28
sched: fair: weight calculations In order to level the hierarchy, we need to calculate load based on the root view. That is, each task's load is in the same unit. A / \ B 1 / \ 2 3 To compute 1's load we do: weight(1) -------------- rq_weight(A) To ...
mlx5_rx_burst_mprq(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) { struct mlx5_rxq_data *rxq = dpdk_rxq; const unsigned int strd_n = 1 << rxq->log_strd_num; const unsigned int strd_sz = 1 << rxq->log_strd_sz; const unsigned int strd_shift = MLX5_MPRQ_STRIDE_SHIFT_BYTE * rxq->strd_shift_en; const unsig...
0
[]
dpdk-stable
8b090f2664e9d014cd8fa0fde90597aaf4349e7e
6,548,474,259,344,739,000,000,000,000,000,000,000
231
net/mlx5: fix Rx queue recovery mechanism The local variables are getting inconsistent in data receiving routines after queue error recovery. Receive queue consumer index is getting wrong, need to reset one to the size of the queue (as RQ was fully replenished in recovery procedure). In MPRQ case, also the local cons...
void limit_output_verbosity(int level) { short info_limits[COUNT_INFO], debug_limits[COUNT_DEBUG]; int j; if (level > MAX_VERBOSITY) return; memset(info_limits, 0, sizeof info_limits); memset(debug_limits, 0, sizeof debug_limits); /* Compute the level limits in the above arrays. */ for (j = 1; j <= level; j...
0
[]
rsync
eac858085e3ac94ec0ab5061d11f52652c90a869
185,780,126,051,631,660,000,000,000,000,000,000,000
27
Add compat flag to allow proper seed checksum order. Fixes the equivalent of librsync's CVE-2014-8242 issue.
static struct page *alloc_gigantic_page(int nid, unsigned int order) { unsigned long nr_pages = 1 << order; unsigned long ret, pfn, flags; struct zone *z; z = NODE_DATA(nid)->node_zones; for (; z - NODE_DATA(nid)->node_zones < MAX_NR_ZONES; z++) { spin_lock_irqsave(&z->lock, flags); pfn = ALIGN(z->zone_start...
0
[ "CWE-703" ]
linux
5af10dfd0afc559bb4b0f7e3e8227a1578333995
310,795,933,568,586,940,000,000,000,000,000,000,000
34
userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page before returning in case of errors. The error returned was -EEXIST by running UFFDIO_COPY on a non-hole offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that t...
Hybrid_type_traits_integer() {};
0
[]
mysql-server
f7316aa0c9a3909fc7498e7b95d5d3af044a7e21
339,332,637,545,556,200,000,000,000,000,000,000,000
1
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL)) Backport of Bug#19143243 fix. NAME_CONST item can return NULL_ITEM type in case of incorrect arguments. NULL_ITEM has special processing in Item_func_in function. In Item_func_in::fix_length_and_dec an a...
uint32_t radeon_atom_get_engine_clock(struct radeon_device *rdev) { GET_ENGINE_CLOCK_PS_ALLOCATION args; int index = GetIndexIntoMasterTable(COMMAND, GetEngineClock); atom_execute_table(rdev->mode_info.atom_context, index, (uint32_t *)&args); return args.ulReturnEngineClock; }
0
[ "CWE-119", "CWE-193" ]
linux
0031c41be5c529f8329e327b63cde92ba1284842
186,162,414,163,641,570,000,000,000,000,000,000,000
8
drivers/gpu/drm/radeon/radeon_atombios.c: range check issues This change makes the array larger, "MAX_SUPPORTED_TV_TIMING_V1_2" is 3 and the original size "MAX_SUPPORTED_TV_TIMING" is 2. Also there were checks that were off by one. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: Alex Deucher <alexdeucher@...
static u32 ctrn_s32_to_index(s32 val) { if (!val) return 0; if (ABS(val)<=127) return 1; if (ABS(val)<=32767) return 2; return 3; }
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
122,329,941,824,015,720,000,000,000,000,000,000,000
7
fixed #2255
template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6> inline void swap(T1& a1, T1& b1, T2& a2, T2& b2, T3& a3, T3& b3, T4& a4, T4& b4, T5& a5, T5& b5, T6& a6, T6& b6) { cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4,a5,b5); cimg::swap(a6,b6);
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
74,176,956,118,236,840,000,000,000,000,000,000,000
3
Fix other issues in 'CImg<T>::load_bmp()'.
static VALUE cState_allow_nan_p(VALUE self) { GET_STATE(self); return state->allow_nan ? Qtrue : Qfalse; }
0
[ "CWE-119", "CWE-787" ]
json
8f782fd8e181d9cfe9387ded43a5ca9692266b85
335,868,416,488,751,680,000,000,000,000,000,000,000
5
Fix arbitrary heap exposure problem
camel_imapx_server_get_message_sync (CamelIMAPXServer *is, CamelIMAPXMailbox *mailbox, CamelFolderSummary *summary, CamelDataCache *message_cache, const gchar *message_uid, GCancellable *cancellable, GError **error) { CamelMessageInfo *mi; CamelStream *result_stre...
0
[ "CWE-476" ]
evolution-data-server
2cc39592b532cf0dc994fd3694b8e6bf924c9ab5
112,437,154,053,710,780,000,000,000,000,000,000,000
197
I#189 - Crash on malformed server response with minimal capabilities Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189
static int propfind_caldata(const xmlChar *name, xmlNsPtr ns, struct propfind_ctx *fctx, xmlNodePtr resp __attribute__((unused)), struct propstat propstat[], void *rock) { xmlNodePtr prop = (xmlNodePtr) rock; struct buf buf = BUF_INITIALIZER; const char *data = NULL; size_t d...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
163,264,151,075,244,930,000,000,000,000,000,000,000
26
HTTP: don't overrun buffer when parsing strings with sscanf()
make_spnego_tokenTarg_msg(OM_uint32 status, gss_OID mech_wanted, gss_buffer_t data, gss_buffer_t mechListMIC, send_token_flag sendtoken, gss_buffer_t outbuf) { unsigned int tlen = 0; unsigned int ret = 0; unsigned int NegTokenTargSize = 0; unsigned int NegTokenSize = 0; unsigned int rspTokenSize = 0...
0
[ "CWE-415" ]
krb5
f18ddf5d82de0ab7591a36e465bc24225776940f
184,149,037,669,848,300,000,000,000,000,000,000,000
191
Fix double-free in SPNEGO [CVE-2014-4343] In commit cd7d6b08 ("Verify acceptor's mech in SPNEGO initiator") the pointer sc->internal_mech became an alias into sc->mech_set->elements, which should be considered constant for the duration of the SPNEGO context. So don't free it. CVE-2014-4343: In MIT krb5 releases 1.1...
_gdm_display_set_x11_display_number (GdmDisplay *self, int num) { GdmDisplayPrivate *priv; priv = gdm_display_get_instance_private (self); priv->x11_display_number = num; }
0
[ "CWE-754" ]
gdm
4e6e5335d29c039bed820c43bfd1c19cb62539ff
117,701,982,161,789,710,000,000,000,000,000,000,000
8
display: Use autoptr to handle errors in look for existing users It will make things just cleaner
static int xts_aesni_setkey(struct crypto_tfm *tfm, const u8 *key, unsigned int keylen) { struct aesni_xts_ctx *ctx = crypto_tfm_ctx(tfm); u32 *flags = &tfm->crt_flags; int err; /* key consists of keys of equal size concatenated, therefore * the length must be even */ if (keylen % 2) { *flags |= CRYP...
0
[ "CWE-119", "CWE-787" ]
linux
ccfe8c3f7e52ae83155cb038753f4c75b774ca8a
318,811,119,318,537,000,000,000,000,000,000,000,000
24
crypto: aesni - fix memory usage in GCM decryption The kernel crypto API logic requires the caller to provide the length of (ciphertext || authentication tag) as cryptlen for the AEAD decryption operation. Thus, the cipher implementation must calculate the size of the plaintext output itself and cannot simply use cryp...
ossl_asn1_get_asn1type(VALUE obj) { ASN1_TYPE *ret; VALUE value, rflag; void *ptr; void (*free_func)(); int tag, flag; tag = ossl_asn1_default_tag(obj); value = ossl_asn1_get_value(obj); switch(tag){ case V_ASN1_BOOLEAN: ptr = (void*)(VALUE)obj_to_asn1bool(value); free_func = NULL...
0
[ "CWE-119" ]
openssl
1648afef33c1d97fb203c82291b8a61269e85d3b
325,493,350,887,405,880,000,000,000,000,000,000,000
74
asn1: fix out-of-bounds read in decoding constructed objects OpenSSL::ASN1.{decode,decode_all,traverse} have a bug of out-of-bounds read. int_ossl_asn1_decode0_cons() does not give the correct available length to ossl_asn1_decode() when decoding the inner components of a constructed object. This can cause out-of-bound...
tree_max_len(Node* node, ScanEnv* env) { OnigLen len; OnigLen tmax; len = 0; switch (NODE_TYPE(node)) { case NODE_LIST: do { tmax = tree_max_len(NODE_CAR(node), env); len = distance_add(len, tmax); } while (IS_NOT_NULL(node = NODE_CDR(node))); break; case NODE_ALT: do { t...
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
298,971,445,247,951,580,000,000,000,000,000,000,000
129
fix #87: Read unknown address in onig_error_code_to_str()
static void virtio_gpu_set_scanout(VirtIOGPU *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_simple_resource *res; struct virtio_gpu_scanout *scanout; pixman_format_code_t format; uint32_t offset; int bpp; struct virtio_gpu_set_scanout ss; VIR...
1
[ "CWE-772", "CWE-401" ]
qemu
dd248ed7e204ee8a1873914e02b8b526e8f1b80d
54,970,948,512,119,620,000,000,000,000,000,000,000
99
virtio-gpu: fix memory leak in set scanout In virtio_gpu_set_scanout function, when creating the 'rect' its refcount is set to 2, by pixman_image_create_bits and qemu_create_displaysurface_pixman function. This can lead a memory leak issues. This patch avoid this issue. Signed-off-by: Li Qiang <liqiang6-s@360.cn> Rev...
int hugetlb_mcopy_atomic_pte(struct mm_struct *dst_mm, pte_t *dst_pte, struct vm_area_struct *dst_vma, unsigned long dst_addr, unsigned long src_addr, struct page **pagep) { struct address_space *mapping; pgoff_t idx; unsigned long size; int vm_shared = dst_vma->vm_flags & VM_SHAR...
0
[ "CWE-362", "CWE-119" ]
linux
1e3921471354244f70fe268586ff94a97a6dd4df
28,003,821,363,185,797,000,000,000,000,000,000,000
126
userfaultfd: hugetlbfs: prevent UFFDIO_COPY to fill beyond the end of i_size This oops: kernel BUG at fs/hugetlbfs/inode.c:484! RIP: remove_inode_hugepages+0x3d0/0x410 Call Trace: hugetlbfs_setattr+0xd9/0x130 notify_change+0x292/0x410 do_truncate+0x65/0xa0 do_sys_ftruncate.constprop.3+0x11a/0x18...
static void print_dialog( const char *title, pjsip_dialog *dlg, char *buf, pj_size_t size) { int len; char userinfo[PJSIP_MAX_URL_SIZE]; len = pjsip_hdr_print_on(dlg->remote.info, userinfo, sizeof(userinfo)); if (len < 0) pj_ansi_strcpy(userinfo, "<--uri too long-->"); else userinfo[len] = '...
0
[ "CWE-416" ]
pjproject
db3235953baa56d2fb0e276ca510fefca751643f
47,423,259,103,461,090,000,000,000,000,000,000,000
22
Merge pull request from GHSA-ffff-m5fm-qm62 * Update pjsip_ua_unregister_dlg(): - update the hash key if the dialog being unregistered is used as hash key. - add an assertion check to make sure that the dlg_set to be removed is valid (can be found in the hash table). * Change hash key string comparison method.
archive_mstring_get_utf8(struct archive *a, struct archive_mstring *aes, const char **p) { struct archive_string_conv *sc; int r; /* If we already have a UTF8 form, return that immediately. */ if (aes->aes_set & AES_SET_UTF8) { *p = aes->aes_utf8.s; return (0); } *p = NULL; if (aes->aes_set & AES_SET_MBS...
0
[ "CWE-476" ]
libarchive
42a3408ac7df1e69bea9ea12b72e14f59f7400c0
20,508,994,242,097,766,000,000,000,000,000,000,000
30
archive_strncat_l(): allocate and do not convert if length == 0 This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set aes_set = AES_SET_MBS with aes_mbs.s == NULL. Resolves possible null-pointer dereference reported by OSS-Fuzz. Reported-By: OSS-Fuzz issue 286
zone_idetach(dns_zone_t **zonep) { dns_zone_t *zone; /* * 'zone' locked by caller. */ REQUIRE(zonep != NULL && DNS_ZONE_VALID(*zonep)); zone = *zonep; REQUIRE(LOCKED_ZONE(*zonep)); *zonep = NULL; INSIST(zone->irefs > 0); zone->irefs--; INSIST(zone->irefs + isc_refcount_current(&zone->erefs) > 0); }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
18,409,700,337,190,203,000,000,000,000,000,000,000
15
Update keyfetch_done compute_tag check If in keyfetch_done the compute_tag fails (because for example the algorithm is not supported), don't crash, but instead ignore the key.
connect_to_server (CamelService *service, GCancellable *cancellable, GError **error) { CamelPOP3Store *store = CAMEL_POP3_STORE (service); CamelNetworkSettings *network_settings; CamelNetworkSecurityMethod method; CamelSettings *settings; CamelStream *stream = NULL; CamelPOP3...
1
[ "CWE-74" ]
evolution-data-server
ba82be72cfd427b5d72ff21f929b3a6d8529c4df
233,896,390,569,954,330,000,000,000,000,000,000,000
160
I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3 Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226
void unit_unwatch_pid(Unit *u, pid_t pid) { Unit **array; assert(u); assert(pid_is_valid(pid)); /* First let's drop the unit in case it's keyed as "pid". */ (void) hashmap_remove_value(u->manager->watch_pids, PID_TO_PTR(pid), u); /* Then, let's also drop the unit, in c...
0
[ "CWE-269" ]
systemd
bf65b7e0c9fc215897b676ab9a7c9d1c688143ba
205,671,012,836,707,370,000,000,000,000,000,000,000
29
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...
generate (DSA_secret_key *sk, unsigned int nbits, unsigned int qbits, int transient_key, dsa_domain_t *domain, gcry_mpi_t **ret_factors ) { gpg_err_code_t rc; gcry_mpi_t p; /* the prime */ gcry_mpi_t q; /* the 160 bit prime factor */ gcry_mpi_t g; /* the generator */ gcry_mpi_t y; /* g^x...
0
[ "CWE-203" ]
libgcrypt
7c2943309d14407b51c8166c4dcecb56a3628567
261,251,270,487,584,800,000,000,000,000,000,000,000
152
dsa,ecdsa: Fix use of nonce, use larger one. * cipher/dsa-common.c (_gcry_dsa_modify_k): New. * cipher/pubkey-internal.h (_gcry_dsa_modify_k): New. * cipher/dsa.c (sign): Use _gcry_dsa_modify_k. * cipher/ecc-ecdsa.c (_gcry_ecc_ecdsa_sign): Likewise. * cipher/ecc-gost.c (_gcry_ecc_gost_sign): Likewise. CVE-id: CVE-201...
static int xt_table_open(struct inode *inode, struct file *file) { int ret; struct xt_names_priv *priv; ret = seq_open_net(inode, file, &xt_table_seq_ops, sizeof(struct xt_names_priv)); if (!ret) { priv = ((struct seq_file *)file->private_data)->private; priv->af = (unsigned long)PDE_DATA(inode); } ret...
0
[ "CWE-119" ]
nf-next
d7591f0c41ce3e67600a982bab6989ef0f07b3ce
204,282,538,979,836,800,000,000,000,000,000,000,000
13
netfilter: x_tables: introduce and use xt_copy_counters_from_user The three variants use same copy&pasted code, condense this into a helper and use that. Make sure info.name is 0-terminated. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
static int dsa_priv_encode(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pkey) { ASN1_STRING *params = NULL; ASN1_INTEGER *prkey = NULL; unsigned char *dp = NULL; int dplen; if (!pkey->pkey.dsa || !pkey->pkey.dsa->priv_key) { DSAerr(DSA_F_DSA_PRIV_ENCODE, DSA_R_MISSING_PARAMETERS); goto ...
0
[]
openssl
ab4a81f69ec88d06c9d8de15326b9296d7f498ed
137,813,995,154,834,830,000,000,000,000,000,000,000
51
Remove broken DSA private key workarounds. Remove old code that handled various invalid DSA formats in ancient software. This also fixes a double free bug when parsing malformed DSA private keys. Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using libFuzzer. CVE-2016-0705 Reviewed-by: Emilia K...
GF_EXPORT GF_Err gf_isom_get_jp2_config(GF_ISOFile *movie, u32 trackNumber, u32 sampleDesc, u8 **out_dsi, u32 *out_size) { GF_TrackBox *trak; GF_MPEGVisualSampleEntryBox *entry; GF_BitStream *bs; trak = gf_isom_get_track_from_file(movie, trackNumber); if (!trak || !trak->Media || !trak->Media->information || !tra...
0
[ "CWE-476" ]
gpac
ebfa346eff05049718f7b80041093b4c5581c24e
76,774,208,448,600,670,000,000,000,000,000,000,000
18
fixed #1706
static void php_mysqlnd_prepare_free_mem(void * _packet, zend_bool stack_allocation TSRMLS_DC) { MYSQLND_PACKET_PREPARE_RESPONSE *p= (MYSQLND_PACKET_PREPARE_RESPONSE *) _packet; if (!stack_allocation) { mnd_pefree(p, p->header.persistent); }
0
[ "CWE-119", "CWE-787" ]
php-src
28f80baf3c53e267c9ce46a2a0fadbb981585132
139,244,785,890,810,610,000,000,000,000,000,000,000
7
Fix bug #72293 - Heap overflow in mysqlnd related to BIT fields
static int ep_loop_check(struct eventpoll *ep, struct file *file) { int ret; struct eventpoll *ep_cur, *ep_next; ret = ep_call_nested(&poll_loop_ncalls, ep_loop_check_proc, file, ep, current); /* clear visited list */ list_for_each_entry_safe(ep_cur, ep_next, &visited_list, visited_list_link) { ...
0
[ "CWE-416" ]
linux
a9ed4a6560b8562b7e2e2bed9527e88001f7b682
30,047,526,051,029,470,000,000,000,000,000,000,000
15
epoll: Keep a reference on files added to the check list When adding a new fd to an epoll, and that this new fd is an epoll fd itself, we recursively scan the fds attached to it to detect cycles, and add non-epool files to a "check list" that gets subsequently parsed. However, this check list isn't completely safe wh...
_nc_locked_tracef(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _nc_va_tracef(fmt, ap); va_end(ap); if (--(MyNested) == 0) { _nc_unlock_global(tracef); } }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
232,945,601,817,401,760,000,000,000,000,000,000,000
12
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...
replace_write_s2d (SF_PRIVATE *psf, const short *ptr, sf_count_t len) { BUF_UNION ubuf ; int bufferlen, writecount ; sf_count_t total = 0 ; double scale ; scale = (psf->scale_int_float == 0) ? 1.0 : 1.0 / 0x8000 ; bufferlen = ARRAY_LEN (ubuf.dbuf) ; while (len > 0) { if (len < bufferlen) bufferlen = (int...
0
[ "CWE-369" ]
libsndfile
85c877d5072866aadbe8ed0c3e0590fbb5e16788
242,837,255,129,811,470,000,000,000,000,000,000,000
31
double64_init: Check psf->sf.channels against upper bound This prevents division by zero later in the code. While the trivial case to catch this (i.e. sf.channels < 1) has already been covered, a crafted file may report a number of channels that is so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets miscal...
unsigned long nr_free_pagecache_pages(void) { return nr_free_zone_pages(gfp_zone(GFP_HIGHUSER_MOVABLE)); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
191,546,033,950,418,850,000,000,000,000,000,000,000
4
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
pci_lintr_request(struct pci_vdev *dev) { struct businfo *bi; struct slotinfo *si; int bestpin, bestcount, pin; bi = pci_businfo[dev->bus]; if (bi == NULL) { pr_err("%s: pci [%s] has wrong bus %d info!\n", __func__, dev->name, dev->bus); return; } /* * Just allocate a pin from our slot. The pin will be ...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
2b3dedfb9ba13f15887f22b935d373f36c9a59fa
135,614,037,719,893,800,000,000,000,000,000,000,000
30
dm: pci: clean up assert() in pci core Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
static inline ssize_t __pipe_get_pages(struct iov_iter *i, size_t maxsize, struct page **pages, int iter_head, size_t *start) { struct pipe_inode_info *pipe = i->pipe; unsigned int p_mask = pipe->ring_size - 1; ssize_t n = push_pipe(i, maxsize, &iter_head, start); if (!n) return -EFAULT; maxsize...
0
[ "CWE-665", "CWE-284" ]
linux
9d2231c5d74e13b2a0546fee6737ee4446017903
2,653,877,541,318,167,000,000,000,000,000,000,000
22
lib/iov_iter: initialize "flags" in new pipe_buffer The functions copy_page_to_iter_pipe() and push_pipe() can both allocate a new pipe_buffer, but the "flags" member initializer is missing. Fixes: 241699cd72a8 ("new iov_iter flavour: pipe-backed") To: Alexander Viro <viro@zeniv.linux.org.uk> To: linux-fsdevel@vger.k...
qemuProcessInitMonitor(virQEMUDriverPtr driver, virDomainObjPtr vm, qemuDomainAsyncJob asyncJob) { int ret; if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0) return -1; ret = qemuMonitorSetCapabilities(QEMU_DOMAIN_PRIVATE(vm)->mon); if...
0
[ "CWE-416" ]
libvirt
1ac703a7d0789e46833f4013a3876c2e3af18ec7
19,472,997,248,287,750,000,000,000,000,000,000,000
16
qemu: Add missing lock in qemuProcessHandleMonitorEOF qemuMonitorUnregister will be called in multiple threads (e.g. threads in rpc worker pool and the vm event thread). In some cases, it isn't protected by the monitor lock, which may lead to call g_source_unref more than one time and a use-after-free problem eventua...
set_string_option( int opt_idx, char_u *value, int opt_flags) /* OPT_LOCAL and/or OPT_GLOBAL */ { char_u *s; char_u **varp; char_u *oldval; #if defined(FEAT_AUTOCMD) && defined(FEAT_EVAL) char_u *saved_oldval = NULL; #endif char_u *r = NULL; if (options[opt_idx].var == NULL) /* do...
0
[ "CWE-20" ]
vim
d0b5138ba4bccff8a744c99836041ef6322ed39a
277,298,250,824,398,240,000,000,000,000,000,000,000
57
patch 8.0.0056 Problem: When setting 'filetype' there is no check for a valid name. Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'.
void Tag::ShallowCopy(Tag* dst) const { dst->simple_tags_ = simple_tags_; dst->simple_tags_size_ = simple_tags_size_; dst->simple_tags_count_ = simple_tags_count_; }
0
[ "CWE-20" ]
libvpx
f00890eecdf8365ea125ac16769a83aa6b68792d
319,242,715,484,540,400,000,000,000,000,000,000,000
5
update libwebm to libwebm-1.0.0.27-352-g6ab9fcf https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d
Network::Socket& mutableSocket() { return *socket_; }
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
260,493,140,838,950,430,000,000,000,000,000,000,000
1
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static BOOL is_char7_bitset(const sljit_u8 *bitset, BOOL nclass) { /* Tells whether the character codes below 128 are enough to determine a match. */ const sljit_u8 value = nclass ? 0xff : 0; const sljit_u8 *end = bitset + 32; bitset += 16; do { if (*bitset++ != value) return FALSE; } while (bitset < end); r...
0
[ "CWE-125" ]
php-src
8947fd9e9fdce87cd6c59817b1db58e789538fe9
217,083,124,455,582,500,000,000,000,000,000,000,000
16
Fix #78338: Array cross-border reading in PCRE We backport r1092 from pcre2.
read_pbm_integer(j_compress_ptr cinfo, FILE *infile, unsigned int maxval) /* Read an unsigned decimal integer from the PPM file */ /* Swallows one trailing character after the integer */ /* Note that on a 16-bit-int machine, only values up to 64k can be read. */ /* This should not be a problem in practice. */ { regis...
0
[ "CWE-200", "CWE-125" ]
libjpeg-turbo
9c78a04df4e44ef6487eee99c4258397f4fdca55
330,391,422,029,060,440,000,000,000,000,000,000,000
30
cjpeg: Fix OOB read caused by malformed 8-bit BMP ... in which one or more of the color indices is out of range for the number of palette entries. Fix partly borrowed from jpeg-9c. This commit also adopts Guido's JERR_PPM_OUTOFRANGE enum value in lieu of our project-specific JERR_PPM_TOOLARGE enum value. Fixes #258
void lbs_debugfs_remove(void) { if (lbs_dir) debugfs_remove(lbs_dir); }
0
[ "CWE-703", "CWE-189" ]
linux
a497e47d4aec37aaf8f13509f3ef3d1f6a717d88
260,546,811,537,546,340,000,000,000,000,000,000,000
5
libertas: potential oops in debugfs If we do a zero size allocation then it will oops. Also we can't be sure the user passes us a NUL terminated string so I've added a terminator. This code can only be triggered by root. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-...
int ServerConnectionImpl::onHeader(const nghttp2_frame* frame, HeaderString&& name, HeaderString&& value) { // For a server connection, we should never get push promise frames. ASSERT(frame->hd.type == NGHTTP2_HEADERS); ASSERT(frame->headers.cat == NGHTTP2_HCAT_REQUEST || frame-...
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
262,825,391,517,372,450,000,000,000,000,000,000,000
7
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...
extract_param (const char **source, param_token *name, param_token *value, char separator) { const char *p = *source; while (c_isspace (*p)) ++p; if (!*p) { *source = p; return false; /* no error; nothing more to extract */ } /* Extract name. */ name->b = p; ...
0
[ "CWE-20" ]
wget
3e25a9817f47fbb8660cc6a3b2f3eea239526c6c
41,828,138,148,296,710,000,000,000,000,000,000,000
66
Introduce --trust-server-names. Close CVE-2010-2252.
static int comp_keys(const struct btrfs_disk_key *disk_key, const struct btrfs_key *k2) { const struct btrfs_key *k1 = (const struct btrfs_key *)disk_key; return btrfs_comp_cpu_keys(k1, k2); }
0
[ "CWE-362" ]
linux
dbcc7d57bffc0c8cac9dac11bec548597d59a6a5
65,998,752,089,780,500,000,000,000,000,000,000,000
7
btrfs: fix race when cloning extent buffer during rewind of an old root While resolving backreferences, as part of a logical ino ioctl call or fiemap, we can end up hitting a BUG_ON() when replaying tree mod log operations of a root, triggering a stack trace like the following: ------------[ cut here ]------------ ...
static int find_local_node_in_nodelist(struct totem_config *totem_config) { icmap_iter_t iter; const char *iter_key; int res = 0; int node_pos; int local_node_pos = -1; struct totem_ip_address bind_addr; int interface_up, interface_num; char tmp_key[ICMAP_KEYNAME_MAXLEN]; char *node_addr_str; struct totem_ip_...
0
[]
corosync
55dc09ea237482f827333759fd45608bc9518d64
171,640,454,936,612,460,000,000,000,000,000,000,000
50
totemconfig: enforce hmac config when crypto is enabled Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
void signal_fault(struct pt_regs *regs, void __user *frame, char *where) { struct task_struct *me = current; if (show_unhandled_signals && printk_ratelimit()) { printk("%s[%d] bad frame in %s frame:%p ip:%lx sp:%lx orax:%lx", me->comm,me->pid,where,frame,regs->ip,regs->sp,regs->orig_ax); print_vma_addr(...
0
[ "CWE-399" ]
linux-2.6
e40cd10ccff3d9fbffd57b93780bee4b7b9bff51
76,866,205,656,147,260,000,000,000,000,000,000,000
12
x86: clear DF before calling signal handler The Linux kernel currently does not clear the direction flag before calling a signal handler, whereas the x86/x86-64 ABI requires that. Linux had this behavior/bug forever, but this becomes a real problem with gcc version 4.3, which assumes that the direction flag is correc...
void CaptureStatsUpdate(ThreadVars *tv, CaptureStats *s, const Packet *p) { if (unlikely(PACKET_TEST_ACTION(p, (ACTION_REJECT|ACTION_REJECT_DST|ACTION_REJECT_BOTH)))) { StatsIncr(tv, s->counter_ips_rejected); } else if (unlikely(PACKET_TEST_ACTION(p, ACTION_DROP))) { StatsIncr(tv, s->counter_ips...
0
[ "CWE-20" ]
suricata
11f3659f64a4e42e90cb3c09fcef66894205aefe
213,622,943,192,447,900,000,000,000,000,000,000,000
12
teredo: be stricter on what to consider valid teredo Invalid Teredo can lead to valid DNS traffic (or other UDP traffic) being misdetected as Teredo. This leads to false negatives in the UDP payload inspection. Make the teredo code only consider a packet teredo if the encapsulated data was decoded without any 'invali...
explicit CImgList(const CImg<t>& img, const bool is_shared=false): _width(0),_allocated_width(0),_data(0) { assign(1); _data[0].assign(img,is_shared); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
233,894,221,412,326,500,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.
parse_CLONE(char *arg, const struct ofpact_parse_params *pp) { const size_t clone_offset = ofpacts_pull(pp->ofpacts); struct ofpact_nest *clone = ofpact_put_CLONE(pp->ofpacts); char *error; ofpbuf_pull(pp->ofpacts, sizeof *clone); error = ofpacts_parse_copy(arg, pp, false, OFPACT_CLONE); /* hea...
0
[ "CWE-416" ]
ovs
6d67310f4d2524b466b98f05ebccc1add1e8cf35
237,071,656,942,300,780,000,000,000,000,000,000,000
20
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
unset_vsge_alive(virtual_server_group_entry_t *vsge, virtual_server_t *vs) { update_vsge_alive_count(vsge, vs, false); }
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
294,877,950,067,242,980,000,000,000,000,000,000,000
4
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
static int update_init_section(struct playlist *pls, struct segment *seg) { static const int max_init_section_size = 1024*1024; HLSContext *c = pls->parent->priv_data; int64_t sec_size; int64_t urlsize; int ret; if (seg->init_section == pls->cur_init_section) return 0; pls->cur_ini...
0
[ "CWE-416" ]
FFmpeg
6959358683c7533f586c07a766acc5fe9544d8b2
107,090,314,270,450,800,000,000,000,000,000,000,000
59
avformat/hls: check segment duration value of EXTINF fix ticket: 8673 set the default EXTINF duration to 1ms if duration is smaller than 1ms Signed-off-by: Steven Liu <lq@chinaffmpeg.org> (cherry picked from commit 9dfb19baeb86a8bb02c53a441682c6e9a6e104cc)
static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu, struct kvm_debugregs *dbgregs) { if (dbgregs->flags) return -EINVAL; memcpy(vcpu->arch.db, dbgregs->db, sizeof(vcpu->arch.db)); kvm_update_dr0123(vcpu); vcpu->arch.dr6 = dbgregs->dr6; kvm_update_dr6(vcpu); vcpu->arch.dr7 = dbgregs->dr7...
0
[ "CWE-369" ]
linux
0185604c2d82c560dab2f2933a18f797e74ab5a8
55,650,968,851,536,150,000,000,000,000,000,000,000
15
KVM: x86: Reload pit counters for all channels when restoring state Currently if userspace restores the pit counters with a count of 0 on channels 1 or 2 and the guest attempts to read the count on those channels, then KVM will perform a mod of 0 and crash. This will ensure that 0 values are converted to 65536 as per...
TEST(MatchHeadersTest, HeaderSuffixMatch) { TestRequestHeaderMapImpl matching_headers{{"match-header", "123value"}}; TestRequestHeaderMapImpl unmatching_headers{{"match-header", "value123"}}; const std::string yaml = R"EOF( name: match-header suffix_match: value )EOF"; std::vector<HeaderUtility::HeaderDataP...
0
[]
envoy
2c60632d41555ec8b3d9ef5246242be637a2db0f
55,979,319,119,594,360,000,000,000,000,000,000,000
15
http: header map security fixes for duplicate headers (#197) Previously header matching did not match on all headers for non-inline headers. This patch changes the default behavior to always logically match on all headers. Multiple individual headers will be logically concatenated with ',' similar to what is done with...
static void CacheThru_abort(HTStream *me, HTError e) { if (me->fp) LYCloseTempFP(me->fp); if (LYCacheSourceForAborted == SOURCE_CACHE_FOR_ABORTED_DROP) { if (me->filename) { CTRACE((tfp, "SourceCacheWriter: Removing active file %s\n", me->filename)); (void) LYRemoveTemp(me->filename); FRE...
0
[ "CWE-416" ]
lynx-snapshots
280a61b300a1614f6037efc0902ff7ecf17146e9
257,693,692,398,988,060,000,000,000,000,000,000,000
24
snapshot of project "lynx", label v2-8-9dev_15b
SYSCALL_DEFINE5(mount, char __user *, dev_name, char __user *, dir_name, char __user *, type, unsigned long, flags, void __user *, data) { int ret; char *kernel_type; char *kernel_dev; void *options; kernel_type = copy_mount_string(type); ret = PTR_ERR(kernel_type); if (IS_ERR(kernel_type)) goto out_type; ...
0
[ "CWE-200" ]
linux
427215d85e8d1476da1a86b8d67aceb485eb3631
267,073,598,539,031,230,000,000,000,000,000,000,000
33
ovl: prevent private clone if bind mount is not allowed Add the following checks from __do_loopback() to clone_private_mount() as well: - verify that the mount is in the current namespace - verify that there are no locked children Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de> Fixes: c771d683a62e ("vfs: ...
static void hugepage_subpool_put_pages(struct hugepage_subpool *spool, long delta) { if (!spool) return; spin_lock(&spool->lock); spool->used_hpages -= delta; /* If hugetlbfs_put_super couldn't free spool due to * an outstanding quota reference, free it now. */ unlock_or_release_subpool(spool); }
0
[ "CWE-399" ]
linux
90481622d75715bfcb68501280a917dbfe516029
124,204,369,180,116,060,000,000,000,000,000,000,000
12
hugepages: fix use after free bug in "quota" handling hugetlbfs_{get,put}_quota() are badly named. They don't interact with the general quota handling code, and they don't much resemble its behaviour. Rather than being about maintaining limits on on-disk block usage by particular users, they are instead about maintai...
doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num, size_t size, off_t fsize, int *flags, int mach, int strtab) { Elf32_Shdr sh32; Elf64_Shdr sh64; int stripped = 1; void *nbuf; off_t noff, coff, name_off; uint64_t cap_hw1 = 0; /* SunOS 5.x hardware capabilites */ uint64_t cap_sf1 = ...
1
[ "CWE-399" ]
file
d7cdad007c507e6c79f51f058dd77fab70ceb9f6
15,161,133,540,449,227,000,000,000,000,000,000,000
231
Stop reporting bad capabilities after the first few.
ofputil_decode_ofp15_group_desc_reply(struct ofputil_group_desc *gd, struct ofpbuf *msg, enum ofp_version version) { struct ofp15_group_desc_stats *ogds; uint16_t length, bucket_list_len; int error; if (!msg->header) { ...
1
[ "CWE-772" ]
ovs
f673f4059717dc9d2d6dd2d4db52be1149a996dd
154,301,542,253,279,640,000,000,000,000,000,000,000
55
ofp-util: Fix memory leaks when parsing OF1.5 group properties. Found by libFuzzer. Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Justin Pettit <jpettit@ovn.org>
mrb_mod_prepend_features(mrb_state *mrb, mrb_value mod) { mrb_value klass; mrb_check_type(mrb, mod, MRB_TT_MODULE); mrb_get_args(mrb, "C", &klass); mrb_prepend_module(mrb, mrb_class_ptr(klass), mrb_class_ptr(mod)); return mod; }
0
[ "CWE-476", "CWE-415" ]
mruby
faa4eaf6803bd11669bc324b4c34e7162286bfa3
28,781,829,819,663,690,000,000,000,000,000,000,000
9
`mrb_class_real()` did not work for `BasicObject`; fix #4037
PHP_METHOD(domimplementation, createDocumentType) { xmlDtd *doctype; int ret; size_t name_len = 0, publicid_len = 0, systemid_len = 0; char *name = NULL, *publicid = NULL, *systemid = NULL; xmlChar *pch1 = NULL, *pch2 = NULL, *localname = NULL; xmlURIPtr uri; if (zend_parse_parameters(ZEND_NUM_ARGS(), "|sss", &...
1
[]
php-src
f15f8fc573eb38c3c73e23e0930063a6f6409ed4
326,497,834,648,810,050,000,000,000,000,000,000,000
56
Fix #79971: special character is breaking the path in xml function The libxml based XML functions accepting a filename actually accept URIs with possibly percent-encoded characters. Percent-encoded NUL bytes lead to truncation, like non-encoded NUL bytes would. We catch those, and let the functions fail with a respe...
gnutls_x509_crt_get_proxy(gnutls_x509_crt_t cert, unsigned int *critical, int *pathlen, char **policyLanguage, char **policy, size_t * sizeof_policy) { int result; gnutls_datum_t proxyCertInfo; if (cert == NULL) { gnutls_assert(); return GNUTLS_E_INVALID_REQUEST; } if ((result = _gn...
0
[ "CWE-295" ]
gnutls
6e76e9b9fa845b76b0b9a45f05f4b54a052578ff
94,398,575,639,999,620,000,000,000,000,000,000,000
38
on certificate import check whether the two signature algorithms match
int addrconf_add_ifaddr(void __user *arg) { struct in6_ifreq ireq; int err; if (!capable(CAP_NET_ADMIN)) return -EPERM; if (copy_from_user(&ireq, arg, sizeof(struct in6_ifreq))) return -EFAULT; rtnl_lock(); err = inet6_addr_add(ireq.ifr6_ifindex, &ireq.ifr6_addr, ireq.ifr6_prefixlen); rtnl_unlock(); re...
0
[ "CWE-200" ]
linux-2.6
8a47077a0b5aa2649751c46e7a27884e6686ccbf
94,307,120,488,950,470,000,000,000,000,000,000,000
16
[NETLINK]: Missing padding fields in dumped structures Plug holes with padding fields and initialized them to zero. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
static __inline__ struct ipv6_pinfo *inet6_sk_generic(struct sock *sk) { const int offset = sk->sk_prot->obj_size - sizeof(struct ipv6_pinfo); return (struct ipv6_pinfo *)(((u8 *)sk) + offset); }
0
[]
net
79462ad02e861803b3840cc782248c7359451cd9
207,929,320,644,165,650,000,000,000,000,000,000,000
6
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...
static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom) { MOVStreamContext *sc; int i, edit_count, version; int64_t elst_entry_size; if (c->fc->nb_streams < 1 || c->ignore_editlist) return 0; sc = c->fc->streams[c->fc->nb_streams-1]->priv_data; version = avio_r8(pb); /* ...
0
[ "CWE-703" ]
FFmpeg
c953baa084607dd1d84c3bfcce3cf6a87c3e6e05
27,723,576,307,275,284,000,000,000,000,000,000,000
68
avformat/mov: Check count sums in build_open_gop_key_points() Fixes: ffmpeg.md Fixes: Out of array access Fixes: CVE-2022-2566 Found-by: Andy Nguyen <theflow@google.com> Found-by: 3pvd <3pvd@google.com> Reviewed-by: Andy Nguyen <theflow@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void ConnPoolImplBase::checkForIdleAndCloseIdleConnsIfDraining() { if (is_draining_for_deletion_) { closeIdleConnectionsForDrainingPool(); } checkForIdleAndNotify(); }
0
[ "CWE-703", "CWE-674" ]
envoy
4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31
83,618,393,141,278,130,000,000,000,000,000,000,000
7
CVE-2022-23606 Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed. Signed-off-by: Yan Avlasov <yavlasov@google.com>