func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
GF_Err pasp_box_write(GF_Box *s, GF_BitStream *bs) { GF_PixelAspectRatioBox *ptr = (GF_PixelAspectRatioBox *)s; GF_Err e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u32(bs, ptr->hSpacing); gf_bs_write_u32(bs, ptr->vSpacing); return GF_OK;
0
[ "CWE-787" ]
gpac
388ecce75d05e11fc8496aa4857b91245007d26e
179,393,972,985,090,660,000,000,000,000,000,000,000
9
fixed #1587
static apr_status_t setup_store(md_store_t **pstore, md_mod_conf_t *mc, apr_pool_t *p, server_rec *s) { const char *base_dir; apr_status_t rv; MD_CHK_VARS; base_dir = ap_server_root_relative(p, mc->base_dir); if (!MD_OK(md_store_fs_init(pstore, p, base_dir)...
0
[ "CWE-476" ]
mod_md
e71001955809247b3aa4d269e1e0741b4fe0fc3d
151,482,534,283,863,060,000,000,000,000,000,000,000
25
v1.1.12, notifycmd improvements
static int checkout_merge_path( git_buf *out, checkout_data *data, checkout_conflictdata *conflict, git_merge_file_result *result) { const char *our_label_raw, *their_label_raw, *suffix; int error = 0; if ((error = git_buf_joinpath(out, git_repository_workdir(data->repo), result->path)) < 0) return error; /...
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
102,306,778,383,666,150,000,000,000,000,000,000,000
26
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
sigstop_sighandler (sig) int sig; { set_signal_handler (SIGTSTP, old_tstp); set_signal_handler (SIGTTOU, old_ttou); set_signal_handler (SIGTTIN, old_ttin); old_cont = set_signal_handler (SIGCONT, sigcont_sighandler); give_terminal_to (shell_pgrp, 0); kill (getpid (), sig); SIGRETURN (0); }
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
124,455,722,918,126,840,000,000,000,000,000,000,000
15
bash-4.4-rc2 release
static int ptrace_detach(struct task_struct *child, unsigned int data) { if (!valid_signal(data)) return -EIO; /* Architecture-specific hardware disable .. */ ptrace_disable(child); write_lock_irq(&tasklist_lock); /* * We rely on ptrace_freeze_traced(). It can't be killed and * untraced by another thread, ...
0
[ "CWE-264", "CWE-269" ]
linux
6994eefb0053799d2e07cd140df6c2ea106c41ee
151,659,609,214,084,100,000,000,000,000,000,000,000
26
ptrace: Fix ->ptracer_cred handling for PTRACE_TRACEME Fix two issues: When called for PTRACE_TRACEME, ptrace_link() would obtain an RCU reference to the parent's objective credentials, then give that pointer to get_cred(). However, the object lifetime rules for things like struct cred do not permit unconditionally ...
static struct sock *__unix_find_socket_byname(struct net *net, struct sockaddr_un *sunname, int len, int type, unsigned int hash) { struct sock *s; sk_for_each(s, &unix_socket_table[hash ^ type]) { struct unix_sock *u = unix_sk(s); if (!net_eq(sock_net(s), net)) continue; if (u->addr...
0
[]
net
7d267278a9ece963d77eefec61630223fce08c6c
198,291,091,637,591,670,000,000,000,000,000,000,000
20
unix: avoid use-after-free in ep_remove_wait_queue Rainer Weikusat <rweikusat@mobileactivedefense.com> writes: An AF_UNIX datagram socket being the client in an n:1 association with some server socket is only allowed to send messages to the server if the receive queue of this socket contains at most sk_max_ack_backlog...
void normalize_rt_tasks(void) { struct task_struct *g, *p; struct sched_attr attr = { .sched_policy = SCHED_NORMAL, }; read_lock(&tasklist_lock); for_each_process_thread(g, p) { /* * Only normalize user tasks: */ if (p->flags & PF_KTHREAD) continue; p->se.exec_start = 0; #ifdef CONFIG_SCHEDSTAT...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
290,039,742,067,318,940,000,000,000,000,000,000,000
36
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
MONGO_EXPORT bson_type bson_iterator_type( const bson_iterator *i ) { return ( bson_type )i->cur[0]; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
115,020,164,392,740,350,000,000,000,000,000,000,000
3
don't mix up int and size_t (first pass to fix that)
send_data_or_handle(char type, u_int32_t id, const u_char *data, int dlen) { struct sshbuf *msg; int r; if ((msg = sshbuf_new()) == NULL) fatal("%s: sshbuf_new failed", __func__); if ((r = sshbuf_put_u8(msg, type)) != 0 || (r = sshbuf_put_u32(msg, id)) != 0 || (r = sshbuf_put_string(msg, data, dlen)) !...
0
[ "CWE-732", "CWE-703", "CWE-269" ]
src
a6981567e8e215acc1ef690c8dbb30f2d9b00a19
246,907,227,879,164,040,000,000,000,000,000,000,000
14
disallow creation (of empty files) in read-only mode; reported by Michal Zalewski, feedback & ok deraadt@
static struct page *alloc_page_interleave(gfp_t gfp, unsigned order, unsigned nid) { struct page *page; page = __alloc_pages(gfp, order, nid); if (page && page_to_nid(page) == nid) inc_zone_page_state(page, NUMA_INTERLEAVE_HIT); return page; }
0
[ "CWE-416" ]
linux
73223e4e2e3867ebf033a5a8eb2e5df0158ccc99
193,989,938,861,718,560,000,000,000,000,000,000,000
10
mm/mempolicy: fix use after free when calling get_mempolicy I hit a use after free issue when executing trinity and repoduced it with KASAN enabled. The related call trace is as follows. BUG: KASan: use after free in SyS_get_mempolicy+0x3c8/0x960 at addr ffff8801f582d766 Read of size 2 by task syz-executor1/798 ...
static void exec_fusermount(const char *argv[]) { execv(FUSERMOUNT_DIR "/" FUSERMOUNT_PROG, (char **) argv); execvp(FUSERMOUNT_PROG, (char **) argv); }
0
[ "CWE-200" ]
ntfs-3g
7f81935f32e58e8fec22bc46683b1b067469405f
22,398,714,880,754,204,000,000,000,000,000,000,000
5
Returned an error code when the --help or --version options are used Accepting --help or --version options may leave the ntfs-3g process in an unclean state, so reject them while processing options. Also reject them in libfuse-lite.
struct iwl_trans *iwl_trans_pcie_alloc(struct pci_dev *pdev, const struct pci_device_id *ent, const struct iwl_cfg_trans_params *cfg_trans) { struct iwl_trans_pcie *trans_pcie; struct iwl_trans *trans; int ret, addr_size; ret = pcim_enable_device(pdev); if (ret) return ERR_PTR(ret); if (cf...
1
[ "CWE-476" ]
linux
8188a18ee2e48c9a7461139838048363bfce3fef
289,089,530,533,588,900,000,000,000,000,000,000,000
182
iwlwifi: pcie: fix rb_allocator workqueue allocation We don't handle failures in the rb_allocator workqueue allocation correctly. To fix that, move the code earlier so the cleanup is easier and we don't have to undo all the interrupt allocations in this case. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Sig...
NOEXPORT char *parse_service_option(CMD cmd, SERVICE_OPTIONS **section_ptr, char *opt, char *arg) { SERVICE_OPTIONS *section; int endpoints=0; #ifndef USE_WIN32 struct group *gr; struct passwd *pw; #endif section=section_ptr ? *section_ptr : NULL; if(cmd==CMD_SET_DEFAULTS || cmd==CMD_S...
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
154,621,842,030,580,320,000,000,000,000,000,000,000
2,452
stunnel-5.57
static void configfs_composite_suspend(struct usb_gadget *gadget) { struct usb_composite_dev *cdev; struct gadget_info *gi; unsigned long flags; cdev = get_gadget_data(gadget); if (!cdev) return; gi = container_of(cdev, struct gadget_info, cdev); spin_lock_irqsave(&gi->spinlock, flags); cdev = get_gadget_da...
0
[ "CWE-125" ]
linux
15753588bcd4bbffae1cca33c8ced5722477fe1f
245,967,820,899,695,430,000,000,000,000,000,000,000
21
USB: gadget: fix illegal array access in binding with UDC FuzzUSB (a variant of syzkaller) found an illegal array access using an incorrect index while binding a gadget with UDC. Reference: https://www.spinics.net/lists/linux-usb/msg194331.html This bug occurs when a size variable used for a buffer is misused to acc...
static unsigned long __init get_new_step_size(unsigned long step_size) { /* * Initial mapped size is PMD_SIZE (2M). * We can not set step_size to be PUD_SIZE (1G) yet. * In worse case, when we cross the 1G boundary, and * PG_LEVEL_2M is not set, we will need 1+1+512 pages (2M + 8k) * to map 1G range with PTE...
0
[ "CWE-200", "CWE-732" ]
linux
a4866aa812518ed1a37d8ea0c881dc946409de94
277,125,447,426,594,170,000,000,000,000,000,000,000
18
mm: Tighten x86 /dev/mem with zeroing reads Under CONFIG_STRICT_DEVMEM, reading System RAM through /dev/mem is disallowed. However, on x86, the first 1MB was always allowed for BIOS and similar things, regardless of it actually being System RAM. It was possible for heap to end up getting allocated in low 1MB RAM, and ...
NCURSES_SP_NAME(vidputs) (NCURSES_SP_DCLx chtype newmode, NCURSES_SP_OUTC outc) { attr_t turn_on, turn_off; int pair; bool reverse = FALSE; bool can_color = (SP_PARM == 0 || SP_PARM->_coloron); #if NCURSES_EXT_FUNCS bool fix_pair0 = (SP_PARM != 0 && SP_PARM->_coloron && !SP_PARM->_default_...
1
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
121,820,005,539,796,540,000,000,000,000,000,000,000
234
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...
getargopt(exarg_T *eap) { char_u *arg = eap->arg + 2; int *pp = NULL; int bad_char_idx; char_u *p; // ":edit ++[no]bin[ary] file" if (STRNCMP(arg, "bin", 3) == 0 || STRNCMP(arg, "nobin", 5) == 0) { if (*arg == 'n') { arg += 2; eap->force_bin = FORCE_NOBIN; } else eap->f...
0
[ "CWE-122" ]
vim
35a319b77f897744eec1155b736e9372c9c5575f
323,959,900,993,113,980,000,000,000,000,000,000,000
86
patch 8.2.3489: ml_get error after search with range Problem: ml_get error after search with range. Solution: Limit the line number to the buffer line count.
static void FUZ_displayMallocStats(mallocCounter_t count) { DISPLAYLEVEL(3, "peak:%6u KB, nbMallocs:%2u, total:%6u KB \n", (U32)(count.peakMalloc >> 10), count.nbMalloc, (U32)(count.totalMalloc >> 10)); }
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
142,614,019,696,323,170,000,000,000,000,000,000,000
7
fixed T36302429
static int readOHDRHeaderMessageDataspace(struct READER *reader, struct DATASPACE *ds) { int version = fgetc(reader->fhd); ds->dimensionality = (uint8_t)fgetc(reader->fhd); if (ds->dimensionality > 4) { mylog("dimensionality must be lower than 5\n"); // LCOV_EXCL_LI...
0
[ "CWE-787" ]
libmysofa
890400ebd092c574707d0c132124f8ff047e20e1
125,711,802,420,825,920,000,000,000,000,000,000,000
27
Fix for issue 163
static void __io_put_req_task(struct io_kiocb *req) { if (req->flags & REQ_F_TASK_PINNED) put_task_struct(req->task); }
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
115,238,571,479,832,240,000,000,000,000,000,000,000
5
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
GF_Err gf_isom_parse_movie_boxes(GF_ISOFile *mov, u32 *boxType, u64 *bytesMissing, Bool progressive_mode) { GF_Err e; GF_Blob *blob = NULL; //if associated file is a blob, lock blob before parsing ! if (mov->movieFileMap && ((mov->movieFileMap->type == GF_ISOM_DATA_MEM) || (mov->movieFileMap->type == GF_ISOM_DATA_...
0
[ "CWE-476" ]
gpac
37592ad86c6ca934d34740012213e467acc4a3b0
148,498,600,982,915,260,000,000,000,000,000,000,000
21
fixed #2163
fascist_firewall_allows_node(const node_t *node, firewall_connection_t fw_connection, int pref_only) { if (!node) { return 0; } node_assert_ok(node); const int pref_ipv6 = (fw_connection == FIREWALL_OR_CONNECTION ? node_ipv...
0
[]
tor
1afc2ed956a35b40dfd1d207652af5b50c295da7
38,429,312,617,637,720,000,000,000,000,000,000,000
35
Fix policies.c instance of the "if (r=(a-b)) return r" pattern I think this one probably can't underflow, since the input ranges are small. But let's not tempt fate. This patch also replaces the "cmp" functions here with just "eq" functions, since nothing actually checked for anything besides 0 and nonzero. Related...
Curl_ssl_connect_nonblocking(struct Curl_easy *data, struct connectdata *conn, int sockindex, bool *done) { CURLcode result; #ifndef CURL_DISABLE_PROXY if(conn->bits.proxy_ssl_connected[sockindex]) { result = ssl_connect_init_proxy(conn, sockindex); if(result) return resu...
0
[ "CWE-290" ]
curl
b09c8ee15771c614c4bf3ddac893cdb12187c844
163,489,913,246,470,720,000,000,000,000,000,000,000
22
vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid() To make sure we set and extract the correct session. Reported-by: Mingtao Yang Bug: https://curl.se/docs/CVE-2021-22890.html CVE-2021-22890
static void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) { VirtIODevice *vdev = VIRTIO_DEVICE(qdev); VirtIOGPU *g = VIRTIO_GPU(qdev); bool have_virgl; int i; if (g->conf.max_outputs > VIRTIO_GPU_MAX_SCANOUTS) { error_setg(errp, "invalid max_outputs > %d", VIRTIO_GPU_MAX_SCANOU...
0
[]
qemu
acfc4846508a02cc4c83aa27799fd74ac280bdb2
219,093,599,662,779,700,000,000,000,000,000,000,000
59
virtio-gpu: use VIRTIO_GPU_MAX_SCANOUTS The value is defined in virtio_gpu.h already (changing from 4 to 16). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 1463653560-26958-6-git-send-email-marcandre.lureau@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
int tls1_mac(SSL *ssl, SSL3_RECORD *rec, unsigned char *md, int send) { unsigned char *seq; EVP_MD_CTX *hash; size_t md_size; int i; EVP_MD_CTX *hmac = NULL, *mac_ctx; unsigned char header[13]; int stream_mac = (send ? (ssl->mac_flags & SSL_MAC_FLAG_WRITE_MAC_STREAM) : ...
1
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
45,438,025,606,438,850,000,000,000,000,000,000,000
121
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
void setVariationalRefinementDelta(float val) CV_OVERRIDE { variational_refinement_delta = val; }
0
[ "CWE-125", "CWE-369" ]
opencv
d1615ba11a93062b1429fce9f0f638d1572d3418
140,356,522,736,958,640,000,000,000,000,000,000,000
1
video:fixed DISOpticalFlow segfault from small img
uint32_t enc_untrusted_qe_get_target_info(sgx_target_info_t *qe_target_info) { uint32_t result; CHECK_OCALL(ocall_enc_untrusted_qe_get_target_info(&result, qe_target_info)); return result; }
0
[ "CWE-200", "CWE-668" ]
asylo
ecfcd0008b6f8f63c6fa3cc1b62fcd4a52f2c0ad
179,039,491,232,485,270,000,000,000,000,000,000,000
5
Store untrusted input to enclave variable The untrusted input pointer should be stored to trusted variable before checking to avoid unexpected modifications after checking. PiperOrigin-RevId: 362553830 Change-Id: I743f9bd3487de60269e247d74f2188f2ffc06d01
call_connect(struct rpc_task *task) { struct rpc_xprt *xprt = task->tk_xprt; dprintk("RPC: %5u call_connect xprt %p %s connected\n", task->tk_pid, xprt, (xprt_connected(xprt) ? "is" : "is not")); task->tk_action = call_transmit; if (!xprt_connected(xprt)) { task->tk_action = call_connect_status; if (tas...
0
[ "CWE-400", "CWE-399", "CWE-703" ]
linux
0b760113a3a155269a3fba93a409c640031dd68f
107,130,679,876,954,760,000,000,000,000,000,000,000
16
NLM: Don't hang forever on NLM unlock requests If the NLM daemon is killed on the NFS server, we can currently end up hanging forever on an 'unlock' request, instead of aborting. Basically, if the rpcbind request fails, or the server keeps returning garbage, we really want to quit instead of retrying. Tested-by: Vasi...
static int jas_iccxyz_input(jas_iccattrval_t *attrval, jas_stream_t *in, int len) { if (len != 4 * 3) abort(); return jas_iccgetxyz(in, &attrval->data.xyz); }
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
281,069,881,513,716,180,000,000,000,000,000,000,000
6
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
void MoveIndexIfNecessary(HValue* index_raw, HBoundsCheck* insert_before, HInstruction* end_of_scan_range) { ASSERT(index_raw->IsAdd() || index_raw->IsSub()); HBinaryOperation* index = HArithmeticBinaryOperation::cast(index_raw); HValue* left...
1
[]
node
3122e0eae64c5ab494b29d0a9cadef902d93f1f9
33,327,415,813,823,623,000,000,000,000,000,000,000
33
deps: fix up v8 after fd80a3 fd80a31e0697d6317ce8c2d289575399f4e06d21 has introduced a segfault during redundant boundary check elimination (#8208). The problem consists of two parts: 1. Abscense of instruction iterator in `EliminateRedundantBoundsChecks`. It was present in recent v8, but wasn't consider...
static pyc_object *get_string_object(RzBuffer *buffer) { pyc_object *ret = NULL; bool error = false; ut32 n = 0; n = get_ut32(buffer, &error); if (n > ST32_MAX) { RZ_LOG_ERROR("bad marshal data (string size out of range)"); return NULL; } if (error) { return NULL; } ret = RZ_NEW0(pyc_object); if (!ret)...
0
[ "CWE-190" ]
rizin
e645e5827327d945307ddfde4f617ae4c36561fd
63,579,507,759,986,860,000,000,000,000,000,000,000
25
Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625
bgp_create_ip_reach(struct bgp_write_state *s, struct bgp_bucket *buck, byte *buf, byte *end) { /* * 2 B Withdrawn Routes Length (zero) * --- IPv4 Withdrawn Routes NLRI (unused) * 2 B Total Path Attribute Length * var Path Attributes * var IPv4 Network Layer Reachability Information */ int lr, la...
0
[ "CWE-787" ]
bird
8388f5a7e14108a1458fea35bfbb5a453e2c563c
115,044,160,312,981,930,000,000,000,000,000,000,000
27
BGP: Fix bugs in handling of shutdown messages There is an improper check for valid message size, which may lead to stack overflow and buffer leaks to log when a large message is received. Thanks to Daniel McCarney for bugreport and analysis.
void determinization(const nfa_t &nfa, dfa_t &dfa, const opt_t *opts, Msg &msg, const std::string &cond) { if (opts->posix_semantics) { pdetctx_t ctx(opts, msg, cond, nfa, dfa); determinization(ctx); } else { ldetctx_t ctx(opts, msg, cond, nfa, dfa); determinization(ctx);...
0
[ "CWE-787" ]
re2c
a3473fd7be829cb33907cb08612f955133c70a96
278,646,041,102,206,140,000,000,000,000,000,000,000
12
Limit maximum allowed NFA and DFA size. Instead of failing with an out of memory exception or crashing with a stack overflow, emit an error message and exit. This is a partial fix for bug #394 "Stack overflow due to recursion in src/dfa/dead_rules.cc", where re2c hit stack overflow on a counted repetition regexp with ...
spush(char *x) { if (TPS(stack_ptr) < STACKSIZE) { TPS(stack)[TPS(stack_ptr)].num_type = FALSE; TPS(stack)[TPS(stack_ptr)].data.str = x; TPS(stack_ptr)++; } else { DEBUG(2, ("spush: stack overflow: %s", _nc_visbuf(TPS(tparam_base)))); _nc_tparm_err++; } }
0
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
236,430,977,590,295,040,000,000,000,000,000,000,000
11
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...
spawn_on_window (GSWindow *window, char *command, int *pid, GIOFunc watch_func, gpointer user_data, gint *watch_id) { int argc; char **argv; char **envp; GError *err...
0
[ "CWE-284" ]
cinnamon-screensaver
da7af55f1fa966c52e15cc288d4f8928eca8cc9f
144,382,975,362,031,390,000,000,000,000,000,000,000
85
Workaround gtk3 bug, don't allow GtkWindow to handle popup_menu.
static inline unsigned unix_hash_fold(__wsum n) { unsigned hash = (__force unsigned)n; hash ^= hash>>16; hash ^= hash>>8; return hash&(UNIX_HASH_SIZE-1); }
0
[]
linux-2.6
6209344f5a3795d34b7f2c0061f49802283b6bdd
110,611,372,789,235,070,000,000,000,000,000,000,000
7
net: unix: fix inflight counting bug in garbage collector Previously I assumed that the receive queues of candidates don't change during the GC. This is only half true, nothing can be received from the queues (see comment in unix_gc()), but buffers could be added through the other half of the socket pair, which may s...
void ConnectDialog::on_qaFavoriteAddNew_triggered() { ConnectDialogEdit *cde = new ConnectDialogEdit(this); if (cde->exec() == QDialog::Accepted) { ServerItem *si = new ServerItem(cde->qsName, cde->qsHostname, cde->usPort, cde->qsUsername, cde->qsPassword); qlItems << si; qtwServers->siFavorite->addServerItem(...
0
[ "CWE-59", "CWE-61" ]
mumble
e59ee87abe249f345908c7d568f6879d16bfd648
3,156,134,816,350,439,000,000,000,000,000,000,000
12
FIX(client): Only allow "http"/"https" for URLs in ConnectDialog Our public server list registration script doesn't have an URL scheme whitelist for the website field. Turns out a malicious server can register itself with a dangerous URL in an attempt to attack a user's machine. User interaction is required, as the ...
bool tdc_open_view(THD *thd, TABLE_LIST *table_list, uint flags) { TABLE not_used; TABLE_SHARE *share; bool err= TRUE; if (!(share= tdc_acquire_share(thd, table_list, GTS_VIEW))) return TRUE; DBUG_ASSERT(share->is_view); if (flags & CHECK_METADATA_VERSION) { /* Check TABLE_SHARE-version o...
0
[]
server
0168d1eda30dad4b517659422e347175eb89e923
9,685,974,405,526,979,000,000,000,000,000,000,000
32
MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list Do not assume that subquery Item always present.
test_exports_debian_merged (void) { static const FakeFile files[] = { { "etc", FAKE_DIR }, { "etc/alternatives", FAKE_DIR }, { "etc/ld.so.cache", FAKE_FILE }, { "etc/ld.so.conf", FAKE_FILE }, { "etc/ld.so.conf.d", FAKE_DIR }, { "bin", FAKE_SYMLINK, "usr/bin" }, { "lib", FAKE_SYMLINK, "us...
0
[ "CWE-74" ]
flatpak
4108e022452303093d8b90c838695a0476cb09c7
215,051,912,816,240,300,000,000,000,000,000,000,000
44
context: Add --unset-env option and a corresponding override This follows up from GHSA-4ppf-fxf6-vxg2 to fix missing functionality that I noticed while resolving that vulnerability, but is not required for fixing the vulnerability. Signed-off-by: Simon McVittie <smcv@collabora.com>
static void print_progress_bar(struct filter_op *fop) { switch(fop->opcode) { case FOP_EXIT: ef_debug(1, "!"); break; case FOP_TEST: ef_debug(1, "?"); break; case FOP_ASSIGN: ef_debug(1, "="); break; case FOP_FUNC: ef_debug(1, "."...
0
[ "CWE-703", "CWE-125" ]
ettercap
626dc56686f15f2dda13c48f78c2a666cb6d8506
81,931,248,241,031,920,000,000,000,000,000,000,000
24
Exit gracefully in case of corrupted filters (Closes issue #782)
static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); unsigned long cr3, cr4; /* Record the guest's net vcpu time for enforced NMI injections. */ if (unlikely(!enable_vnmi && vmx->loaded_vmcs->soft_vnmi_blocked)) vmx->loaded_vmcs->entry_time = ktime_get(); /* Don't...
0
[ "CWE-787" ]
linux
04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a
315,549,033,499,254,160,000,000,000,000,000,000,000
158
KVM: VMX: Don't use vcpu->run->internal.ndata as an array index __vmx_handle_exit() uses vcpu->run->internal.ndata as an index for an array access. Since vcpu->run is (can be) mapped to a user address space with a writer permission, the 'ndata' could be updated by the user process at anytime (the user process can set...
static int caif_seqpkt_recvmsg(struct kiocb *iocb, struct socket *sock, struct msghdr *m, size_t len, int flags) { struct sock *sk = sock->sk; struct sk_buff *skb; int ret; int copylen; ret = -EOPNOTSUPP; if (m->msg_flags&MSG_OOB) goto read_error; m->msg_namelen = 0; skb = skb_recv_datagram(sk, ...
1
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
330,635,549,681,915,400,000,000,000,000,000,000,000
37
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...
static int bpf_mkobj_ops(struct inode *dir, struct dentry *dentry, umode_t mode, const struct inode_operations *iops) { struct inode *inode; if (bpf_dname_reserved(dentry)) return -EPERM; inode = bpf_get_inode(dir->i_sb, dir, mode | S_IFREG); if (IS_ERR(inode)) return PTR_ERR(inode); inode->i_op = iops;...
0
[ "CWE-703" ]
linux
92117d8443bc5afacc8d5ba82e541946310f106e
63,405,154,149,935,810,000,000,000,000,000,000,000
20
bpf: fix refcnt overflow On a system with >32Gbyte of phyiscal memory and infinite RLIMIT_MEMLOCK, the malicious application may overflow 32-bit bpf program refcnt. It's also possible to overflow map refcnt on 1Tb system. Impose 32k hard limit which means that the same bpf program or map cannot be shared by more than ...
MagickExport MagickBooleanType CloneImageProperties(Image *image, const Image *clone_image) { assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename); assert(clone_image != (...
0
[ "CWE-125" ]
ImageMagick
dd84447b63a71fa8c3f47071b09454efc667767b
131,258,104,006,145,730,000,000,000,000,000,000,000
68
Prevent buffer overflow (bug report from Ibrahim el-sayed)
static int load_state_from_tss16(struct x86_emulate_ctxt *ctxt, struct tss_segment_16 *tss) { int ret; u8 cpl; ctxt->_eip = tss->ip; ctxt->eflags = tss->flag | 2; *reg_write(ctxt, VCPU_REGS_RAX) = tss->ax; *reg_write(ctxt, VCPU_REGS_RCX) = tss->cx; *reg_write(ctxt, VCPU_REGS_RDX) = tss->dx; *reg_write(ctx...
1
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
188,905,896,938,096,600,000,000,000,000,000,000,000
51
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
static void usbredir_buffered_bulk_in_complete_raw(USBRedirDevice *dev, USBPacket *p, uint8_t ep) { struct buf_packet *bulkp; int count; while ((bulkp = QTAILQ_FIRST(&dev->endpoint[EP2I(ep)].bufpq)) && p->actual_length < p->iov.size && p->status == USB_RET_SUCCESS) { count = bulkp->l...
0
[ "CWE-770" ]
qemu
7ec54f9eb62b5d177e30eb8b1cad795a5f8d8986
114,549,390,364,052,100,000,000,000,000,000,000,000
15
usb/redir: avoid dynamic stack allocation (CVE-2021-3527) Use autofree heap allocation instead. Fixes: 4f4321c11ff ("usb: use iovecs in USBPacket") Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id:...
pq_setkeepaliveswin32(Port *port, int idle, int interval) { struct tcp_keepalive ka; DWORD retsize; if (idle <= 0) idle = 2 * 60 * 60; /* default = 2 hours */ if (interval <= 0) interval = 1; /* default = 1 second */ ka.onoff = 1; ka.keepalivetime = idle * 1000; ka.keepaliveinterval = interval * 1000; ...
0
[ "CWE-89" ]
postgres
2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b
62,366,602,547,367,000,000,000,000,000,000,000,000
35
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...
vrrp_bfd_thread(thread_t * thread) { bfd_event_t evt; bfd_thread = thread_add_read(master, vrrp_bfd_thread, NULL, thread->u.fd, TIMER_NEVER); if (thread->type != THREAD_READY_FD) return 0; while (read(thread->u.fd, &evt, sizeof(bfd_event_t)) != -1) vrrp_handle_bfd_event(&evt); return 0; }
0
[ "CWE-59", "CWE-61" ]
keepalived
04f2d32871bb3b11d7dc024039952f2fe2750306
186,178,885,416,719,000,000,000,000,000,000,000,000
15
When opening files for write, ensure they aren't symbolic links Issue #1048 identified that if, for example, a non privileged user created a symbolic link from /etc/keepalvied.data to /etc/passwd, writing to /etc/keepalived.data (which could be invoked via DBus) would cause /etc/passwd to be overwritten. This commit ...
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) { if(!p || !g) /* q is optional */ return 0; BN_free(dh->p); BN_free(dh->q); BN_free(dh->g); dh->p=p; dh->q=q; dh->g=g; if(q) dh->length=BN_num_bits(q); return 1; }
0
[ "CWE-295" ]
stunnel
ebad9ddc4efb2635f37174c9d800d06206f1edf9
137,859,340,313,728,300,000,000,000,000,000,000,000
13
stunnel-5.57
wrap_signeddata(unsigned char *data, unsigned int data_len, unsigned char **out, unsigned int *out_len) { unsigned int orig_len = 0, oid_len = 0, tot_len = 0; ASN1_OBJECT *oid = NULL; unsigned char *p = NULL; /* Get length to wrap the original data with SEQUENCE tag */ tot_len = or...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
312,110,484,087,987,500,000,000,000,000,000,000,000
32
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
filesystem_info_start (NautilusDirectory *directory, NautilusFile *file, gboolean *doing_io) { GFile *location; FilesystemInfoState *state; if (directory->details->filesystem_info_state != NULL) { *doing_io = TRUE; return; } if (!is_needy (file, lacks_filesystem_info, REQU...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
119,543,468,499,252,400,000,000,000,000,000,000,000
41
Check for trusted desktop file launchers. 2009-02-24 Alexander Larsson <alexl@redhat.com> * libnautilus-private/nautilus-directory-async.c: Check for trusted desktop file launchers. * libnautilus-private/nautilus-file-private.h: * libnautilus-private/nautilus-file.c: * libnautilus-...
int gx_subclass_create_compositor(gx_device *dev, gx_device **pcdev, const gs_composite_t *pcte, gs_gstate *pgs, gs_memory_t *memory, gx_device *cdev) { pdf14_clist_device *p14dev; generic_subclass_data *psubclass_data; int code = 0; p14dev = (pdf14_clist_device *)dev; psubclass_data = p14dev->...
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
2,513,911,002,237,143,000,000,000,000,000,000,000
54
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
static int read_user_tlv(struct snd_kcontrol *kctl, unsigned int __user *buf, unsigned int size) { struct user_element *ue = kctl->private_data; if (ue->tlv_data_size == 0 || ue->tlv_data == NULL) return -ENXIO; if (size < ue->tlv_data_size) return -ENOSPC; if (copy_to_user(buf, ue->tlv_data, ue->tlv_dat...
0
[ "CWE-416", "CWE-125" ]
linux
6ab55ec0a938c7f943a4edba3d6514f775983887
99,131,730,734,126,240,000,000,000,000,000,000,000
16
ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash() Since the user can control the arguments provided to the kernel by the ioctl() system call, an out-of-bounds bug occurs when the 'id->name' provided by the user does not end with '\0'. The following log can reveal it: [ 10.002313] BUG: KASAN: stack-out-...
static int usb_host_handle_control(USBHostDevice *s, USBPacket *p) { struct usbdevfs_urb *urb; AsyncURB *aurb; int ret, value, index; int buffer_len; /* * Process certain standard device requests. * These are infrequent and are processed synchronously. */ value = le16_to_cpu(s->...
0
[ "CWE-119" ]
qemu
babd03fde68093482528010a5435c14ce9128e3f
135,771,876,040,172,570,000,000,000,000,000,000,000
81
usb-linux.c: fix buffer overflow In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and length to the kernel. However, the length was provided by the caller of dev->handle_packet, and is not checked, so the kernel might provide too much data and overflow our buffer. For example, hw/usb-uhci.c could s...
goa_ews_client_autodiscover (GoaEwsClient *client, const gchar *email, const gchar *password, const gchar *username, const gchar *server, ...
1
[ "CWE-310" ]
gnome-online-accounts
ecad8142e9ac519b9fc74b96dcb5531052bbffe1
144,699,739,772,552,510,000,000,000,000,000,000,000
72
Guard against invalid SSL certificates None of the branded providers (eg., Google, Facebook and Windows Live) should ever have an invalid certificate. So set "ssl-strict" on the SoupSession object being used by GoaWebView. Providers like ownCloud and Exchange might have to deal with certificates that are not up to th...
find_jws(struct tang_keys_info* tki, const char* thp) { if (!tki) { return NULL; } if (thp == NULL) { /* Default advertisement. */ json_auto_t* jws = jwk_sign(tki->m_payload, tki->m_sign); if (!jws) { return NULL; } return json_incref(jws); } ...
1
[ "CWE-200" ]
tang
e82459fda10f0630c3414ed2afbc6320bb9ea7c9
236,897,491,384,146,800,000,000,000,000,000,000,000
16
keys: move signing part out of find_by_thp() and to find_jws() (#81) Handle just signing keys in find_jws(), to make sure we are responding only to proper queries. Tests were also failing to detect this issue and were updated accordingly. Issue discovered by Twitter Kernel and OS team during a source code aud...
R_API int r_line_hist_sdb_up(RLine *line) { if (!line->sdbshell_hist_iter || !line->sdbshell_hist_iter->n) { return false; } line->sdbshell_hist_iter = line->sdbshell_hist_iter->n; strncpy (line->buffer.data, line->sdbshell_hist_iter->data, R_LINE_BUFSIZE - 1); line->buffer.index = line->buffer.length = strlen (...
0
[ "CWE-78" ]
radare2
dd739f5a45b3af3d1f65f00fe19af1dbfec7aea7
293,553,061,578,006,760,000,000,000,000,000,000,000
9
Fix #14990 - multiple quoted command parsing issue ##core > "?e hello""?e world" hello world" > "?e hello";"?e world" hello world
network_pass_socks4proxy (struct t_proxy *proxy, int sock, const char *address, int port) { /* socks4 protocol is explained here: http://en.wikipedia.org/wiki/SOCKS */ struct t_network_socks4 socks4; unsigned char buffer[24]; char ip_addr[NI_MAXHOST]; socks4.versi...
0
[ "CWE-20" ]
weechat
c265cad1c95b84abfd4e8d861f25926ef13b5d91
4,967,154,734,256,766,000,000,000,000,000,000,000
27
Fix verification of SSL certificates by calling gnutls verify callback (patch #7459)
static SDL_INLINE void BG_32(const TTF_Image *image, Uint8 *destination, Sint32 srcskip, Uint32 dstskip) { const Uint32 *src = (Uint32 *)image->buffer; Uint32 *dst = (Uint32 *)destination; Uint32 width = image->width / 4; Uint32 height = image->rows; while (height--) { ...
0
[ "CWE-190", "CWE-787" ]
SDL_ttf
db1b41ab8bde6723c24b866e466cad78c2fa0448
143,060,724,644,987,540,000,000,000,000,000,000,000
17
More integer overflow (see bug #187) Make sure that 'width + alignment' doesn't overflow, otherwise it could create a SDL_Surface of 'width' but with wrong 'pitch'
_copyResult(const Result *from) { Result *newnode = makeNode(Result); /* * copy node superclass fields */ CopyPlanFields((const Plan *) from, (Plan *) newnode); /* * copy remainder of node */ COPY_NODE_FIELD(resconstantqual); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
119,281,692,622,204,910,000,000,000,000,000,000,000
16
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
void WebContents::Reload() { web_contents()->GetController().Reload(content::ReloadType::NORMAL, /* check_for_repost */ true); }
0
[]
electron
e9fa834757f41c0b9fe44a4dffe3d7d437f52d34
7,629,664,819,341,172,000,000,000,000,000,000,000
4
fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344) * fix: ensure ElectronBrowser mojo service is only bound to authorized render frames Notes: no-notes * refactor: extract electron API IPC to its own mojo interface * fix: just check main frame not primary main frame ...
static double mp_ioff(_cimg_math_parser& mp) { const unsigned int boundary_conditions = (unsigned int)_mp_arg(3); const CImg<T> &img = mp.imgin; const longT off = (longT)_mp_arg(2), whds = (longT)img.size(); if (off>=0 && off<whds) return (double)img[o...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
258,207,652,617,907,100,000,000,000,000,000,000,000
22
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
select_task_rq_fair(struct task_struct *p, int prev_cpu, int sd_flag, int wake_flags) { struct sched_domain *tmp, *sd = NULL; int cpu = smp_processor_id(); int new_cpu = prev_cpu; int want_affine = 0; int sync = (wake_flags & WF_SYNC) && !(current->flags & PF_EXITING); if (sd_flag & SD_BALANCE_WAKE) { record_w...
0
[ "CWE-400", "CWE-703" ]
linux
de53fd7aedb100f03e5d2231cfce0e4993282425
215,794,995,870,985,800,000,000,000,000,000,000,000
61
sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices It has been observed, that highly-threaded, non-cpu-bound applications running under cpu.cfs_quota_us constraints can hit a high percentage of periods throttled while simultaneously not consuming the allocated amount of quota...
CString CIRCSock::GetISupport(const CString& sKey, const CString& sDefault) const { MCString::const_iterator i = m_mISupport.find(sKey.AsUpper()); if (i == m_mISupport.end()) { return sDefault; } else { return i->second; } }
0
[ "CWE-20", "CWE-284" ]
znc
d22fef8620cdd87490754f607e7153979731c69d
141,298,503,694,529,700,000,000,000,000,000,000,000
9
Better cleanup lines coming from network. Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
mwifiex_set_ht_params(struct mwifiex_private *priv, struct mwifiex_uap_bss_param *bss_cfg, struct cfg80211_ap_settings *params) { const u8 *ht_ie; if (!ISSUPP_11NENABLED(priv->adapter->fw_cap_info)) return; ht_ie = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, params->beacon.tail, params->beacon....
0
[ "CWE-120", "CWE-787" ]
linux
7caac62ed598a196d6ddf8d9c121e12e082cac3a
160,979,713,222,386,840,000,000,000,000,000,000,000
23
mwifiex: Fix three heap overflow at parsing element in cfg80211_ap_settings mwifiex_update_vs_ie(),mwifiex_set_uap_rates() and mwifiex_set_wmm_params() call memcpy() without checking the destination size.Since the source is given from user-space, this may trigger a heap buffer overflow. Fix them by putting the length...
cib_remote_auth(xmlNode *login) { const char *user = NULL; const char *pass = NULL; const char *tmp = NULL; crm_log_xml_info(login, "Login: "); if (login == NULL) { return FALSE; } tmp = crm_element_name(login); if (safe_str_neq(tmp, "cib_command")) { crm_err("Wrong tag...
0
[ "CWE-399" ]
pacemaker
564f7cc2a51dcd2f28ab12a13394f31be5aa3c93
339,700,444,572,474,840,000,000,000,000,000,000,000
45
High: core: Internal tls api improvements for reuse with future LRMD tls backend.
apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes) { core_server_config *conf; apr_bucket *e; http_ctx_t *ctx = f->ctx; apr_status_t rv; apr_off_t totalread; int again; conf = (core_server_config *) ...
1
[ "CWE-20" ]
httpd
a6027e56924bb6227c1fdbf6f91e7e2438338be6
96,735,886,292,494,530,000,000,000,000,000,000,000
326
Limit accepted chunk-size to 2^63-1 and be strict about chunk-ext authorized characters. Submitted by: Yann Ylavic git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1684513 13f79535-47bb-0310-9956-ffa450edef68
QPDF_BOOL qpdf_allow_modify_other(qpdf_data qpdf) { QTC::TC("qpdf", "qpdf-c called qpdf_allow_modify_other"); return qpdf->qpdf->allowModifyOther(); }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
268,636,673,915,738,360,000,000,000,000,000,000,000
5
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
SPL_METHOD(SplFileObject, __construct) { spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis()); zend_bool use_include_path = 0; char *p1, *p2; char *tmp_path; size_t tmp_path_len; zend_error_handling error_handling; intern->u.file.open_mode = NULL; intern->u.file.open_mode_len = 0; if (zend_parse_pa...
0
[ "CWE-74" ]
php-src
a5a15965da23c8e97657278fc8dfbf1dfb20c016
84,956,207,252,358,340,000,000,000,000,000,000,000
57
Fix #78863: DirectoryIterator class silently truncates after a null byte Since the constructor of DirectoryIterator and friends is supposed to accepts paths (i.e. strings without NUL bytes), we must not accept arbitrary strings.
xfs_iunlink_map_prev( struct xfs_trans *tp, xfs_agnumber_t agno, xfs_agino_t head_agino, xfs_agino_t target_agino, xfs_agino_t *agino, struct xfs_imap *imap, struct xfs_dinode **dipp, struct xfs_buf **bpp, struct xfs_perag *pag) { struct xfs_mount *mp = tp->t_mountp; xfs_agino_t next_agino; int err...
0
[]
linux
01ea173e103edd5ec41acec65b9261b87e123fc2
219,950,041,944,814,260,000,000,000,000,000,000,000
71
xfs: fix up non-directory creation in SGID directories XFS always inherits the SGID bit if it is set on the parent inode, while the generic inode_init_owner does not do this in a few cases where it can create a possible security problem, see commit 0fa3ecd87848 ("Fix up non-directory creation in SGID directories") for...
make_empty_acl(void) { return allocacl(0); }
0
[ "CWE-264" ]
postgres
fea164a72a7bfd50d77ba5fb418d357f8f2bb7d0
247,783,907,787,935,830,000,000,000,000,000,000,000
4
Shore up ADMIN OPTION restrictions. Granting a role without ADMIN OPTION is supposed to prevent the grantee from adding or removing members from the granted role. Issuing SET ROLE before the GRANT bypassed that, because the role itself had an implicit right to add or remove members. Plug that hole by recognizing tha...
initialize(int argc, VALUE argv[], VALUE self) { ffi_cif * cif; ffi_type **arg_types, *rtype; ffi_status result; VALUE ptr, args, ret_type, abi, kwds; long i, len; int nabi; void *cfunc; rb_scan_args(argc, argv, "31:", &ptr, &args, &ret_type, &abi, &kwds); ptr = rb_Integer(ptr); ...
0
[ "CWE-119" ]
ruby
bcc2421b4938fc1d9f5f3fb6ef2320571b27af42
281,808,874,008,717,230,000,000,000,000,000,000,000
56
function.c: check arguments * ext/fiddle/function.c (initialize): check all arguments first. reported by Marcin 'Icewall' Noga of Cisco Talos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
static void avrcp_get_capabilities(struct avrcp *session) { uint8_t buf[AVRCP_HEADER_LENGTH + AVRCP_GET_CAPABILITIES_PARAM_LENGTH]; struct avrcp_header *pdu = (void *) buf; uint8_t length; memset(buf, 0, sizeof(buf)); set_company_id(pdu->company_id, IEEEID_BTSIG); pdu->pdu_id = AVRCP_GET_CAPABILITIES; pdu->pac...
0
[ "CWE-200" ]
bluez
e2b0f0d8d63e1223bb714a9efb37e2257818268b
123,337,706,249,290,270,000,000,000,000,000,000,000
21
avrcp: Fix not checking if params_len match number of received bytes This makes sure the number of bytes in the params_len matches the remaining bytes received so the code don't end up accessing invalid memory.
static Image *ReadSCREENSHOTImage(const ImageInfo *image_info, ExceptionInfo *exception) { Image *image; assert(image_info->signature == MagickCoreSignature); if (image_info->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s", image_info->filename); assert(exception !...
1
[ "CWE-772", "CWE-401" ]
ImageMagick
72a50e400d98d7a2fd610caedfeb9af043dc5582
319,887,566,024,208,540,000,000,000,000,000,000,000
150
Fixed potential memory leak.
static inline bool req_has_async_data(struct io_kiocb *req) { return req->flags & REQ_F_ASYNC_DATA; }
0
[ "CWE-416" ]
linux
e677edbcabee849bfdd43f1602bccbecf736a646
170,034,306,851,080,720,000,000,000,000,000,000,000
4
io_uring: fix race between timeout flush and removal io_flush_timeouts() assumes the timeout isn't in progress of triggering or being removed/canceled, so it unconditionally removes it from the timeout list and attempts to cancel it. Leave it on the list and let the normal timeout cancelation take care of it. Cc: st...
virgl_cmd_create_resource_2d(VuGpu *g, struct virtio_gpu_ctrl_command *cmd) { struct virtio_gpu_resource_create_2d c2d; struct virgl_renderer_resource_create_args args; VUGPU_FILL_CMD(c2d); args.handle = c2d.resource_id; args.target = 2; args.format = c2d.format; ...
0
[]
qemu
f6091d86ba9ea05f4e111b9b42ee0005c37a6779
98,333,373,231,589,430,000,000,000,000,000,000,000
21
vhost-user-gpu: fix memory leak in 'virgl_cmd_resource_unref' (CVE-2021-3544) The 'res->iov' will be leaked if the guest trigger following sequences: virgl_cmd_create_resource_2d virgl_resource_attach_backing virgl_cmd_resource_unref This patch fixes this. Fixes: CVE-2021-3544 Reported-by: Li Qiang <liq3ea@163.c...
int gg_add_notify(struct gg_session *sess, uin_t uin) { return gg_add_notify_ex(sess, uin, GG_USER_NORMAL); }
0
[ "CWE-310" ]
libgadu
23644f1fb8219031b3cac93289a588b05f90226b
224,394,708,667,180,960,000,000,000,000,000,000,000
4
Poprawka ograniczania długości opisu.
static int tg3_poll_work(struct tg3_napi *tnapi, int work_done, int budget) { struct tg3 *tp = tnapi->tp; /* run TX completion thread */ if (tnapi->hw_status->idx[0].tx_consumer != tnapi->tx_cons) { tg3_tx(tnapi); if (unlikely(tg3_flag(tp, TX_RECOVERY_PENDING))) return work_done; } if (!tnapi->rx_rcb_prod...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
96,071,829,712,641,720,000,000,000,000,000,000,000
50
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
_outSubLink(StringInfo str, const SubLink *node) { WRITE_NODE_TYPE("SUBLINK"); WRITE_ENUM_FIELD(subLinkType, SubLinkType); WRITE_NODE_FIELD(testexpr); WRITE_NODE_FIELD(operName); WRITE_NODE_FIELD(subselect); WRITE_LOCATION_FIELD(location); }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
260,059,051,387,810,480,000,000,000,000,000,000,000
10
Avoid repeated name lookups during table and index DDL. If the name lookups come to different conclusions due to concurrent activity, we might perform some parts of the DDL on a different table than other parts. At least in the case of CREATE INDEX, this can be used to cause the permissions checks to be performed aga...
uint16_t nvme_map_dptr(NvmeCtrl *n, NvmeSg *sg, size_t len, NvmeCmd *cmd) { uint64_t prp1, prp2; switch (NVME_CMD_FLAGS_PSDT(cmd->flags)) { case NVME_PSDT_PRP: prp1 = le64_to_cpu(cmd->dptr.prp1); prp2 = le64_to_cpu(cmd->dptr.prp2); return nvme_map_prp(n, sg, ...
0
[]
qemu
736b01642d85be832385063f278fe7cd4ffb5221
67,171,198,945,202,510,000,000,000,000,000,000,000
18
hw/nvme: fix CVE-2021-3929 This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the device itself. This still allows DMA to MMIO regions of other devices (e.g. doing P2P DMA to the controller memory buffer of another NVMe device). Fixes: CVE-2021-3929 Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com> Review...
mml_copy(MinMaxLen* to, MinMaxLen* from) { to->min = from->min; to->max = from->max; }
0
[ "CWE-787" ]
oniguruma
cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0
147,077,263,837,115,280,000,000,000,000,000,000,000
5
#207: Out-of-bounds write
int pn_ssl_domain_set_trusted_ca_db(pn_ssl_domain_t *domain, const char *certificate_db) { if (!domain || !certificate_db) return -1; csguard g(&domain->cslock); int ec = 0; HCERTSTORE store = open_cert_db(certificate_db, NULL, &ec); if (!store) return ec; if (domai...
0
[]
qpid-proton
4aea0fd8502f5e9af7f22fd60645eeec07bce0b2
38,223,643,868,156,366,000,000,000,000,000,000,000
32
PROTON-2014: [c] Ensure SSL mutual authentication (cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7)
R_API DsoJsonObj *r_bin_java_get_method_json_definition(RBinJavaObj *bin, RBinJavaField *fm_type) { return r_bin_java_get_fm_type_definition_json (bin, fm_type, 1); }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
129,967,667,716,071,000,000,000,000,000,000,000,000
3
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
long jas_stream_seek(jas_stream_t *stream, long offset, int origin) { long newpos; /* The buffer cannot be in use for both reading and writing. */ assert(!((stream->bufmode_ & JAS_STREAM_RDBUF) && (stream->bufmode_ & JAS_STREAM_WRBUF))); /* Reset the EOF indicator (since we may not be at the EOF anymore). */ ...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
255,641,120,395,054,000,000,000,000,000,000,000,000
31
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static struct rds_message *rds_ib_send_unmap_op(struct rds_ib_connection *ic, struct rds_ib_send_work *send, int wc_status) { struct rds_message *rm = NULL; /* In the error case, wc.opcode sometimes contains garbage */ switch (send->s_wr.opcode) { case IB_WR_SEND: if (send->s_op) { rm = container_...
0
[]
linux-2.6
6094628bfd94323fc1cea05ec2c6affd98c18f7f
255,216,012,150,153,100,000,000,000,000,000,000,000
40
rds: prevent BUG_ON triggering on congestion map updates Recently had this bug halt reported to me: kernel BUG at net/rds/send.c:329! Oops: Exception in kernel mode, sig: 5 [#1] SMP NR_CPUS=1024 NUMA pSeries Modules linked in: rds sunrpc ipv6 dm_mirror dm_region_hash dm_log ibmveth sg ext4 jbd2 mbcache sd_mod crc_t10...
void __set_special_pids(struct pid *pid) { struct task_struct *curr = current->group_leader; if (task_session(curr) != pid) change_pid(curr, PIDTYPE_SID, pid); if (task_pgrp(curr) != pid) change_pid(curr, PIDTYPE_PGID, pid); }
0
[ "CWE-20", "CWE-703", "CWE-400" ]
linux
b69f2292063d2caf37ca9aec7d63ded203701bf3
330,509,809,015,110,700,000,000,000,000,000,000,000
10
block: Fix io_context leak after failure of clone with CLONE_IO With CLONE_IO, parent's io_context->nr_tasks is incremented, but never decremented whenever copy_process() fails afterwards, which prevents exit_io_context() from calling IO schedulers exit functions. Give a task_struct to exit_io_context(), and call exi...
DLLIMPORT cfg_bool_t cfg_getnbool(cfg_t *cfg, const char *name, unsigned int index) { return cfg_opt_getnbool(cfg_getopt(cfg, name), index); }
0
[]
libconfuse
d73777c2c3566fb2647727bb56d9a2295b81669b
322,847,817,555,766,550,000,000,000,000,000,000,000
4
Fix #163: unterminated username used with getpwnam() Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
xmlXPathCmpNodesExt(xmlNodePtr node1, xmlNodePtr node2) { int depth1, depth2; int misc = 0, precedence1 = 0, precedence2 = 0; xmlNodePtr miscNode1 = NULL, miscNode2 = NULL; xmlNodePtr cur, root; long l1, l2; if ((node1 == NULL) || (node2 == NULL)) return(-2); if (node1 == node2) return(0...
0
[]
libxml2
03c6723043775122313f107695066e5744189a08
298,239,897,028,545,530,000,000,000,000,000,000,000
277
Handling of XPath function arguments in error case The XPath engine tries to guarantee that every XPath function can pop 'nargs' non-NULL values off the stack. libxslt, for example, relies on this assumption. But the check isn't thorough enough if there are errors during the evaluation of arguments. This can lead to s...
static int nft_add_set_elem(struct nft_ctx *ctx, struct nft_set *set, const struct nlattr *attr, u32 nlmsg_flags) { struct nft_expr *expr_array[NFT_SET_EXPR_MAX] = {}; struct nlattr *nla[NFTA_SET_ELEM_MAX + 1]; u8 genmask = nft_genmask_next(ctx->net); u32 flags = 0, size = 0, num_exprs = 0; struct nft_set_e...
0
[]
net
520778042ccca019f3ffa136dd0ca565c486cedd
277,134,679,568,799,400,000,000,000,000,000,000,000
323
netfilter: nf_tables: disallow non-stateful expression in sets earlier Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression instantiation"), it is possible to attach stateful expressions to set elements. cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate and destroy phase") in...
iscsi_aio_ioctl_cb(struct iscsi_context *iscsi, int status, void *command_data, void *opaque) { IscsiAIOCB *acb = opaque; if (status == SCSI_STATUS_CANCELLED) { if (!acb->bh) { acb->status = -ECANCELED; iscsi_schedule_bh(acb); } return; }...
0
[ "CWE-125" ]
qemu
ff0507c239a246fd7215b31c5658fc6a3ee1e4c5
94,724,397,785,345,670,000,000,000,000,000,000,000
39
block/iscsi:fix heap-buffer-overflow in iscsi_aio_ioctl_cb There is an overflow, the source 'datain.data[2]' is 100 bytes, but the 'ss' is 252 bytes.This may cause a security issue because we can access a lot of unrelated memory data. The len for sbp copy data should take the minimum of mx_sb_len and sb_len_wr, no...
ffi_prep_closure_loc (ffi_closure *closure, ffi_cif* cif, void (*fun)(ffi_cif*,void*,void**,void*), void *user_data, void *codeloc) { if (cif->abi != FFI_SYSV) return FFI_BAD_ABI; void (*start)(void); if (cif->flags & ...
0
[ "CWE-787" ]
libffi
44a6c28545186d78642487927952844156fc7ab5
167,460,721,848,298,420,000,000,000,000,000,000,000
47
aarch64: Flush code mapping in addition to data mapping (#471) This needs a new function, ffi_data_to_code_pointer, to translate from data pointers to code pointers. Fixes issue #470.
TEST_F(OwnedImplTest, PrependBuffer) { std::string suffix = "World!", prefix = "Hello, "; Buffer::OwnedImpl buffer; buffer.add(suffix); Buffer::OwnedImpl prefixBuffer; prefixBuffer.add(prefix); buffer.prepend(prefixBuffer); EXPECT_EQ(suffix.size() + prefix.size(), buffer.length()); EXPECT_EQ(prefix + ...
0
[ "CWE-401" ]
envoy
5eba69a1f375413fb93fab4173f9c393ac8c2818
243,203,185,293,145,800,000,000,000,000,000,000,000
13
[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>
void qeth_print_status_message(struct qeth_card *card) { switch (card->info.type) { case QETH_CARD_TYPE_OSD: case QETH_CARD_TYPE_OSM: case QETH_CARD_TYPE_OSX: /* VM will use a non-zero first character * to indicate a HiperSockets like reporting * of the level OSA sets the first character to zero * */ i...
0
[ "CWE-200", "CWE-119" ]
linux
6fb392b1a63ae36c31f62bc3fc8630b49d602b62
107,273,642,395,625,650,000,000,000,000,000,000,000
41
qeth: avoid buffer overflow in snmp ioctl Check user-defined length in snmp ioctl request and allow request only if it fits into a qeth command buffer. Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c...
static int io_accept(struct io_kiocb *req, bool force_nonblock, struct io_comp_state *cs) { return -EOPNOTSUPP; }
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
17,906,197,170,506,020,000,000,000,000,000,000,000
5
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
void sqlite3AddPrimaryKey( Parse *pParse, /* Parsing context */ ExprList *pList, /* List of field names to be indexed */ int onError, /* What to do with a uniqueness conflict */ int autoInc, /* True if the AUTOINCREMENT keyword is present */ int sortOrder /* SQLITE_SO_ASC or SQLITE_SO_DESC *...
0
[ "CWE-674", "CWE-787" ]
sqlite
38096961c7cd109110ac21d3ed7dad7e0cb0ae06
42,582,016,949,459,760,000,000,000,000,000,000,000
70
Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself. FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5
static void megasas_copy_sense(MegasasCmd *cmd) { uint8_t sense_buf[SCSI_SENSE_BUF_SIZE]; uint8_t sense_len; sense_len = scsi_req_get_sense(cmd->req, sense_buf, SCSI_SENSE_BUF_SIZE); megasas_build_sense(cmd, sense_buf, sense_len); }
0
[ "CWE-401" ]
qemu
765a707000e838c30b18d712fe6cb3dd8e0435f3
220,661,346,135,281,000,000,000,000,000,000,000,000
9
megasas: fix guest-triggered memory leak If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. Avoid this by returning only the status from map_dcmd, and loading cmd->iov_size in the caller. Reported-by: Li Qiang <liqiang6-s@360.c...
TEST_F(HttpConnectionManagerImplTest, DrainCloseRaceWithClose) { InSequence s; setup(false, ""); EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status { decoder_ = &conn_manager_->newStream(response_encoder_); RequestHeaderMapPtr headers{ new TestRequestHeaderMa...
0
[ "CWE-22" ]
envoy
5333b928d8bcffa26ab19bf018369a835f697585
22,178,202,509,287,152,000,000,000,000,000,000,000
42
Implement handling of escaped slash characters in URL path Fixes: CVE-2021-29492 Signed-off-by: Yan Avlasov <yavlasov@google.com>
static PHP_FUNCTION(session_set_cookie_params) { zval **lifetime = NULL; char *path = NULL, *domain = NULL; int path_len, domain_len, argc = ZEND_NUM_ARGS(); zend_bool secure = 0, httponly = 0; if (!PS(use_cookies) || zend_parse_parameters(argc TSRMLS_CC, "Z|ssbb", &lifetime, &path, &path_len, &domain, &domain_...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
295,091,849,365,086,300,000,000,000,000,000,000,000
30
Strict session
static void compute_angular_endpoints_for_quant_levels_lwc( unsigned int weight_count, const float* dec_weight_quant_uvalue, const float* dec_weight_quant_sig, unsigned int max_quant_level, float low_value[12], float high_value[12] ) { unsigned int max_quant_steps = quantization_steps_for_level[max_quant_level];...
1
[ "CWE-787" ]
astc-encoder
6ffb3058bfbcc836108c25274e955e399481e2b4
106,809,247,969,720,830,000,000,000,000,000,000,000
75
Provide a fallback for blocks which find no valid encoding
long oe_syscall(long number, ...) { long ret; oe_va_list ap; oe_va_start(ap, number); long arg1 = oe_va_arg(ap, long); long arg2 = oe_va_arg(ap, long); long arg3 = oe_va_arg(ap, long); long arg4 = oe_va_arg(ap, long); long arg5 = oe_va_arg(ap, long); long arg6 = oe_va_arg(ap, long);...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
244,508,260,242,015,440,000,000,000,000,000,000,000
17
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>