func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
compile_load( char_u **arg, char_u *end_arg, cctx_T *cctx, int is_expr, int error) { type_T *type; char_u *name = NULL; char_u *end = end_arg; int res = FAIL; int prev_called_emsg = called_emsg; if (*(*arg + 1) == ':') { if (end <= *arg + 2) { isntype_T isn_type; // loa...
0
[ "CWE-200", "CWE-122" ]
vim
5f25c3855071bd7e26255c68bf458b1b5cf92f39
211,854,427,628,271,880,000,000,000,000,000,000,000
154
patch 8.2.4049: Vim9: reading before the start of the line with "$" Problem: Vim9: reading before the start of the line with "$" by itself. Solution: Do not subtract one when reporting the error.
static int auth_init(void) { /* Add the commands handled by this module to the HELP list. */ pr_help_add(C_USER, _("<sp> username"), TRUE); pr_help_add(C_PASS, _("<sp> password"), TRUE); pr_help_add(C_ACCT, _("is not implemented"), FALSE); pr_help_add(C_REIN, _("is not implemented"), FALSE); /* By default...
0
[ "CWE-59", "CWE-295" ]
proftpd
349addc3be4fcdad9bd4ec01ad1ccd916c898ed8
64,384,252,738,460,690,000,000,000,000,000,000,000
12
Walk the entire DefaultRoot path, checking for symlinks of any component, when AllowChrootSymlinks is disabled.
static int stv06xx_isoc_nego(struct gspca_dev *gspca_dev) { int ret, packet_size, min_packet_size; struct usb_host_interface *alt; struct sd *sd = (struct sd *) gspca_dev; alt = &gspca_dev->dev->actconfig->intf_cache[0]->altsetting[1]; packet_size = le16_to_cpu(alt->endpoint[0].desc.wMaxPacketSize); min_packet_s...
1
[ "CWE-476" ]
linux
485b06aadb933190f4bc44e006076bc27a23f205
255,696,321,827,882,150,000,000,000,000,000,000,000
23
media: stv06xx: add missing descriptor sanity checks Make sure to check that we have two alternate settings and at least one endpoint before accessing the second altsetting structure and dereferencing the endpoint arrays. This specifically avoids dereferencing NULL-pointers or corrupting memory when a device does not...
flatpak_context_load_for_deploy (FlatpakDeploy *deploy, GError **error) { g_autoptr(FlatpakContext) context = NULL; g_autoptr(FlatpakContext) overrides = NULL; g_autoptr(GKeyFile) metakey = NULL; metakey = flatpak_deploy_get_metadata (deploy); context = flatpak_app_comp...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
176,061,933,779,933,600,000,000,000,000,000,000,000
17
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
static void set_cpu_rq_start_time(void) { int cpu = smp_processor_id(); struct rq *rq = cpu_rq(cpu); rq->age_stamp = sched_clock_cpu(cpu); }
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
68,130,399,339,140,500,000,000,000,000,000,000,000
6
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...
ClientHttpRequest::freeResources() { safe_free(uri); safe_free(redirect.location); range_iter.boundary.clean(); clearRequest(); if (client_stream.tail) clientStreamAbort((clientStreamNode *)client_stream.tail->data, this); }
0
[ "CWE-444" ]
squid
fd68382860633aca92065e6c343cfd1b12b126e7
47,691,912,809,108,140,000,000,000,000,000,000,000
10
Improve Transfer-Encoding handling (#702) Reject messages containing Transfer-Encoding header with coding other than chunked or identity. Squid does not support other codings. For simplicity and security sake, also reject messages where Transfer-Encoding contains unnecessary complex values that are technically equiva...
void queue_recovery_after_sleep(PG *pg, epoch_t queued, uint64_t reserved_pushes) { Mutex::Locker l(recovery_lock); _queue_for_recovery(make_pair(queued, pg), reserved_pushes); }
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
317,886,685,998,086,350,000,000,000,000,000,000,000
4
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
Item *Item_field::derived_grouping_field_transformer_for_where(THD *thd, uchar *arg) { st_select_lex *sel= (st_select_lex *)arg; Grouping_tmp_field *gr_field= find_matching_grouping_field(this, sel); if (gr_field) { Item *producing_clone= ...
0
[ "CWE-89" ]
server
b5e16a6e0381b28b598da80b414168ce9a5016e5
71,861,733,763,369,400,000,000,000,000,000,000,000
15
MDEV-26061 MariaDB server crash at Field::set_default * Item_default_value::fix_fields creates a copy of its argument's field. * Field::default_value is changed when its expression is prepared in unpack_vcol_info_from_frm() This means we must unpack any vcol expression that includes DEFAULT(x) strictly after unpack...
static int php_cli_server_client_read_request_on_fragment(php_http_parser *parser, const char *at, size_t length) { return 0; }
0
[]
php-src
2438490addfbfba51e12246a74588b2382caa08a
331,393,329,634,600,220,000,000,000,000,000,000,000
4
slim post data
nft_obj_type_get(struct net *net, u32 objtype) { const struct nft_object_type *type; type = __nft_obj_type_get(objtype); if (type != NULL && try_module_get(type->owner)) return type; lockdep_nfnl_nft_mutex_not_held(); #ifdef CONFIG_MODULES if (type == NULL) { if (nft_request_module(net, "nft-obj-%u", objtype...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
146,336,479,012,532,250,000,000,000,000,000,000,000
17
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
check_CHECK_PKT_LARGER(const struct ofpact_check_pkt_larger *a OVS_UNUSED, const struct ofpact_check_params *cp OVS_UNUSED) { return 0; }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
209,841,220,598,529,370,000,000,000,000,000,000,000
5
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...
int cil_resolve_senscat(struct cil_tree_node *current, void *extra_args) { int rc = SEPOL_ERR; struct cil_senscat *senscat = current->data; struct cil_symtab_datum *sens_datum; struct cil_sens *sens = NULL; rc = cil_resolve_name(current, (char*)senscat->sens_str, CIL_SYM_SENS, extra_args, &sens_datum); if (rc !=...
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
50,263,212,649,851,320,000,000,000,000,000,000,000
31
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 ...
int bus_property_get_exec_command( sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error) { ExecCommand *c = (Exec...
0
[ "CWE-269" ]
systemd
f69567cbe26d09eac9d387c0be0fc32c65a83ada
299,257,081,969,178,900,000,000,000,000,000,000,000
25
core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID=
find_function_def (name) const char *name; { #if defined (DEBUGGER) return ((FUNCTION_DEF *)hash_lookup (name, shell_function_defs)); #else return ((FUNCTION_DEF *)0); #endif }
0
[]
bash
863d31ae775d56b785dc5b0105b6d251515d81d5
139,667,936,366,444,430,000,000,000,000,000,000,000
9
commit bash-20120224 snapshot
static RzList *sections(RzBinFile *bf) { rz_return_val_if_fail(bf && bf->o, NULL); QnxObj *qo = bf->o->bin_obj; return rz_list_clone(qo->sections); }
0
[ "CWE-415" ]
rizin
58926dffbe819fe9ebf5062f7130e026351cae01
36,528,859,366,057,593,000,000,000,000,000,000,000
5
fix #2964 - double-free in bin_qnx.c
static unsigned int selinux_ip_postroute_compat(struct sk_buff *skb, int ifindex, u16 family) { struct sock *sk = skb->sk; struct sk_security_struct *sksec; struct common_audit_data ad; struct selinux_audit_data sad = {0,}; struct lsm_network_audit net = {0,}; char *addrp; u8 proto; if (sk == NULL)...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
232,534,844,533,846,330,000,000,000,000,000,000,000
34
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str, struct pt_regs *regs, long error_code) { if (v8086_mode(regs)) { /* * Traps 0, 1, 3, 4, and 5 should be forwarded to vm86. * On nmi (interrupt 2), do_trap should not be called. */ if (trapnr < X86_TRAP_UD) { if (!handle_vm86_trap((st...
1
[ "CWE-264" ]
linux
548acf19234dbda5a52d5a8e7e205af46e9da840
22,590,534,255,974,517,000,000,000,000,000,000,000
27
x86/mm: Expand the exception table logic to allow new handling options Huge amounts of help from Andy Lutomirski and Borislav Petkov to produce this. Andy provided the inspiration to add classes to the exception table with a clever bit-squeezing trick, Boris pointed out how much cleaner it would all be if we just had...
static ssize_t _hostsock_sendto( oe_fd_t* sock_, const void* buf, size_t count, int flags, const struct oe_sockaddr* dest_addr, oe_socklen_t addrlen) { ssize_t ret = -1; sock_t* sock = _cast_sock(sock_); oe_errno = 0; /* * According to the POSIX specification, when the cou...
0
[ "CWE-200", "CWE-552" ]
openenclave
bcac8e7acb514429fee9e0b5d0c7a0308fd4d76b
239,228,643,904,111,930,000,000,000,000,000,000,000
49
Merge pull request from GHSA-525h-wxcc-f66m Signed-off-by: Ming-Wei Shih <mishih@microsoft.com>
void JOIN_TAB::cleanup() { DBUG_ENTER("JOIN_TAB::cleanup"); DBUG_PRINT("enter", ("tab: %p table %s.%s", this, (table ? table->s->db.str : "?"), (table ? table->s->table_name.str : "?"))); delete select; select= 0; delete quick; quick= ...
0
[]
server
8c34eab9688b4face54f15f89f5d62bdfd93b8a7
158,514,089,129,025,660,000,000,000,000,000,000,000
81
MDEV-28094 Window function in expression in ORDER BY call item->split_sum_func() in setup_order() just as it's done in setup_fields()
add_opcode_rel_addr(regex_t* reg, int opcode, int addr) { int r; r = add_opcode(reg, opcode); if (r != 0) return r; r = add_rel_addr(reg, addr); return r; }
0
[ "CWE-476" ]
oniguruma
410f5916429e7d2920e1d4867388514f605413b8
212,943,540,284,909,820,000,000,000,000,000,000,000
9
fix #87: Read unknown address in onig_error_code_to_str()
static int io_timeout(struct io_kiocb *req, const struct io_uring_sqe *sqe) { unsigned count; struct io_ring_ctx *ctx = req->ctx; struct io_timeout_data *data; struct list_head *entry; unsigned span = 0; int ret; ret = io_timeout_setup(req); /* common setup allows flags (like links) set, we don't */ if (!ret ...
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
52,700,924,352,459,690,000,000,000,000,000,000,000
80
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
uint Field_bit::is_equal(Create_field *new_field) { return new_field->type_handler() == type_handler() && new_field->length == max_display_length(); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
100,506,016,954,854,220,000,000,000,000,000,000,000
5
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int handle_cr(struct kvm_vcpu *vcpu) { unsigned long exit_qualification, val; int cr; int reg; int err; exit_qualification = vmcs_readl(EXIT_QUALIFICATION); cr = exit_qualification & 15; reg = (exit_qualification >> 8) & 15; switch ((exit_qualification >> 4) & 3) { case 0: /* mov to cr */ val = kvm_r...
0
[]
kvm
a642fc305053cc1c6e47e4f4df327895747ab485
109,035,046,530,075,430,000,000,000,000,000,000,000
78
kvm: vmx: handle invvpid vm exit gracefully On systems with invvpid instruction support (corresponding bit in IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid causes vm exit, which is currently not handled and results in propagation of unknown exit to userspace. Fix this by installing an invvpid vm exit ...
static void spl_heap_it_rewind(zend_object_iterator *iter TSRMLS_DC) /* {{{ */ { /* do nothing, the iterator always points to the top element */ }
0
[]
php-src
1cbd25ca15383394ffa9ee8601c5de4c0f2f90e1
7,198,428,574,097,181,000,000,000,000,000,000,000
4
Fix bug #69737 - Segfault when SplMinHeap::compare produces fatal error
flatpak_dir_prune_origin_remote (FlatpakDir *self, const char *remote) { if (remote != NULL && g_str_has_suffix (remote, "-origin") && flatpak_dir_get_remote_noenumerate (self, remote) && !flatpak_dir_remote_has_deploys (self, remote)) { if (flatpak_dir_use...
0
[ "CWE-668" ]
flatpak
cd2142888fc4c199723a0dfca1f15ea8788a5483
243,255,024,360,983,050,000,000,000,000,000,000,000
27
Don't expose /proc when running apply_extra As shown by CVE-2019-5736, it is sometimes possible for the sandbox app to access outside files using /proc/self/exe. This is not typically an issue for flatpak as the sandbox runs as the user which has no permissions to e.g. modify the host files. However, when installing ...
ex_command(exarg_T *eap) { char_u *name; char_u *end; char_u *p; long argt = 0; long def = -1; int flags = 0; int compl = EXPAND_NOTHING; char_u *compl_arg = NULL; cmd_addr_T addr_type_arg = ADDR_NONE; int has_attr = (eap->arg[0] == '-'); int name_len; p = eap->arg; ...
0
[ "CWE-416" ]
vim
9f1a39a5d1cd7989ada2d1cb32f97d84360e050f
34,138,908,812,560,340,000,000,000,000,000,000,000
73
patch 8.2.4040: keeping track of allocated lines is too complicated Problem: Keeping track of allocated lines in user functions is too complicated. Solution: Instead of freeing individual lines keep them all until the end.
_parse_value_as_uint (const char *value, guint *uintval) { char *end_of_valid_uint; gulong ulong_value; guint uint_value; errno = 0; ulong_value = strtoul (value, &end_of_valid_uint, 10); if (*value == '\0' || *end_of_valid_uint != '\0') { ...
0
[ "CWE-125", "CWE-835" ]
gnome-session
b0dc999e0b45355314616321dbb6cb71e729fc9d
123,626,029,699,366,800,000,000,000,000,000,000,000
23
[gsm] Delay the creation of the GsmXSMPClient until it really exists We used to create the GsmXSMPClient before the XSMP connection is really accepted. This can lead to some issues, though. An example is: https://bugzilla.gnome.org/show_bug.cgi?id=598211#c19. Quoting: "What is happening is that a new client (probabl...
static int madvise_cold_or_pageout_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end, struct mm_walk *walk) { struct madvise_walk_private *private = walk->private; struct mmu_gather *tlb = private->tlb; bool pageout = private->pageout; struct mm_struct *mm = tlb->mm; struct vm_area_struct *vma = ...
0
[]
linux
bc0c4d1e176eeb614dc8734fc3ace34292771f11
178,055,428,820,862,960,000,000,000,000,000,000,000
172
mm: check that mm is still valid in madvise() IORING_OP_MADVISE can end up basically doing mprotect() on the VM of another process, which means that it can race with our crazy core dump handling which accesses the VM state without holding the mmap_sem (because it incorrectly thinks that it is the final user). This is...
action_info_new (NMConnectionList *list, GtkTreeView *treeview, GtkWindow *list_window, GtkWidget *button, PolKitAction *action) { ActionInfo *info; info = g_malloc0 (sizeof (ActionInfo)); g_object_weak_ref (G_OBJECT (list), (GWeakNotify) action_in...
0
[ "CWE-200" ]
network-manager-applet
8627880e07c8345f69ed639325280c7f62a8f894
321,882,188,860,999,500,000,000,000,000,000,000,000
18
editor: prevent any registration of objects on the system bus D-Bus access-control is name-based; so requests for a specific name are allowed/denied based on the rules in /etc/dbus-1/system.d. But apparently apps still get a non-named service on the bus, and if we register *any* object even though we don't have a nam...
static void reply_spnego_negotiate(struct smb_request *req, uint16 vuid, DATA_BLOB blob1, AUTH_NTLMSSP_STATE **auth_ntlmssp_state) { DATA_BLOB secblob; DATA_BLOB chal; char *kerb_mech = NULL; NTSTATUS status; struct smbd_server_connection *sconn = smbd_server_conn; status = parse_spnego_mech...
0
[ "CWE-119" ]
samba
9280051bfba337458722fb157f3082f93cbd9f2b
230,768,264,531,080,480,000,000,000,000,000,000,000
72
s3: Fix an uninitialized variable read Found by Laurent Gaffie <laurent.gaffie@gmail.com> Thanks for that, Volker Fix bug #7254 (An uninitialized variable read could cause an smbd crash).
static void enable_fallback(bool enable) { GSList *list; for (list = server_list; list; list = list->next) { struct server_data *data = list->data; if (data->index != -1) continue; if (enable) DBG("Enabling fallback DNS server %s", data->server); else DBG("Disabling fallback DNS server %s", data->...
0
[ "CWE-119" ]
connman
5c281d182ecdd0a424b64f7698f32467f8f67b71
310,702,333,496,937,340,000,000,000,000,000,000,000
18
dnsproxy: Fix crash on malformed DNS response If the response query string is malformed, we might access memory pass the end of "name" variable in parse_response().
compat_copy_entry_to_user(struct ipt_entry *e, void __user **dstptr, unsigned int *size, struct xt_counters *counters, unsigned int i) { struct xt_entry_target *t; struct compat_ipt_entry __user *ce; u_int16_t target_offset, next_offset; compat_uint_t origsize; const struct xt_entry_match *ematch; int r...
0
[ "CWE-476" ]
linux
57ebd808a97d7c5b1e1afb937c2db22beba3c1f8
53,485,573,920,793,910,000,000,000,000,000,000,000
37
netfilter: add back stackpointer size checks The rationale for removing the check is only correct for rulesets generated by ip(6)tables. In iptables, a jump can only occur to a user-defined chain, i.e. because we size the stack based on number of user-defined chains we cannot exceed stack size. However, the underlyi...
void cil_destroy_optional(struct cil_optional *optional) { if (optional == NULL) { return; } cil_symtab_datum_destroy(&optional->datum); free(optional); }
0
[ "CWE-125" ]
selinux
340f0eb7f3673e8aacaf0a96cbfcd4d12a405521
56,627,931,968,920,070,000,000,000,000,000,000,000
9
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 ...
bool MACH0_(is_pie)(struct MACH0_(obj_t) *bin) { return (bin && bin->hdr.filetype == MH_EXECUTE && bin->hdr.flags & MH_PIE); }
0
[ "CWE-125", "CWE-787" ]
radare2
0052500c1ed5bf8263b26b9fd7773dbdc6f170c4
165,883,955,122,153,660,000,000,000,000,000,000,000
3
Fix heap OOB read in macho.iterate_chained_fixups ##crash * Reported by peacock-doris via huntr.dev * Reproducer 'tests_65305' mrmacete: * Return early if segs_count is 0 * Initialize segs_count also for reconstructed fixups Co-authored-by: pancake <pancake@nopcode.org> Co-authored-by: Francesco Tamagni <mrm...
int idr_get_new(struct idr *idp, void *ptr, int *id) { int rv; rv = idr_get_new_above_int(idp, ptr, 0); /* * This is a cheap hack until the IDR code can be fixed to * return proper error values. */ if (rv < 0) return _idr_rc_to_errno(rv); *id = rv; return 0; }
0
[]
linux
2dcb22b346be7b7b7e630a8970d69cf3f1111ec1
11,625,745,438,077,189,000,000,000,000,000,000,000
14
idr: fix backtrack logic in idr_remove_all Currently idr_remove_all will fail with a use after free error if idr::layers is bigger than 2, which on 32 bit systems corresponds to items more than 1024. This is due to stepping back too many levels during backtracking. For simplicity let's assume that IDR_BITS=1 -> we h...
static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void *_ftr) { int channels, i, j; struct usb_audio_term iterm; unsigned int master_bits, first_ch_bits; int err, csize; struct uac_feature_unit_descriptor *hdr = _ftr; __u8 *bmaControls; if (state->mixer->protocol == UAC_VERSION_...
0
[ "CWE-416", "CWE-787" ]
linux
124751d5e63c823092060074bd0abaae61aaa9c4
162,197,617,541,329,180,000,000,000,000,000,000,000
136
ALSA: usb-audio: Kill stray URB at exiting USB-audio driver may leave a stray URB for the mixer interrupt when it exits by some error during probe. This leads to a use-after-free error as spotted by syzkaller like: ================================================================== BUG: KASAN: use-after-free in sn...
static int gettimeofday(struct timeval *tp, void *tzp) { unsigned int ticks; ticks= GetTickCount(); tp->tv_usec= ticks*1000; tp->tv_sec= ticks/1000; return 0; }
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
12,502,937,054,137,519,000,000,000,000,000,000,000
9
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
explicit MatrixDiagOp(OpKernelConstruction* context) : OpKernel(context) { // MatrixDiagV3-specific. if (context->HasAttr("align")) { functor::ReadAlignment(context, &left_align_superdiagonal_, &left_align_subdiagonal_); } }
0
[ "CWE-476", "CWE-125" ]
tensorflow
482da92095c4d48f8784b1f00dda4f81c28d2988
204,558,958,850,548,900,000,000,000,000,000,000,000
7
Ensure non-empty padding_value input to tf.raw_ops.MatrixDiagPartV2, if a padding_value is input PiperOrigin-RevId: 388314614 Change-Id: If0b51ad58d5d8543a6be6ce8f42ae4755c80d55f
MagickExport PixelInfo *GetImageHistogram(const Image *image, size_t *number_colors,ExceptionInfo *exception) { PixelInfo *histogram; CubeInfo *cube_info; *number_colors=0; histogram=(PixelInfo *) NULL; cube_info=ClassifyImageColors(image,exception); if (cube_info != (CubeInfo *) NULL) { ...
0
[ "CWE-190" ]
ImageMagick
94691f00839dbdf43edb1508af945ab19b388573
40,277,665,824,337,680,000,000,000,000,000,000,000
32
https://github.com/ImageMagick/ImageMagick/issues/1750
proc_file_lseek(struct file *file, loff_t offset, int orig) { loff_t retval = -EINVAL; switch (orig) { case 1: offset += file->f_pos; /* fallthrough */ case 0: if (offset < 0 || offset > MAX_NON_LFS) break; file->f_pos = retval = offset; } return retval; }
0
[]
linux-2.6
8b90db0df7187a01fb7177f1f812123138f562cf
292,193,296,854,432,380,000,000,000,000,000,000,000
14
Insanity avoidance in /proc The old /proc interfaces were never updated to use loff_t, and are just generally broken. Now, we should be using the seq_file interface for all of the proc files, but converting the legacy functions is more work than most people care for and has little upside.. But at least we can make t...
GF_Err gf_isom_text_add_style(GF_TextSample *samp, GF_StyleRecord *rec) { if (!samp || !rec) return GF_BAD_PARAM; if (!samp->styles) { samp->styles = (GF_TextStyleBox *) gf_isom_box_new(GF_ISOM_BOX_TYPE_STYL); if (!samp->styles) return GF_OUT_OF_MEM; } samp->styles->styles = (GF_StyleRecord*)gf_realloc(samp->s...
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
86,063,546,855,747,150,000,000,000,000,000,000,000
14
fixed #1768
static int proc_pid_instantiate(struct inode *dir, struct dentry * dentry, struct task_struct *task, const void *ptr) { struct inode *inode; inode = proc_pid_make_inode(dir->i_sb, task); if (!inode) goto out; inode->i_mode = S_IFDIR|S_IRUGO|S_IXUGO; inode->i_op = &proc_tgid_base_inode_operations;...
0
[ "CWE-362" ]
linux
8148a73c9901a8794a50f950083c00ccf97d43b3
199,684,793,712,885,530,000,000,000,000,000,000,000
27
proc: prevent accessing /proc/<PID>/environ until it's ready If /proc/<PID>/environ gets read before the envp[] array is fully set up in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to read more bytes than are actually written, as env_start will already be set but env_end will still be zero, makin...
evdns_getaddrinfo_set_timeout(struct evdns_base *evdns_base, struct evdns_getaddrinfo_request *data) { return event_add(&data->timeout, &evdns_base->global_getaddrinfo_allow_skew); }
0
[ "CWE-125" ]
libevent
96f64a022014a208105ead6c8a7066018449d86d
192,791,993,865,425,350,000,000,000,000,000,000,000
5
evdns: name_parse(): fix remote stack overread @asn-the-goblin-slayer: "the name_parse() function in libevent's DNS code is vulnerable to a buffer overread. 971 if (cp != name_out) { 972 if (cp + 1 >= end) return -1; 973 *cp++ = '.'; 974 } 975 if (cp + ...
XkbSizeExplicit(XkbDescPtr xkb, xkbGetMapReply * rep) { unsigned i, len, nRtrn; if (((rep->present & XkbExplicitComponentsMask) == 0) || (rep->nKeyExplicit < 1) || (!xkb) || (!xkb->server) || (!xkb->server->explicit)) { rep->present &= ~XkbExplicitComponentsMask; rep->firstKeyEx...
0
[ "CWE-119" ]
xserver
f7cd1276bbd4fe3a9700096dec33b52b8440788d
156,332,113,139,309,400,000,000,000,000,000,000,000
20
Correct bounds checking in XkbSetNames() CVE-2020-14345 / ZDI 11428 This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
static bool valid_msr_intercept(u32 index) { return direct_access_msr_slot(index) != -ENOENT; }
0
[ "CWE-862" ]
kvm
0f923e07124df069ba68d8bb12324398f4b6b709
58,155,825,441,705,050,000,000,000,000,000,000,000
4
KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653) * Invert the mask of bits that we pick from L2 in nested_vmcb02_prepare_control * Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr This fixes a security issue that allowed a malicious L1 to run L2 with AVIC enable...
NumberFormatTest::TestLenientParse(void) { UErrorCode status = U_ZERO_ERROR; DecimalFormat *format = new DecimalFormat("(#,##0)", status); Formattable n; if (format == NULL || U_FAILURE(status)) { dataerrln("Unable to create DecimalFormat (#,##0) - %s", u_errorName(status)); } else { ...
0
[ "CWE-190" ]
icu
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
8,266,944,130,225,009,000,000,000,000,000,000,000
188
ICU-20246 Fixing another integer overflow in number parsing.
MagickExport MagickBooleanType IsGeometry(const char *geometry) { GeometryInfo geometry_info; MagickStatusType flags; if (geometry == (const char *) NULL) return(MagickFalse); flags=ParseGeometry(geometry,&geometry_info); return(flags != NoValue ? MagickTrue : MagickFalse); }
0
[ "CWE-369" ]
ImageMagick
f35eca82b0c294ff9d0ccad104a881c3ae2ba913
314,942,950,063,835,550,000,000,000,000,000,000,000
13
https://github.com/ImageMagick/ImageMagick/issues/1725
static inline int xfrm_replay_verify_len(struct xfrm_replay_state_esn *replay_esn, struct nlattr *rp) { struct xfrm_replay_state_esn *up; unsigned int ulen; if (!replay_esn || !rp) return 0; up = nla_data(rp); ulen = xfrm_replay_state_esn_len(up); /* Check the overall length and the internal bitmap len...
0
[ "CWE-125" ]
linux
b805d78d300bcf2c83d6df7da0c818b0fee41427
112,679,198,385,612,490,000,000,000,000,000,000,000
24
xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink UBSAN report this: UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24 index 6 is out of range for type 'unsigned int [6]' CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13 Hardware name: QEMU Standard PC (i440FX + P...
dtls1_fix_message_header(SSL *s, unsigned long frag_off, unsigned long frag_len) { struct hm_header_st *msg_hdr = &s->d1->w_msg_hdr; msg_hdr->frag_off = frag_off; msg_hdr->frag_len = frag_len; }
0
[ "CWE-399" ]
openssl
00a4c1421407b6ac796688871b0a49a179c694d9
197,057,986,800,278,000,000,000,000,000,000,000,000
8
Fix DTLS buffered message DoS attack DTLS can handle out of order record delivery. Additionally since handshake messages can be bigger than will fit into a single packet, the messages can be fragmented across multiple records (as with normal TLS). That means that the messages can arrive mixed up, and we have to reasse...
bool TrustedPrimitives::IsInsideEnclave(const void *addr, size_t size) { return sgx_is_within_enclave(addr, size) == 1; }
0
[ "CWE-200", "CWE-668" ]
asylo
ecfcd0008b6f8f63c6fa3cc1b62fcd4a52f2c0ad
176,199,236,844,933,900,000,000,000,000,000,000,000
3
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
FLAC_API FLAC__bool FLAC__stream_decoder_set_metadata_ignore_all(FLAC__StreamDecoder *decoder) { FLAC__ASSERT(0 != decoder); FLAC__ASSERT(0 != decoder->private_); FLAC__ASSERT(0 != decoder->protected_); if(decoder->protected_->state != FLAC__STREAM_DECODER_UNINITIALIZED) return false; memset(decoder->private_->m...
0
[ "CWE-119" ]
flac
5b3033a2b355068c11fe637e14ac742d273f076e
310,663,246,460,995,840,000,000,000,000,000,000,000
11
src/libFLAC/stream_decoder.c : Fix buffer read overflow. This is CVE-2014-8962. Reported-by: Michele Spagnuolo, Google Security Team <mikispag@google.com>
static void qemu_chr_free_common(CharDriverState *chr) { if (chr->be) { chr->be->chr = NULL; } g_free(chr->filename); g_free(chr->label); if (chr->logfd != -1) { close(chr->logfd); } qemu_mutex_destroy(&chr->chr_write_lock); g_free(chr); }
0
[ "CWE-416" ]
qemu
a4afa548fc6dd9842ed86639b4d37d4d1c4ad480
129,134,889,850,276,550,000,000,000,000,000,000,000
13
char: move front end handlers in CharBackend Since the hanlders are associated with a CharBackend, rather than the CharDriverState, it is more appropriate to store in CharBackend. This avoids the handler copy dance in qemu_chr_fe_set_handlers() then mux_chr_update_read_handler(), by storing the CharBackend pointer dir...
static char *mongo_data_append( char *start , const void *data , size_t len ) { memcpy( start , data , len ); return start + len; }
0
[ "CWE-190" ]
mongo-c-driver-legacy
1a1f5e26a4309480d88598913f9eebf9e9cba8ca
259,339,558,227,547,400,000,000,000,000,000,000,000
4
don't mix up int and size_t (first pass to fix that)
static void read_settings(void) { keep_privates_count = settings_get_int("completion_keep_privates"); keep_publics_count = settings_get_int("completion_keep_publics"); completion_lowercase = settings_get_bool("completion_nicks_lowercase"); completion_auto = settings_get_bool("completion_auto"); completion_strict ...
0
[ "CWE-416" ]
irssi
36564717c9f701e3a339da362ab46d220d27e0c1
69,064,412,362,869,570,000,000,000,000,000,000,000
23
Merge branch 'security' into 'master' Security See merge request irssi/irssi!34 (cherry picked from commit b0d9cb33cd9ef9da7c331409e8b7c57a6f3aef3f)
static int phar_build(zend_object_iterator *iter, void *puser) /* {{{ */ { zval *value; zend_bool close_fp = 1; struct _phar_t *p_obj = (struct _phar_t*) puser; uint32_t str_key_len, base_len = p_obj->l; phar_entry_data *data; php_stream *fp; size_t fname_len; size_t contents_len; char *fname, *error = NULL, *...
0
[ "CWE-281" ]
php-src
e5c95234d87fcb8f6b7569a96a89d1e1544749a6
207,120,148,701,134,440,000,000,000,000,000,000,000
326
Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions
static void restore_cs_variables(FILE *sql_file, const char *delimiter) { fprintf(sql_file, "/*!50003 SET character_set_client = @saved_cs_client */ %s\n" "/*!50003 SET character_set_results = @saved_cs_results */ %s\n" "/*!50003 SET collation_connection...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
330,808,966,038,707,630,000,000,000,000,000,000,000
11
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int pbase_tree_cache_ix_incr(int ix) { return (ix+1) % ARRAY_SIZE(pbase_tree_cache); }
0
[ "CWE-119", "CWE-787" ]
git
de1e67d0703894cb6ea782e36abb63976ab07e60
307,780,146,260,369,300,000,000,000,000,000,000,000
4
list-objects: pass full pathname to callbacks When we find a blob at "a/b/c", we currently pass this to our show_object_fn callbacks as two components: "a/b/" and "c". Callbacks which want the full value then call path_name(), which concatenates the two. But this is an inefficient interface; the path is a strbuf, and ...
e_ews_connection_new_full (ESource *source, const gchar *uri, CamelEwsSettings *settings, gboolean allow_connection_reuse) { CamelNetworkSettings *network_settings; EEwsConnection *cnc; gchar *hash_key; gchar *user; if (source) g_return_val_if_fail (E_IS_SOURCE (source), NULL); g_return_val_i...
0
[ "CWE-295" ]
evolution-ews
915226eca9454b8b3e5adb6f2fff9698451778de
133,613,190,282,083,940,000,000,000,000,000,000,000
79
I#27 - SSL Certificates are not validated This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too. Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27
int cpu_watchpoint_insert(CPUState *cpu, vaddr addr, vaddr len, int flags, CPUWatchpoint **watchpoint) { CPUWatchpoint *wp; vaddr in_page; /* forbid ranges which are empty or run off the end of the address space */ if (len == 0 || (addr + len - 1) < addr) { error_repor...
0
[ "CWE-787" ]
qemu
4bfb024bc76973d40a359476dc0291f46e435442
296,259,858,428,395,100,000,000,000,000,000,000,000
36
memory: clamp cached translation in case it points to an MMIO region In using the address_space_translate_internal API, address_space_cache_init forgot one piece of advice that can be found in the code for address_space_translate_internal: /* MMIO registers can be expected to perform full-width accesses based onl...
void rxe_mem_cleanup(void *arg) { struct rxe_mem *mem = arg; int i; if (mem->umem) ib_umem_release(mem->umem); if (mem->map) { for (i = 0; i < mem->num_map; i++) kfree(mem->map[i]); kfree(mem->map); } }
0
[ "CWE-190" ]
linux
647bf3d8a8e5777319da92af672289b2a6c4dc66
259,289,779,695,369,100,000,000,000,000,000,000,000
15
IB/rxe: Fix mem_check_range integer overflow Update the range check to avoid integer-overflow in edge case. Resolves CVE 2016-8636. Signed-off-by: Eyal Itkin <eyal.itkin@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <d...
static ut64 size(RBinFile *arch) { int ret; ut32 off = 0, len = 0; ut8 u32s[sizeof (ut32)] = {0}; ret = r_buf_read_at (arch->buf, 108, u32s, 4); if (ret != 4) { return 0; } off = r_read_le32 (u32s); ret = r_buf_read_at (arch->buf, 104, u32s, 4); if (ret != 4) { return 0; } len = r_read_le32 (u32s); ret...
0
[ "CWE-125" ]
radare2
ead645853a63bf83d8386702cad0cf23b31d7eeb
82,577,654,295,387,080,000,000,000,000,000,000,000
17
fix #6857
fail_secure(dns_zone_t *zone, dns_name_t *keyname) { isc_result_t result; dns_keytable_t *sr = NULL; result = dns_view_getsecroots(zone->view, &sr); if (result == ISC_R_SUCCESS) { dns_keytable_marksecure(sr, keyname); dns_keytable_detach(&sr); } }
0
[ "CWE-327" ]
bind9
f09352d20a9d360e50683cd1d2fc52ccedcd77a0
266,630,228,346,176,030,000,000,000,000,000,000,000
10
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.
static void userfaultfd_event_wait_completion(struct userfaultfd_ctx *ctx, struct userfaultfd_wait_queue *ewq) { if (WARN_ON_ONCE(current->flags & PF_EXITING)) goto out; ewq->ctx = ctx; init_waitqueue_entry(&ewq->wq, current); spin_lock(&ctx->event_wqh.lock); /* * After the __add_wait_queue the uw...
1
[ "CWE-416" ]
linux
0cbb4b4f4c44f54af268969b18d8deda63aded59
68,638,656,350,142,280,000,000,000,000,000,000,000
57
userfaultfd: clear the vma->vm_userfaultfd_ctx if UFFD_EVENT_FORK fails The previous fix in commit 384632e67e08 ("userfaultfd: non-cooperative: fix fork use after free") corrected the refcounting in case of UFFD_EVENT_FORK failure for the fork userfault paths. That still didn't clear the vma->vm_userfaultfd_ctx of th...
static int kvm_handle_cp_32(struct kvm_vcpu *vcpu, const struct sys_reg_desc *global, size_t nr_global, const struct sys_reg_desc *target_specific, size_t nr_specific) { struct sys_reg_params params; u32 hsr = kvm_vcpu_get_hsr(vcpu); int Rt = (hsr >> 5) & 0xf; params.is_aarch32 = true;...
0
[ "CWE-20", "CWE-617" ]
linux
9e3f7a29694049edd728e2400ab57ad7553e5aa9
173,691,206,837,536,070,000,000,000,000,000,000,000
30
arm64: KVM: pmu: Fix AArch32 cycle counter access We're missing the handling code for the cycle counter accessed from a 32bit guest, leading to unexpected results. Cc: stable@vger.kernel.org # 4.6+ Signed-off-by: Wei Huang <wei@redhat.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
call_ready_callbacks_at_idle (gpointer callback_data) { NautilusDirectory *directory; GList *node, *next; ReadyCallback *callback; directory = NAUTILUS_DIRECTORY (callback_data); directory->details->call_ready_idle_id = 0; nautilus_directory_ref (directory); callback = NULL; while (1) { /* Check if any ca...
0
[]
nautilus
7632a3e13874a2c5e8988428ca913620a25df983
272,737,541,900,281,200,000,000,000,000,000,000,000
44
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-...
echo_string( typval_T *tv, char_u **tofree, char_u *numbuf, int copyID) { return echo_string_core(tv, tofree, numbuf, copyID, TRUE, FALSE, FALSE); }
0
[ "CWE-122", "CWE-787" ]
vim
605ec91e5a7330d61be313637e495fa02a6dc264
99,006,110,730,588,000,000,000,000,000,000,000,000
8
patch 8.2.3847: illegal memory access when using a lambda with an error Problem: Illegal memory access when using a lambda with an error. Solution: Avoid skipping over the NUL after a string.
HandleFileUploadLengthError(rfbClientPtr cl, short fNameSize) { char *path = NULL; int n = 0; if((path = (char*) calloc(fNameSize, sizeof(char))) == NULL) { rfbLog("File [%s]: Method [%s]: Fatal Error: Alloc failed\n", __FILE__, __FUNCTION__); return; } if((n = rfbReadExact(cl, path, fNameSize)) <= 0) {...
0
[ "CWE-416" ]
libvncserver
ca2a5ac02fbbadd0a21fabba779c1ea69173d10b
322,354,123,915,313,700,000,000,000,000,000,000,000
36
tightvnc-filetransfer: fix heap use-after-free One can only guess what the intended semantics were here, but as every other rfbCloseClient() call in this file is followed by an immediate return, let's assume this was forgotton in this case. Anyway, don't forget to clean up to not leak memory. Closes #241
int ares_parse_a_reply(const unsigned char *abuf, int alen, struct hostent **host, struct ares_addrttl *addrttls, int *naddrttls) { struct ares_addrinfo ai; struct ares_addrinfo_node *next; struct ares_addrinfo_cname *next_cname; char **aliases = NULL; char *quest...
0
[ "CWE-400" ]
c-ares
0d252eb3b2147179296a3bdb4ef97883c97c54d3
332,079,055,281,956,500,000,000,000,000,000,000,000
166
ares_parse_{a,aaaa}_reply could return larger *naddrttls than passed in If there are more ttls returned than the maximum provided by the requestor, then the *naddrttls response would be larger than the actual number of elements in the addrttls array. This bug could lead to invalid memory accesses in applications usin...
size_t ZSTD_CCtx_refPrefix_advanced( ZSTD_CCtx* cctx, const void* prefix, size_t prefixSize, ZSTD_dictContentType_e dictContentType) { if (cctx->streamStage != zcss_init) return ERROR(stage_wrong); cctx->cdict = NULL; /* prefix discards any prior cdict */ cctx->prefixDict.dict = prefix; cctx->...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
81,016,857,418,317,720,000,000,000,000,000,000,000
10
fixed T36302429
static int selinux_inode_mkdir(struct inode *dir, struct dentry *dentry, int mask) { return may_create(dir, dentry, SECCLASS_DIR); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
333,292,320,766,743,640,000,000,000,000,000,000,000
4
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5, const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11, const T& val12) const { return CImg<T>(_width,_height,_depth,_spectru...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
53,628,874,318,097,280,000,000,000,000,000,000,000
6
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
uchar *pack(uchar *to, const uchar *from, uint max_length) { return Field::pack(to, from, max_length); }
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
323,194,696,539,632,400,000,000,000,000,000,000,000
2
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int IntensityCompare(const void *x,const void *y) { const MagickPixelPacket *color_1, *color_2; int intensity; color_1=(const MagickPixelPacket *) x; color_2=(const MagickPixelPacket *) y; intensity=(int) MagickPixelIntensity(color_2)-(int) MagickPixelIntensity(color_1); return(inte...
0
[ "CWE-119", "CWE-787" ]
ImageMagick6
91e58d967a92250439ede038ccfb0913a81e59fe
72,492,394,778,110,710,000,000,000,000,000,000,000
15
https://github.com/ImageMagick/ImageMagick/issues/1615
static CubeInfo *GetCubeInfo(const QuantizeInfo *quantize_info, const size_t depth,const size_t maximum_colors) { CubeInfo *cube_info; MagickRealType sum, weight; register ssize_t i; size_t length; /* Initialize tree to describe color cube_info. */ cube_info=(CubeInfo *) Acqu...
0
[ "CWE-125" ]
ImageMagick6
e2a21735e3a3f3930bd431585ec36334c4c2eb77
168,860,982,868,298,710,000,000,000,000,000,000,000
76
https://github.com/ImageMagick/ImageMagick/issues/1540
static int GetExplicitVersion(const byte* input, word32* inOutIdx, int* version, word32 maxIdx) { word32 idx = *inOutIdx; byte tag; WOLFSSL_ENTER("GetExplicitVersion"); if (GetASNTag(input, &idx, &tag, maxIdx) != 0) return ASN_PARSE_E; if (tag == (ASN_CONTEXT...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
100,059,599,210,917,790,000,000,000,000,000,000,000
31
OCSP: improve handling of OCSP no check extension
data_sock_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) { int err = 0, id; struct sock *sk = sock->sk; struct mISDNdevice *dev; struct mISDNversion ver; switch (cmd) { case IMGETVERSION: ver.major = MISDN_MAJOR_VERSION; ver.minor = MISDN_MINOR_VERSION; ver.release = MISDN_RELEASE; if...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
252,194,895,233,868,140,000,000,000,000,000,000,000
52
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 inline int btrfs_chunk_max_errors(struct map_lookup *map) { const int index = btrfs_bg_flags_to_raid_index(map->type); return btrfs_raid_array[index].tolerated_failures; }
0
[ "CWE-476", "CWE-703" ]
linux
e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091
79,718,413,567,538,170,000,000,000,000,000,000,000
6
btrfs: fix NULL pointer dereference when deleting device by invalid id [BUG] It's easy to trigger NULL pointer dereference, just by removing a non-existing device id: # mkfs.btrfs -f -m single -d single /dev/test/scratch1 \ /dev/test/scratch2 # mount /dev/test/scratch1 /mnt/btrfs # btrfs device remove 3 /...
static void init_amd_k7(struct cpuinfo_x86 *c) { u32 l, h; /* * Bit 15 of Athlon specific MSR 15, needs to be 0 * to enable SSE on Palomino/Morgan/Barton CPU's. * If the BIOS didn't enable it already, enable it here. */ if (c->x86_model >= 6 && c->x86_model <= 10) { if (!cpu_has(c, X86_FEATURE_XMM)) { ...
0
[ "CWE-399" ]
tip
3b56496865f9f7d9bcb2f93b44c63f274f08e3b6
20,914,569,948,294,113,000,000,000,000,000,000,000
38
x86, cpu, amd: Add workaround for family 16h, erratum 793 This adds the workaround for erratum 793 as a precaution in case not every BIOS implements it. This addresses CVE-2013-6885. Erratum text: [Revision Guide for AMD Family 16h Models 00h-0Fh Processors, document 51810 Rev. 3.04 November 2013] 793 Specific Com...
const std::string name() override { return "delete_bucket_policy"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
78,792,289,903,878,510,000,000,000,000,000,000,000
3
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh, struct notifier_block *n) { unsigned long flags; int ret; spin_lock_irqsave(&nh->lock, flags); ret = notifier_chain_unregister(&nh->head, n); spin_unlock_irqrestore(&nh->lock, flags); synchronize_rcu(); return ret; }
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
325,810,919,993,933,100,000,000,000,000,000,000,000
12
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
void fd_install(unsigned int fd, struct file *file) { struct files_struct *files = current->files; struct fdtable *fdt; rcu_read_lock_sched(); if (unlikely(files->resize_in_progress)) { rcu_read_unlock_sched(); spin_lock(&files->file_lock); fdt = files_fdtable(files); BUG_ON(fdt->fd[fd] != NULL); rcu_as...
0
[]
linux
054aa8d439b9185d4f5eb9a90282d1ce74772969
205,315,151,201,208,030,000,000,000,000,000,000,000
23
fget: check that the fd still exists after getting a ref to it Jann Horn points out that there is another possible race wrt Unix domain socket garbage collection, somewhat reminiscent of the one fixed in commit cbcf01128d0a ("af_unix: fix garbage collect vs MSG_PEEK"). See the extended comment about the garbage colle...
static bool check_no_constants(THD *, partition_info*) { return FALSE; }
0
[ "CWE-416" ]
server
c02ebf3510850ba78a106be9974c94c3b97d8585
299,292,549,494,027,900,000,000,000,000,000,000,000
4
MDEV-24176 Preparations 1. moved fix_vcol_exprs() call to open_table() mysql_alter_table() doesn't do lock_tables() so it cannot win from fix_vcol_exprs() from there. Tests affected: main.default_session 2. Vanilla cleanups and comments.
_copySortBy(const SortBy *from) { SortBy *newnode = makeNode(SortBy); COPY_NODE_FIELD(node); COPY_SCALAR_FIELD(sortby_dir); COPY_SCALAR_FIELD(sortby_nulls); COPY_NODE_FIELD(useOp); COPY_LOCATION_FIELD(location); return newnode; }
0
[ "CWE-362" ]
postgres
5f173040e324f6c2eebb90d86cf1b0cdb5890f0a
209,981,867,891,204,900,000,000,000,000,000,000,000
12
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...
nfsd4_open(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, union nfsd4_op_u *u) { struct nfsd4_open *open = &u->open; __be32 status; struct svc_fh *resfh = NULL; struct net *net = SVC_NET(rqstp); struct nfsd_net *nn = net_generic(net, nfsd_net_id); bool reclaim = false; dprintk("NFSD: nfsd4_ope...
0
[ "CWE-476" ]
linux
01310bb7c9c98752cc763b36532fab028e0f8f81
334,275,403,129,196,600,000,000,000,000,000,000,000
120
nfsd: COPY and CLONE operations require the saved filehandle to be set Make sure we have a saved filehandle, otherwise we'll oops with a null pointer dereference in nfs4_preprocess_stateid_op(). Signed-off-by: Scott Mayhew <smayhew@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: J. Bruce Fields <bfields@redhat....
static int smb3_simple_fallocate_range(unsigned int xid, struct cifs_tcon *tcon, struct cifsFileInfo *cfile, loff_t off, loff_t len) { struct file_allocated_range_buffer in_data, *out_data = NULL, *tmp_data; u32 out_data_len; char *buf = NULL; loff_t l; int rc; in_data.file_offse...
0
[ "CWE-476" ]
linux
d6f5e358452479fa8a773b5c6ccc9e4ec5a20880
53,488,061,537,666,630,000,000,000,000,000,000,000
82
cifs: fix NULL ptr dereference in smb2_ioctl_query_info() When calling smb2_ioctl_query_info() with invalid smb_query_info::flags, a NULL ptr dereference is triggered when trying to kfree() uninitialised rqst[n].rq_iov array. This also fixes leaked paths that are created in SMB2_open_init() which required SMB2_open_f...
static ssize_t f_printer_opts_q_len_show(struct config_item *item, char *page) { struct f_printer_opts *opts = to_f_printer_opts(item); int result; mutex_lock(&opts->lock); result = sprintf(page, "%d\n", opts->q_len); mutex_unlock(&opts->lock); return result; }
0
[ "CWE-416" ]
linux
e8d5f92b8d30bb4ade76494490c3c065e12411b1
196,536,159,955,325,200,000,000,000,000,000,000,000
12
usb: gadget: function: printer: fix use-after-free in __lock_acquire Fix this by increase object reference count. BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180 kernel/locking/lockdep.c:3831 Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377 CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain...
static int trim_leading_zeros(const byte** input, word32 sz) { int i, leadingZeroCount = 0; const byte* tmp = *input; for (i=0; i<(int)sz; i++) { if (tmp[i] != 0) break; leadingZeroCount++; } /* catch all zero case */ if (sz > 0 && leadingZeroCount == (int)sz) { ...
0
[ "CWE-125", "CWE-345" ]
wolfssl
f93083be72a3b3d956b52a7ec13f307a27b6e093
131,877,548,574,082,950,000,000,000,000,000,000,000
17
OCSP: improve handling of OCSP no check extension
static int test_and_set_read_order_bit(ASS_Track *track, int id) { if (resize_read_order_bitmap(track, id) < 0) return -1; int index = id / 32; uint32_t bit = 1u << (id % 32); if (track->parser_priv->read_order_bitmap[index] & bit) return 1; track->parser_priv->read_order_bitmap[inde...
0
[ "CWE-369", "CWE-787" ]
libass
017137471d0043e0321e377ed8da48e45a3ec632
134,328,341,860,980,690,000,000,000,000,000,000,000
11
decode_font: fix subtraction broken by change to unsigned type This caused a one-byte buffer overwrite and an assertion failure. Regression in commit 910211f1c0078e37546f73e95306724358b89be2. Discovered by OSS-Fuzz. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=26674. Fixes https://bugs.chromium.org/p...
BSONObj expectedOptimized() { return spec(); }
0
[ "CWE-835" ]
mongo
0a076417d1d7fba3632b73349a1fd29a83e68816
44,727,517,736,026,810,000,000,000,000,000,000,000
3
SERVER-38070 fix infinite loop in agg expression
static bool stacksafe(struct bpf_func_state *old, struct bpf_func_state *cur, struct idpair *idmap) { int i, spi; /* walk slots of the explored stack and ignore any additional * slots in the current stack, since explored(safe) state * didn't use them */ for (i = 0; i < old->allocated_stack; i+...
0
[ "CWE-119", "CWE-681", "CWE-787" ]
linux
5b9fbeb75b6a98955f628e205ac26689bcb1383e
262,681,184,768,157,880,000,000,000,000,000,000,000
64
bpf: Fix scalar32_min_max_or bounds tracking Simon reported an issue with the current scalar32_min_max_or() implementation. That is, compared to the other 32 bit subreg tracking functions, the code in scalar32_min_max_or() stands out that it's using the 64 bit registers instead of 32 bit ones. This leads to bounds tra...
static int pppoe_create(struct net *net, struct socket *sock) { struct sock *sk; sk = sk_alloc(net, PF_PPPOX, GFP_KERNEL, &pppoe_sk_proto); if (!sk) return -ENOMEM; sock_init_data(sock, sk); sock->state = SS_UNCONNECTED; sock->ops = &pppoe_ops; sk->sk_backlog_rcv = pppoe_rcv_core; sk->sk_state = PPPOX_NO...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
320,871,457,435,253,700,000,000,000,000,000,000,000
21
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...
struct net *get_net_ns_by_id(struct net *net, int id) { struct net *peer; if (id < 0) return NULL; rcu_read_lock(); spin_lock_bh(&net->nsid_lock); peer = idr_find(&net->netns_ids, id); if (peer) get_net(peer); spin_unlock_bh(&net->nsid_lock); rcu_read_unlock(); return peer; }
1
[ "CWE-416" ]
linux
21b5944350052d2583e82dd59b19a9ba94a007f0
128,908,587,089,709,440,000,000,000,000,000,000,000
17
net: Fix double free and memory corruption in get_net_ns_by_id() (I can trivially verify that that idr_remove in cleanup_net happens after the network namespace count has dropped to zero --EWB) Function get_net_ns_by_id() does not check for net::count after it has found a peer in netns_ids idr. It may dereference a...
static ssize_t proc_pid_attr_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { struct inode * inode = file->f_path.dentry->d_inode; char *page; ssize_t length; struct task_struct *task = get_proc_task(inode); length = -ESRCH; if (!task) goto out_no_task; if (count > PAGE_...
0
[]
linux
0499680a42141d86417a8fbaa8c8db806bea1201
28,236,419,414,152,050,000,000,000,000,000,000,000
44
procfs: add hidepid= and gid= mount options Add support for mount options to restrict access to /proc/PID/ directories. The default backward-compatible "relaxed" behaviour is left untouched. The first mount option is called "hidepid" and its value defines how much info about processes we want to be available for non...
gst_asf_demux_get_metadata_for_stream (GstASFDemux * demux, guint stream_num) { gchar sname[32]; guint i; g_snprintf (sname, sizeof (sname), "stream-%u", stream_num); for (i = 0; i < gst_caps_get_size (demux->metadata); ++i) { GstStructure *s; s = gst_caps_get_structure (demux->metadata, i); if (...
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
101,065,918,391,343,850,000,000,000,000,000,000,000
22
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
pk_transaction_error_code_cb (PkBackendJob *job, PkError *item, PkTransaction *transaction) { PkErrorEnum code; g_autofree gchar *details = NULL; g_return_if_fail (PK_IS_TRANSACTION (transaction)); g_return_if_fail (transaction->priv->tid != NULL); /* get data */ g_object_get (item, "c...
0
[ "CWE-287" ]
PackageKit
7e8a7905ea9abbd1f384f05f36a4458682cd4697
137,368,608,743,399,080,000,000,000,000,000,000,000
33
Do not set JUST_REINSTALL on any kind of auth failure If we try to continue the auth queue when it has been cancelled (or failed) then we fall upon the obscure JUST_REINSTALL transaction flag which only the DNF backend actually verifies. Many thanks to Matthias Gerstner <mgerstner@suse.de> for spotting the problem.
void buildFinishedTLS(SSL& ssl, Finished& fin, const opaque* sender) { opaque handshake_hash[FINISHED_SZ]; ssl.useHashes().use_MD5().get_digest(handshake_hash); ssl.useHashes().use_SHA().get_digest(&handshake_hash[MD5_LEN]); const opaque* side; if ( strncmp((const char*)sender, (const char*)clien...
0
[]
mysql-server
b9768521bdeb1a8069c7b871f4536792b65fd79b
154,868,830,277,984,550,000,000,000,000,000,000,000
20
Updated yassl to yassl-2.3.8 (cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa)
static int h2_send_empty_data_es(struct h2s *h2s) { struct h2c *h2c = h2s->h2c; struct buffer *res; char str[9]; int ret; if (h2s->st == H2_SS_HLOC || h2s->st == H2_SS_ERROR || h2s->st == H2_SS_CLOSED) return 1; if (h2c_mux_busy(h2c, h2s)) { h2s->flags |= H2_SF_BLK_MBUSY; return 0; } res = h2_get_buf(h...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
54,355,313,109,343,520,000,000,000,000,000,000,000
40
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
lyxml_add_child(struct ly_ctx *ctx, struct lyxml_elem *parent, struct lyxml_elem *elem) { struct lyxml_elem *e; assert(parent); assert(elem); /* (re)link element to parent */ if (elem->parent) { lyxml_unlink_elem(ctx, elem, 1); } elem->parent = parent; /* link parent to elemen...
0
[ "CWE-674" ]
libyang
298b30ea4ebee137226acf9bb38678bd82704582
177,084,630,422,000,740,000,000,000,000,000,000,000
28
common FEATURE add a hard limit for recursion Fixes #1453
EXPORTED int annotate_state_set_mailbox(annotate_state_t *state, struct mailbox *mailbox) { return annotate_state_set_scope(state, NULL, mailbox, 0); }
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
181,850,175,930,776,360,000,000,000,000,000,000,000
5
annotate: don't allow everyone to write shared server entries
pango_ot_buffer_add_glyph (PangoOTBuffer *buffer, guint glyph, guint properties, guint cluster) { hb_buffer_add_glyph (buffer->buffer, glyph, properties, cluster); }
0
[]
pango
336bb3201096bdd0494d29926dd44e8cca8bed26
97,516,802,063,092,340,000,000,000,000,000,000,000
8
[HB] Remove all references to the old code!